diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f92f949 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: goreleaser + +on: + push: + tags: + - v*.*.* + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-22.04 + steps: + - + name: Install dependencies for cross-compiling + run: | + sudo apt update + sudo apt-get --no-install-recommends --yes install \ + libc6-dev-amd64-cross \ + gcc-aarch64-linux-gnu libc6-dev-arm64-cross \ + gcc-arm-linux-gnueabihf libc6-dev-armhf-cross + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Fetch all tags + run: git fetch --force --tags + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.19 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.gitignore b/.gitignore index 9b3fbd7..75580a0 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,6 @@ gen /sql/ /out/ /db/ -/docs/ -/web/ /conf/conf.ini /conf/conf.conf /conf/conf.json @@ -38,6 +36,4 @@ main CasaOS github.com .all-contributorsrc -build -dist -.goreleaser.yaml \ No newline at end of file +dist \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..949e04f --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,167 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +project_name: casaos +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - id: casaos-amd64 + binary: build/sysroot/usr/bin/casaos + env: + - CGO_ENABLED=1 + - CC=x86_64-linux-gnu-gcc + ldflags: + - -s + - -w + - -extldflags "-static" + tags: + - musl + - netgo + goos: + - linux + goarch: + - amd64 + hooks: + post: + - find build/sysroot -type f | xargs -L 1 realpath --relative-to=build/sysroot > build/sysroot.manifest + - id: casaos-arm64 + binary: build/sysroot/usr/bin/casaos + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + ldflags: + - -s + - -w + - -extldflags "-static" + tags: + - musl + - netgo + goos: + - linux + goarch: + - arm64 + hooks: + post: + - find build/sysroot -type f | xargs -L 1 realpath --relative-to=build/sysroot > build/sysroot.manifest + - id: casaos-arm-7 + binary: build/sysroot/usr/bin/casaos + env: + - CGO_ENABLED=1 + - CC=arm-linux-gnueabihf-gcc + ldflags: + - -s + - -w + - -extldflags "-static" + tags: + - musl + - netgo + goos: + - linux + goarch: + - arm + goarm: + - "7" + hooks: + post: + - find build/sysroot -type f | xargs -L 1 realpath --relative-to=build/sysroot > build/sysroot.manifest + - id: casaos-migration-tool-amd64 + binary: build/sysroot/usr/bin/casaos-migration-tool + main: ./cmd/migration-tool + env: + - CGO_ENABLED=1 + - CC=x86_64-linux-gnu-gcc + ldflags: + - -s + - -w + - -extldflags "-static" + tags: + - musl + - netgo + goos: + - linux + goarch: + - amd64 + - id: casaos-migration-tool-arm64 + binary: build/sysroot/usr/bin/casaos-migration-tool + main: ./cmd/migration-tool + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + ldflags: + - -s + - -w + - -extldflags "-static" + tags: + - musl + - netgo + goos: + - linux + goarch: + - arm64 + - id: casaos-migration-tool-arm-7 + binary: build/sysroot/usr/bin/casaos-migration-tool + main: ./cmd/migration-tool + env: + - CGO_ENABLED=1 + - CC=arm-linux-gnueabihf-gcc + ldflags: + - -s + - -w + - -extldflags "-static" + tags: + - musl + - netgo + goos: + - linux + goarch: + - arm + goarm: + - "7" +archives: + - name_template: "{{ .Os }}-{{ .Arch }}-{{ .ProjectName }}-v{{ .Version }}" + id: casaos + builds: + - casaos-amd64 + - casaos-arm64 + - casaos-arm-7 + replacements: + arm: arm-7 + files: + - build/**/* + - name_template: "{{ .Os }}-{{ .Arch }}-{{ .ProjectName }}-migration-tool-v{{ .Version }}" + id: casaos-migration-tool + builds: + - casaos-migration-tool-amd64 + - casaos-migration-tool-arm64 + - casaos-migration-tool-arm-7 + replacements: + arm: arm-7 + files: + - build/sysroot/etc/**/* +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ incpatch .Version }}" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" +# release: +# github: +# owner: IceWhaleTech +# name: CasaOS +# draft: true +# prerelease: auto +# mode: replace +# name_template: "v{{ .Version }}" +release: + github: + owner: LinkLeong + name: casaos-alpha + draft: true + prerelease: auto + mode: replace + name_template: "v{{ .Version }}" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6704e1c..bf48de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -## [0.3.5-alpha] - 2022-08-08 + +## [0.3.6-alpha.1] - 2022-09-06 + +### Added +- [System] Added display of power and temperature to performance widget (Intel) +- [Apps] Added support for adding custom links in the APP module + +### Fixed +- [Apps] Fixed the problem of not being able to modify the application pairing ([#510](https://github.com/IceWhaleTech/CasaOS/issues/510)) +### Changed +- [System] Architecture optimization. Improved performance. + +## [0.3.5] - 2022-08-23 ### Added diff --git a/UI b/UI deleted file mode 160000 index bca2742..0000000 --- a/UI +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bca27426e1f398c31fb6c5c23885482326514f6e diff --git a/build/scripts/migration/script.d/03-migrate-casaos.sh b/build/scripts/migration/script.d/03-migrate-casaos.sh new file mode 100644 index 0000000..ba64e4d --- /dev/null +++ b/build/scripts/migration/script.d/03-migrate-casaos.sh @@ -0,0 +1,180 @@ +#!/bin/bash + +set -e + +# functions +__info() { + echo -e "🟩 ${1}" +} + +__info_done() { + echo -e "✅ ${1}" +} + +__warning() { + echo -e "🟨 ${1}" +} + +__error() { + echo "🟥 ${1}" + exit 1 +} + +__is_version_gt() { + test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1" +} +__normalize_version() { + local version + if [ "${1::1}" = "v" ]; then + version="${1:1}" + else + version="${1}" + fi + + echo "$version" +} + +__is_migration_needed() { + local version1 + local version2 + + version1=$(__normalize_version "${1}") + version2=$(__normalize_version "${2}") + + if [ "${version1}" = "${version2}" ]; then + return 1 + fi + + if [ "CURRENT_VERSION_NOT_FOUND" = "${version1}" ]; then + return 1 + fi + + if [ "LEGACY_WITHOUT_VERSION" = "${version1}" ]; then + return 0 + fi + + __is_version_gt "${version2}" "${version1}" +} + +BUILD_PATH=$(dirname "${BASH_SOURCE[0]}")/../../.. +SOURCE_ROOT=${BUILD_PATH}/sysroot + +APP_NAME="casaos" +# APP_NAME_FORMAL="CasaOS" +APP_NAME_FORMAL="casaos-alpha" + +# check if migration is needed +SOURCE_BIN_PATH=${SOURCE_ROOT}/usr/bin +SOURCE_BIN_FILE=${SOURCE_BIN_PATH}/${APP_NAME} + +CURRENT_BIN_PATH=/usr/bin +CURRENT_BIN_PATH_LEGACY=/usr/local/bin +CURRENT_BIN_FILE=${CURRENT_BIN_PATH}/${APP_NAME} +CURRENT_BIN_FILE_LEGACY=$(realpath -e ${CURRENT_BIN_PATH_LEGACY}/${APP_NAME} || which ${APP_NAME} || echo CURRENT_BIN_FILE_LEGACY_NOT_FOUND) + +SOURCE_VERSION="$(${SOURCE_BIN_FILE} -v)" +CURRENT_VERSION="$(${CURRENT_BIN_FILE} -v || ${CURRENT_BIN_FILE_LEGACY} -v || (stat "${CURRENT_BIN_FILE_LEGACY}" > /dev/null && echo LEGACY_WITHOUT_VERSION) || echo CURRENT_VERSION_NOT_FOUND)" + +__info_done "CURRENT_VERSION: ${CURRENT_VERSION}" +__info_done "SOURCE_VERSION: ${SOURCE_VERSION}" + +NEED_MIGRATION=$(__is_migration_needed "${CURRENT_VERSION}" "${SOURCE_VERSION}" && echo "true" || echo "false") + +if [ "${NEED_MIGRATION}" = "false" ]; then + __info_done "Migration is not needed." + exit 0 +fi + +MIGRATION_SERVICE_DIR=${1} + +if [ -z "${MIGRATION_SERVICE_DIR}" ]; then + MIGRATION_SERVICE_DIR=${BUILD_PATH}/scripts/migration/service.d/${APP_NAME} +fi +MIGRATION_LIST_FILE=${MIGRATION_SERVICE_DIR}/migration.list +MIGRATION_PATH=() + +CURRENT_VERSION_FOUND="false" + +# a VERSION_PAIR looks like "v0.3.5 v0.3.6-alpha2" +# +# - "v0.3.5" is the current version installed on this host +# - "v0.3.6-alpha2" is the version of the migration tool from GitHub +while read -r VERSION_PAIR; do + if [ -z "${VERSION_PAIR}" ]; then + continue + fi + + # obtain "v0.3.5" from "v0.3.5 v0.3.6-alpha2" + VER1=$(echo "${VERSION_PAIR}" | cut -d' ' -f1) + + # obtain "v0.3.6-alpha2" from "v0.3.5 v0.3.6-alpha2" + VER2=$(echo "${VERSION_PAIR}" | cut -d' ' -f2) + + if [ "${CURRENT_VERSION}" = "${VER1// /}" ] || [ "${CURRENT_VERSION}" = "LEGACY_WITHOUT_VERSION" ]; then + CURRENT_VERSION_FOUND="true" + fi + + if [ "${CURRENT_VERSION_FOUND}" = "true" ]; then + MIGRATION_PATH+=("${VER2// /}") + fi +done < "${MIGRATION_LIST_FILE}" + +if [ ${#MIGRATION_PATH[@]} -eq 0 ]; then + __warning "No migration path found from ${CURRENT_VERSION} to ${SOURCE_VERSION}" + exit 0 +fi + +ARCH="unknown" + +case $(uname -m) in + x86_64) + ARCH="amd64" + ;; + aarch64) + ARCH="arm64" + ;; + armv7l) + ARCH="arm-7" + ;; + *) + __error "Unsupported architecture" + ;; +esac + +pushd "${MIGRATION_SERVICE_DIR}" + +{ for VER2 in "${MIGRATION_PATH[@]}"; do + + + MIGRATION_TOOL_FILE=linux-"${ARCH}"-"${APP_NAME}"-migration-tool-"${VER2}".tar.gz + + if [ -f "${MIGRATION_TOOL_FILE}" ]; then + __info "Migration tool ${MIGRATION_TOOL_FILE} exists. Skip downloading." + continue + fi + + MIGRATION_TOOL_URL=https://github.com/LinkLeong/"${APP_NAME_FORMAL}"/releases/download/"${VER2}"/linux-"${ARCH}"-"${APP_NAME}"-migration-tool-"${VER2}".tar.gz + echo "Dowloading ${MIGRATION_TOOL_URL}..." + curl -sL -O "${MIGRATION_TOOL_URL}" + done +} || { + popd + __error "Failed to download migration tools" +} + +{ + for VER2 in "${MIGRATION_PATH[@]}"; do + MIGRATION_TOOL_FILE=linux-"${ARCH}"-"${APP_NAME}"-migration-tool-"${VER2}".tar.gz + __info "Extracting ${MIGRATION_TOOL_FILE}..." + tar zxvf "${MIGRATION_TOOL_FILE}" || __error "Failed to extract ${MIGRATION_TOOL_FILE}" + + MIGRATION_TOOL_PATH=build/sysroot/usr/bin/${APP_NAME}-migration-tool + __info "Running ${MIGRATION_TOOL_PATH}..." + ${MIGRATION_TOOL_PATH} + done +} || { + popd + __error "Failed to extract and run migration tools" +} + +popd diff --git a/build/scripts/migration/service.d/casaos/migration.list b/build/scripts/migration/service.d/casaos/migration.list new file mode 100644 index 0000000..2035e42 --- /dev/null +++ b/build/scripts/migration/service.d/casaos/migration.list @@ -0,0 +1,3 @@ +LEGACY_WITHOUT_VERSION v0.3.6 +v0.3.5 v0.3.6 +v0.3.5.1 v0.3.6 diff --git a/build/scripts/setup/script.d/03-setup-casaos.sh b/build/scripts/setup/script.d/03-setup-casaos.sh new file mode 100755 index 0000000..6b4fad1 --- /dev/null +++ b/build/scripts/setup/script.d/03-setup-casaos.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +set -e + +BUILD_PATH=$(dirname "${BASH_SOURCE[0]}")/../../.. + +APP_NAME_SHORT=casaos + +__get_setup_script_directory_by_os_release() { + pushd "$(dirname "${BASH_SOURCE[0]}")/../service.d/${APP_NAME_SHORT}" >/dev/null + + { + # shellcheck source=/dev/null + { + source /etc/os-release + { + pushd "${ID}"/"${VERSION_CODENAME}" >/dev/null + } || { + pushd "${ID}" >/dev/null + } || { + pushd "${ID_LIKE}" >/dev/null + } || { + echo "Unsupported OS: ${ID} ${VERSION_CODENAME} (${ID_LIKE})" + exit 1 + } + + pwd + + popd >/dev/null + + } || { + echo "Unsupported OS: unknown" + exit 1 + } + + } + + popd >/dev/null +} + +SETUP_SCRIPT_DIRECTORY=$(__get_setup_script_directory_by_os_release) +SETUP_SCRIPT_FILENAME="setup-${APP_NAME_SHORT}.sh" + +SETUP_SCRIPT_FILEPATH="${SETUP_SCRIPT_DIRECTORY}/${SETUP_SCRIPT_FILENAME}" + +{ + echo "🟩 Running ${SETUP_SCRIPT_FILENAME}..." + $SHELL "${SETUP_SCRIPT_FILEPATH}" "${BUILD_PATH}" +} || { + echo "🟥 ${SETUP_SCRIPT_FILENAME} failed." + exit 1 +} + +echo "✅ ${SETUP_SCRIPT_FILENAME} finished." diff --git a/build/scripts/setup/service.d/casaos/debian/bullseye/setup-casaos.sh b/build/scripts/setup/service.d/casaos/debian/bullseye/setup-casaos.sh new file mode 120000 index 0000000..10605a4 --- /dev/null +++ b/build/scripts/setup/service.d/casaos/debian/bullseye/setup-casaos.sh @@ -0,0 +1 @@ +../setup-casaos.sh \ No newline at end of file diff --git a/build/scripts/setup/service.d/casaos/debian/setup-casaos.sh b/build/scripts/setup/service.d/casaos/debian/setup-casaos.sh new file mode 100644 index 0000000..a13b6e1 --- /dev/null +++ b/build/scripts/setup/service.d/casaos/debian/setup-casaos.sh @@ -0,0 +1,45 @@ +#!/bin/bash +### +# @Author: LinkLeong link@icewhale.org +# @Date: 2022-08-25 11:41:22 + # @LastEditors: LinkLeong + # @LastEditTime: 2022-08-31 17:54:17 + # @FilePath: /CasaOS/build/scripts/setup/service.d/casaos/debian/setup-casaos.sh +# @Description: + +# @Website: https://www.casaos.io +# Copyright (c) 2022 by icewhale, All Rights Reserved. +### + +set -e + +APP_NAME="casaos" + +# copy config files +CONF_PATH=/etc/casaos +OLD_CONF_PATH=/etc/casaos.conf +CONF_FILE=${CONF_PATH}/${APP_NAME}.conf +CONF_FILE_SAMPLE=${CONF_PATH}/${APP_NAME}.conf.sample + + +if [ -f "${OLD_CONF_PATH}" ]; then + echo "copy old conf" + cp "${OLD_CONF_PATH}" "${CONF_FILE}" +fi +if [ ! -f "${CONF_FILE}" ]; then + echo "Initializing config file..." + cp -v "${CONF_FILE_SAMPLE}" "${CONF_FILE}" +fi + +if systemctl is-active "${APP_NAME}.service" &>/dev/null ;then + echo "server started" +else + # enable and start service + systemctl daemon-reload + + echo "Enabling service..." + systemctl enable --force --no-ask-password "${APP_NAME}.service" + + echo "Starting service..." + systemctl start --force --no-ask-password "${APP_NAME}.service" +fi \ No newline at end of file diff --git a/build/scripts/setup/service.d/casaos/ubuntu/jammy/setup-casaos.sh b/build/scripts/setup/service.d/casaos/ubuntu/jammy/setup-casaos.sh new file mode 120000 index 0000000..10605a4 --- /dev/null +++ b/build/scripts/setup/service.d/casaos/ubuntu/jammy/setup-casaos.sh @@ -0,0 +1 @@ +../setup-casaos.sh \ No newline at end of file diff --git a/build/scripts/setup/service.d/casaos/ubuntu/setup-casaos.sh b/build/scripts/setup/service.d/casaos/ubuntu/setup-casaos.sh new file mode 120000 index 0000000..c5801ab --- /dev/null +++ b/build/scripts/setup/service.d/casaos/ubuntu/setup-casaos.sh @@ -0,0 +1 @@ +../debian/setup-casaos.sh \ No newline at end of file diff --git a/build/sysroot/etc/casaos/casaos.conf.sample b/build/sysroot/etc/casaos/casaos.conf.sample new file mode 100644 index 0000000..3e64508 --- /dev/null +++ b/build/sysroot/etc/casaos/casaos.conf.sample @@ -0,0 +1,23 @@ +[app] +PAGE_SIZE = 10 +RuntimeRootPath = runtime/ +LogPath = /var/log/casaos/ +LogSaveName = log +LogFileExt = log +DateStrFormat = 20060102 +DateTimeFormat = 2006-01-02 15:04:05 +TimeFormat = 15:04:05 +DateFormat = 2006-01-02 +DBPath = /var/lib/casaos +ShellPath = /usr/share/casaos/shell +UserDataPath = /var/lib/casaos/conf +TempPath = /var/lib/casaos/temp + +[server] +RunMode = release +ServerApi = https://api.casaos.io/casaos-api +Handshake = socket.casaos.io +Token = +USBAutoMount = + +[system] \ No newline at end of file diff --git a/build/sysroot/usr/lib/systemd/system/casaos.service b/build/sysroot/usr/lib/systemd/system/casaos.service new file mode 100644 index 0000000..249d72c --- /dev/null +++ b/build/sysroot/usr/lib/systemd/system/casaos.service @@ -0,0 +1,12 @@ +[Unit] +After=casaos-gateway.service +ConditionFileNotEmpty=/etc/casaos/casaos.conf +Description=CasaOS Service + +[Service] +ExecStart=/usr/bin/casaos -c /etc/casaos/casaos.conf +PIDFile=/var/run/casaos/casaos.pid +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/cmd/migration-tool/log.go b/cmd/migration-tool/log.go new file mode 100644 index 0000000..e20da69 --- /dev/null +++ b/cmd/migration-tool/log.go @@ -0,0 +1,47 @@ +/* + * @Author: LinkLeong link@icewhale.org + * @Date: 2022-08-30 22:15:30 + * @LastEditors: LinkLeong + * @LastEditTime: 2022-08-30 22:15:47 + * @FilePath: /CasaOS/cmd/migration-tool/log.go + * @Description: + * @Website: https://www.casaos.io + * Copyright (c) 2022 by icewhale, All Rights Reserved. + */ +package main + +import ( + "log" + "os" +) + +type Logger struct { + DebugMode bool + + _debug *log.Logger + _info *log.Logger + _error *log.Logger +} + +func NewLogger() *Logger { + return &Logger{ + DebugMode: false, + _debug: log.New(os.Stdout, "DEBUG: ", 0), + _info: log.New(os.Stdout, "", 0), + _error: log.New(os.Stderr, "ERROR: ", 0), + } +} + +func (l *Logger) Debug(format string, v ...interface{}) { + if l.DebugMode { + l._debug.Printf(format, v...) + } +} + +func (l *Logger) Info(format string, v ...interface{}) { + l._info.Printf(format, v...) +} + +func (l *Logger) Error(format string, v ...interface{}) { + l._error.Printf(format, v...) +} diff --git a/cmd/migration-tool/main.go b/cmd/migration-tool/main.go new file mode 100644 index 0000000..a09d5b8 --- /dev/null +++ b/cmd/migration-tool/main.go @@ -0,0 +1,117 @@ +/* + * @Author: LinkLeong link@icewhale.org + * @Date: 2022-08-23 18:09:11 + * @LastEditors: LinkLeong + * @LastEditTime: 2022-08-31 14:17:51 + * @FilePath: /CasaOS/cmd/migration-tool/main.go + * @Description: + * @Website: https://www.casaos.io + * Copyright (c) 2022 by icewhale, All Rights Reserved. + */ +package main + +import ( + "flag" + "fmt" + "os" + + interfaces "github.com/IceWhaleTech/CasaOS-Common" + "github.com/IceWhaleTech/CasaOS-Common/utils/systemctl" + "github.com/IceWhaleTech/CasaOS-Gateway/common" + "github.com/IceWhaleTech/CasaOS/pkg/config" + "github.com/IceWhaleTech/CasaOS/pkg/sqlite" + "github.com/IceWhaleTech/CasaOS/service" + "gorm.io/gorm" +) + +const ( + casaosServiceName = "casaos.service" +) + +var _logger *Logger +var sqliteDB *gorm.DB + +var configFlag = "" +var dbFlag = "" + +func init() { + config.InitSetup(configFlag) + config.UpdateSetup() + + if len(dbFlag) == 0 { + dbFlag = config.AppInfo.DBPath + "/db" + } + + sqliteDB = sqlite.GetDb(dbFlag) + //gredis.GetRedisConn(config.RedisInfo), + + service.MyService = service.NewService(sqliteDB, "") +} +func main() { + versionFlag := flag.Bool("v", false, "version") + debugFlag := flag.Bool("d", true, "debug") + forceFlag := flag.Bool("f", true, "force") + flag.Parse() + _logger = NewLogger() + if *versionFlag { + fmt.Println(common.Version) + os.Exit(0) + } + + if os.Getuid() != 0 { + os.Exit(1) + } + + if *debugFlag { + _logger.DebugMode = true + } + + if !*forceFlag { + serviceEnabled, err := systemctl.IsServiceEnabled(casaosServiceName) + if err != nil { + panic(err) + } + + if serviceEnabled { + _logger.Info("%s is already enabled. If migration is still needed, try with -f.", casaosServiceName) + os.Exit(1) + } + } + + migrationTools := []interfaces.MigrationTool{ + NewMigrationToolFor_035(), + } + + var selectedMigrationTool interfaces.MigrationTool + + // look for the right migration tool matching current version + for _, tool := range migrationTools { + migrationNeeded, err := tool.IsMigrationNeeded() + if err != nil { + panic(err) + } + + if migrationNeeded { + selectedMigrationTool = tool + break + } + } + + if selectedMigrationTool == nil { + _logger.Error("selectedMigrationTool is null") + return + } + + if err := selectedMigrationTool.PreMigrate(); err != nil { + panic(err) + } + + if err := selectedMigrationTool.Migrate(); err != nil { + panic(err) + } + + selectedMigrationTool.PostMigrate() + _logger.Info("casaos migration ok") + //panic(err) + +} diff --git a/cmd/migration-tool/migration-034-035.go b/cmd/migration-tool/migration-034-035.go new file mode 100644 index 0000000..4fa2ed3 --- /dev/null +++ b/cmd/migration-tool/migration-034-035.go @@ -0,0 +1,182 @@ +/* + * @Author: LinkLeong link@icewhale.org + * @Date: 2022-08-24 17:36:00 + * @LastEditors: LinkLeong + * @LastEditTime: 2022-09-05 11:24:27 + * @FilePath: /CasaOS/cmd/migration-tool/migration-034-035.go + * @Description: + * @Website: https://www.casaos.io + * Copyright (c) 2022 by icewhale, All Rights Reserved. + */ +package main + +import ( + "io" + "io/ioutil" + "os" + "path" + "strings" + + interfaces "github.com/IceWhaleTech/CasaOS-Common" + "github.com/IceWhaleTech/CasaOS-Common/utils/version" + "github.com/IceWhaleTech/CasaOS/pkg/config" + "github.com/IceWhaleTech/CasaOS/pkg/utils/command" + "github.com/IceWhaleTech/CasaOS/pkg/utils/file" + "github.com/IceWhaleTech/CasaOS/service" +) + +type migrationTool struct{} + +func (u *migrationTool) IsMigrationNeeded() (bool, error) { + + majorVersion, minorVersion, patchVersion, err := version.DetectLegacyVersion() + if err != nil { + if err == version.ErrLegacyVersionNotFound { + return false, nil + } + + return false, err + } + + if majorVersion > 0 { + return false, nil + } + + if minorVersion > 3 { + return false, nil + } + + if minorVersion == 3 && patchVersion > 5 { + return false, nil + } + + _logger.Info("Migration is needed for a CasaOS version 0.3.5 and older...") + return true, nil + +} + +func (u *migrationTool) PreMigrate() error { + + return nil +} + +func (u *migrationTool) Migrate() error { + + if service.MyService.System().GetSysInfo().KernelArch == "aarch64" && config.ServerInfo.USBAutoMount != "True" && strings.Contains(service.MyService.System().GetDeviceTree(), "Raspberry Pi") { + service.MyService.System().UpdateUSBAutoMount("False") + service.MyService.System().ExecUSBAutoMountShell("False") + } + newAPIUrl := "https://api.casaos.io/casaos-api" + if config.ServerInfo.ServerApi == "https://api.casaos.zimaboard.com" { + config.ServerInfo.ServerApi = newAPIUrl + config.Cfg.Section("server").Key("ServerApi").SetValue(newAPIUrl) + config.Cfg.SaveTo(config.SystemConfigInfo.ConfigPath) + } + command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash") + if !file.CheckNotExist("/casaOS") { + command.OnlyExec("source /casaOS/server/shell/update.sh ;") + command.OnlyExec("source " + config.AppInfo.ShellPath + "/delete-old-service.sh ;") + } + + service.MyService.App().ImportApplications(true) + + src := "/casaOS/server/conf/conf.ini" + if file.Exists(src) { + dst := "/etc/casaos/casaos.conf" + source, err := os.Open(src) + if err != nil { + return err + } + defer source.Close() + + destination, err := os.Create(dst) + if err != nil { + return err + } + defer destination.Close() + _, err = io.Copy(destination, source) + if err != nil { + return err + } + + } + + if file.Exists("/casaOS/server/db") { + var fds []os.FileInfo + var err error + to := "/var/lib/casaos/db" + file.IsNotExistMkDir(to) + from := "/casaOS/server/db" + if fds, err = ioutil.ReadDir(from); err != nil { + return err + } + + for _, fd := range fds { + srcfp := path.Join(from, fd.Name()) + dstfp := path.Join(to, fd.Name()) + source, err := os.Open(srcfp) + if err != nil { + return err + } + defer source.Close() + + destination, err := os.Create(dstfp) + if err != nil { + return err + } + defer destination.Close() + _, err = io.Copy(destination, source) + if err != nil { + return err + } + } + + } + + if file.Exists("/casaOS/server/conf") { + var fds []os.FileInfo + var err error + to := "/var/lib/casaos/conf" + file.IsNotExistMkDir(to) + from := "/casaOS/server/conf" + if fds, err = ioutil.ReadDir(from); err != nil { + return err + } + + for _, fd := range fds { + fExt := path.Ext(fd.Name()) + if fExt != ".json" { + continue + } + srcfp := path.Join(from, fd.Name()) + dstfp := path.Join(to, fd.Name()) + source, err := os.Open(srcfp) + if err != nil { + return err + } + defer source.Close() + + destination, err := os.Create(dstfp) + if err != nil { + return err + } + defer destination.Close() + _, err = io.Copy(destination, source) + if err != nil { + return err + } + } + + } + + _logger.Info("update done") + return nil +} + +func (u *migrationTool) PostMigrate() error { + return nil +} + +func NewMigrationToolFor_035() interfaces.MigrationTool { + return &migrationTool{} +} diff --git a/conf/conf.conf.sample b/conf/conf.conf.sample index c4f8179..5ce1d0e 100644 --- a/conf/conf.conf.sample +++ b/conf/conf.conf.sample @@ -14,11 +14,13 @@ UserDataPath = /var/lib/casaos/conf TempPath = /var/lib/casaos/temp [server] -HttpPort = 80 RunMode = release ServerApi = https://api.casaos.io/casaos-api Handshake = socket.casaos.io Token = USBAutoMount = -[system] \ No newline at end of file +[system] + +[common] +RuntimePath=/var/run/casaos \ No newline at end of file diff --git a/go.mod b/go.mod index c7a3e1f..6af729f 100644 --- a/go.mod +++ b/go.mod @@ -4,52 +4,38 @@ go 1.16 require ( github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d + github.com/IceWhaleTech/CasaOS-Common v0.0.0-20220901034123-ca130f6b5ce9 + github.com/IceWhaleTech/CasaOS-Gateway v0.3.6 github.com/Microsoft/go-winio v0.5.0 // indirect - github.com/Microsoft/hcsshim v0.8.22 // indirect github.com/ambelovsky/go-structs v1.1.0 // indirect github.com/ambelovsky/gosf v0.0.0-20201109201340-237aea4d6109 github.com/ambelovsky/gosf-socketio v0.0.0-20201109193639-add9d32f8b19 // indirect - github.com/bits-and-blooms/bitset v1.2.1 // indirect - github.com/containerd/containerd v1.5.7 - github.com/containerd/continuity v0.2.0 // indirect + github.com/containerd/containerd v1.5.7 // indirect github.com/disintegration/imaging v1.6.2 github.com/docker/distribution v2.8.0+incompatible // indirect github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/dsoprea/go-exif/v3 v3.0.0-20210625224831-a6301f85c82b github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect - github.com/gin-contrib/gzip v0.0.2 - github.com/gin-gonic/gin v1.7.2 + github.com/gin-contrib/gzip v0.0.6 + github.com/gin-gonic/gin v1.8.1 github.com/go-ini/ini v1.62.0 - github.com/go-playground/validator/v10 v10.6.1 // indirect - github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang-jwt/jwt/v4 v4.4.1 - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 github.com/gomodule/redigo v1.8.5 github.com/google/go-github/v36 v36.0.0 - github.com/google/uuid v1.3.0 // indirect github.com/googollee/go-socket.io v1.6.2 github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.4.2 github.com/hirochachacha/go-smb2 v1.1.0 github.com/jinzhu/copier v0.3.2 - github.com/json-iterator/go v1.1.11 // indirect - github.com/klauspost/compress v1.13.6 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/leodido/go-urn v1.2.1 // indirect github.com/lucas-clemente/quic-go v0.25.0 - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mattn/go-sqlite3 v1.14.11 // indirect github.com/mholt/archiver/v3 v3.5.1 github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opencontainers/selinux v1.8.5 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pilebones/go-udev v0.9.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/procfs v0.7.3 // indirect github.com/robfig/cron v1.2.0 github.com/satori/go.uuid v1.2.0 github.com/shirou/gopsutil/v3 v3.22.7 @@ -58,22 +44,12 @@ require ( github.com/smartystreets/goconvey v1.6.4 // indirect github.com/stretchr/testify v1.8.0 github.com/tidwall/gjson v1.10.2 - github.com/ugorji/go v1.2.6 // indirect - go.opencensus.io v0.23.0 // indirect - go.uber.org/zap v1.10.0 - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 + go.uber.org/zap v1.21.0 + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 golang.org/x/mod v0.5.0 // indirect - golang.org/x/net v0.0.0-20211020060615-d418f374d309 // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect golang.org/x/tools v0.1.7 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 // indirect - google.golang.org/grpc v1.41.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 gorm.io/driver/sqlite v1.2.6 gorm.io/gorm v1.22.5 diff --git a/go.sum b/go.sum index 202770e..45192e2 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,4 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -7,6 +6,7 @@ cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgo cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -17,14 +17,35 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -34,6 +55,7 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= @@ -54,11 +76,17 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d h1:62lEBImTxZ83pgzywgDNIrPPuQ+j4ep9QjqrWBn1hrU= github.com/Curtis-Milo/nat-type-identifier-go v0.0.0-20220215191915-18d42168c63d/go.mod h1:lW9x+yEjqKdPbE3+cf2fGPJXCw/hChX3Omi9QHTLFsQ= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/IceWhaleTech/CasaOS-Common v0.0.0-20220901034123-ca130f6b5ce9 h1:q4I/lSsCooxdd6LxinGy90y0n6V8EcaPBV1JCfpEnV4= +github.com/IceWhaleTech/CasaOS-Common v0.0.0-20220901034123-ca130f6b5ce9/go.mod h1:2MiivEMzvh41codhEKUcn46WK3Ffesop/04qa9jsvQk= +github.com/IceWhaleTech/CasaOS-Gateway v0.3.6 h1:2tQQo85+jzbbjqIsKKn77QlAA73bc7vZsVCFvWnK4mg= +github.com/IceWhaleTech/CasaOS-Gateway v0.3.6/go.mod h1:hnZwGUzcOyiufMpVO7l3gu2gAm6Ws4TY4Nlj3kMshXA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -77,8 +105,6 @@ github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2 github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.8.22 h1:CulZ3GW8sNJExknToo+RWD+U+6ZM5kkNfuxywSDPd08= -github.com/Microsoft/hcsshim v0.8.22/go.mod h1:91uVCVzvX2QD16sMCenoxxXo6L1wJnLMX2PSufFMtF0= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -90,6 +116,7 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/ambelovsky/go-structs v1.1.0 h1:LXj4/mHnYw0qhXQhOo96+ULGQ88H8qMcZd5SHef8boY= github.com/ambelovsky/go-structs v1.1.0/go.mod h1:zN3RBXQvxgjjq/Q/WZS7p5AEK+qC9mNg7ycnvoQ63Ak= @@ -101,9 +128,17 @@ github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSUL github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -111,8 +146,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.2.1 h1:M+/hrU9xlMp7t4TyTDQW97d3tRPVuKFC6zBEK16QnXY= -github.com/bits-and-blooms/bitset v1.2.1/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= @@ -138,11 +171,18 @@ github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLI github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= @@ -157,7 +197,6 @@ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1 github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= @@ -172,7 +211,6 @@ github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= @@ -187,14 +225,11 @@ github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cE github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/continuity v0.2.0 h1:j/9Wnn+hrEWjLvHuIxUU1YI5JjEjVlT2AA68cse9rwY= -github.com/containerd/continuity v0.2.0/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= @@ -214,12 +249,10 @@ github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDG github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2 h1:2/O3oTZN36q2xRolk0a2WWGgh7/Vf/liElg5hFYLX9U= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= @@ -244,9 +277,11 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -280,7 +315,6 @@ github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05b github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= @@ -312,32 +346,39 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/geoffgarside/ber v1.1.0 h1:qTmFG4jJbwiSzSXoNJeHcOprVzZ8Ulde2Rrrifu5U9w= github.com/geoffgarside/ber v1.1.0/go.mod h1:jVPKeCbj6MvQZhwLYsGwaGI52oUorHoHKNecGT85ZCc= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/gzip v0.0.2 h1:VMBkd4ZB1Hl7e1lOA5gEZ/qdD3d9vLIq57xKWgPCCV8= -github.com/gin-contrib/gzip v0.0.2/go.mod h1:YxxswVZIqOvcHEQpsSn+QF5guQtO1dCfy0shBPy4jFc= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= +github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.2 h1:Tg03T9yM2xa8j6I3Z3oqLaQRSmKvxPd6g/2HJ6zICFA= -github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= @@ -351,8 +392,10 @@ github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU= github.com/go-ini/ini v1.62.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -366,28 +409,28 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.6.1 h1:W6TRDXt4WcWp4c4nf/G+6BkGdhiIo0k417gfr+V6u4I= -github.com/go-playground/validator/v10 v10.6.1/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0= +github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM= +github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -395,8 +438,8 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= -github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/geo v0.0.0-20200319012246-673a6f80352d h1:C/hKUcHT483btRbeGkrRjJz+Zbcj8audldIi9tRJDCc= github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= @@ -406,7 +449,6 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -416,6 +458,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -433,10 +476,12 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc= github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= @@ -454,6 +499,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= @@ -466,6 +512,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -473,18 +521,30 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/googollee/go-socket.io v1.6.2 h1:olKLLHJtHz1IkL/OrTyNriZZvVQYEORNkJAqsOwPask= github.com/googollee/go-socket.io v1.6.2/go.mod h1:0vGP8/dXR9SZUMMD4+xxaGo/lohOw3YWMh2WRiWeKxg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= @@ -505,17 +565,42 @@ github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hirochachacha/go-smb2 v1.1.0 h1:b6hs9qKIql9eVXAiN0M2wSFY5xnhbHAQoCwRKbaRTZI= github.com/hirochachacha/go-smb2 v1.1.0/go.mod h1:8F1A4d5EZzrGu5R7PU163UcMRDJQl4FtcxjBfsY8TZE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -535,17 +620,20 @@ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -562,18 +650,19 @@ github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lucas-clemente/quic-go v0.25.0 h1:K+X9Gvd7JXsOHtU0N2icZ2Nw3rx82uBej3mP4CLgibc= @@ -582,6 +671,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -596,30 +687,43 @@ github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1 h1:EnzzN9fPUkUck/1CuY1FlzBaIYMoiBsdwTNmNGkwUUM= github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1/go.mod h1:PUhIQk19LoFt2174H4+an8TYvWOGjb/hHwphBeaDHwI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.11 h1:gt+cp9c0XGqe9S/wAHTL3n/7MqY+siPWgWJgqdsFrzQ= -github.com/mattn/go-sqlite3 v1.14.11/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= @@ -629,14 +733,16 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= @@ -682,38 +788,44 @@ github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59P github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opencontainers/selinux v1.8.5 h1:OkT6bMHOQ1JQQO4ihjQ49sj0+wciDcjziSVTRn8VeTA= -github.com/opencontainers/selinux v1.8.5/go.mod h1:HTvjPFoGMbpQsG886e3lQwnsRWtE4TC1OF3OUvG9FAo= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM= github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pilebones/go-udev v0.9.0 h1:N1uEO/SxUwtIctc0WLU0t69JeBxIYEYnj8lT/Nabl9Q= github.com/pilebones/go-udev v0.9.0/go.mod h1:T2eI2tUSK0hA2WS5QLjXJUfQkluZQu+18Cqvem3CaXI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= @@ -723,7 +835,9 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -735,7 +849,9 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -748,19 +864,23 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil/v3 v3.22.7 h1:flKnuCMfUUrO+oAvwAd6GKZgnPzr098VA/UJ14nhJd4= @@ -809,17 +929,26 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -836,6 +965,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -853,14 +984,12 @@ github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq// github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.6 h1:tGiWC9HENWE2tqYycIqFTNorMmFRVhNwCpDOpWqnk8E= -github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ= -github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -900,6 +1029,10 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -907,16 +1040,28 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/dig v1.14.0/go.mod h1:jHAn/z1Ld1luVVyGKOAIFYz/uBFqKjjEEdIqVAqfQ2o= +go.uber.org/fx v1.17.1/go.mod h1:yO7KN5rhlARljyo4LR047AjaV6J+KFzd/Z7rnTbEn0A= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -929,14 +1074,18 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -962,6 +1111,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -970,6 +1121,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0 h1:UG21uOlmZabA4fW5i7ZX6bjw1xELEGg/ZLgZq9auk/Q= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -997,6 +1150,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1016,14 +1170,26 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211020060615-d418f374d309 h1:A0lJIi+hcTR6aajJH4YqKWwohY4aW9RO7oRMcdv+HKI= -golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1031,8 +1197,22 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1044,8 +1224,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1053,6 +1234,7 @@ golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1072,8 +1254,11 @@ golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1101,9 +1286,11 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1114,23 +1301,50 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1168,8 +1382,11 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1196,16 +1413,29 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -1226,6 +1456,29 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1273,9 +1526,56 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= @@ -1295,12 +1595,26 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1313,8 +1627,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1328,8 +1643,9 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1350,6 +1666,8 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/sqlite v1.2.6 h1:SStaH/b+280M7C8vXeZLz/zo9cLQmIGwwj3cSj7p6l4= @@ -1360,8 +1678,9 @@ gorm.io/gorm v1.22.5/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= +gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/interfaces/migrationTool.go b/interfaces/migrationTool.go new file mode 100644 index 0000000..0028c4d --- /dev/null +++ b/interfaces/migrationTool.go @@ -0,0 +1,18 @@ +/* + * @Author: LinkLeong link@icewhale.org + * @Date: 2022-08-24 17:37:36 + * @LastEditors: LinkLeong + * @LastEditTime: 2022-08-24 17:38:48 + * @FilePath: /CasaOS/interfaces/migrationTool.go + * @Description: + * @Website: https://www.casaos.io + * Copyright (c) 2022 by icewhale, All Rights Reserved. + */ +package interfaces + +type MigrationTool interface { + IsMigrationNeeded() (bool, error) + PostMigrate() error + Migrate() error + PreMigrate() error +} diff --git a/main.go b/main.go index 0aa2a70..b616e52 100644 --- a/main.go +++ b/main.go @@ -3,16 +3,16 @@ package main import ( "flag" "fmt" + "net" "net/http" "time" + "github.com/IceWhaleTech/CasaOS-Gateway/common" "github.com/IceWhaleTech/CasaOS/model/notify" "github.com/IceWhaleTech/CasaOS/pkg/cache" "github.com/IceWhaleTech/CasaOS/pkg/config" "github.com/IceWhaleTech/CasaOS/pkg/sqlite" - "github.com/IceWhaleTech/CasaOS/pkg/utils/encryption" "github.com/IceWhaleTech/CasaOS/pkg/utils/loger" - "github.com/IceWhaleTech/CasaOS/pkg/utils/random" "github.com/IceWhaleTech/CasaOS/route" "github.com/IceWhaleTech/CasaOS/service" "github.com/IceWhaleTech/CasaOS/types" @@ -21,17 +21,17 @@ import ( "gorm.io/gorm" ) +const LOCALHOST = "127.0.0.1" + var sqliteDB *gorm.DB var configFlag = flag.String("c", "", "config address") var dbFlag = flag.String("db", "", "db path") -var resetUser = flag.Bool("ru", false, "reset user") -var user = flag.String("user", "", "user name") -var version = flag.Bool("v", false, "show version") +var versionFlag = flag.Bool("v", false, "version") func init() { flag.Parse() - if *version { + if *versionFlag { fmt.Println("v" + types.CURRENTVERSION) return } @@ -46,7 +46,7 @@ func init() { sqliteDB = sqlite.GetDb(*dbFlag) //gredis.GetRedisConn(config.RedisInfo), - service.MyService = service.NewService(sqliteDB) + service.MyService = service.NewService(sqliteDB, config.CommonInfo.RuntimePath) service.Cache = cache.Init() @@ -73,31 +73,14 @@ func init() { // @BasePath /v1 func main() { service.NotifyMsg = make(chan notify.Message, 10) - if *version { - return - } - if *resetUser { - if user == nil || len(*user) == 0 { - fmt.Println("user is empty") - return - } - userData := service.MyService.User().GetUserAllInfoByName(*user) - if userData.Id == 0 { - fmt.Println("user not exist") - return - } - password := random.RandomString(6, false) - userData.Password = encryption.GetMD5ByStr(password) - service.MyService.User().UpdateUserPassword(userData) - fmt.Println("User reset successful") - fmt.Println("UserName:" + userData.Username) - fmt.Println("Password:" + password) + if *versionFlag { return } go route.SocketInit(service.NotifyMsg) go route.MonitoryUSB() //model.Setup() //gredis.Setup() + r := route.InitRouter() //service.SyncTask(sqliteDB) cron2 := cron.New() @@ -117,18 +100,49 @@ func main() { fmt.Println(err) } cron2.Start() + defer cron2.Stop() - s := &http.Server{ - Addr: fmt.Sprintf(":%v", config.ServerInfo.HttpPort), - Handler: r, - ReadTimeout: 60 * time.Second, - WriteTimeout: 60 * time.Second, - MaxHeaderBytes: 1 << 20, + + listener, err := net.Listen("tcp", net.JoinHostPort(LOCALHOST, "0")) + if err != nil { + panic(err) } + routers := []string{"sys", "apps", "container", "app-categories", "port", "file", "folder", "batch", "image", "disks", "storage", "samba"} + for _, v := range routers { + err = service.MyService.Gateway().CreateRoute(&common.Route{ + Path: "/v1/" + v, + Target: "http://" + listener.Addr().String(), + }) - s.ListenAndServe() + if err != nil { + fmt.Println("err", err) + panic(err) + } + } + go func() { + time.Sleep(time.Second * 2) + //v0.3.6 + if config.ServerInfo.HttpPort != "" { + changePort := common.ChangePortRequest{} + changePort.Port = config.ServerInfo.HttpPort + err := service.MyService.Gateway().ChangePort(&changePort) + if err == nil { + config.Cfg.Section("server").Key("HttpPort").SetValue("") + config.Cfg.SaveTo(config.SystemConfigInfo.ConfigPath) + } + } + }() - // if err := r.Run(fmt.Sprintf(":%v", config.ServerInfo.HttpPort)); err != nil { - // fmt.Println("failed run app: ", err) + // s := &http.Server{ + // Addr: listener.Addr().String(), //fmt.Sprintf(":%v", config.ServerInfo.HttpPort), + // Handler: r, + // ReadTimeout: 60 * time.Second, + // WriteTimeout: 60 * time.Second, + // MaxHeaderBytes: 1 << 20, // } + // s.ListenAndServe() + err = http.Serve(listener, r) + if err != nil { + panic(err) + } } diff --git a/model/sys_common.go b/model/sys_common.go index 162757d..1a78867 100644 --- a/model/sys_common.go +++ b/model/sys_common.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-14 11:02:06 + * @LastEditTime: 2022-09-02 22:12:34 * @FilePath: /CasaOS/model/sys_common.go * @Description: * @Website: https://www.casaos.io @@ -17,20 +17,6 @@ type SysInfoModel struct { Name string //系统名称 } -//用户相关 -type UserModel struct { - UserName string - PWD string - Token string - Head string - Email string - Description string - Initialized bool - Avatar string - NickName string - Public string -} - //服务配置 type ServerModel struct { HttpPort string @@ -56,6 +42,9 @@ type APPModel struct { ShellPath string TempPath string } +type CommonModel struct { + RuntimePath string +} //公共返回模型 type Result struct { diff --git a/pkg/config/config.go b/pkg/config/config.go index 4db6725..385644b 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2021-09-30 18:18:14 * @LastEditors: LinkLeong - * @LastEditTime: 2022-06-21 11:09:30 + * @LastEditTime: 2022-08-31 17:04:02 * @FilePath: /CasaOS/pkg/config/config.go * @Description: * @Website: https://www.casaos.io @@ -11,5 +11,5 @@ package config const ( - USERCONFIGURL = "/etc/casaos.conf" + USERCONFIGURL = "/etc/casaos/casaos.conf" ) diff --git a/pkg/config/init.go b/pkg/config/init.go index 738ecc5..c79d71f 100644 --- a/pkg/config/init.go +++ b/pkg/config/init.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-14 10:58:45 + * @LastEditTime: 2022-09-05 11:58:02 * @FilePath: /CasaOS/pkg/config/init.go * @Description: * @Website: https://www.casaos.io @@ -26,12 +26,11 @@ import ( //系统配置 var SysInfo = &model.SysInfoModel{} -//用户相关 -var UserInfo = &model.UserModel{} - //用户相关 var AppInfo = &model.APPModel{} +var CommonInfo = &model.CommonModel{} + //var RedisInfo = &model.RedisModel{} //server相关 @@ -59,37 +58,41 @@ func InitSetup(config string) { //读取文件 Cfg, err = ini.Load(configDir) if err != nil { - fmt.Printf("Fail to read file: %v", err) - os.Exit(1) + Cfg, err = ini.Load("/etc/casaos.conf") + if err != nil { + Cfg, err = ini.Load("/casaOS/server/conf/conf.ini") + if err != nil { + fmt.Printf("Fail to read file: %v", err) + os.Exit(1) + } + } } - - mapTo("user", UserInfo) mapTo("app", AppInfo) //mapTo("redis", RedisInfo) mapTo("server", ServerInfo) mapTo("system", SystemConfigInfo) mapTo("file", FileSettingInfo) + mapTo("common", CommonInfo) SystemConfigInfo.ConfigPath = configDir if len(AppInfo.DBPath) == 0 { AppInfo.DBPath = "/var/lib/casaos" - Cfg.SaveTo(configDir) } if len(AppInfo.LogPath) == 0 { AppInfo.LogPath = "/var/log/casaos/" - Cfg.SaveTo(configDir) } if len(AppInfo.ShellPath) == 0 { AppInfo.ShellPath = "/usr/share/casaos/shell" - Cfg.SaveTo(configDir) } if len(AppInfo.UserDataPath) == 0 { AppInfo.UserDataPath = "/var/lib/casaos/conf" - Cfg.SaveTo(configDir) } if len(AppInfo.TempPath) == 0 { AppInfo.TempPath = "/var/lib/casaos/temp" - Cfg.SaveTo(configDir) } + if len(CommonInfo.RuntimePath) == 0 { + CommonInfo.RuntimePath = "/var/run/casaos" + } + Cfg.SaveTo(configDir) // AppInfo.ProjectPath = getCurrentDirectory() //os.Getwd() } diff --git a/pkg/sqlite/db.go b/pkg/sqlite/db.go index 383d2c4..819da65 100644 --- a/pkg/sqlite/db.go +++ b/pkg/sqlite/db.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-27 11:25:26 + * @LastEditTime: 2022-08-31 13:39:24 * @FilePath: /CasaOS/pkg/sqlite/db.go * @Description: * @Website: https://www.casaos.io @@ -43,17 +43,7 @@ func GetDb(dbPath string) *gorm.DB { } gdb = db - db.Exec(`alter table o_user rename to old_user; - - create table o_users ( id integer primary key,username text,password text,role text,email text,nickname text,avatar text,description text,created_at datetime,updated_at datetime); - - insert into o_users select id,user_name,password,role,email,nick_name,avatar,description,created_at,updated_at from old_user; - - drop table old_user; - drop table o_user; - `) - - err = db.AutoMigrate(&model2.AppNotify{}, &model2.AppListDBModel{}, &model2.SerialDisk{}, model2.UserDBModel{}, model2.SharesDBModel{}, model2.ConnectionsDBModel{}) + err = db.AutoMigrate(&model2.AppNotify{}, &model2.AppListDBModel{}, &model2.SerialDisk{}, model2.SharesDBModel{}, model2.ConnectionsDBModel{}) db.Exec("DROP TABLE IF EXISTS o_application") db.Exec("DROP TABLE IF EXISTS o_friend") db.Exec("DROP TABLE IF EXISTS o_person_download") diff --git a/pkg/utils/jwt/jwt.go b/pkg/utils/jwt/jwt.go deleted file mode 100644 index ad88197..0000000 --- a/pkg/utils/jwt/jwt.go +++ /dev/null @@ -1,63 +0,0 @@ -/* - * @Author: LinkLeong link@icewhale.com - * @Date: 2021-09-30 18:18:14 - * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-18 17:30:38 - * @FilePath: /CasaOS/pkg/utils/jwt/jwt.go - * @Description: - * @Website: https://www.casaos.io - * Copyright (c) 2022 by icewhale, All Rights Reserved. - */ -package jwt - -import ( - "time" - - jwt "github.com/golang-jwt/jwt/v4" -) - -type Claims struct { - Username string `json:"username"` - PassWord string `json:"password"` - Id int `json:"id"` - jwt.RegisteredClaims -} - -var jwtSecret []byte - -//创建token -func GenerateToken(username, password string, id int, issuer string, t time.Duration) (string, error) { - clims := Claims{ - username, - password, - id, - jwt.RegisteredClaims{ - ExpiresAt: jwt.NewNumericDate(time.Now().Add(t)), - IssuedAt: jwt.NewNumericDate(time.Now()), - NotBefore: jwt.NewNumericDate(time.Now()), - Issuer: issuer, - }, - } - - tokenClaims := jwt.NewWithClaims(jwt.SigningMethodHS256, clims) - token, err := tokenClaims.SignedString(jwtSecret) - return token, err - -} - -//解析token -func ParseToken(token string, valid bool) (*Claims, error) { - tokenClaims, err := jwt.ParseWithClaims(token, &Claims{}, func(token *jwt.Token) (interface{}, error) { - return jwtSecret, nil - }) - if tokenClaims != nil { - if clims, ok := tokenClaims.Claims.(*Claims); ok { - if valid && tokenClaims.Valid { - return clims, nil - } else if !valid { - return clims, nil - } - } - } - return nil, err -} diff --git a/pkg/utils/jwt/jwt_helper.go b/pkg/utils/jwt/jwt_helper.go deleted file mode 100644 index 5e98833..0000000 --- a/pkg/utils/jwt/jwt_helper.go +++ /dev/null @@ -1,75 +0,0 @@ -/* - * @Author: LinkLeong link@icewhale.com - * @Date: 2022-06-17 14:01:25 - * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-29 16:22:25 - * @FilePath: /CasaOS/pkg/utils/jwt/jwt_helper.go - * @Description: - * @Website: https://www.casaos.io - * Copyright (c) 2022 by icewhale, All Rights Reserved. - */ -package jwt - -import ( - "fmt" - "strconv" - "time" - - "github.com/IceWhaleTech/CasaOS/model" - "github.com/IceWhaleTech/CasaOS/pkg/utils/common_err" - loger2 "github.com/IceWhaleTech/CasaOS/pkg/utils/loger" - "github.com/gin-gonic/gin" -) - -func JWT() gin.HandlerFunc { - return func(c *gin.Context) { - var code int - code = common_err.SUCCESS - token := c.GetHeader("Authorization") - if len(token) == 0 { - token = c.Query("token") - } - if token == "" { - code = common_err.INVALID_PARAMS - } - - claims, err := ParseToken(token, false) - - //_, err := ParseToken(token) - if err != nil { - code = common_err.ERROR_AUTH_TOKEN - } else if (c.Request.URL.Path == "/v1/file" || c.Request.URL.Path == "/v1/image" || c.Request.URL.Path == "/v1/file/upload" || c.Request.URL.Path == "/v1/batch") && claims.VerifyIssuer("casaos", true) { - //Special treatment - } else if !claims.VerifyExpiresAt(time.Now(), true) || !claims.VerifyIssuer("casaos", true) { - code = common_err.ERROR_AUTH_TOKEN - } - if code != common_err.SUCCESS { - c.JSON(code, model.Result{Success: code, Message: common_err.GetMsg(code)}) - c.Abort() - return - } - c.Request.Header.Add("user_id", strconv.Itoa(claims.Id)) - c.Next() - } -} - -//get AccessToken -func GetAccessToken(username, pwd string, id int) string { - token, err := GenerateToken(username, pwd, id, "casaos", 3*time.Hour*time.Duration(1)) - if err == nil { - return token - } else { - loger2.Error(fmt.Sprintf("Get Token Fail: %V", err)) - return "" - } -} - -func GetRefreshToken(username, pwd string, id int) string { - token, err := GenerateToken(username, pwd, id, "refresh", 7*24*time.Hour*time.Duration(1)) - if err == nil { - return token - } else { - loger2.Error(fmt.Sprintf("Get Token Fail: %V", err)) - return "" - } -} diff --git a/route/darwin.go b/route/darwin.go index 8e6dd35..5bdc708 100644 --- a/route/darwin.go +++ b/route/darwin.go @@ -5,7 +5,7 @@ * @Author: LinkLeong link@icewhale.org * @Date: 2022-08-12 14:22:28 * @LastEditors: LinkLeong - * @LastEditTime: 2022-08-12 18:41:14 + * @LastEditTime: 2022-09-05 16:27:55 * @FilePath: /CasaOS/route/darwin.go * @Description: * @Website: https://www.casaos.io diff --git a/route/init.go b/route/init.go index 73fa177..e2d09c7 100644 --- a/route/init.go +++ b/route/init.go @@ -10,25 +10,16 @@ import ( "github.com/IceWhaleTech/CasaOS/pkg/config" "github.com/IceWhaleTech/CasaOS/pkg/samba" "github.com/IceWhaleTech/CasaOS/pkg/utils/command" - "github.com/IceWhaleTech/CasaOS/pkg/utils/encryption" "github.com/IceWhaleTech/CasaOS/pkg/utils/file" "github.com/IceWhaleTech/CasaOS/pkg/utils/loger" "github.com/IceWhaleTech/CasaOS/service" model2 "github.com/IceWhaleTech/CasaOS/service/model" - uuid "github.com/satori/go.uuid" "go.uber.org/zap" ) func InitFunction() { - ShellInit() CheckSerialDiskMount() - CheckToken2_11() - ImportApplications() - // Soon to be removed - ChangeAPIUrl() - MoveUserToDB() go InitNetworkMount() - } func CheckSerialDiskMount() { @@ -70,79 +61,6 @@ func CheckSerialDiskMount() { service.MyService.Disk().RemoveLSBLKCache() command.OnlyExec("source " + config.AppInfo.ShellPath + "/helper.sh ;AutoRemoveUnuseDir") } -func ShellInit() { - command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash") - if !file.CheckNotExist("/casaOS") { - command.OnlyExec("source /casaOS/server/shell/update.sh ;") - command.OnlyExec("source " + config.AppInfo.ShellPath + "/delete-old-service.sh ;") - } - -} -func CheckToken2_11() { - if len(config.ServerInfo.Token) == 0 { - token := uuid.NewV4().String - config.ServerInfo.Token = token() - config.Cfg.Section("server").Key("Token").SetValue(token()) - config.Cfg.SaveTo(config.SystemConfigInfo.ConfigPath) - } - - if len(config.UserInfo.Description) == 0 { - config.Cfg.Section("user").Key("Description").SetValue("nothing") - config.UserInfo.Description = "nothing" - config.Cfg.SaveTo(config.SystemConfigInfo.ConfigPath) - } - - if service.MyService.System().GetSysInfo().KernelArch == "aarch64" && config.ServerInfo.USBAutoMount != "True" && strings.Contains(service.MyService.System().GetDeviceTree(), "Raspberry Pi") { - service.MyService.System().UpdateUSBAutoMount("False") - service.MyService.System().ExecUSBAutoMountShell("False") - } - - // str := []string{} - // str = append(str, "ddd") - // str = append(str, "aaa") - // ddd := strings.Join(str, "|") - // config.Cfg.Section("file").Key("ShareDir").SetValue(ddd) - - // config.Cfg.SaveTo(config.SystemConfigInfo.ConfigPath) - -} - -func ImportApplications() { - service.MyService.App().ImportApplications(true) -} - -// 0.3.1 -func ChangeAPIUrl() { - - newAPIUrl := "https://api.casaos.io/casaos-api" - if config.ServerInfo.ServerApi == "https://api.casaos.zimaboard.com" { - config.ServerInfo.ServerApi = newAPIUrl - config.Cfg.Section("server").Key("ServerApi").SetValue(newAPIUrl) - config.Cfg.SaveTo(config.SystemConfigInfo.ConfigPath) - } - -} - -//0.3.3 -//Transferring user data to the database -func MoveUserToDB() { - - if len(config.UserInfo.UserName) > 0 && service.MyService.User().GetUserInfoByUserName(config.UserInfo.UserName).Id == 0 { - user := model2.UserDBModel{} - user.Username = config.UserInfo.UserName - user.Email = config.UserInfo.Email - user.Nickname = config.UserInfo.NickName - user.Password = encryption.GetMD5ByStr(config.UserInfo.PWD) - user.Role = "admin" - user = service.MyService.User().CreateUser(user) - if user.Id > 0 { - userPath := config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id) - file.MkDir(userPath) - os.Rename("/casaOS/server/conf/app_order.json", userPath+"/app_order.json") - } - - } -} func InitNetworkMount() { time.Sleep(time.Second * 10) diff --git a/route/periodical.go b/route/periodical.go index 314a144..6fbdd74 100644 --- a/route/periodical.go +++ b/route/periodical.go @@ -5,7 +5,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-07-01 15:11:36 * @LastEditors: LinkLeong - * @LastEditTime: 2022-08-15 11:50:04 + * @LastEditTime: 2022-09-05 16:28:46 * @FilePath: /CasaOS/route/periodical.go * @Description: * @Website: https://www.casaos.io @@ -180,6 +180,8 @@ func SendAllHardwareStatusBySocket() { cpuData := make(map[string]interface{}) cpuData["percent"] = cpu cpuData["num"] = num + cpuData["temperature"] = service.MyService.System().GetCPUTemperature() + cpuData["power"] = service.MyService.System().GetCPUPower() list := service.MyService.Disk().LSBLK(true) diff --git a/route/route.go b/route/route.go index b7a5cd6..2ce2dc3 100644 --- a/route/route.go +++ b/route/route.go @@ -1,20 +1,15 @@ package route import ( - "net/http" - + jwt2 "github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/IceWhaleTech/CasaOS/middleware" "github.com/IceWhaleTech/CasaOS/pkg/config" - jwt2 "github.com/IceWhaleTech/CasaOS/pkg/utils/jwt" v1 "github.com/IceWhaleTech/CasaOS/route/v1" - "github.com/IceWhaleTech/CasaOS/web" "github.com/gin-contrib/gzip" "github.com/gin-gonic/gin" ) -var OnlineDemo bool = false - func InitRouter() *gin.Engine { r := gin.Default() @@ -24,22 +19,22 @@ func InitRouter() *gin.Engine { r.Use(gzip.Gzip(gzip.DefaultCompression)) gin.SetMode(config.ServerInfo.RunMode) - r.StaticFS("/ui", http.FS(web.Static)) - r.GET("/", WebUIHome) + // r.StaticFS("/ui", http.FS(web.Static)) + // r.GET("/", WebUIHome) // r.StaticFS("/assets", http.Dir("./static/assets")) // r.StaticFile("/favicon.ico", "./static/favicon.ico") //r.GET("/", func(c *gin.Context) { // c.Redirect(http.StatusMovedPermanently, "ui/") //}) - r.POST("/v1/users/register", v1.PostUserRegister) - r.POST("/v1/users/login", v1.PostUserLogin) - r.GET("/v1/users/name", v1.GetUserAllUsername) //all/name - r.POST("/v1/users/refresh", v1.PostUserRefreshToken) - // No short-term modifications - r.GET("/v1/users/image", v1.GetUserImage) + // r.POST("/v1/users/register", v1.PostUserRegister) + // r.POST("/v1/users/login", v1.PostUserLogin) + // r.GET("/v1/users/name", v1.GetUserAllUsername) //all/name + // r.POST("/v1/users/refresh", v1.PostUserRefreshToken) + // // No short-term modifications + // r.GET("/v1/users/image", v1.GetUserImage) - r.GET("/v1/users/status", v1.GetUserStatus) //init/check + // r.GET("/v1/users/status", v1.GetUserStatus) //init/check //r.GET("/v1/guide/check", v1.GetGuideCheck) // /v1/sys/guide_check r.GET("/v1/sys/debug", v1.GetSystemConfigDebug) // //debug @@ -50,28 +45,28 @@ func InitRouter() *gin.Engine { v1Group.Use(jwt2.JWT()) { - v1UsersGroup := v1Group.Group("/users") - v1UsersGroup.Use() - { - v1UsersGroup.GET("/current", v1.GetUserInfo) - v1UsersGroup.PUT("/current", v1.PutUserInfo) - v1UsersGroup.PUT("/current/password", v1.PutUserPassword) + // v1UsersGroup := v1Group.Group("/users") + // v1UsersGroup.Use() + // { + // v1UsersGroup.GET("/current", v1.GetUserInfo) + // v1UsersGroup.PUT("/current", v1.PutUserInfo) + // v1UsersGroup.PUT("/current/password", v1.PutUserPassword) - v1UsersGroup.GET("/current/custom/:key", v1.GetUserCustomConf) - v1UsersGroup.POST("/current/custom/:key", v1.PostUserCustomConf) - v1UsersGroup.DELETE("/current/custom/:key", v1.DeleteUserCustomConf) + // v1UsersGroup.GET("/current/custom/:key", v1.GetUserCustomConf) + // v1UsersGroup.POST("/current/custom/:key", v1.PostUserCustomConf) + // v1UsersGroup.DELETE("/current/custom/:key", v1.DeleteUserCustomConf) - v1UsersGroup.POST("/current/image/:key", v1.PostUserUploadImage) - v1UsersGroup.PUT("/current/image/:key", v1.PutUserImage) - //v1UserGroup.POST("/file/image/:key", v1.PostUserFileImage) - v1UsersGroup.DELETE("/current/image", v1.DeleteUserImage) + // v1UsersGroup.POST("/current/image/:key", v1.PostUserUploadImage) + // v1UsersGroup.PUT("/current/image/:key", v1.PutUserImage) + // //v1UserGroup.POST("/file/image/:key", v1.PostUserFileImage) + // v1UsersGroup.DELETE("/current/image", v1.DeleteUserImage) - //v1UserGroup.PUT("/avatar", v1.PutUserAvatar) - //v1UserGroup.GET("/avatar", v1.GetUserAvatar) - v1UsersGroup.DELETE("/:id", v1.DeleteUser) - v1UsersGroup.GET("/:username", v1.GetUserInfoByUsername) - v1UsersGroup.DELETE("", v1.DeleteUserAll) - } + // //v1UserGroup.PUT("/avatar", v1.PutUserAvatar) + // //v1UserGroup.GET("/avatar", v1.GetUserAvatar) + // v1UsersGroup.DELETE("/:id", v1.DeleteUser) + // v1UsersGroup.GET("/:username", v1.GetUserInfoByUsername) + // v1UsersGroup.DELETE("", v1.DeleteUserAll) + // } v1AppsGroup := v1Group.Group("/apps") v1AppsGroup.Use() @@ -141,8 +136,9 @@ func InitRouter() *gin.Engine { v1SysGroup.GET("/server-info", nil) v1SysGroup.PUT("/server-info", nil) v1SysGroup.GET("/apps-state", v1.GetSystemAppsStatus) - v1SysGroup.GET("/port", v1.GetCasaOSPort) - v1SysGroup.PUT("/port", v1.PutCasaOSPort) + //v1SysGroup.GET("/port", v1.GetCasaOSPort) + //v1SysGroup.PUT("/port", v1.PutCasaOSPort) + v1SysGroup.GET("/proxy", v1.GetSystemProxy) } v1PortGroup := v1Group.Group("/port") v1PortGroup.Use() diff --git a/route/ui.go b/route/ui.go deleted file mode 100644 index e4980c2..0000000 --- a/route/ui.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - * @Author: LinkLeong link@icewhale.com - * @Date: 2022-06-23 17:27:43 - * @LastEditors: LinkLeong - * @LastEditTime: 2022-06-23 17:27:48 - * @FilePath: /CasaOS/route/ui.go - * @Description: - * @Website: https://www.casaos.io - * Copyright (c) 2022 by icewhale, All Rights Reserved. - */ -package route - -import ( - "html/template" - - "github.com/IceWhaleTech/CasaOS/web" - "github.com/gin-gonic/gin" -) - -func WebUIHome(c *gin.Context) { - c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8") - index, _ := template.ParseFS(web.Static, "index.html") - index.Execute(c.Writer, nil) - return -} diff --git a/route/v1/disk.go b/route/v1/disk.go index 7601eb4..e72e3ff 100644 --- a/route/v1/disk.go +++ b/route/v1/disk.go @@ -14,6 +14,8 @@ import ( "github.com/IceWhaleTech/CasaOS/pkg/utils/common_err" "github.com/IceWhaleTech/CasaOS/pkg/utils/encryption" "github.com/IceWhaleTech/CasaOS/pkg/utils/file" + + "github.com/IceWhaleTech/CasaOS-Common/utils/jwt" "github.com/IceWhaleTech/CasaOS/service" model2 "github.com/IceWhaleTech/CasaOS/service/model" "github.com/gin-gonic/gin" @@ -229,7 +231,6 @@ func GetDisksUSBList(c *gin.Context) { } func DeleteDisksUmount(c *gin.Context) { - id := c.GetHeader("user_id") js := make(map[string]string) c.ShouldBind(&js) @@ -240,12 +241,17 @@ func DeleteDisksUmount(c *gin.Context) { c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) return } - user := service.MyService.User().GetUserAllInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) + token := c.GetHeader("Authorization") + if len(token) == 0 { + token = c.Query("token") + } + claims, err := jwt.ParseToken(token, true) + if err != nil { + c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) return } - if encryption.GetMD5ByStr(pwd) != user.Password { + + if encryption.GetMD5ByStr(pwd) != claims.Password { c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) return } @@ -471,19 +477,23 @@ func PostDiskAddPartition(c *gin.Context) { // @Success 200 {string} string "ok" // @Router /disk/format [post] func PostDiskFormat(c *gin.Context) { - id := c.GetHeader("user_id") js := make(map[string]string) c.ShouldBind(&js) path := js["path"] t := "ext4" pwd := js["password"] volume := js["volume"] - user := service.MyService.User().GetUserAllInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) + token := c.GetHeader("Authorization") + if len(token) == 0 { + token = c.Query("token") + } + claims, err := jwt.ParseToken(token, true) + if err != nil { + c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) return } - if encryption.GetMD5ByStr(pwd) != user.Password { + + if encryption.GetMD5ByStr(pwd) != claims.Password { c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) return } @@ -521,7 +531,6 @@ func PostDiskFormat(c *gin.Context) { // @Success 200 {string} string "ok" // @Router /disk/umount [post] func PostDiskUmount(c *gin.Context) { - id := c.GetHeader("user_id") js := make(map[string]string) c.ShouldBind(&js) @@ -533,12 +542,17 @@ func PostDiskUmount(c *gin.Context) { c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) return } - user := service.MyService.User().GetUserAllInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) + token := c.GetHeader("Authorization") + if len(token) == 0 { + token = c.Query("token") + } + claims, err := jwt.ParseToken(token, true) + if err != nil { + c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) return } - if encryption.GetMD5ByStr(pwd) != user.Password { + + if encryption.GetMD5ByStr(pwd) != claims.Password { c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) return } diff --git a/route/v1/system.go b/route/v1/system.go index e6d8029..9f908d2 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -1,7 +1,10 @@ package v1 import ( + "bytes" "fmt" + "io" + "io/ioutil" "net/http" "os" "reflect" @@ -418,6 +421,9 @@ func GetSystemUtilization(c *gin.Context) { cpuData := make(map[string]interface{}) cpuData["percent"] = cpu cpuData["num"] = num + cpuData["temperature"] = service.MyService.System().GetCPUTemperature() + cpuData["power"] = service.MyService.System().GetCPUPower() + data["cpu"] = cpuData data["mem"] = service.MyService.System().GetMemInfo() @@ -525,3 +531,21 @@ func GetSystemNetInfo(c *gin.Context) { c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: newNet}) } + +func GetSystemProxy(c *gin.Context) { + url := c.Query("url") + resp, err := http.Get(url) + if err != nil { + return + } + defer resp.Body.Close() + for k, v := range c.Request.Header { + c.Header(k, v[0]) + } + rda, _ := ioutil.ReadAll(resp.Body) + // json.NewEncoder(c.Writer).Encode(json.RawMessage(string(rda))) + // 响应状态码 + c.Writer.WriteHeader(resp.StatusCode) + // 复制转发的响应Body到响应Body + io.Copy(c.Writer, ioutil.NopCloser(bytes.NewBuffer(rda))) +} diff --git a/route/v1/user.go b/route/v1/user.go deleted file mode 100644 index a8c5293..0000000 --- a/route/v1/user.go +++ /dev/null @@ -1,683 +0,0 @@ -package v1 - -import ( - json2 "encoding/json" - "io/ioutil" - "net/http" - url2 "net/url" - "os" - "path" - "path/filepath" - "strconv" - "strings" - "time" - - "github.com/IceWhaleTech/CasaOS/model" - "github.com/IceWhaleTech/CasaOS/model/system_model" - "github.com/IceWhaleTech/CasaOS/pkg/config" - "github.com/IceWhaleTech/CasaOS/pkg/utils/common_err" - "github.com/IceWhaleTech/CasaOS/pkg/utils/encryption" - "github.com/IceWhaleTech/CasaOS/pkg/utils/file" - "github.com/IceWhaleTech/CasaOS/pkg/utils/jwt" - model2 "github.com/IceWhaleTech/CasaOS/service/model" - uuid "github.com/satori/go.uuid" - "github.com/tidwall/gjson" - - "github.com/IceWhaleTech/CasaOS/service" - "github.com/gin-gonic/gin" -) - -// @Summary register user -// @Router /user/register/ [post] -func PostUserRegister(c *gin.Context) { - json := make(map[string]string) - c.ShouldBind(&json) - - username := json["username"] - pwd := json["password"] - key := json["key"] - if _, ok := service.UserRegisterHash[key]; !ok { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.KEY_NOT_EXIST, Message: common_err.GetMsg(common_err.KEY_NOT_EXIST)}) - return - } - - if len(username) == 0 || len(pwd) == 0 { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - if len(pwd) < 6 { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.PWD_IS_TOO_SIMPLE, Message: common_err.GetMsg(common_err.PWD_IS_TOO_SIMPLE)}) - return - } - oldUser := service.MyService.User().GetUserInfoByUserName(username) - if oldUser.Id > 0 { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.USER_EXIST, Message: common_err.GetMsg(common_err.USER_EXIST)}) - return - } - - user := model2.UserDBModel{} - user.Username = username - user.Password = encryption.GetMD5ByStr(pwd) - user.Role = "admin" - - user = service.MyService.User().CreateUser(user) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.SERVICE_ERROR, Message: common_err.GetMsg(common_err.SERVICE_ERROR)}) - return - } - file.MkDir(config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id)) - delete(service.UserRegisterHash, key) - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) - -} - -// @Summary login -// @Produce application/json -// @Accept application/json -// @Tags user -// @Param user_name query string true "User name" -// @Param pwd query string true "password" -// @Success 200 {string} string "ok" -// @Router /user/login [post] -func PostUserLogin(c *gin.Context) { - json := make(map[string]string) - c.ShouldBind(&json) - - username := json["username"] - - password := json["password"] - //check params is empty - if len(username) == 0 || len(password) == 0 { - c.JSON(common_err.CLIENT_ERROR, - model.Result{ - Success: common_err.CLIENT_ERROR, - Message: common_err.GetMsg(common_err.INVALID_PARAMS), - }) - return - } - user := service.MyService.User().GetUserAllInfoByName(username) - if user.Id == 0 { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - if user.Password != encryption.GetMD5ByStr(password) { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.PWD_INVALID, Message: common_err.GetMsg(common_err.PWD_INVALID)}) - return - } - token := system_model.VerifyInformation{} - token.AccessToken = jwt.GetAccessToken(user.Username, user.Password, user.Id) - token.RefreshToken = jwt.GetRefreshToken(user.Username, user.Password, user.Id) - token.ExpiresAt = time.Now().Add(3 * time.Hour * time.Duration(1)).Unix() - data := make(map[string]interface{}, 2) - user.Password = "" - data["token"] = token - - // TODO:1 Database fields cannot be external - data["user"] = user - - c.JSON(common_err.SUCCESS, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: data, - }) -} - -// @Summary edit user head -// @Produce application/json -// @Accept multipart/form-data -// @Tags user -// @Param file formData file true "用户头像" -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /user/avatar [put] -func PutUserAvatar(c *gin.Context) { - id := c.GetHeader("user_id") - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - f, err := c.FormFile("file") - if err != nil { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.CLIENT_ERROR, Message: common_err.GetMsg(common_err.CLIENT_ERROR), Data: err.Error()}) - return - } - if len(user.Avatar) > 0 { - os.RemoveAll(config.AppInfo.UserDataPath + "/" + id + "/" + user.Avatar) - } - ext := filepath.Ext(f.Filename) - avatarPath := config.AppInfo.UserDataPath + "/" + id + "/avatar" + ext - c.SaveUploadedFile(f, avatarPath) - user.Avatar = avatarPath - service.MyService.User().UpdateUser(user) - c.JSON(http.StatusOK, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: user, - }) -} - -// @Summary edit user name -// @Produce application/json -// @Accept application/json -// @Tags user -// @Param old_name query string true "Old user name" -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /user/name/:id [put] -func PutUserInfo(c *gin.Context) { - id := c.GetHeader("user_id") - json := model2.UserDBModel{} - c.ShouldBind(&json) - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - if len(json.Username) > 0 { - u := service.MyService.User().GetUserInfoByUserName(json.Username) - if u.Id > 0 { - c.JSON(common_err.CLIENT_ERROR, - model.Result{Success: common_err.USER_EXIST, Message: common_err.GetMsg(common_err.USER_EXIST)}) - return - } - } - - if len(json.Email) == 0 { - json.Email = user.Email - } - if len(json.Avatar) == 0 { - json.Avatar = user.Avatar - } - if len(json.Role) == 0 { - json.Role = user.Role - } - if len(json.Description) == 0 { - json.Description = user.Description - } - if len(json.Nickname) == 0 { - json.Nickname = user.Nickname - } - service.MyService.User().UpdateUser(json) - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: json}) -} - -// @Summary edit user password -// @Produce application/json -// @Accept application/json -// @Tags user -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /user/password/:id [put] -func PutUserPassword(c *gin.Context) { - id := c.GetHeader("user_id") - json := make(map[string]string) - c.ShouldBind(&json) - oldPwd := json["old_password"] - pwd := json["password"] - if len(oldPwd) == 0 || len(pwd) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - user := service.MyService.User().GetUserAllInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - if user.Password != encryption.GetMD5ByStr(oldPwd) { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.PWD_INVALID_OLD, Message: common_err.GetMsg(common_err.PWD_INVALID_OLD)}) - return - } - user.Password = encryption.GetMD5ByStr(pwd) - service.MyService.User().UpdateUserPassword(user) - user.Password = "" - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: user}) -} - -// @Summary edit user nick -// @Produce application/json -// @Accept application/json -// @Tags user -// @Param nick_name query string false "nick name" -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /user/nick [put] -func PutUserNick(c *gin.Context) { - - id := c.GetHeader("user_id") - json := make(map[string]string) - c.ShouldBind(&json) - Nickname := json["nick_name"] - if len(Nickname) == 0 { - c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(http.StatusOK, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - user.Nickname = Nickname - service.MyService.User().UpdateUser(user) - c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: user}) -} - -// @Summary edit user description -// @Produce application/json -// @Accept multipart/form-data -// @Tags user -// @Param description formData string false "Description" -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /user/desc [put] -func PutUserDesc(c *gin.Context) { - id := c.GetHeader("user_id") - json := make(map[string]string) - c.ShouldBind(&json) - desc := json["description"] - if len(desc) == 0 { - c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(http.StatusOK, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - user.Description = desc - - service.MyService.User().UpdateUser(user) - - c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: user}) -} - -// @Summary get user info -// @Produce application/json -// @Accept application/json -// @Tags user -// @Success 200 {string} string "ok" -// @Router /user/info/:id [get] -func GetUserInfo(c *gin.Context) { - id := c.GetHeader("user_id") - user := service.MyService.User().GetUserInfoById(id) - - c.JSON(common_err.SUCCESS, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: user, - }) -} - -/** - * @description: - * @param {*gin.Context} c - * @param {string} Username - * @return {*} - * @method: - * @router: - */ -func GetUserInfoByUsername(c *gin.Context) { - username := c.Param("username") - if len(username) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - user := service.MyService.User().GetUserInfoByUserName(username) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - - c.JSON(common_err.SUCCESS, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: user, - }) -} - -/** - * @description: get all Usernames - * @method:GET - * @router:/user/all/name - */ -func GetUserAllUsername(c *gin.Context) { - users := service.MyService.User().GetAllUserName() - names := []string{} - for _, v := range users { - names = append(names, v.Username) - } - c.JSON(common_err.SUCCESS, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: names, - }) -} - -/** - * @description:get custom file by user - * @param {path} name string "file name" - * @method: GET - * @router: /user/custom/:key - */ -func GetUserCustomConf(c *gin.Context) { - name := c.Param("key") - if len(name) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - id := c.GetHeader("user_id") - - user := service.MyService.User().GetUserInfoById(id) - // user := service.MyService.User().GetUserInfoByUsername(Username) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - filePath := config.AppInfo.UserDataPath + "/" + id + "/" + name + ".json" - - data := file.ReadFullFile(filePath) - if !gjson.ValidBytes(data) { - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: string(data)}) - return - } - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: json2.RawMessage(string(data))}) -} - -/** - * @description:create or update custom conf by user - * @param {path} name string "file name" - * @method:POST - * @router:/user/custom/:key - */ -func PostUserCustomConf(c *gin.Context) { - - name := c.Param("key") - if len(name) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - id := c.GetHeader("user_id") - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - data, _ := ioutil.ReadAll(c.Request.Body) - filePath := config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id) - - file.WriteToPath(data, filePath, name+".json") - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: json2.RawMessage(string(data))}) -} - -/** - * @description: delete user custom config - * @param {path} key string - * @method:delete - * @router:/user/custom/:key - */ -func DeleteUserCustomConf(c *gin.Context) { - name := c.Param("key") - if len(name) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - id := c.GetHeader("user_id") - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, - model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - filePath := config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id) + "/" + name + ".json" - err := os.Remove(filePath) - if err != nil { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.SERVICE_ERROR, Message: common_err.GetMsg(common_err.SERVICE_ERROR)}) - return - } - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) -} - -/** - * @description: - * @param {path} id string "user id" - * @method:DELETE - * @router:/user/delete/:id - */ -func DeleteUser(c *gin.Context) { - id := c.Param("id") - service.MyService.User().DeleteUserById(id) - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: id}) -} - -/** - * @description:update user image - * @method:POST - * @router:/user/current/image/:key - */ -func PutUserImage(c *gin.Context) { - id := c.GetHeader("user_id") - json := make(map[string]string) - c.ShouldBind(&json) - - path := json["path"] - key := c.Param("key") - if len(path) == 0 || len(key) == 0 { - c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - if !file.Exists(path) { - c.JSON(http.StatusOK, model.Result{Success: common_err.FILE_DOES_NOT_EXIST, Message: common_err.GetMsg(common_err.FILE_DOES_NOT_EXIST)}) - return - } - - _, err := file.GetImageExt(path) - - if err != nil { - c.JSON(http.StatusOK, model.Result{Success: common_err.NOT_IMAGE, Message: common_err.GetMsg(common_err.NOT_IMAGE)}) - return - } - - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(http.StatusOK, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - fstat, _ := os.Stat(path) - if fstat.Size() > 10<<20 { - c.JSON(http.StatusOK, model.Result{Success: common_err.IMAGE_TOO_LARGE, Message: common_err.GetMsg(common_err.IMAGE_TOO_LARGE)}) - return - } - ext := file.GetExt(path) - filePath := config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id) + "/" + key + ext - file.CopySingleFile(path, filePath, "overwrite") - - data := make(map[string]string, 3) - data["path"] = filePath - data["file_name"] = key + ext - data["online_path"] = "/v1/users/image?path=" + filePath - c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: data}) -} - -/** -* @description: -* @param {*gin.Context} c -* @param {file} file -* @param {string} key -* @param {string} type:avatar,background -* @return {*} -* @method: -* @router: - */ -func PostUserUploadImage(c *gin.Context) { - id := c.GetHeader("user_id") - f, err := c.FormFile("file") - key := c.Param("key") - t := c.PostForm("type") - if len(key) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - if err != nil { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.CLIENT_ERROR, Message: common_err.GetMsg(common_err.CLIENT_ERROR), Data: err.Error()}) - return - } - - _, err = file.GetImageExtByName(f.Filename) - if err != nil { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.NOT_IMAGE, Message: common_err.GetMsg(common_err.NOT_IMAGE)}) - return - } - ext := filepath.Ext(f.Filename) - user := service.MyService.User().GetUserInfoById(id) - - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - if t == "avatar" { - key = "avatar" - } - path := config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id) + "/" + key + ext - - c.SaveUploadedFile(f, path) - data := make(map[string]string, 3) - data["path"] = path - data["file_name"] = key + ext - data["online_path"] = "/v1/users/image?path=" + path - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: data}) -} - -/** - * @description: get current user's image - * @method:GET - * @router:/user/image/:id - */ -func GetUserImage(c *gin.Context) { - filePath := c.Query("path") - if len(filePath) == 0 { - c.JSON(http.StatusNotFound, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - if !file.Exists(filePath) { - c.JSON(http.StatusNotFound, model.Result{Success: common_err.FILE_DOES_NOT_EXIST, Message: common_err.GetMsg(common_err.FILE_DOES_NOT_EXIST)}) - return - } - if !strings.Contains(filePath, config.AppInfo.UserDataPath) { - c.JSON(http.StatusNotFound, model.Result{Success: common_err.INSUFFICIENT_PERMISSIONS, Message: common_err.GetMsg(common_err.INSUFFICIENT_PERMISSIONS)}) - return - } - - fileTmp, _ := os.Open(filePath) - defer fileTmp.Close() - - fileName := path.Base(filePath) - - // @tiger - RESTful 规范下不应该返回文件本身内容,而是返回文件的静态URL,由前端去解析 - c.Header("Content-Disposition", "attachment; filename*=utf-8''"+url2.PathEscape(fileName)) - c.File(filePath) -} -func DeleteUserImage(c *gin.Context) { - id := c.GetHeader("user_id") - path := c.Query("path") - if len(path) == 0 { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) - return - } - user := service.MyService.User().GetUserInfoById(id) - if user.Id == 0 { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) - return - } - if !file.Exists(path) { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.FILE_DOES_NOT_EXIST, Message: common_err.GetMsg(common_err.FILE_DOES_NOT_EXIST)}) - return - } - if !strings.Contains(path, config.AppInfo.UserDataPath+"/"+strconv.Itoa(user.Id)) { - c.JSON(common_err.SERVICE_ERROR, model.Result{Success: common_err.INSUFFICIENT_PERMISSIONS, Message: common_err.GetMsg(common_err.INSUFFICIENT_PERMISSIONS)}) - return - } - os.Remove(path) - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) -} - -/** - * @description: - * @param {*gin.Context} c - * @param {string} refresh_token - * @return {*} - * @method: - * @router: - */ -func PostUserRefreshToken(c *gin.Context) { - js := make(map[string]string) - c.ShouldBind(&js) - refresh := js["refresh_token"] - claims, err := jwt.ParseToken(refresh, true) - if err != nil { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.VERIFICATION_FAILURE, Message: common_err.GetMsg(common_err.VERIFICATION_FAILURE), Data: err.Error()}) - return - } - if !claims.VerifyExpiresAt(time.Now(), true) || !claims.VerifyIssuer("refresh", true) { - c.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.VERIFICATION_FAILURE, Message: common_err.GetMsg(common_err.VERIFICATION_FAILURE)}) - return - } - newToken := jwt.GetAccessToken(claims.Username, claims.PassWord, claims.Id) - verifyInfo := system_model.VerifyInformation{} - verifyInfo.AccessToken = newToken - verifyInfo.RefreshToken = jwt.GetRefreshToken(claims.Username, claims.PassWord, claims.Id) - verifyInfo.ExpiresAt = time.Now().Add(3 * time.Hour * time.Duration(1)).Unix() - - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: verifyInfo}) - -} - -func DeleteUserAll(c *gin.Context) { - service.MyService.User().DeleteAllUser() - c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) -} - -// @Summary 检查是否进入引导状态 -// @Produce application/json -// @Accept application/json -// @Tags sys -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /sys/init/check [get] -func GetUserStatus(c *gin.Context) { - data := make(map[string]interface{}, 2) - - if service.MyService.User().GetUserCount() > 0 { - data["initialized"] = true - data["key"] = "" - } else { - key := uuid.NewV4().String() - service.UserRegisterHash[key] = key - data["key"] = key - data["initialized"] = false - } - c.JSON(common_err.SUCCESS, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: data, - }) -} diff --git a/service/app.go b/service/app.go index 965c59c..a2bb58b 100644 --- a/service/app.go +++ b/service/app.go @@ -439,7 +439,7 @@ func (a *appStruct) GetHardwareUsageStream() { wg.Add(1) go func(v types.Container, i int) { defer wg.Done() - stats, err := cli.ContainerStats(ctx, v.ID, true) + stats, err := cli.ContainerStatsOneShot(ctx, v.ID) if err != nil { return } diff --git a/service/casa.go b/service/casa.go index b5ca80e..f5a71d3 100644 --- a/service/casa.go +++ b/service/casa.go @@ -144,7 +144,7 @@ func (o *casaService) AsyncGetServerList() (collection model.ServerAppListCollec listModel := []model.ServerAppList{} communityModel := []model.ServerAppList{} recommendModel := []model.ServerAppList{} - json2.Unmarshal([]byte(gjson.Get(listS, "data.list").String()), &listModel) + err = json2.Unmarshal([]byte(gjson.Get(listS, "data.list").String()), &listModel) json2.Unmarshal([]byte(gjson.Get(listS, "data.recommend").String()), &recommendModel) json2.Unmarshal([]byte(gjson.Get(listS, "data.community").String()), &communityModel) diff --git a/service/docker.go b/service/docker.go index 9c8041d..9fe885f 100644 --- a/service/docker.go +++ b/service/docker.go @@ -7,13 +7,8 @@ import ( "encoding/binary" json2 "encoding/json" "fmt" - "syscall" "github.com/IceWhaleTech/CasaOS/model/notify" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/namespaces" - "github.com/containerd/containerd/oci" "github.com/pkg/errors" "go.uber.org/zap" @@ -535,6 +530,13 @@ func (ds *dockerService) DockerContainerCreate(m model.CustomizationPostData, id // info.NetworkSettings = &types.NetworkSettings{} hostConfig = info.HostConfig config = info.Config + if config.Labels["casaos"] == "casaos" { + config.Cmd = m.Cmd + config.Image = m.Image + config.Env = envArr + config.Hostname = m.HostName + config.ExposedPorts = ports + } } else { config.Cmd = m.Cmd config.Image = m.Image @@ -872,73 +874,73 @@ func NewDockerService() DockerService { // //} -func Containerd() { - // create a new client connected to the default socket path for containerd - cli, err := containerd.New("/run/containerd/containerd.sock") - if err != nil { - fmt.Println("111") - fmt.Println(err) - } - defer cli.Close() +// func Containerd() { +// // create a new client connected to the default socket path for containerd +// cli, err := containerd.New("/run/containerd/containerd.sock") +// if err != nil { +// fmt.Println("111") +// fmt.Println(err) +// } +// defer cli.Close() - // create a new context with an "example" namespace - ctx := namespaces.WithNamespace(context.Background(), "default") +// // create a new context with an "example" namespace +// ctx := namespaces.WithNamespace(context.Background(), "default") - // pull the redis image from DockerHub - image, err := cli.Pull(ctx, "docker.io/library/busybox:latest", containerd.WithPullUnpack) - if err != nil { - fmt.Println("222") - fmt.Println(err) - } +// // pull the redis image from DockerHub +// image, err := cli.Pull(ctx, "docker.io/library/busybox:latest", containerd.WithPullUnpack) +// if err != nil { +// fmt.Println("222") +// fmt.Println(err) +// } - // create a container - container, err := cli.NewContainer( - ctx, - "test1", - containerd.WithImage(image), - containerd.WithNewSnapshot("redis-server-snapshot1", image), - containerd.WithNewSpec(oci.WithImageConfig(image)), - ) +// // create a container +// container, err := cli.NewContainer( +// ctx, +// "test1", +// containerd.WithImage(image), +// containerd.WithNewSnapshot("redis-server-snapshot1", image), +// containerd.WithNewSpec(oci.WithImageConfig(image)), +// ) - if err != nil { - fmt.Println(err) - } - defer container.Delete(ctx, containerd.WithSnapshotCleanup) +// if err != nil { +// fmt.Println(err) +// } +// defer container.Delete(ctx, containerd.WithSnapshotCleanup) - // create a task from the container - task, err := container.NewTask(ctx, cio.NewCreator(cio.WithStdio)) - if err != nil { - fmt.Println(err) - } - defer task.Delete(ctx) +// // create a task from the container +// task, err := container.NewTask(ctx, cio.NewCreator(cio.WithStdio)) +// if err != nil { +// fmt.Println(err) +// } +// defer task.Delete(ctx) - // make sure we wait before calling start - exitStatusC, err := task.Wait(ctx) - if err != nil { - fmt.Println(err) - } +// // make sure we wait before calling start +// exitStatusC, err := task.Wait(ctx) +// if err != nil { +// fmt.Println(err) +// } - // call start on the task to execute the redis server - if err = task.Start(ctx); err != nil { - fmt.Println(err) - } +// // call start on the task to execute the redis server +// if err = task.Start(ctx); err != nil { +// fmt.Println(err) +// } - fmt.Println("执行完成等待") - // sleep for a lil bit to see the logs - time.Sleep(3 * time.Second) +// fmt.Println("执行完成等待") +// // sleep for a lil bit to see the logs +// time.Sleep(3 * time.Second) - // kill the process and get the exit status - if err = task.Kill(ctx, syscall.SIGTERM); err != nil { - fmt.Println(err) - } +// // kill the process and get the exit status +// if err = task.Kill(ctx, syscall.SIGTERM); err != nil { +// fmt.Println(err) +// } - // wait for the process to fully exit and print out the exit status +// // wait for the process to fully exit and print out the exit status - status := <-exitStatusC - code, _, err := status.Result() - if err != nil { - fmt.Println(err) - } - fmt.Printf("redis-server exited with status: %d\n", code) +// status := <-exitStatusC +// code, _, err := status.Result() +// if err != nil { +// fmt.Println(err) +// } +// fmt.Printf("redis-server exited with status: %d\n", code) -} +// } diff --git a/service/model/o_user.go b/service/model/o_user.go deleted file mode 100644 index 1309629..0000000 --- a/service/model/o_user.go +++ /dev/null @@ -1,31 +0,0 @@ -/* - * @Author: LinkLeong link@icewhale.com - * @Date: 2022-05-13 18:15:46 - * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-11 17:57:00 - * @FilePath: /CasaOS/service/model/o_user.go - * @Description: - * @Website: https://www.casaos.io - * Copyright (c) 2022 by icewhale, All Rights Reserved. - */ -package model - -import "time" - -//Soon to be removed -type UserDBModel struct { - Id int `gorm:"column:id;primary_key" json:"id"` - Username string `json:"username"` - Password string `json:"password,omitempty"` - Role string `json:"role"` - Email string `json:"email"` - Nickname string `json:"nickname"` - Avatar string `json:"avatar"` - Description string `json:"description"` - CreatedAt time.Time `gorm:"<-:create;autoCreateTime" json:"created_at,omitempty"` - UpdatedAt time.Time `gorm:"<-:create;<-:update;autoUpdateTime" json:"updated_at,omitempty"` -} - -func (p *UserDBModel) TableName() string { - return "o_users" -} diff --git a/service/service.go b/service/service.go index 9eac558..16594b9 100644 --- a/service/service.go +++ b/service/service.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-07-12 09:48:56 * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-27 10:28:48 + * @LastEditTime: 2022-09-02 22:10:05 * @FilePath: /CasaOS/service/service.go * @Description: * @Website: https://www.casaos.io @@ -11,6 +11,7 @@ package service import ( + gateway "github.com/IceWhaleTech/CasaOS-Gateway/common" "github.com/gorilla/websocket" "github.com/patrickmn/go-cache" "gorm.io/gorm" @@ -26,7 +27,7 @@ var SocketRun bool type Repository interface { App() AppService - User() UserService + //User() UserService Docker() DockerService Casa() CasaService Disk() DiskService @@ -35,12 +36,19 @@ type Repository interface { System() SystemService Shares() SharesService Connections() ConnectionsService + Gateway() gateway.ManagementService } -func NewService(db *gorm.DB) Repository { +func NewService(db *gorm.DB, RuntimePath string) Repository { + + gatewayManagement, err := gateway.NewManagementService(RuntimePath) + if err != nil && len(RuntimePath) > 0 { + panic(err) + } + return &store{ + gateway: gatewayManagement, app: NewAppService(db), - user: NewUserService(db), docker: NewDockerService(), casa: NewCasaService(), disk: NewDiskService(db), @@ -55,7 +63,6 @@ func NewService(db *gorm.DB) Repository { type store struct { db *gorm.DB app AppService - user UserService docker DockerService casa CasaService disk DiskService @@ -64,8 +71,12 @@ type store struct { system SystemService shares SharesService connections ConnectionsService + gateway gateway.ManagementService } +func (c *store) Gateway() gateway.ManagementService { + return c.gateway +} func (s *store) Connections() ConnectionsService { return s.connections } @@ -89,10 +100,6 @@ func (c *store) App() AppService { return c.app } -func (c *store) User() UserService { - return c.user -} - func (c *store) Docker() DockerService { return c.docker } diff --git a/service/system.go b/service/system.go index 1bb622f..c6ed444 100644 --- a/service/system.go +++ b/service/system.go @@ -50,6 +50,8 @@ type SystemService interface { RenameFile(oldF, newF string) (int, error) MkdirAll(path string) (int, error) IsServiceRunning(name string) bool + GetCPUTemperature() int + GetCPUPower() map[string]string } type systemService struct { } @@ -219,7 +221,7 @@ func (s *systemService) UpdateSystemVersion(version string) { } file.CreateFile(config.AppInfo.LogPath + "/upgrade.log") //go command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/LinkLeong/casaos-alpha/main/update.sh | bash") - go command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/update.sh | bash") + go command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/update.sh | sudo bash") //s.log.Error(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version) //s.log.Error(command2.ExecResultStr(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version)) } @@ -294,6 +296,33 @@ func (s *systemService) IsServiceRunning(name string) bool { return strings.TrimSpace(status) == "running" } +func (s *systemService) GetCPUTemperature() int { + outPut := "" + if file.Exists("/sys/class/thermal/thermal_zone0/temp") { + outPut = string(file.ReadFullFile("/sys/class/thermal/thermal_zone0/temp")) + } else if file.Exists("/sys/class/hwmon/hwmon0/temp1_input") { + outPut = string(file.ReadFullFile("/sys/class/hwmon/hwmon0/temp1_input")) + } else { + outPut = "0" + } + + celsius, _ := strconv.Atoi(strings.TrimSpace(outPut)) + + if celsius > 1000 { + celsius = celsius / 1000 + } + return celsius +} +func (s *systemService) GetCPUPower() map[string]string { + data := make(map[string]string, 2) + data["timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) + if file.Exists("/sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj") { + data["value"] = strings.TrimSpace(string(file.ReadFullFile("/sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj"))) + } else { + data["value"] = "0" + } + return data +} func NewSystemService() SystemService { return &systemService{} } diff --git a/service/user.go b/service/user.go deleted file mode 100644 index d53667f..0000000 --- a/service/user.go +++ /dev/null @@ -1,99 +0,0 @@ -/* - * @Author: LinkLeong link@icewhale.com - * @Date: 2022-03-18 11:40:55 - * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-12 10:05:37 - * @FilePath: /CasaOS/service/user.go - * @Description: - * @Website: https://www.casaos.io - * Copyright (c) 2022 by icewhale, All Rights Reserved. - */ -package service - -import ( - "io" - "mime/multipart" - "os" - - "github.com/IceWhaleTech/CasaOS/service/model" - "gorm.io/gorm" -) - -type UserService interface { - UpLoadFile(file multipart.File, name string) error - CreateUser(m model.UserDBModel) model.UserDBModel - GetUserCount() (userCount int64) - UpdateUser(m model.UserDBModel) - UpdateUserPassword(m model.UserDBModel) - GetUserInfoById(id string) (m model.UserDBModel) - GetUserAllInfoById(id string) (m model.UserDBModel) - GetUserAllInfoByName(userName string) (m model.UserDBModel) - DeleteUserById(id string) - DeleteAllUser() - GetUserInfoByUserName(userName string) (m model.UserDBModel) - GetAllUserName() (list []model.UserDBModel) -} - -var UserRegisterHash = make(map[string]string) - -type userService struct { - db *gorm.DB -} - -func (u *userService) DeleteAllUser() { - u.db.Where("1=1").Delete(&model.UserDBModel{}) -} -func (u *userService) DeleteUserById(id string) { - u.db.Where("id= ?", id).Delete(&model.UserDBModel{}) -} - -func (u *userService) GetAllUserName() (list []model.UserDBModel) { - u.db.Select("username").Find(&list) - return -} -func (u *userService) CreateUser(m model.UserDBModel) model.UserDBModel { - u.db.Create(&m) - return m -} - -func (u *userService) GetUserCount() (userCount int64) { - u.db.Find(&model.UserDBModel{}).Count(&userCount) - return -} - -func (u *userService) UpdateUser(m model.UserDBModel) { - u.db.Model(&m).Omit("password").Updates(&m) -} -func (u *userService) UpdateUserPassword(m model.UserDBModel) { - u.db.Model(&m).Update("password", m.Password) -} -func (u *userService) GetUserAllInfoById(id string) (m model.UserDBModel) { - u.db.Where("id= ?", id).First(&m) - return -} -func (u *userService) GetUserAllInfoByName(userName string) (m model.UserDBModel) { - u.db.Where("username= ?", userName).First(&m) - return -} -func (u *userService) GetUserInfoById(id string) (m model.UserDBModel) { - u.db.Select("username", "id", "role", "nickname", "description", "avatar", "email").Where("id= ?", id).First(&m) - return -} - -func (u *userService) GetUserInfoByUserName(userName string) (m model.UserDBModel) { - u.db.Select("username", "id", "role", "nickname", "description", "avatar", "email").Where("username= ?", userName).First(&m) - return -} - -//上传文件 -func (c *userService) UpLoadFile(file multipart.File, url string) error { - out, _ := os.OpenFile(url, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0644) - defer out.Close() - io.Copy(out, file) - return nil -} - -//获取用户Service -func NewUserService(db *gorm.DB) UserService { - return &userService{db: db} -} diff --git a/shell/11-usb-mount.rules b/shell/11-usb-mount.rules deleted file mode 100644 index 9c33b8c..0000000 --- a/shell/11-usb-mount.rules +++ /dev/null @@ -1,6 +0,0 @@ - -# copy to /etc/udev/rules.d path - -KERNEL=="sd[a-z]*[0-9]", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/bin/systemctl start usb-mount@%k.service" - -KERNEL=="sd[a-z]*[0-9]", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/bin/systemctl stop usb-mount@%k.service" \ No newline at end of file diff --git a/shell/assist.sh b/shell/assist.sh deleted file mode 100644 index 7a693aa..0000000 --- a/shell/assist.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - - diff --git a/shell/delete-old-service.sh b/shell/delete-old-service.sh deleted file mode 100644 index 41ccb88..0000000 --- a/shell/delete-old-service.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -### - # @Author: LinkLeong link@icewhale.com - # @Date: 2022-06-30 10:08:33 - # @LastEditors: LinkLeong - # @LastEditTime: 2022-07-01 11:17:54 - # @FilePath: /CasaOS/shell/delete-old-service.sh - # @Description: -### - -((EUID)) && sudo_cmd="sudo" - -# SYSTEM INFO -readonly UNAME_M="$(uname -m)" - -# CasaOS PATHS -readonly CASA_REPO=IceWhaleTech/CasaOS -readonly CASA_UNZIP_TEMP_FOLDER=/tmp/casaos -readonly CASA_BIN=casaos -readonly CASA_BIN_PATH=/usr/bin/casaos -readonly CASA_CONF_PATH=/etc/casaos.conf -readonly CASA_SERVICE_PATH=/etc/systemd/system/casaos.service -readonly CASA_HELPER_PATH=/usr/share/casaos/shell/ -readonly CASA_USER_CONF_PATH=/var/lib/casaos/conf/ -readonly CASA_DB_PATH=/var/lib/casaos/db/ -readonly CASA_TEMP_PATH=/var/lib/casaos/temp/ -readonly CASA_LOGS_PATH=/var/log/casaos/ -readonly CASA_PACKAGE_EXT=".tar.gz" -readonly CASA_RELEASE_API="https://api.github.com/repos/${CASA_REPO}/releases" -readonly CASA_OPENWRT_DOCS="https://github.com/IceWhaleTech/CasaOS-OpenWrt" - -readonly COLOUR_RESET='\e[0m' -readonly aCOLOUR=( - '\e[38;5;154m' # green | Lines, bullets and separators - '\e[1m' # Bold white | Main descriptions - '\e[90m' # Grey | Credits - '\e[91m' # Red | Update notifications Alert - '\e[33m' # Yellow | Emphasis -) - -Target_Arch="" -Target_Distro="debian" -Target_OS="linux" -Casa_Tag="" - - -####################################### -# Custom printing function -# Globals: -# None -# Arguments: -# $1 0:OK 1:FAILED 2:INFO 3:NOTICE -# message -# Returns: -# None -####################################### - -Show() { - # OK - if (($1 == 0)); then - echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} OK $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" - # FAILED - elif (($1 == 1)); then - echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[3]}FAILED$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" - # INFO - elif (($1 == 2)); then - echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} INFO $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" - # NOTICE - elif (($1 == 3)); then - echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[4]}NOTICE$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" - fi -} - -Warn() { - echo -e "${aCOLOUR[3]}$1$COLOUR_RESET" -} - -# 0 Check_exist -Check_Exist() { - #Create Dir - Show 2 "Create Folders." - ${sudo_cmd} mkdir -p ${CASA_HELPER_PATH} - ${sudo_cmd} mkdir -p ${CASA_LOGS_PATH} - ${sudo_cmd} mkdir -p ${CASA_USER_CONF_PATH} - ${sudo_cmd} mkdir -p ${CASA_DB_PATH} - ${sudo_cmd} mkdir -p ${CASA_TEMP_PATH} - - - Show 2 "Start cleaning up the old version." - - ${sudo_cmd} rm -rf /usr/lib/systemd/system/casaos.service - - ${sudo_cmd} rm -rf /lib/systemd/system/casaos.service - - ${sudo_cmd} rm -rf /usr/local/bin/${CASA_BIN} - - #Clean - if [[ -d "/casaOS" ]]; then - ${sudo_cmd} rm -rf /casaOS - fi - Show 0 "Clearance completed." - - $sudo_cmd systemctl restart ${CASA_BIN} -} -Check_Exist diff --git a/shell/helper.sh b/shell/helper.sh deleted file mode 100644 index a13b846..0000000 --- a/shell/helper.sh +++ /dev/null @@ -1,389 +0,0 @@ -#!/bin/bash - -# 获取系统信息 -GetSysInfo() { - if [ -s "/etc/redhat-release" ]; then - SYS_VERSION=$(cat /etc/redhat-release) - elif [ -s "/etc/issue" ]; then - SYS_VERSION=$(cat /etc/issue) - fi - SYS_INFO=$(uname -a) - SYS_BIT=$(getconf LONG_BIT) - MEM_TOTAL=$(free -m | grep Mem | awk '{print $2}') - CPU_INFO=$(getconf _NPROCESSORS_ONLN) - - echo -e ${SYS_VERSION} - echo -e Bit:${SYS_BIT} Mem:${MEM_TOTAL}M Core:${CPU_INFO} - echo -e ${SYS_INFO} -} - -#获取网卡信息 -GetNetCard() { - if [ "$1" == "1" ]; then - if [ -d "/sys/devices/virtual/net" ]; then - ls /sys/devices/virtual/net - fi - else - if [ -d "/sys/devices/virtual/net" ] && [ -d "/sys/class/net" ]; then - ls /sys/class/net/ | grep -v "$(ls /sys/devices/virtual/net/)" - fi - fi -} - - -GetTimeZone(){ - timedatectl | grep "Time zone" | awk '{printf $3}' -} - -#查看网卡状态 -#param 网卡名称 -CatNetCardState() { - if [ -e "/sys/class/net/$1/operstate" ]; then - cat /sys/class/net/$1/operstate - fi -} - -#获取docker根目录 -GetDockerRootDir() { - if hash docker 2>/dev/null; then - docker info | grep 'Docker Root Dir' | awk -F ':' '{print $2}' - else - echo "" - fi -} - -#删除安装应用文件夹 -#param 需要删除的文件夹路径 -DelAppConfigDir() { - if [ -d $1 ]; then - rm -fr $1 - fi -} - -#zerotier本机已加入的网络 -#result start,end,sectors -GetLocalJoinNetworks() { - zerotier-cli listnetworks -j -} - -#移除挂载点,删除已挂在的文件夹 -UMountPorintAndRemoveDir() { - DEVICE=$1 - MOUNT_POINT=$(mount | grep ${DEVICE} | awk '{ print $3 }') - if [[ -z ${MOUNT_POINT} ]]; then - ${log} "Warning: ${DEVICE} is not mounted" - else - umount -lf ${DEVICE} - /bin/rmdir "${MOUNT_POINT}" - fi -} - -#格式化fat32磁盘 -#param 需要格式化的目录 /dev/sda1 -#param 格式 -FormatDisk() { - if [ "$2" == "fat32" ]; then - mkfs.vfat -F 32 $1 - elif [ "$2" == "ntfs" ]; then - mkfs.ntfs $1 - elif [ "$2" == "ext4" ]; then - mkfs.ext4 -m 1 -F $1 - elif [ "$2" == "exfat" ]; then - mkfs.exfat $1 - else - mkfs.ext4 -m 1 -F $1 - fi -} - -#删除分区 -#param 路径 /dev/sdb -#param 删除分区的区号 -DelPartition() { - fdisk $1 </dev/null 2>&1 - ;; - exfat) - mount -t exfat ${DEVICE} ${MOUNT_POINT} >/dev/null 2>&1 - ;; - ntfs) - ntfs-3g ${DEVICE} ${MOUNT_POINT} - ;; - iso9660) - mount -t iso9660 ${DEVICE} ${MOUNT_POINT} - ;; - *) - /bin/rmdir "${MOUNT_POINT}" - exit 0 - ;; - esac -} - -# $1=sda1 -do_umount() { - log="logger -t usb-mount.sh -s " - DEVBASE=$1 - DEVICE="${DEVBASE}" - MOUNT_POINT=$(mount | grep ${DEVICE} | awk '{ print $3 }') - - if [[ -z ${MOUNT_POINT} ]]; then - ${log} "Warning: ${DEVICE} is not mounted" - else - /bin/kill -9 $(lsof ${MOUNT_POINT}) - umount -l ${DEVICE} - ${log} "Unmounted ${DEVICE} from ${MOUNT_POINT}" - if [ "`ls -A ${MOUNT_POINT}`" = "" ]; then - /bin/rm -fr "${MOUNT_POINT}" - fi - - sed -i.bak "\@${MOUNT_POINT}@d" /var/log/usb-mount.track - fi - -} -# $1=/mnt/volume1/data.img -# $2=100G -PackageDocker() { - image=$1 - docker="/mnt/casa_docker" - #判断目录docker存在不存在则创建,存在检查是否为空 - - if [ ! -d "$docker" ]; then - mkdir ${docker} - fi - - if [ "$(ls -A $docker)" = "" ]; then - echo "$docker count is 0" - else - mkdir ${docker}_bak - mv -r ${docker} ${docker}_bak - fi - - daemon="/etc/docker/daemon.json" - #1创建img文件在挂载的目录 - fallocate -l $2 $image - #2初始化img文件 - mkfs -t ext4 $image - #3挂载img文件 - sudo mount -o loop $image $docker - #4给移动/var/lib/docker数据到img挂载的目录 - systemctl stop docker.socket - systemctl stop docker - cp -r /var/lib/docker/* ${docker}/ - #5在/etc/docker写入daemon.json(需要检查) - if [ -d "$daemon" ]; then - mv -r $daemon ${daemon}.bak - fi - echo "{\"data-root\": \"$docker\"}" >$daemon - #删除老数据腾出空间 - #rm -fr /var/lib/docker - systemctl start docker.socket - systemctl start docker -} - -DockerImgMove() { - image=$1 - systemctl stop docker.socket - systemctl stop docker - sudo umount -f $image -} - -GetDockerDataRoot() { - docker info | grep "Docker Root Dir:" -} - -SetLink() { - ln -s /mnt/casa_sda1/AppData /DATA/AppData - #删除所有软链 - find /DATA -type l -delete -} - -#压缩文件夹 - -TarFolder() { - #压缩 - tar -zcvf data.tar.gz -C/DATA/ AppDataBak/ - - #解压 - tar zxvf data.tar.gz - - #查看某文件夹下的所有包括子文件夹文件 - ls /DATA/Media -lR | grep "^-" | wc -l - # ls -lR|grep "^d"| wc -l 查看某个文件夹下文件夹的个数,包括子文件夹下的文件夹个数。 - - #查看固定文件夹大小 - du -sh /DATA -} - -USB_Start_Auto() { - ((EUID)) && sudo_cmd="sudo" - $sudo_cmd systemctl enable devmon@devmon - $sudo_cmd systemctl start devmon@devmon -} - -USB_Stop_Auto() { - ((EUID)) && sudo_cmd="sudo" - $sudo_cmd systemctl stop devmon@devmon - $sudo_cmd systemctl disable devmon@devmon - $sudo_cmd udevil clean -} - -GetDeviceTree(){ - cat /proc/device-tree/model -} - -# restart samba service -RestartSMBD(){ - $sudo_cmd systemctl restart smbd -} - -# edit user password $1:username -EditSmabaUserPassword(){ - $sudo_cmd smbpasswd $1 -} - -AddSmabaUser(){ - $sudo_cmd useradd $1 - $sudo_cmd smbpasswd -a $1 <"$PREFIX/tmp/${Casa_Package}" - if [[ $? -ne 0 ]]; then - Show 1 "Download failed, Please check if your internet connection is working and retry." - exit 1 - else - Show 0 "Download successful!" - fi - #Extract CasaOS Package - Show 2 "Extracting..." - case "${Casa_Package}" in - *.zip) ${sudo_cmd} unzip -o "$PREFIX/tmp/${Casa_Package}" -d "$PREFIX/tmp/" ;; - *.tar.gz) ${sudo_cmd} tar -xzf "$PREFIX/tmp/${Casa_Package}" -C "$PREFIX/tmp/" ;; - esac - #Setting Executable Permissions - ${sudo_cmd} chmod +x "$PREFIX${CASA_UNZIP_TEMP_FOLDER}/${CASA_BIN}" - -} - -#Install Addons -Install_Addons() { - Show 2 "Installing CasaOS Addons" - ${sudo_cmd} cp -rf "$PREFIX${CASA_UNZIP_TEMP_FOLDER}/shell/11-usb-mount.rules" "/etc/udev/rules.d/" - ${sudo_cmd} cp -rf "$PREFIX${CASA_UNZIP_TEMP_FOLDER}/shell/usb-mount@.service" "/etc/systemd/system/" - sync -} - -#Clean Temp Files -Clean_Temp_Files() { - Show 0 "Clean..." - ${sudo_cmd} rm -rf "$PREFIX${CASA_UNZIP_TEMP_FOLDER}" - sync -} - -#Install CasaOS -Install_CasaOS() { - Show 2 "Installing..." - - # Install Bin - ${sudo_cmd} mv -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/${CASA_BIN} ${CASA_BIN_PATH} - - # Install Helper - if [[ -d ${CASA_HELPER_PATH} ]]; then - ${sudo_cmd} rm -rf ${CASA_HELPER_PATH}* - fi - ${sudo_cmd} cp -rf $PREFIX${CASA_UNZIP_TEMP_FOLDER}/shell/* ${CASA_HELPER_PATH} - #Setting Executable Permissions - ${sudo_cmd} chmod +x $PREFIX${CASA_HELPER_PATH}* - - # Install Conf - if [[ ! -f ${CASA_CONF_PATH} ]]; then - if [[ -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/conf/conf.ini.sample ]]; then - ${sudo_cmd} mv -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/conf/conf.ini.sample ${CASA_CONF_PATH} - else - ${sudo_cmd} mv -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/conf/conf.conf.sample ${CASA_CONF_PATH} - fi - - fi - sync - - if [[ ! -x "$(command -v ${CASA_BIN})" ]]; then - Show 1 "Installation failed, please try again." - exit 1 - else - Show 0 "CasaOS Successfully installed." - fi -} - -#Generate Service File -Generate_Service() { - if [ -f ${CASA_SERVICE_PATH} ]; then - Show 2 "Try stop CasaOS system service." - # Stop before generation - if [[ $(systemctl is-active ${CASA_BIN} &>/dev/null) ]]; then - ${sudo_cmd} systemctl stop ${CASA_BIN} - fi - fi - Show 2 "Create system service for CasaOS." - - ${sudo_cmd} tee ${CASA_SERVICE_PATH} >/dev/null <>"/var/log/usb-mount.track" - # fi - # - # ${log} "Mounted ${DEVICE} at ${MOUNT_POINT}" - - case ${ID_FS_TYPE} in - vfat) - mount -t vfat -o rw,relatime,users,gid=100,umask=000,shortname=mixed,utf8=1,flush ${DEVICE} ${MOUNT_POINT} - ;; - ext[2-4]) - mount -o noatime ${DEVICE} ${MOUNT_POINT} >/dev/null 2>&1 - ;; - exfat) - mount -t exfat ${DEVICE} ${MOUNT_POINT} >/dev/null 2>&1 - ;; - ntfs) - ntfs-3g ${DEVICE} ${MOUNT_POINT} - ;; - iso9660) - mount -t iso9660 ${DEVICE} ${MOUNT_POINT} - ;; - *) - /bin/rmdir "${MOUNT_POINT}" - exit 0 - ;; - esac -} - -do_umount() { - - if [[ -z ${MOUNT_POINT} ]]; then - ${log} "Warning: ${DEVICE} is not mounted" - else - #/bin/kill -9 $(lsof ${MOUNT_POINT}) - umount -l ${DEVICE} - ${log} "Unmounted ${DEVICE} from ${MOUNT_POINT}" - if [ "`ls -A ${MOUNT_POINT}`" = "" ]; then - /bin/rm -fr "${MOUNT_POINT}" - fi - sed -i.bak "\@${MOUNT_POINT}@d" /var/log/usb-mount.track - fi - -} - -case "${ACTION}" in -add) - do_mount - ;; -remove) - do_umount - ;; -*) - exit 1 - ;; -esac diff --git a/shell/usb-mount@.service b/shell/usb-mount@.service deleted file mode 100644 index bec2f85..0000000 --- a/shell/usb-mount@.service +++ /dev/null @@ -1,8 +0,0 @@ -# copy to /etc/systemd/system path -[Unit] -Description=Mount USB Drive on %i -[Service] -Type=oneshot -RemainAfterExit=true -ExecStart=/casaOS/server/shell/usb-mount.sh add %i -ExecStop=/casaOS/server/shell/usb-mount.sh remove %i diff --git a/types/system.go b/types/system.go index d15b91f..24ef182 100644 --- a/types/system.go +++ b/types/system.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-02-17 18:53:22 * @LastEditors: LinkLeong - * @LastEditTime: 2022-08-25 10:49:46 + * @LastEditTime: 2022-09-06 14:27:42 * @FilePath: /CasaOS/types/system.go * @Description: * @Website: https://www.casaos.io @@ -10,6 +10,6 @@ */ package types -const CURRENTVERSION = "0.3.5.1" +const CURRENTVERSION = "0.3.6" const BODY = " " diff --git a/web/browserconfig.xml b/web/browserconfig.xml deleted file mode 100644 index a221792..0000000 --- a/web/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #da532c - - - diff --git a/web/favicon.svg b/web/favicon.svg deleted file mode 100644 index 9760ab7..0000000 --- a/web/favicon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/web/img/CasaConnect.svg b/web/img/CasaConnect.svg deleted file mode 100644 index a5abb0e..0000000 --- a/web/img/CasaConnect.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/web/img/Files.svg b/web/img/Files.svg deleted file mode 100644 index 3ab1bd1..0000000 --- a/web/img/Files.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/img/USB.3ba78dec.png b/web/img/USB.3ba78dec.png deleted file mode 100644 index e55d8bf..0000000 Binary files a/web/img/USB.3ba78dec.png and /dev/null differ diff --git a/web/img/casa-dark.b6d17cf2.svg b/web/img/casa-dark.b6d17cf2.svg deleted file mode 100644 index 6f25454..0000000 --- a/web/img/casa-dark.b6d17cf2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/img/default.be7833db.png b/web/img/default.be7833db.png deleted file mode 100644 index 03ff6c8..0000000 Binary files a/web/img/default.be7833db.png and /dev/null differ diff --git a/web/img/disk.573d4b55.png b/web/img/disk.573d4b55.png deleted file mode 100644 index adfb1e4..0000000 Binary files a/web/img/disk.573d4b55.png and /dev/null differ diff --git a/web/img/gradient.1b76cb09.png b/web/img/gradient.1b76cb09.png deleted file mode 100644 index 1c4cf56..0000000 Binary files a/web/img/gradient.1b76cb09.png and /dev/null differ diff --git a/web/img/icon/android-chrome-192x192.png b/web/img/icon/android-chrome-192x192.png deleted file mode 100644 index c3d1cea..0000000 Binary files a/web/img/icon/android-chrome-192x192.png and /dev/null differ diff --git a/web/img/icon/apple-touch-icon.png b/web/img/icon/apple-touch-icon.png deleted file mode 100644 index 8525617..0000000 Binary files a/web/img/icon/apple-touch-icon.png and /dev/null differ diff --git a/web/img/icon/favicon-16x16.png b/web/img/icon/favicon-16x16.png deleted file mode 100644 index 37f9217..0000000 Binary files a/web/img/icon/favicon-16x16.png and /dev/null differ diff --git a/web/img/icon/favicon-32x32.png b/web/img/icon/favicon-32x32.png deleted file mode 100644 index 8474b54..0000000 Binary files a/web/img/icon/favicon-32x32.png and /dev/null differ diff --git a/web/img/icon/mstile-150x150.png b/web/img/icon/mstile-150x150.png deleted file mode 100644 index 7d4fb0f..0000000 Binary files a/web/img/icon/mstile-150x150.png and /dev/null differ diff --git a/web/img/icon/safari-pinned-tab.svg b/web/img/icon/safari-pinned-tab.svg deleted file mode 100644 index af12e15..0000000 --- a/web/img/icon/safari-pinned-tab.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - diff --git a/web/img/storage.d487ddb6.png b/web/img/storage.d487ddb6.png deleted file mode 100644 index 88fd130..0000000 Binary files a/web/img/storage.d487ddb6.png and /dev/null differ diff --git a/web/index.html b/web/index.html deleted file mode 100644 index 74b1137..0000000 --- a/web/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - CasaOS - - - - - -
- - - - diff --git a/web/js/0.js b/web/js/0.js deleted file mode 100644 index 165dae7..0000000 --- a/web/js/0.js +++ /dev/null @@ -1,37 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[0],{"./node_modules/@babel/runtime/helpers/esm/defineProperty.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! - \*******************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _defineProperty; });\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/defineProperty.js?')},"./node_modules/@babel/runtime/helpers/esm/objectSpread2.js": -/*!******************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! - \******************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread2; });\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");\n/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");\n/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./defineProperty.js */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");\n\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n Object(_defineProperty_js__WEBPACK_IMPORTED_MODULE_7__["default"])(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectSpread2.js?')},"./node_modules/core-js/modules/es.array.filter.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/modules/es.array.filter.js ***! - \*********************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){"use strict";eval('\nvar $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");\nvar $filter = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").filter;\nvar arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport(\'filter\');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: \'Array\', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/es.array.filter.js?')},"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***! - \*******************************************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");\nvar fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");\nvar nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n$({ target: \'Object\', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/es.object.get-own-property-descriptor.js?')},"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js": -/*!********************************************************************************!*\ - !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***! - \********************************************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");\nvar ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");\nvar createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n$({ target: \'Object\', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/es.object.get-own-property-descriptors.js?')},"./node_modules/is-valid-hostname/index.js": -/*!*************************************************!*\ - !*** ./node_modules/is-valid-hostname/index.js ***! - \*************************************************/ -/*! no static exports found */function(module,exports){eval("module.exports = function isValidHostname(value) {\n if (typeof value !== 'string') return false\n\n const validHostnameChars = /^[a-zA-Z0-9-.]{1,253}\\.?$/g\n if (!validHostnameChars.test(value)) {\n return false\n }\n\n if (value.endsWith('.')) {\n value = value.slice(0, value.length - 1)\n }\n\n if (value.length > 253) {\n return false\n }\n\n const labels = value.split('.')\n\n const isValid = labels.every(function (label) {\n const validLabelChars = /^([a-zA-Z0-9-]+)$/g\n\n const validLabel = (\n validLabelChars.test(label) &&\n label.length < 64 &&\n !label.startsWith('-') &&\n !label.endsWith('-')\n )\n\n return validLabel\n })\n\n return isValid\n}\n\n\n//# sourceURL=webpack:///./node_modules/is-valid-hostname/index.js?")},"./node_modules/uuid-validate/index.js": -/*!*********************************************!*\ - !*** ./node_modules/uuid-validate/index.js ***! - \*********************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(Buffer) {// Regular expression used for basic parsing of the uuid.\nvar pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\n/**\n * Unparses a UUID buffer to a string. From node-uuid:\n * https://github.com/defunctzombie/node-uuid/blob/master/uuid.js\n *\n * Copyright (c) 2010-2012 Robert Kieffer\n * MIT License - http://opensource.org/licenses/mit-license.php\n *\n * @param {Buffer} buf\n * @param {Number=0} offset\n * @return {String}\n */\nvar _byteToHex = [];\nfor (var i = 0; i < 256; i++) {\n _byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction unparse(buf, offset) {\n var i = offset || 0, bth = _byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\n/**\n * Determines whether the uuid is valid, converting\n * it from a buffer if necessary.\n *\n * @param {String|Buffer} uuid\n * @param {Number=} version\n * @return {Boolean}\n */\nmodule.exports = function (uuid, version) {\n var parsedUuid;\n // If the uuid is a biffer, parse it...\n if (Buffer.isBuffer(uuid)) {\n parsedUuid = unparse(uuid);\n }\n // If it's a string, it's already good.\n else if (Object.prototype.toString.call(uuid) === '[object String]') {\n parsedUuid = uuid;\n }\n // Otherwise, it's not valid.\n else {\n return false;\n }\n\n parsedUuid = parsedUuid.toLowerCase();\n\n // All UUIDs fit a basic schema. Match that.\n if (!pattern.test(parsedUuid)) {\n return false;\n }\n\n // Now extract the version...\n if (version === undefined) {\n version = extractVersion(parsedUuid);\n } else if (extractVersion(parsedUuid) !== version) {\n return false;\n }\n\n switch (version) {\n // For certain versions, the checks we did up to this point are fine.\n case 1:\n case 2:\n return true;\n\n // For versions 3 and 4, they must specify a variant.\n case 3:\n case 4:\n case 5:\n return ['8', '9', 'a', 'b'].indexOf(parsedUuid.charAt(19)) !== -1;\n\n default:\n // We should only be able to reach this if the consumer explicitly\n // provided an invalid version. Prior to extractVersion we check\n // that it's 1-4 in the regex.\n throw new Error('Invalid version provided.');\n }\n};\n\n/**\n * Extracts the version from the UUID, which is (by definition) the M in\n * xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx\n *\n * @param {String} uuid\n * @return {Number}\n */\nvar extractVersion = module.exports.version = function (uuid) {\n return uuid.charAt(14)|0;\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./node_modules/uuid-validate/index.js?")},"./node_modules/vee-validate/dist/rules.js": -/*!*************************************************!*\ - !*** ./node_modules/vee-validate/dist/rules.js ***! - \*************************************************/ -/*! exports provided: alpha, alpha_dash, alpha_num, alpha_spaces, between, confirmed, digits, dimensions, double, email, excluded, ext, image, integer, is, is_not, length, max, max_value, mimes, min, min_value, numeric, oneOf, regex, required, required_if, size */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alpha\", function() { return alpha; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alpha_dash\", function() { return alpha_dash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alpha_num\", function() { return alpha_num; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alpha_spaces\", function() { return alpha_spaces; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"between\", function() { return between; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"confirmed\", function() { return confirmed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"digits\", function() { return digits; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dimensions\", function() { return dimensions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"double\", function() { return double; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"email\", function() { return email; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"excluded\", function() { return excluded; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ext\", function() { return ext; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"image\", function() { return image; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"integer\", function() { return integer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"is\", function() { return is; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"is_not\", function() { return is_not; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return length; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max_value\", function() { return max_value; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mimes\", function() { return mimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min_value\", function() { return min_value; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"numeric\", function() { return numeric; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"oneOf\", function() { return oneOf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"regex\", function() { return regex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"required\", function() { return required; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"required_if\", function() { return required_if; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"size\", function() { return size; });\n/**\n * vee-validate v3.4.14\n * (c) 2021 Abdelrahman Awad\n * @license MIT\n */\n/**\r\n * Some Alpha Regex helpers.\r\n * https://github.com/chriso/validator.js/blob/master/src/lib/alpha.js\r\n */\r\n/* eslint-disable no-misleading-character-class */\r\nvar alpha$1 = {\r\n en: /^[A-Z]*$/i,\r\n cs: /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,\r\n da: /^[A-ZÆØÅ]*$/i,\r\n de: /^[A-ZÄÖÜß]*$/i,\r\n es: /^[A-ZÁÉÍÑÓÚÜ]*$/i,\r\n fa: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,\r\n fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,\r\n it: /^[A-Z\\xC0-\\xFF]*$/i,\r\n lt: /^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,\r\n nl: /^[A-ZÉËÏÓÖÜ]*$/i,\r\n hu: /^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,\r\n pl: /^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,\r\n pt: /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,\r\n ro: /^[A-ZĂÂÎŞŢ]*$/i,\r\n ru: /^[А-ЯЁ]*$/i,\r\n sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,\r\n sr: /^[A-ZČĆŽŠĐ]*$/i,\r\n sv: /^[A-ZÅÄÖ]*$/i,\r\n tr: /^[A-ZÇĞİıÖŞÜ]*$/i,\r\n uk: /^[А-ЩЬЮЯЄІЇҐ]*$/i,\r\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,\r\n az: /^[A-ZÇƏĞİıÖŞÜ]*$/i,\r\n el: /^[Α-ώ]*$/i,\r\n ja: /^[A-Z\\u3000-\\u303F\\u3040-\\u309F\\u30A0-\\u30FF\\uFF00-\\uFFEF\\u4E00-\\u9FAF]*$/i,\r\n he: /^[A-Z\\u05D0-\\u05EA']*$/i\r\n};\r\nvar alphaSpaces = {\r\n en: /^[A-Z\\s]*$/i,\r\n cs: /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\\s]*$/i,\r\n da: /^[A-ZÆØÅ\\s]*$/i,\r\n de: /^[A-ZÄÖÜß\\s]*$/i,\r\n es: /^[A-ZÁÉÍÑÓÚÜ\\s]*$/i,\r\n fa: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,\r\n fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\\s]*$/i,\r\n it: /^[A-Z\\xC0-\\xFF\\s]*$/i,\r\n lt: /^[A-ZĄČĘĖĮŠŲŪŽ\\s]*$/i,\r\n nl: /^[A-ZÉËÏÓÖÜ\\s]*$/i,\r\n hu: /^[A-ZÁÉÍÓÖŐÚÜŰ\\s]*$/i,\r\n pl: /^[A-ZĄĆĘŚŁŃÓŻŹ\\s]*$/i,\r\n pt: /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\\s]*$/i,\r\n ro: /^[A-ZĂÂÎŞŢ\\s]*$/i,\r\n ru: /^[А-ЯЁ\\s]*$/i,\r\n sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\\s]*$/i,\r\n sr: /^[A-ZČĆŽŠĐ\\s]*$/i,\r\n sv: /^[A-ZÅÄÖ\\s]*$/i,\r\n tr: /^[A-ZÇĞİıÖŞÜ\\s]*$/i,\r\n uk: /^[А-ЩЬЮЯЄІЇҐ\\s]*$/i,\r\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\\s]*$/,\r\n az: /^[A-ZÇƏĞİıÖŞÜ\\s]*$/i,\r\n el: /^[Α-ώ\\s]*$/i,\r\n ja: /^[A-Z\\u3000-\\u303F\\u3040-\\u309F\\u30A0-\\u30FF\\uFF00-\\uFFEF\\u4E00-\\u9FAF\\s]*$/i,\r\n he: /^[A-Z\\u05D0-\\u05EA'\\s]*$/i\r\n};\r\nvar alphanumeric = {\r\n en: /^[0-9A-Z]*$/i,\r\n cs: /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,\r\n da: /^[0-9A-ZÆØÅ]$/i,\r\n de: /^[0-9A-ZÄÖÜß]*$/i,\r\n es: /^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,\r\n fa: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,\r\n fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,\r\n it: /^[0-9A-Z\\xC0-\\xFF]*$/i,\r\n lt: /^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,\r\n hu: /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,\r\n nl: /^[0-9A-ZÉËÏÓÖÜ]*$/i,\r\n pl: /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,\r\n pt: /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,\r\n ro: /^[0-9A-ZĂÂÎŞŢ]*$/i,\r\n ru: /^[0-9А-ЯЁ]*$/i,\r\n sk: /^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,\r\n sr: /^[0-9A-ZČĆŽŠĐ]*$/i,\r\n sv: /^[0-9A-ZÅÄÖ]*$/i,\r\n tr: /^[0-9A-ZÇĞİıÖŞÜ]*$/i,\r\n uk: /^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,\r\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,\r\n az: /^[0-9A-ZÇƏĞİıÖŞÜ]*$/i,\r\n el: /^[0-9Α-ώ]*$/i,\r\n ja: /^[0-9A-Z\\u3000-\\u303F\\u3040-\\u309F\\u30A0-\\u30FF\\uFF00-\\uFFEF\\u4E00-\\u9FAF]*$/i,\r\n he: /^[0-9A-Z\\u05D0-\\u05EA']*$/i\r\n};\r\nvar alphaDash = {\r\n en: /^[0-9A-Z_-]*$/i,\r\n cs: /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,\r\n da: /^[0-9A-ZÆØÅ_-]*$/i,\r\n de: /^[0-9A-ZÄÖÜß_-]*$/i,\r\n es: /^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,\r\n fa: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,\r\n fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,\r\n it: /^[0-9A-Z\\xC0-\\xFF_-]*$/i,\r\n lt: /^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,\r\n nl: /^[0-9A-ZÉËÏÓÖÜ_-]*$/i,\r\n hu: /^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,\r\n pl: /^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,\r\n pt: /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,\r\n ro: /^[0-9A-ZĂÂÎŞŢ_-]*$/i,\r\n ru: /^[0-9А-ЯЁ_-]*$/i,\r\n sk: /^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,\r\n sr: /^[0-9A-ZČĆŽŠĐ_-]*$/i,\r\n sv: /^[0-9A-ZÅÄÖ_-]*$/i,\r\n tr: /^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,\r\n uk: /^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,\r\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,\r\n az: /^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i,\r\n el: /^[0-9Α-ώ_-]*$/i,\r\n ja: /^[0-9A-Z\\u3000-\\u303F\\u3040-\\u309F\\u30A0-\\u30FF\\uFF00-\\uFFEF\\u4E00-\\u9FAF_-]*$/i,\r\n he: /^[0-9A-Z\\u05D0-\\u05EA'_-]*$/i\r\n};\n\nvar validate$r = function (value, _a) {\r\n var _b = (_a === void 0 ? {} : _a).locale, locale = _b === void 0 ? '' : _b;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$r(val, { locale: locale }); });\r\n }\r\n // Match at least one locale.\r\n if (!locale) {\r\n return Object.keys(alpha$1).some(function (loc) { return alpha$1[loc].test(value); });\r\n }\r\n return (alpha$1[locale] || alpha$1.en).test(value);\r\n};\r\nvar params$k = [\r\n {\r\n name: 'locale'\r\n }\r\n];\r\nvar alpha = {\r\n validate: validate$r,\r\n params: params$k\r\n};\n\nvar validate$q = function (value, _a) {\r\n var _b = (_a === void 0 ? {} : _a).locale, locale = _b === void 0 ? '' : _b;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$q(val, { locale: locale }); });\r\n }\r\n // Match at least one locale.\r\n if (!locale) {\r\n return Object.keys(alphaDash).some(function (loc) { return alphaDash[loc].test(value); });\r\n }\r\n return (alphaDash[locale] || alphaDash.en).test(value);\r\n};\r\nvar params$j = [\r\n {\r\n name: 'locale'\r\n }\r\n];\r\nvar alpha_dash = {\r\n validate: validate$q,\r\n params: params$j\r\n};\n\nvar validate$p = function (value, _a) {\r\n var _b = (_a === void 0 ? {} : _a).locale, locale = _b === void 0 ? '' : _b;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$p(val, { locale: locale }); });\r\n }\r\n // Match at least one locale.\r\n if (!locale) {\r\n return Object.keys(alphanumeric).some(function (loc) { return alphanumeric[loc].test(value); });\r\n }\r\n return (alphanumeric[locale] || alphanumeric.en).test(value);\r\n};\r\nvar params$i = [\r\n {\r\n name: 'locale'\r\n }\r\n];\r\nvar alpha_num = {\r\n validate: validate$p,\r\n params: params$i\r\n};\n\nvar validate$o = function (value, _a) {\r\n var _b = (_a === void 0 ? {} : _a).locale, locale = _b === void 0 ? '' : _b;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$o(val, { locale: locale }); });\r\n }\r\n // Match at least one locale.\r\n if (!locale) {\r\n return Object.keys(alphaSpaces).some(function (loc) { return alphaSpaces[loc].test(value); });\r\n }\r\n return (alphaSpaces[locale] || alphaSpaces.en).test(value);\r\n};\r\nvar params$h = [\r\n {\r\n name: 'locale'\r\n }\r\n];\r\nvar alpha_spaces = {\r\n validate: validate$o,\r\n params: params$h\r\n};\n\nvar validate$n = function (value, _a) {\r\n var _b = _a === void 0 ? {} : _a, min = _b.min, max = _b.max;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return !!validate$n(val, { min: min, max: max }); });\r\n }\r\n return Number(min) <= value && Number(max) >= value;\r\n};\r\nvar params$g = [\r\n {\r\n name: 'min'\r\n },\r\n {\r\n name: 'max'\r\n }\r\n];\r\nvar between = {\r\n validate: validate$n,\r\n params: params$g\r\n};\n\nvar validate$m = function (value, _a) {\r\n var target = _a.target;\r\n return String(value) === String(target);\r\n};\r\nvar params$f = [\r\n {\r\n name: 'target',\r\n isTarget: true\r\n }\r\n];\r\nvar confirmed = {\r\n validate: validate$m,\r\n params: params$f\r\n};\n\nvar validate$l = function (value, _a) {\r\n var length = _a.length;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$l(val, { length: length }); });\r\n }\r\n var strVal = String(value);\r\n return /^[0-9]*$/.test(strVal) && strVal.length === length;\r\n};\r\nvar params$e = [\r\n {\r\n name: 'length',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar digits = {\r\n validate: validate$l,\r\n params: params$e\r\n};\n\nvar validateImage = function (file, width, height) {\r\n var URL = window.URL || window.webkitURL;\r\n return new Promise(function (resolve) {\r\n var image = new Image();\r\n image.onerror = function () { return resolve(false); };\r\n image.onload = function () { return resolve(image.width === width && image.height === height); };\r\n image.src = URL.createObjectURL(file);\r\n });\r\n};\r\nvar validate$k = function (files, _a) {\r\n var width = _a.width, height = _a.height;\r\n var list = [];\r\n files = Array.isArray(files) ? files : [files];\r\n for (var i = 0; i < files.length; i++) {\r\n // if file is not an image, reject.\r\n if (!/\\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(files[i].name)) {\r\n return Promise.resolve(false);\r\n }\r\n list.push(files[i]);\r\n }\r\n return Promise.all(list.map(function (file) { return validateImage(file, width, height); })).then(function (values) {\r\n return values.every(function (v) { return v; });\r\n });\r\n};\r\nvar params$d = [\r\n {\r\n name: 'width',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n },\r\n {\r\n name: 'height',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar dimensions = {\r\n validate: validate$k,\r\n params: params$d\r\n};\n\nvar validate$j = function (value, _a) {\r\n var multiple = (_a === void 0 ? {} : _a).multiple;\r\n // eslint-disable-next-line\r\n var re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (multiple && !Array.isArray(value)) {\r\n value = String(value)\r\n .split(',')\r\n .map(function (emailStr) { return emailStr.trim(); });\r\n }\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return re.test(String(val)); });\r\n }\r\n return re.test(String(value));\r\n};\r\nvar params$c = [\r\n {\r\n name: 'multiple',\r\n default: false\r\n }\r\n];\r\nvar email = {\r\n validate: validate$j,\r\n params: params$c\r\n};\n\nfunction isNullOrUndefined(value) {\r\n return value === null || value === undefined;\r\n}\r\nfunction isEmptyArray(arr) {\r\n return Array.isArray(arr) && arr.length === 0;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction isCallable(fn) {\r\n return typeof fn === 'function';\r\n}\n\nfunction includes(collection, item) {\r\n return collection.indexOf(item) !== -1;\r\n}\r\n/**\r\n * Converts an array-like object to array, provides a simple polyfill for Array.from\r\n */\r\nfunction toArray(arrayLike) {\r\n if (isCallable(Array.from)) {\r\n return Array.from(arrayLike);\r\n }\r\n /* istanbul ignore next */\r\n return _copyArray(arrayLike);\r\n}\r\n/* istanbul ignore next */\r\nfunction _copyArray(arrayLike) {\r\n var array = [];\r\n var length = arrayLike.length;\r\n for (var i = 0; i < length; i++) {\r\n array.push(arrayLike[i]);\r\n }\r\n return array;\r\n}\n\nvar validate$i = function (value, options) {\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$i(val, options); });\r\n }\r\n return toArray(options).some(function (item) {\r\n // eslint-disable-next-line\r\n return item == value;\r\n });\r\n};\r\nvar oneOf = {\r\n validate: validate$i\r\n};\n\nvar validate$h = function (value, args) {\r\n return !validate$i(value, args);\r\n};\r\nvar excluded = {\r\n validate: validate$h\r\n};\n\nvar validate$g = function (files, extensions) {\r\n var regex = new RegExp(\".(\" + extensions.join('|') + \")$\", 'i');\r\n if (Array.isArray(files)) {\r\n return files.every(function (file) { return regex.test(file.name); });\r\n }\r\n return regex.test(files.name);\r\n};\r\nvar ext = {\r\n validate: validate$g\r\n};\n\nvar validate$f = function (files) {\r\n var regex = /\\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;\r\n if (Array.isArray(files)) {\r\n return files.every(function (file) { return regex.test(file.name); });\r\n }\r\n return regex.test(files.name);\r\n};\r\nvar image = {\r\n validate: validate$f\r\n};\n\nvar validate$e = function (value) {\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return /^-?[0-9]+$/.test(String(val)); });\r\n }\r\n return /^-?[0-9]+$/.test(String(value));\r\n};\r\nvar integer = {\r\n validate: validate$e\r\n};\n\nvar validate$d = function (value, _a) {\r\n var other = _a.other;\r\n return value === other;\r\n};\r\nvar params$b = [\r\n {\r\n name: 'other'\r\n }\r\n];\r\nvar is = {\r\n validate: validate$d,\r\n params: params$b\r\n};\n\nvar validate$c = function (value, _a) {\r\n var other = _a.other;\r\n return value !== other;\r\n};\r\nvar params$a = [\r\n {\r\n name: 'other'\r\n }\r\n];\r\nvar is_not = {\r\n validate: validate$c,\r\n params: params$a\r\n};\n\nvar validate$b = function (value, _a) {\r\n var length = _a.length;\r\n if (isNullOrUndefined(value)) {\r\n return false;\r\n }\r\n if (typeof value === 'string') {\r\n value = toArray(value);\r\n }\r\n if (typeof value === 'number') {\r\n value = String(value);\r\n }\r\n if (!value.length) {\r\n value = toArray(value);\r\n }\r\n return value.length === length;\r\n};\r\nvar params$9 = [\r\n {\r\n name: 'length',\r\n cast: function (value) { return Number(value); }\r\n }\r\n];\r\nvar length = {\r\n validate: validate$b,\r\n params: params$9\r\n};\n\nvar validate$a = function (value, _a) {\r\n var length = _a.length;\r\n if (isNullOrUndefined(value)) {\r\n return length >= 0;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$a(val, { length: length }); });\r\n }\r\n return String(value).length <= length;\r\n};\r\nvar params$8 = [\r\n {\r\n name: 'length',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar max = {\r\n validate: validate$a,\r\n params: params$8\r\n};\n\nvar validate$9 = function (value, _a) {\r\n var max = _a.max;\r\n if (isNullOrUndefined(value) || value === '') {\r\n return false;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.length > 0 && value.every(function (val) { return validate$9(val, { max: max }); });\r\n }\r\n return Number(value) <= max;\r\n};\r\nvar params$7 = [\r\n {\r\n name: 'max',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar max_value = {\r\n validate: validate$9,\r\n params: params$7\r\n};\n\nvar validate$8 = function (files, mimes) {\r\n var regex = new RegExp(mimes.join('|').replace('*', '.+') + \"$\", 'i');\r\n if (Array.isArray(files)) {\r\n return files.every(function (file) { return regex.test(file.type); });\r\n }\r\n return regex.test(files.type);\r\n};\r\nvar mimes = {\r\n validate: validate$8\r\n};\n\nvar validate$7 = function (value, _a) {\r\n var length = _a.length;\r\n if (isNullOrUndefined(value)) {\r\n return false;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$7(val, { length: length }); });\r\n }\r\n return String(value).length >= length;\r\n};\r\nvar params$6 = [\r\n {\r\n name: 'length',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar min = {\r\n validate: validate$7,\r\n params: params$6\r\n};\n\nvar validate$6 = function (value, _a) {\r\n var min = _a.min;\r\n if (isNullOrUndefined(value) || value === '') {\r\n return false;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.length > 0 && value.every(function (val) { return validate$6(val, { min: min }); });\r\n }\r\n return Number(value) >= min;\r\n};\r\nvar params$5 = [\r\n {\r\n name: 'min',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar min_value = {\r\n validate: validate$6,\r\n params: params$5\r\n};\n\nvar ar = /^[٠١٢٣٤٥٦٧٨٩]+$/;\r\nvar en = /^[0-9]+$/;\r\nvar validate$5 = function (value) {\r\n var testValue = function (val) {\r\n var strValue = String(val);\r\n return en.test(strValue) || ar.test(strValue);\r\n };\r\n if (Array.isArray(value)) {\r\n return value.every(testValue);\r\n }\r\n return testValue(value);\r\n};\r\nvar numeric = {\r\n validate: validate$5\r\n};\n\nvar validate$4 = function (value, _a) {\r\n var regex = _a.regex;\r\n if (Array.isArray(value)) {\r\n return value.every(function (val) { return validate$4(val, { regex: regex }); });\r\n }\r\n return regex.test(String(value));\r\n};\r\nvar params$4 = [\r\n {\r\n name: 'regex',\r\n cast: function (value) {\r\n if (typeof value === 'string') {\r\n return new RegExp(value);\r\n }\r\n return value;\r\n }\r\n }\r\n];\r\nvar regex = {\r\n validate: validate$4,\r\n params: params$4\r\n};\n\nvar validate$3 = function (value, _a) {\r\n var allowFalse = (_a === void 0 ? { allowFalse: true } : _a).allowFalse;\r\n var result = {\r\n valid: false,\r\n required: true\r\n };\r\n if (isNullOrUndefined(value) || isEmptyArray(value)) {\r\n return result;\r\n }\r\n // incase a field considers `false` as an empty value like checkboxes.\r\n if (value === false && !allowFalse) {\r\n return result;\r\n }\r\n result.valid = !!String(value).trim().length;\r\n return result;\r\n};\r\nvar computesRequired$1 = true;\r\nvar params$3 = [\r\n {\r\n name: 'allowFalse',\r\n default: true\r\n }\r\n];\r\nvar required = {\r\n validate: validate$3,\r\n params: params$3,\r\n computesRequired: computesRequired$1\r\n};\n\nvar testEmpty = function (value) {\r\n return isEmptyArray(value) || includes([false, null, undefined], value) || !String(value).trim().length;\r\n};\r\nvar validate$2 = function (value, _a) {\r\n var target = _a.target, values = _a.values;\r\n var required;\r\n if (values && values.length) {\r\n if (!Array.isArray(values) && typeof values === 'string') {\r\n values = [values];\r\n }\r\n // eslint-disable-next-line\r\n required = values.some(function (val) { return val == String(target).trim(); });\r\n }\r\n else {\r\n required = !testEmpty(target);\r\n }\r\n if (!required) {\r\n return {\r\n valid: true,\r\n required: required\r\n };\r\n }\r\n return {\r\n valid: !testEmpty(value),\r\n required: required\r\n };\r\n};\r\nvar params$2 = [\r\n {\r\n name: 'target',\r\n isTarget: true\r\n },\r\n {\r\n name: 'values'\r\n }\r\n];\r\nvar computesRequired = true;\r\nvar required_if = {\r\n validate: validate$2,\r\n params: params$2,\r\n computesRequired: computesRequired\r\n};\n\nvar validate$1 = function (files, _a) {\r\n var size = _a.size;\r\n if (isNaN(size)) {\r\n return false;\r\n }\r\n var nSize = size * 1024;\r\n if (!Array.isArray(files)) {\r\n return files.size <= nSize;\r\n }\r\n for (var i = 0; i < files.length; i++) {\r\n if (files[i].size > nSize) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n};\r\nvar params$1 = [\r\n {\r\n name: 'size',\r\n cast: function (value) {\r\n return Number(value);\r\n }\r\n }\r\n];\r\nvar size = {\r\n validate: validate$1,\r\n params: params$1\r\n};\n\nvar validate = function (value, params) {\r\n var _a = params || {}, _b = _a.decimals, decimals = _b === void 0 ? 0 : _b, _c = _a.separator, separator = _c === void 0 ? 'dot' : _c;\r\n var delimiterRegexPart = separator === 'comma' ? ',?' : '\\\\.?';\r\n var decimalRegexPart = decimals === 0 ? '\\\\d*' : \"(\\\\d{\" + decimals + \"})?\";\r\n var regex = new RegExp(\"^-?\\\\d+\" + delimiterRegexPart + decimalRegexPart + \"$\");\r\n return Array.isArray(value) ? value.every(function (val) { return regex.test(String(val)); }) : regex.test(String(value));\r\n};\r\nvar params = [\r\n {\r\n name: 'decimals',\r\n default: 0\r\n },\r\n {\r\n name: 'separator',\r\n default: 'dot'\r\n }\r\n];\r\nvar double = {\r\n validate: validate,\r\n params: params\r\n};\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vee-validate/dist/rules.js?")},"./node_modules/vee-validate/dist/vee-validate.esm.js": -/*!************************************************************!*\ - !*** ./node_modules/vee-validate/dist/vee-validate.esm.js ***! - \************************************************************/ -/*! exports provided: ValidationObserver, ValidationProvider, configure, extend, localeChanged, localize, normalizeRules, setInteractionMode, validate, version, withValidation */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ValidationObserver\", function() { return ValidationObserver; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ValidationProvider\", function() { return ValidationProvider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"configure\", function() { return configure; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"localeChanged\", function() { return localeChanged; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"localize\", function() { return localize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalizeRules\", function() { return normalizeRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setInteractionMode\", function() { return setInteractionMode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validate\", function() { return validate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withValidation\", function() { return withValidation; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/**\n * vee-validate v3.4.14\n * (c) 2021 Abdelrahman Awad\n * @license MIT\n */\n\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\n\nfunction isNaN(value) {\r\n // NaN is the one value that does not equal itself.\r\n // eslint-disable-next-line\r\n return value !== value;\r\n}\r\nfunction isNullOrUndefined(value) {\r\n return value === null || value === undefined;\r\n}\r\nfunction isEmptyArray(arr) {\r\n return Array.isArray(arr) && arr.length === 0;\r\n}\r\nvar isObject = function (obj) {\r\n return obj !== null && obj && typeof obj === 'object' && !Array.isArray(obj);\r\n};\r\n/**\r\n * A reference comparison function with NaN support\r\n */\r\nfunction isRefEqual(lhs, rhs) {\r\n if (isNaN(lhs) && isNaN(rhs)) {\r\n return true;\r\n }\r\n return lhs === rhs;\r\n}\r\n// Checks if a given value is not an empty string or null or undefined.\r\nfunction isSpecified(val) {\r\n if (val === '') {\r\n return false;\r\n }\r\n return !isNullOrUndefined(val);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction isCallable(fn) {\r\n return typeof fn === 'function';\r\n}\r\nfunction isLocator(value) {\r\n return isCallable(value) && !!value.__locatorRef;\r\n}\n\nfunction findIndex(arrayLike, predicate) {\r\n var array = Array.isArray(arrayLike) ? arrayLike : toArray(arrayLike);\r\n if (isCallable(array.findIndex)) {\r\n return array.findIndex(predicate);\r\n }\r\n /* istanbul ignore next */\r\n for (var i = 0; i < array.length; i++) {\r\n if (predicate(array[i], i)) {\r\n return i;\r\n }\r\n }\r\n /* istanbul ignore next */\r\n return -1;\r\n}\r\n/**\r\n * finds the first element that satisfies the predicate callback, polyfills array.find\r\n */\r\nfunction find(arrayLike, predicate) {\r\n var array = Array.isArray(arrayLike) ? arrayLike : toArray(arrayLike);\r\n var idx = findIndex(array, predicate);\r\n return idx === -1 ? undefined : array[idx];\r\n}\r\nfunction includes(collection, item) {\r\n return collection.indexOf(item) !== -1;\r\n}\r\n/**\r\n * Converts an array-like object to array, provides a simple polyfill for Array.from\r\n */\r\nfunction toArray(arrayLike) {\r\n if (isCallable(Array.from)) {\r\n return Array.from(arrayLike);\r\n }\r\n /* istanbul ignore next */\r\n return _copyArray(arrayLike);\r\n}\r\n/* istanbul ignore next */\r\nfunction _copyArray(arrayLike) {\r\n var array = [];\r\n var length = arrayLike.length;\r\n for (var i = 0; i < length; i++) {\r\n array.push(arrayLike[i]);\r\n }\r\n return array;\r\n}\r\nfunction values(obj) {\r\n if (isCallable(Object.values)) {\r\n return Object.values(obj);\r\n }\r\n // fallback to keys()\r\n /* istanbul ignore next */\r\n return Object.keys(obj).map(function (k) { return obj[k]; });\r\n}\r\nfunction merge(target, source) {\r\n Object.keys(source).forEach(function (key) {\r\n if (isObject(source[key])) {\r\n if (!target[key]) {\r\n target[key] = {};\r\n }\r\n merge(target[key], source[key]);\r\n return;\r\n }\r\n target[key] = source[key];\r\n });\r\n return target;\r\n}\n\nfunction createFlags() {\r\n return {\r\n untouched: true,\r\n touched: false,\r\n dirty: false,\r\n pristine: true,\r\n valid: false,\r\n invalid: false,\r\n validated: false,\r\n pending: false,\r\n required: false,\r\n changed: false,\r\n passed: false,\r\n failed: false\r\n };\r\n}\n\nfunction identity(x) {\r\n return x;\r\n}\r\nfunction debounce(fn, wait, token) {\r\n if (wait === void 0) { wait = 0; }\r\n if (token === void 0) { token = { cancelled: false }; }\r\n if (wait === 0) {\r\n return fn;\r\n }\r\n var timeout;\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var later = function () {\r\n timeout = undefined;\r\n // check if the fn call was cancelled.\r\n if (!token.cancelled)\r\n fn.apply(void 0, args);\r\n };\r\n // because we might want to use Node.js setTimout for SSR.\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n };\r\n}\n\n/**\r\n * Emits a warning to the console\r\n */\r\nfunction warn(message) {\r\n console.warn(\"[vee-validate] \" + message);\r\n}\r\n/**\r\n * Replaces placeholder values in a string with their actual values\r\n */\r\nfunction interpolate(template, values) {\r\n return template.replace(/{([^}]+)}/g, function (_, p) {\r\n return p in values ? values[p] : \"{\" + p + \"}\";\r\n });\r\n}\n\nvar RULES = {};\r\nfunction normalizeSchema(schema) {\r\n var _a;\r\n if ((_a = schema.params) === null || _a === void 0 ? void 0 : _a.length) {\r\n schema.params = schema.params.map(function (param) {\r\n if (typeof param === 'string') {\r\n return { name: param };\r\n }\r\n return param;\r\n });\r\n }\r\n return schema;\r\n}\r\nvar RuleContainer = /** @class */ (function () {\r\n function RuleContainer() {\r\n }\r\n RuleContainer.extend = function (name, schema) {\r\n // if rule already exists, overwrite it.\r\n var rule = normalizeSchema(schema);\r\n if (RULES[name]) {\r\n RULES[name] = merge(RULES[name], schema);\r\n return;\r\n }\r\n RULES[name] = __assign({ lazy: false, computesRequired: false }, rule);\r\n };\r\n RuleContainer.isLazy = function (name) {\r\n var _a;\r\n return !!((_a = RULES[name]) === null || _a === void 0 ? void 0 : _a.lazy);\r\n };\r\n RuleContainer.isRequireRule = function (name) {\r\n var _a;\r\n return !!((_a = RULES[name]) === null || _a === void 0 ? void 0 : _a.computesRequired);\r\n };\r\n RuleContainer.getRuleDefinition = function (ruleName) {\r\n return RULES[ruleName];\r\n };\r\n return RuleContainer;\r\n}());\r\n/**\r\n * Adds a custom validator to the list of validation rules.\r\n */\r\nfunction extend(name, schema) {\r\n // makes sure new rules are properly formatted.\r\n guardExtend(name, schema);\r\n // Full schema object.\r\n if (typeof schema === 'object') {\r\n RuleContainer.extend(name, schema);\r\n return;\r\n }\r\n RuleContainer.extend(name, {\r\n validate: schema\r\n });\r\n}\r\n/**\r\n * Guards from extension violations.\r\n */\r\nfunction guardExtend(name, validator) {\r\n if (isCallable(validator)) {\r\n return;\r\n }\r\n if (isCallable(validator.validate)) {\r\n return;\r\n }\r\n if (RuleContainer.getRuleDefinition(name)) {\r\n return;\r\n }\r\n throw new Error(\"Extension Error: The validator '\" + name + \"' must be a function or have a 'validate' method.\");\r\n}\n\nvar DEFAULT_CONFIG = {\r\n defaultMessage: \"{_field_} is not valid.\",\r\n skipOptional: true,\r\n classes: {\r\n touched: 'touched',\r\n untouched: 'untouched',\r\n valid: 'valid',\r\n invalid: 'invalid',\r\n pristine: 'pristine',\r\n dirty: 'dirty' // control has been interacted with\r\n },\r\n bails: true,\r\n mode: 'aggressive',\r\n useConstraintAttrs: true\r\n};\r\nvar currentConfig = __assign({}, DEFAULT_CONFIG);\r\nvar getConfig = function () { return currentConfig; };\r\nvar setConfig = function (newConf) {\r\n currentConfig = __assign(__assign({}, currentConfig), newConf);\r\n};\r\nvar configure = function (cfg) {\r\n setConfig(cfg);\r\n};\n\n/**\r\n * Normalizes the given rules expression.\r\n */\r\nfunction normalizeRules(rules) {\r\n // if falsy value return an empty object.\r\n var acc = {};\r\n Object.defineProperty(acc, '_$$isNormalized', {\r\n value: true,\r\n writable: false,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n if (!rules) {\r\n return acc;\r\n }\r\n // Object is already normalized, skip.\r\n if (isObject(rules) && rules._$$isNormalized) {\r\n return rules;\r\n }\r\n if (isObject(rules)) {\r\n return Object.keys(rules).reduce(function (prev, curr) {\r\n var params = [];\r\n if (rules[curr] === true) {\r\n params = [];\r\n }\r\n else if (Array.isArray(rules[curr])) {\r\n params = rules[curr];\r\n }\r\n else if (isObject(rules[curr])) {\r\n params = rules[curr];\r\n }\r\n else {\r\n params = [rules[curr]];\r\n }\r\n if (rules[curr] !== false) {\r\n prev[curr] = buildParams(curr, params);\r\n }\r\n return prev;\r\n }, acc);\r\n }\r\n /* istanbul ignore if */\r\n if (typeof rules !== 'string') {\r\n warn('rules must be either a string or an object.');\r\n return acc;\r\n }\r\n return rules.split('|').reduce(function (prev, rule) {\r\n var parsedRule = parseRule(rule);\r\n if (!parsedRule.name) {\r\n return prev;\r\n }\r\n prev[parsedRule.name] = buildParams(parsedRule.name, parsedRule.params);\r\n return prev;\r\n }, acc);\r\n}\r\nfunction buildParams(ruleName, provided) {\r\n var ruleSchema = RuleContainer.getRuleDefinition(ruleName);\r\n if (!ruleSchema) {\r\n return provided;\r\n }\r\n var params = {};\r\n if (!ruleSchema.params && !Array.isArray(provided)) {\r\n throw new Error('You provided an object params to a rule that has no defined schema.');\r\n }\r\n // Rule probably uses an array for their args, keep it as is.\r\n if (Array.isArray(provided) && !ruleSchema.params) {\r\n return provided;\r\n }\r\n var definedParams;\r\n // collect the params schema.\r\n if (!ruleSchema.params || (ruleSchema.params.length < provided.length && Array.isArray(provided))) {\r\n var lastDefinedParam_1;\r\n // collect any additional parameters in the last item.\r\n definedParams = provided.map(function (_, idx) {\r\n var _a;\r\n var param = (_a = ruleSchema.params) === null || _a === void 0 ? void 0 : _a[idx];\r\n lastDefinedParam_1 = param || lastDefinedParam_1;\r\n if (!param) {\r\n param = lastDefinedParam_1;\r\n }\r\n return param;\r\n });\r\n }\r\n else {\r\n definedParams = ruleSchema.params;\r\n }\r\n // Match the provided array length with a temporary schema.\r\n for (var i = 0; i < definedParams.length; i++) {\r\n var options = definedParams[i];\r\n var value = options.default;\r\n // if the provided is an array, map element value.\r\n if (Array.isArray(provided)) {\r\n if (i in provided) {\r\n value = provided[i];\r\n }\r\n }\r\n else {\r\n // If the param exists in the provided object.\r\n if (options.name in provided) {\r\n value = provided[options.name];\r\n // if the provided is the first param value.\r\n }\r\n else if (definedParams.length === 1) {\r\n value = provided;\r\n }\r\n }\r\n // if the param is a target, resolve the target value.\r\n if (options.isTarget) {\r\n value = createLocator(value, options.cast);\r\n }\r\n // A target param using interpolation\r\n if (typeof value === 'string' && value[0] === '@') {\r\n value = createLocator(value.slice(1), options.cast);\r\n }\r\n // If there is a transformer defined.\r\n if (!isLocator(value) && options.cast) {\r\n value = options.cast(value);\r\n }\r\n // already been set, probably multiple values.\r\n if (params[options.name]) {\r\n params[options.name] = Array.isArray(params[options.name]) ? params[options.name] : [params[options.name]];\r\n params[options.name].push(value);\r\n }\r\n else {\r\n // set the value.\r\n params[options.name] = value;\r\n }\r\n }\r\n return params;\r\n}\r\n/**\r\n * Parses a rule string expression.\r\n */\r\nvar parseRule = function (rule) {\r\n var params = [];\r\n var name = rule.split(':')[0];\r\n if (includes(rule, ':')) {\r\n params = rule\r\n .split(':')\r\n .slice(1)\r\n .join(':')\r\n .split(',');\r\n }\r\n return { name: name, params: params };\r\n};\r\nfunction createLocator(value, castFn) {\r\n var locator = function (crossTable) {\r\n var val = crossTable[value];\r\n return castFn ? castFn(val) : val;\r\n };\r\n locator.__locatorRef = value;\r\n return locator;\r\n}\r\nfunction extractLocators(params) {\r\n if (Array.isArray(params)) {\r\n return params.filter(function (param) {\r\n return isLocator(param) || (typeof param === 'string' && param[0] === '@');\r\n });\r\n }\r\n return Object.keys(params)\r\n .filter(function (key) { return isLocator(params[key]); })\r\n .map(function (key) { return params[key]; });\r\n}\n\n/**\r\n * Validates a value against the rules.\r\n */\r\nfunction validate(value, rules, options) {\r\n if (options === void 0) { options = {}; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var shouldBail, skipIfEmpty, field, result, errors, failedRules, regenerateMap;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n shouldBail = options === null || options === void 0 ? void 0 : options.bails;\r\n skipIfEmpty = options === null || options === void 0 ? void 0 : options.skipIfEmpty;\r\n field = {\r\n name: (options === null || options === void 0 ? void 0 : options.name) || '{field}',\r\n rules: normalizeRules(rules),\r\n bails: shouldBail !== null && shouldBail !== void 0 ? shouldBail : true,\r\n skipIfEmpty: skipIfEmpty !== null && skipIfEmpty !== void 0 ? skipIfEmpty : true,\r\n forceRequired: false,\r\n crossTable: (options === null || options === void 0 ? void 0 : options.values) || {},\r\n names: (options === null || options === void 0 ? void 0 : options.names) || {},\r\n customMessages: (options === null || options === void 0 ? void 0 : options.customMessages) || {}\r\n };\r\n return [4 /*yield*/, _validate(field, value, options)];\r\n case 1:\r\n result = _a.sent();\r\n errors = [];\r\n failedRules = {};\r\n regenerateMap = {};\r\n result.errors.forEach(function (e) {\r\n var msg = e.msg();\r\n errors.push(msg);\r\n failedRules[e.rule] = msg;\r\n regenerateMap[e.rule] = e.msg;\r\n });\r\n return [2 /*return*/, {\r\n valid: result.valid,\r\n required: result.required,\r\n errors: errors,\r\n failedRules: failedRules,\r\n regenerateMap: regenerateMap\r\n }];\r\n }\r\n });\r\n });\r\n}\r\n/**\r\n * Starts the validation process.\r\n */\r\nfunction _validate(field, value, _a) {\r\n var _b = (_a === void 0 ? {} : _a).isInitial, isInitial = _b === void 0 ? false : _b;\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _c, shouldSkip, required, errors, rules, length, i, rule, result;\r\n return __generator(this, function (_d) {\r\n switch (_d.label) {\r\n case 0: return [4 /*yield*/, _shouldSkip(field, value)];\r\n case 1:\r\n _c = _d.sent(), shouldSkip = _c.shouldSkip, required = _c.required, errors = _c.errors;\r\n if (shouldSkip) {\r\n return [2 /*return*/, {\r\n valid: !errors.length,\r\n required: required,\r\n errors: errors\r\n }];\r\n }\r\n rules = Object.keys(field.rules).filter(function (rule) { return !RuleContainer.isRequireRule(rule); });\r\n length = rules.length;\r\n i = 0;\r\n _d.label = 2;\r\n case 2:\r\n if (!(i < length)) return [3 /*break*/, 5];\r\n if (isInitial && RuleContainer.isLazy(rules[i])) {\r\n return [3 /*break*/, 4];\r\n }\r\n rule = rules[i];\r\n return [4 /*yield*/, _test(field, value, {\r\n name: rule,\r\n params: field.rules[rule]\r\n })];\r\n case 3:\r\n result = _d.sent();\r\n if (!result.valid && result.error) {\r\n errors.push(result.error);\r\n if (field.bails) {\r\n return [2 /*return*/, {\r\n valid: false,\r\n required: required,\r\n errors: errors\r\n }];\r\n }\r\n }\r\n _d.label = 4;\r\n case 4:\r\n i++;\r\n return [3 /*break*/, 2];\r\n case 5: return [2 /*return*/, {\r\n valid: !errors.length,\r\n required: required,\r\n errors: errors\r\n }];\r\n }\r\n });\r\n });\r\n}\r\nfunction _shouldSkip(field, value) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var requireRules, length, errors, isEmpty, isEmptyAndOptional, isRequired, i, rule, result;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n requireRules = Object.keys(field.rules).filter(RuleContainer.isRequireRule);\r\n length = requireRules.length;\r\n errors = [];\r\n isEmpty = isNullOrUndefined(value) || value === '' || isEmptyArray(value);\r\n isEmptyAndOptional = isEmpty && field.skipIfEmpty;\r\n i = 0;\r\n _a.label = 1;\r\n case 1:\r\n if (!(i < length)) return [3 /*break*/, 4];\r\n rule = requireRules[i];\r\n return [4 /*yield*/, _test(field, value, {\r\n name: rule,\r\n params: field.rules[rule]\r\n })];\r\n case 2:\r\n result = _a.sent();\r\n if (!isObject(result)) {\r\n throw new Error('Require rules has to return an object (see docs)');\r\n }\r\n if (result.required !== undefined) {\r\n isRequired = result.required;\r\n }\r\n if (!result.valid && result.error) {\r\n errors.push(result.error);\r\n // Exit early as the field is required and failed validation.\r\n if (field.bails) {\r\n return [2 /*return*/, {\r\n shouldSkip: true,\r\n required: result.required,\r\n errors: errors\r\n }];\r\n }\r\n }\r\n _a.label = 3;\r\n case 3:\r\n i++;\r\n return [3 /*break*/, 1];\r\n case 4:\r\n if (isEmpty && !isRequired && !field.skipIfEmpty) {\r\n return [2 /*return*/, {\r\n shouldSkip: false,\r\n required: isRequired,\r\n errors: errors\r\n }];\r\n }\r\n // field is configured to run through the pipeline regardless\r\n if (!field.bails && !isEmptyAndOptional) {\r\n return [2 /*return*/, {\r\n shouldSkip: false,\r\n required: isRequired,\r\n errors: errors\r\n }];\r\n }\r\n // skip if the field is not required and has an empty value.\r\n return [2 /*return*/, {\r\n shouldSkip: !isRequired && isEmpty,\r\n required: isRequired,\r\n errors: errors\r\n }];\r\n }\r\n });\r\n });\r\n}\r\n/**\r\n * Tests a single input value against a rule.\r\n */\r\nfunction _test(field, value, rule) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var ruleSchema, normalizedValue, params, result, values_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n ruleSchema = RuleContainer.getRuleDefinition(rule.name);\r\n if (!ruleSchema || !ruleSchema.validate) {\r\n throw new Error(\"No such validator '\" + rule.name + \"' exists.\");\r\n }\r\n normalizedValue = ruleSchema.castValue ? ruleSchema.castValue(value) : value;\r\n params = fillTargetValues(rule.params, field.crossTable);\r\n return [4 /*yield*/, ruleSchema.validate(normalizedValue, params)];\r\n case 1:\r\n result = _a.sent();\r\n if (typeof result === 'string') {\r\n values_1 = __assign(__assign({}, (params || {})), { _field_: field.name, _value_: value, _rule_: rule.name });\r\n return [2 /*return*/, {\r\n valid: false,\r\n error: { rule: rule.name, msg: function () { return interpolate(result, values_1); } }\r\n }];\r\n }\r\n if (!isObject(result)) {\r\n result = { valid: result };\r\n }\r\n return [2 /*return*/, {\r\n valid: result.valid,\r\n required: result.required,\r\n error: result.valid ? undefined : _generateFieldError(field, value, ruleSchema, rule.name, params)\r\n }];\r\n }\r\n });\r\n });\r\n}\r\n/**\r\n * Generates error messages.\r\n */\r\nfunction _generateFieldError(field, value, ruleSchema, ruleName, params) {\r\n var _a;\r\n var message = (_a = field.customMessages[ruleName]) !== null && _a !== void 0 ? _a : ruleSchema.message;\r\n var ruleTargets = _getRuleTargets(field, ruleSchema, ruleName);\r\n var _b = _getUserTargets(field, ruleSchema, ruleName, message), userTargets = _b.userTargets, userMessage = _b.userMessage;\r\n var values = __assign(__assign(__assign(__assign({}, (params || {})), { _field_: field.name, _value_: value, _rule_: ruleName }), ruleTargets), userTargets);\r\n return {\r\n msg: function () { return _normalizeMessage(userMessage || getConfig().defaultMessage, field.name, values); },\r\n rule: ruleName\r\n };\r\n}\r\nfunction _getRuleTargets(field, ruleSchema, ruleName) {\r\n var params = ruleSchema.params;\r\n if (!params) {\r\n return {};\r\n }\r\n var numTargets = params.filter(function (param) { return param.isTarget; }).length;\r\n if (numTargets <= 0) {\r\n return {};\r\n }\r\n var names = {};\r\n var ruleConfig = field.rules[ruleName];\r\n if (!Array.isArray(ruleConfig) && isObject(ruleConfig)) {\r\n ruleConfig = params.map(function (param) {\r\n return ruleConfig[param.name];\r\n });\r\n }\r\n for (var index = 0; index < params.length; index++) {\r\n var param = params[index];\r\n var key = ruleConfig[index];\r\n if (!isLocator(key)) {\r\n continue;\r\n }\r\n key = key.__locatorRef;\r\n var name_1 = field.names[key] || key;\r\n names[param.name] = name_1;\r\n names[\"_\" + param.name + \"_\"] = field.crossTable[key];\r\n }\r\n return names;\r\n}\r\nfunction _getUserTargets(field, ruleSchema, ruleName, userMessage) {\r\n var userTargets = {};\r\n var rules = field.rules[ruleName];\r\n var params = ruleSchema.params || [];\r\n // early return if no rules\r\n if (!rules) {\r\n return {};\r\n }\r\n // check all rules to convert targets\r\n Object.keys(rules).forEach(function (key, index) {\r\n // get the rule\r\n var rule = rules[key];\r\n if (!isLocator(rule)) {\r\n return {};\r\n }\r\n // get associated parameter\r\n var param = params[index];\r\n if (!param) {\r\n return {};\r\n }\r\n // grab the name of the target\r\n var name = rule.__locatorRef;\r\n userTargets[param.name] = field.names[name] || name;\r\n userTargets[\"_\" + param.name + \"_\"] = field.crossTable[name];\r\n });\r\n return {\r\n userTargets: userTargets,\r\n userMessage: userMessage\r\n };\r\n}\r\nfunction _normalizeMessage(template, field, values) {\r\n if (typeof template === 'function') {\r\n return template(field, values);\r\n }\r\n return interpolate(template, __assign(__assign({}, values), { _field_: field }));\r\n}\r\nfunction fillTargetValues(params, crossTable) {\r\n if (Array.isArray(params)) {\r\n return params.map(function (param) {\r\n var targetPart = typeof param === 'string' && param[0] === '@' ? param.slice(1) : param;\r\n if (targetPart in crossTable) {\r\n return crossTable[targetPart];\r\n }\r\n return param;\r\n });\r\n }\r\n var values = {};\r\n var normalize = function (value) {\r\n if (isLocator(value)) {\r\n return value(crossTable);\r\n }\r\n return value;\r\n };\r\n Object.keys(params).forEach(function (param) {\r\n values[param] = normalize(params[param]);\r\n });\r\n return values;\r\n}\n\nvar aggressive = function () { return ({\r\n on: ['input', 'blur']\r\n}); };\r\nvar lazy = function () { return ({\r\n on: ['change', 'blur']\r\n}); };\r\nvar eager = function (_a) {\r\n var errors = _a.errors;\r\n if (errors.length) {\r\n return {\r\n on: ['input', 'change']\r\n };\r\n }\r\n return {\r\n on: ['change', 'blur']\r\n };\r\n};\r\nvar passive = function () { return ({\r\n on: []\r\n}); };\r\nvar modes = {\r\n aggressive: aggressive,\r\n eager: eager,\r\n passive: passive,\r\n lazy: lazy\r\n};\r\nvar setInteractionMode = function (mode, implementation) {\r\n setConfig({ mode: mode });\r\n if (!implementation) {\r\n return;\r\n }\r\n if (!isCallable(implementation)) {\r\n throw new Error('A mode implementation must be a function');\r\n }\r\n modes[mode] = implementation;\r\n};\n\nvar EVENT_BUS = new vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\r\nfunction localeChanged() {\r\n EVENT_BUS.$emit('change:locale');\r\n}\n\nvar Dictionary = /** @class */ (function () {\r\n function Dictionary(locale, dictionary) {\r\n this.container = {};\r\n this.locale = locale;\r\n this.merge(dictionary);\r\n }\r\n Dictionary.prototype.resolve = function (field, rule, values) {\r\n return this.format(this.locale, field, rule, values);\r\n };\r\n Dictionary.prototype.format = function (locale, field, rule, values) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n var message;\r\n // find if specific message for that field was specified.\r\n var fieldContainer = (_c = (_b = (_a = this.container[locale]) === null || _a === void 0 ? void 0 : _a.fields) === null || _b === void 0 ? void 0 : _b[field]) === null || _c === void 0 ? void 0 : _c[rule];\r\n var messageContainer = (_e = (_d = this.container[locale]) === null || _d === void 0 ? void 0 : _d.messages) === null || _e === void 0 ? void 0 : _e[rule];\r\n message = fieldContainer || messageContainer || '';\r\n if (!message) {\r\n message = '{_field_} is not valid';\r\n }\r\n field = (_h = (_g = (_f = this.container[locale]) === null || _f === void 0 ? void 0 : _f.names) === null || _g === void 0 ? void 0 : _g[field]) !== null && _h !== void 0 ? _h : field;\r\n return isCallable(message) ? message(field, values) : interpolate(message, __assign(__assign({}, values), { _field_: field }));\r\n };\r\n Dictionary.prototype.merge = function (dictionary) {\r\n merge(this.container, dictionary);\r\n };\r\n Dictionary.prototype.hasRule = function (name) {\r\n var _a, _b;\r\n return !!((_b = (_a = this.container[this.locale]) === null || _a === void 0 ? void 0 : _a.messages) === null || _b === void 0 ? void 0 : _b[name]);\r\n };\r\n return Dictionary;\r\n}());\r\nvar DICTIONARY;\r\nfunction localize(locale, dictionary) {\r\n var _a;\r\n if (!DICTIONARY) {\r\n DICTIONARY = new Dictionary('en', {});\r\n setConfig({\r\n defaultMessage: function (field, values) {\r\n return DICTIONARY.resolve(field, values === null || values === void 0 ? void 0 : values._rule_, values || {});\r\n }\r\n });\r\n }\r\n if (typeof locale === 'string') {\r\n DICTIONARY.locale = locale;\r\n if (dictionary) {\r\n DICTIONARY.merge((_a = {}, _a[locale] = dictionary, _a));\r\n }\r\n localeChanged();\r\n return;\r\n }\r\n DICTIONARY.merge(locale);\r\n}\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\nvar isEvent = function (evt) {\r\n if (!evt) {\r\n return false;\r\n }\r\n if (typeof Event !== 'undefined' && isCallable(Event) && evt instanceof Event) {\r\n return true;\r\n }\r\n // this is for IE\r\n /* istanbul ignore next */\r\n if (evt && evt.srcElement) {\r\n return true;\r\n }\r\n return false;\r\n};\r\nfunction normalizeEventValue(value) {\r\n var _a, _b;\r\n if (!isEvent(value)) {\r\n return value;\r\n }\r\n var input = value.target;\r\n if (input.type === 'file' && input.files) {\r\n return toArray(input.files);\r\n }\r\n // If the input has a `v-model.number` modifier applied.\r\n if ((_a = input._vModifiers) === null || _a === void 0 ? void 0 : _a.number) {\r\n // as per the spec the v-model.number uses parseFloat\r\n var valueAsNumber = parseFloat(input.value);\r\n if (isNaN(valueAsNumber)) {\r\n return input.value;\r\n }\r\n return valueAsNumber;\r\n }\r\n if ((_b = input._vModifiers) === null || _b === void 0 ? void 0 : _b.trim) {\r\n var trimmedValue = typeof input.value === 'string' ? input.value.trim() : input.value;\r\n return trimmedValue;\r\n }\r\n return input.value;\r\n}\n\nvar isTextInput = function (vnode) {\r\n var _a;\r\n var attrs = ((_a = vnode.data) === null || _a === void 0 ? void 0 : _a.attrs) || vnode.elm;\r\n // it will fallback to being a text input per browsers spec.\r\n if (vnode.tag === 'input' && (!attrs || !attrs.type)) {\r\n return true;\r\n }\r\n if (vnode.tag === 'textarea') {\r\n return true;\r\n }\r\n return includes(['text', 'password', 'search', 'email', 'tel', 'url', 'number'], attrs === null || attrs === void 0 ? void 0 : attrs.type);\r\n};\r\n// export const isCheckboxOrRadioInput = (vnode: VNode): boolean => {\r\n// const attrs = (vnode.data && vnode.data.attrs) || vnode.elm;\r\n// return includes(['radio', 'checkbox'], attrs && attrs.type);\r\n// };\r\n// Gets the model object on the vnode.\r\nfunction findModel(vnode) {\r\n if (!vnode.data) {\r\n return undefined;\r\n }\r\n // Component Model\r\n // THIS IS NOT TYPED IN OFFICIAL VUE TYPINGS\r\n // eslint-disable-next-line\r\n var nonStandardVNodeData = vnode.data;\r\n if ('model' in nonStandardVNodeData) {\r\n return nonStandardVNodeData.model;\r\n }\r\n if (!vnode.data.directives) {\r\n return undefined;\r\n }\r\n return find(vnode.data.directives, function (d) { return d.name === 'model'; });\r\n}\r\nfunction findValue(vnode) {\r\n var _a, _b;\r\n var model = findModel(vnode);\r\n if (model) {\r\n return { value: model.value };\r\n }\r\n var config = findModelConfig(vnode);\r\n var prop = (config === null || config === void 0 ? void 0 : config.prop) || 'value';\r\n if (((_a = vnode.componentOptions) === null || _a === void 0 ? void 0 : _a.propsData) && prop in vnode.componentOptions.propsData) {\r\n var propsDataWithValue = vnode.componentOptions.propsData;\r\n return { value: propsDataWithValue[prop] };\r\n }\r\n if (((_b = vnode.data) === null || _b === void 0 ? void 0 : _b.domProps) && 'value' in vnode.data.domProps) {\r\n return { value: vnode.data.domProps.value };\r\n }\r\n return undefined;\r\n}\r\nfunction extractChildren(vnode) {\r\n if (Array.isArray(vnode)) {\r\n return vnode;\r\n }\r\n if (Array.isArray(vnode.children)) {\r\n return vnode.children;\r\n }\r\n /* istanbul ignore next */\r\n if (vnode.componentOptions && Array.isArray(vnode.componentOptions.children)) {\r\n return vnode.componentOptions.children;\r\n }\r\n return [];\r\n}\r\nfunction findInputNodes(vnode) {\r\n if (!Array.isArray(vnode) && findValue(vnode) !== undefined) {\r\n return [vnode];\r\n }\r\n var children = extractChildren(vnode);\r\n return children.reduce(function (nodes, node) {\r\n var candidates = findInputNodes(node);\r\n if (candidates.length) {\r\n nodes.push.apply(nodes, candidates);\r\n }\r\n return nodes;\r\n }, []);\r\n}\r\n// Resolves v-model config if exists.\r\nfunction findModelConfig(vnode) {\r\n /* istanbul ignore next */\r\n if (!vnode.componentOptions)\r\n return null;\r\n // This is also not typed in the standard Vue TS.\r\n return vnode.componentOptions.Ctor.options.model;\r\n}\r\n// Adds a listener to vnode listener object.\r\nfunction mergeVNodeListeners(obj, eventName, handler) {\r\n // no listener at all.\r\n if (isNullOrUndefined(obj[eventName])) {\r\n obj[eventName] = [handler];\r\n return;\r\n }\r\n // Is an invoker.\r\n if (isCallable(obj[eventName]) && obj[eventName].fns) {\r\n var invoker = obj[eventName];\r\n invoker.fns = Array.isArray(invoker.fns) ? invoker.fns : [invoker.fns];\r\n if (!includes(invoker.fns, handler)) {\r\n invoker.fns.push(handler);\r\n }\r\n return;\r\n }\r\n if (isCallable(obj[eventName])) {\r\n var prev = obj[eventName];\r\n obj[eventName] = [prev];\r\n }\r\n if (Array.isArray(obj[eventName]) && !includes(obj[eventName], handler)) {\r\n obj[eventName].push(handler);\r\n }\r\n}\r\n// Adds a listener to a native HTML vnode.\r\nfunction addNativeNodeListener(node, eventName, handler) {\r\n /* istanbul ignore next */\r\n if (!node.data) {\r\n node.data = {};\r\n }\r\n if (isNullOrUndefined(node.data.on)) {\r\n node.data.on = {};\r\n }\r\n mergeVNodeListeners(node.data.on, eventName, handler);\r\n}\r\n// Adds a listener to a Vue component vnode.\r\nfunction addComponentNodeListener(node, eventName, handler) {\r\n /* istanbul ignore next */\r\n if (!node.componentOptions) {\r\n return;\r\n }\r\n /* istanbul ignore next */\r\n if (!node.componentOptions.listeners) {\r\n node.componentOptions.listeners = {};\r\n }\r\n mergeVNodeListeners(node.componentOptions.listeners, eventName, handler);\r\n}\r\nfunction addVNodeListener(vnode, eventName, handler) {\r\n if (vnode.componentOptions) {\r\n addComponentNodeListener(vnode, eventName, handler);\r\n return;\r\n }\r\n addNativeNodeListener(vnode, eventName, handler);\r\n}\r\n// Determines if `change` should be used over `input` for listeners.\r\nfunction getInputEventName(vnode, model) {\r\n var _a;\r\n // Is a component.\r\n if (vnode.componentOptions) {\r\n var event_1 = (findModelConfig(vnode) || { event: 'input' }).event;\r\n return event_1;\r\n }\r\n // Lazy Models typically use change event\r\n if ((_a = model === null || model === void 0 ? void 0 : model.modifiers) === null || _a === void 0 ? void 0 : _a.lazy) {\r\n return 'change';\r\n }\r\n // is a textual-type input.\r\n if (isTextInput(vnode)) {\r\n return 'input';\r\n }\r\n return 'change';\r\n}\r\nfunction isHTMLNode(node) {\r\n return includes(['input', 'select', 'textarea'], node.tag);\r\n}\r\n// TODO: Type this one properly.\r\nfunction normalizeSlots(slots, ctx) {\r\n var acc = [];\r\n return Object.keys(slots).reduce(function (arr, key) {\r\n slots[key].forEach(function (vnode) {\r\n if (!vnode.context) {\r\n slots[key].context = ctx;\r\n if (!vnode.data) {\r\n vnode.data = {};\r\n }\r\n vnode.data.slot = key;\r\n }\r\n });\r\n return arr.concat(slots[key]);\r\n }, acc);\r\n}\r\nfunction resolveTextualRules(vnode) {\r\n var _a;\r\n var attrs = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.attrs;\r\n var rules = {};\r\n if (!attrs)\r\n return rules;\r\n if (attrs.type === 'email' && RuleContainer.getRuleDefinition('email')) {\r\n rules.email = ['multiple' in attrs];\r\n }\r\n if (attrs.pattern && RuleContainer.getRuleDefinition('regex')) {\r\n rules.regex = attrs.pattern;\r\n }\r\n if (attrs.maxlength >= 0 && RuleContainer.getRuleDefinition('max')) {\r\n rules.max = attrs.maxlength;\r\n }\r\n if (attrs.minlength >= 0 && RuleContainer.getRuleDefinition('min')) {\r\n rules.min = attrs.minlength;\r\n }\r\n if (attrs.type === 'number') {\r\n if (isSpecified(attrs.min) && RuleContainer.getRuleDefinition('min_value')) {\r\n rules.min_value = Number(attrs.min);\r\n }\r\n if (isSpecified(attrs.max) && RuleContainer.getRuleDefinition('max_value')) {\r\n rules.max_value = Number(attrs.max);\r\n }\r\n }\r\n return rules;\r\n}\r\nfunction resolveRules(vnode) {\r\n var _a;\r\n var htmlTags = ['input', 'select', 'textarea'];\r\n var attrs = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.attrs;\r\n if (!includes(htmlTags, vnode.tag) || !attrs) {\r\n return {};\r\n }\r\n var rules = {};\r\n if ('required' in attrs && attrs.required !== false && RuleContainer.getRuleDefinition('required')) {\r\n rules.required = attrs.type === 'checkbox' ? [true] : true;\r\n }\r\n if (isTextInput(vnode)) {\r\n return normalizeRules(__assign(__assign({}, rules), resolveTextualRules(vnode)));\r\n }\r\n return normalizeRules(rules);\r\n}\r\nfunction normalizeChildren(context, slotProps) {\r\n if (context.$scopedSlots.default) {\r\n return context.$scopedSlots.default(slotProps) || [];\r\n }\r\n return context.$slots.default || [];\r\n}\n\n/**\r\n * Determines if a provider needs to run validation.\r\n */\r\nfunction shouldValidate(ctx, value) {\r\n // when an immediate/initial validation is needed and wasn't done before.\r\n if (!ctx._ignoreImmediate && ctx.immediate) {\r\n return true;\r\n }\r\n // when the value changes for whatever reason.\r\n if (!isRefEqual(ctx.value, value) && ctx.normalizedEvents.length) {\r\n return true;\r\n }\r\n // when it needs validation due to props/cross-fields changes.\r\n if (ctx._needsValidation) {\r\n return true;\r\n }\r\n // when the initial value is undefined and the field wasn't rendered yet.\r\n if (!ctx.initialized && value === undefined) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction createValidationCtx(ctx) {\r\n return __assign(__assign({}, ctx.flags), { errors: ctx.errors, classes: ctx.classes, failedRules: ctx.failedRules, reset: function () { return ctx.reset(); }, validate: function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ctx.validate.apply(ctx, args);\r\n }, ariaInput: {\r\n 'aria-invalid': ctx.flags.invalid ? 'true' : 'false',\r\n 'aria-required': ctx.isRequired ? 'true' : 'false',\r\n 'aria-errormessage': \"vee_\" + ctx.id\r\n }, ariaMsg: {\r\n id: \"vee_\" + ctx.id,\r\n 'aria-live': ctx.errors.length ? 'assertive' : 'off'\r\n } });\r\n}\r\nfunction onRenderUpdate(vm, value) {\r\n if (!vm.initialized) {\r\n vm.initialValue = value;\r\n }\r\n var validateNow = shouldValidate(vm, value);\r\n vm._needsValidation = false;\r\n vm.value = value;\r\n vm._ignoreImmediate = true;\r\n if (!validateNow) {\r\n return;\r\n }\r\n var validate = function () {\r\n if (vm.immediate || vm.flags.validated) {\r\n return triggerThreadSafeValidation(vm);\r\n }\r\n vm.validateSilent();\r\n };\r\n if (vm.initialized) {\r\n validate();\r\n return;\r\n }\r\n vm.$once('hook:mounted', function () { return validate(); });\r\n}\r\nfunction computeModeSetting(ctx) {\r\n var compute = (isCallable(ctx.mode) ? ctx.mode : modes[ctx.mode]);\r\n return compute(ctx);\r\n}\r\nfunction triggerThreadSafeValidation(vm) {\r\n var pendingPromise = vm.validateSilent();\r\n // avoids race conditions between successive validations.\r\n vm._pendingValidation = pendingPromise;\r\n return pendingPromise.then(function (result) {\r\n if (pendingPromise === vm._pendingValidation) {\r\n vm.applyResult(result);\r\n vm._pendingValidation = undefined;\r\n }\r\n return result;\r\n });\r\n}\r\n// Creates the common handlers for a validatable context.\r\nfunction createCommonHandlers(vm) {\r\n if (!vm.$veeOnInput) {\r\n vm.$veeOnInput = function (e) {\r\n vm.syncValue(e); // track and keep the value updated.\r\n vm.setFlags({ dirty: true, pristine: false });\r\n };\r\n }\r\n var onInput = vm.$veeOnInput;\r\n if (!vm.$veeOnBlur) {\r\n vm.$veeOnBlur = function () {\r\n vm.setFlags({ touched: true, untouched: false });\r\n };\r\n }\r\n // Blur event listener.\r\n var onBlur = vm.$veeOnBlur;\r\n var onValidate = vm.$veeHandler;\r\n var mode = computeModeSetting(vm);\r\n // Handle debounce changes.\r\n if (!onValidate || vm.$veeDebounce !== vm.debounce) {\r\n onValidate = debounce(function () {\r\n vm.$nextTick(function () {\r\n if (!vm._pendingReset) {\r\n triggerThreadSafeValidation(vm);\r\n }\r\n vm._pendingReset = false;\r\n });\r\n }, mode.debounce || vm.debounce);\r\n // Cache the handler so we don't create it each time.\r\n vm.$veeHandler = onValidate;\r\n // cache the debounce value so we detect if it was changed.\r\n vm.$veeDebounce = vm.debounce;\r\n }\r\n return { onInput: onInput, onBlur: onBlur, onValidate: onValidate };\r\n}\r\n// Adds all plugin listeners to the vnode.\r\nfunction addListeners(vm, node) {\r\n var value = findValue(node);\r\n // cache the input eventName.\r\n vm._inputEventName = vm._inputEventName || getInputEventName(node, findModel(node));\r\n onRenderUpdate(vm, value === null || value === void 0 ? void 0 : value.value);\r\n var _a = createCommonHandlers(vm), onInput = _a.onInput, onBlur = _a.onBlur, onValidate = _a.onValidate;\r\n addVNodeListener(node, vm._inputEventName, onInput);\r\n addVNodeListener(node, 'blur', onBlur);\r\n // add the validation listeners.\r\n vm.normalizedEvents.forEach(function (evt) {\r\n addVNodeListener(node, evt, onValidate);\r\n });\r\n vm.initialized = true;\r\n}\n\nvar PROVIDER_COUNTER = 0;\r\nfunction data$1() {\r\n var errors = [];\r\n var fieldName = '';\r\n var defaultValues = {\r\n errors: errors,\r\n value: undefined,\r\n initialized: false,\r\n initialValue: undefined,\r\n flags: createFlags(),\r\n failedRules: {},\r\n isActive: true,\r\n fieldName: fieldName,\r\n id: ''\r\n };\r\n return defaultValues;\r\n}\r\nvar ValidationProvider = vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].extend({\r\n name: 'ValidationProvider',\r\n inject: {\r\n $_veeObserver: {\r\n from: '$_veeObserver',\r\n default: function () {\r\n if (!this.$vnode.context.$_veeObserver) {\r\n this.$vnode.context.$_veeObserver = createObserver();\r\n }\r\n return this.$vnode.context.$_veeObserver;\r\n }\r\n }\r\n },\r\n props: {\r\n vid: {\r\n type: String,\r\n default: ''\r\n },\r\n name: {\r\n type: String,\r\n default: null\r\n },\r\n mode: {\r\n type: [String, Function],\r\n default: function () {\r\n return getConfig().mode;\r\n }\r\n },\r\n rules: {\r\n type: [Object, String],\r\n default: null\r\n },\r\n immediate: {\r\n type: Boolean,\r\n default: false\r\n },\r\n bails: {\r\n type: Boolean,\r\n default: function () { return getConfig().bails; }\r\n },\r\n skipIfEmpty: {\r\n type: Boolean,\r\n default: function () { return getConfig().skipOptional; }\r\n },\r\n debounce: {\r\n type: Number,\r\n default: 0\r\n },\r\n tag: {\r\n type: String,\r\n default: 'span'\r\n },\r\n slim: {\r\n type: Boolean,\r\n default: false\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n customMessages: {\r\n type: Object,\r\n default: function () {\r\n return {};\r\n }\r\n },\r\n detectInput: {\r\n type: Boolean,\r\n default: true\r\n }\r\n },\r\n watch: {\r\n rules: {\r\n deep: true,\r\n handler: function (val, oldVal) {\r\n this._needsValidation = !fastDeepEqual(val, oldVal);\r\n }\r\n }\r\n },\r\n data: data$1,\r\n computed: {\r\n fieldDeps: function () {\r\n var _this = this;\r\n return Object.keys(this.normalizedRules).reduce(function (acc, rule) {\r\n var deps = extractLocators(_this.normalizedRules[rule]).map(function (dep) {\r\n return isLocator(dep) ? dep.__locatorRef : dep.slice(1);\r\n });\r\n acc.push.apply(acc, deps);\r\n deps.forEach(function (depName) {\r\n watchCrossFieldDep(_this, depName);\r\n });\r\n return acc;\r\n }, []);\r\n },\r\n normalizedEvents: function () {\r\n var _this = this;\r\n var on = computeModeSetting(this).on;\r\n return (on || []).map(function (e) {\r\n if (e === 'input') {\r\n return _this._inputEventName;\r\n }\r\n return e;\r\n });\r\n },\r\n isRequired: function () {\r\n var rules = __assign(__assign({}, this._resolvedRules), this.normalizedRules);\r\n var isRequired = Object.keys(rules).some(RuleContainer.isRequireRule);\r\n this.flags.required = !!isRequired;\r\n return isRequired;\r\n },\r\n classes: function () {\r\n var names = getConfig().classes;\r\n return computeClassObj(names, this.flags);\r\n },\r\n normalizedRules: function () {\r\n return normalizeRules(this.rules);\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n var onLocaleChanged = function () {\r\n if (!_this.flags.validated) {\r\n return;\r\n }\r\n var regenerateMap = _this._regenerateMap;\r\n if (regenerateMap) {\r\n var errors_1 = [];\r\n var failedRules_1 = {};\r\n Object.keys(regenerateMap).forEach(function (rule) {\r\n var msg = regenerateMap[rule]();\r\n errors_1.push(msg);\r\n failedRules_1[rule] = msg;\r\n });\r\n _this.applyResult({ errors: errors_1, failedRules: failedRules_1, regenerateMap: regenerateMap });\r\n return;\r\n }\r\n _this.validate();\r\n };\r\n EVENT_BUS.$on('change:locale', onLocaleChanged);\r\n this.$on('hook:beforeDestroy', function () {\r\n EVENT_BUS.$off('change:locale', onLocaleChanged);\r\n });\r\n },\r\n render: function (h) {\r\n var _this = this;\r\n this.registerField();\r\n var ctx = createValidationCtx(this);\r\n var children = normalizeChildren(this, ctx);\r\n // Automatic v-model detection\r\n if (this.detectInput) {\r\n var inputs = findInputNodes(children);\r\n if (inputs.length) {\r\n inputs.forEach(function (input, idx) {\r\n var _a, _b, _c, _d, _e, _f;\r\n // If the elements are not checkboxes and there are more input nodes\r\n if (!includes(['checkbox', 'radio'], (_b = (_a = input.data) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b.type) && idx > 0) {\r\n return;\r\n }\r\n var resolved = getConfig().useConstraintAttrs ? resolveRules(input) : {};\r\n if (!fastDeepEqual(_this._resolvedRules, resolved)) {\r\n _this._needsValidation = true;\r\n }\r\n if (isHTMLNode(input)) {\r\n _this.fieldName = ((_d = (_c = input.data) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.name) || ((_f = (_e = input.data) === null || _e === void 0 ? void 0 : _e.attrs) === null || _f === void 0 ? void 0 : _f.id);\r\n }\r\n _this._resolvedRules = resolved;\r\n addListeners(_this, input);\r\n });\r\n }\r\n }\r\n return this.slim && children.length <= 1 ? children[0] : h(this.tag, children);\r\n },\r\n beforeDestroy: function () {\r\n // cleanup reference.\r\n this.$_veeObserver.unobserve(this.id);\r\n },\r\n activated: function () {\r\n this.isActive = true;\r\n },\r\n deactivated: function () {\r\n this.isActive = false;\r\n },\r\n methods: {\r\n setFlags: function (flags) {\r\n var _this = this;\r\n Object.keys(flags).forEach(function (flag) {\r\n _this.flags[flag] = flags[flag];\r\n });\r\n },\r\n syncValue: function (v) {\r\n var value = normalizeEventValue(v);\r\n this.value = value;\r\n this.flags.changed = !fastDeepEqual(this.initialValue, value);\r\n },\r\n reset: function () {\r\n var _this = this;\r\n this.errors = [];\r\n this.initialValue = this.value;\r\n var flags = createFlags();\r\n flags.required = this.isRequired;\r\n this.setFlags(flags);\r\n this.failedRules = {};\r\n this.validateSilent();\r\n this._pendingValidation = undefined;\r\n this._pendingReset = true;\r\n setTimeout(function () {\r\n _this._pendingReset = false;\r\n }, this.debounce);\r\n },\r\n validate: function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n if (args.length > 0) {\r\n this.syncValue(args[0]);\r\n }\r\n return [2 /*return*/, triggerThreadSafeValidation(this)];\r\n });\r\n });\r\n },\r\n validateSilent: function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var rules, result;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.setFlags({ pending: true });\r\n rules = __assign(__assign({}, this._resolvedRules), this.normalizedRules);\r\n Object.defineProperty(rules, '_$$isNormalized', {\r\n value: true,\r\n writable: false,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n return [4 /*yield*/, validate(this.value, rules, __assign(__assign({ name: this.name || this.fieldName }, createLookup(this)), { bails: this.bails, skipIfEmpty: this.skipIfEmpty, isInitial: !this.initialized, customMessages: this.customMessages }))];\r\n case 1:\r\n result = _a.sent();\r\n this.setFlags({\r\n pending: false,\r\n valid: result.valid,\r\n invalid: !result.valid\r\n });\r\n if (result.required !== undefined) {\r\n this.setFlags({\r\n required: result.required\r\n });\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n },\r\n setErrors: function (errors) {\r\n this.applyResult({ errors: errors, failedRules: {} });\r\n },\r\n applyResult: function (_a) {\r\n var errors = _a.errors, failedRules = _a.failedRules, regenerateMap = _a.regenerateMap;\r\n this.errors = errors;\r\n this._regenerateMap = regenerateMap;\r\n this.failedRules = __assign({}, (failedRules || {}));\r\n this.setFlags({\r\n valid: !errors.length,\r\n passed: !errors.length,\r\n invalid: !!errors.length,\r\n failed: !!errors.length,\r\n validated: true,\r\n changed: !fastDeepEqual(this.value, this.initialValue)\r\n });\r\n },\r\n registerField: function () {\r\n updateRenderingContextRefs(this);\r\n },\r\n checkComputesRequiredState: function () {\r\n var rules = __assign(__assign({}, this._resolvedRules), this.normalizedRules);\r\n var isRequired = Object.keys(rules).some(RuleContainer.isRequireRule);\r\n return isRequired;\r\n }\r\n }\r\n});\r\nfunction computeClassObj(names, flags) {\r\n var acc = {};\r\n var keys = Object.keys(flags);\r\n var length = keys.length;\r\n var _loop_1 = function (i) {\r\n var flag = keys[i];\r\n var className = (names && names[flag]) || flag;\r\n var value = flags[flag];\r\n if (isNullOrUndefined(value)) {\r\n return \"continue\";\r\n }\r\n if ((flag === 'valid' || flag === 'invalid') && !flags.validated) {\r\n return \"continue\";\r\n }\r\n if (typeof className === 'string') {\r\n acc[className] = value;\r\n }\r\n else if (Array.isArray(className)) {\r\n className.forEach(function (cls) {\r\n acc[cls] = value;\r\n });\r\n }\r\n };\r\n for (var i = 0; i < length; i++) {\r\n _loop_1(i);\r\n }\r\n return acc;\r\n}\r\nfunction createLookup(vm) {\r\n var providers = vm.$_veeObserver.refs;\r\n var reduced = {\r\n names: {},\r\n values: {}\r\n };\r\n return vm.fieldDeps.reduce(function (acc, depName) {\r\n if (!providers[depName]) {\r\n return acc;\r\n }\r\n acc.values[depName] = providers[depName].value;\r\n acc.names[depName] = providers[depName].name;\r\n return acc;\r\n }, reduced);\r\n}\r\nfunction extractId(vm) {\r\n if (vm.vid) {\r\n return vm.vid;\r\n }\r\n if (vm.name) {\r\n return vm.name;\r\n }\r\n if (vm.id) {\r\n return vm.id;\r\n }\r\n if (vm.fieldName) {\r\n return vm.fieldName;\r\n }\r\n PROVIDER_COUNTER++;\r\n return \"_vee_\" + PROVIDER_COUNTER;\r\n}\r\nfunction updateRenderingContextRefs(vm) {\r\n var providedId = extractId(vm);\r\n var id = vm.id;\r\n // Nothing has changed.\r\n if (!vm.isActive || (id === providedId && vm.$_veeObserver.refs[id])) {\r\n return;\r\n }\r\n // vid was changed.\r\n if (id !== providedId && vm.$_veeObserver.refs[id] === vm) {\r\n vm.$_veeObserver.unobserve(id);\r\n }\r\n vm.id = providedId;\r\n vm.$_veeObserver.observe(vm);\r\n}\r\nfunction createObserver() {\r\n return {\r\n refs: {},\r\n observe: function (vm) {\r\n this.refs[vm.id] = vm;\r\n },\r\n unobserve: function (id) {\r\n delete this.refs[id];\r\n }\r\n };\r\n}\r\nfunction watchCrossFieldDep(ctx, depName, withHooks) {\r\n if (withHooks === void 0) { withHooks = true; }\r\n var providers = ctx.$_veeObserver.refs;\r\n if (!ctx._veeWatchers) {\r\n ctx._veeWatchers = {};\r\n }\r\n if (!providers[depName] && withHooks) {\r\n return ctx.$once('hook:mounted', function () {\r\n watchCrossFieldDep(ctx, depName, false);\r\n });\r\n }\r\n if (!isCallable(ctx._veeWatchers[depName]) && providers[depName]) {\r\n ctx._veeWatchers[depName] = providers[depName].$watch('value', function () {\r\n var isComputesRequired = ctx.checkComputesRequiredState();\r\n if (ctx.flags.validated) {\r\n ctx._needsValidation = true;\r\n ctx.validate();\r\n }\r\n // Validate dependent field silently if it has rules with computesRequired\r\n if (isComputesRequired && !ctx.flags.validated) {\r\n ctx.validateSilent();\r\n }\r\n });\r\n }\r\n}\n\nvar FLAGS_STRATEGIES = [\r\n ['pristine', 'every'],\r\n ['dirty', 'some'],\r\n ['touched', 'some'],\r\n ['untouched', 'every'],\r\n ['valid', 'every'],\r\n ['invalid', 'some'],\r\n ['pending', 'some'],\r\n ['validated', 'every'],\r\n ['changed', 'some'],\r\n ['passed', 'every'],\r\n ['failed', 'some']\r\n];\r\nvar OBSERVER_COUNTER = 0;\r\nfunction data() {\r\n var refs = {};\r\n var errors = {};\r\n var flags = createObserverFlags();\r\n var fields = {};\r\n // FIXME: Not sure of this one can be typed, circular type reference.\r\n var observers = [];\r\n return {\r\n id: '',\r\n refs: refs,\r\n observers: observers,\r\n errors: errors,\r\n flags: flags,\r\n fields: fields\r\n };\r\n}\r\nfunction provideSelf() {\r\n return {\r\n $_veeObserver: this\r\n };\r\n}\r\nvar ValidationObserver = vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].extend({\r\n name: 'ValidationObserver',\r\n provide: provideSelf,\r\n inject: {\r\n $_veeObserver: {\r\n from: '$_veeObserver',\r\n default: function () {\r\n if (!this.$vnode.context.$_veeObserver) {\r\n return null;\r\n }\r\n return this.$vnode.context.$_veeObserver;\r\n }\r\n }\r\n },\r\n props: {\r\n tag: {\r\n type: String,\r\n default: 'span'\r\n },\r\n vid: {\r\n type: String,\r\n default: function () {\r\n return \"obs_\" + OBSERVER_COUNTER++;\r\n }\r\n },\r\n slim: {\r\n type: Boolean,\r\n default: false\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n data: data,\r\n created: function () {\r\n var _this = this;\r\n this.id = this.vid;\r\n register(this);\r\n var onChange = debounce(function (_a) {\r\n var errors = _a.errors, flags = _a.flags, fields = _a.fields;\r\n _this.errors = errors;\r\n _this.flags = flags;\r\n _this.fields = fields;\r\n }, 16);\r\n this.$watch(computeObserverState, onChange);\r\n },\r\n activated: function () {\r\n register(this);\r\n },\r\n deactivated: function () {\r\n unregister(this);\r\n },\r\n beforeDestroy: function () {\r\n unregister(this);\r\n },\r\n render: function (h) {\r\n var children = normalizeChildren(this, prepareSlotProps(this));\r\n return this.slim && children.length <= 1 ? children[0] : h(this.tag, { on: this.$listeners }, children);\r\n },\r\n methods: {\r\n observe: function (subscriber, kind) {\r\n var _a;\r\n if (kind === void 0) { kind = 'provider'; }\r\n if (kind === 'observer') {\r\n this.observers.push(subscriber);\r\n return;\r\n }\r\n this.refs = __assign(__assign({}, this.refs), (_a = {}, _a[subscriber.id] = subscriber, _a));\r\n },\r\n unobserve: function (id, kind) {\r\n if (kind === void 0) { kind = 'provider'; }\r\n if (kind === 'provider') {\r\n var provider = this.refs[id];\r\n if (!provider) {\r\n return;\r\n }\r\n this.$delete(this.refs, id);\r\n return;\r\n }\r\n var idx = findIndex(this.observers, function (o) { return o.id === id; });\r\n if (idx !== -1) {\r\n this.observers.splice(idx, 1);\r\n }\r\n },\r\n validateWithInfo: function (_a) {\r\n var _b = (_a === void 0 ? {} : _a).silent, silent = _b === void 0 ? false : _b;\r\n return __awaiter(this, void 0, void 0, function () {\r\n var results, isValid, _c, errors, flags, fields;\r\n return __generator(this, function (_d) {\r\n switch (_d.label) {\r\n case 0: return [4 /*yield*/, Promise.all(__spreadArrays(values(this.refs)\r\n .filter(function (r) { return !r.disabled; })\r\n .map(function (ref) { return ref[silent ? 'validateSilent' : 'validate']().then(function (r) { return r.valid; }); }), this.observers.filter(function (o) { return !o.disabled; }).map(function (obs) { return obs.validate({ silent: silent }); })))];\r\n case 1:\r\n results = _d.sent();\r\n isValid = results.every(function (r) { return r; });\r\n _c = computeObserverState.call(this), errors = _c.errors, flags = _c.flags, fields = _c.fields;\r\n this.errors = errors;\r\n this.flags = flags;\r\n this.fields = fields;\r\n return [2 /*return*/, {\r\n errors: errors,\r\n flags: flags,\r\n fields: fields,\r\n isValid: isValid\r\n }];\r\n }\r\n });\r\n });\r\n },\r\n validate: function (_a) {\r\n var _b = (_a === void 0 ? {} : _a).silent, silent = _b === void 0 ? false : _b;\r\n return __awaiter(this, void 0, void 0, function () {\r\n var isValid;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0: return [4 /*yield*/, this.validateWithInfo({ silent: silent })];\r\n case 1:\r\n isValid = (_c.sent()).isValid;\r\n return [2 /*return*/, isValid];\r\n }\r\n });\r\n });\r\n },\r\n handleSubmit: function (cb) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var isValid;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.validate()];\r\n case 1:\r\n isValid = _a.sent();\r\n if (!isValid || !cb) {\r\n return [2 /*return*/];\r\n }\r\n return [2 /*return*/, cb()];\r\n }\r\n });\r\n });\r\n },\r\n reset: function () {\r\n return __spreadArrays(values(this.refs), this.observers).forEach(function (ref) { return ref.reset(); });\r\n },\r\n setErrors: function (errors) {\r\n var _this = this;\r\n Object.keys(errors).forEach(function (key) {\r\n var provider = _this.refs[key];\r\n if (!provider)\r\n return;\r\n var errorArr = errors[key] || [];\r\n errorArr = typeof errorArr === 'string' ? [errorArr] : errorArr;\r\n provider.setErrors(errorArr);\r\n });\r\n this.observers.forEach(function (observer) {\r\n observer.setErrors(errors);\r\n });\r\n }\r\n }\r\n});\r\nfunction unregister(vm) {\r\n if (vm.$_veeObserver) {\r\n vm.$_veeObserver.unobserve(vm.id, 'observer');\r\n }\r\n}\r\nfunction register(vm) {\r\n if (vm.$_veeObserver) {\r\n vm.$_veeObserver.observe(vm, 'observer');\r\n }\r\n}\r\nfunction prepareSlotProps(vm) {\r\n return __assign(__assign({}, vm.flags), { errors: vm.errors, fields: vm.fields, validate: vm.validate, validateWithInfo: vm.validateWithInfo, passes: vm.handleSubmit, handleSubmit: vm.handleSubmit, reset: vm.reset });\r\n}\r\n// Creates a modified version of validation flags\r\nfunction createObserverFlags() {\r\n return __assign(__assign({}, createFlags()), { valid: true, invalid: false });\r\n}\r\nfunction computeObserverState() {\r\n var vms = __spreadArrays(values(this.refs), this.observers.filter(function (o) { return !o.disabled; }));\r\n var errors = {};\r\n var flags = createObserverFlags();\r\n var fields = {};\r\n var length = vms.length;\r\n for (var i = 0; i < length; i++) {\r\n var vm = vms[i];\r\n // validation provider\r\n if (Array.isArray(vm.errors)) {\r\n errors[vm.id] = vm.errors;\r\n fields[vm.id] = __assign({ id: vm.id, name: vm.name, failedRules: vm.failedRules }, vm.flags);\r\n continue;\r\n }\r\n // Nested observer, merge errors and fields\r\n errors = __assign(__assign({}, errors), vm.errors);\r\n fields = __assign(__assign({}, fields), vm.fields);\r\n }\r\n FLAGS_STRATEGIES.forEach(function (_a) {\r\n var flag = _a[0], method = _a[1];\r\n flags[flag] = vms[method](function (vm) { return vm.flags[flag]; });\r\n });\r\n return { errors: errors, flags: flags, fields: fields };\r\n}\n\nfunction withValidation(component, mapProps) {\r\n var _a;\r\n if (mapProps === void 0) { mapProps = identity; }\r\n var options = 'options' in component ? component.options : component;\r\n var providerOpts = ValidationProvider.options;\r\n var hoc = {\r\n name: (options.name || 'AnonymousHoc') + \"WithValidation\",\r\n props: __assign({}, providerOpts.props),\r\n data: providerOpts.data,\r\n computed: __assign({}, providerOpts.computed),\r\n methods: __assign({}, providerOpts.methods),\r\n beforeDestroy: providerOpts.beforeDestroy,\r\n inject: providerOpts.inject\r\n };\r\n var eventName = ((_a = options === null || options === void 0 ? void 0 : options.model) === null || _a === void 0 ? void 0 : _a.event) || 'input';\r\n hoc.render = function (h) {\r\n var _a;\r\n this.registerField();\r\n var vctx = createValidationCtx(this);\r\n var listeners = __assign({}, this.$listeners);\r\n var model = findModel(this.$vnode);\r\n this._inputEventName = this._inputEventName || getInputEventName(this.$vnode, model);\r\n var value = findValue(this.$vnode);\r\n onRenderUpdate(this, value === null || value === void 0 ? void 0 : value.value);\r\n var _b = createCommonHandlers(this), onInput = _b.onInput, onBlur = _b.onBlur, onValidate = _b.onValidate;\r\n mergeVNodeListeners(listeners, eventName, onInput);\r\n mergeVNodeListeners(listeners, 'blur', onBlur);\r\n this.normalizedEvents.forEach(function (evt) {\r\n mergeVNodeListeners(listeners, evt, onValidate);\r\n });\r\n // Props are any attrs not associated with ValidationProvider Plus the model prop.\r\n // WARNING: Accidental prop overwrite will probably happen.\r\n var prop = (findModelConfig(this.$vnode) || { prop: 'value' }).prop;\r\n var props = __assign(__assign(__assign({}, this.$attrs), (_a = {}, _a[prop] = model === null || model === void 0 ? void 0 : model.value, _a)), mapProps(vctx));\r\n return h(options, {\r\n attrs: this.$attrs,\r\n props: props,\r\n on: listeners,\r\n scopedSlots: this.$scopedSlots\r\n }, normalizeSlots(this.$slots, this.$vnode.context));\r\n };\r\n return hoc;\r\n}\n\nvar version = '3.4.14';\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vee-validate/dist/vee-validate.esm.js?")}}]); \ No newline at end of file diff --git a/web/js/1.js b/web/js/1.js deleted file mode 100644 index 8f4cef2..0000000 --- a/web/js/1.js +++ /dev/null @@ -1,21 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{"./node_modules/simple-uploader.js/src/chunk.js": -/*!******************************************************!*\ - !*** ./node_modules/simple-uploader.js/src/chunk.js ***! - \******************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("var utils = __webpack_require__(/*! ./utils */ \"./node_modules/simple-uploader.js/src/utils.js\")\n\nfunction Chunk (uploader, file, offset) {\n utils.defineNonEnumerable(this, 'uploader', uploader)\n utils.defineNonEnumerable(this, 'file', file)\n utils.defineNonEnumerable(this, 'bytes', null)\n this.offset = offset\n this.tested = false\n this.retries = 0\n this.pendingRetry = false\n this.preprocessState = 0\n this.readState = 0\n this.loaded = 0\n this.total = 0\n this.chunkSize = this.uploader.opts.chunkSize\n this.startByte = this.offset * this.chunkSize\n this.endByte = this.computeEndByte()\n this.xhr = null\n}\n\nvar STATUS = Chunk.STATUS = {\n PENDING: 'pending',\n UPLOADING: 'uploading',\n READING: 'reading',\n SUCCESS: 'success',\n ERROR: 'error',\n COMPLETE: 'complete',\n PROGRESS: 'progress',\n RETRY: 'retry'\n}\n\nutils.extend(Chunk.prototype, {\n\n _event: function (evt, args) {\n args = utils.toArray(arguments)\n args.unshift(this)\n this.file._chunkEvent.apply(this.file, args)\n },\n\n computeEndByte: function () {\n var endByte = Math.min(this.file.size, (this.offset + 1) * this.chunkSize)\n if (this.file.size - endByte < this.chunkSize && !this.uploader.opts.forceChunkSize) {\n // The last chunk will be bigger than the chunk size,\n // but less than 2 * this.chunkSize\n endByte = this.file.size\n }\n return endByte\n },\n\n getParams: function () {\n return {\n chunkNumber: this.offset + 1,\n chunkSize: this.uploader.opts.chunkSize,\n currentChunkSize: this.endByte - this.startByte,\n totalSize: this.file.size,\n identifier: this.file.uniqueIdentifier,\n filename: this.file.name,\n relativePath: this.file.relativePath,\n totalChunks: this.file.chunks.length\n }\n },\n\n getTarget: function (target, params) {\n if (!params.length) {\n return target\n }\n if (target.indexOf('?') < 0) {\n target += '?'\n } else {\n target += '&'\n }\n return target + params.join('&')\n },\n\n test: function () {\n this.xhr = new XMLHttpRequest()\n this.xhr.addEventListener('load', testHandler, false)\n this.xhr.addEventListener('error', testHandler, false)\n var testMethod = utils.evalOpts(this.uploader.opts.testMethod, this.file, this)\n var data = this.prepareXhrRequest(testMethod, true)\n this.xhr.send(data)\n\n var $ = this\n function testHandler (event) {\n var status = $.status(true)\n if (status === STATUS.ERROR) {\n $._event(status, $.message())\n $.uploader.uploadNextChunk()\n } else if (status === STATUS.SUCCESS) {\n $._event(status, $.message())\n $.tested = true\n } else if (!$.file.paused) {\n // Error might be caused by file pause method\n // Chunks does not exist on the server side\n $.tested = true\n $.send()\n }\n }\n },\n\n preprocessFinished: function () {\n // Compute the endByte after the preprocess function to allow an\n // implementer of preprocess to set the fileObj size\n this.endByte = this.computeEndByte()\n this.preprocessState = 2\n this.send()\n },\n\n readFinished: function (bytes) {\n this.readState = 2\n this.bytes = bytes\n this.send()\n },\n\n send: function () {\n var preprocess = this.uploader.opts.preprocess\n var read = this.uploader.opts.readFileFn\n if (utils.isFunction(preprocess)) {\n switch (this.preprocessState) {\n case 0:\n this.preprocessState = 1\n preprocess(this)\n return\n case 1:\n return\n }\n }\n switch (this.readState) {\n case 0:\n this.readState = 1\n read(this.file, this.file.fileType, this.startByte, this.endByte, this)\n return\n case 1:\n return\n }\n if (this.uploader.opts.testChunks && !this.tested) {\n this.test()\n return\n }\n\n this.loaded = 0\n this.total = 0\n this.pendingRetry = false\n\n // Set up request and listen for event\n this.xhr = new XMLHttpRequest()\n this.xhr.upload.addEventListener('progress', progressHandler, false)\n this.xhr.addEventListener('load', doneHandler, false)\n this.xhr.addEventListener('error', doneHandler, false)\n\n var uploadMethod = utils.evalOpts(this.uploader.opts.uploadMethod, this.file, this)\n var data = this.prepareXhrRequest(uploadMethod, false, this.uploader.opts.method, this.bytes)\n this.xhr.send(data)\n\n var $ = this\n function progressHandler (event) {\n if (event.lengthComputable) {\n $.loaded = event.loaded\n $.total = event.total\n }\n $._event(STATUS.PROGRESS, event)\n }\n\n function doneHandler (event) {\n var msg = $.message()\n $.processingResponse = true\n $.uploader.opts.processResponse(msg, function (err, res) {\n $.processingResponse = false\n if (!$.xhr) {\n return\n }\n $.processedState = {\n err: err,\n res: res\n }\n var status = $.status()\n if (status === STATUS.SUCCESS || status === STATUS.ERROR) {\n // delete this.data\n $._event(status, res)\n status === STATUS.ERROR && $.uploader.uploadNextChunk()\n } else {\n $._event(STATUS.RETRY, res)\n $.pendingRetry = true\n $.abort()\n $.retries++\n var retryInterval = $.uploader.opts.chunkRetryInterval\n if (retryInterval !== null) {\n setTimeout(function () {\n $.send()\n }, retryInterval)\n } else {\n $.send()\n }\n }\n }, $.file, $)\n }\n },\n\n abort: function () {\n var xhr = this.xhr\n this.xhr = null\n this.processingResponse = false\n this.processedState = null\n if (xhr) {\n xhr.abort()\n }\n },\n\n status: function (isTest) {\n if (this.readState === 1) {\n return STATUS.READING\n } else if (this.pendingRetry || this.preprocessState === 1) {\n // if pending retry then that's effectively the same as actively uploading,\n // there might just be a slight delay before the retry starts\n return STATUS.UPLOADING\n } else if (!this.xhr) {\n return STATUS.PENDING\n } else if (this.xhr.readyState < 4 || this.processingResponse) {\n // Status is really 'OPENED', 'HEADERS_RECEIVED'\n // or 'LOADING' - meaning that stuff is happening\n return STATUS.UPLOADING\n } else {\n var _status\n if (this.uploader.opts.successStatuses.indexOf(this.xhr.status) > -1) {\n // HTTP 200, perfect\n // HTTP 202 Accepted - The request has been accepted for processing, but the processing has not been completed.\n _status = STATUS.SUCCESS\n } else if (this.uploader.opts.permanentErrors.indexOf(this.xhr.status) > -1 ||\n !isTest && this.retries >= this.uploader.opts.maxChunkRetries) {\n // HTTP 415/500/501, permanent error\n _status = STATUS.ERROR\n } else {\n // this should never happen, but we'll reset and queue a retry\n // a likely case for this would be 503 service unavailable\n this.abort()\n _status = STATUS.PENDING\n }\n var processedState = this.processedState\n if (processedState && processedState.err) {\n _status = STATUS.ERROR\n }\n return _status\n }\n },\n\n message: function () {\n return this.xhr ? this.xhr.responseText : ''\n },\n\n progress: function () {\n if (this.pendingRetry) {\n return 0\n }\n var s = this.status()\n if (s === STATUS.SUCCESS || s === STATUS.ERROR) {\n return 1\n } else if (s === STATUS.PENDING) {\n return 0\n } else {\n return this.total > 0 ? this.loaded / this.total : 0\n }\n },\n\n sizeUploaded: function () {\n var size = this.endByte - this.startByte\n // can't return only chunk.loaded value, because it is bigger than chunk size\n if (this.status() !== STATUS.SUCCESS) {\n size = this.progress() * size\n }\n return size\n },\n\n prepareXhrRequest: function (method, isTest, paramsMethod, blob) {\n // Add data from the query options\n var query = utils.evalOpts(this.uploader.opts.query, this.file, this, isTest)\n query = utils.extend(this.getParams(), query)\n\n // processParams\n query = this.uploader.opts.processParams(query, this.file, this, isTest)\n\n var target = utils.evalOpts(this.uploader.opts.target, this.file, this, isTest)\n var data = null\n if (method === 'GET' || paramsMethod === 'octet') {\n // Add data from the query options\n var params = []\n utils.each(query, function (v, k) {\n params.push([encodeURIComponent(k), encodeURIComponent(v)].join('='))\n })\n target = this.getTarget(target, params)\n data = blob || null\n } else {\n // Add data from the query options\n data = new FormData()\n utils.each(query, function (v, k) {\n data.append(k, v)\n })\n if (typeof blob !== 'undefined') {\n data.append(this.uploader.opts.fileParameterName, blob, this.file.name)\n }\n }\n\n this.xhr.open(method, target, true)\n this.xhr.withCredentials = this.uploader.opts.withCredentials\n\n // Add data from header options\n utils.each(utils.evalOpts(this.uploader.opts.headers, this.file, this, isTest), function (v, k) {\n this.xhr.setRequestHeader(k, v)\n }, this)\n\n return data\n }\n\n})\n\nmodule.exports = Chunk\n\n\n//# sourceURL=webpack:///./node_modules/simple-uploader.js/src/chunk.js?")},"./node_modules/simple-uploader.js/src/event.js": -/*!******************************************************!*\ - !*** ./node_modules/simple-uploader.js/src/event.js ***! - \******************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('var each = __webpack_require__(/*! ./utils */ "./node_modules/simple-uploader.js/src/utils.js").each\n\nvar event = {\n\n _eventData: null,\n\n on: function (name, func) {\n if (!this._eventData) this._eventData = {}\n if (!this._eventData[name]) this._eventData[name] = []\n var listened = false\n each(this._eventData[name], function (fuc) {\n if (fuc === func) {\n listened = true\n return false\n }\n })\n if (!listened) {\n this._eventData[name].push(func)\n }\n },\n\n off: function (name, func) {\n if (!this._eventData) this._eventData = {}\n if (!this._eventData[name] || !this._eventData[name].length) return\n if (func) {\n each(this._eventData[name], function (fuc, i) {\n if (fuc === func) {\n this._eventData[name].splice(i, 1)\n return false\n }\n }, this)\n } else {\n this._eventData[name] = []\n }\n },\n\n trigger: function (name) {\n if (!this._eventData) this._eventData = {}\n if (!this._eventData[name]) return true\n var args = this._eventData[name].slice.call(arguments, 1)\n var preventDefault = false\n each(this._eventData[name], function (fuc) {\n preventDefault = fuc.apply(this, args) === false || preventDefault\n }, this)\n return !preventDefault\n }\n}\n\nmodule.exports = event\n\n\n//# sourceURL=webpack:///./node_modules/simple-uploader.js/src/event.js?')},"./node_modules/simple-uploader.js/src/file.js": -/*!*****************************************************!*\ - !*** ./node_modules/simple-uploader.js/src/file.js ***! - \*****************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("var utils = __webpack_require__(/*! ./utils */ \"./node_modules/simple-uploader.js/src/utils.js\")\nvar Chunk = __webpack_require__(/*! ./chunk */ \"./node_modules/simple-uploader.js/src/chunk.js\")\n\nfunction File (uploader, file, parent) {\n utils.defineNonEnumerable(this, 'uploader', uploader)\n this.isRoot = this.isFolder = uploader === this\n utils.defineNonEnumerable(this, 'parent', parent || null)\n utils.defineNonEnumerable(this, 'files', [])\n utils.defineNonEnumerable(this, 'fileList', [])\n utils.defineNonEnumerable(this, 'chunks', [])\n utils.defineNonEnumerable(this, '_errorFiles', [])\n utils.defineNonEnumerable(this, 'file', null)\n this.id = utils.uid()\n\n if (this.isRoot || !file) {\n this.file = null\n } else {\n if (utils.isString(file)) {\n // folder\n this.isFolder = true\n this.file = null\n this.path = file\n if (this.parent.path) {\n file = file.substr(this.parent.path.length)\n }\n this.name = file.charAt(file.length - 1) === '/' ? file.substr(0, file.length - 1) : file\n } else {\n this.file = file\n this.fileType = this.file.type\n this.name = file.fileName || file.name\n this.size = file.size\n this.relativePath = file.relativePath || file.webkitRelativePath || this.name\n this._parseFile()\n }\n }\n\n this.paused = uploader.opts.initialPaused\n this.error = false\n this.allError = false\n this.aborted = false\n this.completed = false\n this.averageSpeed = 0\n this.currentSpeed = 0\n this._lastProgressCallback = Date.now()\n this._prevUploadedSize = 0\n this._prevProgress = 0\n\n this.bootstrap()\n}\n\nutils.extend(File.prototype, {\n\n _parseFile: function () {\n var ppaths = parsePaths(this.relativePath)\n if (ppaths.length) {\n var filePaths = this.uploader.filePaths\n utils.each(ppaths, function (path, i) {\n var folderFile = filePaths[path]\n if (!folderFile) {\n folderFile = new File(this.uploader, path, this.parent)\n filePaths[path] = folderFile\n this._updateParentFileList(folderFile)\n }\n this.parent = folderFile\n folderFile.files.push(this)\n if (!ppaths[i + 1]) {\n folderFile.fileList.push(this)\n }\n }, this)\n } else {\n this._updateParentFileList()\n }\n },\n\n _updateParentFileList: function (file) {\n if (!file) {\n file = this\n }\n var p = this.parent\n if (p) {\n p.fileList.push(file)\n }\n },\n\n _eachAccess: function (eachFn, fileFn) {\n if (this.isFolder) {\n utils.each(this.files, function (f, i) {\n return eachFn.call(this, f, i)\n }, this)\n return\n }\n fileFn.call(this, this)\n },\n\n bootstrap: function () {\n if (this.isFolder) return\n var opts = this.uploader.opts\n if (utils.isFunction(opts.initFileFn)) {\n opts.initFileFn.call(this, this)\n }\n\n this.abort(true)\n this._resetError()\n // Rebuild stack of chunks from file\n this._prevProgress = 0\n var round = opts.forceChunkSize ? Math.ceil : Math.floor\n var chunks = Math.max(round(this.size / opts.chunkSize), 1)\n for (var offset = 0; offset < chunks; offset++) {\n this.chunks.push(new Chunk(this.uploader, this, offset))\n }\n },\n\n _measureSpeed: function () {\n var smoothingFactor = this.uploader.opts.speedSmoothingFactor\n var timeSpan = Date.now() - this._lastProgressCallback\n if (!timeSpan) {\n return\n }\n var uploaded = this.sizeUploaded()\n // Prevent negative upload speed after file upload resume\n this.currentSpeed = Math.max((uploaded - this._prevUploadedSize) / timeSpan * 1000, 0)\n this.averageSpeed = smoothingFactor * this.currentSpeed + (1 - smoothingFactor) * this.averageSpeed\n this._prevUploadedSize = uploaded\n if (this.parent && this.parent._checkProgress()) {\n this.parent._measureSpeed()\n }\n },\n\n _checkProgress: function (file) {\n return Date.now() - this._lastProgressCallback >= this.uploader.opts.progressCallbacksInterval\n },\n\n _chunkEvent: function (chunk, evt, message) {\n var uploader = this.uploader\n var STATUS = Chunk.STATUS\n var that = this\n var rootFile = this.getRoot()\n var triggerProgress = function () {\n that._measureSpeed()\n uploader._trigger('fileProgress', rootFile, that, chunk)\n that._lastProgressCallback = Date.now()\n }\n switch (evt) {\n case STATUS.PROGRESS:\n if (this._checkProgress()) {\n triggerProgress()\n }\n break\n case STATUS.ERROR:\n this._error()\n this.abort(true)\n uploader._trigger('fileError', rootFile, this, message, chunk)\n break\n case STATUS.SUCCESS:\n this._updateUploadedChunks(message, chunk)\n if (this.error) {\n return\n }\n clearTimeout(this._progeressId)\n this._progeressId = 0\n var timeDiff = Date.now() - this._lastProgressCallback\n if (timeDiff < uploader.opts.progressCallbacksInterval) {\n this._progeressId = setTimeout(triggerProgress, uploader.opts.progressCallbacksInterval - timeDiff)\n }\n if (this.isComplete()) {\n clearTimeout(this._progeressId)\n triggerProgress()\n this.currentSpeed = 0\n this.averageSpeed = 0\n uploader._trigger('fileSuccess', rootFile, this, message, chunk)\n if (rootFile.isComplete()) {\n uploader._trigger('fileComplete', rootFile, this)\n }\n } else if (!this._progeressId) {\n triggerProgress()\n }\n break\n case STATUS.RETRY:\n uploader._trigger('fileRetry', rootFile, this, chunk)\n break\n }\n },\n\n _updateUploadedChunks: function (message, chunk) {\n var checkChunkUploaded = this.uploader.opts.checkChunkUploadedByResponse\n if (checkChunkUploaded) {\n var xhr = chunk.xhr\n utils.each(this.chunks, function (_chunk) {\n if (!_chunk.tested) {\n var uploaded = checkChunkUploaded.call(this, _chunk, message)\n if (_chunk === chunk && !uploaded) {\n // fix the first chunk xhr status\n // treated as success but checkChunkUploaded is false\n // so the current chunk should be uploaded again\n _chunk.xhr = null\n }\n if (uploaded) {\n // first success and other chunks are uploaded\n // then set xhr, so the uploaded chunks\n // will be treated as success too\n _chunk.xhr = xhr\n }\n _chunk.tested = true\n }\n }, this)\n if (!this._firstResponse) {\n this._firstResponse = true\n this.uploader.upload(true)\n } else {\n this.uploader.uploadNextChunk()\n }\n } else {\n this.uploader.uploadNextChunk()\n }\n },\n\n _error: function () {\n this.error = this.allError = true\n var parent = this.parent\n while (parent && parent !== this.uploader) {\n parent._errorFiles.push(this)\n parent.error = true\n if (parent._errorFiles.length === parent.files.length) {\n parent.allError = true\n }\n parent = parent.parent\n }\n },\n\n _resetError: function () {\n this.error = this.allError = false\n var parent = this.parent\n var index = -1\n while (parent && parent !== this.uploader) {\n index = parent._errorFiles.indexOf(this)\n parent._errorFiles.splice(index, 1)\n parent.allError = false\n if (!parent._errorFiles.length) {\n parent.error = false\n }\n parent = parent.parent\n }\n },\n\n isComplete: function () {\n if (!this.completed) {\n var outstanding = false\n this._eachAccess(function (file) {\n if (!file.isComplete()) {\n outstanding = true\n return false\n }\n }, function () {\n if (this.error) {\n outstanding = true\n } else {\n var STATUS = Chunk.STATUS\n utils.each(this.chunks, function (chunk) {\n var status = chunk.status()\n if (status === STATUS.ERROR || status === STATUS.PENDING || status === STATUS.UPLOADING || status === STATUS.READING || chunk.preprocessState === 1 || chunk.readState === 1) {\n outstanding = true\n return false\n }\n })\n }\n })\n this.completed = !outstanding\n }\n return this.completed\n },\n\n isUploading: function () {\n var uploading = false\n this._eachAccess(function (file) {\n if (file.isUploading()) {\n uploading = true\n return false\n }\n }, function () {\n var uploadingStatus = Chunk.STATUS.UPLOADING\n utils.each(this.chunks, function (chunk) {\n if (chunk.status() === uploadingStatus) {\n uploading = true\n return false\n }\n })\n })\n return uploading\n },\n\n resume: function () {\n this._eachAccess(function (f) {\n f.resume()\n }, function () {\n this.paused = false\n this.aborted = false\n this.uploader.upload()\n })\n this.paused = false\n this.aborted = false\n },\n\n pause: function () {\n this._eachAccess(function (f) {\n f.pause()\n }, function () {\n this.paused = true\n this.abort()\n })\n this.paused = true\n },\n\n cancel: function () {\n this.uploader.removeFile(this)\n },\n\n retry: function (file) {\n var fileRetry = function (file) {\n if (file.error) {\n file.bootstrap()\n }\n }\n if (file) {\n file.bootstrap()\n } else {\n this._eachAccess(fileRetry, function () {\n this.bootstrap()\n })\n }\n this.uploader.upload()\n },\n\n abort: function (reset) {\n if (this.aborted) {\n return\n }\n this.currentSpeed = 0\n this.averageSpeed = 0\n this.aborted = !reset\n var chunks = this.chunks\n if (reset) {\n this.chunks = []\n }\n var uploadingStatus = Chunk.STATUS.UPLOADING\n utils.each(chunks, function (c) {\n if (c.status() === uploadingStatus) {\n c.abort()\n this.uploader.uploadNextChunk()\n }\n }, this)\n },\n\n progress: function () {\n var totalDone = 0\n var totalSize = 0\n var ret = 0\n this._eachAccess(function (file, index) {\n totalDone += file.progress() * file.size\n totalSize += file.size\n if (index === this.files.length - 1) {\n ret = totalSize > 0 ? totalDone / totalSize : this.isComplete() ? 1 : 0\n }\n }, function () {\n if (this.error) {\n ret = 1\n return\n }\n if (this.chunks.length === 1) {\n this._prevProgress = Math.max(this._prevProgress, this.chunks[0].progress())\n ret = this._prevProgress\n return\n }\n // Sum up progress across everything\n var bytesLoaded = 0\n utils.each(this.chunks, function (c) {\n // get chunk progress relative to entire file\n bytesLoaded += c.progress() * (c.endByte - c.startByte)\n })\n var percent = bytesLoaded / this.size\n // We don't want to lose percentages when an upload is paused\n this._prevProgress = Math.max(this._prevProgress, percent > 0.9999 ? 1 : percent)\n ret = this._prevProgress\n })\n return ret\n },\n\n getSize: function () {\n var size = 0\n this._eachAccess(function (file) {\n size += file.size\n }, function () {\n size += this.size\n })\n return size\n },\n\n getFormatSize: function () {\n var size = this.getSize()\n return utils.formatSize(size)\n },\n\n getRoot: function () {\n if (this.isRoot) {\n return this\n }\n var parent = this.parent\n while (parent) {\n if (parent.parent === this.uploader) {\n // find it\n return parent\n }\n parent = parent.parent\n }\n return this\n },\n\n sizeUploaded: function () {\n var size = 0\n this._eachAccess(function (file) {\n size += file.sizeUploaded()\n }, function () {\n utils.each(this.chunks, function (chunk) {\n size += chunk.sizeUploaded()\n })\n })\n return size\n },\n\n timeRemaining: function () {\n var ret = 0\n var sizeDelta = 0\n var averageSpeed = 0\n this._eachAccess(function (file, i) {\n if (!file.paused && !file.error) {\n sizeDelta += file.size - file.sizeUploaded()\n averageSpeed += file.averageSpeed\n }\n if (i === this.files.length - 1) {\n ret = calRet(sizeDelta, averageSpeed)\n }\n }, function () {\n if (this.paused || this.error) {\n ret = 0\n return\n }\n var delta = this.size - this.sizeUploaded()\n ret = calRet(delta, this.averageSpeed)\n })\n return ret\n function calRet (delta, averageSpeed) {\n if (delta && !averageSpeed) {\n return Number.POSITIVE_INFINITY\n }\n if (!delta && !averageSpeed) {\n return 0\n }\n return Math.floor(delta / averageSpeed)\n }\n },\n\n removeFile: function (file) {\n if (file.isFolder) {\n while (file.files.length) {\n var f = file.files[file.files.length - 1]\n this._removeFile(f)\n }\n }\n this._removeFile(file)\n },\n\n _delFilePath: function (file) {\n if (file.path && this.filePaths) {\n delete this.filePaths[file.path]\n }\n utils.each(file.fileList, function (file) {\n this._delFilePath(file)\n }, this)\n },\n\n _removeFile: function (file) {\n if (!file.isFolder) {\n utils.each(this.files, function (f, i) {\n if (f === file) {\n this.files.splice(i, 1)\n return false\n }\n }, this)\n file.abort()\n var parent = file.parent\n var newParent\n while (parent && parent !== this) {\n newParent = parent.parent\n parent._removeFile(file)\n parent = newParent\n }\n }\n file.parent === this && utils.each(this.fileList, function (f, i) {\n if (f === file) {\n this.fileList.splice(i, 1)\n return false\n }\n }, this)\n if (!this.isRoot && this.isFolder && !this.files.length) {\n this.parent._removeFile(this)\n this.uploader._delFilePath(this)\n }\n file.parent = null\n },\n\n getType: function () {\n if (this.isFolder) {\n return 'folder'\n }\n return this.file.type && this.file.type.split('/')[1]\n },\n\n getExtension: function () {\n if (this.isFolder) {\n return ''\n }\n return this.name.substr((~-this.name.lastIndexOf('.') >>> 0) + 2).toLowerCase()\n }\n\n})\n\nmodule.exports = File\n\nfunction parsePaths (path) {\n var ret = []\n var paths = path.split('/')\n var len = paths.length\n var i = 1\n paths.splice(len - 1, 1)\n len--\n if (paths.length) {\n while (i <= len) {\n ret.push(paths.slice(0, i++).join('/') + '/')\n }\n }\n return ret\n}\n\n\n//# sourceURL=webpack:///./node_modules/simple-uploader.js/src/file.js?")},"./node_modules/simple-uploader.js/src/uploader.js": -/*!*********************************************************!*\ - !*** ./node_modules/simple-uploader.js/src/uploader.js ***! - \*********************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("var utils = __webpack_require__(/*! ./utils */ \"./node_modules/simple-uploader.js/src/utils.js\")\nvar event = __webpack_require__(/*! ./event */ \"./node_modules/simple-uploader.js/src/event.js\")\nvar File = __webpack_require__(/*! ./file */ \"./node_modules/simple-uploader.js/src/file.js\")\nvar Chunk = __webpack_require__(/*! ./chunk */ \"./node_modules/simple-uploader.js/src/chunk.js\")\n\nvar version = '__VERSION__'\n\nvar isServer = typeof window === 'undefined'\n\n// ie10+\nvar ie10plus = isServer ? false : window.navigator.msPointerEnabled\nvar support = (function () {\n if (isServer) {\n return false\n }\n var sliceName = 'slice'\n var _support = utils.isDefined(window.File) && utils.isDefined(window.Blob) &&\n utils.isDefined(window.FileList)\n var bproto = null\n if (_support) {\n bproto = window.Blob.prototype\n utils.each(['slice', 'webkitSlice', 'mozSlice'], function (n) {\n if (bproto[n]) {\n sliceName = n\n return false\n }\n })\n _support = !!bproto[sliceName]\n }\n if (_support) Uploader.sliceName = sliceName\n bproto = null\n return _support\n})()\n\nvar supportDirectory = (function () {\n if (isServer) {\n return false\n }\n var input = window.document.createElement('input')\n input.type = 'file'\n var sd = 'webkitdirectory' in input || 'directory' in input\n input = null\n return sd\n})()\n\nfunction Uploader (opts) {\n this.support = support\n /* istanbul ignore if */\n if (!this.support) {\n return\n }\n this.supportDirectory = supportDirectory\n utils.defineNonEnumerable(this, 'filePaths', {})\n this.opts = utils.extend({}, Uploader.defaults, opts || {})\n\n this.preventEvent = utils.bind(this._preventEvent, this)\n\n File.call(this, this)\n}\n\n/**\n * Default read function using the webAPI\n *\n * @function webAPIFileRead(fileObj, fileType, startByte, endByte, chunk)\n *\n */\nvar webAPIFileRead = function (fileObj, fileType, startByte, endByte, chunk) {\n chunk.readFinished(fileObj.file[Uploader.sliceName](startByte, endByte, fileType))\n}\n\nUploader.version = version\n\nUploader.defaults = {\n chunkSize: 1024 * 1024,\n forceChunkSize: false,\n simultaneousUploads: 3,\n singleFile: false,\n fileParameterName: 'file',\n progressCallbacksInterval: 500,\n speedSmoothingFactor: 0.1,\n query: {},\n headers: {},\n withCredentials: false,\n preprocess: null,\n method: 'multipart',\n testMethod: 'GET',\n uploadMethod: 'POST',\n prioritizeFirstAndLastChunk: false,\n allowDuplicateUploads: false,\n target: '/',\n testChunks: true,\n generateUniqueIdentifier: null,\n maxChunkRetries: 0,\n chunkRetryInterval: null,\n permanentErrors: [404, 415, 500, 501],\n successStatuses: [200, 201, 202],\n onDropStopPropagation: false,\n initFileFn: null,\n readFileFn: webAPIFileRead,\n checkChunkUploadedByResponse: null,\n initialPaused: false,\n processResponse: function (response, cb) {\n cb(null, response)\n },\n processParams: function (params) {\n return params\n }\n}\n\nUploader.utils = utils\nUploader.event = event\nUploader.File = File\nUploader.Chunk = Chunk\n\n// inherit file\nUploader.prototype = utils.extend({}, File.prototype)\n// inherit event\nutils.extend(Uploader.prototype, event)\nutils.extend(Uploader.prototype, {\n\n constructor: Uploader,\n\n _trigger: function (name) {\n var args = utils.toArray(arguments)\n var preventDefault = !this.trigger.apply(this, arguments)\n if (name !== 'catchAll') {\n args.unshift('catchAll')\n preventDefault = !this.trigger.apply(this, args) || preventDefault\n }\n return !preventDefault\n },\n\n _triggerAsync: function () {\n var args = arguments\n utils.nextTick(function () {\n this._trigger.apply(this, args)\n }, this)\n },\n\n addFiles: function (files, evt) {\n var _files = []\n var oldFileListLen = this.fileList.length\n utils.each(files, function (file) {\n // Uploading empty file IE10/IE11 hangs indefinitely\n // Directories have size `0` and name `.`\n // Ignore already added files if opts.allowDuplicateUploads is set to false\n if ((!ie10plus || ie10plus && file.size > 0) && !(file.size % 4096 === 0 && (file.name === '.' || file.fileName === '.'))) {\n var uniqueIdentifier = this.generateUniqueIdentifier(file)\n if (this.opts.allowDuplicateUploads || !this.getFromUniqueIdentifier(uniqueIdentifier)) {\n var _file = new File(this, file, this)\n _file.uniqueIdentifier = uniqueIdentifier\n if (this._trigger('fileAdded', _file, evt)) {\n _files.push(_file)\n } else {\n File.prototype.removeFile.call(this, _file)\n }\n }\n }\n }, this)\n // get new fileList\n var newFileList = this.fileList.slice(oldFileListLen)\n if (this._trigger('filesAdded', _files, newFileList, evt)) {\n utils.each(_files, function (file) {\n if (this.opts.singleFile && this.files.length > 0) {\n this.removeFile(this.files[0])\n }\n this.files.push(file)\n }, this)\n this._trigger('filesSubmitted', _files, newFileList, evt)\n } else {\n utils.each(newFileList, function (file) {\n File.prototype.removeFile.call(this, file)\n }, this)\n }\n },\n\n addFile: function (file, evt) {\n this.addFiles([file], evt)\n },\n\n cancel: function () {\n for (var i = this.fileList.length - 1; i >= 0; i--) {\n this.fileList[i].cancel()\n }\n },\n\n removeFile: function (file) {\n File.prototype.removeFile.call(this, file)\n this._trigger('fileRemoved', file)\n },\n\n generateUniqueIdentifier: function (file) {\n var custom = this.opts.generateUniqueIdentifier\n if (utils.isFunction(custom)) {\n return custom(file)\n }\n /* istanbul ignore next */\n // Some confusion in different versions of Firefox\n var relativePath = file.relativePath || file.webkitRelativePath || file.fileName || file.name\n /* istanbul ignore next */\n return file.size + '-' + relativePath.replace(/[^0-9a-zA-Z_-]/img, '')\n },\n\n getFromUniqueIdentifier: function (uniqueIdentifier) {\n var ret = false\n utils.each(this.files, function (file) {\n if (file.uniqueIdentifier === uniqueIdentifier) {\n ret = file\n return false\n }\n })\n return ret\n },\n\n uploadNextChunk: function (preventEvents) {\n var found = false\n var pendingStatus = Chunk.STATUS.PENDING\n var checkChunkUploaded = this.uploader.opts.checkChunkUploadedByResponse\n if (this.opts.prioritizeFirstAndLastChunk) {\n utils.each(this.files, function (file) {\n if (file.paused) {\n return\n }\n if (checkChunkUploaded && !file._firstResponse && file.isUploading()) {\n // waiting for current file's first chunk response\n return\n }\n if (file.chunks.length && file.chunks[0].status() === pendingStatus) {\n file.chunks[0].send()\n found = true\n return false\n }\n if (file.chunks.length > 1 && file.chunks[file.chunks.length - 1].status() === pendingStatus) {\n file.chunks[file.chunks.length - 1].send()\n found = true\n return false\n }\n })\n if (found) {\n return found\n }\n }\n\n // Now, simply look for the next, best thing to upload\n utils.each(this.files, function (file) {\n if (!file.paused) {\n if (checkChunkUploaded && !file._firstResponse && file.isUploading()) {\n // waiting for current file's first chunk response\n return\n }\n utils.each(file.chunks, function (chunk) {\n if (chunk.status() === pendingStatus) {\n chunk.send()\n found = true\n return false\n }\n })\n }\n if (found) {\n return false\n }\n })\n if (found) {\n return true\n }\n\n // The are no more outstanding chunks to upload, check is everything is done\n var outstanding = false\n utils.each(this.files, function (file) {\n if (!file.isComplete()) {\n outstanding = true\n return false\n }\n })\n // should check files now\n // if now files in list\n // should not trigger complete event\n if (!outstanding && !preventEvents && this.files.length) {\n // All chunks have been uploaded, complete\n this._triggerAsync('complete')\n }\n return outstanding\n },\n\n upload: function (preventEvents) {\n // Make sure we don't start too many uploads at once\n var ret = this._shouldUploadNext()\n if (ret === false) {\n return\n }\n !preventEvents && this._trigger('uploadStart')\n var started = false\n for (var num = 1; num <= this.opts.simultaneousUploads - ret; num++) {\n started = this.uploadNextChunk(!preventEvents) || started\n if (!started && preventEvents) {\n // completed\n break\n }\n }\n if (!started && !preventEvents) {\n this._triggerAsync('complete')\n }\n },\n\n /**\n * should upload next chunk\n * @function\n * @returns {Boolean|Number}\n */\n _shouldUploadNext: function () {\n var num = 0\n var should = true\n var simultaneousUploads = this.opts.simultaneousUploads\n var uploadingStatus = Chunk.STATUS.UPLOADING\n utils.each(this.files, function (file) {\n utils.each(file.chunks, function (chunk) {\n if (chunk.status() === uploadingStatus) {\n num++\n if (num >= simultaneousUploads) {\n should = false\n return false\n }\n }\n })\n return should\n })\n // if should is true then return uploading chunks's length\n return should && num\n },\n\n /**\n * Assign a browse action to one or more DOM nodes.\n * @function\n * @param {Element|Array.} domNodes\n * @param {boolean} isDirectory Pass in true to allow directories to\n * @param {boolean} singleFile prevent multi file upload\n * @param {Object} attributes set custom attributes:\n * http://www.w3.org/TR/html-markup/input.file.html#input.file-attributes\n * eg: accept: 'image/*'\n * be selected (Chrome only).\n */\n assignBrowse: function (domNodes, isDirectory, singleFile, attributes) {\n if (typeof domNodes.length === 'undefined') {\n domNodes = [domNodes]\n }\n\n utils.each(domNodes, function (domNode) {\n var input\n if (domNode.tagName === 'INPUT' && domNode.type === 'file') {\n input = domNode\n } else {\n input = document.createElement('input')\n input.setAttribute('type', 'file')\n // display:none - not working in opera 12\n utils.extend(input.style, {\n visibility: 'hidden',\n position: 'absolute',\n width: '1px',\n height: '1px'\n })\n // for opera 12 browser, input must be assigned to a document\n domNode.appendChild(input)\n // https://developer.mozilla.org/en/using_files_from_web_applications)\n // event listener is executed two times\n // first one - original mouse click event\n // second - input.click(), input is inside domNode\n domNode.addEventListener('click', function (e) {\n if (domNode.tagName.toLowerCase() === 'label') {\n return\n }\n input.click()\n }, false)\n }\n if (!this.opts.singleFile && !singleFile) {\n input.setAttribute('multiple', 'multiple')\n }\n if (isDirectory) {\n input.setAttribute('webkitdirectory', 'webkitdirectory')\n }\n attributes && utils.each(attributes, function (value, key) {\n input.setAttribute(key, value)\n })\n // When new files are added, simply append them to the overall list\n var that = this\n input.addEventListener('change', function (e) {\n that._trigger(e.type, e)\n if (e.target.value) {\n that.addFiles(e.target.files, e)\n e.target.value = ''\n }\n }, false)\n }, this)\n },\n\n onDrop: function (evt) {\n this._trigger(evt.type, evt)\n if (this.opts.onDropStopPropagation) {\n evt.stopPropagation()\n }\n evt.preventDefault()\n this._parseDataTransfer(evt.dataTransfer, evt)\n },\n\n _parseDataTransfer: function (dataTransfer, evt) {\n if (dataTransfer.items && dataTransfer.items[0] &&\n dataTransfer.items[0].webkitGetAsEntry) {\n this.webkitReadDataTransfer(dataTransfer, evt)\n } else {\n this.addFiles(dataTransfer.files, evt)\n }\n },\n\n webkitReadDataTransfer: function (dataTransfer, evt) {\n var self = this\n var queue = dataTransfer.items.length\n var files = []\n utils.each(dataTransfer.items, function (item) {\n var entry = item.webkitGetAsEntry()\n if (!entry) {\n decrement()\n return\n }\n if (entry.isFile) {\n // due to a bug in Chrome's File System API impl - #149735\n fileReadSuccess(item.getAsFile(), entry.fullPath)\n } else {\n readDirectory(entry.createReader())\n }\n })\n function readDirectory (reader) {\n reader.readEntries(function (entries) {\n if (entries.length) {\n queue += entries.length\n utils.each(entries, function (entry) {\n if (entry.isFile) {\n var fullPath = entry.fullPath\n entry.file(function (file) {\n fileReadSuccess(file, fullPath)\n }, readError)\n } else if (entry.isDirectory) {\n readDirectory(entry.createReader())\n }\n })\n readDirectory(reader)\n } else {\n decrement()\n }\n }, readError)\n }\n function fileReadSuccess (file, fullPath) {\n // relative path should not start with \"/\"\n file.relativePath = fullPath.substring(1)\n files.push(file)\n decrement()\n }\n function readError (fileError) {\n throw fileError\n }\n function decrement () {\n if (--queue === 0) {\n self.addFiles(files, evt)\n }\n }\n },\n\n _assignHelper: function (domNodes, handles, remove) {\n if (typeof domNodes.length === 'undefined') {\n domNodes = [domNodes]\n }\n var evtMethod = remove ? 'removeEventListener' : 'addEventListener'\n utils.each(domNodes, function (domNode) {\n utils.each(handles, function (handler, name) {\n domNode[evtMethod](name, handler, false)\n }, this)\n }, this)\n },\n\n _preventEvent: function (e) {\n utils.preventEvent(e)\n this._trigger(e.type, e)\n },\n\n /**\n * Assign one or more DOM nodes as a drop target.\n * @function\n * @param {Element|Array.} domNodes\n */\n assignDrop: function (domNodes) {\n this._onDrop = utils.bind(this.onDrop, this)\n this._assignHelper(domNodes, {\n dragover: this.preventEvent,\n dragenter: this.preventEvent,\n dragleave: this.preventEvent,\n drop: this._onDrop\n })\n },\n\n /**\n * Un-assign drop event from DOM nodes\n * @function\n * @param domNodes\n */\n unAssignDrop: function (domNodes) {\n this._assignHelper(domNodes, {\n dragover: this.preventEvent,\n dragenter: this.preventEvent,\n dragleave: this.preventEvent,\n drop: this._onDrop\n }, true)\n this._onDrop = null\n }\n})\n\nmodule.exports = Uploader\n\n\n//# sourceURL=webpack:///./node_modules/simple-uploader.js/src/uploader.js?")},"./node_modules/simple-uploader.js/src/utils.js": -/*!******************************************************!*\ - !*** ./node_modules/simple-uploader.js/src/utils.js ***! - \******************************************************/ -/*! no static exports found */function(module,exports){eval("var oproto = Object.prototype\nvar aproto = Array.prototype\nvar serialize = oproto.toString\n\nvar isFunction = function (fn) {\n return serialize.call(fn) === '[object Function]'\n}\n\nvar isArray = Array.isArray || /* istanbul ignore next */ function (ary) {\n return serialize.call(ary) === '[object Array]'\n}\n\nvar isPlainObject = function (obj) {\n return serialize.call(obj) === '[object Object]' && Object.getPrototypeOf(obj) === oproto\n}\n\nvar i = 0\nvar utils = {\n uid: function () {\n return ++i\n },\n noop: function () {},\n bind: function (fn, context) {\n return function () {\n return fn.apply(context, arguments)\n }\n },\n preventEvent: function (evt) {\n evt.preventDefault()\n },\n stop: function (evt) {\n evt.preventDefault()\n evt.stopPropagation()\n },\n nextTick: function (fn, context) {\n setTimeout(utils.bind(fn, context), 0)\n },\n toArray: function (ary, start, end) {\n if (start === undefined) start = 0\n if (end === undefined) end = ary.length\n return aproto.slice.call(ary, start, end)\n },\n\n isPlainObject: isPlainObject,\n isFunction: isFunction,\n isArray: isArray,\n isObject: function (obj) {\n return Object(obj) === obj\n },\n isString: function (s) {\n return typeof s === 'string'\n },\n isUndefined: function (a) {\n return typeof a === 'undefined'\n },\n isDefined: function (a) {\n return typeof a !== 'undefined'\n },\n\n each: function (ary, func, context) {\n if (utils.isDefined(ary.length)) {\n for (var i = 0, len = ary.length; i < len; i++) {\n if (func.call(context, ary[i], i, ary) === false) {\n break\n }\n }\n } else {\n for (var k in ary) {\n if (func.call(context, ary[k], k, ary) === false) {\n break\n }\n }\n }\n },\n\n /**\n * If option is a function, evaluate it with given params\n * @param {*} data\n * @param {...} args arguments of a callback\n * @returns {*}\n */\n evalOpts: function (data, args) {\n if (utils.isFunction(data)) {\n // `arguments` is an object, not array, in FF, so:\n args = utils.toArray(arguments)\n data = data.apply(null, args.slice(1))\n }\n return data\n },\n\n extend: function () {\n var options\n var name\n var src\n var copy\n var copyIsArray\n var clone\n var target = arguments[0] || {}\n var i = 1\n var length = arguments.length\n var force = false\n\n // 如果第一个参数为布尔,判定是否深拷贝\n if (typeof target === 'boolean') {\n force = target\n target = arguments[1] || {}\n i++\n }\n\n // 确保接受方为一个复杂的数据类型\n if (typeof target !== 'object' && !isFunction(target)) {\n target = {}\n }\n\n // 如果只有一个参数,那么新成员添加于 extend 所在的对象上\n if (i === length) {\n target = this\n i--\n }\n\n for (; i < length; i++) {\n // 只处理非空参数\n if ((options = arguments[i]) != null) {\n for (name in options) {\n src = target[name]\n copy = options[name]\n\n // 防止环引用\n if (target === copy) {\n continue\n }\n if (force && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n if (copyIsArray) {\n copyIsArray = false\n clone = src && isArray(src) ? src : []\n } else {\n clone = src && isPlainObject(src) ? src : {}\n }\n target[name] = utils.extend(force, clone, copy)\n } else if (copy !== undefined) {\n target[name] = copy\n }\n }\n }\n }\n return target\n },\n\n formatSize: function (size) {\n if (size < 1024) {\n return size.toFixed(0) + ' bytes'\n } else if (size < 1024 * 1024) {\n return (size / 1024.0).toFixed(0) + ' KB'\n } else if (size < 1024 * 1024 * 1024) {\n return (size / 1024.0 / 1024.0).toFixed(1) + ' MB'\n } else {\n return (size / 1024.0 / 1024.0 / 1024.0).toFixed(1) + ' GB'\n }\n },\n\n defineNonEnumerable: function (target, key, value) {\n Object.defineProperty(target, key, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n })\n }\n}\n\nmodule.exports = utils\n\n\n//# sourceURL=webpack:///./node_modules/simple-uploader.js/src/utils.js?")}}]); \ No newline at end of file diff --git a/web/js/10.js b/web/js/10.js deleted file mode 100644 index e74e9c0..0000000 --- a/web/js/10.js +++ /dev/null @@ -1,21 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=script&lang=js&": -/*!***************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=script&lang=js& ***! - \***************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.json.stringify.js */ "./node_modules/core-js/modules/es.json.stringify.js");\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _mixins_mixin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/mixins/mixin */ "./src/mixins/mixin.js");\n/* harmony import */ var mime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mime */ "./node_modules/mime/index.js");\n/* harmony import */ var mime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(mime__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-codemirror */ "./node_modules/vue-codemirror/dist/vue-codemirror.js");\n/* harmony import */ var vue_codemirror__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_codemirror__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ "./node_modules/codemirror/lib/codemirror.css");\n/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var codemirror_theme_monokai_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! codemirror/theme/monokai.css */ "./node_modules/codemirror/theme/monokai.css");\n/* harmony import */ var codemirror_theme_monokai_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(codemirror_theme_monokai_css__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var codemirror_addon_selection_active_line_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! codemirror/addon/selection/active-line.js */ "./node_modules/codemirror/addon/selection/active-line.js");\n/* harmony import */ var codemirror_addon_selection_active_line_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_selection_active_line_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var codemirror_addon_selection_mark_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! codemirror/addon/selection/mark-selection.js */ "./node_modules/codemirror/addon/selection/mark-selection.js");\n/* harmony import */ var codemirror_addon_selection_mark_selection_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_selection_mark_selection_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var codemirror_addon_search_searchcursor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! codemirror/addon/search/searchcursor.js */ "./node_modules/codemirror/addon/search/searchcursor.js");\n/* harmony import */ var codemirror_addon_search_searchcursor_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_search_searchcursor_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var codemirror_addon_hint_show_hint_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! codemirror/addon/hint/show-hint.js */ "./node_modules/codemirror/addon/hint/show-hint.js");\n/* harmony import */ var codemirror_addon_hint_show_hint_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_hint_show_hint_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var codemirror_addon_hint_show_hint_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! codemirror/addon/hint/show-hint.css */ "./node_modules/codemirror/addon/hint/show-hint.css");\n/* harmony import */ var codemirror_addon_hint_show_hint_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_hint_show_hint_css__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var codemirror_addon_hint_javascript_hint_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! codemirror/addon/hint/javascript-hint.js */ "./node_modules/codemirror/addon/hint/javascript-hint.js");\n/* harmony import */ var codemirror_addon_hint_javascript_hint_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_hint_javascript_hint_js__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var codemirror_addon_scroll_annotatescrollbar_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! codemirror/addon/scroll/annotatescrollbar.js */ "./node_modules/codemirror/addon/scroll/annotatescrollbar.js");\n/* harmony import */ var codemirror_addon_scroll_annotatescrollbar_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_scroll_annotatescrollbar_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var codemirror_addon_scroll_simplescrollbars__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! codemirror/addon/scroll/simplescrollbars */ "./node_modules/codemirror/addon/scroll/simplescrollbars.js");\n/* harmony import */ var codemirror_addon_scroll_simplescrollbars__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_scroll_simplescrollbars__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var codemirror_addon_scroll_simplescrollbars_css__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! codemirror/addon/scroll/simplescrollbars.css */ "./node_modules/codemirror/addon/scroll/simplescrollbars.css");\n/* harmony import */ var codemirror_addon_scroll_simplescrollbars_css__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_scroll_simplescrollbars_css__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var codemirror_addon_search_matchesonscrollbar_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! codemirror/addon/search/matchesonscrollbar.js */ "./node_modules/codemirror/addon/search/matchesonscrollbar.js");\n/* harmony import */ var codemirror_addon_search_matchesonscrollbar_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_search_matchesonscrollbar_js__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var codemirror_addon_search_match_highlighter_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! codemirror/addon/search/match-highlighter.js */ "./node_modules/codemirror/addon/search/match-highlighter.js");\n/* harmony import */ var codemirror_addon_search_match_highlighter_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_search_match_highlighter_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var codemirror_mode_clike_clike_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! codemirror/mode/clike/clike.js */ "./node_modules/codemirror/mode/clike/clike.js");\n/* harmony import */ var codemirror_mode_clike_clike_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_clike_clike_js__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var codemirror_addon_edit_matchbrackets_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! codemirror/addon/edit/matchbrackets.js */ "./node_modules/codemirror/addon/edit/matchbrackets.js");\n/* harmony import */ var codemirror_addon_edit_matchbrackets_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_edit_matchbrackets_js__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var codemirror_addon_comment_comment_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! codemirror/addon/comment/comment.js */ "./node_modules/codemirror/addon/comment/comment.js");\n/* harmony import */ var codemirror_addon_comment_comment_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_comment_comment_js__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var codemirror_addon_dialog_dialog_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! codemirror/addon/dialog/dialog.js */ "./node_modules/codemirror/addon/dialog/dialog.js");\n/* harmony import */ var codemirror_addon_dialog_dialog_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_dialog_dialog_js__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var codemirror_addon_dialog_dialog_css__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! codemirror/addon/dialog/dialog.css */ "./node_modules/codemirror/addon/dialog/dialog.css");\n/* harmony import */ var codemirror_addon_dialog_dialog_css__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_dialog_dialog_css__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var codemirror_addon_search_search_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! codemirror/addon/search/search.js */ "./node_modules/codemirror/addon/search/search.js");\n/* harmony import */ var codemirror_addon_search_search_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_search_search_js__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var codemirror_keymap_sublime_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! codemirror/keymap/sublime.js */ "./node_modules/codemirror/keymap/sublime.js");\n/* harmony import */ var codemirror_keymap_sublime_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(codemirror_keymap_sublime_js__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var codemirror_addon_fold_foldgutter_css__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! codemirror/addon/fold/foldgutter.css */ "./node_modules/codemirror/addon/fold/foldgutter.css");\n/* harmony import */ var codemirror_addon_fold_foldgutter_css__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_foldgutter_css__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var codemirror_addon_fold_brace_fold_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! codemirror/addon/fold/brace-fold.js */ "./node_modules/codemirror/addon/fold/brace-fold.js");\n/* harmony import */ var codemirror_addon_fold_brace_fold_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_brace_fold_js__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var codemirror_addon_fold_comment_fold_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! codemirror/addon/fold/comment-fold.js */ "./node_modules/codemirror/addon/fold/comment-fold.js");\n/* harmony import */ var codemirror_addon_fold_comment_fold_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_comment_fold_js__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var codemirror_addon_fold_foldcode_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! codemirror/addon/fold/foldcode.js */ "./node_modules/codemirror/addon/fold/foldcode.js");\n/* harmony import */ var codemirror_addon_fold_foldcode_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_foldcode_js__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var codemirror_addon_fold_foldgutter_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! codemirror/addon/fold/foldgutter.js */ "./node_modules/codemirror/addon/fold/foldgutter.js");\n/* harmony import */ var codemirror_addon_fold_foldgutter_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_foldgutter_js__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var codemirror_addon_fold_indent_fold_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! codemirror/addon/fold/indent-fold.js */ "./node_modules/codemirror/addon/fold/indent-fold.js");\n/* harmony import */ var codemirror_addon_fold_indent_fold_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_indent_fold_js__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var codemirror_addon_fold_markdown_fold_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! codemirror/addon/fold/markdown-fold.js */ "./node_modules/codemirror/addon/fold/markdown-fold.js");\n/* harmony import */ var codemirror_addon_fold_markdown_fold_js__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_markdown_fold_js__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var codemirror_addon_fold_xml_fold_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! codemirror/addon/fold/xml-fold.js */ "./node_modules/codemirror/addon/fold/xml-fold.js");\n/* harmony import */ var codemirror_addon_fold_xml_fold_js__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_fold_xml_fold_js__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var codemirror_mode_javascript_javascript__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! codemirror/mode/javascript/javascript */ "./node_modules/codemirror/mode/javascript/javascript.js");\n/* harmony import */ var codemirror_mode_javascript_javascript__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_javascript_javascript__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var codemirror_mode_go_go__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! codemirror/mode/go/go */ "./node_modules/codemirror/mode/go/go.js");\n/* harmony import */ var codemirror_mode_go_go__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_go_go__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var codemirror_mode_htmlmixed_htmlmixed__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! codemirror/mode/htmlmixed/htmlmixed */ "./node_modules/codemirror/mode/htmlmixed/htmlmixed.js");\n/* harmony import */ var codemirror_mode_htmlmixed_htmlmixed__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_htmlmixed_htmlmixed__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var codemirror_mode_htmlembedded_htmlembedded__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! codemirror/mode/htmlembedded/htmlembedded */ "./node_modules/codemirror/mode/htmlembedded/htmlembedded.js");\n/* harmony import */ var codemirror_mode_htmlembedded_htmlembedded__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_htmlembedded_htmlembedded__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var codemirror_mode_http_http__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! codemirror/mode/http/http */ "./node_modules/codemirror/mode/http/http.js");\n/* harmony import */ var codemirror_mode_http_http__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_http_http__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var codemirror_mode_php_php__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! codemirror/mode/php/php */ "./node_modules/codemirror/mode/php/php.js");\n/* harmony import */ var codemirror_mode_php_php__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_php_php__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var codemirror_mode_python_python__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! codemirror/mode/python/python */ "./node_modules/codemirror/mode/python/python.js");\n/* harmony import */ var codemirror_mode_python_python__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_python_python__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var codemirror_mode_sql_sql__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! codemirror/mode/sql/sql */ "./node_modules/codemirror/mode/sql/sql.js");\n/* harmony import */ var codemirror_mode_sql_sql__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_sql_sql__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var codemirror_mode_vue_vue__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! codemirror/mode/vue/vue */ "./node_modules/codemirror/mode/vue/vue.js");\n/* harmony import */ var codemirror_mode_vue_vue__WEBPACK_IMPORTED_MODULE_42___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_vue_vue__WEBPACK_IMPORTED_MODULE_42__);\n/* harmony import */ var codemirror_mode_xml_xml__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! codemirror/mode/xml/xml */ "./node_modules/codemirror/mode/xml/xml.js");\n/* harmony import */ var codemirror_mode_xml_xml__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_xml_xml__WEBPACK_IMPORTED_MODULE_43__);\n/* harmony import */ var codemirror_mode_yaml_yaml__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! codemirror/mode/yaml/yaml */ "./node_modules/codemirror/mode/yaml/yaml.js");\n/* harmony import */ var codemirror_mode_yaml_yaml__WEBPACK_IMPORTED_MODULE_44___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_yaml_yaml__WEBPACK_IMPORTED_MODULE_44__);\n/* harmony import */ var codemirror_mode_css_css__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! codemirror/mode/css/css */ "./node_modules/codemirror/mode/css/css.js");\n/* harmony import */ var codemirror_mode_css_css__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_css_css__WEBPACK_IMPORTED_MODULE_45__);\n/* harmony import */ var codemirror_mode_cmake_cmake__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! codemirror/mode/cmake/cmake */ "./node_modules/codemirror/mode/cmake/cmake.js");\n/* harmony import */ var codemirror_mode_cmake_cmake__WEBPACK_IMPORTED_MODULE_46___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_cmake_cmake__WEBPACK_IMPORTED_MODULE_46__);\n/* harmony import */ var codemirror_mode_markdown_markdown__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! codemirror/mode/markdown/markdown */ "./node_modules/codemirror/mode/markdown/markdown.js");\n/* harmony import */ var codemirror_mode_markdown_markdown__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_markdown_markdown__WEBPACK_IMPORTED_MODULE_47__);\n/* harmony import */ var codemirror_mode_lua_lua__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! codemirror/mode/lua/lua */ "./node_modules/codemirror/mode/lua/lua.js");\n/* harmony import */ var codemirror_mode_lua_lua__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_lua_lua__WEBPACK_IMPORTED_MODULE_48__);\n/* harmony import */ var codemirror_mode_ruby_ruby__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! codemirror/mode/ruby/ruby */ "./node_modules/codemirror/mode/ruby/ruby.js");\n/* harmony import */ var codemirror_mode_ruby_ruby__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_ruby_ruby__WEBPACK_IMPORTED_MODULE_49__);\n/* harmony import */ var codemirror_mode_rust_rust__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! codemirror/mode/rust/rust */ "./node_modules/codemirror/mode/rust/rust.js");\n/* harmony import */ var codemirror_mode_rust_rust__WEBPACK_IMPORTED_MODULE_50___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_rust_rust__WEBPACK_IMPORTED_MODULE_50__);\n/* harmony import */ var codemirror_mode_shell_shell__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! codemirror/mode/shell/shell */ "./node_modules/codemirror/mode/shell/shell.js");\n/* harmony import */ var codemirror_mode_shell_shell__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(codemirror_mode_shell_shell__WEBPACK_IMPORTED_MODULE_51__);\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n // Core\n\n\n // theme css\n\n // import \'codemirror/theme/elegant.css\'\n// require active-line.js\n\n // styleSelectedText\n\n\n // hint\n\n\n\n\n // highlightSelectionMatches\n\n\n\n\n\n\n // keyMap\n\n\n\n\n\n\n\n\n // foldGutter\n\n\n\n\n\n\n\n\n // Mode\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["default"] = ({\n mixins: [_mixins_mixin__WEBPACK_IMPORTED_MODULE_3__["mixin"]],\n components: {\n codemirror: vue_codemirror__WEBPACK_IMPORTED_MODULE_5__["codemirror"]\n },\n props: {\n item: {\n type: Object,\n default: function _default() {\n return {\n path: \'/DATA/background.js\',\n name: \'background.js\'\n };\n }\n }\n },\n data: function data() {\n var _this = this;\n\n return {\n code: "",\n isChange: false,\n cmOptions: {\n tabSize: 4,\n styleActiveLine: true,\n lineNumbers: true,\n styleSelectedText: false,\n line: true,\n foldGutter: true,\n gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],\n highlightSelectionMatches: {\n showToken: /\\w/,\n annotateScrollbar: true\n },\n mode: "text/javascript",\n // hint.js options\n hintOptions: {\n completeSingle: false\n },\n keyMap: "sublime",\n matchBrackets: true,\n showCursorWhenSelecting: true,\n theme: "monokai",\n extraKeys: {\n \'Ctrl\': "autocomplete",\n \'Ctrl-S\': function CtrlS() {\n _this.saveFile();\n },\n \'Cmd-S\': function CmdS() {\n _this.saveFile();\n }\n },\n scrollbarStyle: "overlay"\n }\n };\n },\n computed: {\n codemirror: function codemirror() {\n return this.$refs.cmEditor.codemirror;\n },\n pathArray: function pathArray() {\n return this.item.path.substr(1).split("/");\n }\n },\n mounted: function mounted() {\n this.readFile();\n },\n methods: {\n onCmCodeChange: function onCmCodeChange() {\n this.isChange = true;\n },\n onCmReady: function onCmReady() {\n this.isChange = false;\n },\n readFile: function readFile() {\n var _this2 = this;\n\n var ext = this.getFileExt(this.item);\n var mode = mime__WEBPACK_IMPORTED_MODULE_4___default.a.getType(ext) == null ? "text/javascript" : mime__WEBPACK_IMPORTED_MODULE_4___default.a.getType(ext);\n\n if (ext.toLowerCase() == "makefile") {\n mode = \'text/x-cmake\';\n } else if (ext.toLowerCase() == "py") {\n mode = \'text/x-python\';\n } else if (ext.toLowerCase() == "go") {\n mode = \'text/x-go\';\n } else if (ext.toLowerCase() == "vue") {\n mode = \'text/x-vue\';\n }\n\n this.codemirror.setOption("mode", mode);\n this.$api.file.download(this.item.path).then(function (res) {\n if (_this2.getFileExt(_this2.item) == \'json\') {\n _this2.code = JSON.stringify(res.data, null, 2);\n } else {\n _this2.code = String(res.data);\n }\n\n _this2.$nextTick(function () {\n _this2.isChange = false;\n });\n });\n },\n saveFile: function saveFile() {\n var _this3 = this;\n\n var leave = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var content = this.codemirror.getValue();\n this.$api.file.update(this.item.path, content).then(function (res) {\n if (res.data.success == 200) {\n // this.readFile();\n _this3.isChange = false;\n\n _this3.$buefy.toast.open({\n message: _this3.$t(\'Saved\'),\n type: \'is-success\'\n });\n\n if (leave) {\n _this3.$emit("close");\n }\n } else {\n _this3.$buefy.toast.open({\n message: res.data.message,\n type: \'is-danger\'\n });\n }\n });\n },\n download: function download() {\n this.downloadFile(this.item);\n },\n close: function close() {\n var _this4 = this;\n\n if (this.isChange) {\n this.$buefy.dialog.confirm({\n title: this.$t(\'Want to save?\'),\n message: this.$t(\'Your changes will be lost if you don’t save them.\'),\n hasIcon: true,\n canCancel: [\'button\'],\n confirmText: this.$t(\'Save\'),\n cancelText: this.$t(\'Don’t Save\'),\n onConfirm: function onConfirm() {\n _this4.saveFile(true);\n },\n onCancel: function onCancel() {\n _this4.$emit("close");\n }\n });\n } else {\n this.$emit("close");\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/CodeEditor.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options')},'./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=template&id=7784315b&': -/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=template&id=7784315b& ***! - \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c("div", { staticClass: "overlay" }, [\n _c("header", { staticClass: "modal-card-head" }, [\n _c("div", { staticClass: "is-flex-grow-1 is-flex " }, [\n _c("h3", { staticClass: "title is-5" }, [\n _vm._v(_vm._s(_vm.$t("Code Editor"))),\n ]),\n ]),\n _c(\n "div",\n { staticClass: "is-flex is-align-items-center" },\n [\n _c("b-button", {\n staticClass: "mr-3",\n attrs: {\n "icon-left": "content-save",\n type: "is-dark",\n size: "is-small",\n label: _vm.$t("Save"),\n rounded: "",\n },\n on: {\n click: function ($event) {\n return _vm.saveFile(false)\n },\n },\n }),\n _c("b-button", {\n staticClass: "mr-2",\n attrs: {\n "icon-left": "download",\n type: "is-primary",\n size: "is-small",\n label: _vm.$t("Download"),\n rounded: "",\n },\n on: { click: _vm.download },\n }),\n _c(\n "div",\n {\n staticClass:\n "is-flex is-align-items-center modal-close-container close-btn modal-close-container-line",\n },\n [\n _c("button", {\n staticClass: "delete",\n attrs: { type: "button" },\n on: { click: _vm.close },\n }),\n ]\n ),\n ],\n 1\n ),\n ]),\n _c(\n "div",\n { staticClass: "file-path-bread" },\n [\n _c(\n "b-breadcrumb",\n { attrs: { size: "is-small" } },\n _vm._l(_vm.pathArray, function (item, index) {\n return _c(\n "b-breadcrumb-item",\n { key: "f-" + index, attrs: { active: "" } },\n [_vm._v(_vm._s(item))]\n )\n }),\n 1\n ),\n ],\n 1\n ),\n _c(\n "div",\n {\n staticClass:\n "is-flex is-justify-content-center is-align-items-center is-flex-grow-1 v-container code",\n },\n [\n _c("codemirror", {\n ref: "cmEditor",\n attrs: { options: _vm.cmOptions },\n on: { input: _vm.onCmCodeChange, ready: _vm.onCmReady },\n model: {\n value: _vm.code,\n callback: function ($$v) {\n _vm.code = $$v\n },\n expression: "code",\n },\n }),\n ],\n 1\n ),\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/CodeEditor.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2241d1a626-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options')},"./src/components/filebrowser/viewers/CodeEditor.vue": -/*!***********************************************************!*\ - !*** ./src/components/filebrowser/viewers/CodeEditor.vue ***! - \***********************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CodeEditor_vue_vue_type_template_id_7784315b___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CodeEditor.vue?vue&type=template&id=7784315b& */ "./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=template&id=7784315b&");\n/* harmony import */ var _CodeEditor_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CodeEditor.vue?vue&type=script&lang=js& */ "./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=script&lang=js&");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(\n _CodeEditor_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],\n _CodeEditor_vue_vue_type_template_id_7784315b___WEBPACK_IMPORTED_MODULE_0__["render"],\n _CodeEditor_vue_vue_type_template_id_7784315b___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = "src/components/filebrowser/viewers/CodeEditor.vue"\n/* harmony default export */ __webpack_exports__["default"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/CodeEditor.vue?')},"./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=script&lang=js&": -/*!************************************************************************************!*\ - !*** ./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=script&lang=js& ***! - \************************************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CodeEditor_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./CodeEditor.vue?vue&type=script&lang=js& */ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=script&lang=js&");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CodeEditor_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); \n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/CodeEditor.vue?')},"./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=template&id=7784315b&": -/*!******************************************************************************************!*\ - !*** ./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=template&id=7784315b& ***! - \******************************************************************************************/ -/*! exports provided: render, staticRenderFns */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CodeEditor_vue_vue_type_template_id_7784315b___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./CodeEditor.vue?vue&type=template&id=7784315b& */ "./node_modules/cache-loader/dist/cjs.js?{\\"cacheDirectory\\":\\"node_modules/.cache/vue-loader\\",\\"cacheIdentifier\\":\\"41d1a626-vue-loader-template\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/CodeEditor.vue?vue&type=template&id=7784315b&");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CodeEditor_vue_vue_type_template_id_7784315b___WEBPACK_IMPORTED_MODULE_0__["render"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CodeEditor_vue_vue_type_template_id_7784315b___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/CodeEditor.vue?')}}]); \ No newline at end of file diff --git a/web/js/11.js b/web/js/11.js deleted file mode 100644 index 8b238f7..0000000 --- a/web/js/11.js +++ /dev/null @@ -1,21 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=script&lang=js&": -/*!****************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=script&lang=js& ***! - \****************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _mixins_mixin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/mixins/mixin */ \"./src/mixins/mixin.js\");\n/* harmony import */ var viewerjs_dist_viewer_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! viewerjs/dist/viewer.css */ \"./node_modules/viewerjs/dist/viewer.css\");\n/* harmony import */ var viewerjs_dist_viewer_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(viewerjs_dist_viewer_css__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var v_viewer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! v-viewer */ \"./node_modules/v-viewer/dist/v-viewer.js\");\n/* harmony import */ var v_viewer__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(v_viewer__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\nvar XIMAGES = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'svg', 'tiff'];\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n mixins: [_mixins_mixin__WEBPACK_IMPORTED_MODULE_3__[\"mixin\"]],\n props: {\n item: {\n type: Object,\n default: function _default() {\n return {\n path: '',\n name: ''\n };\n }\n },\n list: []\n },\n components: {\n Viewer: v_viewer__WEBPACK_IMPORTED_MODULE_5__[\"component\"]\n },\n data: function data() {\n return {\n isMoving: false,\n timeout: null,\n itemList: [],\n currentItem: this.item,\n currentItemIndex: 0,\n currentItemArray: [],\n viewer: {},\n viewerOptions: {\n button: false,\n //Hide FullScreen Button\n toolbar: false,\n //Hide Toolbar\n title: false,\n //Hide Title\n navbar: false,\n //Hide Navbar\n backdrop: false,\n //Hide Background\n transition: false,\n //Without css3 animation\n inline: true,\n initialViewIndex: 0\n }\n };\n },\n computed: {\n disableNext: function disableNext() {\n return this.currentItemIndex == this.itemList.length - 1;\n },\n disablePrev: function disablePrev() {\n return this.currentItemIndex == 0;\n }\n },\n created: function created() {\n this.filterImages();\n this.getCurrentImageIndex();\n this.setSourceImageURLs();\n },\n mounted: function mounted() {\n var _this = this;\n\n window.onkeyup = function (e) {\n switch (e.code) {\n case 'ArrowRight':\n _this.next();\n\n break;\n\n case 'ArrowLeft':\n _this.prev();\n\n break;\n }\n };\n },\n methods: {\n download: function download() {\n this.downloadFile(this.currentItem);\n },\n close: function close() {\n this.$emit(\"close\");\n },\n inited: function inited(viewer) {\n this.viewer = viewer;\n this.viewer.show();\n this.onMouseMove();\n },\n next: function next() {\n if (this.currentItemIndex < this.itemList.length - 1) {\n this.currentItemIndex++;\n this.setSourceImageURLs();\n }\n },\n prev: function prev() {\n if (this.currentItemIndex > 0) {\n this.currentItemIndex--;\n this.setSourceImageURLs();\n }\n },\n filterImages: function filterImages() {\n var _this2 = this;\n\n this.itemList = this.list.filter(function (item) {\n var ext = _this2.getFileExt(item);\n\n return !item.is_dir && XIMAGES.indexOf(ext.toLowerCase()) > -1;\n });\n },\n getCurrentImageIndex: function getCurrentImageIndex() {\n var _this3 = this;\n\n this.itemList.forEach(function (item, index) {\n if (item == _this3.currentItem) {\n _this3.currentItemIndex = index;\n }\n });\n },\n setSourceImageURLs: function setSourceImageURLs() {\n this.currentItem = this.itemList[this.currentItemIndex];\n this.currentItemArray = [this.getFileUrl(this.currentItem)];\n },\n // Hide Toolbar after 5 seconds\n onMouseMove: function onMouseMove() {\n var _this4 = this;\n\n this.isMoving = true;\n\n if (this.timeout !== null) {\n clearTimeout(this.timeout);\n }\n\n this.timeout = setTimeout(function () {\n _this4.isMoving = false;\n _this4.timeout = null;\n }, 5000);\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/ImageViewer.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options")},'./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=template&id=5973f308&': -/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=template&id=5973f308& ***! - \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n "div",\n {\n staticClass: "overlay",\n attrs: { id: "image_viewer" },\n on: { mousemove: _vm.onMouseMove, touchmove: _vm.onMouseMove },\n },\n [\n _c("header", { staticClass: "modal-card-head" }, [\n _c("div", { staticClass: "is-flex is-flex-grow-1 is-flex-shrink-1" }, [\n _c("h3", { staticClass: "title is-6 one-line" }, [\n _vm._v(_vm._s(_vm.currentItem.name)),\n ]),\n ]),\n _c(\n "div",\n { staticClass: "is-flex is-align-items-center is-flex-shrink-0" },\n [\n _c("b-button", {\n staticClass: "mr-2",\n attrs: {\n "icon-left": "download",\n type: "is-primary",\n size: "is-small",\n label: _vm.$t("Download"),\n rounded: "",\n },\n on: { click: _vm.download },\n }),\n _c(\n "div",\n {\n staticClass:\n "is-flex is-align-items-center modal-close-container close-btn modal-close-container-line",\n },\n [\n _c("button", {\n staticClass: "delete",\n attrs: { type: "button" },\n on: { click: _vm.close },\n }),\n ]\n ),\n ],\n 1\n ),\n ]),\n _vm.isMoving\n ? _c(\n "div",\n { staticClass: "img-toolbar is-flex" },\n [\n _c(\n "b-tooltip",\n { attrs: { label: _vm.$t("Previous"), type: "is-dark" } },\n [\n _c(\n "div",\n {\n staticClass: "toolbar-item",\n class: { disabled: _vm.disablePrev },\n on: { click: _vm.prev },\n },\n [\n _c(\n "span",\n { staticClass: "has-text-white block" },\n [\n _c("b-icon", {\n attrs: {\n icon: "arrow-left-thin",\n size: "is-small",\n },\n }),\n ],\n 1\n ),\n ]\n ),\n ]\n ),\n _c(\n "b-tooltip",\n { attrs: { label: _vm.$t("Zoom in"), type: "is-dark" } },\n [\n _c(\n "div",\n {\n staticClass: "toolbar-item",\n on: {\n click: function ($event) {\n return _vm.viewer.zoom(0.1)\n },\n },\n },\n [\n _c(\n "span",\n { staticClass: "has-text-white block" },\n [\n _c("b-icon", {\n attrs: {\n icon: "magnify-plus-outline",\n size: "is-small",\n },\n }),\n ],\n 1\n ),\n ]\n ),\n ]\n ),\n _c(\n "b-tooltip",\n { attrs: { label: _vm.$t("Rotate"), type: "is-dark" } },\n [\n _c(\n "div",\n {\n staticClass: "toolbar-item",\n on: {\n click: function ($event) {\n return _vm.viewer.rotate(90)\n },\n },\n },\n [\n _c(\n "span",\n { staticClass: "has-text-white block" },\n [\n _c("b-icon", {\n attrs: {\n icon: "format-rotate-90",\n size: "is-small",\n "custom-class": "mdi-flip-h",\n },\n }),\n ],\n 1\n ),\n ]\n ),\n ]\n ),\n _c(\n "b-tooltip",\n { attrs: { label: _vm.$t("Reset"), type: "is-dark" } },\n [\n _c(\n "div",\n {\n staticClass: "toolbar-item",\n on: {\n click: function ($event) {\n return _vm.viewer.reset()\n },\n },\n },\n [\n _c(\n "span",\n { staticClass: "has-text-white block" },\n [\n _c("b-icon", {\n attrs: { icon: "restore", size: "is-small" },\n }),\n ],\n 1\n ),\n ]\n ),\n ]\n ),\n _c(\n "b-tooltip",\n { attrs: { label: _vm.$t("Zoom out"), type: "is-dark" } },\n [\n _c(\n "div",\n {\n staticClass: "toolbar-item",\n on: {\n click: function ($event) {\n return _vm.viewer.zoom(-0.1)\n },\n },\n },\n [\n _c(\n "span",\n { staticClass: "has-text-white block" },\n [\n _c("b-icon", {\n attrs: {\n icon: "magnify-minus-outline",\n size: "is-small",\n },\n }),\n ],\n 1\n ),\n ]\n ),\n ]\n ),\n _c(\n "b-tooltip",\n { attrs: { label: _vm.$t("INext"), type: "is-dark" } },\n [\n _c(\n "div",\n {\n staticClass: "toolbar-item",\n class: { disabled: _vm.disableNext },\n on: { click: _vm.next },\n },\n [\n _c(\n "span",\n { staticClass: "has-text-white block" },\n [\n _c("b-icon", {\n attrs: {\n icon: "arrow-right-thin",\n size: "is-small",\n },\n }),\n ],\n 1\n ),\n ]\n ),\n ]\n ),\n ],\n 1\n )\n : _vm._e(),\n _c(\n "div",\n { staticClass: " v-container pl-4 pr-4" },\n [\n _c("viewer", {\n ref: "viewer",\n staticClass: "viewer",\n attrs: { options: _vm.viewerOptions, images: _vm.currentItemArray },\n on: { inited: _vm.inited },\n scopedSlots: _vm._u([\n {\n key: "default",\n fn: function (scope) {\n return _vm._l(scope.images, function (src) {\n return _c("img", { key: src, attrs: { src: src } })\n })\n },\n },\n ]),\n }),\n ],\n 1\n ),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/ImageViewer.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2241d1a626-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options')},"./src/components/filebrowser/viewers/ImageViewer.vue": -/*!************************************************************!*\ - !*** ./src/components/filebrowser/viewers/ImageViewer.vue ***! - \************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ImageViewer_vue_vue_type_template_id_5973f308___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ImageViewer.vue?vue&type=template&id=5973f308& */ "./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=template&id=5973f308&");\n/* harmony import */ var _ImageViewer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ImageViewer.vue?vue&type=script&lang=js& */ "./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=script&lang=js&");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(\n _ImageViewer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],\n _ImageViewer_vue_vue_type_template_id_5973f308___WEBPACK_IMPORTED_MODULE_0__["render"],\n _ImageViewer_vue_vue_type_template_id_5973f308___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = "src/components/filebrowser/viewers/ImageViewer.vue"\n/* harmony default export */ __webpack_exports__["default"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/ImageViewer.vue?')},"./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=script&lang=js&": -/*!*************************************************************************************!*\ - !*** ./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=script&lang=js& ***! - \*************************************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageViewer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./ImageViewer.vue?vue&type=script&lang=js& */ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=script&lang=js&");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageViewer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); \n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/ImageViewer.vue?')},"./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=template&id=5973f308&": -/*!*******************************************************************************************!*\ - !*** ./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=template&id=5973f308& ***! - \*******************************************************************************************/ -/*! exports provided: render, staticRenderFns */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageViewer_vue_vue_type_template_id_5973f308___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./ImageViewer.vue?vue&type=template&id=5973f308& */ "./node_modules/cache-loader/dist/cjs.js?{\\"cacheDirectory\\":\\"node_modules/.cache/vue-loader\\",\\"cacheIdentifier\\":\\"41d1a626-vue-loader-template\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/ImageViewer.vue?vue&type=template&id=5973f308&");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageViewer_vue_vue_type_template_id_5973f308___WEBPACK_IMPORTED_MODULE_0__["render"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageViewer_vue_vue_type_template_id_5973f308___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/ImageViewer.vue?')}}]); \ No newline at end of file diff --git a/web/js/12.js b/web/js/12.js deleted file mode 100644 index 8fa1b5e..0000000 --- a/web/js/12.js +++ /dev/null @@ -1,21 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=script&lang=js&": -/*!****************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=script&lang=js& ***! - \****************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mixins_mixin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/mixins/mixin */ "./src/mixins/mixin.js");\n/* harmony import */ var vue_plyr_dist_vue_plyr_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-plyr/dist/vue-plyr.css */ "./node_modules/vue-plyr/dist/vue-plyr.css");\n/* harmony import */ var vue_plyr_dist_vue_plyr_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(vue_plyr_dist_vue_plyr_css__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n // import VuePlyr from \'vue-plyr\'\n\n\n/* harmony default export */ __webpack_exports__["default"] = ({\n mixins: [_mixins_mixin__WEBPACK_IMPORTED_MODULE_5__["mixin"]],\n props: {\n item: {\n type: Object,\n default: function _default() {\n return {\n path: \'/DATA/5 Seconds Of Summer - Amnesia.mp4\',\n name: \'5 Seconds Of Summer - Amnesia.mp4\'\n };\n }\n }\n },\n components: {\n VuePlyr: function VuePlyr() {\n return __webpack_require__.e(/*! import() */ 15).then(__webpack_require__.bind(null, /*! vue-plyr */ "./node_modules/vue-plyr/dist/vue-plyr.esm.js"));\n }\n },\n data: function data() {\n return {\n type: "",\n ext: "",\n player: null\n };\n },\n computed: {\n isVideo: function isVideo() {\n return this.type == "video-x-generic";\n },\n isAudio: function isAudio() {\n return this.type == "audio-x-generic";\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n this.ext = this.getFileExt(this.item);\n Object.keys(this.typeMap).forEach(function (_type) {\n var extensions = _this.typeMap[_type];\n\n if (extensions.indexOf(_this.ext.toLowerCase()) > -1) {\n _this.type = _type;\n }\n });\n },\n methods: {\n download: function download() {\n this.downloadFile(this.item);\n },\n close: function close() {\n this.$emit("close");\n }\n },\n beforeDestroy: function beforeDestroy() {\n this.$refs.plyr.player.destroy();\n }\n});\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/VideoPlayer.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options')},'./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=template&id=366472eb&': -/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=template&id=366472eb& ***! - \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c("div", { staticClass: "overlay" }, [\n _c("header", { staticClass: "modal-card-head" }, [\n _c("div", { staticClass: "is-flex-grow-1 is-flex " }, [\n _c("h3", { staticClass: "title is-5 one-line" }, [\n _vm._v(_vm._s(_vm.item.name)),\n ]),\n ]),\n _c(\n "div",\n { staticClass: "is-flex is-align-items-center" },\n [\n _c("b-button", {\n staticClass: "mr-2",\n attrs: {\n "icon-left": "download",\n type: "is-primary",\n size: "is-small",\n label: _vm.$t("Download"),\n rounded: "",\n },\n on: { click: _vm.download },\n }),\n _c(\n "div",\n {\n staticClass:\n "is-flex is-align-items-center modal-close-container close-btn modal-close-container-line",\n },\n [\n _c("button", {\n staticClass: "delete",\n attrs: { type: "button" },\n on: { click: _vm.close },\n }),\n ]\n ),\n ],\n 1\n ),\n ]),\n _c(\n "div",\n {\n staticClass:\n "is-flex is-justify-content-center is-align-items-center is-flex-grow-1 v-container video",\n },\n [\n _c(\n "div",\n { staticClass: "video-container" },\n [\n _vm.isVideo\n ? _c("vue-plyr", { key: "video-player", ref: "plyr" }, [\n _c("video", { attrs: { controls: "", crossorigin: "" } }, [\n _c("source", {\n attrs: {\n src: _vm.getFileUrl(_vm.item),\n type: "video/mp4",\n },\n }),\n ]),\n ])\n : _vm._e(),\n _vm.isAudio\n ? _c("vue-plyr", { key: "audio-player", ref: "plyr" }, [\n _c(\n "audio",\n {\n attrs: { controls: "", crossorigin: "", playsinline: "" },\n },\n [\n _c("source", {\n attrs: {\n src: _vm.getFileUrl(_vm.item),\n type: "audio/" + _vm.ext,\n },\n }),\n ]\n ),\n ])\n : _vm._e(),\n ],\n 1\n ),\n ]\n ),\n _c("div", { staticClass: "v-footer is-flex is-justify-content-center" }),\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/VideoPlayer.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2241d1a626-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options')},"./src/components/filebrowser/viewers/VideoPlayer.vue": -/*!************************************************************!*\ - !*** ./src/components/filebrowser/viewers/VideoPlayer.vue ***! - \************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _VideoPlayer_vue_vue_type_template_id_366472eb___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VideoPlayer.vue?vue&type=template&id=366472eb& */ "./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=template&id=366472eb&");\n/* harmony import */ var _VideoPlayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VideoPlayer.vue?vue&type=script&lang=js& */ "./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=script&lang=js&");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(\n _VideoPlayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],\n _VideoPlayer_vue_vue_type_template_id_366472eb___WEBPACK_IMPORTED_MODULE_0__["render"],\n _VideoPlayer_vue_vue_type_template_id_366472eb___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = "src/components/filebrowser/viewers/VideoPlayer.vue"\n/* harmony default export */ __webpack_exports__["default"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/VideoPlayer.vue?')},"./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=script&lang=js&": -/*!*************************************************************************************!*\ - !*** ./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=script&lang=js& ***! - \*************************************************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./VideoPlayer.vue?vue&type=script&lang=js& */ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=script&lang=js&");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); \n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/VideoPlayer.vue?')},"./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=template&id=366472eb&": -/*!*******************************************************************************************!*\ - !*** ./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=template&id=366472eb& ***! - \*******************************************************************************************/ -/*! exports provided: render, staticRenderFns */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_template_id_366472eb___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"41d1a626-vue-loader-template"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./VideoPlayer.vue?vue&type=template&id=366472eb& */ "./node_modules/cache-loader/dist/cjs.js?{\\"cacheDirectory\\":\\"node_modules/.cache/vue-loader\\",\\"cacheIdentifier\\":\\"41d1a626-vue-loader-template\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/filebrowser/viewers/VideoPlayer.vue?vue&type=template&id=366472eb&");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_template_id_366472eb___WEBPACK_IMPORTED_MODULE_0__["render"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_41d1a626_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_template_id_366472eb___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/filebrowser/viewers/VideoPlayer.vue?')}}]); \ No newline at end of file diff --git a/web/js/13.js b/web/js/13.js deleted file mode 100644 index a8445c8..0000000 --- a/web/js/13.js +++ /dev/null @@ -1,13 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[13],{"./node_modules/v-viewer/dist/v-viewer.js": -/*!************************************************!*\ - !*** ./node_modules/v-viewer/dist/v-viewer.js ***! - \************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory(__webpack_require__(/*! viewerjs */ \"./node_modules/viewerjs/dist/viewer.js\"), __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\"));\n\telse {}\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_2__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = extend;\n\nfunction extend() {\n var extended = {};\n var deep = false;\n var i = 0;\n var length = arguments.length;\n\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\n deep = arguments[0];\n i++;\n }\n\n function merge(obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\n extended[prop] = extend(true, extended[prop], obj[prop]);\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n }\n\n for (; i < length; i++) {\n var obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n}\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_viewerjs__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vue__);\n\n\n\n\nvar api = function api() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$images = _ref.images,\n images = _ref$images === undefined ? [] : _ref$images,\n _ref$options = _ref.options,\n options = _ref$options === undefined ? {} : _ref$options;\n\n options = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils__[\"a\" /* extend */])(options, {\n inline: false });\n\n var ViewerToken = __WEBPACK_IMPORTED_MODULE_2_vue___default.a.extend({\n render: function render(h) {\n return h('div', {\n style: {\n display: 'none'\n },\n class: ['__viewer-token']\n }, images.map(function (attr) {\n return h('img', {\n attrs: typeof attr === 'string' ? { src: attr } : attr\n });\n }));\n }\n });\n var token = new ViewerToken();\n token.$mount();\n document.body.appendChild(token.$el);\n\n var $viewer = new __WEBPACK_IMPORTED_MODULE_0_viewerjs___default.a(token.$el, options);\n var $destroy = $viewer.destroy.bind($viewer);\n $viewer.destroy = function () {\n $destroy();\n token.$destroy();\n document.body.removeChild(token.$el);\n return $viewer;\n };\n $viewer.show();\n\n token.$el.addEventListener('hidden', function () {\n if (this.viewer === $viewer) {\n $viewer.destroy();\n }\n });\n\n return $viewer;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (api);\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_viewerjs__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_throttle_debounce__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_throttle_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_throttle_debounce__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vue__);\n\n\n\n\nvar directive = function directive() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$name = _ref.name,\n name = _ref$name === undefined ? 'viewer' : _ref$name,\n _ref$debug = _ref.debug,\n debug = _ref$debug === undefined ? false : _ref$debug;\n\n function createViewer(el, options) {\n var rebuild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var observer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n __WEBPACK_IMPORTED_MODULE_2_vue___default.a.nextTick(function () {\n if (observer && !imageDiff(el)) return;\n if (rebuild || !el['$' + name]) {\n destroyViewer(el);\n el['$' + name] = new __WEBPACK_IMPORTED_MODULE_0_viewerjs___default.a(el, options);\n log('Viewer created');\n } else {\n el['$' + name].update();\n log('Viewer updated');\n }\n });\n }\n\n function imageDiff(el) {\n var imageContent = el.innerHTML.match(//g);\n var viewerImageText = imageContent ? imageContent.join('') : undefined;\n if (el.__viewerImageDiffCache === viewerImageText) {\n log('Element change detected, but image(s) has not changed');\n return false;\n } else {\n log('Image change detected');\n el.__viewerImageDiffCache = viewerImageText;\n return true;\n }\n }\n\n function createObserver(el, options, debouncedCreateViewer, rebuild) {\n destroyObserver(el);\n var MutationObserver = global.MutationObserver || global.WebKitMutationObserver || global.MozMutationObserver;\n if (!MutationObserver) {\n log('Observer not supported');\n return;\n }\n var observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n log('Viewer mutation:' + mutation.type);\n debouncedCreateViewer(el, options, rebuild, true);\n });\n });\n var config = { attributes: true, childList: true, characterData: true, subtree: true };\n observer.observe(el, config);\n el.__viewerMutationObserver = observer;\n log('Observer created');\n }\n\n function createWatcher(el, _ref2, vnode, debouncedCreateViewer) {\n var expression = _ref2.expression;\n\n var simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/;\n if (!expression || !simplePathRE.test(expression)) {\n log('Only simple dot-delimited paths can create watcher');\n return;\n }\n el.__viewerUnwatch = vnode.context.$watch(expression, function (newVal, oldVal) {\n log('Change detected by watcher: ', expression);\n debouncedCreateViewer(el, newVal, true);\n }, {\n deep: true\n });\n log('Watcher created, expression: ', expression);\n }\n\n function destroyViewer(el) {\n if (!el['$' + name]) {\n return;\n }\n el['$' + name].destroy();\n delete el['$' + name];\n log('Viewer destroyed');\n }\n\n function destroyObserver(el) {\n if (!el.__viewerMutationObserver) {\n return;\n }\n el.__viewerMutationObserver.disconnect();\n delete el.__viewerMutationObserver;\n log('Observer destroyed');\n }\n\n function destroyWatcher(el) {\n if (!el.__viewerUnwatch) {\n return;\n }\n el.__viewerUnwatch();\n delete el.__viewerUnwatch;\n log('Watcher destroyed');\n }\n\n function log() {\n var _console;\n\n debug && (_console = console).log.apply(_console, arguments);\n }\n\n var directive = {\n bind: function bind(el, binding, vnode) {\n log('Viewer bind');\n var debouncedCreateViewer = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_throttle_debounce__[\"debounce\"])(50, createViewer);\n debouncedCreateViewer(el, binding.value);\n\n createWatcher(el, binding, vnode, debouncedCreateViewer);\n\n if (!binding.modifiers.static) {\n createObserver(el, binding.value, debouncedCreateViewer, binding.modifiers.rebuild);\n }\n },\n unbind: function unbind(el, binding) {\n log('Viewer unbind');\n\n destroyObserver(el);\n\n destroyWatcher(el);\n\n destroyViewer(el);\n }\n };\n\n return directive;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (directive);\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(9)))\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(10)(\n /* script */\n __webpack_require__(8),\n /* template */\n __webpack_require__(11),\n /* scopeId */\n null,\n /* cssModules */\n null\n)\nComponent.options.__file = \"/Volumes/public/Workspace/web/v-viewer/src/component.vue\"\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \"default\" && key !== \"__esModule\"})) {console.error(\"named exports are not supported in *.vue files.\")}\nif (Component.options.functional) {console.error(\"[vue-loader] component.vue: functional components are not supported with templates, they should use render functions.\")}\n\n/* hot reload */\nif (false) {}\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_viewerjs__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_viewerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_viewerjs__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__component_vue__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__component_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__component_vue__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__directive__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__api__ = __webpack_require__(3);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"component\", function() { return __WEBPACK_IMPORTED_MODULE_2__component_vue___default.a; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"directive\", function() { return __WEBPACK_IMPORTED_MODULE_3__directive__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"api\", function() { return __WEBPACK_IMPORTED_MODULE_4__api__[\"a\"]; });\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"Viewer\", function() { return __WEBPACK_IMPORTED_MODULE_1_viewerjs___default.a; });\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n install: function install(Vue) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$name = _ref.name,\n name = _ref$name === undefined ? 'viewer' : _ref$name,\n _ref$debug = _ref.debug,\n debug = _ref$debug === undefined ? false : _ref$debug,\n defaultOptions = _ref.defaultOptions;\n\n __WEBPACK_IMPORTED_MODULE_1_viewerjs___default.a.setDefaults(defaultOptions);\n\n Vue.component(name, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__[\"a\" /* extend */])(__WEBPACK_IMPORTED_MODULE_2__component_vue___default.a, { name: name }));\n Vue.directive(name, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__directive__[\"a\" /* default */])({ name: name, debug: debug }));\n Vue.prototype['$' + name + 'Api'] = __WEBPACK_IMPORTED_MODULE_4__api__[\"a\" /* default */];\n },\n setDefaults: function setDefaults(defaultOptions) {\n __WEBPACK_IMPORTED_MODULE_1_viewerjs___default.a.setDefaults(defaultOptions);\n }\n});\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n(function (global, factory) {\n\t( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (undefined);\n})(this, function (exports) {\n\t'use strict';\n\n\tfunction throttle(delay, noTrailing, callback, debounceMode) {\n\t\tvar timeoutID;\n\t\tvar cancelled = false;\n\n\t\tvar lastExec = 0;\n\n\t\tfunction clearExistingTimeout() {\n\t\t\tif (timeoutID) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\t\t}\n\n\t\tfunction cancel() {\n\t\t\tclearExistingTimeout();\n\t\t\tcancelled = true;\n\t\t}\n\n\t\tif (typeof noTrailing !== 'boolean') {\n\t\t\tdebounceMode = callback;\n\t\t\tcallback = noTrailing;\n\t\t\tnoTrailing = undefined;\n\t\t}\n\n\n\t\tfunction wrapper() {\n\t\t\tfor (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\t\targuments_[_key] = arguments[_key];\n\t\t\t}\n\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Date.now() - lastExec;\n\n\t\t\tif (cancelled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction exec() {\n\t\t\t\tlastExec = Date.now();\n\t\t\t\tcallback.apply(self, arguments_);\n\t\t\t}\n\n\n\t\t\tfunction clear() {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\n\t\t\tif (debounceMode && !timeoutID) {\n\t\t\t\texec();\n\t\t\t}\n\n\t\t\tclearExistingTimeout();\n\n\t\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t\texec();\n\t\t\t} else if (noTrailing !== true) {\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\t\t}\n\n\t\twrapper.cancel = cancel;\n\n\t\treturn wrapper;\n\t}\n\n\tfunction debounce(delay, atBegin, callback) {\n\t\treturn callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n\t}\n\n\texports.debounce = debounce;\n\texports.throttle = throttle;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n});\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_viewerjs__);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: {\n images: {\n type: Array\n },\n rebuild: {\n type: Boolean,\n default: false\n },\n trigger: {},\n options: {\n type: Object\n }\n },\n\n data: function data() {\n return {};\n },\n\n\n computed: {},\n\n methods: {\n onChange: function onChange() {\n if (this.rebuild) {\n this.rebuildViewer();\n } else {\n this.updateViewer();\n }\n },\n rebuildViewer: function rebuildViewer() {\n this.destroyViewer();\n this.createViewer();\n },\n updateViewer: function updateViewer() {\n if (this.$viewer) {\n this.$viewer.update();\n this.$emit('inited', this.$viewer);\n } else {\n this.createViewer();\n }\n },\n destroyViewer: function destroyViewer() {\n this.$viewer && this.$viewer.destroy();\n },\n createViewer: function createViewer() {\n this.$viewer = new __WEBPACK_IMPORTED_MODULE_0_viewerjs___default.a(this.$el, this.options);\n this.$emit('inited', this.$viewer);\n }\n },\n\n watch: {\n images: function images() {\n var _this = this;\n\n this.$nextTick(function () {\n _this.onChange();\n });\n },\n\n trigger: {\n handler: function handler() {\n var _this2 = this;\n\n this.$nextTick(function () {\n _this2.onChange();\n });\n },\n\n deep: true\n },\n options: {\n handler: function handler() {\n var _this3 = this;\n\n this.$nextTick(function () {\n _this3.rebuildViewer();\n });\n },\n\n deep: true\n }\n },\n\n mounted: function mounted() {\n this.createViewer();\n },\n destroyed: function destroyed() {\n this.destroyViewer();\n }\n});\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar g;\n\ng = function () {\n\treturn this;\n}();\n\ntry {\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\tif ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\nmodule.exports = g;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n// this module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n scopeId,\n cssModules\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n // inject cssModules\n if (cssModules) {\n var computed = Object.create(options.computed || null)\n Object.keys(cssModules).forEach(function (key) {\n var module = cssModules[key]\n computed[key] = function () { return module }\n })\n options.computed = computed\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', [_vm._t(\"default\", null, {\n \"images\": _vm.images,\n \"options\": _vm.options\n })], 2)\n},staticRenderFns: []}\nmodule.exports.render._withStripped = true\nif (false) {}\n\n/***/ })\n/******/ ]);\n});\n\n//# sourceURL=webpack:///./node_modules/v-viewer/dist/v-viewer.js?")},"./node_modules/viewerjs/dist/viewer.css": -/*!***********************************************!*\ - !*** ./node_modules/viewerjs/dist/viewer.css ***! - \***********************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/viewerjs/dist/viewer.css?")},"./node_modules/viewerjs/dist/viewer.js": -/*!**********************************************!*\ - !*** ./node_modules/viewerjs/dist/viewer.js ***! - \**********************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("/*!\n * Viewer.js v1.10.5\n * https://fengyuanchen.github.io/viewerjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2022-04-05T08:21:02.491Z\n */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n undefined;\n})(this, (function () { 'use strict';\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n }\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n var DEFAULTS = {\n /**\n * Enable a modal backdrop, specify `static` for a backdrop\n * which doesn't close the modal on click.\n * @type {boolean}\n */\n backdrop: true,\n\n /**\n * Show the button on the top-right of the viewer.\n * @type {boolean}\n */\n button: true,\n\n /**\n * Show the navbar.\n * @type {boolean | number}\n */\n navbar: true,\n\n /**\n * Specify the visibility and the content of the title.\n * @type {boolean | number | Function | Array}\n */\n title: true,\n\n /**\n * Show the toolbar.\n * @type {boolean | number | Object}\n */\n toolbar: true,\n\n /**\n * Custom class name(s) to add to the viewer's root element.\n * @type {string}\n */\n className: '',\n\n /**\n * Define where to put the viewer in modal mode.\n * @type {string | Element}\n */\n container: 'body',\n\n /**\n * Filter the images for viewing. Return true if the image is viewable.\n * @type {Function}\n */\n filter: null,\n\n /**\n * Enable to request fullscreen when play.\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/FullscreenOptions}\n * @type {boolean|FullscreenOptions}\n */\n fullscreen: true,\n\n /**\n * Define the extra attributes to inherit from the original image.\n * @type {Array}\n */\n inheritedAttributes: ['crossOrigin', 'decoding', 'isMap', 'loading', 'referrerPolicy', 'sizes', 'srcset', 'useMap'],\n\n /**\n * Define the initial index of image for viewing.\n * @type {number}\n */\n initialViewIndex: 0,\n\n /**\n * Enable inline mode.\n * @type {boolean}\n */\n inline: false,\n\n /**\n * The amount of time to delay between automatically cycling an image when playing.\n * @type {number}\n */\n interval: 5000,\n\n /**\n * Enable keyboard support.\n * @type {boolean}\n */\n keyboard: true,\n\n /**\n * Focus the viewer when initialized.\n * @type {boolean}\n */\n focus: true,\n\n /**\n * Indicate if show a loading spinner when load image or not.\n * @type {boolean}\n */\n loading: true,\n\n /**\n * Indicate if enable loop viewing or not.\n * @type {boolean}\n */\n loop: true,\n\n /**\n * Min width of the viewer in inline mode.\n * @type {number}\n */\n minWidth: 200,\n\n /**\n * Min height of the viewer in inline mode.\n * @type {number}\n */\n minHeight: 100,\n\n /**\n * Enable to move the image.\n * @type {boolean}\n */\n movable: true,\n\n /**\n * Enable to rotate the image.\n * @type {boolean}\n */\n rotatable: true,\n\n /**\n * Enable to scale the image.\n * @type {boolean}\n */\n scalable: true,\n\n /**\n * Enable to zoom the image.\n * @type {boolean}\n */\n zoomable: true,\n\n /**\n * Enable to zoom the current image by dragging on the touch screen.\n * @type {boolean}\n */\n zoomOnTouch: true,\n\n /**\n * Enable to zoom the image by wheeling mouse.\n * @type {boolean}\n */\n zoomOnWheel: true,\n\n /**\n * Enable to slide to the next or previous image by swiping on the touch screen.\n * @type {boolean}\n */\n slideOnTouch: true,\n\n /**\n * Indicate if toggle the image size between its natural size\n * and initial size when double click on the image or not.\n * @type {boolean}\n */\n toggleOnDblclick: true,\n\n /**\n * Show the tooltip with image ratio (percentage) when zoom in or zoom out.\n * @type {boolean}\n */\n tooltip: true,\n\n /**\n * Enable CSS3 Transition for some special elements.\n * @type {boolean}\n */\n transition: true,\n\n /**\n * Define the CSS `z-index` value of viewer in modal mode.\n * @type {number}\n */\n zIndex: 2015,\n\n /**\n * Define the CSS `z-index` value of viewer in inline mode.\n * @type {number}\n */\n zIndexInline: 0,\n\n /**\n * Define the ratio when zoom the image by wheeling mouse.\n * @type {number}\n */\n zoomRatio: 0.1,\n\n /**\n * Define the min ratio of the image when zoom out.\n * @type {number}\n */\n minZoomRatio: 0.01,\n\n /**\n * Define the max ratio of the image when zoom in.\n * @type {number}\n */\n maxZoomRatio: 100,\n\n /**\n * Define where to get the original image URL for viewing.\n * @type {string | Function}\n */\n url: 'src',\n\n /**\n * Event shortcuts.\n * @type {Function}\n */\n ready: null,\n show: null,\n shown: null,\n hide: null,\n hidden: null,\n view: null,\n viewed: null,\n move: null,\n moved: null,\n rotate: null,\n rotated: null,\n scale: null,\n scaled: null,\n zoom: null,\n zoomed: null,\n play: null,\n stop: null\n };\n\n var TEMPLATE = '
' + '
' + '
' + '
' + '
' + '
' + '
    ' + '
    ' + '
    ' + '
    ' + '
    ' + '
    ' + '
    ';\n\n var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n var WINDOW = IS_BROWSER ? window : {};\n var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false;\n var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false;\n var NAMESPACE = 'viewer'; // Actions\n\n var ACTION_MOVE = 'move';\n var ACTION_SWITCH = 'switch';\n var ACTION_ZOOM = 'zoom'; // Classes\n\n var CLASS_ACTIVE = \"\".concat(NAMESPACE, \"-active\");\n var CLASS_CLOSE = \"\".concat(NAMESPACE, \"-close\");\n var CLASS_FADE = \"\".concat(NAMESPACE, \"-fade\");\n var CLASS_FIXED = \"\".concat(NAMESPACE, \"-fixed\");\n var CLASS_FULLSCREEN = \"\".concat(NAMESPACE, \"-fullscreen\");\n var CLASS_FULLSCREEN_EXIT = \"\".concat(NAMESPACE, \"-fullscreen-exit\");\n var CLASS_HIDE = \"\".concat(NAMESPACE, \"-hide\");\n var CLASS_HIDE_MD_DOWN = \"\".concat(NAMESPACE, \"-hide-md-down\");\n var CLASS_HIDE_SM_DOWN = \"\".concat(NAMESPACE, \"-hide-sm-down\");\n var CLASS_HIDE_XS_DOWN = \"\".concat(NAMESPACE, \"-hide-xs-down\");\n var CLASS_IN = \"\".concat(NAMESPACE, \"-in\");\n var CLASS_INVISIBLE = \"\".concat(NAMESPACE, \"-invisible\");\n var CLASS_LOADING = \"\".concat(NAMESPACE, \"-loading\");\n var CLASS_MOVE = \"\".concat(NAMESPACE, \"-move\");\n var CLASS_OPEN = \"\".concat(NAMESPACE, \"-open\");\n var CLASS_SHOW = \"\".concat(NAMESPACE, \"-show\");\n var CLASS_TRANSITION = \"\".concat(NAMESPACE, \"-transition\"); // Native events\n\n var EVENT_CLICK = 'click';\n var EVENT_DBLCLICK = 'dblclick';\n var EVENT_DRAG_START = 'dragstart';\n var EVENT_FOCUSIN = 'focusin';\n var EVENT_KEY_DOWN = 'keydown';\n var EVENT_LOAD = 'load';\n var EVENT_ERROR = 'error';\n var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup';\n var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove';\n var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown';\n var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START;\n var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE;\n var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END;\n var EVENT_RESIZE = 'resize';\n var EVENT_TRANSITION_END = 'transitionend';\n var EVENT_WHEEL = 'wheel'; // Custom events\n\n var EVENT_READY = 'ready';\n var EVENT_SHOW = 'show';\n var EVENT_SHOWN = 'shown';\n var EVENT_HIDE = 'hide';\n var EVENT_HIDDEN = 'hidden';\n var EVENT_VIEW = 'view';\n var EVENT_VIEWED = 'viewed';\n var EVENT_MOVE = 'move';\n var EVENT_MOVED = 'moved';\n var EVENT_ROTATE = 'rotate';\n var EVENT_ROTATED = 'rotated';\n var EVENT_SCALE = 'scale';\n var EVENT_SCALED = 'scaled';\n var EVENT_ZOOM = 'zoom';\n var EVENT_ZOOMED = 'zoomed';\n var EVENT_PLAY = 'play';\n var EVENT_STOP = 'stop'; // Data keys\n\n var DATA_ACTION = \"\".concat(NAMESPACE, \"Action\"); // RegExps\n\n var REGEXP_SPACES = /\\s\\s*/; // Misc\n\n var BUTTONS = ['zoom-in', 'zoom-out', 'one-to-one', 'reset', 'prev', 'play', 'next', 'rotate-left', 'rotate-right', 'flip-horizontal', 'flip-vertical'];\n\n /**\n * Check if the given value is a string.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a string, else `false`.\n */\n\n function isString(value) {\n return typeof value === 'string';\n }\n /**\n * Check if the given value is not a number.\n */\n\n var isNaN = Number.isNaN || WINDOW.isNaN;\n /**\n * Check if the given value is a number.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a number, else `false`.\n */\n\n function isNumber(value) {\n return typeof value === 'number' && !isNaN(value);\n }\n /**\n * Check if the given value is undefined.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is undefined, else `false`.\n */\n\n function isUndefined(value) {\n return typeof value === 'undefined';\n }\n /**\n * Check if the given value is an object.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is an object, else `false`.\n */\n\n function isObject(value) {\n return _typeof(value) === 'object' && value !== null;\n }\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n /**\n * Check if the given value is a plain object.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a plain object, else `false`.\n */\n\n function isPlainObject(value) {\n if (!isObject(value)) {\n return false;\n }\n\n try {\n var _constructor = value.constructor;\n var prototype = _constructor.prototype;\n return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf');\n } catch (error) {\n return false;\n }\n }\n /**\n * Check if the given value is a function.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a function, else `false`.\n */\n\n function isFunction(value) {\n return typeof value === 'function';\n }\n /**\n * Iterate the given data.\n * @param {*} data - The data to iterate.\n * @param {Function} callback - The process function for each element.\n * @returns {*} The original data.\n */\n\n function forEach(data, callback) {\n if (data && isFunction(callback)) {\n if (Array.isArray(data) || isNumber(data.length)\n /* array-like */\n ) {\n var length = data.length;\n var i;\n\n for (i = 0; i < length; i += 1) {\n if (callback.call(data, data[i], i, data) === false) {\n break;\n }\n }\n } else if (isObject(data)) {\n Object.keys(data).forEach(function (key) {\n callback.call(data, data[key], key, data);\n });\n }\n }\n\n return data;\n }\n /**\n * Extend the given object.\n * @param {*} obj - The object to be extended.\n * @param {*} args - The rest objects which will be merged to the first object.\n * @returns {Object} The extended object.\n */\n\n var assign = Object.assign || function assign(obj) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (isObject(obj) && args.length > 0) {\n args.forEach(function (arg) {\n if (isObject(arg)) {\n Object.keys(arg).forEach(function (key) {\n obj[key] = arg[key];\n });\n }\n });\n }\n\n return obj;\n };\n var REGEXP_SUFFIX = /^(?:width|height|left|top|marginLeft|marginTop)$/;\n /**\n * Apply styles to the given element.\n * @param {Element} element - The target element.\n * @param {Object} styles - The styles for applying.\n */\n\n function setStyle(element, styles) {\n var style = element.style;\n forEach(styles, function (value, property) {\n if (REGEXP_SUFFIX.test(property) && isNumber(value)) {\n value += 'px';\n }\n\n style[property] = value;\n });\n }\n /**\n * Escape a string for using in HTML.\n * @param {String} value - The string to escape.\n * @returns {String} Returns the escaped string.\n */\n\n function escapeHTMLEntities(value) {\n return isString(value) ? value.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>') : value;\n }\n /**\n * Check if the given element has a special class.\n * @param {Element} element - The element to check.\n * @param {string} value - The class to search.\n * @returns {boolean} Returns `true` if the special class was found.\n */\n\n function hasClass(element, value) {\n if (!element || !value) {\n return false;\n }\n\n return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1;\n }\n /**\n * Add classes to the given element.\n * @param {Element} element - The target element.\n * @param {string} value - The classes to be added.\n */\n\n function addClass(element, value) {\n if (!element || !value) {\n return;\n }\n\n if (isNumber(element.length)) {\n forEach(element, function (elem) {\n addClass(elem, value);\n });\n return;\n }\n\n if (element.classList) {\n element.classList.add(value);\n return;\n }\n\n var className = element.className.trim();\n\n if (!className) {\n element.className = value;\n } else if (className.indexOf(value) < 0) {\n element.className = \"\".concat(className, \" \").concat(value);\n }\n }\n /**\n * Remove classes from the given element.\n * @param {Element} element - The target element.\n * @param {string} value - The classes to be removed.\n */\n\n function removeClass(element, value) {\n if (!element || !value) {\n return;\n }\n\n if (isNumber(element.length)) {\n forEach(element, function (elem) {\n removeClass(elem, value);\n });\n return;\n }\n\n if (element.classList) {\n element.classList.remove(value);\n return;\n }\n\n if (element.className.indexOf(value) >= 0) {\n element.className = element.className.replace(value, '');\n }\n }\n /**\n * Add or remove classes from the given element.\n * @param {Element} element - The target element.\n * @param {string} value - The classes to be toggled.\n * @param {boolean} added - Add only.\n */\n\n function toggleClass(element, value, added) {\n if (!value) {\n return;\n }\n\n if (isNumber(element.length)) {\n forEach(element, function (elem) {\n toggleClass(elem, value, added);\n });\n return;\n } // IE10-11 doesn't support the second parameter of `classList.toggle`\n\n\n if (added) {\n addClass(element, value);\n } else {\n removeClass(element, value);\n }\n }\n var REGEXP_HYPHENATE = /([a-z\\d])([A-Z])/g;\n /**\n * Transform the given string from camelCase to kebab-case\n * @param {string} value - The value to transform.\n * @returns {string} The transformed value.\n */\n\n function hyphenate(value) {\n return value.replace(REGEXP_HYPHENATE, '$1-$2').toLowerCase();\n }\n /**\n * Get data from the given element.\n * @param {Element} element - The target element.\n * @param {string} name - The data key to get.\n * @returns {string} The data value.\n */\n\n function getData(element, name) {\n if (isObject(element[name])) {\n return element[name];\n }\n\n if (element.dataset) {\n return element.dataset[name];\n }\n\n return element.getAttribute(\"data-\".concat(hyphenate(name)));\n }\n /**\n * Set data to the given element.\n * @param {Element} element - The target element.\n * @param {string} name - The data key to set.\n * @param {string} data - The data value.\n */\n\n function setData(element, name, data) {\n if (isObject(data)) {\n element[name] = data;\n } else if (element.dataset) {\n element.dataset[name] = data;\n } else {\n element.setAttribute(\"data-\".concat(hyphenate(name)), data);\n }\n }\n\n var onceSupported = function () {\n var supported = false;\n\n if (IS_BROWSER) {\n var once = false;\n\n var listener = function listener() {};\n\n var options = Object.defineProperty({}, 'once', {\n get: function get() {\n supported = true;\n return once;\n },\n\n /**\n * This setter can fix a `TypeError` in strict mode\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}\n * @param {boolean} value - The value to set\n */\n set: function set(value) {\n once = value;\n }\n });\n WINDOW.addEventListener('test', listener, options);\n WINDOW.removeEventListener('test', listener, options);\n }\n\n return supported;\n }();\n /**\n * Remove event listener from the target element.\n * @param {Element} element - The event target.\n * @param {string} type - The event type(s).\n * @param {Function} listener - The event listener.\n * @param {Object} options - The event options.\n */\n\n\n function removeListener(element, type, listener) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var handler = listener;\n type.trim().split(REGEXP_SPACES).forEach(function (event) {\n if (!onceSupported) {\n var listeners = element.listeners;\n\n if (listeners && listeners[event] && listeners[event][listener]) {\n handler = listeners[event][listener];\n delete listeners[event][listener];\n\n if (Object.keys(listeners[event]).length === 0) {\n delete listeners[event];\n }\n\n if (Object.keys(listeners).length === 0) {\n delete element.listeners;\n }\n }\n }\n\n element.removeEventListener(event, handler, options);\n });\n }\n /**\n * Add event listener to the target element.\n * @param {Element} element - The event target.\n * @param {string} type - The event type(s).\n * @param {Function} listener - The event listener.\n * @param {Object} options - The event options.\n */\n\n function addListener(element, type, listener) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var _handler = listener;\n type.trim().split(REGEXP_SPACES).forEach(function (event) {\n if (options.once && !onceSupported) {\n var _element$listeners = element.listeners,\n listeners = _element$listeners === void 0 ? {} : _element$listeners;\n\n _handler = function handler() {\n delete listeners[event][listener];\n element.removeEventListener(event, _handler, options);\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n listener.apply(element, args);\n };\n\n if (!listeners[event]) {\n listeners[event] = {};\n }\n\n if (listeners[event][listener]) {\n element.removeEventListener(event, listeners[event][listener], options);\n }\n\n listeners[event][listener] = _handler;\n element.listeners = listeners;\n }\n\n element.addEventListener(event, _handler, options);\n });\n }\n /**\n * Dispatch event on the target element.\n * @param {Element} element - The event target.\n * @param {string} type - The event type(s).\n * @param {Object} data - The additional event data.\n * @param {Object} options - The additional event options.\n * @returns {boolean} Indicate if the event is default prevented or not.\n */\n\n function dispatchEvent(element, type, data, options) {\n var event; // Event and CustomEvent on IE9-11 are global objects, not constructors\n\n if (isFunction(Event) && isFunction(CustomEvent)) {\n event = new CustomEvent(type, _objectSpread2({\n bubbles: true,\n cancelable: true,\n detail: data\n }, options));\n } else {\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(type, true, true, data);\n }\n\n return element.dispatchEvent(event);\n }\n /**\n * Get the offset base on the document.\n * @param {Element} element - The target element.\n * @returns {Object} The offset data.\n */\n\n function getOffset(element) {\n var box = element.getBoundingClientRect();\n return {\n left: box.left + (window.pageXOffset - document.documentElement.clientLeft),\n top: box.top + (window.pageYOffset - document.documentElement.clientTop)\n };\n }\n /**\n * Get transforms base on the given object.\n * @param {Object} obj - The target object.\n * @returns {string} A string contains transform values.\n */\n\n function getTransforms(_ref) {\n var rotate = _ref.rotate,\n scaleX = _ref.scaleX,\n scaleY = _ref.scaleY,\n translateX = _ref.translateX,\n translateY = _ref.translateY;\n var values = [];\n\n if (isNumber(translateX) && translateX !== 0) {\n values.push(\"translateX(\".concat(translateX, \"px)\"));\n }\n\n if (isNumber(translateY) && translateY !== 0) {\n values.push(\"translateY(\".concat(translateY, \"px)\"));\n } // Rotate should come first before scale to match orientation transform\n\n\n if (isNumber(rotate) && rotate !== 0) {\n values.push(\"rotate(\".concat(rotate, \"deg)\"));\n }\n\n if (isNumber(scaleX) && scaleX !== 1) {\n values.push(\"scaleX(\".concat(scaleX, \")\"));\n }\n\n if (isNumber(scaleY) && scaleY !== 1) {\n values.push(\"scaleY(\".concat(scaleY, \")\"));\n }\n\n var transform = values.length ? values.join(' ') : 'none';\n return {\n WebkitTransform: transform,\n msTransform: transform,\n transform: transform\n };\n }\n /**\n * Get an image name from an image url.\n * @param {string} url - The target url.\n * @example\n * // picture.jpg\n * getImageNameFromURL('https://domain.com/path/to/picture.jpg?size=1280×960')\n * @returns {string} A string contains the image name.\n */\n\n function getImageNameFromURL(url) {\n return isString(url) ? decodeURIComponent(url.replace(/^.*\\//, '').replace(/[?&#].*$/, '')) : '';\n }\n var IS_SAFARI = WINDOW.navigator && /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(WINDOW.navigator.userAgent);\n /**\n * Get an image's natural sizes.\n * @param {string} image - The target image.\n * @param {Object} options - The viewer options.\n * @param {Function} callback - The callback function.\n * @returns {HTMLImageElement} The new image.\n */\n\n function getImageNaturalSizes(image, options, callback) {\n var newImage = document.createElement('img'); // Modern browsers (except Safari)\n\n if (image.naturalWidth && !IS_SAFARI) {\n callback(image.naturalWidth, image.naturalHeight);\n return newImage;\n }\n\n var body = document.body || document.documentElement;\n\n newImage.onload = function () {\n callback(newImage.width, newImage.height);\n\n if (!IS_SAFARI) {\n body.removeChild(newImage);\n }\n };\n\n forEach(options.inheritedAttributes, function (name) {\n var value = image.getAttribute(name);\n\n if (value !== null) {\n newImage.setAttribute(name, value);\n }\n });\n newImage.src = image.src; // iOS Safari will convert the image automatically\n // with its orientation once append it into DOM\n\n if (!IS_SAFARI) {\n newImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';\n body.appendChild(newImage);\n }\n\n return newImage;\n }\n /**\n * Get the related class name of a responsive type number.\n * @param {string} type - The responsive type.\n * @returns {string} The related class name.\n */\n\n function getResponsiveClass(type) {\n switch (type) {\n case 2:\n return CLASS_HIDE_XS_DOWN;\n\n case 3:\n return CLASS_HIDE_SM_DOWN;\n\n case 4:\n return CLASS_HIDE_MD_DOWN;\n\n default:\n return '';\n }\n }\n /**\n * Get the max ratio of a group of pointers.\n * @param {string} pointers - The target pointers.\n * @returns {number} The result ratio.\n */\n\n function getMaxZoomRatio(pointers) {\n var pointers2 = _objectSpread2({}, pointers);\n\n var ratios = [];\n forEach(pointers, function (pointer, pointerId) {\n delete pointers2[pointerId];\n forEach(pointers2, function (pointer2) {\n var x1 = Math.abs(pointer.startX - pointer2.startX);\n var y1 = Math.abs(pointer.startY - pointer2.startY);\n var x2 = Math.abs(pointer.endX - pointer2.endX);\n var y2 = Math.abs(pointer.endY - pointer2.endY);\n var z1 = Math.sqrt(x1 * x1 + y1 * y1);\n var z2 = Math.sqrt(x2 * x2 + y2 * y2);\n var ratio = (z2 - z1) / z1;\n ratios.push(ratio);\n });\n });\n ratios.sort(function (a, b) {\n return Math.abs(a) < Math.abs(b);\n });\n return ratios[0];\n }\n /**\n * Get a pointer from an event object.\n * @param {Object} event - The target event object.\n * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not.\n * @returns {Object} The result pointer contains start and/or end point coordinates.\n */\n\n function getPointer(_ref2, endOnly) {\n var pageX = _ref2.pageX,\n pageY = _ref2.pageY;\n var end = {\n endX: pageX,\n endY: pageY\n };\n return endOnly ? end : _objectSpread2({\n timeStamp: Date.now(),\n startX: pageX,\n startY: pageY\n }, end);\n }\n /**\n * Get the center point coordinate of a group of pointers.\n * @param {Object} pointers - The target pointers.\n * @returns {Object} The center point coordinate.\n */\n\n function getPointersCenter(pointers) {\n var pageX = 0;\n var pageY = 0;\n var count = 0;\n forEach(pointers, function (_ref3) {\n var startX = _ref3.startX,\n startY = _ref3.startY;\n pageX += startX;\n pageY += startY;\n count += 1;\n });\n pageX /= count;\n pageY /= count;\n return {\n pageX: pageX,\n pageY: pageY\n };\n }\n\n var render = {\n render: function render() {\n this.initContainer();\n this.initViewer();\n this.initList();\n this.renderViewer();\n },\n initBody: function initBody() {\n var ownerDocument = this.element.ownerDocument;\n var body = ownerDocument.body || ownerDocument.documentElement;\n this.body = body;\n this.scrollbarWidth = window.innerWidth - ownerDocument.documentElement.clientWidth;\n this.initialBodyPaddingRight = body.style.paddingRight;\n this.initialBodyComputedPaddingRight = window.getComputedStyle(body).paddingRight;\n },\n initContainer: function initContainer() {\n this.containerData = {\n width: window.innerWidth,\n height: window.innerHeight\n };\n },\n initViewer: function initViewer() {\n var options = this.options,\n parent = this.parent;\n var viewerData;\n\n if (options.inline) {\n viewerData = {\n width: Math.max(parent.offsetWidth, options.minWidth),\n height: Math.max(parent.offsetHeight, options.minHeight)\n };\n this.parentData = viewerData;\n }\n\n if (this.fulled || !viewerData) {\n viewerData = this.containerData;\n }\n\n this.viewerData = assign({}, viewerData);\n },\n renderViewer: function renderViewer() {\n if (this.options.inline && !this.fulled) {\n setStyle(this.viewer, this.viewerData);\n }\n },\n initList: function initList() {\n var _this = this;\n\n var element = this.element,\n options = this.options,\n list = this.list;\n var items = []; // initList may be called in this.update, so should keep idempotent\n\n list.innerHTML = '';\n forEach(this.images, function (image, index) {\n var src = image.src;\n var alt = image.alt || getImageNameFromURL(src);\n\n var url = _this.getImageURL(image);\n\n if (src || url) {\n var item = document.createElement('li');\n var img = document.createElement('img');\n forEach(options.inheritedAttributes, function (name) {\n var value = image.getAttribute(name);\n\n if (value !== null) {\n img.setAttribute(name, value);\n }\n });\n img.src = src || url;\n img.alt = alt;\n img.setAttribute('data-original-url', url || src);\n item.setAttribute('data-index', index);\n item.setAttribute('data-viewer-action', 'view');\n item.setAttribute('role', 'button');\n\n if (options.keyboard) {\n item.setAttribute('tabindex', 0);\n }\n\n item.appendChild(img);\n list.appendChild(item);\n items.push(item);\n }\n });\n this.items = items;\n forEach(items, function (item) {\n var image = item.firstElementChild;\n var onLoad;\n var onError;\n setData(image, 'filled', true);\n\n if (options.loading) {\n addClass(item, CLASS_LOADING);\n }\n\n addListener(image, EVENT_LOAD, onLoad = function onLoad(event) {\n removeListener(image, EVENT_ERROR, onError);\n\n if (options.loading) {\n removeClass(item, CLASS_LOADING);\n }\n\n _this.loadImage(event);\n }, {\n once: true\n });\n addListener(image, EVENT_ERROR, onError = function onError() {\n removeListener(image, EVENT_LOAD, onLoad);\n\n if (options.loading) {\n removeClass(item, CLASS_LOADING);\n }\n }, {\n once: true\n });\n });\n\n if (options.transition) {\n addListener(element, EVENT_VIEWED, function () {\n addClass(list, CLASS_TRANSITION);\n }, {\n once: true\n });\n }\n },\n renderList: function renderList() {\n var index = this.index;\n var item = this.items[index];\n\n if (!item) {\n return;\n }\n\n var next = item.nextElementSibling;\n var gutter = parseInt(window.getComputedStyle(next || item).marginLeft, 10);\n var offsetWidth = item.offsetWidth;\n var outerWidth = offsetWidth + gutter; // Place the active item in the center of the screen\n\n setStyle(this.list, assign({\n width: outerWidth * this.length - gutter\n }, getTransforms({\n translateX: (this.viewerData.width - offsetWidth) / 2 - outerWidth * index\n })));\n },\n resetList: function resetList() {\n var list = this.list;\n list.innerHTML = '';\n removeClass(list, CLASS_TRANSITION);\n setStyle(list, getTransforms({\n translateX: 0\n }));\n },\n initImage: function initImage(done) {\n var _this2 = this;\n\n var options = this.options,\n image = this.image,\n viewerData = this.viewerData;\n var footerHeight = this.footer.offsetHeight;\n var viewerWidth = viewerData.width;\n var viewerHeight = Math.max(viewerData.height - footerHeight, footerHeight);\n var oldImageData = this.imageData || {};\n var sizingImage;\n this.imageInitializing = {\n abort: function abort() {\n sizingImage.onload = null;\n }\n };\n sizingImage = getImageNaturalSizes(image, options, function (naturalWidth, naturalHeight) {\n var aspectRatio = naturalWidth / naturalHeight;\n var width = viewerWidth;\n var height = viewerHeight;\n _this2.imageInitializing = false;\n\n if (viewerHeight * aspectRatio > viewerWidth) {\n height = viewerWidth / aspectRatio;\n } else {\n width = viewerHeight * aspectRatio;\n }\n\n width = Math.min(width * 0.9, naturalWidth);\n height = Math.min(height * 0.9, naturalHeight);\n var left = (viewerWidth - width) / 2;\n var top = (viewerHeight - height) / 2;\n var imageData = {\n left: left,\n top: top,\n x: left,\n y: top,\n width: width,\n height: height,\n oldRatio: 1,\n ratio: width / naturalWidth,\n aspectRatio: aspectRatio,\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight\n };\n var initialImageData = assign({}, imageData);\n\n if (options.rotatable) {\n imageData.rotate = oldImageData.rotate || 0;\n initialImageData.rotate = 0;\n }\n\n if (options.scalable) {\n imageData.scaleX = oldImageData.scaleX || 1;\n imageData.scaleY = oldImageData.scaleY || 1;\n initialImageData.scaleX = 1;\n initialImageData.scaleY = 1;\n }\n\n _this2.imageData = imageData;\n _this2.initialImageData = initialImageData;\n\n if (done) {\n done();\n }\n });\n },\n renderImage: function renderImage(done) {\n var _this3 = this;\n\n var image = this.image,\n imageData = this.imageData;\n setStyle(image, assign({\n width: imageData.width,\n height: imageData.height,\n // XXX: Not to use translateX/Y to avoid image shaking when zooming\n marginLeft: imageData.x,\n marginTop: imageData.y\n }, getTransforms(imageData)));\n\n if (done) {\n if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && hasClass(image, CLASS_TRANSITION)) {\n var onTransitionEnd = function onTransitionEnd() {\n _this3.imageRendering = false;\n done();\n };\n\n this.imageRendering = {\n abort: function abort() {\n removeListener(image, EVENT_TRANSITION_END, onTransitionEnd);\n }\n };\n addListener(image, EVENT_TRANSITION_END, onTransitionEnd, {\n once: true\n });\n } else {\n done();\n }\n }\n },\n resetImage: function resetImage() {\n // this.image only defined after viewed\n if (this.viewing || this.viewed) {\n var image = this.image;\n\n if (this.viewing) {\n this.viewing.abort();\n }\n\n image.parentNode.removeChild(image);\n this.image = null;\n }\n }\n };\n\n var events = {\n bind: function bind() {\n var options = this.options,\n viewer = this.viewer,\n canvas = this.canvas;\n var document = this.element.ownerDocument;\n addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this));\n addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this));\n addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this));\n addListener(document, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this));\n addListener(document, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this));\n addListener(document, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this));\n addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this));\n\n if (options.zoomable && options.zoomOnWheel) {\n addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), {\n passive: false,\n capture: true\n });\n }\n\n if (options.toggleOnDblclick) {\n addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this));\n }\n },\n unbind: function unbind() {\n var options = this.options,\n viewer = this.viewer,\n canvas = this.canvas;\n var document = this.element.ownerDocument;\n removeListener(viewer, EVENT_CLICK, this.onClick);\n removeListener(viewer, EVENT_DRAG_START, this.onDragStart);\n removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown);\n removeListener(document, EVENT_POINTER_MOVE, this.onPointerMove);\n removeListener(document, EVENT_POINTER_UP, this.onPointerUp);\n removeListener(document, EVENT_KEY_DOWN, this.onKeyDown);\n removeListener(window, EVENT_RESIZE, this.onResize);\n\n if (options.zoomable && options.zoomOnWheel) {\n removeListener(viewer, EVENT_WHEEL, this.onWheel, {\n passive: false,\n capture: true\n });\n }\n\n if (options.toggleOnDblclick) {\n removeListener(canvas, EVENT_DBLCLICK, this.onDblclick);\n }\n }\n };\n\n var handlers = {\n click: function click(event) {\n var options = this.options,\n imageData = this.imageData;\n var target = event.target;\n var action = getData(target, DATA_ACTION);\n\n if (!action && target.localName === 'img' && target.parentElement.localName === 'li') {\n target = target.parentElement;\n action = getData(target, DATA_ACTION);\n } // Cancel the emulated click when the native click event was triggered.\n\n\n if (IS_TOUCH_DEVICE && event.isTrusted && target === this.canvas) {\n clearTimeout(this.clickCanvasTimeout);\n }\n\n switch (action) {\n case 'mix':\n if (this.played) {\n this.stop();\n } else if (options.inline) {\n if (this.fulled) {\n this.exit();\n } else {\n this.full();\n }\n } else {\n this.hide();\n }\n\n break;\n\n case 'hide':\n this.hide();\n break;\n\n case 'view':\n this.view(getData(target, 'index'));\n break;\n\n case 'zoom-in':\n this.zoom(0.1, true);\n break;\n\n case 'zoom-out':\n this.zoom(-0.1, true);\n break;\n\n case 'one-to-one':\n this.toggle();\n break;\n\n case 'reset':\n this.reset();\n break;\n\n case 'prev':\n this.prev(options.loop);\n break;\n\n case 'play':\n this.play(options.fullscreen);\n break;\n\n case 'next':\n this.next(options.loop);\n break;\n\n case 'rotate-left':\n this.rotate(-90);\n break;\n\n case 'rotate-right':\n this.rotate(90);\n break;\n\n case 'flip-horizontal':\n this.scaleX(-imageData.scaleX || -1);\n break;\n\n case 'flip-vertical':\n this.scaleY(-imageData.scaleY || -1);\n break;\n\n default:\n if (this.played) {\n this.stop();\n }\n\n }\n },\n dblclick: function dblclick(event) {\n event.preventDefault();\n\n if (this.viewed && event.target === this.image) {\n // Cancel the emulated double click when the native dblclick event was triggered.\n if (IS_TOUCH_DEVICE && event.isTrusted) {\n clearTimeout(this.doubleClickImageTimeout);\n } // XXX: No pageX/Y properties in custom event, fallback to the original event.\n\n\n this.toggle(event.isTrusted ? event : event.detail && event.detail.originalEvent);\n }\n },\n load: function load() {\n var _this = this;\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = false;\n }\n\n var element = this.element,\n options = this.options,\n image = this.image,\n index = this.index,\n viewerData = this.viewerData;\n removeClass(image, CLASS_INVISIBLE);\n\n if (options.loading) {\n removeClass(this.canvas, CLASS_LOADING);\n }\n\n image.style.cssText = 'height:0;' + \"margin-left:\".concat(viewerData.width / 2, \"px;\") + \"margin-top:\".concat(viewerData.height / 2, \"px;\") + 'max-width:none!important;' + 'position:relative;' + 'width:0;';\n this.initImage(function () {\n toggleClass(image, CLASS_MOVE, options.movable);\n toggleClass(image, CLASS_TRANSITION, options.transition);\n\n _this.renderImage(function () {\n _this.viewed = true;\n _this.viewing = false;\n\n if (isFunction(options.viewed)) {\n addListener(element, EVENT_VIEWED, options.viewed, {\n once: true\n });\n }\n\n dispatchEvent(element, EVENT_VIEWED, {\n originalImage: _this.images[index],\n index: index,\n image: image\n }, {\n cancelable: false\n });\n });\n });\n },\n loadImage: function loadImage(event) {\n var image = event.target;\n var parent = image.parentNode;\n var parentWidth = parent.offsetWidth || 30;\n var parentHeight = parent.offsetHeight || 50;\n var filled = !!getData(image, 'filled');\n getImageNaturalSizes(image, this.options, function (naturalWidth, naturalHeight) {\n var aspectRatio = naturalWidth / naturalHeight;\n var width = parentWidth;\n var height = parentHeight;\n\n if (parentHeight * aspectRatio > parentWidth) {\n if (filled) {\n width = parentHeight * aspectRatio;\n } else {\n height = parentWidth / aspectRatio;\n }\n } else if (filled) {\n height = parentWidth / aspectRatio;\n } else {\n width = parentHeight * aspectRatio;\n }\n\n setStyle(image, assign({\n width: width,\n height: height\n }, getTransforms({\n translateX: (parentWidth - width) / 2,\n translateY: (parentHeight - height) / 2\n })));\n });\n },\n keydown: function keydown(event) {\n var options = this.options;\n\n if (!options.keyboard) {\n return;\n }\n\n var keyCode = event.keyCode || event.which || event.charCode;\n\n switch (keyCode) {\n // Enter\n case 13:\n if (this.viewer.contains(event.target)) {\n this.click(event);\n }\n\n break;\n }\n\n if (!this.fulled) {\n return;\n }\n\n switch (keyCode) {\n // Escape\n case 27:\n if (this.played) {\n this.stop();\n } else if (options.inline) {\n if (this.fulled) {\n this.exit();\n }\n } else {\n this.hide();\n }\n\n break;\n // Space\n\n case 32:\n if (this.played) {\n this.stop();\n }\n\n break;\n // ArrowLeft\n\n case 37:\n this.prev(options.loop);\n break;\n // ArrowUp\n\n case 38:\n // Prevent scroll on Firefox\n event.preventDefault(); // Zoom in\n\n this.zoom(options.zoomRatio, true);\n break;\n // ArrowRight\n\n case 39:\n this.next(options.loop);\n break;\n // ArrowDown\n\n case 40:\n // Prevent scroll on Firefox\n event.preventDefault(); // Zoom out\n\n this.zoom(-options.zoomRatio, true);\n break;\n // Ctrl + 0\n\n case 48: // Fall through\n // Ctrl + 1\n // eslint-disable-next-line no-fallthrough\n\n case 49:\n if (event.ctrlKey) {\n event.preventDefault();\n this.toggle();\n }\n\n break;\n }\n },\n dragstart: function dragstart(event) {\n if (event.target.localName === 'img') {\n event.preventDefault();\n }\n },\n pointerdown: function pointerdown(event) {\n var options = this.options,\n pointers = this.pointers;\n var buttons = event.buttons,\n button = event.button;\n\n if (!this.viewed || this.showing || this.viewing || this.hiding // Handle mouse event and pointer event and ignore touch event\n || (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button)\n isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu\n || event.ctrlKey)) {\n return;\n } // Prevent default behaviours as page zooming in touch devices.\n\n\n event.preventDefault();\n\n if (event.changedTouches) {\n forEach(event.changedTouches, function (touch) {\n pointers[touch.identifier] = getPointer(touch);\n });\n } else {\n pointers[event.pointerId || 0] = getPointer(event);\n }\n\n var action = options.movable ? ACTION_MOVE : false;\n\n if (options.zoomOnTouch && options.zoomable && Object.keys(pointers).length > 1) {\n action = ACTION_ZOOM;\n } else if (options.slideOnTouch && (event.pointerType === 'touch' || event.type === 'touchstart') && this.isSwitchable()) {\n action = ACTION_SWITCH;\n }\n\n if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {\n removeClass(this.image, CLASS_TRANSITION);\n }\n\n this.action = action;\n },\n pointermove: function pointermove(event) {\n var pointers = this.pointers,\n action = this.action;\n\n if (!this.viewed || !action) {\n return;\n }\n\n event.preventDefault();\n\n if (event.changedTouches) {\n forEach(event.changedTouches, function (touch) {\n assign(pointers[touch.identifier] || {}, getPointer(touch, true));\n });\n } else {\n assign(pointers[event.pointerId || 0] || {}, getPointer(event, true));\n }\n\n this.change(event);\n },\n pointerup: function pointerup(event) {\n var _this2 = this;\n\n var options = this.options,\n action = this.action,\n pointers = this.pointers;\n var pointer;\n\n if (event.changedTouches) {\n forEach(event.changedTouches, function (touch) {\n pointer = pointers[touch.identifier];\n delete pointers[touch.identifier];\n });\n } else {\n pointer = pointers[event.pointerId || 0];\n delete pointers[event.pointerId || 0];\n }\n\n if (!action) {\n return;\n }\n\n event.preventDefault();\n\n if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {\n addClass(this.image, CLASS_TRANSITION);\n }\n\n this.action = false; // Emulate click and double click in touch devices to support backdrop and image zooming (#210).\n\n if (IS_TOUCH_DEVICE && action !== ACTION_ZOOM && pointer && Date.now() - pointer.timeStamp < 500) {\n clearTimeout(this.clickCanvasTimeout);\n clearTimeout(this.doubleClickImageTimeout);\n\n if (options.toggleOnDblclick && this.viewed && event.target === this.image) {\n if (this.imageClicked) {\n this.imageClicked = false; // This timeout will be cleared later when a native dblclick event is triggering\n\n this.doubleClickImageTimeout = setTimeout(function () {\n dispatchEvent(_this2.image, EVENT_DBLCLICK, {\n originalEvent: event\n });\n }, 50);\n } else {\n this.imageClicked = true; // The default timing of a double click in Windows is 500 ms\n\n this.doubleClickImageTimeout = setTimeout(function () {\n _this2.imageClicked = false;\n }, 500);\n }\n } else {\n this.imageClicked = false;\n\n if (options.backdrop && options.backdrop !== 'static' && event.target === this.canvas) {\n // This timeout will be cleared later when a native click event is triggering\n this.clickCanvasTimeout = setTimeout(function () {\n dispatchEvent(_this2.canvas, EVENT_CLICK, {\n originalEvent: event\n });\n }, 50);\n }\n }\n }\n },\n resize: function resize() {\n var _this3 = this;\n\n if (!this.isShown || this.hiding) {\n return;\n }\n\n if (this.fulled) {\n this.close();\n this.initBody();\n this.open();\n }\n\n this.initContainer();\n this.initViewer();\n this.renderViewer();\n this.renderList();\n\n if (this.viewed) {\n this.initImage(function () {\n _this3.renderImage();\n });\n }\n\n if (this.played) {\n if (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {\n this.stop();\n return;\n }\n\n forEach(this.player.getElementsByTagName('img'), function (image) {\n addListener(image, EVENT_LOAD, _this3.loadImage.bind(_this3), {\n once: true\n });\n dispatchEvent(image, EVENT_LOAD);\n });\n }\n },\n wheel: function wheel(event) {\n var _this4 = this;\n\n if (!this.viewed) {\n return;\n }\n\n event.preventDefault(); // Limit wheel speed to prevent zoom too fast\n\n if (this.wheeling) {\n return;\n }\n\n this.wheeling = true;\n setTimeout(function () {\n _this4.wheeling = false;\n }, 50);\n var ratio = Number(this.options.zoomRatio) || 0.1;\n var delta = 1;\n\n if (event.deltaY) {\n delta = event.deltaY > 0 ? 1 : -1;\n } else if (event.wheelDelta) {\n delta = -event.wheelDelta / 120;\n } else if (event.detail) {\n delta = event.detail > 0 ? 1 : -1;\n }\n\n this.zoom(-delta * ratio, true, event);\n }\n };\n\n var methods = {\n /** Show the viewer (only available in modal mode)\n * @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.\n * @returns {Viewer} this\n */\n show: function show() {\n var immediate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var element = this.element,\n options = this.options;\n\n if (options.inline || this.showing || this.isShown || this.showing) {\n return this;\n }\n\n if (!this.ready) {\n this.build();\n\n if (this.ready) {\n this.show(immediate);\n }\n\n return this;\n }\n\n if (isFunction(options.show)) {\n addListener(element, EVENT_SHOW, options.show, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_SHOW) === false || !this.ready) {\n return this;\n }\n\n if (this.hiding) {\n this.transitioning.abort();\n }\n\n this.showing = true;\n this.open();\n var viewer = this.viewer;\n removeClass(viewer, CLASS_HIDE);\n viewer.setAttribute('role', 'dialog');\n viewer.setAttribute('aria-labelledby', this.title.id);\n viewer.setAttribute('aria-modal', true);\n viewer.removeAttribute('aria-hidden');\n\n if (options.transition && !immediate) {\n var shown = this.shown.bind(this);\n this.transitioning = {\n abort: function abort() {\n removeListener(viewer, EVENT_TRANSITION_END, shown);\n removeClass(viewer, CLASS_IN);\n }\n };\n addClass(viewer, CLASS_TRANSITION); // Force reflow to enable CSS3 transition\n\n viewer.initialOffsetWidth = viewer.offsetWidth;\n addListener(viewer, EVENT_TRANSITION_END, shown, {\n once: true\n });\n addClass(viewer, CLASS_IN);\n } else {\n addClass(viewer, CLASS_IN);\n this.shown();\n }\n\n return this;\n },\n\n /**\n * Hide the viewer (only available in modal mode)\n * @param {boolean} [immediate=false] - Indicates if hide the viewer immediately or not.\n * @returns {Viewer} this\n */\n hide: function hide() {\n var _this = this;\n\n var immediate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var element = this.element,\n options = this.options;\n\n if (options.inline || this.hiding || !(this.isShown || this.showing)) {\n return this;\n }\n\n if (isFunction(options.hide)) {\n addListener(element, EVENT_HIDE, options.hide, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_HIDE) === false) {\n return this;\n }\n\n if (this.showing) {\n this.transitioning.abort();\n }\n\n this.hiding = true;\n\n if (this.played) {\n this.stop();\n } else if (this.viewing) {\n this.viewing.abort();\n }\n\n var viewer = this.viewer,\n image = this.image;\n\n var hideImmediately = function hideImmediately() {\n removeClass(viewer, CLASS_IN);\n\n _this.hidden();\n };\n\n if (options.transition && !immediate) {\n var onViewerTransitionEnd = function onViewerTransitionEnd(event) {\n // Ignore all propagating `transitionend` events (#275).\n if (event && event.target === viewer) {\n removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);\n\n _this.hidden();\n }\n };\n\n var onImageTransitionEnd = function onImageTransitionEnd() {\n // In case of show the viewer by `viewer.show(true)` previously (#407).\n if (hasClass(viewer, CLASS_TRANSITION)) {\n addListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);\n removeClass(viewer, CLASS_IN);\n } else {\n hideImmediately();\n }\n };\n\n this.transitioning = {\n abort: function abort() {\n if (_this.viewed && hasClass(image, CLASS_TRANSITION)) {\n removeListener(image, EVENT_TRANSITION_END, onImageTransitionEnd);\n } else if (hasClass(viewer, CLASS_TRANSITION)) {\n removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);\n }\n }\n }; // In case of hiding the viewer when holding on the image (#255),\n // note that the `CLASS_TRANSITION` class will be removed on pointer down.\n\n if (this.viewed && hasClass(image, CLASS_TRANSITION)) {\n addListener(image, EVENT_TRANSITION_END, onImageTransitionEnd, {\n once: true\n });\n this.zoomTo(0, false, null, true);\n } else {\n onImageTransitionEnd();\n }\n } else {\n hideImmediately();\n }\n\n return this;\n },\n\n /**\n * View one of the images with image's index\n * @param {number} index - The index of the image to view.\n * @returns {Viewer} this\n */\n view: function view() {\n var _this2 = this;\n\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex;\n index = Number(index) || 0;\n\n if (this.hiding || this.played || index < 0 || index >= this.length || this.viewed && index === this.index) {\n return this;\n }\n\n if (!this.isShown) {\n this.index = index;\n return this.show();\n }\n\n if (this.viewing) {\n this.viewing.abort();\n }\n\n var element = this.element,\n options = this.options,\n title = this.title,\n canvas = this.canvas;\n var item = this.items[index];\n var img = item.querySelector('img');\n var url = getData(img, 'originalUrl');\n var alt = img.getAttribute('alt');\n var image = document.createElement('img');\n forEach(options.inheritedAttributes, function (name) {\n var value = img.getAttribute(name);\n\n if (value !== null) {\n image.setAttribute(name, value);\n }\n });\n image.src = url;\n image.alt = alt;\n\n if (isFunction(options.view)) {\n addListener(element, EVENT_VIEW, options.view, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_VIEW, {\n originalImage: this.images[index],\n index: index,\n image: image\n }) === false || !this.isShown || this.hiding || this.played) {\n return this;\n }\n\n var activeItem = this.items[this.index];\n\n if (activeItem) {\n removeClass(activeItem, CLASS_ACTIVE);\n activeItem.removeAttribute('aria-selected');\n }\n\n addClass(item, CLASS_ACTIVE);\n item.setAttribute('aria-selected', true);\n\n if (options.focus) {\n item.focus();\n }\n\n this.image = image;\n this.viewed = false;\n this.index = index;\n this.imageData = {};\n addClass(image, CLASS_INVISIBLE);\n\n if (options.loading) {\n addClass(canvas, CLASS_LOADING);\n }\n\n canvas.innerHTML = '';\n canvas.appendChild(image); // Center current item\n\n this.renderList(); // Clear title\n\n title.innerHTML = ''; // Generate title after viewed\n\n var onViewed = function onViewed() {\n var imageData = _this2.imageData;\n var render = Array.isArray(options.title) ? options.title[1] : options.title;\n title.innerHTML = escapeHTMLEntities(isFunction(render) ? render.call(_this2, image, imageData) : \"\".concat(alt, \" (\").concat(imageData.naturalWidth, \" \\xD7 \").concat(imageData.naturalHeight, \")\"));\n };\n\n var onLoad;\n var onError;\n addListener(element, EVENT_VIEWED, onViewed, {\n once: true\n });\n this.viewing = {\n abort: function abort() {\n removeListener(element, EVENT_VIEWED, onViewed);\n\n if (image.complete) {\n if (_this2.imageRendering) {\n _this2.imageRendering.abort();\n } else if (_this2.imageInitializing) {\n _this2.imageInitializing.abort();\n }\n } else {\n // Cancel download to save bandwidth.\n image.src = '';\n removeListener(image, EVENT_LOAD, onLoad);\n\n if (_this2.timeout) {\n clearTimeout(_this2.timeout);\n }\n }\n }\n };\n\n if (image.complete) {\n this.load();\n } else {\n addListener(image, EVENT_LOAD, onLoad = function onLoad() {\n removeListener(image, EVENT_ERROR, onError);\n\n _this2.load();\n }, {\n once: true\n });\n addListener(image, EVENT_ERROR, onError = function onError() {\n removeListener(image, EVENT_LOAD, onLoad);\n\n if (_this2.timeout) {\n clearTimeout(_this2.timeout);\n _this2.timeout = false;\n }\n\n removeClass(image, CLASS_INVISIBLE);\n\n if (options.loading) {\n removeClass(_this2.canvas, CLASS_LOADING);\n }\n }, {\n once: true\n });\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n } // Make the image visible if it fails to load within 1s\n\n\n this.timeout = setTimeout(function () {\n removeClass(image, CLASS_INVISIBLE);\n _this2.timeout = false;\n }, 1000);\n }\n\n return this;\n },\n\n /**\n * View the previous image\n * @param {boolean} [loop=false] - Indicate if view the last one\n * when it is the first one at present.\n * @returns {Viewer} this\n */\n prev: function prev() {\n var loop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var index = this.index - 1;\n\n if (index < 0) {\n index = loop ? this.length - 1 : 0;\n }\n\n this.view(index);\n return this;\n },\n\n /**\n * View the next image\n * @param {boolean} [loop=false] - Indicate if view the first one\n * when it is the last one at present.\n * @returns {Viewer} this\n */\n next: function next() {\n var loop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var maxIndex = this.length - 1;\n var index = this.index + 1;\n\n if (index > maxIndex) {\n index = loop ? 0 : maxIndex;\n }\n\n this.view(index);\n return this;\n },\n\n /**\n * Move the image with relative offsets.\n * @param {number} x - The moving distance in the horizontal direction.\n * @param {number} [y=x] The moving distance in the vertical direction.\n * @returns {Viewer} this\n */\n move: function move(x) {\n var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;\n var imageData = this.imageData;\n this.moveTo(isUndefined(x) ? x : imageData.x + Number(x), isUndefined(y) ? y : imageData.y + Number(y));\n return this;\n },\n\n /**\n * Move the image to an absolute point.\n * @param {number} x - The new position in the horizontal direction.\n * @param {number} [y=x] - The new position in the vertical direction.\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @returns {Viewer} this\n */\n moveTo: function moveTo(x) {\n var _this3 = this;\n\n var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;\n\n var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n var element = this.element,\n options = this.options,\n imageData = this.imageData;\n x = Number(x);\n y = Number(y);\n\n if (this.viewed && !this.played && options.movable) {\n var oldX = imageData.x;\n var oldY = imageData.y;\n var changed = false;\n\n if (isNumber(x)) {\n changed = true;\n } else {\n x = oldX;\n }\n\n if (isNumber(y)) {\n changed = true;\n } else {\n y = oldY;\n }\n\n if (changed) {\n if (isFunction(options.move)) {\n addListener(element, EVENT_MOVE, options.move, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_MOVE, {\n x: x,\n y: y,\n oldX: oldX,\n oldY: oldY,\n originalEvent: _originalEvent\n }) === false) {\n return this;\n }\n\n imageData.x = x;\n imageData.y = y;\n imageData.left = x;\n imageData.top = y;\n this.moving = true;\n this.renderImage(function () {\n _this3.moving = false;\n\n if (isFunction(options.moved)) {\n addListener(element, EVENT_MOVED, options.moved, {\n once: true\n });\n }\n\n dispatchEvent(element, EVENT_MOVED, {\n x: x,\n y: y,\n oldX: oldX,\n oldY: oldY,\n originalEvent: _originalEvent\n }, {\n cancelable: false\n });\n });\n }\n }\n\n return this;\n },\n\n /**\n * Rotate the image with a relative degree.\n * @param {number} degree - The rotate degree.\n * @returns {Viewer} this\n */\n rotate: function rotate(degree) {\n this.rotateTo((this.imageData.rotate || 0) + Number(degree));\n return this;\n },\n\n /**\n * Rotate the image to an absolute degree.\n * @param {number} degree - The rotate degree.\n * @returns {Viewer} this\n */\n rotateTo: function rotateTo(degree) {\n var _this4 = this;\n\n var element = this.element,\n options = this.options,\n imageData = this.imageData;\n degree = Number(degree);\n\n if (isNumber(degree) && this.viewed && !this.played && options.rotatable) {\n var oldDegree = imageData.rotate;\n\n if (isFunction(options.rotate)) {\n addListener(element, EVENT_ROTATE, options.rotate, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_ROTATE, {\n degree: degree,\n oldDegree: oldDegree\n }) === false) {\n return this;\n }\n\n imageData.rotate = degree;\n this.rotating = true;\n this.renderImage(function () {\n _this4.rotating = false;\n\n if (isFunction(options.rotated)) {\n addListener(element, EVENT_ROTATED, options.rotated, {\n once: true\n });\n }\n\n dispatchEvent(element, EVENT_ROTATED, {\n degree: degree,\n oldDegree: oldDegree\n }, {\n cancelable: false\n });\n });\n }\n\n return this;\n },\n\n /**\n * Scale the image on the x-axis.\n * @param {number} scaleX - The scale ratio on the x-axis.\n * @returns {Viewer} this\n */\n scaleX: function scaleX(_scaleX) {\n this.scale(_scaleX, this.imageData.scaleY);\n return this;\n },\n\n /**\n * Scale the image on the y-axis.\n * @param {number} scaleY - The scale ratio on the y-axis.\n * @returns {Viewer} this\n */\n scaleY: function scaleY(_scaleY) {\n this.scale(this.imageData.scaleX, _scaleY);\n return this;\n },\n\n /**\n * Scale the image.\n * @param {number} scaleX - The scale ratio on the x-axis.\n * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.\n * @returns {Viewer} this\n */\n scale: function scale(scaleX) {\n var _this5 = this;\n\n var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX;\n var element = this.element,\n options = this.options,\n imageData = this.imageData;\n scaleX = Number(scaleX);\n scaleY = Number(scaleY);\n\n if (this.viewed && !this.played && options.scalable) {\n var oldScaleX = imageData.scaleX;\n var oldScaleY = imageData.scaleY;\n var changed = false;\n\n if (isNumber(scaleX)) {\n changed = true;\n } else {\n scaleX = oldScaleX;\n }\n\n if (isNumber(scaleY)) {\n changed = true;\n } else {\n scaleY = oldScaleY;\n }\n\n if (changed) {\n if (isFunction(options.scale)) {\n addListener(element, EVENT_SCALE, options.scale, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_SCALE, {\n scaleX: scaleX,\n scaleY: scaleY,\n oldScaleX: oldScaleX,\n oldScaleY: oldScaleY\n }) === false) {\n return this;\n }\n\n imageData.scaleX = scaleX;\n imageData.scaleY = scaleY;\n this.scaling = true;\n this.renderImage(function () {\n _this5.scaling = false;\n\n if (isFunction(options.scaled)) {\n addListener(element, EVENT_SCALED, options.scaled, {\n once: true\n });\n }\n\n dispatchEvent(element, EVENT_SCALED, {\n scaleX: scaleX,\n scaleY: scaleY,\n oldScaleX: oldScaleX,\n oldScaleY: oldScaleY\n }, {\n cancelable: false\n });\n });\n }\n }\n\n return this;\n },\n\n /**\n * Zoom the image with a relative ratio.\n * @param {number} ratio - The target ratio.\n * @param {boolean} [hasTooltip=false] - Indicates if it has a tooltip or not.\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @returns {Viewer} this\n */\n zoom: function zoom(ratio) {\n var hasTooltip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n var imageData = this.imageData;\n ratio = Number(ratio);\n\n if (ratio < 0) {\n ratio = 1 / (1 - ratio);\n } else {\n ratio = 1 + ratio;\n }\n\n this.zoomTo(imageData.width * ratio / imageData.naturalWidth, hasTooltip, _originalEvent);\n return this;\n },\n\n /**\n * Zoom the image to an absolute ratio.\n * @param {number} ratio - The target ratio.\n * @param {boolean} [hasTooltip=false] - Indicates if it has a tooltip or not.\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @param {Event} [_zoomable=false] - Indicates if the current zoom is available or not.\n * @returns {Viewer} this\n */\n zoomTo: function zoomTo(ratio) {\n var _this6 = this;\n\n var hasTooltip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n var _zoomable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n var element = this.element,\n options = this.options,\n pointers = this.pointers,\n imageData = this.imageData;\n var x = imageData.x,\n y = imageData.y,\n width = imageData.width,\n height = imageData.height,\n naturalWidth = imageData.naturalWidth,\n naturalHeight = imageData.naturalHeight;\n ratio = Math.max(0, ratio);\n\n if (isNumber(ratio) && this.viewed && !this.played && (_zoomable || options.zoomable)) {\n if (!_zoomable) {\n var minZoomRatio = Math.max(0.01, options.minZoomRatio);\n var maxZoomRatio = Math.min(100, options.maxZoomRatio);\n ratio = Math.min(Math.max(ratio, minZoomRatio), maxZoomRatio);\n }\n\n if (_originalEvent) {\n switch (_originalEvent.type) {\n case 'wheel':\n if (options.zoomRatio >= 0.055 && ratio > 0.95 && ratio < 1.05) {\n ratio = 1;\n }\n\n break;\n\n case 'pointermove':\n case 'touchmove':\n case 'mousemove':\n if (ratio > 0.99 && ratio < 1.01) {\n ratio = 1;\n }\n\n break;\n }\n }\n\n var newWidth = naturalWidth * ratio;\n var newHeight = naturalHeight * ratio;\n var offsetWidth = newWidth - width;\n var offsetHeight = newHeight - height;\n var oldRatio = imageData.ratio;\n\n if (isFunction(options.zoom)) {\n addListener(element, EVENT_ZOOM, options.zoom, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_ZOOM, {\n ratio: ratio,\n oldRatio: oldRatio,\n originalEvent: _originalEvent\n }) === false) {\n return this;\n }\n\n this.zooming = true;\n\n if (_originalEvent) {\n var offset = getOffset(this.viewer);\n var center = pointers && Object.keys(pointers).length > 0 ? getPointersCenter(pointers) : {\n pageX: _originalEvent.pageX,\n pageY: _originalEvent.pageY\n }; // Zoom from the triggering point of the event\n\n imageData.x -= offsetWidth * ((center.pageX - offset.left - x) / width);\n imageData.y -= offsetHeight * ((center.pageY - offset.top - y) / height);\n } else {\n // Zoom from the center of the image\n imageData.x -= offsetWidth / 2;\n imageData.y -= offsetHeight / 2;\n }\n\n imageData.left = imageData.x;\n imageData.top = imageData.y;\n imageData.width = newWidth;\n imageData.height = newHeight;\n imageData.oldRatio = oldRatio;\n imageData.ratio = ratio;\n this.renderImage(function () {\n _this6.zooming = false;\n\n if (isFunction(options.zoomed)) {\n addListener(element, EVENT_ZOOMED, options.zoomed, {\n once: true\n });\n }\n\n dispatchEvent(element, EVENT_ZOOMED, {\n ratio: ratio,\n oldRatio: oldRatio,\n originalEvent: _originalEvent\n }, {\n cancelable: false\n });\n });\n\n if (hasTooltip) {\n this.tooltip();\n }\n }\n\n return this;\n },\n\n /**\n * Play the images\n * @param {boolean|FullscreenOptions} [fullscreen=false] - Indicate if request fullscreen or not.\n * @returns {Viewer} this\n */\n play: function play() {\n var _this7 = this;\n\n var fullscreen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!this.isShown || this.played) {\n return this;\n }\n\n var element = this.element,\n options = this.options;\n\n if (isFunction(options.play)) {\n addListener(element, EVENT_PLAY, options.play, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_PLAY) === false) {\n return this;\n }\n\n var player = this.player;\n var onLoad = this.loadImage.bind(this);\n var list = [];\n var total = 0;\n var index = 0;\n this.played = true;\n this.onLoadWhenPlay = onLoad;\n\n if (fullscreen) {\n this.requestFullscreen(fullscreen);\n }\n\n addClass(player, CLASS_SHOW);\n forEach(this.items, function (item, i) {\n var img = item.querySelector('img');\n var image = document.createElement('img');\n image.src = getData(img, 'originalUrl');\n image.alt = img.getAttribute('alt');\n image.referrerPolicy = img.referrerPolicy;\n total += 1;\n addClass(image, CLASS_FADE);\n toggleClass(image, CLASS_TRANSITION, options.transition);\n\n if (hasClass(item, CLASS_ACTIVE)) {\n addClass(image, CLASS_IN);\n index = i;\n }\n\n list.push(image);\n addListener(image, EVENT_LOAD, onLoad, {\n once: true\n });\n player.appendChild(image);\n });\n\n if (isNumber(options.interval) && options.interval > 0) {\n var play = function play() {\n _this7.playing = setTimeout(function () {\n removeClass(list[index], CLASS_IN);\n index += 1;\n index = index < total ? index : 0;\n addClass(list[index], CLASS_IN);\n play();\n }, options.interval);\n };\n\n if (total > 1) {\n play();\n }\n }\n\n return this;\n },\n // Stop play\n stop: function stop() {\n var _this8 = this;\n\n if (!this.played) {\n return this;\n }\n\n var element = this.element,\n options = this.options;\n\n if (isFunction(options.stop)) {\n addListener(element, EVENT_STOP, options.stop, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_STOP) === false) {\n return this;\n }\n\n var player = this.player;\n this.played = false;\n clearTimeout(this.playing);\n forEach(player.getElementsByTagName('img'), function (image) {\n removeListener(image, EVENT_LOAD, _this8.onLoadWhenPlay);\n });\n removeClass(player, CLASS_SHOW);\n player.innerHTML = '';\n this.exitFullscreen();\n return this;\n },\n // Enter modal mode (only available in inline mode)\n full: function full() {\n var _this9 = this;\n\n var options = this.options,\n viewer = this.viewer,\n image = this.image,\n list = this.list;\n\n if (!this.isShown || this.played || this.fulled || !options.inline) {\n return this;\n }\n\n this.fulled = true;\n this.open();\n addClass(this.button, CLASS_FULLSCREEN_EXIT);\n\n if (options.transition) {\n removeClass(list, CLASS_TRANSITION);\n\n if (this.viewed) {\n removeClass(image, CLASS_TRANSITION);\n }\n }\n\n addClass(viewer, CLASS_FIXED);\n viewer.setAttribute('role', 'dialog');\n viewer.setAttribute('aria-labelledby', this.title.id);\n viewer.setAttribute('aria-modal', true);\n viewer.removeAttribute('style');\n setStyle(viewer, {\n zIndex: options.zIndex\n });\n\n if (options.focus) {\n this.enforceFocus();\n }\n\n this.initContainer();\n this.viewerData = assign({}, this.containerData);\n this.renderList();\n\n if (this.viewed) {\n this.initImage(function () {\n _this9.renderImage(function () {\n if (options.transition) {\n setTimeout(function () {\n addClass(image, CLASS_TRANSITION);\n addClass(list, CLASS_TRANSITION);\n }, 0);\n }\n });\n });\n }\n\n return this;\n },\n // Exit modal mode (only available in inline mode)\n exit: function exit() {\n var _this10 = this;\n\n var options = this.options,\n viewer = this.viewer,\n image = this.image,\n list = this.list;\n\n if (!this.isShown || this.played || !this.fulled || !options.inline) {\n return this;\n }\n\n this.fulled = false;\n this.close();\n removeClass(this.button, CLASS_FULLSCREEN_EXIT);\n\n if (options.transition) {\n removeClass(list, CLASS_TRANSITION);\n\n if (this.viewed) {\n removeClass(image, CLASS_TRANSITION);\n }\n }\n\n if (options.focus) {\n this.clearEnforceFocus();\n }\n\n viewer.removeAttribute('role');\n viewer.removeAttribute('aria-labelledby');\n viewer.removeAttribute('aria-modal');\n removeClass(viewer, CLASS_FIXED);\n setStyle(viewer, {\n zIndex: options.zIndexInline\n });\n this.viewerData = assign({}, this.parentData);\n this.renderViewer();\n this.renderList();\n\n if (this.viewed) {\n this.initImage(function () {\n _this10.renderImage(function () {\n if (options.transition) {\n setTimeout(function () {\n addClass(image, CLASS_TRANSITION);\n addClass(list, CLASS_TRANSITION);\n }, 0);\n }\n });\n });\n }\n\n return this;\n },\n // Show the current ratio of the image with percentage\n tooltip: function tooltip() {\n var _this11 = this;\n\n var options = this.options,\n tooltipBox = this.tooltipBox,\n imageData = this.imageData;\n\n if (!this.viewed || this.played || !options.tooltip) {\n return this;\n }\n\n tooltipBox.textContent = \"\".concat(Math.round(imageData.ratio * 100), \"%\");\n\n if (!this.tooltipping) {\n if (options.transition) {\n if (this.fading) {\n dispatchEvent(tooltipBox, EVENT_TRANSITION_END);\n }\n\n addClass(tooltipBox, CLASS_SHOW);\n addClass(tooltipBox, CLASS_FADE);\n addClass(tooltipBox, CLASS_TRANSITION);\n tooltipBox.removeAttribute('aria-hidden'); // Force reflow to enable CSS3 transition\n\n tooltipBox.initialOffsetWidth = tooltipBox.offsetWidth;\n addClass(tooltipBox, CLASS_IN);\n } else {\n addClass(tooltipBox, CLASS_SHOW);\n tooltipBox.removeAttribute('aria-hidden');\n }\n } else {\n clearTimeout(this.tooltipping);\n }\n\n this.tooltipping = setTimeout(function () {\n if (options.transition) {\n addListener(tooltipBox, EVENT_TRANSITION_END, function () {\n removeClass(tooltipBox, CLASS_SHOW);\n removeClass(tooltipBox, CLASS_FADE);\n removeClass(tooltipBox, CLASS_TRANSITION);\n tooltipBox.setAttribute('aria-hidden', true);\n _this11.fading = false;\n }, {\n once: true\n });\n removeClass(tooltipBox, CLASS_IN);\n _this11.fading = true;\n } else {\n removeClass(tooltipBox, CLASS_SHOW);\n tooltipBox.setAttribute('aria-hidden', true);\n }\n\n _this11.tooltipping = false;\n }, 1000);\n return this;\n },\n\n /**\n * Toggle the image size between its current size and natural size\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @returns {Viewer} this\n */\n toggle: function toggle() {\n var _originalEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n if (this.imageData.ratio === 1) {\n this.zoomTo(this.imageData.oldRatio, true, _originalEvent);\n } else {\n this.zoomTo(1, true, _originalEvent);\n }\n\n return this;\n },\n // Reset the image to its initial state\n reset: function reset() {\n if (this.viewed && !this.played) {\n this.imageData = assign({}, this.initialImageData);\n this.renderImage();\n }\n\n return this;\n },\n // Update viewer when images changed\n update: function update() {\n var _this12 = this;\n\n var element = this.element,\n options = this.options,\n isImg = this.isImg; // Destroy viewer if the target image was deleted\n\n if (isImg && !element.parentNode) {\n return this.destroy();\n }\n\n var images = [];\n forEach(isImg ? [element] : element.querySelectorAll('img'), function (image) {\n if (isFunction(options.filter)) {\n if (options.filter.call(_this12, image)) {\n images.push(image);\n }\n } else if (_this12.getImageURL(image)) {\n images.push(image);\n }\n });\n\n if (!images.length) {\n return this;\n }\n\n this.images = images;\n this.length = images.length;\n\n if (this.ready) {\n var changedIndexes = [];\n forEach(this.items, function (item, i) {\n var img = item.querySelector('img');\n var image = images[i];\n\n if (image && img) {\n if (image.src !== img.src // Title changed (#408)\n || image.alt !== img.alt) {\n changedIndexes.push(i);\n }\n } else {\n changedIndexes.push(i);\n }\n });\n setStyle(this.list, {\n width: 'auto'\n });\n this.initList();\n\n if (this.isShown) {\n if (this.length) {\n if (this.viewed) {\n var changedIndex = changedIndexes.indexOf(this.index);\n\n if (changedIndex >= 0) {\n this.viewed = false;\n this.view(Math.max(Math.min(this.index - changedIndex, this.length - 1), 0));\n } else {\n var activeItem = this.items[this.index]; // Reactivate the current viewing item after reset the list.\n\n addClass(activeItem, CLASS_ACTIVE);\n activeItem.setAttribute('aria-selected', true);\n }\n }\n } else {\n this.image = null;\n this.viewed = false;\n this.index = 0;\n this.imageData = {};\n this.canvas.innerHTML = '';\n this.title.innerHTML = '';\n }\n }\n } else {\n this.build();\n }\n\n return this;\n },\n // Destroy the viewer\n destroy: function destroy() {\n var element = this.element,\n options = this.options;\n\n if (!element[NAMESPACE]) {\n return this;\n }\n\n this.destroyed = true;\n\n if (this.ready) {\n if (this.played) {\n this.stop();\n }\n\n if (options.inline) {\n if (this.fulled) {\n this.exit();\n }\n\n this.unbind();\n } else if (this.isShown) {\n if (this.viewing) {\n if (this.imageRendering) {\n this.imageRendering.abort();\n } else if (this.imageInitializing) {\n this.imageInitializing.abort();\n }\n }\n\n if (this.hiding) {\n this.transitioning.abort();\n }\n\n this.hidden();\n } else if (this.showing) {\n this.transitioning.abort();\n this.hidden();\n }\n\n this.ready = false;\n this.viewer.parentNode.removeChild(this.viewer);\n } else if (options.inline) {\n if (this.delaying) {\n this.delaying.abort();\n } else if (this.initializing) {\n this.initializing.abort();\n }\n }\n\n if (!options.inline) {\n removeListener(element, EVENT_CLICK, this.onStart);\n }\n\n element[NAMESPACE] = undefined;\n return this;\n }\n };\n\n var others = {\n getImageURL: function getImageURL(image) {\n var url = this.options.url;\n\n if (isString(url)) {\n url = image.getAttribute(url);\n } else if (isFunction(url)) {\n url = url.call(this, image);\n } else {\n url = '';\n }\n\n return url;\n },\n enforceFocus: function enforceFocus() {\n var _this = this;\n\n this.clearEnforceFocus();\n addListener(document, EVENT_FOCUSIN, this.onFocusin = function (event) {\n var viewer = _this.viewer;\n var target = event.target;\n\n if (target === document || target === viewer || viewer.contains(target)) {\n return;\n }\n\n while (target) {\n // Avoid conflicts with other modals (#474, #540)\n if (target.getAttribute('tabindex') !== null || target.getAttribute('aria-modal') === 'true') {\n return;\n }\n\n target = target.parentElement;\n }\n\n viewer.focus();\n });\n },\n clearEnforceFocus: function clearEnforceFocus() {\n if (this.onFocusin) {\n removeListener(document, EVENT_FOCUSIN, this.onFocusin);\n this.onFocusin = null;\n }\n },\n open: function open() {\n var body = this.body;\n addClass(body, CLASS_OPEN);\n body.style.paddingRight = \"\".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), \"px\");\n },\n close: function close() {\n var body = this.body;\n removeClass(body, CLASS_OPEN);\n body.style.paddingRight = this.initialBodyPaddingRight;\n },\n shown: function shown() {\n var element = this.element,\n options = this.options,\n viewer = this.viewer;\n this.fulled = true;\n this.isShown = true;\n this.render();\n this.bind();\n this.showing = false;\n\n if (options.focus) {\n viewer.focus();\n this.enforceFocus();\n }\n\n if (isFunction(options.shown)) {\n addListener(element, EVENT_SHOWN, options.shown, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_SHOWN) === false) {\n return;\n }\n\n if (this.ready && this.isShown && !this.hiding) {\n this.view(this.index);\n }\n },\n hidden: function hidden() {\n var element = this.element,\n options = this.options,\n viewer = this.viewer;\n\n if (options.fucus) {\n this.clearEnforceFocus();\n }\n\n this.fulled = false;\n this.viewed = false;\n this.isShown = false;\n this.close();\n this.unbind();\n addClass(viewer, CLASS_HIDE);\n viewer.removeAttribute('role');\n viewer.removeAttribute('aria-labelledby');\n viewer.removeAttribute('aria-modal');\n viewer.setAttribute('aria-hidden', true);\n this.resetList();\n this.resetImage();\n this.hiding = false;\n\n if (!this.destroyed) {\n if (isFunction(options.hidden)) {\n addListener(element, EVENT_HIDDEN, options.hidden, {\n once: true\n });\n }\n\n dispatchEvent(element, EVENT_HIDDEN, null, {\n cancelable: false\n });\n }\n },\n requestFullscreen: function requestFullscreen(options) {\n var document = this.element.ownerDocument;\n\n if (this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {\n var documentElement = document.documentElement; // Element.requestFullscreen()\n\n if (documentElement.requestFullscreen) {\n // Avoid TypeError when convert `options` to dictionary\n if (isPlainObject(options)) {\n documentElement.requestFullscreen(options);\n } else {\n documentElement.requestFullscreen();\n }\n } else if (documentElement.webkitRequestFullscreen) {\n documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n } else if (documentElement.mozRequestFullScreen) {\n documentElement.mozRequestFullScreen();\n } else if (documentElement.msRequestFullscreen) {\n documentElement.msRequestFullscreen();\n }\n }\n },\n exitFullscreen: function exitFullscreen() {\n var document = this.element.ownerDocument;\n\n if (this.fulled && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {\n // Document.exitFullscreen()\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n }\n },\n change: function change(event) {\n var options = this.options,\n pointers = this.pointers;\n var pointer = pointers[Object.keys(pointers)[0]]; // In the case of the `pointers` object is empty (#421)\n\n if (!pointer) {\n return;\n }\n\n var offsetX = pointer.endX - pointer.startX;\n var offsetY = pointer.endY - pointer.startY;\n\n switch (this.action) {\n // Move the current image\n case ACTION_MOVE:\n this.move(offsetX, offsetY, event);\n break;\n // Zoom the current image\n\n case ACTION_ZOOM:\n this.zoom(getMaxZoomRatio(pointers), false, event);\n break;\n\n case ACTION_SWITCH:\n {\n this.action = 'switched';\n var absoluteOffsetX = Math.abs(offsetX);\n\n if (absoluteOffsetX > 1 && absoluteOffsetX > Math.abs(offsetY)) {\n // Empty `pointers` as `touchend` event will not be fired after swiped in iOS browsers.\n this.pointers = {};\n\n if (offsetX > 1) {\n this.prev(options.loop);\n } else if (offsetX < -1) {\n this.next(options.loop);\n }\n }\n\n break;\n }\n } // Override\n\n\n forEach(pointers, function (p) {\n p.startX = p.endX;\n p.startY = p.endY;\n });\n },\n isSwitchable: function isSwitchable() {\n var imageData = this.imageData,\n viewerData = this.viewerData;\n return this.length > 1 && imageData.x >= 0 && imageData.y >= 0 && imageData.width <= viewerData.width && imageData.height <= viewerData.height;\n }\n };\n\n var AnotherViewer = WINDOW.Viewer;\n\n var getUniqueID = function (id) {\n return function () {\n id += 1;\n return id;\n };\n }(-1);\n\n var Viewer = /*#__PURE__*/function () {\n /**\n * Create a new Viewer.\n * @param {Element} element - The target element for viewing.\n * @param {Object} [options={}] - The configuration options.\n */\n function Viewer(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Viewer);\n\n if (!element || element.nodeType !== 1) {\n throw new Error('The first argument is required and must be an element.');\n }\n\n this.element = element;\n this.options = assign({}, DEFAULTS, isPlainObject(options) && options);\n this.action = false;\n this.fading = false;\n this.fulled = false;\n this.hiding = false;\n this.imageClicked = false;\n this.imageData = {};\n this.index = this.options.initialViewIndex;\n this.isImg = false;\n this.isShown = false;\n this.length = 0;\n this.moving = false;\n this.played = false;\n this.playing = false;\n this.pointers = {};\n this.ready = false;\n this.rotating = false;\n this.scaling = false;\n this.showing = false;\n this.timeout = false;\n this.tooltipping = false;\n this.viewed = false;\n this.viewing = false;\n this.wheeling = false;\n this.zooming = false;\n this.id = getUniqueID();\n this.init();\n }\n\n _createClass(Viewer, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n\n var element = this.element,\n options = this.options;\n\n if (element[NAMESPACE]) {\n return;\n }\n\n element[NAMESPACE] = this; // The `focus` option requires the `keyboard` option set to `true`.\n\n if (options.focus && !options.keyboard) {\n options.focus = false;\n }\n\n var isImg = element.localName === 'img';\n var images = [];\n forEach(isImg ? [element] : element.querySelectorAll('img'), function (image) {\n if (isFunction(options.filter)) {\n if (options.filter.call(_this, image)) {\n images.push(image);\n }\n } else if (_this.getImageURL(image)) {\n images.push(image);\n }\n });\n this.isImg = isImg;\n this.length = images.length;\n this.images = images;\n this.initBody(); // Override `transition` option if it is not supported\n\n if (isUndefined(document.createElement(NAMESPACE).style.transition)) {\n options.transition = false;\n }\n\n if (options.inline) {\n var count = 0;\n\n var progress = function progress() {\n count += 1;\n\n if (count === _this.length) {\n var timeout;\n _this.initializing = false;\n _this.delaying = {\n abort: function abort() {\n clearTimeout(timeout);\n }\n }; // build asynchronously to keep `this.viewer` is accessible in `ready` event handler.\n\n timeout = setTimeout(function () {\n _this.delaying = false;\n\n _this.build();\n }, 0);\n }\n };\n\n this.initializing = {\n abort: function abort() {\n forEach(images, function (image) {\n if (!image.complete) {\n removeListener(image, EVENT_LOAD, progress);\n removeListener(image, EVENT_ERROR, progress);\n }\n });\n }\n };\n forEach(images, function (image) {\n if (image.complete) {\n progress();\n } else {\n var onLoad;\n var onError;\n addListener(image, EVENT_LOAD, onLoad = function onLoad() {\n removeListener(image, EVENT_ERROR, onError);\n progress();\n }, {\n once: true\n });\n addListener(image, EVENT_ERROR, onError = function onError() {\n removeListener(image, EVENT_LOAD, onLoad);\n progress();\n }, {\n once: true\n });\n }\n });\n } else {\n addListener(element, EVENT_CLICK, this.onStart = function (_ref) {\n var target = _ref.target;\n\n if (target.localName === 'img' && (!isFunction(options.filter) || options.filter.call(_this, target))) {\n _this.view(_this.images.indexOf(target));\n }\n });\n }\n }\n }, {\n key: \"build\",\n value: function build() {\n if (this.ready) {\n return;\n }\n\n var element = this.element,\n options = this.options;\n var parent = element.parentNode;\n var template = document.createElement('div');\n template.innerHTML = TEMPLATE;\n var viewer = template.querySelector(\".\".concat(NAMESPACE, \"-container\"));\n var title = viewer.querySelector(\".\".concat(NAMESPACE, \"-title\"));\n var toolbar = viewer.querySelector(\".\".concat(NAMESPACE, \"-toolbar\"));\n var navbar = viewer.querySelector(\".\".concat(NAMESPACE, \"-navbar\"));\n var button = viewer.querySelector(\".\".concat(NAMESPACE, \"-button\"));\n var canvas = viewer.querySelector(\".\".concat(NAMESPACE, \"-canvas\"));\n this.parent = parent;\n this.viewer = viewer;\n this.title = title;\n this.toolbar = toolbar;\n this.navbar = navbar;\n this.button = button;\n this.canvas = canvas;\n this.footer = viewer.querySelector(\".\".concat(NAMESPACE, \"-footer\"));\n this.tooltipBox = viewer.querySelector(\".\".concat(NAMESPACE, \"-tooltip\"));\n this.player = viewer.querySelector(\".\".concat(NAMESPACE, \"-player\"));\n this.list = viewer.querySelector(\".\".concat(NAMESPACE, \"-list\"));\n viewer.id = \"\".concat(NAMESPACE).concat(this.id);\n title.id = \"\".concat(NAMESPACE, \"Title\").concat(this.id);\n addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title));\n addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar));\n toggleClass(button, CLASS_HIDE, !options.button);\n\n if (options.keyboard) {\n button.setAttribute('tabindex', 0);\n }\n\n if (options.backdrop) {\n addClass(viewer, \"\".concat(NAMESPACE, \"-backdrop\"));\n\n if (!options.inline && options.backdrop !== 'static') {\n setData(canvas, DATA_ACTION, 'hide');\n }\n }\n\n if (isString(options.className) && options.className) {\n // In case there are multiple class names\n options.className.split(REGEXP_SPACES).forEach(function (className) {\n addClass(viewer, className);\n });\n }\n\n if (options.toolbar) {\n var list = document.createElement('ul');\n var custom = isPlainObject(options.toolbar);\n var zoomButtons = BUTTONS.slice(0, 3);\n var rotateButtons = BUTTONS.slice(7, 9);\n var scaleButtons = BUTTONS.slice(9);\n\n if (!custom) {\n addClass(toolbar, getResponsiveClass(options.toolbar));\n }\n\n forEach(custom ? options.toolbar : BUTTONS, function (value, index) {\n var deep = custom && isPlainObject(value);\n var name = custom ? hyphenate(index) : value;\n var show = deep && !isUndefined(value.show) ? value.show : value;\n\n if (!show || !options.zoomable && zoomButtons.indexOf(name) !== -1 || !options.rotatable && rotateButtons.indexOf(name) !== -1 || !options.scalable && scaleButtons.indexOf(name) !== -1) {\n return;\n }\n\n var size = deep && !isUndefined(value.size) ? value.size : value;\n var click = deep && !isUndefined(value.click) ? value.click : value;\n var item = document.createElement('li');\n\n if (options.keyboard) {\n item.setAttribute('tabindex', 0);\n }\n\n item.setAttribute('role', 'button');\n addClass(item, \"\".concat(NAMESPACE, \"-\").concat(name));\n\n if (!isFunction(click)) {\n setData(item, DATA_ACTION, name);\n }\n\n if (isNumber(show)) {\n addClass(item, getResponsiveClass(show));\n }\n\n if (['small', 'large'].indexOf(size) !== -1) {\n addClass(item, \"\".concat(NAMESPACE, \"-\").concat(size));\n } else if (name === 'play') {\n addClass(item, \"\".concat(NAMESPACE, \"-large\"));\n }\n\n if (isFunction(click)) {\n addListener(item, EVENT_CLICK, click);\n }\n\n list.appendChild(item);\n });\n toolbar.appendChild(list);\n } else {\n addClass(toolbar, CLASS_HIDE);\n }\n\n if (!options.rotatable) {\n var rotates = toolbar.querySelectorAll('li[class*=\"rotate\"]');\n addClass(rotates, CLASS_INVISIBLE);\n forEach(rotates, function (rotate) {\n toolbar.appendChild(rotate);\n });\n }\n\n if (options.inline) {\n addClass(button, CLASS_FULLSCREEN);\n setStyle(viewer, {\n zIndex: options.zIndexInline\n });\n\n if (window.getComputedStyle(parent).position === 'static') {\n setStyle(parent, {\n position: 'relative'\n });\n }\n\n parent.insertBefore(viewer, element.nextSibling);\n } else {\n addClass(button, CLASS_CLOSE);\n addClass(viewer, CLASS_FIXED);\n addClass(viewer, CLASS_FADE);\n addClass(viewer, CLASS_HIDE);\n setStyle(viewer, {\n zIndex: options.zIndex\n });\n var container = options.container;\n\n if (isString(container)) {\n container = element.ownerDocument.querySelector(container);\n }\n\n if (!container) {\n container = this.body;\n }\n\n container.appendChild(viewer);\n }\n\n if (options.inline) {\n this.render();\n this.bind();\n this.isShown = true;\n }\n\n this.ready = true;\n\n if (isFunction(options.ready)) {\n addListener(element, EVENT_READY, options.ready, {\n once: true\n });\n }\n\n if (dispatchEvent(element, EVENT_READY) === false) {\n this.ready = false;\n return;\n }\n\n if (this.ready && options.inline) {\n this.view(this.index);\n }\n }\n /**\n * Get the no conflict viewer class.\n * @returns {Viewer} The viewer class.\n */\n\n }], [{\n key: \"noConflict\",\n value: function noConflict() {\n window.Viewer = AnotherViewer;\n return Viewer;\n }\n /**\n * Change the default options.\n * @param {Object} options - The new default options.\n */\n\n }, {\n key: \"setDefaults\",\n value: function setDefaults(options) {\n assign(DEFAULTS, isPlainObject(options) && options);\n }\n }]);\n\n return Viewer;\n }();\n\n assign(Viewer.prototype, render, events, handlers, methods, others);\n\n return Viewer;\n\n}));\n\n\n//# sourceURL=webpack:///./node_modules/viewerjs/dist/viewer.js?")}}]); \ No newline at end of file diff --git a/web/js/14.js b/web/js/14.js deleted file mode 100644 index 2ec8cfa..0000000 --- a/web/js/14.js +++ /dev/null @@ -1,5 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[14],{"./node_modules/vue-plyr/dist/vue-plyr.css": -/*!*************************************************!*\ - !*** ./node_modules/vue-plyr/dist/vue-plyr.css ***! - \*************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/vue-plyr/dist/vue-plyr.css?")}}]); \ No newline at end of file diff --git a/web/js/15.js b/web/js/15.js deleted file mode 100644 index 4f38e81..0000000 --- a/web/js/15.js +++ /dev/null @@ -1,5 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[15],{"./node_modules/vue-plyr/dist/vue-plyr.esm.js": -/*!****************************************************!*\ - !*** ./node_modules/vue-plyr/dist/vue-plyr.esm.js ***! - \****************************************************/ -/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {var e=function(e){try{return!!e()}catch(e){return!0}},t=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var r=function(e){return e&&e.Math==Math&&e},a=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||Function("return this")(),o=function(e){return"object"==typeof e?null!==e:"function"==typeof e},s=a.document,l=o(s)&&o(s.createElement),c=function(e){return l?s.createElement(e):{}},u=!t&&!e((function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a})),h=function(e){if(!o(e))throw TypeError(String(e)+" is not an object");return e},d=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can\'t convert object to primitive value")},f=Object.defineProperty,p={f:t?f:function(e,t,n){if(h(e),t=d(t,!0),h(n),u)try{return f(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},m=p.f,g=Function.prototype,v=g.toString,y=/^\\s*function ([^ (]*)/;t&&!("name"in g)&&m(g,"name",{configurable:!0,get:function(){try{return v.call(this).match(y)[1]}catch(e){return""}}});var b={}.propertyIsEnumerable,w=Object.getOwnPropertyDescriptor,k={f:w&&!b.call({1:2},1)?function(e){var t=w(this,e);return!!t&&t.enumerable}:b},T=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},S={}.toString,E=function(e){return S.call(e).slice(8,-1)},A="".split,x=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==E(e)?A.call(e,""):Object(e)}:Object,C=function(e){if(null==e)throw TypeError("Can\'t call method on "+e);return e},P=function(e){return x(C(e))},O={}.hasOwnProperty,I=function(e,t){return O.call(e,t)},L=Object.getOwnPropertyDescriptor,N={f:t?L:function(e,t){if(e=P(e),t=d(t,!0),u)try{return L(e,t)}catch(e){}if(I(e,t))return T(!k.f.call(e,t),e[t])}},M=t?function(e,t,n){return p.f(e,t,T(1,n))}:function(e,t,n){return e[t]=n,e},j=function(e,t){try{M(a,e,t)}catch(n){a[e]=t}return t},R=a["__core-js_shared__"]||j("__core-js_shared__",{}),_=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(e){return _.call(e)});var D,F,q,U=R.inspectSource,H=a.WeakMap,B="function"==typeof H&&/native code/.test(U(H)),V=i((function(e){(e.exports=function(e,t){return R[e]||(R[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),z=0,W=Math.random(),$=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++z+W).toString(36)},K=V("keys"),Y=function(e){return K[e]||(K[e]=$(e))},G={},X=a.WeakMap;if(B){var Q=new X,J=Q.get,Z=Q.has,ee=Q.set;D=function(e,t){return ee.call(Q,e,t),t},F=function(e){return J.call(Q,e)||{}},q=function(e){return Z.call(Q,e)}}else{var te=Y("state");G[te]=!0,D=function(e,t){return M(e,te,t),t},F=function(e){return I(e,te)?e[te]:{}},q=function(e){return I(e,te)}}var ne,ie={set:D,get:F,has:q,enforce:function(e){return q(e)?F(e):D(e,{})},getterFor:function(e){return function(t){var n;if(!o(t)||(n=F(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},re=i((function(e){var t=ie.get,n=ie.enforce,i=String(String).split("String");(e.exports=function(e,t,r,o){var s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof r&&("string"!=typeof t||I(r,"name")||M(r,"name",t),n(r).source=i.join("string"==typeof t?t:"")),e!==a?(s?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=r:M(e,t,r)):l?e[t]=r:j(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||U(this)}))})),ae=a,oe=function(e){return"function"==typeof e?e:void 0},se=function(e,t){return arguments.length<2?oe(ae[e])||oe(a[e]):ae[e]&&ae[e][t]||a[e]&&a[e][t]},le=Math.ceil,ce=Math.floor,ue=function(e){return isNaN(e=+e)?0:(e>0?ce:le)(e)},he=Math.min,de=function(e){return e>0?he(ue(e),9007199254740991):0},fe=Math.max,pe=Math.min,me=function(e,t){var n=ue(e);return n<0?fe(n+t,0):pe(n,t)},ge=function(e){return function(t,n,i){var r,a=P(t),o=de(a.length),s=me(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},ve={includes:ge(!0),indexOf:ge(!1)},ye=ve.indexOf,be=function(e,t){var n,i=P(e),r=0,a=[];for(n in i)!I(G,n)&&I(i,n)&&a.push(n);for(;t.length>r;)I(i,n=t[r++])&&(~ye(a,n)||a.push(n));return a},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ke=we.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(e){return be(e,ke)}},Se={f:Object.getOwnPropertySymbols},Ee=se("Reflect","ownKeys")||function(e){var t=Te.f(h(e)),n=Se.f;return n?t.concat(n(e)):t},Ae=function(e,t){for(var n=Ee(t),i=p.f,r=N.f,a=0;aa;)p.f(e,n=i[a++],t[n]);return e},He=se("document","documentElement"),Be=Y("IE_PROTO"),Ve=function(){},ze=function(e){return"