diff --git a/.gitignore b/.gitignore
index 345ff6f..2f5a024 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,13 +2,19 @@
config.js
devices/*
-tmp/
+tmp
log.txt
Macrame.exe
-public
+public/*
+
macros/*
+!macros/TEST-*
+
+panels/*
+!panels/test_panel
+
builds
node_modules
ToDo.md
\ No newline at end of file
diff --git a/app/helper/env-helper.go b/app/helper/env-helper.go
index 28af4d4..0eb5e1e 100644
--- a/app/helper/env-helper.go
+++ b/app/helper/env-helper.go
@@ -36,7 +36,7 @@ func EnvGet(key string) string {
if !configFileExists() {
CreateConfigFile(configPath)
- CheckFeDevDir()
+ CheckUIDevDir()
}
data, err := os.ReadFile(configPath)
@@ -63,12 +63,12 @@ func configFileExists() bool {
return err == nil
}
-func CheckFeDevDir() {
+func CheckUIDevDir() {
log.Println("Checking FE dev directory...")
- _, err := os.Stat("fe")
+ _, err := os.Stat("ui")
if err != nil {
- log.Println("Error checking FE dev directory:", err)
+ log.Println("Error checking ui dev directory:", err)
return
}
@@ -83,7 +83,7 @@ func copyConfigToFe() {
return
}
- if err := os.WriteFile("fe/config.js", data, 0644); err != nil {
+ if err := os.WriteFile("ui/config.js", data, 0644); err != nil {
log.Println("Error writing config.js:", err)
}
}
diff --git a/be/app/api.go b/be/app/api.go
deleted file mode 100644
index 41535e3..0000000
--- a/be/app/api.go
+++ /dev/null
@@ -1,99 +0,0 @@
-package app
-
-import (
- "be/app/helper"
- "log"
- "mime"
- "net/http"
- "path/filepath"
- "strings"
-)
-
-func ApiCORS(w http.ResponseWriter, r *http.Request) (http.ResponseWriter, *http.Request) {
- origin := r.Header.Get("Origin")
-
- w.Header().Set("Access-Control-Allow-Origin", "http://localhost:5173")
-
- if strings.HasPrefix(r.Host, "192.168.") {
- log.Println("lan device")
- w.Header().Set("Access-Control-Allow-Origin", origin)
- }
-
- w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
- w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Accept, Accept-Language, Accept-Encoding")
-
- return w, r
-}
-
-func ApiGet(w http.ResponseWriter, r *http.Request) {
- file := "" // base directory
-
- if r.URL.Path != "/" {
- file = "../public" + r.URL.Path // request
- }
- contentType := mime.TypeByExtension(filepath.Ext(file)) // get content type
-
- if contentType != "" {
- w.Header().Set("Content-Type", contentType) // set content type header
- }
-
- if contentType == "" {
- file = "../public/index.html" // default
- }
-
- // log.Println("GET:", file)
-
- http.ServeFile(w, r, file) // serve file
-}
-
-func ApiPost(w http.ResponseWriter, r *http.Request) {
-
- access, data := helper.EndpointAccess(w, r)
-
- if !access {
- return
- }
-
- log.Println("api post", data == "")
- if data != "" {
- ApiAuth(data, w, r)
- return
- }
-
- switch r.URL.Path {
- case "/macro/record":
- SaveMacro(w, r)
- case "/macro/list":
- ListMacros(w, r)
- case "/macro/delete":
- DeleteMacro(w, r)
- case "/macro/play":
- PlayMacro("", w, r)
- case "/device/list":
- DeviceList(w, r)
- case "/device/access/check":
- DeviceAccessCheck(w, r)
- case "/device/access/request":
- DeviceAccessRequest(w, r)
- case "/device/link/ping":
- PingLink(w, r)
- case "/device/link/start":
- StartLink(w, r)
- case "/device/link/poll":
- PollLink(w, r)
- case "/device/link/remove":
- RemoveLink("", w, r)
- case "/device/handshake":
- Handshake(w, r)
- }
-}
-
-func ApiAuth(data string, w http.ResponseWriter, r *http.Request) {
- log.Println("apiauth", data != "")
- switch r.URL.Path {
- case "/macro/play":
- PlayMacro(data, w, r)
- case "/device/link/remove":
- RemoveLink(data, w, r)
- }
-}
diff --git a/be/app/device.go b/be/app/device.go
deleted file mode 100644
index 90165db..0000000
--- a/be/app/device.go
+++ /dev/null
@@ -1,245 +0,0 @@
-package app
-
-import (
- "be/app/helper"
- "be/app/structs"
- "encoding/json"
- "fmt"
- "log"
- "math/rand"
- "net/http"
- "os"
- "path/filepath"
- "strings"
- "time"
-)
-
-func DeviceList(w http.ResponseWriter, r *http.Request) {
- log.Println("device list")
- dir := "devices"
- files, err := os.ReadDir(dir)
- if err != nil {
- log.Fatal(err)
- }
-
- devices := make(map[string]map[string]interface{})
-
- for _, file := range files {
- filePath := dir + "/" + file.Name()
- ext := filepath.Ext(filePath)
- device := strings.TrimSuffix(file.Name(), ext)
-
- log.Println(device, ext)
-
- if _, ok := devices[device]; !ok {
- devices[device] = make(map[string]interface{})
- }
-
- if ext == ".json" {
- devices[device]["settings"] = readDeviceSettings(filePath)
- }
- if ext == ".key" {
- devices[device]["key"] = true
- }
- }
-
- result := map[string]interface{}{
- "devices": devices,
- }
-
- json.NewEncoder(w).Encode(result)
-}
-
-func readDeviceSettings(filepath string) (settings structs.Settings) {
- data, err := os.ReadFile(filepath)
- if err != nil {
- log.Println(err)
- }
-
- err = json.Unmarshal(data, &settings)
- if err != nil {
- log.Println(err)
- }
- log.Println(settings)
- return settings
-}
-
-func DeviceAccessCheck(w http.ResponseWriter, r *http.Request) {
- log.Println("device access check")
- var req structs.Check
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
- return
- }
-
- _, errSett := os.Stat("devices/" + req.Uuid + ".json")
- _, errKey := os.Stat("devices/" + req.Uuid + ".key")
-
- if (errSett == nil) && (errKey == nil) {
- log.Println("authorized")
- json.NewEncoder(w).Encode("authorized")
- } else if (errSett == nil) && (errKey != nil) {
- log.Println("unauthorized")
- json.NewEncoder(w).Encode("unauthorized")
- } else {
- log.Println("unauthorized")
- json.NewEncoder(w).Encode("unlinked")
- }
-
- return
-}
-
-func DeviceAccessRequest(w http.ResponseWriter, r *http.Request) {
- var req structs.Request
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
- return
- }
-
- deviceSettings := structs.Settings{Name: req.Name, Type: req.Type}
-
- settingsJSON, err := json.Marshal(deviceSettings)
- if err != nil {
- log.Println(err)
- return
- }
-
- err = os.WriteFile("devices/"+req.Uuid+".json", settingsJSON, 0644)
-
- if err != nil {
- log.Println(err)
- return
- }
-
- json.NewEncoder(w).Encode("unauthorized")
-}
-
-func PingLink(w http.ResponseWriter, r *http.Request) {
- log.Println("ping link")
- var req structs.Check
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- json.NewEncoder(w).Encode(false)
- return
- }
-
- key, keyErr := os.ReadFile("devices/" + req.Uuid + ".key")
- pin, pinErr := os.ReadFile("devices/" + req.Uuid + ".tmp")
-
- encryptedKey, encErr := helper.EncryptAES(string(pin), string(key))
-
- log.Println(encryptedKey, string(pin), string(key))
-
- if keyErr == nil && pinErr == nil && encErr == nil {
- w.Header().Set("Content-Type", "application/json")
- w.Write([]byte(encryptedKey))
- return
- }
-
- json.NewEncoder(w).Encode(false)
-}
-
-func StartLink(w http.ResponseWriter, r *http.Request) {
- log.Println("start link")
- var req structs.Check
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
- return
- }
-
- pin := fmt.Sprintf("%04d", rand.Intn(10000))
-
- deviceKey := helper.GenerateKey()
-
- err = helper.SaveDeviceKey(req.Uuid, deviceKey)
-
- if err == nil && helper.TempPinFile(req.Uuid, pin) {
- json.NewEncoder(w).Encode(pin)
- }
-
- return
-}
-
-func PollLink(w http.ResponseWriter, r *http.Request) {
- var req structs.Check
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- json.NewEncoder(w).Encode(false)
- return
- }
-
- if helper.CheckPinFile(req.Uuid) {
- json.NewEncoder(w).Encode(true)
- return
- }
-
- json.NewEncoder(w).Encode(false)
-}
-
-func RemoveLink(data string, w http.ResponseWriter, r *http.Request) {
- req := &structs.Check{}
- _, err := helper.ParseRequest(req, data, r)
-
- if err != nil {
- json.NewEncoder(w).Encode(false)
- return
- }
-
- err = os.Remove("devices/" + req.Uuid + ".key")
-
- if err != nil {
- json.NewEncoder(w).Encode(false)
- return
- }
-
- json.NewEncoder(w).Encode(true)
-}
-
-func Handshake(w http.ResponseWriter, r *http.Request) {
- var req structs.Handshake
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- return
- }
-
- deviceKey, err := helper.GetKeyByUuid(req.Uuid)
-
- if err != nil {
- json.NewEncoder(w).Encode(false)
- return
- }
-
- decryptShake, _ := helper.DecryptAES(deviceKey, req.Shake)
-
- if decryptShake == getDateStr() {
- os.Remove("devices/" + req.Uuid + ".tmp")
-
- json.NewEncoder(w).Encode(true)
- return
- } else {
- os.Remove("devices/" + req.Uuid + ".key")
- }
-
- json.NewEncoder(w).Encode(false)
-}
-
-func getDateStr() string {
- date := time.Now()
- year, month, day := date.Date()
- formattedDate := fmt.Sprintf("%04d%02d%02d", year, month, day)
- return formattedDate
-}
diff --git a/be/app/helper/api-helper.go b/be/app/helper/api-helper.go
deleted file mode 100644
index 8adacde..0000000
--- a/be/app/helper/api-helper.go
+++ /dev/null
@@ -1,102 +0,0 @@
-package helper
-
-import (
- "encoding/json"
- "log"
- "net"
- "net/http"
- "strings"
-
- "be/app/structs"
- . "be/app/structs"
-)
-
-func EndpointAccess(w http.ResponseWriter, r *http.Request) (bool, string) {
- ip, _, err := net.SplitHostPort(r.RemoteAddr)
- if err != nil {
- log.Fatal(err)
- }
-
- if (isLocal(ip) && isEndpointAllowed("Local", r.URL.Path)) ||
- (isLanRemote(ip) && isEndpointAllowed("Remote", r.URL.Path)) {
- log.Println(r.URL.Path, "endpoint access: accessible")
- return true, ""
- } else if isLanRemote(ip) && isEndpointAllowed("Auth", r.URL.Path) {
- log.Println(r.URL.Path, "endpoint access: authorized")
-
- data := decryptAuth(r)
-
- return data != "", data
- }
-
- log.Println(r.URL.Path, "endpoint access: not authorized or accessible")
-
- return false, ""
-}
-
-func isLocal(ip string) bool {
- return ip == "127.0.0.1" || ip == "::1"
-}
-
-func isLanRemote(ip string) bool {
- return strings.HasPrefix(ip, "192.168.")
-}
-
-func isEndpointAllowed(source string, endpoint string) bool {
- var endpoints, err = getAllowedEndpoints(source)
- if err != "" {
- log.Println(err)
- }
-
- if (endpoints != nil) && (len(endpoints) > 0) {
- for _, e := range endpoints {
- if e == endpoint {
- return true
- }
- }
- }
-
- return false
-}
-
-func getAllowedEndpoints(source string) (endpoints []string, err string) {
- if source == "Local" {
- return Endpoints.Local, ""
- }
- if source == "Remote" {
- return Endpoints.Remote, ""
- }
- if source == "Auth" {
- return Endpoints.Auth, ""
- }
-
- return []string{}, "No allowed endpoints"
-}
-
-func decryptAuth(r *http.Request) string {
- var req structs.Authcall
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil || req.Uuid == "" || req.Data == "" {
- return ""
- }
-
- deviceKey, errKey := GetKeyByUuid(req.Uuid)
- decryptData, errDec := DecryptAES(deviceKey, req.Data)
-
- if errKey != nil && errDec != nil || decryptData == "" {
- return ""
- }
-
- return decryptData
-}
-
-func ParseRequest(req interface{}, data string, r *http.Request) (d interface{}, err error) {
- if data != "" {
- dataBytes := []byte(data)
- return req, json.Unmarshal(dataBytes, &req)
- } else {
- return req, json.NewDecoder(r.Body).Decode(&req)
- }
-}
diff --git a/be/app/helper/browser-helper.go b/be/app/helper/browser-helper.go
deleted file mode 100644
index 579bc9e..0000000
--- a/be/app/helper/browser-helper.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package helper
-
-import (
- "os/exec"
- "runtime"
-)
-
-func OpenBrowser(url string) bool {
- var args []string
-
- switch runtime.GOOS {
- case "darwin":
- args = []string{"open"}
- case "windows":
- args = []string{"cmd", "/c", "start"}
- default:
- args = []string{"xdg-open"}
- }
-
- cmd := exec.Command(args[0], append(args[1:], url)...)
-
- return cmd.Start() == nil
-}
diff --git a/be/app/helper/device-helper.go b/be/app/helper/device-helper.go
deleted file mode 100644
index 38db5ba..0000000
--- a/be/app/helper/device-helper.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package helper
-
-import (
- "log"
- "os"
- "time"
-)
-
-func TempPinFile(Uuid string, pin string) bool {
- log.Println("temp pin file", Uuid, pin)
- err := os.WriteFile("devices/"+Uuid+".tmp", []byte(pin), 0644)
- if err != nil {
- log.Println(err)
- return false
- }
-
- time.AfterFunc(1*time.Minute, func() {
- log.Println("deleting", Uuid, pin)
- os.Remove("devices/" + Uuid + ".tmp")
- })
-
- return true
-}
-
-func CheckPinFile(Uuid string) bool {
- _, err := os.Stat("devices/" + Uuid + ".tmp")
- return err == nil
-}
-
-func SaveDeviceKey(Uuid string, key string) error {
- err := os.WriteFile("devices/"+Uuid+".key", []byte(key), 0644)
-
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func GetKeyByUuid(Uuid string) (string, error) {
- data, err := os.ReadFile("devices/" + Uuid + ".key")
- if err != nil {
- return "", err
- }
- return string(data), nil
-}
diff --git a/be/app/helper/encrypt-helper.go b/be/app/helper/encrypt-helper.go
deleted file mode 100644
index f5a6f91..0000000
--- a/be/app/helper/encrypt-helper.go
+++ /dev/null
@@ -1,105 +0,0 @@
-package helper
-
-import (
- "bytes"
- "crypto/aes"
- "crypto/cipher"
- "crypto/rand"
- "encoding/base64"
- "errors"
- "strings"
-)
-
-func EncryptAES(key string, plaintext string) (string, error) {
- origData := []byte(plaintext)
-
- // Create AES cipher
- block, err := aes.NewCipher(keyToBytes(key))
- if err != nil {
- return "", err
- }
- blockSize := block.BlockSize()
-
- origData = PKCS5Padding(origData, blockSize)
-
- iv := []byte(EnvGet("MCRM__IV"))
- blockMode := cipher.NewCBCEncrypter(block, iv)
-
- crypted := make([]byte, len(origData))
- blockMode.CryptBlocks(crypted, origData)
-
- cryptedString := base64.StdEncoding.EncodeToString(crypted)
-
- return cryptedString, nil
-}
-
-func DecryptAES(key string, cryptedText string) (string, error) {
- crypted, err := base64.StdEncoding.DecodeString(cryptedText)
-
- if err != nil {
- return "", err
- }
-
- block, err := aes.NewCipher(keyToBytes(key))
- if err != nil {
- return "", err
- }
-
- iv := []byte(EnvGet("MCRM__IV"))
- blockMode := cipher.NewCBCDecrypter(block, iv)
-
- origData := make([]byte, len(crypted))
-
- blockMode.CryptBlocks(origData, crypted)
- origData, err = PKCS5UnPadding(origData)
-
- if err != nil || len(origData) <= 3 {
- return "", errors.New("invalid key")
- }
-
- origDataString := string(origData)
-
- return origDataString, nil
-}
-
-func generateRandomString(length int) string {
- b := make([]byte, length)
- _, err := rand.Read(b)
- if err != nil {
- panic(err)
- }
- return base64.StdEncoding.EncodeToString(b)
-}
-
-func GenerateKey() string {
- return strings.Replace(generateRandomString(24), "=", "", -1)
-}
-
-func keyToBytes(key string) []byte {
- // Convert key to bytes
- keyBytes := []byte(key)
-
- // If key is 4 characters, append salt
- if len(key) == 4 {
- keyBytes = []byte(key + EnvGet("MCRM__SALT"))
- }
-
- return keyBytes
-}
-
-func PKCS5Padding(ciphertext []byte, blockSize int) []byte {
- padding := blockSize - len(ciphertext)%blockSize
- padtext := bytes.Repeat([]byte{byte(padding)}, padding)
- return append(ciphertext, padtext...)
-}
-
-func PKCS5UnPadding(origData []byte) ([]byte, error) {
- length := len(origData)
- unpadding := int(origData[length-1])
-
- if (unpadding >= length) || (unpadding == 0) {
- return nil, errors.New("unpadding error")
- }
-
- return origData[:(length - unpadding)], nil
-}
diff --git a/be/app/helper/env-helper.go b/be/app/helper/env-helper.go
deleted file mode 100644
index 0c58023..0000000
--- a/be/app/helper/env-helper.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package helper
-
-import (
- "log"
- "os"
-
- "github.com/joho/godotenv"
-)
-
-func EnvGet(key string) string {
- err := godotenv.Load("../.env")
- if err != nil {
- log.Fatal("Error loading .env file")
- }
- return os.Getenv("VITE_" + key)
-}
diff --git a/be/app/helper/macro-helper.go b/be/app/helper/macro-helper.go
deleted file mode 100644
index ec6a94a..0000000
--- a/be/app/helper/macro-helper.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package helper
-
-import (
- "encoding/json"
- "log"
- "os"
- "regexp"
- "strings"
- "time"
-
- "be/app/structs"
-
- "github.com/go-vgo/robotgo"
-)
-
-func FormatMacroFileName(s string) string {
- // Remove invalid characters
- re := regexp.MustCompile(`[\/\?\*\>\<\:\\"\|\n]`)
- s = re.ReplaceAllString(s, "")
-
- // Replace spaces with underscores
- s = strings.ReplaceAll(s, " ", "_")
-
- // Remove special characters
- re = regexp.MustCompile(`[!@#$%^&\(\)\[\]\{\}\~]`)
- s = re.ReplaceAllString(s, "")
-
- // Truncate the string
- if len(s) > 255 {
- s = s[:255]
- }
-
- return s
-}
-
-func ReadMacroFile(filename string) (steps []structs.Step, err error) {
- log.Println(filename)
-
- content, err := os.ReadFile(filename)
-
- if err != nil {
- log.Fatal("Error when opening file: ", err)
- }
-
- err = json.Unmarshal(content, &steps)
-
- return steps, err
-}
-
-func RunMacroSteps(steps []structs.Step) {
- for _, step := range steps {
- // log.Println(step)
- switch step.Type {
- case "key":
- robotgo.KeyToggle(step.Key, step.Direction)
- // log.Println("Toggling", step.Key, "to", step.Direction)
- case "delay":
- time.Sleep(time.Duration(step.Location) * time.Millisecond)
- // log.Println("Sleeping for", step.Value, "milliseconds")
- default:
- log.Println("Unknown step type:", step.Type)
- }
- }
-}
diff --git a/be/app/macro.go b/be/app/macro.go
deleted file mode 100644
index 4b82e5a..0000000
--- a/be/app/macro.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package app
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "log"
- "net/http"
- "os"
- "path/filepath"
- "strings"
-
- "be/app/helper"
- "be/app/structs"
-)
-
-func SaveMacro(w http.ResponseWriter, r *http.Request) {
- var newMacro structs.NewMacro
-
- body, err := io.ReadAll(r.Body)
- if err != nil {
- panic(err)
- }
-
- log.Println(string(body))
-
- err = json.Unmarshal(body, &newMacro)
- if err != nil {
- panic(err)
- }
-
- stepsJSON, err := json.Marshal(newMacro.Steps)
- if err != nil {
- panic(err)
- }
-
- err = os.WriteFile("../macros/"+helper.FormatMacroFileName(newMacro.Name)+".json", stepsJSON, 0644)
- if err != nil {
- panic(err)
- }
-}
-
-func ListMacros(w http.ResponseWriter, r *http.Request) {
- log.Println("listing macros")
- dir := "../macros"
- files, err := os.ReadDir(dir)
- if err != nil {
- log.Println(err)
- }
-
- var fileNames []string
-
- for _, file := range files {
- filename := filepath.Base(file.Name())
- filename = strings.TrimSuffix(filename, filepath.Ext(filename))
- filename = strings.Replace(filename, "_", " ", -1)
-
- fileNames = append(fileNames, filename)
- }
-
- json.NewEncoder(w).Encode(fileNames)
-}
-
-func DeleteMacro(w http.ResponseWriter, r *http.Request) {}
-
-func PlayMacro(data string, w http.ResponseWriter, r *http.Request) {
- req := &structs.MacroRequest{}
- _, err := helper.ParseRequest(req, data, r)
-
- if err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
- return
- }
-
- macro := req.Macro
-
- var filename = helper.FormatMacroFileName(macro)
- var filepath = fmt.Sprintf("../macros/%s.json", filename)
-
- macroFile, err := helper.ReadMacroFile(filepath)
- if err != nil {
- fmt.Println(err)
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- helper.RunMacroSteps(macroFile)
-}
diff --git a/be/app/structs/api-struct.go b/be/app/structs/api-struct.go
deleted file mode 100644
index 774bbad..0000000
--- a/be/app/structs/api-struct.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package structs
-
-type Allowed struct {
- Local []string
- Remote []string
- Auth []string
-}
-
-var Endpoints = Allowed{
- Local: []string{
- "/macro/record",
- "/macro/list",
- "/macro/delete",
- "/macro/play",
- "/device/list",
- "/device/access/check",
- "/device/access/request",
- "/device/link/ping",
- "/device/link/start",
- "/device/link/poll",
- "/device/link/remove",
- "/device/handshake",
- },
- Remote: []string{
- "/macro/list",
- "/device/access/check",
- "/device/access/request",
- "/device/link/ping",
- "/device/link/end",
- "/device/handshake",
- "/device/auth",
- },
- Auth: []string{
- "/macro/play",
- "/device/link/remove",
- },
-}
diff --git a/be/app/structs/device-struct.go b/be/app/structs/device-struct.go
deleted file mode 100644
index 39586cd..0000000
--- a/be/app/structs/device-struct.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package structs
-
-type Settings struct {
- Name string `json:"name"`
- Type string `json:"type"`
-}
-
-type RemoteWebhook struct {
- Event string `json:"event"`
- Data string `json:"data"`
-}
-
-type Check struct {
- Uuid string `json:"uuid"`
-}
-
-type Request struct {
- Uuid string `json:"uuid"`
- Name string `json:"name"`
- Type string `json:"type"`
-}
-
-type Handshake struct {
- Uuid string `json:"uuid"`
- Shake string `json:"shake"`
-}
-
-type Authcall struct {
- Uuid string `json:"uuid"`
- Data string `json:"d"`
-}
diff --git a/be/app/structs/macro-struct.go b/be/app/structs/macro-struct.go
deleted file mode 100644
index a22fa1b..0000000
--- a/be/app/structs/macro-struct.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package structs
-
-type MacroRequest struct {
- Macro string `json:"macro"`
-}
-
-type Step struct {
- Type string `json:"type"`
- Key string `json:"key"`
- Code string `json:"code"`
- Location int `json:"location"`
- Direction string `json:"direction"`
- Value int `json:"value"`
-}
-
-type NewMacro struct {
- Name string `json:"name"`
- Steps []Step `json:"steps"`
-}
diff --git a/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json b/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json
deleted file mode 100644
index e0eb582..0000000
--- a/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"Unknown desktop","type":"desktop"}
\ No newline at end of file
diff --git a/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.key b/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.key
deleted file mode 100644
index 5bb53d8..0000000
--- a/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.key
+++ /dev/null
@@ -1 +0,0 @@
-3JYxP8LOq1Y2fhpgEtpXVJ3v4s3qdML3
\ No newline at end of file
diff --git a/be/devices/f70778be-99c1-4c5c-b1a2-36ef73d971a0.json b/be/devices/f70778be-99c1-4c5c-b1a2-36ef73d971a0.json
deleted file mode 100644
index 203fbb3..0000000
--- a/be/devices/f70778be-99c1-4c5c-b1a2-36ef73d971a0.json
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"Unknown mobile","type":"mobile"}
\ No newline at end of file
diff --git a/be/devices/f70778be-99c1-4c5c-b1a2-36ef73d971a0.key b/be/devices/f70778be-99c1-4c5c-b1a2-36ef73d971a0.key
deleted file mode 100644
index 4aa4e7a..0000000
--- a/be/devices/f70778be-99c1-4c5c-b1a2-36ef73d971a0.key
+++ /dev/null
@@ -1 +0,0 @@
-4MqIbBoPsHizsWCyeqg6gd/wpQzfhc7e
\ No newline at end of file
diff --git a/be/go.mod b/be/go.mod
deleted file mode 100644
index abe1604..0000000
--- a/be/go.mod
+++ /dev/null
@@ -1,38 +0,0 @@
-module be
-
-go 1.24.0
-
-require (
- github.com/go-vgo/robotgo v0.110.6
- github.com/joho/godotenv v1.5.1
-)
-
-require (
- github.com/dblohm7/wingoes v0.0.0-20240820181039-f2b84150679e // indirect
- github.com/ebitengine/purego v0.8.2 // indirect
- github.com/gen2brain/shm v0.1.1 // indirect
- github.com/go-ole/go-ole v1.3.0 // indirect
- github.com/godbus/dbus/v5 v5.1.0 // indirect
- github.com/jezek/xgb v1.1.1 // indirect
- github.com/kbinani/screenshot v0.0.0-20250118074034-a3924b7bbc8c // indirect
- github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
- github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect
- github.com/otiai10/gosseract v2.2.1+incompatible // indirect
- github.com/otiai10/mint v1.6.3 // indirect
- github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
- github.com/robotn/xgb v0.10.0 // indirect
- github.com/robotn/xgbutil v0.10.0 // indirect
- github.com/shirou/gopsutil/v4 v4.25.1 // indirect
- github.com/tailscale/win v0.0.0-20250213223159-5992cb43ca35 // indirect
- github.com/tklauser/go-sysconf v0.3.14 // indirect
- github.com/tklauser/numcpus v0.9.0 // indirect
- github.com/vcaesar/gops v0.40.0 // indirect
- github.com/vcaesar/imgo v0.40.2 // indirect
- github.com/vcaesar/keycode v0.10.1 // indirect
- github.com/vcaesar/tt v0.20.1 // indirect
- github.com/yusufpapurcu/wmi v1.2.4 // indirect
- golang.org/x/exp v0.0.0-20250215185904-eff6e970281f // indirect
- golang.org/x/image v0.24.0 // indirect
- golang.org/x/net v0.38.0 // indirect
- golang.org/x/sys v0.31.0 // indirect
-)
diff --git a/be/go.sum b/be/go.sum
deleted file mode 100644
index 27c1608..0000000
--- a/be/go.sum
+++ /dev/null
@@ -1,80 +0,0 @@
-github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298/go.mod h1:D+QujdIlUNfa0igpNMk6UIvlb6C252URs4yupRUV4lQ=
-github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966/go.mod h1:Mid70uvE93zn9wgF92A/r5ixgnvX8Lh68fxp9KQBaI0=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dblohm7/wingoes v0.0.0-20240820181039-f2b84150679e h1:L+XrFvD0vBIBm+Wf9sFN6aU395t7JROoai0qXZraA4U=
-github.com/dblohm7/wingoes v0.0.0-20240820181039-f2b84150679e/go.mod h1:SUxUaAK/0UG5lYyZR1L1nC4AaYYvSSYTWQSH3FPcxKU=
-github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I=
-github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
-github.com/gen2brain/shm v0.1.1 h1:1cTVA5qcsUFixnDHl14TmRoxgfWEEZlTezpUj1vm5uQ=
-github.com/gen2brain/shm v0.1.1/go.mod h1:UgIcVtvmOu+aCJpqJX7GOtiN7X2ct+TKLg4RTxwPIUA=
-github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
-github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
-github.com/go-vgo/robotgo v0.110.6 h1:1tOxlmTXYg6F3Xs8IT++331MxY2nZ+Q3B6eW312llbo=
-github.com/go-vgo/robotgo v0.110.6/go.mod h1:eBUjTHY1HYjzdi1+UWJUbxB+b9gE+l4Ei7vQU/9SnLw=
-github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
-github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
-github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/jezek/xgb v1.1.1 h1:bE/r8ZZtSv7l9gk6nU0mYx51aXrvnyb44892TwSaqS4=
-github.com/jezek/xgb v1.1.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
-github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
-github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
-github.com/kbinani/screenshot v0.0.0-20250118074034-a3924b7bbc8c h1:1IlzDla/ZATV/FsRn1ETf7ir91PHS2mrd4VMunEtd9k=
-github.com/kbinani/screenshot v0.0.0-20250118074034-a3924b7bbc8c/go.mod h1:Pmpz2BLf55auQZ67u3rvyI2vAQvNetkK/4zYUmpauZQ=
-github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 h1:7UMa6KCCMjZEMDtTVdcGu0B1GmmC7QJKiCCjyTAWQy0=
-github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k=
-github.com/lxn/win v0.0.0-20210218163916-a377121e959e h1:H+t6A/QJMbhCSEH5rAuRxh+CtW96g0Or0Fxa9IKr4uc=
-github.com/lxn/win v0.0.0-20210218163916-a377121e959e/go.mod h1:KxxjdtRkfNoYDCUP5ryK7XJJNTnpC8atvtmTheChOtk=
-github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
-github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
-github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I=
-github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE=
-github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs=
-github.com/otiai10/mint v1.6.3/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
-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/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
-github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
-github.com/robotn/xgb v0.0.0-20190912153532-2cb92d044934/go.mod h1:SxQhJskUJ4rleVU44YvnrdvxQr0tKy5SRSigBrCgyyQ=
-github.com/robotn/xgb v0.10.0 h1:O3kFbIwtwZ3pgLbp1h5slCQ4OpY8BdwugJLrUe6GPIM=
-github.com/robotn/xgb v0.10.0/go.mod h1:SxQhJskUJ4rleVU44YvnrdvxQr0tKy5SRSigBrCgyyQ=
-github.com/robotn/xgbutil v0.10.0 h1:gvf7mGQqCWQ68aHRtCxgdewRk+/KAJui6l3MJQQRCKw=
-github.com/robotn/xgbutil v0.10.0/go.mod h1:svkDXUDQjUiWzLrA0OZgHc4lbOts3C+uRfP6/yjwYnU=
-github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs=
-github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI=
-github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
-github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/tailscale/win v0.0.0-20250213223159-5992cb43ca35 h1:wAZbkTZkqDzWsqxPh2qkBd3KvFU7tcxV0BP0Rnhkxog=
-github.com/tailscale/win v0.0.0-20250213223159-5992cb43ca35/go.mod h1:aMd4yDHLjbOuYP6fMxj1d9ACDQlSWwYztcpybGHCQc8=
-github.com/tc-hib/winres v0.2.1 h1:YDE0FiP0VmtRaDn7+aaChp1KiF4owBiJa5l964l5ujA=
-github.com/tc-hib/winres v0.2.1/go.mod h1:C/JaNhH3KBvhNKVbvdlDWkbMDO9H4fKKDaN7/07SSuk=
-github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU=
-github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
-github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo=
-github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI=
-github.com/vcaesar/gops v0.40.0 h1:I+1RCGiV+LkZJUYNzAd373xs0uM2UyeFdZBmow8HfCM=
-github.com/vcaesar/gops v0.40.0/go.mod h1:3u/USW7JovqUK6i13VOD3qWfvXXd2TIIKE4PYIv4TOM=
-github.com/vcaesar/imgo v0.40.2 h1:5GWScRLdBCMtO1v2I1bs+ZmDLZFINxYSMZ+mtUw5qPM=
-github.com/vcaesar/imgo v0.40.2/go.mod h1:MVCl+FxHI2gTgmiHoi0n5xNCbYcfv9SVtdEOUC92+eo=
-github.com/vcaesar/keycode v0.10.1 h1:0DesGmMAPWpYTCYddOFiCMKCDKgNnwiQa2QXindVUHw=
-github.com/vcaesar/keycode v0.10.1/go.mod h1:JNlY7xbKsh+LAGfY2j4M3znVrGEm5W1R8s/Uv6BJcfQ=
-github.com/vcaesar/tt v0.20.1 h1:D/jUeeVCNbq3ad8M7hhtB3J9x5RZ6I1n1eZ0BJp7M+4=
-github.com/vcaesar/tt v0.20.1/go.mod h1:cH2+AwGAJm19Wa6xvEa+0r+sXDJBT0QgNQey6mwqLeU=
-github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
-github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
-golang.org/x/exp v0.0.0-20250215185904-eff6e970281f h1:oFMYAjX0867ZD2jcNiLBrI9BdpmEkvPyi5YrBGXbamg=
-golang.org/x/exp v0.0.0-20250215185904-eff6e970281f/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk=
-golang.org/x/image v0.24.0 h1:AN7zRgVsbvmTfNyqIbbOraYL8mSwcKncEj8ofjgzcMQ=
-golang.org/x/image v0.24.0/go.mod h1:4b/ITuLfqYq1hqZcjofwctIhi7sZh2WaCjvsBNjjya8=
-golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
-golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
-golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/be/index.html b/be/index.html
deleted file mode 100644
index bc22877..0000000
--- a/be/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- 404 - BALLS
-
-
-
- Balls found
- So not the content you're looking for.
-
-
diff --git a/be/macroOLD/macro.go b/be/macroOLD/macro.go
deleted file mode 100644
index 4abe231..0000000
--- a/be/macroOLD/macro.go
+++ /dev/null
@@ -1,162 +0,0 @@
-package macro
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "log"
- "net/http"
- "os"
- "path/filepath"
- "regexp"
- "strings"
- "time"
-
- "github.com/go-vgo/robotgo"
-)
-
-type Step struct {
- Type string `json:"type"`
- Key string `json:"key"`
- Code string `json:"code"`
- Location int `json:"location"`
- Direction string `json:"direction"`
- Value int `json:"value"`
-}
-
-var newMacro struct {
- Name string `json:"name"`
- Steps []Step `json:"steps"`
-}
-
-func Save(w http.ResponseWriter, r *http.Request) {
- body, err := io.ReadAll(r.Body)
-
- if err != nil {
- panic(err)
- }
-
- log.Println(string(body))
-
- err = json.Unmarshal(body, &newMacro)
-
- if err != nil {
- panic(err)
- }
-
- stepsJSON, err := json.Marshal(newMacro.Steps)
- if err != nil {
- panic(err)
- }
-
- err = os.WriteFile("../macros/"+makeValidFilename(newMacro.Name)+".json", stepsJSON, 0644)
- if err != nil {
- panic(err)
- }
-}
-
-func makeValidFilename(s string) string {
- // Remove invalid characters
- re := regexp.MustCompile(`[\/\?\*\>\<\:\\"\|\n]`)
- s = re.ReplaceAllString(s, "")
-
- // Replace spaces with underscores
- s = strings.ReplaceAll(s, " ", "_")
-
- // Remove special characters
- re = regexp.MustCompile(`[!@#$%^&\(\)\[\]\{\}\~]`)
- s = re.ReplaceAllString(s, "")
-
- // Truncate the string
- if len(s) > 255 {
- s = s[:255]
- }
-
- return s
-}
-
-func List(w http.ResponseWriter, r *http.Request) {
- log.Println("listing macros")
- dir := "../macros"
- files, err := os.ReadDir(dir)
- if err != nil {
- log.Fatal(err)
- }
-
- var fileNames []string
-
- for _, file := range files {
- filename := filepath.Base(file.Name())
- filename = strings.TrimSuffix(filename, filepath.Ext(filename))
- filename = strings.Replace(filename, "_", " ", -1)
-
- fileNames = append(fileNames, filename)
- }
-
- json.NewEncoder(w).Encode(fileNames)
-}
-
-func Delete(w http.ResponseWriter, r *http.Request) {}
-
-func Play(w http.ResponseWriter, r *http.Request) {
- type MacroRequest struct {
- Macro string `json:"macro"`
- }
-
- var req MacroRequest
-
- err := json.NewDecoder(r.Body).Decode(&req)
-
- if err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
- return
- }
-
- macro := req.Macro
-
- macroFile, err := readMacroFile(fmt.Sprintf("../macros/%s.json", makeValidFilename(macro)))
-
- if err != nil {
- fmt.Println(err)
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- playMacro(macroFile)
- // fmt.Println(macroFile)
-}
-
-func readMacroFile(filename string) (steps []Step, err error) {
-
- log.Println(filename)
- // Let's first read the `config.json` file
- content, err := os.ReadFile(filename)
- if err != nil {
- log.Fatal("Error when opening file: ", err)
- }
-
- // Now let's unmarshall the data into `steps`
- err = json.Unmarshal(content, &steps)
- if err != nil {
- log.Fatal("Error during Unmarshal(): ", err)
- }
-
- return steps, nil
-}
-
-func playMacro(steps []Step) {
- for _, step := range steps {
- // log.Println(step)
- switch step.Type {
- case "key":
- robotgo.KeyToggle(step.Key, step.Direction)
- // log.Println("Toggling", step.Key, "to", step.Direction)
- case "delay":
- time.Sleep(time.Duration(step.Location) * time.Millisecond)
- // log.Println("Sleeping for", step.Value, "milliseconds")
- default:
- log.Println("Unknown step type:", step.Type)
- }
- }
-
-}
diff --git a/be/main.go b/be/main.go
deleted file mode 100644
index 6c02643..0000000
--- a/be/main.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package main
-
-import (
- "log"
- "net/http"
-
- "be/app"
-)
-
-func main() {
- http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- apiInit(w, r)
- })
-
- log.Println(http.ListenAndServe(":6970", nil))
-}
-
-func apiInit(w http.ResponseWriter, r *http.Request) {
- app.ApiCORS(w, r)
-
- if r.Method == "GET" {
- app.ApiGet(w, r)
- } else if r.Method == "POST" {
- app.ApiPost(w, r)
- }
-}
diff --git a/be/tmp/build-errors.log b/be/tmp/build-errors.log
deleted file mode 100644
index d4bc9c7..0000000
--- a/be/tmp/build-errors.log
+++ /dev/null
@@ -1 +0,0 @@
-exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
\ No newline at end of file
diff --git a/be/tmp/main.exe b/be/tmp/main.exe
deleted file mode 100644
index 86c4c25..0000000
Binary files a/be/tmp/main.exe and /dev/null differ
diff --git a/fe/assets/main.css b/fe/assets/main.css
deleted file mode 100644
index 1b2d914..0000000
--- a/fe/assets/main.css
+++ /dev/null
@@ -1,4 +0,0 @@
-html,
-body {
- background-color: white;
-}
diff --git a/macros/TEST-Close_Application.json b/macros/TEST-Close_Application.json
new file mode 100644
index 0000000..c481f1b
--- /dev/null
+++ b/macros/TEST-Close_Application.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lalt", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "f4", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lalt", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "f4", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Close_Browser_Window.json b/macros/TEST-Close_Browser_Window.json
new file mode 100644
index 0000000..63cb228
--- /dev/null
+++ b/macros/TEST-Close_Browser_Window.json
@@ -0,0 +1,13 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lshift", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "w", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lshift", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "w", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Close_Tab.json b/macros/TEST-Close_Tab.json
new file mode 100644
index 0000000..577aa88
--- /dev/null
+++ b/macros/TEST-Close_Tab.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "w", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "w", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Displays.json b/macros/TEST-Displays.json
new file mode 100644
index 0000000..80ba168
--- /dev/null
+++ b/macros/TEST-Displays.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lcmd", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "p", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lcmd", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "p", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Files.json b/macros/TEST-Files.json
new file mode 100644
index 0000000..be664ab
--- /dev/null
+++ b/macros/TEST-Files.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lcmd", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "e", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lcmd", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "e", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Fullscreen.json b/macros/TEST-Fullscreen.json
new file mode 100644
index 0000000..16aa578
--- /dev/null
+++ b/macros/TEST-Fullscreen.json
@@ -0,0 +1 @@
+[{"code":"f11","direction":"down","type":"key"},{"type":"delay","value":15},{"code":"f11","direction":"up","type":"key"}]
\ No newline at end of file
diff --git a/macros/TEST-Home.json b/macros/TEST-Home.json
new file mode 100644
index 0000000..4782647
--- /dev/null
+++ b/macros/TEST-Home.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lalt", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "home", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "home", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lalt", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-New_Desktop.json b/macros/TEST-New_Desktop.json
new file mode 100644
index 0000000..9ade4e0
--- /dev/null
+++ b/macros/TEST-New_Desktop.json
@@ -0,0 +1,13 @@
+[
+ { "code": "lcmd", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 50 },
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 50 },
+ { "code": "d", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 50 },
+ { "code": "lcmd", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 50 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 50 },
+ { "code": "d", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-New_Tab.json b/macros/TEST-New_Tab.json
new file mode 100644
index 0000000..f62acf0
--- /dev/null
+++ b/macros/TEST-New_Tab.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "t", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "t", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-New_Window.json b/macros/TEST-New_Window.json
new file mode 100644
index 0000000..8880f54
--- /dev/null
+++ b/macros/TEST-New_Window.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "n", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "n", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Next_Tab.json b/macros/TEST-Next_Tab.json
new file mode 100644
index 0000000..1ee9641
--- /dev/null
+++ b/macros/TEST-Next_Tab.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "tab", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "tab", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-PlayPause.json b/macros/TEST-PlayPause.json
new file mode 100644
index 0000000..5471bd1
--- /dev/null
+++ b/macros/TEST-PlayPause.json
@@ -0,0 +1 @@
+[{"code":"audio_play|audio_pause","direction":"down","type":"key"},{"type":"delay","value":15},{"code":"audio_play|audio_pause","direction":"up","type":"key"}]
\ No newline at end of file
diff --git a/macros/TEST-Previous_Tab.json b/macros/TEST-Previous_Tab.json
new file mode 100644
index 0000000..57dfb44
--- /dev/null
+++ b/macros/TEST-Previous_Tab.json
@@ -0,0 +1,13 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lshift", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "tab", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lshift", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "tab", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-RunDialog.json b/macros/TEST-RunDialog.json
new file mode 100644
index 0000000..4b73502
--- /dev/null
+++ b/macros/TEST-RunDialog.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lcmd", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "r", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lcmd", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "r", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Settings.json b/macros/TEST-Settings.json
new file mode 100644
index 0000000..fdc8f80
--- /dev/null
+++ b/macros/TEST-Settings.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lcmd", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "i", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lcmd", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "i", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Task_manager.json b/macros/TEST-Task_manager.json
new file mode 100644
index 0000000..732e5df
--- /dev/null
+++ b/macros/TEST-Task_manager.json
@@ -0,0 +1,13 @@
+[
+ { "code": "lctrl", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lshift", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "esc", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "esc", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lshift", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lctrl", "direction": "up", "type": "key" }
+]
diff --git a/macros/TEST-Task_view.json b/macros/TEST-Task_view.json
new file mode 100644
index 0000000..65901ec
--- /dev/null
+++ b/macros/TEST-Task_view.json
@@ -0,0 +1,9 @@
+[
+ { "code": "lcmd", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "tab", "direction": "down", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "lcmd", "direction": "up", "type": "key" },
+ { "type": "delay", "value": 15 },
+ { "code": "tab", "direction": "up", "type": "key" }
+]
diff --git a/macros/desktop.json b/macros/TEST-desktop.json
similarity index 100%
rename from macros/desktop.json
rename to macros/TEST-desktop.json
diff --git a/macros/task_manager.json b/macros/task_manager.json
deleted file mode 100644
index 194fbc4..0000000
--- a/macros/task_manager.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"type":"key","key":"Control","code":"ControlLeft","location":1,"direction":"down","value":0},{"type":"delay","key":"","code":"","location":0,"direction":"","value":15},{"type":"key","key":"Shift","code":"ShiftLeft","location":1,"direction":"down","value":0},{"type":"delay","key":"","code":"","location":0,"direction":"","value":15},{"type":"key","key":"Escape","code":"Escape","location":0,"direction":"down","value":0},{"type":"delay","key":"","code":"","location":0,"direction":"","value":15},{"type":"key","key":"Escape","code":"Escape","location":0,"direction":"up","value":0},{"type":"delay","key":"","code":"","location":0,"direction":"","value":15},{"type":"key","key":"Shift","code":"ShiftLeft","location":1,"direction":"up","value":0},{"type":"delay","key":"","code":"","location":0,"direction":"","value":15},{"type":"key","key":"Control","code":"ControlLeft","location":1,"direction":"up","value":0}]
\ No newline at end of file
diff --git a/panels/Elite_Dangerous/index.html b/panels/Elite_Dangerous/index.html
deleted file mode 100644
index 2d230d9..0000000
--- a/panels/Elite_Dangerous/index.html
+++ /dev/null
@@ -1,913 +0,0 @@
-
-
-
-
-
- Document
-
-
-
-
-
-
-
-
-
-
-
Frame Shift Drive
-
-
- Toggle FSD
-
-
-
-
-
-
-
-
Mode
-
Analysis
-
-
Combat
-
-
-
Hardpoints
-
Retract
-
-
Deploy
-
-
-
-
-
-
-
-
Flight Assist
-
-
-
- Rotational Correction
-
-
-
-
-
-
-
Lights
-
-
- Off
- On
-
-
-
-
Night Vis.
-
-
- Off
- On
-
-
-
-
-
-
Silent Running
-
-
- Off
- On
-
-
-
-
-
-
JETTISON CARGO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/panels/Elite_Dangerous/input.css b/panels/Elite_Dangerous/input.css
deleted file mode 100644
index 6056744..0000000
--- a/panels/Elite_Dangerous/input.css
+++ /dev/null
@@ -1,253 +0,0 @@
-@import url(https://fonts.bunny.net/css?family=orbitron:400,600,800);
-@layer theme, utilities;
-@import "tailwindcss/theme.css" layer(theme);
-@import "tailwindcss/utilities.css" layer(utilities);
-
-@layer theme {
- /* :root {
- } */
-}
-
-html,
-body,
-#panel-html__body {
- @apply relative;
-}
-
-#panel-html__body {
- --font-sans: "Orbitron", sans-serif;
- @apply font-sans text-sm font-light tracking-wide bg-gray-900 text-slate-50 size-full;
-
- * {
- box-sizing: border-box;
- }
-}
-
-.group-left,
-.group-middle,
-.group-right {
- @apply grid gap-2 h-fit;
-}
-
-.ed-panel {
- @apply w-full p-2 border h-fit rounded-b-xl;
-
- h3,
- h4 {
- @apply m-0 mb-1 font-extralight;
- }
-
- h3 {
- @apply text-base;
- }
-
- h4 {
- @apply text-sm;
- }
-
- &.pnl__blue {
- @apply border-sky-300 bg-sky-500/30;
-
- h3,
- h4 {
- @apply text-sky-100;
-
- text-shadow: 0 0 0.2em var(--color-sky-300);
- }
- }
-
- &.pnl__yellow {
- @apply border-amber-300 bg-amber-500/30;
-
- h3,
- h4 {
- @apply text-amber-100;
-
- text-shadow: 0 0 0.2em var(--color-amber-300);
- }
- }
-
- &.pnl__orange {
- @apply border-orange-300 bg-orange-500/30;
-
- h3,
- h4 {
- @apply text-orange-100;
-
- text-shadow: 0 0 0.2em var(--color-orange-300);
- }
- }
-
- &.pnl__red {
- @apply border-rose-300 bg-rose-500/30;
-
- h3,
- h4 {
- @apply text-rose-100;
-
- text-shadow: 0 0 0.2em var(--color-rose-400);
- }
- }
-
- &.pnl__white {
- @apply border-white bg-white/20;
-
- h3,
- h4 {
- @apply text-white;
-
- text-shadow: 0 0 0.2em var(--color-white);
- }
- }
-}
-
-.ed-button {
- @apply flex items-center justify-center px-4 py-2 text-base text-center rounded-lg border-3;
-
- svg {
- @apply block !size-5;
- }
-
- &.btn__vertical {
- @apply flex-col;
- }
-
- &.btn__filled {
- @apply text-gray-900;
- }
-
- &.btn__orange {
- @apply text-orange-100 border-orange-400 bg-orange-500/50;
-
- &.btn__filled {
- @apply bg-orange-400;
- }
- }
-
- &.btn__yellow {
- @apply text-orange-100 border-amber-400 bg-amber-500/50;
-
- &.btn__filled {
- @apply bg-amber-400;
- }
- }
-
- &.btn__blue {
- @apply border-sky-400 bg-sky-500/50 text-sky-100;
-
- &.btn__filled {
- @apply bg-sky-500;
- }
- }
-
- &.btn__red {
- @apply border-rose-500 bg-rose-600/50 text-rose-100;
-
- &.btn__filled {
- @apply bg-rose-600;
- }
- }
-
- &.btn__white {
- @apply border-white bg-white/30;
-
- &.btn__filled {
- @apply bg-white;
- }
- }
-}
-
-.ed-button-group__horizontal {
- @apply grid divide-x;
-
- .ed-button {
- @apply rounded-none;
-
- &:first-child {
- @apply rounded-l-lg;
- }
-
- &:last-child {
- @apply rounded-r-lg;
- }
- }
-}
-
-.ed-button-group__vertical {
- @apply grid divide-y;
-
- .ed-button {
- @apply rounded-none;
-
- &:first-child {
- @apply rounded-t-lg;
- }
-
- &:last-child {
- @apply rounded-b-lg;
- }
- }
-}
-
-.ed-toggle {
- .toggle__wrapper {
- @apply relative p-1.5 border-2 rounded-full size-full;
- }
-
- .toggle__indicator {
- @apply absolute transition rounded-full aspect-square;
- }
-
- &.toggle__horizontal {
- @apply w-20 h-12;
-
- .toggle__indicator {
- @apply left-1.5 translate-x-0 h-[calc(100%-.75rem)];
- }
-
- &[active] .toggle__indicator {
- @apply translate-x-full;
- }
- }
-
- &.toggle__vertical {
- @apply w-12 h-20;
-
- .toggle__indicator {
- @apply top-1.5 translate-y-0 w-[calc(100%-.75rem)];
- }
- &[active] .toggle__indicator {
- @apply translate-y-full;
- }
- }
-}
-
-dialog[open] {
- @apply absolute -translate-x-1/2 -translate-y-1/2 bg-transparent border-0 outline-0 top-1/2 left-1/2;
- @apply backdrop:absolute backdrop:bg-black/50;
-
- .dialog__close {
- @apply absolute text-white top-3 right-3;
- }
-}
-
-#clock {
- @apply relative flex pr-16 text-3xl w-fit;
-
- i {
- @apply pl-1 not-italic;
- }
-
- .hours-minutes,
- .seconds {
- @apply flex gap-1;
- }
-
- span {
- @apply inline-block w-[.75em] text-center;
- }
-
- sup {
- @apply absolute right-0 w-16 pl-2 text-lg text-left opacity-80;
- }
-}
diff --git a/panels/Elite_Dangerous/output.css b/panels/Elite_Dangerous/output.css
deleted file mode 100644
index 4446c1f..0000000
--- a/panels/Elite_Dangerous/output.css
+++ /dev/null
@@ -1,688 +0,0 @@
-/*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */
-@import url(https://fonts.bunny.net/css?family=orbitron:400,600,800);
-@layer properties;
-@layer theme, utilities;
-@layer theme {
- :root, :host {
- --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
- 'Noto Color Emoji';
- --color-red-400: oklch(70.4% 0.191 22.216);
- --color-red-500: oklch(63.7% 0.237 25.331);
- --color-red-600: oklch(57.7% 0.245 27.325);
- --color-orange-100: oklch(95.4% 0.038 75.164);
- --color-orange-300: oklch(83.7% 0.128 66.29);
- --color-orange-400: oklch(75% 0.183 55.934);
- --color-orange-500: oklch(70.5% 0.213 47.604);
- --color-amber-100: oklch(96.2% 0.059 95.617);
- --color-amber-300: oklch(87.9% 0.169 91.605);
- --color-amber-400: oklch(82.8% 0.189 84.429);
- --color-amber-500: oklch(76.9% 0.188 70.08);
- --color-lime-400: oklch(84.1% 0.238 128.85);
- --color-lime-600: oklch(64.8% 0.2 131.684);
- --color-sky-100: oklch(95.1% 0.026 236.824);
- --color-sky-300: oklch(82.8% 0.111 230.318);
- --color-sky-400: oklch(74.6% 0.16 232.661);
- --color-sky-500: oklch(68.5% 0.169 237.323);
- --color-sky-600: oklch(58.8% 0.158 241.966);
- --color-sky-900: oklch(39.1% 0.09 240.876);
- --color-rose-100: oklch(94.1% 0.03 12.58);
- --color-rose-300: oklch(81% 0.117 11.638);
- --color-rose-400: oklch(71.2% 0.194 13.428);
- --color-rose-500: oklch(64.5% 0.246 16.439);
- --color-rose-600: oklch(58.6% 0.253 17.585);
- --color-slate-50: oklch(98.4% 0.003 247.858);
- --color-slate-950: oklch(12.9% 0.042 264.695);
- --color-gray-800: oklch(27.8% 0.033 256.848);
- --color-gray-900: oklch(21% 0.034 264.665);
- --color-black: #000;
- --color-white: #fff;
- --spacing: 0.25rem;
- --text-xs: 0.75rem;
- --text-xs--line-height: calc(1 / 0.75);
- --text-sm: 0.875rem;
- --text-sm--line-height: calc(1.25 / 0.875);
- --text-base: 1rem;
- --text-base--line-height: calc(1.5 / 1);
- --text-lg: 1.125rem;
- --text-lg--line-height: calc(1.75 / 1.125);
- --text-3xl: 1.875rem;
- --text-3xl--line-height: calc(2.25 / 1.875);
- --font-weight-extralight: 200;
- --font-weight-light: 300;
- --tracking-wide: 0.025em;
- --radius-lg: 0.5rem;
- --radius-xl: 0.75rem;
- --default-transition-duration: 150ms;
- --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- }
-}
-@layer utilities {
- .absolute {
- position: absolute;
- }
- .relative {
- position: relative;
- }
- .inset-0 {
- inset: calc(var(--spacing) * 0);
- }
- .right-0 {
- right: calc(var(--spacing) * 0);
- }
- .bottom-full {
- bottom: 100%;
- }
- .m-0 {
- margin: calc(var(--spacing) * 0);
- }
- .mt-4 {
- margin-top: calc(var(--spacing) * 4);
- }
- .flex {
- display: flex;
- }
- .grid {
- display: grid;
- }
- .aspect-square {
- aspect-ratio: 1 / 1;
- }
- .size-8 {
- width: calc(var(--spacing) * 8);
- height: calc(var(--spacing) * 8);
- }
- .size-16 {
- width: calc(var(--spacing) * 16);
- height: calc(var(--spacing) * 16);
- }
- .size-full {
- width: 100%;
- height: 100%;
- }
- .h-28 {
- height: calc(var(--spacing) * 28);
- }
- .h-full {
- height: 100%;
- }
- .\!w-fit {
- width: fit-content !important;
- }
- .w-28 {
- width: calc(var(--spacing) * 28);
- }
- .w-fit {
- width: fit-content;
- }
- .w-full {
- width: 100%;
- }
- .grid-cols-2 {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- .grid-cols-4 {
- grid-template-columns: repeat(4, minmax(0, 1fr));
- }
- .grid-cols-\[1fr_2fr\] {
- grid-template-columns: 1fr 2fr;
- }
- .grid-cols-\[1fr_2fr_1fr\] {
- grid-template-columns: 1fr 2fr 1fr;
- }
- .grid-cols-\[2fr_1fr\] {
- grid-template-columns: 2fr 1fr;
- }
- .grid-cols-\[3fr_1fr_1fr\] {
- grid-template-columns: 3fr 1fr 1fr;
- }
- .grid-rows-3 {
- grid-template-rows: repeat(3, minmax(0, 1fr));
- }
- .flex-col {
- flex-direction: column;
- }
- .items-center {
- align-items: center;
- }
- .items-end {
- align-items: flex-end;
- }
- .\!justify-start {
- justify-content: flex-start !important;
- }
- .justify-between {
- justify-content: space-between;
- }
- .justify-center {
- justify-content: center;
- }
- .justify-end {
- justify-content: flex-end;
- }
- .justify-items-center {
- justify-items: center;
- }
- .gap-2 {
- gap: calc(var(--spacing) * 2);
- }
- .divide-x {
- :where(& > :not(:last-child)) {
- --tw-divide-x-reverse: 0;
- border-inline-style: var(--tw-border-style);
- border-inline-start-width: calc(1px * var(--tw-divide-x-reverse));
- border-inline-end-width: calc(1px * calc(1 - var(--tw-divide-x-reverse)));
- }
- }
- .rounded-full {
- border-radius: calc(infinity * 1px);
- }
- .\!rounded-tl-none {
- border-top-left-radius: 0 !important;
- }
- .\!rounded-tr-none {
- border-top-right-radius: 0 !important;
- }
- .\!rounded-b-none {
- border-bottom-right-radius: 0 !important;
- border-bottom-left-radius: 0 !important;
- }
- .border-3 {
- border-style: var(--tw-border-style);
- border-width: 3px;
- }
- .border-lime-600 {
- border-color: var(--color-lime-600);
- }
- .border-red-500 {
- border-color: var(--color-red-500);
- }
- .border-red-600 {
- border-color: var(--color-red-600);
- }
- .border-sky-600 {
- border-color: var(--color-sky-600);
- }
- .border-white {
- border-color: var(--color-white);
- }
- .\!bg-sky-900 {
- background-color: var(--color-sky-900) !important;
- }
- .bg-lime-400 {
- background-color: var(--color-lime-400);
- }
- .bg-lime-400\/30 {
- background-color: color-mix(in srgb, oklch(84.1% 0.238 128.85) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-lime-400) 30%, transparent);
- }
- }
- .bg-red-400 {
- background-color: var(--color-red-400);
- }
- .bg-red-400\/30 {
- background-color: color-mix(in srgb, oklch(70.4% 0.191 22.216) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-red-400) 30%, transparent);
- }
- }
- .bg-red-500\/80 {
- background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 80%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-red-500) 80%, transparent);
- }
- }
- .bg-sky-400 {
- background-color: var(--color-sky-400);
- }
- .bg-sky-400\/30 {
- background-color: color-mix(in srgb, oklch(74.6% 0.16 232.661) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-sky-400) 30%, transparent);
- }
- }
- .bg-slate-950 {
- background-color: var(--color-slate-950);
- }
- .bg-white {
- background-color: var(--color-white);
- }
- .bg-white\/30 {
- background-color: color-mix(in srgb, #fff 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-white) 30%, transparent);
- }
- }
- .\!p-0 {
- padding: calc(var(--spacing) * 0) !important;
- }
- .\!p-4 {
- padding: calc(var(--spacing) * 4) !important;
- }
- .p-2 {
- padding: calc(var(--spacing) * 2);
- }
- .\!px-2 {
- padding-inline: calc(var(--spacing) * 2) !important;
- }
- .\!pt-8 {
- padding-top: calc(var(--spacing) * 8) !important;
- }
- .text-center {
- text-align: center;
- }
- .text-left {
- text-align: left;
- }
- .text-right {
- text-align: right;
- }
- .text-base {
- font-size: var(--text-base);
- line-height: var(--tw-leading, var(--text-base--line-height));
- }
- .text-xs {
- font-size: var(--text-xs);
- line-height: var(--tw-leading, var(--text-xs--line-height));
- }
- .\!text-gray-800 {
- color: var(--color-gray-800) !important;
- }
- .text-red-400 {
- color: var(--color-red-400);
- }
- .text-white {
- color: var(--color-white);
- }
- .opacity-80 {
- opacity: 80%;
- }
- .opacity-90 {
- opacity: 90%;
- }
-}
-@layer theme;
-html, body, #panel-html__body {
- position: relative;
-}
-#panel-html__body {
- --font-sans: "Orbitron", sans-serif;
- width: 100%;
- height: 100%;
- background-color: var(--color-gray-900);
- font-family: var(--font-sans);
- font-size: var(--text-sm);
- line-height: var(--tw-leading, var(--text-sm--line-height));
- --tw-font-weight: var(--font-weight-light);
- font-weight: var(--font-weight-light);
- --tw-tracking: var(--tracking-wide);
- letter-spacing: var(--tracking-wide);
- color: var(--color-slate-50);
- * {
- box-sizing: border-box;
- }
-}
-.group-left, .group-middle, .group-right {
- display: grid;
- height: fit-content;
- gap: calc(var(--spacing) * 2);
-}
-.ed-panel {
- height: fit-content;
- width: 100%;
- border-bottom-right-radius: var(--radius-xl);
- border-bottom-left-radius: var(--radius-xl);
- border-style: var(--tw-border-style);
- border-width: 1px;
- padding: calc(var(--spacing) * 2);
- h3, h4 {
- margin: calc(var(--spacing) * 0);
- margin-bottom: calc(var(--spacing) * 1);
- --tw-font-weight: var(--font-weight-extralight);
- font-weight: var(--font-weight-extralight);
- }
- h3 {
- font-size: var(--text-base);
- line-height: var(--tw-leading, var(--text-base--line-height));
- }
- h4 {
- font-size: var(--text-sm);
- line-height: var(--tw-leading, var(--text-sm--line-height));
- }
- &.pnl__blue {
- border-color: var(--color-sky-300);
- background-color: color-mix(in srgb, oklch(68.5% 0.169 237.323) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-sky-500) 30%, transparent);
- }
- h3, h4 {
- color: var(--color-sky-100);
- text-shadow: 0 0 0.2em var(--color-sky-300);
- }
- }
- &.pnl__yellow {
- border-color: var(--color-amber-300);
- background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-amber-500) 30%, transparent);
- }
- h3, h4 {
- color: var(--color-amber-100);
- text-shadow: 0 0 0.2em var(--color-amber-300);
- }
- }
- &.pnl__orange {
- border-color: var(--color-orange-300);
- background-color: color-mix(in srgb, oklch(70.5% 0.213 47.604) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-orange-500) 30%, transparent);
- }
- h3, h4 {
- color: var(--color-orange-100);
- text-shadow: 0 0 0.2em var(--color-orange-300);
- }
- }
- &.pnl__red {
- border-color: var(--color-rose-300);
- background-color: color-mix(in srgb, oklch(64.5% 0.246 16.439) 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-rose-500) 30%, transparent);
- }
- h3, h4 {
- color: var(--color-rose-100);
- text-shadow: 0 0 0.2em var(--color-rose-400);
- }
- }
- &.pnl__white {
- border-color: var(--color-white);
- background-color: color-mix(in srgb, #fff 20%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-white) 20%, transparent);
- }
- h3, h4 {
- color: var(--color-white);
- text-shadow: 0 0 0.2em var(--color-white);
- }
- }
-}
-.ed-button {
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: var(--radius-lg);
- border-style: var(--tw-border-style);
- border-width: 3px;
- padding-inline: calc(var(--spacing) * 4);
- padding-block: calc(var(--spacing) * 2);
- text-align: center;
- font-size: var(--text-base);
- line-height: var(--tw-leading, var(--text-base--line-height));
- svg {
- display: block;
- width: calc(var(--spacing) * 5) !important;
- height: calc(var(--spacing) * 5) !important;
- }
- &.btn__vertical {
- flex-direction: column;
- }
- &.btn__filled {
- color: var(--color-gray-900);
- }
- &.btn__orange {
- border-color: var(--color-orange-400);
- background-color: color-mix(in srgb, oklch(70.5% 0.213 47.604) 50%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-orange-500) 50%, transparent);
- }
- color: var(--color-orange-100);
- &.btn__filled {
- background-color: var(--color-orange-400);
- }
- }
- &.btn__yellow {
- border-color: var(--color-amber-400);
- background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 50%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-amber-500) 50%, transparent);
- }
- color: var(--color-orange-100);
- &.btn__filled {
- background-color: var(--color-amber-400);
- }
- }
- &.btn__blue {
- border-color: var(--color-sky-400);
- background-color: color-mix(in srgb, oklch(68.5% 0.169 237.323) 50%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-sky-500) 50%, transparent);
- }
- color: var(--color-sky-100);
- &.btn__filled {
- background-color: var(--color-sky-500);
- }
- }
- &.btn__red {
- border-color: var(--color-rose-500);
- background-color: color-mix(in srgb, oklch(58.6% 0.253 17.585) 50%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-rose-600) 50%, transparent);
- }
- color: var(--color-rose-100);
- &.btn__filled {
- background-color: var(--color-rose-600);
- }
- }
- &.btn__white {
- border-color: var(--color-white);
- background-color: color-mix(in srgb, #fff 30%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-white) 30%, transparent);
- }
- &.btn__filled {
- background-color: var(--color-white);
- }
- }
-}
-.ed-button-group__horizontal {
- display: grid;
- :where(& > :not(:last-child)) {
- --tw-divide-x-reverse: 0;
- border-inline-style: var(--tw-border-style);
- border-inline-start-width: calc(1px * var(--tw-divide-x-reverse));
- border-inline-end-width: calc(1px * calc(1 - var(--tw-divide-x-reverse)));
- }
- .ed-button {
- border-radius: 0;
- &:first-child {
- border-top-left-radius: var(--radius-lg);
- border-bottom-left-radius: var(--radius-lg);
- }
- &:last-child {
- border-top-right-radius: var(--radius-lg);
- border-bottom-right-radius: var(--radius-lg);
- }
- }
-}
-.ed-button-group__vertical {
- display: grid;
- :where(& > :not(:last-child)) {
- --tw-divide-y-reverse: 0;
- border-bottom-style: var(--tw-border-style);
- border-top-style: var(--tw-border-style);
- border-top-width: calc(1px * var(--tw-divide-y-reverse));
- border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
- }
- .ed-button {
- border-radius: 0;
- &:first-child {
- border-top-left-radius: var(--radius-lg);
- border-top-right-radius: var(--radius-lg);
- }
- &:last-child {
- border-bottom-right-radius: var(--radius-lg);
- border-bottom-left-radius: var(--radius-lg);
- }
- }
-}
-.ed-toggle {
- .toggle__wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- border-radius: calc(infinity * 1px);
- border-style: var(--tw-border-style);
- border-width: 2px;
- padding: calc(var(--spacing) * 1.5);
- }
- .toggle__indicator {
- position: absolute;
- aspect-ratio: 1 / 1;
- border-radius: calc(infinity * 1px);
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
- &.toggle__horizontal {
- height: calc(var(--spacing) * 12);
- width: calc(var(--spacing) * 20);
- .toggle__indicator {
- left: calc(var(--spacing) * 1.5);
- height: calc(100% - .75rem);
- --tw-translate-x: calc(var(--spacing) * 0);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
- &[active] .toggle__indicator {
- --tw-translate-x: 100%;
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
- }
- &.toggle__vertical {
- height: calc(var(--spacing) * 20);
- width: calc(var(--spacing) * 12);
- .toggle__indicator {
- top: calc(var(--spacing) * 1.5);
- width: calc(100% - .75rem);
- --tw-translate-y: calc(var(--spacing) * 0);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
- &[active] .toggle__indicator {
- --tw-translate-y: 100%;
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
- }
-}
-dialog[open] {
- position: absolute;
- top: calc(1/2 * 100%);
- left: calc(1/2 * 100%);
- --tw-translate-x: calc(calc(1/2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- --tw-translate-y: calc(calc(1/2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- border-style: var(--tw-border-style);
- border-width: 0px;
- background-color: transparent;
- outline-style: var(--tw-outline-style);
- outline-width: 0px;
- &::backdrop {
- background-color: color-mix(in srgb, #000 50%, transparent);
- @supports (color: color-mix(in lab, red, red)) {
- background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
- }
- }
- .dialog__close {
- position: absolute;
- top: calc(var(--spacing) * 3);
- right: calc(var(--spacing) * 3);
- color: var(--color-white);
- }
-}
-#clock {
- position: relative;
- display: flex;
- width: fit-content;
- padding-right: calc(var(--spacing) * 16);
- font-size: var(--text-3xl);
- line-height: var(--tw-leading, var(--text-3xl--line-height));
- i {
- padding-left: calc(var(--spacing) * 1);
- font-style: normal;
- }
- .hours-minutes, .seconds {
- display: flex;
- gap: calc(var(--spacing) * 1);
- }
- span {
- display: inline-block;
- width: .75em;
- text-align: center;
- }
- sup {
- position: absolute;
- right: calc(var(--spacing) * 0);
- width: calc(var(--spacing) * 16);
- padding-left: calc(var(--spacing) * 2);
- text-align: left;
- font-size: var(--text-lg);
- line-height: var(--tw-leading, var(--text-lg--line-height));
- opacity: 80%;
- }
-}
-@property --tw-divide-x-reverse {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-font-weight {
- syntax: "*";
- inherits: false;
-}
-@property --tw-tracking {
- syntax: "*";
- inherits: false;
-}
-@property --tw-divide-y-reverse {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-x {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-y {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-z {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-outline-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@layer properties {
- @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
- *, ::before, ::after, ::backdrop {
- --tw-divide-x-reverse: 0;
- --tw-border-style: solid;
- --tw-font-weight: initial;
- --tw-tracking: initial;
- --tw-divide-y-reverse: 0;
- --tw-translate-x: 0;
- --tw-translate-y: 0;
- --tw-translate-z: 0;
- --tw-outline-style: solid;
- }
- }
-}
diff --git a/panels/Elite_Dangerous/package-lock.json b/panels/Elite_Dangerous/package-lock.json
deleted file mode 100644
index 1fb3ab8..0000000
--- a/panels/Elite_Dangerous/package-lock.json
+++ /dev/null
@@ -1,974 +0,0 @@
-{
- "name": "test_panel",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "test_panel",
- "version": "1.0.0",
- "license": "ISC",
- "devDependencies": {
- "@tailwindcss/cli": "^4.1.2",
- "tailwindcss": "^4.1.2"
- }
- },
- "node_modules/@parcel/watcher": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz",
- "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==",
- "dev": true,
- "hasInstallScript": true,
- "dependencies": {
- "detect-libc": "^1.0.3",
- "is-glob": "^4.0.3",
- "micromatch": "^4.0.5",
- "node-addon-api": "^7.0.0"
- },
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- },
- "optionalDependencies": {
- "@parcel/watcher-android-arm64": "2.5.1",
- "@parcel/watcher-darwin-arm64": "2.5.1",
- "@parcel/watcher-darwin-x64": "2.5.1",
- "@parcel/watcher-freebsd-x64": "2.5.1",
- "@parcel/watcher-linux-arm-glibc": "2.5.1",
- "@parcel/watcher-linux-arm-musl": "2.5.1",
- "@parcel/watcher-linux-arm64-glibc": "2.5.1",
- "@parcel/watcher-linux-arm64-musl": "2.5.1",
- "@parcel/watcher-linux-x64-glibc": "2.5.1",
- "@parcel/watcher-linux-x64-musl": "2.5.1",
- "@parcel/watcher-win32-arm64": "2.5.1",
- "@parcel/watcher-win32-ia32": "2.5.1",
- "@parcel/watcher-win32-x64": "2.5.1"
- }
- },
- "node_modules/@parcel/watcher-android-arm64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz",
- "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-darwin-arm64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz",
- "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-darwin-x64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz",
- "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-freebsd-x64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz",
- "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-arm-glibc": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz",
- "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-arm-musl": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz",
- "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-arm64-glibc": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz",
- "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-arm64-musl": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz",
- "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-x64-glibc": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz",
- "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-linux-x64-musl": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz",
- "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-win32-arm64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz",
- "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-win32-ia32": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz",
- "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher-win32-x64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz",
- "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@tailwindcss/cli": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.4.tgz",
- "integrity": "sha512-gP05Qihh+cZ2FqD5fa0WJXx3KEk2YWUYv/RBKAyiOg0V4vYVDr/xlLc0sacpnVEXM45BVUR9U2hsESufYs6YTA==",
- "dev": true,
- "dependencies": {
- "@parcel/watcher": "^2.5.1",
- "@tailwindcss/node": "4.1.4",
- "@tailwindcss/oxide": "4.1.4",
- "enhanced-resolve": "^5.18.1",
- "mri": "^1.2.0",
- "picocolors": "^1.1.1",
- "tailwindcss": "4.1.4"
- },
- "bin": {
- "tailwindcss": "dist/index.mjs"
- }
- },
- "node_modules/@tailwindcss/node": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.4.tgz",
- "integrity": "sha512-MT5118zaiO6x6hNA04OWInuAiP1YISXql8Z+/Y8iisV5nuhM8VXlyhRuqc2PEviPszcXI66W44bCIk500Oolhw==",
- "dev": true,
- "dependencies": {
- "enhanced-resolve": "^5.18.1",
- "jiti": "^2.4.2",
- "lightningcss": "1.29.2",
- "tailwindcss": "4.1.4"
- }
- },
- "node_modules/@tailwindcss/oxide": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.4.tgz",
- "integrity": "sha512-p5wOpXyOJx7mKh5MXh5oKk+kqcz8T+bA3z/5VWWeQwFrmuBItGwz8Y2CHk/sJ+dNb9B0nYFfn0rj/cKHZyjahQ==",
- "dev": true,
- "engines": {
- "node": ">= 10"
- },
- "optionalDependencies": {
- "@tailwindcss/oxide-android-arm64": "4.1.4",
- "@tailwindcss/oxide-darwin-arm64": "4.1.4",
- "@tailwindcss/oxide-darwin-x64": "4.1.4",
- "@tailwindcss/oxide-freebsd-x64": "4.1.4",
- "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.4",
- "@tailwindcss/oxide-linux-arm64-gnu": "4.1.4",
- "@tailwindcss/oxide-linux-arm64-musl": "4.1.4",
- "@tailwindcss/oxide-linux-x64-gnu": "4.1.4",
- "@tailwindcss/oxide-linux-x64-musl": "4.1.4",
- "@tailwindcss/oxide-wasm32-wasi": "4.1.4",
- "@tailwindcss/oxide-win32-arm64-msvc": "4.1.4",
- "@tailwindcss/oxide-win32-x64-msvc": "4.1.4"
- }
- },
- "node_modules/@tailwindcss/oxide-android-arm64": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.4.tgz",
- "integrity": "sha512-xMMAe/SaCN/vHfQYui3fqaBDEXMu22BVwQ33veLc8ep+DNy7CWN52L+TTG9y1K397w9nkzv+Mw+mZWISiqhmlA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-darwin-arm64": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.4.tgz",
- "integrity": "sha512-JGRj0SYFuDuAGilWFBlshcexev2hOKfNkoX+0QTksKYq2zgF9VY/vVMq9m8IObYnLna0Xlg+ytCi2FN2rOL0Sg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-darwin-x64": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.4.tgz",
- "integrity": "sha512-sdDeLNvs3cYeWsEJ4H1DvjOzaGios4QbBTNLVLVs0XQ0V95bffT3+scptzYGPMjm7xv4+qMhCDrkHwhnUySEzA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-freebsd-x64": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.4.tgz",
- "integrity": "sha512-VHxAqxqdghM83HslPhRsNhHo91McsxRJaEnShJOMu8mHmEj9Ig7ToHJtDukkuLWLzLboh2XSjq/0zO6wgvykNA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.4.tgz",
- "integrity": "sha512-OTU/m/eV4gQKxy9r5acuesqaymyeSCnsx1cFto/I1WhPmi5HDxX1nkzb8KYBiwkHIGg7CTfo/AcGzoXAJBxLfg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.4.tgz",
- "integrity": "sha512-hKlLNvbmUC6z5g/J4H+Zx7f7w15whSVImokLPmP6ff1QqTVE+TxUM9PGuNsjHvkvlHUtGTdDnOvGNSEUiXI1Ww==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-linux-arm64-musl": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.4.tgz",
- "integrity": "sha512-X3As2xhtgPTY/m5edUtddmZ8rCruvBvtxYLMw9OsZdH01L2gS2icsHRwxdU0dMItNfVmrBezueXZCHxVeeb7Aw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-linux-x64-gnu": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.4.tgz",
- "integrity": "sha512-2VG4DqhGaDSmYIu6C4ua2vSLXnJsb/C9liej7TuSO04NK+JJJgJucDUgmX6sn7Gw3Cs5ZJ9ZLrnI0QRDOjLfNQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-linux-x64-musl": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.4.tgz",
- "integrity": "sha512-v+mxVgH2kmur/X5Mdrz9m7TsoVjbdYQT0b4Z+dr+I4RvreCNXyCFELZL/DO0M1RsidZTrm6O1eMnV6zlgEzTMQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-wasm32-wasi": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.4.tgz",
- "integrity": "sha512-2TLe9ir+9esCf6Wm+lLWTMbgklIjiF0pbmDnwmhR9MksVOq+e8aP3TSsXySnBDDvTTVd/vKu1aNttEGj3P6l8Q==",
- "bundleDependencies": [
- "@napi-rs/wasm-runtime",
- "@emnapi/core",
- "@emnapi/runtime",
- "@tybys/wasm-util",
- "@emnapi/wasi-threads",
- "tslib"
- ],
- "cpu": [
- "wasm32"
- ],
- "dev": true,
- "optional": true,
- "dependencies": {
- "@emnapi/core": "^1.4.0",
- "@emnapi/runtime": "^1.4.0",
- "@emnapi/wasi-threads": "^1.0.1",
- "@napi-rs/wasm-runtime": "^0.2.8",
- "@tybys/wasm-util": "^0.9.0",
- "tslib": "^2.8.0"
- },
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.4.tgz",
- "integrity": "sha512-VlnhfilPlO0ltxW9/BgfLI5547PYzqBMPIzRrk4W7uupgCt8z6Trw/tAj6QUtF2om+1MH281Pg+HHUJoLesmng==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tailwindcss/oxide-win32-x64-msvc": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.4.tgz",
- "integrity": "sha512-+7S63t5zhYjslUGb8NcgLpFXD+Kq1F/zt5Xv5qTv7HaFTG/DHyHD9GA6ieNAxhgyA4IcKa/zy7Xx4Oad2/wuhw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "dev": true,
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/detect-libc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
- "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
- "dev": true,
- "bin": {
- "detect-libc": "bin/detect-libc.js"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/enhanced-resolve": {
- "version": "5.18.1",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
- "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==",
- "dev": true,
- "dependencies": {
- "graceful-fs": "^4.2.4",
- "tapable": "^2.2.0"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "dev": true,
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true,
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/jiti": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz",
- "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==",
- "dev": true,
- "bin": {
- "jiti": "lib/jiti-cli.mjs"
- }
- },
- "node_modules/lightningcss": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.2.tgz",
- "integrity": "sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==",
- "dev": true,
- "dependencies": {
- "detect-libc": "^2.0.3"
- },
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- },
- "optionalDependencies": {
- "lightningcss-darwin-arm64": "1.29.2",
- "lightningcss-darwin-x64": "1.29.2",
- "lightningcss-freebsd-x64": "1.29.2",
- "lightningcss-linux-arm-gnueabihf": "1.29.2",
- "lightningcss-linux-arm64-gnu": "1.29.2",
- "lightningcss-linux-arm64-musl": "1.29.2",
- "lightningcss-linux-x64-gnu": "1.29.2",
- "lightningcss-linux-x64-musl": "1.29.2",
- "lightningcss-win32-arm64-msvc": "1.29.2",
- "lightningcss-win32-x64-msvc": "1.29.2"
- }
- },
- "node_modules/lightningcss-darwin-arm64": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.29.2.tgz",
- "integrity": "sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-darwin-x64": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.29.2.tgz",
- "integrity": "sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-freebsd-x64": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.29.2.tgz",
- "integrity": "sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-linux-arm-gnueabihf": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.29.2.tgz",
- "integrity": "sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-linux-arm64-gnu": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.29.2.tgz",
- "integrity": "sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-linux-arm64-musl": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.29.2.tgz",
- "integrity": "sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-linux-x64-gnu": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.2.tgz",
- "integrity": "sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-linux-x64-musl": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.2.tgz",
- "integrity": "sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-win32-arm64-msvc": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.29.2.tgz",
- "integrity": "sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss-win32-x64-msvc": {
- "version": "1.29.2",
- "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.29.2.tgz",
- "integrity": "sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 12.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/lightningcss/node_modules/detect-libc": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
- "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/micromatch": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
- "dev": true,
- "dependencies": {
- "braces": "^3.0.3",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/mri": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
- "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/node-addon-api": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
- "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
- "dev": true
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true
- },
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/tailwindcss": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.4.tgz",
- "integrity": "sha512-1ZIUqtPITFbv/DxRmDr5/agPqJwF69d24m9qmM1939TJehgY539CtzeZRjbLt5G6fSy/7YqqYsfvoTEw9xUI2A==",
- "dev": true
- },
- "node_modules/tapable": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
- "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- }
- }
-}
diff --git a/panels/Elite_Dangerous/package.json b/panels/Elite_Dangerous/package.json
deleted file mode 100644
index cf85d0c..0000000
--- a/panels/Elite_Dangerous/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "test_panel",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1",
- "dev": "npx tailwindcss -i ./input.css -o ./output.css --watch"
- },
- "author": "",
- "license": "ISC",
- "devDependencies": {
- "@tailwindcss/cli": "^4.1.2",
- "tailwindcss": "^4.1.2"
- }
-}
diff --git a/panels/Elite_Dangerous/panel.json b/panels/Elite_Dangerous/panel.json
deleted file mode 100644
index 54ebe8c..0000000
--- a/panels/Elite_Dangerous/panel.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "dir": "",
- "name": "Elite Dangerous",
- "description": "A Semi Realistic button panel for Elite Dangerous, made by JaxxMoss.",
- "aspectRatio": "16/10",
- "macros": {
- "CM__Chaff": "ED-CM-Chaff",
- "CM__ECM": "ED-CM-ECM",
- "CM__Heatsink": "ED-CM-Heat_Sink",
- "CM__Shieldcell": "ED-CM-Schield_Cell",
- "Camera__Pos1": "ED-Camera-Position1",
- "Camera__Pos2": "ED-Camera-Position2",
- "Camera__Suite": "ED-Camera-Suite",
- "Comms__panel": "ED-Comms_Panel",
- "External__panel": "ED-External_Panel",
- "FSD__toggle": "ED-Toggle_FSD",
- "Fighter__engage": "ED-Fighter-Engage",
- "Fighter__hold": "ED-Fighter-Hold",
- "Fighter__recall": "ED-Fighter-Recall",
- "Fighter__wingman1": "ED-Fighter-Wingman1",
- "Fighter__wingman2": "ED-Fighter-Wingman2",
- "Fighter__wingman3": "ED-Fighter-Wingman3",
- "Fighter_attack": "ED-Fighter-Attack",
- "Fighter_defend": "ED-Fighter-Defend",
- "Fighter_follow": "ED-Fighter-Follow",
- "FlightAssist__toggle": "ED-Flight_Assist",
- "Free__Camera": "ED-Camera-Free",
- "Galaxy__map": "ED-Galaxy_Map",
- "Hardpoints__toggle": "ED-Hardpoints_Switch",
- "Hyper__Space": "ED-Hyperspace",
- "Internal__panel": "ED-Internal_Panel",
- "Jettison__Cargo": "ED-Jettison_Cargo",
- "Lights__toggle": "ED-Flight_Assist",
- "Mode__toggle": "ED-Mode_Switch",
- "Next__Camera": "ED-Camera-Next",
- "NightVis__toggle": "ED-Night_Vision",
- "Previous__Camera": "ED-Camera-Previous",
- "Roles__panel": "ED-Roles_Panel",
- "Rotational__Correction": "ED-Rotational_Correction",
- "Route__NextSystem": "ED-Route_Next_System",
- "Scanner__DiscScan": "ED-Scanner_Discovery",
- "Scanner__FSS": "ED-Scanner-FSS",
- "SilentRunning__toggle": "ED-Silent_Running",
- "Speed_0percent": "ED-0percent_Speed",
- "Super__Cruise": "ED-Super_Cruise",
- "System__map": "ED-System_Map"
- }
-}
diff --git a/panels/Elite_Dangerous/tailwind.config.js b/panels/Elite_Dangerous/tailwind.config.js
deleted file mode 100644
index 2c1a5aa..0000000
--- a/panels/Elite_Dangerous/tailwind.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/** @type {import('tailwindcss').Config} */
-module.exports = {
- content: [
- "./index.html", // Ensure this path is correct
- ],
- theme: {
- extend: {},
- },
- safelist: [
- {
- pattern: /^(border|bg)-(blue|red|sky|orange|lime)-(200|400|300\/40)$/,
- },
- ],
- plugins: [],
- preflight: false,
- mode: "jit",
-};
diff --git a/panels/test_panel/panel.json b/panels/test_panel/panel.json
index 27afffd..fcfbfdd 100644
--- a/panels/test_panel/panel.json
+++ b/panels/test_panel/panel.json
@@ -1 +1,24 @@
-{"dir":"","name":"Test Panel 1","description":"This is the very first panel to be created. It is a test panel for a mobile phone.","aspectRatio":"10/20","macros":{"button_1":"Task_Manager","button_10":"Close_Browser_Window","button_11":"Previous_Tab","button_12":"Next_Tab","button_13":"Close_Tab","button_14":"New_Tab","button_15":"Fullscreen","button_16":"Home","button_2":"Close_Application","button_3":"RunDialog","button_4":"Files","button_5":"Settings","button_6":"New_Desktop","button_7":"Displays","button_8":"Task_view","button_9":"New_Window"}}
\ No newline at end of file
+{
+ "dir": "",
+ "name": "Test Panel 1",
+ "description": "This is the very first panel to be created. It is a test panel for a mobile phone.",
+ "aspectRatio": "10/20",
+ "macros": {
+ "button_1": "TEST-Task_Manager",
+ "button_10": "TEST-Close_Browser_Window",
+ "button_11": "TEST-Previous_Tab",
+ "button_12": "TEST-Next_Tab",
+ "button_13": "TEST-Close_Tab",
+ "button_14": "TEST-New_Tab",
+ "button_15": "TEST-Fullscreen",
+ "button_16": "TEST-Home",
+ "button_2": "TEST-Close_Application",
+ "button_3": "TEST-RunDialog",
+ "button_4": "TEST-Files",
+ "button_5": "TEST-Settings",
+ "button_6": "TEST-New_Desktop",
+ "button_7": "TEST-Displays",
+ "button_8": "TEST-Task_view",
+ "button_9": "TEST-New_Window"
+ }
+}
diff --git a/public/assets/DevicesView-DqasecOn.js b/public/assets/DevicesView-DqasecOn.js
deleted file mode 100644
index 15fe568..0000000
--- a/public/assets/DevicesView-DqasecOn.js
+++ /dev/null
@@ -1,1758 +0,0 @@
-import { a as createVueComponent, _ as _export_sfc, c as createElementBlock, o as openBlock, s as createBlock, p as createCommentVNode, v as renderSlot, u as unref, q as normalizeClass, z as useDeviceStore, m as ref, r as reactive, b as onMounted, h as createVNode, f as createBaseVNode, w as withCtx, t as toDisplayString, i as createTextVNode, B as IconDevices, F as Fragment, g as renderList, d as axios, e as appUrl, n as onUpdated, j as withModifiers, x as withDirectives, y as vModelText, A as AuthCall, C as decryptAES, k as isLocal } from "./index-GNAKlyBz.js";
-import { _ as _sfc_main$4, a as _sfc_main$5 } from "./DialogComp-Ba5-BUTe.js";
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconAlertTriangle = createVueComponent("outline", "alert-triangle", "IconAlertTriangle", [["path", { "d": "M12 9v4", "key": "svg-0" }], ["path", { "d": "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z", "key": "svg-1" }], ["path", { "d": "M12 16h.01", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconCheck = createVueComponent("outline", "check", "IconCheck", [["path", { "d": "M5 12l5 5l10 -10", "key": "svg-0" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconDeviceDesktop = createVueComponent("outline", "device-desktop", "IconDeviceDesktop", [["path", { "d": "M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z", "key": "svg-0" }], ["path", { "d": "M7 20h10", "key": "svg-1" }], ["path", { "d": "M9 16v4", "key": "svg-2" }], ["path", { "d": "M15 16v4", "key": "svg-3" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconDeviceMobile = createVueComponent("outline", "device-mobile", "IconDeviceMobile", [["path", { "d": "M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z", "key": "svg-0" }], ["path", { "d": "M11 4h2", "key": "svg-1" }], ["path", { "d": "M12 17v.01", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconDeviceTablet = createVueComponent("outline", "device-tablet", "IconDeviceTablet", [["path", { "d": "M5 4a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1v-16z", "key": "svg-0" }], ["path", { "d": "M11 17a1 1 0 1 0 2 0a1 1 0 0 0 -2 0", "key": "svg-1" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconDeviceUnknown = createVueComponent("outline", "device-unknown", "IconDeviceUnknown", [["path", { "d": "M5 5a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z", "key": "svg-0" }], ["path", { "d": "M12 16v.01", "key": "svg-1" }], ["path", { "d": "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconExclamationCircle = createVueComponent("outline", "exclamation-circle", "IconExclamationCircle", [["path", { "d": "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "key": "svg-0" }], ["path", { "d": "M12 9v4", "key": "svg-1" }], ["path", { "d": "M12 16v.01", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconInfoCircle = createVueComponent("outline", "info-circle", "IconInfoCircle", [["path", { "d": "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "key": "svg-0" }], ["path", { "d": "M12 9h.01", "key": "svg-1" }], ["path", { "d": "M11 12h1v4h1", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconKey = createVueComponent("outline", "key", "IconKey", [["path", { "d": "M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z", "key": "svg-0" }], ["path", { "d": "M15 9h.01", "key": "svg-1" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconLinkOff = createVueComponent("outline", "link-off", "IconLinkOff", [["path", { "d": "M9 15l3 -3m2 -2l1 -1", "key": "svg-0" }], ["path", { "d": "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", "key": "svg-1" }], ["path", { "d": "M3 3l18 18", "key": "svg-2" }], ["path", { "d": "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463", "key": "svg-3" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconLink = createVueComponent("outline", "link", "IconLink", [["path", { "d": "M9 15l6 -6", "key": "svg-0" }], ["path", { "d": "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", "key": "svg-1" }], ["path", { "d": "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconPlugConnectedX = createVueComponent("outline", "plug-connected-x", "IconPlugConnectedX", [["path", { "d": "M20 16l-4 4", "key": "svg-0" }], ["path", { "d": "M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z", "key": "svg-1" }], ["path", { "d": "M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z", "key": "svg-2" }], ["path", { "d": "M3 21l2.5 -2.5", "key": "svg-3" }], ["path", { "d": "M18.5 5.5l2.5 -2.5", "key": "svg-4" }], ["path", { "d": "M10 11l-2 2", "key": "svg-5" }], ["path", { "d": "M13 14l-2 2", "key": "svg-6" }], ["path", { "d": "M16 16l4 4", "key": "svg-7" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconReload = createVueComponent("outline", "reload", "IconReload", [["path", { "d": "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747", "key": "svg-0" }], ["path", { "d": "M20 4v5h-5", "key": "svg-1" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconServer = createVueComponent("outline", "server", "IconServer", [["path", { "d": "M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z", "key": "svg-0" }], ["path", { "d": "M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z", "key": "svg-1" }], ["path", { "d": "M7 8l0 .01", "key": "svg-2" }], ["path", { "d": "M7 16l0 .01", "key": "svg-3" }]]);
-const _sfc_main$3 = {
- __name: "AlertComp",
- props: {
- type: String
- // info, success, warning, error
- },
- setup(__props) {
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(`alert alert__${__props.type}`)
- }, [
- __props.type === "info" ? (openBlock(), createBlock(unref(IconInfoCircle), { key: 0 })) : createCommentVNode("", true),
- __props.type === "success" ? (openBlock(), createBlock(unref(IconCheck), { key: 1 })) : createCommentVNode("", true),
- __props.type === "warning" ? (openBlock(), createBlock(unref(IconExclamationCircle), { key: 2 })) : createCommentVNode("", true),
- __props.type === "error" ? (openBlock(), createBlock(unref(IconAlertTriangle), { key: 3 })) : createCommentVNode("", true),
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ], 2);
- };
- }
-};
-const AlertComp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-87f6de25"]]);
-const _hoisted_1$2 = { class: "device-overview" };
-const _hoisted_2$2 = { class: "grid" };
-const _hoisted_3$2 = { class: "mcrm-block block__light flex flex-wrap items-start gap-4" };
-const _hoisted_4$2 = { class: "w-full flex gap-4 items-center justify-between mb-4" };
-const _hoisted_5$1 = { class: "flex gap-4" };
-const _hoisted_6$1 = { class: "grid gap-2" };
-const _hoisted_7$1 = { class: "grid grid-cols-[auto_1fr] gap-2" };
-const _hoisted_8$1 = { class: "w-full truncate" };
-const _hoisted_9 = {
- key: 1,
- class: "grid w-full gap-4"
-};
-const _hoisted_10 = { class: "grid gap-4" };
-const _hoisted_11 = { class: "text-4xl font-mono tracking-wide" };
-const _sfc_main$2 = {
- __name: "ServerView",
- setup(__props) {
- const device = useDeviceStore();
- const pinDialog = ref();
- const remote = reactive({ devices: [], pinlink: false });
- onMounted(() => {
- device.serverGetRemotes();
- device.$subscribe((mutation, state) => {
- if (Object.keys(state.remote).length) remote.devices = device.remote;
- });
- });
- async function startLink(deviceUuid) {
- const pin = await device.serverStartLink(deviceUuid);
- remote.pinlink = { uuid: deviceUuid, pin };
- pinDialog.value.toggleDialog(true);
- pollLink();
- setTimeout(() => {
- resetPinLink();
- }, 6e4);
- }
- function pollLink() {
- const pollInterval = setInterval(() => {
- axios.post(appUrl() + "/device/link/poll", { uuid: remote.pinlink.uuid }).then((data) => {
- if (!data.data) {
- clearInterval(pollInterval);
- resetPinLink();
- device.serverGetRemotes();
- }
- });
- }, 1e3);
- }
- function resetPinLink() {
- remote.pinlink = false;
- if (pinDialog.value) pinDialog.value.toggleDialog(false);
- }
- function unlinkDevice(id) {
- axios.post(appUrl() + "/device/link/remove", { uuid: id }).then((data) => {
- if (data.data) device.serverGetRemotes();
- });
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
- createVNode(AlertComp, { type: "info" }, {
- default: withCtx(() => [
- createBaseVNode("div", _hoisted_2$2, [
- _cache[1] || (_cache[1] = createBaseVNode("strong", null, "This is a server!", -1)),
- createBaseVNode("em", null, "UUID: " + toDisplayString(unref(device).uuid()), 1)
- ])
- ]),
- _: 1
- }),
- createBaseVNode("div", _hoisted_3$2, [
- createBaseVNode("h4", _hoisted_4$2, [
- createBaseVNode("span", _hoisted_5$1, [
- createVNode(unref(IconDevices)),
- _cache[2] || (_cache[2] = createTextVNode("Remote devices "))
- ]),
- createVNode(_sfc_main$4, {
- variant: "primary",
- onClick: _cache[0] || (_cache[0] = ($event) => unref(device).serverGetRemotes())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconReload))
- ]),
- _: 1
- })
- ]),
- Object.keys(remote.devices).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(remote.devices, (remoteDevice, id) => {
- return openBlock(), createElementBlock("div", {
- class: "mcrm-block block__dark block-size__sm w-64 grid !gap-4 content-start",
- key: id
- }, [
- createBaseVNode("div", _hoisted_6$1, [
- createBaseVNode("h5", _hoisted_7$1, [
- remoteDevice.settings.type == "unknown" ? (openBlock(), createBlock(unref(IconDeviceUnknown), { key: 0 })) : createCommentVNode("", true),
- remoteDevice.settings.type == "mobile" ? (openBlock(), createBlock(unref(IconDeviceMobile), { key: 1 })) : createCommentVNode("", true),
- remoteDevice.settings.type == "tablet" ? (openBlock(), createBlock(unref(IconDeviceTablet), { key: 2 })) : createCommentVNode("", true),
- remoteDevice.settings.type == "desktop" ? (openBlock(), createBlock(unref(IconDeviceDesktop), { key: 3 })) : createCommentVNode("", true),
- createBaseVNode("span", _hoisted_8$1, toDisplayString(remoteDevice.settings.name), 1)
- ]),
- createBaseVNode("em", null, toDisplayString(id), 1)
- ]),
- remoteDevice.key ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
- createVNode(AlertComp, { type: "success" }, {
- default: withCtx(() => _cache[3] || (_cache[3] = [
- createTextVNode("Authorized")
- ])),
- _: 1
- }),
- createVNode(_sfc_main$4, {
- variant: "danger",
- onClick: ($event) => unlinkDevice(id)
- }, {
- default: withCtx(() => [
- createVNode(unref(IconLinkOff)),
- _cache[4] || (_cache[4] = createTextVNode("Unlink device "))
- ]),
- _: 2
- }, 1032, ["onClick"])
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
- createVNode(AlertComp, { type: "warning" }, {
- default: withCtx(() => _cache[5] || (_cache[5] = [
- createTextVNode("Unauthorized")
- ])),
- _: 1
- }),
- createVNode(_sfc_main$4, {
- variant: "primary",
- onClick: ($event) => startLink(id)
- }, {
- default: withCtx(() => [
- createVNode(unref(IconLink)),
- _cache[6] || (_cache[6] = createTextVNode("Link device "))
- ]),
- _: 2
- }, 1032, ["onClick"])
- ], 64)),
- remote.pinlink.uuid == id ? (openBlock(), createBlock(AlertComp, {
- key: 2,
- type: "info"
- }, {
- default: withCtx(() => [
- createTextVNode("One time pin: " + toDisplayString(remote.pinlink.pin), 1)
- ]),
- _: 1
- })) : createCommentVNode("", true)
- ]);
- }), 128)) : (openBlock(), createElementBlock("div", _hoisted_9, _cache[7] || (_cache[7] = [
- createBaseVNode("em", { class: "text-slate-300" }, "No remote devices", -1)
- ]))),
- createVNode(_sfc_main$5, {
- ref_key: "pinDialog",
- ref: pinDialog
- }, {
- content: withCtx(() => [
- createBaseVNode("div", _hoisted_10, [
- _cache[8] || (_cache[8] = createBaseVNode("h3", null, "Pin code", -1)),
- createBaseVNode("span", _hoisted_11, toDisplayString(remote.pinlink.pin), 1)
- ])
- ]),
- _: 1
- }, 512)
- ])
- ]);
- };
- }
-};
-const ServerView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f4165abd"]]);
-var Ni = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
-function Ci(E) {
- return E && E.__esModule && Object.prototype.hasOwnProperty.call(E, "default") ? E.default : E;
-}
-var wi = { exports: {} };
-(function(E, q) {
- (function(A, m) {
- var F = "1.0.37", M = "", I = "?", R = "function", V = "undefined", ii = "object", j = "string", li = "major", e = "model", a = "name", i = "type", o = "vendor", t = "version", v = "architecture", B = "console", n = "mobile", b = "tablet", h = "smarttv", N = "wearable", ei = "embedded", oi = 500, G = "Amazon", D = "Apple", di = "ASUS", mi = "BlackBerry", T = "Browser", H = "Chrome", yi = "Edge", X = "Firefox", Y = "Google", ui = "Huawei", ai = "LG", ti = "Microsoft", pi = "Motorola", K = "Opera", Z = "Samsung", hi = "Sharp", J = "Sony", ri = "Xiaomi", si = "Zebra", fi = "Facebook", vi = "Chromium OS", gi = "Mac OS", Ti = function(c, l) {
- var s = {};
- for (var d in c)
- l[d] && l[d].length % 2 === 0 ? s[d] = l[d].concat(c[d]) : s[d] = c[d];
- return s;
- }, Q = function(c) {
- for (var l = {}, s = 0; s < c.length; s++)
- l[c[s].toUpperCase()] = c[s];
- return l;
- }, Ei = function(c, l) {
- return typeof c === j ? U(l).indexOf(U(c)) !== -1 : false;
- }, U = function(c) {
- return c.toLowerCase();
- }, _i = function(c) {
- return typeof c === j ? c.replace(/[^\d\.]/g, M).split(".")[0] : m;
- }, ni = function(c, l) {
- if (typeof c === j)
- return c = c.replace(/^\s\s*/, M), typeof l === V ? c : c.substring(0, oi);
- }, L = function(c, l) {
- for (var s = 0, d, y, O, w, r, k; s < l.length && !r; ) {
- var ci = l[s], xi = l[s + 1];
- for (d = y = 0; d < ci.length && !r && ci[d]; )
- if (r = ci[d++].exec(c), r)
- for (O = 0; O < xi.length; O++)
- k = r[++y], w = xi[O], typeof w === ii && w.length > 0 ? w.length === 2 ? typeof w[1] == R ? this[w[0]] = w[1].call(this, k) : this[w[0]] = w[1] : w.length === 3 ? typeof w[1] === R && !(w[1].exec && w[1].test) ? this[w[0]] = k ? w[1].call(this, k, w[2]) : m : this[w[0]] = k ? k.replace(w[1], w[2]) : m : w.length === 4 && (this[w[0]] = k ? w[3].call(this, k.replace(w[1], w[2])) : m) : this[w] = k || m;
- s += 2;
- }
- }, bi = function(c, l) {
- for (var s in l)
- if (typeof l[s] === ii && l[s].length > 0) {
- for (var d = 0; d < l[s].length; d++)
- if (Ei(l[s][d], c))
- return s === I ? m : s;
- } else if (Ei(l[s], c))
- return s === I ? m : s;
- return c;
- }, Mi = {
- "1.0": "/8",
- "1.2": "/1",
- "1.3": "/3",
- "2.0": "/412",
- "2.0.2": "/416",
- "2.0.3": "/417",
- "2.0.4": "/419",
- "?": "/"
- }, Oi = {
- ME: "4.90",
- "NT 3.11": "NT3.51",
- "NT 4.0": "NT4.0",
- 2e3: "NT 5.0",
- XP: ["NT 5.1", "NT 5.2"],
- Vista: "NT 6.0",
- 7: "NT 6.1",
- 8: "NT 6.2",
- "8.1": "NT 6.3",
- 10: ["NT 6.4", "NT 10.0"],
- RT: "ARM"
- }, ki = {
- browser: [
- [
- /\b(?:crmo|crios)\/([\w\.]+)/i
- // Chrome for Android/iOS
- ],
- [t, [a, "Chrome"]],
- [
- /edg(?:e|ios|a)?\/([\w\.]+)/i
- // Microsoft Edge
- ],
- [t, [a, "Edge"]],
- [
- // Presto based
- /(opera mini)\/([-\w\.]+)/i,
- // Opera Mini
- /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
- // Opera Mobi/Tablet
- /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
- // Opera
- ],
- [a, t],
- [
- /opios[\/ ]+([\w\.]+)/i
- // Opera mini on iphone >= 8.0
- ],
- [t, [a, K + " Mini"]],
- [
- /\bopr\/([\w\.]+)/i
- // Opera Webkit
- ],
- [t, [a, K]],
- [
- // Mixed
- /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
- // Baidu
- ],
- [t, [a, "Baidu"]],
- [
- /(kindle)\/([\w\.]+)/i,
- // Kindle
- /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
- // Lunascape/Maxthon/Netfront/Jasmine/Blazer
- // Trident based
- /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
- // Avant/IEMobile/SlimBrowser
- /(?:ms|\()(ie) ([\w\.]+)/i,
- // Internet Explorer
- // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
- /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
- // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
- /(heytap|ovi)browser\/([\d\.]+)/i,
- // Heytap/Ovi
- /(weibo)__([\d\.]+)/i
- // Weibo
- ],
- [a, t],
- [
- /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
- // UCBrowser
- ],
- [t, [a, "UC" + T]],
- [
- /microm.+\bqbcore\/([\w\.]+)/i,
- // WeChat Desktop for Windows Built-in Browser
- /\bqbcore\/([\w\.]+).+microm/i,
- /micromessenger\/([\w\.]+)/i
- // WeChat
- ],
- [t, [a, "WeChat"]],
- [
- /konqueror\/([\w\.]+)/i
- // Konqueror
- ],
- [t, [a, "Konqueror"]],
- [
- /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
- // IE11
- ],
- [t, [a, "IE"]],
- [
- /ya(?:search)?browser\/([\w\.]+)/i
- // Yandex
- ],
- [t, [a, "Yandex"]],
- [
- /slbrowser\/([\w\.]+)/i
- // Smart Lenovo Browser
- ],
- [t, [a, "Smart Lenovo " + T]],
- [
- /(avast|avg)\/([\w\.]+)/i
- // Avast/AVG Secure Browser
- ],
- [[a, /(.+)/, "$1 Secure " + T], t],
- [
- /\bfocus\/([\w\.]+)/i
- // Firefox Focus
- ],
- [t, [a, X + " Focus"]],
- [
- /\bopt\/([\w\.]+)/i
- // Opera Touch
- ],
- [t, [a, K + " Touch"]],
- [
- /coc_coc\w+\/([\w\.]+)/i
- // Coc Coc Browser
- ],
- [t, [a, "Coc Coc"]],
- [
- /dolfin\/([\w\.]+)/i
- // Dolphin
- ],
- [t, [a, "Dolphin"]],
- [
- /coast\/([\w\.]+)/i
- // Opera Coast
- ],
- [t, [a, K + " Coast"]],
- [
- /miuibrowser\/([\w\.]+)/i
- // MIUI Browser
- ],
- [t, [a, "MIUI " + T]],
- [
- /fxios\/([-\w\.]+)/i
- // Firefox for iOS
- ],
- [t, [a, X]],
- [
- /\bqihu|(qi?ho?o?|360)browser/i
- // 360
- ],
- [[a, "360 " + T]],
- [
- /(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
- ],
- [[a, /(.+)/, "$1 " + T], t],
- [
- // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
- /samsungbrowser\/([\w\.]+)/i
- // Samsung Internet
- ],
- [t, [a, Z + " Internet"]],
- [
- /(comodo_dragon)\/([\w\.]+)/i
- // Comodo Dragon
- ],
- [[a, /_/g, " "], t],
- [
- /metasr[\/ ]?([\d\.]+)/i
- // Sogou Explorer
- ],
- [t, [a, "Sogou Explorer"]],
- [
- /(sogou)mo\w+\/([\d\.]+)/i
- // Sogou Mobile
- ],
- [[a, "Sogou Mobile"], t],
- [
- /(electron)\/([\w\.]+) safari/i,
- // Electron-based App
- /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
- // Tesla
- /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
- // QQBrowser/2345 Browser
- ],
- [a, t],
- [
- /(lbbrowser)/i,
- // LieBao Browser
- /\[(linkedin)app\]/i
- // LinkedIn App for iOS & Android
- ],
- [a],
- [
- // WebView
- /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
- // Facebook App for iOS & Android
- ],
- [[a, fi], t],
- [
- /(Klarna)\/([\w\.]+)/i,
- // Klarna Shopping Browser for iOS & Android
- /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
- // Kakao App
- /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
- // Naver InApp
- /safari (line)\/([\w\.]+)/i,
- // Line App for iOS
- /\b(line)\/([\w\.]+)\/iab/i,
- // Line App for Android
- /(alipay)client\/([\w\.]+)/i,
- // Alipay
- /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
- // Chromium/Instagram/Snapchat
- ],
- [a, t],
- [
- /\bgsa\/([\w\.]+) .*safari\//i
- // Google Search Appliance on iOS
- ],
- [t, [a, "GSA"]],
- [
- /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
- // TikTok
- ],
- [t, [a, "TikTok"]],
- [
- /headlesschrome(?:\/([\w\.]+)| )/i
- // Chrome Headless
- ],
- [t, [a, H + " Headless"]],
- [
- / wv\).+(chrome)\/([\w\.]+)/i
- // Chrome WebView
- ],
- [[a, H + " WebView"], t],
- [
- /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
- // Android Browser
- ],
- [t, [a, "Android " + T]],
- [
- /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
- // Chrome/OmniWeb/Arora/Tizen/Nokia
- ],
- [a, t],
- [
- /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
- // Mobile Safari
- ],
- [t, [a, "Mobile Safari"]],
- [
- /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
- // Safari & Safari Mobile
- ],
- [t, a],
- [
- /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
- // Safari < 3.0
- ],
- [a, [t, bi, Mi]],
- [
- /(webkit|khtml)\/([\w\.]+)/i
- ],
- [a, t],
- [
- // Gecko based
- /(navigator|netscape\d?)\/([-\w\.]+)/i
- // Netscape
- ],
- [[a, "Netscape"], t],
- [
- /mobile vr; rv:([\w\.]+)\).+firefox/i
- // Firefox Reality
- ],
- [t, [a, X + " Reality"]],
- [
- /ekiohf.+(flow)\/([\w\.]+)/i,
- // Flow
- /(swiftfox)/i,
- // Swiftfox
- /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
- // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
- /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
- // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
- /(firefox)\/([\w\.]+)/i,
- // Other Firefox-based
- /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
- // Mozilla
- // Other
- /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
- // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
- /(links) \(([\w\.]+)/i,
- // Links
- /panasonic;(viera)/i
- // Panasonic Viera
- ],
- [a, t],
- [
- /(cobalt)\/([\w\.]+)/i
- // Cobalt
- ],
- [a, [t, /master.|lts./, ""]]
- ],
- cpu: [
- [
- /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i
- // AMD64 (x64)
- ],
- [[v, "amd64"]],
- [
- /(ia32(?=;))/i
- // IA32 (quicktime)
- ],
- [[v, U]],
- [
- /((?:i[346]|x)86)[;\)]/i
- // IA32 (x86)
- ],
- [[v, "ia32"]],
- [
- /\b(aarch64|arm(v?8e?l?|_?64))\b/i
- // ARM64
- ],
- [[v, "arm64"]],
- [
- /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
- // ARMHF
- ],
- [[v, "armhf"]],
- [
- // PocketPC mistakenly identified as PowerPC
- /windows (ce|mobile); ppc;/i
- ],
- [[v, "arm"]],
- [
- /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
- // PowerPC
- ],
- [[v, /ower/, M, U]],
- [
- /(sun4\w)[;\)]/i
- // SPARC
- ],
- [[v, "sparc"]],
- [
- /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
- // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
- ],
- [[v, U]]
- ],
- device: [
- [
- //////////////////////////
- // MOBILES & TABLETS
- /////////////////////////
- // Samsung
- /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
- ],
- [e, [o, Z], [i, b]],
- [
- /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
- /samsung[- ]([-\w]+)/i,
- /sec-(sgh\w+)/i
- ],
- [e, [o, Z], [i, n]],
- [
- // Apple
- /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
- // iPod/iPhone
- ],
- [e, [o, D], [i, n]],
- [
- /\((ipad);[-\w\),; ]+apple/i,
- // iPad
- /applecoremedia\/[\w\.]+ \((ipad)/i,
- /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
- ],
- [e, [o, D], [i, b]],
- [
- /(macintosh);/i
- ],
- [e, [o, D]],
- [
- // Sharp
- /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
- ],
- [e, [o, hi], [i, n]],
- [
- // Huawei
- /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
- ],
- [e, [o, ui], [i, b]],
- [
- /(?:huawei|honor)([-\w ]+)[;\)]/i,
- /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
- ],
- [e, [o, ui], [i, n]],
- [
- // Xiaomi
- /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
- // Xiaomi POCO
- /\b; (\w+) build\/hm\1/i,
- // Xiaomi Hongmi 'numeric' models
- /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
- // Xiaomi Hongmi
- /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
- // Xiaomi Redmi
- /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
- // Xiaomi Redmi 'numeric' models
- /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
- // Xiaomi Mi
- ],
- [[e, /_/g, " "], [o, ri], [i, n]],
- [
- /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
- // Redmi Pad
- /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
- // Mi Pad tablets
- ],
- [[e, /_/g, " "], [o, ri], [i, b]],
- [
- // OPPO
- /; (\w+) bui.+ oppo/i,
- /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
- ],
- [e, [o, "OPPO"], [i, n]],
- [
- // Vivo
- /vivo (\w+)(?: bui|\))/i,
- /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
- ],
- [e, [o, "Vivo"], [i, n]],
- [
- // Realme
- /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
- ],
- [e, [o, "Realme"], [i, n]],
- [
- // Motorola
- /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
- /\bmot(?:orola)?[- ](\w*)/i,
- /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
- ],
- [e, [o, pi], [i, n]],
- [
- /\b(mz60\d|xoom[2 ]{0,2}) build\//i
- ],
- [e, [o, pi], [i, b]],
- [
- // LG
- /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
- ],
- [e, [o, ai], [i, b]],
- [
- /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
- /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
- /\blg-?([\d\w]+) bui/i
- ],
- [e, [o, ai], [i, n]],
- [
- // Lenovo
- /(ideatab[-\w ]+)/i,
- /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
- ],
- [e, [o, "Lenovo"], [i, b]],
- [
- // Nokia
- /(?:maemo|nokia).*(n900|lumia \d+)/i,
- /nokia[-_ ]?([-\w\.]*)/i
- ],
- [[e, /_/g, " "], [o, "Nokia"], [i, n]],
- [
- // Google
- /(pixel c)\b/i
- // Google Pixel C
- ],
- [e, [o, Y], [i, b]],
- [
- /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
- // Google Pixel
- ],
- [e, [o, Y], [i, n]],
- [
- // Sony
- /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
- ],
- [e, [o, J], [i, n]],
- [
- /sony tablet [ps]/i,
- /\b(?:sony)?sgp\w+(?: bui|\))/i
- ],
- [[e, "Xperia Tablet"], [o, J], [i, b]],
- [
- // OnePlus
- / (kb2005|in20[12]5|be20[12][59])\b/i,
- /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
- ],
- [e, [o, "OnePlus"], [i, n]],
- [
- // Amazon
- /(alexa)webm/i,
- /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
- // Kindle Fire without Silk / Echo Show
- /(kf[a-z]+)( bui|\)).+silk\//i
- // Kindle Fire HD
- ],
- [e, [o, G], [i, b]],
- [
- /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
- // Fire Phone
- ],
- [[e, /(.+)/g, "Fire Phone $1"], [o, G], [i, n]],
- [
- // BlackBerry
- /(playbook);[-\w\),; ]+(rim)/i
- // BlackBerry PlayBook
- ],
- [e, o, [i, b]],
- [
- /\b((?:bb[a-f]|st[hv])100-\d)/i,
- /\(bb10; (\w+)/i
- // BlackBerry 10
- ],
- [e, [o, mi], [i, n]],
- [
- // Asus
- /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
- ],
- [e, [o, di], [i, b]],
- [
- / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
- ],
- [e, [o, di], [i, n]],
- [
- // HTC
- /(nexus 9)/i
- // HTC Nexus 9
- ],
- [e, [o, "HTC"], [i, b]],
- [
- /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
- // HTC
- // ZTE
- /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
- /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
- // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
- ],
- [o, [e, /_/g, " "], [i, n]],
- [
- // Acer
- /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
- ],
- [e, [o, "Acer"], [i, b]],
- [
- // Meizu
- /droid.+; (m[1-5] note) bui/i,
- /\bmz-([-\w]{2,})/i
- ],
- [e, [o, "Meizu"], [i, n]],
- [
- // Ulefone
- /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
- ],
- [e, [o, "Ulefone"], [i, n]],
- [
- // MIXED
- /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
- // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
- /(hp) ([\w ]+\w)/i,
- // HP iPAQ
- /(asus)-?(\w+)/i,
- // Asus
- /(microsoft); (lumia[\w ]+)/i,
- // Microsoft Lumia
- /(lenovo)[-_ ]?([-\w]+)/i,
- // Lenovo
- /(jolla)/i,
- // Jolla
- /(oppo) ?([\w ]+) bui/i
- // OPPO
- ],
- [o, e, [i, n]],
- [
- /(kobo)\s(ereader|touch)/i,
- // Kobo
- /(archos) (gamepad2?)/i,
- // Archos
- /(hp).+(touchpad(?!.+tablet)|tablet)/i,
- // HP TouchPad
- /(kindle)\/([\w\.]+)/i,
- // Kindle
- /(nook)[\w ]+build\/(\w+)/i,
- // Nook
- /(dell) (strea[kpr\d ]*[\dko])/i,
- // Dell Streak
- /(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
- // Le Pan Tablets
- /(trinity)[- ]*(t\d{3}) bui/i,
- // Trinity Tablets
- /(gigaset)[- ]+(q\w{1,9}) bui/i,
- // Gigaset Tablets
- /(vodafone) ([\w ]+)(?:\)| bui)/i
- // Vodafone
- ],
- [o, e, [i, b]],
- [
- /(surface duo)/i
- // Surface Duo
- ],
- [e, [o, ti], [i, b]],
- [
- /droid [\d\.]+; (fp\du?)(?: b|\))/i
- // Fairphone
- ],
- [e, [o, "Fairphone"], [i, n]],
- [
- /(u304aa)/i
- // AT&T
- ],
- [e, [o, "AT&T"], [i, n]],
- [
- /\bsie-(\w*)/i
- // Siemens
- ],
- [e, [o, "Siemens"], [i, n]],
- [
- /\b(rct\w+) b/i
- // RCA Tablets
- ],
- [e, [o, "RCA"], [i, b]],
- [
- /\b(venue[\d ]{2,7}) b/i
- // Dell Venue Tablets
- ],
- [e, [o, "Dell"], [i, b]],
- [
- /\b(q(?:mv|ta)\w+) b/i
- // Verizon Tablet
- ],
- [e, [o, "Verizon"], [i, b]],
- [
- /\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
- // Barnes & Noble Tablet
- ],
- [e, [o, "Barnes & Noble"], [i, b]],
- [
- /\b(tm\d{3}\w+) b/i
- ],
- [e, [o, "NuVision"], [i, b]],
- [
- /\b(k88) b/i
- // ZTE K Series Tablet
- ],
- [e, [o, "ZTE"], [i, b]],
- [
- /\b(nx\d{3}j) b/i
- // ZTE Nubia
- ],
- [e, [o, "ZTE"], [i, n]],
- [
- /\b(gen\d{3}) b.+49h/i
- // Swiss GEN Mobile
- ],
- [e, [o, "Swiss"], [i, n]],
- [
- /\b(zur\d{3}) b/i
- // Swiss ZUR Tablet
- ],
- [e, [o, "Swiss"], [i, b]],
- [
- /\b((zeki)?tb.*\b) b/i
- // Zeki Tablets
- ],
- [e, [o, "Zeki"], [i, b]],
- [
- /\b([yr]\d{2}) b/i,
- /\b(dragon[- ]+touch |dt)(\w{5}) b/i
- // Dragon Touch Tablet
- ],
- [[o, "Dragon Touch"], e, [i, b]],
- [
- /\b(ns-?\w{0,9}) b/i
- // Insignia Tablets
- ],
- [e, [o, "Insignia"], [i, b]],
- [
- /\b((nxa|next)-?\w{0,9}) b/i
- // NextBook Tablets
- ],
- [e, [o, "NextBook"], [i, b]],
- [
- /\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
- // Voice Xtreme Phones
- ],
- [[o, "Voice"], e, [i, n]],
- [
- /\b(lvtel\-)?(v1[12]) b/i
- // LvTel Phones
- ],
- [[o, "LvTel"], e, [i, n]],
- [
- /\b(ph-1) /i
- // Essential PH-1
- ],
- [e, [o, "Essential"], [i, n]],
- [
- /\b(v(100md|700na|7011|917g).*\b) b/i
- // Envizen Tablets
- ],
- [e, [o, "Envizen"], [i, b]],
- [
- /\b(trio[-\w\. ]+) b/i
- // MachSpeed Tablets
- ],
- [e, [o, "MachSpeed"], [i, b]],
- [
- /\btu_(1491) b/i
- // Rotor Tablets
- ],
- [e, [o, "Rotor"], [i, b]],
- [
- /(shield[\w ]+) b/i
- // Nvidia Shield Tablets
- ],
- [e, [o, "Nvidia"], [i, b]],
- [
- /(sprint) (\w+)/i
- // Sprint Phones
- ],
- [o, e, [i, n]],
- [
- /(kin\.[onetw]{3})/i
- // Microsoft Kin
- ],
- [[e, /\./g, " "], [o, ti], [i, n]],
- [
- /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
- // Zebra
- ],
- [e, [o, si], [i, b]],
- [
- /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
- ],
- [e, [o, si], [i, n]],
- [
- ///////////////////
- // SMARTTVS
- ///////////////////
- /smart-tv.+(samsung)/i
- // Samsung
- ],
- [o, [i, h]],
- [
- /hbbtv.+maple;(\d+)/i
- ],
- [[e, /^/, "SmartTV"], [o, Z], [i, h]],
- [
- /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
- // LG SmartTV
- ],
- [[o, ai], [i, h]],
- [
- /(apple) ?tv/i
- // Apple TV
- ],
- [o, [e, D + " TV"], [i, h]],
- [
- /crkey/i
- // Google Chromecast
- ],
- [[e, H + "cast"], [o, Y], [i, h]],
- [
- /droid.+aft(\w+)( bui|\))/i
- // Fire TV
- ],
- [e, [o, G], [i, h]],
- [
- /\(dtv[\);].+(aquos)/i,
- /(aquos-tv[\w ]+)\)/i
- // Sharp
- ],
- [e, [o, hi], [i, h]],
- [
- /(bravia[\w ]+)( bui|\))/i
- // Sony
- ],
- [e, [o, J], [i, h]],
- [
- /(mitv-\w{5}) bui/i
- // Xiaomi
- ],
- [e, [o, ri], [i, h]],
- [
- /Hbbtv.*(technisat) (.*);/i
- // TechniSAT
- ],
- [o, e, [i, h]],
- [
- /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
- // Roku
- /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
- // HbbTV devices
- ],
- [[o, ni], [e, ni], [i, h]],
- [
- /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
- // SmartTV from Unidentified Vendors
- ],
- [[i, h]],
- [
- ///////////////////
- // CONSOLES
- ///////////////////
- /(ouya)/i,
- // Ouya
- /(nintendo) ([wids3utch]+)/i
- // Nintendo
- ],
- [o, e, [i, B]],
- [
- /droid.+; (shield) bui/i
- // Nvidia
- ],
- [e, [o, "Nvidia"], [i, B]],
- [
- /(playstation [345portablevi]+)/i
- // Playstation
- ],
- [e, [o, J], [i, B]],
- [
- /\b(xbox(?: one)?(?!; xbox))[\); ]/i
- // Microsoft Xbox
- ],
- [e, [o, ti], [i, B]],
- [
- ///////////////////
- // WEARABLES
- ///////////////////
- /((pebble))app/i
- // Pebble
- ],
- [o, e, [i, N]],
- [
- /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
- // Apple Watch
- ],
- [e, [o, D], [i, N]],
- [
- /droid.+; (glass) \d/i
- // Google Glass
- ],
- [e, [o, Y], [i, N]],
- [
- /droid.+; (wt63?0{2,3})\)/i
- ],
- [e, [o, si], [i, N]],
- [
- /(quest( 2| pro)?)/i
- // Oculus Quest
- ],
- [e, [o, fi], [i, N]],
- [
- ///////////////////
- // EMBEDDED
- ///////////////////
- /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
- // Tesla
- ],
- [o, [i, ei]],
- [
- /(aeobc)\b/i
- // Echo Dot
- ],
- [e, [o, G], [i, ei]],
- [
- ////////////////////
- // MIXED (GENERIC)
- ///////////////////
- /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
- // Android Phones from Unidentified Vendors
- ],
- [e, [i, n]],
- [
- /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
- // Android Tablets from Unidentified Vendors
- ],
- [e, [i, b]],
- [
- /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
- // Unidentifiable Tablet
- ],
- [[i, b]],
- [
- /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
- // Unidentifiable Mobile
- ],
- [[i, n]],
- [
- /(android[-\w\. ]{0,9});.+buil/i
- // Generic Android Device
- ],
- [e, [o, "Generic"]]
- ],
- engine: [
- [
- /windows.+ edge\/([\w\.]+)/i
- // EdgeHTML
- ],
- [t, [a, yi + "HTML"]],
- [
- /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
- // Blink
- ],
- [t, [a, "Blink"]],
- [
- /(presto)\/([\w\.]+)/i,
- // Presto
- /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
- // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
- /ekioh(flow)\/([\w\.]+)/i,
- // Flow
- /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
- // KHTML/Tasman/Links
- /(icab)[\/ ]([23]\.[\d\.]+)/i,
- // iCab
- /\b(libweb)/i
- ],
- [a, t],
- [
- /rv\:([\w\.]{1,9})\b.+(gecko)/i
- // Gecko
- ],
- [t, a]
- ],
- os: [
- [
- // Windows
- /microsoft (windows) (vista|xp)/i
- // Windows (iTunes)
- ],
- [a, t],
- [
- /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
- // Windows Phone
- ],
- [a, [t, bi, Oi]],
- [
- /windows nt 6\.2; (arm)/i,
- // Windows RT
- /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
- /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
- ],
- [[t, bi, Oi], [a, "Windows"]],
- [
- // iOS/macOS
- /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
- // iOS
- /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
- /cfnetwork\/.+darwin/i
- ],
- [[t, /_/g, "."], [a, "iOS"]],
- [
- /(mac os x) ?([\w\. ]*)/i,
- /(macintosh|mac_powerpc\b)(?!.+haiku)/i
- // Mac OS
- ],
- [[a, gi], [t, /_/g, "."]],
- [
- // Mobile OSes
- /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
- // Android-x86/HarmonyOS
- ],
- [t, a],
- [
- // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
- /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
- /(blackberry)\w*\/([\w\.]*)/i,
- // Blackberry
- /(tizen|kaios)[\/ ]([\w\.]+)/i,
- // Tizen/KaiOS
- /\((series40);/i
- // Series 40
- ],
- [a, t],
- [
- /\(bb(10);/i
- // BlackBerry 10
- ],
- [t, [a, mi]],
- [
- /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
- // Symbian
- ],
- [t, [a, "Symbian"]],
- [
- /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
- // Firefox OS
- ],
- [t, [a, X + " OS"]],
- [
- /web0s;.+rt(tv)/i,
- /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
- // WebOS
- ],
- [t, [a, "webOS"]],
- [
- /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
- // watchOS
- ],
- [t, [a, "watchOS"]],
- [
- // Google Chromecast
- /crkey\/([\d\.]+)/i
- // Google Chromecast
- ],
- [t, [a, H + "cast"]],
- [
- /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
- // Chromium OS
- ],
- [[a, vi], t],
- [
- // Smart TVs
- /panasonic;(viera)/i,
- // Panasonic Viera
- /(netrange)mmh/i,
- // Netrange
- /(nettv)\/(\d+\.[\w\.]+)/i,
- // NetTV
- // Console
- /(nintendo|playstation) ([wids345portablevuch]+)/i,
- // Nintendo/Playstation
- /(xbox); +xbox ([^\);]+)/i,
- // Microsoft Xbox (360, One, X, S, Series X, Series S)
- // Other
- /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
- // Joli/Palm
- /(mint)[\/\(\) ]?(\w*)/i,
- // Mint
- /(mageia|vectorlinux)[; ]/i,
- // Mageia/VectorLinux
- /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
- // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
- /(hurd|linux) ?([\w\.]*)/i,
- // Hurd/Linux
- /(gnu) ?([\w\.]*)/i,
- // GNU
- /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
- // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
- /(haiku) (\w+)/i
- // Haiku
- ],
- [a, t],
- [
- /(sunos) ?([\w\.\d]*)/i
- // Solaris
- ],
- [[a, "Solaris"], t],
- [
- /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
- // Solaris
- /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
- // AIX
- /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
- // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
- /(unix) ?([\w\.]*)/i
- // UNIX
- ],
- [a, t]
- ]
- }, g = function(c, l) {
- if (typeof c === ii && (l = c, c = m), !(this instanceof g))
- return new g(c, l).getResult();
- var s = typeof A !== V && A.navigator ? A.navigator : m, d = c || (s && s.userAgent ? s.userAgent : M), y = s && s.userAgentData ? s.userAgentData : m, O = l ? Ti(ki, l) : ki, w = s && s.userAgent == d;
- return this.getBrowser = function() {
- var r = {};
- return r[a] = m, r[t] = m, L.call(r, d, O.browser), r[li] = _i(r[t]), w && s && s.brave && typeof s.brave.isBrave == R && (r[a] = "Brave"), r;
- }, this.getCPU = function() {
- var r = {};
- return r[v] = m, L.call(r, d, O.cpu), r;
- }, this.getDevice = function() {
- var r = {};
- return r[o] = m, r[e] = m, r[i] = m, L.call(r, d, O.device), w && !r[i] && y && y.mobile && (r[i] = n), w && r[e] == "Macintosh" && s && typeof s.standalone !== V && s.maxTouchPoints && s.maxTouchPoints > 2 && (r[e] = "iPad", r[i] = b), r;
- }, this.getEngine = function() {
- var r = {};
- return r[a] = m, r[t] = m, L.call(r, d, O.engine), r;
- }, this.getOS = function() {
- var r = {};
- return r[a] = m, r[t] = m, L.call(r, d, O.os), w && !r[a] && y && y.platform != "Unknown" && (r[a] = y.platform.replace(/chrome os/i, vi).replace(/macos/i, gi)), r;
- }, this.getResult = function() {
- return {
- ua: this.getUA(),
- browser: this.getBrowser(),
- engine: this.getEngine(),
- os: this.getOS(),
- device: this.getDevice(),
- cpu: this.getCPU()
- };
- }, this.getUA = function() {
- return d;
- }, this.setUA = function(r) {
- return d = typeof r === j && r.length > oi ? ni(r, oi) : r, this;
- }, this.setUA(d), this;
- };
- g.VERSION = F, g.BROWSER = Q([a, t, li]), g.CPU = Q([v]), g.DEVICE = Q([e, o, i, B, n, h, b, N, ei]), g.ENGINE = g.OS = Q([a, t]), E.exports && (q = E.exports = g), q.UAParser = g;
- var C = typeof A !== V && (A.jQuery || A.Zepto);
- if (C && !C.ua) {
- var $ = new g();
- C.ua = $.getResult(), C.ua.get = function() {
- return $.getUA();
- }, C.ua.set = function(c) {
- $.setUA(c);
- var l = $.getResult();
- for (var s in l)
- C.ua[s] = l[s];
- };
- }
- })(typeof window == "object" ? window : Ni);
-})(wi, wi.exports);
-var Pi = wi.exports;
-const Bi = /* @__PURE__ */ Ci(Pi), S = {
- CONSOLE: "console",
- DESKTOP: void 0,
- EMBEDDED: "embedded",
- MOBILE: "mobile",
- SMART_TV: "smarttv",
- TABLET: "tablet",
- WEARABLE: "wearable"
-}, _ = {
- ANDROID: "Android",
- IOS: "iOS",
- LINUX: "Linux",
- MAC_OS: "Mac OS",
- WINDOWS_PHONE: "Windows Phone",
- WINDOWS: "Windows"
-}, p = {
- CHROME: "Chrome",
- CHROMIUM: "Chromium",
- EDGE: "Edge",
- FIREFOX: "Firefox",
- IE: "IE",
- INTERNET_EXPLORER: "Internet Explorer",
- MIUI: "MIUI Browser",
- MOBILE_SAFARI: "Mobile Safari",
- OPERA: "Opera",
- SAFARI: "Safari",
- SAMSUNG_BROWSER: "Samsung Browser",
- YANDEX: "Yandex"
-}, z = new Bi(), f = z.getDevice(), x = z.getOS(), u = z.getBrowser();
-z.getEngine();
-const P = z.getUA(), W = () => /iPad/.test(P), Ai = () => x.name === _.WINDOWS && x.version === "10" && P.indexOf("Edg/") !== -1;
-x.name === _.ANDROID;
-u.name === p.CHROME;
-u.name === p.CHROMIUM;
-f.type === S.CONSOLE;
-f.type === S.DESKTOP;
-u.name === p.EDGE || Ai();
-Ai();
-u.name === p.EDGE;
-/electron/.test(P.toLowerCase());
-f.type === S.EMBEDDED;
-u.name === p.FIREFOX;
-u.name === p.INTERNET_EXPLORER || u.name === p.IE;
-x.name === _.IOS || W();
-x.name === _.LINUX;
-x.name === _.MAC_OS;
-u.name === p.MIUI;
-f.type === S.MOBILE || f.type === S.TABLET || W();
-f.type === S.MOBILE;
-u.name === p.MOBILE_SAFARI || W();
-u.name === p.OPERA;
-u.name === p.SAFARI || u.name === p.MOBILE_SAFARI;
-u.name === p.SAMSUNG_BROWSER;
-f.type === S.SMART_TV;
-f.type === S.TABLET || W();
-f.type === S.WEARABLE;
-x.name === _.WINDOWS;
-x.name === _.WINDOWS_PHONE;
-u.name === p.YANDEX;
-const fe = () => f.model, ve = () => f.type || "desktop", ge = () => f.vendor;
-const _hoisted_1$1 = { class: "server-overview" };
-const _hoisted_2$1 = { class: "grid" };
-const _hoisted_3$1 = { class: "mcrm-block block__light grid gap-4" };
-const _hoisted_4$1 = { class: "text-lg flex gap-4 items-center justify-between" };
-const _hoisted_5 = { class: "flex gap-4" };
-const _hoisted_6 = { class: "grid gap-2" };
-const _hoisted_7 = {
- key: 0,
- class: "grid grid-cols-[2rem_1fr] gap-2"
-};
-const _hoisted_8 = { class: "grid gap-4 w-64" };
-const _sfc_main$1 = {
- __name: "RemoteView",
- setup(__props) {
- const device = useDeviceStore();
- const linkPinDialog = ref();
- const server = reactive({
- host: "",
- status: false,
- link: false,
- inputPin: "",
- encryptedKey: "",
- key: ""
- });
- onMounted(async () => {
- server.host = window.location.host;
- });
- onUpdated(() => {
- if (!server.status) checkServerStatus();
- });
- async function checkServerStatus(request = true) {
- const status = await device.remoteCheckServerAccess();
- server.status = status;
- if (status === "unlinked" || status === "unauthorized") {
- if (request) requestAccess();
- return true;
- }
- if (!device.key()) {
- server.status = "unauthorized";
- return true;
- }
- const handshake = await device.remoteHandshake(device.key());
- if (handshake) server.key = device.key();
- else {
- device.removeDeviceKey();
- server.status = "unlinked";
- if (request) requestAccess();
- }
- return true;
- }
- function requestAccess() {
- let deviceName = `${ge() ? ge() : "Unknown"} ${ge() ? fe() : ve()}`;
- device.remoteRequestServerAccess(deviceName, ve()).then((data) => {
- if (data.data) server.status = data.data, pingLink();
- });
- }
- function pingLink() {
- server.link = "checking";
- device.remotePingLink((encryptedKey) => {
- server.link = true;
- server.encryptedKey = encryptedKey;
- linkPinDialog.value.toggleDialog(true);
- });
- }
- async function decryptKey() {
- const decryptedKey = decryptAES(server.inputPin, server.encryptedKey);
- const handshake = await device.remoteHandshake(decryptedKey);
- if (handshake) {
- device.setDeviceKey(decryptedKey);
- server.key = decryptedKey;
- linkPinDialog.value.toggleDialog(false);
- server.status = "authorized";
- }
- }
- function disonnectFromServer() {
- axios.post(appUrl() + "/device/link/remove", AuthCall({ uuid: device.uuid() })).then((data) => {
- if (data.data) checkServerStatus(false);
- });
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
- createVNode(AlertComp, { type: "info" }, {
- default: withCtx(() => [
- createBaseVNode("div", _hoisted_2$1, [
- _cache[6] || (_cache[6] = createBaseVNode("strong", null, "This is a remote device.", -1)),
- createBaseVNode("em", null, "UUID: " + toDisplayString(unref(device).uuid()), 1)
- ])
- ]),
- _: 1
- }),
- createBaseVNode("div", _hoisted_3$1, [
- createBaseVNode("h4", _hoisted_4$1, [
- createBaseVNode("span", _hoisted_5, [
- createVNode(unref(IconServer)),
- _cache[7] || (_cache[7] = createTextVNode("Server"))
- ]),
- createVNode(_sfc_main$4, {
- variant: "primary",
- onClick: _cache[0] || (_cache[0] = ($event) => checkServerStatus())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconReload))
- ]),
- _: 1
- })
- ]),
- createBaseVNode("p", null, [
- _cache[8] || (_cache[8] = createTextVNode(" Connected to: ")),
- createBaseVNode("strong", null, toDisplayString(server.host), 1)
- ]),
- server.status === "authorized" ? (openBlock(), createBlock(AlertComp, {
- key: 0,
- type: "success"
- }, {
- default: withCtx(() => _cache[9] || (_cache[9] = [
- createTextVNode("Authorized")
- ])),
- _: 1
- })) : createCommentVNode("", true),
- server.status === "unlinked" ? (openBlock(), createBlock(AlertComp, {
- key: 1,
- type: "warning"
- }, {
- default: withCtx(() => _cache[10] || (_cache[10] = [
- createTextVNode("Not linked")
- ])),
- _: 1
- })) : createCommentVNode("", true),
- server.status === "unauthorized" ? (openBlock(), createBlock(AlertComp, {
- key: 2,
- type: "info"
- }, {
- default: withCtx(() => [
- createBaseVNode("div", _hoisted_6, [
- _cache[13] || (_cache[13] = createBaseVNode("strong", null, "Access requested", -1)),
- _cache[14] || (_cache[14] = createBaseVNode("p", null, [
- createTextVNode(" Navigate to "),
- createBaseVNode("em", { class: "font-semibold" }, "http://localhost:6970/devices"),
- createTextVNode(" on your pc to authorize. ")
- ], -1)),
- server.link == "checking" ? (openBlock(), createElementBlock("div", _hoisted_7, [
- createVNode(unref(IconReload), { class: "animate-spin" }),
- _cache[11] || (_cache[11] = createTextVNode(" Checking server for link... "))
- ])) : createCommentVNode("", true),
- server.link === false ? (openBlock(), createBlock(_sfc_main$4, {
- key: 1,
- variant: "subtle",
- onClick: _cache[1] || (_cache[1] = ($event) => pingLink()),
- class: "w-fit"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconReload)),
- _cache[12] || (_cache[12] = createTextVNode("Check for server link "))
- ]),
- _: 1
- })) : createCommentVNode("", true)
- ])
- ]),
- _: 1
- })) : createCommentVNode("", true),
- server.status === "unauthorized" ? (openBlock(), createBlock(_sfc_main$4, {
- key: 3,
- variant: "primary",
- onClick: _cache[2] || (_cache[2] = ($event) => requestAccess())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconKey)),
- _cache[15] || (_cache[15] = createTextVNode(" Request access "))
- ]),
- _: 1
- })) : createCommentVNode("", true),
- server.status === "authorized" ? (openBlock(), createBlock(_sfc_main$4, {
- key: 4,
- variant: "danger",
- onClick: _cache[3] || (_cache[3] = ($event) => disonnectFromServer())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPlugConnectedX)),
- _cache[16] || (_cache[16] = createTextVNode(" Disconnect "))
- ]),
- _: 1
- })) : createCommentVNode("", true)
- ]),
- createVNode(_sfc_main$5, {
- ref_key: "linkPinDialog",
- ref: linkPinDialog
- }, {
- content: withCtx(() => [
- createBaseVNode("div", _hoisted_8, [
- _cache[18] || (_cache[18] = createBaseVNode("h3", null, "Server link pin:", -1)),
- createBaseVNode("form", {
- class: "grid gap-4",
- onSubmit: _cache[5] || (_cache[5] = withModifiers(($event) => decryptKey(), ["prevent"]))
- }, [
- withDirectives(createBaseVNode("input", {
- class: "input",
- id: "input-pin",
- type: "text",
- pattern: "[0-9]{4}",
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => server.inputPin = $event)
- }, null, 512), [
- [vModelText, server.inputPin]
- ]),
- createVNode(_sfc_main$4, { variant: "primary" }, {
- default: withCtx(() => _cache[17] || (_cache[17] = [
- createTextVNode("Enter")
- ])),
- _: 1
- })
- ], 32)
- ])
- ]),
- _: 1
- }, 512)
- ]);
- };
- }
-};
-const RemoteView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3109048f"]]);
-const _hoisted_1 = {
- id: "devices-view",
- class: "panel"
-};
-const _hoisted_2 = { class: "panel__title" };
-const _hoisted_3 = { class: "text-sm" };
-const _hoisted_4 = { class: "panel__content grid gap-8" };
-const _sfc_main = {
- __name: "DevicesView",
- setup(__props) {
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1, [
- createBaseVNode("h1", _hoisted_2, [
- _cache[0] || (_cache[0] = createTextVNode(" Devices ")),
- createBaseVNode("span", _hoisted_3, toDisplayString(unref(isLocal)() ? "remote" : "servers"), 1)
- ]),
- createBaseVNode("div", _hoisted_4, [
- unref(isLocal)() ? (openBlock(), createBlock(ServerView, { key: 0 })) : (openBlock(), createBlock(RemoteView, { key: 1 }))
- ])
- ]);
- };
- }
-};
-const DevicesView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-97929e31"]]);
-export {
- DevicesView as default
-};
diff --git a/public/assets/DevicesView-Dw_Mls3X.css b/public/assets/DevicesView-Dw_Mls3X.css
deleted file mode 100644
index 4735417..0000000
--- a/public/assets/DevicesView-Dw_Mls3X.css
+++ /dev/null
@@ -1,87 +0,0 @@
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.alert[data-v-87f6de25] {
- align-items: flex-start;
- gap: calc(var(--spacing, .25rem) * 4);
- border-radius: var(--radius-md, .375rem);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
- background-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
- padding: calc(var(--spacing, .25rem) * 4);
- --tw-backdrop-blur: blur(var(--blur-md, 12px));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- grid-template-columns: 1rem 1fr;
- display: grid;
-}
-.alert.alert__info[data-v-87f6de25] {
- background-color: color-mix(in oklab, var(--color-sky-400, oklch(.746 .16 232.661)) 40%, transparent);
- color: var(--color-sky-100, oklch(.951 .026 236.824));
-}
-.alert.alert__success[data-v-87f6de25] {
- background-color: color-mix(in oklab, var(--color-lime-400, oklch(.841 .238 128.85)) 10%, transparent);
- color: var(--color-lime-400, oklch(.841 .238 128.85));
-}
-.alert.alert__warning[data-v-87f6de25] {
- background-color: color-mix(in oklab, var(--color-amber-400, oklch(.828 .189 84.429)) 10%, transparent);
- color: var(--color-amber-400, oklch(.828 .189 84.429));
-}
-.alert.alert__error[data-v-87f6de25] {
- background-color: color-mix(in oklab, var(--color-rose-400, oklch(.712 .194 13.428)) 10%, transparent);
- color: var(--color-rose-400, oklch(.712 .194 13.428));
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-backdrop-blur {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-brightness {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-contrast {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-grayscale {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-hue-rotate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-invert {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-opacity {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-saturate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-sepia {
- syntax: "*";
- inherits: false
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.device-overview[data-v-f4165abd] {
- align-content: flex-start;
- gap: calc(var(--spacing, .25rem) * 4);
- display: grid;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.server-overview[data-v-3109048f] {
- align-content: flex-start;
- gap: calc(var(--spacing, .25rem) * 4);
- display: grid;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-
diff --git a/public/assets/DialogComp-Ba5-BUTe.js b/public/assets/DialogComp-Ba5-BUTe.js
deleted file mode 100644
index 70496d5..0000000
--- a/public/assets/DialogComp-Ba5-BUTe.js
+++ /dev/null
@@ -1,106 +0,0 @@
-import { D as computed, c as createElementBlock, o as openBlock, v as renderSlot, q as normalizeClass, m as ref, b as onMounted, n as onUpdated, f as createBaseVNode, h as createVNode, w as withCtx, u as unref, E as IconX } from "./index-GNAKlyBz.js";
-const _hoisted_1$1 = ["href"];
-const _sfc_main$1 = {
- __name: "ButtonComp",
- props: {
- href: String,
- variant: String,
- size: String
- },
- setup(__props) {
- const props = __props;
- const classString = computed(() => {
- let classes = "btn";
- if (props.variant) classes += ` btn__${props.variant}`;
- if (props.size) classes += ` btn__${props.size}`;
- return classes;
- });
- return (_ctx, _cache) => {
- return __props.href ? (openBlock(), createElementBlock("a", {
- key: 0,
- href: __props.href,
- class: normalizeClass(classString.value)
- }, [
- renderSlot(_ctx.$slots, "default")
- ], 10, _hoisted_1$1)) : (openBlock(), createElementBlock("button", {
- key: 1,
- class: normalizeClass(classString.value)
- }, [
- renderSlot(_ctx.$slots, "default")
- ], 2));
- };
- }
-};
-const _hoisted_1 = { class: "dialog-container" };
-const _sfc_main = {
- __name: "DialogComp",
- props: {
- open: Boolean
- },
- emits: ["onOpen", "onClose", "onToggle"],
- setup(__props, { expose: __expose, emit: __emit }) {
- const dialog = ref(null);
- const openDialog = ref();
- const emit = __emit;
- __expose({ toggleDialog });
- const props = __props;
- onMounted(() => {
- if (props.open === true) toggleDialog(props.open);
- });
- onUpdated(() => {
- if (props.open === true) toggleDialog(props.open);
- });
- function toggleDialog(openToggle) {
- if (openToggle) {
- dialog.value.showModal();
- emit("onOpen");
- } else {
- dialog.value.close();
- emit("onClose");
- }
- openDialog.value = openToggle;
- emit("onToggle");
- }
- onMounted(() => {
- openDialog.value = props.open;
- if (dialog.value.innerHTML.includes("form")) {
- dialog.value.querySelector("form").addEventListener("submit", () => {
- toggleDialog();
- });
- }
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1, [
- createBaseVNode("div", {
- class: "trigger",
- onClick: _cache[0] || (_cache[0] = ($event) => toggleDialog(true))
- }, [
- renderSlot(_ctx.$slots, "trigger")
- ]),
- createBaseVNode("dialog", {
- ref_key: "dialog",
- ref: dialog,
- class: "mcrm-block block__dark"
- }, [
- createVNode(_sfc_main$1, {
- class: "dialog__close p-0",
- variant: "ghost",
- size: "sm",
- tabindex: "-1",
- onClick: _cache[1] || (_cache[1] = ($event) => toggleDialog(false))
- }, {
- default: withCtx(() => [
- createVNode(unref(IconX))
- ]),
- _: 1
- }),
- renderSlot(_ctx.$slots, "content")
- ], 512)
- ]);
- };
- }
-};
-export {
- _sfc_main$1 as _,
- _sfc_main as a
-};
diff --git a/public/assets/DialogComp-ByJn29_w.css b/public/assets/DialogComp-ByJn29_w.css
deleted file mode 100644
index a8db749..0000000
--- a/public/assets/DialogComp-ByJn29_w.css
+++ /dev/null
@@ -1,357 +0,0 @@
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-button, .btn {
- cursor: pointer;
- align-items: center;
- gap: calc(var(--spacing, .25rem) * 3);
- border-radius: var(--radius-lg, .5rem);
- border-style: var(--tw-border-style);
- --tw-border-style: solid;
- height: fit-content;
- padding-inline: calc(var(--spacing, .25rem) * 4);
- padding-block: calc(var(--spacing, .25rem) * 2);
- --tw-font-weight: var(--font-weight-normal, 400);
- font-weight: var(--font-weight-normal, 400);
- --tw-tracking: var(--tracking-wide, .025em);
- letter-spacing: var(--tracking-wide, .025em);
- transition-property: all;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- border-style: solid;
- border-width: 1px;
- transition: border-color .1s ease-in-out, background-color .2s;
- display: flex;
-}
-:is(button, .btn):not(.button__subtle, .button__ghost):hover {
- --tw-shadow-color: var(--color-black, #000);
-}
-:is(button, .btn)[disabled], :is(button, .btn).disabled {
- pointer-events: none;
- cursor: not-allowed;
- opacity: .5;
-}
-:is(button, .btn) svg {
- width: calc(var(--spacing, .25rem) * 5);
- height: calc(var(--spacing, .25rem) * 5);
- transition-property: stroke;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- --tw-duration: .4s;
- --tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
- transition-duration: .4s;
- transition-timing-function: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
-}
-:is(button, .btn).btn__sm svg {
- width: calc(var(--spacing, .25rem) * 4);
- height: calc(var(--spacing, .25rem) * 4);
-}
-:is(button, .btn).btn__lg svg {
- width: calc(var(--spacing, .25rem) * 6);
- height: calc(var(--spacing, .25rem) * 6);
-}
-:is(button, .btn):hover {
- color: var(--color-white, #fff) !important;
-}
-:is(button, .btn):hover svg {
- stroke: var(--color-white, #fff) !important;
-}
-:is(button, .btn).btn__primary {
- border-color: var(--color-sky-100, oklch(.951 .026 236.824));
- background-color: color-mix(in oklab, var(--color-sky-100, oklch(.951 .026 236.824)) 10%, transparent);
- color: var(--color-sky-100, oklch(.951 .026 236.824));
-}
-:is(button, .btn).btn__primary svg {
- stroke: var(--color-sky-200, oklch(.901 .058 230.902));
-}
-:is(button, .btn).btn__primary:hover {
- border-color: var(--color-sky-300, oklch(.828 .111 230.318));
- background-color: color-mix(in oklab, var(--color-sky-400, oklch(.746 .16 232.661)) 40%, transparent);
-}
-:is(button, .btn).btn__secondary {
- border-color: var(--color-amber-100, oklch(.962 .059 95.617));
- background-color: color-mix(in oklab, var(--color-amber-100, oklch(.962 .059 95.617)) 10%, transparent);
- color: var(--color-amber-100, oklch(.962 .059 95.617));
-}
-:is(button, .btn).btn__secondary svg {
- stroke: var(--color-amber-300, oklch(.879 .169 91.605));
-}
-:is(button, .btn).btn__secondary:hover {
- border-color: var(--color-amber-400, oklch(.828 .189 84.429));
- background-color: color-mix(in oklab, var(--color-amber-400, oklch(.828 .189 84.429)) 40%, transparent);
-}
-:is(button, .btn).btn__danger {
- border-color: var(--color-rose-100, oklch(.941 .03 12.58));
- background-color: color-mix(in oklab, var(--color-rose-200, oklch(.892 .058 10.001)) 20%, transparent);
- color: var(--color-rose-200, oklch(.892 .058 10.001));
-}
-:is(button, .btn).btn__danger svg {
- stroke: var(--color-rose-400, oklch(.712 .194 13.428));
-}
-:is(button, .btn).btn__danger:hover {
- border-color: var(--color-rose-500, oklch(.645 .246 16.439));
- background-color: color-mix(in oklab, var(--color-rose-400, oklch(.712 .194 13.428)) 40%, transparent);
- color: var(--color-white, #fff);
-}
-:is(button, .btn).btn__dark {
- border-color: var(--color-slate-400, oklch(.704 .04 256.788));
- background-color: color-mix(in oklab, var(--color-slate-200, oklch(.929 .013 255.508)) 10%, transparent);
- color: var(--color-slate-100, oklch(.968 .007 247.896));
-}
-:is(button, .btn).btn__dark svg {
- stroke: var(--color-slate-300, oklch(.869 .022 252.894));
-}
-:is(button, .btn).btn__dark:hover {
- border-color: var(--color-slate-200, oklch(.929 .013 255.508));
- background-color: color-mix(in oklab, var(--color-slate-400, oklch(.704 .04 256.788)) 40%, transparent);
- color: var(--color-white, #fff);
-}
-:is(button, .btn).btn__success {
- border-color: var(--color-lime-100, oklch(.967 .067 122.328));
- background-color: color-mix(in oklab, var(--color-lime-200, oklch(.938 .127 124.321)) 10%, transparent);
- color: var(--color-lime-100, oklch(.967 .067 122.328));
-}
-:is(button, .btn).btn__success svg {
- stroke: var(--color-lime-400, oklch(.841 .238 128.85));
-}
-:is(button, .btn).btn__success:hover {
- border-color: var(--color-lime-500, oklch(.768 .233 130.85));
- background-color: color-mix(in oklab, var(--color-lime-400, oklch(.841 .238 128.85)) 40%, transparent);
- color: var(--color-white, #fff);
-}
-:is(button, .btn).btn__subtle {
- color: var(--color-white, #fff);
- background-color: #0000;
- border-color: #0000;
-}
-@media (hover: hover) {
-:is(button, .btn).btn__subtle:hover {
- background-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
-}
-}
-:is(button, .btn).btn__subtle:hover {
- border-color: color-mix(in oklab, var(--color-white, #fff) 40%, transparent);
- background-color: color-mix(in oklab, var(--color-white, #fff) 20%, transparent);
- --tw-gradient-to: color-mix(in oklab, var(--color-white, #fff) 30%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-:is(button, .btn).btn__ghost {
- color: color-mix(in oklab, var(--color-white, #fff) 80%, transparent);
- background-color: #0000;
- border-color: #0000;
-}
-@media (hover: hover) {
-:is(button, .btn).btn__ghost:hover {
- color: var(--color-white, #fff);
-}
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-font-weight {
- syntax: "*";
- inherits: false
-}
-@property --tw-tracking {
- syntax: "*";
- inherits: false
-}
-@property --tw-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-ring-inset {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-offset-width {
- syntax: "";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-ring-offset-color {
- syntax: "*";
- inherits: false;
- initial-value: #fff;
-}
-@property --tw-ring-offset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-duration {
- syntax: "*";
- inherits: false
-}
-@property --tw-ease {
- syntax: "*";
- inherits: false
-}
-@property --tw-gradient-position {
- syntax: "*";
- inherits: false
-}
-@property --tw-gradient-from {
- syntax: "";
- inherits: false;
- initial-value: #0000;
-}
-@property --tw-gradient-via {
- syntax: "";
- inherits: false;
- initial-value: #0000;
-}
-@property --tw-gradient-to {
- syntax: "";
- inherits: false;
- initial-value: #0000;
-}
-@property --tw-gradient-stops {
- syntax: "*";
- inherits: false
-}
-@property --tw-gradient-via-stops {
- syntax: "*";
- inherits: false
-}
-@property --tw-gradient-from-position {
- syntax: "";
- inherits: false;
- initial-value: 0%;
-}
-@property --tw-gradient-via-position {
- syntax: "";
- inherits: false;
- initial-value: 50%;
-}
-@property --tw-gradient-to-position {
- syntax: "";
- inherits: false;
- initial-value: 100%;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.dialog-container {
- position: relative;
-}
-.dialog-container dialog {
- pointer-events: none;
- z-index: 50;
- --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
- max-width: calc(100vw - 2rem);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- color: var(--color-slate-200, oklch(.929 .013 255.508));
- position: fixed;
- top: 50%;
- left: 50%;
-}
-.dialog-container dialog[open] {
- pointer-events: auto;
-}
-.dialog-container dialog::backdrop {
- background-color: color-mix(in oklab, var(--color-black, #000) 50%, transparent);
- --tw-backdrop-blur: blur(var(--blur-xs, 4px));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
-}
-.dialog-container dialog .dialog__close {
- top: calc(var(--spacing, .25rem) * 4);
- right: calc(var(--spacing, .25rem) * 4);
- padding: calc(var(--spacing, .25rem) * 0);
- color: var(--color-white, #fff);
- position: absolute;
-}
-.dialog-container dialog .dialog__close svg {
- width: calc(var(--spacing, .25rem) * 5);
- height: calc(var(--spacing, .25rem) * 5);
-}
-.dialog__content > :first-child {
- padding-right: calc(var(--spacing, .25rem) * 8);
-}
-@property --tw-translate-x {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-y {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-z {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-backdrop-blur {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-brightness {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-contrast {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-grayscale {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-hue-rotate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-invert {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-opacity {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-saturate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-sepia {
- syntax: "*";
- inherits: false
-}
diff --git a/public/assets/MacrosView-B-ccNLSC.css b/public/assets/MacrosView-B-ccNLSC.css
deleted file mode 100644
index fb3f526..0000000
--- a/public/assets/MacrosView-B-ccNLSC.css
+++ /dev/null
@@ -1,624 +0,0 @@
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-overview[data-v-f9a187e3] {
- grid-template-rows: auto 1fr;
- display: grid;
- position: relative;
-}
-.macro-overview[data-v-f9a187e3]:after {
- top: calc(var(--spacing, .25rem) * 0);
- background-color: var(--color-slate-600, oklch(.446 .043 257.281));
- --tw-content: "";
- content: var(--tw-content);
- width: 1px;
- height: 100%;
- position: absolute;
- left: 100%;
-}
-.macro-overview .macro-overview__list[data-v-f9a187e3] {
- align-content: flex-start;
- gap: calc(var(--spacing, .25rem) * 1);
- display: grid;
-}
-.macro-overview .macro-item[data-v-f9a187e3] {
- align-items: center;
- display: flex;
-}
-.macro-overview .macro-item button[data-v-f9a187e3] {
- width: 100%;
-}
-@property --tw-content {
- syntax: "*";
- inherits: false;
- initial-value: "";
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-kbd {
- height: calc(var(--spacing, .25rem) * 9);
- align-items: center;
- gap: calc(var(--spacing, .25rem) * 2);
- border-radius: var(--radius-md, .375rem);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: var(--color-slate-500, oklch(.554 .046 257.417));
- background-color: var(--color-slate-700, oklch(.372 .044 257.287));
- padding-block: calc(var(--spacing, .25rem) * 1);
- padding-right: calc(var(--spacing, .25rem) * 2);
- padding-left: calc(var(--spacing, .25rem) * 4);
- font-family: var(--font-mono, "Fira Code", monospace);
- font-size: var(--text-lg, 1.125rem);
- line-height: var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));
- --tw-font-weight: var(--font-weight-bold, 700);
- font-weight: var(--font-weight-bold, 700);
- white-space: nowrap;
- color: var(--color-white, #fff);
- text-transform: uppercase;
- --tw-shadow-color: var(--color-slate-500, oklch(.554 .046 257.417));
- transition-property: all;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- box-shadow: 0 .2rem 0 .2rem var(--tw-shadow-color);
- display: flex;
-}
-kbd:has(sup) {
- padding-left: calc(var(--spacing, .25rem) * 2);
-}
-kbd sup {
- margin-top: calc(var(--spacing, .25rem) * 1);
- font-size: var(--text-xs, .75rem);
- line-height: var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));
- --tw-font-weight: var(--font-weight-light, 300);
- font-weight: var(--font-weight-light, 300);
- color: var(--color-slate-200, oklch(.929 .013 255.508));
-}
-kbd span.dir {
- padding-left: calc(var(--spacing, .25rem) * 1);
- color: var(--color-slate-200, oklch(.929 .013 255.508));
-}
-kbd.empty {
- cursor: pointer;
- border-color: var(--color-sky-300, oklch(.828 .111 230.318));
- background-color: color-mix(in oklab, var(--color-sky-400, oklch(.746 .16 232.661)) 50%, transparent);
- padding-right: calc(var(--spacing, .25rem) * 3);
- padding-left: calc(var(--spacing, .25rem) * 3);
- --tw-tracking: var(--tracking-widest, .1em);
- letter-spacing: var(--tracking-widest, .1em);
- --tw-shadow-color: var(--color-sky-600, oklch(.588 .158 241.966));
-}
-kbd.insert {
- cursor: pointer;
- border-color: var(--color-yellow-300, oklch(.905 .182 98.111));
- background-color: color-mix(in oklab, var(--color-yellow-500, oklch(.795 .184 86.047)) 50%, transparent);
- --tw-shadow-color: var(--color-yellow-600, oklch(.681 .162 75.834));
-}
-:has(kdb):not(.edit) kbd {
- pointer-events: none;
- cursor: default;
-}
-.edit kbd {
- pointer-events: auto;
- cursor: pointer;
-}
-.edit kbd:hover, .edit kbd.active {
- border-color: var(--color-sky-400, oklch(.746 .16 232.661));
- background-color: var(--color-sky-900, oklch(.391 .09 240.876));
- --tw-shadow-color: var(--color-sky-700, oklch(.5 .134 242.749));
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-font-weight {
- syntax: "*";
- inherits: false
-}
-@property --tw-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-ring-inset {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-offset-width {
- syntax: "";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-ring-offset-color {
- syntax: "*";
- inherits: false;
- initial-value: #fff;
-}
-@property --tw-ring-offset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-tracking {
- syntax: "*";
- inherits: false
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-span.delay[data-v-05e04cbb] {
- cursor: default;
- border-radius: var(--radius-sm, .25rem);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: var(--color-slate-400, oklch(.704 .04 256.788));
- background-color: var(--color-slate-500, oklch(.554 .046 257.417));
- padding-inline: calc(var(--spacing, .25rem) * 2);
- padding-block: calc(var(--spacing, .25rem) * 1);
- font-family: var(--font-sans, "Roboto", sans-serif);
- font-size: var(--text-sm, .875rem);
- line-height: var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));
- --tw-font-weight: var(--font-weight-semibold, 600);
- font-weight: var(--font-weight-semibold, 600);
- color: var(--color-slate-950, oklch(.129 .042 264.695));
- align-items: center;
- display: flex;
-}
-span.delay.preset[data-v-05e04cbb] {
- border-color: color-mix(in oklab, var(--color-amber-300, oklch(.879 .169 91.605)) 80%, transparent);
- background-color: color-mix(in oklab, var(--color-amber-100, oklch(.962 .059 95.617)) 60%, transparent);
- color: var(--color-amber-400, oklch(.828 .189 84.429));
-}
-span.delay i[data-v-05e04cbb] {
- padding-left: calc(var(--spacing, .25rem) * 1);
- --tw-font-weight: var(--font-weight-normal, 400);
- font-weight: var(--font-weight-normal, 400);
- opacity: .8;
- font-style: normal;
-}
-.edit span.delay[data-v-05e04cbb] {
- cursor: pointer;
-}
-.edit span.delay[data-v-05e04cbb]:hover, .edit span.delay.active[data-v-05e04cbb] {
- border-color: var(--color-lime-500, oklch(.768 .233 130.85));
- background-color: var(--color-lime-700, oklch(.532 .157 131.589));
- color: var(--color-lime-200, oklch(.938 .127 124.321));
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-font-weight {
- syntax: "*";
- inherits: false
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-recorder__output[data-v-33cbf1af] {
- top: calc(var(--spacing, .25rem) * 0);
- left: calc(var(--spacing, .25rem) * 0);
- align-items: center;
- row-gap: calc(var(--spacing, .25rem) * 4);
- height: fit-content;
- padding: calc(var(--spacing, .25rem) * 4);
- flex-wrap: wrap;
- display: flex;
- position: absolute;
-}
-hr.spacer[data-v-33cbf1af]:last-of-type {
- display: none;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.recorder-input__container[data-v-9a99c4ac], .macro-recorder__input[data-v-9a99c4ac] {
- inset: calc(var(--spacing, .25rem) * 0);
- opacity: 0;
- width: 100%;
- height: 100%;
- display: none;
- position: absolute;
-}
-:is(.recorder-input__container, .macro-recorder__input).record[data-v-9a99c4ac] {
- display: block;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.context-menu {
- position: relative;
-}
-.context-menu .context-menu__content {
- pointer-events: none;
- z-index: 50;
- margin-top: calc(var(--spacing, .25rem) * 2);
- --tw-translate-y: -100%;
- min-width: 100%;
- translate: var(--tw-translate-x) var(--tw-translate-y);
- border-radius: var(--radius-md, .375rem);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: color-mix(in oklab, var(--color-white, #fff) 50%, transparent);
- background-color: color-mix(in oklab, var(--color-slate-100, oklch(.968 .007 247.896)) 60%, transparent);
- color: var(--color-slate-800, oklch(.279 .041 260.031));
- opacity: 0;
- --tw-backdrop-blur: blur(var(--blur-3xl, 64px));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- transition-property: all;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- display: grid;
- position: absolute;
- top: 100%;
-}
-.context-menu .context-menu__content.open {
- pointer-events: auto;
- --tw-translate-y: calc(var(--spacing, .25rem) * 0);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- opacity: 1;
-}
-.context-menu ul {
- color: var(--color-slate-800, oklch(.279 .041 260.031));
-}
-:where(.context-menu ul > :not(:last-child)) {
- --tw-divide-y-reverse: 0;
- border-bottom-style: var(--tw-border-style);
- border-top-style: var(--tw-border-style);
- border-top-width: calc(1px * var(--tw-divide-y-reverse));
- border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
- border-color: var(--color-slate-300, oklch(.869 .022 252.894));
-}
-.context-menu ul li {
- cursor: pointer;
- align-items: center;
- gap: calc(var(--spacing, .25rem) * 2);
- padding: calc(var(--spacing, .25rem) * 2);
- display: flex;
-}
-@media (hover: hover) {
-.context-menu ul li:hover {
- background-color: color-mix(in oklab, var(--color-black, #000) 10%, transparent);
-}
-}
-.context-menu ul li svg {
- width: calc(var(--spacing, .25rem) * 5);
- height: calc(var(--spacing, .25rem) * 5);
-}
-@property --tw-translate-x {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-y {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-z {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-backdrop-blur {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-brightness {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-contrast {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-grayscale {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-hue-rotate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-invert {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-opacity {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-saturate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-sepia {
- syntax: "*";
- inherits: false
-}
-@property --tw-divide-y-reverse {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-button.selected[data-v-601167b6] {
- background-color: var(--color-sky-500, oklch(.685 .169 237.323));
- --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentColor);
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
- --tw-ring-color: var(--color-sky-500, oklch(.685 .169 237.323));
- --tw-ring-offset-width: 1px;
- --tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
-}
-@property --tw-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-ring-inset {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-offset-width {
- syntax: "";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-ring-offset-color {
- syntax: "*";
- inherits: false;
- initial-value: #fff;
-}
-@property --tw-ring-offset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.insert-output[data-v-d2aab140] {
- margin-bottom: calc(var(--spacing, .25rem) * 4);
- justify-content: center;
- align-items: center;
- width: 100%;
- display: flex;
-}
-.insert-key__direction[data-v-d2aab140] {
- margin-top: calc(var(--spacing, .25rem) * 6);
- justify-content: center;
- gap: calc(var(--spacing, .25rem) * 2);
- display: flex;
-}
-button.selected[data-v-d2aab140] {
- background-color: var(--color-sky-500, oklch(.685 .169 237.323));
- --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentColor);
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
- --tw-ring-color: var(--color-sky-500, oklch(.685 .169 237.323));
- --tw-ring-offset-width: 1px;
- --tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
-}
-@property --tw-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-shadow-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-inset-ring-color {
- syntax: "*";
- inherits: false
-}
-@property --tw-inset-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-@property --tw-ring-inset {
- syntax: "*";
- inherits: false
-}
-@property --tw-ring-offset-width {
- syntax: "";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-ring-offset-color {
- syntax: "*";
- inherits: false;
- initial-value: #fff;
-}
-@property --tw-ring-offset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-edit__dialogs[data-v-bf9e32be] {
- flex-grow: 1;
- justify-content: flex-end;
- display: flex;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-recorder__header[data-v-19251359] {
- gap: calc(var(--spacing, .25rem) * 4);
- width: 100%;
- display: grid;
-}
-.macro-recorder__header .edit__buttons[data-v-19251359] {
- justify-content: space-between;
- gap: calc(var(--spacing, .25rem) * 2);
- width: 100%;
- display: flex;
-}
-.macro-recorder__header > div[data-v-19251359] {
- align-items: flex-end;
- gap: calc(var(--spacing, .25rem) * 2);
- display: flex;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-recorder__footer[data-v-fec5e8b6] {
- justify-content: space-between;
- gap: calc(var(--spacing, .25rem) * 2);
- display: flex;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-recorder {
- height: 100%;
-}
-.recorder-interface {
- gap: calc(var(--spacing, .25rem) * 4);
- height: 100%;
- transition-property: grid-template-rows;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- grid-template-rows: auto 1fr auto;
- display: grid;
-}
-.recorder-interface__container {
- border-radius: var(--radius-lg, .5rem);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: var(--color-slate-600, oklch(.446 .043 257.281));
- background-color: color-mix(in oklab, var(--color-slate-950, oklch(.129 .042 264.695)) 50%, transparent);
- width: 100%;
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- position: relative;
- overflow: auto;
-}
-.recorder-interface__container.record {
- border-color: var(--color-rose-300, oklch(.81 .117 11.638));
- background-color: color-mix(in oklab, var(--color-rose-400, oklch(.712 .194 13.428)) 10%, transparent);
-}
-.recorder-interface__container.edit {
- border-color: var(--color-sky-300, oklch(.828 .111 230.318));
- background-color: color-mix(in oklab, var(--color-sky-900, oklch(.391 .09 240.876)) 10%, transparent);
-}
-#macro-name {
- border-color: #0000;
- border-bottom-color: var(--color-slate-300, oklch(.869 .022 252.894));
- width: 100%;
- padding-block: calc(var(--spacing, .25rem) * 0);
- font-size: var(--text-lg, 1.125rem);
- line-height: var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));
- outline-style: var(--tw-outline-style);
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- background-color: #0000;
- border-radius: 0;
- outline-width: 0;
-}
-#macro-name:focus {
- border-color: #0000;
- border-bottom-color: var(--color-sky-400, oklch(.746 .16 232.661));
- background-color: color-mix(in oklab, var(--color-sky-400, oklch(.746 .16 232.661)) 10%, transparent);
-}
-.disabled {
- pointer-events: none;
- cursor: not-allowed;
- opacity: .5;
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-outline-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.macro-panel__content[data-v-c7be9772] {
- gap: calc(var(--spacing, .25rem) * 6);
- padding-top: calc(var(--spacing, .25rem) * 2);
- grid-template-columns: 25ch 1fr;
- display: grid;
-}
diff --git a/public/assets/MacrosView-Bf1eb3go.js b/public/assets/MacrosView-Bf1eb3go.js
deleted file mode 100644
index 5028ea7..0000000
--- a/public/assets/MacrosView-Bf1eb3go.js
+++ /dev/null
@@ -1,1419 +0,0 @@
-import { a as createVueComponent, _ as _export_sfc, r as reactive, b as onMounted, d as axios, e as appUrl, c as createElementBlock, f as createBaseVNode, F as Fragment, g as renderList, o as openBlock, h as createVNode, w as withCtx, i as createTextVNode, u as unref, I as IconKeyboard, t as toDisplayString, j as withModifiers, k as isLocal, A as AuthCall, l as defineStore, m as ref, n as onUpdated, p as createCommentVNode, q as normalizeClass, s as createBlock, v as renderSlot, x as withDirectives, y as vModelText } from "./index-GNAKlyBz.js";
-import { _ as _sfc_main$h, a as _sfc_main$i } from "./DialogComp-Ba5-BUTe.js";
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconAlarm = createVueComponent("outline", "alarm", "IconAlarm", [["path", { "d": "M12 13m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", "key": "svg-0" }], ["path", { "d": "M12 10l0 3l2 0", "key": "svg-1" }], ["path", { "d": "M7 4l-2.75 2", "key": "svg-2" }], ["path", { "d": "M17 4l2.75 2", "key": "svg-3" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconArrowLeftCircle = createVueComponent("outline", "arrow-left-circle", "IconArrowLeftCircle", [["path", { "d": "M17 12h-14", "key": "svg-0" }], ["path", { "d": "M6 9l-3 3l3 3", "key": "svg-1" }], ["path", { "d": "M19 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconArrowRightCircle = createVueComponent("outline", "arrow-right-circle", "IconArrowRightCircle", [["path", { "d": "M18 15l3 -3l-3 -3", "key": "svg-0" }], ["path", { "d": "M5 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-1" }], ["path", { "d": "M7 12h14", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconDeviceFloppy = createVueComponent("outline", "device-floppy", "IconDeviceFloppy", [["path", { "d": "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2", "key": "svg-0" }], ["path", { "d": "M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-1" }], ["path", { "d": "M14 4l0 4l-6 0l0 -4", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconPencil = createVueComponent("outline", "pencil", "IconPencil", [["path", { "d": "M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4", "key": "svg-0" }], ["path", { "d": "M13.5 6.5l4 4", "key": "svg-1" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconPlus = createVueComponent("outline", "plus", "IconPlus", [["path", { "d": "M12 5l0 14", "key": "svg-0" }], ["path", { "d": "M5 12l14 0", "key": "svg-1" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconRestore = createVueComponent("outline", "restore", "IconRestore", [["path", { "d": "M3.06 13a9 9 0 1 0 .49 -4.087", "key": "svg-0" }], ["path", { "d": "M3 4.001v5h5", "key": "svg-1" }], ["path", { "d": "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconTimeDuration15 = createVueComponent("outline", "time-duration-15", "IconTimeDuration15", [["path", { "d": "M12 15h2a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-2v-3h3", "key": "svg-0" }], ["path", { "d": "M9 9v6", "key": "svg-1" }], ["path", { "d": "M3 12v.01", "key": "svg-2" }], ["path", { "d": "M12 21v.01", "key": "svg-3" }], ["path", { "d": "M7.5 4.2v.01", "key": "svg-4" }], ["path", { "d": "M16.5 19.8v.01", "key": "svg-5" }], ["path", { "d": "M7.5 19.8v.01", "key": "svg-6" }], ["path", { "d": "M4.2 16.5v.01", "key": "svg-7" }], ["path", { "d": "M19.8 16.5v.01", "key": "svg-8" }], ["path", { "d": "M4.2 7.5v.01", "key": "svg-9" }], ["path", { "d": "M21 12a9 9 0 0 0 -9 -9", "key": "svg-10" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconTrash = createVueComponent("outline", "trash", "IconTrash", [["path", { "d": "M4 7l16 0", "key": "svg-0" }], ["path", { "d": "M10 11l0 6", "key": "svg-1" }], ["path", { "d": "M14 11l0 6", "key": "svg-2" }], ["path", { "d": "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", "key": "svg-3" }], ["path", { "d": "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3", "key": "svg-4" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconPlayerRecordFilled = createVueComponent("filled", "player-record-filled", "IconPlayerRecordFilled", [["path", { "d": "M8 5.072a8 8 0 1 1 -3.995 7.213l-.005 -.285l.005 -.285a8 8 0 0 1 3.995 -6.643z", "key": "svg-0" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconPlayerStopFilled = createVueComponent("filled", "player-stop-filled", "IconPlayerStopFilled", [["path", { "d": "M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z", "key": "svg-0" }]]);
-const _hoisted_1$d = { class: "macro-overview mcrm-block block__dark" };
-const _hoisted_2$b = { class: "macro-overview__list" };
-const _sfc_main$g = {
- __name: "MacroOverview",
- setup(__props) {
- const macros = reactive({
- list: []
- });
- onMounted(() => {
- axios.post(appUrl() + "/macro/list").then((data) => {
- if (data.data.length > 0) macros.list = data.data;
- });
- });
- function runMacro(macro) {
- const data = isLocal() ? { macro } : AuthCall({ macro });
- axios.post(appUrl() + "/macro/play", data).then((data2) => {
- console.log(data2);
- });
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$d, [
- _cache[0] || (_cache[0] = createBaseVNode("h4", { class: "border-b-2 border-transparent" }, "Saved Macros", -1)),
- createBaseVNode("div", _hoisted_2$b, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(macros.list, (macro, i) => {
- return openBlock(), createElementBlock("div", {
- class: "macro-item",
- key: i
- }, [
- createVNode(_sfc_main$h, {
- variant: "dark",
- class: "w-full",
- size: "sm",
- onClick: withModifiers(($event) => runMacro(macro), ["prevent"])
- }, {
- default: withCtx(() => [
- createVNode(unref(IconKeyboard)),
- createTextVNode(" " + toDisplayString(macro), 1)
- ]),
- _: 2
- }, 1032, ["onClick"])
- ]);
- }), 128))
- ])
- ]);
- };
- }
-};
-const MacroOverview = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-f9a187e3"]]);
-const keyMap = {
- // Modifier keys
- Control: "Ctrl",
- Shift: "Shift",
- Alt: "Alt",
- Meta: "Win",
- CapsLock: "Caps",
- // Special keys
- PageUp: "PgUp",
- PageDown: "PgDn",
- ScrollLock: "Scr Lk",
- Insert: "Ins",
- Delete: "Del",
- Escape: "Esc",
- Space: "Space",
- // Symbol keys
- Backquote: "`",
- Backslash: "\\",
- BracketLeft: "[",
- BracketRight: "]",
- Comma: ",",
- Equal: "=",
- Minus: "-",
- Period: ".",
- Quote: "'",
- Semicolon: ";",
- Slash: "/",
- // Arrow keys
- ArrowUp: "▲",
- ArrowRight: "▶",
- ArrowDown: "▼",
- ArrowLeft: "◀",
- // Media keys
- MediaPlayPause: "Play",
- MediaStop: "Stop",
- MediaTrackNext: "Next",
- MediaTrackPrevious: "Prev",
- MediaVolumeDown: "Down",
- MediaVolumeUp: "Up",
- AudioVolumeMute: "Mute",
- AudioVolumeDown: "Down",
- AudioVolumeUp: "Up"
-};
-const filterKey = (e) => {
- const k = {};
- if (e.location === 1) k.loc = "left";
- if (e.location === 2) k.loc = "right";
- if (e.location === 3) k.loc = "num";
- if (e.key.includes("Media") || e.key.includes("Audio")) k.loc = mediaPrefix(e);
- if (keyMap[e.code] || keyMap[e.key]) {
- k.str = keyMap[e.code] || keyMap[e.key];
- } else {
- k.str = e.key.toLowerCase();
- }
- return k;
-};
-const mediaPrefix = (e) => {
- switch (e.key) {
- case "MediaPlayPause":
- case "MediaStop":
- case "MediaTrackNext":
- case "MediaTrackPrevious":
- return "Media";
- case "MediaVolumeDown":
- case "MediaVolumeUp":
- case "AudioVolumeDown":
- case "AudioVolumeUp":
- case "AudioVolumeMute":
- return "Volume";
- }
-};
-const isRepeat = (lastStep, e, direction) => {
- return lastStep && lastStep.type === "key" && lastStep.code === e.code && lastStep.direction === direction;
-};
-const invalidMacro = (steps) => {
- const downKeys = [];
- const upKeys = [];
- Object.keys(steps).forEach((stepKey) => {
- const step = steps[stepKey];
- if (step.type !== "key") return;
- if (step.direction == "down") downKeys.push(step.key);
- if (step.direction == "up") {
- if (!downKeys.includes(step.key)) upKeys.push(step.key);
- else downKeys.splice(downKeys.indexOf(step.key), 1);
- }
- });
- if (upKeys.length === 0 && downKeys.length === 0) return false;
- return { down: downKeys, up: upKeys };
-};
-const useMacroRecorderStore = defineStore("macrorecorder", () => {
- const state = ref({
- record: false,
- edit: false,
- editKey: false,
- editDelay: false,
- validationErrors: false
- });
- const macroName = ref("");
- const steps = ref([]);
- const delay = ref({
- start: 0,
- fixed: false
- });
- const getEditKey = () => steps.value[state.value.editKey];
- const getAdjacentKey = (pos, includeDelay = false) => {
- let returnVal = false;
- const mod = pos == "before" ? -1 : 1;
- const keyIndex = state.value.editKey + 2 * mod;
- const delayIndex = includeDelay ? state.value.editKey + 1 * mod : false;
- if (steps.value[keyIndex]) returnVal = steps.value[keyIndex];
- if (delayIndex && steps.value[delayIndex])
- returnVal = {
- delay: steps.value[delayIndex],
- key: steps.value[keyIndex],
- delayIndex
- };
- return returnVal;
- };
- const getEditDelay = () => steps.value[state.value.editDelay];
- const recordStep = (e, direction = false, key = false) => {
- const lastStep = steps.value[steps.value.length - 1];
- let stepVal = {};
- if (typeof e === "object" && !isRepeat(lastStep, e, direction)) {
- if (key === false) recordDelay();
- stepVal = {
- type: "key",
- key: e.key,
- code: e.code,
- location: e.location,
- direction,
- keyObj: filterKey(e)
- };
- } else if (direction && key !== false) {
- stepVal = steps.value[key];
- stepVal.direction = direction;
- } else if (typeof e === "number") {
- stepVal = { type: "delay", value: parseFloat(e.toFixed()) };
- }
- if (key !== false) steps.value[key] = stepVal;
- else steps.value.push(stepVal);
- };
- const recordDelay = () => {
- if (delay.value.fixed !== false)
- recordStep(delay.value.fixed);
- else if (delay.value.start == 0)
- delay.value.start = performance.now();
- else {
- recordStep(performance.now() - delay.value.start);
- delay.value.start = performance.now();
- }
- };
- const insertKey = (e, direction, adjacentDelayIndex) => {
- let min, max, newKeyIndex, newDelayIndex;
- if (adjacentDelayIndex === null) {
- min = state.value.editKey == 0 ? 0 : state.value.editKey;
- max = state.value.editKey == 0 ? 1 : false;
- newKeyIndex = max === false ? min + 2 : min;
- newDelayIndex = min + 1;
- } else if (state.value.editKey < adjacentDelayIndex) {
- min = state.value.editKey;
- max = adjacentDelayIndex;
- newKeyIndex = min + 2;
- newDelayIndex = min + 1;
- } else {
- min = adjacentDelayIndex;
- max = state.value.editKey;
- newKeyIndex = min + 1;
- newDelayIndex = min + 2;
- }
- if (max !== false) {
- for (let i = Object.keys(steps.value).length - 1; i >= max; i--) {
- steps.value[i + 2] = steps.value[i];
- }
- }
- recordStep(e, direction, newKeyIndex);
- recordStep(10, false, newDelayIndex);
- state.value.editKey = false;
- };
- const deleteEditKey = () => {
- if (state.value.editKey === 0) steps.value.splice(state.value.editKey, 2);
- else steps.value.splice(state.value.editKey - 1, 2);
- state.value.editKey = false;
- };
- const restartDelay = () => {
- delay.value.start = performance.now();
- };
- const changeName = (name) => {
- macroName.value = name;
- console.log(macroName.value);
- };
- const changeDelay = (fixed) => {
- delay.value.fixed = fixed;
- formatDelays();
- };
- const formatDelays = () => {
- steps.value = steps.value.map((step) => {
- if (step.type === "delay" && delay.value.fixed !== false) step.value = delay.value.fixed;
- return step;
- });
- };
- const toggleEdit = (type, key) => {
- if (type === "key") {
- state.value.editKey = key;
- state.value.editDelay = false;
- }
- if (type === "delay") {
- state.value.editKey = false;
- state.value.editDelay = key;
- }
- };
- const resetEdit = () => {
- state.value.edit = false;
- state.value.editKey = false;
- state.value.editDelay = false;
- };
- const reset = () => {
- state.value.record = false;
- delay.value.start = 0;
- steps.value = [];
- if (state.value.edit) resetEdit();
- };
- const save = () => {
- state.value.validationErrors = invalidMacro(steps.value);
- if (state.value.validationErrors) return false;
- axios.post(appUrl() + "/macro/record", { name: macroName.value, steps: steps.value }).then((data) => {
- console.log(data);
- });
- return true;
- };
- return {
- state,
- steps,
- delay,
- getEditKey,
- getAdjacentKey,
- getEditDelay,
- recordStep,
- insertKey,
- deleteEditKey,
- restartDelay,
- changeName,
- changeDelay,
- toggleEdit,
- resetEdit,
- reset,
- save
- };
-});
-const _hoisted_1$c = { key: 0 };
-const _hoisted_2$a = ["innerHTML"];
-const _hoisted_3$6 = { class: "dir" };
-const _hoisted_4$4 = { key: 1 };
-const _sfc_main$f = {
- __name: "MacroKey",
- props: {
- keyObj: Object,
- direction: String,
- active: Boolean,
- empty: Boolean
- },
- setup(__props) {
- const props = __props;
- const dir = reactive({
- value: false
- });
- onMounted(() => {
- if (props.empty) return;
- setDirection();
- });
- onUpdated(() => {
- setDirection();
- });
- const setDirection = () => {
- if (props.direction) dir.value = props.direction;
- else dir.value = props.keyObj.direction;
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("kbd", {
- class: normalizeClass(`${__props.active ? "active" : ""} ${__props.empty ? "empty" : ""}`)
- }, [
- __props.keyObj ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
- __props.keyObj.loc ? (openBlock(), createElementBlock("sup", _hoisted_1$c, toDisplayString(__props.keyObj.loc), 1)) : createCommentVNode("", true),
- createBaseVNode("span", {
- innerHTML: __props.keyObj.str
- }, null, 8, _hoisted_2$a),
- createBaseVNode("span", _hoisted_3$6, toDisplayString(dir.value === "down" ? "↓" : "↑"), 1)
- ], 64)) : __props.empty ? (openBlock(), createElementBlock("span", _hoisted_4$4, "[ ]")) : createCommentVNode("", true)
- ], 2);
- };
- }
-};
-const _sfc_main$e = {
- __name: "DelaySpan",
- props: {
- value: Number,
- active: Boolean,
- preset: Boolean
- },
- setup(__props) {
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", {
- class: normalizeClass(`delay ${__props.active ? "active" : ""} ${__props.preset ? "preset" : ""}`)
- }, [
- __props.value < 1e4 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
- createTextVNode(toDisplayString(__props.value) + " ", 1),
- _cache[0] || (_cache[0] = createBaseVNode("i", null, "ms", -1))
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
- _cache[1] || (_cache[1] = createTextVNode(" >10 ")),
- _cache[2] || (_cache[2] = createBaseVNode("i", null, "s", -1))
- ], 64))
- ], 2);
- };
- }
-};
-const DelaySpan = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-05e04cbb"]]);
-const _sfc_main$d = {
- __name: "RecorderOutput",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(`macro-recorder__output ${unref(macroRecorder).state.record && "record"} ${unref(macroRecorder).state.edit && "edit"}`)
- }, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(macroRecorder).steps, (step, key) => {
- return openBlock(), createElementBlock(Fragment, null, [
- step.type === "key" ? (openBlock(), createBlock(_sfc_main$f, {
- key,
- "key-obj": step.keyObj,
- direction: step.direction,
- active: unref(macroRecorder).state.editKey === key,
- onClick: ($event) => unref(macroRecorder).state.edit ? unref(macroRecorder).toggleEdit("key", key) : false
- }, null, 8, ["key-obj", "direction", "active", "onClick"])) : step.type === "delay" ? (openBlock(), createBlock(DelaySpan, {
- key,
- value: step.value,
- active: unref(macroRecorder).state.editDelay === key,
- onClick: ($event) => unref(macroRecorder).toggleEdit("delay", key)
- }, null, 8, ["value", "active", "onClick"])) : createCommentVNode("", true),
- _cache[0] || (_cache[0] = createBaseVNode("hr", { class: "spacer" }, null, -1))
- ], 64);
- }), 256))
- ], 2);
- };
- }
-};
-const RecorderOutput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-33cbf1af"]]);
-const _sfc_main$c = {
- __name: "RecorderInput",
- setup(__props) {
- const macroInput = ref(null);
- const macroRecorder = useMacroRecorderStore();
- onUpdated(() => {
- if (macroRecorder.state.record) {
- macroInput.value.focus();
- if (macroRecorder.delay.start !== 0) macroRecorder.restartDelay();
- }
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(`recorder-input__container ${unref(macroRecorder).state.record && "record"}`)
- }, [
- unref(macroRecorder).state.record ? (openBlock(), createElementBlock("input", {
- key: 0,
- class: normalizeClass(`macro-recorder__input ${unref(macroRecorder).state.record && "record"}`),
- type: "text",
- ref_key: "macroInput",
- ref: macroInput,
- onFocus: _cache[0] || (_cache[0] = ($event) => console.log("focus")),
- onKeydown: _cache[1] || (_cache[1] = withModifiers(($event) => unref(macroRecorder).recordStep($event, "down"), ["prevent"])),
- onKeyup: _cache[2] || (_cache[2] = withModifiers(($event) => unref(macroRecorder).recordStep($event, "up"), ["prevent"]))
- }, null, 34)) : createCommentVNode("", true)
- ], 2);
- };
- }
-};
-const RecorderInput = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-9a99c4ac"]]);
-const _hoisted_1$b = { class: "context-menu" };
-const _sfc_main$b = {
- __name: "ContextMenu",
- props: {
- open: Boolean
- },
- setup(__props, { expose: __expose }) {
- __expose({ toggle });
- const props = __props;
- const menuOpen = ref(false);
- onMounted(() => {
- menuOpen.value = props.open;
- });
- function toggle() {
- console.log("toggle");
- menuOpen.value = !menuOpen.value;
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
- createBaseVNode("div", {
- class: "context-menu__trigger",
- onClick: toggle
- }, [
- renderSlot(_ctx.$slots, "trigger")
- ]),
- createBaseVNode("div", {
- class: normalizeClass(`context-menu__content ${menuOpen.value ? "open" : ""}`)
- }, [
- renderSlot(_ctx.$slots, "content")
- ], 2)
- ]);
- };
- }
-};
-const _hoisted_1$a = {
- type: "number",
- step: "10",
- min: "0",
- max: "3600000",
- ref: "customDelayInput",
- placeholder: "100"
-};
-const _hoisted_2$9 = { class: "flex justify-end" };
-const _sfc_main$a = {
- __name: "FixedDelayMenu",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const ctxtMenu = ref();
- function changeDelay(num) {
- macroRecorder.changeDelay(num);
- ctxtMenu.value.toggle();
- }
- return (_ctx, _cache) => {
- return openBlock(), createBlock(_sfc_main$b, {
- ref_key: "ctxtMenu",
- ref: ctxtMenu
- }, {
- trigger: withCtx(() => [
- createVNode(_sfc_main$h, {
- variant: "secondary",
- size: "sm"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconTimeDuration15)),
- _cache[5] || (_cache[5] = createTextVNode("Fixed delay "))
- ]),
- _: 1
- })
- ]),
- content: withCtx(() => [
- createBaseVNode("ul", null, [
- createBaseVNode("li", {
- onClick: _cache[0] || (_cache[0] = ($event) => changeDelay(0))
- }, "0ms"),
- createBaseVNode("li", {
- onClick: _cache[1] || (_cache[1] = ($event) => changeDelay(15))
- }, "15ms"),
- createBaseVNode("li", {
- onClick: _cache[2] || (_cache[2] = ($event) => changeDelay(50))
- }, "50ms"),
- createBaseVNode("li", {
- onClick: _cache[3] || (_cache[3] = ($event) => changeDelay(100))
- }, "100ms"),
- createBaseVNode("li", null, [
- createVNode(_sfc_main$i, null, {
- trigger: withCtx(() => _cache[6] || (_cache[6] = [
- createBaseVNode("span", null, "Custom delay", -1)
- ])),
- content: withCtx(() => [
- _cache[9] || (_cache[9] = createBaseVNode("h4", { class: "text-slate-50 mb-4" }, "Custom delay", -1)),
- createBaseVNode("form", {
- class: "grid gap-4 w-44",
- onSubmit: _cache[4] || (_cache[4] = withModifiers(($event) => changeDelay(parseInt(_ctx.$refs.customDelayInput.value)), ["prevent"]))
- }, [
- createBaseVNode("div", null, [
- createBaseVNode("input", _hoisted_1$a, null, 512),
- _cache[7] || (_cache[7] = createBaseVNode("span", null, "ms", -1))
- ]),
- createBaseVNode("div", _hoisted_2$9, [
- createVNode(_sfc_main$h, {
- variant: "primary",
- size: "sm"
- }, {
- default: withCtx(() => _cache[8] || (_cache[8] = [
- createTextVNode("Set custom delay")
- ])),
- _: 1
- })
- ])
- ], 32)
- ]),
- _: 1
- })
- ])
- ])
- ]),
- _: 1
- }, 512);
- };
- }
-};
-const FixedDelayMenu = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-597b5d4a"]]);
-const _hoisted_1$9 = {
- id: "edit-key-dialog",
- class: "dialog__content"
-};
-const _hoisted_2$8 = {
- class: "grid gap-4",
- "submit.prevent": ""
-};
-const _hoisted_3$5 = { class: "flex gap-2 justify-center" };
-const _hoisted_4$3 = { class: "flex justify-end" };
-const _sfc_main$9 = {
- __name: "EditKeyDialog",
- setup(__props) {
- const editable = reactive({
- key: {},
- newKey: {}
- });
- const macroRecorder = useMacroRecorderStore();
- const newKeyInput = ref(null);
- onMounted(() => {
- editable.key = macroRecorder.getEditKey();
- editable.newKey.direction = editable.key.direction;
- });
- const handleNewKey = (e) => {
- editable.newKey.e = e;
- editable.newKey.keyObj = filterKey(e);
- };
- const handleNewDirection = (direction) => {
- editable.newKey.direction = direction;
- editable.newKey.keyObj = filterKey(editable.key);
- };
- const changeKey = () => {
- macroRecorder.recordStep(
- editable.newKey.e,
- editable.newKey.direction,
- macroRecorder.state.editKey
- );
- macroRecorder.state.editKey = false;
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
- _cache[9] || (_cache[9] = createBaseVNode("h4", { class: "text-slate-50 mb-4" }, "Press a key", -1)),
- createBaseVNode("div", {
- class: "flex justify-center",
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.newKeyInput.focus())
- }, [
- editable.key.keyObj ? (openBlock(), createBlock(_sfc_main$f, {
- key: 0,
- "key-obj": editable.key.keyObj,
- direction: editable.key.direction
- }, null, 8, ["key-obj", "direction"])) : createCommentVNode("", true),
- typeof editable.newKey.keyObj === "object" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
- _cache[5] || (_cache[5] = createBaseVNode("span", { class: "px-4 flex items-center text-white" }, " >>> ", -1)),
- createVNode(_sfc_main$f, {
- "key-obj": editable.newKey.keyObj,
- direction: editable.newKey.direction
- }, null, 8, ["key-obj", "direction"])
- ], 64)) : createCommentVNode("", true)
- ]),
- createBaseVNode("form", _hoisted_2$8, [
- createBaseVNode("input", {
- class: "size-0 opacity-0",
- type: "text",
- min: "0",
- max: "1",
- ref_key: "newKeyInput",
- ref: newKeyInput,
- placeholder: "New key",
- autofocus: "",
- onKeydown: _cache[1] || (_cache[1] = withModifiers(($event) => handleNewKey($event), ["prevent"]))
- }, null, 544),
- createBaseVNode("div", _hoisted_3$5, [
- createVNode(_sfc_main$h, {
- variant: "secondary",
- class: normalizeClass(editable.newKey.direction === "down" ? "selected" : ""),
- size: "sm",
- onClick: _cache[2] || (_cache[2] = withModifiers(($event) => handleNewDirection("down"), ["prevent"]))
- }, {
- default: withCtx(() => _cache[6] || (_cache[6] = [
- createTextVNode(" ↓ Down ")
- ])),
- _: 1
- }, 8, ["class"]),
- createVNode(_sfc_main$h, {
- variant: "secondary",
- class: normalizeClass(editable.newKey.direction === "up" ? "selected" : ""),
- size: "sm",
- onClick: _cache[3] || (_cache[3] = withModifiers(($event) => handleNewDirection("up"), ["prevent"]))
- }, {
- default: withCtx(() => _cache[7] || (_cache[7] = [
- createTextVNode(" ↑ Up ")
- ])),
- _: 1
- }, 8, ["class"])
- ]),
- createBaseVNode("div", _hoisted_4$3, [
- createVNode(_sfc_main$h, {
- variant: "primary",
- size: "sm",
- onClick: _cache[4] || (_cache[4] = withModifiers(($event) => changeKey(), ["prevent"]))
- }, {
- default: withCtx(() => _cache[8] || (_cache[8] = [
- createTextVNode(" Change key ")
- ])),
- _: 1
- })
- ])
- ])
- ]);
- };
- }
-};
-const EditKeyDialog = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-601167b6"]]);
-const _hoisted_1$8 = {
- id: "edit-delay-dialog",
- class: "dialog__content"
-};
-const _hoisted_2$7 = {
- key: 0,
- class: "flex justify-center"
-};
-const _hoisted_3$4 = {
- class: "grid gap-4 mt-6",
- "submit.prevent": ""
-};
-const _hoisted_4$2 = { key: 0 };
-const _hoisted_5$2 = { class: "flex justify-end" };
-const _sfc_main$8 = {
- __name: "EditDelayDialog",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const editable = reactive({
- delay: {},
- newDelay: { value: 0 }
- });
- onMounted(() => {
- editable.delay = macroRecorder.getEditDelay();
- editable.newDelay.value = editable.delay.value;
- console.log(editable);
- });
- const changeDelay = () => {
- if (!editable.newDelay.value) return;
- macroRecorder.recordStep(editable.newDelay.value, false, macroRecorder.state.editDelay);
- macroRecorder.state.editDelay = false;
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
- _cache[4] || (_cache[4] = createBaseVNode("h4", { class: "text-slate-50 mb-4" }, "Edit delay", -1)),
- editable.delay.value ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
- createVNode(DelaySpan, {
- class: "!text-lg",
- value: editable.delay.value
- }, null, 8, ["value"])
- ])) : createCommentVNode("", true),
- createBaseVNode("form", _hoisted_3$4, [
- editable.newDelay.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
- withDirectives(createBaseVNode("input", {
- type: "number",
- min: "0",
- max: "3600000",
- step: "10",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => editable.newDelay.value = $event),
- autofocus: ""
- }, null, 512), [
- [vModelText, editable.newDelay.value]
- ]),
- _cache[2] || (_cache[2] = createBaseVNode("span", null, "ms", -1))
- ])) : createCommentVNode("", true),
- createBaseVNode("div", _hoisted_5$2, [
- createVNode(_sfc_main$h, {
- variant: "primary",
- size: "sm",
- onClick: _cache[1] || (_cache[1] = withModifiers(($event) => changeDelay(), ["prevent"]))
- }, {
- default: withCtx(() => _cache[3] || (_cache[3] = [
- createTextVNode(" Change delay ")
- ])),
- _: 1
- })
- ])
- ])
- ]);
- };
- }
-};
-const EditDelayDialog = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-d4c82ec9"]]);
-const _hoisted_1$7 = {
- id: "delete-key-dialog",
- class: "dialog__content"
-};
-const _hoisted_2$6 = { class: "flex justify-center w-full mb-4" };
-const _hoisted_3$3 = { class: "flex justify-end gap-2 mt-6" };
-const _sfc_main$7 = {
- __name: "DeleteKeyDialog",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const keyObj = ref(null);
- onMounted(() => {
- keyObj.value = filterKey(macroRecorder.getEditKey());
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
- _cache[2] || (_cache[2] = createBaseVNode("h4", { class: "text-slate-50 mb-4" }, "Delete key", -1)),
- createBaseVNode("div", _hoisted_2$6, [
- keyObj.value ? (openBlock(), createBlock(_sfc_main$f, {
- key: 0,
- "key-obj": keyObj.value
- }, null, 8, ["key-obj"])) : createCommentVNode("", true)
- ]),
- _cache[3] || (_cache[3] = createBaseVNode("p", { class: "text-sm text-slate-300" }, "Are you sure you want to delete this key?", -1)),
- createBaseVNode("div", _hoisted_3$3, [
- createVNode(_sfc_main$h, {
- variant: "danger",
- size: "sm",
- onClick: _cache[0] || (_cache[0] = ($event) => unref(macroRecorder).deleteEditKey())
- }, {
- default: withCtx(() => _cache[1] || (_cache[1] = [
- createTextVNode(" Delete key ")
- ])),
- _: 1
- })
- ])
- ]);
- };
- }
-};
-const DeleteKeyDialog = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-7dc19ba4"]]);
-const _hoisted_1$6 = {
- id: "insert-key-dialog",
- class: "dialog__content w-96"
-};
-const _hoisted_2$5 = { class: "text-slate-50 mb-4" };
-const _hoisted_3$2 = {
- key: 0,
- class: "text-center"
-};
-const _hoisted_4$1 = { class: "insert-key__direction" };
-const _hoisted_5$1 = { class: "flex justify-end" };
-const _sfc_main$6 = {
- __name: "InsertKeyDialog",
- props: {
- position: String
- },
- setup(__props) {
- const props = __props;
- const macroRecorder = useMacroRecorderStore();
- const keyObjs = reactive({
- selected: null,
- insert: null,
- insertEvent: null,
- insertDirection: "down",
- adjacent: null,
- adjacentDelay: null,
- adjacentDelayIndex: null
- });
- const insertKeyInput = ref(null);
- const inputFocus = ref(false);
- onMounted(() => {
- keyObjs.selected = filterKey(macroRecorder.getEditKey());
- const adjacentKey = macroRecorder.getAdjacentKey(props.position, true);
- if (adjacentKey) keyObjs.adjacent = filterKey(adjacentKey.key);
- if (adjacentKey.delay) {
- keyObjs.adjacentDelay = adjacentKey.delay;
- keyObjs.adjacentDelayIndex = adjacentKey.delayIndex;
- }
- });
- const handleInsertKey = (e) => {
- keyObjs.insert = filterKey(e);
- keyObjs.insertEvent = e;
- };
- const insertKey = () => {
- macroRecorder.insertKey(keyObjs.insertEvent, keyObjs.insertDirection, keyObjs.adjacentDelayIndex);
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
- createBaseVNode("h4", _hoisted_2$5, "Insert key " + toDisplayString(__props.position), 1),
- inputFocus.value ? (openBlock(), createElementBlock("p", _hoisted_3$2, "[Press a key]")) : createCommentVNode("", true),
- createBaseVNode("input", {
- class: "size-0 opacity-0",
- type: "text",
- min: "0",
- max: "1",
- ref_key: "insertKeyInput",
- ref: insertKeyInput,
- placeholder: "New key",
- onFocusin: _cache[0] || (_cache[0] = ($event) => inputFocus.value = true),
- onFocusout: _cache[1] || (_cache[1] = ($event) => inputFocus.value = false),
- onKeydown: _cache[2] || (_cache[2] = withModifiers(($event) => handleInsertKey($event), ["prevent"])),
- autofocus: ""
- }, null, 544),
- createBaseVNode("div", {
- class: normalizeClass(["insert-output", __props.position == "before" ? "flex-row-reverse" : ""])
- }, [
- keyObjs.selected ? (openBlock(), createBlock(_sfc_main$f, {
- key: 0,
- "key-obj": keyObjs.selected
- }, null, 8, ["key-obj"])) : createCommentVNode("", true),
- _cache[10] || (_cache[10] = createBaseVNode("hr", { class: "spacer" }, null, -1)),
- createVNode(DelaySpan, {
- preset: true,
- value: 10
- }),
- _cache[11] || (_cache[11] = createBaseVNode("hr", { class: "spacer" }, null, -1)),
- keyObjs.insert ? (openBlock(), createBlock(_sfc_main$f, {
- key: 1,
- class: "insert",
- "key-obj": keyObjs.insert,
- direction: keyObjs.insertDirection,
- onClick: _cache[3] || (_cache[3] = ($event) => insertKeyInput.value.focus())
- }, null, 8, ["key-obj", "direction"])) : createCommentVNode("", true),
- !keyObjs.insert ? (openBlock(), createBlock(_sfc_main$f, {
- key: 2,
- empty: true,
- onClick: _cache[4] || (_cache[4] = ($event) => insertKeyInput.value.focus())
- })) : createCommentVNode("", true),
- keyObjs.adjacentDelay ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
- _cache[8] || (_cache[8] = createBaseVNode("hr", { class: "spacer" }, null, -1)),
- createVNode(DelaySpan, {
- value: keyObjs.adjacentDelay.value
- }, null, 8, ["value"])
- ], 64)) : createCommentVNode("", true),
- keyObjs.adjacent ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
- _cache[9] || (_cache[9] = createBaseVNode("hr", { class: "spacer" }, null, -1)),
- createVNode(_sfc_main$f, {
- "key-obj": keyObjs.adjacent
- }, null, 8, ["key-obj"])
- ], 64)) : createCommentVNode("", true)
- ], 2),
- createBaseVNode("div", _hoisted_4$1, [
- createVNode(_sfc_main$h, {
- variant: "secondary",
- class: normalizeClass(keyObjs.insertDirection === "down" ? "selected" : ""),
- size: "sm",
- onClick: _cache[5] || (_cache[5] = withModifiers(($event) => keyObjs.insertDirection = "down", ["prevent"]))
- }, {
- default: withCtx(() => _cache[12] || (_cache[12] = [
- createTextVNode(" ↓ Down ")
- ])),
- _: 1
- }, 8, ["class"]),
- createVNode(_sfc_main$h, {
- variant: "secondary",
- class: normalizeClass(keyObjs.insertDirection === "up" ? "selected" : ""),
- size: "sm",
- onClick: _cache[6] || (_cache[6] = withModifiers(($event) => keyObjs.insertDirection = "up", ["prevent"]))
- }, {
- default: withCtx(() => _cache[13] || (_cache[13] = [
- createTextVNode(" ↑ Up ")
- ])),
- _: 1
- }, 8, ["class"])
- ]),
- createBaseVNode("div", _hoisted_5$1, [
- createVNode(_sfc_main$h, {
- variant: "primary",
- size: "sm",
- onClick: _cache[7] || (_cache[7] = ($event) => insertKey())
- }, {
- default: withCtx(() => _cache[14] || (_cache[14] = [
- createTextVNode("Insert key")
- ])),
- _: 1
- })
- ])
- ]);
- };
- }
-};
-const InsertKeyDialog = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-d2aab140"]]);
-const _hoisted_1$5 = {
- key: 0,
- class: "macro-edit__dialogs"
-};
-const _hoisted_2$4 = {
- key: 0,
- class: "flex gap-2"
-};
-const _sfc_main$5 = {
- __name: "EditDialogs",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const insert = reactive({ position: null });
- const ctxtMenu = ref();
- onMounted(() => {
- macroRecorder.$subscribe((mutation) => {
- if (mutation.events && mutation.events.key == "editKey" && mutation.events.newValue === false) {
- insert.position = null;
- }
- });
- });
- function onOpenDialog() {
- if (insert.position !== null) ctxtMenu.value.toggle();
- }
- function onCloseDialog() {
- macroRecorder.state.editKey = false;
- macroRecorder.state.editDelay = false;
- insert.position = null;
- }
- return (_ctx, _cache) => {
- return unref(macroRecorder).state.edit !== false ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
- unref(macroRecorder).state.editKey !== false && typeof unref(macroRecorder).getEditKey() === "object" ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
- createVNode(_sfc_main$b, {
- ref_key: "ctxtMenu",
- ref: ctxtMenu
- }, {
- trigger: withCtx(() => [
- createVNode(_sfc_main$h, {
- variant: "dark",
- size: "sm"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPlus)),
- _cache[2] || (_cache[2] = createTextVNode(" Insert "))
- ]),
- _: 1
- })
- ]),
- content: withCtx(() => [
- createBaseVNode("ul", null, [
- createBaseVNode("li", {
- onClick: _cache[0] || (_cache[0] = ($event) => insert.position = "before")
- }, [
- createVNode(unref(IconArrowLeftCircle)),
- _cache[3] || (_cache[3] = createTextVNode(" Before"))
- ]),
- createBaseVNode("li", {
- onClick: _cache[1] || (_cache[1] = ($event) => insert.position = "after")
- }, [
- createVNode(unref(IconArrowRightCircle)),
- _cache[4] || (_cache[4] = createTextVNode(" After"))
- ])
- ])
- ]),
- _: 1
- }, 512),
- insert.position !== null ? (openBlock(), createBlock(_sfc_main$i, {
- key: 0,
- open: insert.position !== null,
- onOnOpen: onOpenDialog,
- onOnClose: onCloseDialog
- }, {
- content: withCtx(() => [
- createVNode(InsertKeyDialog, {
- position: insert.position
- }, null, 8, ["position"])
- ]),
- _: 1
- }, 8, ["open"])) : createCommentVNode("", true),
- createVNode(_sfc_main$i, {
- id: `edit-key-${unref(macroRecorder).state.editKey}`,
- onOnOpen: onOpenDialog,
- onOnClose: onCloseDialog
- }, {
- trigger: withCtx(() => [
- createVNode(_sfc_main$h, {
- variant: "secondary",
- size: "sm"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPencil)),
- _cache[5] || (_cache[5] = createTextVNode("Edit "))
- ]),
- _: 1
- })
- ]),
- content: withCtx(() => [
- createVNode(EditKeyDialog)
- ]),
- _: 1
- }, 8, ["id"]),
- createVNode(_sfc_main$i, {
- onOnOpen: onOpenDialog,
- onOnClose: onCloseDialog
- }, {
- trigger: withCtx(() => [
- createVNode(_sfc_main$h, {
- size: "sm",
- variant: "danger"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconTrash)),
- _cache[6] || (_cache[6] = createTextVNode("Delete "))
- ]),
- _: 1
- })
- ]),
- content: withCtx(() => [
- createVNode(DeleteKeyDialog)
- ]),
- _: 1
- })
- ])) : createCommentVNode("", true),
- unref(macroRecorder).state.editDelay !== false && typeof unref(macroRecorder).getEditDelay() === "object" ? (openBlock(), createBlock(_sfc_main$i, {
- key: 1,
- onOnOpen: onOpenDialog,
- onOnClose: onCloseDialog
- }, {
- trigger: withCtx(() => [
- createVNode(_sfc_main$h, {
- variant: "secondary",
- size: "sm"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconAlarm)),
- _cache[7] || (_cache[7] = createTextVNode("Edit "))
- ]),
- _: 1
- })
- ]),
- content: withCtx(() => [
- createVNode(EditDelayDialog)
- ]),
- _: 1
- })) : createCommentVNode("", true)
- ])) : createCommentVNode("", true);
- };
- }
-};
-const EditDialogs = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-bf9e32be"]]);
-const _hoisted_1$4 = { class: "macro-recorder__header" };
-const _hoisted_2$3 = { class: "w-full grid grid-cols-[auto_1fr_auto] gap-2" };
-const _sfc_main$4 = {
- __name: "RecorderHeader",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const nameSet = ref(false);
- function changeName(name) {
- macroRecorder.changeName(name);
- nameSet.value = name.length > 0;
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$4, [
- createBaseVNode("div", _hoisted_2$3, [
- _cache[7] || (_cache[7] = createBaseVNode("h4", { class: "" }, "Name:", -1)),
- createBaseVNode("input", {
- id: "macro-name",
- type: "text",
- onInput: _cache[0] || (_cache[0] = withModifiers(($event) => changeName($event.target.value), ["prevent"])),
- placeholder: "New macro"
- }, null, 32),
- createBaseVNode("div", {
- class: normalizeClass(`recording__buttons ${!nameSet.value || unref(macroRecorder).state.edit ? "disabled" : ""}`)
- }, [
- createTextVNode(toDisplayString(unref(macroRecorder).name) + " ", 1),
- !unref(macroRecorder).state.record ? (openBlock(), createBlock(_sfc_main$h, {
- key: 0,
- variant: "primary",
- size: "sm",
- onClick: _cache[1] || (_cache[1] = ($event) => unref(macroRecorder).state.record = true)
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPlayerRecordFilled), { class: "text-red-500" }),
- _cache[5] || (_cache[5] = createTextVNode("Record "))
- ]),
- _: 1
- })) : createCommentVNode("", true),
- unref(macroRecorder).state.record ? (openBlock(), createBlock(_sfc_main$h, {
- key: 1,
- variant: "danger",
- size: "sm",
- onClick: _cache[2] || (_cache[2] = ($event) => unref(macroRecorder).state.record = false)
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPlayerStopFilled), { class: "text-white" }),
- _cache[6] || (_cache[6] = createTextVNode("Stop "))
- ]),
- _: 1
- })) : createCommentVNode("", true)
- ], 2)
- ]),
- unref(macroRecorder).steps.length > 0 ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(`edit__buttons ${unref(macroRecorder).state.record ? "disabled" : ""}`)
- }, [
- createBaseVNode("div", null, [
- !unref(macroRecorder).state.edit ? (openBlock(), createBlock(_sfc_main$h, {
- key: 0,
- variant: "secondary",
- size: "sm",
- onClick: _cache[3] || (_cache[3] = ($event) => unref(macroRecorder).state.edit = true)
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPencil)),
- _cache[8] || (_cache[8] = createTextVNode("Edit "))
- ]),
- _: 1
- })) : createCommentVNode("", true),
- unref(macroRecorder).state.edit ? (openBlock(), createBlock(_sfc_main$h, {
- key: 1,
- variant: "danger",
- size: "sm",
- onClick: _cache[4] || (_cache[4] = ($event) => unref(macroRecorder).resetEdit())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconPlayerStopFilled)),
- _cache[9] || (_cache[9] = createTextVNode("Stop "))
- ]),
- _: 1
- })) : createCommentVNode("", true)
- ]),
- unref(macroRecorder).state.edit ? (openBlock(), createBlock(FixedDelayMenu, { key: 0 })) : createCommentVNode("", true),
- createVNode(EditDialogs)
- ], 2)) : createCommentVNode("", true)
- ]);
- };
- }
-};
-const RecorderHeader = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-19251359"]]);
-const _hoisted_1$3 = {
- id: "validation-error__dialog",
- class: "dialog__content"
-};
-const _hoisted_2$2 = {
- key: 0,
- class: "grid gap-4"
-};
-const _hoisted_3$1 = { key: 0 };
-const _hoisted_4 = { key: 1 };
-const _hoisted_5 = { class: "flex justify-end mt-4" };
-const _sfc_main$3 = {
- __name: "ValidationErrorDialog",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const errors = reactive({
- up: [],
- down: []
- });
- onMounted(() => {
- macroRecorder.$subscribe((mutation) => {
- if (mutation.events && mutation.events.key == "validationErrors") {
- errors.up = mutation.events.newValue !== false ? macroRecorder.state.validationErrors.up : [];
- errors.down = mutation.events.newValue !== false ? macroRecorder.state.validationErrors.down : [];
- }
- console.log(mutation);
- });
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
- _cache[4] || (_cache[4] = createBaseVNode("h4", { class: "text-slate-50 mb-4" }, "There's an error in your macro", -1)),
- errors && errors.up.length > 0 || errors.down.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
- errors.down.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
- _cache[1] || (_cache[1] = createBaseVNode("p", null, [
- createTextVNode(" The following keys have been "),
- createBaseVNode("strong", null, "pressed"),
- createTextVNode(" down, but "),
- createBaseVNode("strong", null, "not released"),
- createTextVNode(". ")
- ], -1)),
- createBaseVNode("ul", null, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(errors.down, (key) => {
- return openBlock(), createElementBlock("li", { key }, toDisplayString(key.toUpperCase()), 1);
- }), 128))
- ])
- ])) : createCommentVNode("", true),
- errors.up.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
- _cache[2] || (_cache[2] = createBaseVNode("p", null, [
- createTextVNode(" The following keys have been "),
- createBaseVNode("strong", null, "released"),
- createTextVNode(", but "),
- createBaseVNode("strong", null, "not pressed"),
- createTextVNode(" down. ")
- ], -1)),
- createBaseVNode("ul", null, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(errors.up, (key) => {
- return openBlock(), createElementBlock("li", { key }, toDisplayString(key.toUpperCase()), 1);
- }), 128))
- ])
- ])) : createCommentVNode("", true)
- ])) : createCommentVNode("", true),
- createBaseVNode("div", _hoisted_5, [
- createVNode(_sfc_main$h, {
- size: "sm",
- variant: "danger",
- onClick: _cache[0] || (_cache[0] = ($event) => unref(macroRecorder).state.validationErrors = false)
- }, {
- default: withCtx(() => _cache[3] || (_cache[3] = [
- createTextVNode(" Close ")
- ])),
- _: 1
- })
- ])
- ]);
- };
- }
-};
-const ValidationErrorDialog = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-ff532573"]]);
-const _hoisted_1$2 = { class: "macro-recorder__footer" };
-const _sfc_main$2 = {
- __name: "RecorderFooter",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- const errorDialog = ref();
- onMounted(() => {
- macroRecorder.$subscribe((mutation) => {
- if (mutation.events && mutation.events.key == "validationErrors") {
- errorDialog.value.toggleDialog(mutation.events.newValue !== false);
- }
- });
- });
- const toggleSave = () => {
- if (!macroRecorder.save()) errorDialog.value.toggleDialog(true);
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
- unref(macroRecorder).steps.length > 0 ? (openBlock(), createBlock(_sfc_main$h, {
- key: 0,
- variant: "danger",
- size: "sm",
- onClick: _cache[0] || (_cache[0] = ($event) => unref(macroRecorder).reset())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconRestore)),
- _cache[2] || (_cache[2] = createTextVNode(" Reset "))
- ]),
- _: 1
- })) : createCommentVNode("", true),
- createVNode(_sfc_main$i, {
- ref_key: "errorDialog",
- ref: errorDialog
- }, {
- content: withCtx(() => [
- createVNode(ValidationErrorDialog)
- ]),
- _: 1
- }, 512),
- unref(macroRecorder).steps.length > 0 ? (openBlock(), createBlock(_sfc_main$h, {
- key: 1,
- disabled: unref(macroRecorder).state.record || unref(macroRecorder).state.edit,
- variant: "success",
- size: "sm",
- onClick: _cache[1] || (_cache[1] = ($event) => toggleSave())
- }, {
- default: withCtx(() => [
- createVNode(unref(IconDeviceFloppy)),
- _cache[3] || (_cache[3] = createTextVNode(" Save "))
- ]),
- _: 1
- }, 8, ["disabled"])) : createCommentVNode("", true)
- ]);
- };
- }
-};
-const RecorderFooter = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-fec5e8b6"]]);
-const _hoisted_1$1 = { class: "macro-recorder mcrm-block block__light" };
-const _hoisted_2$1 = { class: "recorder-interface" };
-const _sfc_main$1 = {
- __name: "MacroRecorder",
- setup(__props) {
- const macroRecorder = useMacroRecorderStore();
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
- createBaseVNode("div", _hoisted_2$1, [
- createVNode(RecorderHeader),
- createBaseVNode("div", {
- class: normalizeClass(`recorder-interface__container ${unref(macroRecorder).state.record && "record"} ${unref(macroRecorder).state.edit && "edit"}`)
- }, [
- createVNode(RecorderOutput),
- createVNode(RecorderInput)
- ], 2),
- createVNode(RecorderFooter)
- ])
- ]);
- };
- }
-};
-const _hoisted_1 = {
- id: "macros",
- class: "panel"
-};
-const _hoisted_2 = { class: "panel__content !p-0" };
-const _hoisted_3 = { class: "macro-panel__content" };
-const _sfc_main = {
- __name: "MacrosView",
- setup(__props) {
- ref(false);
- ref(null);
- onMounted(() => {
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", _hoisted_1, [
- _cache[0] || (_cache[0] = createBaseVNode("h1", { class: "panel__title" }, "Macros", -1)),
- createBaseVNode("div", _hoisted_2, [
- createBaseVNode("div", _hoisted_3, [
- createVNode(MacroOverview),
- createVNode(_sfc_main$1)
- ])
- ])
- ]);
- };
- }
-};
-const MacrosView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c7be9772"]]);
-export {
- MacrosView as default
-};
diff --git a/public/assets/PanelsView-DHxhdGwy.js b/public/assets/PanelsView-DHxhdGwy.js
deleted file mode 100644
index f8d47ff..0000000
--- a/public/assets/PanelsView-DHxhdGwy.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import { _ as _export_sfc, c as createElementBlock, o as openBlock } from "./index-GNAKlyBz.js";
-const _sfc_main = {};
-function _sfc_render(_ctx, _cache) {
- return openBlock(), createElementBlock("div");
-}
-const PanelsView = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
-export {
- PanelsView as default
-};
diff --git a/public/assets/SettingsView-CVQl1jsc.js b/public/assets/SettingsView-CVQl1jsc.js
deleted file mode 100644
index 03a013a..0000000
--- a/public/assets/SettingsView-CVQl1jsc.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import { _ as _export_sfc, c as createElementBlock, o as openBlock } from "./index-GNAKlyBz.js";
-const _sfc_main = {};
-function _sfc_render(_ctx, _cache) {
- return openBlock(), createElementBlock("div");
-}
-const SettingsView = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
-export {
- SettingsView as default
-};
diff --git a/public/assets/index-DjeOPht9.css b/public/assets/index-DjeOPht9.css
deleted file mode 100644
index 34c8025..0000000
--- a/public/assets/index-DjeOPht9.css
+++ /dev/null
@@ -1,2256 +0,0 @@
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-hr.spacer {
- width: calc(var(--spacing) * 6);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: var(--color-gray-300);
- opacity: .8;
- position: relative;
- overflow: visible;
-}
-
-hr.spacer:before, hr.spacer:after {
- width: calc(var(--spacing) * 2);
- height: calc(var(--spacing) * 2);
- --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- background-color: var(--color-gray-300);
- --tw-content: "";
- content: var(--tw-content);
- border-radius: 3.40282e38px;
- position: absolute;
- top: 50%;
-}
-
-hr.spacer:before {
- left: calc(var(--spacing) * -1);
-}
-
-hr.spacer:after {
- right: calc(var(--spacing) * -1);
-}
-
-.mcrm-block {
- column-gap: calc(var(--spacing) * 6);
- row-gap: calc(var(--spacing) * 2);
- border-radius: var(--radius-2xl);
- padding: calc(var(--spacing) * 6);
- --tw-backdrop-blur: blur(var(--blur-lg));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- position: relative;
- overflow: hidden;
-}
-
-.mcrm-block:before {
- inset: calc(var(--spacing) * 0);
- z-index: -1;
- border-radius: var(--radius-2xl);
- --tw-gradient-position: to bottom right in oklab;
- background-image: linear-gradient(var(--tw-gradient-stops));
- --tw-gradient-to: transparent;
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
- --tw-content: "";
- content: var(--tw-content);
- -webkit-mask-composite: xor, source-over;
- width: 100%;
- height: 100%;
- padding: 1px;
- position: absolute;
- -webkit-mask: linear-gradient(#000 0 0), linear-gradient(#000 0 0) content-box;
- -webkit-mask-composite: xor, source-over;
- mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box;
-}
-
-.mcrm-block.block__light {
- background-color: color-mix(in oklab, var(--color-white) 20%, transparent);
-}
-
-.mcrm-block.block__light:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-white) 20%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block__dark {
- background-color: color-mix(in oklab, var(--color-slate-900) 70%, transparent);
-}
-
-.mcrm-block.block__dark:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-slate-400) 40%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block__primary {
- background-color: color-mix(in oklab, var(--color-sky-300) 40%, transparent);
-}
-
-.mcrm-block.block__primary:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-sky-100) 40%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block__secondary {
- background-color: color-mix(in oklab, var(--color-amber-300) 40%, transparent);
-}
-
-.mcrm-block.block__secondary:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-amber-100) 40%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block__success {
- background-color: color-mix(in oklab, var(--color-emerald-300) 40%, transparent);
-}
-
-.mcrm-block.block__success:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-emerald-100) 40%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block__warning {
- background-color: color-mix(in oklab, var(--color-orange-300) 40%, transparent);
-}
-
-.mcrm-block.block__warning:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-orange-100) 40%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block__danger {
- background-color: color-mix(in oklab, var(--color-rose-300) 40%, transparent);
-}
-
-.mcrm-block.block__danger:before {
- --tw-gradient-from: color-mix(in oklab, var(--color-rose-100) 40%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
-}
-
-.mcrm-block.block-spacing__sm, .mcrm-block.block-size__sm {
- column-gap: calc(var(--spacing) * 4);
- row-gap: calc(var(--spacing) * 2);
- padding: calc(var(--spacing) * 4);
-}
-
-.mcrm-block.block-size__sm, .mcrm-block.block-size__sm:before {
- border-radius: var(--radius-lg);
-}
-
-.mcrm-block.block-spacing__lg, .mcrm-block.block-size__lg {
- column-gap: calc(var(--spacing) * 8);
- row-gap: calc(var(--spacing) * 4);
- padding: calc(var(--spacing) * 8);
-}
-
-.mcrm-block.block-size__lg, .mcrm-block.block-size__lg:before {
- border-radius: var(--radius-3xl);
-}
-
-.panel {
- top: calc(var(--spacing) * 2);
- right: calc(var(--spacing) * 4);
- bottom: calc(var(--spacing) * 2);
- left: calc(var(--spacing) * 4);
- grid-template-rows: auto 1fr;
- display: grid;
- position: fixed;
- overflow: hidden;
-}
-
-@media (width >= 40rem) {
- .panel {
- right: calc(var(--spacing) * 16);
- left: calc(var(--spacing) * 16);
- }
-}
-
-.panel > .panel__header, .panel > .panel__title {
- padding-inline: calc(var(--spacing) * 4);
- padding-block: calc(var(--spacing) * 2);
-}
-
-.panel .panel__title {
- --tw-gradient-position: to right in oklab;
- background-image: linear-gradient(var(--tw-gradient-stops));
- --tw-gradient-from: var(--color-amber-300);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
- --tw-gradient-to: color-mix(in oklab, var(--color-white) 50%, transparent);
- width: fit-content;
- padding-top: calc(var(--spacing) * 3);
- padding-left: calc(var(--spacing) * 16);
- color: #0000;
- -webkit-background-clip: text;
- background-clip: text;
-}
-
-@media (width >= 40rem) {
- .panel .panel__title {
- padding-left: calc(var(--spacing) * 4);
- }
-}
-
-.panel .panel__content {
- height: 100%;
- padding-top: calc(var(--spacing) * 4);
- padding-left: calc(var(--spacing) * 0);
- display: grid;
- overflow: auto;
-}
-
-@media (width >= 40rem) {
- .panel .panel__content {
- padding-top: calc(var(--spacing) * 0);
- padding-left: calc(var(--spacing) * 4);
- }
-}
-
-@layer theme {
- :root, :host {
- --font-sans: "Roboto", sans-serif;
- --font-mono: "Fira Code", monospace;
- --color-red-500: oklch(.637 .237 25.331);
- --color-orange-100: oklch(.954 .038 75.164);
- --color-orange-300: oklch(.837 .128 66.29);
- --color-amber-100: oklch(.962 .059 95.617);
- --color-amber-300: oklch(.879 .169 91.605);
- --color-amber-400: oklch(.828 .189 84.429);
- --color-yellow-300: oklch(.905 .182 98.111);
- --color-yellow-500: oklch(.795 .184 86.047);
- --color-yellow-600: oklch(.681 .162 75.834);
- --color-lime-100: oklch(.967 .067 122.328);
- --color-lime-200: oklch(.938 .127 124.321);
- --color-lime-400: oklch(.841 .238 128.85);
- --color-lime-500: oklch(.768 .233 130.85);
- --color-lime-600: oklch(.648 .2 131.684);
- --color-lime-700: oklch(.532 .157 131.589);
- --color-emerald-100: oklch(.95 .052 163.051);
- --color-emerald-300: oklch(.845 .143 164.978);
- --color-sky-100: oklch(.951 .026 236.824);
- --color-sky-200: oklch(.901 .058 230.902);
- --color-sky-300: oklch(.828 .111 230.318);
- --color-sky-400: oklch(.746 .16 232.661);
- --color-sky-500: oklch(.685 .169 237.323);
- --color-sky-600: oklch(.588 .158 241.966);
- --color-sky-700: oklch(.5 .134 242.749);
- --color-sky-900: oklch(.391 .09 240.876);
- --color-rose-100: oklch(.941 .03 12.58);
- --color-rose-200: oklch(.892 .058 10.001);
- --color-rose-300: oklch(.81 .117 11.638);
- --color-rose-400: oklch(.712 .194 13.428);
- --color-rose-500: oklch(.645 .246 16.439);
- --color-slate-50: oklch(.984 .003 247.858);
- --color-slate-100: oklch(.968 .007 247.896);
- --color-slate-200: oklch(.929 .013 255.508);
- --color-slate-300: oklch(.869 .022 252.894);
- --color-slate-400: oklch(.704 .04 256.788);
- --color-slate-500: oklch(.554 .046 257.417);
- --color-slate-600: oklch(.446 .043 257.281);
- --color-slate-700: oklch(.372 .044 257.287);
- --color-slate-800: oklch(.279 .041 260.031);
- --color-slate-900: oklch(.208 .042 265.755);
- --color-slate-950: oklch(.129 .042 264.695);
- --color-gray-300: oklch(.872 .01 258.338);
- --color-black: #000;
- --color-white: #fff;
- --spacing: .25rem;
- --text-xs: .75rem;
- --text-xs--line-height: calc(1 / .75);
- --text-sm: .875rem;
- --text-sm--line-height: calc(1.25 / .875);
- --text-lg: 1.125rem;
- --text-lg--line-height: calc(1.75 / 1.125);
- --text-xl: 1.25rem;
- --text-xl--line-height: calc(1.75 / 1.25);
- --text-2xl: 1.5rem;
- --text-2xl--line-height: calc(2 / 1.5);
- --text-3xl: 1.875rem;
- --text-3xl--line-height: calc(2.25 / 1.875);
- --text-4xl: 2.25rem;
- --text-4xl--line-height: calc(2.5 / 2.25);
- --font-weight-light: 300;
- --font-weight-normal: 400;
- --font-weight-semibold: 600;
- --font-weight-bold: 700;
- --tracking-wide: .025em;
- --tracking-widest: .1em;
- --radius-sm: .25rem;
- --radius-md: .375rem;
- --radius-lg: .5rem;
- --radius-xl: .75rem;
- --radius-2xl: 1rem;
- --radius-3xl: 1.5rem;
- --ease-in-out: cubic-bezier(.4, 0, .2, 1);
- --animate-spin: spin 1s linear infinite;
- --blur-xs: 4px;
- --blur-md: 12px;
- --blur-lg: 16px;
- --blur-3xl: 64px;
- --default-transition-duration: .15s;
- --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
- --default-font-family: var(--font-sans);
- --default-font-feature-settings: var(--font-sans--font-feature-settings);
- --default-font-variation-settings: var(--font-sans--font-variation-settings);
- --default-mono-font-family: var(--font-mono);
- --default-mono-font-feature-settings: var(--font-mono--font-feature-settings);
- --default-mono-font-variation-settings: var(--font-mono--font-variation-settings);
- }
-}
-
-@layer base {
- *, :after, :before, ::backdrop {
- box-sizing: border-box;
- border: 0 solid;
- margin: 0;
- padding: 0;
- }
-
- ::file-selector-button {
- box-sizing: border-box;
- border: 0 solid;
- margin: 0;
- padding: 0;
- }
-
- html, :host {
- -webkit-text-size-adjust: 100%;
- tab-size: 4;
- line-height: 1.5;
- font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
- font-feature-settings: var(--default-font-feature-settings, normal);
- font-variation-settings: var(--default-font-variation-settings, normal);
- -webkit-tap-highlight-color: transparent;
- }
-
- body {
- line-height: inherit;
- }
-
- hr {
- height: 0;
- color: inherit;
- border-top-width: 1px;
- }
-
- abbr:where([title]) {
- -webkit-text-decoration: underline dotted;
- text-decoration: underline dotted;
- }
-
- h1, h2, h3, h4, h5, h6 {
- font-size: inherit;
- font-weight: inherit;
- }
-
- a {
- color: inherit;
- -webkit-text-decoration: inherit;
- -webkit-text-decoration: inherit;
- -webkit-text-decoration: inherit;
- text-decoration: inherit;
- }
-
- b, strong {
- font-weight: bolder;
- }
-
- code, kbd, samp, pre {
- font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
- font-feature-settings: var(--default-mono-font-feature-settings, normal);
- font-variation-settings: var(--default-mono-font-variation-settings, normal);
- font-size: 1em;
- }
-
- small {
- font-size: 80%;
- }
-
- sub, sup {
- vertical-align: baseline;
- font-size: 75%;
- line-height: 0;
- position: relative;
- }
-
- sub {
- bottom: -.25em;
- }
-
- sup {
- top: -.5em;
- }
-
- table {
- text-indent: 0;
- border-color: inherit;
- border-collapse: collapse;
- }
-
- :-moz-focusring {
- outline: auto;
- }
-
- progress {
- vertical-align: baseline;
- }
-
- summary {
- display: list-item;
- }
-
- ol, ul, menu {
- list-style: none;
- }
-
- img, svg, video, canvas, audio, iframe, embed, object {
- vertical-align: middle;
- display: block;
- }
-
- img, video {
- max-width: 100%;
- height: auto;
- }
-
- button, input, select, optgroup, textarea {
- font: inherit;
- font-feature-settings: inherit;
- font-variation-settings: inherit;
- letter-spacing: inherit;
- color: inherit;
- opacity: 1;
- background-color: #0000;
- border-radius: 0;
- }
-
- ::file-selector-button {
- font: inherit;
- font-feature-settings: inherit;
- font-variation-settings: inherit;
- letter-spacing: inherit;
- color: inherit;
- opacity: 1;
- background-color: #0000;
- border-radius: 0;
- }
-
- :where(select:is([multiple], [size])) optgroup {
- font-weight: bolder;
- }
-
- :where(select:is([multiple], [size])) optgroup option {
- padding-inline-start: 20px;
- }
-
- ::file-selector-button {
- margin-inline-end: 4px;
- }
-
- ::placeholder {
- opacity: 1;
- color: color-mix(in oklab, currentColor 50%, transparent);
- }
-
- textarea {
- resize: vertical;
- }
-
- ::-webkit-search-decoration {
- -webkit-appearance: none;
- }
-
- ::-webkit-date-and-time-value {
- min-height: 1lh;
- text-align: inherit;
- }
-
- ::-webkit-datetime-edit {
- display: inline-flex;
- }
-
- ::-webkit-datetime-edit-fields-wrapper {
- padding: 0;
- }
-
- ::-webkit-datetime-edit {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-year-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-month-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-day-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-hour-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-minute-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-second-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-millisecond-field {
- padding-block: 0;
- }
-
- ::-webkit-datetime-edit-meridiem-field {
- padding-block: 0;
- }
-
- :-moz-ui-invalid {
- box-shadow: none;
- }
-
- button, input:where([type="button"], [type="reset"], [type="submit"]) {
- appearance: button;
- }
-
- ::file-selector-button {
- appearance: button;
- }
-
- ::-webkit-inner-spin-button {
- height: auto;
- }
-
- ::-webkit-outer-spin-button {
- height: auto;
- }
-
- [hidden]:where(:not([hidden="until-found"])) {
- display: none !important;
- }
-}
-
-@layer components;
-
-@layer utilities {
- .pointer-events-auto {
- pointer-events: auto;
- }
-
- .pointer-events-none {
- pointer-events: none;
- }
-
- .absolute {
- position: absolute;
- }
-
- .fixed {
- position: fixed;
- }
-
- .relative {
- position: relative;
- }
-
- .inset-0 {
- inset: calc(var(--spacing) * 0);
- }
-
- .inset-1\/2 {
- inset: 50%;
- }
-
- .top-0 {
- top: calc(var(--spacing) * 0);
- }
-
- .top-1\/2 {
- top: 50%;
- }
-
- .top-4 {
- top: calc(var(--spacing) * 4);
- }
-
- .top-20 {
- top: calc(var(--spacing) * 20);
- }
-
- .top-\[10\%\] {
- top: 10%;
- }
-
- .top-full {
- top: 100%;
- }
-
- .right-4 {
- right: calc(var(--spacing) * 4);
- }
-
- .left-0 {
- left: calc(var(--spacing) * 0);
- }
-
- .left-1\/2 {
- left: 50%;
- }
-
- .left-4 {
- left: calc(var(--spacing) * 4);
- }
-
- .left-\[10\%\] {
- left: 10%;
- }
-
- .left-full {
- left: 100%;
- }
-
- .z-50 {
- z-index: 50;
- }
-
- .z-\[-1\] {
- z-index: -1;
- }
-
- .container {
- width: 100%;
- }
-
- @media (width >= 40rem) {
- .container {
- max-width: 40rem;
- }
- }
-
- @media (width >= 48rem) {
- .container {
- max-width: 48rem;
- }
- }
-
- @media (width >= 64rem) {
- .container {
- max-width: 64rem;
- }
- }
-
- @media (width >= 80rem) {
- .container {
- max-width: 80rem;
- }
- }
-
- @media (width >= 96rem) {
- .container {
- max-width: 96rem;
- }
- }
-
- .mt-1 {
- margin-top: calc(var(--spacing) * 1);
- }
-
- .mt-2 {
- margin-top: calc(var(--spacing) * 2);
- }
-
- .mt-4 {
- margin-top: calc(var(--spacing) * 4);
- }
-
- .mt-6 {
- margin-top: calc(var(--spacing) * 6);
- }
-
- .mb-4 {
- margin-bottom: calc(var(--spacing) * 4);
- }
-
- .block {
- display: block;
- }
-
- .flex {
- display: flex;
- }
-
- .grid {
- display: grid;
- }
-
- .hidden {
- display: none;
- }
-
- .aspect-square {
- aspect-ratio: 1;
- }
-
- .size-0 {
- width: calc(var(--spacing) * 0);
- height: calc(var(--spacing) * 0);
- }
-
- .size-4 {
- width: calc(var(--spacing) * 4);
- height: calc(var(--spacing) * 4);
- }
-
- .size-5 {
- width: calc(var(--spacing) * 5);
- height: calc(var(--spacing) * 5);
- }
-
- .size-6 {
- width: calc(var(--spacing) * 6);
- height: calc(var(--spacing) * 6);
- }
-
- .size-12 {
- width: calc(var(--spacing) * 12);
- height: calc(var(--spacing) * 12);
- }
-
- .size-full {
- width: 100%;
- height: 100%;
- }
-
- .h-9 {
- height: calc(var(--spacing) * 9);
- }
-
- .h-fit {
- height: fit-content;
- }
-
- .h-full {
- height: 100%;
- }
-
- .w-44 {
- width: calc(var(--spacing) * 44);
- }
-
- .w-64 {
- width: calc(var(--spacing) * 64);
- }
-
- .w-96 {
- width: calc(var(--spacing) * 96);
- }
-
- .w-fit {
- width: fit-content;
- }
-
- .w-full {
- width: 100%;
- }
-
- .w-px {
- width: 1px;
- }
-
- .max-w-\[calc\(100vw-2rem\)\] {
- max-width: calc(100vw - 2rem);
- }
-
- .min-w-full {
- min-width: 100%;
- }
-
- .flex-grow {
- flex-grow: 1;
- }
-
- .-translate-1\/2 {
- --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
- --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .-translate-x-1\/2 {
- --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .-translate-x-full {
- --tw-translate-x: -100%;
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .translate-x-0 {
- --tw-translate-x: calc(var(--spacing) * 0);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .-translate-y-1\/2 {
- --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .-translate-y-full {
- --tw-translate-y: -100%;
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .translate-y-0 {
- --tw-translate-y: calc(var(--spacing) * 0);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- }
-
- .scale-\[1\.8\] {
- scale: 1.8;
- }
-
- .animate-spin {
- animation: var(--animate-spin);
- }
-
- .cursor-default {
- cursor: default;
- }
-
- .cursor-not-allowed {
- cursor: not-allowed;
- }
-
- .cursor-pointer {
- cursor: pointer;
- }
-
- .list-none {
- list-style-type: none;
- }
-
- .grid-cols-\[1rem_1fr\] {
- grid-template-columns: 1rem 1fr;
- }
-
- .grid-cols-\[2rem_1fr\] {
- grid-template-columns: 2rem 1fr;
- }
-
- .grid-cols-\[25ch_1fr\] {
- grid-template-columns: 25ch 1fr;
- }
-
- .grid-cols-\[auto_1fr\] {
- grid-template-columns: auto 1fr;
- }
-
- .grid-cols-\[auto_1fr_auto\] {
- grid-template-columns: auto 1fr auto;
- }
-
- .grid-rows-\[0fr\] {
- grid-template-rows: 0fr;
- }
-
- .grid-rows-\[auto_1fr\] {
- grid-template-rows: auto 1fr;
- }
-
- .grid-rows-\[auto_1fr_auto\] {
- grid-template-rows: auto 1fr auto;
- }
-
- .flex-row-reverse {
- flex-direction: row-reverse;
- }
-
- .flex-wrap {
- flex-wrap: wrap;
- }
-
- .content-start {
- align-content: flex-start;
- }
-
- .items-center {
- align-items: center;
- }
-
- .items-end {
- align-items: flex-end;
- }
-
- .items-start {
- align-items: flex-start;
- }
-
- .justify-between {
- justify-content: space-between;
- }
-
- .justify-center {
- justify-content: center;
- }
-
- .justify-end {
- justify-content: flex-end;
- }
-
- .\!gap-4 {
- gap: calc(var(--spacing) * 4) !important;
- }
-
- .gap-1 {
- gap: calc(var(--spacing) * 1);
- }
-
- .gap-2 {
- gap: calc(var(--spacing) * 2);
- }
-
- .gap-3 {
- gap: calc(var(--spacing) * 3);
- }
-
- .gap-4 {
- gap: calc(var(--spacing) * 4);
- }
-
- .gap-6 {
- gap: calc(var(--spacing) * 6);
- }
-
- .gap-8 {
- gap: calc(var(--spacing) * 8);
- }
-
- .gap-y-4 {
- row-gap: calc(var(--spacing) * 4);
- }
-
- :where(.divide-y > :not(:last-child)) {
- --tw-divide-y-reverse: 0;
- border-bottom-style: var(--tw-border-style);
- border-top-style: var(--tw-border-style);
- border-top-width: calc(1px * var(--tw-divide-y-reverse));
- border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
- }
-
- :where(.divide-slate-300 > :not(:last-child)) {
- border-color: var(--color-slate-300);
- }
-
- :where(.divide-slate-600 > :not(:last-child)) {
- border-color: var(--color-slate-600);
- }
-
- .truncate {
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- }
-
- .overflow-auto {
- overflow: auto;
- }
-
- .overflow-hidden {
- overflow: hidden;
- }
-
- .rounded-full {
- border-radius: 3.40282e38px;
- }
-
- .rounded-lg {
- border-radius: var(--radius-lg);
- }
-
- .rounded-md {
- border-radius: var(--radius-md);
- }
-
- .rounded-none {
- border-radius: 0;
- }
-
- .rounded-sm {
- border-radius: var(--radius-sm);
- }
-
- .rounded-xl {
- border-radius: var(--radius-xl);
- }
-
- .border {
- border-style: var(--tw-border-style);
- border-width: 1px;
- }
-
- .border-0 {
- border-style: var(--tw-border-style);
- border-width: 0;
- }
-
- .border-b-2 {
- border-bottom-style: var(--tw-border-style);
- border-bottom-width: 2px;
- }
-
- .border-solid {
- --tw-border-style: solid;
- border-style: solid;
- }
-
- .border-amber-100 {
- border-color: var(--color-amber-100);
- }
-
- .border-amber-300\/80 {
- border-color: color-mix(in oklab, var(--color-amber-300) 80%, transparent);
- }
-
- .border-amber-400 {
- border-color: var(--color-amber-400);
- }
-
- .border-lime-100 {
- border-color: var(--color-lime-100);
- }
-
- .border-lime-500 {
- border-color: var(--color-lime-500);
- }
-
- .border-lime-600 {
- border-color: var(--color-lime-600);
- }
-
- .border-rose-100 {
- border-color: var(--color-rose-100);
- }
-
- .border-rose-300 {
- border-color: var(--color-rose-300);
- }
-
- .border-rose-500 {
- border-color: var(--color-rose-500);
- }
-
- .border-sky-100 {
- border-color: var(--color-sky-100);
- }
-
- .border-sky-300 {
- border-color: var(--color-sky-300);
- }
-
- .border-sky-400 {
- border-color: var(--color-sky-400);
- }
-
- .border-slate-200 {
- border-color: var(--color-slate-200);
- }
-
- .border-slate-400 {
- border-color: var(--color-slate-400);
- }
-
- .border-slate-500 {
- border-color: var(--color-slate-500);
- }
-
- .border-slate-600 {
- border-color: var(--color-slate-600);
- }
-
- .border-transparent {
- border-color: #0000;
- }
-
- .border-white\/10 {
- border-color: color-mix(in oklab, var(--color-white) 10%, transparent);
- }
-
- .border-white\/40 {
- border-color: color-mix(in oklab, var(--color-white) 40%, transparent);
- }
-
- .border-white\/50 {
- border-color: color-mix(in oklab, var(--color-white) 50%, transparent);
- }
-
- .border-yellow-300 {
- border-color: var(--color-yellow-300);
- }
-
- .border-b-slate-300 {
- border-bottom-color: var(--color-slate-300);
- }
-
- .bg-amber-100\/10 {
- background-color: color-mix(in oklab, var(--color-amber-100) 10%, transparent);
- }
-
- .bg-amber-100\/60 {
- background-color: color-mix(in oklab, var(--color-amber-100) 60%, transparent);
- }
-
- .bg-amber-400\/10 {
- background-color: color-mix(in oklab, var(--color-amber-400) 10%, transparent);
- }
-
- .bg-amber-400\/40 {
- background-color: color-mix(in oklab, var(--color-amber-400) 40%, transparent);
- }
-
- .bg-black\/50 {
- background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
- }
-
- .bg-lime-200\/10 {
- background-color: color-mix(in oklab, var(--color-lime-200) 10%, transparent);
- }
-
- .bg-lime-400\/10 {
- background-color: color-mix(in oklab, var(--color-lime-400) 10%, transparent);
- }
-
- .bg-lime-400\/40 {
- background-color: color-mix(in oklab, var(--color-lime-400) 40%, transparent);
- }
-
- .bg-lime-500\/80 {
- background-color: color-mix(in oklab, var(--color-lime-500) 80%, transparent);
- }
-
- .bg-lime-700 {
- background-color: var(--color-lime-700);
- }
-
- .bg-rose-200\/20 {
- background-color: color-mix(in oklab, var(--color-rose-200) 20%, transparent);
- }
-
- .bg-rose-400\/10 {
- background-color: color-mix(in oklab, var(--color-rose-400) 10%, transparent);
- }
-
- .bg-rose-400\/40 {
- background-color: color-mix(in oklab, var(--color-rose-400) 40%, transparent);
- }
-
- .bg-sky-100\/10 {
- background-color: color-mix(in oklab, var(--color-sky-100) 10%, transparent);
- }
-
- .bg-sky-200\/20 {
- background-color: color-mix(in oklab, var(--color-sky-200) 20%, transparent);
- }
-
- .bg-sky-400\/40 {
- background-color: color-mix(in oklab, var(--color-sky-400) 40%, transparent);
- }
-
- .bg-sky-400\/50 {
- background-color: color-mix(in oklab, var(--color-sky-400) 50%, transparent);
- }
-
- .bg-sky-500 {
- background-color: var(--color-sky-500);
- }
-
- .bg-sky-900 {
- background-color: var(--color-sky-900);
- }
-
- .bg-sky-900\/10 {
- background-color: color-mix(in oklab, var(--color-sky-900) 10%, transparent);
- }
-
- .bg-slate-100\/60 {
- background-color: color-mix(in oklab, var(--color-slate-100) 60%, transparent);
- }
-
- .bg-slate-200\/10 {
- background-color: color-mix(in oklab, var(--color-slate-200) 10%, transparent);
- }
-
- .bg-slate-400\/40 {
- background-color: color-mix(in oklab, var(--color-slate-400) 40%, transparent);
- }
-
- .bg-slate-500 {
- background-color: var(--color-slate-500);
- }
-
- .bg-slate-600 {
- background-color: var(--color-slate-600);
- }
-
- .bg-slate-700 {
- background-color: var(--color-slate-700);
- }
-
- .bg-slate-700\/80 {
- background-color: color-mix(in oklab, var(--color-slate-700) 80%, transparent);
- }
-
- .bg-slate-950\/50 {
- background-color: color-mix(in oklab, var(--color-slate-950) 50%, transparent);
- }
-
- .bg-transparent {
- background-color: #0000;
- }
-
- .bg-white\/10 {
- background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
- }
-
- .bg-white\/20 {
- background-color: color-mix(in oklab, var(--color-white) 20%, transparent);
- }
-
- .bg-yellow-500\/50 {
- background-color: color-mix(in oklab, var(--color-yellow-500) 50%, transparent);
- }
-
- .to-white\/30 {
- --tw-gradient-to: color-mix(in oklab, var(--color-white) 30%, transparent);
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
- }
-
- .\!stroke-white {
- stroke: var(--color-white) !important;
- }
-
- .stroke-amber-300 {
- stroke: var(--color-amber-300);
- }
-
- .stroke-lime-400 {
- stroke: var(--color-lime-400);
- }
-
- .stroke-rose-400 {
- stroke: var(--color-rose-400);
- }
-
- .stroke-sky-200 {
- stroke: var(--color-sky-200);
- }
-
- .stroke-slate-300 {
- stroke: var(--color-slate-300);
- }
-
- .object-cover {
- object-fit: cover;
- }
-
- .\!p-0 {
- padding: calc(var(--spacing) * 0) !important;
- }
-
- .p-0 {
- padding: calc(var(--spacing) * 0);
- }
-
- .p-1 {
- padding: calc(var(--spacing) * 1);
- }
-
- .p-2 {
- padding: calc(var(--spacing) * 2);
- }
-
- .p-4 {
- padding: calc(var(--spacing) * 4);
- }
-
- .p-28 {
- padding: calc(var(--spacing) * 28);
- }
-
- .px-2 {
- padding-inline: calc(var(--spacing) * 2);
- }
-
- .px-4 {
- padding-inline: calc(var(--spacing) * 4);
- }
-
- .py-0 {
- padding-block: calc(var(--spacing) * 0);
- }
-
- .py-1 {
- padding-block: calc(var(--spacing) * 1);
- }
-
- .py-2 {
- padding-block: calc(var(--spacing) * 2);
- }
-
- .pt-2 {
- padding-top: calc(var(--spacing) * 2);
- }
-
- .pr-2 {
- padding-right: calc(var(--spacing) * 2);
- }
-
- .pr-3 {
- padding-right: calc(var(--spacing) * 3);
- }
-
- .pr-8 {
- padding-right: calc(var(--spacing) * 8);
- }
-
- .pl-1 {
- padding-left: calc(var(--spacing) * 1);
- }
-
- .pl-2 {
- padding-left: calc(var(--spacing) * 2);
- }
-
- .pl-3 {
- padding-left: calc(var(--spacing) * 3);
- }
-
- .pl-4 {
- padding-left: calc(var(--spacing) * 4);
- }
-
- .text-center {
- text-align: center;
- }
-
- .font-mono {
- font-family: var(--font-mono);
- }
-
- .font-sans {
- font-family: var(--font-sans);
- }
-
- .\!text-lg {
- font-size: var(--text-lg) !important;
- line-height: var(--tw-leading, var(--text-lg--line-height)) !important;
- }
-
- .text-4xl {
- font-size: var(--text-4xl);
- line-height: var(--tw-leading, var(--text-4xl--line-height));
- }
-
- .text-lg {
- font-size: var(--text-lg);
- line-height: var(--tw-leading, var(--text-lg--line-height));
- }
-
- .text-sm {
- font-size: var(--text-sm);
- line-height: var(--tw-leading, var(--text-sm--line-height));
- }
-
- .text-xs {
- font-size: var(--text-xs);
- line-height: var(--tw-leading, var(--text-xs--line-height));
- }
-
- .font-bold {
- --tw-font-weight: var(--font-weight-bold);
- font-weight: var(--font-weight-bold);
- }
-
- .font-light {
- --tw-font-weight: var(--font-weight-light);
- font-weight: var(--font-weight-light);
- }
-
- .font-normal {
- --tw-font-weight: var(--font-weight-normal);
- font-weight: var(--font-weight-normal);
- }
-
- .font-semibold {
- --tw-font-weight: var(--font-weight-semibold);
- font-weight: var(--font-weight-semibold);
- }
-
- .tracking-wide {
- --tw-tracking: var(--tracking-wide);
- letter-spacing: var(--tracking-wide);
- }
-
- .tracking-widest {
- --tw-tracking: var(--tracking-widest);
- letter-spacing: var(--tracking-widest);
- }
-
- .whitespace-nowrap {
- white-space: nowrap;
- }
-
- .\!text-white {
- color: var(--color-white) !important;
- }
-
- .text-amber-100 {
- color: var(--color-amber-100);
- }
-
- .text-amber-400 {
- color: var(--color-amber-400);
- }
-
- .text-lime-100 {
- color: var(--color-lime-100);
- }
-
- .text-lime-200 {
- color: var(--color-lime-200);
- }
-
- .text-lime-400 {
- color: var(--color-lime-400);
- }
-
- .text-red-500 {
- color: var(--color-red-500);
- }
-
- .text-rose-200 {
- color: var(--color-rose-200);
- }
-
- .text-rose-400 {
- color: var(--color-rose-400);
- }
-
- .text-sky-100 {
- color: var(--color-sky-100);
- }
-
- .text-sky-300 {
- color: var(--color-sky-300);
- }
-
- .text-slate-50 {
- color: var(--color-slate-50);
- }
-
- .text-slate-100 {
- color: var(--color-slate-100);
- }
-
- .text-slate-200 {
- color: var(--color-slate-200);
- }
-
- .text-slate-300 {
- color: var(--color-slate-300);
- }
-
- .text-slate-800 {
- color: var(--color-slate-800);
- }
-
- .text-slate-950 {
- color: var(--color-slate-950);
- }
-
- .text-white {
- color: var(--color-white);
- }
-
- .text-white\/40 {
- color: color-mix(in oklab, var(--color-white) 40%, transparent);
- }
-
- .text-white\/80 {
- color: color-mix(in oklab, var(--color-white) 80%, transparent);
- }
-
- .uppercase {
- text-transform: uppercase;
- }
-
- .not-italic {
- font-style: normal;
- }
-
- .opacity-0 {
- opacity: 0;
- }
-
- .opacity-35 {
- opacity: .35;
- }
-
- .opacity-40 {
- opacity: .4;
- }
-
- .opacity-50 {
- opacity: .5;
- }
-
- .opacity-80 {
- opacity: .8;
- }
-
- .opacity-100 {
- opacity: 1;
- }
-
- .mix-blend-overlay {
- mix-blend-mode: overlay;
- }
-
- .shadow-md {
- --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
- }
-
- .ring-2 {
- --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentColor);
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
- }
-
- .shadow-black {
- --tw-shadow-color: var(--color-black);
- }
-
- .shadow-sky-600 {
- --tw-shadow-color: var(--color-sky-600);
- }
-
- .shadow-sky-700 {
- --tw-shadow-color: var(--color-sky-700);
- }
-
- .shadow-slate-500 {
- --tw-shadow-color: var(--color-slate-500);
- }
-
- .shadow-yellow-600 {
- --tw-shadow-color: var(--color-yellow-600);
- }
-
- .ring-sky-500 {
- --tw-ring-color: var(--color-sky-500);
- }
-
- .ring-offset-1 {
- --tw-ring-offset-width: 1px;
- --tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
- }
-
- .outline-0 {
- outline-style: var(--tw-outline-style);
- outline-width: 0;
- }
-
- .filter {
- filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
- }
-
- .backdrop-blur-3xl {
- --tw-backdrop-blur: blur(var(--blur-3xl));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- }
-
- .backdrop-blur-md {
- --tw-backdrop-blur: blur(var(--blur-md));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- }
-
- .backdrop-blur-xs {
- --tw-backdrop-blur: blur(var(--blur-xs));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- }
-
- .transition {
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .transition-\[grid-template-rows\] {
- transition-property: grid-template-rows;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .transition-\[stroke\] {
- transition-property: stroke;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .transition-all {
- transition-property: all;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .transition-colors {
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .transition-opacity {
- transition-property: opacity;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .transition-transform {
- transition-property: transform, translate, scale, rotate;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
- transition-duration: var(--tw-duration, var(--default-transition-duration));
- }
-
- .duration-300 {
- --tw-duration: .3s;
- transition-duration: .3s;
- }
-
- .duration-400 {
- --tw-duration: .4s;
- transition-duration: .4s;
- }
-
- .ease-in-out {
- --tw-ease: var(--ease-in-out);
- transition-timing-function: var(--ease-in-out);
- }
-
- .content-\[\'\'\] {
- --tw-content: "";
- content: var(--tw-content);
- }
-
- @media (hover: hover) {
- .hover\:bg-black\/10:hover {
- background-color: color-mix(in oklab, var(--color-black) 10%, transparent);
- }
-
- .hover\:bg-lime-500:hover {
- background-color: var(--color-lime-500);
- }
-
- .hover\:bg-slate-700:hover {
- background-color: var(--color-slate-700);
- }
-
- .hover\:bg-white\/10:hover {
- background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
- }
-
- .hover\:bg-white\/40:hover {
- background-color: color-mix(in oklab, var(--color-white) 40%, transparent);
- }
-
- .hover\:text-white:hover {
- color: var(--color-white);
- }
- }
-
- .focus\:border-transparent:focus {
- border-color: #0000;
- }
-
- .focus\:border-b-sky-400:focus {
- border-bottom-color: var(--color-sky-400);
- }
-
- .focus\:bg-sky-400\/10:focus {
- background-color: color-mix(in oklab, var(--color-sky-400) 10%, transparent);
- }
-}
-
-body {
- background-color: var(--color-slate-900);
- font-family: var(--font-sans);
- --tw-font-weight: var(--font-weight-light);
- font-weight: var(--font-weight-light);
- --tw-tracking: var(--tracking-wide);
- letter-spacing: var(--tracking-wide);
- color: var(--color-slate-50);
-}
-
-h1, h2 {
- font-family: var(--font-mono);
- --tw-font-weight: var(--font-weight-bold);
- font-weight: var(--font-weight-bold);
-}
-
-h3, h4, h5, h6 {
- --tw-font-weight: var(--font-weight-semibold);
- font-weight: var(--font-weight-semibold);
-}
-
-h1 {
- font-size: var(--text-4xl);
- line-height: var(--tw-leading, var(--text-4xl--line-height));
-}
-
-h2 {
- font-size: var(--text-3xl);
- line-height: var(--tw-leading, var(--text-3xl--line-height));
-}
-
-h3 {
- font-size: var(--text-2xl);
- line-height: var(--tw-leading, var(--text-2xl--line-height));
-}
-
-h4 {
- font-size: var(--text-xl);
- line-height: var(--tw-leading, var(--text-xl--line-height));
-}
-
-h5 {
- font-size: var(--text-lg);
- line-height: var(--tw-leading, var(--text-lg--line-height));
-}
-
-input {
- border-radius: var(--radius-md);
- border-style: var(--tw-border-style);
- border-width: 1px;
- border-color: var(--color-slate-400);
- background-color: color-mix(in oklab, var(--color-black) 20%, transparent);
- width: 100%;
- padding-inline: calc(var(--spacing) * 2);
- padding-block: calc(var(--spacing) * 1);
- color: var(--color-white);
-}
-
-:has( > input + span) {
- display: flex;
-}
-
-:has( > input + span) input {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-
-:has( > input + span) span {
- border-top-right-radius: var(--radius-md);
- border-bottom-right-radius: var(--radius-md);
- background-color: var(--color-slate-400);
- padding-inline: calc(var(--spacing) * 2);
- color: var(--color-white);
- align-items: center;
- display: flex;
-}
-
-ul {
- list-style-type: disc;
- list-style-position: inside;
-}
-
-strong {
- --tw-font-weight: var(--font-weight-bold);
- font-weight: var(--font-weight-bold);
-}
-
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-
-@property --tw-translate-x {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-
-@property --tw-translate-y {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-
-@property --tw-translate-z {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-
-@property --tw-content {
- syntax: "*";
- inherits: false;
- initial-value: "";
-}
-
-@property --tw-backdrop-blur {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-brightness {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-contrast {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-grayscale {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-hue-rotate {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-invert {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-opacity {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-saturate {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-backdrop-sepia {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-gradient-position {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-gradient-from {
- syntax: "";
- inherits: false;
- initial-value: #0000;
-}
-
-@property --tw-gradient-via {
- syntax: "";
- inherits: false;
- initial-value: #0000;
-}
-
-@property --tw-gradient-to {
- syntax: "";
- inherits: false;
- initial-value: #0000;
-}
-
-@property --tw-gradient-stops {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-gradient-via-stops {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-gradient-from-position {
- syntax: "";
- inherits: false;
- initial-value: 0%;
-}
-
-@property --tw-gradient-via-position {
- syntax: "";
- inherits: false;
- initial-value: 50%;
-}
-
-@property --tw-gradient-to-position {
- syntax: "";
- inherits: false;
- initial-value: 100%;
-}
-
-@property --tw-divide-y-reverse {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-
-@property --tw-font-weight {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-tracking {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-
-@property --tw-shadow-color {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-inset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-
-@property --tw-inset-shadow-color {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-ring-color {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-
-@property --tw-inset-ring-color {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-inset-ring-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-
-@property --tw-ring-inset {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-ring-offset-width {
- syntax: "";
- inherits: false;
- initial-value: 0;
-}
-
-@property --tw-ring-offset-color {
- syntax: "*";
- inherits: false;
- initial-value: #fff;
-}
-
-@property --tw-ring-offset-shadow {
- syntax: "*";
- inherits: false;
- initial-value: 0 0 #0000;
-}
-
-@property --tw-outline-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-
-@property --tw-blur {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-brightness {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-contrast {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-grayscale {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-hue-rotate {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-invert {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-opacity {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-saturate {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-sepia {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-drop-shadow {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-duration {
- syntax: "*";
- inherits: false
-}
-
-@property --tw-ease {
- syntax: "*";
- inherits: false
-}
-
-@keyframes spin {
- to {
- transform: rotate(360deg);
- }
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-nav {
- z-index: 50;
- display: flex;
- position: relative;
-}
-nav button {
- top: calc(var(--spacing, .25rem) * 4);
- left: calc(var(--spacing, .25rem) * 4);
- aspect-ratio: 1;
- width: calc(var(--spacing, .25rem) * 12);
- height: calc(var(--spacing, .25rem) * 12);
- cursor: pointer;
- border-style: var(--tw-border-style);
- background-color: color-mix(in oklab, var(--color-white, #fff) 20%, transparent);
- --tw-backdrop-blur: blur(var(--blur-md, 12px));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- border-width: 0;
- border-radius: 3.40282e38px;
- position: absolute;
-}
-@media (hover: hover) {
-nav button:hover {
- background-color: color-mix(in oklab, var(--color-white, #fff) 40%, transparent);
-}
-}
-nav button .logo, nav button svg {
- --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
- --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
- translate: var(--tw-translate-x) var(--tw-translate-y);
- transition-property: opacity;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- --tw-duration: .4s;
- --tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
- transition-duration: .4s;
- transition-timing-function: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
- position: absolute;
- inset: 50%;
-}
-nav button .logo {
- width: 100%;
-}
-nav ul {
- top: calc(var(--spacing, .25rem) * 20);
- left: calc(var(--spacing, .25rem) * 0);
- --tw-translate-x: -100%;
- translate: var(--tw-translate-x) var(--tw-translate-y);
- border-radius: var(--radius-xl, .75rem);
- background-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
- --tw-backdrop-blur: blur(var(--blur-md, 12px));
- -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
- transition-property: transform, translate, scale, rotate;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- --tw-duration: .3s;
- --tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
- transition-duration: .3s;
- transition-timing-function: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
- list-style-type: none;
- display: grid;
- position: absolute;
- overflow: hidden;
-}
-:where(nav ul > :not(:last-child)) {
- --tw-divide-y-reverse: 0;
- border-bottom-style: var(--tw-border-style);
- border-top-style: var(--tw-border-style);
- border-top-width: calc(1px * var(--tw-divide-y-reverse));
- border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
- border-color: var(--color-slate-600, oklch(.446 .043 257.281));
-}
-nav ul.open {
- left: calc(var(--spacing, .25rem) * 4);
- --tw-translate-x: calc(var(--spacing, .25rem) * 0);
- translate: var(--tw-translate-x) var(--tw-translate-y);
-}
-nav ul li a {
- align-items: center;
- gap: calc(var(--spacing, .25rem) * 2);
- padding-inline: calc(var(--spacing, .25rem) * 4);
- padding-block: calc(var(--spacing, .25rem) * 2);
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
- border-color: #0000;
- display: flex;
-}
-nav ul li a svg {
- color: color-mix(in oklab, var(--color-white, #fff) 40%, transparent);
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
- transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
-}
-nav ul li a:hover {
- background-color: color-mix(in oklab, var(--color-white, #fff) 20%, transparent);
-}
-nav ul li a:hover svg {
- color: var(--color-white, #fff);
-}
-nav ul li a.router-link-active {
- background-color: color-mix(in oklab, var(--color-sky-200, oklch(.901 .058 230.902)) 20%, transparent);
- color: var(--color-sky-300, oklch(.828 .111 230.318));
-}
-@property --tw-border-style {
- syntax: "*";
- inherits: false;
- initial-value: solid;
-}
-@property --tw-backdrop-blur {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-brightness {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-contrast {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-grayscale {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-hue-rotate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-invert {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-opacity {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-saturate {
- syntax: "*";
- inherits: false
-}
-@property --tw-backdrop-sepia {
- syntax: "*";
- inherits: false
-}
-@property --tw-translate-x {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-y {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-translate-z {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-@property --tw-duration {
- syntax: "*";
- inherits: false
-}
-@property --tw-ease {
- syntax: "*";
- inherits: false
-}
-@property --tw-divide-y-reverse {
- syntax: "*";
- inherits: false;
- initial-value: 0;
-}
-/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
-.app-background[data-v-bf34f349] {
- pointer-events: none;
- inset: calc(var(--spacing, .25rem) * 0);
- z-index: -1;
- opacity: .4;
- width: 100%;
- height: 100%;
- position: fixed;
- overflow: hidden;
-}
-.app-background img[data-v-bf34f349] {
- object-fit: cover;
- width: 100%;
- height: 100%;
- position: absolute;
-}
-.app-background .logo[data-v-bf34f349] {
- padding: calc(var(--spacing, .25rem) * 28);
- opacity: .35;
- mix-blend-mode: overlay;
- position: absolute;
- top: 10%;
- left: 10%;
- scale: 1.8;
-}
diff --git a/public/assets/index-GNAKlyBz.js b/public/assets/index-GNAKlyBz.js
deleted file mode 100644
index e973032..0000000
--- a/public/assets/index-GNAKlyBz.js
+++ /dev/null
@@ -1,18013 +0,0 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MacrosView-Bf1eb3go.js","assets/DialogComp-Ba5-BUTe.js","assets/DialogComp-ByJn29_w.css","assets/MacrosView-B-ccNLSC.css","assets/DevicesView-DqasecOn.js","assets/DevicesView-Dw_Mls3X.css"])))=>i.map(i=>d[i]);
-(function polyfill() {
- const relList = document.createElement("link").relList;
- if (relList && relList.supports && relList.supports("modulepreload")) {
- return;
- }
- for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
- processPreload(link);
- }
- new MutationObserver((mutations) => {
- for (const mutation of mutations) {
- if (mutation.type !== "childList") {
- continue;
- }
- for (const node of mutation.addedNodes) {
- if (node.tagName === "LINK" && node.rel === "modulepreload")
- processPreload(node);
- }
- }
- }).observe(document, { childList: true, subtree: true });
- function getFetchOpts(link) {
- const fetchOpts = {};
- if (link.integrity) fetchOpts.integrity = link.integrity;
- if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
- if (link.crossOrigin === "use-credentials")
- fetchOpts.credentials = "include";
- else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
- else fetchOpts.credentials = "same-origin";
- return fetchOpts;
- }
- function processPreload(link) {
- if (link.ep)
- return;
- link.ep = true;
- const fetchOpts = getFetchOpts(link);
- fetch(link.href, fetchOpts);
- }
-})();
-/**
-* @vue/shared v3.5.13
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/
-/*! #__NO_SIDE_EFFECTS__ */
-// @__NO_SIDE_EFFECTS__
-function makeMap(str) {
- const map = /* @__PURE__ */ Object.create(null);
- for (const key of str.split(",")) map[key] = 1;
- return (val) => val in map;
-}
-const EMPTY_OBJ = {};
-const EMPTY_ARR = [];
-const NOOP = () => {
-};
-const NO = () => false;
-const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
-(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
-const isModelListener = (key) => key.startsWith("onUpdate:");
-const extend$1 = Object.assign;
-const remove = (arr, el) => {
- const i = arr.indexOf(el);
- if (i > -1) {
- arr.splice(i, 1);
- }
-};
-const hasOwnProperty$2 = Object.prototype.hasOwnProperty;
-const hasOwn = (val, key) => hasOwnProperty$2.call(val, key);
-const isArray$2 = Array.isArray;
-const isMap = (val) => toTypeString(val) === "[object Map]";
-const isSet = (val) => toTypeString(val) === "[object Set]";
-const isFunction$1 = (val) => typeof val === "function";
-const isString$1 = (val) => typeof val === "string";
-const isSymbol = (val) => typeof val === "symbol";
-const isObject$1 = (val) => val !== null && typeof val === "object";
-const isPromise = (val) => {
- return (isObject$1(val) || isFunction$1(val)) && isFunction$1(val.then) && isFunction$1(val.catch);
-};
-const objectToString = Object.prototype.toString;
-const toTypeString = (value) => objectToString.call(value);
-const toRawType = (value) => {
- return toTypeString(value).slice(8, -1);
-};
-const isPlainObject$2 = (val) => toTypeString(val) === "[object Object]";
-const isIntegerKey = (key) => isString$1(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
-const isReservedProp = /* @__PURE__ */ makeMap(
- // the leading comma is intentional so empty string "" is also included
- ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
-);
-const cacheStringFunction = (fn) => {
- const cache = /* @__PURE__ */ Object.create(null);
- return (str) => {
- const hit = cache[str];
- return hit || (cache[str] = fn(str));
- };
-};
-const camelizeRE = /-(\w)/g;
-const camelize = cacheStringFunction(
- (str) => {
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
- }
-);
-const hyphenateRE = /\B([A-Z])/g;
-const hyphenate = cacheStringFunction(
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
-);
-const capitalize = cacheStringFunction((str) => {
- return str.charAt(0).toUpperCase() + str.slice(1);
-});
-const toHandlerKey = cacheStringFunction(
- (str) => {
- const s = str ? `on${capitalize(str)}` : ``;
- return s;
- }
-);
-const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
-const invokeArrayFns = (fns, ...arg) => {
- for (let i = 0; i < fns.length; i++) {
- fns[i](...arg);
- }
-};
-const def = (obj, key, value, writable = false) => {
- Object.defineProperty(obj, key, {
- configurable: true,
- enumerable: false,
- writable,
- value
- });
-};
-const looseToNumber = (val) => {
- const n = parseFloat(val);
- return isNaN(n) ? val : n;
-};
-let _globalThis;
-const getGlobalThis = () => {
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
-};
-function normalizeStyle(value) {
- if (isArray$2(value)) {
- const res = {};
- for (let i = 0; i < value.length; i++) {
- const item = value[i];
- const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item);
- if (normalized) {
- for (const key in normalized) {
- res[key] = normalized[key];
- }
- }
- }
- return res;
- } else if (isString$1(value) || isObject$1(value)) {
- return value;
- }
-}
-const listDelimiterRE = /;(?![^(]*\))/g;
-const propertyDelimiterRE = /:([^]+)/;
-const styleCommentRE = /\/\*[^]*?\*\//g;
-function parseStringStyle(cssText) {
- const ret = {};
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
- if (item) {
- const tmp = item.split(propertyDelimiterRE);
- tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
- }
- });
- return ret;
-}
-function normalizeClass(value) {
- let res = "";
- if (isString$1(value)) {
- res = value;
- } else if (isArray$2(value)) {
- for (let i = 0; i < value.length; i++) {
- const normalized = normalizeClass(value[i]);
- if (normalized) {
- res += normalized + " ";
- }
- }
- } else if (isObject$1(value)) {
- for (const name in value) {
- if (value[name]) {
- res += name + " ";
- }
- }
- }
- return res.trim();
-}
-const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
-const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
-function includeBooleanAttr(value) {
- return !!value || value === "";
-}
-const isRef$1 = (val) => {
- return !!(val && val["__v_isRef"] === true);
-};
-const toDisplayString = (val) => {
- return isString$1(val) ? val : val == null ? "" : isArray$2(val) || isObject$1(val) && (val.toString === objectToString || !isFunction$1(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
-};
-const replacer = (_key, val) => {
- if (isRef$1(val)) {
- return replacer(_key, val.value);
- } else if (isMap(val)) {
- return {
- [`Map(${val.size})`]: [...val.entries()].reduce(
- (entries, [key, val2], i) => {
- entries[stringifySymbol(key, i) + " =>"] = val2;
- return entries;
- },
- {}
- )
- };
- } else if (isSet(val)) {
- return {
- [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
- };
- } else if (isSymbol(val)) {
- return stringifySymbol(val);
- } else if (isObject$1(val) && !isArray$2(val) && !isPlainObject$2(val)) {
- return String(val);
- }
- return val;
-};
-const stringifySymbol = (v, i = "") => {
- var _a;
- return (
- // Symbol.description in es2019+ so we need to cast here to pass
- // the lib: es2016 check
- isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
- );
-};
-/**
-* @vue/reactivity v3.5.13
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/
-let activeEffectScope;
-class EffectScope {
- constructor(detached = false) {
- this.detached = detached;
- this._active = true;
- this.effects = [];
- this.cleanups = [];
- this._isPaused = false;
- this.parent = activeEffectScope;
- if (!detached && activeEffectScope) {
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
- this
- ) - 1;
- }
- }
- get active() {
- return this._active;
- }
- pause() {
- if (this._active) {
- this._isPaused = true;
- let i, l;
- if (this.scopes) {
- for (i = 0, l = this.scopes.length; i < l; i++) {
- this.scopes[i].pause();
- }
- }
- for (i = 0, l = this.effects.length; i < l; i++) {
- this.effects[i].pause();
- }
- }
- }
- /**
- * Resumes the effect scope, including all child scopes and effects.
- */
- resume() {
- if (this._active) {
- if (this._isPaused) {
- this._isPaused = false;
- let i, l;
- if (this.scopes) {
- for (i = 0, l = this.scopes.length; i < l; i++) {
- this.scopes[i].resume();
- }
- }
- for (i = 0, l = this.effects.length; i < l; i++) {
- this.effects[i].resume();
- }
- }
- }
- }
- run(fn) {
- if (this._active) {
- const currentEffectScope = activeEffectScope;
- try {
- activeEffectScope = this;
- return fn();
- } finally {
- activeEffectScope = currentEffectScope;
- }
- }
- }
- /**
- * This should only be called on non-detached scopes
- * @internal
- */
- on() {
- activeEffectScope = this;
- }
- /**
- * This should only be called on non-detached scopes
- * @internal
- */
- off() {
- activeEffectScope = this.parent;
- }
- stop(fromParent) {
- if (this._active) {
- this._active = false;
- let i, l;
- for (i = 0, l = this.effects.length; i < l; i++) {
- this.effects[i].stop();
- }
- this.effects.length = 0;
- for (i = 0, l = this.cleanups.length; i < l; i++) {
- this.cleanups[i]();
- }
- this.cleanups.length = 0;
- if (this.scopes) {
- for (i = 0, l = this.scopes.length; i < l; i++) {
- this.scopes[i].stop(true);
- }
- this.scopes.length = 0;
- }
- if (!this.detached && this.parent && !fromParent) {
- const last = this.parent.scopes.pop();
- if (last && last !== this) {
- this.parent.scopes[this.index] = last;
- last.index = this.index;
- }
- }
- this.parent = void 0;
- }
- }
-}
-function effectScope(detached) {
- return new EffectScope(detached);
-}
-function getCurrentScope() {
- return activeEffectScope;
-}
-function onScopeDispose(fn, failSilently = false) {
- if (activeEffectScope) {
- activeEffectScope.cleanups.push(fn);
- }
-}
-let activeSub;
-const pausedQueueEffects = /* @__PURE__ */ new WeakSet();
-class ReactiveEffect {
- constructor(fn) {
- this.fn = fn;
- this.deps = void 0;
- this.depsTail = void 0;
- this.flags = 1 | 4;
- this.next = void 0;
- this.cleanup = void 0;
- this.scheduler = void 0;
- if (activeEffectScope && activeEffectScope.active) {
- activeEffectScope.effects.push(this);
- }
- }
- pause() {
- this.flags |= 64;
- }
- resume() {
- if (this.flags & 64) {
- this.flags &= -65;
- if (pausedQueueEffects.has(this)) {
- pausedQueueEffects.delete(this);
- this.trigger();
- }
- }
- }
- /**
- * @internal
- */
- notify() {
- if (this.flags & 2 && !(this.flags & 32)) {
- return;
- }
- if (!(this.flags & 8)) {
- batch(this);
- }
- }
- run() {
- if (!(this.flags & 1)) {
- return this.fn();
- }
- this.flags |= 2;
- cleanupEffect(this);
- prepareDeps(this);
- const prevEffect = activeSub;
- const prevShouldTrack = shouldTrack;
- activeSub = this;
- shouldTrack = true;
- try {
- return this.fn();
- } finally {
- cleanupDeps(this);
- activeSub = prevEffect;
- shouldTrack = prevShouldTrack;
- this.flags &= -3;
- }
- }
- stop() {
- if (this.flags & 1) {
- for (let link = this.deps; link; link = link.nextDep) {
- removeSub(link);
- }
- this.deps = this.depsTail = void 0;
- cleanupEffect(this);
- this.onStop && this.onStop();
- this.flags &= -2;
- }
- }
- trigger() {
- if (this.flags & 64) {
- pausedQueueEffects.add(this);
- } else if (this.scheduler) {
- this.scheduler();
- } else {
- this.runIfDirty();
- }
- }
- /**
- * @internal
- */
- runIfDirty() {
- if (isDirty(this)) {
- this.run();
- }
- }
- get dirty() {
- return isDirty(this);
- }
-}
-let batchDepth = 0;
-let batchedSub;
-let batchedComputed;
-function batch(sub, isComputed2 = false) {
- sub.flags |= 8;
- if (isComputed2) {
- sub.next = batchedComputed;
- batchedComputed = sub;
- return;
- }
- sub.next = batchedSub;
- batchedSub = sub;
-}
-function startBatch() {
- batchDepth++;
-}
-function endBatch() {
- if (--batchDepth > 0) {
- return;
- }
- if (batchedComputed) {
- let e = batchedComputed;
- batchedComputed = void 0;
- while (e) {
- const next = e.next;
- e.next = void 0;
- e.flags &= -9;
- e = next;
- }
- }
- let error;
- while (batchedSub) {
- let e = batchedSub;
- batchedSub = void 0;
- while (e) {
- const next = e.next;
- e.next = void 0;
- e.flags &= -9;
- if (e.flags & 1) {
- try {
- ;
- e.trigger();
- } catch (err) {
- if (!error) error = err;
- }
- }
- e = next;
- }
- }
- if (error) throw error;
-}
-function prepareDeps(sub) {
- for (let link = sub.deps; link; link = link.nextDep) {
- link.version = -1;
- link.prevActiveLink = link.dep.activeLink;
- link.dep.activeLink = link;
- }
-}
-function cleanupDeps(sub) {
- let head;
- let tail = sub.depsTail;
- let link = tail;
- while (link) {
- const prev = link.prevDep;
- if (link.version === -1) {
- if (link === tail) tail = prev;
- removeSub(link);
- removeDep(link);
- } else {
- head = link;
- }
- link.dep.activeLink = link.prevActiveLink;
- link.prevActiveLink = void 0;
- link = prev;
- }
- sub.deps = head;
- sub.depsTail = tail;
-}
-function isDirty(sub) {
- for (let link = sub.deps; link; link = link.nextDep) {
- if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
- return true;
- }
- }
- if (sub._dirty) {
- return true;
- }
- return false;
-}
-function refreshComputed(computed2) {
- if (computed2.flags & 4 && !(computed2.flags & 16)) {
- return;
- }
- computed2.flags &= -17;
- if (computed2.globalVersion === globalVersion) {
- return;
- }
- computed2.globalVersion = globalVersion;
- const dep = computed2.dep;
- computed2.flags |= 2;
- if (dep.version > 0 && !computed2.isSSR && computed2.deps && !isDirty(computed2)) {
- computed2.flags &= -3;
- return;
- }
- const prevSub = activeSub;
- const prevShouldTrack = shouldTrack;
- activeSub = computed2;
- shouldTrack = true;
- try {
- prepareDeps(computed2);
- const value = computed2.fn(computed2._value);
- if (dep.version === 0 || hasChanged(value, computed2._value)) {
- computed2._value = value;
- dep.version++;
- }
- } catch (err) {
- dep.version++;
- throw err;
- } finally {
- activeSub = prevSub;
- shouldTrack = prevShouldTrack;
- cleanupDeps(computed2);
- computed2.flags &= -3;
- }
-}
-function removeSub(link, soft = false) {
- const { dep, prevSub, nextSub } = link;
- if (prevSub) {
- prevSub.nextSub = nextSub;
- link.prevSub = void 0;
- }
- if (nextSub) {
- nextSub.prevSub = prevSub;
- link.nextSub = void 0;
- }
- if (dep.subs === link) {
- dep.subs = prevSub;
- if (!prevSub && dep.computed) {
- dep.computed.flags &= -5;
- for (let l = dep.computed.deps; l; l = l.nextDep) {
- removeSub(l, true);
- }
- }
- }
- if (!soft && !--dep.sc && dep.map) {
- dep.map.delete(dep.key);
- }
-}
-function removeDep(link) {
- const { prevDep, nextDep } = link;
- if (prevDep) {
- prevDep.nextDep = nextDep;
- link.prevDep = void 0;
- }
- if (nextDep) {
- nextDep.prevDep = prevDep;
- link.nextDep = void 0;
- }
-}
-let shouldTrack = true;
-const trackStack = [];
-function pauseTracking() {
- trackStack.push(shouldTrack);
- shouldTrack = false;
-}
-function resetTracking() {
- const last = trackStack.pop();
- shouldTrack = last === void 0 ? true : last;
-}
-function cleanupEffect(e) {
- const { cleanup } = e;
- e.cleanup = void 0;
- if (cleanup) {
- const prevSub = activeSub;
- activeSub = void 0;
- try {
- cleanup();
- } finally {
- activeSub = prevSub;
- }
- }
-}
-let globalVersion = 0;
-class Link {
- constructor(sub, dep) {
- this.sub = sub;
- this.dep = dep;
- this.version = dep.version;
- this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
- }
-}
-class Dep {
- constructor(computed2) {
- this.computed = computed2;
- this.version = 0;
- this.activeLink = void 0;
- this.subs = void 0;
- this.map = void 0;
- this.key = void 0;
- this.sc = 0;
- }
- track(debugInfo) {
- if (!activeSub || !shouldTrack || activeSub === this.computed) {
- return;
- }
- let link = this.activeLink;
- if (link === void 0 || link.sub !== activeSub) {
- link = this.activeLink = new Link(activeSub, this);
- if (!activeSub.deps) {
- activeSub.deps = activeSub.depsTail = link;
- } else {
- link.prevDep = activeSub.depsTail;
- activeSub.depsTail.nextDep = link;
- activeSub.depsTail = link;
- }
- addSub(link);
- } else if (link.version === -1) {
- link.version = this.version;
- if (link.nextDep) {
- const next = link.nextDep;
- next.prevDep = link.prevDep;
- if (link.prevDep) {
- link.prevDep.nextDep = next;
- }
- link.prevDep = activeSub.depsTail;
- link.nextDep = void 0;
- activeSub.depsTail.nextDep = link;
- activeSub.depsTail = link;
- if (activeSub.deps === link) {
- activeSub.deps = next;
- }
- }
- }
- return link;
- }
- trigger(debugInfo) {
- this.version++;
- globalVersion++;
- this.notify(debugInfo);
- }
- notify(debugInfo) {
- startBatch();
- try {
- if (false) ;
- for (let link = this.subs; link; link = link.prevSub) {
- if (link.sub.notify()) {
- ;
- link.sub.dep.notify();
- }
- }
- } finally {
- endBatch();
- }
- }
-}
-function addSub(link) {
- link.dep.sc++;
- if (link.sub.flags & 4) {
- const computed2 = link.dep.computed;
- if (computed2 && !link.dep.subs) {
- computed2.flags |= 4 | 16;
- for (let l = computed2.deps; l; l = l.nextDep) {
- addSub(l);
- }
- }
- const currentTail = link.dep.subs;
- if (currentTail !== link) {
- link.prevSub = currentTail;
- if (currentTail) currentTail.nextSub = link;
- }
- link.dep.subs = link;
- }
-}
-const targetMap = /* @__PURE__ */ new WeakMap();
-const ITERATE_KEY = Symbol(
- ""
-);
-const MAP_KEY_ITERATE_KEY = Symbol(
- ""
-);
-const ARRAY_ITERATE_KEY = Symbol(
- ""
-);
-function track(target, type, key) {
- if (shouldTrack && activeSub) {
- let depsMap = targetMap.get(target);
- if (!depsMap) {
- targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
- }
- let dep = depsMap.get(key);
- if (!dep) {
- depsMap.set(key, dep = new Dep());
- dep.map = depsMap;
- dep.key = key;
- }
- {
- dep.track();
- }
- }
-}
-function trigger(target, type, key, newValue, oldValue, oldTarget) {
- const depsMap = targetMap.get(target);
- if (!depsMap) {
- globalVersion++;
- return;
- }
- const run = (dep) => {
- if (dep) {
- {
- dep.trigger();
- }
- }
- };
- startBatch();
- if (type === "clear") {
- depsMap.forEach(run);
- } else {
- const targetIsArray = isArray$2(target);
- const isArrayIndex = targetIsArray && isIntegerKey(key);
- if (targetIsArray && key === "length") {
- const newLength = Number(newValue);
- depsMap.forEach((dep, key2) => {
- if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
- run(dep);
- }
- });
- } else {
- if (key !== void 0 || depsMap.has(void 0)) {
- run(depsMap.get(key));
- }
- if (isArrayIndex) {
- run(depsMap.get(ARRAY_ITERATE_KEY));
- }
- switch (type) {
- case "add":
- if (!targetIsArray) {
- run(depsMap.get(ITERATE_KEY));
- if (isMap(target)) {
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
- }
- } else if (isArrayIndex) {
- run(depsMap.get("length"));
- }
- break;
- case "delete":
- if (!targetIsArray) {
- run(depsMap.get(ITERATE_KEY));
- if (isMap(target)) {
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
- }
- }
- break;
- case "set":
- if (isMap(target)) {
- run(depsMap.get(ITERATE_KEY));
- }
- break;
- }
- }
- }
- endBatch();
-}
-function getDepFromReactive(object, key) {
- const depMap = targetMap.get(object);
- return depMap && depMap.get(key);
-}
-function reactiveReadArray(array) {
- const raw = toRaw(array);
- if (raw === array) return raw;
- track(raw, "iterate", ARRAY_ITERATE_KEY);
- return isShallow(array) ? raw : raw.map(toReactive);
-}
-function shallowReadArray(arr) {
- track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
- return arr;
-}
-const arrayInstrumentations = {
- __proto__: null,
- [Symbol.iterator]() {
- return iterator(this, Symbol.iterator, toReactive);
- },
- concat(...args) {
- return reactiveReadArray(this).concat(
- ...args.map((x) => isArray$2(x) ? reactiveReadArray(x) : x)
- );
- },
- entries() {
- return iterator(this, "entries", (value) => {
- value[1] = toReactive(value[1]);
- return value;
- });
- },
- every(fn, thisArg) {
- return apply(this, "every", fn, thisArg, void 0, arguments);
- },
- filter(fn, thisArg) {
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
- },
- find(fn, thisArg) {
- return apply(this, "find", fn, thisArg, toReactive, arguments);
- },
- findIndex(fn, thisArg) {
- return apply(this, "findIndex", fn, thisArg, void 0, arguments);
- },
- findLast(fn, thisArg) {
- return apply(this, "findLast", fn, thisArg, toReactive, arguments);
- },
- findLastIndex(fn, thisArg) {
- return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
- },
- // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
- forEach(fn, thisArg) {
- return apply(this, "forEach", fn, thisArg, void 0, arguments);
- },
- includes(...args) {
- return searchProxy(this, "includes", args);
- },
- indexOf(...args) {
- return searchProxy(this, "indexOf", args);
- },
- join(separator) {
- return reactiveReadArray(this).join(separator);
- },
- // keys() iterator only reads `length`, no optimisation required
- lastIndexOf(...args) {
- return searchProxy(this, "lastIndexOf", args);
- },
- map(fn, thisArg) {
- return apply(this, "map", fn, thisArg, void 0, arguments);
- },
- pop() {
- return noTracking(this, "pop");
- },
- push(...args) {
- return noTracking(this, "push", args);
- },
- reduce(fn, ...args) {
- return reduce(this, "reduce", fn, args);
- },
- reduceRight(fn, ...args) {
- return reduce(this, "reduceRight", fn, args);
- },
- shift() {
- return noTracking(this, "shift");
- },
- // slice could use ARRAY_ITERATE but also seems to beg for range tracking
- some(fn, thisArg) {
- return apply(this, "some", fn, thisArg, void 0, arguments);
- },
- splice(...args) {
- return noTracking(this, "splice", args);
- },
- toReversed() {
- return reactiveReadArray(this).toReversed();
- },
- toSorted(comparer) {
- return reactiveReadArray(this).toSorted(comparer);
- },
- toSpliced(...args) {
- return reactiveReadArray(this).toSpliced(...args);
- },
- unshift(...args) {
- return noTracking(this, "unshift", args);
- },
- values() {
- return iterator(this, "values", toReactive);
- }
-};
-function iterator(self2, method, wrapValue) {
- const arr = shallowReadArray(self2);
- const iter = arr[method]();
- if (arr !== self2 && !isShallow(self2)) {
- iter._next = iter.next;
- iter.next = () => {
- const result = iter._next();
- if (result.value) {
- result.value = wrapValue(result.value);
- }
- return result;
- };
- }
- return iter;
-}
-const arrayProto = Array.prototype;
-function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
- const arr = shallowReadArray(self2);
- const needsWrap = arr !== self2 && !isShallow(self2);
- const methodFn = arr[method];
- if (methodFn !== arrayProto[method]) {
- const result2 = methodFn.apply(self2, args);
- return needsWrap ? toReactive(result2) : result2;
- }
- let wrappedFn = fn;
- if (arr !== self2) {
- if (needsWrap) {
- wrappedFn = function(item, index) {
- return fn.call(this, toReactive(item), index, self2);
- };
- } else if (fn.length > 2) {
- wrappedFn = function(item, index) {
- return fn.call(this, item, index, self2);
- };
- }
- }
- const result = methodFn.call(arr, wrappedFn, thisArg);
- return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
-}
-function reduce(self2, method, fn, args) {
- const arr = shallowReadArray(self2);
- let wrappedFn = fn;
- if (arr !== self2) {
- if (!isShallow(self2)) {
- wrappedFn = function(acc, item, index) {
- return fn.call(this, acc, toReactive(item), index, self2);
- };
- } else if (fn.length > 3) {
- wrappedFn = function(acc, item, index) {
- return fn.call(this, acc, item, index, self2);
- };
- }
- }
- return arr[method](wrappedFn, ...args);
-}
-function searchProxy(self2, method, args) {
- const arr = toRaw(self2);
- track(arr, "iterate", ARRAY_ITERATE_KEY);
- const res = arr[method](...args);
- if ((res === -1 || res === false) && isProxy(args[0])) {
- args[0] = toRaw(args[0]);
- return arr[method](...args);
- }
- return res;
-}
-function noTracking(self2, method, args = []) {
- pauseTracking();
- startBatch();
- const res = toRaw(self2)[method].apply(self2, args);
- endBatch();
- resetTracking();
- return res;
-}
-const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
-const builtInSymbols = new Set(
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
-);
-function hasOwnProperty$1(key) {
- if (!isSymbol(key)) key = String(key);
- const obj = toRaw(this);
- track(obj, "has", key);
- return obj.hasOwnProperty(key);
-}
-class BaseReactiveHandler {
- constructor(_isReadonly = false, _isShallow = false) {
- this._isReadonly = _isReadonly;
- this._isShallow = _isShallow;
- }
- get(target, key, receiver) {
- if (key === "__v_skip") return target["__v_skip"];
- const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
- if (key === "__v_isReactive") {
- return !isReadonly2;
- } else if (key === "__v_isReadonly") {
- return isReadonly2;
- } else if (key === "__v_isShallow") {
- return isShallow2;
- } else if (key === "__v_raw") {
- if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
- // this means the receiver is a user proxy of the reactive proxy
- Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
- return target;
- }
- return;
- }
- const targetIsArray = isArray$2(target);
- if (!isReadonly2) {
- let fn;
- if (targetIsArray && (fn = arrayInstrumentations[key])) {
- return fn;
- }
- if (key === "hasOwnProperty") {
- return hasOwnProperty$1;
- }
- }
- const res = Reflect.get(
- target,
- key,
- // if this is a proxy wrapping a ref, return methods using the raw ref
- // as receiver so that we don't have to call `toRaw` on the ref in all
- // its class methods
- isRef(target) ? target : receiver
- );
- if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
- return res;
- }
- if (!isReadonly2) {
- track(target, "get", key);
- }
- if (isShallow2) {
- return res;
- }
- if (isRef(res)) {
- return targetIsArray && isIntegerKey(key) ? res : res.value;
- }
- if (isObject$1(res)) {
- return isReadonly2 ? readonly(res) : reactive(res);
- }
- return res;
- }
-}
-class MutableReactiveHandler extends BaseReactiveHandler {
- constructor(isShallow2 = false) {
- super(false, isShallow2);
- }
- set(target, key, value, receiver) {
- let oldValue = target[key];
- if (!this._isShallow) {
- const isOldValueReadonly = isReadonly(oldValue);
- if (!isShallow(value) && !isReadonly(value)) {
- oldValue = toRaw(oldValue);
- value = toRaw(value);
- }
- if (!isArray$2(target) && isRef(oldValue) && !isRef(value)) {
- if (isOldValueReadonly) {
- return false;
- } else {
- oldValue.value = value;
- return true;
- }
- }
- }
- const hadKey = isArray$2(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
- const result = Reflect.set(
- target,
- key,
- value,
- isRef(target) ? target : receiver
- );
- if (target === toRaw(receiver)) {
- if (!hadKey) {
- trigger(target, "add", key, value);
- } else if (hasChanged(value, oldValue)) {
- trigger(target, "set", key, value);
- }
- }
- return result;
- }
- deleteProperty(target, key) {
- const hadKey = hasOwn(target, key);
- target[key];
- const result = Reflect.deleteProperty(target, key);
- if (result && hadKey) {
- trigger(target, "delete", key, void 0);
- }
- return result;
- }
- has(target, key) {
- const result = Reflect.has(target, key);
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
- track(target, "has", key);
- }
- return result;
- }
- ownKeys(target) {
- track(
- target,
- "iterate",
- isArray$2(target) ? "length" : ITERATE_KEY
- );
- return Reflect.ownKeys(target);
- }
-}
-class ReadonlyReactiveHandler extends BaseReactiveHandler {
- constructor(isShallow2 = false) {
- super(true, isShallow2);
- }
- set(target, key) {
- return true;
- }
- deleteProperty(target, key) {
- return true;
- }
-}
-const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
-const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
-const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
-const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
-const toShallow = (value) => value;
-const getProto = (v) => Reflect.getPrototypeOf(v);
-function createIterableMethod(method, isReadonly2, isShallow2) {
- return function(...args) {
- const target = this["__v_raw"];
- const rawTarget = toRaw(target);
- const targetIsMap = isMap(rawTarget);
- const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
- const isKeyOnly = method === "keys" && targetIsMap;
- const innerIterator = target[method](...args);
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
- !isReadonly2 && track(
- rawTarget,
- "iterate",
- isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
- );
- return {
- // iterator protocol
- next() {
- const { value, done } = innerIterator.next();
- return done ? { value, done } : {
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
- done
- };
- },
- // iterable protocol
- [Symbol.iterator]() {
- return this;
- }
- };
- };
-}
-function createReadonlyMethod(type) {
- return function(...args) {
- return type === "delete" ? false : type === "clear" ? void 0 : this;
- };
-}
-function createInstrumentations(readonly2, shallow) {
- const instrumentations = {
- get(key) {
- const target = this["__v_raw"];
- const rawTarget = toRaw(target);
- const rawKey = toRaw(key);
- if (!readonly2) {
- if (hasChanged(key, rawKey)) {
- track(rawTarget, "get", key);
- }
- track(rawTarget, "get", rawKey);
- }
- const { has } = getProto(rawTarget);
- const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
- if (has.call(rawTarget, key)) {
- return wrap(target.get(key));
- } else if (has.call(rawTarget, rawKey)) {
- return wrap(target.get(rawKey));
- } else if (target !== rawTarget) {
- target.get(key);
- }
- },
- get size() {
- const target = this["__v_raw"];
- !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
- return Reflect.get(target, "size", target);
- },
- has(key) {
- const target = this["__v_raw"];
- const rawTarget = toRaw(target);
- const rawKey = toRaw(key);
- if (!readonly2) {
- if (hasChanged(key, rawKey)) {
- track(rawTarget, "has", key);
- }
- track(rawTarget, "has", rawKey);
- }
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
- },
- forEach(callback, thisArg) {
- const observed = this;
- const target = observed["__v_raw"];
- const rawTarget = toRaw(target);
- const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
- !readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
- return target.forEach((value, key) => {
- return callback.call(thisArg, wrap(value), wrap(key), observed);
- });
- }
- };
- extend$1(
- instrumentations,
- readonly2 ? {
- add: createReadonlyMethod("add"),
- set: createReadonlyMethod("set"),
- delete: createReadonlyMethod("delete"),
- clear: createReadonlyMethod("clear")
- } : {
- add(value) {
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
- value = toRaw(value);
- }
- const target = toRaw(this);
- const proto = getProto(target);
- const hadKey = proto.has.call(target, value);
- if (!hadKey) {
- target.add(value);
- trigger(target, "add", value, value);
- }
- return this;
- },
- set(key, value) {
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
- value = toRaw(value);
- }
- const target = toRaw(this);
- const { has, get } = getProto(target);
- let hadKey = has.call(target, key);
- if (!hadKey) {
- key = toRaw(key);
- hadKey = has.call(target, key);
- }
- const oldValue = get.call(target, key);
- target.set(key, value);
- if (!hadKey) {
- trigger(target, "add", key, value);
- } else if (hasChanged(value, oldValue)) {
- trigger(target, "set", key, value);
- }
- return this;
- },
- delete(key) {
- const target = toRaw(this);
- const { has, get } = getProto(target);
- let hadKey = has.call(target, key);
- if (!hadKey) {
- key = toRaw(key);
- hadKey = has.call(target, key);
- }
- get ? get.call(target, key) : void 0;
- const result = target.delete(key);
- if (hadKey) {
- trigger(target, "delete", key, void 0);
- }
- return result;
- },
- clear() {
- const target = toRaw(this);
- const hadItems = target.size !== 0;
- const result = target.clear();
- if (hadItems) {
- trigger(
- target,
- "clear",
- void 0,
- void 0
- );
- }
- return result;
- }
- }
- );
- const iteratorMethods = [
- "keys",
- "values",
- "entries",
- Symbol.iterator
- ];
- iteratorMethods.forEach((method) => {
- instrumentations[method] = createIterableMethod(method, readonly2, shallow);
- });
- return instrumentations;
-}
-function createInstrumentationGetter(isReadonly2, shallow) {
- const instrumentations = createInstrumentations(isReadonly2, shallow);
- return (target, key, receiver) => {
- if (key === "__v_isReactive") {
- return !isReadonly2;
- } else if (key === "__v_isReadonly") {
- return isReadonly2;
- } else if (key === "__v_raw") {
- return target;
- }
- return Reflect.get(
- hasOwn(instrumentations, key) && key in target ? instrumentations : target,
- key,
- receiver
- );
- };
-}
-const mutableCollectionHandlers = {
- get: /* @__PURE__ */ createInstrumentationGetter(false, false)
-};
-const shallowCollectionHandlers = {
- get: /* @__PURE__ */ createInstrumentationGetter(false, true)
-};
-const readonlyCollectionHandlers = {
- get: /* @__PURE__ */ createInstrumentationGetter(true, false)
-};
-const shallowReadonlyCollectionHandlers = {
- get: /* @__PURE__ */ createInstrumentationGetter(true, true)
-};
-const reactiveMap = /* @__PURE__ */ new WeakMap();
-const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
-const readonlyMap = /* @__PURE__ */ new WeakMap();
-const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
-function targetTypeMap(rawType) {
- switch (rawType) {
- case "Object":
- case "Array":
- return 1;
- case "Map":
- case "Set":
- case "WeakMap":
- case "WeakSet":
- return 2;
- default:
- return 0;
- }
-}
-function getTargetType(value) {
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
-}
-function reactive(target) {
- if (isReadonly(target)) {
- return target;
- }
- return createReactiveObject(
- target,
- false,
- mutableHandlers,
- mutableCollectionHandlers,
- reactiveMap
- );
-}
-function shallowReactive(target) {
- return createReactiveObject(
- target,
- false,
- shallowReactiveHandlers,
- shallowCollectionHandlers,
- shallowReactiveMap
- );
-}
-function readonly(target) {
- return createReactiveObject(
- target,
- true,
- readonlyHandlers,
- readonlyCollectionHandlers,
- readonlyMap
- );
-}
-function shallowReadonly(target) {
- return createReactiveObject(
- target,
- true,
- shallowReadonlyHandlers,
- shallowReadonlyCollectionHandlers,
- shallowReadonlyMap
- );
-}
-function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
- if (!isObject$1(target)) {
- return target;
- }
- if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
- return target;
- }
- const existingProxy = proxyMap.get(target);
- if (existingProxy) {
- return existingProxy;
- }
- const targetType = getTargetType(target);
- if (targetType === 0) {
- return target;
- }
- const proxy = new Proxy(
- target,
- targetType === 2 ? collectionHandlers : baseHandlers
- );
- proxyMap.set(target, proxy);
- return proxy;
-}
-function isReactive(value) {
- if (isReadonly(value)) {
- return isReactive(value["__v_raw"]);
- }
- return !!(value && value["__v_isReactive"]);
-}
-function isReadonly(value) {
- return !!(value && value["__v_isReadonly"]);
-}
-function isShallow(value) {
- return !!(value && value["__v_isShallow"]);
-}
-function isProxy(value) {
- return value ? !!value["__v_raw"] : false;
-}
-function toRaw(observed) {
- const raw = observed && observed["__v_raw"];
- return raw ? toRaw(raw) : observed;
-}
-function markRaw(value) {
- if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
- def(value, "__v_skip", true);
- }
- return value;
-}
-const toReactive = (value) => isObject$1(value) ? reactive(value) : value;
-const toReadonly = (value) => isObject$1(value) ? readonly(value) : value;
-function isRef(r) {
- return r ? r["__v_isRef"] === true : false;
-}
-function ref(value) {
- return createRef(value, false);
-}
-function shallowRef(value) {
- return createRef(value, true);
-}
-function createRef(rawValue, shallow) {
- if (isRef(rawValue)) {
- return rawValue;
- }
- return new RefImpl(rawValue, shallow);
-}
-class RefImpl {
- constructor(value, isShallow2) {
- this.dep = new Dep();
- this["__v_isRef"] = true;
- this["__v_isShallow"] = false;
- this._rawValue = isShallow2 ? value : toRaw(value);
- this._value = isShallow2 ? value : toReactive(value);
- this["__v_isShallow"] = isShallow2;
- }
- get value() {
- {
- this.dep.track();
- }
- return this._value;
- }
- set value(newValue) {
- const oldValue = this._rawValue;
- const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
- newValue = useDirectValue ? newValue : toRaw(newValue);
- if (hasChanged(newValue, oldValue)) {
- this._rawValue = newValue;
- this._value = useDirectValue ? newValue : toReactive(newValue);
- {
- this.dep.trigger();
- }
- }
- }
-}
-function unref(ref2) {
- return isRef(ref2) ? ref2.value : ref2;
-}
-const shallowUnwrapHandlers = {
- get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
- set: (target, key, value, receiver) => {
- const oldValue = target[key];
- if (isRef(oldValue) && !isRef(value)) {
- oldValue.value = value;
- return true;
- } else {
- return Reflect.set(target, key, value, receiver);
- }
- }
-};
-function proxyRefs(objectWithRefs) {
- return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
-}
-function toRefs(object) {
- const ret = isArray$2(object) ? new Array(object.length) : {};
- for (const key in object) {
- ret[key] = propertyToRef(object, key);
- }
- return ret;
-}
-class ObjectRefImpl {
- constructor(_object, _key, _defaultValue) {
- this._object = _object;
- this._key = _key;
- this._defaultValue = _defaultValue;
- this["__v_isRef"] = true;
- this._value = void 0;
- }
- get value() {
- const val = this._object[this._key];
- return this._value = val === void 0 ? this._defaultValue : val;
- }
- set value(newVal) {
- this._object[this._key] = newVal;
- }
- get dep() {
- return getDepFromReactive(toRaw(this._object), this._key);
- }
-}
-function propertyToRef(source, key, defaultValue) {
- const val = source[key];
- return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
-}
-class ComputedRefImpl {
- constructor(fn, setter, isSSR) {
- this.fn = fn;
- this.setter = setter;
- this._value = void 0;
- this.dep = new Dep(this);
- this.__v_isRef = true;
- this.deps = void 0;
- this.depsTail = void 0;
- this.flags = 16;
- this.globalVersion = globalVersion - 1;
- this.next = void 0;
- this.effect = this;
- this["__v_isReadonly"] = !setter;
- this.isSSR = isSSR;
- }
- /**
- * @internal
- */
- notify() {
- this.flags |= 16;
- if (!(this.flags & 8) && // avoid infinite self recursion
- activeSub !== this) {
- batch(this, true);
- return true;
- }
- }
- get value() {
- const link = this.dep.track();
- refreshComputed(this);
- if (link) {
- link.version = this.dep.version;
- }
- return this._value;
- }
- set value(newValue) {
- if (this.setter) {
- this.setter(newValue);
- }
- }
-}
-function computed$1(getterOrOptions, debugOptions, isSSR = false) {
- let getter;
- let setter;
- if (isFunction$1(getterOrOptions)) {
- getter = getterOrOptions;
- } else {
- getter = getterOrOptions.get;
- setter = getterOrOptions.set;
- }
- const cRef = new ComputedRefImpl(getter, setter, isSSR);
- return cRef;
-}
-const INITIAL_WATCHER_VALUE = {};
-const cleanupMap = /* @__PURE__ */ new WeakMap();
-let activeWatcher = void 0;
-function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
- if (owner) {
- let cleanups = cleanupMap.get(owner);
- if (!cleanups) cleanupMap.set(owner, cleanups = []);
- cleanups.push(cleanupFn);
- }
-}
-function watch$1(source, cb, options = EMPTY_OBJ) {
- const { immediate, deep, once, scheduler, augmentJob, call } = options;
- const reactiveGetter = (source2) => {
- if (deep) return source2;
- if (isShallow(source2) || deep === false || deep === 0)
- return traverse(source2, 1);
- return traverse(source2);
- };
- let effect2;
- let getter;
- let cleanup;
- let boundCleanup;
- let forceTrigger = false;
- let isMultiSource = false;
- if (isRef(source)) {
- getter = () => source.value;
- forceTrigger = isShallow(source);
- } else if (isReactive(source)) {
- getter = () => reactiveGetter(source);
- forceTrigger = true;
- } else if (isArray$2(source)) {
- isMultiSource = true;
- forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
- getter = () => source.map((s) => {
- if (isRef(s)) {
- return s.value;
- } else if (isReactive(s)) {
- return reactiveGetter(s);
- } else if (isFunction$1(s)) {
- return call ? call(s, 2) : s();
- } else ;
- });
- } else if (isFunction$1(source)) {
- if (cb) {
- getter = call ? () => call(source, 2) : source;
- } else {
- getter = () => {
- if (cleanup) {
- pauseTracking();
- try {
- cleanup();
- } finally {
- resetTracking();
- }
- }
- const currentEffect = activeWatcher;
- activeWatcher = effect2;
- try {
- return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
- } finally {
- activeWatcher = currentEffect;
- }
- };
- }
- } else {
- getter = NOOP;
- }
- if (cb && deep) {
- const baseGetter = getter;
- const depth = deep === true ? Infinity : deep;
- getter = () => traverse(baseGetter(), depth);
- }
- const scope = getCurrentScope();
- const watchHandle = () => {
- effect2.stop();
- if (scope && scope.active) {
- remove(scope.effects, effect2);
- }
- };
- if (once && cb) {
- const _cb = cb;
- cb = (...args) => {
- _cb(...args);
- watchHandle();
- };
- }
- let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
- const job = (immediateFirstRun) => {
- if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) {
- return;
- }
- if (cb) {
- const newValue = effect2.run();
- if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
- if (cleanup) {
- cleanup();
- }
- const currentWatcher = activeWatcher;
- activeWatcher = effect2;
- try {
- const args = [
- newValue,
- // pass undefined as the old value when it's changed for the first time
- oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
- boundCleanup
- ];
- call ? call(cb, 3, args) : (
- // @ts-expect-error
- cb(...args)
- );
- oldValue = newValue;
- } finally {
- activeWatcher = currentWatcher;
- }
- }
- } else {
- effect2.run();
- }
- };
- if (augmentJob) {
- augmentJob(job);
- }
- effect2 = new ReactiveEffect(getter);
- effect2.scheduler = scheduler ? () => scheduler(job, false) : job;
- boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2);
- cleanup = effect2.onStop = () => {
- const cleanups = cleanupMap.get(effect2);
- if (cleanups) {
- if (call) {
- call(cleanups, 4);
- } else {
- for (const cleanup2 of cleanups) cleanup2();
- }
- cleanupMap.delete(effect2);
- }
- };
- if (cb) {
- if (immediate) {
- job(true);
- } else {
- oldValue = effect2.run();
- }
- } else if (scheduler) {
- scheduler(job.bind(null, true), true);
- } else {
- effect2.run();
- }
- watchHandle.pause = effect2.pause.bind(effect2);
- watchHandle.resume = effect2.resume.bind(effect2);
- watchHandle.stop = watchHandle;
- return watchHandle;
-}
-function traverse(value, depth = Infinity, seen2) {
- if (depth <= 0 || !isObject$1(value) || value["__v_skip"]) {
- return value;
- }
- seen2 = seen2 || /* @__PURE__ */ new Set();
- if (seen2.has(value)) {
- return value;
- }
- seen2.add(value);
- depth--;
- if (isRef(value)) {
- traverse(value.value, depth, seen2);
- } else if (isArray$2(value)) {
- for (let i = 0; i < value.length; i++) {
- traverse(value[i], depth, seen2);
- }
- } else if (isSet(value) || isMap(value)) {
- value.forEach((v) => {
- traverse(v, depth, seen2);
- });
- } else if (isPlainObject$2(value)) {
- for (const key in value) {
- traverse(value[key], depth, seen2);
- }
- for (const key of Object.getOwnPropertySymbols(value)) {
- if (Object.prototype.propertyIsEnumerable.call(value, key)) {
- traverse(value[key], depth, seen2);
- }
- }
- }
- return value;
-}
-/**
-* @vue/runtime-core v3.5.13
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/
-const stack = [];
-let isWarning = false;
-function warn$1(msg, ...args) {
- if (isWarning) return;
- isWarning = true;
- pauseTracking();
- const instance = stack.length ? stack[stack.length - 1].component : null;
- const appWarnHandler = instance && instance.appContext.config.warnHandler;
- const trace = getComponentTrace();
- if (appWarnHandler) {
- callWithErrorHandling(
- appWarnHandler,
- instance,
- 11,
- [
- // eslint-disable-next-line no-restricted-syntax
- msg + args.map((a) => {
- var _a, _b;
- return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
- }).join(""),
- instance && instance.proxy,
- trace.map(
- ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
- ).join("\n"),
- trace
- ]
- );
- } else {
- const warnArgs = [`[Vue warn]: ${msg}`, ...args];
- if (trace.length && // avoid spamming console during tests
- true) {
- warnArgs.push(`
-`, ...formatTrace(trace));
- }
- console.warn(...warnArgs);
- }
- resetTracking();
- isWarning = false;
-}
-function getComponentTrace() {
- let currentVNode = stack[stack.length - 1];
- if (!currentVNode) {
- return [];
- }
- const normalizedStack = [];
- while (currentVNode) {
- const last = normalizedStack[0];
- if (last && last.vnode === currentVNode) {
- last.recurseCount++;
- } else {
- normalizedStack.push({
- vnode: currentVNode,
- recurseCount: 0
- });
- }
- const parentInstance = currentVNode.component && currentVNode.component.parent;
- currentVNode = parentInstance && parentInstance.vnode;
- }
- return normalizedStack;
-}
-function formatTrace(trace) {
- const logs = [];
- trace.forEach((entry, i) => {
- logs.push(...i === 0 ? [] : [`
-`], ...formatTraceEntry(entry));
- });
- return logs;
-}
-function formatTraceEntry({ vnode, recurseCount }) {
- const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
- const isRoot = vnode.component ? vnode.component.parent == null : false;
- const open = ` at <${formatComponentName(
- vnode.component,
- vnode.type,
- isRoot
- )}`;
- const close = `>` + postfix;
- return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
-}
-function formatProps(props) {
- const res = [];
- const keys = Object.keys(props);
- keys.slice(0, 3).forEach((key) => {
- res.push(...formatProp(key, props[key]));
- });
- if (keys.length > 3) {
- res.push(` ...`);
- }
- return res;
-}
-function formatProp(key, value, raw) {
- if (isString$1(value)) {
- value = JSON.stringify(value);
- return raw ? value : [`${key}=${value}`];
- } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
- return raw ? value : [`${key}=${value}`];
- } else if (isRef(value)) {
- value = formatProp(key, toRaw(value.value), true);
- return raw ? value : [`${key}=Ref<`, value, `>`];
- } else if (isFunction$1(value)) {
- return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
- } else {
- value = toRaw(value);
- return raw ? value : [`${key}=`, value];
- }
-}
-function callWithErrorHandling(fn, instance, type, args) {
- try {
- return args ? fn(...args) : fn();
- } catch (err) {
- handleError(err, instance, type);
- }
-}
-function callWithAsyncErrorHandling(fn, instance, type, args) {
- if (isFunction$1(fn)) {
- const res = callWithErrorHandling(fn, instance, type, args);
- if (res && isPromise(res)) {
- res.catch((err) => {
- handleError(err, instance, type);
- });
- }
- return res;
- }
- if (isArray$2(fn)) {
- const values = [];
- for (let i = 0; i < fn.length; i++) {
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
- }
- return values;
- }
-}
-function handleError(err, instance, type, throwInDev = true) {
- const contextVNode = instance ? instance.vnode : null;
- const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
- if (instance) {
- let cur = instance.parent;
- const exposedInstance = instance.proxy;
- const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
- while (cur) {
- const errorCapturedHooks = cur.ec;
- if (errorCapturedHooks) {
- for (let i = 0; i < errorCapturedHooks.length; i++) {
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
- return;
- }
- }
- }
- cur = cur.parent;
- }
- if (errorHandler) {
- pauseTracking();
- callWithErrorHandling(errorHandler, null, 10, [
- err,
- exposedInstance,
- errorInfo
- ]);
- resetTracking();
- return;
- }
- }
- logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
-}
-function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
- if (throwInProd) {
- throw err;
- } else {
- console.error(err);
- }
-}
-const queue = [];
-let flushIndex = -1;
-const pendingPostFlushCbs = [];
-let activePostFlushCbs = null;
-let postFlushIndex = 0;
-const resolvedPromise = /* @__PURE__ */ Promise.resolve();
-let currentFlushPromise = null;
-function nextTick(fn) {
- const p2 = currentFlushPromise || resolvedPromise;
- return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
-}
-function findInsertionIndex$1(id) {
- let start = flushIndex + 1;
- let end = queue.length;
- while (start < end) {
- const middle = start + end >>> 1;
- const middleJob = queue[middle];
- const middleJobId = getId(middleJob);
- if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
- start = middle + 1;
- } else {
- end = middle;
- }
- }
- return start;
-}
-function queueJob(job) {
- if (!(job.flags & 1)) {
- const jobId = getId(job);
- const lastJob = queue[queue.length - 1];
- if (!lastJob || // fast path when the job id is larger than the tail
- !(job.flags & 2) && jobId >= getId(lastJob)) {
- queue.push(job);
- } else {
- queue.splice(findInsertionIndex$1(jobId), 0, job);
- }
- job.flags |= 1;
- queueFlush();
- }
-}
-function queueFlush() {
- if (!currentFlushPromise) {
- currentFlushPromise = resolvedPromise.then(flushJobs);
- }
-}
-function queuePostFlushCb(cb) {
- if (!isArray$2(cb)) {
- if (activePostFlushCbs && cb.id === -1) {
- activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
- } else if (!(cb.flags & 1)) {
- pendingPostFlushCbs.push(cb);
- cb.flags |= 1;
- }
- } else {
- pendingPostFlushCbs.push(...cb);
- }
- queueFlush();
-}
-function flushPreFlushCbs(instance, seen2, i = flushIndex + 1) {
- for (; i < queue.length; i++) {
- const cb = queue[i];
- if (cb && cb.flags & 2) {
- if (instance && cb.id !== instance.uid) {
- continue;
- }
- queue.splice(i, 1);
- i--;
- if (cb.flags & 4) {
- cb.flags &= -2;
- }
- cb();
- if (!(cb.flags & 4)) {
- cb.flags &= -2;
- }
- }
- }
-}
-function flushPostFlushCbs(seen2) {
- if (pendingPostFlushCbs.length) {
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
- (a, b) => getId(a) - getId(b)
- );
- pendingPostFlushCbs.length = 0;
- if (activePostFlushCbs) {
- activePostFlushCbs.push(...deduped);
- return;
- }
- activePostFlushCbs = deduped;
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
- const cb = activePostFlushCbs[postFlushIndex];
- if (cb.flags & 4) {
- cb.flags &= -2;
- }
- if (!(cb.flags & 8)) cb();
- cb.flags &= -2;
- }
- activePostFlushCbs = null;
- postFlushIndex = 0;
- }
-}
-const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
-function flushJobs(seen2) {
- try {
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
- const job = queue[flushIndex];
- if (job && !(job.flags & 8)) {
- if (false) ;
- if (job.flags & 4) {
- job.flags &= ~1;
- }
- callWithErrorHandling(
- job,
- job.i,
- job.i ? 15 : 14
- );
- if (!(job.flags & 4)) {
- job.flags &= ~1;
- }
- }
- }
- } finally {
- for (; flushIndex < queue.length; flushIndex++) {
- const job = queue[flushIndex];
- if (job) {
- job.flags &= -2;
- }
- }
- flushIndex = -1;
- queue.length = 0;
- flushPostFlushCbs();
- currentFlushPromise = null;
- if (queue.length || pendingPostFlushCbs.length) {
- flushJobs();
- }
- }
-}
-let currentRenderingInstance = null;
-let currentScopeId = null;
-function setCurrentRenderingInstance(instance) {
- const prev = currentRenderingInstance;
- currentRenderingInstance = instance;
- currentScopeId = instance && instance.type.__scopeId || null;
- return prev;
-}
-function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
- if (!ctx) return fn;
- if (fn._n) {
- return fn;
- }
- const renderFnWithContext = (...args) => {
- if (renderFnWithContext._d) {
- setBlockTracking(-1);
- }
- const prevInstance = setCurrentRenderingInstance(ctx);
- let res;
- try {
- res = fn(...args);
- } finally {
- setCurrentRenderingInstance(prevInstance);
- if (renderFnWithContext._d) {
- setBlockTracking(1);
- }
- }
- return res;
- };
- renderFnWithContext._n = true;
- renderFnWithContext._c = true;
- renderFnWithContext._d = true;
- return renderFnWithContext;
-}
-function withDirectives(vnode, directives) {
- if (currentRenderingInstance === null) {
- return vnode;
- }
- const instance = getComponentPublicInstance(currentRenderingInstance);
- const bindings = vnode.dirs || (vnode.dirs = []);
- for (let i = 0; i < directives.length; i++) {
- let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
- if (dir) {
- if (isFunction$1(dir)) {
- dir = {
- mounted: dir,
- updated: dir
- };
- }
- if (dir.deep) {
- traverse(value);
- }
- bindings.push({
- dir,
- instance,
- value,
- oldValue: void 0,
- arg,
- modifiers
- });
- }
- }
- return vnode;
-}
-function invokeDirectiveHook(vnode, prevVNode, instance, name) {
- const bindings = vnode.dirs;
- const oldBindings = prevVNode && prevVNode.dirs;
- for (let i = 0; i < bindings.length; i++) {
- const binding = bindings[i];
- if (oldBindings) {
- binding.oldValue = oldBindings[i].value;
- }
- let hook = binding.dir[name];
- if (hook) {
- pauseTracking();
- callWithAsyncErrorHandling(hook, instance, 8, [
- vnode.el,
- binding,
- vnode,
- prevVNode
- ]);
- resetTracking();
- }
- }
-}
-const TeleportEndKey = Symbol("_vte");
-const isTeleport = (type) => type.__isTeleport;
-function setTransitionHooks(vnode, hooks) {
- if (vnode.shapeFlag & 6 && vnode.component) {
- vnode.transition = hooks;
- setTransitionHooks(vnode.component.subTree, hooks);
- } else if (vnode.shapeFlag & 128) {
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
- } else {
- vnode.transition = hooks;
- }
-}
-/*! #__NO_SIDE_EFFECTS__ */
-// @__NO_SIDE_EFFECTS__
-function defineComponent(options, extraOptions) {
- return isFunction$1(options) ? (
- // #8236: extend call and options.name access are considered side-effects
- // by Rollup, so we have to wrap it in a pure-annotated IIFE.
- /* @__PURE__ */ (() => extend$1({ name: options.name }, extraOptions, { setup: options }))()
- ) : options;
-}
-function markAsyncBoundary(instance) {
- instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
-}
-function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
- if (isArray$2(rawRef)) {
- rawRef.forEach(
- (r, i) => setRef(
- r,
- oldRawRef && (isArray$2(oldRawRef) ? oldRawRef[i] : oldRawRef),
- parentSuspense,
- vnode,
- isUnmount
- )
- );
- return;
- }
- if (isAsyncWrapper(vnode) && !isUnmount) {
- if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
- setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
- }
- return;
- }
- const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
- const value = isUnmount ? null : refValue;
- const { i: owner, r: ref3 } = rawRef;
- const oldRef = oldRawRef && oldRawRef.r;
- const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
- const setupState = owner.setupState;
- const rawSetupState = toRaw(setupState);
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
- return hasOwn(rawSetupState, key);
- };
- if (oldRef != null && oldRef !== ref3) {
- if (isString$1(oldRef)) {
- refs[oldRef] = null;
- if (canSetSetupRef(oldRef)) {
- setupState[oldRef] = null;
- }
- } else if (isRef(oldRef)) {
- oldRef.value = null;
- }
- }
- if (isFunction$1(ref3)) {
- callWithErrorHandling(ref3, owner, 12, [value, refs]);
- } else {
- const _isString = isString$1(ref3);
- const _isRef = isRef(ref3);
- if (_isString || _isRef) {
- const doSet = () => {
- if (rawRef.f) {
- const existing = _isString ? canSetSetupRef(ref3) ? setupState[ref3] : refs[ref3] : ref3.value;
- if (isUnmount) {
- isArray$2(existing) && remove(existing, refValue);
- } else {
- if (!isArray$2(existing)) {
- if (_isString) {
- refs[ref3] = [refValue];
- if (canSetSetupRef(ref3)) {
- setupState[ref3] = refs[ref3];
- }
- } else {
- ref3.value = [refValue];
- if (rawRef.k) refs[rawRef.k] = ref3.value;
- }
- } else if (!existing.includes(refValue)) {
- existing.push(refValue);
- }
- }
- } else if (_isString) {
- refs[ref3] = value;
- if (canSetSetupRef(ref3)) {
- setupState[ref3] = value;
- }
- } else if (_isRef) {
- ref3.value = value;
- if (rawRef.k) refs[rawRef.k] = value;
- } else ;
- };
- if (value) {
- doSet.id = -1;
- queuePostRenderEffect(doSet, parentSuspense);
- } else {
- doSet();
- }
- }
- }
-}
-getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
-getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
-const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
-const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
-function onActivated(hook, target) {
- registerKeepAliveHook(hook, "a", target);
-}
-function onDeactivated(hook, target) {
- registerKeepAliveHook(hook, "da", target);
-}
-function registerKeepAliveHook(hook, type, target = currentInstance) {
- const wrappedHook = hook.__wdc || (hook.__wdc = () => {
- let current = target;
- while (current) {
- if (current.isDeactivated) {
- return;
- }
- current = current.parent;
- }
- return hook();
- });
- injectHook(type, wrappedHook, target);
- if (target) {
- let current = target.parent;
- while (current && current.parent) {
- if (isKeepAlive(current.parent.vnode)) {
- injectToKeepAliveRoot(wrappedHook, type, target, current);
- }
- current = current.parent;
- }
- }
-}
-function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
- const injected = injectHook(
- type,
- hook,
- keepAliveRoot,
- true
- /* prepend */
- );
- onUnmounted(() => {
- remove(keepAliveRoot[type], injected);
- }, target);
-}
-function injectHook(type, hook, target = currentInstance, prepend = false) {
- if (target) {
- const hooks = target[type] || (target[type] = []);
- const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
- pauseTracking();
- const reset = setCurrentInstance(target);
- const res = callWithAsyncErrorHandling(hook, target, type, args);
- reset();
- resetTracking();
- return res;
- });
- if (prepend) {
- hooks.unshift(wrappedHook);
- } else {
- hooks.push(wrappedHook);
- }
- return wrappedHook;
- }
-}
-const createHook = (lifecycle) => (hook, target = currentInstance) => {
- if (!isInSSRComponentSetup || lifecycle === "sp") {
- injectHook(lifecycle, (...args) => hook(...args), target);
- }
-};
-const onBeforeMount = createHook("bm");
-const onMounted = createHook("m");
-const onBeforeUpdate = createHook(
- "bu"
-);
-const onUpdated = createHook("u");
-const onBeforeUnmount = createHook(
- "bum"
-);
-const onUnmounted = createHook("um");
-const onServerPrefetch = createHook(
- "sp"
-);
-const onRenderTriggered = createHook("rtg");
-const onRenderTracked = createHook("rtc");
-function onErrorCaptured(hook, target = currentInstance) {
- injectHook("ec", hook, target);
-}
-const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
-function renderList(source, renderItem, cache, index) {
- let ret;
- const cached = cache;
- const sourceIsArray = isArray$2(source);
- if (sourceIsArray || isString$1(source)) {
- const sourceIsReactiveArray = sourceIsArray && isReactive(source);
- let needsWrap = false;
- if (sourceIsReactiveArray) {
- needsWrap = !isShallow(source);
- source = shallowReadArray(source);
- }
- ret = new Array(source.length);
- for (let i = 0, l = source.length; i < l; i++) {
- ret[i] = renderItem(
- needsWrap ? toReactive(source[i]) : source[i],
- i,
- void 0,
- cached
- );
- }
- } else if (typeof source === "number") {
- ret = new Array(source);
- for (let i = 0; i < source; i++) {
- ret[i] = renderItem(i + 1, i, void 0, cached);
- }
- } else if (isObject$1(source)) {
- if (source[Symbol.iterator]) {
- ret = Array.from(
- source,
- (item, i) => renderItem(item, i, void 0, cached)
- );
- } else {
- const keys = Object.keys(source);
- ret = new Array(keys.length);
- for (let i = 0, l = keys.length; i < l; i++) {
- const key = keys[i];
- ret[i] = renderItem(source[key], key, i, cached);
- }
- }
- } else {
- ret = [];
- }
- return ret;
-}
-function renderSlot(slots, name, props = {}, fallback, noSlotted) {
- if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
- if (name !== "default") props.name = name;
- return openBlock(), createBlock(
- Fragment,
- null,
- [createVNode("slot", props, fallback)],
- 64
- );
- }
- let slot = slots[name];
- if (slot && slot._c) {
- slot._d = false;
- }
- openBlock();
- const validSlotContent = slot && ensureValidVNode(slot(props));
- const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
- // key attached in the `createSlots` helper, respect that
- validSlotContent && validSlotContent.key;
- const rendered = createBlock(
- Fragment,
- {
- key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
- ""
- },
- validSlotContent || [],
- validSlotContent && slots._ === 1 ? 64 : -2
- );
- if (!noSlotted && rendered.scopeId) {
- rendered.slotScopeIds = [rendered.scopeId + "-s"];
- }
- if (slot && slot._c) {
- slot._d = true;
- }
- return rendered;
-}
-function ensureValidVNode(vnodes) {
- return vnodes.some((child) => {
- if (!isVNode(child)) return true;
- if (child.type === Comment) return false;
- if (child.type === Fragment && !ensureValidVNode(child.children))
- return false;
- return true;
- }) ? vnodes : null;
-}
-const getPublicInstance = (i) => {
- if (!i) return null;
- if (isStatefulComponent(i)) return getComponentPublicInstance(i);
- return getPublicInstance(i.parent);
-};
-const publicPropertiesMap = (
- // Move PURE marker to new line to workaround compiler discarding it
- // due to type annotation
- /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), {
- $: (i) => i,
- $el: (i) => i.vnode.el,
- $data: (i) => i.data,
- $props: (i) => i.props,
- $attrs: (i) => i.attrs,
- $slots: (i) => i.slots,
- $refs: (i) => i.refs,
- $parent: (i) => getPublicInstance(i.parent),
- $root: (i) => getPublicInstance(i.root),
- $host: (i) => i.ce,
- $emit: (i) => i.emit,
- $options: (i) => resolveMergedOptions(i),
- $forceUpdate: (i) => i.f || (i.f = () => {
- queueJob(i.update);
- }),
- $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
- $watch: (i) => instanceWatch.bind(i)
- })
-);
-const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
-const PublicInstanceProxyHandlers = {
- get({ _: instance }, key) {
- if (key === "__v_skip") {
- return true;
- }
- const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
- let normalizedProps;
- if (key[0] !== "$") {
- const n = accessCache[key];
- if (n !== void 0) {
- switch (n) {
- case 1:
- return setupState[key];
- case 2:
- return data[key];
- case 4:
- return ctx[key];
- case 3:
- return props[key];
- }
- } else if (hasSetupBinding(setupState, key)) {
- accessCache[key] = 1;
- return setupState[key];
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
- accessCache[key] = 2;
- return data[key];
- } else if (
- // only cache other properties when instance has declared (thus stable)
- // props
- (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
- ) {
- accessCache[key] = 3;
- return props[key];
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
- accessCache[key] = 4;
- return ctx[key];
- } else if (shouldCacheAccess) {
- accessCache[key] = 0;
- }
- }
- const publicGetter = publicPropertiesMap[key];
- let cssModule, globalProperties;
- if (publicGetter) {
- if (key === "$attrs") {
- track(instance.attrs, "get", "");
- }
- return publicGetter(instance);
- } else if (
- // css module (injected by vue-loader)
- (cssModule = type.__cssModules) && (cssModule = cssModule[key])
- ) {
- return cssModule;
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
- accessCache[key] = 4;
- return ctx[key];
- } else if (
- // global properties
- globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
- ) {
- {
- return globalProperties[key];
- }
- } else ;
- },
- set({ _: instance }, key, value) {
- const { data, setupState, ctx } = instance;
- if (hasSetupBinding(setupState, key)) {
- setupState[key] = value;
- return true;
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
- data[key] = value;
- return true;
- } else if (hasOwn(instance.props, key)) {
- return false;
- }
- if (key[0] === "$" && key.slice(1) in instance) {
- return false;
- } else {
- {
- ctx[key] = value;
- }
- }
- return true;
- },
- has({
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
- }, key) {
- let normalizedProps;
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
- },
- defineProperty(target, key, descriptor) {
- if (descriptor.get != null) {
- target._.accessCache[key] = 0;
- } else if (hasOwn(descriptor, "value")) {
- this.set(target, key, descriptor.value, null);
- }
- return Reflect.defineProperty(target, key, descriptor);
- }
-};
-function normalizePropsOrEmits(props) {
- return isArray$2(props) ? props.reduce(
- (normalized, p2) => (normalized[p2] = null, normalized),
- {}
- ) : props;
-}
-let shouldCacheAccess = true;
-function applyOptions(instance) {
- const options = resolveMergedOptions(instance);
- const publicThis = instance.proxy;
- const ctx = instance.ctx;
- shouldCacheAccess = false;
- if (options.beforeCreate) {
- callHook(options.beforeCreate, instance, "bc");
- }
- const {
- // state
- data: dataOptions,
- computed: computedOptions,
- methods,
- watch: watchOptions,
- provide: provideOptions,
- inject: injectOptions,
- // lifecycle
- created,
- beforeMount,
- mounted,
- beforeUpdate,
- updated,
- activated,
- deactivated,
- beforeDestroy,
- beforeUnmount,
- destroyed,
- unmounted,
- render,
- renderTracked,
- renderTriggered,
- errorCaptured,
- serverPrefetch,
- // public API
- expose,
- inheritAttrs,
- // assets
- components,
- directives,
- filters
- } = options;
- const checkDuplicateProperties = null;
- if (injectOptions) {
- resolveInjections(injectOptions, ctx, checkDuplicateProperties);
- }
- if (methods) {
- for (const key in methods) {
- const methodHandler = methods[key];
- if (isFunction$1(methodHandler)) {
- {
- ctx[key] = methodHandler.bind(publicThis);
- }
- }
- }
- }
- if (dataOptions) {
- const data = dataOptions.call(publicThis, publicThis);
- if (!isObject$1(data)) ;
- else {
- instance.data = reactive(data);
- }
- }
- shouldCacheAccess = true;
- if (computedOptions) {
- for (const key in computedOptions) {
- const opt = computedOptions[key];
- const get = isFunction$1(opt) ? opt.bind(publicThis, publicThis) : isFunction$1(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
- const set = !isFunction$1(opt) && isFunction$1(opt.set) ? opt.set.bind(publicThis) : NOOP;
- const c = computed({
- get,
- set
- });
- Object.defineProperty(ctx, key, {
- enumerable: true,
- configurable: true,
- get: () => c.value,
- set: (v) => c.value = v
- });
- }
- }
- if (watchOptions) {
- for (const key in watchOptions) {
- createWatcher(watchOptions[key], ctx, publicThis, key);
- }
- }
- if (provideOptions) {
- const provides = isFunction$1(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
- Reflect.ownKeys(provides).forEach((key) => {
- provide(key, provides[key]);
- });
- }
- if (created) {
- callHook(created, instance, "c");
- }
- function registerLifecycleHook(register, hook) {
- if (isArray$2(hook)) {
- hook.forEach((_hook) => register(_hook.bind(publicThis)));
- } else if (hook) {
- register(hook.bind(publicThis));
- }
- }
- registerLifecycleHook(onBeforeMount, beforeMount);
- registerLifecycleHook(onMounted, mounted);
- registerLifecycleHook(onBeforeUpdate, beforeUpdate);
- registerLifecycleHook(onUpdated, updated);
- registerLifecycleHook(onActivated, activated);
- registerLifecycleHook(onDeactivated, deactivated);
- registerLifecycleHook(onErrorCaptured, errorCaptured);
- registerLifecycleHook(onRenderTracked, renderTracked);
- registerLifecycleHook(onRenderTriggered, renderTriggered);
- registerLifecycleHook(onBeforeUnmount, beforeUnmount);
- registerLifecycleHook(onUnmounted, unmounted);
- registerLifecycleHook(onServerPrefetch, serverPrefetch);
- if (isArray$2(expose)) {
- if (expose.length) {
- const exposed = instance.exposed || (instance.exposed = {});
- expose.forEach((key) => {
- Object.defineProperty(exposed, key, {
- get: () => publicThis[key],
- set: (val) => publicThis[key] = val
- });
- });
- } else if (!instance.exposed) {
- instance.exposed = {};
- }
- }
- if (render && instance.render === NOOP) {
- instance.render = render;
- }
- if (inheritAttrs != null) {
- instance.inheritAttrs = inheritAttrs;
- }
- if (components) instance.components = components;
- if (directives) instance.directives = directives;
- if (serverPrefetch) {
- markAsyncBoundary(instance);
- }
-}
-function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
- if (isArray$2(injectOptions)) {
- injectOptions = normalizeInject(injectOptions);
- }
- for (const key in injectOptions) {
- const opt = injectOptions[key];
- let injected;
- if (isObject$1(opt)) {
- if ("default" in opt) {
- injected = inject(
- opt.from || key,
- opt.default,
- true
- );
- } else {
- injected = inject(opt.from || key);
- }
- } else {
- injected = inject(opt);
- }
- if (isRef(injected)) {
- Object.defineProperty(ctx, key, {
- enumerable: true,
- configurable: true,
- get: () => injected.value,
- set: (v) => injected.value = v
- });
- } else {
- ctx[key] = injected;
- }
- }
-}
-function callHook(hook, instance, type) {
- callWithAsyncErrorHandling(
- isArray$2(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
- instance,
- type
- );
-}
-function createWatcher(raw, ctx, publicThis, key) {
- let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
- if (isString$1(raw)) {
- const handler = ctx[raw];
- if (isFunction$1(handler)) {
- {
- watch(getter, handler);
- }
- }
- } else if (isFunction$1(raw)) {
- {
- watch(getter, raw.bind(publicThis));
- }
- } else if (isObject$1(raw)) {
- if (isArray$2(raw)) {
- raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
- } else {
- const handler = isFunction$1(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
- if (isFunction$1(handler)) {
- watch(getter, handler, raw);
- }
- }
- } else ;
-}
-function resolveMergedOptions(instance) {
- const base = instance.type;
- const { mixins, extends: extendsOptions } = base;
- const {
- mixins: globalMixins,
- optionsCache: cache,
- config: { optionMergeStrategies }
- } = instance.appContext;
- const cached = cache.get(base);
- let resolved;
- if (cached) {
- resolved = cached;
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
- {
- resolved = base;
- }
- } else {
- resolved = {};
- if (globalMixins.length) {
- globalMixins.forEach(
- (m) => mergeOptions$1(resolved, m, optionMergeStrategies, true)
- );
- }
- mergeOptions$1(resolved, base, optionMergeStrategies);
- }
- if (isObject$1(base)) {
- cache.set(base, resolved);
- }
- return resolved;
-}
-function mergeOptions$1(to, from, strats, asMixin = false) {
- const { mixins, extends: extendsOptions } = from;
- if (extendsOptions) {
- mergeOptions$1(to, extendsOptions, strats, true);
- }
- if (mixins) {
- mixins.forEach(
- (m) => mergeOptions$1(to, m, strats, true)
- );
- }
- for (const key in from) {
- if (asMixin && key === "expose") ;
- else {
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
- to[key] = strat ? strat(to[key], from[key]) : from[key];
- }
- }
- return to;
-}
-const internalOptionMergeStrats = {
- data: mergeDataFn,
- props: mergeEmitsOrPropsOptions,
- emits: mergeEmitsOrPropsOptions,
- // objects
- methods: mergeObjectOptions,
- computed: mergeObjectOptions,
- // lifecycle
- beforeCreate: mergeAsArray,
- created: mergeAsArray,
- beforeMount: mergeAsArray,
- mounted: mergeAsArray,
- beforeUpdate: mergeAsArray,
- updated: mergeAsArray,
- beforeDestroy: mergeAsArray,
- beforeUnmount: mergeAsArray,
- destroyed: mergeAsArray,
- unmounted: mergeAsArray,
- activated: mergeAsArray,
- deactivated: mergeAsArray,
- errorCaptured: mergeAsArray,
- serverPrefetch: mergeAsArray,
- // assets
- components: mergeObjectOptions,
- directives: mergeObjectOptions,
- // watch
- watch: mergeWatchOptions,
- // provide / inject
- provide: mergeDataFn,
- inject: mergeInject
-};
-function mergeDataFn(to, from) {
- if (!from) {
- return to;
- }
- if (!to) {
- return from;
- }
- return function mergedDataFn() {
- return extend$1(
- isFunction$1(to) ? to.call(this, this) : to,
- isFunction$1(from) ? from.call(this, this) : from
- );
- };
-}
-function mergeInject(to, from) {
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
-}
-function normalizeInject(raw) {
- if (isArray$2(raw)) {
- const res = {};
- for (let i = 0; i < raw.length; i++) {
- res[raw[i]] = raw[i];
- }
- return res;
- }
- return raw;
-}
-function mergeAsArray(to, from) {
- return to ? [...new Set([].concat(to, from))] : from;
-}
-function mergeObjectOptions(to, from) {
- return to ? extend$1(/* @__PURE__ */ Object.create(null), to, from) : from;
-}
-function mergeEmitsOrPropsOptions(to, from) {
- if (to) {
- if (isArray$2(to) && isArray$2(from)) {
- return [.../* @__PURE__ */ new Set([...to, ...from])];
- }
- return extend$1(
- /* @__PURE__ */ Object.create(null),
- normalizePropsOrEmits(to),
- normalizePropsOrEmits(from != null ? from : {})
- );
- } else {
- return from;
- }
-}
-function mergeWatchOptions(to, from) {
- if (!to) return from;
- if (!from) return to;
- const merged = extend$1(/* @__PURE__ */ Object.create(null), to);
- for (const key in from) {
- merged[key] = mergeAsArray(to[key], from[key]);
- }
- return merged;
-}
-function createAppContext() {
- return {
- app: null,
- config: {
- isNativeTag: NO,
- performance: false,
- globalProperties: {},
- optionMergeStrategies: {},
- errorHandler: void 0,
- warnHandler: void 0,
- compilerOptions: {}
- },
- mixins: [],
- components: {},
- directives: {},
- provides: /* @__PURE__ */ Object.create(null),
- optionsCache: /* @__PURE__ */ new WeakMap(),
- propsCache: /* @__PURE__ */ new WeakMap(),
- emitsCache: /* @__PURE__ */ new WeakMap()
- };
-}
-let uid$1 = 0;
-function createAppAPI(render, hydrate) {
- return function createApp2(rootComponent, rootProps = null) {
- if (!isFunction$1(rootComponent)) {
- rootComponent = extend$1({}, rootComponent);
- }
- if (rootProps != null && !isObject$1(rootProps)) {
- rootProps = null;
- }
- const context = createAppContext();
- const installedPlugins = /* @__PURE__ */ new WeakSet();
- const pluginCleanupFns = [];
- let isMounted = false;
- const app2 = context.app = {
- _uid: uid$1++,
- _component: rootComponent,
- _props: rootProps,
- _container: null,
- _context: context,
- _instance: null,
- version,
- get config() {
- return context.config;
- },
- set config(v) {
- },
- use(plugin, ...options) {
- if (installedPlugins.has(plugin)) ;
- else if (plugin && isFunction$1(plugin.install)) {
- installedPlugins.add(plugin);
- plugin.install(app2, ...options);
- } else if (isFunction$1(plugin)) {
- installedPlugins.add(plugin);
- plugin(app2, ...options);
- } else ;
- return app2;
- },
- mixin(mixin) {
- {
- if (!context.mixins.includes(mixin)) {
- context.mixins.push(mixin);
- }
- }
- return app2;
- },
- component(name, component) {
- if (!component) {
- return context.components[name];
- }
- context.components[name] = component;
- return app2;
- },
- directive(name, directive) {
- if (!directive) {
- return context.directives[name];
- }
- context.directives[name] = directive;
- return app2;
- },
- mount(rootContainer, isHydrate, namespace) {
- if (!isMounted) {
- const vnode = app2._ceVNode || createVNode(rootComponent, rootProps);
- vnode.appContext = context;
- if (namespace === true) {
- namespace = "svg";
- } else if (namespace === false) {
- namespace = void 0;
- }
- {
- render(vnode, rootContainer, namespace);
- }
- isMounted = true;
- app2._container = rootContainer;
- rootContainer.__vue_app__ = app2;
- return getComponentPublicInstance(vnode.component);
- }
- },
- onUnmount(cleanupFn) {
- pluginCleanupFns.push(cleanupFn);
- },
- unmount() {
- if (isMounted) {
- callWithAsyncErrorHandling(
- pluginCleanupFns,
- app2._instance,
- 16
- );
- render(null, app2._container);
- delete app2._container.__vue_app__;
- }
- },
- provide(key, value) {
- context.provides[key] = value;
- return app2;
- },
- runWithContext(fn) {
- const lastApp = currentApp;
- currentApp = app2;
- try {
- return fn();
- } finally {
- currentApp = lastApp;
- }
- }
- };
- return app2;
- };
-}
-let currentApp = null;
-function provide(key, value) {
- if (!currentInstance) ;
- else {
- let provides = currentInstance.provides;
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
- if (parentProvides === provides) {
- provides = currentInstance.provides = Object.create(parentProvides);
- }
- provides[key] = value;
- }
-}
-function inject(key, defaultValue, treatDefaultAsFactory = false) {
- const instance = currentInstance || currentRenderingInstance;
- if (instance || currentApp) {
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
- if (provides && key in provides) {
- return provides[key];
- } else if (arguments.length > 1) {
- return treatDefaultAsFactory && isFunction$1(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
- } else ;
- }
-}
-function hasInjectionContext() {
- return !!(currentInstance || currentRenderingInstance || currentApp);
-}
-const internalObjectProto = {};
-const createInternalObject = () => Object.create(internalObjectProto);
-const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
-function initProps(instance, rawProps, isStateful, isSSR = false) {
- const props = {};
- const attrs = createInternalObject();
- instance.propsDefaults = /* @__PURE__ */ Object.create(null);
- setFullProps(instance, rawProps, props, attrs);
- for (const key in instance.propsOptions[0]) {
- if (!(key in props)) {
- props[key] = void 0;
- }
- }
- if (isStateful) {
- instance.props = isSSR ? props : shallowReactive(props);
- } else {
- if (!instance.type.props) {
- instance.props = attrs;
- } else {
- instance.props = props;
- }
- }
- instance.attrs = attrs;
-}
-function updateProps(instance, rawProps, rawPrevProps, optimized) {
- const {
- props,
- attrs,
- vnode: { patchFlag }
- } = instance;
- const rawCurrentProps = toRaw(props);
- const [options] = instance.propsOptions;
- let hasAttrsChanged = false;
- if (
- // always force full diff in dev
- // - #1942 if hmr is enabled with sfc component
- // - vite#872 non-sfc component used by sfc component
- (optimized || patchFlag > 0) && !(patchFlag & 16)
- ) {
- if (patchFlag & 8) {
- const propsToUpdate = instance.vnode.dynamicProps;
- for (let i = 0; i < propsToUpdate.length; i++) {
- let key = propsToUpdate[i];
- if (isEmitListener(instance.emitsOptions, key)) {
- continue;
- }
- const value = rawProps[key];
- if (options) {
- if (hasOwn(attrs, key)) {
- if (value !== attrs[key]) {
- attrs[key] = value;
- hasAttrsChanged = true;
- }
- } else {
- const camelizedKey = camelize(key);
- props[camelizedKey] = resolvePropValue(
- options,
- rawCurrentProps,
- camelizedKey,
- value,
- instance,
- false
- );
- }
- } else {
- if (value !== attrs[key]) {
- attrs[key] = value;
- hasAttrsChanged = true;
- }
- }
- }
- }
- } else {
- if (setFullProps(instance, rawProps, props, attrs)) {
- hasAttrsChanged = true;
- }
- let kebabKey;
- for (const key in rawCurrentProps) {
- if (!rawProps || // for camelCase
- !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
- // and converted to camelCase (#955)
- ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
- if (options) {
- if (rawPrevProps && // for camelCase
- (rawPrevProps[key] !== void 0 || // for kebab-case
- rawPrevProps[kebabKey] !== void 0)) {
- props[key] = resolvePropValue(
- options,
- rawCurrentProps,
- key,
- void 0,
- instance,
- true
- );
- }
- } else {
- delete props[key];
- }
- }
- }
- if (attrs !== rawCurrentProps) {
- for (const key in attrs) {
- if (!rawProps || !hasOwn(rawProps, key) && true) {
- delete attrs[key];
- hasAttrsChanged = true;
- }
- }
- }
- }
- if (hasAttrsChanged) {
- trigger(instance.attrs, "set", "");
- }
-}
-function setFullProps(instance, rawProps, props, attrs) {
- const [options, needCastKeys] = instance.propsOptions;
- let hasAttrsChanged = false;
- let rawCastValues;
- if (rawProps) {
- for (let key in rawProps) {
- if (isReservedProp(key)) {
- continue;
- }
- const value = rawProps[key];
- let camelKey;
- if (options && hasOwn(options, camelKey = camelize(key))) {
- if (!needCastKeys || !needCastKeys.includes(camelKey)) {
- props[camelKey] = value;
- } else {
- (rawCastValues || (rawCastValues = {}))[camelKey] = value;
- }
- } else if (!isEmitListener(instance.emitsOptions, key)) {
- if (!(key in attrs) || value !== attrs[key]) {
- attrs[key] = value;
- hasAttrsChanged = true;
- }
- }
- }
- }
- if (needCastKeys) {
- const rawCurrentProps = toRaw(props);
- const castValues = rawCastValues || EMPTY_OBJ;
- for (let i = 0; i < needCastKeys.length; i++) {
- const key = needCastKeys[i];
- props[key] = resolvePropValue(
- options,
- rawCurrentProps,
- key,
- castValues[key],
- instance,
- !hasOwn(castValues, key)
- );
- }
- }
- return hasAttrsChanged;
-}
-function resolvePropValue(options, props, key, value, instance, isAbsent) {
- const opt = options[key];
- if (opt != null) {
- const hasDefault = hasOwn(opt, "default");
- if (hasDefault && value === void 0) {
- const defaultValue = opt.default;
- if (opt.type !== Function && !opt.skipFactory && isFunction$1(defaultValue)) {
- const { propsDefaults } = instance;
- if (key in propsDefaults) {
- value = propsDefaults[key];
- } else {
- const reset = setCurrentInstance(instance);
- value = propsDefaults[key] = defaultValue.call(
- null,
- props
- );
- reset();
- }
- } else {
- value = defaultValue;
- }
- if (instance.ce) {
- instance.ce._setProp(key, value);
- }
- }
- if (opt[
- 0
- /* shouldCast */
- ]) {
- if (isAbsent && !hasDefault) {
- value = false;
- } else if (opt[
- 1
- /* shouldCastTrue */
- ] && (value === "" || value === hyphenate(key))) {
- value = true;
- }
- }
- }
- return value;
-}
-const mixinPropsCache = /* @__PURE__ */ new WeakMap();
-function normalizePropsOptions(comp, appContext, asMixin = false) {
- const cache = asMixin ? mixinPropsCache : appContext.propsCache;
- const cached = cache.get(comp);
- if (cached) {
- return cached;
- }
- const raw = comp.props;
- const normalized = {};
- const needCastKeys = [];
- let hasExtends = false;
- if (!isFunction$1(comp)) {
- const extendProps = (raw2) => {
- hasExtends = true;
- const [props, keys] = normalizePropsOptions(raw2, appContext, true);
- extend$1(normalized, props);
- if (keys) needCastKeys.push(...keys);
- };
- if (!asMixin && appContext.mixins.length) {
- appContext.mixins.forEach(extendProps);
- }
- if (comp.extends) {
- extendProps(comp.extends);
- }
- if (comp.mixins) {
- comp.mixins.forEach(extendProps);
- }
- }
- if (!raw && !hasExtends) {
- if (isObject$1(comp)) {
- cache.set(comp, EMPTY_ARR);
- }
- return EMPTY_ARR;
- }
- if (isArray$2(raw)) {
- for (let i = 0; i < raw.length; i++) {
- const normalizedKey = camelize(raw[i]);
- if (validatePropName(normalizedKey)) {
- normalized[normalizedKey] = EMPTY_OBJ;
- }
- }
- } else if (raw) {
- for (const key in raw) {
- const normalizedKey = camelize(key);
- if (validatePropName(normalizedKey)) {
- const opt = raw[key];
- const prop = normalized[normalizedKey] = isArray$2(opt) || isFunction$1(opt) ? { type: opt } : extend$1({}, opt);
- const propType = prop.type;
- let shouldCast = false;
- let shouldCastTrue = true;
- if (isArray$2(propType)) {
- for (let index = 0; index < propType.length; ++index) {
- const type = propType[index];
- const typeName = isFunction$1(type) && type.name;
- if (typeName === "Boolean") {
- shouldCast = true;
- break;
- } else if (typeName === "String") {
- shouldCastTrue = false;
- }
- }
- } else {
- shouldCast = isFunction$1(propType) && propType.name === "Boolean";
- }
- prop[
- 0
- /* shouldCast */
- ] = shouldCast;
- prop[
- 1
- /* shouldCastTrue */
- ] = shouldCastTrue;
- if (shouldCast || hasOwn(prop, "default")) {
- needCastKeys.push(normalizedKey);
- }
- }
- }
- }
- const res = [normalized, needCastKeys];
- if (isObject$1(comp)) {
- cache.set(comp, res);
- }
- return res;
-}
-function validatePropName(key) {
- if (key[0] !== "$" && !isReservedProp(key)) {
- return true;
- }
- return false;
-}
-const isInternalKey = (key) => key[0] === "_" || key === "$stable";
-const normalizeSlotValue = (value) => isArray$2(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
-const normalizeSlot$1 = (key, rawSlot, ctx) => {
- if (rawSlot._n) {
- return rawSlot;
- }
- const normalized = withCtx((...args) => {
- if (false) ;
- return normalizeSlotValue(rawSlot(...args));
- }, ctx);
- normalized._c = false;
- return normalized;
-};
-const normalizeObjectSlots = (rawSlots, slots, instance) => {
- const ctx = rawSlots._ctx;
- for (const key in rawSlots) {
- if (isInternalKey(key)) continue;
- const value = rawSlots[key];
- if (isFunction$1(value)) {
- slots[key] = normalizeSlot$1(key, value, ctx);
- } else if (value != null) {
- const normalized = normalizeSlotValue(value);
- slots[key] = () => normalized;
- }
- }
-};
-const normalizeVNodeSlots = (instance, children) => {
- const normalized = normalizeSlotValue(children);
- instance.slots.default = () => normalized;
-};
-const assignSlots = (slots, children, optimized) => {
- for (const key in children) {
- if (optimized || key !== "_") {
- slots[key] = children[key];
- }
- }
-};
-const initSlots = (instance, children, optimized) => {
- const slots = instance.slots = createInternalObject();
- if (instance.vnode.shapeFlag & 32) {
- const type = children._;
- if (type) {
- assignSlots(slots, children, optimized);
- if (optimized) {
- def(slots, "_", type, true);
- }
- } else {
- normalizeObjectSlots(children, slots);
- }
- } else if (children) {
- normalizeVNodeSlots(instance, children);
- }
-};
-const updateSlots = (instance, children, optimized) => {
- const { vnode, slots } = instance;
- let needDeletionCheck = true;
- let deletionComparisonTarget = EMPTY_OBJ;
- if (vnode.shapeFlag & 32) {
- const type = children._;
- if (type) {
- if (optimized && type === 1) {
- needDeletionCheck = false;
- } else {
- assignSlots(slots, children, optimized);
- }
- } else {
- needDeletionCheck = !children.$stable;
- normalizeObjectSlots(children, slots);
- }
- deletionComparisonTarget = children;
- } else if (children) {
- normalizeVNodeSlots(instance, children);
- deletionComparisonTarget = { default: 1 };
- }
- if (needDeletionCheck) {
- for (const key in slots) {
- if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
- delete slots[key];
- }
- }
- }
-};
-const queuePostRenderEffect = queueEffectWithSuspense;
-function createRenderer(options) {
- return baseCreateRenderer(options);
-}
-function baseCreateRenderer(options, createHydrationFns) {
- const target = getGlobalThis();
- target.__VUE__ = true;
- const {
- insert: hostInsert,
- remove: hostRemove,
- patchProp: hostPatchProp,
- createElement: hostCreateElement,
- createText: hostCreateText,
- createComment: hostCreateComment,
- setText: hostSetText,
- setElementText: hostSetElementText,
- parentNode: hostParentNode,
- nextSibling: hostNextSibling,
- setScopeId: hostSetScopeId = NOOP,
- insertStaticContent: hostInsertStaticContent
- } = options;
- const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
- if (n1 === n2) {
- return;
- }
- if (n1 && !isSameVNodeType(n1, n2)) {
- anchor = getNextHostNode(n1);
- unmount(n1, parentComponent, parentSuspense, true);
- n1 = null;
- }
- if (n2.patchFlag === -2) {
- optimized = false;
- n2.dynamicChildren = null;
- }
- const { type, ref: ref3, shapeFlag } = n2;
- switch (type) {
- case Text:
- processText(n1, n2, container, anchor);
- break;
- case Comment:
- processCommentNode(n1, n2, container, anchor);
- break;
- case Static:
- if (n1 == null) {
- mountStaticNode(n2, container, anchor, namespace);
- }
- break;
- case Fragment:
- processFragment(
- n1,
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- break;
- default:
- if (shapeFlag & 1) {
- processElement(
- n1,
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else if (shapeFlag & 6) {
- processComponent(
- n1,
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else if (shapeFlag & 64) {
- type.process(
- n1,
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized,
- internals
- );
- } else if (shapeFlag & 128) {
- type.process(
- n1,
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized,
- internals
- );
- } else ;
- }
- if (ref3 != null && parentComponent) {
- setRef(ref3, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
- }
- };
- const processText = (n1, n2, container, anchor) => {
- if (n1 == null) {
- hostInsert(
- n2.el = hostCreateText(n2.children),
- container,
- anchor
- );
- } else {
- const el = n2.el = n1.el;
- if (n2.children !== n1.children) {
- hostSetText(el, n2.children);
- }
- }
- };
- const processCommentNode = (n1, n2, container, anchor) => {
- if (n1 == null) {
- hostInsert(
- n2.el = hostCreateComment(n2.children || ""),
- container,
- anchor
- );
- } else {
- n2.el = n1.el;
- }
- };
- const mountStaticNode = (n2, container, anchor, namespace) => {
- [n2.el, n2.anchor] = hostInsertStaticContent(
- n2.children,
- container,
- anchor,
- namespace,
- n2.el,
- n2.anchor
- );
- };
- const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
- let next;
- while (el && el !== anchor) {
- next = hostNextSibling(el);
- hostInsert(el, container, nextSibling);
- el = next;
- }
- hostInsert(anchor, container, nextSibling);
- };
- const removeStaticNode = ({ el, anchor }) => {
- let next;
- while (el && el !== anchor) {
- next = hostNextSibling(el);
- hostRemove(el);
- el = next;
- }
- hostRemove(anchor);
- };
- const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- if (n2.type === "svg") {
- namespace = "svg";
- } else if (n2.type === "math") {
- namespace = "mathml";
- }
- if (n1 == null) {
- mountElement(
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else {
- patchElement(
- n1,
- n2,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- }
- };
- const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- let el;
- let vnodeHook;
- const { props, shapeFlag, transition, dirs } = vnode;
- el = vnode.el = hostCreateElement(
- vnode.type,
- namespace,
- props && props.is,
- props
- );
- if (shapeFlag & 8) {
- hostSetElementText(el, vnode.children);
- } else if (shapeFlag & 16) {
- mountChildren(
- vnode.children,
- el,
- null,
- parentComponent,
- parentSuspense,
- resolveChildrenNamespace(vnode, namespace),
- slotScopeIds,
- optimized
- );
- }
- if (dirs) {
- invokeDirectiveHook(vnode, null, parentComponent, "created");
- }
- setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
- if (props) {
- for (const key in props) {
- if (key !== "value" && !isReservedProp(key)) {
- hostPatchProp(el, key, null, props[key], namespace, parentComponent);
- }
- }
- if ("value" in props) {
- hostPatchProp(el, "value", null, props.value, namespace);
- }
- if (vnodeHook = props.onVnodeBeforeMount) {
- invokeVNodeHook(vnodeHook, parentComponent, vnode);
- }
- }
- if (dirs) {
- invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
- }
- const needCallTransitionHooks = needTransition(parentSuspense, transition);
- if (needCallTransitionHooks) {
- transition.beforeEnter(el);
- }
- hostInsert(el, container, anchor);
- if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
- queuePostRenderEffect(() => {
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
- needCallTransitionHooks && transition.enter(el);
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
- }, parentSuspense);
- }
- };
- const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
- if (scopeId) {
- hostSetScopeId(el, scopeId);
- }
- if (slotScopeIds) {
- for (let i = 0; i < slotScopeIds.length; i++) {
- hostSetScopeId(el, slotScopeIds[i]);
- }
- }
- if (parentComponent) {
- let subTree = parentComponent.subTree;
- if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
- const parentVNode = parentComponent.vnode;
- setScopeId(
- el,
- parentVNode,
- parentVNode.scopeId,
- parentVNode.slotScopeIds,
- parentComponent.parent
- );
- }
- }
- };
- const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
- for (let i = start; i < children.length; i++) {
- const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
- patch(
- null,
- child,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- }
- };
- const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- const el = n2.el = n1.el;
- let { patchFlag, dynamicChildren, dirs } = n2;
- patchFlag |= n1.patchFlag & 16;
- const oldProps = n1.props || EMPTY_OBJ;
- const newProps = n2.props || EMPTY_OBJ;
- let vnodeHook;
- parentComponent && toggleRecurse(parentComponent, false);
- if (vnodeHook = newProps.onVnodeBeforeUpdate) {
- invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
- }
- if (dirs) {
- invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
- }
- parentComponent && toggleRecurse(parentComponent, true);
- if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
- hostSetElementText(el, "");
- }
- if (dynamicChildren) {
- patchBlockChildren(
- n1.dynamicChildren,
- dynamicChildren,
- el,
- parentComponent,
- parentSuspense,
- resolveChildrenNamespace(n2, namespace),
- slotScopeIds
- );
- } else if (!optimized) {
- patchChildren(
- n1,
- n2,
- el,
- null,
- parentComponent,
- parentSuspense,
- resolveChildrenNamespace(n2, namespace),
- slotScopeIds,
- false
- );
- }
- if (patchFlag > 0) {
- if (patchFlag & 16) {
- patchProps(el, oldProps, newProps, parentComponent, namespace);
- } else {
- if (patchFlag & 2) {
- if (oldProps.class !== newProps.class) {
- hostPatchProp(el, "class", null, newProps.class, namespace);
- }
- }
- if (patchFlag & 4) {
- hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
- }
- if (patchFlag & 8) {
- const propsToUpdate = n2.dynamicProps;
- for (let i = 0; i < propsToUpdate.length; i++) {
- const key = propsToUpdate[i];
- const prev = oldProps[key];
- const next = newProps[key];
- if (next !== prev || key === "value") {
- hostPatchProp(el, key, prev, next, namespace, parentComponent);
- }
- }
- }
- }
- if (patchFlag & 1) {
- if (n1.children !== n2.children) {
- hostSetElementText(el, n2.children);
- }
- }
- } else if (!optimized && dynamicChildren == null) {
- patchProps(el, oldProps, newProps, parentComponent, namespace);
- }
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
- queuePostRenderEffect(() => {
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
- dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
- }, parentSuspense);
- }
- };
- const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
- for (let i = 0; i < newChildren.length; i++) {
- const oldVNode = oldChildren[i];
- const newVNode = newChildren[i];
- const container = (
- // oldVNode may be an errored async setup() component inside Suspense
- // which will not have a mounted element
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
- // of the Fragment itself so it can move its children.
- (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
- // which also requires the correct parent container
- !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
- // In other cases, the parent container is not actually used so we
- // just pass the block element here to avoid a DOM parentNode call.
- fallbackContainer
- )
- );
- patch(
- oldVNode,
- newVNode,
- container,
- null,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- true
- );
- }
- };
- const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
- if (oldProps !== newProps) {
- if (oldProps !== EMPTY_OBJ) {
- for (const key in oldProps) {
- if (!isReservedProp(key) && !(key in newProps)) {
- hostPatchProp(
- el,
- key,
- oldProps[key],
- null,
- namespace,
- parentComponent
- );
- }
- }
- }
- for (const key in newProps) {
- if (isReservedProp(key)) continue;
- const next = newProps[key];
- const prev = oldProps[key];
- if (next !== prev && key !== "value") {
- hostPatchProp(el, key, prev, next, namespace, parentComponent);
- }
- }
- if ("value" in newProps) {
- hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
- }
- }
- };
- const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
- const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
- let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
- if (fragmentSlotScopeIds) {
- slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
- }
- if (n1 == null) {
- hostInsert(fragmentStartAnchor, container, anchor);
- hostInsert(fragmentEndAnchor, container, anchor);
- mountChildren(
- // #10007
- // such fragment like `<>>` will be compiled into
- // a fragment which doesn't have a children.
- // In this case fallback to an empty array
- n2.children || [],
- container,
- fragmentEndAnchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else {
- if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
- // of renderSlot() with no valid children
- n1.dynamicChildren) {
- patchBlockChildren(
- n1.dynamicChildren,
- dynamicChildren,
- container,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds
- );
- if (
- // #2080 if the stable fragment has a key, it's a that may
- // get moved around. Make sure all root level vnodes inherit el.
- // #2134 or if it's a component root, it may also get moved around
- // as the component is being moved.
- n2.key != null || parentComponent && n2 === parentComponent.subTree
- ) {
- traverseStaticChildren(
- n1,
- n2,
- true
- /* shallow */
- );
- }
- } else {
- patchChildren(
- n1,
- n2,
- container,
- fragmentEndAnchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- }
- }
- };
- const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- n2.slotScopeIds = slotScopeIds;
- if (n1 == null) {
- if (n2.shapeFlag & 512) {
- parentComponent.ctx.activate(
- n2,
- container,
- anchor,
- namespace,
- optimized
- );
- } else {
- mountComponent(
- n2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- optimized
- );
- }
- } else {
- updateComponent(n1, n2, optimized);
- }
- };
- const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
- const instance = initialVNode.component = createComponentInstance(
- initialVNode,
- parentComponent,
- parentSuspense
- );
- if (isKeepAlive(initialVNode)) {
- instance.ctx.renderer = internals;
- }
- {
- setupComponent(instance, false, optimized);
- }
- if (instance.asyncDep) {
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
- if (!initialVNode.el) {
- const placeholder = instance.subTree = createVNode(Comment);
- processCommentNode(null, placeholder, container, anchor);
- }
- } else {
- setupRenderEffect(
- instance,
- initialVNode,
- container,
- anchor,
- parentSuspense,
- namespace,
- optimized
- );
- }
- };
- const updateComponent = (n1, n2, optimized) => {
- const instance = n2.component = n1.component;
- if (shouldUpdateComponent(n1, n2, optimized)) {
- if (instance.asyncDep && !instance.asyncResolved) {
- updateComponentPreRender(instance, n2, optimized);
- return;
- } else {
- instance.next = n2;
- instance.update();
- }
- } else {
- n2.el = n1.el;
- instance.vnode = n2;
- }
- };
- const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
- const componentUpdateFn = () => {
- if (!instance.isMounted) {
- let vnodeHook;
- const { el, props } = initialVNode;
- const { bm, m, parent, root, type } = instance;
- const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
- toggleRecurse(instance, false);
- if (bm) {
- invokeArrayFns(bm);
- }
- if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
- invokeVNodeHook(vnodeHook, parent, initialVNode);
- }
- toggleRecurse(instance, true);
- {
- if (root.ce) {
- root.ce._injectChildStyle(type);
- }
- const subTree = instance.subTree = renderComponentRoot(instance);
- patch(
- null,
- subTree,
- container,
- anchor,
- instance,
- parentSuspense,
- namespace
- );
- initialVNode.el = subTree.el;
- }
- if (m) {
- queuePostRenderEffect(m, parentSuspense);
- }
- if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
- const scopedInitialVNode = initialVNode;
- queuePostRenderEffect(
- () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
- parentSuspense
- );
- }
- if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
- instance.a && queuePostRenderEffect(instance.a, parentSuspense);
- }
- instance.isMounted = true;
- initialVNode = container = anchor = null;
- } else {
- let { next, bu, u, parent, vnode } = instance;
- {
- const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
- if (nonHydratedAsyncRoot) {
- if (next) {
- next.el = vnode.el;
- updateComponentPreRender(instance, next, optimized);
- }
- nonHydratedAsyncRoot.asyncDep.then(() => {
- if (!instance.isUnmounted) {
- componentUpdateFn();
- }
- });
- return;
- }
- }
- let originNext = next;
- let vnodeHook;
- toggleRecurse(instance, false);
- if (next) {
- next.el = vnode.el;
- updateComponentPreRender(instance, next, optimized);
- } else {
- next = vnode;
- }
- if (bu) {
- invokeArrayFns(bu);
- }
- if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
- invokeVNodeHook(vnodeHook, parent, next, vnode);
- }
- toggleRecurse(instance, true);
- const nextTree = renderComponentRoot(instance);
- const prevTree = instance.subTree;
- instance.subTree = nextTree;
- patch(
- prevTree,
- nextTree,
- // parent may have changed if it's in a teleport
- hostParentNode(prevTree.el),
- // anchor may have changed if it's in a fragment
- getNextHostNode(prevTree),
- instance,
- parentSuspense,
- namespace
- );
- next.el = nextTree.el;
- if (originNext === null) {
- updateHOCHostEl(instance, nextTree.el);
- }
- if (u) {
- queuePostRenderEffect(u, parentSuspense);
- }
- if (vnodeHook = next.props && next.props.onVnodeUpdated) {
- queuePostRenderEffect(
- () => invokeVNodeHook(vnodeHook, parent, next, vnode),
- parentSuspense
- );
- }
- }
- };
- instance.scope.on();
- const effect2 = instance.effect = new ReactiveEffect(componentUpdateFn);
- instance.scope.off();
- const update = instance.update = effect2.run.bind(effect2);
- const job = instance.job = effect2.runIfDirty.bind(effect2);
- job.i = instance;
- job.id = instance.uid;
- effect2.scheduler = () => queueJob(job);
- toggleRecurse(instance, true);
- update();
- };
- const updateComponentPreRender = (instance, nextVNode, optimized) => {
- nextVNode.component = instance;
- const prevProps = instance.vnode.props;
- instance.vnode = nextVNode;
- instance.next = null;
- updateProps(instance, nextVNode.props, prevProps, optimized);
- updateSlots(instance, nextVNode.children, optimized);
- pauseTracking();
- flushPreFlushCbs(instance);
- resetTracking();
- };
- const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
- const c1 = n1 && n1.children;
- const prevShapeFlag = n1 ? n1.shapeFlag : 0;
- const c2 = n2.children;
- const { patchFlag, shapeFlag } = n2;
- if (patchFlag > 0) {
- if (patchFlag & 128) {
- patchKeyedChildren(
- c1,
- c2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- return;
- } else if (patchFlag & 256) {
- patchUnkeyedChildren(
- c1,
- c2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- return;
- }
- }
- if (shapeFlag & 8) {
- if (prevShapeFlag & 16) {
- unmountChildren(c1, parentComponent, parentSuspense);
- }
- if (c2 !== c1) {
- hostSetElementText(container, c2);
- }
- } else {
- if (prevShapeFlag & 16) {
- if (shapeFlag & 16) {
- patchKeyedChildren(
- c1,
- c2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else {
- unmountChildren(c1, parentComponent, parentSuspense, true);
- }
- } else {
- if (prevShapeFlag & 8) {
- hostSetElementText(container, "");
- }
- if (shapeFlag & 16) {
- mountChildren(
- c2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- }
- }
- }
- };
- const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- c1 = c1 || EMPTY_ARR;
- c2 = c2 || EMPTY_ARR;
- const oldLength = c1.length;
- const newLength = c2.length;
- const commonLength = Math.min(oldLength, newLength);
- let i;
- for (i = 0; i < commonLength; i++) {
- const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
- patch(
- c1[i],
- nextChild,
- container,
- null,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- }
- if (oldLength > newLength) {
- unmountChildren(
- c1,
- parentComponent,
- parentSuspense,
- true,
- false,
- commonLength
- );
- } else {
- mountChildren(
- c2,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized,
- commonLength
- );
- }
- };
- const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
- let i = 0;
- const l2 = c2.length;
- let e1 = c1.length - 1;
- let e2 = l2 - 1;
- while (i <= e1 && i <= e2) {
- const n1 = c1[i];
- const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
- if (isSameVNodeType(n1, n2)) {
- patch(
- n1,
- n2,
- container,
- null,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else {
- break;
- }
- i++;
- }
- while (i <= e1 && i <= e2) {
- const n1 = c1[e1];
- const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
- if (isSameVNodeType(n1, n2)) {
- patch(
- n1,
- n2,
- container,
- null,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else {
- break;
- }
- e1--;
- e2--;
- }
- if (i > e1) {
- if (i <= e2) {
- const nextPos = e2 + 1;
- const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
- while (i <= e2) {
- patch(
- null,
- c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- i++;
- }
- }
- } else if (i > e2) {
- while (i <= e1) {
- unmount(c1[i], parentComponent, parentSuspense, true);
- i++;
- }
- } else {
- const s1 = i;
- const s2 = i;
- const keyToNewIndexMap = /* @__PURE__ */ new Map();
- for (i = s2; i <= e2; i++) {
- const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
- if (nextChild.key != null) {
- keyToNewIndexMap.set(nextChild.key, i);
- }
- }
- let j;
- let patched = 0;
- const toBePatched = e2 - s2 + 1;
- let moved = false;
- let maxNewIndexSoFar = 0;
- const newIndexToOldIndexMap = new Array(toBePatched);
- for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
- for (i = s1; i <= e1; i++) {
- const prevChild = c1[i];
- if (patched >= toBePatched) {
- unmount(prevChild, parentComponent, parentSuspense, true);
- continue;
- }
- let newIndex;
- if (prevChild.key != null) {
- newIndex = keyToNewIndexMap.get(prevChild.key);
- } else {
- for (j = s2; j <= e2; j++) {
- if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
- newIndex = j;
- break;
- }
- }
- }
- if (newIndex === void 0) {
- unmount(prevChild, parentComponent, parentSuspense, true);
- } else {
- newIndexToOldIndexMap[newIndex - s2] = i + 1;
- if (newIndex >= maxNewIndexSoFar) {
- maxNewIndexSoFar = newIndex;
- } else {
- moved = true;
- }
- patch(
- prevChild,
- c2[newIndex],
- container,
- null,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- patched++;
- }
- }
- const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
- j = increasingNewIndexSequence.length - 1;
- for (i = toBePatched - 1; i >= 0; i--) {
- const nextIndex = s2 + i;
- const nextChild = c2[nextIndex];
- const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
- if (newIndexToOldIndexMap[i] === 0) {
- patch(
- null,
- nextChild,
- container,
- anchor,
- parentComponent,
- parentSuspense,
- namespace,
- slotScopeIds,
- optimized
- );
- } else if (moved) {
- if (j < 0 || i !== increasingNewIndexSequence[j]) {
- move(nextChild, container, anchor, 2);
- } else {
- j--;
- }
- }
- }
- }
- };
- const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
- const { el, type, transition, children, shapeFlag } = vnode;
- if (shapeFlag & 6) {
- move(vnode.component.subTree, container, anchor, moveType);
- return;
- }
- if (shapeFlag & 128) {
- vnode.suspense.move(container, anchor, moveType);
- return;
- }
- if (shapeFlag & 64) {
- type.move(vnode, container, anchor, internals);
- return;
- }
- if (type === Fragment) {
- hostInsert(el, container, anchor);
- for (let i = 0; i < children.length; i++) {
- move(children[i], container, anchor, moveType);
- }
- hostInsert(vnode.anchor, container, anchor);
- return;
- }
- if (type === Static) {
- moveStaticNode(vnode, container, anchor);
- return;
- }
- const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
- if (needTransition2) {
- if (moveType === 0) {
- transition.beforeEnter(el);
- hostInsert(el, container, anchor);
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
- } else {
- const { leave, delayLeave, afterLeave } = transition;
- const remove22 = () => hostInsert(el, container, anchor);
- const performLeave = () => {
- leave(el, () => {
- remove22();
- afterLeave && afterLeave();
- });
- };
- if (delayLeave) {
- delayLeave(el, remove22, performLeave);
- } else {
- performLeave();
- }
- }
- } else {
- hostInsert(el, container, anchor);
- }
- };
- const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
- const {
- type,
- props,
- ref: ref3,
- children,
- dynamicChildren,
- shapeFlag,
- patchFlag,
- dirs,
- cacheIndex
- } = vnode;
- if (patchFlag === -2) {
- optimized = false;
- }
- if (ref3 != null) {
- setRef(ref3, null, parentSuspense, vnode, true);
- }
- if (cacheIndex != null) {
- parentComponent.renderCache[cacheIndex] = void 0;
- }
- if (shapeFlag & 256) {
- parentComponent.ctx.deactivate(vnode);
- return;
- }
- const shouldInvokeDirs = shapeFlag & 1 && dirs;
- const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
- let vnodeHook;
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
- invokeVNodeHook(vnodeHook, parentComponent, vnode);
- }
- if (shapeFlag & 6) {
- unmountComponent(vnode.component, parentSuspense, doRemove);
- } else {
- if (shapeFlag & 128) {
- vnode.suspense.unmount(parentSuspense, doRemove);
- return;
- }
- if (shouldInvokeDirs) {
- invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
- }
- if (shapeFlag & 64) {
- vnode.type.remove(
- vnode,
- parentComponent,
- parentSuspense,
- internals,
- doRemove
- );
- } else if (dynamicChildren && // #5154
- // when v-once is used inside a block, setBlockTracking(-1) marks the
- // parent block with hasOnce: true
- // so that it doesn't take the fast path during unmount - otherwise
- // components nested in v-once are never unmounted.
- !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
- (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
- unmountChildren(
- dynamicChildren,
- parentComponent,
- parentSuspense,
- false,
- true
- );
- } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
- unmountChildren(children, parentComponent, parentSuspense);
- }
- if (doRemove) {
- remove2(vnode);
- }
- }
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
- queuePostRenderEffect(() => {
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
- shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
- }, parentSuspense);
- }
- };
- const remove2 = (vnode) => {
- const { type, el, anchor, transition } = vnode;
- if (type === Fragment) {
- {
- removeFragment(el, anchor);
- }
- return;
- }
- if (type === Static) {
- removeStaticNode(vnode);
- return;
- }
- const performRemove = () => {
- hostRemove(el);
- if (transition && !transition.persisted && transition.afterLeave) {
- transition.afterLeave();
- }
- };
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
- const { leave, delayLeave } = transition;
- const performLeave = () => leave(el, performRemove);
- if (delayLeave) {
- delayLeave(vnode.el, performRemove, performLeave);
- } else {
- performLeave();
- }
- } else {
- performRemove();
- }
- };
- const removeFragment = (cur, end) => {
- let next;
- while (cur !== end) {
- next = hostNextSibling(cur);
- hostRemove(cur);
- cur = next;
- }
- hostRemove(end);
- };
- const unmountComponent = (instance, parentSuspense, doRemove) => {
- const { bum, scope, job, subTree, um, m, a } = instance;
- invalidateMount(m);
- invalidateMount(a);
- if (bum) {
- invokeArrayFns(bum);
- }
- scope.stop();
- if (job) {
- job.flags |= 8;
- unmount(subTree, instance, parentSuspense, doRemove);
- }
- if (um) {
- queuePostRenderEffect(um, parentSuspense);
- }
- queuePostRenderEffect(() => {
- instance.isUnmounted = true;
- }, parentSuspense);
- if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
- parentSuspense.deps--;
- if (parentSuspense.deps === 0) {
- parentSuspense.resolve();
- }
- }
- };
- const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
- for (let i = start; i < children.length; i++) {
- unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
- }
- };
- const getNextHostNode = (vnode) => {
- if (vnode.shapeFlag & 6) {
- return getNextHostNode(vnode.component.subTree);
- }
- if (vnode.shapeFlag & 128) {
- return vnode.suspense.next();
- }
- const el = hostNextSibling(vnode.anchor || vnode.el);
- const teleportEnd = el && el[TeleportEndKey];
- return teleportEnd ? hostNextSibling(teleportEnd) : el;
- };
- let isFlushing = false;
- const render = (vnode, container, namespace) => {
- if (vnode == null) {
- if (container._vnode) {
- unmount(container._vnode, null, null, true);
- }
- } else {
- patch(
- container._vnode || null,
- vnode,
- container,
- null,
- null,
- null,
- namespace
- );
- }
- container._vnode = vnode;
- if (!isFlushing) {
- isFlushing = true;
- flushPreFlushCbs();
- flushPostFlushCbs();
- isFlushing = false;
- }
- };
- const internals = {
- p: patch,
- um: unmount,
- m: move,
- r: remove2,
- mt: mountComponent,
- mc: mountChildren,
- pc: patchChildren,
- pbc: patchBlockChildren,
- n: getNextHostNode,
- o: options
- };
- let hydrate;
- return {
- render,
- hydrate,
- createApp: createAppAPI(render)
- };
-}
-function resolveChildrenNamespace({ type, props }, currentNamespace) {
- return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
-}
-function toggleRecurse({ effect: effect2, job }, allowed) {
- if (allowed) {
- effect2.flags |= 32;
- job.flags |= 4;
- } else {
- effect2.flags &= -33;
- job.flags &= -5;
- }
-}
-function needTransition(parentSuspense, transition) {
- return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
-}
-function traverseStaticChildren(n1, n2, shallow = false) {
- const ch1 = n1.children;
- const ch2 = n2.children;
- if (isArray$2(ch1) && isArray$2(ch2)) {
- for (let i = 0; i < ch1.length; i++) {
- const c1 = ch1[i];
- let c2 = ch2[i];
- if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
- if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
- c2 = ch2[i] = cloneIfMounted(ch2[i]);
- c2.el = c1.el;
- }
- if (!shallow && c2.patchFlag !== -2)
- traverseStaticChildren(c1, c2);
- }
- if (c2.type === Text) {
- c2.el = c1.el;
- }
- }
- }
-}
-function getSequence(arr) {
- const p2 = arr.slice();
- const result = [0];
- let i, j, u, v, c;
- const len = arr.length;
- for (i = 0; i < len; i++) {
- const arrI = arr[i];
- if (arrI !== 0) {
- j = result[result.length - 1];
- if (arr[j] < arrI) {
- p2[i] = j;
- result.push(i);
- continue;
- }
- u = 0;
- v = result.length - 1;
- while (u < v) {
- c = u + v >> 1;
- if (arr[result[c]] < arrI) {
- u = c + 1;
- } else {
- v = c;
- }
- }
- if (arrI < arr[result[u]]) {
- if (u > 0) {
- p2[i] = result[u - 1];
- }
- result[u] = i;
- }
- }
- }
- u = result.length;
- v = result[u - 1];
- while (u-- > 0) {
- result[u] = v;
- v = p2[v];
- }
- return result;
-}
-function locateNonHydratedAsyncRoot(instance) {
- const subComponent = instance.subTree.component;
- if (subComponent) {
- if (subComponent.asyncDep && !subComponent.asyncResolved) {
- return subComponent;
- } else {
- return locateNonHydratedAsyncRoot(subComponent);
- }
- }
-}
-function invalidateMount(hooks) {
- if (hooks) {
- for (let i = 0; i < hooks.length; i++)
- hooks[i].flags |= 8;
- }
-}
-const ssrContextKey = Symbol.for("v-scx");
-const useSSRContext = () => {
- {
- const ctx = inject(ssrContextKey);
- return ctx;
- }
-};
-function watch(source, cb, options) {
- return doWatch(source, cb, options);
-}
-function doWatch(source, cb, options = EMPTY_OBJ) {
- const { immediate, deep, flush, once } = options;
- const baseWatchOptions = extend$1({}, options);
- const runsImmediately = cb && immediate || !cb && flush !== "post";
- let ssrCleanup;
- if (isInSSRComponentSetup) {
- if (flush === "sync") {
- const ctx = useSSRContext();
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
- } else if (!runsImmediately) {
- const watchStopHandle = () => {
- };
- watchStopHandle.stop = NOOP;
- watchStopHandle.resume = NOOP;
- watchStopHandle.pause = NOOP;
- return watchStopHandle;
- }
- }
- const instance = currentInstance;
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
- let isPre = false;
- if (flush === "post") {
- baseWatchOptions.scheduler = (job) => {
- queuePostRenderEffect(job, instance && instance.suspense);
- };
- } else if (flush !== "sync") {
- isPre = true;
- baseWatchOptions.scheduler = (job, isFirstRun) => {
- if (isFirstRun) {
- job();
- } else {
- queueJob(job);
- }
- };
- }
- baseWatchOptions.augmentJob = (job) => {
- if (cb) {
- job.flags |= 4;
- }
- if (isPre) {
- job.flags |= 2;
- if (instance) {
- job.id = instance.uid;
- job.i = instance;
- }
- }
- };
- const watchHandle = watch$1(source, cb, baseWatchOptions);
- if (isInSSRComponentSetup) {
- if (ssrCleanup) {
- ssrCleanup.push(watchHandle);
- } else if (runsImmediately) {
- watchHandle();
- }
- }
- return watchHandle;
-}
-function instanceWatch(source, value, options) {
- const publicThis = this.proxy;
- const getter = isString$1(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
- let cb;
- if (isFunction$1(value)) {
- cb = value;
- } else {
- cb = value.handler;
- options = value;
- }
- const reset = setCurrentInstance(this);
- const res = doWatch(getter, cb.bind(publicThis), options);
- reset();
- return res;
-}
-function createPathGetter(ctx, path) {
- const segments = path.split(".");
- return () => {
- let cur = ctx;
- for (let i = 0; i < segments.length && cur; i++) {
- cur = cur[segments[i]];
- }
- return cur;
- };
-}
-const getModelModifiers = (props, modelName) => {
- return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
-};
-function emit(instance, event, ...rawArgs) {
- if (instance.isUnmounted) return;
- const props = instance.vnode.props || EMPTY_OBJ;
- let args = rawArgs;
- const isModelListener2 = event.startsWith("update:");
- const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
- if (modifiers) {
- if (modifiers.trim) {
- args = rawArgs.map((a) => isString$1(a) ? a.trim() : a);
- }
- if (modifiers.number) {
- args = rawArgs.map(looseToNumber);
- }
- }
- let handlerName;
- let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
- props[handlerName = toHandlerKey(camelize(event))];
- if (!handler && isModelListener2) {
- handler = props[handlerName = toHandlerKey(hyphenate(event))];
- }
- if (handler) {
- callWithAsyncErrorHandling(
- handler,
- instance,
- 6,
- args
- );
- }
- const onceHandler = props[handlerName + `Once`];
- if (onceHandler) {
- if (!instance.emitted) {
- instance.emitted = {};
- } else if (instance.emitted[handlerName]) {
- return;
- }
- instance.emitted[handlerName] = true;
- callWithAsyncErrorHandling(
- onceHandler,
- instance,
- 6,
- args
- );
- }
-}
-function normalizeEmitsOptions(comp, appContext, asMixin = false) {
- const cache = appContext.emitsCache;
- const cached = cache.get(comp);
- if (cached !== void 0) {
- return cached;
- }
- const raw = comp.emits;
- let normalized = {};
- let hasExtends = false;
- if (!isFunction$1(comp)) {
- const extendEmits = (raw2) => {
- const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
- if (normalizedFromExtend) {
- hasExtends = true;
- extend$1(normalized, normalizedFromExtend);
- }
- };
- if (!asMixin && appContext.mixins.length) {
- appContext.mixins.forEach(extendEmits);
- }
- if (comp.extends) {
- extendEmits(comp.extends);
- }
- if (comp.mixins) {
- comp.mixins.forEach(extendEmits);
- }
- }
- if (!raw && !hasExtends) {
- if (isObject$1(comp)) {
- cache.set(comp, null);
- }
- return null;
- }
- if (isArray$2(raw)) {
- raw.forEach((key) => normalized[key] = null);
- } else {
- extend$1(normalized, raw);
- }
- if (isObject$1(comp)) {
- cache.set(comp, normalized);
- }
- return normalized;
-}
-function isEmitListener(options, key) {
- if (!options || !isOn(key)) {
- return false;
- }
- key = key.slice(2).replace(/Once$/, "");
- return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
-}
-function markAttrsAccessed() {
-}
-function renderComponentRoot(instance) {
- const {
- type: Component,
- vnode,
- proxy,
- withProxy,
- propsOptions: [propsOptions],
- slots,
- attrs,
- emit: emit2,
- render,
- renderCache,
- props,
- data,
- setupState,
- ctx,
- inheritAttrs
- } = instance;
- const prev = setCurrentRenderingInstance(instance);
- let result;
- let fallthroughAttrs;
- try {
- if (vnode.shapeFlag & 4) {
- const proxyToUse = withProxy || proxy;
- const thisProxy = false ? new Proxy(proxyToUse, {
- get(target, key, receiver) {
- warn$1(
- `Property '${String(
- key
- )}' was accessed via 'this'. Avoid using 'this' in templates.`
- );
- return Reflect.get(target, key, receiver);
- }
- }) : proxyToUse;
- result = normalizeVNode(
- render.call(
- thisProxy,
- proxyToUse,
- renderCache,
- false ? shallowReadonly(props) : props,
- setupState,
- data,
- ctx
- )
- );
- fallthroughAttrs = attrs;
- } else {
- const render2 = Component;
- if (false) ;
- result = normalizeVNode(
- render2.length > 1 ? render2(
- false ? shallowReadonly(props) : props,
- false ? {
- get attrs() {
- markAttrsAccessed();
- return shallowReadonly(attrs);
- },
- slots,
- emit: emit2
- } : { attrs, slots, emit: emit2 }
- ) : render2(
- false ? shallowReadonly(props) : props,
- null
- )
- );
- fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
- }
- } catch (err) {
- blockStack.length = 0;
- handleError(err, instance, 1);
- result = createVNode(Comment);
- }
- let root = result;
- if (fallthroughAttrs && inheritAttrs !== false) {
- const keys = Object.keys(fallthroughAttrs);
- const { shapeFlag } = root;
- if (keys.length) {
- if (shapeFlag & (1 | 6)) {
- if (propsOptions && keys.some(isModelListener)) {
- fallthroughAttrs = filterModelListeners(
- fallthroughAttrs,
- propsOptions
- );
- }
- root = cloneVNode(root, fallthroughAttrs, false, true);
- }
- }
- }
- if (vnode.dirs) {
- root = cloneVNode(root, null, false, true);
- root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
- }
- if (vnode.transition) {
- setTransitionHooks(root, vnode.transition);
- }
- {
- result = root;
- }
- setCurrentRenderingInstance(prev);
- return result;
-}
-const getFunctionalFallthrough = (attrs) => {
- let res;
- for (const key in attrs) {
- if (key === "class" || key === "style" || isOn(key)) {
- (res || (res = {}))[key] = attrs[key];
- }
- }
- return res;
-};
-const filterModelListeners = (attrs, props) => {
- const res = {};
- for (const key in attrs) {
- if (!isModelListener(key) || !(key.slice(9) in props)) {
- res[key] = attrs[key];
- }
- }
- return res;
-};
-function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
- const { props: prevProps, children: prevChildren, component } = prevVNode;
- const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
- const emits = component.emitsOptions;
- if (nextVNode.dirs || nextVNode.transition) {
- return true;
- }
- if (optimized && patchFlag >= 0) {
- if (patchFlag & 1024) {
- return true;
- }
- if (patchFlag & 16) {
- if (!prevProps) {
- return !!nextProps;
- }
- return hasPropsChanged(prevProps, nextProps, emits);
- } else if (patchFlag & 8) {
- const dynamicProps = nextVNode.dynamicProps;
- for (let i = 0; i < dynamicProps.length; i++) {
- const key = dynamicProps[i];
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
- return true;
- }
- }
- }
- } else {
- if (prevChildren || nextChildren) {
- if (!nextChildren || !nextChildren.$stable) {
- return true;
- }
- }
- if (prevProps === nextProps) {
- return false;
- }
- if (!prevProps) {
- return !!nextProps;
- }
- if (!nextProps) {
- return true;
- }
- return hasPropsChanged(prevProps, nextProps, emits);
- }
- return false;
-}
-function hasPropsChanged(prevProps, nextProps, emitsOptions) {
- const nextKeys = Object.keys(nextProps);
- if (nextKeys.length !== Object.keys(prevProps).length) {
- return true;
- }
- for (let i = 0; i < nextKeys.length; i++) {
- const key = nextKeys[i];
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
- return true;
- }
- }
- return false;
-}
-function updateHOCHostEl({ vnode, parent }, el) {
- while (parent) {
- const root = parent.subTree;
- if (root.suspense && root.suspense.activeBranch === vnode) {
- root.el = vnode.el;
- }
- if (root === vnode) {
- (vnode = parent.vnode).el = el;
- parent = parent.parent;
- } else {
- break;
- }
- }
-}
-const isSuspense = (type) => type.__isSuspense;
-function queueEffectWithSuspense(fn, suspense) {
- if (suspense && suspense.pendingBranch) {
- if (isArray$2(fn)) {
- suspense.effects.push(...fn);
- } else {
- suspense.effects.push(fn);
- }
- } else {
- queuePostFlushCb(fn);
- }
-}
-const Fragment = Symbol.for("v-fgt");
-const Text = Symbol.for("v-txt");
-const Comment = Symbol.for("v-cmt");
-const Static = Symbol.for("v-stc");
-const blockStack = [];
-let currentBlock = null;
-function openBlock(disableTracking = false) {
- blockStack.push(currentBlock = disableTracking ? null : []);
-}
-function closeBlock() {
- blockStack.pop();
- currentBlock = blockStack[blockStack.length - 1] || null;
-}
-let isBlockTreeEnabled = 1;
-function setBlockTracking(value, inVOnce = false) {
- isBlockTreeEnabled += value;
- if (value < 0 && currentBlock && inVOnce) {
- currentBlock.hasOnce = true;
- }
-}
-function setupBlock(vnode) {
- vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
- closeBlock();
- if (isBlockTreeEnabled > 0 && currentBlock) {
- currentBlock.push(vnode);
- }
- return vnode;
-}
-function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
- return setupBlock(
- createBaseVNode(
- type,
- props,
- children,
- patchFlag,
- dynamicProps,
- shapeFlag,
- true
- )
- );
-}
-function createBlock(type, props, children, patchFlag, dynamicProps) {
- return setupBlock(
- createVNode(
- type,
- props,
- children,
- patchFlag,
- dynamicProps,
- true
- )
- );
-}
-function isVNode(value) {
- return value ? value.__v_isVNode === true : false;
-}
-function isSameVNodeType(n1, n2) {
- return n1.type === n2.type && n1.key === n2.key;
-}
-const normalizeKey = ({ key }) => key != null ? key : null;
-const normalizeRef = ({
- ref: ref3,
- ref_key,
- ref_for
-}) => {
- if (typeof ref3 === "number") {
- ref3 = "" + ref3;
- }
- return ref3 != null ? isString$1(ref3) || isRef(ref3) || isFunction$1(ref3) ? { i: currentRenderingInstance, r: ref3, k: ref_key, f: !!ref_for } : ref3 : null;
-};
-function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
- const vnode = {
- __v_isVNode: true,
- __v_skip: true,
- type,
- props,
- key: props && normalizeKey(props),
- ref: props && normalizeRef(props),
- scopeId: currentScopeId,
- slotScopeIds: null,
- children,
- component: null,
- suspense: null,
- ssContent: null,
- ssFallback: null,
- dirs: null,
- transition: null,
- el: null,
- anchor: null,
- target: null,
- targetStart: null,
- targetAnchor: null,
- staticCount: 0,
- shapeFlag,
- patchFlag,
- dynamicProps,
- dynamicChildren: null,
- appContext: null,
- ctx: currentRenderingInstance
- };
- if (needFullChildrenNormalization) {
- normalizeChildren(vnode, children);
- if (shapeFlag & 128) {
- type.normalize(vnode);
- }
- } else if (children) {
- vnode.shapeFlag |= isString$1(children) ? 8 : 16;
- }
- if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
- !isBlockNode && // has current parent block
- currentBlock && // presence of a patch flag indicates this node needs patching on updates.
- // component nodes also should always be patched, because even if the
- // component doesn't need to update, it needs to persist the instance on to
- // the next vnode so that it can be properly unmounted later.
- (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
- // vnode should not be considered dynamic due to handler caching.
- vnode.patchFlag !== 32) {
- currentBlock.push(vnode);
- }
- return vnode;
-}
-const createVNode = _createVNode;
-function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
- if (!type || type === NULL_DYNAMIC_COMPONENT) {
- type = Comment;
- }
- if (isVNode(type)) {
- const cloned = cloneVNode(
- type,
- props,
- true
- /* mergeRef: true */
- );
- if (children) {
- normalizeChildren(cloned, children);
- }
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
- if (cloned.shapeFlag & 6) {
- currentBlock[currentBlock.indexOf(type)] = cloned;
- } else {
- currentBlock.push(cloned);
- }
- }
- cloned.patchFlag = -2;
- return cloned;
- }
- if (isClassComponent(type)) {
- type = type.__vccOpts;
- }
- if (props) {
- props = guardReactiveProps(props);
- let { class: klass, style } = props;
- if (klass && !isString$1(klass)) {
- props.class = normalizeClass(klass);
- }
- if (isObject$1(style)) {
- if (isProxy(style) && !isArray$2(style)) {
- style = extend$1({}, style);
- }
- props.style = normalizeStyle(style);
- }
- }
- const shapeFlag = isString$1(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction$1(type) ? 2 : 0;
- return createBaseVNode(
- type,
- props,
- children,
- patchFlag,
- dynamicProps,
- shapeFlag,
- isBlockNode,
- true
- );
-}
-function guardReactiveProps(props) {
- if (!props) return null;
- return isProxy(props) || isInternalObject(props) ? extend$1({}, props) : props;
-}
-function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
- const { props, ref: ref3, patchFlag, children, transition } = vnode;
- const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
- const cloned = {
- __v_isVNode: true,
- __v_skip: true,
- type: vnode.type,
- props: mergedProps,
- key: mergedProps && normalizeKey(mergedProps),
- ref: extraProps && extraProps.ref ? (
- // #2078 in the case of
- // if the vnode itself already has a ref, cloneVNode will need to merge
- // the refs so the single vnode can be set on multiple refs
- mergeRef && ref3 ? isArray$2(ref3) ? ref3.concat(normalizeRef(extraProps)) : [ref3, normalizeRef(extraProps)] : normalizeRef(extraProps)
- ) : ref3,
- scopeId: vnode.scopeId,
- slotScopeIds: vnode.slotScopeIds,
- children,
- target: vnode.target,
- targetStart: vnode.targetStart,
- targetAnchor: vnode.targetAnchor,
- staticCount: vnode.staticCount,
- shapeFlag: vnode.shapeFlag,
- // if the vnode is cloned with extra props, we can no longer assume its
- // existing patch flag to be reliable and need to add the FULL_PROPS flag.
- // note: preserve flag for fragments since they use the flag for children
- // fast paths only.
- patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
- dynamicProps: vnode.dynamicProps,
- dynamicChildren: vnode.dynamicChildren,
- appContext: vnode.appContext,
- dirs: vnode.dirs,
- transition,
- // These should technically only be non-null on mounted VNodes. However,
- // they *should* be copied for kept-alive vnodes. So we just always copy
- // them since them being non-null during a mount doesn't affect the logic as
- // they will simply be overwritten.
- component: vnode.component,
- suspense: vnode.suspense,
- ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
- ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
- el: vnode.el,
- anchor: vnode.anchor,
- ctx: vnode.ctx,
- ce: vnode.ce
- };
- if (transition && cloneTransition) {
- setTransitionHooks(
- cloned,
- transition.clone(cloned)
- );
- }
- return cloned;
-}
-function createTextVNode(text = " ", flag = 0) {
- return createVNode(Text, null, text, flag);
-}
-function createCommentVNode(text = "", asBlock = false) {
- return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
-}
-function normalizeVNode(child) {
- if (child == null || typeof child === "boolean") {
- return createVNode(Comment);
- } else if (isArray$2(child)) {
- return createVNode(
- Fragment,
- null,
- // #3666, avoid reference pollution when reusing vnode
- child.slice()
- );
- } else if (isVNode(child)) {
- return cloneIfMounted(child);
- } else {
- return createVNode(Text, null, String(child));
- }
-}
-function cloneIfMounted(child) {
- return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
-}
-function normalizeChildren(vnode, children) {
- let type = 0;
- const { shapeFlag } = vnode;
- if (children == null) {
- children = null;
- } else if (isArray$2(children)) {
- type = 16;
- } else if (typeof children === "object") {
- if (shapeFlag & (1 | 64)) {
- const slot = children.default;
- if (slot) {
- slot._c && (slot._d = false);
- normalizeChildren(vnode, slot());
- slot._c && (slot._d = true);
- }
- return;
- } else {
- type = 32;
- const slotFlag = children._;
- if (!slotFlag && !isInternalObject(children)) {
- children._ctx = currentRenderingInstance;
- } else if (slotFlag === 3 && currentRenderingInstance) {
- if (currentRenderingInstance.slots._ === 1) {
- children._ = 1;
- } else {
- children._ = 2;
- vnode.patchFlag |= 1024;
- }
- }
- }
- } else if (isFunction$1(children)) {
- children = { default: children, _ctx: currentRenderingInstance };
- type = 32;
- } else {
- children = String(children);
- if (shapeFlag & 64) {
- type = 16;
- children = [createTextVNode(children)];
- } else {
- type = 8;
- }
- }
- vnode.children = children;
- vnode.shapeFlag |= type;
-}
-function mergeProps(...args) {
- const ret = {};
- for (let i = 0; i < args.length; i++) {
- const toMerge = args[i];
- for (const key in toMerge) {
- if (key === "class") {
- if (ret.class !== toMerge.class) {
- ret.class = normalizeClass([ret.class, toMerge.class]);
- }
- } else if (key === "style") {
- ret.style = normalizeStyle([ret.style, toMerge.style]);
- } else if (isOn(key)) {
- const existing = ret[key];
- const incoming = toMerge[key];
- if (incoming && existing !== incoming && !(isArray$2(existing) && existing.includes(incoming))) {
- ret[key] = existing ? [].concat(existing, incoming) : incoming;
- }
- } else if (key !== "") {
- ret[key] = toMerge[key];
- }
- }
- }
- return ret;
-}
-function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
- callWithAsyncErrorHandling(hook, instance, 7, [
- vnode,
- prevVNode
- ]);
-}
-const emptyAppContext = createAppContext();
-let uid = 0;
-function createComponentInstance(vnode, parent, suspense) {
- const type = vnode.type;
- const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
- const instance = {
- uid: uid++,
- vnode,
- type,
- parent,
- appContext,
- root: null,
- // to be immediately set
- next: null,
- subTree: null,
- // will be set synchronously right after creation
- effect: null,
- update: null,
- // will be set synchronously right after creation
- job: null,
- scope: new EffectScope(
- true
- /* detached */
- ),
- render: null,
- proxy: null,
- exposed: null,
- exposeProxy: null,
- withProxy: null,
- provides: parent ? parent.provides : Object.create(appContext.provides),
- ids: parent ? parent.ids : ["", 0, 0],
- accessCache: null,
- renderCache: [],
- // local resolved assets
- components: null,
- directives: null,
- // resolved props and emits options
- propsOptions: normalizePropsOptions(type, appContext),
- emitsOptions: normalizeEmitsOptions(type, appContext),
- // emit
- emit: null,
- // to be set immediately
- emitted: null,
- // props default value
- propsDefaults: EMPTY_OBJ,
- // inheritAttrs
- inheritAttrs: type.inheritAttrs,
- // state
- ctx: EMPTY_OBJ,
- data: EMPTY_OBJ,
- props: EMPTY_OBJ,
- attrs: EMPTY_OBJ,
- slots: EMPTY_OBJ,
- refs: EMPTY_OBJ,
- setupState: EMPTY_OBJ,
- setupContext: null,
- // suspense related
- suspense,
- suspenseId: suspense ? suspense.pendingId : 0,
- asyncDep: null,
- asyncResolved: false,
- // lifecycle hooks
- // not using enums here because it results in computed properties
- isMounted: false,
- isUnmounted: false,
- isDeactivated: false,
- bc: null,
- c: null,
- bm: null,
- m: null,
- bu: null,
- u: null,
- um: null,
- bum: null,
- da: null,
- a: null,
- rtg: null,
- rtc: null,
- ec: null,
- sp: null
- };
- {
- instance.ctx = { _: instance };
- }
- instance.root = parent ? parent.root : instance;
- instance.emit = emit.bind(null, instance);
- if (vnode.ce) {
- vnode.ce(instance);
- }
- return instance;
-}
-let currentInstance = null;
-let internalSetCurrentInstance;
-let setInSSRSetupState;
-{
- const g = getGlobalThis();
- const registerGlobalSetter = (key, setter) => {
- let setters;
- if (!(setters = g[key])) setters = g[key] = [];
- setters.push(setter);
- return (v) => {
- if (setters.length > 1) setters.forEach((set) => set(v));
- else setters[0](v);
- };
- };
- internalSetCurrentInstance = registerGlobalSetter(
- `__VUE_INSTANCE_SETTERS__`,
- (v) => currentInstance = v
- );
- setInSSRSetupState = registerGlobalSetter(
- `__VUE_SSR_SETTERS__`,
- (v) => isInSSRComponentSetup = v
- );
-}
-const setCurrentInstance = (instance) => {
- const prev = currentInstance;
- internalSetCurrentInstance(instance);
- instance.scope.on();
- return () => {
- instance.scope.off();
- internalSetCurrentInstance(prev);
- };
-};
-const unsetCurrentInstance = () => {
- currentInstance && currentInstance.scope.off();
- internalSetCurrentInstance(null);
-};
-function isStatefulComponent(instance) {
- return instance.vnode.shapeFlag & 4;
-}
-let isInSSRComponentSetup = false;
-function setupComponent(instance, isSSR = false, optimized = false) {
- isSSR && setInSSRSetupState(isSSR);
- const { props, children } = instance.vnode;
- const isStateful = isStatefulComponent(instance);
- initProps(instance, props, isStateful, isSSR);
- initSlots(instance, children, optimized);
- const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
- isSSR && setInSSRSetupState(false);
- return setupResult;
-}
-function setupStatefulComponent(instance, isSSR) {
- const Component = instance.type;
- instance.accessCache = /* @__PURE__ */ Object.create(null);
- instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
- const { setup } = Component;
- if (setup) {
- pauseTracking();
- const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
- const reset = setCurrentInstance(instance);
- const setupResult = callWithErrorHandling(
- setup,
- instance,
- 0,
- [
- instance.props,
- setupContext
- ]
- );
- const isAsyncSetup = isPromise(setupResult);
- resetTracking();
- reset();
- if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
- markAsyncBoundary(instance);
- }
- if (isAsyncSetup) {
- setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
- if (isSSR) {
- return setupResult.then((resolvedResult) => {
- handleSetupResult(instance, resolvedResult);
- }).catch((e) => {
- handleError(e, instance, 0);
- });
- } else {
- instance.asyncDep = setupResult;
- }
- } else {
- handleSetupResult(instance, setupResult);
- }
- } else {
- finishComponentSetup(instance);
- }
-}
-function handleSetupResult(instance, setupResult, isSSR) {
- if (isFunction$1(setupResult)) {
- if (instance.type.__ssrInlineRender) {
- instance.ssrRender = setupResult;
- } else {
- instance.render = setupResult;
- }
- } else if (isObject$1(setupResult)) {
- instance.setupState = proxyRefs(setupResult);
- } else ;
- finishComponentSetup(instance);
-}
-function finishComponentSetup(instance, isSSR, skipOptions) {
- const Component = instance.type;
- if (!instance.render) {
- instance.render = Component.render || NOOP;
- }
- {
- const reset = setCurrentInstance(instance);
- pauseTracking();
- try {
- applyOptions(instance);
- } finally {
- resetTracking();
- reset();
- }
- }
-}
-const attrsProxyHandlers = {
- get(target, key) {
- track(target, "get", "");
- return target[key];
- }
-};
-function createSetupContext(instance) {
- const expose = (exposed) => {
- instance.exposed = exposed || {};
- };
- {
- return {
- attrs: new Proxy(instance.attrs, attrsProxyHandlers),
- slots: instance.slots,
- emit: instance.emit,
- expose
- };
- }
-}
-function getComponentPublicInstance(instance) {
- if (instance.exposed) {
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
- get(target, key) {
- if (key in target) {
- return target[key];
- } else if (key in publicPropertiesMap) {
- return publicPropertiesMap[key](instance);
- }
- },
- has(target, key) {
- return key in target || key in publicPropertiesMap;
- }
- }));
- } else {
- return instance.proxy;
- }
-}
-const classifyRE = /(?:^|[-_])(\w)/g;
-const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
-function getComponentName(Component, includeInferred = true) {
- return isFunction$1(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
-}
-function formatComponentName(instance, Component, isRoot = false) {
- let name = getComponentName(Component);
- if (!name && Component.__file) {
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
- if (match) {
- name = match[1];
- }
- }
- if (!name && instance && instance.parent) {
- const inferFromRegistry = (registry) => {
- for (const key in registry) {
- if (registry[key] === Component) {
- return key;
- }
- }
- };
- name = inferFromRegistry(
- instance.components || instance.parent.type.components
- ) || inferFromRegistry(instance.appContext.components);
- }
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
-}
-function isClassComponent(value) {
- return isFunction$1(value) && "__vccOpts" in value;
-}
-const computed = (getterOrOptions, debugOptions) => {
- const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
- return c;
-};
-function h(type, propsOrChildren, children) {
- const l = arguments.length;
- if (l === 2) {
- if (isObject$1(propsOrChildren) && !isArray$2(propsOrChildren)) {
- if (isVNode(propsOrChildren)) {
- return createVNode(type, null, [propsOrChildren]);
- }
- return createVNode(type, propsOrChildren);
- } else {
- return createVNode(type, null, propsOrChildren);
- }
- } else {
- if (l > 3) {
- children = Array.prototype.slice.call(arguments, 2);
- } else if (l === 3 && isVNode(children)) {
- children = [children];
- }
- return createVNode(type, propsOrChildren, children);
- }
-}
-const version = "3.5.13";
-/**
-* @vue/runtime-dom v3.5.13
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/
-let policy = void 0;
-const tt = typeof window !== "undefined" && window.trustedTypes;
-if (tt) {
- try {
- policy = /* @__PURE__ */ tt.createPolicy("vue", {
- createHTML: (val) => val
- });
- } catch (e) {
- }
-}
-const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
-const svgNS = "http://www.w3.org/2000/svg";
-const mathmlNS = "http://www.w3.org/1998/Math/MathML";
-const doc = typeof document !== "undefined" ? document : null;
-const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
-const nodeOps = {
- insert: (child, parent, anchor) => {
- parent.insertBefore(child, anchor || null);
- },
- remove: (child) => {
- const parent = child.parentNode;
- if (parent) {
- parent.removeChild(child);
- }
- },
- createElement: (tag, namespace, is, props) => {
- const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
- if (tag === "select" && props && props.multiple != null) {
- el.setAttribute("multiple", props.multiple);
- }
- return el;
- },
- createText: (text) => doc.createTextNode(text),
- createComment: (text) => doc.createComment(text),
- setText: (node, text) => {
- node.nodeValue = text;
- },
- setElementText: (el, text) => {
- el.textContent = text;
- },
- parentNode: (node) => node.parentNode,
- nextSibling: (node) => node.nextSibling,
- querySelector: (selector) => doc.querySelector(selector),
- setScopeId(el, id) {
- el.setAttribute(id, "");
- },
- // __UNSAFE__
- // Reason: innerHTML.
- // Static content here can only come from compiled templates.
- // As long as the user only uses trusted templates, this is safe.
- insertStaticContent(content, parent, anchor, namespace, start, end) {
- const before = anchor ? anchor.previousSibling : parent.lastChild;
- if (start && (start === end || start.nextSibling)) {
- while (true) {
- parent.insertBefore(start.cloneNode(true), anchor);
- if (start === end || !(start = start.nextSibling)) break;
- }
- } else {
- templateContainer.innerHTML = unsafeToTrustedHTML(
- namespace === "svg" ? `` : namespace === "mathml" ? `` : content
- );
- const template = templateContainer.content;
- if (namespace === "svg" || namespace === "mathml") {
- const wrapper = template.firstChild;
- while (wrapper.firstChild) {
- template.appendChild(wrapper.firstChild);
- }
- template.removeChild(wrapper);
- }
- parent.insertBefore(template, anchor);
- }
- return [
- // first
- before ? before.nextSibling : parent.firstChild,
- // last
- anchor ? anchor.previousSibling : parent.lastChild
- ];
- }
-};
-const vtcKey = Symbol("_vtc");
-function patchClass(el, value, isSVG) {
- const transitionClasses = el[vtcKey];
- if (transitionClasses) {
- value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
- }
- if (value == null) {
- el.removeAttribute("class");
- } else if (isSVG) {
- el.setAttribute("class", value);
- } else {
- el.className = value;
- }
-}
-const vShowOriginalDisplay = Symbol("_vod");
-const vShowHidden = Symbol("_vsh");
-const CSS_VAR_TEXT = Symbol("");
-const displayRE = /(^|;)\s*display\s*:/;
-function patchStyle(el, prev, next) {
- const style = el.style;
- const isCssString = isString$1(next);
- let hasControlledDisplay = false;
- if (next && !isCssString) {
- if (prev) {
- if (!isString$1(prev)) {
- for (const key in prev) {
- if (next[key] == null) {
- setStyle(style, key, "");
- }
- }
- } else {
- for (const prevStyle of prev.split(";")) {
- const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
- if (next[key] == null) {
- setStyle(style, key, "");
- }
- }
- }
- }
- for (const key in next) {
- if (key === "display") {
- hasControlledDisplay = true;
- }
- setStyle(style, key, next[key]);
- }
- } else {
- if (isCssString) {
- if (prev !== next) {
- const cssVarText = style[CSS_VAR_TEXT];
- if (cssVarText) {
- next += ";" + cssVarText;
- }
- style.cssText = next;
- hasControlledDisplay = displayRE.test(next);
- }
- } else if (prev) {
- el.removeAttribute("style");
- }
- }
- if (vShowOriginalDisplay in el) {
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
- if (el[vShowHidden]) {
- style.display = "none";
- }
- }
-}
-const importantRE = /\s*!important$/;
-function setStyle(style, name, val) {
- if (isArray$2(val)) {
- val.forEach((v) => setStyle(style, name, v));
- } else {
- if (val == null) val = "";
- if (name.startsWith("--")) {
- style.setProperty(name, val);
- } else {
- const prefixed = autoPrefix(style, name);
- if (importantRE.test(val)) {
- style.setProperty(
- hyphenate(prefixed),
- val.replace(importantRE, ""),
- "important"
- );
- } else {
- style[prefixed] = val;
- }
- }
- }
-}
-const prefixes = ["Webkit", "Moz", "ms"];
-const prefixCache = {};
-function autoPrefix(style, rawName) {
- const cached = prefixCache[rawName];
- if (cached) {
- return cached;
- }
- let name = camelize(rawName);
- if (name !== "filter" && name in style) {
- return prefixCache[rawName] = name;
- }
- name = capitalize(name);
- for (let i = 0; i < prefixes.length; i++) {
- const prefixed = prefixes[i] + name;
- if (prefixed in style) {
- return prefixCache[rawName] = prefixed;
- }
- }
- return rawName;
-}
-const xlinkNS = "http://www.w3.org/1999/xlink";
-function patchAttr(el, key, value, isSVG, instance, isBoolean2 = isSpecialBooleanAttr(key)) {
- if (isSVG && key.startsWith("xlink:")) {
- if (value == null) {
- el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
- } else {
- el.setAttributeNS(xlinkNS, key, value);
- }
- } else {
- if (value == null || isBoolean2 && !includeBooleanAttr(value)) {
- el.removeAttribute(key);
- } else {
- el.setAttribute(
- key,
- isBoolean2 ? "" : isSymbol(value) ? String(value) : value
- );
- }
- }
-}
-function patchDOMProp(el, key, value, parentComponent, attrName) {
- if (key === "innerHTML" || key === "textContent") {
- if (value != null) {
- el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
- }
- return;
- }
- const tag = el.tagName;
- if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
- !tag.includes("-")) {
- const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
- const newValue = value == null ? (
- // #11647: value should be set as empty string for null and undefined,
- // but should be set as 'on'.
- el.type === "checkbox" ? "on" : ""
- ) : String(value);
- if (oldValue !== newValue || !("_value" in el)) {
- el.value = newValue;
- }
- if (value == null) {
- el.removeAttribute(key);
- }
- el._value = value;
- return;
- }
- let needRemove = false;
- if (value === "" || value == null) {
- const type = typeof el[key];
- if (type === "boolean") {
- value = includeBooleanAttr(value);
- } else if (value == null && type === "string") {
- value = "";
- needRemove = true;
- } else if (type === "number") {
- value = 0;
- needRemove = true;
- }
- }
- try {
- el[key] = value;
- } catch (e) {
- }
- needRemove && el.removeAttribute(attrName || key);
-}
-function addEventListener(el, event, handler, options) {
- el.addEventListener(event, handler, options);
-}
-function removeEventListener(el, event, handler, options) {
- el.removeEventListener(event, handler, options);
-}
-const veiKey = Symbol("_vei");
-function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
- const invokers = el[veiKey] || (el[veiKey] = {});
- const existingInvoker = invokers[rawName];
- if (nextValue && existingInvoker) {
- existingInvoker.value = nextValue;
- } else {
- const [name, options] = parseName(rawName);
- if (nextValue) {
- const invoker = invokers[rawName] = createInvoker(
- nextValue,
- instance
- );
- addEventListener(el, name, invoker, options);
- } else if (existingInvoker) {
- removeEventListener(el, name, existingInvoker, options);
- invokers[rawName] = void 0;
- }
- }
-}
-const optionsModifierRE = /(?:Once|Passive|Capture)$/;
-function parseName(name) {
- let options;
- if (optionsModifierRE.test(name)) {
- options = {};
- let m;
- while (m = name.match(optionsModifierRE)) {
- name = name.slice(0, name.length - m[0].length);
- options[m[0].toLowerCase()] = true;
- }
- }
- const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
- return [event, options];
-}
-let cachedNow = 0;
-const p = /* @__PURE__ */ Promise.resolve();
-const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
-function createInvoker(initialValue, instance) {
- const invoker = (e) => {
- if (!e._vts) {
- e._vts = Date.now();
- } else if (e._vts <= invoker.attached) {
- return;
- }
- callWithAsyncErrorHandling(
- patchStopImmediatePropagation(e, invoker.value),
- instance,
- 5,
- [e]
- );
- };
- invoker.value = initialValue;
- invoker.attached = getNow();
- return invoker;
-}
-function patchStopImmediatePropagation(e, value) {
- if (isArray$2(value)) {
- const originalStop = e.stopImmediatePropagation;
- e.stopImmediatePropagation = () => {
- originalStop.call(e);
- e._stopped = true;
- };
- return value.map(
- (fn) => (e2) => !e2._stopped && fn && fn(e2)
- );
- } else {
- return value;
- }
-}
-const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
-key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
-const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
- const isSVG = namespace === "svg";
- if (key === "class") {
- patchClass(el, nextValue, isSVG);
- } else if (key === "style") {
- patchStyle(el, prevValue, nextValue);
- } else if (isOn(key)) {
- if (!isModelListener(key)) {
- patchEvent(el, key, prevValue, nextValue, parentComponent);
- }
- } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
- patchDOMProp(el, key, nextValue);
- if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
- patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
- }
- } else if (
- // #11081 force set props for possible async custom element
- el._isVueCE && (/[A-Z]/.test(key) || !isString$1(nextValue))
- ) {
- patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
- } else {
- if (key === "true-value") {
- el._trueValue = nextValue;
- } else if (key === "false-value") {
- el._falseValue = nextValue;
- }
- patchAttr(el, key, nextValue, isSVG);
- }
-};
-function shouldSetAsProp(el, key, value, isSVG) {
- if (isSVG) {
- if (key === "innerHTML" || key === "textContent") {
- return true;
- }
- if (key in el && isNativeOn(key) && isFunction$1(value)) {
- return true;
- }
- return false;
- }
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
- return false;
- }
- if (key === "form") {
- return false;
- }
- if (key === "list" && el.tagName === "INPUT") {
- return false;
- }
- if (key === "type" && el.tagName === "TEXTAREA") {
- return false;
- }
- if (key === "width" || key === "height") {
- const tag = el.tagName;
- if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
- return false;
- }
- }
- if (isNativeOn(key) && isString$1(value)) {
- return false;
- }
- return key in el;
-}
-const getModelAssigner = (vnode) => {
- const fn = vnode.props["onUpdate:modelValue"] || false;
- return isArray$2(fn) ? (value) => invokeArrayFns(fn, value) : fn;
-};
-function onCompositionStart(e) {
- e.target.composing = true;
-}
-function onCompositionEnd(e) {
- const target = e.target;
- if (target.composing) {
- target.composing = false;
- target.dispatchEvent(new Event("input"));
- }
-}
-const assignKey = Symbol("_assign");
-const vModelText = {
- created(el, { modifiers: { lazy, trim: trim2, number } }, vnode) {
- el[assignKey] = getModelAssigner(vnode);
- const castToNumber = number || vnode.props && vnode.props.type === "number";
- addEventListener(el, lazy ? "change" : "input", (e) => {
- if (e.target.composing) return;
- let domValue = el.value;
- if (trim2) {
- domValue = domValue.trim();
- }
- if (castToNumber) {
- domValue = looseToNumber(domValue);
- }
- el[assignKey](domValue);
- });
- if (trim2) {
- addEventListener(el, "change", () => {
- el.value = el.value.trim();
- });
- }
- if (!lazy) {
- addEventListener(el, "compositionstart", onCompositionStart);
- addEventListener(el, "compositionend", onCompositionEnd);
- addEventListener(el, "change", onCompositionEnd);
- }
- },
- // set value on mounted so it's after min/max for type="range"
- mounted(el, { value }) {
- el.value = value == null ? "" : value;
- },
- beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim: trim2, number } }, vnode) {
- el[assignKey] = getModelAssigner(vnode);
- if (el.composing) return;
- const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
- const newValue = value == null ? "" : value;
- if (elValue === newValue) {
- return;
- }
- if (document.activeElement === el && el.type !== "range") {
- if (lazy && value === oldValue) {
- return;
- }
- if (trim2 && el.value.trim() === newValue) {
- return;
- }
- }
- el.value = newValue;
- }
-};
-const systemModifiers = ["ctrl", "shift", "alt", "meta"];
-const modifierGuards = {
- stop: (e) => e.stopPropagation(),
- prevent: (e) => e.preventDefault(),
- self: (e) => e.target !== e.currentTarget,
- ctrl: (e) => !e.ctrlKey,
- shift: (e) => !e.shiftKey,
- alt: (e) => !e.altKey,
- meta: (e) => !e.metaKey,
- left: (e) => "button" in e && e.button !== 0,
- middle: (e) => "button" in e && e.button !== 1,
- right: (e) => "button" in e && e.button !== 2,
- exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
-};
-const withModifiers = (fn, modifiers) => {
- const cache = fn._withMods || (fn._withMods = {});
- const cacheKey = modifiers.join(".");
- return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
- for (let i = 0; i < modifiers.length; i++) {
- const guard = modifierGuards[modifiers[i]];
- if (guard && guard(event, modifiers)) return;
- }
- return fn(event, ...args);
- });
-};
-const rendererOptions = /* @__PURE__ */ extend$1({ patchProp }, nodeOps);
-let renderer;
-function ensureRenderer() {
- return renderer || (renderer = createRenderer(rendererOptions));
-}
-const createApp = (...args) => {
- const app2 = ensureRenderer().createApp(...args);
- const { mount } = app2;
- app2.mount = (containerOrSelector) => {
- const container = normalizeContainer(containerOrSelector);
- if (!container) return;
- const component = app2._component;
- if (!isFunction$1(component) && !component.render && !component.template) {
- component.template = container.innerHTML;
- }
- if (container.nodeType === 1) {
- container.textContent = "";
- }
- const proxy = mount(container, false, resolveRootNamespace(container));
- if (container instanceof Element) {
- container.removeAttribute("v-cloak");
- container.setAttribute("data-v-app", "");
- }
- return proxy;
- };
- return app2;
-};
-function resolveRootNamespace(container) {
- if (container instanceof SVGElement) {
- return "svg";
- }
- if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
- return "mathml";
- }
-}
-function normalizeContainer(container) {
- if (isString$1(container)) {
- const res = document.querySelector(container);
- return res;
- }
- return container;
-}
-/*!
- * pinia v3.0.1
- * (c) 2025 Eduardo San Martin Morote
- * @license MIT
- */
-let activePinia;
-const setActivePinia = (pinia) => activePinia = pinia;
-const piniaSymbol = (
- /* istanbul ignore next */
- Symbol()
-);
-function isPlainObject$1(o) {
- return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
-}
-var MutationType;
-(function(MutationType2) {
- MutationType2["direct"] = "direct";
- MutationType2["patchObject"] = "patch object";
- MutationType2["patchFunction"] = "patch function";
-})(MutationType || (MutationType = {}));
-function createPinia() {
- const scope = effectScope(true);
- const state = scope.run(() => ref({}));
- let _p = [];
- let toBeInstalled = [];
- const pinia = markRaw({
- install(app2) {
- setActivePinia(pinia);
- pinia._a = app2;
- app2.provide(piniaSymbol, pinia);
- app2.config.globalProperties.$pinia = pinia;
- toBeInstalled.forEach((plugin) => _p.push(plugin));
- toBeInstalled = [];
- },
- use(plugin) {
- if (!this._a) {
- toBeInstalled.push(plugin);
- } else {
- _p.push(plugin);
- }
- return this;
- },
- _p,
- // it's actually undefined here
- // @ts-expect-error
- _a: null,
- _e: scope,
- _s: /* @__PURE__ */ new Map(),
- state
- });
- return pinia;
-}
-const noop$2 = () => {
-};
-function addSubscription(subscriptions, callback, detached, onCleanup = noop$2) {
- subscriptions.push(callback);
- const removeSubscription = () => {
- const idx = subscriptions.indexOf(callback);
- if (idx > -1) {
- subscriptions.splice(idx, 1);
- onCleanup();
- }
- };
- if (!detached && getCurrentScope()) {
- onScopeDispose(removeSubscription);
- }
- return removeSubscription;
-}
-function triggerSubscriptions(subscriptions, ...args) {
- subscriptions.slice().forEach((callback) => {
- callback(...args);
- });
-}
-const fallbackRunWithContext = (fn) => fn();
-const ACTION_MARKER = Symbol();
-const ACTION_NAME = Symbol();
-function mergeReactiveObjects(target, patchToApply) {
- if (target instanceof Map && patchToApply instanceof Map) {
- patchToApply.forEach((value, key) => target.set(key, value));
- } else if (target instanceof Set && patchToApply instanceof Set) {
- patchToApply.forEach(target.add, target);
- }
- for (const key in patchToApply) {
- if (!patchToApply.hasOwnProperty(key))
- continue;
- const subPatch = patchToApply[key];
- const targetValue = target[key];
- if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
- target[key] = mergeReactiveObjects(targetValue, subPatch);
- } else {
- target[key] = subPatch;
- }
- }
- return target;
-}
-const skipHydrateSymbol = (
- /* istanbul ignore next */
- Symbol()
-);
-function shouldHydrate(obj) {
- return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
-}
-const { assign: assign$1 } = Object;
-function isComputed(o) {
- return !!(isRef(o) && o.effect);
-}
-function createOptionsStore(id, options, pinia, hot) {
- const { state, actions, getters } = options;
- const initialState = pinia.state.value[id];
- let store;
- function setup() {
- if (!initialState && true) {
- pinia.state.value[id] = state ? state() : {};
- }
- const localState = toRefs(pinia.state.value[id]);
- return assign$1(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
- computedGetters[name] = markRaw(computed(() => {
- setActivePinia(pinia);
- const store2 = pinia._s.get(id);
- return getters[name].call(store2, store2);
- }));
- return computedGetters;
- }, {}));
- }
- store = createSetupStore(id, setup, options, pinia, hot, true);
- return store;
-}
-function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
- let scope;
- const optionsForPlugin = assign$1({ actions: {} }, options);
- const $subscribeOptions = { deep: true };
- let isListening;
- let isSyncListening;
- let subscriptions = [];
- let actionSubscriptions = [];
- let debuggerEvents;
- const initialState = pinia.state.value[$id];
- if (!isOptionsStore && !initialState && true) {
- pinia.state.value[$id] = {};
- }
- ref({});
- let activeListener;
- function $patch(partialStateOrMutator) {
- let subscriptionMutation;
- isListening = isSyncListening = false;
- if (typeof partialStateOrMutator === "function") {
- partialStateOrMutator(pinia.state.value[$id]);
- subscriptionMutation = {
- type: MutationType.patchFunction,
- storeId: $id,
- events: debuggerEvents
- };
- } else {
- mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
- subscriptionMutation = {
- type: MutationType.patchObject,
- payload: partialStateOrMutator,
- storeId: $id,
- events: debuggerEvents
- };
- }
- const myListenerId = activeListener = Symbol();
- nextTick().then(() => {
- if (activeListener === myListenerId) {
- isListening = true;
- }
- });
- isSyncListening = true;
- triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
- }
- const $reset = isOptionsStore ? function $reset2() {
- const { state } = options;
- const newState = state ? state() : {};
- this.$patch(($state) => {
- assign$1($state, newState);
- });
- } : (
- /* istanbul ignore next */
- noop$2
- );
- function $dispose() {
- scope.stop();
- subscriptions = [];
- actionSubscriptions = [];
- pinia._s.delete($id);
- }
- const action = (fn, name = "") => {
- if (ACTION_MARKER in fn) {
- fn[ACTION_NAME] = name;
- return fn;
- }
- const wrappedAction = function() {
- setActivePinia(pinia);
- const args = Array.from(arguments);
- const afterCallbackList = [];
- const onErrorCallbackList = [];
- function after(callback) {
- afterCallbackList.push(callback);
- }
- function onError(callback) {
- onErrorCallbackList.push(callback);
- }
- triggerSubscriptions(actionSubscriptions, {
- args,
- name: wrappedAction[ACTION_NAME],
- store,
- after,
- onError
- });
- let ret;
- try {
- ret = fn.apply(this && this.$id === $id ? this : store, args);
- } catch (error) {
- triggerSubscriptions(onErrorCallbackList, error);
- throw error;
- }
- if (ret instanceof Promise) {
- return ret.then((value) => {
- triggerSubscriptions(afterCallbackList, value);
- return value;
- }).catch((error) => {
- triggerSubscriptions(onErrorCallbackList, error);
- return Promise.reject(error);
- });
- }
- triggerSubscriptions(afterCallbackList, ret);
- return ret;
- };
- wrappedAction[ACTION_MARKER] = true;
- wrappedAction[ACTION_NAME] = name;
- return wrappedAction;
- };
- const partialStore = {
- _p: pinia,
- // _s: scope,
- $id,
- $onAction: addSubscription.bind(null, actionSubscriptions),
- $patch,
- $reset,
- $subscribe(callback, options2 = {}) {
- const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
- const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
- if (options2.flush === "sync" ? isSyncListening : isListening) {
- callback({
- storeId: $id,
- type: MutationType.direct,
- events: debuggerEvents
- }, state);
- }
- }, assign$1({}, $subscribeOptions, options2)));
- return removeSubscription;
- },
- $dispose
- };
- const store = reactive(partialStore);
- pinia._s.set($id, store);
- const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext;
- const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));
- for (const key in setupStore) {
- const prop = setupStore[key];
- if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
- if (!isOptionsStore) {
- if (initialState && shouldHydrate(prop)) {
- if (isRef(prop)) {
- prop.value = initialState[key];
- } else {
- mergeReactiveObjects(prop, initialState[key]);
- }
- }
- pinia.state.value[$id][key] = prop;
- }
- } else if (typeof prop === "function") {
- const actionValue = action(prop, key);
- setupStore[key] = actionValue;
- optionsForPlugin.actions[key] = prop;
- } else ;
- }
- assign$1(store, setupStore);
- assign$1(toRaw(store), setupStore);
- Object.defineProperty(store, "$state", {
- get: () => pinia.state.value[$id],
- set: (state) => {
- $patch(($state) => {
- assign$1($state, state);
- });
- }
- });
- pinia._p.forEach((extender) => {
- {
- assign$1(store, scope.run(() => extender({
- store,
- app: pinia._a,
- pinia,
- options: optionsForPlugin
- })));
- }
- });
- if (initialState && isOptionsStore && options.hydrate) {
- options.hydrate(store.$state, initialState);
- }
- isListening = true;
- isSyncListening = true;
- return store;
-}
-/*! #__NO_SIDE_EFFECTS__ */
-// @__NO_SIDE_EFFECTS__
-function defineStore(id, setup, setupOptions) {
- let options;
- const isSetupStore = typeof setup === "function";
- options = isSetupStore ? setupOptions : setup;
- function useStore(pinia, hot) {
- const hasContext = hasInjectionContext();
- pinia = // in test mode, ignore the argument provided as we can always retrieve a
- // pinia instance with getActivePinia()
- pinia || (hasContext ? inject(piniaSymbol, null) : null);
- if (pinia)
- setActivePinia(pinia);
- pinia = activePinia;
- if (!pinia._s.has(id)) {
- if (isSetupStore) {
- createSetupStore(id, setup, options, pinia);
- } else {
- createOptionsStore(id, options, pinia);
- }
- }
- const store = pinia._s.get(id);
- return store;
- }
- useStore.$id = id;
- return useStore;
-}
-const _imports_0$1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.3,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%202560%201440'%20style='enable-background:new%200%200%202560%201440;'%20xml:space='preserve'%3e%3crect%20style='fill:%23020618;'%20width='2560'%20height='1440'/%3e%3cradialGradient%20id='SVGID_1_'%20cx='1280'%20cy='720'%20r='507.7116'%20fx='1274.7371'%20fy='1155.8185'%20gradientTransform='matrix(1%200%200%202.2985%200%20-934.9553)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%2300BCFF;stop-opacity:0.5'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF;stop-opacity:0'/%3e%3c/radialGradient%3e%3crect%20style='opacity:0.55;fill:url(%23SVGID_1_);'%20width='2560'%20height='1440'/%3e%3cradialGradient%20id='SVGID_2_'%20cx='1352.0476'%20cy='1354.1904'%20r='1334.0841'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%2300BCFF;stop-opacity:0.5'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF;stop-opacity:0'/%3e%3c/radialGradient%3e%3crect%20style='opacity:0.55;fill:url(%23SVGID_2_);'%20width='2560'%20height='1440'/%3e%3cradialGradient%20id='SVGID_3_'%20cx='1292.0344'%20cy='1255.0016'%20r='2246.7517'%20gradientTransform='matrix(-0.7144%20-0.6998%200.1899%20-0.1939%201976.6873%202402.437)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%2300BCFF;stop-opacity:0.5'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF;stop-opacity:0'/%3e%3c/radialGradient%3e%3cpolygon%20style='opacity:0.55;fill:url(%23SVGID_3_);'%20points='2560,1440%200,1440%200,-7%202560,0%20'/%3e%3cradialGradient%20id='SVGID_4_'%20cx='1292.0344'%20cy='1255.8966'%20r='2246.5256'%20fx='334.4712'%20fy='1265.3895'%20gradientTransform='matrix(0.7144%20-0.6998%20-0.1899%20-0.1939%20583.4827%202403.5054)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%2300BCFF;stop-opacity:0.5'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF;stop-opacity:0'/%3e%3c/radialGradient%3e%3cpolygon%20style='opacity:0.55;fill:url(%23SVGID_4_);'%20points='0,1440%202560,1440%202560,0%200,0%20'/%3e%3cradialGradient%20id='SVGID_5_'%20cx='1239.8966'%20cy='1737.5518'%20r='877.3733'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%23FFB900;stop-opacity:0'/%3e%3c/radialGradient%3e%3crect%20style='fill:url(%23SVGID_5_);'%20width='2560'%20height='1440'/%3e%3cradialGradient%20id='SVGID_6_'%20cx='1287.069'%20cy='950.5172'%20r='845.7465'%20fx='1276.8361'%20fy='325.8423'%20gradientTransform='matrix(-1%203.730347e-03%20-1.479320e-03%20-0.3966%202575.5352%201322.6541)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900;stop-opacity:0.3'/%3e%3cstop%20offset='1'%20style='stop-color:%23FFB900;stop-opacity:0'/%3e%3c/radialGradient%3e%3crect%20style='fill:url(%23SVGID_6_);'%20width='2560'%20height='1440'/%3e%3cradialGradient%20id='SVGID_7_'%20cx='1316.8621'%20cy='1417.2759'%20r='1888.6272'%20gradientTransform='matrix(0.6652%20-0.7467%200.1801%200.1604%20185.7137%202173.2124)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900;stop-opacity:0.38'/%3e%3cstop%20offset='1'%20style='stop-color:%23FFB900;stop-opacity:0'/%3e%3c/radialGradient%3e%3crect%20style='fill:url(%23SVGID_7_);'%20width='2560'%20height='1440'/%3e%3c/svg%3e";
-const _imports_1 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20140%2080'%20style='enable-background:new%200%200%20140%2080;'%20xml:space='preserve'%3e%3cpath%20style='fill:%23fff'%20d='M95.5,18.3l-0.2-0.1C95.2,18.1,95,18,94.8,18c-0.3,0-0.5,0.1-0.7,0.3L82.8,29.6l8.5,8.5l12-12L95.5,18.3z'/%3e%3cpath%20style='fill:%23fff'%20d='M57.3,29.5L46,18.3c-0.2-0.2-0.5-0.3-0.7-0.3s-0.4,0-0.5,0.1l-0.2,0.1L36.8,26l12,12L57.3,29.5z'/%3e%3cpath%20style='fill:%23fff'%20d='M94.7,67l-14-14l-8.5,8.5l11.3,11.3c1,1,2.1,1.8,3.2,2.5c2.5,1.5,5.3,2.2,8.1,2.2s5.6-0.7,8.1-2.2L94.7,67%20L94.7,67z'/%3e%3cpath%20style='fill:%23fff'%20d='M114,15.5l-7.8-7.8c-0.2-0.2-0.5-0.5-0.7-0.7c-5.3-4.6-12.8-5.2-18.7-1.8c-1.1,0.7-2.2,1.5-3.2,2.5L72.2,19%20l2.6,2.6l5.9,5.9L92,16.2c0.8-0.8,1.8-1.1,2.8-1.1c0.7,0,1.4,0.2,2,0.5l0.1-0.1l8.5,8.5l13.4,13.4c0.8,0.8,1.1,1.8,1.1,2.8%20s-0.4,2.1-1.1,2.8l-11.3,11.3l5,5l3.5,3.5l11.3-11.3c3.1-3.1,4.7-7.2,4.7-11.3c0-4.1-1.5-8.2-4.6-11.3L114,15.5z'/%3e%3cpath%20style='fill:%23fff'%20d='M105.4,56.5l-3.5-3.5l-4.5-4.5L81.2,32.2l-8.5-8.5l-2.6-2.6L56.6,7.7c-1-1-2.1-1.8-3.2-2.5%20C47.6,1.8,40,2.4,34.8,7c-0.3,0.2-0.5,0.4-0.7,0.7l-7.8,7.8L12.8,28.9C9.7,32,8.1,36.1,8.1,40.2c0,4.1,1.6,8.2,4.7,11.3l11.3,11.3%20l3.5-3.5l5-5L21.3,43c-0.8-0.8-1.1-1.8-1.1-2.8s0.4-2.1,1.1-2.8L34.7,24l8.5-8.5l0.1,0.1c1.5-0.9,3.6-0.7,4.8,0.6l11.3,11.3l2.1,2.1%20l8.5,8.5l2.1,2.1l8.5,8.5l16.2,16.2L97,65l8.4,8.4c0.3-0.2,0.5-0.4,0.7-0.7l7.8-7.8l-3.5-3.4L105.4,56.5z'/%3e%3cpath%20style='fill:%23fff'%20d='M70.1,42.3l-8.5,8.5L45.4,67l-0.1,0.1L40.4,72l-3.2,3.2c2.5,1.5,5.3,2.2,8.1,2.2s5.6-0.8,8.1-2.2%20c1.1-0.7,2.2-1.5,3.2-2.5L70,59.3l8.5-8.5L70.1,42.3z'/%3e%3cpath%20style='fill:%23fff'%20d='M43.1,65.1l0.1-0.1l16.2-16.2l8.5-8.5l-8.4-8.6L51,40.2L38.2,53l-3.5,3.5l-5,5L26.2,65l7.8,7.8%20c0.2,0.2,0.5,0.5,0.7,0.7l3.5-3.5L43.1,65.1z'/%3e%3c/svg%3e";
-const _imports_0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20140%2080'%20style='enable-background:new%200%200%20140%2080;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:url(%23SVGID_1_);}%20.st1{fill:url(%23SVGID_2_);}%20.st2{fill:url(%23SVGID_3_);}%20.st3{fill:url(%23SVGID_4_);}%20.st4{fill:url(%23SVGID_5_);}%20.st5{fill:url(%23SVGID_6_);}%20.st6{fill:url(%23SVGID_7_);}%20%3c/style%3e%3clinearGradient%20id='SVGID_1_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='28.05'%20x2='140'%20y2='28.05'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st0'%20d='M95.5,18.3l-0.2-0.1C95.2,18.1,95,18,94.8,18c-0.3,0-0.5,0.1-0.7,0.3L82.8,29.6l8.5,8.5l12-12L95.5,18.3z'/%3e%3clinearGradient%20id='SVGID_2_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='28'%20x2='140'%20y2='28'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st1'%20d='M57.3,29.5L46,18.3c-0.2-0.2-0.5-0.3-0.7-0.3s-0.4,0-0.5,0.1l-0.2,0.1L36.8,26l12,12L57.3,29.5z'/%3e%3clinearGradient%20id='SVGID_3_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='65.25'%20x2='140'%20y2='65.25'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st2'%20d='M94.7,67l-14-14l-8.5,8.5l11.3,11.3c1,1,2.1,1.8,3.2,2.5c2.5,1.5,5.3,2.2,8.1,2.2s5.6-0.7,8.1-2.2L94.7,67%20L94.7,67z'/%3e%3clinearGradient%20id='SVGID_4_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='32.9162'%20x2='140'%20y2='32.9162'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st3'%20d='M114,15.5l-7.8-7.8c-0.2-0.2-0.5-0.5-0.7-0.7c-5.3-4.6-12.8-5.2-18.7-1.8c-1.1,0.7-2.2,1.5-3.2,2.5L72.2,19%20l2.6,2.6l5.9,5.9L92,16.2c0.8-0.8,1.8-1.1,2.8-1.1c0.7,0,1.4,0.2,2,0.5l0.1-0.1l8.5,8.5l13.4,13.4c0.8,0.8,1.1,1.8,1.1,2.8%20s-0.4,2.1-1.1,2.8l-11.3,11.3l5,5l3.5,3.5l11.3-11.3c3.1-3.1,4.7-7.2,4.7-11.3c0-4.1-1.5-8.2-4.6-11.3L114,15.5z'/%3e%3clinearGradient%20id='SVGID_5_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='38.2163'%20x2='140'%20y2='38.2163'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st4'%20d='M105.4,56.5l-3.5-3.5l-4.5-4.5L81.2,32.2l-8.5-8.5l-2.6-2.6L56.6,7.7c-1-1-2.1-1.8-3.2-2.5%20C47.6,1.8,40,2.4,34.8,7c-0.3,0.2-0.5,0.4-0.7,0.7l-7.8,7.8L12.8,28.9C9.7,32,8.1,36.1,8.1,40.2c0,4.1,1.6,8.2,4.7,11.3l11.3,11.3%20l3.5-3.5l5-5L21.3,43c-0.8-0.8-1.1-1.8-1.1-2.8s0.4-2.1,1.1-2.8L34.7,24l8.5-8.5l0.1,0.1c1.5-0.9,3.6-0.7,4.8,0.6l11.3,11.3l2.1,2.1%20l8.5,8.5l2.1,2.1l8.5,8.5l16.2,16.2L97,65l8.4,8.4c0.3-0.2,0.5-0.4,0.7-0.7l7.8-7.8l-3.5-3.4L105.4,56.5z'/%3e%3clinearGradient%20id='SVGID_6_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='59.85'%20x2='140'%20y2='59.85'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st5'%20d='M70.1,42.3l-8.5,8.5L45.4,67l-0.1,0.1L40.4,72l-3.2,3.2c2.5,1.5,5.3,2.2,8.1,2.2s5.6-0.8,8.1-2.2%20c1.1-0.7,2.2-1.5,3.2-2.5L70,59.3l8.5-8.5L70.1,42.3z'/%3e%3clinearGradient%20id='SVGID_7_'%20gradientUnits='userSpaceOnUse'%20x1='-9.094947e-13'%20y1='52.6'%20x2='140'%20y2='52.6'%3e%3cstop%20offset='0'%20style='stop-color:%23FFB900'/%3e%3cstop%20offset='1'%20style='stop-color:%2300BCFF'/%3e%3c/linearGradient%3e%3cpath%20class='st6'%20d='M43.1,65.1l0.1-0.1l16.2-16.2l8.5-8.5l-8.4-8.6L51,40.2L38.2,53l-3.5,3.5l-5,5L26.2,65l7.8,7.8%20c0.2,0.2,0.5,0.5,0.7,0.7l3.5-3.5L43.1,65.1z'/%3e%3c/svg%3e";
-/*!
- * vue-router v4.5.0
- * (c) 2024 Eduardo San Martin Morote
- * @license MIT
- */
-const isBrowser = typeof document !== "undefined";
-function isRouteComponent(component) {
- return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component;
-}
-function isESModule(obj) {
- return obj.__esModule || obj[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
- // add the Module string tag
- obj.default && isRouteComponent(obj.default);
-}
-const assign = Object.assign;
-function applyToParams(fn, params) {
- const newParams = {};
- for (const key in params) {
- const value = params[key];
- newParams[key] = isArray$1(value) ? value.map(fn) : fn(value);
- }
- return newParams;
-}
-const noop$1 = () => {
-};
-const isArray$1 = Array.isArray;
-const HASH_RE = /#/g;
-const AMPERSAND_RE = /&/g;
-const SLASH_RE = /\//g;
-const EQUAL_RE = /=/g;
-const IM_RE = /\?/g;
-const PLUS_RE = /\+/g;
-const ENC_BRACKET_OPEN_RE = /%5B/g;
-const ENC_BRACKET_CLOSE_RE = /%5D/g;
-const ENC_CARET_RE = /%5E/g;
-const ENC_BACKTICK_RE = /%60/g;
-const ENC_CURLY_OPEN_RE = /%7B/g;
-const ENC_PIPE_RE = /%7C/g;
-const ENC_CURLY_CLOSE_RE = /%7D/g;
-const ENC_SPACE_RE = /%20/g;
-function commonEncode(text) {
- return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]");
-}
-function encodeHash(text) {
- return commonEncode(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
-}
-function encodeQueryValue(text) {
- return commonEncode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
-}
-function encodeQueryKey(text) {
- return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
-}
-function encodePath(text) {
- return commonEncode(text).replace(HASH_RE, "%23").replace(IM_RE, "%3F");
-}
-function encodeParam(text) {
- return text == null ? "" : encodePath(text).replace(SLASH_RE, "%2F");
-}
-function decode(text) {
- try {
- return decodeURIComponent("" + text);
- } catch (err) {
- }
- return "" + text;
-}
-const TRAILING_SLASH_RE = /\/$/;
-const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, "");
-function parseURL(parseQuery2, location2, currentLocation = "/") {
- let path, query = {}, searchString = "", hash = "";
- const hashPos = location2.indexOf("#");
- let searchPos = location2.indexOf("?");
- if (hashPos < searchPos && hashPos >= 0) {
- searchPos = -1;
- }
- if (searchPos > -1) {
- path = location2.slice(0, searchPos);
- searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);
- query = parseQuery2(searchString);
- }
- if (hashPos > -1) {
- path = path || location2.slice(0, hashPos);
- hash = location2.slice(hashPos, location2.length);
- }
- path = resolveRelativePath(path != null ? path : location2, currentLocation);
- return {
- fullPath: path + (searchString && "?") + searchString + hash,
- path,
- query,
- hash: decode(hash)
- };
-}
-function stringifyURL(stringifyQuery2, location2) {
- const query = location2.query ? stringifyQuery2(location2.query) : "";
- return location2.path + (query && "?") + query + (location2.hash || "");
-}
-function stripBase(pathname, base) {
- if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))
- return pathname;
- return pathname.slice(base.length) || "/";
-}
-function isSameRouteLocation(stringifyQuery2, a, b) {
- const aLastIndex = a.matched.length - 1;
- const bLastIndex = b.matched.length - 1;
- return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;
-}
-function isSameRouteRecord(a, b) {
- return (a.aliasOf || a) === (b.aliasOf || b);
-}
-function isSameRouteLocationParams(a, b) {
- if (Object.keys(a).length !== Object.keys(b).length)
- return false;
- for (const key in a) {
- if (!isSameRouteLocationParamsValue(a[key], b[key]))
- return false;
- }
- return true;
-}
-function isSameRouteLocationParamsValue(a, b) {
- return isArray$1(a) ? isEquivalentArray(a, b) : isArray$1(b) ? isEquivalentArray(b, a) : a === b;
-}
-function isEquivalentArray(a, b) {
- return isArray$1(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;
-}
-function resolveRelativePath(to, from) {
- if (to.startsWith("/"))
- return to;
- if (!to)
- return from;
- const fromSegments = from.split("/");
- const toSegments = to.split("/");
- const lastToSegment = toSegments[toSegments.length - 1];
- if (lastToSegment === ".." || lastToSegment === ".") {
- toSegments.push("");
- }
- let position = fromSegments.length - 1;
- let toPosition;
- let segment;
- for (toPosition = 0; toPosition < toSegments.length; toPosition++) {
- segment = toSegments[toPosition];
- if (segment === ".")
- continue;
- if (segment === "..") {
- if (position > 1)
- position--;
- } else
- break;
- }
- return fromSegments.slice(0, position).join("/") + "/" + toSegments.slice(toPosition).join("/");
-}
-const START_LOCATION_NORMALIZED = {
- path: "/",
- // TODO: could we use a symbol in the future?
- name: void 0,
- params: {},
- query: {},
- hash: "",
- fullPath: "/",
- matched: [],
- meta: {},
- redirectedFrom: void 0
-};
-var NavigationType;
-(function(NavigationType2) {
- NavigationType2["pop"] = "pop";
- NavigationType2["push"] = "push";
-})(NavigationType || (NavigationType = {}));
-var NavigationDirection;
-(function(NavigationDirection2) {
- NavigationDirection2["back"] = "back";
- NavigationDirection2["forward"] = "forward";
- NavigationDirection2["unknown"] = "";
-})(NavigationDirection || (NavigationDirection = {}));
-function normalizeBase(base) {
- if (!base) {
- if (isBrowser) {
- const baseEl = document.querySelector("base");
- base = baseEl && baseEl.getAttribute("href") || "/";
- base = base.replace(/^\w+:\/\/[^\/]+/, "");
- } else {
- base = "/";
- }
- }
- if (base[0] !== "/" && base[0] !== "#")
- base = "/" + base;
- return removeTrailingSlash(base);
-}
-const BEFORE_HASH_RE = /^[^#]+#/;
-function createHref(base, location2) {
- return base.replace(BEFORE_HASH_RE, "#") + location2;
-}
-function getElementPosition(el, offset) {
- const docRect = document.documentElement.getBoundingClientRect();
- const elRect = el.getBoundingClientRect();
- return {
- behavior: offset.behavior,
- left: elRect.left - docRect.left - (offset.left || 0),
- top: elRect.top - docRect.top - (offset.top || 0)
- };
-}
-const computeScrollPosition = () => ({
- left: window.scrollX,
- top: window.scrollY
-});
-function scrollToPosition(position) {
- let scrollToOptions;
- if ("el" in position) {
- const positionEl = position.el;
- const isIdSelector = typeof positionEl === "string" && positionEl.startsWith("#");
- const el = typeof positionEl === "string" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;
- if (!el) {
- return;
- }
- scrollToOptions = getElementPosition(el, position);
- } else {
- scrollToOptions = position;
- }
- if ("scrollBehavior" in document.documentElement.style)
- window.scrollTo(scrollToOptions);
- else {
- window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);
- }
-}
-function getScrollKey(path, delta) {
- const position = history.state ? history.state.position - delta : -1;
- return position + path;
-}
-const scrollPositions = /* @__PURE__ */ new Map();
-function saveScrollPosition(key, scrollPosition) {
- scrollPositions.set(key, scrollPosition);
-}
-function getSavedScrollPosition(key) {
- const scroll = scrollPositions.get(key);
- scrollPositions.delete(key);
- return scroll;
-}
-let createBaseLocation = () => location.protocol + "//" + location.host;
-function createCurrentLocation(base, location2) {
- const { pathname, search, hash } = location2;
- const hashPos = base.indexOf("#");
- if (hashPos > -1) {
- let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;
- let pathFromHash = hash.slice(slicePos);
- if (pathFromHash[0] !== "/")
- pathFromHash = "/" + pathFromHash;
- return stripBase(pathFromHash, "");
- }
- const path = stripBase(pathname, base);
- return path + search + hash;
-}
-function useHistoryListeners(base, historyState, currentLocation, replace) {
- let listeners = [];
- let teardowns = [];
- let pauseState = null;
- const popStateHandler = ({ state }) => {
- const to = createCurrentLocation(base, location);
- const from = currentLocation.value;
- const fromState = historyState.value;
- let delta = 0;
- if (state) {
- currentLocation.value = to;
- historyState.value = state;
- if (pauseState && pauseState === from) {
- pauseState = null;
- return;
- }
- delta = fromState ? state.position - fromState.position : 0;
- } else {
- replace(to);
- }
- listeners.forEach((listener) => {
- listener(currentLocation.value, from, {
- delta,
- type: NavigationType.pop,
- direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown
- });
- });
- };
- function pauseListeners() {
- pauseState = currentLocation.value;
- }
- function listen(callback) {
- listeners.push(callback);
- const teardown = () => {
- const index = listeners.indexOf(callback);
- if (index > -1)
- listeners.splice(index, 1);
- };
- teardowns.push(teardown);
- return teardown;
- }
- function beforeUnloadListener() {
- const { history: history2 } = window;
- if (!history2.state)
- return;
- history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), "");
- }
- function destroy() {
- for (const teardown of teardowns)
- teardown();
- teardowns = [];
- window.removeEventListener("popstate", popStateHandler);
- window.removeEventListener("beforeunload", beforeUnloadListener);
- }
- window.addEventListener("popstate", popStateHandler);
- window.addEventListener("beforeunload", beforeUnloadListener, {
- passive: true
- });
- return {
- pauseListeners,
- listen,
- destroy
- };
-}
-function buildState(back, current, forward, replaced = false, computeScroll = false) {
- return {
- back,
- current,
- forward,
- replaced,
- position: window.history.length,
- scroll: computeScroll ? computeScrollPosition() : null
- };
-}
-function useHistoryStateNavigation(base) {
- const { history: history2, location: location2 } = window;
- const currentLocation = {
- value: createCurrentLocation(base, location2)
- };
- const historyState = { value: history2.state };
- if (!historyState.value) {
- changeLocation(currentLocation.value, {
- back: null,
- current: currentLocation.value,
- forward: null,
- // the length is off by one, we need to decrease it
- position: history2.length - 1,
- replaced: true,
- // don't add a scroll as the user may have an anchor, and we want
- // scrollBehavior to be triggered without a saved position
- scroll: null
- }, true);
- }
- function changeLocation(to, state, replace2) {
- const hashIndex = base.indexOf("#");
- const url = hashIndex > -1 ? (location2.host && document.querySelector("base") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;
- try {
- history2[replace2 ? "replaceState" : "pushState"](state, "", url);
- historyState.value = state;
- } catch (err) {
- {
- console.error(err);
- }
- location2[replace2 ? "replace" : "assign"](url);
- }
- }
- function replace(to, data) {
- const state = assign({}, history2.state, buildState(
- historyState.value.back,
- // keep back and forward entries but override current position
- to,
- historyState.value.forward,
- true
- ), data, { position: historyState.value.position });
- changeLocation(to, state, true);
- currentLocation.value = to;
- }
- function push(to, data) {
- const currentState = assign(
- {},
- // use current history state to gracefully handle a wrong call to
- // history.replaceState
- // https://github.com/vuejs/router/issues/366
- historyState.value,
- history2.state,
- {
- forward: to,
- scroll: computeScrollPosition()
- }
- );
- changeLocation(currentState.current, currentState, true);
- const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);
- changeLocation(to, state, false);
- currentLocation.value = to;
- }
- return {
- location: currentLocation,
- state: historyState,
- push,
- replace
- };
-}
-function createWebHistory(base) {
- base = normalizeBase(base);
- const historyNavigation = useHistoryStateNavigation(base);
- const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);
- function go(delta, triggerListeners = true) {
- if (!triggerListeners)
- historyListeners.pauseListeners();
- history.go(delta);
- }
- const routerHistory = assign({
- // it's overridden right after
- location: "",
- base,
- go,
- createHref: createHref.bind(null, base)
- }, historyNavigation, historyListeners);
- Object.defineProperty(routerHistory, "location", {
- enumerable: true,
- get: () => historyNavigation.location.value
- });
- Object.defineProperty(routerHistory, "state", {
- enumerable: true,
- get: () => historyNavigation.state.value
- });
- return routerHistory;
-}
-function isRouteLocation(route) {
- return typeof route === "string" || route && typeof route === "object";
-}
-function isRouteName(name) {
- return typeof name === "string" || typeof name === "symbol";
-}
-const NavigationFailureSymbol = Symbol("");
-var NavigationFailureType;
-(function(NavigationFailureType2) {
- NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
- NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
- NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
-})(NavigationFailureType || (NavigationFailureType = {}));
-function createRouterError(type, params) {
- {
- return assign(new Error(), {
- type,
- [NavigationFailureSymbol]: true
- }, params);
- }
-}
-function isNavigationFailure(error, type) {
- return error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));
-}
-const BASE_PARAM_PATTERN = "[^/]+?";
-const BASE_PATH_PARSER_OPTIONS = {
- sensitive: false,
- strict: false,
- start: true,
- end: true
-};
-const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g;
-function tokensToParser(segments, extraOptions) {
- const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);
- const score = [];
- let pattern = options.start ? "^" : "";
- const keys = [];
- for (const segment of segments) {
- const segmentScores = segment.length ? [] : [
- 90
- /* PathScore.Root */
- ];
- if (options.strict && !segment.length)
- pattern += "/";
- for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {
- const token = segment[tokenIndex];
- let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);
- if (token.type === 0) {
- if (!tokenIndex)
- pattern += "/";
- pattern += token.value.replace(REGEX_CHARS_RE, "\\$&");
- subSegmentScore += 40;
- } else if (token.type === 1) {
- const { value, repeatable, optional, regexp } = token;
- keys.push({
- name: value,
- repeatable,
- optional
- });
- const re2 = regexp ? regexp : BASE_PARAM_PATTERN;
- if (re2 !== BASE_PARAM_PATTERN) {
- subSegmentScore += 10;
- try {
- new RegExp(`(${re2})`);
- } catch (err) {
- throw new Error(`Invalid custom RegExp for param "${value}" (${re2}): ` + err.message);
- }
- }
- let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;
- if (!tokenIndex)
- subPattern = // avoid an optional / if there are more segments e.g. /:p?-static
- // or /:p?-:p2
- optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern;
- if (optional)
- subPattern += "?";
- pattern += subPattern;
- subSegmentScore += 20;
- if (optional)
- subSegmentScore += -8;
- if (repeatable)
- subSegmentScore += -20;
- if (re2 === ".*")
- subSegmentScore += -50;
- }
- segmentScores.push(subSegmentScore);
- }
- score.push(segmentScores);
- }
- if (options.strict && options.end) {
- const i = score.length - 1;
- score[i][score[i].length - 1] += 0.7000000000000001;
- }
- if (!options.strict)
- pattern += "/?";
- if (options.end)
- pattern += "$";
- else if (options.strict && !pattern.endsWith("/"))
- pattern += "(?:/|$)";
- const re = new RegExp(pattern, options.sensitive ? "" : "i");
- function parse(path) {
- const match = path.match(re);
- const params = {};
- if (!match)
- return null;
- for (let i = 1; i < match.length; i++) {
- const value = match[i] || "";
- const key = keys[i - 1];
- params[key.name] = value && key.repeatable ? value.split("/") : value;
- }
- return params;
- }
- function stringify(params) {
- let path = "";
- let avoidDuplicatedSlash = false;
- for (const segment of segments) {
- if (!avoidDuplicatedSlash || !path.endsWith("/"))
- path += "/";
- avoidDuplicatedSlash = false;
- for (const token of segment) {
- if (token.type === 0) {
- path += token.value;
- } else if (token.type === 1) {
- const { value, repeatable, optional } = token;
- const param = value in params ? params[value] : "";
- if (isArray$1(param) && !repeatable) {
- throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
- }
- const text = isArray$1(param) ? param.join("/") : param;
- if (!text) {
- if (optional) {
- if (segment.length < 2) {
- if (path.endsWith("/"))
- path = path.slice(0, -1);
- else
- avoidDuplicatedSlash = true;
- }
- } else
- throw new Error(`Missing required param "${value}"`);
- }
- path += text;
- }
- }
- }
- return path || "/";
- }
- return {
- re,
- score,
- keys,
- parse,
- stringify
- };
-}
-function compareScoreArray(a, b) {
- let i = 0;
- while (i < a.length && i < b.length) {
- const diff = b[i] - a[i];
- if (diff)
- return diff;
- i++;
- }
- if (a.length < b.length) {
- return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;
- } else if (a.length > b.length) {
- return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;
- }
- return 0;
-}
-function comparePathParserScore(a, b) {
- let i = 0;
- const aScore = a.score;
- const bScore = b.score;
- while (i < aScore.length && i < bScore.length) {
- const comp = compareScoreArray(aScore[i], bScore[i]);
- if (comp)
- return comp;
- i++;
- }
- if (Math.abs(bScore.length - aScore.length) === 1) {
- if (isLastScoreNegative(aScore))
- return 1;
- if (isLastScoreNegative(bScore))
- return -1;
- }
- return bScore.length - aScore.length;
-}
-function isLastScoreNegative(score) {
- const last = score[score.length - 1];
- return score.length > 0 && last[last.length - 1] < 0;
-}
-const ROOT_TOKEN = {
- type: 0,
- value: ""
-};
-const VALID_PARAM_RE = /[a-zA-Z0-9_]/;
-function tokenizePath(path) {
- if (!path)
- return [[]];
- if (path === "/")
- return [[ROOT_TOKEN]];
- if (!path.startsWith("/")) {
- throw new Error(`Invalid path "${path}"`);
- }
- function crash(message) {
- throw new Error(`ERR (${state})/"${buffer}": ${message}`);
- }
- let state = 0;
- let previousState = state;
- const tokens = [];
- let segment;
- function finalizeSegment() {
- if (segment)
- tokens.push(segment);
- segment = [];
- }
- let i = 0;
- let char;
- let buffer = "";
- let customRe = "";
- function consumeBuffer() {
- if (!buffer)
- return;
- if (state === 0) {
- segment.push({
- type: 0,
- value: buffer
- });
- } else if (state === 1 || state === 2 || state === 3) {
- if (segment.length > 1 && (char === "*" || char === "+"))
- crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);
- segment.push({
- type: 1,
- value: buffer,
- regexp: customRe,
- repeatable: char === "*" || char === "+",
- optional: char === "*" || char === "?"
- });
- } else {
- crash("Invalid state to consume buffer");
- }
- buffer = "";
- }
- function addCharToBuffer() {
- buffer += char;
- }
- while (i < path.length) {
- char = path[i++];
- if (char === "\\" && state !== 2) {
- previousState = state;
- state = 4;
- continue;
- }
- switch (state) {
- case 0:
- if (char === "/") {
- if (buffer) {
- consumeBuffer();
- }
- finalizeSegment();
- } else if (char === ":") {
- consumeBuffer();
- state = 1;
- } else {
- addCharToBuffer();
- }
- break;
- case 4:
- addCharToBuffer();
- state = previousState;
- break;
- case 1:
- if (char === "(") {
- state = 2;
- } else if (VALID_PARAM_RE.test(char)) {
- addCharToBuffer();
- } else {
- consumeBuffer();
- state = 0;
- if (char !== "*" && char !== "?" && char !== "+")
- i--;
- }
- break;
- case 2:
- if (char === ")") {
- if (customRe[customRe.length - 1] == "\\")
- customRe = customRe.slice(0, -1) + char;
- else
- state = 3;
- } else {
- customRe += char;
- }
- break;
- case 3:
- consumeBuffer();
- state = 0;
- if (char !== "*" && char !== "?" && char !== "+")
- i--;
- customRe = "";
- break;
- default:
- crash("Unknown state");
- break;
- }
- }
- if (state === 2)
- crash(`Unfinished custom RegExp for param "${buffer}"`);
- consumeBuffer();
- finalizeSegment();
- return tokens;
-}
-function createRouteRecordMatcher(record, parent, options) {
- const parser = tokensToParser(tokenizePath(record.path), options);
- const matcher = assign(parser, {
- record,
- parent,
- // these needs to be populated by the parent
- children: [],
- alias: []
- });
- if (parent) {
- if (!matcher.record.aliasOf === !parent.record.aliasOf)
- parent.children.push(matcher);
- }
- return matcher;
-}
-function createRouterMatcher(routes, globalOptions) {
- const matchers = [];
- const matcherMap = /* @__PURE__ */ new Map();
- globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);
- function getRecordMatcher(name) {
- return matcherMap.get(name);
- }
- function addRoute(record, parent, originalRecord) {
- const isRootAdd = !originalRecord;
- const mainNormalizedRecord = normalizeRouteRecord(record);
- mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;
- const options = mergeOptions(globalOptions, record);
- const normalizedRecords = [mainNormalizedRecord];
- if ("alias" in record) {
- const aliases = typeof record.alias === "string" ? [record.alias] : record.alias;
- for (const alias of aliases) {
- normalizedRecords.push(
- // we need to normalize again to ensure the `mods` property
- // being non enumerable
- normalizeRouteRecord(assign({}, mainNormalizedRecord, {
- // this allows us to hold a copy of the `components` option
- // so that async components cache is hold on the original record
- components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,
- path: alias,
- // we might be the child of an alias
- aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord
- // the aliases are always of the same kind as the original since they
- // are defined on the same record
- }))
- );
- }
- }
- let matcher;
- let originalMatcher;
- for (const normalizedRecord of normalizedRecords) {
- const { path } = normalizedRecord;
- if (parent && path[0] !== "/") {
- const parentPath = parent.record.path;
- const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/";
- normalizedRecord.path = parent.record.path + (path && connectingSlash + path);
- }
- matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
- if (originalRecord) {
- originalRecord.alias.push(matcher);
- } else {
- originalMatcher = originalMatcher || matcher;
- if (originalMatcher !== matcher)
- originalMatcher.alias.push(matcher);
- if (isRootAdd && record.name && !isAliasRecord(matcher)) {
- removeRoute(record.name);
- }
- }
- if (isMatchable(matcher)) {
- insertMatcher(matcher);
- }
- if (mainNormalizedRecord.children) {
- const children = mainNormalizedRecord.children;
- for (let i = 0; i < children.length; i++) {
- addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);
- }
- }
- originalRecord = originalRecord || matcher;
- }
- return originalMatcher ? () => {
- removeRoute(originalMatcher);
- } : noop$1;
- }
- function removeRoute(matcherRef) {
- if (isRouteName(matcherRef)) {
- const matcher = matcherMap.get(matcherRef);
- if (matcher) {
- matcherMap.delete(matcherRef);
- matchers.splice(matchers.indexOf(matcher), 1);
- matcher.children.forEach(removeRoute);
- matcher.alias.forEach(removeRoute);
- }
- } else {
- const index = matchers.indexOf(matcherRef);
- if (index > -1) {
- matchers.splice(index, 1);
- if (matcherRef.record.name)
- matcherMap.delete(matcherRef.record.name);
- matcherRef.children.forEach(removeRoute);
- matcherRef.alias.forEach(removeRoute);
- }
- }
- }
- function getRoutes() {
- return matchers;
- }
- function insertMatcher(matcher) {
- const index = findInsertionIndex(matcher, matchers);
- matchers.splice(index, 0, matcher);
- if (matcher.record.name && !isAliasRecord(matcher))
- matcherMap.set(matcher.record.name, matcher);
- }
- function resolve(location2, currentLocation) {
- let matcher;
- let params = {};
- let path;
- let name;
- if ("name" in location2 && location2.name) {
- matcher = matcherMap.get(location2.name);
- if (!matcher)
- throw createRouterError(1, {
- location: location2
- });
- name = matcher.record.name;
- params = assign(
- // paramsFromLocation is a new object
- paramsFromLocation(
- currentLocation.params,
- // only keep params that exist in the resolved location
- // only keep optional params coming from a parent record
- matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)
- ),
- // discard any existing params in the current location that do not exist here
- // #1497 this ensures better active/exact matching
- location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))
- );
- path = matcher.stringify(params);
- } else if (location2.path != null) {
- path = location2.path;
- matcher = matchers.find((m) => m.re.test(path));
- if (matcher) {
- params = matcher.parse(path);
- name = matcher.record.name;
- }
- } else {
- matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));
- if (!matcher)
- throw createRouterError(1, {
- location: location2,
- currentLocation
- });
- name = matcher.record.name;
- params = assign({}, currentLocation.params, location2.params);
- path = matcher.stringify(params);
- }
- const matched = [];
- let parentMatcher = matcher;
- while (parentMatcher) {
- matched.unshift(parentMatcher.record);
- parentMatcher = parentMatcher.parent;
- }
- return {
- name,
- path,
- params,
- matched,
- meta: mergeMetaFields(matched)
- };
- }
- routes.forEach((route) => addRoute(route));
- function clearRoutes() {
- matchers.length = 0;
- matcherMap.clear();
- }
- return {
- addRoute,
- resolve,
- removeRoute,
- clearRoutes,
- getRoutes,
- getRecordMatcher
- };
-}
-function paramsFromLocation(params, keys) {
- const newParams = {};
- for (const key of keys) {
- if (key in params)
- newParams[key] = params[key];
- }
- return newParams;
-}
-function normalizeRouteRecord(record) {
- const normalized = {
- path: record.path,
- redirect: record.redirect,
- name: record.name,
- meta: record.meta || {},
- aliasOf: record.aliasOf,
- beforeEnter: record.beforeEnter,
- props: normalizeRecordProps(record),
- children: record.children || [],
- instances: {},
- leaveGuards: /* @__PURE__ */ new Set(),
- updateGuards: /* @__PURE__ */ new Set(),
- enterCallbacks: {},
- // must be declared afterwards
- // mods: {},
- components: "components" in record ? record.components || null : record.component && { default: record.component }
- };
- Object.defineProperty(normalized, "mods", {
- value: {}
- });
- return normalized;
-}
-function normalizeRecordProps(record) {
- const propsObject = {};
- const props = record.props || false;
- if ("component" in record) {
- propsObject.default = props;
- } else {
- for (const name in record.components)
- propsObject[name] = typeof props === "object" ? props[name] : props;
- }
- return propsObject;
-}
-function isAliasRecord(record) {
- while (record) {
- if (record.record.aliasOf)
- return true;
- record = record.parent;
- }
- return false;
-}
-function mergeMetaFields(matched) {
- return matched.reduce((meta, record) => assign(meta, record.meta), {});
-}
-function mergeOptions(defaults2, partialOptions) {
- const options = {};
- for (const key in defaults2) {
- options[key] = key in partialOptions ? partialOptions[key] : defaults2[key];
- }
- return options;
-}
-function findInsertionIndex(matcher, matchers) {
- let lower = 0;
- let upper = matchers.length;
- while (lower !== upper) {
- const mid = lower + upper >> 1;
- const sortOrder = comparePathParserScore(matcher, matchers[mid]);
- if (sortOrder < 0) {
- upper = mid;
- } else {
- lower = mid + 1;
- }
- }
- const insertionAncestor = getInsertionAncestor(matcher);
- if (insertionAncestor) {
- upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
- }
- return upper;
-}
-function getInsertionAncestor(matcher) {
- let ancestor = matcher;
- while (ancestor = ancestor.parent) {
- if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) {
- return ancestor;
- }
- }
- return;
-}
-function isMatchable({ record }) {
- return !!(record.name || record.components && Object.keys(record.components).length || record.redirect);
-}
-function parseQuery(search) {
- const query = {};
- if (search === "" || search === "?")
- return query;
- const hasLeadingIM = search[0] === "?";
- const searchParams = (hasLeadingIM ? search.slice(1) : search).split("&");
- for (let i = 0; i < searchParams.length; ++i) {
- const searchParam = searchParams[i].replace(PLUS_RE, " ");
- const eqPos = searchParam.indexOf("=");
- const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));
- const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));
- if (key in query) {
- let currentValue = query[key];
- if (!isArray$1(currentValue)) {
- currentValue = query[key] = [currentValue];
- }
- currentValue.push(value);
- } else {
- query[key] = value;
- }
- }
- return query;
-}
-function stringifyQuery(query) {
- let search = "";
- for (let key in query) {
- const value = query[key];
- key = encodeQueryKey(key);
- if (value == null) {
- if (value !== void 0) {
- search += (search.length ? "&" : "") + key;
- }
- continue;
- }
- const values = isArray$1(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];
- values.forEach((value2) => {
- if (value2 !== void 0) {
- search += (search.length ? "&" : "") + key;
- if (value2 != null)
- search += "=" + value2;
- }
- });
- }
- return search;
-}
-function normalizeQuery(query) {
- const normalizedQuery = {};
- for (const key in query) {
- const value = query[key];
- if (value !== void 0) {
- normalizedQuery[key] = isArray$1(value) ? value.map((v) => v == null ? null : "" + v) : value == null ? value : "" + value;
- }
- }
- return normalizedQuery;
-}
-const matchedRouteKey = Symbol("");
-const viewDepthKey = Symbol("");
-const routerKey = Symbol("");
-const routeLocationKey = Symbol("");
-const routerViewLocationKey = Symbol("");
-function useCallbacks() {
- let handlers = [];
- function add(handler) {
- handlers.push(handler);
- return () => {
- const i = handlers.indexOf(handler);
- if (i > -1)
- handlers.splice(i, 1);
- };
- }
- function reset() {
- handlers = [];
- }
- return {
- add,
- list: () => handlers.slice(),
- reset
- };
-}
-function guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {
- const enterCallbackArray = record && // name is defined if record is because of the function overload
- (record.enterCallbacks[name] = record.enterCallbacks[name] || []);
- return () => new Promise((resolve, reject) => {
- const next = (valid) => {
- if (valid === false) {
- reject(createRouterError(4, {
- from,
- to
- }));
- } else if (valid instanceof Error) {
- reject(valid);
- } else if (isRouteLocation(valid)) {
- reject(createRouterError(2, {
- from: to,
- to: valid
- }));
- } else {
- if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are
- record.enterCallbacks[name] === enterCallbackArray && typeof valid === "function") {
- enterCallbackArray.push(valid);
- }
- resolve();
- }
- };
- const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, next));
- let guardCall = Promise.resolve(guardReturn);
- if (guard.length < 3)
- guardCall = guardCall.then(next);
- guardCall.catch((err) => reject(err));
- });
-}
-function extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {
- const guards = [];
- for (const record of matched) {
- for (const name in record.components) {
- let rawComponent = record.components[name];
- if (guardType !== "beforeRouteEnter" && !record.instances[name])
- continue;
- if (isRouteComponent(rawComponent)) {
- const options = rawComponent.__vccOpts || rawComponent;
- const guard = options[guardType];
- guard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));
- } else {
- let componentPromise = rawComponent();
- guards.push(() => componentPromise.then((resolved) => {
- if (!resolved)
- throw new Error(`Couldn't resolve component "${name}" at "${record.path}"`);
- const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;
- record.mods[name] = resolved;
- record.components[name] = resolvedComponent;
- const options = resolvedComponent.__vccOpts || resolvedComponent;
- const guard = options[guardType];
- return guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();
- }));
- }
- }
- }
- return guards;
-}
-function useLink(props) {
- const router2 = inject(routerKey);
- const currentRoute = inject(routeLocationKey);
- const route = computed(() => {
- const to = unref(props.to);
- return router2.resolve(to);
- });
- const activeRecordIndex = computed(() => {
- const { matched } = route.value;
- const { length } = matched;
- const routeMatched = matched[length - 1];
- const currentMatched = currentRoute.matched;
- if (!routeMatched || !currentMatched.length)
- return -1;
- const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));
- if (index > -1)
- return index;
- const parentRecordPath = getOriginalPath(matched[length - 2]);
- return (
- // we are dealing with nested routes
- length > 1 && // if the parent and matched route have the same path, this link is
- // referring to the empty child. Or we currently are on a different
- // child of the same parent
- getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent
- currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index
- );
- });
- const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));
- const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));
- function navigate(e = {}) {
- if (guardEvent(e)) {
- const p2 = router2[unref(props.replace) ? "replace" : "push"](
- unref(props.to)
- // avoid uncaught errors are they are logged anyway
- ).catch(noop$1);
- if (props.viewTransition && typeof document !== "undefined" && "startViewTransition" in document) {
- document.startViewTransition(() => p2);
- }
- return p2;
- }
- return Promise.resolve();
- }
- return {
- route,
- href: computed(() => route.value.href),
- isActive,
- isExactActive,
- navigate
- };
-}
-function preferSingleVNode(vnodes) {
- return vnodes.length === 1 ? vnodes[0] : vnodes;
-}
-const RouterLinkImpl = /* @__PURE__ */ defineComponent({
- name: "RouterLink",
- compatConfig: { MODE: 3 },
- props: {
- to: {
- type: [String, Object],
- required: true
- },
- replace: Boolean,
- activeClass: String,
- // inactiveClass: String,
- exactActiveClass: String,
- custom: Boolean,
- ariaCurrentValue: {
- type: String,
- default: "page"
- }
- },
- useLink,
- setup(props, { slots }) {
- const link = reactive(useLink(props));
- const { options } = inject(routerKey);
- const elClass = computed(() => ({
- [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive,
- // [getLinkClass(
- // props.inactiveClass,
- // options.linkInactiveClass,
- // 'router-link-inactive'
- // )]: !link.isExactActive,
- [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive
- }));
- return () => {
- const children = slots.default && preferSingleVNode(slots.default(link));
- return props.custom ? children : h("a", {
- "aria-current": link.isExactActive ? props.ariaCurrentValue : null,
- href: link.href,
- // this would override user added attrs but Vue will still add
- // the listener, so we end up triggering both
- onClick: link.navigate,
- class: elClass.value
- }, children);
- };
- }
-});
-const RouterLink = RouterLinkImpl;
-function guardEvent(e) {
- if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)
- return;
- if (e.defaultPrevented)
- return;
- if (e.button !== void 0 && e.button !== 0)
- return;
- if (e.currentTarget && e.currentTarget.getAttribute) {
- const target = e.currentTarget.getAttribute("target");
- if (/\b_blank\b/i.test(target))
- return;
- }
- if (e.preventDefault)
- e.preventDefault();
- return true;
-}
-function includesParams(outer, inner) {
- for (const key in inner) {
- const innerValue = inner[key];
- const outerValue = outer[key];
- if (typeof innerValue === "string") {
- if (innerValue !== outerValue)
- return false;
- } else {
- if (!isArray$1(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))
- return false;
- }
- }
- return true;
-}
-function getOriginalPath(record) {
- return record ? record.aliasOf ? record.aliasOf.path : record.path : "";
-}
-const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
-const RouterViewImpl = /* @__PURE__ */ defineComponent({
- name: "RouterView",
- // #674 we manually inherit them
- inheritAttrs: false,
- props: {
- name: {
- type: String,
- default: "default"
- },
- route: Object
- },
- // Better compat for @vue/compat users
- // https://github.com/vuejs/router/issues/1315
- compatConfig: { MODE: 3 },
- setup(props, { attrs, slots }) {
- const injectedRoute = inject(routerViewLocationKey);
- const routeToDisplay = computed(() => props.route || injectedRoute.value);
- const injectedDepth = inject(viewDepthKey, 0);
- const depth = computed(() => {
- let initialDepth = unref(injectedDepth);
- const { matched } = routeToDisplay.value;
- let matchedRoute;
- while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {
- initialDepth++;
- }
- return initialDepth;
- });
- const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);
- provide(viewDepthKey, computed(() => depth.value + 1));
- provide(matchedRouteKey, matchedRouteRef);
- provide(routerViewLocationKey, routeToDisplay);
- const viewRef = ref();
- watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {
- if (to) {
- to.instances[name] = instance;
- if (from && from !== to && instance && instance === oldInstance) {
- if (!to.leaveGuards.size) {
- to.leaveGuards = from.leaveGuards;
- }
- if (!to.updateGuards.size) {
- to.updateGuards = from.updateGuards;
- }
- }
- }
- if (instance && to && // if there is no instance but to and from are the same this might be
- // the first visit
- (!from || !isSameRouteRecord(to, from) || !oldInstance)) {
- (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));
- }
- }, { flush: "post" });
- return () => {
- const route = routeToDisplay.value;
- const currentName = props.name;
- const matchedRoute = matchedRouteRef.value;
- const ViewComponent = matchedRoute && matchedRoute.components[currentName];
- if (!ViewComponent) {
- return normalizeSlot(slots.default, { Component: ViewComponent, route });
- }
- const routePropsOption = matchedRoute.props[currentName];
- const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null;
- const onVnodeUnmounted = (vnode) => {
- if (vnode.component.isUnmounted) {
- matchedRoute.instances[currentName] = null;
- }
- };
- const component = h(ViewComponent, assign({}, routeProps, attrs, {
- onVnodeUnmounted,
- ref: viewRef
- }));
- return (
- // pass the vnode to the slot as a prop.
- // h and both accept vnodes
- normalizeSlot(slots.default, { Component: component, route }) || component
- );
- };
- }
-});
-function normalizeSlot(slot, data) {
- if (!slot)
- return null;
- const slotContent = slot(data);
- return slotContent.length === 1 ? slotContent[0] : slotContent;
-}
-const RouterView = RouterViewImpl;
-function createRouter(options) {
- const matcher = createRouterMatcher(options.routes, options);
- const parseQuery$1 = options.parseQuery || parseQuery;
- const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
- const routerHistory = options.history;
- const beforeGuards = useCallbacks();
- const beforeResolveGuards = useCallbacks();
- const afterGuards = useCallbacks();
- const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
- let pendingLocation = START_LOCATION_NORMALIZED;
- if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) {
- history.scrollRestoration = "manual";
- }
- const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
- const encodeParams = applyToParams.bind(null, encodeParam);
- const decodeParams = (
- // @ts-expect-error: intentionally avoid the type check
- applyToParams.bind(null, decode)
- );
- function addRoute(parentOrRoute, route) {
- let parent;
- let record;
- if (isRouteName(parentOrRoute)) {
- parent = matcher.getRecordMatcher(parentOrRoute);
- record = route;
- } else {
- record = parentOrRoute;
- }
- return matcher.addRoute(record, parent);
- }
- function removeRoute(name) {
- const recordMatcher = matcher.getRecordMatcher(name);
- if (recordMatcher) {
- matcher.removeRoute(recordMatcher);
- }
- }
- function getRoutes() {
- return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
- }
- function hasRoute(name) {
- return !!matcher.getRecordMatcher(name);
- }
- function resolve(rawLocation, currentLocation) {
- currentLocation = assign({}, currentLocation || currentRoute.value);
- if (typeof rawLocation === "string") {
- const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
- const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);
- const href2 = routerHistory.createHref(locationNormalized.fullPath);
- return assign(locationNormalized, matchedRoute2, {
- params: decodeParams(matchedRoute2.params),
- hash: decode(locationNormalized.hash),
- redirectedFrom: void 0,
- href: href2
- });
- }
- let matcherLocation;
- if (rawLocation.path != null) {
- matcherLocation = assign({}, rawLocation, {
- path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path
- });
- } else {
- const targetParams = assign({}, rawLocation.params);
- for (const key in targetParams) {
- if (targetParams[key] == null) {
- delete targetParams[key];
- }
- }
- matcherLocation = assign({}, rawLocation, {
- params: encodeParams(targetParams)
- });
- currentLocation.params = encodeParams(currentLocation.params);
- }
- const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
- const hash = rawLocation.hash || "";
- matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
- const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {
- hash: encodeHash(hash),
- path: matchedRoute.path
- }));
- const href = routerHistory.createHref(fullPath);
- return assign({
- fullPath,
- // keep the hash encoded so fullPath is effectively path + encodedQuery +
- // hash
- hash,
- query: (
- // if the user is using a custom query lib like qs, we might have
- // nested objects, so we keep the query as is, meaning it can contain
- // numbers at `$route.query`, but at the point, the user will have to
- // use their own type anyway.
- // https://github.com/vuejs/router/issues/328#issuecomment-649481567
- stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}
- )
- }, matchedRoute, {
- redirectedFrom: void 0,
- href
- });
- }
- function locationAsObject(to) {
- return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);
- }
- function checkCanceledNavigation(to, from) {
- if (pendingLocation !== to) {
- return createRouterError(8, {
- from,
- to
- });
- }
- }
- function push(to) {
- return pushWithRedirect(to);
- }
- function replace(to) {
- return push(assign(locationAsObject(to), { replace: true }));
- }
- function handleRedirectRecord(to) {
- const lastMatched = to.matched[to.matched.length - 1];
- if (lastMatched && lastMatched.redirect) {
- const { redirect } = lastMatched;
- let newTargetLocation = typeof redirect === "function" ? redirect(to) : redirect;
- if (typeof newTargetLocation === "string") {
- newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : (
- // force empty params
- { path: newTargetLocation }
- );
- newTargetLocation.params = {};
- }
- return assign({
- query: to.query,
- hash: to.hash,
- // avoid transferring params if the redirect has a path
- params: newTargetLocation.path != null ? {} : to.params
- }, newTargetLocation);
- }
- }
- function pushWithRedirect(to, redirectedFrom) {
- const targetLocation = pendingLocation = resolve(to);
- const from = currentRoute.value;
- const data = to.state;
- const force = to.force;
- const replace2 = to.replace === true;
- const shouldRedirect = handleRedirectRecord(targetLocation);
- if (shouldRedirect)
- return pushWithRedirect(
- assign(locationAsObject(shouldRedirect), {
- state: typeof shouldRedirect === "object" ? assign({}, data, shouldRedirect.state) : data,
- force,
- replace: replace2
- }),
- // keep original redirectedFrom if it exists
- redirectedFrom || targetLocation
- );
- const toLocation = targetLocation;
- toLocation.redirectedFrom = redirectedFrom;
- let failure;
- if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {
- failure = createRouterError(16, { to: toLocation, from });
- handleScroll(
- from,
- from,
- // this is a push, the only way for it to be triggered from a
- // history.listen is with a redirect, which makes it become a push
- true,
- // This cannot be the first navigation because the initial location
- // cannot be manually navigated to
- false
- );
- }
- return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (
- // navigation redirects still mark the router as ready
- isNavigationFailure(
- error,
- 2
- /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
- ) ? error : markAsReady(error)
- ) : (
- // reject any unknown error
- triggerError(error, toLocation, from)
- )).then((failure2) => {
- if (failure2) {
- if (isNavigationFailure(
- failure2,
- 2
- /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
- )) {
- return pushWithRedirect(
- // keep options
- assign({
- // preserve an existing replacement but allow the redirect to override it
- replace: replace2
- }, locationAsObject(failure2.to), {
- state: typeof failure2.to === "object" ? assign({}, data, failure2.to.state) : data,
- force
- }),
- // preserve the original redirectedFrom if any
- redirectedFrom || toLocation
- );
- }
- } else {
- failure2 = finalizeNavigation(toLocation, from, true, replace2, data);
- }
- triggerAfterEach(toLocation, from, failure2);
- return failure2;
- });
- }
- function checkCanceledNavigationAndReject(to, from) {
- const error = checkCanceledNavigation(to, from);
- return error ? Promise.reject(error) : Promise.resolve();
- }
- function runWithContext(fn) {
- const app2 = installedApps.values().next().value;
- return app2 && typeof app2.runWithContext === "function" ? app2.runWithContext(fn) : fn();
- }
- function navigate(to, from) {
- let guards;
- const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);
- guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from);
- for (const record of leavingRecords) {
- record.leaveGuards.forEach((guard) => {
- guards.push(guardToPromiseFn(guard, to, from));
- });
- }
- const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);
- guards.push(canceledNavigationCheck);
- return runGuardQueue(guards).then(() => {
- guards = [];
- for (const guard of beforeGuards.list()) {
- guards.push(guardToPromiseFn(guard, to, from));
- }
- guards.push(canceledNavigationCheck);
- return runGuardQueue(guards);
- }).then(() => {
- guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from);
- for (const record of updatingRecords) {
- record.updateGuards.forEach((guard) => {
- guards.push(guardToPromiseFn(guard, to, from));
- });
- }
- guards.push(canceledNavigationCheck);
- return runGuardQueue(guards);
- }).then(() => {
- guards = [];
- for (const record of enteringRecords) {
- if (record.beforeEnter) {
- if (isArray$1(record.beforeEnter)) {
- for (const beforeEnter of record.beforeEnter)
- guards.push(guardToPromiseFn(beforeEnter, to, from));
- } else {
- guards.push(guardToPromiseFn(record.beforeEnter, to, from));
- }
- }
- }
- guards.push(canceledNavigationCheck);
- return runGuardQueue(guards);
- }).then(() => {
- to.matched.forEach((record) => record.enterCallbacks = {});
- guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from, runWithContext);
- guards.push(canceledNavigationCheck);
- return runGuardQueue(guards);
- }).then(() => {
- guards = [];
- for (const guard of beforeResolveGuards.list()) {
- guards.push(guardToPromiseFn(guard, to, from));
- }
- guards.push(canceledNavigationCheck);
- return runGuardQueue(guards);
- }).catch((err) => isNavigationFailure(
- err,
- 8
- /* ErrorTypes.NAVIGATION_CANCELLED */
- ) ? err : Promise.reject(err));
- }
- function triggerAfterEach(to, from, failure) {
- afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));
- }
- function finalizeNavigation(toLocation, from, isPush, replace2, data) {
- const error = checkCanceledNavigation(toLocation, from);
- if (error)
- return error;
- const isFirstNavigation = from === START_LOCATION_NORMALIZED;
- const state = !isBrowser ? {} : history.state;
- if (isPush) {
- if (replace2 || isFirstNavigation)
- routerHistory.replace(toLocation.fullPath, assign({
- scroll: isFirstNavigation && state && state.scroll
- }, data));
- else
- routerHistory.push(toLocation.fullPath, data);
- }
- currentRoute.value = toLocation;
- handleScroll(toLocation, from, isPush, isFirstNavigation);
- markAsReady();
- }
- let removeHistoryListener;
- function setupListeners() {
- if (removeHistoryListener)
- return;
- removeHistoryListener = routerHistory.listen((to, _from, info) => {
- if (!router2.listening)
- return;
- const toLocation = resolve(to);
- const shouldRedirect = handleRedirectRecord(toLocation);
- if (shouldRedirect) {
- pushWithRedirect(assign(shouldRedirect, { replace: true, force: true }), toLocation).catch(noop$1);
- return;
- }
- pendingLocation = toLocation;
- const from = currentRoute.value;
- if (isBrowser) {
- saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
- }
- navigate(toLocation, from).catch((error) => {
- if (isNavigationFailure(
- error,
- 4 | 8
- /* ErrorTypes.NAVIGATION_CANCELLED */
- )) {
- return error;
- }
- if (isNavigationFailure(
- error,
- 2
- /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
- )) {
- pushWithRedirect(
- assign(locationAsObject(error.to), {
- force: true
- }),
- toLocation
- // avoid an uncaught rejection, let push call triggerError
- ).then((failure) => {
- if (isNavigationFailure(
- failure,
- 4 | 16
- /* ErrorTypes.NAVIGATION_DUPLICATED */
- ) && !info.delta && info.type === NavigationType.pop) {
- routerHistory.go(-1, false);
- }
- }).catch(noop$1);
- return Promise.reject();
- }
- if (info.delta) {
- routerHistory.go(-info.delta, false);
- }
- return triggerError(error, toLocation, from);
- }).then((failure) => {
- failure = failure || finalizeNavigation(
- // after navigation, all matched components are resolved
- toLocation,
- from,
- false
- );
- if (failure) {
- if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
- // entry while a different route is displayed
- !isNavigationFailure(
- failure,
- 8
- /* ErrorTypes.NAVIGATION_CANCELLED */
- )) {
- routerHistory.go(-info.delta, false);
- } else if (info.type === NavigationType.pop && isNavigationFailure(
- failure,
- 4 | 16
- /* ErrorTypes.NAVIGATION_DUPLICATED */
- )) {
- routerHistory.go(-1, false);
- }
- }
- triggerAfterEach(toLocation, from, failure);
- }).catch(noop$1);
- });
- }
- let readyHandlers = useCallbacks();
- let errorListeners = useCallbacks();
- let ready;
- function triggerError(error, to, from) {
- markAsReady(error);
- const list = errorListeners.list();
- if (list.length) {
- list.forEach((handler) => handler(error, to, from));
- } else {
- console.error(error);
- }
- return Promise.reject(error);
- }
- function isReady() {
- if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)
- return Promise.resolve();
- return new Promise((resolve2, reject) => {
- readyHandlers.add([resolve2, reject]);
- });
- }
- function markAsReady(err) {
- if (!ready) {
- ready = !err;
- setupListeners();
- readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());
- readyHandlers.reset();
- }
- return err;
- }
- function handleScroll(to, from, isPush, isFirstNavigation) {
- const { scrollBehavior } = options;
- if (!isBrowser || !scrollBehavior)
- return Promise.resolve();
- const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;
- return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));
- }
- const go = (delta) => routerHistory.go(delta);
- let started;
- const installedApps = /* @__PURE__ */ new Set();
- const router2 = {
- currentRoute,
- listening: true,
- addRoute,
- removeRoute,
- clearRoutes: matcher.clearRoutes,
- hasRoute,
- getRoutes,
- resolve,
- options,
- push,
- replace,
- go,
- back: () => go(-1),
- forward: () => go(1),
- beforeEach: beforeGuards.add,
- beforeResolve: beforeResolveGuards.add,
- afterEach: afterGuards.add,
- onError: errorListeners.add,
- isReady,
- install(app2) {
- const router22 = this;
- app2.component("RouterLink", RouterLink);
- app2.component("RouterView", RouterView);
- app2.config.globalProperties.$router = router22;
- Object.defineProperty(app2.config.globalProperties, "$route", {
- enumerable: true,
- get: () => unref(currentRoute)
- });
- if (isBrowser && // used for the initial navigation client side to avoid pushing
- // multiple times when the router is used in multiple apps
- !started && currentRoute.value === START_LOCATION_NORMALIZED) {
- started = true;
- push(routerHistory.location).catch((err) => {
- });
- }
- const reactiveRoute = {};
- for (const key in START_LOCATION_NORMALIZED) {
- Object.defineProperty(reactiveRoute, key, {
- get: () => currentRoute.value[key],
- enumerable: true
- });
- }
- app2.provide(routerKey, router22);
- app2.provide(routeLocationKey, shallowReactive(reactiveRoute));
- app2.provide(routerViewLocationKey, currentRoute);
- const unmountApp = app2.unmount;
- installedApps.add(app2);
- app2.unmount = function() {
- installedApps.delete(app2);
- if (installedApps.size < 1) {
- pendingLocation = START_LOCATION_NORMALIZED;
- removeHistoryListener && removeHistoryListener();
- removeHistoryListener = null;
- currentRoute.value = START_LOCATION_NORMALIZED;
- started = false;
- ready = false;
- }
- unmountApp();
- };
- }
- };
- function runGuardQueue(guards) {
- return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());
- }
- return router2;
-}
-function extractChangingRecords(to, from) {
- const leavingRecords = [];
- const updatingRecords = [];
- const enteringRecords = [];
- const len = Math.max(from.matched.length, to.matched.length);
- for (let i = 0; i < len; i++) {
- const recordFrom = from.matched[i];
- if (recordFrom) {
- if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))
- updatingRecords.push(recordFrom);
- else
- leavingRecords.push(recordFrom);
- }
- const recordTo = to.matched[i];
- if (recordTo) {
- if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {
- enteringRecords.push(recordTo);
- }
- }
- }
- return [leavingRecords, updatingRecords, enteringRecords];
-}
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var defaultAttributes = {
- outline: {
- xmlns: "http://www.w3.org/2000/svg",
- width: 24,
- height: 24,
- viewBox: "0 0 24 24",
- fill: "none",
- stroke: "currentColor",
- "stroke-width": 2,
- "stroke-linecap": "round",
- "stroke-linejoin": "round"
- },
- filled: {
- xmlns: "http://www.w3.org/2000/svg",
- width: 24,
- height: 24,
- viewBox: "0 0 24 24",
- fill: "currentColor",
- stroke: "none"
- }
-};
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-const createVueComponent = (type, iconName, iconNamePascal, iconNode) => ({ color = "currentColor", size = 24, stroke = 2, title, class: classes, ...rest }, { attrs, slots }) => {
- let children = [...iconNode.map((child) => h(...child)), ...slots.default ? [slots.default()] : []];
- if (title)
- children = [h("title", title), ...children];
- return h(
- "svg",
- {
- ...defaultAttributes[type],
- width: size,
- height: size,
- ...attrs,
- class: ["tabler-icon", `tabler-icon-${iconName}`],
- ...type === "filled" ? {
- fill: color
- } : {
- "stroke-width": stroke ?? defaultAttributes[type]["stroke-width"],
- stroke: color
- },
- ...rest
- },
- children
- );
-};
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconDevices = createVueComponent("outline", "devices", "IconDevices", [["path", { "d": "M13 9a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1v-10z", "key": "svg-0" }], ["path", { "d": "M18 8v-3a1 1 0 0 0 -1 -1h-13a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h9", "key": "svg-1" }], ["path", { "d": "M16 9h2", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconHome = createVueComponent("outline", "home", "IconHome", [["path", { "d": "M5 12l-2 0l9 -9l9 9l-2 0", "key": "svg-0" }], ["path", { "d": "M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7", "key": "svg-1" }], ["path", { "d": "M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6", "key": "svg-2" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconKeyboard = createVueComponent("outline", "keyboard", "IconKeyboard", [["path", { "d": "M2 6m0 2a2 2 0 0 1 2 -2h16a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2z", "key": "svg-0" }], ["path", { "d": "M6 10l0 .01", "key": "svg-1" }], ["path", { "d": "M10 10l0 .01", "key": "svg-2" }], ["path", { "d": "M14 10l0 .01", "key": "svg-3" }], ["path", { "d": "M18 10l0 .01", "key": "svg-4" }], ["path", { "d": "M6 14l0 .01", "key": "svg-5" }], ["path", { "d": "M18 14l0 .01", "key": "svg-6" }], ["path", { "d": "M10 14l4 .01", "key": "svg-7" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconLayoutGrid = createVueComponent("outline", "layout-grid", "IconLayoutGrid", [["path", { "d": "M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z", "key": "svg-0" }], ["path", { "d": "M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z", "key": "svg-1" }], ["path", { "d": "M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z", "key": "svg-2" }], ["path", { "d": "M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z", "key": "svg-3" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconSettings = createVueComponent("outline", "settings", "IconSettings", [["path", { "d": "M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z", "key": "svg-0" }], ["path", { "d": "M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", "key": "svg-1" }]]);
-/**
- * @license @tabler/icons-vue v3.30.0 - MIT
- *
- * This source code is licensed under the MIT license.
- * See the LICENSE file in the root directory of this source tree.
- */
-var IconX = createVueComponent("outline", "x", "IconX", [["path", { "d": "M18 6l-12 12", "key": "svg-0" }], ["path", { "d": "M6 6l12 12", "key": "svg-1" }]]);
-const _hoisted_1$1 = { id: "main-menu" };
-const _sfc_main$2 = {
- __name: "MainMenu",
- setup(__props) {
- const menuOpen = ref(false);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("nav", _hoisted_1$1, [
- createBaseVNode("button", {
- id: "menu-toggle",
- class: normalizeClass(menuOpen.value ? "open" : ""),
- onClick: _cache[0] || (_cache[0] = ($event) => menuOpen.value = !menuOpen.value)
- }, [
- createBaseVNode("img", {
- class: normalizeClass(["logo p-1", { "opacity-0": menuOpen.value }]),
- src: _imports_0,
- "aria-hidden": "true"
- }, null, 2),
- createVNode(unref(IconX), {
- class: normalizeClass({ "opacity-0": !menuOpen.value })
- }, null, 8, ["class"])
- ], 2),
- createBaseVNode("ul", {
- class: normalizeClass(menuOpen.value ? "open" : "")
- }, [
- createBaseVNode("li", null, [
- createVNode(unref(RouterLink), {
- onClick: _cache[1] || (_cache[1] = ($event) => menuOpen.value = false),
- to: "/"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconHome)),
- _cache[6] || (_cache[6] = createTextVNode("Dashboard "))
- ]),
- _: 1
- })
- ]),
- createBaseVNode("li", null, [
- createVNode(unref(RouterLink), {
- onClick: _cache[2] || (_cache[2] = ($event) => menuOpen.value = false),
- to: "/panels"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconLayoutGrid)),
- _cache[7] || (_cache[7] = createTextVNode("Panels "))
- ]),
- _: 1
- })
- ]),
- createBaseVNode("li", null, [
- createVNode(unref(RouterLink), {
- onClick: _cache[3] || (_cache[3] = ($event) => menuOpen.value = false),
- to: "/macros"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconKeyboard)),
- _cache[8] || (_cache[8] = createTextVNode("Macros "))
- ]),
- _: 1
- })
- ]),
- createBaseVNode("li", null, [
- createVNode(unref(RouterLink), {
- onClick: _cache[4] || (_cache[4] = ($event) => menuOpen.value = false),
- to: "/devices"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconDevices)),
- _cache[9] || (_cache[9] = createTextVNode("Device "))
- ]),
- _: 1
- })
- ]),
- createBaseVNode("li", null, [
- createVNode(unref(RouterLink), {
- onClick: _cache[5] || (_cache[5] = ($event) => menuOpen.value = false),
- to: "/settings"
- }, {
- default: withCtx(() => [
- createVNode(unref(IconSettings)),
- _cache[10] || (_cache[10] = createTextVNode("Settings "))
- ]),
- _: 1
- })
- ])
- ], 2)
- ]);
- };
- }
-};
-function bind(fn, thisArg) {
- return function wrap() {
- return fn.apply(thisArg, arguments);
- };
-}
-const { toString } = Object.prototype;
-const { getPrototypeOf } = Object;
-const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
- const str = toString.call(thing);
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
-})(/* @__PURE__ */ Object.create(null));
-const kindOfTest = (type) => {
- type = type.toLowerCase();
- return (thing) => kindOf(thing) === type;
-};
-const typeOfTest = (type) => (thing) => typeof thing === type;
-const { isArray } = Array;
-const isUndefined = typeOfTest("undefined");
-function isBuffer(val) {
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
-}
-const isArrayBuffer = kindOfTest("ArrayBuffer");
-function isArrayBufferView(val) {
- let result;
- if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
- result = ArrayBuffer.isView(val);
- } else {
- result = val && val.buffer && isArrayBuffer(val.buffer);
- }
- return result;
-}
-const isString = typeOfTest("string");
-const isFunction = typeOfTest("function");
-const isNumber = typeOfTest("number");
-const isObject = (thing) => thing !== null && typeof thing === "object";
-const isBoolean = (thing) => thing === true || thing === false;
-const isPlainObject = (val) => {
- if (kindOf(val) !== "object") {
- return false;
- }
- const prototype2 = getPrototypeOf(val);
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
-};
-const isDate = kindOfTest("Date");
-const isFile = kindOfTest("File");
-const isBlob = kindOfTest("Blob");
-const isFileList = kindOfTest("FileList");
-const isStream = (val) => isObject(val) && isFunction(val.pipe);
-const isFormData = (thing) => {
- let kind;
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
- kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
-};
-const isURLSearchParams = kindOfTest("URLSearchParams");
-const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
-const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
-function forEach(obj, fn, { allOwnKeys = false } = {}) {
- if (obj === null || typeof obj === "undefined") {
- return;
- }
- let i;
- let l;
- if (typeof obj !== "object") {
- obj = [obj];
- }
- if (isArray(obj)) {
- for (i = 0, l = obj.length; i < l; i++) {
- fn.call(null, obj[i], i, obj);
- }
- } else {
- const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
- const len = keys.length;
- let key;
- for (i = 0; i < len; i++) {
- key = keys[i];
- fn.call(null, obj[key], key, obj);
- }
- }
-}
-function findKey(obj, key) {
- key = key.toLowerCase();
- const keys = Object.keys(obj);
- let i = keys.length;
- let _key;
- while (i-- > 0) {
- _key = keys[i];
- if (key === _key.toLowerCase()) {
- return _key;
- }
- }
- return null;
-}
-const _global = (() => {
- if (typeof globalThis !== "undefined") return globalThis;
- return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
-})();
-const isContextDefined = (context) => !isUndefined(context) && context !== _global;
-function merge() {
- const { caseless } = isContextDefined(this) && this || {};
- const result = {};
- const assignValue = (val, key) => {
- const targetKey = caseless && findKey(result, key) || key;
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
- result[targetKey] = merge(result[targetKey], val);
- } else if (isPlainObject(val)) {
- result[targetKey] = merge({}, val);
- } else if (isArray(val)) {
- result[targetKey] = val.slice();
- } else {
- result[targetKey] = val;
- }
- };
- for (let i = 0, l = arguments.length; i < l; i++) {
- arguments[i] && forEach(arguments[i], assignValue);
- }
- return result;
-}
-const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
- forEach(b, (val, key) => {
- if (thisArg && isFunction(val)) {
- a[key] = bind(val, thisArg);
- } else {
- a[key] = val;
- }
- }, { allOwnKeys });
- return a;
-};
-const stripBOM = (content) => {
- if (content.charCodeAt(0) === 65279) {
- content = content.slice(1);
- }
- return content;
-};
-const inherits = (constructor, superConstructor, props, descriptors2) => {
- constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
- constructor.prototype.constructor = constructor;
- Object.defineProperty(constructor, "super", {
- value: superConstructor.prototype
- });
- props && Object.assign(constructor.prototype, props);
-};
-const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
- let props;
- let i;
- let prop;
- const merged = {};
- destObj = destObj || {};
- if (sourceObj == null) return destObj;
- do {
- props = Object.getOwnPropertyNames(sourceObj);
- i = props.length;
- while (i-- > 0) {
- prop = props[i];
- if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
- destObj[prop] = sourceObj[prop];
- merged[prop] = true;
- }
- }
- sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
- } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
- return destObj;
-};
-const endsWith = (str, searchString, position) => {
- str = String(str);
- if (position === void 0 || position > str.length) {
- position = str.length;
- }
- position -= searchString.length;
- const lastIndex = str.indexOf(searchString, position);
- return lastIndex !== -1 && lastIndex === position;
-};
-const toArray = (thing) => {
- if (!thing) return null;
- if (isArray(thing)) return thing;
- let i = thing.length;
- if (!isNumber(i)) return null;
- const arr = new Array(i);
- while (i-- > 0) {
- arr[i] = thing[i];
- }
- return arr;
-};
-const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
- return (thing) => {
- return TypedArray && thing instanceof TypedArray;
- };
-})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
-const forEachEntry = (obj, fn) => {
- const generator = obj && obj[Symbol.iterator];
- const iterator2 = generator.call(obj);
- let result;
- while ((result = iterator2.next()) && !result.done) {
- const pair = result.value;
- fn.call(obj, pair[0], pair[1]);
- }
-};
-const matchAll = (regExp, str) => {
- let matches;
- const arr = [];
- while ((matches = regExp.exec(str)) !== null) {
- arr.push(matches);
- }
- return arr;
-};
-const isHTMLForm = kindOfTest("HTMLFormElement");
-const toCamelCase = (str) => {
- return str.toLowerCase().replace(
- /[-_\s]([a-z\d])(\w*)/g,
- function replacer2(m, p1, p2) {
- return p1.toUpperCase() + p2;
- }
- );
-};
-const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
-const isRegExp = kindOfTest("RegExp");
-const reduceDescriptors = (obj, reducer) => {
- const descriptors2 = Object.getOwnPropertyDescriptors(obj);
- const reducedDescriptors = {};
- forEach(descriptors2, (descriptor, name) => {
- let ret;
- if ((ret = reducer(descriptor, name, obj)) !== false) {
- reducedDescriptors[name] = ret || descriptor;
- }
- });
- Object.defineProperties(obj, reducedDescriptors);
-};
-const freezeMethods = (obj) => {
- reduceDescriptors(obj, (descriptor, name) => {
- if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
- return false;
- }
- const value = obj[name];
- if (!isFunction(value)) return;
- descriptor.enumerable = false;
- if ("writable" in descriptor) {
- descriptor.writable = false;
- return;
- }
- if (!descriptor.set) {
- descriptor.set = () => {
- throw Error("Can not rewrite read-only method '" + name + "'");
- };
- }
- });
-};
-const toObjectSet = (arrayOrString, delimiter) => {
- const obj = {};
- const define = (arr) => {
- arr.forEach((value) => {
- obj[value] = true;
- });
- };
- isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
- return obj;
-};
-const noop = () => {
-};
-const toFiniteNumber = (value, defaultValue) => {
- return value != null && Number.isFinite(value = +value) ? value : defaultValue;
-};
-function isSpecCompliantForm(thing) {
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
-}
-const toJSONObject = (obj) => {
- const stack2 = new Array(10);
- const visit = (source, i) => {
- if (isObject(source)) {
- if (stack2.indexOf(source) >= 0) {
- return;
- }
- if (!("toJSON" in source)) {
- stack2[i] = source;
- const target = isArray(source) ? [] : {};
- forEach(source, (value, key) => {
- const reducedValue = visit(value, i + 1);
- !isUndefined(reducedValue) && (target[key] = reducedValue);
- });
- stack2[i] = void 0;
- return target;
- }
- }
- return source;
- };
- return visit(obj, 0);
-};
-const isAsyncFn = kindOfTest("AsyncFunction");
-const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
-const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
- if (setImmediateSupported) {
- return setImmediate;
- }
- return postMessageSupported ? ((token, callbacks) => {
- _global.addEventListener("message", ({ source, data }) => {
- if (source === _global && data === token) {
- callbacks.length && callbacks.shift()();
- }
- }, false);
- return (cb) => {
- callbacks.push(cb);
- _global.postMessage(token, "*");
- };
- })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
-})(
- typeof setImmediate === "function",
- isFunction(_global.postMessage)
-);
-const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
-const utils$1 = {
- isArray,
- isArrayBuffer,
- isBuffer,
- isFormData,
- isArrayBufferView,
- isString,
- isNumber,
- isBoolean,
- isObject,
- isPlainObject,
- isReadableStream,
- isRequest,
- isResponse,
- isHeaders,
- isUndefined,
- isDate,
- isFile,
- isBlob,
- isRegExp,
- isFunction,
- isStream,
- isURLSearchParams,
- isTypedArray,
- isFileList,
- forEach,
- merge,
- extend,
- trim,
- stripBOM,
- inherits,
- toFlatObject,
- kindOf,
- kindOfTest,
- endsWith,
- toArray,
- forEachEntry,
- matchAll,
- isHTMLForm,
- hasOwnProperty,
- hasOwnProp: hasOwnProperty,
- // an alias to avoid ESLint no-prototype-builtins detection
- reduceDescriptors,
- freezeMethods,
- toObjectSet,
- toCamelCase,
- noop,
- toFiniteNumber,
- findKey,
- global: _global,
- isContextDefined,
- isSpecCompliantForm,
- toJSONObject,
- isAsyncFn,
- isThenable,
- setImmediate: _setImmediate,
- asap
-};
-function AxiosError$1(message, code, config, request, response) {
- Error.call(this);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- this.stack = new Error().stack;
- }
- this.message = message;
- this.name = "AxiosError";
- code && (this.code = code);
- config && (this.config = config);
- request && (this.request = request);
- if (response) {
- this.response = response;
- this.status = response.status ? response.status : null;
- }
-}
-utils$1.inherits(AxiosError$1, Error, {
- toJSON: function toJSON() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: utils$1.toJSONObject(this.config),
- code: this.code,
- status: this.status
- };
- }
-});
-const prototype$1 = AxiosError$1.prototype;
-const descriptors = {};
-[
- "ERR_BAD_OPTION_VALUE",
- "ERR_BAD_OPTION",
- "ECONNABORTED",
- "ETIMEDOUT",
- "ERR_NETWORK",
- "ERR_FR_TOO_MANY_REDIRECTS",
- "ERR_DEPRECATED",
- "ERR_BAD_RESPONSE",
- "ERR_BAD_REQUEST",
- "ERR_CANCELED",
- "ERR_NOT_SUPPORT",
- "ERR_INVALID_URL"
- // eslint-disable-next-line func-names
-].forEach((code) => {
- descriptors[code] = { value: code };
-});
-Object.defineProperties(AxiosError$1, descriptors);
-Object.defineProperty(prototype$1, "isAxiosError", { value: true });
-AxiosError$1.from = (error, code, config, request, response, customProps) => {
- const axiosError = Object.create(prototype$1);
- utils$1.toFlatObject(error, axiosError, function filter2(obj) {
- return obj !== Error.prototype;
- }, (prop) => {
- return prop !== "isAxiosError";
- });
- AxiosError$1.call(axiosError, error.message, code, config, request, response);
- axiosError.cause = error;
- axiosError.name = error.name;
- customProps && Object.assign(axiosError, customProps);
- return axiosError;
-};
-const httpAdapter = null;
-function isVisitable(thing) {
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
-}
-function removeBrackets(key) {
- return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
-}
-function renderKey(path, key, dots) {
- if (!path) return key;
- return path.concat(key).map(function each(token, i) {
- token = removeBrackets(token);
- return !dots && i ? "[" + token + "]" : token;
- }).join(dots ? "." : "");
-}
-function isFlatArray(arr) {
- return utils$1.isArray(arr) && !arr.some(isVisitable);
-}
-const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
- return /^is[A-Z]/.test(prop);
-});
-function toFormData$1(obj, formData, options) {
- if (!utils$1.isObject(obj)) {
- throw new TypeError("target must be an object");
- }
- formData = formData || new FormData();
- options = utils$1.toFlatObject(options, {
- metaTokens: true,
- dots: false,
- indexes: false
- }, false, function defined(option, source) {
- return !utils$1.isUndefined(source[option]);
- });
- const metaTokens = options.metaTokens;
- const visitor = options.visitor || defaultVisitor;
- const dots = options.dots;
- const indexes = options.indexes;
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
- if (!utils$1.isFunction(visitor)) {
- throw new TypeError("visitor must be a function");
- }
- function convertValue(value) {
- if (value === null) return "";
- if (utils$1.isDate(value)) {
- return value.toISOString();
- }
- if (!useBlob && utils$1.isBlob(value)) {
- throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
- }
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
- }
- return value;
- }
- function defaultVisitor(value, key, path) {
- let arr = value;
- if (value && !path && typeof value === "object") {
- if (utils$1.endsWith(key, "{}")) {
- key = metaTokens ? key : key.slice(0, -2);
- value = JSON.stringify(value);
- } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
- key = removeBrackets(key);
- arr.forEach(function each(el, index) {
- !(utils$1.isUndefined(el) || el === null) && formData.append(
- // eslint-disable-next-line no-nested-ternary
- indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
- convertValue(el)
- );
- });
- return false;
- }
- }
- if (isVisitable(value)) {
- return true;
- }
- formData.append(renderKey(path, key, dots), convertValue(value));
- return false;
- }
- const stack2 = [];
- const exposedHelpers = Object.assign(predicates, {
- defaultVisitor,
- convertValue,
- isVisitable
- });
- function build(value, path) {
- if (utils$1.isUndefined(value)) return;
- if (stack2.indexOf(value) !== -1) {
- throw Error("Circular reference detected in " + path.join("."));
- }
- stack2.push(value);
- utils$1.forEach(value, function each(el, key) {
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
- formData,
- el,
- utils$1.isString(key) ? key.trim() : key,
- path,
- exposedHelpers
- );
- if (result === true) {
- build(el, path ? path.concat(key) : [key]);
- }
- });
- stack2.pop();
- }
- if (!utils$1.isObject(obj)) {
- throw new TypeError("data must be an object");
- }
- build(obj);
- return formData;
-}
-function encode$1(str) {
- const charMap = {
- "!": "%21",
- "'": "%27",
- "(": "%28",
- ")": "%29",
- "~": "%7E",
- "%20": "+",
- "%00": "\0"
- };
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer2(match) {
- return charMap[match];
- });
-}
-function AxiosURLSearchParams(params, options) {
- this._pairs = [];
- params && toFormData$1(params, this, options);
-}
-const prototype = AxiosURLSearchParams.prototype;
-prototype.append = function append(name, value) {
- this._pairs.push([name, value]);
-};
-prototype.toString = function toString2(encoder) {
- const _encode = encoder ? function(value) {
- return encoder.call(this, value, encode$1);
- } : encode$1;
- return this._pairs.map(function each(pair) {
- return _encode(pair[0]) + "=" + _encode(pair[1]);
- }, "").join("&");
-};
-function encode(val) {
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
-}
-function buildURL(url, params, options) {
- if (!params) {
- return url;
- }
- const _encode = options && options.encode || encode;
- if (utils$1.isFunction(options)) {
- options = {
- serialize: options
- };
- }
- const serializeFn = options && options.serialize;
- let serializedParams;
- if (serializeFn) {
- serializedParams = serializeFn(params, options);
- } else {
- serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
- }
- if (serializedParams) {
- const hashmarkIndex = url.indexOf("#");
- if (hashmarkIndex !== -1) {
- url = url.slice(0, hashmarkIndex);
- }
- url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
- }
- return url;
-}
-class InterceptorManager {
- constructor() {
- this.handlers = [];
- }
- /**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
- use(fulfilled, rejected, options) {
- this.handlers.push({
- fulfilled,
- rejected,
- synchronous: options ? options.synchronous : false,
- runWhen: options ? options.runWhen : null
- });
- return this.handlers.length - 1;
- }
- /**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- *
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
- */
- eject(id) {
- if (this.handlers[id]) {
- this.handlers[id] = null;
- }
- }
- /**
- * Clear all interceptors from the stack
- *
- * @returns {void}
- */
- clear() {
- if (this.handlers) {
- this.handlers = [];
- }
- }
- /**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- *
- * @returns {void}
- */
- forEach(fn) {
- utils$1.forEach(this.handlers, function forEachHandler(h2) {
- if (h2 !== null) {
- fn(h2);
- }
- });
- }
-}
-const transitionalDefaults = {
- silentJSONParsing: true,
- forcedJSONParsing: true,
- clarifyTimeoutError: false
-};
-const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
-const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
-const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
-const platform$1 = {
- isBrowser: true,
- classes: {
- URLSearchParams: URLSearchParams$1,
- FormData: FormData$1,
- Blob: Blob$1
- },
- protocols: ["http", "https", "file", "blob", "url", "data"]
-};
-const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
-const _navigator = typeof navigator === "object" && navigator || void 0;
-const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
-const hasStandardBrowserWebWorkerEnv = (() => {
- return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
- self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
-})();
-const origin = hasBrowserEnv && window.location.href || "http://localhost";
-const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- hasBrowserEnv,
- hasStandardBrowserEnv,
- hasStandardBrowserWebWorkerEnv,
- navigator: _navigator,
- origin
-}, Symbol.toStringTag, { value: "Module" }));
-const platform = {
- ...utils,
- ...platform$1
-};
-function toURLEncodedForm(data, options) {
- return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
- visitor: function(value, key, path, helpers) {
- if (platform.isNode && utils$1.isBuffer(value)) {
- this.append(key, value.toString("base64"));
- return false;
- }
- return helpers.defaultVisitor.apply(this, arguments);
- }
- }, options));
-}
-function parsePropPath(name) {
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
- return match[0] === "[]" ? "" : match[1] || match[0];
- });
-}
-function arrayToObject(arr) {
- const obj = {};
- const keys = Object.keys(arr);
- let i;
- const len = keys.length;
- let key;
- for (i = 0; i < len; i++) {
- key = keys[i];
- obj[key] = arr[key];
- }
- return obj;
-}
-function formDataToJSON(formData) {
- function buildPath(path, value, target, index) {
- let name = path[index++];
- if (name === "__proto__") return true;
- const isNumericKey = Number.isFinite(+name);
- const isLast = index >= path.length;
- name = !name && utils$1.isArray(target) ? target.length : name;
- if (isLast) {
- if (utils$1.hasOwnProp(target, name)) {
- target[name] = [target[name], value];
- } else {
- target[name] = value;
- }
- return !isNumericKey;
- }
- if (!target[name] || !utils$1.isObject(target[name])) {
- target[name] = [];
- }
- const result = buildPath(path, value, target[name], index);
- if (result && utils$1.isArray(target[name])) {
- target[name] = arrayToObject(target[name]);
- }
- return !isNumericKey;
- }
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
- const obj = {};
- utils$1.forEachEntry(formData, (name, value) => {
- buildPath(parsePropPath(name), value, obj, 0);
- });
- return obj;
- }
- return null;
-}
-function stringifySafely(rawValue, parser, encoder) {
- if (utils$1.isString(rawValue)) {
- try {
- (parser || JSON.parse)(rawValue);
- return utils$1.trim(rawValue);
- } catch (e) {
- if (e.name !== "SyntaxError") {
- throw e;
- }
- }
- }
- return (encoder || JSON.stringify)(rawValue);
-}
-const defaults = {
- transitional: transitionalDefaults,
- adapter: ["xhr", "http", "fetch"],
- transformRequest: [function transformRequest(data, headers) {
- const contentType = headers.getContentType() || "";
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
- const isObjectPayload = utils$1.isObject(data);
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
- data = new FormData(data);
- }
- const isFormData2 = utils$1.isFormData(data);
- if (isFormData2) {
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
- }
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
- return data;
- }
- if (utils$1.isArrayBufferView(data)) {
- return data.buffer;
- }
- if (utils$1.isURLSearchParams(data)) {
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
- return data.toString();
- }
- let isFileList2;
- if (isObjectPayload) {
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
- return toURLEncodedForm(data, this.formSerializer).toString();
- }
- if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
- const _FormData = this.env && this.env.FormData;
- return toFormData$1(
- isFileList2 ? { "files[]": data } : data,
- _FormData && new _FormData(),
- this.formSerializer
- );
- }
- }
- if (isObjectPayload || hasJSONContentType) {
- headers.setContentType("application/json", false);
- return stringifySafely(data);
- }
- return data;
- }],
- transformResponse: [function transformResponse(data) {
- const transitional2 = this.transitional || defaults.transitional;
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
- const JSONRequested = this.responseType === "json";
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
- return data;
- }
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
- try {
- return JSON.parse(data);
- } catch (e) {
- if (strictJSONParsing) {
- if (e.name === "SyntaxError") {
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
- }
- throw e;
- }
- }
- }
- return data;
- }],
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
- xsrfCookieName: "XSRF-TOKEN",
- xsrfHeaderName: "X-XSRF-TOKEN",
- maxContentLength: -1,
- maxBodyLength: -1,
- env: {
- FormData: platform.classes.FormData,
- Blob: platform.classes.Blob
- },
- validateStatus: function validateStatus(status) {
- return status >= 200 && status < 300;
- },
- headers: {
- common: {
- "Accept": "application/json, text/plain, */*",
- "Content-Type": void 0
- }
- }
-};
-utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
- defaults.headers[method] = {};
-});
-const ignoreDuplicateOf = utils$1.toObjectSet([
- "age",
- "authorization",
- "content-length",
- "content-type",
- "etag",
- "expires",
- "from",
- "host",
- "if-modified-since",
- "if-unmodified-since",
- "last-modified",
- "location",
- "max-forwards",
- "proxy-authorization",
- "referer",
- "retry-after",
- "user-agent"
-]);
-const parseHeaders = (rawHeaders) => {
- const parsed = {};
- let key;
- let val;
- let i;
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
- i = line.indexOf(":");
- key = line.substring(0, i).trim().toLowerCase();
- val = line.substring(i + 1).trim();
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
- return;
- }
- if (key === "set-cookie") {
- if (parsed[key]) {
- parsed[key].push(val);
- } else {
- parsed[key] = [val];
- }
- } else {
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
- }
- });
- return parsed;
-};
-const $internals = Symbol("internals");
-function normalizeHeader(header) {
- return header && String(header).trim().toLowerCase();
-}
-function normalizeValue(value) {
- if (value === false || value == null) {
- return value;
- }
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
-}
-function parseTokens(str) {
- const tokens = /* @__PURE__ */ Object.create(null);
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
- let match;
- while (match = tokensRE.exec(str)) {
- tokens[match[1]] = match[2];
- }
- return tokens;
-}
-const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
-function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
- if (utils$1.isFunction(filter2)) {
- return filter2.call(this, value, header);
- }
- if (isHeaderNameFilter) {
- value = header;
- }
- if (!utils$1.isString(value)) return;
- if (utils$1.isString(filter2)) {
- return value.indexOf(filter2) !== -1;
- }
- if (utils$1.isRegExp(filter2)) {
- return filter2.test(value);
- }
-}
-function formatHeader(header) {
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
- return char.toUpperCase() + str;
- });
-}
-function buildAccessors(obj, header) {
- const accessorName = utils$1.toCamelCase(" " + header);
- ["get", "set", "has"].forEach((methodName) => {
- Object.defineProperty(obj, methodName + accessorName, {
- value: function(arg1, arg2, arg3) {
- return this[methodName].call(this, header, arg1, arg2, arg3);
- },
- configurable: true
- });
- });
-}
-let AxiosHeaders$1 = class AxiosHeaders {
- constructor(headers) {
- headers && this.set(headers);
- }
- set(header, valueOrRewrite, rewrite) {
- const self2 = this;
- function setHeader(_value, _header, _rewrite) {
- const lHeader = normalizeHeader(_header);
- if (!lHeader) {
- throw new Error("header name must be a non-empty string");
- }
- const key = utils$1.findKey(self2, lHeader);
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
- self2[key || _header] = normalizeValue(_value);
- }
- }
- const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
- setHeaders(header, valueOrRewrite);
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
- setHeaders(parseHeaders(header), valueOrRewrite);
- } else if (utils$1.isHeaders(header)) {
- for (const [key, value] of header.entries()) {
- setHeader(value, key, rewrite);
- }
- } else {
- header != null && setHeader(valueOrRewrite, header, rewrite);
- }
- return this;
- }
- get(header, parser) {
- header = normalizeHeader(header);
- if (header) {
- const key = utils$1.findKey(this, header);
- if (key) {
- const value = this[key];
- if (!parser) {
- return value;
- }
- if (parser === true) {
- return parseTokens(value);
- }
- if (utils$1.isFunction(parser)) {
- return parser.call(this, value, key);
- }
- if (utils$1.isRegExp(parser)) {
- return parser.exec(value);
- }
- throw new TypeError("parser must be boolean|regexp|function");
- }
- }
- }
- has(header, matcher) {
- header = normalizeHeader(header);
- if (header) {
- const key = utils$1.findKey(this, header);
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
- }
- return false;
- }
- delete(header, matcher) {
- const self2 = this;
- let deleted = false;
- function deleteHeader(_header) {
- _header = normalizeHeader(_header);
- if (_header) {
- const key = utils$1.findKey(self2, _header);
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
- delete self2[key];
- deleted = true;
- }
- }
- }
- if (utils$1.isArray(header)) {
- header.forEach(deleteHeader);
- } else {
- deleteHeader(header);
- }
- return deleted;
- }
- clear(matcher) {
- const keys = Object.keys(this);
- let i = keys.length;
- let deleted = false;
- while (i--) {
- const key = keys[i];
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
- delete this[key];
- deleted = true;
- }
- }
- return deleted;
- }
- normalize(format) {
- const self2 = this;
- const headers = {};
- utils$1.forEach(this, (value, header) => {
- const key = utils$1.findKey(headers, header);
- if (key) {
- self2[key] = normalizeValue(value);
- delete self2[header];
- return;
- }
- const normalized = format ? formatHeader(header) : String(header).trim();
- if (normalized !== header) {
- delete self2[header];
- }
- self2[normalized] = normalizeValue(value);
- headers[normalized] = true;
- });
- return this;
- }
- concat(...targets) {
- return this.constructor.concat(this, ...targets);
- }
- toJSON(asStrings) {
- const obj = /* @__PURE__ */ Object.create(null);
- utils$1.forEach(this, (value, header) => {
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
- });
- return obj;
- }
- [Symbol.iterator]() {
- return Object.entries(this.toJSON())[Symbol.iterator]();
- }
- toString() {
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
- }
- get [Symbol.toStringTag]() {
- return "AxiosHeaders";
- }
- static from(thing) {
- return thing instanceof this ? thing : new this(thing);
- }
- static concat(first, ...targets) {
- const computed2 = new this(first);
- targets.forEach((target) => computed2.set(target));
- return computed2;
- }
- static accessor(header) {
- const internals = this[$internals] = this[$internals] = {
- accessors: {}
- };
- const accessors = internals.accessors;
- const prototype2 = this.prototype;
- function defineAccessor(_header) {
- const lHeader = normalizeHeader(_header);
- if (!accessors[lHeader]) {
- buildAccessors(prototype2, _header);
- accessors[lHeader] = true;
- }
- }
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
- return this;
- }
-};
-AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
-utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
- let mapped = key[0].toUpperCase() + key.slice(1);
- return {
- get: () => value,
- set(headerValue) {
- this[mapped] = headerValue;
- }
- };
-});
-utils$1.freezeMethods(AxiosHeaders$1);
-function transformData(fns, response) {
- const config = this || defaults;
- const context = response || config;
- const headers = AxiosHeaders$1.from(context.headers);
- let data = context.data;
- utils$1.forEach(fns, function transform(fn) {
- data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
- });
- headers.normalize();
- return data;
-}
-function isCancel$1(value) {
- return !!(value && value.__CANCEL__);
-}
-function CanceledError$1(message, config, request) {
- AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
- this.name = "CanceledError";
-}
-utils$1.inherits(CanceledError$1, AxiosError$1, {
- __CANCEL__: true
-});
-function settle(resolve, reject, response) {
- const validateStatus2 = response.config.validateStatus;
- if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
- resolve(response);
- } else {
- reject(new AxiosError$1(
- "Request failed with status code " + response.status,
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
- response.config,
- response.request,
- response
- ));
- }
-}
-function parseProtocol(url) {
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
- return match && match[1] || "";
-}
-function speedometer(samplesCount, min) {
- samplesCount = samplesCount || 10;
- const bytes = new Array(samplesCount);
- const timestamps = new Array(samplesCount);
- let head = 0;
- let tail = 0;
- let firstSampleTS;
- min = min !== void 0 ? min : 1e3;
- return function push(chunkLength) {
- const now = Date.now();
- const startedAt = timestamps[tail];
- if (!firstSampleTS) {
- firstSampleTS = now;
- }
- bytes[head] = chunkLength;
- timestamps[head] = now;
- let i = tail;
- let bytesCount = 0;
- while (i !== head) {
- bytesCount += bytes[i++];
- i = i % samplesCount;
- }
- head = (head + 1) % samplesCount;
- if (head === tail) {
- tail = (tail + 1) % samplesCount;
- }
- if (now - firstSampleTS < min) {
- return;
- }
- const passed = startedAt && now - startedAt;
- return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
- };
-}
-function throttle(fn, freq) {
- let timestamp = 0;
- let threshold = 1e3 / freq;
- let lastArgs;
- let timer;
- const invoke = (args, now = Date.now()) => {
- timestamp = now;
- lastArgs = null;
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- fn.apply(null, args);
- };
- const throttled = (...args) => {
- const now = Date.now();
- const passed = now - timestamp;
- if (passed >= threshold) {
- invoke(args, now);
- } else {
- lastArgs = args;
- if (!timer) {
- timer = setTimeout(() => {
- timer = null;
- invoke(lastArgs);
- }, threshold - passed);
- }
- }
- };
- const flush = () => lastArgs && invoke(lastArgs);
- return [throttled, flush];
-}
-const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
- let bytesNotified = 0;
- const _speedometer = speedometer(50, 250);
- return throttle((e) => {
- const loaded = e.loaded;
- const total = e.lengthComputable ? e.total : void 0;
- const progressBytes = loaded - bytesNotified;
- const rate = _speedometer(progressBytes);
- const inRange = loaded <= total;
- bytesNotified = loaded;
- const data = {
- loaded,
- total,
- progress: total ? loaded / total : void 0,
- bytes: progressBytes,
- rate: rate ? rate : void 0,
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
- event: e,
- lengthComputable: total != null,
- [isDownloadStream ? "download" : "upload"]: true
- };
- listener(data);
- }, freq);
-};
-const progressEventDecorator = (total, throttled) => {
- const lengthComputable = total != null;
- return [(loaded) => throttled[0]({
- lengthComputable,
- total,
- loaded
- }), throttled[1]];
-};
-const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
-const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
- url = new URL(url, platform.origin);
- return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
-})(
- new URL(platform.origin),
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
-) : () => true;
-const cookies = platform.hasStandardBrowserEnv ? (
- // Standard browser envs support document.cookie
- {
- write(name, value, expires, path, domain, secure) {
- const cookie = [name + "=" + encodeURIComponent(value)];
- utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
- utils$1.isString(path) && cookie.push("path=" + path);
- utils$1.isString(domain) && cookie.push("domain=" + domain);
- secure === true && cookie.push("secure");
- document.cookie = cookie.join("; ");
- },
- read(name) {
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
- return match ? decodeURIComponent(match[3]) : null;
- },
- remove(name) {
- this.write(name, "", Date.now() - 864e5);
- }
- }
-) : (
- // Non-standard browser env (web workers, react-native) lack needed support.
- {
- write() {
- },
- read() {
- return null;
- },
- remove() {
- }
- }
-);
-function isAbsoluteURL(url) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
-}
-function combineURLs(baseURL, relativeURL) {
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
-}
-function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
- let isRelativeUrl = !isAbsoluteURL(requestedURL);
- if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
- return combineURLs(baseURL, requestedURL);
- }
- return requestedURL;
-}
-const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
-function mergeConfig$1(config1, config2) {
- config2 = config2 || {};
- const config = {};
- function getMergedValue(target, source, prop, caseless) {
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
- return utils$1.merge.call({ caseless }, target, source);
- } else if (utils$1.isPlainObject(source)) {
- return utils$1.merge({}, source);
- } else if (utils$1.isArray(source)) {
- return source.slice();
- }
- return source;
- }
- function mergeDeepProperties(a, b, prop, caseless) {
- if (!utils$1.isUndefined(b)) {
- return getMergedValue(a, b, prop, caseless);
- } else if (!utils$1.isUndefined(a)) {
- return getMergedValue(void 0, a, prop, caseless);
- }
- }
- function valueFromConfig2(a, b) {
- if (!utils$1.isUndefined(b)) {
- return getMergedValue(void 0, b);
- }
- }
- function defaultToConfig2(a, b) {
- if (!utils$1.isUndefined(b)) {
- return getMergedValue(void 0, b);
- } else if (!utils$1.isUndefined(a)) {
- return getMergedValue(void 0, a);
- }
- }
- function mergeDirectKeys(a, b, prop) {
- if (prop in config2) {
- return getMergedValue(a, b);
- } else if (prop in config1) {
- return getMergedValue(void 0, a);
- }
- }
- const mergeMap = {
- url: valueFromConfig2,
- method: valueFromConfig2,
- data: valueFromConfig2,
- baseURL: defaultToConfig2,
- transformRequest: defaultToConfig2,
- transformResponse: defaultToConfig2,
- paramsSerializer: defaultToConfig2,
- timeout: defaultToConfig2,
- timeoutMessage: defaultToConfig2,
- withCredentials: defaultToConfig2,
- withXSRFToken: defaultToConfig2,
- adapter: defaultToConfig2,
- responseType: defaultToConfig2,
- xsrfCookieName: defaultToConfig2,
- xsrfHeaderName: defaultToConfig2,
- onUploadProgress: defaultToConfig2,
- onDownloadProgress: defaultToConfig2,
- decompress: defaultToConfig2,
- maxContentLength: defaultToConfig2,
- maxBodyLength: defaultToConfig2,
- beforeRedirect: defaultToConfig2,
- transport: defaultToConfig2,
- httpAgent: defaultToConfig2,
- httpsAgent: defaultToConfig2,
- cancelToken: defaultToConfig2,
- socketPath: defaultToConfig2,
- responseEncoding: defaultToConfig2,
- validateStatus: mergeDirectKeys,
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
- };
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
- const merge2 = mergeMap[prop] || mergeDeepProperties;
- const configValue = merge2(config1[prop], config2[prop], prop);
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
- });
- return config;
-}
-const resolveConfig = (config) => {
- const newConfig = mergeConfig$1({}, config);
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
- if (auth) {
- headers.set(
- "Authorization",
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
- );
- }
- let contentType;
- if (utils$1.isFormData(data)) {
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
- headers.setContentType(void 0);
- } else if ((contentType = headers.getContentType()) !== false) {
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
- headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
- }
- }
- if (platform.hasStandardBrowserEnv) {
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
- if (xsrfValue) {
- headers.set(xsrfHeaderName, xsrfValue);
- }
- }
- }
- return newConfig;
-};
-const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
-const xhrAdapter = isXHRAdapterSupported && function(config) {
- return new Promise(function dispatchXhrRequest(resolve, reject) {
- const _config = resolveConfig(config);
- let requestData = _config.data;
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
- let { responseType, onUploadProgress, onDownloadProgress } = _config;
- let onCanceled;
- let uploadThrottled, downloadThrottled;
- let flushUpload, flushDownload;
- function done() {
- flushUpload && flushUpload();
- flushDownload && flushDownload();
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
- _config.signal && _config.signal.removeEventListener("abort", onCanceled);
- }
- let request = new XMLHttpRequest();
- request.open(_config.method.toUpperCase(), _config.url, true);
- request.timeout = _config.timeout;
- function onloadend() {
- if (!request) {
- return;
- }
- const responseHeaders = AxiosHeaders$1.from(
- "getAllResponseHeaders" in request && request.getAllResponseHeaders()
- );
- const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
- const response = {
- data: responseData,
- status: request.status,
- statusText: request.statusText,
- headers: responseHeaders,
- config,
- request
- };
- settle(function _resolve(value) {
- resolve(value);
- done();
- }, function _reject(err) {
- reject(err);
- done();
- }, response);
- request = null;
- }
- if ("onloadend" in request) {
- request.onloadend = onloadend;
- } else {
- request.onreadystatechange = function handleLoad() {
- if (!request || request.readyState !== 4) {
- return;
- }
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
- return;
- }
- setTimeout(onloadend);
- };
- }
- request.onabort = function handleAbort() {
- if (!request) {
- return;
- }
- reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
- request = null;
- };
- request.onerror = function handleError2() {
- reject(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request));
- request = null;
- };
- request.ontimeout = function handleTimeout() {
- let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
- const transitional2 = _config.transitional || transitionalDefaults;
- if (_config.timeoutErrorMessage) {
- timeoutErrorMessage = _config.timeoutErrorMessage;
- }
- reject(new AxiosError$1(
- timeoutErrorMessage,
- transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
- config,
- request
- ));
- request = null;
- };
- requestData === void 0 && requestHeaders.setContentType(null);
- if ("setRequestHeader" in request) {
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
- request.setRequestHeader(key, val);
- });
- }
- if (!utils$1.isUndefined(_config.withCredentials)) {
- request.withCredentials = !!_config.withCredentials;
- }
- if (responseType && responseType !== "json") {
- request.responseType = _config.responseType;
- }
- if (onDownloadProgress) {
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
- request.addEventListener("progress", downloadThrottled);
- }
- if (onUploadProgress && request.upload) {
- [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
- request.upload.addEventListener("progress", uploadThrottled);
- request.upload.addEventListener("loadend", flushUpload);
- }
- if (_config.cancelToken || _config.signal) {
- onCanceled = (cancel) => {
- if (!request) {
- return;
- }
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
- request.abort();
- request = null;
- };
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
- if (_config.signal) {
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
- }
- }
- const protocol = parseProtocol(_config.url);
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
- reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
- return;
- }
- request.send(requestData || null);
- });
-};
-const composeSignals = (signals, timeout) => {
- const { length } = signals = signals ? signals.filter(Boolean) : [];
- if (timeout || length) {
- let controller = new AbortController();
- let aborted;
- const onabort = function(reason) {
- if (!aborted) {
- aborted = true;
- unsubscribe();
- const err = reason instanceof Error ? reason : this.reason;
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
- }
- };
- let timer = timeout && setTimeout(() => {
- timer = null;
- onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
- }, timeout);
- const unsubscribe = () => {
- if (signals) {
- timer && clearTimeout(timer);
- timer = null;
- signals.forEach((signal2) => {
- signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
- });
- signals = null;
- }
- };
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
- const { signal } = controller;
- signal.unsubscribe = () => utils$1.asap(unsubscribe);
- return signal;
- }
-};
-const streamChunk = function* (chunk, chunkSize) {
- let len = chunk.byteLength;
- if (len < chunkSize) {
- yield chunk;
- return;
- }
- let pos = 0;
- let end;
- while (pos < len) {
- end = pos + chunkSize;
- yield chunk.slice(pos, end);
- pos = end;
- }
-};
-const readBytes = async function* (iterable, chunkSize) {
- for await (const chunk of readStream(iterable)) {
- yield* streamChunk(chunk, chunkSize);
- }
-};
-const readStream = async function* (stream) {
- if (stream[Symbol.asyncIterator]) {
- yield* stream;
- return;
- }
- const reader = stream.getReader();
- try {
- for (; ; ) {
- const { done, value } = await reader.read();
- if (done) {
- break;
- }
- yield value;
- }
- } finally {
- await reader.cancel();
- }
-};
-const trackStream = (stream, chunkSize, onProgress, onFinish) => {
- const iterator2 = readBytes(stream, chunkSize);
- let bytes = 0;
- let done;
- let _onFinish = (e) => {
- if (!done) {
- done = true;
- onFinish && onFinish(e);
- }
- };
- return new ReadableStream({
- async pull(controller) {
- try {
- const { done: done2, value } = await iterator2.next();
- if (done2) {
- _onFinish();
- controller.close();
- return;
- }
- let len = value.byteLength;
- if (onProgress) {
- let loadedBytes = bytes += len;
- onProgress(loadedBytes);
- }
- controller.enqueue(new Uint8Array(value));
- } catch (err) {
- _onFinish(err);
- throw err;
- }
- },
- cancel(reason) {
- _onFinish(reason);
- return iterator2.return();
- }
- }, {
- highWaterMark: 2
- });
-};
-const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
-const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
-const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
-const test = (fn, ...args) => {
- try {
- return !!fn(...args);
- } catch (e) {
- return false;
- }
-};
-const supportsRequestStream = isReadableStreamSupported && test(() => {
- let duplexAccessed = false;
- const hasContentType = new Request(platform.origin, {
- body: new ReadableStream(),
- method: "POST",
- get duplex() {
- duplexAccessed = true;
- return "half";
- }
- }).headers.has("Content-Type");
- return duplexAccessed && !hasContentType;
-});
-const DEFAULT_CHUNK_SIZE = 64 * 1024;
-const supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
-const resolvers = {
- stream: supportsResponseStream && ((res) => res.body)
-};
-isFetchSupported && ((res) => {
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
- !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
- });
- });
-})(new Response());
-const getBodyLength = async (body) => {
- if (body == null) {
- return 0;
- }
- if (utils$1.isBlob(body)) {
- return body.size;
- }
- if (utils$1.isSpecCompliantForm(body)) {
- const _request = new Request(platform.origin, {
- method: "POST",
- body
- });
- return (await _request.arrayBuffer()).byteLength;
- }
- if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
- return body.byteLength;
- }
- if (utils$1.isURLSearchParams(body)) {
- body = body + "";
- }
- if (utils$1.isString(body)) {
- return (await encodeText(body)).byteLength;
- }
-};
-const resolveBodyLength = async (headers, body) => {
- const length = utils$1.toFiniteNumber(headers.getContentLength());
- return length == null ? getBodyLength(body) : length;
-};
-const fetchAdapter = isFetchSupported && (async (config) => {
- let {
- url,
- method,
- data,
- signal,
- cancelToken,
- timeout,
- onDownloadProgress,
- onUploadProgress,
- responseType,
- headers,
- withCredentials = "same-origin",
- fetchOptions
- } = resolveConfig(config);
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
- let request;
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
- composedSignal.unsubscribe();
- });
- let requestContentLength;
- try {
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
- let _request = new Request(url, {
- method: "POST",
- body: data,
- duplex: "half"
- });
- let contentTypeHeader;
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
- headers.setContentType(contentTypeHeader);
- }
- if (_request.body) {
- const [onProgress, flush] = progressEventDecorator(
- requestContentLength,
- progressEventReducer(asyncDecorator(onUploadProgress))
- );
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
- }
- }
- if (!utils$1.isString(withCredentials)) {
- withCredentials = withCredentials ? "include" : "omit";
- }
- const isCredentialsSupported = "credentials" in Request.prototype;
- request = new Request(url, {
- ...fetchOptions,
- signal: composedSignal,
- method: method.toUpperCase(),
- headers: headers.normalize().toJSON(),
- body: data,
- duplex: "half",
- credentials: isCredentialsSupported ? withCredentials : void 0
- });
- let response = await fetch(request);
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
- const options = {};
- ["status", "statusText", "headers"].forEach((prop) => {
- options[prop] = response[prop];
- });
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
- responseContentLength,
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
- ) || [];
- response = new Response(
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
- flush && flush();
- unsubscribe && unsubscribe();
- }),
- options
- );
- }
- responseType = responseType || "text";
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
- !isStreamResponse && unsubscribe && unsubscribe();
- return await new Promise((resolve, reject) => {
- settle(resolve, reject, {
- data: responseData,
- headers: AxiosHeaders$1.from(response.headers),
- status: response.status,
- statusText: response.statusText,
- config,
- request
- });
- });
- } catch (err) {
- unsubscribe && unsubscribe();
- if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
- throw Object.assign(
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
- {
- cause: err.cause || err
- }
- );
- }
- throw AxiosError$1.from(err, err && err.code, config, request);
- }
-});
-const knownAdapters = {
- http: httpAdapter,
- xhr: xhrAdapter,
- fetch: fetchAdapter
-};
-utils$1.forEach(knownAdapters, (fn, value) => {
- if (fn) {
- try {
- Object.defineProperty(fn, "name", { value });
- } catch (e) {
- }
- Object.defineProperty(fn, "adapterName", { value });
- }
-});
-const renderReason = (reason) => `- ${reason}`;
-const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
-const adapters = {
- getAdapter: (adapters2) => {
- adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
- const { length } = adapters2;
- let nameOrAdapter;
- let adapter;
- const rejectedReasons = {};
- for (let i = 0; i < length; i++) {
- nameOrAdapter = adapters2[i];
- let id;
- adapter = nameOrAdapter;
- if (!isResolvedHandle(nameOrAdapter)) {
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
- if (adapter === void 0) {
- throw new AxiosError$1(`Unknown adapter '${id}'`);
- }
- }
- if (adapter) {
- break;
- }
- rejectedReasons[id || "#" + i] = adapter;
- }
- if (!adapter) {
- const reasons = Object.entries(rejectedReasons).map(
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
- );
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
- throw new AxiosError$1(
- `There is no suitable adapter to dispatch the request ` + s,
- "ERR_NOT_SUPPORT"
- );
- }
- return adapter;
- },
- adapters: knownAdapters
-};
-function throwIfCancellationRequested(config) {
- if (config.cancelToken) {
- config.cancelToken.throwIfRequested();
- }
- if (config.signal && config.signal.aborted) {
- throw new CanceledError$1(null, config);
- }
-}
-function dispatchRequest(config) {
- throwIfCancellationRequested(config);
- config.headers = AxiosHeaders$1.from(config.headers);
- config.data = transformData.call(
- config,
- config.transformRequest
- );
- if (["post", "put", "patch"].indexOf(config.method) !== -1) {
- config.headers.setContentType("application/x-www-form-urlencoded", false);
- }
- const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
- return adapter(config).then(function onAdapterResolution(response) {
- throwIfCancellationRequested(config);
- response.data = transformData.call(
- config,
- config.transformResponse,
- response
- );
- response.headers = AxiosHeaders$1.from(response.headers);
- return response;
- }, function onAdapterRejection(reason) {
- if (!isCancel$1(reason)) {
- throwIfCancellationRequested(config);
- if (reason && reason.response) {
- reason.response.data = transformData.call(
- config,
- config.transformResponse,
- reason.response
- );
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
- }
- }
- return Promise.reject(reason);
- });
-}
-const VERSION$1 = "1.8.3";
-const validators$1 = {};
-["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
- validators$1[type] = function validator2(thing) {
- return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
- };
-});
-const deprecatedWarnings = {};
-validators$1.transitional = function transitional(validator2, version2, message) {
- function formatMessage(opt, desc) {
- return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
- }
- return (value, opt, opts) => {
- if (validator2 === false) {
- throw new AxiosError$1(
- formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
- AxiosError$1.ERR_DEPRECATED
- );
- }
- if (version2 && !deprecatedWarnings[opt]) {
- deprecatedWarnings[opt] = true;
- console.warn(
- formatMessage(
- opt,
- " has been deprecated since v" + version2 + " and will be removed in the near future"
- )
- );
- }
- return validator2 ? validator2(value, opt, opts) : true;
- };
-};
-validators$1.spelling = function spelling(correctSpelling) {
- return (value, opt) => {
- console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
- return true;
- };
-};
-function assertOptions(options, schema, allowUnknown) {
- if (typeof options !== "object") {
- throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
- }
- const keys = Object.keys(options);
- let i = keys.length;
- while (i-- > 0) {
- const opt = keys[i];
- const validator2 = schema[opt];
- if (validator2) {
- const value = options[opt];
- const result = value === void 0 || validator2(value, opt, options);
- if (result !== true) {
- throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
- }
- continue;
- }
- if (allowUnknown !== true) {
- throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
- }
- }
-}
-const validator = {
- assertOptions,
- validators: validators$1
-};
-const validators = validator.validators;
-let Axios$1 = class Axios {
- constructor(instanceConfig) {
- this.defaults = instanceConfig;
- this.interceptors = {
- request: new InterceptorManager(),
- response: new InterceptorManager()
- };
- }
- /**
- * Dispatch a request
- *
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
- * @param {?Object} config
- *
- * @returns {Promise} The Promise to be fulfilled
- */
- async request(configOrUrl, config) {
- try {
- return await this._request(configOrUrl, config);
- } catch (err) {
- if (err instanceof Error) {
- let dummy = {};
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
- const stack2 = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
- try {
- if (!err.stack) {
- err.stack = stack2;
- } else if (stack2 && !String(err.stack).endsWith(stack2.replace(/^.+\n.+\n/, ""))) {
- err.stack += "\n" + stack2;
- }
- } catch (e) {
- }
- }
- throw err;
- }
- }
- _request(configOrUrl, config) {
- if (typeof configOrUrl === "string") {
- config = config || {};
- config.url = configOrUrl;
- } else {
- config = configOrUrl || {};
- }
- config = mergeConfig$1(this.defaults, config);
- const { transitional: transitional2, paramsSerializer, headers } = config;
- if (transitional2 !== void 0) {
- validator.assertOptions(transitional2, {
- silentJSONParsing: validators.transitional(validators.boolean),
- forcedJSONParsing: validators.transitional(validators.boolean),
- clarifyTimeoutError: validators.transitional(validators.boolean)
- }, false);
- }
- if (paramsSerializer != null) {
- if (utils$1.isFunction(paramsSerializer)) {
- config.paramsSerializer = {
- serialize: paramsSerializer
- };
- } else {
- validator.assertOptions(paramsSerializer, {
- encode: validators.function,
- serialize: validators.function
- }, true);
- }
- }
- if (config.allowAbsoluteUrls !== void 0) ;
- else if (this.defaults.allowAbsoluteUrls !== void 0) {
- config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
- } else {
- config.allowAbsoluteUrls = true;
- }
- validator.assertOptions(config, {
- baseUrl: validators.spelling("baseURL"),
- withXsrfToken: validators.spelling("withXSRFToken")
- }, true);
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
- let contextHeaders = headers && utils$1.merge(
- headers.common,
- headers[config.method]
- );
- headers && utils$1.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- (method) => {
- delete headers[method];
- }
- );
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
- const requestInterceptorChain = [];
- let synchronousRequestInterceptors = true;
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
- if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
- return;
- }
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
- });
- const responseInterceptorChain = [];
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
- });
- let promise;
- let i = 0;
- let len;
- if (!synchronousRequestInterceptors) {
- const chain = [dispatchRequest.bind(this), void 0];
- chain.unshift.apply(chain, requestInterceptorChain);
- chain.push.apply(chain, responseInterceptorChain);
- len = chain.length;
- promise = Promise.resolve(config);
- while (i < len) {
- promise = promise.then(chain[i++], chain[i++]);
- }
- return promise;
- }
- len = requestInterceptorChain.length;
- let newConfig = config;
- i = 0;
- while (i < len) {
- const onFulfilled = requestInterceptorChain[i++];
- const onRejected = requestInterceptorChain[i++];
- try {
- newConfig = onFulfilled(newConfig);
- } catch (error) {
- onRejected.call(this, error);
- break;
- }
- }
- try {
- promise = dispatchRequest.call(this, newConfig);
- } catch (error) {
- return Promise.reject(error);
- }
- i = 0;
- len = responseInterceptorChain.length;
- while (i < len) {
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
- }
- return promise;
- }
- getUri(config) {
- config = mergeConfig$1(this.defaults, config);
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
- return buildURL(fullPath, config.params, config.paramsSerializer);
- }
-};
-utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
- Axios$1.prototype[method] = function(url, config) {
- return this.request(mergeConfig$1(config || {}, {
- method,
- url,
- data: (config || {}).data
- }));
- };
-});
-utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
- function generateHTTPMethod(isForm) {
- return function httpMethod(url, data, config) {
- return this.request(mergeConfig$1(config || {}, {
- method,
- headers: isForm ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url,
- data
- }));
- };
- }
- Axios$1.prototype[method] = generateHTTPMethod();
- Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
-});
-let CancelToken$1 = class CancelToken {
- constructor(executor) {
- if (typeof executor !== "function") {
- throw new TypeError("executor must be a function.");
- }
- let resolvePromise;
- this.promise = new Promise(function promiseExecutor(resolve) {
- resolvePromise = resolve;
- });
- const token = this;
- this.promise.then((cancel) => {
- if (!token._listeners) return;
- let i = token._listeners.length;
- while (i-- > 0) {
- token._listeners[i](cancel);
- }
- token._listeners = null;
- });
- this.promise.then = (onfulfilled) => {
- let _resolve;
- const promise = new Promise((resolve) => {
- token.subscribe(resolve);
- _resolve = resolve;
- }).then(onfulfilled);
- promise.cancel = function reject() {
- token.unsubscribe(_resolve);
- };
- return promise;
- };
- executor(function cancel(message, config, request) {
- if (token.reason) {
- return;
- }
- token.reason = new CanceledError$1(message, config, request);
- resolvePromise(token.reason);
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason) {
- throw this.reason;
- }
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(listener) {
- if (this.reason) {
- listener(this.reason);
- return;
- }
- if (this._listeners) {
- this._listeners.push(listener);
- } else {
- this._listeners = [listener];
- }
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(listener) {
- if (!this._listeners) {
- return;
- }
- const index = this._listeners.indexOf(listener);
- if (index !== -1) {
- this._listeners.splice(index, 1);
- }
- }
- toAbortSignal() {
- const controller = new AbortController();
- const abort = (err) => {
- controller.abort(err);
- };
- this.subscribe(abort);
- controller.signal.unsubscribe = () => this.unsubscribe(abort);
- return controller.signal;
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let cancel;
- const token = new CancelToken(function executor(c) {
- cancel = c;
- });
- return {
- token,
- cancel
- };
- }
-};
-function spread$1(callback) {
- return function wrap(arr) {
- return callback.apply(null, arr);
- };
-}
-function isAxiosError$1(payload) {
- return utils$1.isObject(payload) && payload.isAxiosError === true;
-}
-const HttpStatusCode$1 = {
- Continue: 100,
- SwitchingProtocols: 101,
- Processing: 102,
- EarlyHints: 103,
- Ok: 200,
- Created: 201,
- Accepted: 202,
- NonAuthoritativeInformation: 203,
- NoContent: 204,
- ResetContent: 205,
- PartialContent: 206,
- MultiStatus: 207,
- AlreadyReported: 208,
- ImUsed: 226,
- MultipleChoices: 300,
- MovedPermanently: 301,
- Found: 302,
- SeeOther: 303,
- NotModified: 304,
- UseProxy: 305,
- Unused: 306,
- TemporaryRedirect: 307,
- PermanentRedirect: 308,
- BadRequest: 400,
- Unauthorized: 401,
- PaymentRequired: 402,
- Forbidden: 403,
- NotFound: 404,
- MethodNotAllowed: 405,
- NotAcceptable: 406,
- ProxyAuthenticationRequired: 407,
- RequestTimeout: 408,
- Conflict: 409,
- Gone: 410,
- LengthRequired: 411,
- PreconditionFailed: 412,
- PayloadTooLarge: 413,
- UriTooLong: 414,
- UnsupportedMediaType: 415,
- RangeNotSatisfiable: 416,
- ExpectationFailed: 417,
- ImATeapot: 418,
- MisdirectedRequest: 421,
- UnprocessableEntity: 422,
- Locked: 423,
- FailedDependency: 424,
- TooEarly: 425,
- UpgradeRequired: 426,
- PreconditionRequired: 428,
- TooManyRequests: 429,
- RequestHeaderFieldsTooLarge: 431,
- UnavailableForLegalReasons: 451,
- InternalServerError: 500,
- NotImplemented: 501,
- BadGateway: 502,
- ServiceUnavailable: 503,
- GatewayTimeout: 504,
- HttpVersionNotSupported: 505,
- VariantAlsoNegotiates: 506,
- InsufficientStorage: 507,
- LoopDetected: 508,
- NotExtended: 510,
- NetworkAuthenticationRequired: 511
-};
-Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
- HttpStatusCode$1[value] = key;
-});
-function createInstance(defaultConfig) {
- const context = new Axios$1(defaultConfig);
- const instance = bind(Axios$1.prototype.request, context);
- utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
- utils$1.extend(instance, context, null, { allOwnKeys: true });
- instance.create = function create(instanceConfig) {
- return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
- };
- return instance;
-}
-const axios = createInstance(defaults);
-axios.Axios = Axios$1;
-axios.CanceledError = CanceledError$1;
-axios.CancelToken = CancelToken$1;
-axios.isCancel = isCancel$1;
-axios.VERSION = VERSION$1;
-axios.toFormData = toFormData$1;
-axios.AxiosError = AxiosError$1;
-axios.Cancel = axios.CanceledError;
-axios.all = function all(promises) {
- return Promise.all(promises);
-};
-axios.spread = spread$1;
-axios.isAxiosError = isAxiosError$1;
-axios.mergeConfig = mergeConfig$1;
-axios.AxiosHeaders = AxiosHeaders$1;
-axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
-axios.getAdapter = adapters.getAdapter;
-axios.HttpStatusCode = HttpStatusCode$1;
-axios.default = axios;
-const {
- Axios: Axios2,
- AxiosError,
- CanceledError,
- isCancel,
- CancelToken: CancelToken2,
- VERSION,
- all: all2,
- Cancel,
- isAxiosError,
- spread,
- toFormData,
- AxiosHeaders: AxiosHeaders2,
- HttpStatusCode,
- formToJSON,
- getAdapter,
- mergeConfig
-} = axios;
-var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
-function getAugmentedNamespace(n) {
- if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
- var f = n.default;
- if (typeof f == "function") {
- var a = function a2() {
- if (this instanceof a2) {
- return Reflect.construct(f, arguments, this.constructor);
- }
- return f.apply(this, arguments);
- };
- a.prototype = f.prototype;
- } else a = {};
- Object.defineProperty(a, "__esModule", { value: true });
- Object.keys(n).forEach(function(k) {
- var d = Object.getOwnPropertyDescriptor(n, k);
- Object.defineProperty(a, k, d.get ? d : {
- enumerable: true,
- get: function() {
- return n[k];
- }
- });
- });
- return a;
-}
-var cryptoJs$1 = { exports: {} };
-function commonjsRequire(path) {
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
-}
-var core$1 = { exports: {} };
-const __viteBrowserExternal = {};
-const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- default: __viteBrowserExternal
-}, Symbol.toStringTag, { value: "Module" }));
-const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
-var core = core$1.exports;
-var hasRequiredCore;
-function requireCore() {
- if (hasRequiredCore) return core$1.exports;
- hasRequiredCore = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory();
- }
- })(core, function() {
- var CryptoJS = CryptoJS || function(Math2, undefined$1) {
- var crypto2;
- if (typeof window !== "undefined" && window.crypto) {
- crypto2 = window.crypto;
- }
- if (typeof self !== "undefined" && self.crypto) {
- crypto2 = self.crypto;
- }
- if (typeof globalThis !== "undefined" && globalThis.crypto) {
- crypto2 = globalThis.crypto;
- }
- if (!crypto2 && typeof window !== "undefined" && window.msCrypto) {
- crypto2 = window.msCrypto;
- }
- if (!crypto2 && typeof commonjsGlobal !== "undefined" && commonjsGlobal.crypto) {
- crypto2 = commonjsGlobal.crypto;
- }
- if (!crypto2 && typeof commonjsRequire === "function") {
- try {
- crypto2 = require$$0;
- } catch (err) {
- }
- }
- var cryptoSecureRandomInt = function() {
- if (crypto2) {
- if (typeof crypto2.getRandomValues === "function") {
- try {
- return crypto2.getRandomValues(new Uint32Array(1))[0];
- } catch (err) {
- }
- }
- if (typeof crypto2.randomBytes === "function") {
- try {
- return crypto2.randomBytes(4).readInt32LE();
- } catch (err) {
- }
- }
- }
- throw new Error("Native crypto module could not be used to get secure random number.");
- };
- var create = Object.create || /* @__PURE__ */ function() {
- function F() {
- }
- return function(obj) {
- var subtype;
- F.prototype = obj;
- subtype = new F();
- F.prototype = null;
- return subtype;
- };
- }();
- var C = {};
- var C_lib = C.lib = {};
- var Base = C_lib.Base = /* @__PURE__ */ function() {
- return {
- /**
- * Creates a new object that inherits from this object.
- *
- * @param {Object} overrides Properties to copy into the new object.
- *
- * @return {Object} The new object.
- *
- * @static
- *
- * @example
- *
- * var MyType = CryptoJS.lib.Base.extend({
- * field: 'value',
- *
- * method: function () {
- * }
- * });
- */
- extend: function(overrides) {
- var subtype = create(this);
- if (overrides) {
- subtype.mixIn(overrides);
- }
- if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
- subtype.init = function() {
- subtype.$super.init.apply(this, arguments);
- };
- }
- subtype.init.prototype = subtype;
- subtype.$super = this;
- return subtype;
- },
- /**
- * Extends this object and runs the init method.
- * Arguments to create() will be passed to init().
- *
- * @return {Object} The new object.
- *
- * @static
- *
- * @example
- *
- * var instance = MyType.create();
- */
- create: function() {
- var instance = this.extend();
- instance.init.apply(instance, arguments);
- return instance;
- },
- /**
- * Initializes a newly created object.
- * Override this method to add some logic when your objects are created.
- *
- * @example
- *
- * var MyType = CryptoJS.lib.Base.extend({
- * init: function () {
- * // ...
- * }
- * });
- */
- init: function() {
- },
- /**
- * Copies properties into this object.
- *
- * @param {Object} properties The properties to mix in.
- *
- * @example
- *
- * MyType.mixIn({
- * field: 'value'
- * });
- */
- mixIn: function(properties) {
- for (var propertyName in properties) {
- if (properties.hasOwnProperty(propertyName)) {
- this[propertyName] = properties[propertyName];
- }
- }
- if (properties.hasOwnProperty("toString")) {
- this.toString = properties.toString;
- }
- },
- /**
- * Creates a copy of this object.
- *
- * @return {Object} The clone.
- *
- * @example
- *
- * var clone = instance.clone();
- */
- clone: function() {
- return this.init.prototype.extend(this);
- }
- };
- }();
- var WordArray = C_lib.WordArray = Base.extend({
- /**
- * Initializes a newly created word array.
- *
- * @param {Array} words (Optional) An array of 32-bit words.
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
- *
- * @example
- *
- * var wordArray = CryptoJS.lib.WordArray.create();
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
- */
- init: function(words, sigBytes) {
- words = this.words = words || [];
- if (sigBytes != undefined$1) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 4;
- }
- },
- /**
- * Converts this word array to a string.
- *
- * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
- *
- * @return {string} The stringified word array.
- *
- * @example
- *
- * var string = wordArray + '';
- * var string = wordArray.toString();
- * var string = wordArray.toString(CryptoJS.enc.Utf8);
- */
- toString: function(encoder) {
- return (encoder || Hex).stringify(this);
- },
- /**
- * Concatenates a word array to this word array.
- *
- * @param {WordArray} wordArray The word array to append.
- *
- * @return {WordArray} This word array.
- *
- * @example
- *
- * wordArray1.concat(wordArray2);
- */
- concat: function(wordArray) {
- var thisWords = this.words;
- var thatWords = wordArray.words;
- var thisSigBytes = this.sigBytes;
- var thatSigBytes = wordArray.sigBytes;
- this.clamp();
- if (thisSigBytes % 4) {
- for (var i = 0; i < thatSigBytes; i++) {
- var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
- }
- } else {
- for (var j = 0; j < thatSigBytes; j += 4) {
- thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
- }
- }
- this.sigBytes += thatSigBytes;
- return this;
- },
- /**
- * Removes insignificant bits.
- *
- * @example
- *
- * wordArray.clamp();
- */
- clamp: function() {
- var words = this.words;
- var sigBytes = this.sigBytes;
- words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
- words.length = Math2.ceil(sigBytes / 4);
- },
- /**
- * Creates a copy of this word array.
- *
- * @return {WordArray} The clone.
- *
- * @example
- *
- * var clone = wordArray.clone();
- */
- clone: function() {
- var clone = Base.clone.call(this);
- clone.words = this.words.slice(0);
- return clone;
- },
- /**
- * Creates a word array filled with random bytes.
- *
- * @param {number} nBytes The number of random bytes to generate.
- *
- * @return {WordArray} The random word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.lib.WordArray.random(16);
- */
- random: function(nBytes) {
- var words = [];
- for (var i = 0; i < nBytes; i += 4) {
- words.push(cryptoSecureRandomInt());
- }
- return new WordArray.init(words, nBytes);
- }
- });
- var C_enc = C.enc = {};
- var Hex = C_enc.Hex = {
- /**
- * Converts a word array to a hex string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The hex string.
- *
- * @static
- *
- * @example
- *
- * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
- */
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var hexChars = [];
- for (var i = 0; i < sigBytes; i++) {
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- hexChars.push((bite >>> 4).toString(16));
- hexChars.push((bite & 15).toString(16));
- }
- return hexChars.join("");
- },
- /**
- * Converts a hex string to a word array.
- *
- * @param {string} hexStr The hex string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Hex.parse(hexString);
- */
- parse: function(hexStr) {
- var hexStrLength = hexStr.length;
- var words = [];
- for (var i = 0; i < hexStrLength; i += 2) {
- words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
- }
- return new WordArray.init(words, hexStrLength / 2);
- }
- };
- var Latin1 = C_enc.Latin1 = {
- /**
- * Converts a word array to a Latin1 string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The Latin1 string.
- *
- * @static
- *
- * @example
- *
- * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
- */
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var latin1Chars = [];
- for (var i = 0; i < sigBytes; i++) {
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- latin1Chars.push(String.fromCharCode(bite));
- }
- return latin1Chars.join("");
- },
- /**
- * Converts a Latin1 string to a word array.
- *
- * @param {string} latin1Str The Latin1 string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
- */
- parse: function(latin1Str) {
- var latin1StrLength = latin1Str.length;
- var words = [];
- for (var i = 0; i < latin1StrLength; i++) {
- words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
- }
- return new WordArray.init(words, latin1StrLength);
- }
- };
- var Utf8 = C_enc.Utf8 = {
- /**
- * Converts a word array to a UTF-8 string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The UTF-8 string.
- *
- * @static
- *
- * @example
- *
- * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
- */
- stringify: function(wordArray) {
- try {
- return decodeURIComponent(escape(Latin1.stringify(wordArray)));
- } catch (e) {
- throw new Error("Malformed UTF-8 data");
- }
- },
- /**
- * Converts a UTF-8 string to a word array.
- *
- * @param {string} utf8Str The UTF-8 string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
- */
- parse: function(utf8Str) {
- return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
- }
- };
- var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
- /**
- * Resets this block algorithm's data buffer to its initial state.
- *
- * @example
- *
- * bufferedBlockAlgorithm.reset();
- */
- reset: function() {
- this._data = new WordArray.init();
- this._nDataBytes = 0;
- },
- /**
- * Adds new data to this block algorithm's buffer.
- *
- * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
- *
- * @example
- *
- * bufferedBlockAlgorithm._append('data');
- * bufferedBlockAlgorithm._append(wordArray);
- */
- _append: function(data) {
- if (typeof data == "string") {
- data = Utf8.parse(data);
- }
- this._data.concat(data);
- this._nDataBytes += data.sigBytes;
- },
- /**
- * Processes available data blocks.
- *
- * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
- *
- * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
- *
- * @return {WordArray} The processed data.
- *
- * @example
- *
- * var processedData = bufferedBlockAlgorithm._process();
- * var processedData = bufferedBlockAlgorithm._process(!!'flush');
- */
- _process: function(doFlush) {
- var processedWords;
- var data = this._data;
- var dataWords = data.words;
- var dataSigBytes = data.sigBytes;
- var blockSize = this.blockSize;
- var blockSizeBytes = blockSize * 4;
- var nBlocksReady = dataSigBytes / blockSizeBytes;
- if (doFlush) {
- nBlocksReady = Math2.ceil(nBlocksReady);
- } else {
- nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
- }
- var nWordsReady = nBlocksReady * blockSize;
- var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
- if (nWordsReady) {
- for (var offset = 0; offset < nWordsReady; offset += blockSize) {
- this._doProcessBlock(dataWords, offset);
- }
- processedWords = dataWords.splice(0, nWordsReady);
- data.sigBytes -= nBytesReady;
- }
- return new WordArray.init(processedWords, nBytesReady);
- },
- /**
- * Creates a copy of this object.
- *
- * @return {Object} The clone.
- *
- * @example
- *
- * var clone = bufferedBlockAlgorithm.clone();
- */
- clone: function() {
- var clone = Base.clone.call(this);
- clone._data = this._data.clone();
- return clone;
- },
- _minBufferSize: 0
- });
- C_lib.Hasher = BufferedBlockAlgorithm.extend({
- /**
- * Configuration options.
- */
- cfg: Base.extend(),
- /**
- * Initializes a newly created hasher.
- *
- * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
- *
- * @example
- *
- * var hasher = CryptoJS.algo.SHA256.create();
- */
- init: function(cfg) {
- this.cfg = this.cfg.extend(cfg);
- this.reset();
- },
- /**
- * Resets this hasher to its initial state.
- *
- * @example
- *
- * hasher.reset();
- */
- reset: function() {
- BufferedBlockAlgorithm.reset.call(this);
- this._doReset();
- },
- /**
- * Updates this hasher with a message.
- *
- * @param {WordArray|string} messageUpdate The message to append.
- *
- * @return {Hasher} This hasher.
- *
- * @example
- *
- * hasher.update('message');
- * hasher.update(wordArray);
- */
- update: function(messageUpdate) {
- this._append(messageUpdate);
- this._process();
- return this;
- },
- /**
- * Finalizes the hash computation.
- * Note that the finalize operation is effectively a destructive, read-once operation.
- *
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
- *
- * @return {WordArray} The hash.
- *
- * @example
- *
- * var hash = hasher.finalize();
- * var hash = hasher.finalize('message');
- * var hash = hasher.finalize(wordArray);
- */
- finalize: function(messageUpdate) {
- if (messageUpdate) {
- this._append(messageUpdate);
- }
- var hash = this._doFinalize();
- return hash;
- },
- blockSize: 512 / 32,
- /**
- * Creates a shortcut function to a hasher's object interface.
- *
- * @param {Hasher} hasher The hasher to create a helper for.
- *
- * @return {Function} The shortcut function.
- *
- * @static
- *
- * @example
- *
- * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
- */
- _createHelper: function(hasher) {
- return function(message, cfg) {
- return new hasher.init(cfg).finalize(message);
- };
- },
- /**
- * Creates a shortcut function to the HMAC's object interface.
- *
- * @param {Hasher} hasher The hasher to use in this HMAC helper.
- *
- * @return {Function} The shortcut function.
- *
- * @static
- *
- * @example
- *
- * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
- */
- _createHmacHelper: function(hasher) {
- return function(message, key) {
- return new C_algo.HMAC.init(hasher, key).finalize(message);
- };
- }
- });
- var C_algo = C.algo = {};
- return C;
- }(Math);
- return CryptoJS;
- });
- })(core$1);
- return core$1.exports;
-}
-var x64Core$1 = { exports: {} };
-var x64Core = x64Core$1.exports;
-var hasRequiredX64Core;
-function requireX64Core() {
- if (hasRequiredX64Core) return x64Core$1.exports;
- hasRequiredX64Core = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(x64Core, function(CryptoJS) {
- (function(undefined$1) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var X32WordArray = C_lib.WordArray;
- var C_x64 = C.x64 = {};
- C_x64.Word = Base.extend({
- /**
- * Initializes a newly created 64-bit word.
- *
- * @param {number} high The high 32 bits.
- * @param {number} low The low 32 bits.
- *
- * @example
- *
- * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
- */
- init: function(high, low) {
- this.high = high;
- this.low = low;
- }
- /**
- * Bitwise NOTs this word.
- *
- * @return {X64Word} A new x64-Word object after negating.
- *
- * @example
- *
- * var negated = x64Word.not();
- */
- // not: function () {
- // var high = ~this.high;
- // var low = ~this.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Bitwise ANDs this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to AND with this word.
- *
- * @return {X64Word} A new x64-Word object after ANDing.
- *
- * @example
- *
- * var anded = x64Word.and(anotherX64Word);
- */
- // and: function (word) {
- // var high = this.high & word.high;
- // var low = this.low & word.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Bitwise ORs this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to OR with this word.
- *
- * @return {X64Word} A new x64-Word object after ORing.
- *
- * @example
- *
- * var ored = x64Word.or(anotherX64Word);
- */
- // or: function (word) {
- // var high = this.high | word.high;
- // var low = this.low | word.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Bitwise XORs this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to XOR with this word.
- *
- * @return {X64Word} A new x64-Word object after XORing.
- *
- * @example
- *
- * var xored = x64Word.xor(anotherX64Word);
- */
- // xor: function (word) {
- // var high = this.high ^ word.high;
- // var low = this.low ^ word.low;
- // return X64Word.create(high, low);
- // },
- /**
- * Shifts this word n bits to the left.
- *
- * @param {number} n The number of bits to shift.
- *
- * @return {X64Word} A new x64-Word object after shifting.
- *
- * @example
- *
- * var shifted = x64Word.shiftL(25);
- */
- // shiftL: function (n) {
- // if (n < 32) {
- // var high = (this.high << n) | (this.low >>> (32 - n));
- // var low = this.low << n;
- // } else {
- // var high = this.low << (n - 32);
- // var low = 0;
- // }
- // return X64Word.create(high, low);
- // },
- /**
- * Shifts this word n bits to the right.
- *
- * @param {number} n The number of bits to shift.
- *
- * @return {X64Word} A new x64-Word object after shifting.
- *
- * @example
- *
- * var shifted = x64Word.shiftR(7);
- */
- // shiftR: function (n) {
- // if (n < 32) {
- // var low = (this.low >>> n) | (this.high << (32 - n));
- // var high = this.high >>> n;
- // } else {
- // var low = this.high >>> (n - 32);
- // var high = 0;
- // }
- // return X64Word.create(high, low);
- // },
- /**
- * Rotates this word n bits to the left.
- *
- * @param {number} n The number of bits to rotate.
- *
- * @return {X64Word} A new x64-Word object after rotating.
- *
- * @example
- *
- * var rotated = x64Word.rotL(25);
- */
- // rotL: function (n) {
- // return this.shiftL(n).or(this.shiftR(64 - n));
- // },
- /**
- * Rotates this word n bits to the right.
- *
- * @param {number} n The number of bits to rotate.
- *
- * @return {X64Word} A new x64-Word object after rotating.
- *
- * @example
- *
- * var rotated = x64Word.rotR(7);
- */
- // rotR: function (n) {
- // return this.shiftR(n).or(this.shiftL(64 - n));
- // },
- /**
- * Adds this word with the passed word.
- *
- * @param {X64Word} word The x64-Word to add with this word.
- *
- * @return {X64Word} A new x64-Word object after adding.
- *
- * @example
- *
- * var added = x64Word.add(anotherX64Word);
- */
- // add: function (word) {
- // var low = (this.low + word.low) | 0;
- // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
- // var high = (this.high + word.high + carry) | 0;
- // return X64Word.create(high, low);
- // }
- });
- C_x64.WordArray = Base.extend({
- /**
- * Initializes a newly created word array.
- *
- * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
- *
- * @example
- *
- * var wordArray = CryptoJS.x64.WordArray.create();
- *
- * var wordArray = CryptoJS.x64.WordArray.create([
- * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
- * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
- * ]);
- *
- * var wordArray = CryptoJS.x64.WordArray.create([
- * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
- * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
- * ], 10);
- */
- init: function(words, sigBytes) {
- words = this.words = words || [];
- if (sigBytes != undefined$1) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 8;
- }
- },
- /**
- * Converts this 64-bit word array to a 32-bit word array.
- *
- * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
- *
- * @example
- *
- * var x32WordArray = x64WordArray.toX32();
- */
- toX32: function() {
- var x64Words = this.words;
- var x64WordsLength = x64Words.length;
- var x32Words = [];
- for (var i = 0; i < x64WordsLength; i++) {
- var x64Word = x64Words[i];
- x32Words.push(x64Word.high);
- x32Words.push(x64Word.low);
- }
- return X32WordArray.create(x32Words, this.sigBytes);
- },
- /**
- * Creates a copy of this word array.
- *
- * @return {X64WordArray} The clone.
- *
- * @example
- *
- * var clone = x64WordArray.clone();
- */
- clone: function() {
- var clone = Base.clone.call(this);
- var words = clone.words = this.words.slice(0);
- var wordsLength = words.length;
- for (var i = 0; i < wordsLength; i++) {
- words[i] = words[i].clone();
- }
- return clone;
- }
- });
- })();
- return CryptoJS;
- });
- })(x64Core$1);
- return x64Core$1.exports;
-}
-var libTypedarrays$1 = { exports: {} };
-var libTypedarrays = libTypedarrays$1.exports;
-var hasRequiredLibTypedarrays;
-function requireLibTypedarrays() {
- if (hasRequiredLibTypedarrays) return libTypedarrays$1.exports;
- hasRequiredLibTypedarrays = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(libTypedarrays, function(CryptoJS) {
- (function() {
- if (typeof ArrayBuffer != "function") {
- return;
- }
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var superInit = WordArray.init;
- var subInit = WordArray.init = function(typedArray) {
- if (typedArray instanceof ArrayBuffer) {
- typedArray = new Uint8Array(typedArray);
- }
- if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) {
- typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
- }
- if (typedArray instanceof Uint8Array) {
- var typedArrayByteLength = typedArray.byteLength;
- var words = [];
- for (var i = 0; i < typedArrayByteLength; i++) {
- words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
- }
- superInit.call(this, words, typedArrayByteLength);
- } else {
- superInit.apply(this, arguments);
- }
- };
- subInit.prototype = WordArray;
- })();
- return CryptoJS.lib.WordArray;
- });
- })(libTypedarrays$1);
- return libTypedarrays$1.exports;
-}
-var encUtf16$1 = { exports: {} };
-var encUtf16 = encUtf16$1.exports;
-var hasRequiredEncUtf16;
-function requireEncUtf16() {
- if (hasRequiredEncUtf16) return encUtf16$1.exports;
- hasRequiredEncUtf16 = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(encUtf16, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_enc = C.enc;
- C_enc.Utf16 = C_enc.Utf16BE = {
- /**
- * Converts a word array to a UTF-16 BE string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The UTF-16 BE string.
- *
- * @static
- *
- * @example
- *
- * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
- */
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var utf16Chars = [];
- for (var i = 0; i < sigBytes; i += 2) {
- var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 65535;
- utf16Chars.push(String.fromCharCode(codePoint));
- }
- return utf16Chars.join("");
- },
- /**
- * Converts a UTF-16 BE string to a word array.
- *
- * @param {string} utf16Str The UTF-16 BE string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
- */
- parse: function(utf16Str) {
- var utf16StrLength = utf16Str.length;
- var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
- }
- return WordArray.create(words, utf16StrLength * 2);
- }
- };
- C_enc.Utf16LE = {
- /**
- * Converts a word array to a UTF-16 LE string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The UTF-16 LE string.
- *
- * @static
- *
- * @example
- *
- * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
- */
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var utf16Chars = [];
- for (var i = 0; i < sigBytes; i += 2) {
- var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 65535);
- utf16Chars.push(String.fromCharCode(codePoint));
- }
- return utf16Chars.join("");
- },
- /**
- * Converts a UTF-16 LE string to a word array.
- *
- * @param {string} utf16Str The UTF-16 LE string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
- */
- parse: function(utf16Str) {
- var utf16StrLength = utf16Str.length;
- var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
- }
- return WordArray.create(words, utf16StrLength * 2);
- }
- };
- function swapEndian(word) {
- return word << 8 & 4278255360 | word >>> 8 & 16711935;
- }
- })();
- return CryptoJS.enc.Utf16;
- });
- })(encUtf16$1);
- return encUtf16$1.exports;
-}
-var encBase64$1 = { exports: {} };
-var encBase64 = encBase64$1.exports;
-var hasRequiredEncBase64;
-function requireEncBase64() {
- if (hasRequiredEncBase64) return encBase64$1.exports;
- hasRequiredEncBase64 = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(encBase64, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_enc = C.enc;
- C_enc.Base64 = {
- /**
- * Converts a word array to a Base64 string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @return {string} The Base64 string.
- *
- * @static
- *
- * @example
- *
- * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
- */
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var map = this._map;
- wordArray.clamp();
- var base64Chars = [];
- for (var i = 0; i < sigBytes; i += 3) {
- var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
- var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
- var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
- }
- }
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- while (base64Chars.length % 4) {
- base64Chars.push(paddingChar);
- }
- }
- return base64Chars.join("");
- },
- /**
- * Converts a Base64 string to a word array.
- *
- * @param {string} base64Str The Base64 string.
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Base64.parse(base64String);
- */
- parse: function(base64Str) {
- var base64StrLength = base64Str.length;
- var map = this._map;
- var reverseMap = this._reverseMap;
- if (!reverseMap) {
- reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
- }
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- var paddingIndex = base64Str.indexOf(paddingChar);
- if (paddingIndex !== -1) {
- base64StrLength = paddingIndex;
- }
- }
- return parseLoop(base64Str, base64StrLength, reverseMap);
- },
- _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
- };
- function parseLoop(base64Str, base64StrLength, reverseMap) {
- var words = [];
- var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
- }
- return WordArray.create(words, nBytes);
- }
- })();
- return CryptoJS.enc.Base64;
- });
- })(encBase64$1);
- return encBase64$1.exports;
-}
-var encBase64url$1 = { exports: {} };
-var encBase64url = encBase64url$1.exports;
-var hasRequiredEncBase64url;
-function requireEncBase64url() {
- if (hasRequiredEncBase64url) return encBase64url$1.exports;
- hasRequiredEncBase64url = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(encBase64url, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_enc = C.enc;
- C_enc.Base64url = {
- /**
- * Converts a word array to a Base64url string.
- *
- * @param {WordArray} wordArray The word array.
- *
- * @param {boolean} urlSafe Whether to use url safe
- *
- * @return {string} The Base64url string.
- *
- * @static
- *
- * @example
- *
- * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
- */
- stringify: function(wordArray, urlSafe) {
- if (urlSafe === void 0) {
- urlSafe = true;
- }
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var map = urlSafe ? this._safe_map : this._map;
- wordArray.clamp();
- var base64Chars = [];
- for (var i = 0; i < sigBytes; i += 3) {
- var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
- var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
- var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
- }
- }
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- while (base64Chars.length % 4) {
- base64Chars.push(paddingChar);
- }
- }
- return base64Chars.join("");
- },
- /**
- * Converts a Base64url string to a word array.
- *
- * @param {string} base64Str The Base64url string.
- *
- * @param {boolean} urlSafe Whether to use url safe
- *
- * @return {WordArray} The word array.
- *
- * @static
- *
- * @example
- *
- * var wordArray = CryptoJS.enc.Base64url.parse(base64String);
- */
- parse: function(base64Str, urlSafe) {
- if (urlSafe === void 0) {
- urlSafe = true;
- }
- var base64StrLength = base64Str.length;
- var map = urlSafe ? this._safe_map : this._map;
- var reverseMap = this._reverseMap;
- if (!reverseMap) {
- reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
- }
- var paddingChar = map.charAt(64);
- if (paddingChar) {
- var paddingIndex = base64Str.indexOf(paddingChar);
- if (paddingIndex !== -1) {
- base64StrLength = paddingIndex;
- }
- }
- return parseLoop(base64Str, base64StrLength, reverseMap);
- },
- _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
- _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
- };
- function parseLoop(base64Str, base64StrLength, reverseMap) {
- var words = [];
- var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
- }
- return WordArray.create(words, nBytes);
- }
- })();
- return CryptoJS.enc.Base64url;
- });
- })(encBase64url$1);
- return encBase64url$1.exports;
-}
-var md5$1 = { exports: {} };
-var md5 = md5$1.exports;
-var hasRequiredMd5;
-function requireMd5() {
- if (hasRequiredMd5) return md5$1.exports;
- hasRequiredMd5 = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(md5, function(CryptoJS) {
- (function(Math2) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- var T = [];
- (function() {
- for (var i = 0; i < 64; i++) {
- T[i] = Math2.abs(Math2.sin(i + 1)) * 4294967296 | 0;
- }
- })();
- var MD5 = C_algo.MD5 = Hasher.extend({
- _doReset: function() {
- this._hash = new WordArray.init([
- 1732584193,
- 4023233417,
- 2562383102,
- 271733878
- ]);
- },
- _doProcessBlock: function(M, offset) {
- for (var i = 0; i < 16; i++) {
- var offset_i = offset + i;
- var M_offset_i = M[offset_i];
- M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
- }
- var H = this._hash.words;
- var M_offset_0 = M[offset + 0];
- var M_offset_1 = M[offset + 1];
- var M_offset_2 = M[offset + 2];
- var M_offset_3 = M[offset + 3];
- var M_offset_4 = M[offset + 4];
- var M_offset_5 = M[offset + 5];
- var M_offset_6 = M[offset + 6];
- var M_offset_7 = M[offset + 7];
- var M_offset_8 = M[offset + 8];
- var M_offset_9 = M[offset + 9];
- var M_offset_10 = M[offset + 10];
- var M_offset_11 = M[offset + 11];
- var M_offset_12 = M[offset + 12];
- var M_offset_13 = M[offset + 13];
- var M_offset_14 = M[offset + 14];
- var M_offset_15 = M[offset + 15];
- var a = H[0];
- var b = H[1];
- var c = H[2];
- var d = H[3];
- a = FF(a, b, c, d, M_offset_0, 7, T[0]);
- d = FF(d, a, b, c, M_offset_1, 12, T[1]);
- c = FF(c, d, a, b, M_offset_2, 17, T[2]);
- b = FF(b, c, d, a, M_offset_3, 22, T[3]);
- a = FF(a, b, c, d, M_offset_4, 7, T[4]);
- d = FF(d, a, b, c, M_offset_5, 12, T[5]);
- c = FF(c, d, a, b, M_offset_6, 17, T[6]);
- b = FF(b, c, d, a, M_offset_7, 22, T[7]);
- a = FF(a, b, c, d, M_offset_8, 7, T[8]);
- d = FF(d, a, b, c, M_offset_9, 12, T[9]);
- c = FF(c, d, a, b, M_offset_10, 17, T[10]);
- b = FF(b, c, d, a, M_offset_11, 22, T[11]);
- a = FF(a, b, c, d, M_offset_12, 7, T[12]);
- d = FF(d, a, b, c, M_offset_13, 12, T[13]);
- c = FF(c, d, a, b, M_offset_14, 17, T[14]);
- b = FF(b, c, d, a, M_offset_15, 22, T[15]);
- a = GG(a, b, c, d, M_offset_1, 5, T[16]);
- d = GG(d, a, b, c, M_offset_6, 9, T[17]);
- c = GG(c, d, a, b, M_offset_11, 14, T[18]);
- b = GG(b, c, d, a, M_offset_0, 20, T[19]);
- a = GG(a, b, c, d, M_offset_5, 5, T[20]);
- d = GG(d, a, b, c, M_offset_10, 9, T[21]);
- c = GG(c, d, a, b, M_offset_15, 14, T[22]);
- b = GG(b, c, d, a, M_offset_4, 20, T[23]);
- a = GG(a, b, c, d, M_offset_9, 5, T[24]);
- d = GG(d, a, b, c, M_offset_14, 9, T[25]);
- c = GG(c, d, a, b, M_offset_3, 14, T[26]);
- b = GG(b, c, d, a, M_offset_8, 20, T[27]);
- a = GG(a, b, c, d, M_offset_13, 5, T[28]);
- d = GG(d, a, b, c, M_offset_2, 9, T[29]);
- c = GG(c, d, a, b, M_offset_7, 14, T[30]);
- b = GG(b, c, d, a, M_offset_12, 20, T[31]);
- a = HH(a, b, c, d, M_offset_5, 4, T[32]);
- d = HH(d, a, b, c, M_offset_8, 11, T[33]);
- c = HH(c, d, a, b, M_offset_11, 16, T[34]);
- b = HH(b, c, d, a, M_offset_14, 23, T[35]);
- a = HH(a, b, c, d, M_offset_1, 4, T[36]);
- d = HH(d, a, b, c, M_offset_4, 11, T[37]);
- c = HH(c, d, a, b, M_offset_7, 16, T[38]);
- b = HH(b, c, d, a, M_offset_10, 23, T[39]);
- a = HH(a, b, c, d, M_offset_13, 4, T[40]);
- d = HH(d, a, b, c, M_offset_0, 11, T[41]);
- c = HH(c, d, a, b, M_offset_3, 16, T[42]);
- b = HH(b, c, d, a, M_offset_6, 23, T[43]);
- a = HH(a, b, c, d, M_offset_9, 4, T[44]);
- d = HH(d, a, b, c, M_offset_12, 11, T[45]);
- c = HH(c, d, a, b, M_offset_15, 16, T[46]);
- b = HH(b, c, d, a, M_offset_2, 23, T[47]);
- a = II(a, b, c, d, M_offset_0, 6, T[48]);
- d = II(d, a, b, c, M_offset_7, 10, T[49]);
- c = II(c, d, a, b, M_offset_14, 15, T[50]);
- b = II(b, c, d, a, M_offset_5, 21, T[51]);
- a = II(a, b, c, d, M_offset_12, 6, T[52]);
- d = II(d, a, b, c, M_offset_3, 10, T[53]);
- c = II(c, d, a, b, M_offset_10, 15, T[54]);
- b = II(b, c, d, a, M_offset_1, 21, T[55]);
- a = II(a, b, c, d, M_offset_8, 6, T[56]);
- d = II(d, a, b, c, M_offset_15, 10, T[57]);
- c = II(c, d, a, b, M_offset_6, 15, T[58]);
- b = II(b, c, d, a, M_offset_13, 21, T[59]);
- a = II(a, b, c, d, M_offset_4, 6, T[60]);
- d = II(d, a, b, c, M_offset_11, 10, T[61]);
- c = II(c, d, a, b, M_offset_2, 15, T[62]);
- b = II(b, c, d, a, M_offset_9, 21, T[63]);
- H[0] = H[0] + a | 0;
- H[1] = H[1] + b | 0;
- H[2] = H[2] + c | 0;
- H[3] = H[3] + d | 0;
- },
- _doFinalize: function() {
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
- var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296);
- var nBitsTotalL = nBitsTotal;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360;
- data.sigBytes = (dataWords.length + 1) * 4;
- this._process();
- var hash = this._hash;
- var H = hash.words;
- for (var i = 0; i < 4; i++) {
- var H_i = H[i];
- H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
- }
- return hash;
- },
- clone: function() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- }
- });
- function FF(a, b, c, d, x, s, t) {
- var n = a + (b & c | ~b & d) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- function GG(a, b, c, d, x, s, t) {
- var n = a + (b & d | c & ~d) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- function HH(a, b, c, d, x, s, t) {
- var n = a + (b ^ c ^ d) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- function II(a, b, c, d, x, s, t) {
- var n = a + (c ^ (b | ~d)) + x + t;
- return (n << s | n >>> 32 - s) + b;
- }
- C.MD5 = Hasher._createHelper(MD5);
- C.HmacMD5 = Hasher._createHmacHelper(MD5);
- })(Math);
- return CryptoJS.MD5;
- });
- })(md5$1);
- return md5$1.exports;
-}
-var sha1$1 = { exports: {} };
-var sha1 = sha1$1.exports;
-var hasRequiredSha1;
-function requireSha1() {
- if (hasRequiredSha1) return sha1$1.exports;
- hasRequiredSha1 = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(sha1, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- var W = [];
- var SHA1 = C_algo.SHA1 = Hasher.extend({
- _doReset: function() {
- this._hash = new WordArray.init([
- 1732584193,
- 4023233417,
- 2562383102,
- 271733878,
- 3285377520
- ]);
- },
- _doProcessBlock: function(M, offset) {
- var H = this._hash.words;
- var a = H[0];
- var b = H[1];
- var c = H[2];
- var d = H[3];
- var e = H[4];
- for (var i = 0; i < 80; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
- var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
- W[i] = n << 1 | n >>> 31;
- }
- var t = (a << 5 | a >>> 27) + e + W[i];
- if (i < 20) {
- t += (b & c | ~b & d) + 1518500249;
- } else if (i < 40) {
- t += (b ^ c ^ d) + 1859775393;
- } else if (i < 60) {
- t += (b & c | b & d | c & d) - 1894007588;
- } else {
- t += (b ^ c ^ d) - 899497514;
- }
- e = d;
- d = c;
- c = b << 30 | b >>> 2;
- b = a;
- a = t;
- }
- H[0] = H[0] + a | 0;
- H[1] = H[1] + b | 0;
- H[2] = H[2] + c | 0;
- H[3] = H[3] + d | 0;
- H[4] = H[4] + e | 0;
- },
- _doFinalize: function() {
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296);
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
- data.sigBytes = dataWords.length * 4;
- this._process();
- return this._hash;
- },
- clone: function() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- }
- });
- C.SHA1 = Hasher._createHelper(SHA1);
- C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
- })();
- return CryptoJS.SHA1;
- });
- })(sha1$1);
- return sha1$1.exports;
-}
-var sha256$1 = { exports: {} };
-var sha256 = sha256$1.exports;
-var hasRequiredSha256;
-function requireSha256() {
- if (hasRequiredSha256) return sha256$1.exports;
- hasRequiredSha256 = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(sha256, function(CryptoJS) {
- (function(Math2) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- var H = [];
- var K = [];
- (function() {
- function isPrime(n2) {
- var sqrtN = Math2.sqrt(n2);
- for (var factor = 2; factor <= sqrtN; factor++) {
- if (!(n2 % factor)) {
- return false;
- }
- }
- return true;
- }
- function getFractionalBits(n2) {
- return (n2 - (n2 | 0)) * 4294967296 | 0;
- }
- var n = 2;
- var nPrime = 0;
- while (nPrime < 64) {
- if (isPrime(n)) {
- if (nPrime < 8) {
- H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
- }
- K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
- nPrime++;
- }
- n++;
- }
- })();
- var W = [];
- var SHA256 = C_algo.SHA256 = Hasher.extend({
- _doReset: function() {
- this._hash = new WordArray.init(H.slice(0));
- },
- _doProcessBlock: function(M, offset) {
- var H2 = this._hash.words;
- var a = H2[0];
- var b = H2[1];
- var c = H2[2];
- var d = H2[3];
- var e = H2[4];
- var f = H2[5];
- var g = H2[6];
- var h2 = H2[7];
- for (var i = 0; i < 64; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
- var gamma0x = W[i - 15];
- var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
- var gamma1x = W[i - 2];
- var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
- W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
- }
- var ch = e & f ^ ~e & g;
- var maj = a & b ^ a & c ^ b & c;
- var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
- var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
- var t1 = h2 + sigma1 + ch + K[i] + W[i];
- var t2 = sigma0 + maj;
- h2 = g;
- g = f;
- f = e;
- e = d + t1 | 0;
- d = c;
- c = b;
- b = a;
- a = t1 + t2 | 0;
- }
- H2[0] = H2[0] + a | 0;
- H2[1] = H2[1] + b | 0;
- H2[2] = H2[2] + c | 0;
- H2[3] = H2[3] + d | 0;
- H2[4] = H2[4] + e | 0;
- H2[5] = H2[5] + f | 0;
- H2[6] = H2[6] + g | 0;
- H2[7] = H2[7] + h2 | 0;
- },
- _doFinalize: function() {
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
- data.sigBytes = dataWords.length * 4;
- this._process();
- return this._hash;
- },
- clone: function() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- }
- });
- C.SHA256 = Hasher._createHelper(SHA256);
- C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
- })(Math);
- return CryptoJS.SHA256;
- });
- })(sha256$1);
- return sha256$1.exports;
-}
-var sha224$1 = { exports: {} };
-var sha224 = sha224$1.exports;
-var hasRequiredSha224;
-function requireSha224() {
- if (hasRequiredSha224) return sha224$1.exports;
- hasRequiredSha224 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireSha256());
- }
- })(sha224, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var C_algo = C.algo;
- var SHA256 = C_algo.SHA256;
- var SHA224 = C_algo.SHA224 = SHA256.extend({
- _doReset: function() {
- this._hash = new WordArray.init([
- 3238371032,
- 914150663,
- 812702999,
- 4144912697,
- 4290775857,
- 1750603025,
- 1694076839,
- 3204075428
- ]);
- },
- _doFinalize: function() {
- var hash = SHA256._doFinalize.call(this);
- hash.sigBytes -= 4;
- return hash;
- }
- });
- C.SHA224 = SHA256._createHelper(SHA224);
- C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
- })();
- return CryptoJS.SHA224;
- });
- })(sha224$1);
- return sha224$1.exports;
-}
-var sha512$1 = { exports: {} };
-var sha512 = sha512$1.exports;
-var hasRequiredSha512;
-function requireSha512() {
- if (hasRequiredSha512) return sha512$1.exports;
- hasRequiredSha512 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireX64Core());
- }
- })(sha512, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var Hasher = C_lib.Hasher;
- var C_x64 = C.x64;
- var X64Word = C_x64.Word;
- var X64WordArray = C_x64.WordArray;
- var C_algo = C.algo;
- function X64Word_create() {
- return X64Word.create.apply(X64Word, arguments);
- }
- var K = [
- X64Word_create(1116352408, 3609767458),
- X64Word_create(1899447441, 602891725),
- X64Word_create(3049323471, 3964484399),
- X64Word_create(3921009573, 2173295548),
- X64Word_create(961987163, 4081628472),
- X64Word_create(1508970993, 3053834265),
- X64Word_create(2453635748, 2937671579),
- X64Word_create(2870763221, 3664609560),
- X64Word_create(3624381080, 2734883394),
- X64Word_create(310598401, 1164996542),
- X64Word_create(607225278, 1323610764),
- X64Word_create(1426881987, 3590304994),
- X64Word_create(1925078388, 4068182383),
- X64Word_create(2162078206, 991336113),
- X64Word_create(2614888103, 633803317),
- X64Word_create(3248222580, 3479774868),
- X64Word_create(3835390401, 2666613458),
- X64Word_create(4022224774, 944711139),
- X64Word_create(264347078, 2341262773),
- X64Word_create(604807628, 2007800933),
- X64Word_create(770255983, 1495990901),
- X64Word_create(1249150122, 1856431235),
- X64Word_create(1555081692, 3175218132),
- X64Word_create(1996064986, 2198950837),
- X64Word_create(2554220882, 3999719339),
- X64Word_create(2821834349, 766784016),
- X64Word_create(2952996808, 2566594879),
- X64Word_create(3210313671, 3203337956),
- X64Word_create(3336571891, 1034457026),
- X64Word_create(3584528711, 2466948901),
- X64Word_create(113926993, 3758326383),
- X64Word_create(338241895, 168717936),
- X64Word_create(666307205, 1188179964),
- X64Word_create(773529912, 1546045734),
- X64Word_create(1294757372, 1522805485),
- X64Word_create(1396182291, 2643833823),
- X64Word_create(1695183700, 2343527390),
- X64Word_create(1986661051, 1014477480),
- X64Word_create(2177026350, 1206759142),
- X64Word_create(2456956037, 344077627),
- X64Word_create(2730485921, 1290863460),
- X64Word_create(2820302411, 3158454273),
- X64Word_create(3259730800, 3505952657),
- X64Word_create(3345764771, 106217008),
- X64Word_create(3516065817, 3606008344),
- X64Word_create(3600352804, 1432725776),
- X64Word_create(4094571909, 1467031594),
- X64Word_create(275423344, 851169720),
- X64Word_create(430227734, 3100823752),
- X64Word_create(506948616, 1363258195),
- X64Word_create(659060556, 3750685593),
- X64Word_create(883997877, 3785050280),
- X64Word_create(958139571, 3318307427),
- X64Word_create(1322822218, 3812723403),
- X64Word_create(1537002063, 2003034995),
- X64Word_create(1747873779, 3602036899),
- X64Word_create(1955562222, 1575990012),
- X64Word_create(2024104815, 1125592928),
- X64Word_create(2227730452, 2716904306),
- X64Word_create(2361852424, 442776044),
- X64Word_create(2428436474, 593698344),
- X64Word_create(2756734187, 3733110249),
- X64Word_create(3204031479, 2999351573),
- X64Word_create(3329325298, 3815920427),
- X64Word_create(3391569614, 3928383900),
- X64Word_create(3515267271, 566280711),
- X64Word_create(3940187606, 3454069534),
- X64Word_create(4118630271, 4000239992),
- X64Word_create(116418474, 1914138554),
- X64Word_create(174292421, 2731055270),
- X64Word_create(289380356, 3203993006),
- X64Word_create(460393269, 320620315),
- X64Word_create(685471733, 587496836),
- X64Word_create(852142971, 1086792851),
- X64Word_create(1017036298, 365543100),
- X64Word_create(1126000580, 2618297676),
- X64Word_create(1288033470, 3409855158),
- X64Word_create(1501505948, 4234509866),
- X64Word_create(1607167915, 987167468),
- X64Word_create(1816402316, 1246189591)
- ];
- var W = [];
- (function() {
- for (var i = 0; i < 80; i++) {
- W[i] = X64Word_create();
- }
- })();
- var SHA512 = C_algo.SHA512 = Hasher.extend({
- _doReset: function() {
- this._hash = new X64WordArray.init([
- new X64Word.init(1779033703, 4089235720),
- new X64Word.init(3144134277, 2227873595),
- new X64Word.init(1013904242, 4271175723),
- new X64Word.init(2773480762, 1595750129),
- new X64Word.init(1359893119, 2917565137),
- new X64Word.init(2600822924, 725511199),
- new X64Word.init(528734635, 4215389547),
- new X64Word.init(1541459225, 327033209)
- ]);
- },
- _doProcessBlock: function(M, offset) {
- var H = this._hash.words;
- var H0 = H[0];
- var H1 = H[1];
- var H2 = H[2];
- var H3 = H[3];
- var H4 = H[4];
- var H5 = H[5];
- var H6 = H[6];
- var H7 = H[7];
- var H0h = H0.high;
- var H0l = H0.low;
- var H1h = H1.high;
- var H1l = H1.low;
- var H2h = H2.high;
- var H2l = H2.low;
- var H3h = H3.high;
- var H3l = H3.low;
- var H4h = H4.high;
- var H4l = H4.low;
- var H5h = H5.high;
- var H5l = H5.low;
- var H6h = H6.high;
- var H6l = H6.low;
- var H7h = H7.high;
- var H7l = H7.low;
- var ah = H0h;
- var al = H0l;
- var bh = H1h;
- var bl = H1l;
- var ch = H2h;
- var cl = H2l;
- var dh = H3h;
- var dl = H3l;
- var eh = H4h;
- var el = H4l;
- var fh = H5h;
- var fl = H5l;
- var gh = H6h;
- var gl = H6l;
- var hh = H7h;
- var hl = H7l;
- for (var i = 0; i < 80; i++) {
- var Wil;
- var Wih;
- var Wi = W[i];
- if (i < 16) {
- Wih = Wi.high = M[offset + i * 2] | 0;
- Wil = Wi.low = M[offset + i * 2 + 1] | 0;
- } else {
- var gamma0x = W[i - 15];
- var gamma0xh = gamma0x.high;
- var gamma0xl = gamma0x.low;
- var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;
- var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25);
- var gamma1x = W[i - 2];
- var gamma1xh = gamma1x.high;
- var gamma1xl = gamma1x.low;
- var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;
- var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26);
- var Wi7 = W[i - 7];
- var Wi7h = Wi7.high;
- var Wi7l = Wi7.low;
- var Wi16 = W[i - 16];
- var Wi16h = Wi16.high;
- var Wi16l = Wi16.low;
- Wil = gamma0l + Wi7l;
- Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);
- Wil = Wil + gamma1l;
- Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);
- Wil = Wil + Wi16l;
- Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);
- Wi.high = Wih;
- Wi.low = Wil;
- }
- var chh = eh & fh ^ ~eh & gh;
- var chl = el & fl ^ ~el & gl;
- var majh = ah & bh ^ ah & ch ^ bh & ch;
- var majl = al & bl ^ al & cl ^ bl & cl;
- var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);
- var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);
- var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);
- var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9);
- var Ki = K[i];
- var Kih = Ki.high;
- var Kil = Ki.low;
- var t1l = hl + sigma1l;
- var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);
- var t1l = t1l + chl;
- var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);
- var t1l = t1l + Kil;
- var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);
- var t1l = t1l + Wil;
- var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0);
- var t2l = sigma0l + majl;
- var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0);
- hh = gh;
- hl = gl;
- gh = fh;
- gl = fl;
- fh = eh;
- fl = el;
- el = dl + t1l | 0;
- eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;
- dh = ch;
- dl = cl;
- ch = bh;
- cl = bl;
- bh = ah;
- bl = al;
- al = t1l + t2l | 0;
- ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;
- }
- H0l = H0.low = H0l + al;
- H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);
- H1l = H1.low = H1l + bl;
- H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);
- H2l = H2.low = H2l + cl;
- H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);
- H3l = H3.low = H3l + dl;
- H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);
- H4l = H4.low = H4l + el;
- H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);
- H5l = H5.low = H5l + fl;
- H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);
- H6l = H6.low = H6l + gl;
- H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);
- H7l = H7.low = H7l + hl;
- H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);
- },
- _doFinalize: function() {
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296);
- dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
- data.sigBytes = dataWords.length * 4;
- this._process();
- var hash = this._hash.toX32();
- return hash;
- },
- clone: function() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- },
- blockSize: 1024 / 32
- });
- C.SHA512 = Hasher._createHelper(SHA512);
- C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
- })();
- return CryptoJS.SHA512;
- });
- })(sha512$1);
- return sha512$1.exports;
-}
-var sha384$1 = { exports: {} };
-var sha384 = sha384$1.exports;
-var hasRequiredSha384;
-function requireSha384() {
- if (hasRequiredSha384) return sha384$1.exports;
- hasRequiredSha384 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireX64Core(), requireSha512());
- }
- })(sha384, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_x64 = C.x64;
- var X64Word = C_x64.Word;
- var X64WordArray = C_x64.WordArray;
- var C_algo = C.algo;
- var SHA512 = C_algo.SHA512;
- var SHA384 = C_algo.SHA384 = SHA512.extend({
- _doReset: function() {
- this._hash = new X64WordArray.init([
- new X64Word.init(3418070365, 3238371032),
- new X64Word.init(1654270250, 914150663),
- new X64Word.init(2438529370, 812702999),
- new X64Word.init(355462360, 4144912697),
- new X64Word.init(1731405415, 4290775857),
- new X64Word.init(2394180231, 1750603025),
- new X64Word.init(3675008525, 1694076839),
- new X64Word.init(1203062813, 3204075428)
- ]);
- },
- _doFinalize: function() {
- var hash = SHA512._doFinalize.call(this);
- hash.sigBytes -= 16;
- return hash;
- }
- });
- C.SHA384 = SHA512._createHelper(SHA384);
- C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
- })();
- return CryptoJS.SHA384;
- });
- })(sha384$1);
- return sha384$1.exports;
-}
-var sha3$1 = { exports: {} };
-var sha3 = sha3$1.exports;
-var hasRequiredSha3;
-function requireSha3() {
- if (hasRequiredSha3) return sha3$1.exports;
- hasRequiredSha3 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireX64Core());
- }
- })(sha3, function(CryptoJS) {
- (function(Math2) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_x64 = C.x64;
- var X64Word = C_x64.Word;
- var C_algo = C.algo;
- var RHO_OFFSETS = [];
- var PI_INDEXES = [];
- var ROUND_CONSTANTS = [];
- (function() {
- var x = 1, y = 0;
- for (var t = 0; t < 24; t++) {
- RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64;
- var newX = y % 5;
- var newY = (2 * x + 3 * y) % 5;
- x = newX;
- y = newY;
- }
- for (var x = 0; x < 5; x++) {
- for (var y = 0; y < 5; y++) {
- PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5;
- }
- }
- var LFSR = 1;
- for (var i = 0; i < 24; i++) {
- var roundConstantMsw = 0;
- var roundConstantLsw = 0;
- for (var j = 0; j < 7; j++) {
- if (LFSR & 1) {
- var bitPosition = (1 << j) - 1;
- if (bitPosition < 32) {
- roundConstantLsw ^= 1 << bitPosition;
- } else {
- roundConstantMsw ^= 1 << bitPosition - 32;
- }
- }
- if (LFSR & 128) {
- LFSR = LFSR << 1 ^ 113;
- } else {
- LFSR <<= 1;
- }
- }
- ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
- }
- })();
- var T = [];
- (function() {
- for (var i = 0; i < 25; i++) {
- T[i] = X64Word.create();
- }
- })();
- var SHA3 = C_algo.SHA3 = Hasher.extend({
- /**
- * Configuration options.
- *
- * @property {number} outputLength
- * The desired number of bits in the output hash.
- * Only values permitted are: 224, 256, 384, 512.
- * Default: 512
- */
- cfg: Hasher.cfg.extend({
- outputLength: 512
- }),
- _doReset: function() {
- var state = this._state = [];
- for (var i = 0; i < 25; i++) {
- state[i] = new X64Word.init();
- }
- this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
- },
- _doProcessBlock: function(M, offset) {
- var state = this._state;
- var nBlockSizeLanes = this.blockSize / 2;
- for (var i = 0; i < nBlockSizeLanes; i++) {
- var M2i = M[offset + 2 * i];
- var M2i1 = M[offset + 2 * i + 1];
- M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360;
- M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360;
- var lane = state[i];
- lane.high ^= M2i1;
- lane.low ^= M2i;
- }
- for (var round = 0; round < 24; round++) {
- for (var x = 0; x < 5; x++) {
- var tMsw = 0, tLsw = 0;
- for (var y = 0; y < 5; y++) {
- var lane = state[x + 5 * y];
- tMsw ^= lane.high;
- tLsw ^= lane.low;
- }
- var Tx = T[x];
- Tx.high = tMsw;
- Tx.low = tLsw;
- }
- for (var x = 0; x < 5; x++) {
- var Tx4 = T[(x + 4) % 5];
- var Tx1 = T[(x + 1) % 5];
- var Tx1Msw = Tx1.high;
- var Tx1Lsw = Tx1.low;
- var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31);
- var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31);
- for (var y = 0; y < 5; y++) {
- var lane = state[x + 5 * y];
- lane.high ^= tMsw;
- lane.low ^= tLsw;
- }
- }
- for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
- var tMsw;
- var tLsw;
- var lane = state[laneIndex];
- var laneMsw = lane.high;
- var laneLsw = lane.low;
- var rhoOffset = RHO_OFFSETS[laneIndex];
- if (rhoOffset < 32) {
- tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
- tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
- } else {
- tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
- tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
- }
- var TPiLane = T[PI_INDEXES[laneIndex]];
- TPiLane.high = tMsw;
- TPiLane.low = tLsw;
- }
- var T0 = T[0];
- var state0 = state[0];
- T0.high = state0.high;
- T0.low = state0.low;
- for (var x = 0; x < 5; x++) {
- for (var y = 0; y < 5; y++) {
- var laneIndex = x + 5 * y;
- var lane = state[laneIndex];
- var TLane = T[laneIndex];
- var Tx1Lane = T[(x + 1) % 5 + 5 * y];
- var Tx2Lane = T[(x + 2) % 5 + 5 * y];
- lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high;
- lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low;
- }
- }
- var lane = state[0];
- var roundConstant = ROUND_CONSTANTS[round];
- lane.high ^= roundConstant.high;
- lane.low ^= roundConstant.low;
- }
- },
- _doFinalize: function() {
- var data = this._data;
- var dataWords = data.words;
- this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- var blockSizeBits = this.blockSize * 32;
- dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32;
- dataWords[(Math2.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128;
- data.sigBytes = dataWords.length * 4;
- this._process();
- var state = this._state;
- var outputLengthBytes = this.cfg.outputLength / 8;
- var outputLengthLanes = outputLengthBytes / 8;
- var hashWords = [];
- for (var i = 0; i < outputLengthLanes; i++) {
- var lane = state[i];
- var laneMsw = lane.high;
- var laneLsw = lane.low;
- laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360;
- laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360;
- hashWords.push(laneLsw);
- hashWords.push(laneMsw);
- }
- return new WordArray.init(hashWords, outputLengthBytes);
- },
- clone: function() {
- var clone = Hasher.clone.call(this);
- var state = clone._state = this._state.slice(0);
- for (var i = 0; i < 25; i++) {
- state[i] = state[i].clone();
- }
- return clone;
- }
- });
- C.SHA3 = Hasher._createHelper(SHA3);
- C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
- })(Math);
- return CryptoJS.SHA3;
- });
- })(sha3$1);
- return sha3$1.exports;
-}
-var ripemd160$1 = { exports: {} };
-var ripemd160 = ripemd160$1.exports;
-var hasRequiredRipemd160;
-function requireRipemd160() {
- if (hasRequiredRipemd160) return ripemd160$1.exports;
- hasRequiredRipemd160 = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(ripemd160, function(CryptoJS) {
- /** @preserve
- (c) 2012 by Cédric Mesnil. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- (function(Math2) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var Hasher = C_lib.Hasher;
- var C_algo = C.algo;
- var _zl = WordArray.create([
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 7,
- 4,
- 13,
- 1,
- 10,
- 6,
- 15,
- 3,
- 12,
- 0,
- 9,
- 5,
- 2,
- 14,
- 11,
- 8,
- 3,
- 10,
- 14,
- 4,
- 9,
- 15,
- 8,
- 1,
- 2,
- 7,
- 0,
- 6,
- 13,
- 11,
- 5,
- 12,
- 1,
- 9,
- 11,
- 10,
- 0,
- 8,
- 12,
- 4,
- 13,
- 3,
- 7,
- 15,
- 14,
- 5,
- 6,
- 2,
- 4,
- 0,
- 5,
- 9,
- 7,
- 12,
- 2,
- 10,
- 14,
- 1,
- 3,
- 8,
- 11,
- 6,
- 15,
- 13
- ]);
- var _zr = WordArray.create([
- 5,
- 14,
- 7,
- 0,
- 9,
- 2,
- 11,
- 4,
- 13,
- 6,
- 15,
- 8,
- 1,
- 10,
- 3,
- 12,
- 6,
- 11,
- 3,
- 7,
- 0,
- 13,
- 5,
- 10,
- 14,
- 15,
- 8,
- 12,
- 4,
- 9,
- 1,
- 2,
- 15,
- 5,
- 1,
- 3,
- 7,
- 14,
- 6,
- 9,
- 11,
- 8,
- 12,
- 2,
- 10,
- 0,
- 4,
- 13,
- 8,
- 6,
- 4,
- 1,
- 3,
- 11,
- 15,
- 0,
- 5,
- 12,
- 2,
- 13,
- 9,
- 7,
- 10,
- 14,
- 12,
- 15,
- 10,
- 4,
- 1,
- 5,
- 8,
- 7,
- 6,
- 2,
- 13,
- 14,
- 0,
- 3,
- 9,
- 11
- ]);
- var _sl = WordArray.create([
- 11,
- 14,
- 15,
- 12,
- 5,
- 8,
- 7,
- 9,
- 11,
- 13,
- 14,
- 15,
- 6,
- 7,
- 9,
- 8,
- 7,
- 6,
- 8,
- 13,
- 11,
- 9,
- 7,
- 15,
- 7,
- 12,
- 15,
- 9,
- 11,
- 7,
- 13,
- 12,
- 11,
- 13,
- 6,
- 7,
- 14,
- 9,
- 13,
- 15,
- 14,
- 8,
- 13,
- 6,
- 5,
- 12,
- 7,
- 5,
- 11,
- 12,
- 14,
- 15,
- 14,
- 15,
- 9,
- 8,
- 9,
- 14,
- 5,
- 6,
- 8,
- 6,
- 5,
- 12,
- 9,
- 15,
- 5,
- 11,
- 6,
- 8,
- 13,
- 12,
- 5,
- 12,
- 13,
- 14,
- 11,
- 8,
- 5,
- 6
- ]);
- var _sr = WordArray.create([
- 8,
- 9,
- 9,
- 11,
- 13,
- 15,
- 15,
- 5,
- 7,
- 7,
- 8,
- 11,
- 14,
- 14,
- 12,
- 6,
- 9,
- 13,
- 15,
- 7,
- 12,
- 8,
- 9,
- 11,
- 7,
- 7,
- 12,
- 7,
- 6,
- 15,
- 13,
- 11,
- 9,
- 7,
- 15,
- 11,
- 8,
- 6,
- 6,
- 14,
- 12,
- 13,
- 5,
- 14,
- 13,
- 13,
- 7,
- 5,
- 15,
- 5,
- 8,
- 11,
- 14,
- 14,
- 6,
- 14,
- 6,
- 9,
- 12,
- 9,
- 12,
- 5,
- 15,
- 8,
- 8,
- 5,
- 12,
- 9,
- 12,
- 5,
- 14,
- 6,
- 8,
- 13,
- 6,
- 5,
- 15,
- 13,
- 11,
- 11
- ]);
- var _hl = WordArray.create([0, 1518500249, 1859775393, 2400959708, 2840853838]);
- var _hr = WordArray.create([1352829926, 1548603684, 1836072691, 2053994217, 0]);
- var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
- _doReset: function() {
- this._hash = WordArray.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
- },
- _doProcessBlock: function(M, offset) {
- for (var i = 0; i < 16; i++) {
- var offset_i = offset + i;
- var M_offset_i = M[offset_i];
- M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
- }
- var H = this._hash.words;
- var hl = _hl.words;
- var hr = _hr.words;
- var zl = _zl.words;
- var zr = _zr.words;
- var sl = _sl.words;
- var sr = _sr.words;
- var al, bl, cl, dl, el;
- var ar, br, cr, dr, er;
- ar = al = H[0];
- br = bl = H[1];
- cr = cl = H[2];
- dr = dl = H[3];
- er = el = H[4];
- var t;
- for (var i = 0; i < 80; i += 1) {
- t = al + M[offset + zl[i]] | 0;
- if (i < 16) {
- t += f1(bl, cl, dl) + hl[0];
- } else if (i < 32) {
- t += f2(bl, cl, dl) + hl[1];
- } else if (i < 48) {
- t += f3(bl, cl, dl) + hl[2];
- } else if (i < 64) {
- t += f4(bl, cl, dl) + hl[3];
- } else {
- t += f5(bl, cl, dl) + hl[4];
- }
- t = t | 0;
- t = rotl(t, sl[i]);
- t = t + el | 0;
- al = el;
- el = dl;
- dl = rotl(cl, 10);
- cl = bl;
- bl = t;
- t = ar + M[offset + zr[i]] | 0;
- if (i < 16) {
- t += f5(br, cr, dr) + hr[0];
- } else if (i < 32) {
- t += f4(br, cr, dr) + hr[1];
- } else if (i < 48) {
- t += f3(br, cr, dr) + hr[2];
- } else if (i < 64) {
- t += f2(br, cr, dr) + hr[3];
- } else {
- t += f1(br, cr, dr) + hr[4];
- }
- t = t | 0;
- t = rotl(t, sr[i]);
- t = t + er | 0;
- ar = er;
- er = dr;
- dr = rotl(cr, 10);
- cr = br;
- br = t;
- }
- t = H[1] + cl + dr | 0;
- H[1] = H[2] + dl + er | 0;
- H[2] = H[3] + el + ar | 0;
- H[3] = H[4] + al + br | 0;
- H[4] = H[0] + bl + cr | 0;
- H[0] = t;
- },
- _doFinalize: function() {
- var data = this._data;
- var dataWords = data.words;
- var nBitsTotal = this._nDataBytes * 8;
- var nBitsLeft = data.sigBytes * 8;
- dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360;
- data.sigBytes = (dataWords.length + 1) * 4;
- this._process();
- var hash = this._hash;
- var H = hash.words;
- for (var i = 0; i < 5; i++) {
- var H_i = H[i];
- H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
- }
- return hash;
- },
- clone: function() {
- var clone = Hasher.clone.call(this);
- clone._hash = this._hash.clone();
- return clone;
- }
- });
- function f1(x, y, z) {
- return x ^ y ^ z;
- }
- function f2(x, y, z) {
- return x & y | ~x & z;
- }
- function f3(x, y, z) {
- return (x | ~y) ^ z;
- }
- function f4(x, y, z) {
- return x & z | y & ~z;
- }
- function f5(x, y, z) {
- return x ^ (y | ~z);
- }
- function rotl(x, n) {
- return x << n | x >>> 32 - n;
- }
- C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
- C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
- })();
- return CryptoJS.RIPEMD160;
- });
- })(ripemd160$1);
- return ripemd160$1.exports;
-}
-var hmac$1 = { exports: {} };
-var hmac = hmac$1.exports;
-var hasRequiredHmac;
-function requireHmac() {
- if (hasRequiredHmac) return hmac$1.exports;
- hasRequiredHmac = 1;
- (function(module, exports) {
- (function(root, factory) {
- {
- module.exports = factory(requireCore());
- }
- })(hmac, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var C_enc = C.enc;
- var Utf8 = C_enc.Utf8;
- var C_algo = C.algo;
- C_algo.HMAC = Base.extend({
- /**
- * Initializes a newly created HMAC.
- *
- * @param {Hasher} hasher The hash algorithm to use.
- * @param {WordArray|string} key The secret key.
- *
- * @example
- *
- * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
- */
- init: function(hasher, key) {
- hasher = this._hasher = new hasher.init();
- if (typeof key == "string") {
- key = Utf8.parse(key);
- }
- var hasherBlockSize = hasher.blockSize;
- var hasherBlockSizeBytes = hasherBlockSize * 4;
- if (key.sigBytes > hasherBlockSizeBytes) {
- key = hasher.finalize(key);
- }
- key.clamp();
- var oKey = this._oKey = key.clone();
- var iKey = this._iKey = key.clone();
- var oKeyWords = oKey.words;
- var iKeyWords = iKey.words;
- for (var i = 0; i < hasherBlockSize; i++) {
- oKeyWords[i] ^= 1549556828;
- iKeyWords[i] ^= 909522486;
- }
- oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
- this.reset();
- },
- /**
- * Resets this HMAC to its initial state.
- *
- * @example
- *
- * hmacHasher.reset();
- */
- reset: function() {
- var hasher = this._hasher;
- hasher.reset();
- hasher.update(this._iKey);
- },
- /**
- * Updates this HMAC with a message.
- *
- * @param {WordArray|string} messageUpdate The message to append.
- *
- * @return {HMAC} This HMAC instance.
- *
- * @example
- *
- * hmacHasher.update('message');
- * hmacHasher.update(wordArray);
- */
- update: function(messageUpdate) {
- this._hasher.update(messageUpdate);
- return this;
- },
- /**
- * Finalizes the HMAC computation.
- * Note that the finalize operation is effectively a destructive, read-once operation.
- *
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
- *
- * @return {WordArray} The HMAC.
- *
- * @example
- *
- * var hmac = hmacHasher.finalize();
- * var hmac = hmacHasher.finalize('message');
- * var hmac = hmacHasher.finalize(wordArray);
- */
- finalize: function(messageUpdate) {
- var hasher = this._hasher;
- var innerHash = hasher.finalize(messageUpdate);
- hasher.reset();
- var hmac2 = hasher.finalize(this._oKey.clone().concat(innerHash));
- return hmac2;
- }
- });
- })();
- });
- })(hmac$1);
- return hmac$1.exports;
-}
-var pbkdf2$1 = { exports: {} };
-var pbkdf2 = pbkdf2$1.exports;
-var hasRequiredPbkdf2;
-function requirePbkdf2() {
- if (hasRequiredPbkdf2) return pbkdf2$1.exports;
- hasRequiredPbkdf2 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireSha256(), requireHmac());
- }
- })(pbkdf2, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var WordArray = C_lib.WordArray;
- var C_algo = C.algo;
- var SHA256 = C_algo.SHA256;
- var HMAC = C_algo.HMAC;
- var PBKDF2 = C_algo.PBKDF2 = Base.extend({
- /**
- * Configuration options.
- *
- * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
- * @property {Hasher} hasher The hasher to use. Default: SHA256
- * @property {number} iterations The number of iterations to perform. Default: 250000
- */
- cfg: Base.extend({
- keySize: 128 / 32,
- hasher: SHA256,
- iterations: 25e4
- }),
- /**
- * Initializes a newly created key derivation function.
- *
- * @param {Object} cfg (Optional) The configuration options to use for the derivation.
- *
- * @example
- *
- * var kdf = CryptoJS.algo.PBKDF2.create();
- * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
- * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
- */
- init: function(cfg) {
- this.cfg = this.cfg.extend(cfg);
- },
- /**
- * Computes the Password-Based Key Derivation Function 2.
- *
- * @param {WordArray|string} password The password.
- * @param {WordArray|string} salt A salt.
- *
- * @return {WordArray} The derived key.
- *
- * @example
- *
- * var key = kdf.compute(password, salt);
- */
- compute: function(password, salt) {
- var cfg = this.cfg;
- var hmac2 = HMAC.create(cfg.hasher, password);
- var derivedKey = WordArray.create();
- var blockIndex = WordArray.create([1]);
- var derivedKeyWords = derivedKey.words;
- var blockIndexWords = blockIndex.words;
- var keySize = cfg.keySize;
- var iterations = cfg.iterations;
- while (derivedKeyWords.length < keySize) {
- var block = hmac2.update(salt).finalize(blockIndex);
- hmac2.reset();
- var blockWords = block.words;
- var blockWordsLength = blockWords.length;
- var intermediate = block;
- for (var i = 1; i < iterations; i++) {
- intermediate = hmac2.finalize(intermediate);
- hmac2.reset();
- var intermediateWords = intermediate.words;
- for (var j = 0; j < blockWordsLength; j++) {
- blockWords[j] ^= intermediateWords[j];
- }
- }
- derivedKey.concat(block);
- blockIndexWords[0]++;
- }
- derivedKey.sigBytes = keySize * 4;
- return derivedKey;
- }
- });
- C.PBKDF2 = function(password, salt, cfg) {
- return PBKDF2.create(cfg).compute(password, salt);
- };
- })();
- return CryptoJS.PBKDF2;
- });
- })(pbkdf2$1);
- return pbkdf2$1.exports;
-}
-var evpkdf$1 = { exports: {} };
-var evpkdf = evpkdf$1.exports;
-var hasRequiredEvpkdf;
-function requireEvpkdf() {
- if (hasRequiredEvpkdf) return evpkdf$1.exports;
- hasRequiredEvpkdf = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireSha1(), requireHmac());
- }
- })(evpkdf, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var WordArray = C_lib.WordArray;
- var C_algo = C.algo;
- var MD5 = C_algo.MD5;
- var EvpKDF = C_algo.EvpKDF = Base.extend({
- /**
- * Configuration options.
- *
- * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
- * @property {Hasher} hasher The hash algorithm to use. Default: MD5
- * @property {number} iterations The number of iterations to perform. Default: 1
- */
- cfg: Base.extend({
- keySize: 128 / 32,
- hasher: MD5,
- iterations: 1
- }),
- /**
- * Initializes a newly created key derivation function.
- *
- * @param {Object} cfg (Optional) The configuration options to use for the derivation.
- *
- * @example
- *
- * var kdf = CryptoJS.algo.EvpKDF.create();
- * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
- * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
- */
- init: function(cfg) {
- this.cfg = this.cfg.extend(cfg);
- },
- /**
- * Derives a key from a password.
- *
- * @param {WordArray|string} password The password.
- * @param {WordArray|string} salt A salt.
- *
- * @return {WordArray} The derived key.
- *
- * @example
- *
- * var key = kdf.compute(password, salt);
- */
- compute: function(password, salt) {
- var block;
- var cfg = this.cfg;
- var hasher = cfg.hasher.create();
- var derivedKey = WordArray.create();
- var derivedKeyWords = derivedKey.words;
- var keySize = cfg.keySize;
- var iterations = cfg.iterations;
- while (derivedKeyWords.length < keySize) {
- if (block) {
- hasher.update(block);
- }
- block = hasher.update(password).finalize(salt);
- hasher.reset();
- for (var i = 1; i < iterations; i++) {
- block = hasher.finalize(block);
- hasher.reset();
- }
- derivedKey.concat(block);
- }
- derivedKey.sigBytes = keySize * 4;
- return derivedKey;
- }
- });
- C.EvpKDF = function(password, salt, cfg) {
- return EvpKDF.create(cfg).compute(password, salt);
- };
- })();
- return CryptoJS.EvpKDF;
- });
- })(evpkdf$1);
- return evpkdf$1.exports;
-}
-var cipherCore$1 = { exports: {} };
-var cipherCore = cipherCore$1.exports;
-var hasRequiredCipherCore;
-function requireCipherCore() {
- if (hasRequiredCipherCore) return cipherCore$1.exports;
- hasRequiredCipherCore = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEvpkdf());
- }
- })(cipherCore, function(CryptoJS) {
- CryptoJS.lib.Cipher || function(undefined$1) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var Base = C_lib.Base;
- var WordArray = C_lib.WordArray;
- var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
- var C_enc = C.enc;
- C_enc.Utf8;
- var Base64 = C_enc.Base64;
- var C_algo = C.algo;
- var EvpKDF = C_algo.EvpKDF;
- var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
- /**
- * Configuration options.
- *
- * @property {WordArray} iv The IV to use for this operation.
- */
- cfg: Base.extend(),
- /**
- * Creates this cipher in encryption mode.
- *
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {Cipher} A cipher instance.
- *
- * @static
- *
- * @example
- *
- * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
- */
- createEncryptor: function(key, cfg) {
- return this.create(this._ENC_XFORM_MODE, key, cfg);
- },
- /**
- * Creates this cipher in decryption mode.
- *
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {Cipher} A cipher instance.
- *
- * @static
- *
- * @example
- *
- * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
- */
- createDecryptor: function(key, cfg) {
- return this.create(this._DEC_XFORM_MODE, key, cfg);
- },
- /**
- * Initializes a newly created cipher.
- *
- * @param {number} xformMode Either the encryption or decryption transormation mode constant.
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @example
- *
- * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
- */
- init: function(xformMode, key, cfg) {
- this.cfg = this.cfg.extend(cfg);
- this._xformMode = xformMode;
- this._key = key;
- this.reset();
- },
- /**
- * Resets this cipher to its initial state.
- *
- * @example
- *
- * cipher.reset();
- */
- reset: function() {
- BufferedBlockAlgorithm.reset.call(this);
- this._doReset();
- },
- /**
- * Adds data to be encrypted or decrypted.
- *
- * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
- *
- * @return {WordArray} The data after processing.
- *
- * @example
- *
- * var encrypted = cipher.process('data');
- * var encrypted = cipher.process(wordArray);
- */
- process: function(dataUpdate) {
- this._append(dataUpdate);
- return this._process();
- },
- /**
- * Finalizes the encryption or decryption process.
- * Note that the finalize operation is effectively a destructive, read-once operation.
- *
- * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
- *
- * @return {WordArray} The data after final processing.
- *
- * @example
- *
- * var encrypted = cipher.finalize();
- * var encrypted = cipher.finalize('data');
- * var encrypted = cipher.finalize(wordArray);
- */
- finalize: function(dataUpdate) {
- if (dataUpdate) {
- this._append(dataUpdate);
- }
- var finalProcessedData = this._doFinalize();
- return finalProcessedData;
- },
- keySize: 128 / 32,
- ivSize: 128 / 32,
- _ENC_XFORM_MODE: 1,
- _DEC_XFORM_MODE: 2,
- /**
- * Creates shortcut functions to a cipher's object interface.
- *
- * @param {Cipher} cipher The cipher to create a helper for.
- *
- * @return {Object} An object with encrypt and decrypt shortcut functions.
- *
- * @static
- *
- * @example
- *
- * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
- */
- _createHelper: /* @__PURE__ */ function() {
- function selectCipherStrategy(key) {
- if (typeof key == "string") {
- return PasswordBasedCipher;
- } else {
- return SerializableCipher;
- }
- }
- return function(cipher) {
- return {
- encrypt: function(message, key, cfg) {
- return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
- },
- decrypt: function(ciphertext, key, cfg) {
- return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
- }
- };
- };
- }()
- });
- C_lib.StreamCipher = Cipher.extend({
- _doFinalize: function() {
- var finalProcessedBlocks = this._process(true);
- return finalProcessedBlocks;
- },
- blockSize: 1
- });
- var C_mode = C.mode = {};
- var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
- /**
- * Creates this mode for encryption.
- *
- * @param {Cipher} cipher A block cipher instance.
- * @param {Array} iv The IV words.
- *
- * @static
- *
- * @example
- *
- * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
- */
- createEncryptor: function(cipher, iv) {
- return this.Encryptor.create(cipher, iv);
- },
- /**
- * Creates this mode for decryption.
- *
- * @param {Cipher} cipher A block cipher instance.
- * @param {Array} iv The IV words.
- *
- * @static
- *
- * @example
- *
- * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
- */
- createDecryptor: function(cipher, iv) {
- return this.Decryptor.create(cipher, iv);
- },
- /**
- * Initializes a newly created mode.
- *
- * @param {Cipher} cipher A block cipher instance.
- * @param {Array} iv The IV words.
- *
- * @example
- *
- * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
- */
- init: function(cipher, iv) {
- this._cipher = cipher;
- this._iv = iv;
- }
- });
- var CBC = C_mode.CBC = function() {
- var CBC2 = BlockCipherMode.extend();
- CBC2.Encryptor = CBC2.extend({
- /**
- * Processes the data block at offset.
- *
- * @param {Array} words The data words to operate on.
- * @param {number} offset The offset where the block starts.
- *
- * @example
- *
- * mode.processBlock(data.words, offset);
- */
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- xorBlock.call(this, words, offset, blockSize);
- cipher.encryptBlock(words, offset);
- this._prevBlock = words.slice(offset, offset + blockSize);
- }
- });
- CBC2.Decryptor = CBC2.extend({
- /**
- * Processes the data block at offset.
- *
- * @param {Array} words The data words to operate on.
- * @param {number} offset The offset where the block starts.
- *
- * @example
- *
- * mode.processBlock(data.words, offset);
- */
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var thisBlock = words.slice(offset, offset + blockSize);
- cipher.decryptBlock(words, offset);
- xorBlock.call(this, words, offset, blockSize);
- this._prevBlock = thisBlock;
- }
- });
- function xorBlock(words, offset, blockSize) {
- var block;
- var iv = this._iv;
- if (iv) {
- block = iv;
- this._iv = undefined$1;
- } else {
- block = this._prevBlock;
- }
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= block[i];
- }
- }
- return CBC2;
- }();
- var C_pad = C.pad = {};
- var Pkcs7 = C_pad.Pkcs7 = {
- /**
- * Pads data using the algorithm defined in PKCS #5/7.
- *
- * @param {WordArray} data The data to pad.
- * @param {number} blockSize The multiple that the data should be padded to.
- *
- * @static
- *
- * @example
- *
- * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
- */
- pad: function(data, blockSize) {
- var blockSizeBytes = blockSize * 4;
- var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
- var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
- var paddingWords = [];
- for (var i = 0; i < nPaddingBytes; i += 4) {
- paddingWords.push(paddingWord);
- }
- var padding = WordArray.create(paddingWords, nPaddingBytes);
- data.concat(padding);
- },
- /**
- * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
- *
- * @param {WordArray} data The data to unpad.
- *
- * @static
- *
- * @example
- *
- * CryptoJS.pad.Pkcs7.unpad(wordArray);
- */
- unpad: function(data) {
- var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
- data.sigBytes -= nPaddingBytes;
- }
- };
- C_lib.BlockCipher = Cipher.extend({
- /**
- * Configuration options.
- *
- * @property {Mode} mode The block mode to use. Default: CBC
- * @property {Padding} padding The padding strategy to use. Default: Pkcs7
- */
- cfg: Cipher.cfg.extend({
- mode: CBC,
- padding: Pkcs7
- }),
- reset: function() {
- var modeCreator;
- Cipher.reset.call(this);
- var cfg = this.cfg;
- var iv = cfg.iv;
- var mode = cfg.mode;
- if (this._xformMode == this._ENC_XFORM_MODE) {
- modeCreator = mode.createEncryptor;
- } else {
- modeCreator = mode.createDecryptor;
- this._minBufferSize = 1;
- }
- if (this._mode && this._mode.__creator == modeCreator) {
- this._mode.init(this, iv && iv.words);
- } else {
- this._mode = modeCreator.call(mode, this, iv && iv.words);
- this._mode.__creator = modeCreator;
- }
- },
- _doProcessBlock: function(words, offset) {
- this._mode.processBlock(words, offset);
- },
- _doFinalize: function() {
- var finalProcessedBlocks;
- var padding = this.cfg.padding;
- if (this._xformMode == this._ENC_XFORM_MODE) {
- padding.pad(this._data, this.blockSize);
- finalProcessedBlocks = this._process(true);
- } else {
- finalProcessedBlocks = this._process(true);
- padding.unpad(finalProcessedBlocks);
- }
- return finalProcessedBlocks;
- },
- blockSize: 128 / 32
- });
- var CipherParams = C_lib.CipherParams = Base.extend({
- /**
- * Initializes a newly created cipher params object.
- *
- * @param {Object} cipherParams An object with any of the possible cipher parameters.
- *
- * @example
- *
- * var cipherParams = CryptoJS.lib.CipherParams.create({
- * ciphertext: ciphertextWordArray,
- * key: keyWordArray,
- * iv: ivWordArray,
- * salt: saltWordArray,
- * algorithm: CryptoJS.algo.AES,
- * mode: CryptoJS.mode.CBC,
- * padding: CryptoJS.pad.PKCS7,
- * blockSize: 4,
- * formatter: CryptoJS.format.OpenSSL
- * });
- */
- init: function(cipherParams) {
- this.mixIn(cipherParams);
- },
- /**
- * Converts this cipher params object to a string.
- *
- * @param {Format} formatter (Optional) The formatting strategy to use.
- *
- * @return {string} The stringified cipher params.
- *
- * @throws Error If neither the formatter nor the default formatter is set.
- *
- * @example
- *
- * var string = cipherParams + '';
- * var string = cipherParams.toString();
- * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
- */
- toString: function(formatter) {
- return (formatter || this.formatter).stringify(this);
- }
- });
- var C_format = C.format = {};
- var OpenSSLFormatter = C_format.OpenSSL = {
- /**
- * Converts a cipher params object to an OpenSSL-compatible string.
- *
- * @param {CipherParams} cipherParams The cipher params object.
- *
- * @return {string} The OpenSSL-compatible string.
- *
- * @static
- *
- * @example
- *
- * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
- */
- stringify: function(cipherParams) {
- var wordArray;
- var ciphertext = cipherParams.ciphertext;
- var salt = cipherParams.salt;
- if (salt) {
- wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
- } else {
- wordArray = ciphertext;
- }
- return wordArray.toString(Base64);
- },
- /**
- * Converts an OpenSSL-compatible string to a cipher params object.
- *
- * @param {string} openSSLStr The OpenSSL-compatible string.
- *
- * @return {CipherParams} The cipher params object.
- *
- * @static
- *
- * @example
- *
- * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
- */
- parse: function(openSSLStr) {
- var salt;
- var ciphertext = Base64.parse(openSSLStr);
- var ciphertextWords = ciphertext.words;
- if (ciphertextWords[0] == 1398893684 && ciphertextWords[1] == 1701076831) {
- salt = WordArray.create(ciphertextWords.slice(2, 4));
- ciphertextWords.splice(0, 4);
- ciphertext.sigBytes -= 16;
- }
- return CipherParams.create({ ciphertext, salt });
- }
- };
- var SerializableCipher = C_lib.SerializableCipher = Base.extend({
- /**
- * Configuration options.
- *
- * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
- */
- cfg: Base.extend({
- format: OpenSSLFormatter
- }),
- /**
- * Encrypts a message.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {WordArray|string} message The message to encrypt.
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {CipherParams} A cipher params object.
- *
- * @static
- *
- * @example
- *
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
- */
- encrypt: function(cipher, message, key, cfg) {
- cfg = this.cfg.extend(cfg);
- var encryptor = cipher.createEncryptor(key, cfg);
- var ciphertext = encryptor.finalize(message);
- var cipherCfg = encryptor.cfg;
- return CipherParams.create({
- ciphertext,
- key,
- iv: cipherCfg.iv,
- algorithm: cipher,
- mode: cipherCfg.mode,
- padding: cipherCfg.padding,
- blockSize: cipher.blockSize,
- formatter: cfg.format
- });
- },
- /**
- * Decrypts serialized ciphertext.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
- * @param {WordArray} key The key.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {WordArray} The plaintext.
- *
- * @static
- *
- * @example
- *
- * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
- * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
- */
- decrypt: function(cipher, ciphertext, key, cfg) {
- cfg = this.cfg.extend(cfg);
- ciphertext = this._parse(ciphertext, cfg.format);
- var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
- return plaintext;
- },
- /**
- * Converts serialized ciphertext to CipherParams,
- * else assumed CipherParams already and returns ciphertext unchanged.
- *
- * @param {CipherParams|string} ciphertext The ciphertext.
- * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
- *
- * @return {CipherParams} The unserialized ciphertext.
- *
- * @static
- *
- * @example
- *
- * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
- */
- _parse: function(ciphertext, format) {
- if (typeof ciphertext == "string") {
- return format.parse(ciphertext, this);
- } else {
- return ciphertext;
- }
- }
- });
- var C_kdf = C.kdf = {};
- var OpenSSLKdf = C_kdf.OpenSSL = {
- /**
- * Derives a key and IV from a password.
- *
- * @param {string} password The password to derive from.
- * @param {number} keySize The size in words of the key to generate.
- * @param {number} ivSize The size in words of the IV to generate.
- * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
- *
- * @return {CipherParams} A cipher params object with the key, IV, and salt.
- *
- * @static
- *
- * @example
- *
- * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
- * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
- */
- execute: function(password, keySize, ivSize, salt, hasher) {
- if (!salt) {
- salt = WordArray.random(64 / 8);
- }
- if (!hasher) {
- var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
- } else {
- var key = EvpKDF.create({ keySize: keySize + ivSize, hasher }).compute(password, salt);
- }
- var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
- key.sigBytes = keySize * 4;
- return CipherParams.create({ key, iv, salt });
- }
- };
- var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
- /**
- * Configuration options.
- *
- * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
- */
- cfg: SerializableCipher.cfg.extend({
- kdf: OpenSSLKdf
- }),
- /**
- * Encrypts a message using a password.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {WordArray|string} message The message to encrypt.
- * @param {string} password The password.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {CipherParams} A cipher params object.
- *
- * @static
- *
- * @example
- *
- * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
- * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
- */
- encrypt: function(cipher, message, password, cfg) {
- cfg = this.cfg.extend(cfg);
- var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);
- cfg.iv = derivedParams.iv;
- var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
- ciphertext.mixIn(derivedParams);
- return ciphertext;
- },
- /**
- * Decrypts serialized ciphertext using a password.
- *
- * @param {Cipher} cipher The cipher algorithm to use.
- * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
- * @param {string} password The password.
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
- *
- * @return {WordArray} The plaintext.
- *
- * @static
- *
- * @example
- *
- * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
- * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
- */
- decrypt: function(cipher, ciphertext, password, cfg) {
- cfg = this.cfg.extend(cfg);
- ciphertext = this._parse(ciphertext, cfg.format);
- var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);
- cfg.iv = derivedParams.iv;
- var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
- return plaintext;
- }
- });
- }();
- });
- })(cipherCore$1);
- return cipherCore$1.exports;
-}
-var modeCfb$1 = { exports: {} };
-var modeCfb = modeCfb$1.exports;
-var hasRequiredModeCfb;
-function requireModeCfb() {
- if (hasRequiredModeCfb) return modeCfb$1.exports;
- hasRequiredModeCfb = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(modeCfb, function(CryptoJS) {
- CryptoJS.mode.CFB = function() {
- var CFB = CryptoJS.lib.BlockCipherMode.extend();
- CFB.Encryptor = CFB.extend({
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
- this._prevBlock = words.slice(offset, offset + blockSize);
- }
- });
- CFB.Decryptor = CFB.extend({
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var thisBlock = words.slice(offset, offset + blockSize);
- generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
- this._prevBlock = thisBlock;
- }
- });
- function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
- var keystream;
- var iv = this._iv;
- if (iv) {
- keystream = iv.slice(0);
- this._iv = void 0;
- } else {
- keystream = this._prevBlock;
- }
- cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- }
- return CFB;
- }();
- return CryptoJS.mode.CFB;
- });
- })(modeCfb$1);
- return modeCfb$1.exports;
-}
-var modeCtr$1 = { exports: {} };
-var modeCtr = modeCtr$1.exports;
-var hasRequiredModeCtr;
-function requireModeCtr() {
- if (hasRequiredModeCtr) return modeCtr$1.exports;
- hasRequiredModeCtr = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(modeCtr, function(CryptoJS) {
- CryptoJS.mode.CTR = function() {
- var CTR = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = CTR.Encryptor = CTR.extend({
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var counter = this._counter;
- if (iv) {
- counter = this._counter = iv.slice(0);
- this._iv = void 0;
- }
- var keystream = counter.slice(0);
- cipher.encryptBlock(keystream, 0);
- counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- }
- });
- CTR.Decryptor = Encryptor;
- return CTR;
- }();
- return CryptoJS.mode.CTR;
- });
- })(modeCtr$1);
- return modeCtr$1.exports;
-}
-var modeCtrGladman$1 = { exports: {} };
-var modeCtrGladman = modeCtrGladman$1.exports;
-var hasRequiredModeCtrGladman;
-function requireModeCtrGladman() {
- if (hasRequiredModeCtrGladman) return modeCtrGladman$1.exports;
- hasRequiredModeCtrGladman = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(modeCtrGladman, function(CryptoJS) {
- /** @preserve
- * Counter block mode compatible with Dr Brian Gladman fileenc.c
- * derived from CryptoJS.mode.CTR
- * Jan Hruby jhruby.web@gmail.com
- */
- CryptoJS.mode.CTRGladman = function() {
- var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
- function incWord(word) {
- if ((word >> 24 & 255) === 255) {
- var b1 = word >> 16 & 255;
- var b2 = word >> 8 & 255;
- var b3 = word & 255;
- if (b1 === 255) {
- b1 = 0;
- if (b2 === 255) {
- b2 = 0;
- if (b3 === 255) {
- b3 = 0;
- } else {
- ++b3;
- }
- } else {
- ++b2;
- }
- } else {
- ++b1;
- }
- word = 0;
- word += b1 << 16;
- word += b2 << 8;
- word += b3;
- } else {
- word += 1 << 24;
- }
- return word;
- }
- function incCounter(counter) {
- if ((counter[0] = incWord(counter[0])) === 0) {
- counter[1] = incWord(counter[1]);
- }
- return counter;
- }
- var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var counter = this._counter;
- if (iv) {
- counter = this._counter = iv.slice(0);
- this._iv = void 0;
- }
- incCounter(counter);
- var keystream = counter.slice(0);
- cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- }
- });
- CTRGladman.Decryptor = Encryptor;
- return CTRGladman;
- }();
- return CryptoJS.mode.CTRGladman;
- });
- })(modeCtrGladman$1);
- return modeCtrGladman$1.exports;
-}
-var modeOfb$1 = { exports: {} };
-var modeOfb = modeOfb$1.exports;
-var hasRequiredModeOfb;
-function requireModeOfb() {
- if (hasRequiredModeOfb) return modeOfb$1.exports;
- hasRequiredModeOfb = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(modeOfb, function(CryptoJS) {
- CryptoJS.mode.OFB = function() {
- var OFB = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = OFB.Encryptor = OFB.extend({
- processBlock: function(words, offset) {
- var cipher = this._cipher;
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var keystream = this._keystream;
- if (iv) {
- keystream = this._keystream = iv.slice(0);
- this._iv = void 0;
- }
- cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- }
- });
- OFB.Decryptor = Encryptor;
- return OFB;
- }();
- return CryptoJS.mode.OFB;
- });
- })(modeOfb$1);
- return modeOfb$1.exports;
-}
-var modeEcb$1 = { exports: {} };
-var modeEcb = modeEcb$1.exports;
-var hasRequiredModeEcb;
-function requireModeEcb() {
- if (hasRequiredModeEcb) return modeEcb$1.exports;
- hasRequiredModeEcb = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(modeEcb, function(CryptoJS) {
- CryptoJS.mode.ECB = function() {
- var ECB = CryptoJS.lib.BlockCipherMode.extend();
- ECB.Encryptor = ECB.extend({
- processBlock: function(words, offset) {
- this._cipher.encryptBlock(words, offset);
- }
- });
- ECB.Decryptor = ECB.extend({
- processBlock: function(words, offset) {
- this._cipher.decryptBlock(words, offset);
- }
- });
- return ECB;
- }();
- return CryptoJS.mode.ECB;
- });
- })(modeEcb$1);
- return modeEcb$1.exports;
-}
-var padAnsix923$1 = { exports: {} };
-var padAnsix923 = padAnsix923$1.exports;
-var hasRequiredPadAnsix923;
-function requirePadAnsix923() {
- if (hasRequiredPadAnsix923) return padAnsix923$1.exports;
- hasRequiredPadAnsix923 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(padAnsix923, function(CryptoJS) {
- CryptoJS.pad.AnsiX923 = {
- pad: function(data, blockSize) {
- var dataSigBytes = data.sigBytes;
- var blockSizeBytes = blockSize * 4;
- var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
- var lastBytePos = dataSigBytes + nPaddingBytes - 1;
- data.clamp();
- data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
- data.sigBytes += nPaddingBytes;
- },
- unpad: function(data) {
- var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
- data.sigBytes -= nPaddingBytes;
- }
- };
- return CryptoJS.pad.Ansix923;
- });
- })(padAnsix923$1);
- return padAnsix923$1.exports;
-}
-var padIso10126$1 = { exports: {} };
-var padIso10126 = padIso10126$1.exports;
-var hasRequiredPadIso10126;
-function requirePadIso10126() {
- if (hasRequiredPadIso10126) return padIso10126$1.exports;
- hasRequiredPadIso10126 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(padIso10126, function(CryptoJS) {
- CryptoJS.pad.Iso10126 = {
- pad: function(data, blockSize) {
- var blockSizeBytes = blockSize * 4;
- var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
- data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
- },
- unpad: function(data) {
- var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
- data.sigBytes -= nPaddingBytes;
- }
- };
- return CryptoJS.pad.Iso10126;
- });
- })(padIso10126$1);
- return padIso10126$1.exports;
-}
-var padIso97971$1 = { exports: {} };
-var padIso97971 = padIso97971$1.exports;
-var hasRequiredPadIso97971;
-function requirePadIso97971() {
- if (hasRequiredPadIso97971) return padIso97971$1.exports;
- hasRequiredPadIso97971 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(padIso97971, function(CryptoJS) {
- CryptoJS.pad.Iso97971 = {
- pad: function(data, blockSize) {
- data.concat(CryptoJS.lib.WordArray.create([2147483648], 1));
- CryptoJS.pad.ZeroPadding.pad(data, blockSize);
- },
- unpad: function(data) {
- CryptoJS.pad.ZeroPadding.unpad(data);
- data.sigBytes--;
- }
- };
- return CryptoJS.pad.Iso97971;
- });
- })(padIso97971$1);
- return padIso97971$1.exports;
-}
-var padZeropadding$1 = { exports: {} };
-var padZeropadding = padZeropadding$1.exports;
-var hasRequiredPadZeropadding;
-function requirePadZeropadding() {
- if (hasRequiredPadZeropadding) return padZeropadding$1.exports;
- hasRequiredPadZeropadding = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(padZeropadding, function(CryptoJS) {
- CryptoJS.pad.ZeroPadding = {
- pad: function(data, blockSize) {
- var blockSizeBytes = blockSize * 4;
- data.clamp();
- data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);
- },
- unpad: function(data) {
- var dataWords = data.words;
- var i = data.sigBytes - 1;
- for (var i = data.sigBytes - 1; i >= 0; i--) {
- if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
- data.sigBytes = i + 1;
- break;
- }
- }
- }
- };
- return CryptoJS.pad.ZeroPadding;
- });
- })(padZeropadding$1);
- return padZeropadding$1.exports;
-}
-var padNopadding$1 = { exports: {} };
-var padNopadding = padNopadding$1.exports;
-var hasRequiredPadNopadding;
-function requirePadNopadding() {
- if (hasRequiredPadNopadding) return padNopadding$1.exports;
- hasRequiredPadNopadding = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(padNopadding, function(CryptoJS) {
- CryptoJS.pad.NoPadding = {
- pad: function() {
- },
- unpad: function() {
- }
- };
- return CryptoJS.pad.NoPadding;
- });
- })(padNopadding$1);
- return padNopadding$1.exports;
-}
-var formatHex$1 = { exports: {} };
-var formatHex = formatHex$1.exports;
-var hasRequiredFormatHex;
-function requireFormatHex() {
- if (hasRequiredFormatHex) return formatHex$1.exports;
- hasRequiredFormatHex = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireCipherCore());
- }
- })(formatHex, function(CryptoJS) {
- (function(undefined$1) {
- var C = CryptoJS;
- var C_lib = C.lib;
- var CipherParams = C_lib.CipherParams;
- var C_enc = C.enc;
- var Hex = C_enc.Hex;
- var C_format = C.format;
- C_format.Hex = {
- /**
- * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
- *
- * @param {CipherParams} cipherParams The cipher params object.
- *
- * @return {string} The hexadecimally encoded string.
- *
- * @static
- *
- * @example
- *
- * var hexString = CryptoJS.format.Hex.stringify(cipherParams);
- */
- stringify: function(cipherParams) {
- return cipherParams.ciphertext.toString(Hex);
- },
- /**
- * Converts a hexadecimally encoded ciphertext string to a cipher params object.
- *
- * @param {string} input The hexadecimally encoded string.
- *
- * @return {CipherParams} The cipher params object.
- *
- * @static
- *
- * @example
- *
- * var cipherParams = CryptoJS.format.Hex.parse(hexString);
- */
- parse: function(input) {
- var ciphertext = Hex.parse(input);
- return CipherParams.create({ ciphertext });
- }
- };
- })();
- return CryptoJS.format.Hex;
- });
- })(formatHex$1);
- return formatHex$1.exports;
-}
-var aes$1 = { exports: {} };
-var aes = aes$1.exports;
-var hasRequiredAes;
-function requireAes() {
- if (hasRequiredAes) return aes$1.exports;
- hasRequiredAes = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
- }
- })(aes, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var BlockCipher = C_lib.BlockCipher;
- var C_algo = C.algo;
- var SBOX = [];
- var INV_SBOX = [];
- var SUB_MIX_0 = [];
- var SUB_MIX_1 = [];
- var SUB_MIX_2 = [];
- var SUB_MIX_3 = [];
- var INV_SUB_MIX_0 = [];
- var INV_SUB_MIX_1 = [];
- var INV_SUB_MIX_2 = [];
- var INV_SUB_MIX_3 = [];
- (function() {
- var d = [];
- for (var i = 0; i < 256; i++) {
- if (i < 128) {
- d[i] = i << 1;
- } else {
- d[i] = i << 1 ^ 283;
- }
- }
- var x = 0;
- var xi = 0;
- for (var i = 0; i < 256; i++) {
- var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;
- sx = sx >>> 8 ^ sx & 255 ^ 99;
- SBOX[x] = sx;
- INV_SBOX[sx] = x;
- var x2 = d[x];
- var x4 = d[x2];
- var x8 = d[x4];
- var t = d[sx] * 257 ^ sx * 16843008;
- SUB_MIX_0[x] = t << 24 | t >>> 8;
- SUB_MIX_1[x] = t << 16 | t >>> 16;
- SUB_MIX_2[x] = t << 8 | t >>> 24;
- SUB_MIX_3[x] = t;
- var t = x8 * 16843009 ^ x4 * 65537 ^ x2 * 257 ^ x * 16843008;
- INV_SUB_MIX_0[sx] = t << 24 | t >>> 8;
- INV_SUB_MIX_1[sx] = t << 16 | t >>> 16;
- INV_SUB_MIX_2[sx] = t << 8 | t >>> 24;
- INV_SUB_MIX_3[sx] = t;
- if (!x) {
- x = xi = 1;
- } else {
- x = x2 ^ d[d[d[x8 ^ x2]]];
- xi ^= d[d[xi]];
- }
- }
- })();
- var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
- var AES = C_algo.AES = BlockCipher.extend({
- _doReset: function() {
- var t;
- if (this._nRounds && this._keyPriorReset === this._key) {
- return;
- }
- var key = this._keyPriorReset = this._key;
- var keyWords = key.words;
- var keySize = key.sigBytes / 4;
- var nRounds = this._nRounds = keySize + 6;
- var ksRows = (nRounds + 1) * 4;
- var keySchedule = this._keySchedule = [];
- for (var ksRow = 0; ksRow < ksRows; ksRow++) {
- if (ksRow < keySize) {
- keySchedule[ksRow] = keyWords[ksRow];
- } else {
- t = keySchedule[ksRow - 1];
- if (!(ksRow % keySize)) {
- t = t << 8 | t >>> 24;
- t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255];
- t ^= RCON[ksRow / keySize | 0] << 24;
- } else if (keySize > 6 && ksRow % keySize == 4) {
- t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255];
- }
- keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
- }
- }
- var invKeySchedule = this._invKeySchedule = [];
- for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
- var ksRow = ksRows - invKsRow;
- if (invKsRow % 4) {
- var t = keySchedule[ksRow];
- } else {
- var t = keySchedule[ksRow - 4];
- }
- if (invKsRow < 4 || ksRow <= 4) {
- invKeySchedule[invKsRow] = t;
- } else {
- invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 255]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 255]] ^ INV_SUB_MIX_3[SBOX[t & 255]];
- }
- }
- },
- encryptBlock: function(M, offset) {
- this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
- },
- decryptBlock: function(M, offset) {
- var t = M[offset + 1];
- M[offset + 1] = M[offset + 3];
- M[offset + 3] = t;
- this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
- var t = M[offset + 1];
- M[offset + 1] = M[offset + 3];
- M[offset + 3] = t;
- },
- _doCryptBlock: function(M, offset, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) {
- var nRounds = this._nRounds;
- var s0 = M[offset] ^ keySchedule[0];
- var s1 = M[offset + 1] ^ keySchedule[1];
- var s2 = M[offset + 2] ^ keySchedule[2];
- var s3 = M[offset + 3] ^ keySchedule[3];
- var ksRow = 4;
- for (var round = 1; round < nRounds; round++) {
- var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++];
- var t1 = SUB_MIX_02[s1 >>> 24] ^ SUB_MIX_12[s2 >>> 16 & 255] ^ SUB_MIX_22[s3 >>> 8 & 255] ^ SUB_MIX_32[s0 & 255] ^ keySchedule[ksRow++];
- var t2 = SUB_MIX_02[s2 >>> 24] ^ SUB_MIX_12[s3 >>> 16 & 255] ^ SUB_MIX_22[s0 >>> 8 & 255] ^ SUB_MIX_32[s1 & 255] ^ keySchedule[ksRow++];
- var t3 = SUB_MIX_02[s3 >>> 24] ^ SUB_MIX_12[s0 >>> 16 & 255] ^ SUB_MIX_22[s1 >>> 8 & 255] ^ SUB_MIX_32[s2 & 255] ^ keySchedule[ksRow++];
- s0 = t0;
- s1 = t1;
- s2 = t2;
- s3 = t3;
- }
- var t0 = (SBOX2[s0 >>> 24] << 24 | SBOX2[s1 >>> 16 & 255] << 16 | SBOX2[s2 >>> 8 & 255] << 8 | SBOX2[s3 & 255]) ^ keySchedule[ksRow++];
- var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++];
- var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++];
- var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++];
- M[offset] = t0;
- M[offset + 1] = t1;
- M[offset + 2] = t2;
- M[offset + 3] = t3;
- },
- keySize: 256 / 32
- });
- C.AES = BlockCipher._createHelper(AES);
- })();
- return CryptoJS.AES;
- });
- })(aes$1);
- return aes$1.exports;
-}
-var tripledes$1 = { exports: {} };
-var tripledes = tripledes$1.exports;
-var hasRequiredTripledes;
-function requireTripledes() {
- if (hasRequiredTripledes) return tripledes$1.exports;
- hasRequiredTripledes = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
- }
- })(tripledes, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
- var BlockCipher = C_lib.BlockCipher;
- var C_algo = C.algo;
- var PC1 = [
- 57,
- 49,
- 41,
- 33,
- 25,
- 17,
- 9,
- 1,
- 58,
- 50,
- 42,
- 34,
- 26,
- 18,
- 10,
- 2,
- 59,
- 51,
- 43,
- 35,
- 27,
- 19,
- 11,
- 3,
- 60,
- 52,
- 44,
- 36,
- 63,
- 55,
- 47,
- 39,
- 31,
- 23,
- 15,
- 7,
- 62,
- 54,
- 46,
- 38,
- 30,
- 22,
- 14,
- 6,
- 61,
- 53,
- 45,
- 37,
- 29,
- 21,
- 13,
- 5,
- 28,
- 20,
- 12,
- 4
- ];
- var PC2 = [
- 14,
- 17,
- 11,
- 24,
- 1,
- 5,
- 3,
- 28,
- 15,
- 6,
- 21,
- 10,
- 23,
- 19,
- 12,
- 4,
- 26,
- 8,
- 16,
- 7,
- 27,
- 20,
- 13,
- 2,
- 41,
- 52,
- 31,
- 37,
- 47,
- 55,
- 30,
- 40,
- 51,
- 45,
- 33,
- 48,
- 44,
- 49,
- 39,
- 56,
- 34,
- 53,
- 46,
- 42,
- 50,
- 36,
- 29,
- 32
- ];
- var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
- var SBOX_P = [
- {
- 0: 8421888,
- 268435456: 32768,
- 536870912: 8421378,
- 805306368: 2,
- 1073741824: 512,
- 1342177280: 8421890,
- 1610612736: 8389122,
- 1879048192: 8388608,
- 2147483648: 514,
- 2415919104: 8389120,
- 2684354560: 33280,
- 2952790016: 8421376,
- 3221225472: 32770,
- 3489660928: 8388610,
- 3758096384: 0,
- 4026531840: 33282,
- 134217728: 0,
- 402653184: 8421890,
- 671088640: 33282,
- 939524096: 32768,
- 1207959552: 8421888,
- 1476395008: 512,
- 1744830464: 8421378,
- 2013265920: 2,
- 2281701376: 8389120,
- 2550136832: 33280,
- 2818572288: 8421376,
- 3087007744: 8389122,
- 3355443200: 8388610,
- 3623878656: 32770,
- 3892314112: 514,
- 4160749568: 8388608,
- 1: 32768,
- 268435457: 2,
- 536870913: 8421888,
- 805306369: 8388608,
- 1073741825: 8421378,
- 1342177281: 33280,
- 1610612737: 512,
- 1879048193: 8389122,
- 2147483649: 8421890,
- 2415919105: 8421376,
- 2684354561: 8388610,
- 2952790017: 33282,
- 3221225473: 514,
- 3489660929: 8389120,
- 3758096385: 32770,
- 4026531841: 0,
- 134217729: 8421890,
- 402653185: 8421376,
- 671088641: 8388608,
- 939524097: 512,
- 1207959553: 32768,
- 1476395009: 8388610,
- 1744830465: 2,
- 2013265921: 33282,
- 2281701377: 32770,
- 2550136833: 8389122,
- 2818572289: 514,
- 3087007745: 8421888,
- 3355443201: 8389120,
- 3623878657: 0,
- 3892314113: 33280,
- 4160749569: 8421378
- },
- {
- 0: 1074282512,
- 16777216: 16384,
- 33554432: 524288,
- 50331648: 1074266128,
- 67108864: 1073741840,
- 83886080: 1074282496,
- 100663296: 1073758208,
- 117440512: 16,
- 134217728: 540672,
- 150994944: 1073758224,
- 167772160: 1073741824,
- 184549376: 540688,
- 201326592: 524304,
- 218103808: 0,
- 234881024: 16400,
- 251658240: 1074266112,
- 8388608: 1073758208,
- 25165824: 540688,
- 41943040: 16,
- 58720256: 1073758224,
- 75497472: 1074282512,
- 92274688: 1073741824,
- 109051904: 524288,
- 125829120: 1074266128,
- 142606336: 524304,
- 159383552: 0,
- 176160768: 16384,
- 192937984: 1074266112,
- 209715200: 1073741840,
- 226492416: 540672,
- 243269632: 1074282496,
- 260046848: 16400,
- 268435456: 0,
- 285212672: 1074266128,
- 301989888: 1073758224,
- 318767104: 1074282496,
- 335544320: 1074266112,
- 352321536: 16,
- 369098752: 540688,
- 385875968: 16384,
- 402653184: 16400,
- 419430400: 524288,
- 436207616: 524304,
- 452984832: 1073741840,
- 469762048: 540672,
- 486539264: 1073758208,
- 503316480: 1073741824,
- 520093696: 1074282512,
- 276824064: 540688,
- 293601280: 524288,
- 310378496: 1074266112,
- 327155712: 16384,
- 343932928: 1073758208,
- 360710144: 1074282512,
- 377487360: 16,
- 394264576: 1073741824,
- 411041792: 1074282496,
- 427819008: 1073741840,
- 444596224: 1073758224,
- 461373440: 524304,
- 478150656: 0,
- 494927872: 16400,
- 511705088: 1074266128,
- 528482304: 540672
- },
- {
- 0: 260,
- 1048576: 0,
- 2097152: 67109120,
- 3145728: 65796,
- 4194304: 65540,
- 5242880: 67108868,
- 6291456: 67174660,
- 7340032: 67174400,
- 8388608: 67108864,
- 9437184: 67174656,
- 10485760: 65792,
- 11534336: 67174404,
- 12582912: 67109124,
- 13631488: 65536,
- 14680064: 4,
- 15728640: 256,
- 524288: 67174656,
- 1572864: 67174404,
- 2621440: 0,
- 3670016: 67109120,
- 4718592: 67108868,
- 5767168: 65536,
- 6815744: 65540,
- 7864320: 260,
- 8912896: 4,
- 9961472: 256,
- 11010048: 67174400,
- 12058624: 65796,
- 13107200: 65792,
- 14155776: 67109124,
- 15204352: 67174660,
- 16252928: 67108864,
- 16777216: 67174656,
- 17825792: 65540,
- 18874368: 65536,
- 19922944: 67109120,
- 20971520: 256,
- 22020096: 67174660,
- 23068672: 67108868,
- 24117248: 0,
- 25165824: 67109124,
- 26214400: 67108864,
- 27262976: 4,
- 28311552: 65792,
- 29360128: 67174400,
- 30408704: 260,
- 31457280: 65796,
- 32505856: 67174404,
- 17301504: 67108864,
- 18350080: 260,
- 19398656: 67174656,
- 20447232: 0,
- 21495808: 65540,
- 22544384: 67109120,
- 23592960: 256,
- 24641536: 67174404,
- 25690112: 65536,
- 26738688: 67174660,
- 27787264: 65796,
- 28835840: 67108868,
- 29884416: 67109124,
- 30932992: 67174400,
- 31981568: 4,
- 33030144: 65792
- },
- {
- 0: 2151682048,
- 65536: 2147487808,
- 131072: 4198464,
- 196608: 2151677952,
- 262144: 0,
- 327680: 4198400,
- 393216: 2147483712,
- 458752: 4194368,
- 524288: 2147483648,
- 589824: 4194304,
- 655360: 64,
- 720896: 2147487744,
- 786432: 2151678016,
- 851968: 4160,
- 917504: 4096,
- 983040: 2151682112,
- 32768: 2147487808,
- 98304: 64,
- 163840: 2151678016,
- 229376: 2147487744,
- 294912: 4198400,
- 360448: 2151682112,
- 425984: 0,
- 491520: 2151677952,
- 557056: 4096,
- 622592: 2151682048,
- 688128: 4194304,
- 753664: 4160,
- 819200: 2147483648,
- 884736: 4194368,
- 950272: 4198464,
- 1015808: 2147483712,
- 1048576: 4194368,
- 1114112: 4198400,
- 1179648: 2147483712,
- 1245184: 0,
- 1310720: 4160,
- 1376256: 2151678016,
- 1441792: 2151682048,
- 1507328: 2147487808,
- 1572864: 2151682112,
- 1638400: 2147483648,
- 1703936: 2151677952,
- 1769472: 4198464,
- 1835008: 2147487744,
- 1900544: 4194304,
- 1966080: 64,
- 2031616: 4096,
- 1081344: 2151677952,
- 1146880: 2151682112,
- 1212416: 0,
- 1277952: 4198400,
- 1343488: 4194368,
- 1409024: 2147483648,
- 1474560: 2147487808,
- 1540096: 64,
- 1605632: 2147483712,
- 1671168: 4096,
- 1736704: 2147487744,
- 1802240: 2151678016,
- 1867776: 4160,
- 1933312: 2151682048,
- 1998848: 4194304,
- 2064384: 4198464
- },
- {
- 0: 128,
- 4096: 17039360,
- 8192: 262144,
- 12288: 536870912,
- 16384: 537133184,
- 20480: 16777344,
- 24576: 553648256,
- 28672: 262272,
- 32768: 16777216,
- 36864: 537133056,
- 40960: 536871040,
- 45056: 553910400,
- 49152: 553910272,
- 53248: 0,
- 57344: 17039488,
- 61440: 553648128,
- 2048: 17039488,
- 6144: 553648256,
- 10240: 128,
- 14336: 17039360,
- 18432: 262144,
- 22528: 537133184,
- 26624: 553910272,
- 30720: 536870912,
- 34816: 537133056,
- 38912: 0,
- 43008: 553910400,
- 47104: 16777344,
- 51200: 536871040,
- 55296: 553648128,
- 59392: 16777216,
- 63488: 262272,
- 65536: 262144,
- 69632: 128,
- 73728: 536870912,
- 77824: 553648256,
- 81920: 16777344,
- 86016: 553910272,
- 90112: 537133184,
- 94208: 16777216,
- 98304: 553910400,
- 102400: 553648128,
- 106496: 17039360,
- 110592: 537133056,
- 114688: 262272,
- 118784: 536871040,
- 122880: 0,
- 126976: 17039488,
- 67584: 553648256,
- 71680: 16777216,
- 75776: 17039360,
- 79872: 537133184,
- 83968: 536870912,
- 88064: 17039488,
- 92160: 128,
- 96256: 553910272,
- 100352: 262272,
- 104448: 553910400,
- 108544: 0,
- 112640: 553648128,
- 116736: 16777344,
- 120832: 262144,
- 124928: 537133056,
- 129024: 536871040
- },
- {
- 0: 268435464,
- 256: 8192,
- 512: 270532608,
- 768: 270540808,
- 1024: 268443648,
- 1280: 2097152,
- 1536: 2097160,
- 1792: 268435456,
- 2048: 0,
- 2304: 268443656,
- 2560: 2105344,
- 2816: 8,
- 3072: 270532616,
- 3328: 2105352,
- 3584: 8200,
- 3840: 270540800,
- 128: 270532608,
- 384: 270540808,
- 640: 8,
- 896: 2097152,
- 1152: 2105352,
- 1408: 268435464,
- 1664: 268443648,
- 1920: 8200,
- 2176: 2097160,
- 2432: 8192,
- 2688: 268443656,
- 2944: 270532616,
- 3200: 0,
- 3456: 270540800,
- 3712: 2105344,
- 3968: 268435456,
- 4096: 268443648,
- 4352: 270532616,
- 4608: 270540808,
- 4864: 8200,
- 5120: 2097152,
- 5376: 268435456,
- 5632: 268435464,
- 5888: 2105344,
- 6144: 2105352,
- 6400: 0,
- 6656: 8,
- 6912: 270532608,
- 7168: 8192,
- 7424: 268443656,
- 7680: 270540800,
- 7936: 2097160,
- 4224: 8,
- 4480: 2105344,
- 4736: 2097152,
- 4992: 268435464,
- 5248: 268443648,
- 5504: 8200,
- 5760: 270540808,
- 6016: 270532608,
- 6272: 270540800,
- 6528: 270532616,
- 6784: 8192,
- 7040: 2105352,
- 7296: 2097160,
- 7552: 0,
- 7808: 268435456,
- 8064: 268443656
- },
- {
- 0: 1048576,
- 16: 33555457,
- 32: 1024,
- 48: 1049601,
- 64: 34604033,
- 80: 0,
- 96: 1,
- 112: 34603009,
- 128: 33555456,
- 144: 1048577,
- 160: 33554433,
- 176: 34604032,
- 192: 34603008,
- 208: 1025,
- 224: 1049600,
- 240: 33554432,
- 8: 34603009,
- 24: 0,
- 40: 33555457,
- 56: 34604032,
- 72: 1048576,
- 88: 33554433,
- 104: 33554432,
- 120: 1025,
- 136: 1049601,
- 152: 33555456,
- 168: 34603008,
- 184: 1048577,
- 200: 1024,
- 216: 34604033,
- 232: 1,
- 248: 1049600,
- 256: 33554432,
- 272: 1048576,
- 288: 33555457,
- 304: 34603009,
- 320: 1048577,
- 336: 33555456,
- 352: 34604032,
- 368: 1049601,
- 384: 1025,
- 400: 34604033,
- 416: 1049600,
- 432: 1,
- 448: 0,
- 464: 34603008,
- 480: 33554433,
- 496: 1024,
- 264: 1049600,
- 280: 33555457,
- 296: 34603009,
- 312: 1,
- 328: 33554432,
- 344: 1048576,
- 360: 1025,
- 376: 34604032,
- 392: 33554433,
- 408: 34603008,
- 424: 0,
- 440: 34604033,
- 456: 1049601,
- 472: 1024,
- 488: 33555456,
- 504: 1048577
- },
- {
- 0: 134219808,
- 1: 131072,
- 2: 134217728,
- 3: 32,
- 4: 131104,
- 5: 134350880,
- 6: 134350848,
- 7: 2048,
- 8: 134348800,
- 9: 134219776,
- 10: 133120,
- 11: 134348832,
- 12: 2080,
- 13: 0,
- 14: 134217760,
- 15: 133152,
- 2147483648: 2048,
- 2147483649: 134350880,
- 2147483650: 134219808,
- 2147483651: 134217728,
- 2147483652: 134348800,
- 2147483653: 133120,
- 2147483654: 133152,
- 2147483655: 32,
- 2147483656: 134217760,
- 2147483657: 2080,
- 2147483658: 131104,
- 2147483659: 134350848,
- 2147483660: 0,
- 2147483661: 134348832,
- 2147483662: 134219776,
- 2147483663: 131072,
- 16: 133152,
- 17: 134350848,
- 18: 32,
- 19: 2048,
- 20: 134219776,
- 21: 134217760,
- 22: 134348832,
- 23: 131072,
- 24: 0,
- 25: 131104,
- 26: 134348800,
- 27: 134219808,
- 28: 134350880,
- 29: 133120,
- 30: 2080,
- 31: 134217728,
- 2147483664: 131072,
- 2147483665: 2048,
- 2147483666: 134348832,
- 2147483667: 133152,
- 2147483668: 32,
- 2147483669: 134348800,
- 2147483670: 134217728,
- 2147483671: 134219808,
- 2147483672: 134350880,
- 2147483673: 134217760,
- 2147483674: 134219776,
- 2147483675: 0,
- 2147483676: 133120,
- 2147483677: 2080,
- 2147483678: 131104,
- 2147483679: 134350848
- }
- ];
- var SBOX_MASK = [
- 4160749569,
- 528482304,
- 33030144,
- 2064384,
- 129024,
- 8064,
- 504,
- 2147483679
- ];
- var DES = C_algo.DES = BlockCipher.extend({
- _doReset: function() {
- var key = this._key;
- var keyWords = key.words;
- var keyBits = [];
- for (var i = 0; i < 56; i++) {
- var keyBitPos = PC1[i] - 1;
- keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
- }
- var subKeys = this._subKeys = [];
- for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
- var subKey = subKeys[nSubKey] = [];
- var bitShift = BIT_SHIFTS[nSubKey];
- for (var i = 0; i < 24; i++) {
- subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6;
- subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
- }
- subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
- for (var i = 1; i < 7; i++) {
- subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
- }
- subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
- }
- var invSubKeys = this._invSubKeys = [];
- for (var i = 0; i < 16; i++) {
- invSubKeys[i] = subKeys[15 - i];
- }
- },
- encryptBlock: function(M, offset) {
- this._doCryptBlock(M, offset, this._subKeys);
- },
- decryptBlock: function(M, offset) {
- this._doCryptBlock(M, offset, this._invSubKeys);
- },
- _doCryptBlock: function(M, offset, subKeys) {
- this._lBlock = M[offset];
- this._rBlock = M[offset + 1];
- exchangeLR.call(this, 4, 252645135);
- exchangeLR.call(this, 16, 65535);
- exchangeRL.call(this, 2, 858993459);
- exchangeRL.call(this, 8, 16711935);
- exchangeLR.call(this, 1, 1431655765);
- for (var round = 0; round < 16; round++) {
- var subKey = subKeys[round];
- var lBlock = this._lBlock;
- var rBlock = this._rBlock;
- var f = 0;
- for (var i = 0; i < 8; i++) {
- f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
- }
- this._lBlock = rBlock;
- this._rBlock = lBlock ^ f;
- }
- var t = this._lBlock;
- this._lBlock = this._rBlock;
- this._rBlock = t;
- exchangeLR.call(this, 1, 1431655765);
- exchangeRL.call(this, 8, 16711935);
- exchangeRL.call(this, 2, 858993459);
- exchangeLR.call(this, 16, 65535);
- exchangeLR.call(this, 4, 252645135);
- M[offset] = this._lBlock;
- M[offset + 1] = this._rBlock;
- },
- keySize: 64 / 32,
- ivSize: 64 / 32,
- blockSize: 64 / 32
- });
- function exchangeLR(offset, mask) {
- var t = (this._lBlock >>> offset ^ this._rBlock) & mask;
- this._rBlock ^= t;
- this._lBlock ^= t << offset;
- }
- function exchangeRL(offset, mask) {
- var t = (this._rBlock >>> offset ^ this._lBlock) & mask;
- this._lBlock ^= t;
- this._rBlock ^= t << offset;
- }
- C.DES = BlockCipher._createHelper(DES);
- var TripleDES = C_algo.TripleDES = BlockCipher.extend({
- _doReset: function() {
- var key = this._key;
- var keyWords = key.words;
- if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
- throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
- }
- var key1 = keyWords.slice(0, 2);
- var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
- var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
- this._des1 = DES.createEncryptor(WordArray.create(key1));
- this._des2 = DES.createEncryptor(WordArray.create(key2));
- this._des3 = DES.createEncryptor(WordArray.create(key3));
- },
- encryptBlock: function(M, offset) {
- this._des1.encryptBlock(M, offset);
- this._des2.decryptBlock(M, offset);
- this._des3.encryptBlock(M, offset);
- },
- decryptBlock: function(M, offset) {
- this._des3.decryptBlock(M, offset);
- this._des2.encryptBlock(M, offset);
- this._des1.decryptBlock(M, offset);
- },
- keySize: 192 / 32,
- ivSize: 64 / 32,
- blockSize: 64 / 32
- });
- C.TripleDES = BlockCipher._createHelper(TripleDES);
- })();
- return CryptoJS.TripleDES;
- });
- })(tripledes$1);
- return tripledes$1.exports;
-}
-var rc4$1 = { exports: {} };
-var rc4 = rc4$1.exports;
-var hasRequiredRc4;
-function requireRc4() {
- if (hasRequiredRc4) return rc4$1.exports;
- hasRequiredRc4 = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
- }
- })(rc4, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
- var C_algo = C.algo;
- var RC4 = C_algo.RC4 = StreamCipher.extend({
- _doReset: function() {
- var key = this._key;
- var keyWords = key.words;
- var keySigBytes = key.sigBytes;
- var S = this._S = [];
- for (var i = 0; i < 256; i++) {
- S[i] = i;
- }
- for (var i = 0, j = 0; i < 256; i++) {
- var keyByteIndex = i % keySigBytes;
- var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255;
- j = (j + S[i] + keyByte) % 256;
- var t = S[i];
- S[i] = S[j];
- S[j] = t;
- }
- this._i = this._j = 0;
- },
- _doProcessBlock: function(M, offset) {
- M[offset] ^= generateKeystreamWord.call(this);
- },
- keySize: 256 / 32,
- ivSize: 0
- });
- function generateKeystreamWord() {
- var S = this._S;
- var i = this._i;
- var j = this._j;
- var keystreamWord = 0;
- for (var n = 0; n < 4; n++) {
- i = (i + 1) % 256;
- j = (j + S[i]) % 256;
- var t = S[i];
- S[i] = S[j];
- S[j] = t;
- keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
- }
- this._i = i;
- this._j = j;
- return keystreamWord;
- }
- C.RC4 = StreamCipher._createHelper(RC4);
- var RC4Drop = C_algo.RC4Drop = RC4.extend({
- /**
- * Configuration options.
- *
- * @property {number} drop The number of keystream words to drop. Default 192
- */
- cfg: RC4.cfg.extend({
- drop: 192
- }),
- _doReset: function() {
- RC4._doReset.call(this);
- for (var i = this.cfg.drop; i > 0; i--) {
- generateKeystreamWord.call(this);
- }
- }
- });
- C.RC4Drop = StreamCipher._createHelper(RC4Drop);
- })();
- return CryptoJS.RC4;
- });
- })(rc4$1);
- return rc4$1.exports;
-}
-var rabbit$1 = { exports: {} };
-var rabbit = rabbit$1.exports;
-var hasRequiredRabbit;
-function requireRabbit() {
- if (hasRequiredRabbit) return rabbit$1.exports;
- hasRequiredRabbit = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
- }
- })(rabbit, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
- var C_algo = C.algo;
- var S = [];
- var C_ = [];
- var G = [];
- var Rabbit = C_algo.Rabbit = StreamCipher.extend({
- _doReset: function() {
- var K = this._key.words;
- var iv = this.cfg.iv;
- for (var i = 0; i < 4; i++) {
- K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
- }
- var X = this._X = [
- K[0],
- K[3] << 16 | K[2] >>> 16,
- K[1],
- K[0] << 16 | K[3] >>> 16,
- K[2],
- K[1] << 16 | K[0] >>> 16,
- K[3],
- K[2] << 16 | K[1] >>> 16
- ];
- var C2 = this._C = [
- K[2] << 16 | K[2] >>> 16,
- K[0] & 4294901760 | K[1] & 65535,
- K[3] << 16 | K[3] >>> 16,
- K[1] & 4294901760 | K[2] & 65535,
- K[0] << 16 | K[0] >>> 16,
- K[2] & 4294901760 | K[3] & 65535,
- K[1] << 16 | K[1] >>> 16,
- K[3] & 4294901760 | K[0] & 65535
- ];
- this._b = 0;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- for (var i = 0; i < 8; i++) {
- C2[i] ^= X[i + 4 & 7];
- }
- if (iv) {
- var IV = iv.words;
- var IV_0 = IV[0];
- var IV_1 = IV[1];
- var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
- var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
- var i1 = i0 >>> 16 | i2 & 4294901760;
- var i3 = i2 << 16 | i0 & 65535;
- C2[0] ^= i0;
- C2[1] ^= i1;
- C2[2] ^= i2;
- C2[3] ^= i3;
- C2[4] ^= i0;
- C2[5] ^= i1;
- C2[6] ^= i2;
- C2[7] ^= i3;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- }
- },
- _doProcessBlock: function(M, offset) {
- var X = this._X;
- nextState.call(this);
- S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
- S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
- S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
- S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
- for (var i = 0; i < 4; i++) {
- S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
- M[offset + i] ^= S[i];
- }
- },
- blockSize: 128 / 32,
- ivSize: 64 / 32
- });
- function nextState() {
- var X = this._X;
- var C2 = this._C;
- for (var i = 0; i < 8; i++) {
- C_[i] = C2[i];
- }
- C2[0] = C2[0] + 1295307597 + this._b | 0;
- C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
- C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
- C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
- C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
- C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
- C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
- C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
- this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
- for (var i = 0; i < 8; i++) {
- var gx = X[i] + C2[i];
- var ga = gx & 65535;
- var gb = gx >>> 16;
- var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
- var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
- G[i] = gh ^ gl;
- }
- X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
- X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
- X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
- X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
- X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
- X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
- X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
- X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
- }
- C.Rabbit = StreamCipher._createHelper(Rabbit);
- })();
- return CryptoJS.Rabbit;
- });
- })(rabbit$1);
- return rabbit$1.exports;
-}
-var rabbitLegacy$1 = { exports: {} };
-var rabbitLegacy = rabbitLegacy$1.exports;
-var hasRequiredRabbitLegacy;
-function requireRabbitLegacy() {
- if (hasRequiredRabbitLegacy) return rabbitLegacy$1.exports;
- hasRequiredRabbitLegacy = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
- }
- })(rabbitLegacy, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
- var C_algo = C.algo;
- var S = [];
- var C_ = [];
- var G = [];
- var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
- _doReset: function() {
- var K = this._key.words;
- var iv = this.cfg.iv;
- var X = this._X = [
- K[0],
- K[3] << 16 | K[2] >>> 16,
- K[1],
- K[0] << 16 | K[3] >>> 16,
- K[2],
- K[1] << 16 | K[0] >>> 16,
- K[3],
- K[2] << 16 | K[1] >>> 16
- ];
- var C2 = this._C = [
- K[2] << 16 | K[2] >>> 16,
- K[0] & 4294901760 | K[1] & 65535,
- K[3] << 16 | K[3] >>> 16,
- K[1] & 4294901760 | K[2] & 65535,
- K[0] << 16 | K[0] >>> 16,
- K[2] & 4294901760 | K[3] & 65535,
- K[1] << 16 | K[1] >>> 16,
- K[3] & 4294901760 | K[0] & 65535
- ];
- this._b = 0;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- for (var i = 0; i < 8; i++) {
- C2[i] ^= X[i + 4 & 7];
- }
- if (iv) {
- var IV = iv.words;
- var IV_0 = IV[0];
- var IV_1 = IV[1];
- var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
- var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
- var i1 = i0 >>> 16 | i2 & 4294901760;
- var i3 = i2 << 16 | i0 & 65535;
- C2[0] ^= i0;
- C2[1] ^= i1;
- C2[2] ^= i2;
- C2[3] ^= i3;
- C2[4] ^= i0;
- C2[5] ^= i1;
- C2[6] ^= i2;
- C2[7] ^= i3;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- }
- },
- _doProcessBlock: function(M, offset) {
- var X = this._X;
- nextState.call(this);
- S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
- S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
- S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
- S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
- for (var i = 0; i < 4; i++) {
- S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
- M[offset + i] ^= S[i];
- }
- },
- blockSize: 128 / 32,
- ivSize: 64 / 32
- });
- function nextState() {
- var X = this._X;
- var C2 = this._C;
- for (var i = 0; i < 8; i++) {
- C_[i] = C2[i];
- }
- C2[0] = C2[0] + 1295307597 + this._b | 0;
- C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
- C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
- C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
- C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
- C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
- C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
- C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
- this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
- for (var i = 0; i < 8; i++) {
- var gx = X[i] + C2[i];
- var ga = gx & 65535;
- var gb = gx >>> 16;
- var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
- var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
- G[i] = gh ^ gl;
- }
- X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
- X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
- X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
- X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
- X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
- X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
- X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
- X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
- }
- C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
- })();
- return CryptoJS.RabbitLegacy;
- });
- })(rabbitLegacy$1);
- return rabbitLegacy$1.exports;
-}
-var blowfish$1 = { exports: {} };
-var blowfish = blowfish$1.exports;
-var hasRequiredBlowfish;
-function requireBlowfish() {
- if (hasRequiredBlowfish) return blowfish$1.exports;
- hasRequiredBlowfish = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
- }
- })(blowfish, function(CryptoJS) {
- (function() {
- var C = CryptoJS;
- var C_lib = C.lib;
- var BlockCipher = C_lib.BlockCipher;
- var C_algo = C.algo;
- const N = 16;
- const ORIG_P = [
- 608135816,
- 2242054355,
- 320440878,
- 57701188,
- 2752067618,
- 698298832,
- 137296536,
- 3964562569,
- 1160258022,
- 953160567,
- 3193202383,
- 887688300,
- 3232508343,
- 3380367581,
- 1065670069,
- 3041331479,
- 2450970073,
- 2306472731
- ];
- const ORIG_S = [
- [
- 3509652390,
- 2564797868,
- 805139163,
- 3491422135,
- 3101798381,
- 1780907670,
- 3128725573,
- 4046225305,
- 614570311,
- 3012652279,
- 134345442,
- 2240740374,
- 1667834072,
- 1901547113,
- 2757295779,
- 4103290238,
- 227898511,
- 1921955416,
- 1904987480,
- 2182433518,
- 2069144605,
- 3260701109,
- 2620446009,
- 720527379,
- 3318853667,
- 677414384,
- 3393288472,
- 3101374703,
- 2390351024,
- 1614419982,
- 1822297739,
- 2954791486,
- 3608508353,
- 3174124327,
- 2024746970,
- 1432378464,
- 3864339955,
- 2857741204,
- 1464375394,
- 1676153920,
- 1439316330,
- 715854006,
- 3033291828,
- 289532110,
- 2706671279,
- 2087905683,
- 3018724369,
- 1668267050,
- 732546397,
- 1947742710,
- 3462151702,
- 2609353502,
- 2950085171,
- 1814351708,
- 2050118529,
- 680887927,
- 999245976,
- 1800124847,
- 3300911131,
- 1713906067,
- 1641548236,
- 4213287313,
- 1216130144,
- 1575780402,
- 4018429277,
- 3917837745,
- 3693486850,
- 3949271944,
- 596196993,
- 3549867205,
- 258830323,
- 2213823033,
- 772490370,
- 2760122372,
- 1774776394,
- 2652871518,
- 566650946,
- 4142492826,
- 1728879713,
- 2882767088,
- 1783734482,
- 3629395816,
- 2517608232,
- 2874225571,
- 1861159788,
- 326777828,
- 3124490320,
- 2130389656,
- 2716951837,
- 967770486,
- 1724537150,
- 2185432712,
- 2364442137,
- 1164943284,
- 2105845187,
- 998989502,
- 3765401048,
- 2244026483,
- 1075463327,
- 1455516326,
- 1322494562,
- 910128902,
- 469688178,
- 1117454909,
- 936433444,
- 3490320968,
- 3675253459,
- 1240580251,
- 122909385,
- 2157517691,
- 634681816,
- 4142456567,
- 3825094682,
- 3061402683,
- 2540495037,
- 79693498,
- 3249098678,
- 1084186820,
- 1583128258,
- 426386531,
- 1761308591,
- 1047286709,
- 322548459,
- 995290223,
- 1845252383,
- 2603652396,
- 3431023940,
- 2942221577,
- 3202600964,
- 3727903485,
- 1712269319,
- 422464435,
- 3234572375,
- 1170764815,
- 3523960633,
- 3117677531,
- 1434042557,
- 442511882,
- 3600875718,
- 1076654713,
- 1738483198,
- 4213154764,
- 2393238008,
- 3677496056,
- 1014306527,
- 4251020053,
- 793779912,
- 2902807211,
- 842905082,
- 4246964064,
- 1395751752,
- 1040244610,
- 2656851899,
- 3396308128,
- 445077038,
- 3742853595,
- 3577915638,
- 679411651,
- 2892444358,
- 2354009459,
- 1767581616,
- 3150600392,
- 3791627101,
- 3102740896,
- 284835224,
- 4246832056,
- 1258075500,
- 768725851,
- 2589189241,
- 3069724005,
- 3532540348,
- 1274779536,
- 3789419226,
- 2764799539,
- 1660621633,
- 3471099624,
- 4011903706,
- 913787905,
- 3497959166,
- 737222580,
- 2514213453,
- 2928710040,
- 3937242737,
- 1804850592,
- 3499020752,
- 2949064160,
- 2386320175,
- 2390070455,
- 2415321851,
- 4061277028,
- 2290661394,
- 2416832540,
- 1336762016,
- 1754252060,
- 3520065937,
- 3014181293,
- 791618072,
- 3188594551,
- 3933548030,
- 2332172193,
- 3852520463,
- 3043980520,
- 413987798,
- 3465142937,
- 3030929376,
- 4245938359,
- 2093235073,
- 3534596313,
- 375366246,
- 2157278981,
- 2479649556,
- 555357303,
- 3870105701,
- 2008414854,
- 3344188149,
- 4221384143,
- 3956125452,
- 2067696032,
- 3594591187,
- 2921233993,
- 2428461,
- 544322398,
- 577241275,
- 1471733935,
- 610547355,
- 4027169054,
- 1432588573,
- 1507829418,
- 2025931657,
- 3646575487,
- 545086370,
- 48609733,
- 2200306550,
- 1653985193,
- 298326376,
- 1316178497,
- 3007786442,
- 2064951626,
- 458293330,
- 2589141269,
- 3591329599,
- 3164325604,
- 727753846,
- 2179363840,
- 146436021,
- 1461446943,
- 4069977195,
- 705550613,
- 3059967265,
- 3887724982,
- 4281599278,
- 3313849956,
- 1404054877,
- 2845806497,
- 146425753,
- 1854211946
- ],
- [
- 1266315497,
- 3048417604,
- 3681880366,
- 3289982499,
- 290971e4,
- 1235738493,
- 2632868024,
- 2414719590,
- 3970600049,
- 1771706367,
- 1449415276,
- 3266420449,
- 422970021,
- 1963543593,
- 2690192192,
- 3826793022,
- 1062508698,
- 1531092325,
- 1804592342,
- 2583117782,
- 2714934279,
- 4024971509,
- 1294809318,
- 4028980673,
- 1289560198,
- 2221992742,
- 1669523910,
- 35572830,
- 157838143,
- 1052438473,
- 1016535060,
- 1802137761,
- 1753167236,
- 1386275462,
- 3080475397,
- 2857371447,
- 1040679964,
- 2145300060,
- 2390574316,
- 1461121720,
- 2956646967,
- 4031777805,
- 4028374788,
- 33600511,
- 2920084762,
- 1018524850,
- 629373528,
- 3691585981,
- 3515945977,
- 2091462646,
- 2486323059,
- 586499841,
- 988145025,
- 935516892,
- 3367335476,
- 2599673255,
- 2839830854,
- 265290510,
- 3972581182,
- 2759138881,
- 3795373465,
- 1005194799,
- 847297441,
- 406762289,
- 1314163512,
- 1332590856,
- 1866599683,
- 4127851711,
- 750260880,
- 613907577,
- 1450815602,
- 3165620655,
- 3734664991,
- 3650291728,
- 3012275730,
- 3704569646,
- 1427272223,
- 778793252,
- 1343938022,
- 2676280711,
- 2052605720,
- 1946737175,
- 3164576444,
- 3914038668,
- 3967478842,
- 3682934266,
- 1661551462,
- 3294938066,
- 4011595847,
- 840292616,
- 3712170807,
- 616741398,
- 312560963,
- 711312465,
- 1351876610,
- 322626781,
- 1910503582,
- 271666773,
- 2175563734,
- 1594956187,
- 70604529,
- 3617834859,
- 1007753275,
- 1495573769,
- 4069517037,
- 2549218298,
- 2663038764,
- 504708206,
- 2263041392,
- 3941167025,
- 2249088522,
- 1514023603,
- 1998579484,
- 1312622330,
- 694541497,
- 2582060303,
- 2151582166,
- 1382467621,
- 776784248,
- 2618340202,
- 3323268794,
- 2497899128,
- 2784771155,
- 503983604,
- 4076293799,
- 907881277,
- 423175695,
- 432175456,
- 1378068232,
- 4145222326,
- 3954048622,
- 3938656102,
- 3820766613,
- 2793130115,
- 2977904593,
- 26017576,
- 3274890735,
- 3194772133,
- 1700274565,
- 1756076034,
- 4006520079,
- 3677328699,
- 720338349,
- 1533947780,
- 354530856,
- 688349552,
- 3973924725,
- 1637815568,
- 332179504,
- 3949051286,
- 53804574,
- 2852348879,
- 3044236432,
- 1282449977,
- 3583942155,
- 3416972820,
- 4006381244,
- 1617046695,
- 2628476075,
- 3002303598,
- 1686838959,
- 431878346,
- 2686675385,
- 1700445008,
- 1080580658,
- 1009431731,
- 832498133,
- 3223435511,
- 2605976345,
- 2271191193,
- 2516031870,
- 1648197032,
- 4164389018,
- 2548247927,
- 300782431,
- 375919233,
- 238389289,
- 3353747414,
- 2531188641,
- 2019080857,
- 1475708069,
- 455242339,
- 2609103871,
- 448939670,
- 3451063019,
- 1395535956,
- 2413381860,
- 1841049896,
- 1491858159,
- 885456874,
- 4264095073,
- 4001119347,
- 1565136089,
- 3898914787,
- 1108368660,
- 540939232,
- 1173283510,
- 2745871338,
- 3681308437,
- 4207628240,
- 3343053890,
- 4016749493,
- 1699691293,
- 1103962373,
- 3625875870,
- 2256883143,
- 3830138730,
- 1031889488,
- 3479347698,
- 1535977030,
- 4236805024,
- 3251091107,
- 2132092099,
- 1774941330,
- 1199868427,
- 1452454533,
- 157007616,
- 2904115357,
- 342012276,
- 595725824,
- 1480756522,
- 206960106,
- 497939518,
- 591360097,
- 863170706,
- 2375253569,
- 3596610801,
- 1814182875,
- 2094937945,
- 3421402208,
- 1082520231,
- 3463918190,
- 2785509508,
- 435703966,
- 3908032597,
- 1641649973,
- 2842273706,
- 3305899714,
- 1510255612,
- 2148256476,
- 2655287854,
- 3276092548,
- 4258621189,
- 236887753,
- 3681803219,
- 274041037,
- 1734335097,
- 3815195456,
- 3317970021,
- 1899903192,
- 1026095262,
- 4050517792,
- 356393447,
- 2410691914,
- 3873677099,
- 3682840055
- ],
- [
- 3913112168,
- 2491498743,
- 4132185628,
- 2489919796,
- 1091903735,
- 1979897079,
- 3170134830,
- 3567386728,
- 3557303409,
- 857797738,
- 1136121015,
- 1342202287,
- 507115054,
- 2535736646,
- 337727348,
- 3213592640,
- 1301675037,
- 2528481711,
- 1895095763,
- 1721773893,
- 3216771564,
- 62756741,
- 2142006736,
- 835421444,
- 2531993523,
- 1442658625,
- 3659876326,
- 2882144922,
- 676362277,
- 1392781812,
- 170690266,
- 3921047035,
- 1759253602,
- 3611846912,
- 1745797284,
- 664899054,
- 1329594018,
- 3901205900,
- 3045908486,
- 2062866102,
- 2865634940,
- 3543621612,
- 3464012697,
- 1080764994,
- 553557557,
- 3656615353,
- 3996768171,
- 991055499,
- 499776247,
- 1265440854,
- 648242737,
- 3940784050,
- 980351604,
- 3713745714,
- 1749149687,
- 3396870395,
- 4211799374,
- 3640570775,
- 1161844396,
- 3125318951,
- 1431517754,
- 545492359,
- 4268468663,
- 3499529547,
- 1437099964,
- 2702547544,
- 3433638243,
- 2581715763,
- 2787789398,
- 1060185593,
- 1593081372,
- 2418618748,
- 4260947970,
- 69676912,
- 2159744348,
- 86519011,
- 2512459080,
- 3838209314,
- 1220612927,
- 3339683548,
- 133810670,
- 1090789135,
- 1078426020,
- 1569222167,
- 845107691,
- 3583754449,
- 4072456591,
- 1091646820,
- 628848692,
- 1613405280,
- 3757631651,
- 526609435,
- 236106946,
- 48312990,
- 2942717905,
- 3402727701,
- 1797494240,
- 859738849,
- 992217954,
- 4005476642,
- 2243076622,
- 3870952857,
- 3732016268,
- 765654824,
- 3490871365,
- 2511836413,
- 1685915746,
- 3888969200,
- 1414112111,
- 2273134842,
- 3281911079,
- 4080962846,
- 172450625,
- 2569994100,
- 980381355,
- 4109958455,
- 2819808352,
- 2716589560,
- 2568741196,
- 3681446669,
- 3329971472,
- 1835478071,
- 660984891,
- 3704678404,
- 4045999559,
- 3422617507,
- 3040415634,
- 1762651403,
- 1719377915,
- 3470491036,
- 2693910283,
- 3642056355,
- 3138596744,
- 1364962596,
- 2073328063,
- 1983633131,
- 926494387,
- 3423689081,
- 2150032023,
- 4096667949,
- 1749200295,
- 3328846651,
- 309677260,
- 2016342300,
- 1779581495,
- 3079819751,
- 111262694,
- 1274766160,
- 443224088,
- 298511866,
- 1025883608,
- 3806446537,
- 1145181785,
- 168956806,
- 3641502830,
- 3584813610,
- 1689216846,
- 3666258015,
- 3200248200,
- 1692713982,
- 2646376535,
- 4042768518,
- 1618508792,
- 1610833997,
- 3523052358,
- 4130873264,
- 2001055236,
- 3610705100,
- 2202168115,
- 4028541809,
- 2961195399,
- 1006657119,
- 2006996926,
- 3186142756,
- 1430667929,
- 3210227297,
- 1314452623,
- 4074634658,
- 4101304120,
- 2273951170,
- 1399257539,
- 3367210612,
- 3027628629,
- 1190975929,
- 2062231137,
- 2333990788,
- 2221543033,
- 2438960610,
- 1181637006,
- 548689776,
- 2362791313,
- 3372408396,
- 3104550113,
- 3145860560,
- 296247880,
- 1970579870,
- 3078560182,
- 3769228297,
- 1714227617,
- 3291629107,
- 3898220290,
- 166772364,
- 1251581989,
- 493813264,
- 448347421,
- 195405023,
- 2709975567,
- 677966185,
- 3703036547,
- 1463355134,
- 2715995803,
- 1338867538,
- 1343315457,
- 2802222074,
- 2684532164,
- 233230375,
- 2599980071,
- 2000651841,
- 3277868038,
- 1638401717,
- 4028070440,
- 3237316320,
- 6314154,
- 819756386,
- 300326615,
- 590932579,
- 1405279636,
- 3267499572,
- 3150704214,
- 2428286686,
- 3959192993,
- 3461946742,
- 1862657033,
- 1266418056,
- 963775037,
- 2089974820,
- 2263052895,
- 1917689273,
- 448879540,
- 3550394620,
- 3981727096,
- 150775221,
- 3627908307,
- 1303187396,
- 508620638,
- 2975983352,
- 2726630617,
- 1817252668,
- 1876281319,
- 1457606340,
- 908771278,
- 3720792119,
- 3617206836,
- 2455994898,
- 1729034894,
- 1080033504
- ],
- [
- 976866871,
- 3556439503,
- 2881648439,
- 1522871579,
- 1555064734,
- 1336096578,
- 3548522304,
- 2579274686,
- 3574697629,
- 3205460757,
- 3593280638,
- 3338716283,
- 3079412587,
- 564236357,
- 2993598910,
- 1781952180,
- 1464380207,
- 3163844217,
- 3332601554,
- 1699332808,
- 1393555694,
- 1183702653,
- 3581086237,
- 1288719814,
- 691649499,
- 2847557200,
- 2895455976,
- 3193889540,
- 2717570544,
- 1781354906,
- 1676643554,
- 2592534050,
- 3230253752,
- 1126444790,
- 2770207658,
- 2633158820,
- 2210423226,
- 2615765581,
- 2414155088,
- 3127139286,
- 673620729,
- 2805611233,
- 1269405062,
- 4015350505,
- 3341807571,
- 4149409754,
- 1057255273,
- 2012875353,
- 2162469141,
- 2276492801,
- 2601117357,
- 993977747,
- 3918593370,
- 2654263191,
- 753973209,
- 36408145,
- 2530585658,
- 25011837,
- 3520020182,
- 2088578344,
- 530523599,
- 2918365339,
- 1524020338,
- 1518925132,
- 3760827505,
- 3759777254,
- 1202760957,
- 3985898139,
- 3906192525,
- 674977740,
- 4174734889,
- 2031300136,
- 2019492241,
- 3983892565,
- 4153806404,
- 3822280332,
- 352677332,
- 2297720250,
- 60907813,
- 90501309,
- 3286998549,
- 1016092578,
- 2535922412,
- 2839152426,
- 457141659,
- 509813237,
- 4120667899,
- 652014361,
- 1966332200,
- 2975202805,
- 55981186,
- 2327461051,
- 676427537,
- 3255491064,
- 2882294119,
- 3433927263,
- 1307055953,
- 942726286,
- 933058658,
- 2468411793,
- 3933900994,
- 4215176142,
- 1361170020,
- 2001714738,
- 2830558078,
- 3274259782,
- 1222529897,
- 1679025792,
- 2729314320,
- 3714953764,
- 1770335741,
- 151462246,
- 3013232138,
- 1682292957,
- 1483529935,
- 471910574,
- 1539241949,
- 458788160,
- 3436315007,
- 1807016891,
- 3718408830,
- 978976581,
- 1043663428,
- 3165965781,
- 1927990952,
- 4200891579,
- 2372276910,
- 3208408903,
- 3533431907,
- 1412390302,
- 2931980059,
- 4132332400,
- 1947078029,
- 3881505623,
- 4168226417,
- 2941484381,
- 1077988104,
- 1320477388,
- 886195818,
- 18198404,
- 3786409e3,
- 2509781533,
- 112762804,
- 3463356488,
- 1866414978,
- 891333506,
- 18488651,
- 661792760,
- 1628790961,
- 3885187036,
- 3141171499,
- 876946877,
- 2693282273,
- 1372485963,
- 791857591,
- 2686433993,
- 3759982718,
- 3167212022,
- 3472953795,
- 2716379847,
- 445679433,
- 3561995674,
- 3504004811,
- 3574258232,
- 54117162,
- 3331405415,
- 2381918588,
- 3769707343,
- 4154350007,
- 1140177722,
- 4074052095,
- 668550556,
- 3214352940,
- 367459370,
- 261225585,
- 2610173221,
- 4209349473,
- 3468074219,
- 3265815641,
- 314222801,
- 3066103646,
- 3808782860,
- 282218597,
- 3406013506,
- 3773591054,
- 379116347,
- 1285071038,
- 846784868,
- 2669647154,
- 3771962079,
- 3550491691,
- 2305946142,
- 453669953,
- 1268987020,
- 3317592352,
- 3279303384,
- 3744833421,
- 2610507566,
- 3859509063,
- 266596637,
- 3847019092,
- 517658769,
- 3462560207,
- 3443424879,
- 370717030,
- 4247526661,
- 2224018117,
- 4143653529,
- 4112773975,
- 2788324899,
- 2477274417,
- 1456262402,
- 2901442914,
- 1517677493,
- 1846949527,
- 2295493580,
- 3734397586,
- 2176403920,
- 1280348187,
- 1908823572,
- 3871786941,
- 846861322,
- 1172426758,
- 3287448474,
- 3383383037,
- 1655181056,
- 3139813346,
- 901632758,
- 1897031941,
- 2986607138,
- 3066810236,
- 3447102507,
- 1393639104,
- 373351379,
- 950779232,
- 625454576,
- 3124240540,
- 4148612726,
- 2007998917,
- 544563296,
- 2244738638,
- 2330496472,
- 2058025392,
- 1291430526,
- 424198748,
- 50039436,
- 29584100,
- 3605783033,
- 2429876329,
- 2791104160,
- 1057563949,
- 3255363231,
- 3075367218,
- 3463963227,
- 1469046755,
- 985887462
- ]
- ];
- var BLOWFISH_CTX = {
- pbox: [],
- sbox: []
- };
- function F(ctx, x) {
- let a = x >> 24 & 255;
- let b = x >> 16 & 255;
- let c = x >> 8 & 255;
- let d = x & 255;
- let y = ctx.sbox[0][a] + ctx.sbox[1][b];
- y = y ^ ctx.sbox[2][c];
- y = y + ctx.sbox[3][d];
- return y;
- }
- function BlowFish_Encrypt(ctx, left, right) {
- let Xl = left;
- let Xr = right;
- let temp;
- for (let i = 0; i < N; ++i) {
- Xl = Xl ^ ctx.pbox[i];
- Xr = F(ctx, Xl) ^ Xr;
- temp = Xl;
- Xl = Xr;
- Xr = temp;
- }
- temp = Xl;
- Xl = Xr;
- Xr = temp;
- Xr = Xr ^ ctx.pbox[N];
- Xl = Xl ^ ctx.pbox[N + 1];
- return { left: Xl, right: Xr };
- }
- function BlowFish_Decrypt(ctx, left, right) {
- let Xl = left;
- let Xr = right;
- let temp;
- for (let i = N + 1; i > 1; --i) {
- Xl = Xl ^ ctx.pbox[i];
- Xr = F(ctx, Xl) ^ Xr;
- temp = Xl;
- Xl = Xr;
- Xr = temp;
- }
- temp = Xl;
- Xl = Xr;
- Xr = temp;
- Xr = Xr ^ ctx.pbox[1];
- Xl = Xl ^ ctx.pbox[0];
- return { left: Xl, right: Xr };
- }
- function BlowFishInit(ctx, key, keysize) {
- for (let Row = 0; Row < 4; Row++) {
- ctx.sbox[Row] = [];
- for (let Col = 0; Col < 256; Col++) {
- ctx.sbox[Row][Col] = ORIG_S[Row][Col];
- }
- }
- let keyIndex = 0;
- for (let index = 0; index < N + 2; index++) {
- ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex];
- keyIndex++;
- if (keyIndex >= keysize) {
- keyIndex = 0;
- }
- }
- let Data1 = 0;
- let Data2 = 0;
- let res = 0;
- for (let i = 0; i < N + 2; i += 2) {
- res = BlowFish_Encrypt(ctx, Data1, Data2);
- Data1 = res.left;
- Data2 = res.right;
- ctx.pbox[i] = Data1;
- ctx.pbox[i + 1] = Data2;
- }
- for (let i = 0; i < 4; i++) {
- for (let j = 0; j < 256; j += 2) {
- res = BlowFish_Encrypt(ctx, Data1, Data2);
- Data1 = res.left;
- Data2 = res.right;
- ctx.sbox[i][j] = Data1;
- ctx.sbox[i][j + 1] = Data2;
- }
- }
- return true;
- }
- var Blowfish = C_algo.Blowfish = BlockCipher.extend({
- _doReset: function() {
- if (this._keyPriorReset === this._key) {
- return;
- }
- var key = this._keyPriorReset = this._key;
- var keyWords = key.words;
- var keySize = key.sigBytes / 4;
- BlowFishInit(BLOWFISH_CTX, keyWords, keySize);
- },
- encryptBlock: function(M, offset) {
- var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
- M[offset] = res.left;
- M[offset + 1] = res.right;
- },
- decryptBlock: function(M, offset) {
- var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
- M[offset] = res.left;
- M[offset + 1] = res.right;
- },
- blockSize: 64 / 32,
- keySize: 128 / 32,
- ivSize: 64 / 32
- });
- C.Blowfish = BlockCipher._createHelper(Blowfish);
- })();
- return CryptoJS.Blowfish;
- });
- })(blowfish$1);
- return blowfish$1.exports;
-}
-var cryptoJs = cryptoJs$1.exports;
-var hasRequiredCryptoJs;
-function requireCryptoJs() {
- if (hasRequiredCryptoJs) return cryptoJs$1.exports;
- hasRequiredCryptoJs = 1;
- (function(module, exports) {
- (function(root, factory, undef) {
- {
- module.exports = factory(requireCore(), requireX64Core(), requireLibTypedarrays(), requireEncUtf16(), requireEncBase64(), requireEncBase64url(), requireMd5(), requireSha1(), requireSha256(), requireSha224(), requireSha512(), requireSha384(), requireSha3(), requireRipemd160(), requireHmac(), requirePbkdf2(), requireEvpkdf(), requireCipherCore(), requireModeCfb(), requireModeCtr(), requireModeCtrGladman(), requireModeOfb(), requireModeEcb(), requirePadAnsix923(), requirePadIso10126(), requirePadIso97971(), requirePadZeropadding(), requirePadNopadding(), requireFormatHex(), requireAes(), requireTripledes(), requireRc4(), requireRabbit(), requireRabbitLegacy(), requireBlowfish());
- }
- })(cryptoJs, function(CryptoJS) {
- return CryptoJS;
- });
- })(cryptoJs$1);
- return cryptoJs$1.exports;
-}
-var cryptoJsExports = requireCryptoJs();
-const appUrl = () => {
- return window.location.port !== 6970 ? `http://${window.location.hostname}:6970` : "";
-};
-const isLocal = () => {
- return window.location.hostname === "127.0.0.1" || window.location.hostname === "localhost";
-};
-const byteToHex = [];
-for (let i = 0; i < 256; ++i) {
- byteToHex.push((i + 256).toString(16).slice(1));
-}
-function unsafeStringify(arr, offset = 0) {
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
-}
-let getRandomValues;
-const rnds8 = new Uint8Array(16);
-function rng() {
- if (!getRandomValues) {
- if (typeof crypto === "undefined" || !crypto.getRandomValues) {
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
- }
- getRandomValues = crypto.getRandomValues.bind(crypto);
- }
- return getRandomValues(rnds8);
-}
-const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
-const native = { randomUUID };
-function v4(options, buf, offset) {
- var _a;
- if (native.randomUUID && true && !options) {
- return native.randomUUID();
- }
- options = options || {};
- const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
- if (rnds.length < 16) {
- throw new Error("Random bytes length must be >= 16");
- }
- rnds[6] = rnds[6] & 15 | 64;
- rnds[8] = rnds[8] & 63 | 128;
- return unsafeStringify(rnds);
-}
-const encryptAES = (key, str) => {
- key = keyPad(key);
- let iv = cryptoJsExports.enc.Utf8.parse("5380045276373006");
- let encrypted = cryptoJsExports.AES.encrypt(str, key, {
- iv,
- padding: cryptoJsExports.pad.Pkcs7
- });
- return encrypted.toString();
-};
-const decryptAES = (key, str) => {
- key = keyPad(key);
- let iv = cryptoJsExports.enc.Utf8.parse("5380045276373006");
- let encrypted = cryptoJsExports.AES.decrypt(str.toString(), key, {
- iv,
- padding: cryptoJsExports.pad.Pkcs7
- });
- return encrypted.toString(cryptoJsExports.enc.Utf8);
-};
-const AuthCall = (data) => {
- const device = useDeviceStore();
- return {
- uuid: device.uuid(),
- d: encryptAES(device.key(), JSON.stringify(data))
- };
-};
-function keyPad(key) {
- let returnKey = key;
- if (key.length == 4) {
- returnKey = key + "9ebWgVO9cpLeZ1PkXYcPvE0NZie0";
- }
- return cryptoJsExports.enc.Utf8.parse(returnKey);
-}
-const getDateStr = () => {
- const date = /* @__PURE__ */ new Date();
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, "0");
- const day = String(date.getDate()).padStart(2, "0");
- return `${year}${month}${day}`;
-};
-const useDeviceStore = /* @__PURE__ */ defineStore("device", () => {
- const current = ref({
- uuid: false,
- key: false
- });
- const remote = ref([]);
- const server = ref({
- status: false
- });
- const uuid = () => {
- if (!current.value.uuid && localStorage.getItem("deviceId")) {
- current.value.uuid = localStorage.getItem("deviceId");
- } else if (!current.value.uuid) {
- current.value.uuid = setDeviceId();
- }
- return current.value.uuid;
- };
- const setDeviceId = () => {
- const uuid2 = v4();
- localStorage.setItem("deviceId", uuid2);
- return uuid2;
- };
- const key = () => {
- if (!current.value.key && localStorage.getItem("deviceKey")) {
- current.value.key = localStorage.getItem("deviceKey");
- }
- return current.value.key;
- };
- const setDeviceKey = (key2) => {
- current.value.key = key2;
- localStorage.setItem("deviceKey", key2);
- };
- const removeDeviceKey = () => {
- current.value.key = false;
- localStorage.removeItem("deviceKey");
- };
- const serverGetRemotes = async (remoteUuid) => {
- axios.post(appUrl() + "/device/list", { uuid: remoteUuid }).then((data) => {
- if (data.data.devices) remote.value = data.data.devices;
- });
- };
- const serverStartLink = async (deviceUuid) => {
- const request = await axios.post(appUrl() + "/device/link/start", { uuid: deviceUuid });
- return request.data;
- };
- const remoteCheckServerAccess = async () => {
- const check = await axios.post(appUrl() + "/device/access/check", { uuid: uuid() });
- server.value.access = check.data;
- return check.data;
- };
- const remoteRequestServerAccess = async (deviceName, deviceType) => {
- const request = await axios.post(appUrl() + "/device/access/request", {
- uuid: uuid(),
- name: deviceName,
- type: deviceType
- });
- return request;
- };
- const remotePingLink = async (cb) => {
- const pingInterval = setInterval(() => {
- axios.post(appUrl() + "/device/link/ping", { uuid: uuid() }).then((data) => {
- if (data.data) {
- clearInterval(pingInterval);
- cb(data.data);
- }
- });
- }, 1e3);
- };
- const remoteHandshake = async (key2) => {
- const handshake = await axios.post(appUrl() + "/device/handshake", {
- uuid: uuid(),
- shake: encryptAES(key2, getDateStr())
- });
- console.log(handshake);
- return handshake.data;
- };
- return {
- remote,
- server,
- uuid,
- setDeviceId,
- key,
- setDeviceKey,
- removeDeviceKey,
- serverGetRemotes,
- serverStartLink,
- remoteCheckServerAccess,
- remoteRequestServerAccess,
- remotePingLink,
- remoteHandshake
- };
-});
-const _export_sfc = (sfc, props) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props) {
- target[key] = val;
- }
- return target;
-};
-const _sfc_main$1 = {
- __name: "App",
- setup(__props) {
- const device = useDeviceStore();
- onMounted(() => {
- device.uuid();
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock(Fragment, null, [
- _cache[0] || (_cache[0] = createBaseVNode("div", { class: "app-background" }, [
- createBaseVNode("img", {
- src: _imports_0$1,
- "aria-hidden": "true"
- }),
- createBaseVNode("img", {
- src: _imports_1,
- class: "logo",
- "aria-hidden": "true"
- })
- ], -1)),
- createVNode(_sfc_main$2),
- createVNode(unref(RouterView))
- ], 64);
- };
- }
-};
-const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bf34f349"]]);
-const scriptRel = "modulepreload";
-const assetsURL = function(dep) {
- return "/" + dep;
-};
-const seen = {};
-const __vitePreload = function preload(baseModule, deps, importerUrl) {
- let promise = Promise.resolve();
- if (deps && deps.length > 0) {
- document.getElementsByTagName("link");
- const cspNonceMeta = document.querySelector(
- "meta[property=csp-nonce]"
- );
- const cspNonce = (cspNonceMeta == null ? void 0 : cspNonceMeta.nonce) || (cspNonceMeta == null ? void 0 : cspNonceMeta.getAttribute("nonce"));
- promise = Promise.allSettled(
- deps.map((dep) => {
- dep = assetsURL(dep);
- if (dep in seen) return;
- seen[dep] = true;
- const isCss = dep.endsWith(".css");
- const cssSelector = isCss ? '[rel="stylesheet"]' : "";
- if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
- return;
- }
- const link = document.createElement("link");
- link.rel = isCss ? "stylesheet" : scriptRel;
- if (!isCss) {
- link.as = "script";
- }
- link.crossOrigin = "";
- link.href = dep;
- if (cspNonce) {
- link.setAttribute("nonce", cspNonce);
- }
- document.head.appendChild(link);
- if (isCss) {
- return new Promise((res, rej) => {
- link.addEventListener("load", res);
- link.addEventListener(
- "error",
- () => rej(new Error(`Unable to preload CSS for ${dep}`))
- );
- });
- }
- })
- );
- }
- function handlePreloadError(err) {
- const e = new Event("vite:preloadError", {
- cancelable: true
- });
- e.payload = err;
- window.dispatchEvent(e);
- if (!e.defaultPrevented) {
- throw err;
- }
- }
- return promise.then((res) => {
- for (const item of res || []) {
- if (item.status !== "rejected") continue;
- handlePreloadError(item.reason);
- }
- return baseModule().catch(handlePreloadError);
- });
-};
-const _sfc_main = {};
-const _hoisted_1 = { id: "dashboard" };
-function _sfc_render(_ctx, _cache) {
- return openBlock(), createElementBlock("div", _hoisted_1);
-}
-const HomeView = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
-const router = createRouter({
- history: createWebHistory("/"),
- routes: [
- {
- path: "/",
- name: "home",
- component: HomeView
- },
- {
- path: "/panels",
- name: "panels",
- component: () => __vitePreload(() => import("./PanelsView-DHxhdGwy.js"), true ? [] : void 0)
- },
- {
- path: "/macros",
- name: "macros",
- component: () => __vitePreload(() => import("./MacrosView-Bf1eb3go.js"), true ? __vite__mapDeps([0,1,2,3]) : void 0)
- },
- {
- path: "/devices",
- name: "devices",
- component: () => __vitePreload(() => import("./DevicesView-DqasecOn.js"), true ? __vite__mapDeps([4,1,2,5]) : void 0)
- },
- {
- path: "/settings",
- name: "settings",
- component: () => __vitePreload(() => import("./SettingsView-CVQl1jsc.js"), true ? [] : void 0)
- }
- // {
- // path: '/about',
- // name: 'about',
- // // route level code-splitting
- // // this generates a separate chunk (About.[hash].js) for this route
- // // which is lazy-loaded when the route is visited.
- // component: () => import('../views/AboutView.vue'),
- // },
- ]
-});
-const app = createApp(App);
-app.use(createPinia());
-app.use(router);
-app.mount("#app");
-export {
- AuthCall as A,
- IconDevices as B,
- decryptAES as C,
- computed as D,
- IconX as E,
- Fragment as F,
- IconKeyboard as I,
- _export_sfc as _,
- createVueComponent as a,
- onMounted as b,
- createElementBlock as c,
- axios as d,
- appUrl as e,
- createBaseVNode as f,
- renderList as g,
- createVNode as h,
- createTextVNode as i,
- withModifiers as j,
- isLocal as k,
- defineStore as l,
- ref as m,
- onUpdated as n,
- openBlock as o,
- createCommentVNode as p,
- normalizeClass as q,
- reactive as r,
- createBlock as s,
- toDisplayString as t,
- unref as u,
- renderSlot as v,
- withCtx as w,
- withDirectives as x,
- vModelText as y,
- useDeviceStore as z
-};
diff --git a/public/index.html b/public/index.html
deleted file mode 100644
index 1caa951..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
- Vite + Vue
-
-
-
-
-
-
-
diff --git a/tmp/build-errors.log b/tmp/build-errors.log
deleted file mode 100644
index 05e5985..0000000
--- a/tmp/build-errors.log
+++ /dev/null
@@ -1 +0,0 @@
-exit status 1
\ No newline at end of file
diff --git a/fe/.editorconfig b/ui/.editorconfig
similarity index 100%
rename from fe/.editorconfig
rename to ui/.editorconfig
diff --git a/fe/.gitattributes b/ui/.gitattributes
similarity index 100%
rename from fe/.gitattributes
rename to ui/.gitattributes
diff --git a/fe/.gitignore b/ui/.gitignore
similarity index 100%
rename from fe/.gitignore
rename to ui/.gitignore
diff --git a/fe/.prettierrc.json b/ui/.prettierrc.json
similarity index 100%
rename from fe/.prettierrc.json
rename to ui/.prettierrc.json
diff --git a/fe/.vscode/extensions.json b/ui/.vscode/extensions.json
similarity index 100%
rename from fe/.vscode/extensions.json
rename to ui/.vscode/extensions.json
diff --git a/fe/README.md b/ui/README.md
similarity index 100%
rename from fe/README.md
rename to ui/README.md
diff --git a/fe/eslint.config.js b/ui/eslint.config.js
similarity index 100%
rename from fe/eslint.config.js
rename to ui/eslint.config.js
diff --git a/fe/index.html b/ui/index.html
similarity index 100%
rename from fe/index.html
rename to ui/index.html
diff --git a/fe/jsconfig.json b/ui/jsconfig.json
similarity index 100%
rename from fe/jsconfig.json
rename to ui/jsconfig.json
diff --git a/fe/mcrm-icon.svg b/ui/mcrm-icon.svg
similarity index 100%
rename from fe/mcrm-icon.svg
rename to ui/mcrm-icon.svg
diff --git a/fe/package-lock.json b/ui/package-lock.json
similarity index 100%
rename from fe/package-lock.json
rename to ui/package-lock.json
diff --git a/fe/package.json b/ui/package.json
similarity index 100%
rename from fe/package.json
rename to ui/package.json
diff --git a/fe/public/assets/index-CNkZ911J.js b/ui/public/assets/index-CNkZ911J.js
similarity index 100%
rename from fe/public/assets/index-CNkZ911J.js
rename to ui/public/assets/index-CNkZ911J.js
diff --git a/fe/public/assets/index-zqIqfzzx.css b/ui/public/assets/index-zqIqfzzx.css
similarity index 100%
rename from fe/public/assets/index-zqIqfzzx.css
rename to ui/public/assets/index-zqIqfzzx.css
diff --git a/fe/public/index.html b/ui/public/index.html
similarity index 100%
rename from fe/public/index.html
rename to ui/public/index.html
diff --git a/fe/src/App.vue b/ui/src/App.vue
similarity index 100%
rename from fe/src/App.vue
rename to ui/src/App.vue
diff --git a/fe/src/assets/img/Macrame-Logo-duo.svg b/ui/src/assets/img/Macrame-Logo-duo.svg
similarity index 100%
rename from fe/src/assets/img/Macrame-Logo-duo.svg
rename to ui/src/assets/img/Macrame-Logo-duo.svg
diff --git a/fe/src/assets/img/Macrame-Logo-gradient.svg b/ui/src/assets/img/Macrame-Logo-gradient.svg
similarity index 100%
rename from fe/src/assets/img/Macrame-Logo-gradient.svg
rename to ui/src/assets/img/Macrame-Logo-gradient.svg
diff --git a/fe/src/assets/img/Macrame-Logo-white.svg b/ui/src/assets/img/Macrame-Logo-white.svg
similarity index 100%
rename from fe/src/assets/img/Macrame-Logo-white.svg
rename to ui/src/assets/img/Macrame-Logo-white.svg
diff --git a/fe/src/assets/img/bg-gradient.svg b/ui/src/assets/img/bg-gradient.svg
similarity index 100%
rename from fe/src/assets/img/bg-gradient.svg
rename to ui/src/assets/img/bg-gradient.svg
diff --git a/fe/src/assets/main.css b/ui/src/assets/main.css
similarity index 100%
rename from fe/src/assets/main.css
rename to ui/src/assets/main.css
diff --git a/fe/src/assets/style/_content.css b/ui/src/assets/style/_content.css
similarity index 100%
rename from fe/src/assets/style/_content.css
rename to ui/src/assets/style/_content.css
diff --git a/fe/src/assets/style/_form.css b/ui/src/assets/style/_form.css
similarity index 100%
rename from fe/src/assets/style/_form.css
rename to ui/src/assets/style/_form.css
diff --git a/fe/src/assets/style/_macro.css b/ui/src/assets/style/_macro.css
similarity index 100%
rename from fe/src/assets/style/_macro.css
rename to ui/src/assets/style/_macro.css
diff --git a/fe/src/assets/style/_mcrm-block.css b/ui/src/assets/style/_mcrm-block.css
similarity index 100%
rename from fe/src/assets/style/_mcrm-block.css
rename to ui/src/assets/style/_mcrm-block.css
diff --git a/fe/src/assets/style/_panel.css b/ui/src/assets/style/_panel.css
similarity index 100%
rename from fe/src/assets/style/_panel.css
rename to ui/src/assets/style/_panel.css
diff --git a/fe/src/assets/style/_scrollbar.css b/ui/src/assets/style/_scrollbar.css
similarity index 100%
rename from fe/src/assets/style/_scrollbar.css
rename to ui/src/assets/style/_scrollbar.css
diff --git a/fe/src/components/base/AccordionComp.vue b/ui/src/components/base/AccordionComp.vue
similarity index 100%
rename from fe/src/components/base/AccordionComp.vue
rename to ui/src/components/base/AccordionComp.vue
diff --git a/fe/src/components/base/AlertComp.vue b/ui/src/components/base/AlertComp.vue
similarity index 100%
rename from fe/src/components/base/AlertComp.vue
rename to ui/src/components/base/AlertComp.vue
diff --git a/fe/src/components/base/ButtonComp.vue b/ui/src/components/base/ButtonComp.vue
similarity index 100%
rename from fe/src/components/base/ButtonComp.vue
rename to ui/src/components/base/ButtonComp.vue
diff --git a/fe/src/components/base/ButtonGroup.vue b/ui/src/components/base/ButtonGroup.vue
similarity index 100%
rename from fe/src/components/base/ButtonGroup.vue
rename to ui/src/components/base/ButtonGroup.vue
diff --git a/fe/src/components/base/ContextMenu.vue b/ui/src/components/base/ContextMenu.vue
similarity index 100%
rename from fe/src/components/base/ContextMenu.vue
rename to ui/src/components/base/ContextMenu.vue
diff --git a/fe/src/components/base/DialogComp.vue b/ui/src/components/base/DialogComp.vue
similarity index 100%
rename from fe/src/components/base/DialogComp.vue
rename to ui/src/components/base/DialogComp.vue
diff --git a/fe/src/components/base/LoadComp.vue b/ui/src/components/base/LoadComp.vue
similarity index 100%
rename from fe/src/components/base/LoadComp.vue
rename to ui/src/components/base/LoadComp.vue
diff --git a/fe/src/components/base/MainMenu.vue b/ui/src/components/base/MainMenu.vue
similarity index 100%
rename from fe/src/components/base/MainMenu.vue
rename to ui/src/components/base/MainMenu.vue
diff --git a/fe/src/components/dashboard/RemoteView.vue b/ui/src/components/dashboard/RemoteView.vue
similarity index 100%
rename from fe/src/components/dashboard/RemoteView.vue
rename to ui/src/components/dashboard/RemoteView.vue
diff --git a/fe/src/components/dashboard/ServerView.vue b/ui/src/components/dashboard/ServerView.vue
similarity index 100%
rename from fe/src/components/dashboard/ServerView.vue
rename to ui/src/components/dashboard/ServerView.vue
diff --git a/fe/src/components/devices/RemoteView.vue b/ui/src/components/devices/RemoteView.vue
similarity index 100%
rename from fe/src/components/devices/RemoteView.vue
rename to ui/src/components/devices/RemoteView.vue
diff --git a/fe/src/components/devices/ServerView.vue b/ui/src/components/devices/ServerView.vue
similarity index 100%
rename from fe/src/components/devices/ServerView.vue
rename to ui/src/components/devices/ServerView.vue
diff --git a/fe/src/components/form/FormSelect.vue b/ui/src/components/form/FormSelect.vue
similarity index 100%
rename from fe/src/components/form/FormSelect.vue
rename to ui/src/components/form/FormSelect.vue
diff --git a/fe/src/components/icons/IconCommunity.vue b/ui/src/components/icons/IconCommunity.vue
similarity index 100%
rename from fe/src/components/icons/IconCommunity.vue
rename to ui/src/components/icons/IconCommunity.vue
diff --git a/fe/src/components/icons/IconDocumentation.vue b/ui/src/components/icons/IconDocumentation.vue
similarity index 100%
rename from fe/src/components/icons/IconDocumentation.vue
rename to ui/src/components/icons/IconDocumentation.vue
diff --git a/fe/src/components/icons/IconEcosystem.vue b/ui/src/components/icons/IconEcosystem.vue
similarity index 100%
rename from fe/src/components/icons/IconEcosystem.vue
rename to ui/src/components/icons/IconEcosystem.vue
diff --git a/fe/src/components/icons/IconSupport.vue b/ui/src/components/icons/IconSupport.vue
similarity index 100%
rename from fe/src/components/icons/IconSupport.vue
rename to ui/src/components/icons/IconSupport.vue
diff --git a/fe/src/components/icons/IconTooling.vue b/ui/src/components/icons/IconTooling.vue
similarity index 100%
rename from fe/src/components/icons/IconTooling.vue
rename to ui/src/components/icons/IconTooling.vue
diff --git a/fe/src/components/macros/MacroOverview.vue b/ui/src/components/macros/MacroOverview.vue
similarity index 100%
rename from fe/src/components/macros/MacroOverview.vue
rename to ui/src/components/macros/MacroOverview.vue
diff --git a/fe/src/components/macros/MacroRecorder.vue b/ui/src/components/macros/MacroRecorder.vue
similarity index 100%
rename from fe/src/components/macros/MacroRecorder.vue
rename to ui/src/components/macros/MacroRecorder.vue
diff --git a/fe/src/components/macros/components/DelaySpan.vue b/ui/src/components/macros/components/DelaySpan.vue
similarity index 100%
rename from fe/src/components/macros/components/DelaySpan.vue
rename to ui/src/components/macros/components/DelaySpan.vue
diff --git a/fe/src/components/macros/components/DeleteKeyDialog.vue b/ui/src/components/macros/components/DeleteKeyDialog.vue
similarity index 100%
rename from fe/src/components/macros/components/DeleteKeyDialog.vue
rename to ui/src/components/macros/components/DeleteKeyDialog.vue
diff --git a/fe/src/components/macros/components/EditDelayDialog.vue b/ui/src/components/macros/components/EditDelayDialog.vue
similarity index 100%
rename from fe/src/components/macros/components/EditDelayDialog.vue
rename to ui/src/components/macros/components/EditDelayDialog.vue
diff --git a/fe/src/components/macros/components/EditKeyDialog.vue b/ui/src/components/macros/components/EditKeyDialog.vue
similarity index 100%
rename from fe/src/components/macros/components/EditKeyDialog.vue
rename to ui/src/components/macros/components/EditKeyDialog.vue
diff --git a/fe/src/components/macros/components/FixedDelayMenu.vue b/ui/src/components/macros/components/FixedDelayMenu.vue
similarity index 100%
rename from fe/src/components/macros/components/FixedDelayMenu.vue
rename to ui/src/components/macros/components/FixedDelayMenu.vue
diff --git a/fe/src/components/macros/components/InsertKeyDialog.vue b/ui/src/components/macros/components/InsertKeyDialog.vue
similarity index 100%
rename from fe/src/components/macros/components/InsertKeyDialog.vue
rename to ui/src/components/macros/components/InsertKeyDialog.vue
diff --git a/fe/src/components/macros/components/MacroKey.vue b/ui/src/components/macros/components/MacroKey.vue
similarity index 100%
rename from fe/src/components/macros/components/MacroKey.vue
rename to ui/src/components/macros/components/MacroKey.vue
diff --git a/fe/src/components/macros/components/ValidationErrorDialog.vue b/ui/src/components/macros/components/ValidationErrorDialog.vue
similarity index 100%
rename from fe/src/components/macros/components/ValidationErrorDialog.vue
rename to ui/src/components/macros/components/ValidationErrorDialog.vue
diff --git a/fe/src/components/macros/parts/EditDialogs.vue b/ui/src/components/macros/parts/EditDialogs.vue
similarity index 100%
rename from fe/src/components/macros/parts/EditDialogs.vue
rename to ui/src/components/macros/parts/EditDialogs.vue
diff --git a/fe/src/components/macros/parts/RecorderFooter.vue b/ui/src/components/macros/parts/RecorderFooter.vue
similarity index 100%
rename from fe/src/components/macros/parts/RecorderFooter.vue
rename to ui/src/components/macros/parts/RecorderFooter.vue
diff --git a/fe/src/components/macros/parts/RecorderHeader.vue b/ui/src/components/macros/parts/RecorderHeader.vue
similarity index 100%
rename from fe/src/components/macros/parts/RecorderHeader.vue
rename to ui/src/components/macros/parts/RecorderHeader.vue
diff --git a/fe/src/components/macros/parts/RecorderInput.vue b/ui/src/components/macros/parts/RecorderInput.vue
similarity index 100%
rename from fe/src/components/macros/parts/RecorderInput.vue
rename to ui/src/components/macros/parts/RecorderInput.vue
diff --git a/fe/src/components/macros/parts/RecorderOutput.vue b/ui/src/components/macros/parts/RecorderOutput.vue
similarity index 100%
rename from fe/src/components/macros/parts/RecorderOutput.vue
rename to ui/src/components/macros/parts/RecorderOutput.vue
diff --git a/fe/src/components/panels/PanelEdit.vue b/ui/src/components/panels/PanelEdit.vue
similarity index 100%
rename from fe/src/components/panels/PanelEdit.vue
rename to ui/src/components/panels/PanelEdit.vue
diff --git a/fe/src/components/panels/PanelView.vue b/ui/src/components/panels/PanelView.vue
similarity index 100%
rename from fe/src/components/panels/PanelView.vue
rename to ui/src/components/panels/PanelView.vue
diff --git a/fe/src/components/panels/PanelsOverview.vue b/ui/src/components/panels/PanelsOverview.vue
similarity index 100%
rename from fe/src/components/panels/PanelsOverview.vue
rename to ui/src/components/panels/PanelsOverview.vue
diff --git a/fe/src/main.js b/ui/src/main.js
similarity index 100%
rename from fe/src/main.js
rename to ui/src/main.js
diff --git a/fe/src/router/index.js b/ui/src/router/index.js
similarity index 100%
rename from fe/src/router/index.js
rename to ui/src/router/index.js
diff --git a/fe/src/services/ApiService.js b/ui/src/services/ApiService.js
similarity index 100%
rename from fe/src/services/ApiService.js
rename to ui/src/services/ApiService.js
diff --git a/fe/src/services/EncryptService.js b/ui/src/services/EncryptService.js
similarity index 100%
rename from fe/src/services/EncryptService.js
rename to ui/src/services/EncryptService.js
diff --git a/fe/src/services/MacroRecordService.js b/ui/src/services/MacroRecordService.js
similarity index 100%
rename from fe/src/services/MacroRecordService.js
rename to ui/src/services/MacroRecordService.js
diff --git a/fe/src/services/MacroService.js b/ui/src/services/MacroService.js
similarity index 100%
rename from fe/src/services/MacroService.js
rename to ui/src/services/MacroService.js
diff --git a/fe/src/services/PanelService.js b/ui/src/services/PanelService.js
similarity index 100%
rename from fe/src/services/PanelService.js
rename to ui/src/services/PanelService.js
diff --git a/fe/src/services/RobotKeys.md b/ui/src/services/RobotKeys.md
similarity index 100%
rename from fe/src/services/RobotKeys.md
rename to ui/src/services/RobotKeys.md
diff --git a/fe/src/stores/counter.js b/ui/src/stores/counter.js
similarity index 100%
rename from fe/src/stores/counter.js
rename to ui/src/stores/counter.js
diff --git a/fe/src/stores/device.js b/ui/src/stores/device.js
similarity index 100%
rename from fe/src/stores/device.js
rename to ui/src/stores/device.js
diff --git a/fe/src/stores/macrorecorder.js b/ui/src/stores/macrorecorder.js
similarity index 100%
rename from fe/src/stores/macrorecorder.js
rename to ui/src/stores/macrorecorder.js
diff --git a/fe/src/stores/panel.js b/ui/src/stores/panel.js
similarity index 100%
rename from fe/src/stores/panel.js
rename to ui/src/stores/panel.js
diff --git a/fe/src/views/DashboardView.vue b/ui/src/views/DashboardView.vue
similarity index 100%
rename from fe/src/views/DashboardView.vue
rename to ui/src/views/DashboardView.vue
diff --git a/fe/src/views/DevicesView.vue b/ui/src/views/DevicesView.vue
similarity index 100%
rename from fe/src/views/DevicesView.vue
rename to ui/src/views/DevicesView.vue
diff --git a/fe/src/views/HomeView.vue b/ui/src/views/HomeView.vue
similarity index 100%
rename from fe/src/views/HomeView.vue
rename to ui/src/views/HomeView.vue
diff --git a/fe/src/views/MacrosView.vue b/ui/src/views/MacrosView.vue
similarity index 100%
rename from fe/src/views/MacrosView.vue
rename to ui/src/views/MacrosView.vue
diff --git a/fe/src/views/PanelsView.vue b/ui/src/views/PanelsView.vue
similarity index 100%
rename from fe/src/views/PanelsView.vue
rename to ui/src/views/PanelsView.vue
diff --git a/fe/src/views/SettingsView.vue b/ui/src/views/SettingsView.vue
similarity index 100%
rename from fe/src/views/SettingsView.vue
rename to ui/src/views/SettingsView.vue
diff --git a/fe/vite.config.js b/ui/vite.config.js
similarity index 100%
rename from fe/vite.config.js
rename to ui/vite.config.js