commit 561cd27f81806065db54bd387ec06c0a5622af2c Author: liufumingren Date: Sat Jul 25 00:46:47 2026 +0800 初始化 diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..4ebc8ae --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +coverage diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..f304bdd --- /dev/null +++ b/.eslintrc @@ -0,0 +1,4 @@ +{ + "extends": "eslint-config-egg", + "root": true +} diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100644 index 0000000..6dacb0e --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,2 @@ +#!/bin/sh +node script/git-safety-check.cjs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64f350b --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +logs/ +npm-debug.log +yarn-error.log +node_modules/ +*-lock.json +*-lock.yaml +yarn.lock +coverage/ +.idea/ +run/ +.DS_Store +*.sw* +*.un~ +typings/ +.nyc_output/ +config/config.local.js +config/deploy.config.local.cjs +versioning/* +!versioning/.gitkeep diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..0c54fb9 --- /dev/null +++ b/.htaccess @@ -0,0 +1 @@ +# 请将伪静态规则或自定义Apache配置填写到此处 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..14b18bb --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Egg Debug", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run", + "dev", + "--", + "--inspect-brk" + ], + "console": "integratedTerminal", + "restart": true, + "autoAttachChildProcesses": true + }, + { + "type": "node", + "request": "launch", + "name": "Egg Test", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run", + "test:local", + "--", + "--inspect-brk" + ], + "autoAttachChildProcesses": true + } + ] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..b94c77d --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# ye4s + +tbyc + +## QuickStart + + + +see [egg docs][egg] for more detail. + +### Development + +```bash +npm i +npm run dev +open http://localhost:7001/ +``` + +### Deploy + +```bash +npm start +npm stop +``` + +### npm scripts + +- Use `npm run lint` to check code style. +- Use `npm test` to run unit test. + +[egg]: https://eggjs.org diff --git a/app/assets/about.html b/app/assets/about.html new file mode 100644 index 0000000..633d6a2 --- /dev/null +++ b/app/assets/about.html @@ -0,0 +1,124 @@ + + + + + + + 关于我们 — 天豹WMS + + + + + + + +
+
+ +

关于天豹WMS

+

致力于为中小型电商与仓储企业提供专业、稳定、高效的 SaaS 仓储管理服务。

+
+
+ + +
+
+
+

我们的愿景

+

天豹WMS 诞生于仓储运营的实际需求。我们深知中小型电商与三方仓储服务商在订单处理、库存管理、多平台对接等方面面临的痛点——系统复杂、对接成本高、运维负担重。因此,我们打造了这款基于 Egg.js 的企业级 WMS SaaS 服务,让仓储管理变得简单、高效。

+
+
+

核心优势

+
+
+
🛡️
+

稳定可靠

+

基于 Egg.js 3.x 企业级框架,历经多年生产环境验证,保障 99.9% 服务可用性。

+
+
+
🔗
+

平台标准对接

+

严格遵循阿里巴巴奇门协议,与淘宝/天猫等平台无缝集成,订单自动同步。

+
+
+
📱
+

多端支持

+

Web 管理端、PDA 手持终端、移动 App、微信小程序全覆盖,仓库作业随时随地。

+
+
+
🔒
+

数据安全

+

租户数据物理隔离,加密传输与存储,定期自动备份,保障您的数据安全无忧。

+
+
+
⚡
+

快速开通

+

SaaS 模式无需部署,提交申请即可快速开通,专注业务无需关心运维。

+
+
+
💬
+

及时响应

+

专业技术支持团队,企业版用户享专属客户经理与优先响应通道。

+
+
+
+
+

技术实力

+
+
Egg.js 3.x
+
MySQL + Sequelize
+
Redis 缓存
+
JWT 认证
+
REST / XML-RPC
+
OpenAPI
+
腾讯云 COS
+
SOAP 物流接口
+
ExcelJS
+
EJS 模板引擎
+
Node.js ≥ 18
+
多租户隔离
+
+
+
+

联系我们

+

如需开通服务或有任何疑问,请联系系统管理员。企业版用户可联系专属客户经理获取优先支持。

+
+ 申请开通服务 → + 查看帮助文档 → +
+
+
+
+ + + + + + + diff --git a/app/assets/features.html b/app/assets/features.html new file mode 100644 index 0000000..e300a3b --- /dev/null +++ b/app/assets/features.html @@ -0,0 +1,242 @@ + + + + + + + 功能详情 — 天豹WMS + + + + + + + +
+
+ +

覆盖仓储运营全链路

+

从订单接入到出库配送,从库存管控到数据决策,十大功能模块一站式满足仓储管理需求。

+
+
+ +
+
+ +
+
+
+ 01 +

订单全生命周期管理

+

M1 → M6 状态机驱动的完整流转链路,每一个环节独立追踪、精准管控。

+
M1 待审核→M2 待处理→M3 异常→M4 配送中→M5 配送异常→M6 归档
+
    +
  • 同步、打印、拣货、打包、验货、出库、拦截等环节独立状态追踪
  • +
  • 支持审核、驳回、取消、拦截、异常处理
  • +
  • 订单动态分表设计,按仓库维度物理隔离
  • +
  • 冷热数据分离,查询高效不卡顿
  • +
+
+
📦
订单流转看板
+
+
+ + +
+
+
📥
入库流程看板
+
+ 02 +

入库管理

+

从 ASN 预到货通知到质检上架,全流程可追溯、可管控。

+
    +
  • ASN 管理:预到货通知单创建、查询、状态跟踪
  • +
  • 收货作业:明细录入 → 商品绑定 → 质检 → 上架
  • +
  • 支持直入、退货入库、协同收货多种模式
  • +
  • 收货单维度统计与完成确认
  • +
+
+
+
+ + +
+
+
+ 03 +

出库与拣货

+

波次策略自动匹配,拣货路径智能优化,复核打包一体化。

+
    +
  • 订单分配、波次策略智能匹配
  • +
  • 拣货任务生成与执行
  • +
  • 拣货车(Pick Cart)模式
  • +
  • 复核、打包、称重、出库确认流水线
  • +
  • 出库后配送状态实时追踪
  • +
+
+
📤
出库拣货看板
+
+
+ + +
+
+
📊
库存概览仪表盘
+
+ 04 +

精细化库存管理

+

多货主、多仓库独立核算,库存状态一目了然。

+
    +
  • 仓库库存管理(正品、残次、冻结、待检等状态)
  • +
  • 商品条码管理、批号/批次追踪
  • +
  • 库存变动流水记录,操作可追溯
  • +
  • 库存预警:安全库存、效期预警
  • +
  • 多货主、多仓库库存独立核算
  • +
+
+
+
+ + +
+
+
+ 05 +

库位精细化管理

+

库区 → 货架 → 库位三级体系,自动计算最优拣货路径。

+
    +
  • 三级管理:库区 → 货架 → 库位
  • +
  • 库位类型:存储位、拣货位、暂存区、不良品区等
  • +
  • 自动计算拣货路径与拣货优先级
  • +
  • 库位唯一码/条码管理
  • +
  • 移库、补货、分配验证
  • +
+
+
🗺️
库位布局示意
+
+
+ + +
+
+
🔌
多平台对接
+
+ 06 +

多平台、多接口无缝对接

+

标准协议 + OpenAPI + 内部网关三套体系,覆盖所有对接场景。

+
    +
  • 标准接口协议:严格遵循阿里巴巴奇门协议
  • +
  • OpenAPI:独立开放链路,支持第三方系统集成
  • +
  • 多快递平台:拼多多、淘宝、抖音、快手、小红书等
  • +
  • 内部网关:内网系统统一调用入口
  • +
  • 支持 REST、XML-RPC 多种协议
  • +
+
+
+
+ + +
+
+
+ 07 +

打印管理

+

多平台电子面单一键打印,打印任务灵活分发。

+
    +
  • 电子面单一键打印,支持批量操作
  • +
  • 拣货单、发货单、装箱单等多类模板
  • +
  • 打印台管理、打印任务分发
  • +
  • 支持菜鸟、拼多多、京东、抖音、快手、小红书等平台打印模板
  • +
+
+
🖨️
打印管理
+
+
+ + +
+
+
⚙️
权限管理
+
+ 08 +

系统管理与权限

+

多角色、细粒度权限控制,操作全程留痕可追溯。

+
    +
  • 用户注册、登录、角色切换
  • +
  • 多平台角色上下文管理(Web / PDA / App / 微信 / 小程序)
  • +
  • 细粒度权限控制(角色 → 菜单 → 接口级别)
  • +
  • 操作日志留痕
  • +
+
+
+
+ + +
+
+
+ 09 +

数据仪表盘

+

实时运营数据一览,辅助管理决策。

+
    +
  • 实时统计:待处理订单、今日新增、昨日新增
  • +
  • 出库趋势、快递比例、平台分布图表
  • +
  • 未分配/未打印/未拣货等运营数据一目了然
  • +
+
+
📈
数据仪表盘
+
+
+ + +
+
+
🧰
辅助工具
+
+ 10 +

辅助能力

+

Excel 服务、IM 集成、文件管理、国际化一应俱全。

+
    +
  • Excel 服务:灵活生成/解析单 sheet 或多 sheet Excel
  • +
  • IM 集成:企业微信/钉钉即时消息通知
  • +
  • 文件管理:腾讯云 COS 文件上传,图片/文档/APK 统一管理
  • +
  • 国际化(i18n):多语言键值管理与自动翻译
  • +
+
+
+
+
+
+ + + + + + + diff --git a/app/assets/help.html b/app/assets/help.html new file mode 100644 index 0000000..85d15d4 --- /dev/null +++ b/app/assets/help.html @@ -0,0 +1,138 @@ + + + + + + + 帮助文档 — 天豹WMS + + + + + + + +
+
+ +

帮助文档与常见问题

+

快速了解如何使用天豹WMS,解决日常操作中的疑问。

+
+
+ +
+
+ +
+

🚀 快速上手

+
+
+

如何开通天豹WMS服务?

+

联系管理员提交企业信息与需求申请,审核通过后将为您创建租户账号。收到账号密码后即可登录系统,按引导完成仓库、库位、用户等基础配置即可开始使用。

+
+
+

如何配置电商平台对接?

+

登录系统后进入「系统设置 → 平台管理」,选择需要对接的平台(淘宝/拼多多/抖音/快手等),按提示填写 AppKey、AppSecret 等授权信息,保存后即可自动同步订单。

+
+
+

如何添加仓库和库位?

+

进入「基础数据 → 仓库管理」创建仓库,然后在「库位管理」中按库区 → 货架 → 库位的层级添加库位信息,支持 Excel 批量导入。

+
+
+

如何配置电子面单打印?

+

进入「系统设置 → 快递管理」,添加合作的快递公司并配置电子面单账号。在打印管理页面即可一键获取并打印电子面单。

+
+
+
+ + +
+

📦 订单管理

+
+
+

订单状态流转规则是什么?

+

订单从 M1(待审核)开始,审核通过进入 M2(待处理),分配库存和快递后进入 M4(配送中),签收后进入 M6(归档)。如遇异常则进入 M3(异常)或 M5(配送异常)状态。

+
+
+

如何处理异常订单?

+

异常订单会自动标记为 M3 状态并在异常列表中展示。您可以根据异常原因(缺货、地址错误、取消等)选择驳回、修改重试或取消订单。

+
+
+

是否支持订单拦截?

+

支持。对于 M2(待处理)状态的订单可直接拦截取消;对于已发货(M4)的订单,可发起拦截请求,系统将调用快递接口尝试拦截。

+
+
+
+ + +
+

🔌 接口与集成

+
+
+

如何使用 OpenAPI 对接?

+

在「系统设置 → OpenAPI」中生成 API Key 和 Secret,参考 API 文档进行对接。支持 RESTful 风格调用,提供出库单、入库单、库存查询、商品同步等接口。

+
+
+

标准接口协议支持哪些能力?

+

严格遵循阿里巴巴奇门协议,支持出库单接口、入库单接口、退货单接口、库存查询接口、商品同步接口、发货单接口等标准奇门接口。

+
+
+

能否对接内部 ERP 系统?

+

专业版及以上套餐可通过 OpenAPI 或内部网关对接企业内部 ERP、OMS、CRM 等系统。企业版支持定制对接方案。

+
+
+
+ + +
+

🔐 账号与安全

+
+
+

如何管理用户权限?

+

管理员可在「系统设置 → 角色管理」中创建角色并分配菜单和接口权限,然后将用户关联到对应角色,实现细粒度权限控制。

+
+
+

是否支持多端登录?

+

支持 Web 管理端、PDA 手持终端、移动 App、微信小程序等多种终端登录,各终端角色权限独立管理。

+
+
+

忘记密码怎么办?

+

请联系系统管理员重置密码。管理员可在「系统设置 → 用户管理」中为指定用户重置登录密码。

+
+
+
+
+
+ + + + + + + diff --git a/app/assets/index.html b/app/assets/index.html new file mode 100644 index 0000000..e1e688f --- /dev/null +++ b/app/assets/index.html @@ -0,0 +1,676 @@ + + + + + + + + + + + + + + 天豹WMS — 专业 SaaS 仓储管理系统 + + + + + + + + + +
+
+
+
+ 内测阶段 — 限量开放体验 +
+

+ 专业 SaaS
仓储管理系统 +

+

+ 基于 Egg.js 构建的企业级 WMS,支持多快递平台对接、订单全生命周期管理、精细化库位管控,为中小型电商与仓储企业提供稳定可靠的 SaaS 服务。 +

+ +
+
+ + +
+
+
+
6+
+
已对接电商平台
+
+
+
10+
+
标准接口协议
+
+
+
M1~M6
+
订单状态全流转
+
+
+
三级
+
库位精细化管理
+
+
+
+ + +
+
+
+ +

专为中小型电商与仓储企业打造的 SaaS 服务

+

开箱即用、按需开通,无需自行部署与维护,专注业务运营即可。

+
+
+
+
🔗
+

平台标准对接

+

严格遵循阿里巴巴奇门协议,支持出库单、入库单、退货单、库存查询、商品同步等标准接口,无缝接入淘宝/天猫生态。

+
+
+
🔄
+

订单全生命周期

+

从 M1 待审核到 M6 归档,状态机驱动的完整流转链路,覆盖同步、打印、拣货、打包、验货、出库、拦截全环节。

+
+
+
☁️
+

SaaS 云服务

+

无需部署、免运维,开通即用。提供标准接口协议、OpenAPI 链路与内部网关三套接入体系,安心聚焦业务。

+
+
+
+
+ + +
+
+
+ +

覆盖仓储运营全链路

+

从订单接入到出库配送,从库存管控到数据决策,一站式满足仓储管理需求。点击卡片查看详情。

+
+
+ +
+
+
📦
+
+

订单全生命周期管理

+

M1→M6 状态机驱动的完整流转

+
+
+ 展开详情 ▾ +
+
    +
  • M1 待审核 → M2 待处理 → M3 异常 → M4 配送中 → M5 配送异常 → M6 归档
  • +
  • 完善的状态机驱动:同步、打印、拣货、打包、验货、出库、拦截等环节独立状态追踪
  • +
  • 支持审核、驳回、取消、拦截、异常处理
  • +
  • 订单动态分表设计,按仓库维度物理隔离,冷热数据分离
  • +
+
+
+ +
+
+
🔌
+
+

多平台、多接口无缝对接

+

标准协议 + OpenAPI + 内部网关

+
+
+ 展开详情 ▾ +
+
    +
  • 标准接口协议:出库单、入库单、退货单、库存查询、商品同步
  • +
  • OpenAPI:独立的开放 API 链路,支持第三方系统集成
  • +
  • 多快递平台:拼多多、淘宝/天猫、快手、抖音、小红书等电子面单对接
  • +
  • 内部网关:内网系统间调用的统一入口
  • +
+
+
+ +
+
+
📊
+
+

精细化库存管理

+

多货主、多仓库独立核算

+
+
+ 展开详情 ▾ +
+
    +
  • 仓库库存管理(正品、残次、冻结等)
  • +
  • 商品条码管理、批号/批次追踪
  • +
  • 库存变动流水、库存预警
  • +
  • 多货主、多仓库库存独立核算
  • +
+
+
+ +
+
+
🗺️
+
+

库位精细化管理

+

库区 → 货架 → 库位三级管控

+
+
+ 展开详情 ▾ +
+
    +
  • 库区 → 货架 → 库位三级精细化管理
  • +
  • 库位类型:存储位、拣货位、暂存区、不良品区等
  • +
  • 自动计算拣货路径与拣货优先级
  • +
  • 库位唯一码/条码管理,移库、补货、分配验证
  • +
+
+
+ +
+
+
📥
+
+

入库管理

+

ASN → 收货 → 质检 → 上架

+
+
+ 展开详情 ▾ +
+
    +
  • ASN(预到货通知单)管理
  • +
  • 收货作业:明细录入 → 商品绑定 → 质检 → 上架
  • +
  • 支持直入、退货入库、协同收货
  • +
  • 收货单维度统计与完成确认
  • +
+
+
+ +
+
+
📤
+
+

出库与拣货

+

波次策略 + 拣货车模式

+
+
+ 展开详情 ▾ +
+
    +
  • 订单分配、波次策略匹配
  • +
  • 拣货任务生成与执行
  • +
  • 拣货车(Pick Cart)模式
  • +
  • 复核、打包、称重、出库确认,出库后配送状态追踪
  • +
+
+
+ +
+
+
🖨️
+
+

打印管理

+

多平台电子面单一键打印

+
+
+ 展开详情 ▾ +
+
    +
  • 电子面单一键打印
  • +
  • 拣货单、发货单、装箱单等模板
  • +
  • 打印台管理、打印任务分发
  • +
  • 支持菜鸟、拼多多、京东、抖音、快手、小红书等平台模板
  • +
+
+
+ +
+
+
⚙️
+
+

系统管理与权限

+

多角色、细粒度权限控制

+
+
+ 展开详情 ▾ +
+
    +
  • 用户注册、登录、角色切换
  • +
  • 多平台角色上下文管理(Web / PDA / App / 微信 / 小程序)
  • +
  • 细粒度权限控制(角色 → 菜单 → 接口级别)
  • +
  • 操作日志留痕
  • +
+
+
+ +
+
+
📈
+
+

数据仪表盘

+

实时统计与运营数据可视化

+
+
+ 展开详情 ▾ +
+
    +
  • 实时统计:待处理订单、今日新增、昨日新增
  • +
  • 出库趋势、快递比例、平台分布
  • +
  • 未分配/未打印/未拣货等运营数据一目了然
  • +
+
+
+ +
+
+
🧰
+
+

辅助能力

+

Excel / IM / 文件管理 / i18n

+
+
+ 展开详情 ▾ +
+
    +
  • Excel 服务:灵活生成/解析单 sheet 或多 sheet Excel(Buffer / 文件 / HTTP 下载)
  • +
  • IM 集成:企业微信/钉钉即时消息通知
  • +
  • 文件管理:腾讯云 COS 文件上传,图片/文档/APK 统一管理
  • +
  • 国际化(i18n):多语言键值管理与自动翻译
  • +
+
+
+
+
+
+ + +
+
+
+ +

稳定可靠的技术体系

+

基于 Egg.js 3.x 的企业级分层架构,清晰分离路由、服务、数据层,保障 SaaS 服务的高可用与高性能。

+
+
+ +
+
Web 管理端
+
PDA / 移动端
+
第三方系统
+
电商平台
+
+
↓
+ +
+
/system
系统管理入口
+
/qimen
奇门协议入口
+
/openapi
开放 API 入口
+
内部网关
内网系统调用
+
+
↓
+ +
+
JWT 认证
+
权限中间件
+
参数校验
+
日志记录
+
+
↓
+
+
Service 业务层
+
+
↓
+ +
+
MySQL
Sequelize ORM
+
Redis
多 DB 隔离
+
腾讯云 COS
对象存储
+
外部 API
快递/电商平台
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
层级技术选型
框架Egg.js 3.x
数据库MySQL(Sequelize ORM + mysql2)
缓存Redis(多 DB 隔离:缓存/打印)
认证JWT
接口协议REST / XML-RPC(奇门)/ OpenAPI
模板引擎EJS
对象存储腾讯云 COS、七牛云
物流接口SOAP
数据处理ExcelJS、Fast XML Parser
运行环境Node.js ≥ 18
测试Egg Mock + ESLint
+
+
+
+ + +
+
+
+ +

标准、可靠的接口体系

+

三种接口通道满足不同集成场景需求,已适配主流电商与快递平台。

+
+
+ +
+

🔗标准接口协议

+ + + + + + + + + + +
接口说明
出库单接口订单下发、出库确认、状态回传
入库单接口ASN 推送、收货确认
退货单接口退货入库创建与确认
库存查询实时库存同步与查询
商品同步商品主数据同步与更新
发货单接口发货信息推送与物流同步
+
+ +
+
+

🔓OpenAPI 开放链路

+

+ 为第三方系统提供标准 RESTful API,支持自定义鉴权、限流、文档自动生成,便于 ERP、OMS、CRM 等外部系统深度集成。 +

+
+
+

🏠内部网关

+

+ 内网系统间调用的统一入口,支持服务发现、负载均衡与熔断降级,保障内部微服务间的高可用通信。 +

+
+
+
+ +
+

已对接平台

+
+
🍑 淘宝/天猫
+
📱 拼多多
+
🎵 抖音电商
+
⚡ 快手电商
+
🐕 京东
+
📕 小红书
+
+
+
+
+ + +
+
+
+ +

灵活适配多种仓储业务模式

+

无论您是电商商家还是三方仓储服务商,天豹WMS SaaS 服务都能满足您的需求。

+
+
+
+
01
+

🛒 电商仓配一体

+

订单从电商平台自动推送到 WMS,完成审核、拣货、打包、出库全流程,电子面单一键获取并回传物流单号。

+
+ 平台推送→WMS 处理→快递发出 +
+
+
+
02
+

🏢 三方仓储服务

+

支持多货主、多仓库独立运营与核算,不同货主的库存、订单、费用完全隔离,一个系统管理全部客户。

+
+
+
03
+

🔗 系统集成对接

+

通过 OpenAPI 与内部网关,轻松对接企业现有 ERP/OMS/CRM 系统,实现业务数据互通与流程自动化。

+
+
+
+
+ + +
+
+
+ +

三步开通,即刻使用

+

无需部署,无需运维,在线申请即可开通 SaaS 服务。

+
+
+
+
1
+

提交申请

+

填写企业信息与服务需求,管理员审核后为您创建租户账号。

+
+
+
2
+

配置对接

+

配置电商平台与快递接口,设置仓库、库位、用户权限等基础数据。

+
+
+
3
+

开始运营

+

登录系统即可开始处理订单、管理库存,高效运转仓储业务。

+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/news/article-1.html b/app/assets/news/article-1.html new file mode 100644 index 0000000..44abae4 --- /dev/null +++ b/app/assets/news/article-1.html @@ -0,0 +1,107 @@ + + + + + + 天豹WMS v3.0.0 正式发布 — 天豹WMS 资讯 + + + + + + + + + +
+
+ ← 返回资讯列表 +

天豹WMS v3.0.0 正式发布:全新仪表盘与波次策略

+ +
+
+ +
+

我们很高兴地宣布,天豹WMS v3.0.0 正式发布!本次大版本更新聚焦于数据可视化与运营效率两大核心方向,带来了全新的数据仪表盘、智能波次策略引擎,以及多项性能和体验优化。

+ +

全新数据仪表盘

+

v3.0.0 对仪表盘进行了全面重构,现在您可以在一屏之内掌握仓库运营的全貌:

+ + +

智能波次策略引擎

+

拣货效率是仓储运营的核心指标。v3.0.0 引入了全新的波次策略引擎,支持:

+ + +
+ 📊 实测数据:某日处理 3000+ 单的电商仓库在使用新版波次策略后,拣货效率提升约 35%,人均日拣货量从 800 件提升至 1080 件。 +
+ +

性能优化

+ + +

其他改进

+ + +

v3.0.0 已对所有用户自动升级生效,无需任何操作。如您有任何问题或建议,请联系系统管理员。感谢您一直以来对天豹WMS 的支持!

+
+ + + + + + diff --git a/app/assets/news/article-2.html b/app/assets/news/article-2.html new file mode 100644 index 0000000..98c9335 --- /dev/null +++ b/app/assets/news/article-2.html @@ -0,0 +1,88 @@ + + + + + + 2026 电商仓储趋势:智能化与精细化成为主旋律 — 天豹WMS 资讯 + + + + + + + + + +
+
+ ← 返回资讯列表 +

2026 电商仓储趋势:智能化与精细化成为主旋律

+ +
+
+ +
+

2026 年,电商行业竞争进入深水区。随着各大平台对物流时效的要求日益严格,仓储管理已从"能发货"升级为"快发货、准发货、低成本发货"。智能化与精细化,成为仓储管理的两大核心关键词。

+ +

趋势一:从人找货到系统指挥人

+

传统仓库依赖老员工的记忆和经验来找到商品位置,这种方式效率低下且无法规模化。现代 WMS 系统通过库位管理和拣货路径优化,让系统来告诉拣货员"去哪里、拿什么、拿多少",大幅降低了对人工经验的依赖。

+ + +

趋势二:多平台订单统一管理

+

如今一个商家往往同时在淘宝、拼多多、抖音、快手、京东、小红书等多个平台经营。如果没有统一的 WMS,就需要登录多个后台处理订单,效率极低且容易出错。

+

天豹WMS 等新一代系统已实现多平台订单自动同步、统一处理、统一打印、统一发货,一个系统管理全部渠道订单。

+ +

趋势三:波次策略大幅提升拣货效率

+

波次拣货是提升仓库效率的关键手段。将多个订单按一定规则合并为一个波次统一拣货,然后分播到各个订单,比逐个订单拣货效率高数倍。

+

2026 年的趋势是 智能波次:系统根据快递公司、目的地、商品相似度等维度自动生成最优波次,而非人工手动分组。

+ +
+ 💡 行业数据:使用智能波次策略的仓库,平均拣货效率提升 30%~50%,大促期间可支撑 3~5 倍的日常单量。 +
+ +

趋势四:SaaS 化部署成为主流

+

中小企业无需自建机房、无需雇佣运维团队,开通即用的 SaaS WMS 正在成为主流选择。SaaS 模式的优势明显:

+ + +

总的来说,2026 年的仓储管理正在从"经验驱动"转向"数据驱动",从"人工决策"转向"智能决策"。选择一款专业的 WMS 系统,将成为电商企业在激烈竞争中胜出的关键一步。

+
+ + + + + + diff --git a/app/assets/news/article-3.html b/app/assets/news/article-3.html new file mode 100644 index 0000000..869a83d --- /dev/null +++ b/app/assets/news/article-3.html @@ -0,0 +1,102 @@ + + + + + + 拣货效率提升 30%:波次策略配置最佳实践 — 天豹WMS 资讯 + + + + + + + + + +
+
+ ← 返回资讯列表 +

拣货效率提升 30%:波次策略配置最佳实践

+ +
+
+ +
+

波次策略是 WMS 中最能直接提升拣货效率的功能之一。合理配置波次策略,可以让仓库的拣货效率提升 30% 甚至更多。本文将分享三种经过实战验证的配置方案。

+ +

什么是波次策略?

+

波次(Wave)是将多个待处理的订单按一定规则合并为一批,统一进行拣货作业的策略。相比逐个订单拣货,波次拣货可以减少拣货员在仓库中的无效走动,大幅提升效率。

+ +

方案一:按快递公司分波次

+

适用场景:日均单量 500~2000 单,使用 3 家以上快递公司。

+

配置方式:在波次策略中选择"按快递公司"维度,系统自动将相同快递的订单归入同一波次。拣货完成后直接按快递分播,无需二次分拣。

+

效果:减少分播环节工作量约 40%,尤其适合快递公司分时段揽收的场景。

+ +

方案二:按商品相似度分波次

+

适用场景:SKU 数量较多(500+),商品存放位置分散。

+

配置方式:系统根据订单中的商品相似度自动聚类,将包含相同或相近商品(同一库区/货架)的订单合并波次。

+

效果:拣货路径缩短约 50%,拣货员无需在仓库中来回穿梭。

+ +
+ ⚡ 实战技巧:将高频商品(占订单 80% 的 SKU)集中放置在靠近打包区的拣货位,配合商品相似度波次策略,效果最佳。 +
+ +

方案三:按目的地分波次

+

适用场景:发货量大、目的地集中(如同城、同省订单占比高)。

+

配置方式:按收货地址的省/市维度分波次,发往同一地区的订单统一处理。

+ +

三种方案对比

+ + + + + + + + +
波次策略效率提升适用单量实施难度
按快递公司20%~30%500~2000 单/天低
按商品相似度30%~50%1000~5000 单/天中
按目的地15%~25%500+ 单/天低
多维度组合40%~60%2000+ 单/天高
+ +

最佳实践总结

+ + +

如需帮助配置波次策略,请登录天豹WMS 后在「系统设置 → 波次策略」中操作,或联系系统管理员获取支持。

+
+ + + + + + diff --git a/app/assets/news/index.html b/app/assets/news/index.html new file mode 100644 index 0000000..be18c09 --- /dev/null +++ b/app/assets/news/index.html @@ -0,0 +1,159 @@ + + + + + + + 资讯中心 — 天豹WMS + + + + + + + + +
+
+ +

产品动态与行业资讯

+

了解天豹WMS 最新产品更新、仓储行业趋势与运营技巧。

+
+
+ +
+ + + + +
+ +
+ + +
📦产品更新
+
+
2026-06-18
+

天豹WMS v3.0.0 正式发布:全新仪表盘与波次策略

+

本次大版本更新带来全新的数据仪表盘、智能波次策略引擎,以及多项性能和体验优化,助力仓储运营效率再升级。

+ 阅读全文 → +
+
+ + +
📈行业动态
+
+
2026-06-10
+

2026 电商仓储趋势:智能化与精细化成为主旋律

+

随着电商平台竞争加剧,仓储管理的智能化、精细化水平成为商家降本增效的关键。WMS 系统在其中扮演着越来越重要的角色。

+ 阅读全文 → +
+
+ + +
💡使用技巧
+
+
2026-06-05
+

拣货效率提升 30%:波次策略配置最佳实践

+

合理配置波次策略可以显著提升拣货效率。本文分享三种实战配置方案,帮助你的仓库运营更加高效。

+ 阅读全文 → +
+
+ + +
🔌产品更新
+
+
2026-05-28
+

OpenAPI 接口升级:新增批量操作与 Webhook 回调

+

OpenAPI 全面升级,新增批量订单处理接口与 Webhook 事件回调机制,第三方系统集成更加灵活高效。

+ 即将上线 → +
+
+ + +
🏪行业动态
+
+
2026-05-20
+

抖音电商仓配升级:WMS 如何应对直播电商的爆发式订单

+

直播电商带来的瞬时订单高峰对仓储系统提出了极高要求。了解 WMS 如何通过弹性架构应对大促挑战。

+ 即将上线 → +
+
+ + +
🖨️使用技巧
+
+
2026-05-15
+

电子面单打印全攻略:从配置到异常处理

+

一文搞定电子面单打印的所有环节,包括多平台配置、模板定制、批量打印和常见异常排查。

+ 即将上线 → +
+
+
+ + + + + + + + diff --git a/app/assets/public/wechat_1.0.6/assets/_plugin-vue_export-helper.BCo6x5W8.js b/app/assets/public/wechat_1.0.6/assets/_plugin-vue_export-helper.BCo6x5W8.js new file mode 100644 index 0000000..40b1840 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/_plugin-vue_export-helper.BCo6x5W8.js @@ -0,0 +1 @@ +const o=(o,t)=>{const c=o.__vccOpts||o;for(const[s,n]of t)c[s]=n;return c};export{o as _}; diff --git a/app/assets/public/wechat_1.0.6/assets/groupSend-DhZPlIkU.css b/app/assets/public/wechat_1.0.6/assets/groupSend-DhZPlIkU.css new file mode 100644 index 0000000..7a55e67 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/groupSend-DhZPlIkU.css @@ -0,0 +1 @@ +.content[data-v-a93c1656]{flex-wrap:nowrap}.box[data-v-a93c1656]{width:100%}.list[data-v-a93c1656]{width:100%;height:100%;padding-bottom:0!important;box-sizing:border-box} diff --git a/app/assets/public/wechat_1.0.6/assets/index-B8U-SFxP.js b/app/assets/public/wechat_1.0.6/assets/index-B8U-SFxP.js new file mode 100644 index 0000000..7b13501 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/index-B8U-SFxP.js @@ -0,0 +1,31 @@ +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./pages-index-login.BFQQS4U7.js","./user.Bm-2eyfO.js","./_plugin-vue_export-helper.BCo6x5W8.js","./login-Bw0Vbjpk.css","./pages-index-index.BgtT8MtD.js","./m-nav.CZV981Qo.js","./m-nav-BN-ODETU.css","./uni-data-select.i2-ymEG0.js","./uni-data-select-DiAp7CRJ.css","./index-D5HqLnJC.css","./pages-index-store.ChlVfoKf.js","./store-fjY_tD81.css","./pages-index-method.kqhTS_RO.js","./method-B5TbvMse.css","./pages-index-order.M2XVGrY0.js","./order-BaHcfnrg.css","./pages-index-interior.TuurVpSQ.js","./interior-CWVR9NZs.css","./pages-index-groupSend.4IkvuQhu.js","./groupSend-DhZPlIkU.css","./pages-index-log._xK1nM0F.js","./log-B1g-HYy6.css"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} +!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const e={},t=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),s=(null==i?void 0:i.nonce)||(null==i?void 0:i.getAttribute("nonce"));r=Promise.all(n.map((n=>{if(n=function(e,t){return new URL(e,t).href}(n,o),n in e)return;e[n]=!0;const r=n.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(!!o)for(let e=t.length-1;e>=0;e--){const o=t[e];if(o.href===n&&(!r||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${n}"]${i}`))return;const a=document.createElement("link");return a.rel=r?"stylesheet":"modulepreload",r||(a.as="script",a.crossOrigin=""),a.href=n,s&&a.setAttribute("nonce",s),document.head.appendChild(a),r?new Promise(((e,t)=>{a.addEventListener("load",e),a.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${n}`))))})):void 0})))}return r.then((()=>t())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))}; +/** +* @vue/shared v3.4.21 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function n(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const o={},r=[],i=()=>{},s=()=>!1,a=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,u=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),h=Array.isArray,p=e=>"[object Map]"===x(e),m=e=>"[object Set]"===x(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,b=e=>(_(e)||g(e))&&g(e.then)&&g(e.catch),w=Object.prototype.toString,x=e=>w.call(e),S=e=>"[object Object]"===x(e),C=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},E=/-(\w)/g,O=k((e=>e.replace(E,((e,t)=>t?t.toUpperCase():"")))),M=/\B([A-Z])/g,L=k((e=>e.replace(M,"-$1").toLowerCase())),A=k((e=>e.charAt(0).toUpperCase()+e.slice(1))),P=k((e=>e?`on${A(e)}`:"")),$=(e,t)=>!Object.is(e,t),I=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},B=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let N;const D=()=>N||(N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function j(e){if(h(e)){const t={};for(let n=0;n{if(e){const n=e.split(V);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function q(e){let t="";if(v(e))t=e;else if(h(e))for(let n=0;nv(e)?e:null==e?"":h(e)||_(e)&&(e.toString===w||!g(e.toString))?JSON.stringify(e,X,2):String(e),X=(e,t)=>t&&t.__v_isRef?X(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[K(t,o)+" =>"]=n,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>K(e)))}:y(t)?K(t):!_(t)||h(t)||S(t)?t:String(t),K=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},G=["ad","ad-content-page","ad-draw","audio","button","camera","canvas","checkbox","checkbox-group","cover-image","cover-view","editor","form","functional-page-navigator","icon","image","input","label","live-player","live-pusher","map","movable-area","movable-view","navigator","official-account","open-data","picker","picker-view","picker-view-column","progress","radio","radio-group","rich-text","scroll-view","slider","swiper","swiper-item","switch","text","textarea","video","view","web-view","location-picker","location-view"].map((e=>"uni-"+e)),J=["page-container","list-view","list-item","sticky-section","sticky-header","cloud-db-element","loading-element","loading"].map((e=>"uni-"+e)),Q=["list-item"].map((e=>"uni-"+e));function Z(e){if(-1!==Q.indexOf(e))return!1;const t="uni-"+e.replace("v-uni-","");return-1!==G.indexOf(t)||-1!==J.indexOf(t)}const ee=/^([a-z-]+:)?\/\//i,te=/^data:.*,.*/;function ne(e){return void 0===e?null:e}class oe{static keys(e){return Object.keys(e)}static assign(e,...t){for(let n=0;n{this[t]=e}));else for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this[t]=e[t]);!function(e){const t=["_resolveKeyPath","_getValue","toJSON","get","set","getAny","getString","getNumber","getBoolean","getJSON","getArray","toMap","forEach"],n={};for(let o=0;o0&&(n.push(t),t="");break;case"[":o=!0,t.length>0&&(n.push(t),t="");break;case"]":if(!o)return[];if(!(t.length>0))return[];{const e=t[0],o=t[t.length-1];if('"'===e&&'"'===o||"'"===e&&"'"===o||"`"===e&&"`"===o){if(!(t.length>2))return[];t=t.slice(1,-1)}else if(!/^\d+$/.test(t))return[];n.push(t),t=""}o=!1;break;default:t+=i}r===e.length-1&&t.length>0&&(n.push(t),t="")}return n}_getValue(e,t){const n=this._resolveKeyPath(e),o=ne(t);if(0===n.length)return o;let r=this;for(let i=0;i{t[n]=e[n]})),j(t)}if(e instanceof Map){const t={};return e.forEach(((e,n)=>{t[n]=e})),j(t)}if(v(e))return W(e);if(h(e)){const t={};for(let n=0;n{e[n]&&(t+=n+" ")}));else if(e instanceof Map)e.forEach(((e,n)=>{e&&(t+=n+" ")}));else if(h(e))for(let n=0;n(e&&(n=e.apply(t,o),e=null),n)}const fe=e=>e>9?e:"0"+e;function he({date:e=new Date,mode:t="date"}){return"time"===t?fe(e.getHours())+":"+fe(e.getMinutes()):e.getFullYear()+"-"+fe(e.getMonth()+1)+"-"+fe(e.getDate())}function pe(e,t){e=e||{},v(t)&&(t={errMsg:t}),/:ok$/.test(t.errMsg)?g(e.success)&&e.success(t):g(e.fail)&&e.fail(t),g(e.complete)&&e.complete(t)}function me(e){return O(e.substring(5))}const ge=de((e=>{e=e||(e=>e.tagName.startsWith("UNI-"));const t=HTMLElement.prototype,n=t.setAttribute;t.setAttribute=function(t,o){if(t.startsWith("data-")&&e(this)){(this.__uniDataset||(this.__uniDataset={}))[me(t)]=o}/^\d/.test(t)||n.call(this,t,o)};const o=t.removeAttribute;t.removeAttribute=function(t){this.__uniDataset&&t.startsWith("data-")&&e(this)&&delete this.__uniDataset[me(t)],o.call(this,t)}}));function ve(e){return c({},e.dataset,e.__uniDataset)}const ye=new RegExp("\"[^\"]+\"|'[^']+'|url\\([^)]+\\)|(\\d*\\.?\\d+)[r|u]px","g");function _e(e){return{passive:e}}function be(e){const{id:t,offsetTop:n,offsetLeft:o}=e;return{id:t,dataset:ve(e),offsetTop:n,offsetLeft:o}}function we(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function xe(e={}){const t={};return Object.keys(e).forEach((n=>{try{t[n]=we(e[n])}catch(o){t[n]=e[n]}})),t}const Se=/\+/g;function Ce(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;oe.apply(this,arguments);r=o(i,t)};return i.cancel=function(){n(r)},i}class ke{constructor(e,t){this.id=e,this.listener={},this.emitCache=[],t&&Object.keys(t).forEach((e=>{this.on(e,t[e])}))}emit(e,...t){const n=this.listener[e];if(!n)return this.emitCache.push({eventName:e,args:t});n.forEach((e=>{e.fn.apply(e.fn,t)})),this.listener[e]=n.filter((e=>"once"!==e.type))}on(e,t){this._addListener(e,"on",t),this._clearCache(e)}once(e,t){this._addListener(e,"once",t),this._clearCache(e)}off(e,t){const n=this.listener[e];if(n)if(t)for(let o=0;ot(e))),Ae=function(){};Ae.prototype={_id:1,on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n,_id:this._id}),this._id++},once:function(e,t,n){var o=this;function r(){o.off(e,r),t.apply(n,arguments)}return r._=t,this.on(e,r,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,r=n.length;o=0;i--)if(o[i].fn===t||o[i].fn._===t||o[i]._id===t){o.splice(i,1);break}r=o}return r.length?n[e]=r:delete n[e],this}};var Pe=Ae;const $e={black:"rgba(0,0,0,0.4)",white:"rgba(255,255,255,0.4)"};function Ie(e,t,n){if(v(t)&&t.startsWith("@")){let r=e[t.replace("@","")]||t;switch(n){case"titleColor":r="black"===r?"#000000":"#ffffff";break;case"borderStyle":r=(o=r)&&o in $e?$e[o]:o}return r}var o;return t}function Re(e,t={},n="light"){const o=t[n],r={};return void 0!==o&&e?(Object.keys(e).forEach((i=>{const s=e[i];r[i]=S(s)?Re(s,t,n):h(s)?s.map((e=>S(e)?Re(e,t,n):Ie(o,e))):Ie(o,s,i)})),r):e} +/** +* @dcloudio/uni-h5-vue v3.4.21 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Be,Ne;class De{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Be,!e&&Be&&(this.index=(Be.scopes||(Be.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Be;try{return Be=this,e()}finally{Be=t}}}on(){Be=this}off(){Be=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Ke()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ze,t=Ne;try{return ze=!0,Ne=this,this._runnings++,He(this),this.fn()}finally{We(this),this._runnings--,Ne=t,ze=e}}stop(){var e;this.active&&(He(this),We(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function He(e){e._trackId++,e._depsLength=0}function We(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},nt=new WeakMap,ot=Symbol(""),rt=Symbol("");function it(e,t,n){if(ze&&Ne){let t=nt.get(e);t||nt.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=tt((()=>t.delete(n)))),Qe(Ne,o)}}function st(e,t,n,o,r,i){const s=nt.get(e);if(!s)return;let a=[];if("clear"===t)a=[...s.values()];else if("length"===n&&h(e)){const e=Number(o);s.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(s.get(n)),t){case"add":h(e)?C(n)&&a.push(s.get("length")):(a.push(s.get(ot)),p(e)&&a.push(s.get(rt)));break;case"delete":h(e)||(a.push(s.get(ot)),p(e)&&a.push(s.get(rt)));break;case"set":p(e)&&a.push(s.get(ot))}Ge();for(const l of a)l&&et(l,4);Je()}const at=n("__proto__,__v_isRef,__isVue"),lt=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),ct=ut();function ut(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Qt(this);for(let t=0,r=this.length;t{e[t]=function(...e){Xe(),Ge();const n=Qt(this)[t].apply(this,e);return Je(),Ke(),n}})),e}function dt(e){const t=Qt(this);return it(t,0,e),t.hasOwnProperty(e)}class ft{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Ht:Vt:r?Ft:jt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=h(e);if(!o){if(i&&f(ct,t))return Reflect.get(ct,t,n);if("hasOwnProperty"===t)return dt}const s=Reflect.get(e,t,n);return(y(t)?lt.has(t):at(t))?s:(o||it(e,0,t),r?s:sn(s)?i&&C(t)?s:s.value:_(s)?o?Yt(s):qt(s):s)}}class ht extends ft{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=Kt(r);if(Gt(n)||Kt(n)||(r=Qt(r),n=Qt(n)),!h(e)&&sn(r)&&!sn(n))return!t&&(r.value=n,!0)}const i=h(e)&&C(t)?Number(t)e,_t=e=>Reflect.getPrototypeOf(e);function bt(e,t,n=!1,o=!1){const r=Qt(e=e.__v_raw),i=Qt(t);n||($(t,i)&&it(r,0,t),it(r,0,i));const{has:s}=_t(r),a=o?yt:n?tn:en;return s.call(r,t)?a(e.get(t)):s.call(r,i)?a(e.get(i)):void(e!==r&&e.get(t))}function wt(e,t=!1){const n=this.__v_raw,o=Qt(n),r=Qt(e);return t||($(e,r)&&it(o,0,e),it(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function xt(e,t=!1){return e=e.__v_raw,!t&&it(Qt(e),0,ot),Reflect.get(e,"size",e)}function St(e){e=Qt(e);const t=Qt(this);return _t(t).has.call(t,e)||(t.add(e),st(t,"add",e,e)),this}function Ct(e,t){t=Qt(t);const n=Qt(this),{has:o,get:r}=_t(n);let i=o.call(n,e);i||(e=Qt(e),i=o.call(n,e));const s=r.call(n,e);return n.set(e,t),i?$(t,s)&&st(n,"set",e,t):st(n,"add",e,t),this}function Tt(e){const t=Qt(this),{has:n,get:o}=_t(t);let r=n.call(t,e);r||(e=Qt(e),r=n.call(t,e)),o&&o.call(t,e);const i=t.delete(e);return r&&st(t,"delete",e,void 0),i}function kt(){const e=Qt(this),t=0!==e.size,n=e.clear();return t&&st(e,"clear",void 0,void 0),n}function Et(e,t){return function(n,o){const r=this,i=r.__v_raw,s=Qt(i),a=t?yt:e?tn:en;return!e&&it(s,0,ot),i.forEach(((e,t)=>n.call(o,a(e),a(t),r)))}}function Ot(e,t,n){return function(...o){const r=this.__v_raw,i=Qt(r),s=p(i),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=r[e](...o),u=n?yt:t?tn:en;return!t&&it(i,0,l?rt:ot),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Mt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Lt(){const e={get(e){return bt(this,e)},get size(){return xt(this)},has:wt,add:St,set:Ct,delete:Tt,clear:kt,forEach:Et(!1,!1)},t={get(e){return bt(this,e,!1,!0)},get size(){return xt(this)},has:wt,add:St,set:Ct,delete:Tt,clear:kt,forEach:Et(!1,!0)},n={get(e){return bt(this,e,!0)},get size(){return xt(this,!0)},has(e){return wt.call(this,e,!0)},add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear"),forEach:Et(!0,!1)},o={get(e){return bt(this,e,!0,!0)},get size(){return xt(this,!0)},has(e){return wt.call(this,e,!0)},add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear"),forEach:Et(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Ot(r,!1,!1),n[r]=Ot(r,!0,!1),t[r]=Ot(r,!1,!0),o[r]=Ot(r,!0,!0)})),[e,n,t,o]}const[At,Pt,$t,It]=Lt();function Rt(e,t){const n=t?e?It:$t:e?Pt:At;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(f(n,o)&&o in t?n:t,o,r)}const Bt={get:Rt(!1,!1)},Nt={get:Rt(!1,!0)},Dt={get:Rt(!0,!1)},jt=new WeakMap,Ft=new WeakMap,Vt=new WeakMap,Ht=new WeakMap;function Wt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>x(e).slice(8,-1))(e))}function qt(e){return Kt(e)?e:Ut(e,!1,mt,Bt,jt)}function zt(e){return Ut(e,!1,vt,Nt,Ft)}function Yt(e){return Ut(e,!0,gt,Dt,Vt)}function Ut(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const s=Wt(e);if(0===s)return e;const a=new Proxy(e,2===s?o:n);return r.set(e,a),a}function Xt(e){return Kt(e)?Xt(e.__v_raw):!(!e||!e.__v_isReactive)}function Kt(e){return!(!e||!e.__v_isReadonly)}function Gt(e){return!(!e||!e.__v_isShallow)}function Jt(e){return Xt(e)||Kt(e)}function Qt(e){const t=e&&e.__v_raw;return t?Qt(t):e}function Zt(e){return Object.isExtensible(e)&&R(e,"__v_skip",!0),e}const en=e=>_(e)?qt(e):e,tn=e=>_(e)?Yt(e):e;class nn{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ve((()=>e(this._value)),(()=>rn(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Qt(this);return e._cacheable&&!e.effect.dirty||!$(e._value,e._value=e.effect.run())||rn(e,4),on(e),e.effect._dirtyLevel>=2&&rn(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function on(e){var t;ze&&Ne&&(e=Qt(e),Qe(Ne,null!=(t=e.dep)?t:e.dep=tt((()=>e.dep=void 0),e instanceof nn?e:void 0)))}function rn(e,t=4,n){const o=(e=Qt(e)).dep;o&&et(o,t)}function sn(e){return!(!e||!0!==e.__v_isRef)}function an(e){return cn(e,!1)}function ln(e){return cn(e,!0)}function cn(e,t){return sn(e)?e:new un(e,t)}class un{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Qt(e),this._value=t?e:en(e)}get value(){return on(this),this._value}set value(e){const t=this.__v_isShallow||Gt(e)||Kt(e);e=t?e:Qt(e),$(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:en(e),rn(this,4))}}function dn(e){return sn(e)?e.value:e}const fn={get:(e,t,n)=>dn(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return sn(r)&&!sn(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function hn(e){return Xt(e)?e:new Proxy(e,fn)}class pn{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Qt(this._object),t=this._key,null==(n=nt.get(e))?void 0:n.get(t);var e,t,n}}class mn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function gn(e,t,n){return sn(e)?e:g(e)?new mn(e):_(e)&&arguments.length>1?vn(e,t,n):an(e)}function vn(e,t,n){const o=e[t];return sn(o)?o:new pn(e,t,n)}function yn(e,t,n,o){try{return o?e(...o):e()}catch(r){bn(r,t,n)}}function _n(e,t,n,o){if(g(e)){const r=yn(e,t,n,o);return r&&b(r)&&r.catch((e=>{bn(e,t,n)})),r}const r=[];for(let i=0;i>>1,r=Cn[o],i=Bn(r);iBn(e)-Bn(t)));if(kn.length=0,En)return void En.push(...e);for(En=e,On=0;Onnull==e.id?1/0:e.id,Nn=(e,t)=>{const n=Bn(e)-Bn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Dn(e){Sn=!1,xn=!0,Cn.sort(Nn);try{for(Tn=0;Tnv(e)?e.trim():e))),t&&(i=n.map(B))}let l,c=r[l=P(t)]||r[l=P(O(t))];!c&&s&&(c=r[l=P(L(t))]),c&&_n(c,e,6,Fn(e,c,i));const u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,_n(u,e,6,Fn(e,u,i))}}function Fn(e,t,n){if(1!==n.length)return n;if(g(t)){if(t.length<2)return n}else if(!t.find((e=>e.length>=2)))return n;const o=n[0];if(o&&f(o,"type")&&f(o,"timeStamp")&&f(o,"target")&&f(o,"currentTarget")&&f(o,"detail")){const t=e.proxy,o=t.$gcd(t,!0);o&&n.push(o)}return n}function Vn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const i=e.emits;let s={},a=!1;if(!g(e)){const o=e=>{const n=Vn(e,t,!0);n&&(a=!0,c(s,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return i||a?(h(i)?i.forEach((e=>s[e]=null)):c(s,i),_(e)&&o.set(e,s),s):(_(e)&&o.set(e,null),null)}function Hn(e,t){return!(!e||!a(t))&&(t=t.slice(2).replace(/Once$/,""),f(e,t[0].toLowerCase()+t.slice(1))||f(e,L(t))||f(e,t))}let Wn=null,qn=null;function zn(e){const t=Wn;return Wn=e,qn=e&&e.type.__scopeId||null,t}function Yn(e,t=Wn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&ei(-1);const r=zn(t);let i;try{i=e(...n)}finally{zn(r),o._d&&ei(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function Un(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:i,propsOptions:[s],slots:a,attrs:c,emit:u,render:d,renderCache:f,data:h,setupState:p,ctx:m,inheritAttrs:g}=e;let v,y;const _=zn(e);try{if(4&n.shapeFlag){const e=r||o,t=e;v=pi(d.call(t,e,f,i,p,h,m)),y=c}else{const e=t;0,v=pi(e.length>1?e(i,{attrs:c,slots:a,emit:u}):e(i,null)),y=t.props?c:Xn(c)}}catch(w){Gr.length=0,bn(w,e,1),v=ui(Xr)}let b=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(s&&e.some(l)&&(y=Kn(y,s)),b=di(b,y))}return n.dirs&&(b=di(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,zn(_),v}const Xn=e=>{let t;for(const n in e)("class"===n||"style"===n||a(n))&&((t||(t={}))[n]=e[n]);return t},Kn=(e,t)=>{const n={};for(const o in e)l(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Gn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense;const oo=Symbol.for("v-scx");function ro(e,t){return ao(e,null,t)}const io={};function so(e,t,n){return ao(e,t,n)}function ao(e,t,{immediate:n,deep:r,flush:s,once:a,onTrack:l,onTrigger:c}=o){if(t&&a){const e=t;t=(...t)=>{e(...t),k()}}const d=wi,f=e=>!0===r?e:uo(e,!1===r?1:void 0);let p,m,v=!1,y=!1;if(sn(e)?(p=()=>e.value,v=Gt(e)):Xt(e)?(p=()=>f(e),v=!0):h(e)?(y=!0,v=e.some((e=>Xt(e)||Gt(e))),p=()=>e.map((e=>sn(e)?e.value:Xt(e)?f(e):g(e)?yn(e,d,2):void 0))):p=g(e)?t?()=>yn(e,d,2):()=>(m&&m(),_n(e,d,3,[b])):i,t&&r){const e=p;p=()=>uo(e())}let _,b=e=>{m=C.onStop=()=>{yn(e,d,4),m=C.onStop=void 0}};if(Oi){if(b=i,t?n&&_n(t,d,3,[p(),y?[]:void 0,b]):p(),"sync"!==s)return i;{const e=Tr(oo);_=e.__watcherHandles||(e.__watcherHandles=[])}}let w=y?new Array(e.length).fill(io):io;const x=()=>{if(C.active&&C.dirty)if(t){const e=C.run();(r||v||(y?e.some(((e,t)=>$(e,w[t]))):$(e,w)))&&(m&&m(),_n(t,d,3,[e,w===io?void 0:y&&w[0]===io?[]:w,b]),w=e)}else C.run()};let S;x.allowRecurse=!!t,"sync"===s?S=x:"post"===s?S=()=>Fr(x,d&&d.suspense):(x.pre=!0,d&&(x.id=d.uid),S=()=>Pn(x));const C=new Ve(p,i,S),T=Fe(),k=()=>{C.stop(),T&&u(T.effects,C)};return t?n?x():w=C.run():"post"===s?Fr(C.run.bind(C),d&&d.suspense):C.run(),_&&_.push(k),k}function lo(e,t,n){const o=this.proxy,r=v(e)?e.includes(".")?co(o,e):()=>o[e]:e.bind(o,o);let i;g(t)?i=t:(i=t.handler,n=t);const s=Ti(this),a=ao(r,i.bind(o),n);return s(),a}function co(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),sn(e))uo(e.value,t,n,o);else if(h(e))for(let r=0;r{uo(e,t,n,o)}));else if(S(e))for(const r in e)uo(e[r],t,n,o);return e}function fo(e,t){if(null===Wn)return e;const n=Ai(Wn)||Wn.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;i{e.isMounted=!0})),Xo((()=>{e.isUnmounting=!0})),e}();return()=>{const r=t.default&&Co(t.default(),!0);if(!r||!r.length)return;let i=r[0];if(r.length>1)for(const e of r)if(e.type!==Xr){i=e;break}const s=Qt(e),{mode:a}=s;if(o.isLeaving)return wo(i);const l=xo(i);if(!l)return wo(i);const c=bo(l,s,o,n);So(l,c);const u=n.subTree,d=u&&xo(u);if(d&&d.type!==Xr&&!ii(l,d)){const e=bo(d,s,o,n);if(So(d,e),"out-in"===a)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},wo(i);"in-out"===a&&l.type!==Xr&&(e.delayLeave=(e,t,n)=>{_o(o,d)[String(d.key)]=d,e[po]=()=>{t(),e[po]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return i}}};function _o(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function bo(e,t,n,o){const{appear:r,mode:i,persisted:s=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:_}=t,b=String(e.key),w=_o(n,e),x=(e,t)=>{e&&_n(e,o,9,t)},S=(e,t)=>{const n=t[1];x(e,t),h(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:i,persisted:s,beforeEnter(t){let o=a;if(!n.isMounted){if(!r)return;o=g||a}t[po]&&t[po](!0);const i=w[b];i&&ii(e,i)&&i.el[po]&&i.el[po](),x(o,[t])},enter(e){let t=l,o=c,i=u;if(!n.isMounted){if(!r)return;t=v||l,o=y||c,i=_||u}let s=!1;const a=e[mo]=t=>{s||(s=!0,x(t?i:o,[e]),C.delayedLeave&&C.delayedLeave(),e[mo]=void 0)};t?S(t,[e,a]):a()},leave(t,o){const r=String(e.key);if(t[mo]&&t[mo](!0),n.isUnmounting)return o();x(d,[t]);let i=!1;const s=t[po]=n=>{i||(i=!0,o(),x(n?m:p,[t]),t[po]=void 0,w[r]===e&&delete w[r])};w[r]=e,f?S(f,[t,s]):s()},clone:e=>bo(e,t,n,o)};return C}function wo(e){if(Mo(e))return(e=di(e)).children=null,e}function xo(e){return Mo(e)?e.children?e.children[0]:void 0:e}function So(e,t){6&e.shapeFlag&&e.component?So(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Co(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;ic({name:e.name},t,{setup:e}))():e}const ko=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function Eo(e){g(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:i,suspensible:s=!0,onError:a}=e;let l,c=null,u=0;const d=()=>{let e;return c||(e=c=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),a)return new Promise(((t,n)=>{a(e,(()=>t((u++,c=null,d()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==c&&c?c:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return To({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return l},setup(){const e=wi;if(l)return()=>Oo(l,e);const t=t=>{c=null,bn(t,e,13,!o)};if(s&&e.suspense||Oi)return d().then((t=>()=>Oo(t,e))).catch((e=>(t(e),()=>o?ui(o,{error:e}):null)));const a=an(!1),u=an(),f=an(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=i&&setTimeout((()=>{if(!a.value&&!u.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),u.value=e}}),i),d().then((()=>{a.value=!0,e.parent&&Mo(e.parent.vnode)&&(e.parent.effect.dirty=!0,Pn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>a.value&&l?Oo(l,e):u.value&&o?ui(o,{error:u.value}):n&&!f.value?ui(n):void 0}})}function Oo(e,t){const{ref:n,props:o,children:r,ce:i}=t.vnode,s=ui(e,o,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}const Mo=e=>e.type.__isKeepAlive;class Lo{constructor(e){this.max=e,this._cache=new Map,this._keys=new Set,this._max=parseInt(e,10)}get(e){const{_cache:t,_keys:n,_max:o}=this,r=t.get(e);if(r)n.delete(e),n.add(e);else if(n.add(e),o&&n.size>o){const e=n.values().next().value;this.pruneCacheEntry(t.get(e)),this.delete(e)}return r}set(e,t){this._cache.set(e,t)}delete(e){this._cache.delete(e),this._keys.delete(e)}forEach(e,t){this._cache.forEach(e.bind(t))}}const Ao={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number],matchBy:{type:String,default:"name"},cache:Object},setup(e,{slots:t}){const n=xi(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=e.cache||new Lo(e.max);r.pruneCacheEntry=s;let i=null;function s(t){var o;!i||!ii(t,i)||"key"===e.matchBy&&t.key!==i.key?(Do(o=t),u(o,n,a,!0)):i&&Do(i)}const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=o,f=d("div");function h(t){r.forEach(((n,o)=>{const i=Fo(n,e.matchBy);!i||t&&t(i)||(r.delete(o),s(n))}))}o.activate=(e,t,n,o,r)=>{const i=e.component;if(i.ba){const e=i.isDeactivated;i.isDeactivated=!1,I(i.ba),i.isDeactivated=e}c(e,t,n,0,a),l(i.vnode,e,t,n,i,a,o,e.slotScopeIds,r),Fr((()=>{i.isDeactivated=!1,i.a&&I(i.a);const t=e.props&&e.props.onVnodeMounted;t&&yi(t,i.parent,e)}),a)},o.deactivate=e=>{const t=e.component;t.bda&&Vo(t.bda),c(e,f,null,1,a),Fr((()=>{t.bda&&t.bda.forEach((e=>e.__called=!1)),t.da&&I(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&yi(n,t.parent,e),t.isDeactivated=!0}),a)},so((()=>[e.include,e.exclude,e.matchBy]),(([e,t])=>{e&&h((t=>$o(e,t))),t&&h((e=>!$o(t,e)))}),{flush:"post",deep:!0});let p=null;const m=()=>{null!=p&&r.set(p,jo(n.subTree))};return zo(m),Uo(m),Xo((()=>{r.forEach(((t,o)=>{r.delete(o),s(t);const{subTree:i,suspense:a}=n,l=jo(i);if(t.type!==l.type||"key"===e.matchBy&&t.key!==l.key);else{l.component.bda&&I(l.component.bda),Do(l);const e=l.component.da;e&&Fr(e,a)}}))})),()=>{if(p=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!ri(o)||!(4&o.shapeFlag)&&!no(o.type))return i=null,o;let s=jo(o);const a=s.type,l=Fo(s,e.matchBy),{include:c,exclude:u}=e;if(c&&(!l||!$o(c,l))||u&&l&&$o(u,l))return i=s,o;const d=null==s.key?a:s.key,f=r.get(d);return s.el&&(s=di(s),no(o.type)&&(o.ssContent=s)),p=d,f&&(s.el=f.el,s.component=f.component,s.transition&&So(s,s.transition),s.shapeFlag|=512),s.shapeFlag|=256,i=s,no(o.type)?o:s}}},Po=Ao;function $o(e,t){return h(e)?e.some((e=>$o(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function Io(e,t){Bo(e,"a",t)}function Ro(e,t){Bo(e,"da",t)}function Bo(e,t,n=wi){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(o.__called=!1,Ho(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Mo(e.parent.vnode)&&No(o,t,n,e),e=e.parent}}function No(e,t,n,o){const r=Ho(t,e,o,!0);Ko((()=>{u(o[t],r)}),n)}function Do(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function jo(e){return no(e.type)?e.ssContent:e}function Fo(e,t){if("name"===t){const t=e.type;return Pi(ko(e)?t.__asyncResolved||{}:t)}return String(e.key)}function Vo(e){for(let t=0;t-1&&n.$pageInstance){if(n.type.__reserved)return;if(n!==n.$pageInstance&&(n=n.$pageInstance,function(e){return["onLoad","onShow"].indexOf(e)>-1}(e))){const o=n.proxy;_n(t.bind(o),n,e,"onLoad"===e?[o.$page.options]:[])}}const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Xe();const r=Ti(n),i=_n(t,n,e,o);return r(),Ke(),i});return o?i.unshift(s):i.push(s),s}var r}const Wo=e=>(t,n=wi)=>(!Oi||"sp"===e)&&Ho(e,((...e)=>t(...e)),n),qo=Wo("bm"),zo=Wo("m"),Yo=Wo("bu"),Uo=Wo("u"),Xo=Wo("bum"),Ko=Wo("um"),Go=Wo("sp"),Jo=Wo("rtg"),Qo=Wo("rtc");function Zo(e,t=wi){Ho("ec",e,t)}function er(e,t,n,o){let r;const i=n&&n[o];if(h(e)||v(e)){r=new Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,i&&i[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,s=n.length;o!ri(e)||e.type!==Xr&&!(e.type===Yr&&!nr(e.children))))?e:null}const or=e=>{if(!e)return null;if(Ei(e)){return Ai(e)||e.proxy}return or(e.parent)},rr=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>or(e.parent),$root:e=>or(e.root),$emit:e=>e.emit,$options:e=>fr(e),$forceUpdate:e=>e.f||(e.f=(e=>function(){e.effect.dirty=!0,Pn(e.update)})(e)),$nextTick:e=>e.n||(e.n=An.bind(e.proxy)),$watch:e=>lo.bind(e)}),ir=(e,t)=>e!==o&&!e.__isScriptSetup&&f(e,t),sr={get({_:e},t){const{ctx:n,setupState:r,data:i,props:s,accessCache:a,type:l,appContext:c}=e;let u;if("$"!==t[0]){const l=a[t];if(void 0!==l)switch(l){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(ir(r,t))return a[t]=1,r[t];if(i!==o&&f(i,t))return a[t]=2,i[t];if((u=e.propsOptions[0])&&f(u,t))return a[t]=3,s[t];if(n!==o&&f(n,t))return a[t]=4,n[t];lr&&(a[t]=0)}}const d=rr[t];let h,p;return d?("$attrs"===t&&it(e,0,t),d(e)):(h=l.__cssModules)&&(h=h[t])?h:n!==o&&f(n,t)?(a[t]=4,n[t]):(p=c.config.globalProperties,f(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return ir(i,t)?(i[t]=n,!0):r!==o&&f(r,t)?(r[t]=n,!0):!f(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s}},a){let l;return!!n[a]||e!==o&&f(e,a)||ir(t,a)||(l=s[0])&&f(l,a)||f(r,a)||f(rr,a)||f(i.config.globalProperties,a)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:f(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ar(e){return h(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let lr=!0;function cr(e){const t=fr(e),n=e.proxy,o=e.ctx;lr=!1,t.beforeCreate&&ur(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:a,watch:l,provide:c,inject:u,created:d,beforeMount:f,mounted:p,beforeUpdate:m,updated:v,activated:y,deactivated:b,beforeDestroy:w,beforeUnmount:x,destroyed:S,unmounted:C,render:T,renderTracked:k,renderTriggered:E,errorCaptured:O,serverPrefetch:M,expose:L,inheritAttrs:A,components:P,directives:$,filters:I}=t;if(u&&function(e,t,n=i){h(e)&&(e=gr(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?Tr(n.from||o,n.default,!0):Tr(n.from||o):Tr(n),sn(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,o,null),a)for(const i in a){const e=a[i];g(e)&&(o[i]=e.bind(n))}if(r){const t=r.call(n,n);_(t)&&(e.data=qt(t))}if(lr=!0,s)for(const h in s){const e=s[h],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):i,r=!g(e)&&g(e.set)?e.set.bind(n):i,a=$i({get:t,set:r});Object.defineProperty(o,h,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(l)for(const i in l)dr(l[i],o,n,i);if(c){const e=g(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{Cr(t,e[t])}))}function R(e,t){h(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&ur(d,e,"c"),R(qo,f),R(zo,p),R(Yo,m),R(Uo,v),R(Io,y),R(Ro,b),R(Zo,O),R(Qo,k),R(Jo,E),R(Xo,x),R(Ko,C),R(Go,M),h(L))if(L.length){const t=e.exposed||(e.exposed={});L.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});T&&e.render===i&&(e.render=T),null!=A&&(e.inheritAttrs=A),P&&(e.components=P),$&&(e.directives=$);const B=e.appContext.config.globalProperties.$applyOptions;B&&B(t,e,n)}function ur(e,t,n){_n(h(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function dr(e,t,n,o){const r=o.includes(".")?co(n,o):()=>n[o];if(v(e)){const n=t[e];g(n)&&so(r,n)}else if(g(e))so(r,e.bind(n));else if(_(e))if(h(e))e.forEach((e=>dr(e,t,n,o)));else{const o=g(e.handler)?e.handler.bind(n):t[e.handler];g(o)&&so(r,o,e)}}function fr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:r.length||n||o?(l={},r.length&&r.forEach((e=>hr(l,e,s,!0))),hr(l,t,s)):l=t,_(t)&&i.set(t,l),l}function hr(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&hr(e,i,n,!0),r&&r.forEach((t=>hr(e,t,n,!0)));for(const s in t)if(o&&"expose"===s);else{const o=pr[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const pr={data:mr,props:_r,emits:_r,methods:yr,computed:yr,beforeCreate:vr,created:vr,beforeMount:vr,mounted:vr,beforeUpdate:vr,updated:vr,beforeDestroy:vr,beforeUnmount:vr,destroyed:vr,unmounted:vr,activated:vr,deactivated:vr,errorCaptured:vr,serverPrefetch:vr,components:yr,directives:yr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=vr(e[o],t[o]);return n},provide:mr,inject:function(e,t){return yr(gr(e),gr(t))}};function mr(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function gr(e){if(h(e)){const t={};for(let n=0;n(i.has(e)||(e&&g(e.install)?(i.add(e),e.install(a,...t)):g(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(i,l,c){if(!s){const u=ui(n,o);return u.appContext=r,!0===c?c="svg":!1===c&&(c=void 0),l&&t?t(u,i):e(u,i,c),s=!0,a._container=i,i.__vue_app__=a,a._instance=u.component,Ai(u.component)||u.component.proxy}},unmount(){s&&(e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,a),runWithContext(e){const t=Sr;Sr=a;try{return e()}finally{Sr=t}}};return a}}let Sr=null;function Cr(e,t){if(wi){let n=wi.provides;const o=wi.parent&&wi.parent.provides;o===n&&(n=wi.provides=Object.create(o)),n[e]=t,"app"===wi.type.mpType&&wi.appContext.app.provide(e,t)}else;}function Tr(e,t,n=!1){const o=wi||Wn;if(o||Sr){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Sr._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&g(t)?t.call(o&&o.proxy):t}}function kr(e,t,n,r){const[i,s]=e.propsOptions;let a,l=!1;if(t)for(let o in t){if(T(o))continue;const c=t[o];let u;i&&f(i,u=O(o))?s&&s.includes(u)?(a||(a={}))[u]=c:n[u]=c:Hn(e.emitsOptions,o)||o in r&&c===r[o]||(r[o]=Er(e,o,c),l=!0)}if(s){const t=Qt(n),r=a||o;for(let o=0;o{d=!0;const[n,o]=Mr(e,t,!0);c(l,n),o&&u.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!a&&!d)return _(e)&&i.set(e,r),r;if(h(a))for(let r=0;r-1,n[1]=o<0||t-1||f(n,"default"))&&u.push(e)}}}const p=[l,u];return _(e)&&i.set(e,p),p}function Lr(e){return"$"!==e[0]&&!T(e)}function Ar(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Pr(e,t){return Ar(e)===Ar(t)}function $r(e,t){return h(t)?t.findIndex((t=>Pr(t,e))):g(t)&&Pr(t,e)?0:-1}const Ir=e=>"_"===e[0]||"$stable"===e,Rr=e=>h(e)?e.map(pi):[pi(e)],Br=(e,t,n)=>{if(t._n)return t;const o=Yn(((...e)=>Rr(t(...e))),n);return o._c=!1,o},Nr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Ir(r))continue;const n=e[r];if(g(n))t[r]=Br(0,n,o);else if(null!=n){const e=Rr(n);t[r]=()=>e}}},Dr=(e,t)=>{const n=Rr(t);e.slots.default=()=>n};function jr(e,t,n,r,i=!1){if(h(e))return void e.forEach(((e,o)=>jr(e,t&&(h(t)?t[o]:t),n,r,i)));if(ko(r)&&!i)return;const s=4&r.shapeFlag?Ai(r.component)||r.component.proxy:r.el,a=i?null:s,{i:l,r:c}=e,d=t&&t.r,p=l.refs===o?l.refs={}:l.refs,m=l.setupState;if(null!=d&&d!==c&&(v(d)?(p[d]=null,f(m,d)&&(m[d]=null)):sn(d)&&(d.value=null)),g(c))yn(c,l,12,[a,p]);else{const t=v(c),o=sn(c);if(t||o){const r=()=>{if(e.f){const n=t?f(m,c)?m[c]:p[c]:c.value;i?h(n)&&u(n,s):h(n)?n.includes(s)||n.push(s):t?(p[c]=[s],f(m,c)&&(m[c]=p[c])):(c.value=[s],e.k&&(p[e.k]=c.value))}else t?(p[c]=a,f(m,c)&&(m[c]=a)):o&&(c.value=a,e.k&&(p[e.k]=a))};a?(r.id=-1,Fr(r,n)):r()}}}const Fr=function(e,t){var n;t&&t.pendingBranch?h(e)?t.effects.push(...e):t.effects.push(e):(h(n=e)?kn.push(...n):En&&En.includes(n,n.allowRecurse?On+1:On)||kn.push(n),$n())};function Vr(e){return function(e,t){D().__VUE__=!0;const{insert:n,remove:s,patchProp:a,forcePatchProp:l,createElement:u,createText:d,createComment:h,setText:p,setElementText:m,parentNode:g,nextSibling:v,setScopeId:y=i,insertStaticContent:_}=e,w=(e,t,n,o=null,r=null,i=null,s,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!ii(e,t)&&(o=te(e),G(e,r,i,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Ur:x(e,t,n,o);break;case Xr:S(e,t,n,o);break;case Kr:null==e&&C(t,n,o,s);break;case Yr:F(e,t,n,o,r,i,s,a,l);break;default:1&d?M(e,t,n,o,r,i,s,a,l):6&d?V(e,t,n,o,r,i,s,a,l):(64&d||128&d)&&c.process(e,t,n,o,r,i,s,a,l,re)}null!=u&&r&&jr(u,e&&e.ref,i,t||e,!t)},x=(e,t,o,r)=>{if(null==e)n(t.el=d(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=h(t.children||""),o,r):t.el=e.el},C=(e,t,n,o)=>{[e.el,e.anchor]=_(e.children,t,n,o,e.el,e.anchor)},k=({el:e,anchor:t},o,r)=>{let i;for(;e&&e!==t;)i=v(e),n(e,o,r),e=i;n(t,o,r)},E=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=v(e),s(e),e=n;s(t)},M=(e,t,n,o,r,i,s,a,l)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?A(t,n,o,r,i,s,a,l):B(e,t,r,i,s,a,l)},A=(e,t,o,r,i,s,l,c)=>{let d,f;const{props:h,shapeFlag:p,transition:g,dirs:v}=e;if(d=e.el=u(e.type,s,h&&h.is,h),8&p?m(d,e.children):16&p&&$(e.children,d,null,r,i,Hr(e,s),l,c),v&&ho(e,null,r,"created"),P(d,e,e.scopeId,l,r),h){for(const t in h)"value"===t||T(t)||a(d,t,null,h[t],s,e.children,r,i,ee);"value"in h&&a(d,"value",null,h.value,s),(f=h.onVnodeBeforeMount)&&yi(f,r,e)}Object.defineProperty(d,"__vueParentComponent",{value:r,enumerable:!1}),v&&ho(e,null,r,"beforeMount");const y=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(i,g);y&&g.beforeEnter(d),n(d,t,o),((f=h&&h.onVnodeMounted)||y||v)&&Fr((()=>{f&&yi(f,r,e),y&&g.enter(d),v&&ho(e,null,r,"mounted")}),i)},P=(e,t,n,o,r)=>{if(n&&y(e,n),o)for(let i=0;i{for(let c=l;c{const u=t.el=e.el;let{patchFlag:d,dynamicChildren:f,dirs:h}=t;d|=16&e.patchFlag;const p=e.props||o,g=t.props||o;let v;if(n&&Wr(n,!1),(v=g.onVnodeBeforeUpdate)&&yi(v,n,t,e),h&&ho(t,e,n,"beforeUpdate"),n&&Wr(n,!0),f?N(e.dynamicChildren,f,u,n,r,Hr(t,i),s):c||Y(e,t,u,null,n,r,Hr(t,i),s,!1),d>0){if(16&d)j(u,t,p,g,n,r,i);else if(2&d&&p.class!==g.class&&a(u,"class",null,g.class,i),4&d&&a(u,"style",p.style,g.style,i),8&d){const o=t.dynamicProps;for(let t=0;t{v&&yi(v,n,t,e),h&&ho(t,e,n,"updated")}),r)},N=(e,t,n,o,r,i,s)=>{for(let a=0;a{if(n!==r){if(n!==o)for(const o in n)T(o)||o in r||a(e,o,n[o],null,c,t.children,i,s,ee);for(const o in r){if(T(o))continue;const u=r[o],d=n[o];(u!==d&&"value"!==o||l&&l(e,o))&&a(e,o,d,u,c,t.children,i,s,ee)}"value"in r&&a(e,"value",n.value,r.value,c)}},F=(e,t,o,r,i,s,a,l,c)=>{const u=t.el=e?e.el:d(""),f=t.anchor=e?e.anchor:d("");let{patchFlag:h,dynamicChildren:p,slotScopeIds:m}=t;m&&(l=l?l.concat(m):m),null==e?(n(u,o,r),n(f,o,r),$(t.children||[],o,f,i,s,a,l,c)):h>0&&64&h&&p&&e.dynamicChildren?(N(e.dynamicChildren,p,o,i,s,a,l),(null!=t.key||i&&t===i.subTree)&&qr(e,t,!0)):Y(e,t,o,f,i,s,a,l,c)},V=(e,t,n,o,r,i,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,s,l):H(t,n,o,r,i,s,l):W(e,t,l)},H=(e,t,n,r,i,s,a)=>{const l=e.component=function(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||_i,s={uid:bi++,vnode:e,type:r,parent:t,appContext:i,get renderer(){return"app"===r.mpType?"app":this.$pageInstance&&this.$pageInstance==s?"page":"component"},root:null,next:null,subTree:null,effect:null,update:null,scope:new De(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Mr(r,i),emitsOptions:Vn(r,i),emit:null,emitted:null,propsDefaults:o,inheritAttrs:r.inheritAttrs,ctx:o,data:o,props:o,attrs:o,slots:o,refs:o,setupState:o,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,bda:null,da:null,ba:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=jn.bind(null,s),s.$pageInstance=t&&t.$pageInstance,e.ce&&e.ce(s);return s}(e,r,i);if(Mo(e)&&(l.ctx.renderer=re),function(e,t=!1){t&&Ci(t);const{props:n,children:o}=e.vnode,r=Ei(e);(function(e,t,n,o=!1){const r={},i={};R(i,si,1),e.propsDefaults=Object.create(null),kr(e,t,r,i);for(const s in e.propsOptions[0])s in r||(r[s]=void 0);n?e.props=o?r:zt(r):e.type.props?e.props=r:e.props=i,e.attrs=i})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Qt(t),R(t,"_",n)):Nr(t,e.slots={})}else e.slots={},t&&Dr(e,t);R(e.slots,si,1)})(e,o);const i=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Zt(new Proxy(e.ctx,sr));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(it(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,r=Ti(e);Xe();const i=yn(o,e,0,[e.props,n]);if(Ke(),r(),b(i)){if(i.then(ki,ki),t)return i.then((n=>{Mi(e,n,t)})).catch((t=>{bn(t,e,0)}));e.asyncDep=i}else Mi(e,i,t)}else Li(e,t)}(e,t):void 0;t&&Ci(!1)}(l),l.asyncDep){if(i&&i.registerDep(l,q),!e.el){const e=l.subTree=ui(Xr);S(null,e,t,n)}}else q(l,e,t,n,i,s,a)},W=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!r&&!a||a&&a.$stable)||o!==s&&(o?!s||Gn(o,s,c):!!s);if(1024&l)return!0;if(16&l)return o?Gn(o,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;tTn&&Cn.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},q=(e,t,n,o,r,s,a)=>{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:i,vnode:c}=e;{const n=zr(e);if(n)return t&&(t.el=c.el,z(e,t,a)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let u,d=t;Wr(e,!1),t?(t.el=c.el,z(e,t,a)):t=c,n&&I(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&yi(u,i,t,c),Wr(e,!0);const f=Un(e),h=e.subTree;e.subTree=f,w(h,f,g(h.el),te(h),e,r,s),t.el=f.el,null===d&&function({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,f.el),o&&Fr(o,r),(u=t.props&&t.props.onVnodeUpdated)&&Fr((()=>yi(u,i,t,c)),r)}else{let i;const{el:a,props:l}=t,{bm:c,m:u,parent:d}=e,f=ko(t);if(Wr(e,!1),c&&I(c),!f&&(i=l&&l.onVnodeBeforeMount)&&yi(i,d,t),Wr(e,!0),a&&se){const n=()=>{e.subTree=Un(e),se(a,e.subTree,e,r,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=Un(e);w(null,i,n,o,e,r,s),t.el=i.el}if(u&&Fr(u,r),!f&&(i=l&&l.onVnodeMounted)){const e=t;Fr((()=>yi(i,d,e)),r)}(256&t.shapeFlag||d&&ko(d.vnode)&&256&d.vnode.shapeFlag)&&(e.ba&&Vo(e.ba),e.a&&Fr(e.a,r)),e.isMounted=!0,t=n=o=null}},c=e.effect=new Ve(l,i,(()=>Pn(u)),e.scope),u=e.update=()=>{c.dirty&&c.run()};u.id=e.uid,Wr(e,!0),u()},z=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,a=Qt(r),[l]=e.propsOptions;let c=!1;if(!(o||s>0)||16&s){let o;kr(e,t,r,i)&&(c=!0);for(const i in a)t&&(f(t,i)||(o=L(i))!==i&&f(t,o))||(l?!n||void 0===n[i]&&void 0===n[o]||(r[i]=Or(l,a,i,void 0,e,!0)):delete r[i]);if(i!==a)for(const e in i)t&&f(t,e)||(delete i[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:r,slots:i}=e;let s=!0,a=o;if(32&r.shapeFlag){const e=t._;e?n&&1===e?s=!1:(c(i,t),n||1!==e||delete i._):(s=!t.$stable,Nr(t,i)),a=t}else t&&(Dr(e,t),a={default:1});if(s)for(const o in i)Ir(o)||null!=a[o]||delete i[o]})(e,t.children,n),Xe(),In(e),Ke()},Y=(e,t,n,o,r,i,s,a,l=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f)return void X(c,d,n,o,r,i,s,a,l);if(256&f)return void U(c,d,n,o,r,i,s,a,l)}8&h?(16&u&&ee(c,r,i),d!==c&&m(n,d)):16&u?16&h?X(c,d,n,o,r,i,s,a,l):ee(c,r,i,!0):(8&u&&m(n,""),16&h&&$(d,n,o,r,i,s,a,l))},U=(e,t,n,o,i,s,a,l,c)=>{t=t||r;const u=(e=e||r).length,d=t.length,f=Math.min(u,d);let h;for(h=0;hd?ee(e,i,s,!0,!1,f):$(t,n,o,i,s,a,l,c,f)},X=(e,t,n,o,i,s,a,l,c)=>{let u=0;const d=t.length;let f=e.length-1,h=d-1;for(;u<=f&&u<=h;){const o=e[u],r=t[u]=c?mi(t[u]):pi(t[u]);if(!ii(o,r))break;w(o,r,n,null,i,s,a,l,c),u++}for(;u<=f&&u<=h;){const o=e[f],r=t[h]=c?mi(t[h]):pi(t[h]);if(!ii(o,r))break;w(o,r,n,null,i,s,a,l,c),f--,h--}if(u>f){if(u<=h){const e=h+1,r=eh)for(;u<=f;)G(e[u],i,s,!0),u++;else{const p=u,m=u,g=new Map;for(u=m;u<=h;u++){const e=t[u]=c?mi(t[u]):pi(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const _=h-m+1;let b=!1,x=0;const S=new Array(_);for(u=0;u<_;u++)S[u]=0;for(u=p;u<=f;u++){const o=e[u];if(y>=_){G(o,i,s,!0);continue}let r;if(null!=o.key)r=g.get(o.key);else for(v=m;v<=h;v++)if(0===S[v-m]&&ii(o,t[v])){r=v;break}void 0===r?G(o,i,s,!0):(S[r-m]=u+1,r>=x?x=r:b=!0,w(o,t[r],n,null,i,s,a,l,c),y++)}const C=b?function(e){const t=e.slice(),n=[0];let o,r,i,s,a;const l=e.length;for(o=0;o>1,e[n[a]]0&&(t[o]=n[i-1]),n[i]=o)}}i=n.length,s=n[i-1];for(;i-- >0;)n[i]=s,s=t[s];return n}(S):r;for(v=C.length-1,u=_-1;u>=0;u--){const e=m+u,r=t[e],f=e+1{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void a.move(e,t,o,re);if(a===Yr){n(s,t,o);for(let e=0;el.enter(s)),i);else{const{leave:e,delayLeave:r,afterLeave:i}=l,a=()=>n(s,t,o),c=()=>{e(s,(()=>{a(),i&&i()}))};r?r(s,a,c):c()}else n(s,t,o)},G=(e,t,n,o=!1,r=!1)=>{const{type:i,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:f}=e;if(null!=a&&jr(a,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const h=1&u&&f,p=!ko(e);let m;if(p&&(m=s&&s.onVnodeBeforeUnmount)&&yi(m,t,e),6&u)Z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);h&&ho(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,re,o):c&&(i!==Yr||d>0&&64&d)?ee(c,t,n,!1,!0):(i===Yr&&384&d||!r&&16&u)&&ee(l,t,n),o&&J(e)}(p&&(m=s&&s.onVnodeUnmounted)||h)&&Fr((()=>{m&&yi(m,t,e),h&&ho(e,null,t,"unmounted")}),n)},J=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===Yr)return void Q(n,o);if(t===Kr)return void E(e);const i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,s=()=>t(n,i);o?o(e.el,i,s):s()}else i()},Q=(e,t)=>{let n;for(;e!==t;)n=v(e),s(e),e=n;s(t)},Z=(e,t,n)=>{const{bum:o,scope:r,update:i,subTree:s,um:a}=e;o&&I(o),r.stop(),i&&(i.active=!1,G(s,e,t,n)),a&&Fr(a,t),Fr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},ee=(e,t,n,o=!1,r=!1,i=0)=>{for(let s=i;s6&e.shapeFlag?te(e.component.subTree):128&e.shapeFlag?e.suspense.next():v(e.anchor||e.el);let ne=!1;const oe=(e,t,n)=>{null==e?t._vnode&&G(t._vnode,null,null,!0):w(t._vnode||null,e,t,null,null,null,n),ne||(ne=!0,In(),Rn(),ne=!1),t._vnode=e},re={p:w,um:G,m:K,r:J,mt:H,mc:$,pc:Y,pbc:N,n:te,o:e};let ie,se;t&&([ie,se]=t(re));return{render:oe,hydrate:ie,createApp:xr(oe,ie)}}(e)}function Hr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Wr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function qr(e,t,n=!1){const o=e.children,r=t.children;if(h(o)&&h(r))for(let i=0;i0?Jr||r:null,Gr.pop(),Jr=Gr[Gr.length-1]||null,Zr>0&&Jr&&Jr.push(e),e}function ni(e,t,n,o,r,i){return ti(ci(e,t,n,o,r,i,!0))}function oi(e,t,n,o,r){return ti(ui(e,t,n,o,r,!0))}function ri(e){return!!e&&!0===e.__v_isVNode}function ii(e,t){return e.type===t.type&&e.key===t.key}const si="__vInternal",ai=({key:e})=>null!=e?e:null,li=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||sn(e)||g(e)?{i:Wn,r:e,k:t,f:!!n}:e:null);function ci(e,t=null,n=null,o=0,r=null,i=(e===Yr?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ai(t),ref:t&&li(t),scopeId:qn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Wn};return a?(gi(l,n),128&i&&e.normalize(l)):n&&(l.shapeFlag|=v(n)?8:16),Zr>0&&!s&&Jr&&(l.patchFlag>0||6&i)&&32!==l.patchFlag&&Jr.push(l),l}const ui=function(e,t=null,n=null,o=0,r=null,i=!1){e&&e!==Qn||(e=Xr);if(ri(e)){const o=di(e,t,!0);return n&&gi(o,n),Zr>0&&!i&&Jr&&(6&o.shapeFlag?Jr[Jr.indexOf(e)]=o:Jr.push(o)),o.patchFlag|=-2,o}s=e,g(s)&&"__vccOpts"in s&&(e=e.__vccOpts);var s;if(t){t=function(e){return e?Jt(e)||si in e?c({},e):e:null}(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=le(e)),_(n)&&(Jt(n)&&!h(n)&&(n=c({},n)),t.style=ae(n))}const a=v(e)?1:no(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:g(e)?2:0;return ci(e,t,n,o,r,a,i,!0)};function di(e,t,n=!1){const{props:o,ref:r,patchFlag:i,children:s}=e,a=t?vi(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&ai(a),ref:t&&t.ref?n&&r?h(r)?r.concat(li(t)):[r,li(t)]:li(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Yr?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&di(e.ssContent),ssFallback:e.ssFallback&&di(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function fi(e=" ",t=0){return ui(Ur,null,e,t)}function hi(e="",t=!1){return t?(Qr(),oi(Xr,null,e)):ui(Xr,null,e)}function pi(e){return null==e||"boolean"==typeof e?ui(Xr):h(e)?ui(Yr,null,e.slice()):"object"==typeof e?mi(e):ui(Ur,null,String(e))}function mi(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:di(e)}function gi(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(h(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),gi(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||si in t?3===o&&Wn&&(1===Wn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Wn}}else g(t)?(t={default:t,_ctx:Wn},n=32):(t=String(t),64&o?(n=16,t=[fi(t)]):n=8);e.children=t,e.shapeFlag|=n}function vi(...e){const t={};for(let n=0;nwi||Wn;let Si,Ci;{const e=D(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};Si=t("__VUE_INSTANCE_SETTERS__",(e=>wi=e)),Ci=t("__VUE_SSR_SETTERS__",(e=>Oi=e))}const Ti=e=>{const t=wi;return Si(e),e.scope.on(),()=>{e.scope.off(),Si(t)}},ki=()=>{wi&&wi.scope.off(),Si(null)};function Ei(e){return 4&e.vnode.shapeFlag}let Oi=!1;function Mi(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:_(t)&&(e.setupState=hn(t)),Li(e,n)}function Li(e,t,n){const o=e.type;e.render||(e.render=o.render||i);{const t=Ti(e);Xe();try{cr(e)}finally{Ke(),t()}}}function Ai(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(hn(Zt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in rr?rr[n](e):void 0,has:(e,t)=>t in e||t in rr}))}function Pi(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}const $i=(e,t)=>{const n=function(e,t,n=!1){let o,r;const s=g(e);return s?(o=e,r=i):(o=e.get,r=e.set),new nn(o,r,s||!r,n)}(e,0,Oi);return n};function Ii(e,t,n){const o=arguments.length;return 2===o?_(t)&&!h(t)?ri(t)?ui(e,null,[t]):ui(e,t):ui(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&ri(n)&&(n=[n]),ui(e,t,n))}const Ri="3.4.21",Bi="undefined"!=typeof document?document:null,Ni=Bi&&Bi.createElement("template"),Di={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?Bi.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Bi.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Bi.createElement(e,{is:n}):Bi.createElement(e);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Bi.createTextNode(e),createComment:e=>Bi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{Ni.innerHTML="svg"===o?`${e}`:"mathml"===o?`${e}`:e;const r=Ni.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ji="transition",Fi=Symbol("_vtc"),Vi=(e,{slots:t})=>Ii(yo,function(e){const t={};for(const c in e)c in Hi||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=s,appearToClass:d=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(_(e))return[zi(e.enter),zi(e.leave)];{const t=zi(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:w,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=y,onAppear:T=b,onAppearCancelled:k=w}=t,E=(e,t,n)=>{Ui(e,t?d:a),Ui(e,t?u:s),n&&n()},O=(e,t)=>{e._isLeaving=!1,Ui(e,f),Ui(e,p),Ui(e,h),t&&t()},M=e=>(t,n)=>{const r=e?T:b,s=()=>E(t,e,n);Wi(r,[t,s]),Xi((()=>{Ui(t,e?l:i),Yi(t,e?d:a),qi(r)||Gi(t,o,g,s)}))};return c(t,{onBeforeEnter(e){Wi(y,[e]),Yi(e,i),Yi(e,s)},onBeforeAppear(e){Wi(C,[e]),Yi(e,l),Yi(e,u)},onEnter:M(!1),onAppear:M(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>O(e,t);Yi(e,f),document.body.offsetHeight,Yi(e,h),Xi((()=>{e._isLeaving&&(Ui(e,f),Yi(e,p),qi(x)||Gi(e,o,v,n))})),Wi(x,[e,n])},onEnterCancelled(e){E(e,!1),Wi(w,[e])},onAppearCancelled(e){E(e,!0),Wi(k,[e])},onLeaveCancelled(e){O(e),Wi(S,[e])}})}(e),t);Vi.displayName="Transition";const Hi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Vi.props=c({},vo,Hi);const Wi=(e,t=[])=>{h(e)?e.forEach((e=>e(...t))):e&&e(...t)},qi=e=>!!e&&(h(e)?e.some((e=>e.length>1)):e.length>1);function zi(e){const t=(e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t})(e);return t}function Yi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Fi]||(e[Fi]=new Set)).add(t)}function Ui(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Fi];n&&(n.delete(t),n.size||(e[Fi]=void 0))}function Xi(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Ki=0;function Gi(e,t,n,o){const r=e._endId=++Ki,i=()=>{r===e._endId&&o()};if(n)return setTimeout(i,n);const{type:s,timeout:a,propCount:l}=function(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),i=o("transitionDuration"),s=Ji(r,i),a=o("animationDelay"),l=o("animationDuration"),c=Ji(a,l);let u=null,d=0,f=0;t===ji?s>0&&(u=ji,d=s,f=i.length):"animation"===t?c>0&&(u="animation",d=c,f=l.length):(d=Math.max(s,c),u=d>0?s>c?ji:"animation":null,f=u?u===ji?i.length:l.length:0);const h=u===ji&&/\b(transform|all)(,|$)/.test(o("transitionProperty").toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}(e,t);if(!s)return o();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=t=>{t.target===e&&++u>=l&&d()};setTimeout((()=>{uQi(t)+Qi(e[n]))))}function Qi(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}const Zi=Symbol("_vod"),es=Symbol("_vsh"),ts={beforeMount(e,{value:t},{transition:n}){e[Zi]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ns(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),ns(e,!0),o.enter(e)):o.leave(e,(()=>{ns(e,!1)})):ns(e,t))},beforeUnmount(e,{value:t}){ns(e,t)}};function ns(e,t){e.style.display=t?e[Zi]:"none",e[es]=!t}const os=Symbol(""),rs=/(^|;)\s*display\s*:/;const is=/\s*!important$/;function ss(e,t,n){if(h(n))n.forEach((n=>ss(e,t,n)));else if(null==n&&(n=""),n=gs(n),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=ls[t];if(n)return n;let o=O(t);if("filter"!==o&&o in e)return ls[t]=o;o=A(o);for(let r=0;re.replace(ye,((e,t)=>{if(!t)return e;if(1===ps)return`${t}${hs}`;const n=function(e,t){const n=Math.pow(10,t+1),o=Math.floor(e*n);return 10*Math.round(o/10)/n}(parseFloat(t)*ps,ms);return 0===n?"0":`${n}${hs}`})));var hs,ps,ms;const gs=e=>v(e)?fs(e):e,vs="http://www.w3.org/1999/xlink";const ys=Symbol("_vei");function _s(e,t,n,o,r=null){const i=e[ys]||(e[ys]={}),s=i[t];if(o&&s)s.value=o;else{const[n,a]=function(e){let t;if(bs.test(e)){let n;for(t={};n=e.match(bs);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):L(e.slice(2)),t]}(t);if(o){const s=i[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();const o=t&&t.proxy,r=o&&o.$nne,{value:i}=n;if(r&&h(i)){const n=Ss(e,i);for(let o=0;ows||(xs.then((()=>ws=0)),ws=Date.now()))(),n}(o,r);!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,s,a)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,a),i[t]=void 0)}}const bs=/(?:Once|Passive|Capture)$/;let ws=0;const xs=Promise.resolve();function Ss(e,t){if(h(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>{const t=t=>!t._stopped&&e&&e(t);return t.__wwe=e.__wwe,t}))}return t}const Cs=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Ts=["ctrl","shift","alt","meta"],ks={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ts.some((n=>e[`${n}Key`]&&!t.includes(n)))},Es=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{if(0===t.indexOf("change:"))return function(e,t,n,o=null){if(!n||!o)return;const r=t.replace("change:",""),{attrs:i}=o,s=i[r],a=(e.__wxsProps||(e.__wxsProps={}))[r];if(a===s)return;e.__wxsProps[r]=s;const l=o.proxy;An((()=>{n(s,a,l.$gcd(l,!0),l.$gcd(l,!1))}))}(e,t,o,s);const d="svg"===r;"class"===t?function(e,t,n){const{__wxsAddClass:o,__wxsRemoveClass:r}=e;r&&r.length&&(t=(t||"").split(/\s+/).filter((e=>-1===r.indexOf(e))).join(" "),r.length=0),o&&o.length&&(t=(t||"")+" "+o.join(" "));const i=e[Fi];i&&(t=(t?[t,...i]:[...i]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,d):"style"===t?function(e,t,n){const o=e.style,r=v(n);let i=!1;if(n&&!r){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ss(o,t,"")}else for(const e in t)null==n[e]&&ss(o,e,"");for(const e in n)"display"===e&&(i=!0),ss(o,e,n[e])}else if(r){if(t!==n){const e=o[os];e&&(n+=";"+e),o.cssText=n,i=rs.test(n)}}else t&&e.removeAttribute("style");Zi in e&&(e[Zi]=i?o.display:"",e[es]&&(o.display="none"));const{__wxsStyle:s}=e;if(s)for(const a in s)ss(o,a,s[a])}(e,n,o):a(t)?l(t)||_s(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Cs(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(Cs(t)&&v(n))return!1;return t in e}(e,t,o,d))?function(e,t,n,o,r,i,s){if("innerHTML"===t||"textContent"===t)return o&&s(o,r,i),void(e[t]=null==n?"":n);const a=e.tagName;if("value"===t&&"PROGRESS"!==a&&!a.includes("-")){const o=null==n?"":n;return("OPTION"===a?e.getAttribute("value")||"":e.value)===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let l=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=Y(n):null==n&&"string"===o?(n="",l=!0):"number"===o&&(n=0,l=!0)}try{e[t]=n}catch(c){}l&&e.removeAttribute(t)}(e,t,o,i,s,c,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(vs,t.slice(6,t.length)):e.setAttributeNS(vs,t,n);else{const o=z(t);null==n||o&&!Y(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,d))},forcePatchProp:(e,t)=>0===t.indexOf("change:")||("class"===t&&e.__wxsClassChanged?(e.__wxsClassChanged=!1,!0):!("style"!==t||!e.__wxsStyleChanged)&&(e.__wxsStyleChanged=!1,!0))},Di);let Ms;const Ls=(...e)=>{const t=(Ms||(Ms=Vr(Os))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(v(e)){return document.querySelector(e)}return e} +/*! + * vue-router v4.4.4 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */(e);if(!o)return;const r=t._component;g(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};const As="undefined"!=typeof document;function Ps(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}const $s=Object.assign;function Is(e,t){const n={};for(const o in t){const r=t[o];n[o]=Bs(r)?r.map(e):e(r)}return n}const Rs=()=>{},Bs=Array.isArray,Ns=/#/g,Ds=/&/g,js=/\//g,Fs=/=/g,Vs=/\?/g,Hs=/\+/g,Ws=/%5B/g,qs=/%5D/g,zs=/%5E/g,Ys=/%60/g,Us=/%7B/g,Xs=/%7C/g,Ks=/%7D/g,Gs=/%20/g;function Js(e){return encodeURI(""+e).replace(Xs,"|").replace(Ws,"[").replace(qs,"]")}function Qs(e){return Js(e).replace(Hs,"%2B").replace(Gs,"+").replace(Ns,"%23").replace(Ds,"%26").replace(Ys,"`").replace(Us,"{").replace(Ks,"}").replace(zs,"^")}function Zs(e){return null==e?"":function(e){return Js(e).replace(Ns,"%23").replace(Vs,"%3F")}(e).replace(js,"%2F")}function ea(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const ta=/\/$/;function na(e,t,n="/"){let o,r={},i="",s="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(o=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),r=e(i)),a>-1&&(o=o||t.slice(0,a),s=t.slice(a,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];".."!==r&&"."!==r||o.push("");let i,s,a=n.length-1;for(i=0;i1&&a--}return n.slice(0,a).join("/")+"/"+o.slice(i).join("/")}(null!=o?o:t,n),{fullPath:o+(i&&"?")+i+s,path:o,query:r,hash:ea(s)}}function oa(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function ra(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ia(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!sa(e[n],t[n]))return!1;return!0}function sa(e,t){return Bs(e)?aa(e,t):Bs(t)?aa(t,e):e===t}function aa(e,t){return Bs(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}const la={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var ca,ua,da,fa;function ha(e){if(!e)if(As){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(ta,"")}(ua=ca||(ca={})).pop="pop",ua.push="push",(fa=da||(da={})).back="back",fa.forward="forward",fa.unknown="";const pa=/^[^#]+#/;function ma(e,t){return e.replace(pa,"#")+t}const ga=()=>({left:window.scrollX,top:window.scrollY});function va(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}function ya(e,t){return(history.state?history.state.position-t:-1)+e}const _a=new Map;function ba(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let t=r.includes(e.slice(i))?e.slice(i).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),oa(n,"")}return oa(n,e)+o+r}function wa(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?ga():null}}function xa(e){const{history:t,location:n}=window,o={value:ba(e,n)},r={value:t.state};function i(o,i,s){const a=e.indexOf("#"),l=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+o:location.protocol+"//"+location.host+e+o;try{t[s?"replaceState":"pushState"](i,"",l),r.value=i}catch(c){console.error(c),n[s?"replace":"assign"](l)}}return r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const s=$s({},r.value,t.state,{forward:e,scroll:ga()});i(s.current,s,!0),i(e,$s({},wa(o.value,e,null),{position:s.position+1},n),!1),o.value=e},replace:function(e,n){i(e,$s({},t.state,wa(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}function Sa(e){const t=xa(e=ha(e)),n=function(e,t,n,o){let r=[],i=[],s=null;const a=({state:i})=>{const a=ba(e,location),l=n.value,c=t.value;let u=0;if(i){if(n.value=a,t.value=i,s&&s===l)return void(s=null);u=c?i.position-c.position:0}else o(a);r.forEach((e=>{e(n.value,l,{delta:u,type:ca.pop,direction:u?u>0?da.forward:da.back:da.unknown})}))};function l(){const{history:e}=window;e.state&&e.replaceState($s({},e.state,{scroll:ga()}),"")}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:function(){s=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return i.push(t),t},destroy:function(){for(const e of i)e();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}}}(e,t.state,t.location,t.replace);const o=$s({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:ma.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Ca(e){return"string"==typeof e||"symbol"==typeof e}const Ta=Symbol("");var ka,Ea;function Oa(e,t){return $s(new Error,{type:e,[Ta]:!0},t)}function Ma(e,t){return e instanceof Error&&Ta in e&&(null==t||!!(e.type&t))}(Ea=ka||(ka={}))[Ea.aborted=4]="aborted",Ea[Ea.cancelled=8]="cancelled",Ea[Ea.duplicated=16]="duplicated";const La={sensitive:!1,strict:!1,start:!0,end:!0},Aa=/[.+*?^${}()[\]/\\]/g;function Pa(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function $a(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Ra={type:0,value:""},Ba=/[a-zA-Z0-9_]/;function Na(e,t,n){const o=function(e,t){const n=$s({},La,t),o=[];let r=n.start?"^":"";const i=[];for(const l of e){const e=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let t=0;t1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function f(){c+=a}for(;l{i(f)}:Rs}function i(e){if(Ca(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(i),t.alias.forEach(i))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(i),e.alias.forEach(i))}}function s(e){const t=function(e,t){let n=0,o=t.length;for(;n!==o;){const r=n+o>>1;$a(e,t[r])<0?o=r:n=r+1}const r=function(e){let t=e;for(;t=t.parent;)if(qa(t)&&0===$a(e,t))return t;return}(e);r&&(o=t.lastIndexOf(r,o-1));return o}(e,n);n.splice(t,0,e),e.record.name&&!Va(e)&&o.set(e.record.name,e)}return t=Wa({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,i,s,a={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw Oa(1,{location:e});s=r.record.name,a=$s(ja(t.params,r.keys.filter((e=>!e.optional)).concat(r.parent?r.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&ja(e.params,r.keys.map((e=>e.name)))),i=r.stringify(a)}else if(null!=e.path)i=e.path,r=n.find((e=>e.re.test(i))),r&&(a=r.parse(i),s=r.record.name);else{if(r=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw Oa(1,{location:e,currentLocation:t});s=r.record.name,a=$s({},t.params,e.params),i=r.stringify(a)}const l=[];let c=r;for(;c;)l.unshift(c.record),c=c.parent;return{name:s,path:i,params:a,matched:l,meta:Ha(l)}},removeRoute:i,clearRoutes:function(){n.length=0,o.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}function ja(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Fa(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]="object"==typeof n?n[o]:n;return t}function Va(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ha(e){return e.reduce(((e,t)=>$s(e,t.meta)),{})}function Wa(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function qa({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function za(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;oe&&Qs(e))):[o&&Qs(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}))}return t}function Ua(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=Bs(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const Xa=Symbol(""),Ka=Symbol(""),Ga=Symbol(""),Ja=Symbol(""),Qa=Symbol("");function Za(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function el(e,t,n,o,r,i=(e=>e())){const s=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise(((a,l)=>{const c=e=>{var i;!1===e?l(Oa(4,{from:n,to:t})):e instanceof Error?l(e):"string"==typeof(i=e)||i&&"object"==typeof i?l(Oa(2,{from:t,to:e})):(s&&o.enterCallbacks[r]===s&&"function"==typeof e&&s.push(e),a())},u=i((()=>e.call(o&&o.instances[r],t,n,c)));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch((e=>l(e)))}))}function tl(e,t,n,o,r=(e=>e())){const i=[];for(const s of e)for(const e in s.components){let a=s.components[e];if("beforeRouteEnter"===t||s.instances[e])if(Ps(a)){const l=(a.__vccOpts||a)[t];l&&i.push(el(l,n,o,s,e,r))}else{let l=a();i.push((()=>l.then((i=>{if(!i)throw new Error(`Couldn't resolve component "${e}" at "${s.path}"`);const a=(l=i).__esModule||"Module"===l[Symbol.toStringTag]||l.default&&Ps(l.default)?i.default:i;var l;s.mods[e]=i,s.components[e]=a;const c=(a.__vccOpts||a)[t];return c&&el(c,n,o,s,e,r)()}))))}}return i}function nl(e){const t=Tr(Ga),n=Tr(Ja),o=$i((()=>{const n=dn(e.to);return t.resolve(n)})),r=$i((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],i=n.matched;if(!r||!i.length)return-1;const s=i.findIndex(ra.bind(null,r));if(s>-1)return s;const a=rl(e[t-2]);return t>1&&rl(r)===a&&i[i.length-1].path!==a?i.findIndex(ra.bind(null,e[t-2])):s})),i=$i((()=>r.value>-1&&function(e,t){for(const n in t){const o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!Bs(r)||r.length!==o.length||o.some(((e,t)=>e!==r[t])))return!1}return!0}(n.params,o.value.params))),s=$i((()=>r.value>-1&&r.value===n.matched.length-1&&ia(n.params,o.value.params)));return{route:o,href:$i((()=>o.value.href)),isActive:i,isExactActive:s,navigate:function(n={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(n)?t[dn(e.replace)?"replace":"push"](dn(e.to)).catch(Rs):Promise.resolve()}}}const ol=To({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:nl,setup(e,{slots:t}){const n=qt(nl(e)),{options:o}=Tr(Ga),r=$i((()=>({[il(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[il(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:Ii("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}});function rl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const il=(e,t,n)=>null!=e?e:null!=t?t:n;function sl(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const al=To({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=Tr(Qa),r=$i((()=>e.route||o.value)),i=Tr(Ka,0),s=$i((()=>{let e=dn(i);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),a=$i((()=>r.value.matched[s.value]));Cr(Ka,$i((()=>s.value+1))),Cr(Xa,a),Cr(Qa,r);const l=an();return so((()=>[l.value,a.value,e.name]),(([e,t,n],[o,r,i])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&ra(t,r)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,i=e.name,s=a.value,c=s&&s.components[i];if(!c)return sl(n.default,{Component:c,route:o});const u=s.props[i],d=u?!0===u?o.params:"function"==typeof u?u(o):u:null,f=Ii(c,$s({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[i]=null)},ref:l}));return sl(n.default,{Component:f,route:o})||f}}});function ll(e){const t=Da(e.routes,e),n=e.parseQuery||za,o=e.stringifyQuery||Ya,r=e.history,i=Za(),s=Za(),a=Za(),l=ln(la);let c=la;As&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Is.bind(null,(e=>""+e)),d=Is.bind(null,Zs),f=Is.bind(null,ea);function h(e,i){if(i=$s({},i||l.value),"string"==typeof e){const o=na(n,e,i.path),s=t.resolve({path:o.path},i),a=r.createHref(o.fullPath);return $s(o,s,{params:f(s.params),hash:ea(o.hash),redirectedFrom:void 0,href:a})}let s;if(null!=e.path)s=$s({},e,{path:na(n,e.path,i.path).path});else{const t=$s({},e.params);for(const e in t)null==t[e]&&delete t[e];s=$s({},e,{params:d(t)}),i.params=d(i.params)}const a=t.resolve(s,i),c=e.hash||"";a.params=u(f(a.params));const h=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,$s({},e,{hash:(p=c,Js(p).replace(Us,"{").replace(Ks,"}").replace(zs,"^")),path:a.path}));var p;const m=r.createHref(h);return $s({fullPath:h,hash:c,query:o===Ya?Ua(e.query):e.query||{}},a,{redirectedFrom:void 0,href:m})}function p(e){return"string"==typeof e?na(n,e,l.value.path):$s({},e)}function m(e,t){if(c!==e)return Oa(8,{from:t,to:e})}function g(e){return y(e)}function v(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=p(o):{path:o},o.params={}),$s({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function y(e,t){const n=c=h(e),r=l.value,i=e.state,s=e.force,a=!0===e.replace,u=v(n);if(u)return y($s(p(u),{state:"object"==typeof u?$s({},i,u.state):i,force:s,replace:a}),t||n);const d=n;let f;return d.redirectedFrom=t,!s&&function(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ra(t.matched[o],n.matched[r])&&ia(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(f=Oa(16,{to:d,from:r}),A(r,r,!0,!1)),(f?Promise.resolve(f):w(d,r)).catch((e=>Ma(e)?Ma(e,2)?e:L(e):M(e,d,r))).then((e=>{if(e){if(Ma(e,2))return y($s({replace:a},p(e.to),{state:"object"==typeof e.to?$s({},i,e.to.state):i,force:s}),t||d)}else e=S(d,r,!0,a,i);return x(d,r,e),e}))}function _(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function b(e){const t=I.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function w(e,t){let n;const[o,r,a]=function(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;sra(e,i)))?o.push(i):n.push(i));const a=e.matched[s];a&&(t.matched.find((e=>ra(e,a)))||r.push(a))}return[n,o,r]}(e,t);n=tl(o.reverse(),"beforeRouteLeave",e,t);for(const i of o)i.leaveGuards.forEach((o=>{n.push(el(o,e,t))}));const l=_.bind(null,e,t);return n.push(l),B(n).then((()=>{n=[];for(const o of i.list())n.push(el(o,e,t));return n.push(l),B(n)})).then((()=>{n=tl(r,"beforeRouteUpdate",e,t);for(const o of r)o.updateGuards.forEach((o=>{n.push(el(o,e,t))}));return n.push(l),B(n)})).then((()=>{n=[];for(const o of a)if(o.beforeEnter)if(Bs(o.beforeEnter))for(const r of o.beforeEnter)n.push(el(r,e,t));else n.push(el(o.beforeEnter,e,t));return n.push(l),B(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=tl(a,"beforeRouteEnter",e,t,b),n.push(l),B(n)))).then((()=>{n=[];for(const o of s.list())n.push(el(o,e,t));return n.push(l),B(n)})).catch((e=>Ma(e,8)?e:Promise.reject(e)))}function x(e,t,n){a.list().forEach((o=>b((()=>o(e,t,n)))))}function S(e,t,n,o,i){const s=m(e,t);if(s)return s;const a=t===la,c=As?history.state:{};n&&(o||a?r.replace(e.fullPath,$s({scroll:a&&c&&c.scroll},i)):r.push(e.fullPath,i)),l.value=e,A(e,t,n,a),L()}let C;function T(){C||(C=r.listen(((e,t,n)=>{if(!R.listening)return;const o=h(e),i=v(o);if(i)return void y($s(i,{replace:!0}),o).catch(Rs);c=o;const s=l.value;var a,u;As&&(a=ya(s.fullPath,n.delta),u=ga(),_a.set(a,u)),w(o,s).catch((e=>Ma(e,12)?e:Ma(e,2)?(y(e.to,o).then((e=>{Ma(e,20)&&!n.delta&&n.type===ca.pop&&r.go(-1,!1)})).catch(Rs),Promise.reject()):(n.delta&&r.go(-n.delta,!1),M(e,o,s)))).then((e=>{(e=e||S(o,s,!1))&&(n.delta&&!Ma(e,8)?r.go(-n.delta,!1):n.type===ca.pop&&Ma(e,20)&&r.go(-1,!1)),x(o,s,e)})).catch(Rs)})))}let k,E=Za(),O=Za();function M(e,t,n){L(e);const o=O.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function L(e){return k||(k=!e,T(),E.list().forEach((([t,n])=>e?n(e):t())),E.reset()),e}function A(t,n,o,r){const{scrollBehavior:i}=e;if(!As||!i)return Promise.resolve();const s=!o&&function(e){const t=_a.get(e);return _a.delete(e),t}(ya(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return An().then((()=>i(t,n,s))).then((e=>e&&va(e))).catch((e=>M(e,t,n)))}const P=e=>r.go(e);let $;const I=new Set,R={currentRoute:l,listening:!0,addRoute:function(e,n){let o,r;return Ca(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},clearRoutes:t.clearRoutes,hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:h,options:e,push:g,replace:function(e){return g($s(p(e),{replace:!0}))},go:P,back:()=>P(-1),forward:()=>P(1),beforeEach:i.add,beforeResolve:s.add,afterEach:a.add,onError:O.add,isReady:function(){return k&&l.value!==la?Promise.resolve():new Promise(((e,t)=>{E.add([e,t])}))},install(e){e.component("RouterLink",ol),e.component("RouterView",al),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>dn(l)}),As&&!$&&l.value===la&&($=!0,g(r.location).catch((e=>{})));const t={};for(const o in la)Object.defineProperty(t,o,{get:()=>l.value[o],enumerable:!0});e.provide(Ga,this),e.provide(Ja,zt(t)),e.provide(Qa,l);const n=e.unmount;I.add(e),e.unmount=function(){I.delete(e),I.size<1&&(c=la,C&&C(),C=null,l.value=la,$=!1,k=!1),n()}}};function B(e){return e.reduce(((e,t)=>e.then((()=>b(t)))),Promise.resolve())}return R}function cl(e){return Tr(Ja)}const ul=["{","}"];const dl=/^(?:\d)+/,fl=/^(?:\w)+/;const hl=Object.prototype.hasOwnProperty,pl=(e,t)=>hl.call(e,t),ml=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=ul){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,n]){const o=[];let r=0,i="";for(;r-1?"zh-Hans":e.indexOf("-hant")>-1?"zh-Hant":(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?"zh-Hant":"zh-Hans");var n;let o=["en","fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const r=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return r||void 0}class vl{constructor({locale:e,fallbackLocale:t,messages:n,watcher:o,formater:r}){this.locale="en",this.fallbackLocale="en",this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=r||ml,this.messages=n||{},this.setLocale(e||"en"),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=gl(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const o=this.messages[e];o?n?Object.assign(o,t):Object.keys(t).forEach((e=>{pl(o,e)||(o[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let o=this.message;return"string"==typeof t?(t=gl(t,this.messages))&&(o=this.messages[t]):n=t,pl(o,e)?this.formater.interpolate(o[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function yl(e,t={},n,o){if("string"!=typeof e){const n=[t,e];e=n[0],t=n[1]}"string"!=typeof e&&(e="undefined"!=typeof uni&&Ed?Ed():"undefined"!=typeof global&&global.getLocale?global.getLocale():"en"),"string"!=typeof n&&(n="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||"en");const r=new vl({locale:e,fallbackLocale:n,messages:t,watcher:o});let i=(e,t)=>{{let e=!1;i=function(t,n){const o=um().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(o,r))),r.t(t,n)}}return i(e,t)};return{i18n:r,f:(e,t,n)=>r.f(e,t,n),t:(e,t)=>i(e,t),add:(e,t,n=!0)=>r.add(e,t,n),watch:e=>r.watchLocale(e),getLocale:()=>r.getLocale(),setLocale:e=>r.setLocale(e)}}const _l=de((()=>"undefined"!=typeof __uniConfig&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length));let bl;function wl(){if(!bl){let e;if(e=navigator.cookieEnabled&&window.localStorage&&localStorage.UNI_LOCALE||__uniConfig.locale||navigator.language,bl=yl(e),_l()){const t=Object.keys(__uniConfig.locales||{});t.length&&t.forEach((e=>bl.add(e,__uniConfig.locales[e]))),bl.setLocale(e)}}return bl}function xl(e,t,n){return t.reduce(((t,o,r)=>(t[e+o]=n[r],t)),{})}const Sl=de((()=>{const e="uni.async.",t=["error"];wl().add("en",xl(e,t,["The connection timed out, click the screen to try again."]),!1),wl().add("es",xl(e,t,["Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo."]),!1),wl().add("fr",xl(e,t,["La connexion a expiré, cliquez sur l'écran pour réessayer."]),!1),wl().add("zh-Hans",xl(e,t,["连接服务器超时,点击屏幕重试"]),!1),wl().add("zh-Hant",xl(e,t,["連接服務器超時,點擊屏幕重試"]),!1)})),Cl=de((()=>{const e="uni.showToast.",t=["unpaired"];wl().add("en",xl(e,t,["Please note showToast must be paired with hideToast"]),!1),wl().add("es",xl(e,t,["Tenga en cuenta que showToast debe estar emparejado con hideToast"]),!1),wl().add("fr",xl(e,t,["Veuillez noter que showToast doit être associé à hideToast"]),!1),wl().add("zh-Hans",xl(e,t,["请注意 showToast 与 hideToast 必须配对使用"]),!1),wl().add("zh-Hant",xl(e,t,["請注意 showToast 與 hideToast 必須配對使用"]),!1)})),Tl=de((()=>{const e="uni.showLoading.",t=["unpaired"];wl().add("en",xl(e,t,["Please note showLoading must be paired with hideLoading"]),!1),wl().add("es",xl(e,t,["Tenga en cuenta que showLoading debe estar emparejado con hideLoading"]),!1),wl().add("fr",xl(e,t,["Veuillez noter que showLoading doit être associé à hideLoading"]),!1),wl().add("zh-Hans",xl(e,t,["请注意 showLoading 与 hideLoading 必须配对使用"]),!1),wl().add("zh-Hant",xl(e,t,["請注意 showLoading 與 hideLoading 必須配對使用"]),!1)})),kl=de((()=>{const e="uni.showModal.",t=["cancel","confirm"];wl().add("en",xl(e,t,["Cancel","OK"]),!1),wl().add("es",xl(e,t,["Cancelar","OK"]),!1),wl().add("fr",xl(e,t,["Annuler","OK"]),!1),wl().add("zh-Hans",xl(e,t,["取消","确定"]),!1),wl().add("zh-Hant",xl(e,t,["取消","確定"]),!1)})),El=de((()=>{const e="uni.chooseFile.",t=["notUserActivation"];wl().add("en",xl(e,t,["File chooser dialog can only be shown with a user activation"]),!1),wl().add("es",xl(e,t,["El cuadro de diálogo del selector de archivos solo se puede mostrar con la activación del usuario"]),!1),wl().add("fr",xl(e,t,["La boîte de dialogue du sélecteur de fichier ne peut être affichée qu'avec une activation par l'utilisateur"]),!1),wl().add("zh-Hans",xl(e,t,["文件选择器对话框只能在由用户激活时显示"]),!1),wl().add("zh-Hant",xl(e,t,["文件選擇器對話框只能在由用戶激活時顯示"]),!1)})),Ol=de((()=>{const e="uni.setClipboardData.",t=["success","fail"];wl().add("en",xl(e,t,["Content copied","Copy failed, please copy manually"]),!1),wl().add("es",xl(e,t,["Contenido copiado","Error al copiar, copie manualmente"]),!1),wl().add("fr",xl(e,t,["Contenu copié","Échec de la copie, copiez manuellement"]),!1),wl().add("zh-Hans",xl(e,t,["内容已复制","复制失败,请手动复制"]),!1),wl().add("zh-Hant",xl(e,t,["內容已復制","復制失敗,請手動復製"]),!1)})),Ml=de((()=>{const e="uni.picker.",t=["done","cancel"];wl().add("en",xl(e,t,["Done","Cancel"]),!1),wl().add("es",xl(e,t,["OK","Cancelar"]),!1),wl().add("fr",xl(e,t,["OK","Annuler"]),!1),wl().add("zh-Hans",xl(e,t,["完成","取消"]),!1),wl().add("zh-Hant",xl(e,t,["完成","取消"]),!1)}));function Ll(e){const t=new Pe;return{on:(e,n)=>t.on(e,n),once:(e,n)=>t.once(e,n),off:(e,n)=>t.off(e,n),emit:(e,...n)=>t.emit(e,...n),subscribe(n,o,r=!1){t[r?"once":"on"](`${e}.${n}`,o)},unsubscribe(n,o){t.off(`${e}.${n}`,o)},subscribeHandler(n,o,r){t.emit(`${e}.${n}`,o,r)}}}let Al=1;const Pl=Object.create(null);function $l(e,t){return e+"."+t}function Il({id:e,name:t,args:n},o){t=$l(o,t);const r=t=>{e&&tv.publishHandler("invokeViewApi."+e,t)},i=Pl[t];i?i(n,r):r({})}const Rl=c(Ll("service"),{invokeServiceMethod:(e,t,n)=>{const{subscribe:o,publishHandler:r}=tv,i=n?Al++:0;n&&o("invokeServiceApi."+i,n,!0),r("invokeServiceApi",{id:i,name:e,args:t})}}),Bl=_e(!0);let Nl;function Dl(){Nl&&(clearTimeout(Nl),Nl=null)}let jl=0,Fl=0;function Vl(e){if(Dl(),1!==e.touches.length)return;const{pageX:t,pageY:n}=e.touches[0];jl=t,Fl=n,Nl=setTimeout((function(){const t=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget});t.touches=e.touches,t.changedTouches=e.changedTouches,e.target.dispatchEvent(t)}),350)}function Hl(e){if(!Nl)return;if(1!==e.touches.length)return Dl();const{pageX:t,pageY:n}=e.touches[0];return Math.abs(t-jl)>10||Math.abs(n-Fl)>10?Dl():void 0}function Wl(e,t){const n=Number(e);return isNaN(n)?t:n}const ql=()=>/^Apple/.test(navigator.vendor);function zl(){const e=__uniConfig.globalStyle||{},t=Wl(e.rpxCalcMaxDeviceWidth,960),n=Wl(e.rpxCalcBaseDeviceWidth,375);function o(){let e=function(){const e=ql()&&"number"==typeof window.orientation,t=e&&90===Math.abs(window.orientation);var n=e?Math[t?"max":"min"](screen.width,screen.height):screen.width;return e?Math.min(window.innerWidth,document.documentElement.clientWidth,n)||n:Math.min(window.innerWidth,document.documentElement.clientWidth)}();e=e<=t?e:n,document.documentElement.style.fontSize=e/23.4375+"px"}o(),document.addEventListener("DOMContentLoaded",o),window.addEventListener("load",o),window.addEventListener("resize",o),ql()&&window.addEventListener("orientationchange",(()=>{o(),setTimeout(o,50)}))}function Yl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ul,Xl,Kl=["top","left","right","bottom"],Gl={};function Jl(){return Xl="CSS"in window&&"function"==typeof CSS.supports?CSS.supports("top: env(safe-area-inset-top)")?"env":CSS.supports("top: constant(safe-area-inset-top)")?"constant":"":""}function Ql(){if(Xl="string"==typeof Xl?Xl:Jl()){var e=[],t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t={passive:!0}}});window.addEventListener("test",null,n)}catch(a){}var o=document.createElement("div");r(o,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),Kl.forEach((function(e){s(o,e)})),document.body.appendChild(o),i(),Ul=!0}else Kl.forEach((function(e){Gl[e]=0}));function r(e,t){var n=e.style;Object.keys(t).forEach((function(e){var o=t[e];n[e]=o}))}function i(t){t?e.push(t):e.forEach((function(e){e()}))}function s(e,n){var o=document.createElement("div"),s=document.createElement("div"),a=document.createElement("div"),l=document.createElement("div"),c={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:Xl+"(safe-area-inset-"+n+")"};r(o,c),r(s,c),r(a,{transition:"0s",animation:"none",width:"400px",height:"400px"}),r(l,{transition:"0s",animation:"none",width:"250%",height:"250%"}),o.appendChild(a),s.appendChild(l),e.appendChild(o),e.appendChild(s),i((function(){o.scrollTop=s.scrollTop=1e4;var e=o.scrollTop,r=s.scrollTop;function i(){this.scrollTop!==(this===o?e:r)&&(o.scrollTop=s.scrollTop=1e4,e=o.scrollTop,r=s.scrollTop,function(e){ec.length||setTimeout((function(){var e={};ec.forEach((function(t){e[t]=Gl[t]})),ec.length=0,tc.forEach((function(t){t(e)}))}),0);ec.push(e)}(n))}o.addEventListener("scroll",i,t),s.addEventListener("scroll",i,t)}));var u=getComputedStyle(o);Object.defineProperty(Gl,n,{configurable:!0,get:function(){return parseFloat(u.paddingBottom)}})}}function Zl(e){return Ul||Ql(),Gl[e]}var ec=[];var tc=[];const nc=Yl({get support(){return 0!=("string"==typeof Xl?Xl:Jl()).length},get top(){return Zl("top")},get left(){return Zl("left")},get right(){return Zl("right")},get bottom(){return Zl("bottom")},onChange:function(e){Jl()&&(Ul||Ql(),"function"==typeof e&&tc.push(e))},offChange:function(e){var t=tc.indexOf(e);t>=0&&tc.splice(t,1)}}),oc=Es((()=>{}),["prevent"]),rc=Es((e=>{}),["stop"]);function ic(e,t){return parseInt((e.getPropertyValue(t).match(/\d+/)||["0"])[0])}function sc(){const e=ic(document.documentElement.style,"--window-top");return e?e+nc.top:0}function ac(){const e=document.documentElement.style,t=sc(),n=ic(e,"--window-bottom"),o=ic(e,"--window-left"),r=ic(e,"--window-right"),i=ic(e,"--top-window-height");return{top:t,bottom:n?n+nc.bottom:0,left:o?o+nc.left:0,right:r?r+nc.right:0,topWindowHeight:i||0}}function lc(e){const t=document.documentElement.style;Object.keys(e).forEach((n=>{t.setProperty(n,e[n])}))}function cc(e){return Symbol(e)}function uc(e){return-1!==(e+="").indexOf("rpx")||-1!==e.indexOf("upx")}function dc(e,t=!1){if(t)return function(e){if(!uc(e))return e;return e.replace(/(\d+(\.\d+)?)[ru]px/g,((e,t)=>ud(parseFloat(t))+"px"))}(e);if(v(e)){const t=parseInt(e)||0;return uc(e)?ud(t):t}return e}function fc(e){return e.$page}function hc(e){return 0===e.tagName.indexOf("UNI-")}const pc="M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z",mc="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z";function gc(e,t="#000",n=27){return ui("svg",{width:n,height:n,viewBox:"0 0 32 32"},[ui("path",{d:e,fill:t},null,8,["d","fill"])],8,["width","height"])}function vc(){{const{$pageInstance:e}=xi();return e&&Tc(e.proxy)}}function yc(){const e=Pf(),t=e.length;if(t)return e[t-1]}function _c(){var e;const t=null==(e=yc())?void 0:e.$page;if(t)return t.meta}function bc(){const e=_c();return e?e.id:-1}function wc(){const e=yc();if(e)return e.$vm}const xc=["navigationBar","pullToRefresh"];function Sc(e,t){const n=JSON.parse(JSON.stringify(__uniConfig.globalStyle||{})),o=c({id:t},n,e);xc.forEach((t=>{o[t]=c({},n[t],e[t])}));const{navigationBar:r}=o;return r.titleText&&r.titleImage&&(r.titleText=""),o}function Cc(e,t,n,o,r,i){const{id:s,route:a}=o,l=Re(o.navigationBar,__uniConfig.themeConfig,i).titleColor;return{id:s,path:ue(a),route:a,fullPath:t,options:n,meta:o,openType:e,eventChannel:r,statusBarStyle:"#ffffff"===l?"light":"dark"}}function Tc(e){var t,n;return(null==(t=e.$page)?void 0:t.id)||(null==(n=e.$basePage)?void 0:n.id)}function kc(e,t,n){if(v(e))n=t,t=e,e=wc();else if("number"==typeof e){const t=Pf().find((t=>fc(t).id===e));e=t?t.$vm:wc()}if(!e)return;const o=e.$[t];return"onBackPress"===t?o&&(r=o,i=n,r.map((e=>e(i)))).some((e=>!0===e)):o&&((e,t)=>{let n;for(let o=0;o{function s(){if((()=>{const{scrollHeight:e}=document.documentElement,t=window.innerHeight,o=window.scrollY,i=o>0&&e>t&&o+t+n>=e,s=Math.abs(e-Mc)>n;return!i||r&&!s?(!i&&r&&(r=!1),!1):(Mc=e,r=!0,!0)})())return t&&t(),i=!1,setTimeout((function(){i=!0}),350),!0}e&&e(window.pageYOffset),t&&i&&(s()||(Oc=setTimeout(s,300))),o=!1};return function(){clearTimeout(Oc),o||requestAnimationFrame(s),o=!0}}function Ac(e,t){if(0===t.indexOf("/"))return t;if(0===t.indexOf("./"))return Ac(e,t.slice(2));const n=t.split("/"),o=n.length;let r=0;for(;r0?e.split("/"):[];return i.splice(i.length-r-1,r+1),ue(i.concat(n).join("/"))}function Pc(e,t=!1){return t?__uniRoutes.find((t=>t.path===e||t.alias===e)):__uniRoutes.find((t=>t.path===e))}function $c(){zl(),ge(hc),window.addEventListener("touchstart",Vl,Bl),window.addEventListener("touchmove",Hl,Bl),window.addEventListener("touchend",Dl,Bl),window.addEventListener("touchcancel",Dl,Bl)}class Ic{constructor(e){this.$bindClass=!1,this.$bindStyle=!1,this.$vm=e,this.$el=function(e,t=!1){const{vnode:n}=e;if(se(n.el))return t?n.el?[n.el]:[]:n.el;const{subTree:o}=e;if(16&o.shapeFlag){const e=o.children.filter((e=>e.el&&se(e.el)));if(e.length>0)return t?e.map((e=>e.el)):e[0].el}return t?n.el?[n.el]:[]:n.el}(e.$),this.$el.getAttribute&&(this.$bindClass=!!this.$el.getAttribute("class"),this.$bindStyle=!!this.$el.getAttribute("style"))}selectComponent(e){if(!this.$el||!e)return;const t=Dc(this.$el.querySelector(e));return t?Rc(t,!1):void 0}selectAllComponents(e){if(!this.$el||!e)return[];const t=[],n=this.$el.querySelectorAll(e);for(let o=0;o-1&&t.splice(n,1)}const n=this.$el.__wxsRemoveClass||(this.$el.__wxsRemoveClass=[]);return-1===n.indexOf(e)&&(n.push(e),this.forceUpdate("class")),this}hasClass(e){return this.$el&&this.$el.classList.contains(e)}getDataset(){return this.$el&&this.$el.dataset}callMethod(e,t={}){const n=this.$vm[e];g(n)?n(JSON.parse(JSON.stringify(t))):this.$vm.ownerId&&tv.publishHandler("onWxsInvokeCallMethod",{nodeId:this.$el.__id,ownerId:this.$vm.ownerId,method:e,args:t})}requestAnimationFrame(e){return window.requestAnimationFrame(e)}getState(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}triggerEvent(e,t={}){return this.$vm.$emit(e,t),this}getComputedStyle(e){if(this.$el){const t=window.getComputedStyle(this.$el);return e&&e.length?e.reduce(((e,n)=>(e[n]=t[n],e)),{}):t}return{}}setTimeout(e,t){return window.setTimeout(e,t)}clearTimeout(e){return window.clearTimeout(e)}getBoundingClientRect(){return this.$el.getBoundingClientRect()}}function Rc(e,t=!0){if(t&&e&&(e=ie(e.$)),e&&e.$el)return e.$el.__wxsComponentDescriptor||(e.$el.__wxsComponentDescriptor=new Ic(e)),e.$el.__wxsComponentDescriptor}function Bc(e,t){return Rc(e,t)}function Nc(e,t,n,o=!0){if(t){e.__instance||(e.__instance=!0,Object.defineProperty(e,"instance",{get:()=>Bc(n.proxy,!1)}));const r=function(e,t,n=!0){if(!t)return!1;if(n&&e.length<2)return!1;const o=ie(t);if(!o)return!1;const r=o.$.type;return!(!r.$wxs&&!r.$renderjs)&&o}(t,n,o);if(r)return[e,Bc(r,!1)]}}function Dc(e){if(e)return e.__vueParentComponent&&e.__vueParentComponent.proxy}function jc(e,t=!1){const{type:n,timeStamp:o,target:r,currentTarget:i}=e;let s,a;s=be(t?r:function(e){for(;!hc(e);)e=e.parentElement;return e}(r)),a=be(i);const l={type:n,timeStamp:o,target:s,detail:{},currentTarget:a};return e instanceof CustomEvent&&S(e.detail)&&(l.detail=e.detail),e._stopped&&(l._stopped=!0),e.type.startsWith("touch")&&(l.touches=e.touches,l.changedTouches=e.changedTouches),function(e,t){c(e,{preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()})}(l,e),l}function Fc(e,t){return{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY-t,pageX:e.pageX,pageY:e.pageY-t}}function Vc(e,t){const n=[];for(let o=0;o0===e.type.indexOf("mouse")||["contextmenu"].includes(e.type))(e))!function(e,t){const n=sc();e.pageX=t.pageX,e.pageY=t.pageY-n,e.clientX=t.clientX,e.clientY=t.clientY-n,e.touches=e.changedTouches=[Fc(t,n)]}(i,e);else if((e=>"undefined"!=typeof TouchEvent&&e instanceof TouchEvent||0===e.type.indexOf("touch")||["longpress"].indexOf(e.type)>=0)(e)){const t=sc();i.touches=Vc(e.touches,t),i.changedTouches=Vc(e.changedTouches,t)}else if((e=>!e.type.indexOf("key")&&e instanceof KeyboardEvent)(e)){["key","code"].forEach((t=>{Object.defineProperty(i,t,{get:()=>e[t]})}))}return Nc(i,t,n)||[i]},createNativeEvent:jc},Symbol.toStringTag,{value:"Module"});function Wc(e){!function(e){const t=e.globalProperties;c(t,Hc),t.$gcd=Bc}(e._context.config)}let qc=1;function zc(e){return(e||bc())+".invokeViewApi"}const Yc=c(Ll("view"),{invokeOnCallback:(e,t)=>nv.emit("api."+e,t),invokeViewMethod:(e,t,n,o)=>{const{subscribe:r,publishHandler:i}=nv,s=o?qc++:0;o&&r("invokeViewApi."+s,o,!0),i(zc(n),{id:s,name:e,args:t},n)},invokeViewMethodKeepAlive:(e,t,n,o)=>{const{subscribe:r,unsubscribe:i,publishHandler:s}=nv,a=qc++,l="invokeViewApi."+a;return r(l,n),s(zc(o),{id:a,name:e,args:t},o),()=>{i(l)}}});function Uc(e){kc(yc(),"onResize",e),nv.invokeOnCallback("onWindowResize",e)}function Xc(e){const t=yc();kc(um(),"onShow",e),kc(t,"onShow")}function Kc(){kc(um(),"onHide"),kc(yc(),"onHide")}const Gc=["onPageScroll","onReachBottom"];function Jc(){Gc.forEach((e=>nv.subscribe(e,function(e){return(t,n)=>{kc(parseInt(n),e,t)}}(e))))}function Qc(){!function(){const{on:e}=nv;e("onResize",Uc),e("onAppEnterForeground",Xc),e("onAppEnterBackground",Kc)}(),Jc()}function Zc(){if(this.$route){const e=this.$route.meta;return e.eventChannel||(e.eventChannel=new ke(this.$page.id)),e.eventChannel}}function eu(e){e._context.config.globalProperties.getOpenerEventChannel=Zc}function tu(){return{path:"",query:{},scene:1001,referrerInfo:{appId:"",extraData:{}}}}function nu(e){return/^-?\d+[ur]px$/i.test(e)?e.replace(/(^-?\d+)[ur]px$/i,((e,t)=>`${ud(parseFloat(t))}px`)):/^-?[\d\.]+$/.test(e)?`${e}px`:e||""}function ou(e){const t=e.animation;if(!t||!t.actions||!t.actions.length)return;let n=0;const o=t.actions,r=t.actions.length;function i(){const t=o[n],s=t.option.transition,a=function(e){const t=["matrix","matrix3d","scale","scale3d","rotate3d","skew","translate","translate3d"],n=["scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","translateX","translateY","translateZ"],o=["opacity","background-color"],r=["width","height","left","right","top","bottom"],i=e.animates,s=e.option,a=s.transition,l={},c=[];return i.forEach((e=>{let i=e.type,s=[...e.args];if(t.concat(n).includes(i))i.startsWith("rotate")||i.startsWith("skew")?s=s.map((e=>parseFloat(e)+"deg")):i.startsWith("translate")&&(s=s.map(nu)),n.indexOf(i)>=0&&(s.length=1),c.push(`${i}(${s.join(",")})`);else if(o.concat(r).includes(s[0])){i=s[0];const e=s[1];l[i]=r.includes(i)?nu(e):e}})),l.transform=l.webkitTransform=c.join(" "),l.transition=l.webkitTransition=Object.keys(l).map((e=>`${function(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)).replace("webkit","-webkit")}(e)} ${a.duration}ms ${a.timingFunction} ${a.delay}ms`)).join(","),l.transformOrigin=l.webkitTransformOrigin=s.transformOrigin,l}(t);Object.keys(a).forEach((t=>{e.$el.style[t]=a[t]})),n+=1,n{i()}),0)}const ru={props:["animation"],watch:{animation:{deep:!0,handler(){ou(this)}}},mounted(){ou(this)}},iu=e=>{e.__reserved=!0;const{props:t,mixins:n}=e;return t&&t.animation||(n||(e.mixins=[])).push(ru),su(e)},su=e=>(e.__reserved=!0,e.compatConfig={MODE:3},To(e));function au(e){return e.__wwe=!0,e}function lu(e,t){return(n,o,r)=>{e.value&&t(n,function(e,t,n,o){let r;return r=be(n),{type:t.__evName||o.type||e,timeStamp:t.timeStamp||0,target:r,currentTarget:r,detail:o}}(n,o,e.value,r||{}))}}const cu={hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}};function uu(e){const t=an(!1);let n,o,r=!1;function i(){requestAnimationFrame((()=>{clearTimeout(o),o=setTimeout((()=>{t.value=!1}),parseInt(e.hoverStayTime))}))}function s(o){o._hoverPropagationStopped||e.hoverClass&&"none"!==e.hoverClass&&!e.disabled&&(e.hoverStopPropagation&&(o._hoverPropagationStopped=!0),r=!0,n=setTimeout((()=>{t.value=!0,r||i()}),parseInt(e.hoverStartTime)))}function a(){r=!1,t.value&&i()}function l(){a(),window.removeEventListener("mouseup",l)}return{hovering:t,binding:{onTouchstartPassive:au((function(e){e.touches.length>1||s(e)})),onMousedown:au((function(e){r||(s(e),window.addEventListener("mouseup",l))})),onTouchend:au((function(){a()})),onMouseup:au((function(){r&&l()})),onTouchcancel:au((function(){r=!1,t.value=!1,clearTimeout(n)}))}}}function du(e,t){return v(t)&&(t=[t]),t.reduce(((t,n)=>(e[n]&&(t[n]=!0),t)),Object.create(null))}const fu=cc("uf"),hu={for:{type:String,default:""}},pu=cc("ul");const mu=iu({name:"Label",props:hu,setup(e,{slots:t}){const n=an(null),o=vc(),r=function(){const e=[];return Cr(pu,{addHandler(t){e.push(t)},removeHandler(t){e.splice(e.indexOf(t),1)}}),e}(),i=$i((()=>e.for||t.default&&t.default.length)),s=au((t=>{const n=t.target;let i=/^uni-(checkbox|radio|switch)-/.test(n.className);i||(i=/^uni-(checkbox|radio|switch|button)$|^(svg|path)$/i.test(n.tagName)),i||(e.for?tv.emit("uni-label-click-"+o+"-"+e.for,t,!0):r.length&&r[0](t,!0))}));return()=>ui("uni-label",{ref:n,class:{"uni-label-pointer":i},onClick:s},[t.default&&t.default()],10,["onClick"])}});function gu(e,t){vu(e.id,t),so((()=>e.id),((e,n)=>{yu(n,t,!0),vu(e,t,!0)})),Ko((()=>{yu(e.id,t)}))}function vu(e,t,n){const o=vc();n&&!e||S(t)&&Object.keys(t).forEach((r=>{n?0!==r.indexOf("@")&&0!==r.indexOf("uni-")&&tv.on(`uni-${r}-${o}-${e}`,t[r]):0===r.indexOf("uni-")?tv.on(r,t[r]):e&&tv.on(`uni-${r}-${o}-${e}`,t[r])}))}function yu(e,t,n){const o=vc();n&&!e||S(t)&&Object.keys(t).forEach((r=>{n?0!==r.indexOf("@")&&0!==r.indexOf("uni-")&&tv.off(`uni-${r}-${o}-${e}`,t[r]):0===r.indexOf("uni-")?tv.off(r,t[r]):e&&tv.off(`uni-${r}-${o}-${e}`,t[r])}))}const _u=iu({name:"Button",props:{id:{type:String,default:""},hoverClass:{type:String,default:"button-hover"},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},hoverStopPropagation:{type:Boolean,default:!1},disabled:{type:[Boolean,String],default:!1},formType:{type:String,default:""},openType:{type:String,default:""},loading:{type:[Boolean,String],default:!1},plain:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=an(null),o=Tr(fu,!1),{hovering:r,binding:i}=uu(e),s=au(((t,r)=>{if(e.disabled)return t.stopImmediatePropagation();r&&n.value.click();const i=e.formType;if(i){if(!o)return;"submit"===i?o.submit(t):"reset"===i&&o.reset(t)}else;})),a=Tr(pu,!1);return a&&(a.addHandler(s),Xo((()=>{a.removeHandler(s)}))),gu(e,{"label-click":s}),()=>{const o=e.hoverClass,a=du(e,"disabled"),l=du(e,"loading"),c=du(e,"plain"),u=o&&"none"!==o;return ui("uni-button",vi({ref:n,onClick:s,id:e.id,class:u&&r.value?o:""},u&&i,a,l,c),[t.default&&t.default()],16,["onClick","id"])}}}),bu=cc("upm");function wu(){return Tr(bu)}function xu(e){const t=function(e){return qt(function(e){if(history.state){const t=history.state.__type__;"redirectTo"!==t&&"reLaunch"!==t||0!==Pf().length||(e.isEntry=!0,e.isQuit=!0)}return e}(JSON.parse(JSON.stringify(Sc(cl().meta,e)))))}(e);return Cr(bu,t),t}function Su(){return cl()}function Cu(){return history.state&&history.state.__id__||1}const Tu=["original","compressed"],ku=["album","camera"],Eu=["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"];function Ou(e,t){return e&&-1!==t.indexOf(e)?e:t[0]}function Mu(e,t){return!h(e)||0===e.length||e.find((e=>-1===t.indexOf(e)))?t:e}function Lu(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}let Au=1;const Pu={};function $u(e,t,n){if("number"==typeof e){const o=Pu[e];if(o)return o.keepAlive||delete Pu[e],o.callback(t,n)}return t}const Iu="success",Ru="fail",Bu="complete";function Nu(e,t={},{beforeAll:n,beforeSuccess:o}={}){S(t)||(t={});const{success:r,fail:i,complete:s}=function(e){const t={};for(const n in e){const o=e[n];g(o)&&(t[n]=Lu(o),delete e[n])}return t}(t),a=g(r),l=g(i),c=g(s),u=Au++;return function(e,t,n,o=!1){Pu[e]={name:t,keepAlive:o,callback:n}}(u,e,(u=>{(u=u||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(u.errMsg,e),g(n)&&n(u),u.errMsg===e+":ok"?(g(o)&&o(u,t),a&&r(u)):l&&i(u),c&&s(u)})),u}const Du="success",ju="fail",Fu="complete",Vu={},Hu={};function Wu(e,t){return function(n){return e(n,t)||n}}function qu(e,t,n){let o=!1;for(let r=0;re(t),catch(){}}}function zu(e,t={}){return[Du,ju,Fu].forEach((n=>{const o=e[n];if(!h(o))return;const r=t[n];t[n]=function(e){qu(o,e,t).then((e=>g(r)&&r(e)||e))}})),t}function Yu(e,t){const n=[];h(Vu.returnValue)&&n.push(...Vu.returnValue);const o=Hu[e];return o&&h(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function Uu(e){const t=Object.create(null);Object.keys(Vu).forEach((e=>{"returnValue"!==e&&(t[e]=Vu[e].slice())}));const n=Hu[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Xu(e,t,n,o){const r=Uu(e);if(r&&Object.keys(r).length){if(h(r.invoke)){return qu(r.invoke,n).then((n=>t(zu(Uu(e),n),...o)))}return t(zu(r,n),...o)}return t(n,...o)}function Ku(e,t){return(n={},...o)=>function(e){return!(!S(e)||![Iu,Ru,Bu].find((t=>g(e[t]))))}(n)?Yu(e,Xu(e,t,c({},n),o)):Yu(e,new Promise(((r,i)=>{Xu(e,t,c({},n,{success:r,fail:i}),o)})))}function Gu(e,t,n,o={}){const r=t+":fail";let i="";return i=n?0===n.indexOf(r)?n:r+" "+n:r,delete o.errCode,$u(e,c({errMsg:i},o))}function Ju(e,t,n,o){if(o&&o.beforeInvoke){const e=o.beforeInvoke(t);if(v(e))return e}const r=function(e,t){const n=e[0];if(!t||!t.formatArgs||!S(t.formatArgs)&&S(n))return;const o=t.formatArgs,r=Object.keys(o);for(let i=0;i{const r=Nu(e,n,o),i=Ju(0,[n],0,o);return i?Gu(r,e,i):t(n,{resolve:t=>function(e,t,n){return $u(e,c(n||{},{errMsg:t+":ok"}))}(r,e,t),reject:(t,n)=>Gu(r,e,function(e){return!e||v(e)?e:e.stack?("undefined"!=typeof globalThis&&globalThis.harmonyChannel||console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function Zu(e,t,n,o){return Ku(e,Qu(e,t,0,o))}function ed(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=Ju(0,e,0,o);if(n)throw new Error(n);return t.apply(null,e)}}(0,t,0,o)}function td(e,t,n,o){return Ku(e,function(e,t,n,o){return Qu(e,t,0,o)}(e,t,0,o))}let nd=!1,od=0,rd=0,id=960,sd=375,ad=750;function ld(){let e,t,n;{const{windowWidth:o,pixelRatio:r,platform:i}=function(){const e=sh();return{platform:Jf?"ios":"other",pixelRatio:window.devicePixelRatio,windowWidth:e}}();e=o,t=r,n=i}od=e,rd=t,nd="ios"===n}function cd(e,t){const n=Number(e);return isNaN(n)?t:n}const ud=ed(0,((e,t)=>{if(0===od&&(ld(),function(){const e=__uniConfig.globalStyle||{};id=cd(e.rpxCalcMaxDeviceWidth,960),sd=cd(e.rpxCalcBaseDeviceWidth,375),ad=cd(e.rpxCalcBaseDeviceWidth,750)}()),0===(e=Number(e)))return 0;let n=t||od;n=e===ad||n<=id?n:sd;let o=e/750*n;return o<0&&(o=-o),o=Math.floor(o+1e-4),0===o&&(o=1!==rd&&nd?.5:1),e<0?-o:o}));function dd(e,t){Object.keys(t).forEach((n=>{g(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):h(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{v(e)&&S(t)?dd(Hu[e]||(Hu[e]={}),t):S(e)&&dd(Vu,e)})),hd=[.5,.8,1,1.25,1.5,2];const pd=(e,t,n,o)=>{!function(e,t,n,o,r){nv.invokeViewMethod("map."+e,{type:n,data:o},t,r)}(e,t,n,o,(e=>{o&&((e,t)=>{const n=t.errMsg||"";new RegExp("\\:\\s*fail").test(n)?e.fail&&e.fail(t):e.success&&e.success(t),e.complete&&e.complete(t)})(o,e)}))};const md={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"#00000000"};function gd(e){let t=null;if(null!=(t=/^#([0-9|A-F|a-f]{6})$/.exec(e=e||"#000000"))){return[parseInt(t[1].slice(0,2),16),parseInt(t[1].slice(2,4),16),parseInt(t[1].slice(4),16),255]}if(null!=(t=/^#([0-9|A-F|a-f]{3})$/.exec(e))){let e=t[1].slice(0,1),n=t[1].slice(1,2),o=t[1].slice(2,3);return e=parseInt(e+e,16),n=parseInt(n+n,16),o=parseInt(o+o,16),[e,n,o,255]}if(null!=(t=/^rgb\((.+)\)$/.exec(e)))return t[1].split(",").map((function(e){return Math.min(255,parseInt(e.trim()))})).concat(255);if(null!=(t=/^rgba\((.+)\)$/.exec(e)))return t[1].split(",").map((function(e,t){return 3===t?Math.floor(255*parseFloat(e.trim())):Math.min(255,parseInt(e.trim()))}));var n=e.toLowerCase();if(f(md,n)){t=/^#([0-9|A-F|a-f]{6,8})$/.exec(md[n]);const e=parseInt(t[1].slice(0,2),16),o=parseInt(t[1].slice(2,4),16),r=parseInt(t[1].slice(4,6),16);let i=parseInt(t[1].slice(6,8),16);return i=i>=0?i:255,[e,o,r,i]}return console.error("unsupported color:"+e),[0,0,0,255]}class vd{constructor(e,t){this.type=e,this.data=t,this.colorStop=[]}addColorStop(e,t){this.colorStop.push([e,gd(t)])}}class yd{constructor(e,t){this.type="pattern",this.data=e,this.colorStop=t}}class _d{constructor(e){this.width=e}}let bd=0,wd={};const xd={canvas:class{constructor(e,t){this.id=e,this.pageId=t,this.actions=[],this.path=[],this.subpath=[],this.drawingState=[],this.state={lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}setFillStyle(e){console.log("initCanvasContextProperty implemented.")}setStrokeStyle(e){console.log("initCanvasContextProperty implemented.")}setShadow(e,t,n,o){console.log("initCanvasContextProperty implemented.")}addColorStop(e,t){console.log("initCanvasContextProperty implemented.")}setLineWidth(e){console.log("initCanvasContextProperty implemented.")}setLineCap(e){console.log("initCanvasContextProperty implemented.")}setLineJoin(e){console.log("initCanvasContextProperty implemented.")}setLineDash(e,t){console.log("initCanvasContextProperty implemented.")}setMiterLimit(e){console.log("initCanvasContextProperty implemented.")}fillRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}strokeRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}clearRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}fill(){console.log("initCanvasContextProperty implemented.")}stroke(){console.log("initCanvasContextProperty implemented.")}scale(e,t){console.log("initCanvasContextProperty implemented.")}rotate(e){console.log("initCanvasContextProperty implemented.")}translate(e,t){console.log("initCanvasContextProperty implemented.")}setFontSize(e){console.log("initCanvasContextProperty implemented.")}fillText(e,t,n,o){console.log("initCanvasContextProperty implemented.")}setTextAlign(e){console.log("initCanvasContextProperty implemented.")}setTextBaseline(e){console.log("initCanvasContextProperty implemented.")}drawImage(e,t,n,o,r,i,s,a,l){console.log("initCanvasContextProperty implemented.")}setGlobalAlpha(e){console.log("initCanvasContextProperty implemented.")}strokeText(e,t,n,o){console.log("initCanvasContextProperty implemented.")}setTransform(e,t,n,o,r,i){console.log("initCanvasContextProperty implemented.")}draw(e=!1,t){var n=[...this.actions];this.actions=[],this.path=[],function(e,t,n,o,r){nv.invokeViewMethod(`canvas.${e}`,{type:n,data:o},t,(e=>{r&&r(e)}))}(this.id,this.pageId,"actionsChanged",{actions:n,reserve:e},t)}createLinearGradient(e,t,n,o){return new vd("linear",[e,t,n,o])}createCircularGradient(e,t,n){return new vd("radial",[e,t,n])}createPattern(e,t){if(void 0===t)console.error("Failed to execute 'createPattern' on 'CanvasContext': 2 arguments required, but only 1 present.");else{if(!(["repeat","repeat-x","repeat-y","no-repeat"].indexOf(t)<0))return new yd(e,t);console.error("Failed to execute 'createPattern' on 'CanvasContext': The provided type ('"+t+"') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.")}}measureText(e,t){let n=0;return n=function(e,t){const n=document.createElement("canvas").getContext("2d");return n.font=t,n.measureText(e).width||0}(e,this.state.font),new _d(n)}save(){this.actions.push({method:"save",data:[]}),this.drawingState.push(this.state)}restore(){this.actions.push({method:"restore",data:[]}),this.state=this.drawingState.pop()||{lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}beginPath(){this.path=[],this.subpath=[],this.path.push({method:"beginPath",data:[]})}moveTo(e,t){this.path.push({method:"moveTo",data:[e,t]}),this.subpath=[[e,t]]}lineTo(e,t){0===this.path.length&&0===this.subpath.length?this.path.push({method:"moveTo",data:[e,t]}):this.path.push({method:"lineTo",data:[e,t]}),this.subpath.push([e,t])}quadraticCurveTo(e,t,n,o){this.path.push({method:"quadraticCurveTo",data:[e,t,n,o]}),this.subpath.push([n,o])}bezierCurveTo(e,t,n,o,r,i){this.path.push({method:"bezierCurveTo",data:[e,t,n,o,r,i]}),this.subpath.push([r,i])}arc(e,t,n,o,r,i=!1){this.path.push({method:"arc",data:[e,t,n,o,r,i]}),this.subpath.push([e,t])}rect(e,t,n,o){this.path.push({method:"rect",data:[e,t,n,o]}),this.subpath=[[e,t]]}arcTo(e,t,n,o,r){this.path.push({method:"arcTo",data:[e,t,n,o,r]}),this.subpath.push([n,o])}clip(){this.actions.push({method:"clip",data:[...this.path]})}closePath(){this.path.push({method:"closePath",data:[]}),this.subpath.length&&(this.subpath=[this.subpath.shift()])}clearActions(){this.actions=[],this.path=[],this.subpath=[]}getActions(){var e=[...this.actions];return this.clearActions(),e}set lineDashOffset(e){this.actions.push({method:"setLineDashOffset",data:[e]})}set globalCompositeOperation(e){this.actions.push({method:"setGlobalCompositeOperation",data:[e]})}set shadowBlur(e){this.actions.push({method:"setShadowBlur",data:[e]})}set shadowColor(e){this.actions.push({method:"setShadowColor",data:[e]})}set shadowOffsetX(e){this.actions.push({method:"setShadowOffsetX",data:[e]})}set shadowOffsetY(e){this.actions.push({method:"setShadowOffsetY",data:[e]})}set font(e){var t=this;this.state.font=e;var n=e.match(/^(([\w\-]+\s)*)(\d+\.?\d*r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/);if(n){var o=n[1].trim().split(/\s/),r=parseFloat(n[3]),i=n[7],s=[];o.forEach((function(e,n){["italic","oblique","normal"].indexOf(e)>-1?(s.push({method:"setFontStyle",data:[e]}),t.state.fontStyle=e):["bold","normal","lighter","bolder"].indexOf(e)>-1||/^\d+$/.test(e)?(s.push({method:"setFontWeight",data:[e]}),t.state.fontWeight=e):0===n?(s.push({method:"setFontStyle",data:["normal"]}),t.state.fontStyle="normal"):1===n&&a()})),1===o.length&&a(),o=s.map((function(e){return e.data[0]})).join(" "),this.state.fontSize=r,this.state.fontFamily=i,this.actions.push({method:"setFont",data:[`${o} ${r}px ${i}`]})}else console.warn("Failed to set 'font' on 'CanvasContext': invalid format.");function a(){s.push({method:"setFontWeight",data:["normal"]}),t.state.fontWeight="normal"}}get font(){return this.state.font}set fillStyle(e){this.setFillStyle(e)}set strokeStyle(e){this.setStrokeStyle(e)}set globalAlpha(e){e=Math.floor(255*parseFloat(e)),this.actions.push({method:"setGlobalAlpha",data:[e]})}set textAlign(e){this.actions.push({method:"setTextAlign",data:[e]})}set lineCap(e){this.actions.push({method:"setLineCap",data:[e]})}set lineJoin(e){this.actions.push({method:"setLineJoin",data:[e]})}set lineWidth(e){this.actions.push({method:"setLineWidth",data:[e]})}set miterLimit(e){this.actions.push({method:"setMiterLimit",data:[e]})}set textBaseline(e){this.actions.push({method:"setTextBaseline",data:[e]})}},map:class{constructor(e,t){this.id=e,this.pageId=t}getCenterLocation(e){pd(this.id,this.pageId,"getCenterLocation",e)}moveToLocation(e){pd(this.id,this.pageId,"moveToLocation",e)}getScale(e){pd(this.id,this.pageId,"getScale",e)}getRegion(e){pd(this.id,this.pageId,"getRegion",e)}includePoints(e){pd(this.id,this.pageId,"includePoints",e)}translateMarker(e){pd(this.id,this.pageId,"translateMarker",e)}$getAppMap(){}addCustomLayer(e){pd(this.id,this.pageId,"addCustomLayer",e)}removeCustomLayer(e){pd(this.id,this.pageId,"removeCustomLayer",e)}addGroundOverlay(e){pd(this.id,this.pageId,"addGroundOverlay",e)}removeGroundOverlay(e){pd(this.id,this.pageId,"removeGroundOverlay",e)}updateGroundOverlay(e){pd(this.id,this.pageId,"updateGroundOverlay",e)}initMarkerCluster(e){pd(this.id,this.pageId,"initMarkerCluster",e)}addMarkers(e){pd(this.id,this.pageId,"addMarkers",e)}removeMarkers(e){pd(this.id,this.pageId,"removeMarkers",e)}moveAlong(e){pd(this.id,this.pageId,"moveAlong",e)}setLocMarkerIcon(e){pd(this.id,this.pageId,"setLocMarkerIcon",e)}openMapApp(e){pd(this.id,this.pageId,"openMapApp",e)}on(e,t){pd(this.id,this.pageId,"on",{name:e,callback:t})}},video:class{constructor(e,t){this.id=e,this.pageId=t}play(){ah(this.id,this.pageId,"play")}pause(){ah(this.id,this.pageId,"pause")}stop(){ah(this.id,this.pageId,"stop")}seek(e){ah(this.id,this.pageId,"seek",{position:e})}sendDanmu(e){ah(this.id,this.pageId,"sendDanmu",e)}playbackRate(e){~hd.indexOf(e)||(e=1),ah(this.id,this.pageId,"playbackRate",{rate:e})}requestFullScreen(e={}){ah(this.id,this.pageId,"requestFullScreen",e)}exitFullScreen(){ah(this.id,this.pageId,"exitFullScreen")}showStatusBar(){ah(this.id,this.pageId,"showStatusBar")}hideStatusBar(){ah(this.id,this.pageId,"hideStatusBar")}},editor:class{constructor(e,t){this.id=e,this.pageId=t}format(e,t){this._exec("format",{name:e,value:t})}insertDivider(){this._exec("insertDivider")}insertImage(e){this._exec("insertImage",e)}insertText(e){this._exec("insertText",e)}setContents(e){this._exec("setContents",e)}getContents(e){this._exec("getContents",e)}clear(e){this._exec("clear",e)}removeFormat(e){this._exec("removeFormat",e)}undo(e){this._exec("undo",e)}redo(e){this._exec("redo",e)}blur(e){this._exec("blur",e)}getSelectionText(e){this._exec("getSelectionText",e)}scrollIntoView(e){this._exec("scrollIntoView",e)}_exec(e,t){!function(e,t,n,o){const r={options:o},i=o&&("success"in o||"fail"in o||"complete"in o);if(i){const e=String(bd++);r.callbackId=e,wd[e]=o}nv.invokeViewMethod(`editor.${e}`,{type:n,data:r},t,(({callbackId:e,data:t})=>{i&&(pe(wd[e],t),delete wd[e])}))}(this.id,this.pageId,e,t)}}};function Sd(e){if(e&&e.contextInfo){const{id:t,type:n,page:o}=e.contextInfo,r=xd[n];e.context=new r(t,o),delete e.contextInfo}}class Cd{constructor(e,t,n,o){this._selectorQuery=e,this._component=t,this._selector=n,this._single=o}boundingClientRect(e){return this._selectorQuery._push(this._selector,this._component,this._single,{id:!0,dataset:!0,rect:!0,size:!0},e),this._selectorQuery}fields(e,t){return this._selectorQuery._push(this._selector,this._component,this._single,e,t),this._selectorQuery}scrollOffset(e){return this._selectorQuery._push(this._selector,this._component,this._single,{id:!0,dataset:!0,scrollOffset:!0},e),this._selectorQuery}context(e){return this._selectorQuery._push(this._selector,this._component,this._single,{context:!0},e),this._selectorQuery}node(e){return this._selectorQuery._push(this._selector,this._component,this._single,{node:!0},e),this._selectorQuery}}class Td{constructor(e){this._component=void 0,this._page=e,this._queue=[],this._queueCb=[]}exec(e){return function(e,t,n){const o=[];t.forEach((({component:t,selector:n,single:r,fields:i})=>{null===t?o.push(function(e){const t={};e.id&&(t.id="");e.dataset&&(t.dataset={});e.rect&&(t.left=0,t.right=0,t.top=0,t.bottom=0);e.size&&(t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight);if(e.scrollOffset){const e=document.documentElement,n=document.body;t.scrollLeft=e.scrollLeft||n.scrollLeft||0,t.scrollTop=e.scrollTop||n.scrollTop||0,t.scrollHeight=e.scrollHeight||n.scrollHeight||0,t.scrollWidth=e.scrollWidth||n.scrollWidth||0}return t}(i)):o.push(function(e,t,n,o,r){const i=function(e,t){if(!e)return t.$el;return e.$el}(t,e),s=i.parentElement;if(!s)return o?null:[];const{nodeType:a}=i,l=3===a||8===a;if(o){const e=l?s.querySelector(n):ch(i,n)?i:i.querySelector(n);return e?lh(e,r):null}{let e=[];const t=(l?s:i).querySelectorAll(n);return t&&t.length&&[].forEach.call(t,(t=>{e.push(lh(t,r))})),!l&&ch(i,n)&&e.unshift(lh(i,r)),e}}(e,t,n,r,i))})),n(o)}(this._page,this._queue,(t=>{const n=this._queueCb;t.forEach(((e,t)=>{h(e)?e.forEach(Sd):Sd(e);const o=n[t];g(o)&&o.call(this,e)})),g(e)&&e.call(this,t)})),this._nodesRef}in(e){return this._component=re(e),this}select(e){return this._nodesRef=new Cd(this,this._component,e,!0)}selectAll(e){return this._nodesRef=new Cd(this,this._component,e,!1)}selectViewport(){return this._nodesRef=new Cd(this,null,"",!0)}_push(e,t,n,o,r){this._queue.push({component:t,selector:e,single:n,fields:o}),this._queueCb.push(r)}}const kd=ed(0,(e=>((e=re(e))&&!function(e){const t=re(e);if(t.$page)return Tc(t);if(!t.$)return;{const{$pageInstance:e}=t.$;if(e)return Tc(e.proxy)}const n=t.$.root.proxy;return n&&n.$page?Tc(n):void 0}(e)&&(e=null),new Td(e||wc())))),Ed=ed(0,(()=>{const e=um();return e&&e.$vm?e.$vm.$locale:wl().getLocale()})),Od={onUnhandledRejection:[],onPageNotFound:[],onError:[],onShow:[],onHide:[]};const Md=ed(0,(()=>c({},mh)));let Ld,Ad,Pd;const $d=[];const Id=td("getPushClientId",((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{var e,o;void 0===Pd&&(Pd=!1,Ld="",Ad="uniPush is not enabled"),$d.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==Ld&&(e=Ld,o=Ad,$d.forEach((t=>{t(e,o)})),$d.length=0)}))})),Rd=e=>{},Bd=e=>{},Nd={formatArgs:{showToast:!0},beforeInvoke(){Ol()},beforeSuccess(e,t){if(!t.showToast)return;const{t:n}=wl(),o=n("uni.setClipboardData.success");o&&jg({title:o,icon:"success",mask:!1})}},Dd=(Boolean,{formatArgs:{count(e,t){(!e||e<=0)&&(t.count=9)},sizeType(e,t){t.sizeType=Mu(e,Tu)},sourceType(e,t){t.sourceType=Mu(e,ku)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}}),jd={formatArgs:{sourceType(e,t){t.sourceType=Mu(e,ku)},compressed:!0,maxDuration:60,camera:"back",extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}},Fd=(Boolean,["all","image","video"]),Vd={formatArgs:{count(e,t){(!e||e<=0)&&(t.count=100)},sourceType(e,t){t.sourceType=Mu(e,ku)},type(e,t){t.type=Ou(e,Fd)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||("all"!==t.type&&t.type?t.extension=["*"]:t.extension=[""])}}},Hd={formatArgs:{urls(e,t){t.urls=e.map((e=>v(e)&&e?Xf(e):""))},current(e,t){"number"==typeof e?t.current=e>0&&ee)),s={};i.forEach((e=>{const t=e.split("=");s[t[0]]=t[1]}));for(const a in t)if(f(t,a)){let e=t[a];null==e?e="":S(e)&&(e=JSON.stringify(e)),s[zd(a)]=zd(e)}return r=Object.keys(s).map((e=>`${e}=${s[e]}`)).join("&"),e+(r?"?"+r:"")+(o?"#"+o:"")}(e,t.data))},header(e,t){const n=t.header=e||{};t.method!==Eu[0]&&(Object.keys(n).find((e=>"content-type"===e.toLowerCase()))||(n["Content-Type"]="application/json"))},dataType(e,t){t.dataType=(e||Wd).toLowerCase()},responseType(e,t){t.responseType=(e||"").toLowerCase(),-1===qd.indexOf(t.responseType)&&(t.responseType="text")}}},Ud={formatArgs:{filePath(e,t){e&&(t.filePath=Xf(e))},header(e,t){t.header=e||{}},formData(e,t){t.formData=e||{}}}},Xd={formatArgs:{header(e,t){t.header=e||{}},method(e,t){t.method=Ou((e||"").toUpperCase(),Eu)},protocols(e,t){v(e)&&(t.protocols=[e])}}};const Kd={url:{type:String,required:!0}};Gd=["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"];var Gd;const Jd=nf("navigateTo"),Qd=nf("redirectTo"),Zd=nf("reLaunch");let ef;function tf(){ef=""}function nf(e){return{formatArgs:{url:of(e)},beforeAll:tf}}function of(e){return function(t,n){if(!t)return'Missing required args: "url"';const o=(t=function(e){if(0===e.indexOf("/")||0===e.indexOf("uni:"))return e;let t="";const n=Pf();return n.length&&(t=fc(n[n.length-1]).route),Ac(t,e)}(t)).split("?")[0],r=Pc(o,!0);if(!r)return"page `"+t+"` is not found";if("navigateTo"===e||"redirectTo"===e){if(r.meta.isTabBar)return`can not ${e} a tabbar page`}else if("switchTab"===e&&!r.meta.isTabBar)return"can not switch to no-tabBar page";if("switchTab"!==e&&"preloadPage"!==e||!r.meta.isTabBar||"appLaunch"===n.openType||(t=o),r.meta.isEntry&&(t=t.replace(r.alias,"/")),n.url=function(e){if(!v(e))return e;const t=e.indexOf("?");if(-1===t)return e;const n=e.slice(t+1).trim().replace(/^(\?|#|&)/,"");if(!n)return e;e=e.slice(0,t);const o=[];return n.split("&").forEach((e=>{const t=e.replace(/\+/g," ").split("="),n=t.shift(),r=t.length>0?t.join("="):"";o.push(n+"="+encodeURIComponent(r))})),o.length?e+"?"+o.join("&"):e}(t),"unPreloadPage"!==e)if("preloadPage"!==e){if(ef===t&&"appLaunch"!==n.openType)return`${ef} locked`;__uniConfig.ready&&(ef=t)}else if(r.meta.isTabBar){const e=Pf(),t=r.path.slice(1);if(e.find((e=>e.route===t)))return"tabBar page `"+t+"` already exists"}}}Boolean;const rf={formatArgs:{title:"",mask:!1}},sf=(Boolean,{beforeInvoke(){kl()},formatArgs:{title:"",content:"",placeholderText:"",showCancel:!0,editable:!1,cancelText(e,t){if(!f(t,"cancelText")){const{t:e}=wl();t.cancelText=e("uni.showModal.cancel")}},cancelColor:"#000",confirmText(e,t){if(!f(t,"confirmText")){const{t:e}=wl();t.confirmText=e("uni.showModal.confirm")}},confirmColor:"#007aff"}}),af=["success","loading","none","error"],lf=(Boolean,{formatArgs:{title:"",icon(e,t){t.icon=Ou(e,af)},image(e,t){t.image=e?Xf(e):""},duration:1500,mask:!1}});function cf(){const e=wc();if(!e)return;const t=Af(),n=t.keys();for(const o of n){const e=t.get(o);e.$.__isTabBar?e.$.__isActive=!1:If(o)}e.$.__isTabBar&&(e.$.__isVisible=!1,kc(e,"onHide"))}function uf(e,t){return e===t.fullPath||"/"===e&&t.meta.isEntry}function df(e){const t=Af().values();for(const n of t){const t=Tf(n);if(uf(e,t))return n.$.__isActive=!0,t.id}}const ff=td("switchTab",(({url:e,tabBarText:t,isAutomatedTesting:n},{resolve:o,reject:r})=>{if(kf.handledBeforeEntryPageRoutes)return cf(),vf({type:"switchTab",url:e,tabBarText:t,isAutomatedTesting:n},df(e)).then(o).catch(r);Of.push({args:{type:"switchTab",url:e,tabBarText:t,isAutomatedTesting:n},resolve:o,reject:r})}),0,nf("switchTab"));function hf(){const e=yc();if(!e)return;const t=Tf(e);If(Nf(t.path,t.id))}const pf=td("redirectTo",(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>{if(kf.handledBeforeEntryPageRoutes)return hf(),vf({type:"redirectTo",url:e,isAutomatedTesting:t}).then(n).catch(o);Mf.push({args:{type:"redirectTo",url:e,isAutomatedTesting:t},resolve:n,reject:o})}),0,Qd);function mf(){const e=Af().keys();for(const t of e)If(t)}const gf=td("reLaunch",(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>{if(kf.handledBeforeEntryPageRoutes)return mf(),vf({type:"reLaunch",url:e,isAutomatedTesting:t}).then(n).catch(o);Lf.push({args:{type:"reLaunch",url:e,isAutomatedTesting:t},resolve:n,reject:o})}),0,Zd);function vf({type:e,url:t,tabBarText:n,events:o,isAutomatedTesting:r},i){const s=um().$router,{path:a,query:l}=function(e){const[t,n]=e.split("?",2);return{path:t,query:Ce(n||"")}}(t);return new Promise(((t,c)=>{const u=function(e,t){return{__id__:t||++Rf,__type__:e}}(e,i);s["navigateTo"===e?"push":"replace"]({path:a,query:l,state:u,force:!0}).then((i=>{if(Ma(i))return c(i.message);if("switchTab"===e&&(s.currentRoute.value.meta.tabBarText=n),"navigateTo"===e){const e=s.currentRoute.value.meta;return e.eventChannel?o&&(Object.keys(o).forEach((t=>{e.eventChannel._addListener(t,"on",o[t])})),e.eventChannel._clearCache()):e.eventChannel=new ke(u.__id__,o),t(r?{__id__:u.__id__}:{eventChannel:e.eventChannel})}return r?t({__id__:u.__id__}):t()}))}))}function yf(){if(kf.handledBeforeEntryPageRoutes)return;kf.handledBeforeEntryPageRoutes=!0;const e=[...Ef];Ef.length=0,e.forEach((({args:e,resolve:t,reject:n})=>vf(e).then(t).catch(n)));const t=[...Of];Of.length=0,t.forEach((({args:e,resolve:t,reject:n})=>(cf(),vf(e,df(e.url)).then(t).catch(n))));const n=[...Mf];Mf.length=0,n.forEach((({args:e,resolve:t,reject:n})=>(hf(),vf(e).then(t).catch(n))));const o=[...Lf];Lf.length=0,o.forEach((({args:e,resolve:t,reject:n})=>(mf(),vf(e).then(t).catch(n))))}function _f(e){const t=window.CSS&&window.CSS.supports;return t&&(t(e)||t.apply(window.CSS,e.split(":")))}const bf=_f("top:env(a)"),wf=_f("top:constant(a)"),xf=(()=>bf?"env":wf?"constant":"")();function Sf(e){var t,n;lc({"--window-top":(n=0,xf?`calc(${n}px + ${xf}(safe-area-inset-top))`:`${n}px`),"--window-bottom":(t=0,xf?`calc(${t}px + ${xf}(safe-area-inset-bottom))`:`${t}px`)})}const Cf=new Map;function Tf(e){return e.$page}const kf={handledBeforeEntryPageRoutes:!1},Ef=[],Of=[],Mf=[],Lf=[];function Af(){return Cf}function Pf(){return $f()}function $f(){const e=[],t=Cf.values();for(const n of t)n.$.__isTabBar?n.$.__isActive&&e.push(n):e.push(n);return e}function If(e,t=!0){const n=Cf.get(e);n.$.__isUnload=!0,kc(n,"onUnload"),Cf.delete(e),t&&function(e){const t=Df.get(e);t&&(Df.delete(e),jf.pruneCacheEntry(t))}(e)}let Rf=Cu();function Bf(e){const t=function(e){const t=wu();let n=e.fullPath;return e.meta.isEntry&&-1===n.indexOf(e.meta.route)&&(n="/"+e.meta.route+n.replace("/","")),Cc("navigateTo",n,{},t)}(e.$route);!function(e,t){e.route=t.route,e.$vm=e,e.$page=t,e.$mpType="page",e.$fontFamilySet=new Set,t.meta.isTabBar&&(e.$.__isTabBar=!0,e.$.__isActive=!0)}(e,t),Cf.set(Nf(t.path,t.id),e),1===Cf.size&&setTimeout((()=>{yf()}),0)}function Nf(e,t){return e+"$$"+t}const Df=new Map,jf={get:e=>Df.get(e),set(e,t){!function(e){const t=parseInt(e.split("$$")[1]);if(!t)return;jf.forEach(((e,n)=>{const o=parseInt(n.split("$$")[1]);o&&o>t&&(jf.delete(n),jf.pruneCacheEntry(e),An((()=>{Cf.forEach(((e,t)=>{e.$.isUnmounted&&Cf.delete(t)}))})))}))}(e),Df.set(e,t)},delete(e){Df.get(e)&&Df.delete(e)},forEach(e){Df.forEach(e)}};function Ff(e,t){!function(e){const t=Hf(e),{body:n}=document;Wf&&n.removeAttribute(Wf),t&&n.setAttribute(t,""),Wf=t}(e),Sf(),function(e){{const t="nvue-dir-"+__uniConfig.nvue["flex-direction"];e.isNVue?(document.body.setAttribute("nvue",""),document.body.setAttribute(t,"")):(document.body.removeAttribute("nvue"),document.body.removeAttribute(t))}}(t),Yf(e,t)}function Vf(e){const t=Hf(e);t&&function(e){const t=document.querySelector("uni-page-body");t&&t.setAttribute(e,"")}(t)}function Hf(e){return e.type.__scopeId}let Wf;const qf=!!(()=>{let e=!1;try{const t={};Object.defineProperty(t,"passive",{get(){e=!0}}),window.addEventListener("test-passive",(()=>{}),t)}catch(t){}return e})()&&{passive:!1};let zf;function Yf(e,t){if(document.removeEventListener("touchmove",Ec),zf&&document.removeEventListener("scroll",zf),t.disableScroll)return document.addEventListener("touchmove",Ec,qf);const{onPageScroll:n,onReachBottom:o}=e,r="transparent"===t.navigationBar.type;if(!(null==n?void 0:n.length)&&!(null==o?void 0:o.length)&&!r)return;const i={},s=Tf(e.proxy).id;(n||r)&&(i.onPageScroll=function(e,t,n){return o=>{t&&tv.publishHandler("onPageScroll",{scrollTop:o},e),n&&tv.emit(e+".onPageScroll",{scrollTop:o})}}(s,n,r)),(null==o?void 0:o.length)&&(i.onReachBottomDistance=t.onReachBottomDistance||50,i.onReachBottom=()=>tv.publishHandler("onReachBottom",{},s)),zf=Lc(i),requestAnimationFrame((()=>document.addEventListener("scroll",zf)))}function Uf(e){const{base:t}=__uniConfig.router;return 0===ue(e).indexOf(t)?ue(e):t+e}function Xf(e){const{base:t,assets:n}=__uniConfig.router;if("./"===t&&(0!==e.indexOf("./")||!e.includes("/static/")&&0!==e.indexOf("./"+(n||"assets")+"/")||(e=e.slice(1))),0===e.indexOf("/")){if(0!==e.indexOf("//"))return Uf(e.slice(1));e="https:"+e}if(ee.test(e)||te.test(e)||0===e.indexOf("blob:"))return e;const o=$f();return o.length?Uf(Ac(Tf(o[o.length-1]).route,e).slice(1)):e}const Kf=navigator.userAgent,Gf=/android/i.test(Kf),Jf=/iphone|ipad|ipod/i.test(Kf),Qf=Kf.match(/Windows NT ([\d|\d.\d]*)/i),Zf=/Macintosh|Mac/i.test(Kf),eh=/Linux|X11/i.test(Kf),th=Zf&&navigator.maxTouchPoints>0,nh=/OpenHarmony/i.test(Kf);function oh(){return/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation}function rh(e){return e&&90===Math.abs(window.orientation)}function ih(e,t){return e?Math[t?"max":"min"](screen.width,screen.height):screen.width}function sh(){const e=oh();if(e){const t=ih(e,rh(e));return Math.min(window.innerWidth,document.documentElement.clientWidth,t)||t}return Math.min(window.innerWidth,document.documentElement.clientWidth)}function ah(e,t,n,o){nv.invokeViewMethod("video."+e,{videoId:e,type:n,data:o},t)}function lh(e,t){const n={},{top:o,topWindowHeight:r}=ac();if(t.node){const t=e.tagName.split("-")[1]||e.tagName;t&&(n.node=e.querySelector(t))}if(t.id&&(n.id=e.id),t.dataset&&(n.dataset=ve(e)),t.rect||t.size){const i=e.getBoundingClientRect();t.rect&&(n.left=i.left,n.right=i.right,n.top=i.top-o-r,n.bottom=i.bottom-o-r),t.size&&(n.width=i.width,n.height=i.height)}if(h(t.properties)&&t.properties.forEach((e=>{e=e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))})),t.scrollOffset)if("UNI-SCROLL-VIEW"===e.tagName){const t=e.children[0].children[0];n.scrollLeft=t.scrollLeft,n.scrollTop=t.scrollTop,n.scrollHeight=t.scrollHeight,n.scrollWidth=t.scrollWidth}else n.scrollLeft=0,n.scrollTop=0,n.scrollHeight=0,n.scrollWidth=0;if(h(t.computedStyle)){const o=getComputedStyle(e);t.computedStyle.forEach((e=>{n[e]=o[e]}))}return t.context&&(n.contextInfo=function(e){return e.__uniContextInfo}(e)),n}function ch(e,t){return(e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){const t=this.parentElement.querySelectorAll(e);let n=t.length;for(;--n>=0&&t.item(n)!==this;);return n>-1}).call(e,t)}const uh={};function dh(e,t){const n=uh[e];return n?Promise.resolve(n):/^data:[a-z-]+\/[a-z-]+;base64,/.test(e)?Promise.resolve(function(e){const t=e.split(","),n=t[0].match(/:(.*?);/),o=n?n[1]:"",r=atob(t[1]);let i=r.length;const s=new Uint8Array(i);for(;i--;)s[i]=r.charCodeAt(i);return fh(s,o)}(e)):t?Promise.reject(new Error("not find")):new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){t(this.response)},o.onerror=n,o.send()}))}function fh(e,t){let n;if(e instanceof File)n=e;else{t=t||e.type||"";const r=`${Date.now()}${function(e){const t=e.split("/")[1];return t?`.${t}`:""}(t)}`;try{n=new File([e],r,{type:t})}catch(o){n=e=e instanceof Blob?e:new Blob([e],{type:t}),n.name=n.name||r}}return n}function hh(e){for(const n in uh)if(f(uh,n)){if(uh[n]===e)return n}var t=(window.URL||window.webkitURL).createObjectURL(e);return uh[t]=e,t}function ph(e){(window.URL||window.webkitURL).revokeObjectURL(e),delete uh[e]}const mh=tu(),gh=tu();const vh=iu({name:"ResizeSensor",props:{initial:{type:Boolean,default:!1}},emits:["resize"],setup(e,{emit:t}){const n=an(null),o=function(e){return()=>{const{firstElementChild:t,lastElementChild:n}=e.value;t.scrollLeft=1e5,t.scrollTop=1e5,n.scrollLeft=1e5,n.scrollTop=1e5}}(n),r=function(e,t,n){const o=qt({width:-1,height:-1});return so((()=>c({},o)),(e=>t("resize",e))),()=>{const t=e.value;t&&(o.width=t.offsetWidth,o.height=t.offsetHeight,n())}}(n,t,o);return function(e,t,n,o){Io(o),zo((()=>{t.initial&&An(n);const r=e.value;r.offsetParent!==r.parentElement&&(r.parentElement.style.position="relative"),"AnimationEvent"in window||o()}))}(n,e,r,o),()=>ui("uni-resize-sensor",{ref:n,onAnimationstartOnce:r},[ui("div",{onScroll:r},[ui("div",null,null)],40,["onScroll"]),ui("div",{onScroll:r},[ui("div",null,null)],40,["onScroll"])],40,["onAnimationstartOnce"])}});const yh=cc("ucg"),_h=iu({name:"CheckboxGroup",props:{name:{type:String,default:""}},emits:["change"],setup(e,{emit:t,slots:n}){const o=an(null);return function(e,t){const n=[],o=()=>n.reduce(((e,t)=>(t.value.checkboxChecked&&e.push(t.value.value),e)),new Array);Cr(yh,{addField(e){n.push(e)},removeField(e){n.splice(n.indexOf(e),1)},checkboxChange(e){t("change",e,{value:o()})}});const r=Tr(fu,!1);r&&r.addField({submit:()=>{let t=["",null];return""!==e.name&&(t[0]=e.name,t[1]=o()),t}})}(e,lu(o,t)),()=>ui("uni-checkbox-group",{ref:o},[n.default&&n.default()],512)}});const bh=iu({name:"Checkbox",props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},value:{type:String,default:""},color:{type:String,default:"#007aff"},backgroundColor:{type:String,default:""},borderColor:{type:String,default:""},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},iconColor:{type:String,default:""},foreColor:{type:String,default:""}},setup(e,{slots:t}){const n=an(null),o=an(e.checked),r=$i((()=>"true"===o.value||!0===o.value)),i=an(e.value);const s=$i((()=>function(t){if(e.disabled)return{backgroundColor:"#E1E1E1",borderColor:"#D1D1D1"};const n={};return t?(e.activeBorderColor&&(n.borderColor=e.activeBorderColor),e.activeBackgroundColor&&(n.backgroundColor=e.activeBackgroundColor)):(e.borderColor&&(n.borderColor=e.borderColor),e.backgroundColor&&(n.backgroundColor=e.backgroundColor)),n}(r.value)));so([()=>e.checked,()=>e.value],(([e,t])=>{o.value=e,i.value=t}));const{uniCheckGroup:a,uniLabel:l}=function(e,t,n){const o=$i((()=>({checkboxChecked:Boolean(e.value),value:t.value}))),r={reset:n},i=Tr(yh,!1);i&&i.addField(o);const s=Tr(fu,!1);s&&s.addField(r);const a=Tr(pu,!1);return Xo((()=>{i&&i.removeField(o),s&&s.removeField(r)})),{uniCheckGroup:i,uniForm:s,uniLabel:a}}(o,i,(()=>{o.value=!1})),c=t=>{e.disabled||(o.value=!o.value,a&&a.checkboxChange(t),t.stopPropagation())};return l&&(l.addHandler(c),Xo((()=>{l.removeHandler(c)}))),gu(e,{"label-click":c}),()=>{const r=du(e,"disabled");let i;return i=o.value,ui("uni-checkbox",vi(r,{id:e.id,onClick:c,ref:n}),[ui("div",{class:"uni-checkbox-wrapper",style:{"--HOVER-BD-COLOR":e.activeBorderColor}},[ui("div",{class:["uni-checkbox-input",{"uni-checkbox-input-disabled":e.disabled}],style:s.value},[i?gc(pc,e.disabled?"#ADADAD":e.foreColor||e.iconColor||e.color,22):""],6),t.default&&t.default()],4)],16,["id","onClick"])}}});function wh(){}const xh={cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:[Boolean,String],default:!0},autoBlur:{type:[Boolean,String],default:!1}};function Sh(e,t,n){function o(e){const t=$i((()=>0===String(navigator.vendor).indexOf("Apple")));e.addEventListener("focus",(()=>{clearTimeout(undefined),document.addEventListener("click",wh,!1)}));e.addEventListener("blur",(()=>{t.value&&e.blur(),document.removeEventListener("click",wh,!1),t.value&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)}))}so((()=>t.value),(e=>e&&o(e)))}const Ch={src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1},draggable:{type:Boolean,default:!1}},Th={widthFix:["offsetWidth","height",(e,t)=>e/t],heightFix:["offsetHeight","width",(e,t)=>e*t]},kh={aspectFit:["center center","contain"],aspectFill:["center center","cover"],widthFix:[,"100% 100%"],heightFix:[,"100% 100%"],top:["center top"],bottom:["center bottom"],center:["center center"],left:["left center"],right:["right center"],"top left":["left top"],"top right":["right top"],"bottom left":["left bottom"],"bottom right":["right bottom"]},Eh=iu({name:"Image",props:Ch,setup(e,{emit:t}){const n=an(null),o=function(e,t){const n=an(""),o=$i((()=>{let e="auto",o="";const r=kh[t.mode];return r?(r[0]&&(o=r[0]),r[1]&&(e=r[1])):(o="0% 0%",e="100% 100%"),`background-image:${n.value?'url("'+n.value+'")':"none"};background-position:${o};background-size:${e};`})),r=qt({rootEl:e,src:$i((()=>t.src?Xf(t.src):"")),origWidth:0,origHeight:0,origStyle:{width:"",height:""},modeStyle:o,imgSrc:n});return zo((()=>{const t=e.value;r.origWidth=t.clientWidth||0,r.origHeight=t.clientHeight||0})),r}(n,e),r=lu(n,t),{fixSize:i}=function(e,t,n){const o=()=>{const{mode:o}=t,r=Th[o];if(!r)return;const{origWidth:i,origHeight:s}=n,a=i&&s?i/s:0;if(!a)return;const l=e.value,c=l[r[0]];c&&(l.style[r[1]]=function(e){Oh&&e>10&&(e=2*Math.round(e/2));return e}(r[2](c,a))+"px")},r=()=>{const{style:t}=e.value,{origStyle:{width:o,height:r}}=n;t.width=o,t.height=r};return so((()=>t.mode),((e,t)=>{Th[t]&&r(),Th[e]&&o()})),{fixSize:o,resetSize:r}}(n,e,o);return function(e,t,n,o,r){let i,s;const a=(t=0,n=0,o="")=>{e.origWidth=t,e.origHeight=n,e.imgSrc=o},l=l=>{if(!l)return c(),void a();i=i||new Image,i.onload=e=>{const{width:u,height:d}=i;a(u,d,l),An((()=>{o()})),i.draggable=t.draggable,s&&s.remove(),s=i,n.value.appendChild(i),c(),r("load",e,{width:u,height:d})},i.onerror=t=>{a(),c(),r("error",t,{errMsg:`GET ${e.src} 404 (Not Found)`})},i.src=l},c=()=>{i&&(i.onload=null,i.onerror=null,i=null)};so((()=>e.src),(e=>l(e))),so((()=>e.imgSrc),(e=>{!e&&s&&(s.remove(),s=null)})),zo((()=>l(e.src))),Xo((()=>c()))}(o,e,n,i,r),()=>ui("uni-image",{ref:n},[ui("div",{style:o.modeStyle},null,4),Th[e.mode]?ui(vh,{onResize:i},null,8,["onResize"]):ui("span",null,null)],512)}});const Oh="Google Inc."===navigator.vendor;const Mh=_e(!0),Lh=[];let Ah=0,Ph=!1;const $h=e=>Lh.forEach((t=>t.userAction=e));function Ih(e={userAction:!1}){if(!Ph){["touchstart","touchmove","touchend","mousedown","mouseup"].forEach((e=>{document.addEventListener(e,(function(){!Ah&&$h(!0),Ah++,setTimeout((()=>{!--Ah&&$h(!1)}),0)}),Mh)})),Ph=!0}Lh.push(e)}const Rh=()=>!!Ah;function Bh(){const e=qt({userAction:!1});return zo((()=>{Ih(e)})),Xo((()=>{!function(e){const t=Lh.indexOf(e);t>=0&&Lh.splice(t,1)}(e)})),{state:e}}function Nh(){const e=qt({attrs:{}});return zo((()=>{let t=xi();for(;t;){const n=t.type.__scopeId;n&&(e.attrs[n]=""),t=t.proxy&&"page"===t.proxy.$mpType?null:t.parent}})),{state:e}}function Dh(e,t){const n=document.activeElement;if(!n)return t({});const o={};["input","textarea"].includes(n.tagName.toLowerCase())&&(o.start=n.selectionStart,o.end=n.selectionEnd),t(o)}const jh=function(){var e,t,n;e=bc(),n=Dh,t=$l(e,t="getSelectedTextRange"),Pl[t]||(Pl[t]=n)};function Fh(e,t,n){"number"===t&&isNaN(Number(e))&&(e="");return null==e?"":String(e)}const Vh=["none","text","decimal","numeric","tel","search","email","url"],Hh=c({},{name:{type:String,default:""},modelValue:{type:[String,Number]},value:{type:[String,Number]},disabled:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:""},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},confirmHold:{type:Boolean,default:!1},ignoreCompositionEvent:{type:Boolean,default:!0},step:{type:String,default:"0.000000000000000001"},inputmode:{type:String,default:void 0,validator:e=>!!~Vh.indexOf(e)},cursorColor:{type:String,default:""}},xh),Wh=["input","focus","blur","update:value","update:modelValue","update:focus","compositionstart","compositionupdate","compositionend","keyboardheightchange"];function qh(e,t,n,o,r){let i=null,s=null;s=Te((n=>{const o=r.value,s=Fh(n,e.type);o&&document.activeElement===o&&s===i||(t.value=s)}),100,{setTimeout:setTimeout,clearTimeout:clearTimeout}),so((()=>e.modelValue),s),so((()=>e.value),s);const a=function(e,t){let n,o,r=0;const i=function(...i){const s=Date.now();clearTimeout(n),o=()=>{o=null,r=s,e.apply(this,i)},s-r{s.cancel(),n("update:modelValue",t.value),n("update:value",t.value),o("input",e,t)}),100);return qo((()=>{s.cancel(),a.cancel()})),{trigger:o,triggerInput:(e,t,n)=>{s.cancel(),i=t.value,a(e,t),n&&a.flush()}}}function zh(e,t){Bh();const n=$i((()=>e.autoFocus||e.focus));function o(){if(!n.value)return;const e=t.value;e?e.focus():setTimeout(o,100)}so((()=>e.focus),(e=>{e?o():function(){const e=t.value;e&&e.blur()}()})),zo((()=>{n.value&&An(o)}))}function Yh(e,t,n,o){jh();const{fieldRef:r,state:i,trigger:s}=function(e,t,n){const o=an(null),r=lu(t,n),i=$i((()=>{const t=Number(e.selectionStart);return isNaN(t)?-1:t})),s=$i((()=>{const t=Number(e.selectionEnd);return isNaN(t)?-1:t})),a=$i((()=>{const t=Number(e.cursor);return isNaN(t)?-1:t})),l=$i((()=>{var t=Number(e.maxlength);return isNaN(t)?140:t}));let c="";c=Fh(e.modelValue,e.type)||Fh(e.value,e.type);const u=qt({value:c,valueOrigin:c,maxlength:l,focus:e.focus,composing:!1,selectionStart:i,selectionEnd:s,cursor:a});return so((()=>u.focus),(e=>n("update:focus",e))),so((()=>u.maxlength),(e=>u.value=u.value.slice(0,e)),{immediate:!1}),{fieldRef:o,state:u,trigger:r}}(e,t,n),{triggerInput:a}=qh(e,i,n,s,r);zh(e,r),Sh(0,r);const{state:l}=Nh();!function(e,t){const n=Tr(fu,!1);if(!n)return;const o=xi(),r={submit(){const n=o.proxy;return[n[e],v(t)?n[t]:t.value]},reset(){v(t)?o.proxy[t]="":t.value=""}};n.addField(r),Xo((()=>{n.removeField(r)}))}("name",i),function(e,t,n,o,r,i){function s(){const n=e.value;n&&t.focus&&t.selectionStart>-1&&t.selectionEnd>-1&&"number"!==n.type&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd)}function a(){const n=e.value;n&&t.focus&&t.selectionStart<0&&t.selectionEnd<0&&t.cursor>-1&&"number"!==n.type&&(n.selectionEnd=n.selectionStart=t.cursor)}function l(e){return"number"===e.type?null:e.selectionEnd}so([()=>t.selectionStart,()=>t.selectionEnd],s),so((()=>t.cursor),a),so((()=>e.value),(function(){const c=e.value;if(!c)return;const u=function(e,o){e.stopPropagation(),g(i)&&!1===i(e,t)||(t.value=c.value,t.composing&&n.ignoreCompositionEvent||r(e,{value:c.value,cursor:l(c)},o))};function d(e){n.ignoreCompositionEvent||o(e.type,e,{value:e.data})}c.addEventListener("change",(e=>e.stopPropagation())),c.addEventListener("focus",(function(e){t.focus=!0,o("focus",e,{value:t.value}),s(),a()})),c.addEventListener("blur",(function(e){t.composing&&(t.composing=!1,u(e,!0)),t.focus=!1,o("blur",e,{value:t.value,cursor:l(e.target)})})),c.addEventListener("input",u),c.addEventListener("compositionstart",(e=>{e.stopPropagation(),t.composing=!0,d(e)})),c.addEventListener("compositionend",(e=>{e.stopPropagation(),t.composing&&(t.composing=!1,u(e)),d(e)})),c.addEventListener("compositionupdate",d)}))}(r,i,e,s,a,o);return{fieldRef:r,state:i,scopedAttrsState:l,fixDisabledColor:0===String(navigator.vendor).indexOf("Apple")&&CSS.supports("image-orientation:from-image"),trigger:s}}const Uh=de((()=>{{const e=navigator.userAgent;let t="";const n=e.match(/OS\s([\w_]+)\slike/);if(n)t=n[1].replace(/_/g,".");else if(/Macintosh|Mac/i.test(e)&&navigator.maxTouchPoints>0){const n=e.match(/Version\/(\S*)\b/);n&&(t=n[1])}return!!t&&parseInt(t)>=16&&parseFloat(t)<17.2}}));function Xh(e,t,n,o,r){if(t.value)if("."===e.data){if("."===t.value.slice(-1))return n.value=o.value=t.value=t.value.slice(0,-1),!1;if(t.value&&!t.value.includes(".")&&t.value===o.value)return t.value+=".",r&&(r.fn=()=>{n.value=o.value=t.value=t.value.slice(0,-1),o.removeEventListener("blur",r.fn)},o.addEventListener("blur",r.fn)),!1}else if("deleteContentBackward"===e.inputType&&Uh()&&"."===t.value.slice(-2,-1))return t.value=n.value=o.value=t.value.slice(0,-2),!0}function Kh(e){return"insertFromPaste"===e.inputType}const Gh=iu({name:"Input",props:c({},Hh,{placeholderClass:{type:String,default:"input-placeholder"},textContentType:{type:String,default:""}}),emits:["confirm",...Wh],setup(e,{emit:t,expose:n}){const o=["text","number","idcard","digit","password","tel"],r=["off","one-time-code"],i=$i((()=>{let t="";switch(e.type){case"text":t="text","search"===e.confirmType&&(t="search");break;case"idcard":case"none":t="text";break;case"digit":t="number";break;default:t=o.includes(e.type)?e.type:"text"}return e.password?"password":t})),s=$i((()=>{const t=r.indexOf(e.textContentType),n=r.indexOf(L(e.textContentType));return r[-1!==t?t:-1!==n?n:0]})),a=$i((()=>{if(void 0!==e.inputmode)return e.inputmode;if(Vh.includes(e.type))return e.type;return{number:"numeric",digit:"decimal",idcard:"text"}[e.type]}));let l=function(e,t){if("number"===t.value){const t=void 0===e.modelValue?e.value:e.modelValue,n=an(null!=t?t.toLocaleString():"");return so((()=>e.modelValue),(e=>{n.value=null!=e?e.toLocaleString():""})),so((()=>e.value),(e=>{n.value=null!=e?e.toLocaleString():""})),n}return an("")}(e,i),c={fn:null};const u=an(null),{fieldRef:d,state:f,scopedAttrsState:h,fixDisabledColor:p,trigger:m}=Yh(e,u,t,((e,t)=>{const n=e.target;if("number"===i.value){if(c.fn&&(n.removeEventListener("blur",c.fn),c.fn=null),n.validity&&!n.validity.valid){if((!l.value||!n.value)&&"-"===e.data||"-"===l.value[0]&&"deleteContentBackward"===e.inputType)return l.value="-",t.value="",c.fn=()=>{l.value=n.value=""},n.addEventListener("blur",c.fn),!1;const o=Xh(e,l,t,n,c);return"boolean"==typeof o?o:(l.value=t.value=n.value="-"===l.value?"":l.value,!1)}{const o=Xh(e,l,t,n,c);if("boolean"==typeof o)return o;l.value=n.value}if(t.maxlength>0&&n.value.length>t.maxlength&&!Kh(e))return n.value=l.value=t.value,!1}}));so((()=>f.value),(t=>{"number"!==e.type||"-"===l.value&&""===t||(l.value=t.toString())})),so((()=>e.maxlength),(e=>{e=parseInt(e,10);const t=f.value.slice(0,e);t!==f.value&&(f.value=t)}));const g=["number","digit"],v=$i((()=>g.includes(e.type)?e.step:""));function y(t){if("Enter"!==t.key)return;const n=t.target;t.stopPropagation(),m("confirm",t,{value:n.value}),!e.confirmHold&&n.blur()}return n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),f.value=e.value}}),()=>{let t=e.disabled&&p?ui("input",{key:"disabled-input",ref:d,value:f.value,tabindex:"-1",readonly:!!e.disabled,type:i.value,maxlength:f.maxlength,step:v.value,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},inputmode:a.value,onFocus:e=>e.target.blur()},null,44,["value","readonly","type","maxlength","step","inputmode","onFocus"]):ui("input",{key:"input",ref:d,value:f.value,onInput:Es((e=>{const t=e.target.value.toString();"number"===i.value&&f.maxlength>0&&t.length>f.maxlength?Kh(e)&&(f.value=t.slice(0,f.maxlength)):0===t.length&&"insertText"===e.inputType&&"."===e.data||(f.value=t)}),["stop"]),disabled:!!e.disabled,type:i.value,maxlength:f.maxlength,step:v.value,enterkeyhint:e.confirmType,pattern:"number"===e.type?"[0-9]*":void 0,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},autocomplete:s.value,onKeyup:y,inputmode:a.value},null,44,["value","onInput","disabled","type","maxlength","step","enterkeyhint","pattern","autocomplete","onKeyup","inputmode"]);return ui("uni-input",{ref:u},[ui("div",{class:"uni-input-wrapper"},[fo(ui("div",vi(h.attrs,{style:e.placeholderStyle,class:["uni-input-placeholder",e.placeholderClass]}),[e.placeholder],16),[[ts,!(f.value.length||"-"===l.value||l.value.includes("."))]]),"search"===e.confirmType?ui("form",{action:"",onSubmit:e=>e.preventDefault(),class:"uni-input-form"},[t],40,["onSubmit"]):t])],512)}}});const Jh=["class","style"],Qh=/^on[A-Z]+/,Zh=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n=[]}=e,o=xi(),r=ln({}),i=ln({}),s=ln({}),a=n.concat(Jh);return o.attrs=qt(o.attrs),ro((()=>{const e=(n=o.attrs,Object.keys(n).map((e=>[e,n[e]]))).reduce(((e,[n,o])=>(a.includes(n)?e.exclude[n]=o:Qh.test(n)?(t||(e.attrs[n]=o),e.listeners[n]=o):e.attrs[n]=o,e)),{exclude:{},attrs:{},listeners:{}});var n;r.value=e.attrs,i.value=e.listeners,s.value=e.exclude})),{$attrs:r,$listeners:i,$excludeAttrs:s}};function ep(e){const t=[];return h(e)&&e.forEach((e=>{ri(e)?e.type===Yr?t.push(...ep(e.children)):t.push(e):h(e)&&t.push(...ep(e))})),t}const tp=iu({inheritAttrs:!1,name:"MovableArea",props:{scaleArea:{type:Boolean,default:!1}},setup(e,{slots:t}){const n=an(null),o=an(!1);let{setContexts:r,events:i}=function(e,t){const n=an(0),o=an(0),r=qt({x:null,y:null}),i=an(null);let s=null,a=[];function l(t){t&&1!==t&&(e.scaleArea?a.forEach((function(e){e._setScale(t)})):s&&s._setScale(t))}function c(e,n=a){let o=t.value;function r(e){for(let t=0;t{let n=t.touches;if(n&&n.length>1){let t={x:n[1].pageX-n[0].pageX,y:n[1].pageY-n[0].pageY};if(i.value=np(t),r.x=t.x,r.y=t.y,!e.scaleArea){let e=c(n[0].target),t=c(n[1].target);s=e&&e===t?e:null}}})),d=au((e=>{let t=e.touches;if(t&&t.length>1){e.preventDefault();let n={x:t[1].pageX-t[0].pageX,y:t[1].pageY-t[0].pageY};if(null!==r.x&&i.value&&i.value>0){l(np(n)/i.value)}r.x=n.x,r.y=n.y}})),f=au((t=>{let n=t.touches;n&&n.length||t.changedTouches&&(r.x=0,r.y=0,i.value=null,e.scaleArea?a.forEach((function(e){e._endScale()})):s&&s._endScale())}));function h(){p(),a.forEach((function(e,t){e.setParent()}))}function p(){let e=window.getComputedStyle(t.value),r=t.value.getBoundingClientRect();n.value=r.width-["Left","Right"].reduce((function(t,n){const o="padding"+n;return t+parseFloat(e["border"+n+"Width"])+parseFloat(e[o])}),0),o.value=r.height-["Top","Bottom"].reduce((function(t,n){const o="padding"+n;return t+parseFloat(e["border"+n+"Width"])+parseFloat(e[o])}),0)}return Cr("movableAreaWidth",n),Cr("movableAreaHeight",o),{setContexts(e){a=e},events:{_onTouchstart:u,_onTouchmove:d,_onTouchend:f,_resize:h}}}(e,n);const{$listeners:s,$attrs:a,$excludeAttrs:l}=Zh(),c=s.value;["onTouchstart","onTouchmove","onTouchend"].forEach((e=>{let t=c[e],n=i[`_${e}`];c[e]=t?[].concat(t,n):n})),zo((()=>{i._resize(),o.value=!0}));let u=[];const d=[];function f(){const e=[];for(let t=0;tn===e.rootRef.value));o&&e.push(Zt(o))}r(e)}return Cr("_isMounted",o),Cr("movableAreaRootRef",n),Cr("addMovableViewContext",(e=>{d.push(e),f()})),Cr("removeMovableViewContext",(e=>{const t=d.indexOf(e);t>=0&&(d.splice(t,1),f())})),()=>{const e=t.default&&t.default();return u=ep(e),ui("uni-movable-area",vi({ref:n},a.value,l.value,c),[ui(vh,{onResize:i._resize},null,8,["onResize"]),u],16)}}});function np(e){return Math.sqrt(e.x*e.x+e.y*e.y)}const op=function(e,t,n,o){e.addEventListener(t,(e=>{g(n)&&!1===n(e)&&((void 0===e.cancelable||e.cancelable)&&e.preventDefault(),e.stopPropagation())}),{passive:!1})};let rp,ip;function sp(e,t,n){Xo((()=>{document.removeEventListener("mousemove",rp),document.removeEventListener("mouseup",ip)}));let o=0,r=0,i=0,s=0;const a=function(e,n,a,l){if(!1===t({cancelable:e.cancelable,target:e.target,currentTarget:e.currentTarget,preventDefault:e.preventDefault.bind(e),stopPropagation:e.stopPropagation.bind(e),touches:e.touches,changedTouches:e.changedTouches,detail:{state:n,x:a,y:l,dx:a-o,dy:l-r,ddx:a-i,ddy:l-s,timeStamp:e.timeStamp}}))return!1};let l,c,u=null;op(e,"touchstart",(function(e){if(l=!0,1===e.touches.length&&!u)return u=e,o=i=e.touches[0].pageX,r=s=e.touches[0].pageY,a(e,"start",o,r)})),op(e,"mousedown",(function(e){if(c=!0,!l&&!u)return u=e,o=i=e.pageX,r=s=e.pageY,a(e,"start",o,r)})),op(e,"touchmove",(function(e){if(1===e.touches.length&&u){const t=a(e,"move",e.touches[0].pageX,e.touches[0].pageY);return i=e.touches[0].pageX,s=e.touches[0].pageY,t}}));const d=rp=function(e){if(!l&&c&&u){const t=a(e,"move",e.pageX,e.pageY);return i=e.pageX,s=e.pageY,t}};document.addEventListener("mousemove",d),op(e,"touchend",(function(e){if(0===e.touches.length&&u)return l=!1,u=null,a(e,"end",e.changedTouches[0].pageX,e.changedTouches[0].pageY)}));const f=ip=function(e){if(c=!1,!l&&u)return u=null,a(e,"end",e.pageX,e.pageY)};document.addEventListener("mouseup",f),op(e,"touchcancel",(function(e){if(u){l=!1;const t=u;return u=null,a(e,n?"cancel":"end",t.touches[0].pageX,t.touches[0].pageY)}}))}function ap(e,t,n){return e>t-n&&ethis._t&&(e=this._t,this._lastDt=e);let t=this._x_v*e+.5*this._x_a*Math.pow(e,2)+this._x_s,n=this._y_v*e+.5*this._y_a*Math.pow(e,2)+this._y_s;return(this._x_a>0&&tthis._endPositionX)&&(t=this._endPositionX),(this._y_a>0&&nthis._endPositionY)&&(n=this._endPositionY),{x:t,y:n}},up.prototype.ds=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),e>this._t&&(e=this._t),{dx:this._x_v+this._x_a*e,dy:this._y_v+this._y_a*e}},up.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},up.prototype.dt=function(){return-this._x_v/this._x_a},up.prototype.done=function(){const e=ap(this.s().x,this._endPositionX)||ap(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,e},up.prototype.setEnd=function(e,t){this._endPositionX=e,this._endPositionY=t},up.prototype.reconfigure=function(e,t){this._m=e,this._f=1e3*t},dp.prototype._solve=function(e,t){const n=this._c,o=this._m,r=this._k,i=n*n-4*o*r;if(0===i){const r=-n/(2*o),i=e,s=t/(r*e);return{x:function(e){return(i+s*e)*Math.pow(Math.E,r*e)},dx:function(e){const t=Math.pow(Math.E,r*e);return r*(i+s*e)*t+s*t}}}if(i>0){const r=(-n-Math.sqrt(i))/(2*o),s=(-n+Math.sqrt(i))/(2*o),a=(t-r*e)/(s-r),l=e-a;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,r*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),l*t+a*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,r*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),l*r*t+a*s*n}}}const s=Math.sqrt(4*o*r-n*n)/(2*o),a=-n/2*o,l=e,c=(t-a*e)/s;return{x:function(e){return Math.pow(Math.E,a*e)*(l*Math.cos(s*e)+c*Math.sin(s*e))},dx:function(e){const t=Math.pow(Math.E,a*e),n=Math.cos(s*e),o=Math.sin(s*e);return t*(c*s*n-l*s*o)+a*t*(c*o+l*n)}}},dp.prototype.x=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0},dp.prototype.dx=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0},dp.prototype.setEnd=function(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!lp(t,.1)){t=t||0;let o=this._endPosition;this._solution&&(lp(t,.1)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),lp(t,.1)&&(t=0),lp(o,.1)&&(o=0),o+=this._endPosition),this._solution&&lp(o-e,.1)&&lp(t,.1)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}},dp.prototype.snap=function(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}},dp.prototype.done=function(e){return e||(e=(new Date).getTime()),ap(this.x(),this._endPosition,.1)&&lp(this.dx(),.1)},dp.prototype.reconfigure=function(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},dp.prototype.springConstant=function(){return this._k},dp.prototype.damping=function(){return this._c},dp.prototype.configuration=function(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]},fp.prototype.setEnd=function(e,t,n,o){const r=(new Date).getTime();this._springX.setEnd(e,o,r),this._springY.setEnd(t,o,r),this._springScale.setEnd(n,o,r),this._startTime=r},fp.prototype.x=function(){const e=((new Date).getTime()-this._startTime)/1e3;return{x:this._springX.x(e),y:this._springY.x(e),scale:this._springScale.x(e)}},fp.prototype.done=function(){const e=(new Date).getTime();return this._springX.done(e)&&this._springY.done(e)&&this._springScale.done(e)},fp.prototype.reconfigure=function(e,t,n){this._springX.reconfigure(e,t,n),this._springY.reconfigure(e,t,n),this._springScale.reconfigure(e,t,n)};function hp(e,t){return+((1e3*e-1e3*t)/1e3).toFixed(1)}const pp=iu({name:"MovableView",props:{direction:{type:String,default:"none"},inertia:{type:[Boolean,String],default:!1},outOfBounds:{type:[Boolean,String],default:!1},x:{type:[Number,String],default:0},y:{type:[Number,String],default:0},damping:{type:[Number,String],default:20},friction:{type:[Number,String],default:2},disabled:{type:[Boolean,String],default:!1},scale:{type:[Boolean,String],default:!1},scaleMin:{type:[Number,String],default:.1},scaleMax:{type:[Number,String],default:10},scaleValue:{type:[Number,String],default:1},animation:{type:[Boolean,String],default:!0}},emits:["change","scale"],setup(e,{slots:t,emit:n}){const o=an(null),r=lu(o,n),{setParent:i}=function(e,t,n){const o=Tr("_isMounted",an(!1)),r=Tr("addMovableViewContext",(()=>{})),i=Tr("removeMovableViewContext",(()=>{}));let s,a,l=an(1),c=an(1),u=an(!1),d=an(0),f=an(0),h=null,p=null,m=!1,g=null,v=null;const y=new cp,_=new cp,b={historyX:[0,0],historyY:[0,0],historyT:[0,0]},w=$i((()=>{let t=Number(e.friction);return isNaN(t)||t<=0?2:t})),x=new up(1,w.value);so((()=>e.disabled),(()=>{z()}));const{_updateOldScale:S,_endScale:C,_setScale:T,scaleValueSync:k,_updateBoundary:E,_updateOffset:O,_updateWH:M,_scaleOffset:L,minX:A,minY:P,maxX:$,maxY:I,FAandSFACancel:R,_getLimitXY:B,_setTransform:N,_revise:D,dampingNumber:j,xMove:F,yMove:V,xSync:H,ySync:W,_STD:q}=function(e,t,n,o,r,i,s,a,l,c){const u=$i((()=>{let t=Number(e.scaleMin);return isNaN(t)?.1:t})),d=$i((()=>{let t=Number(e.scaleMax);return isNaN(t)?10:t})),f=an(Number(e.scaleValue)||1);so(f,(e=>{N(e)})),so(u,(()=>{B()})),so(d,(()=>{B()})),so((()=>e.scaleValue),(e=>{f.value=Number(e)||0}));const{_updateBoundary:h,_updateOffset:p,_updateWH:m,_scaleOffset:g,minX:v,minY:y,maxX:_,maxY:b}=function(e,t,n){const o=Tr("movableAreaWidth",an(0)),r=Tr("movableAreaHeight",an(0)),i=Tr("movableAreaRootRef"),s={x:0,y:0},a={x:0,y:0},l=an(0),c=an(0),u=an(0),d=an(0),f=an(0),h=an(0);function p(){let e=0-s.x+a.x,t=o.value-l.value-s.x-a.x;u.value=Math.min(e,t),f.value=Math.max(e,t);let n=0-s.y+a.y,i=r.value-c.value-s.y-a.y;d.value=Math.min(n,i),h.value=Math.max(n,i)}function m(){s.x=vp(e.value,i.value),s.y=yp(e.value,i.value)}function g(o){o=o||t.value,o=n(o);let r=e.value.getBoundingClientRect();c.value=r.height/t.value,l.value=r.width/t.value;let i=c.value*o,s=l.value*o;a.x=(s-l.value)/2,a.y=(i-c.value)/2}return{_updateBoundary:p,_updateOffset:m,_updateWH:g,_scaleOffset:a,minX:u,minY:d,maxX:f,maxY:h}}(t,o,R),{FAandSFACancel:w,_getLimitXY:x,_animationTo:S,_setTransform:C,_revise:T,dampingNumber:k,xMove:E,yMove:O,xSync:M,ySync:L,_STD:A}=function(e,t,n,o,r,i,s,a,l,c,u,d,f,h){const p=$i((()=>{let e=Number(t.damping);return isNaN(e)?20:e})),m=$i((()=>"all"===t.direction||"horizontal"===t.direction)),g=$i((()=>"all"===t.direction||"vertical"===t.direction)),v=an(bp(t.x)),y=an(bp(t.y));so((()=>t.x),(e=>{v.value=bp(e)})),so((()=>t.y),(e=>{y.value=bp(e)})),so(v,(e=>{T(e)})),so(y,(e=>{k(e)}));const _=new fp(1,9*Math.pow(p.value,2)/40,p.value);function b(e,t){let n=!1;return e>r.value?(e=r.value,n=!0):ei.value?(t=i.value,n=!0):t1?"htouchmove":"vtouchmove"),F.value&&(n=t.detail.dx+s,b.historyX.shift(),b.historyX.push(n),V.value||null!==g||(g=Math.abs(t.detail.dx/t.detail.dy)<1)),V.value&&(o=t.detail.dy+a,b.historyY.shift(),b.historyY.push(o),F.value||null!==g||(g=Math.abs(t.detail.dy/t.detail.dx)<1)),b.historyT.shift(),b.historyT.push(t.detail.timeStamp),!g){t.preventDefault();let r="touch";n$.value&&(e.outOfBounds?(r="touch-out-of-bounds",n=$.value+y.x(n-$.value)):n=$.value),oI.value&&(e.outOfBounds?(r="touch-out-of-bounds",o=I.value+_.x(o-I.value)):o=I.value),gp((function(){N(n,o,l.value,r)}))}}}function U(){if(!u.value&&!e.disabled&&m&&(n.value.style.willChange="auto",m=!1,!g&&!D("out-of-bounds")&&e.inertia)){const e=1e3*(b.historyX[1]-b.historyX[0])/(b.historyT[1]-b.historyT[0]),t=1e3*(b.historyY[1]-b.historyY[0])/(b.historyT[1]-b.historyT[0]),n=d.value,o=f.value;x.setV(e,t),x.setS(n,o);const r=x.delta().x,i=x.delta().y;let s=r+n,a=i+o;s$.value&&(s=$.value,a=o+($.value-n)*i/r),aI.value&&(a=I.value,s=n+(I.value-o)*r/i),x.setEnd(s,a),p=_p(x,(function(){let e=x.s(),t=e.x,n=e.y;N(t,n,l.value,"friction")}),(function(){p.cancel()}))}e.outOfBounds||e.inertia||R()}function X(){if(!o.value)return;R();let t=e.scale?k.value:1;O(),M(t),E();let n=B(H.value+L.x,W.value+L.y),r=n.x,i=n.y;N(r,i,t,"",!0),S(t)}return zo((()=>{sp(n.value,(e=>{switch(e.detail.state){case"start":z();break;case"move":Y(e);break;case"end":U()}})),X(),x.reconfigure(1,w.value),q.reconfigure(1,9*Math.pow(j.value,2)/40,j.value),n.value.style.transformOrigin="center";const e={rootRef:n,setParent:X,_endScale:C,_setScale:T};r(e),Ko((()=>{i(e)}))})),Ko((()=>{R()})),{setParent:X}}(e,r,o);return()=>ui("uni-movable-view",{ref:o},[ui(vh,{onResize:i},null,8,["onResize"]),t.default&&t.default()],512)}});let mp=!1;function gp(e){mp||(mp=!0,requestAnimationFrame((function(){e(),mp=!1})))}function vp(e,t){if(e===t)return 0;let n=e.offsetLeft;return e.offsetParent?n+=vp(e.offsetParent,t):0}function yp(e,t){if(e===t)return 0;let n=e.offsetTop;return e.offsetParent?n+=yp(e.offsetParent,t):0}function _p(e,t,n){let o={id:0,cancelled:!1};return function e(t,n,o,r){if(!t||!t.cancelled){o(n);let i=n.done();i||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,r))),i&&r&&r(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}function bp(e){return/\d+[ur]px$/i.test(e)?ud(parseFloat(e)):Number(e)||0}const wp=iu({name:"PickerView",props:{value:{type:Array,default:()=>[],validator:function(e){return h(e)&&e.filter((e=>"number"==typeof e)).length===e.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}},emits:["change","pickstart","pickend","update:value"],setup(e,{slots:t,emit:n}){const o=an(null),r=an(null),i=lu(o,n),s=function(e){const t=qt([...e.value]),n=qt({value:t,height:34});return so((()=>e.value),((e,t)=>{n.value.length=e.length,e.forEach(((e,t)=>{e!==n.value[t]&&n.value.splice(t,1,e)}))})),n}(e),a=an(null);zo((()=>{const e=a.value;e&&(s.height=e.$el.offsetHeight)}));let l=an([]),c=an([]);function u(e){let t=c.value;t=t.filter((e=>e.type!==Xr));let n=t.indexOf(e);return-1!==n?n:l.value.indexOf(e)}return Cr("getPickerViewColumn",(function(e){return $i({get(){const t=u(e.vnode);return s.value[t]||0},set(t){const o=u(e.vnode);if(o<0)return;if(s.value[o]!==t){s.value[o]=t;const e=s.value.map((e=>e));n("update:value",e),i("change",{},{value:e})}}})})),Cr("pickerViewProps",e),Cr("pickerViewState",s),()=>{const e=t.default&&t.default();{const t=ep(e);l.value=t,An((()=>{c.value=t}))}return ui("uni-picker-view",{ref:o},[ui(vh,{ref:a,onResize:({height:e})=>s.height=e},null,8,["onResize"]),ui("div",{ref:r,class:"uni-picker-view-wrapper"},[e],512)],512)}}});class xp{constructor(e){this._drag=e,this._dragLog=Math.log(e),this._x=0,this._v=0,this._startTime=0}set(e,t){this._x=e,this._v=t,this._startTime=(new Date).getTime()}setVelocityByEnd(e){this._v=(e-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)}x(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._x+this._v*t/this._dragLog-this._v/this._dragLog}dx(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._v*t}done(){return Math.abs(this.dx())<3}reconfigure(e){const t=this.x(),n=this.dx();this._drag=e,this._dragLog=Math.log(e),this.set(t,n)}configuration(){const e=this;return[{label:"Friction",read:function(){return e._drag},write:function(t){e.reconfigure(t)},min:.001,max:.1,step:.001}]}}function Sp(e,t,n){return e>t-n&&e0){const r=(-n-Math.sqrt(i))/(2*o),s=(-n+Math.sqrt(i))/(2*o),a=(t-r*e)/(s-r),l=e-a;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,r*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),l*t+a*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,r*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),l*r*t+a*s*n}}}const s=Math.sqrt(4*o*r-n*n)/(2*o),a=-n/2*o,l=e,c=(t-a*e)/s;return{x:function(e){return Math.pow(Math.E,a*e)*(l*Math.cos(s*e)+c*Math.sin(s*e))},dx:function(e){const t=Math.pow(Math.E,a*e),n=Math.cos(s*e),o=Math.sin(s*e);return t*(c*s*n-l*s*o)+a*t*(c*o+l*n)}}}x(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0}dx(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0}setEnd(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!Cp(t,.4)){t=t||0;let o=this._endPosition;this._solution&&(Cp(t,.4)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),Cp(t,.4)&&(t=0),Cp(o,.4)&&(o=0),o+=this._endPosition),this._solution&&Cp(o-e,.4)&&Cp(t,.4)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}}snap(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}}done(e){return e||(e=(new Date).getTime()),Sp(this.x(),this._endPosition,.4)&&Cp(this.dx(),.4)}reconfigure(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())}springConstant(){return this._k}damping(){return this._c}configuration(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]}}class kp{constructor(e,t,n){this._extent=e,this._friction=t||new xp(.01),this._spring=n||new Tp(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}snap(e,t){this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(t)}set(e,t){this._friction.set(e,t),e>0&&t>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(0)):e<-this._extent&&t<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()}x(e){if(!this._startTime)return 0;if(e||(e=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;let t=this._friction.x(e),n=this.dx(e);return(t>0&&n>=0||t<-this._extent&&n<=0)&&(this._springing=!0,this._spring.setEnd(0,n),t<-this._extent?this._springOffset=-this._extent:this._springOffset=0,t=this._spring.x()+this._springOffset),t}dx(e){let t;return t=this._lastTime===e?this._lastDx:this._springing?this._spring.dx(e):this._friction.dx(e),this._lastTime=e,this._lastDx=t,t}done(){return this._springing?this._spring.done():this._friction.done()}setVelocityByEnd(e){this._friction.setVelocityByEnd(e)}configuration(){const e=this._friction.configuration();return e.push.apply(e,this._spring.configuration()),e}}class Ep{constructor(e,t){t=t||{},this._element=e,this._options=t,this._enableSnap=t.enableSnap||!1,this._itemSize=t.itemSize||0,this._enableX=t.enableX||!1,this._enableY=t.enableY||!1,this._shouldDispatchScrollEvent=!!t.onScroll,this._enableX?(this._extent=(t.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=t.scrollWidth):(this._extent=(t.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=t.scrollHeight),this._position=0,this._scroll=new kp(this._extent,t.friction,t.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}onTouchStart(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()}onTouchMove(e,t){let n=this._startPosition;this._enableX?n+=e:this._enableY&&(n+=t),n>0?n*=.5:n<-this._extent&&(n=.5*(n+this._extent)-this._extent),this._position=n,this.updatePosition(),this.dispatchScroll()}onTouchEnd(e,t,n){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(t)this._itemSize/2?e-(this._itemSize-Math.abs(t)):e-t,o<=0&&o>=-this._extent&&this._scroll.setVelocityByEnd(o)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=function(e,t,n){const o={id:0,cancelled:!1};return function e(t,n,o,r){if(!t||!t.cancelled){o(n);const i=n.done();i||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,r))),i&&r&&r(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}(this._scroll,(()=>{const e=Date.now(),t=(e-this._scroll._startTime)/1e3,n=this._scroll.x(t);this._position=n,this.updatePosition();const o=this._scroll.dx(t);this._shouldDispatchScrollEvent&&e-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/o),this._lastTime=e)}),(()=>{this._enableSnap&&(o<=0&&o>=-this._extent&&(this._position=o,this.updatePosition()),g(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1}))}onTransitionEnd(){this._element.style.webkitTransition="",this._element.style.transition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()}snap(){const e=this._itemSize,t=this._position%e,n=Math.abs(t)>this._itemSize/2?this._position-(e-Math.abs(t)):this._position-t;this._position!==n&&(this._snapping=!0,this.scrollTo(-n),g(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))}scrollTo(e,t){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"==typeof e&&(this._position=-e),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0);const n="transform "+(t||.2)+"s ease-out";this._element.style.webkitTransition="-webkit-"+n,this._element.style.transition=n,this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd)}dispatchScroll(){if(g(this._options.onScroll)&&Math.round(Number(this._lastPos))!==Math.round(this._position)){this._lastPos=this._position;const e={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(e)}}update(e,t,n){let o=0;const r=this._position;this._enableX?(o=this._element.childNodes.length?(t||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=t):(o=this._element.childNodes.length?(t||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=t),"number"==typeof e&&(this._position=-e),this._position<-o?this._position=-o:this._position>0&&(this._position=0),this._itemSize=n||this._itemSize,this.updatePosition(),r!==this._position&&(this.dispatchScroll(),g(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=o,this._scroll._extent=o}updatePosition(){let e="";this._enableX?e="translateX("+this._position+"px) translateZ(0)":this._enableY&&(e="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=e,this._element.style.transform=e}isScrolling(){return this._scrolling||this._snapping}}const Op=iu({name:"PickerViewColumn",setup(e,{slots:t,emit:n}){const o=an(null),r=an(null),i=Tr("getPickerViewColumn"),s=xi(),a=i?i(s):an(0),l=Tr("pickerViewProps"),c=Tr("pickerViewState"),u=an(34),d=an(null);zo((()=>{const e=d.value;u.value=e.$el.offsetHeight}));const f=$i((()=>(c.height-u.value)/2)),{state:h}=Nh();let p;const m=qt({current:a.value,length:0});let g;function v(){p&&!g&&(g=!0,An((()=>{g=!1;let e=Math.min(m.current,m.length-1);e=Math.max(e,0),p.update(e*u.value,void 0,u.value)})))}so((()=>a.value),(e=>{e!==m.current&&(m.current=e,v())})),so((()=>m.current),(e=>a.value=e)),so([()=>u.value,()=>m.length,()=>c.height],v);let y=0;function _(e){const t=y+e.deltaY;if(Math.abs(t)>10){y=0;let e=Math.min(m.current+(t<0?-1:1),m.length-1);m.current=e=Math.max(e,0),p.scrollTo(e*u.value)}else y=t;e.preventDefault()}function b({clientY:e}){const t=o.value;if(!p.isScrolling()){const n=e-t.getBoundingClientRect().top-c.height/2,o=u.value/2;if(!(Math.abs(n)<=o)){const e=Math.ceil((Math.abs(n)-o)/u.value),t=n<0?-e:e;let r=Math.min(m.current+t,m.length-1);m.current=r=Math.max(r,0),p.scrollTo(r*u.value)}}}const w=()=>{const e=o.value,t=r.value,{scroller:n,handleTouchStart:i,handleTouchMove:s,handleTouchEnd:a}=function(e,t){const n={trackingID:-1,maxDy:0,maxDx:0},o=new Ep(e,t);function r(e){const t=e,o=e;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:o.screenX-n.x,y:o.screenY-n.y}}return{scroller:o,handleTouchStart:function(e){const t=e,r=e;"start"===t.detail.state?(n.trackingID="touch",n.x=t.detail.x,n.y=t.detail.y):(n.trackingID="mouse",n.x=r.screenX,n.y=r.screenY),n.maxDx=0,n.maxDy=0,n.historyX=[0],n.historyY=[0],n.historyTime=[t.detail.timeStamp||r.timeStamp],n.listener=o,o.onTouchStart&&o.onTouchStart(),("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault()},handleTouchMove:function(e){const t=e,o=e;if(-1!==n.trackingID){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault();const i=r(e);if(i){for(n.maxDy=Math.max(n.maxDy,Math.abs(i.y)),n.maxDx=Math.max(n.maxDx,Math.abs(i.x)),n.historyX.push(i.x),n.historyY.push(i.y),n.historyTime.push(t.detail.timeStamp||o.timeStamp);n.historyTime.length>10;)n.historyTime.shift(),n.historyX.shift(),n.historyY.shift();n.listener&&n.listener.onTouchMove&&n.listener.onTouchMove(i.x,i.y)}}},handleTouchEnd:function(e){if(-1!==n.trackingID){e.preventDefault();const t=r(e);if(t){const e=n.listener;n.trackingID=-1,n.listener=null;const o={x:0,y:0};if(n.historyTime.length>2)for(let t=n.historyTime.length-1,r=n.historyTime[t],i=n.historyX[t],s=n.historyY[t];t>0;){t--;const e=r-n.historyTime[t];if(e>30&&e<50){o.x=(i-n.historyX[t])/(e/1e3),o.y=(s-n.historyY[t])/(e/1e3);break}}n.historyTime=[],n.historyX=[],n.historyY=[],e&&e.onTouchEnd&&e.onTouchEnd(t.x,t.y,o)}}}}}(t,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:u.value,friction:new xp(1e-4),spring:new Tp(2,90,20),onSnap:e=>{isNaN(e)||e===m.current||(m.current=e)}});p=n,sp(e,(e=>{switch(e.detail.state){case"start":i(e);break;case"move":s(e),e.stopPropagation();break;case"end":case"cancel":a(e)}}),!0),function(e){let t=0,n=0;e.addEventListener("touchstart",(e=>{const o=e.changedTouches[0];t=o.clientX,n=o.clientY})),e.addEventListener("touchend",(e=>{const o=e.changedTouches[0];if(Math.abs(o.clientX-t)<20&&Math.abs(o.clientY-n)<20){const t={bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget},n=new CustomEvent("click",t);["screenX","screenY","clientX","clientY","pageX","pageY"].forEach((e=>{n[e]=o[e]})),e.target.dispatchEvent(n)}}))}(e),v()};return zo(w),()=>{const e=t.default&&t.default();m.length=ep(e).length;const n=`${f.value}px 0`;return ui("uni-picker-view-column",{ref:o},[ui("div",{onWheel:_,onClick:b,class:"uni-picker-view-group"},[ui("div",vi(h.attrs,{class:["uni-picker-view-mask",l.maskClass],style:`background-size: 100% ${f.value}px;${l.maskStyle}`}),null,16),ui("div",vi(h.attrs,{class:["uni-picker-view-indicator",l.indicatorClass],style:l.indicatorStyle}),[ui(vh,{ref:d,onResize:({height:e})=>u.value=e},null,8,["onResize"])],16),ui("div",{ref:r,class:["uni-picker-view-content"],style:{padding:n,"--picker-view-column-indicator-height":`${u.value}px`}},[e],4)],40,["onWheel","onClick"])],512)}}}),Mp=iu({name:"Refresher",props:{refreshState:{type:String,default:""},refresherHeight:{type:Number,default:0},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"}},setup(e,{slots:t}){const n=an(null),o=$i((()=>{const t={backgroundColor:e.refresherBackground};switch(e.refreshState){case"pulling":t.height=e.refresherHeight+"px";break;case"refreshing":t.height=e.refresherThreshold+"px",t.transition="height 0.3s";break;case"":case"refresherabort":case"restore":t.height="0px",t.transition="height 0.3s"}return t})),r=$i((()=>{const t=e.refresherHeight/e.refresherThreshold;return 360*(t>1?1:t)}));return()=>{const{refreshState:i,refresherDefaultStyle:s,refresherThreshold:a}=e;return ui("div",{ref:n,style:o.value,class:"uni-scroll-view-refresher"},["none"!==s?ui("div",{class:"uni-scroll-view-refresh"},[ui("div",{class:"uni-scroll-view-refresh-inner"},["pulling"==i?ui("svg",{key:"refresh__icon",style:{transform:"rotate("+r.value+"deg)"},fill:"#2BD009",class:"uni-scroll-view-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},[ui("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null),ui("path",{d:"M0 0h24v24H0z",fill:"none"},null)],4):null,"refreshing"==i?ui("svg",{key:"refresh__spinner",class:"uni-scroll-view-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},[ui("circle",{cx:"50",cy:"50",r:"20",fill:"none",style:"color: #2bd009","stroke-width":"3"},null)]):null])]):null,"none"===s?ui("div",{class:"uni-scroll-view-refresher-container",style:{height:`${a}px`}},[t.default&&t.default()]):null],4)}}}),Lp=_e(!0),Ap=iu({name:"ScrollView",compatConfig:{MODE:3},props:{direction:{type:[String],default:"vertical"},scrollX:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},showScrollbar:{type:[Boolean,String],default:!0},upperThreshold:{type:[Number,String],default:50},lowerThreshold:{type:[Number,String],default:50},scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},scrollIntoView:{type:String,default:""},scrollWithAnimation:{type:[Boolean,String],default:!1},enableBackToTop:{type:[Boolean,String],default:!1},refresherEnabled:{type:[Boolean,String],default:!1},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"},refresherTriggered:{type:[Boolean,String],default:!1}},emits:["scroll","scrolltoupper","scrolltolower","refresherrefresh","refresherrestore","refresherpulling","refresherabort","update:refresherTriggered"],setup(e,{emit:t,slots:n,expose:o}){const r=an(null),i=an(null),s=an(null),a=an(null),l=lu(r,t),{state:c,scrollTopNumber:u,scrollLeftNumber:d}=function(e){const t=$i((()=>Number(e.scrollTop)||0)),n=$i((()=>Number(e.scrollLeft)||0));return{state:qt({lastScrollTop:t.value,lastScrollLeft:n.value,lastScrollToUpperTime:0,lastScrollToLowerTime:0,refresherHeight:0,refreshState:""}),scrollTopNumber:t,scrollLeftNumber:n}}(e),{realScrollX:f,realScrollY:h,_scrollLeftChanged:p,_scrollTopChanged:m}=function(e,t,n,o,r,i,s,a,l){let c=!1,u=0,d=!1,f=()=>{};const h=$i((()=>e.scrollX)),p=$i((()=>e.scrollY)),m=$i((()=>{let t=Number(e.upperThreshold);return isNaN(t)?50:t})),g=$i((()=>{let t=Number(e.lowerThreshold);return isNaN(t)?50:t}));function v(e,t){const n=s.value;let o=0,r="";if(e<0?e=0:"x"===t&&e>n.scrollWidth-n.offsetWidth?e=n.scrollWidth-n.offsetWidth:"y"===t&&e>n.scrollHeight-n.offsetHeight&&(e=n.scrollHeight-n.offsetHeight),"x"===t?o=n.scrollLeft-e:"y"===t&&(o=n.scrollTop-e),0===o)return;let i=a.value;i.style.transition="transform .3s ease-out",i.style.webkitTransition="-webkit-transform .3s ease-out","x"===t?r="translateX("+o+"px) translateZ(0)":"y"===t&&(r="translateY("+o+"px) translateZ(0)"),i.removeEventListener("transitionend",f),i.removeEventListener("webkitTransitionEnd",f),f=()=>x(e,t),i.addEventListener("transitionend",f),i.addEventListener("webkitTransitionEnd",f),"x"===t?n.style.overflowX="hidden":"y"===t&&(n.style.overflowY="hidden"),i.style.transform=r,i.style.webkitTransform=r}function y(e){const n=e.target;r("scroll",e,{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,scrollWidth:n.scrollWidth,deltaX:t.lastScrollLeft-n.scrollLeft,deltaY:t.lastScrollTop-n.scrollTop}),p.value&&(n.scrollTop<=m.value&&t.lastScrollTop-n.scrollTop>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(r("scrolltoupper",e,{direction:"top"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollTop+n.offsetHeight+g.value>=n.scrollHeight&&t.lastScrollTop-n.scrollTop<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(r("scrolltolower",e,{direction:"bottom"}),t.lastScrollToLowerTime=e.timeStamp)),h.value&&(n.scrollLeft<=m.value&&t.lastScrollLeft-n.scrollLeft>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(r("scrolltoupper",e,{direction:"left"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollLeft+n.offsetWidth+g.value>=n.scrollWidth&&t.lastScrollLeft-n.scrollLeft<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(r("scrolltolower",e,{direction:"right"}),t.lastScrollToLowerTime=e.timeStamp)),t.lastScrollTop=n.scrollTop,t.lastScrollLeft=n.scrollLeft}function _(t){p.value&&(e.scrollWithAnimation?v(t,"y"):s.value.scrollTop=t)}function b(t){h.value&&(e.scrollWithAnimation?v(t,"x"):s.value.scrollLeft=t)}function w(t){if(t){if(!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(t))return void console.error(`id error: scroll-into-view=${t}`);let n=i.value.querySelector("#"+t);if(n){let t=s.value.getBoundingClientRect(),o=n.getBoundingClientRect();if(h.value){let n=o.left-t.left,r=s.value.scrollLeft+n;e.scrollWithAnimation?v(r,"x"):s.value.scrollLeft=r}if(p.value){let n=o.top-t.top,r=s.value.scrollTop+n;e.scrollWithAnimation?v(r,"y"):s.value.scrollTop=r}}}}function x(e,t){a.value.style.transition="",a.value.style.webkitTransition="",a.value.style.transform="",a.value.style.webkitTransform="";let n=s.value;"x"===t?(n.style.overflowX=h.value?"auto":"hidden",n.scrollLeft=e):"y"===t&&(n.style.overflowY=p.value?"auto":"hidden",n.scrollTop=e),a.value.removeEventListener("transitionend",f),a.value.removeEventListener("webkitTransitionEnd",f)}function S(n){if(e.refresherEnabled){switch(n){case"refreshing":t.refresherHeight=e.refresherThreshold,c||(c=!0,r("refresherpulling",{},{deltaY:t.refresherHeight,dy:t.refresherHeight}),r("refresherrefresh",{},{dy:T.y-C.y}),l("update:refresherTriggered",!0));break;case"restore":case"refresherabort":c=!1,t.refresherHeight=u=0,"restore"===n&&(d=!1,r("refresherrestore",{},{dy:T.y-C.y})),"refresherabort"===n&&d&&(d=!1,r("refresherabort",{},{dy:T.y-C.y}))}t.refreshState=n}}let C={x:0,y:0},T={x:0,y:e.refresherThreshold};return zo((()=>{An((()=>{_(n.value),b(o.value)})),w(e.scrollIntoView);let i=function(e){e.preventDefault(),e.stopPropagation(),y(e)},a=null,l=function(n){if(null===C)return;let o=n.touches[0].pageX,i=n.touches[0].pageY,l=s.value;if(Math.abs(o-C.x)>Math.abs(i-C.y))if(h.value){if(0===l.scrollLeft&&o>C.x)return void(a=!1);if(l.scrollWidth===l.offsetWidth+l.scrollLeft&&oC.y)a=!1,e.refresherEnabled&&!1!==n.cancelable&&n.preventDefault();else{if(l.scrollHeight===l.offsetHeight+l.scrollTop&&i0&&(d=!0,r("refresherpulling",n,{deltaY:o,dy:o})))}},f=function(e){1===e.touches.length&&(C={x:e.touches[0].pageX,y:e.touches[0].pageY})},m=function(n){T={x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY},t.refresherHeight>=e.refresherThreshold?S("refreshing"):S("refresherabort"),C={x:0,y:0},T={x:0,y:e.refresherThreshold}};s.value.addEventListener("touchstart",f,Lp),s.value.addEventListener("touchmove",l,_e(!1)),s.value.addEventListener("scroll",i,_e(!1)),s.value.addEventListener("touchend",m,Lp),Xo((()=>{s.value.removeEventListener("touchstart",f),s.value.removeEventListener("touchmove",l),s.value.removeEventListener("scroll",i),s.value.removeEventListener("touchend",m)}))})),Io((()=>{p.value&&(s.value.scrollTop=t.lastScrollTop),h.value&&(s.value.scrollLeft=t.lastScrollLeft)})),so(n,(e=>{_(e)})),so(o,(e=>{b(e)})),so((()=>e.scrollIntoView),(e=>{w(e)})),so((()=>e.refresherTriggered),(e=>{!0===e?S("refreshing"):!1===e&&S("restore")})),{realScrollX:h,realScrollY:p,_scrollTopChanged:_,_scrollLeftChanged:b}}(e,c,u,d,l,r,i,a,t),g=$i((()=>{let e="";return f.value?e+="overflow-x:auto;":e+="overflow-x:hidden;",h.value?e+="overflow-y:auto;":e+="overflow-y:hidden;",e})),v=$i((()=>{let t="uni-scroll-view";return!1===e.showScrollbar&&(t+=" uni-scroll-view-scrollbar-hidden"),t}));return o({$getMain:()=>i.value}),()=>{const{refresherEnabled:t,refresherBackground:o,refresherDefaultStyle:l,refresherThreshold:u}=e,{refresherHeight:d,refreshState:f}=c;return ui("uni-scroll-view",{ref:r},[ui("div",{ref:s,class:"uni-scroll-view"},[ui("div",{ref:i,style:g.value,class:v.value},[t?ui(Mp,{refreshState:f,refresherHeight:d,refresherThreshold:u,refresherDefaultStyle:l,refresherBackground:o},{default:()=>["none"==l?n.refresher&&n.refresher():null]},8,["refreshState","refresherHeight","refresherThreshold","refresherDefaultStyle","refresherBackground"]):null,ui("div",{ref:a,class:"uni-scroll-view-content"},[n.default&&n.default()],512)],6)],512)],512)}}});function Pp(e,t,n,o,r,i){function s(){c&&(clearTimeout(c),c=null)}let a,l,c=null,u=!0,d=0,f=1,h=null,p=!1,m=0,g="";const v=$i((()=>n.value.length>t.displayMultipleItems)),y=$i((()=>e.circular&&v.value));function _(r){Math.floor(2*d)===Math.floor(2*r)&&Math.ceil(2*d)===Math.ceil(2*r)||y.value&&function(o){if(!u)for(let r=n.value,i=r.length,s=o+t.displayMultipleItems,a=0;a=c.length&&(r-=c.length),r=a%1>.5||a<0?r-1:r,i("transition",{},{dx:e.vertical?0:r*l.offsetWidth,dy:e.vertical?r*l.offsetHeight:0})}function b(e){const o=n.value.length;if(!o)return-1;const r=(Math.round(e)%o+o)%o;if(y.value){if(o<=t.displayMultipleItems)return 0}else if(r>o-t.displayMultipleItems)return o-t.displayMultipleItems;return r}function w(){h=null}function x(){if(!h)return void(p=!1);const e=h,o=e.toPos,r=e.acc,s=e.endTime,c=e.source,u=s-Date.now();if(u<=0){_(o),h=null,p=!1,a=null;const e=n.value[t.current];if(e){const n=e.getItemId();i("animationfinish",{},{current:t.current,currentItemId:n,source:c})}return}_(o+r*u*u/2),l=requestAnimationFrame(x)}function S(e,o,r){w();const i=t.duration,s=n.value.length;let a=d;if(y.value)if(r<0){for(;ae;)a-=s}else if(r>0){for(;a>e;)a-=s;for(;a+se;)a-=s;a+s-ee.current,()=>e.currentItemId,()=>[...n.value]],(()=>{let o=-1;if(e.currentItemId)for(let t=0,r=n.value;te.vertical,()=>y.value,()=>t.displayMultipleItems,()=>[...n.value]],(function(){s(),h&&(_(h.toPos),h=null);const r=n.value;for(let t=0;t0&&f<1||(f=1)}const a=d;d=-2;const l=t.current;l>=0?(u=!1,t.userTracking?(_(a+l-m),m=l):(_(l),e.autoplay&&C())):(u=!0,_(-t.displayMultipleItems-1))})),so((()=>t.interval),(()=>{c&&(s(),C())})),so((()=>t.current),((e,o)=>{!function(e,o){const r=g;g="";const s=n.value;if(!r){const t=s.length;S(e,"",y.value&&o+(t-e)%t>t/2?1:0)}const a=s[e];if(a){const e=t.currentItemId=a.getItemId();i("change",{},{current:t.current,currentItemId:e,source:r})}}(e,o),r("update:current",e)})),so((()=>t.currentItemId),(e=>{r("update:currentItemId",e)})),so((()=>e.autoplay&&!t.userTracking),T),T(e.autoplay&&!t.userTracking),zo((()=>{let r=!1,i=0,a=0;function l(e){t.userTracking=!1;const n=i/Math.abs(i);let o=0;!e&&Math.abs(i)>.2&&(o=.5*n);const r=b(d+o);e?S(t.current,"",0):(g="touch",t.current=r,S(r,"touch",0!==o?o:0===r&&y.value&&d>=1?1:0))}sp(o.value,(c=>{if(!e.disableTouch&&!u){if("start"===c.detail.state)return t.userTracking=!0,r=!1,s(),m=d,i=0,a=Date.now(),void w();if("end"===c.detail.state)return l(!1);if("cancel"===c.detail.state)return l(!0);if(t.userTracking){if(!r){r=!0;const n=Math.abs(c.detail.dx),o=Math.abs(c.detail.dy);if((n>=o&&e.vertical||n<=o&&!e.vertical)&&(t.userTracking=!1),!t.userTracking)return void(e.autoplay&&C())}return function(r){const s=a;a=Date.now();const l=n.value.length-t.displayMultipleItems;function c(e){return.5-.25/(e+.5)}function u(e,t){let n=m+e;i=.6*i+.4*t,y.value||(n<0||n>l)&&(n<0?n=-c(-n):n>l&&(n=l+c(n-l)),i=0),_(n)}const d=a-s||1,f=o.value;e.vertical?u(-r.dy/f.offsetHeight,-r.ddy/d):u(-r.dx/f.offsetWidth,-r.ddx/d)}(c.detail),!1}}}),!0)})),Ko((()=>{s(),cancelAnimationFrame(l)})),{onSwiperDotClick:function(e){S(t.current=e,g="click",y.value?1:0)},circularEnabled:y,swiperEnabled:v}}const $p=iu({name:"Swiper",props:{indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:""},indicatorActiveColor:{type:String,default:""},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1},navigation:{type:[Boolean,String],default:!1},navigationColor:{type:String,default:"#fff"},navigationActiveColor:{type:String,default:"rgba(53, 53, 53, 0.6)"}},emits:["change","transition","animationfinish","update:current","update:currentItemId"],setup(e,{slots:t,emit:n}){const o=an(null),r=lu(o,n),i=an(null),s=an(null),a=function(e){return qt({interval:$i((()=>{const t=Number(e.interval);return isNaN(t)?5e3:t})),duration:$i((()=>{const t=Number(e.duration);return isNaN(t)?500:t})),displayMultipleItems:$i((()=>{const t=Math.round(e.displayMultipleItems);return isNaN(t)?1:t})),current:Math.round(e.current)||0,currentItemId:e.currentItemId,userTracking:!1})}(e),l=$i((()=>{let t={};return(e.nextMargin||e.previousMargin)&&(t=e.vertical?{left:0,right:0,top:dc(e.previousMargin,!0),bottom:dc(e.nextMargin,!0)}:{top:0,bottom:0,left:dc(e.previousMargin,!0),right:dc(e.nextMargin,!0)}),t})),c=$i((()=>{const t=Math.abs(100/a.displayMultipleItems)+"%";return{width:e.vertical?"100%":t,height:e.vertical?t:"100%"}}));let u=[];const d=[],f=an([]);function h(){const e=[];for(let t=0;tn===e.rootRef.value));o&&e.push(Zt(o))}f.value=e}Cr("addSwiperContext",(function(e){d.push(e),h()}));Cr("removeSwiperContext",(function(e){const t=d.indexOf(e);t>=0&&(d.splice(t,1),h())}));const{onSwiperDotClick:p,circularEnabled:m,swiperEnabled:g}=Pp(e,a,f,s,n,r);let v=()=>null;return v=Ip(o,e,a,p,f,m,g),()=>{const n=t.default&&t.default();return u=ep(n),ui("uni-swiper",{ref:o},[ui("div",{ref:i,class:"uni-swiper-wrapper"},[ui("div",{class:"uni-swiper-slides",style:l.value},[ui("div",{ref:s,class:"uni-swiper-slide-frame",style:c.value},[n],4)],4),e.indicatorDots&&ui("div",{class:["uni-swiper-dots",e.vertical?"uni-swiper-dots-vertical":"uni-swiper-dots-horizontal"]},[f.value.map(((t,n,o)=>ui("div",{onClick:()=>p(n),class:{"uni-swiper-dot":!0,"uni-swiper-dot-active":n=a.current||n{let a=!1,l=!1,u=!1,d=an(!1);function f(e,n){const o=e.currentTarget;o&&(o.style.backgroundColor="over"===n?t.navigationActiveColor:"")}ro((()=>{a="auto"===t.navigation,d.value=!0!==t.navigation||a,_()})),ro((()=>{const e=r.value.length,t=!i.value;l=0===n.current&&t,u=n.current===e-1&&t||t&&n.current+n.displayMultipleItems>=e,s.value||(l=!0,u=!0,a&&(d.value=!0))}));const h={onMouseover:e=>f(e,"over"),onMouseout:e=>f(e,"out")};function p(e,t,s){if(e.stopPropagation(),s)return;const a=r.value.length;let l=n.current;switch(t){case"prev":l--,l<0&&i.value&&(l=a-1);break;case"next":l++,l>=a&&i.value&&(l=0)}o(l)}const m=()=>gc("M21.781 7.844l-9.063 8.594 9.063 8.594q0.25 0.25 0.25 0.609t-0.25 0.578q-0.25 0.25-0.578 0.25t-0.578-0.25l-9.625-9.125q-0.156-0.125-0.203-0.297t-0.047-0.359q0-0.156 0.047-0.328t0.203-0.297l9.625-9.125q0.25-0.25 0.578-0.25t0.578 0.25q0.25 0.219 0.25 0.578t-0.25 0.578z",t.navigationColor,26);let g;const v=n=>{clearTimeout(g);const{clientX:o,clientY:r}=n,{left:i,right:s,top:a,bottom:l,width:c,height:u}=e.value.getBoundingClientRect();let f=!1;if(f=t.vertical?!(r-a{d.value=f}),300);d.value=f},y=()=>{d.value=!0};function _(){e.value&&(e.value.removeEventListener("mousemove",v),e.value.removeEventListener("mouseleave",y),a&&(e.value.addEventListener("mousemove",v),e.value.addEventListener("mouseleave",y)))}return zo(_),function(){const e={"uni-swiper-navigation-hide":d.value,"uni-swiper-navigation-vertical":t.vertical};return t.navigation?ui(Yr,null,[ui("div",vi({class:["uni-swiper-navigation uni-swiper-navigation-prev",c({"uni-swiper-navigation-disabled":l},e)],onClick:e=>p(e,"prev",l)},h),[m()],16,["onClick"]),ui("div",vi({class:["uni-swiper-navigation uni-swiper-navigation-next",c({"uni-swiper-navigation-disabled":u},e)],onClick:e=>p(e,"next",u)},h),[m()],16,["onClick"])]):null}},Rp=iu({name:"SwiperItem",props:{itemId:{type:String,default:""}},setup(e,{slots:t}){const n=an(null),o={rootRef:n,getItemId:()=>e.itemId,getBoundingClientRect:()=>n.value.getBoundingClientRect(),updatePosition(e,t){const o=t?"0":100*e+"%",r=t?100*e+"%":"0",i=n.value,s=`translate(${o},${r}) translateZ(0)`;i&&(i.style.webkitTransform=s,i.style.transform=s)}};return zo((()=>{const e=Tr("addSwiperContext");e&&e(o)})),Ko((()=>{const e=Tr("removeSwiperContext");e&&e(o)})),()=>ui("uni-swiper-item",{ref:n,style:{position:"absolute",width:"100%",height:"100%"}},[t.default&&t.default()],512)}}),Bp={ensp:" ",emsp:" ",nbsp:" "};function Np(e,t){return function(e,{space:t,decode:n}){let o="",r=!1;for(let i of e)t&&Bp[t]&&" "===i&&(i=Bp[t]),r?(o+="n"===i?"\n":"\\"===i?"\\":"\\"+i,r=!1):"\\"===i?r=!0:o+=i;return n?o.replace(/ /g,Bp.nbsp).replace(/ /g,Bp.ensp).replace(/ /g,Bp.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"):o}(e,t).split("\n")}const Dp=iu({name:"Text",props:{selectable:{type:[Boolean,String],default:!1},space:{type:String,default:""},decode:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=an(null);return()=>{const o=[];return t.default&&t.default().forEach((t=>{if(8&t.shapeFlag&&t.type!==Xr){let n=[];n=Np(t.children,{space:e.space,decode:e.decode});const r=n.length-1;n.forEach(((e,t)=>{(0!==t||e)&&o.push(fi(e)),t!==r&&o.push(ui("br"))}))}else o.push(t)})),ui("uni-text",{ref:n,selectable:!!e.selectable||null},[ui("span",null,o)],8,["selectable"])}}}),jp=c({},Hh,{placeholderClass:{type:String,default:"input-placeholder"},autoHeight:{type:[Boolean,String],default:!1},confirmType:{type:String,default:"return",validator:e=>Vp.concat("return").includes(e)}});let Fp=!1;const Vp=["done","go","next","search","send"];const Hp=iu({name:"Textarea",props:jp,emits:["confirm","change","linechange",...Wh],setup(e,{emit:t,expose:n}){const o=an(null),r=an(null),{fieldRef:i,state:s,scopedAttrsState:a,fixDisabledColor:l,trigger:c}=Yh(e,o,t),u=$i((()=>s.value.split("\n"))),d=$i((()=>Vp.includes(e.confirmType))),f=an(0),h=an(null);function p({height:e}){f.value=e}function m(e){}function g(e){"Enter"===e.key&&d.value&&e.preventDefault()}function v(t){if("Enter"===t.key&&d.value){!function(e){c("confirm",e,{value:s.value})}(t);const n=t.target;!e.confirmHold&&n.blur()}}return so((()=>f.value),(t=>{const n=o.value,i=h.value,s=r.value;let a=parseFloat(getComputedStyle(n).lineHeight);isNaN(a)&&(a=i.offsetHeight);var l=Math.round(t/a);c("linechange",{},{height:t,heightRpx:750/window.innerWidth*t,lineCount:l}),e.autoHeight&&(s.style.height=t+"px")})),function(){const e="(prefers-color-scheme: dark)";Fp=0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&window.matchMedia(e).media!==e}(),n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),s.value=e.value}}),()=>{let t=e.disabled&&l?ui("textarea",{key:"disabled-textarea",ref:i,value:s.value,tabindex:"-1",readonly:!!e.disabled,maxlength:s.maxlength,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":Fp},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onFocus:e=>e.target.blur()},null,46,["value","readonly","maxlength","onFocus"]):ui("textarea",{key:"textarea",ref:i,value:s.value,disabled:!!e.disabled,maxlength:s.maxlength,enterkeyhint:e.confirmType,inputmode:e.inputmode,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":Fp},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onKeydown:g,onKeyup:v,onChange:m},null,46,["value","disabled","maxlength","enterkeyhint","inputmode","onKeydown","onKeyup","onChange"]);return ui("uni-textarea",{ref:o,"auto-height":e.autoHeight},[ui("div",{ref:r,class:"uni-textarea-wrapper"},[fo(ui("div",vi(a.attrs,{style:e.placeholderStyle,class:["uni-textarea-placeholder",e.placeholderClass]}),[e.placeholder],16),[[ts,!s.value.length]]),ui("div",{ref:h,class:"uni-textarea-line"},[" "],512),ui("div",{class:{"uni-textarea-compute":!0,"uni-textarea-compute-auto-height":e.autoHeight}},[u.value.map((e=>ui("div",null,[e.trim()?e:"."]))),ui(vh,{initial:!0,onResize:p},null,8,["initial","onResize"])],2),"search"===e.confirmType?ui("form",{action:"",onSubmit:()=>!1,class:"uni-input-form"},[t],40,["onSubmit"]):t],512)],8,["auto-height"])}}}),Wp=iu({name:"View",props:c({},cu),setup(e,{slots:t}){const n=an(null),{hovering:o,binding:r}=uu(e);return()=>{const i=e.hoverClass;return i&&"none"!==i?ui("uni-view",vi({class:o.value?i:"",ref:n},r),[tr(t,"default")],16):ui("uni-view",{ref:n},[tr(t,"default")],512)}}});function qp(e,t,n,o){g(t)&&Ho(e,t.bind(n),o)}function zp(e,t,n){const o=e.mpType||n.$mpType;if(o&&"component"!==o&&("page"!==o||"component"!==t.renderer)&&(Object.keys(e).forEach((o=>{if(function(e,t,n=!0){return!(n&&!g(t))&&(Oe.indexOf(e)>-1||0===e.indexOf("on"))}(o,e[o],!1)){const r=e[o];h(r)?r.forEach((e=>qp(o,e,n,t))):qp(o,r,n,t)}})),"page"===o)){t.__isVisible=!0;try{let e=t.attrs.__pageQuery;0,kc(n,"onLoad",e),t.vapor||delete t.attrs.__pageQuery;const o=n.$page;"preloadPage"!==(null==o?void 0:o.openType)&&kc(n,"onShow")}catch(r){console.error(r.message+"\n"+r.stack)}}}function Yp(e,t,n){zp(e,t,n)}function Up(e,t,n){return e[t]=n}function Xp(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function Kp(e){const t=e.config.errorHandler;return function(n,o,r){t&&t(n,o,r);const i=e._instance;if(!i||!i.proxy)throw n;i.onError?kc(i.proxy,"onError",n):wn(n,0,o&&o.$.vnode,!1)}}function Gp(e,t){return e?[...new Set([].concat(e,t))]:t}function Jp(e){const t=e.config;var n;t.errorHandler=Le(e,Kp),n=t.optionMergeStrategies,Oe.forEach((e=>{n[e]=Gp}));const o=t.globalProperties;o.$set=Up,o.$applyOptions=Yp,o.$callMethod=Xp,function(e){Me.forEach((t=>t(e)))}(e)}function Qp(e){const t=ll({history:tm(),strict:!!__uniConfig.router.strict,routes:__uniRoutes,scrollBehavior:em});t.beforeEach(((e,t)=>{var n;e&&t&&e.meta.isTabBar&&t.meta.isTabBar&&(n=t.meta.tabBarIndex,"undefined"!=typeof window&&(Zp[n]={left:window.pageXOffset,top:window.pageYOffset}))})),e.router=t,e.use(t)}let Zp=Object.create(null);const em=(e,t,n)=>{if(n)return n;if(e&&t&&e.meta.isTabBar&&t.meta.isTabBar){const t=(o=e.meta.tabBarIndex,Zp[o]);if(t)return t}return{left:0,top:0};var o};function tm(){let{routerBase:e}=__uniConfig.router;"/"===e&&(e="");const t=(n=e,(n=location.host?n||location.pathname+location.search:"").includes("#")||(n+="#"),Sa(n));var n;return t.listen(((e,t,n)=>{"back"===n.direction&&function(e=1){const t=$f(),n=t.length-1,o=n-e;for(let r=n;r>o;r--){const e=Tf(t[r]);If(Nf(e.path,e.id),!1)}}(Math.abs(n.delta))})),t}const nm={install(e){Jp(e),Wc(e),eu(e),e.config.warnHandler||(e.config.warnHandler=om),Qp(e)}};function om(e,t,n){if(t){if("PageMetaHead"===t.$.type.name)return;const e=t.$.parent;if(e&&"PageMeta"===e.type.name)return}const o=[`[Vue warn]: ${e}`];n.length&&o.push("\n",n),console.warn(...o)}const rm={class:"uni-async-loading"},im=ui("i",{class:"uni-loading"},null,-1),sm=su({name:"AsyncLoading",render:()=>(Qr(),oi("div",rm,[im]))});function am(){window.location.reload()}const lm=su({name:"AsyncError",props:["error"],setup(){Sl();const{t:e}=wl();return()=>ui("div",{class:"uni-async-error",onClick:am},[e("uni.async.error")],8,["onClick"])}});let cm;function um(){return cm}function dm(e){cm=e,Object.defineProperty(cm.$.ctx,"$children",{get:()=>$f().map((e=>e.$vm))});const t=cm.$.appContext.app;t.component(sm.name)||t.component(sm.name,sm),t.component(lm.name)||t.component(lm.name,lm),function(e){e.$vm=e,e.$mpType="app";const t=an(wl().getLocale());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(cm),function(e,t){const n=e.$options||{};n.globalData=c(n.globalData||{},t),Object.defineProperty(e,"globalData",{get:()=>n.globalData,set(e){n.globalData=e}})}(cm),Qc(),$c()}function fm(e,{type:t,clone:n,init:o,setup:r,before:i,options:s}){n&&(e=c({},e)),i&&i(e);const a=e.setup;return e.setup=(e,t)=>{const n=xi();if(o(n.proxy),r(n),a)return a(e,t)},e}function hm(e,t){return e&&(e.__esModule||"Module"===e[Symbol.toStringTag])?fm(e.default,t):fm(e,t)}function pm(e,t){return hm(e,{type:"page",clone:!0,init:Bf,setup(e){e.$pageInstance=e;const t=Su(),n=xe(t.query);e.attrs.__pageQuery=n,Tf(e.proxy).options=n,e.proxy.options=n;const o=wu();var r;Sf(),e.onReachBottom=qt([]),e.onPageScroll=qt([]),so([e.onReachBottom,e.onPageScroll],(()=>{const t=yc();e.proxy===t&&Yf(e,o)}),{once:!0}),qo((()=>{Ff(e,o)})),zo((()=>{Vf(e);const{onReady:n}=e;n&&I(n),ym(t)})),Bo((()=>{if(!e.__isVisible){Ff(e,o),e.__isVisible=!0;const{onShow:n}=e;n&&I(n),An((()=>{ym(t)}))}}),"ba",r),function(e,t){Bo(e,"bda",t)}((()=>{if(e.__isVisible&&!e.__isUnload){e.__isVisible=!1;{const{onHide:t}=e;t&&I(t)}}}));const i=Tc(e.proxy);return function(e,t){tv.subscribe($l(e,"invokeViewApi"),Il)}(i),Xo((()=>{!function(e){tv.unsubscribe($l(e,"invokeViewApi")),Object.keys(Pl).forEach((t=>{0===t.indexOf(e+".")&&delete Pl[t]}))}(i)})),n}})}function mm(){const{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}=Lm(),r=90===Math.abs(Number(window.orientation))?"landscape":"portrait";nv.emit("onResize",{deviceOrientation:r,size:{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}})}function gm(e){S(e.data)&&"WEB_INVOKE_APPSERVICE"===e.data.type&&nv.emit("onWebInvokeAppService",e.data.data,e.data.pageId)}function vm(){const{emit:e}=nv;"visible"===document.visibilityState?e("onAppEnterForeground",c({},gh)):e("onAppEnterBackground")}function ym(e){const{tabBarText:t,tabBarIndex:n,route:o}=e.meta;t&&kc("onTabItemTap",{index:n,text:t,pagePath:o})}const _m=navigator.cookieEnabled&&(window.localStorage||window.sessionStorage)||{};let bm;function wm(){if(bm=bm||_m.__DC_STAT_UUID,!bm){bm=Date.now()+""+Math.floor(1e7*Math.random());try{_m.__DC_STAT_UUID=bm}catch(e){}}return bm}function xm(){if(!0!==__uniConfig.darkmode)return v(__uniConfig.darkmode)?__uniConfig.darkmode:"light";try{return window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}catch(e){return"light"}}function Sm(){let e,t="0",n="",o="phone";const r=navigator.language;if(Jf){e="iOS";const o=Kf.match(/OS\s([\w_]+)\slike/);o&&(t=o[1].replace(/_/g,"."));const r=t.split(".")[0];if(Number(r)>=18){const e=Kf.match(/Version\/([\d\.]+)/);e&&(t=e[1])}const i=Kf.match(/\(([a-zA-Z]+);/);i&&(n=i[1])}else if(Gf){e="Android";const o=Kf.match(/Android[\s/]([\w\.]+)[;\s]/);o&&(t=o[1]);const r=Kf.match(/\((.+?)\)/),i=r?r[1].split(";"):Kf.split(" "),s=[/\bAndroid\b/i,/\bLinux\b/i,/\bU\b/i,/^\s?[a-z][a-z]$/i,/^\s?[a-z][a-z]-[a-z][a-z]$/i,/\bwv\b/i,/\/[\d\.,]+$/,/^\s?[\d\.,]+$/,/\bBrowser\b/i,/\bMobile\b/i];for(let e=0;e0){n=t.split("Build")[0].trim();break}let o;for(let e=0;e-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Edge")>-1&&!t,o=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);const t=parseFloat(RegExp.$1);return t>6?t:6}return n?-1:o?11:-1}());if("-1"!==l)a="IE";else{const e=["Version","Firefox","Chrome","Edge{0,1}"],t=["Safari","Firefox","Chrome","Edge"];for(let n=0;n{const e=window.devicePixelRatio,t=oh(),n=rh(t),o=ih(t,n),r=function(e,t){return e?Math[t?"min":"max"](screen.height,screen.width):screen.height}(t,n),i=sh();let s=window.innerHeight;const a=nc.top,l={left:nc.left,right:i-nc.right,top:nc.top,bottom:s-nc.bottom,width:i-nc.left-nc.right,height:s-nc.top-nc.bottom},{top:c,bottom:u}=ac();return s-=c,s-=u,{windowTop:c,windowBottom:u,windowWidth:i,windowHeight:s,pixelRatio:e,screenWidth:o,screenHeight:r,statusBarHeight:a,safeArea:l,safeAreaInsets:{top:nc.top,right:nc.right,bottom:nc.bottom,left:nc.left},screenTop:r-s}}));let Tm,km=!0;function Em(){km&&(Tm=Sm())}const Om=ed(0,(()=>{Em();const{deviceBrand:e,deviceModel:t,brand:n,model:o,platform:r,system:i,deviceOrientation:s,deviceType:a,osname:l,osversion:u}=Tm;return c({brand:n,deviceBrand:e,deviceModel:t,devicePixelRatio:window.devicePixelRatio,deviceId:wm(),deviceOrientation:s,deviceType:a,model:o,osName:l?l.toLowerCase():void 0,osVersion:u,platform:r,system:i})})),Mm=ed(0,(()=>{Em();const{theme:e,language:t,browserName:n,browserVersion:o}=Tm;return c({appId:__uniConfig.appId,appName:__uniConfig.appName,appVersion:__uniConfig.appVersion,appVersionCode:__uniConfig.appVersionCode,appLanguage:Ed?Ed():t,enableDebug:!1,hostSDKVersion:void 0,hostPackageName:void 0,hostFontSizeSetting:void 0,hostName:n,hostVersion:o,hostTheme:e,hostLanguage:t,isUniAppX:!1,language:t,SDKVersion:"",theme:e,uniPlatform:"web",uniCompileVersion:__uniConfig.compilerVersion,uniCompilerVersion:__uniConfig.compilerVersion,uniRuntimeVersion:__uniConfig.compilerVersion,version:""},{})})),Lm=ed(0,(()=>{km=!0,Em(),km=!1;const e=Cm(),t=Om(),n=Mm();km=!0;const{ua:o,browserName:r,browserVersion:i,osname:s,osversion:a}=Tm,l=c(e,t,n,{browserName:r,browserVersion:i,fontSizeSetting:void 0,osName:s.toLowerCase(),osVersion:a,osLanguage:void 0,osTheme:void 0,ua:o,uniPlatform:"web",uniCompileVersion:__uniConfig.compilerVersion,uniRuntimeVersion:__uniConfig.compilerVersion});return delete l.screenTop,delete l.enableDebug,__uniConfig.darkmode||delete l.theme,l})),Am=td("getSystemInfo",((e,{resolve:t})=>t(Lm())));const Pm=td("setClipboardData",((e,t)=>{return n=void 0,o=[e,t],r=function*({data:e},{resolve:t,reject:n}){try{yield navigator.clipboard.writeText(e),t()}catch(o){!function(e,t,n){const o=document.getElementById("#clipboard");o&&o.remove();const r=document.createElement("textarea");r.setAttribute("inputmode","none"),r.id="#clipboard",r.style.position="fixed",r.style.top="-9999px",r.style.zIndex="-9999",document.body.appendChild(r),r.value=e,r.select(),r.setSelectionRange(0,r.value.length);const i=document.execCommand("Copy",!1);r.blur(),i?t():n()}(e,t,n)}},new Promise(((e,t)=>{var i=e=>{try{a(r.next(e))}catch(n){t(n)}},s=e=>{try{a(r.throw(e))}catch(n){t(n)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,s);a((r=r.apply(n,o)).next())}));var n,o,r}),0,Nd);const $m=ed(0,((e,t)=>{const n=typeof t,o="string"===n?t:JSON.stringify({type:n,data:t});localStorage.setItem(e,o)}));function Im(e){const t=localStorage&&localStorage.getItem(e);if(!v(t))throw new Error("data not found");let n=t;try{const e=function(e){const t=["object","string","number","boolean","undefined"];try{const n=v(e)?JSON.parse(e):e,o=n.type;if(t.indexOf(o)>=0){const e=Object.keys(n);if(2===e.length&&"data"in n){if(typeof n.data===o)return n.data;if("object"===o&&/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/.test(n.data))return new Date(n.data)}else if(1===e.length)return""}}catch(n){}}(JSON.parse(t));void 0!==e&&(n=e)}catch(o){}return n}const Rm=ed(0,(e=>{try{return Im(e)}catch(t){return""}})),Bm=ed(0,(e=>{localStorage&&localStorage.removeItem(e)})),Nm=ed(0,(()=>{localStorage&&localStorage.clear()})),Dm={image:{jpg:"jpeg",jpe:"jpeg",pbm:"x-portable-bitmap",pgm:"x-portable-graymap",pnm:"x-portable-anymap",ppm:"x-portable-pixmap",psd:"vnd.adobe.photoshop",pic:"x-pict",rgb:"x-rgb",svg:"svg+xml",svgz:"svg+xml",tif:"tiff",xif:"vnd.xiff",wbmp:"vnd.wap.wbmp",wdp:"vnd.ms-photo",xbm:"x-xbitmap",ico:"x-icon"},video:{"3g2":"3gpp2","3gp":"3gpp",avi:"x-msvideo",f4v:"x-f4v",flv:"x-flv",jpgm:"jpm",jpgv:"jpeg",m1v:"mpeg",m2v:"mpeg",mpe:"mpeg",mpg:"mpeg",mpg4:"mpeg",m4v:"x-m4v",mkv:"x-matroska",mov:"quicktime",qt:"quicktime",movie:"x-sgi-movie",mp4v:"mp4",ogv:"ogg",smv:"x-smv",wm:"x-ms-wm",wmv:"x-ms-wmv",wmx:"x-ms-wmx",wvx:"x-ms-wvx"}};function jm({count:e,sourceType:t,type:n,extension:o}){Ih();const r=document.createElement("input");return r.type="file",function(e,t){for(const n in t)e.style[n]=t[n]}(r,{position:"absolute",visibility:"hidden",zIndex:"-999",width:"0",height:"0",top:"0",left:"0"}),r.accept=o.map((e=>{if("all"!==n){const t=e.replace(".","");return`${n}/${Dm[n][t]||t}`}return function(){const e=window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i);return!(!e||"micromessenger"!==e[0])}()?".":0===e.indexOf(".")?e:`.${e}`})).join(","),e&&e>1&&(r.multiple=!0),"all"!==n&&t instanceof Array&&1===t.length&&"camera"===t[0]&&r.setAttribute("capture","camera"),r}let Fm=null;const Vm=td("chooseFile",(({count:e,sourceType:t,type:n,extension:o},{resolve:r,reject:i})=>{El();const{t:s}=wl();Fm&&(document.body.removeChild(Fm),Fm=null),Fm=jm({count:e,sourceType:t,type:n,extension:o}),document.body.appendChild(Fm),Fm.addEventListener("cancel",(()=>{i("chooseFile:fail cancel")})),Fm.addEventListener("change",(function(t){const n=t.target,o=[];if(n&&n.files){const t=n.files.length;for(let r=0;r(i=i||hh(t),i)}),re))},tempFiles:o})})),Fm.click(),Rh()||console.warn(s("uni.chooseFile.notUserActivation"))}),0,Vd);let Hm=null;const Wm=td("chooseImage",(({count:e,sourceType:t,extension:n},{resolve:o,reject:r})=>{El();const{t:i}=wl();Hm&&(document.body.removeChild(Hm),Hm=null),Hm=jm({count:e,sourceType:t,extension:n,type:"image"}),document.body.appendChild(Hm),Hm.addEventListener("cancel",(()=>{r("chooseImage:fail cancel")})),Hm.addEventListener("change",(function(t){const n=t.target,r=[];if(n&&n.files){const t=n.files.length;for(let o=0;o(i=i||hh(t),i)}),oe))},tempFiles:r})})),Hm.click(),Rh()||console.warn(i("uni.chooseFile.notUserActivation"))}),0,Dd),qm={esc:["Esc","Escape"],enter:["Enter"]},zm=Object.keys(qm);function Ym(){const e=an(""),t=an(!1),n=n=>{if(t.value)return;const o=zm.find((e=>-1!==qm[e].indexOf(n.key)));o&&(e.value=o),An((()=>e.value=""))};return zo((()=>{document.addEventListener("keyup",n)})),Xo((()=>{document.removeEventListener("keyup",n)})),{key:e,disable:t}}const Um=ui("div",{class:"uni-mask"},null,-1);function Xm(e,t,n){return t.onClose=(...e)=>(t.visible=!1,n.apply(null,e)),Ls(To({setup:()=>()=>(Qr(),oi(e,t,null,16))}))}function Km(e){let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.append(t)),t}function Gm(e,{onEsc:t,onEnter:n}){const o=an(e.visible),{key:r,disable:i}=Ym();return so((()=>e.visible),(e=>o.value=e)),so((()=>o.value),(e=>i.value=!e)),ro((()=>{const{value:e}=r;"esc"===e?t&&t():"enter"===e&&n&&n()})),o}let Jm=0,Qm="";function Zm(e){let t=Jm;Jm+=e?1:-1,Jm=Math.max(0,Jm),Jm>0?0===t&&(Qm=document.body.style.overflow,document.body.style.overflow="hidden"):(document.body.style.overflow=Qm,Qm="")}const eg=su({name:"ImageView",props:{src:{type:String,default:""}},setup(e){const t=qt({direction:"none"});let n=1,o=0,r=0,i=0,s=0;function a({detail:e}){n=e.scale}function l(e){const t=e.target.getBoundingClientRect();o=t.width,r=t.height}function c(e){const t=e.target.getBoundingClientRect();i=t.width,s=t.height,d(e)}function u(e){const a=n*o>i,l=n*r>s;t.direction=a&&l?"all":a?"horizontal":l?"vertical":"none",d(e)}function d(e){"all"!==t.direction&&"horizontal"!==t.direction||e.stopPropagation()}return()=>{const n={position:"absolute",left:"0",top:"0",width:"100%",height:"100%"};return ui(tp,{style:n,onTouchstart:au(c),onTouchmove:au(d),onTouchend:au(u)},{default:()=>[ui(pp,{style:n,direction:t.direction,inertia:!0,scale:!0,"scale-min":"1","scale-max":"4",onScale:a},{default:()=>[ui("img",{src:e.src,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",maxHeight:"100%",maxWidth:"100%"},onLoad:l},null,40,["src","onLoad"])]},8,["style","direction","inertia","scale","onScale"])]},8,["style","onTouchstart","onTouchmove","onTouchend"])}}});function tg(e){let t="number"==typeof e.current?e.current:e.urls.indexOf(e.current);return t=t<0?0:t,t}const ng=su({name:"ImagePreview",props:{urls:{type:Array,default:()=>[]},current:{type:[Number,String],default:0}},emits:["close"],setup(e,{emit:t}){zo((()=>Zm(!0))),Ko((()=>Zm(!1)));const{key:n}=Ym(),o=an(null),r=an(tg(e));let i;function s(){i||An((()=>{t("close")}))}function a(e){r.value=e.detail.current}so((()=>e.current),(()=>r.value=tg(e))),so((()=>n.value),(e=>{"esc"===e&&s()})),zo((()=>{const e=o.value;let t=0,n=0;e.addEventListener("mousedown",(e=>{i=!1,t=e.clientX,n=e.clientY})),e.addEventListener("mouseup",(e=>{(Math.abs(e.clientX-t)>20||Math.abs(e.clientY-n)>20)&&(i=!0)}))}));const l={position:"absolute","box-sizing":"border-box",top:"0",right:"0",width:"60px",height:"44px",padding:"6px","line-height":"32px","font-size":"26px",color:"white","text-align":"center",cursor:"pointer"};return()=>{let t;return ui("div",{ref:o,style:{display:"block",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",zIndex:999,background:"rgba(0,0,0,0.8)"},onClick:s},[ui($p,{navigation:"auto",current:r.value,onChange:a,"indicator-dots":!1,autoplay:!1,style:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}},(n=t=e.urls.map((e=>ui(Rp,null,{default:()=>[ui(eg,{src:e},null,8,["src"])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!ri(n)?t:{default:()=>[t],_:1}),8,["current","onChange"]),ui("div",{style:l},[gc("M17.25 16.156l7.375-7.313q0.281-0.281 0.281-0.641t-0.281-0.641q-0.25-0.25-0.625-0.25t-0.625 0.25l-7.375 7.344-7.313-7.344q-0.25-0.25-0.625-0.25t-0.625 0.25q-0.281 0.25-0.281 0.625t0.281 0.625l7.313 7.344-7.375 7.344q-0.281 0.25-0.281 0.625t0.281 0.625q0.125 0.125 0.281 0.188t0.344 0.063q0.156 0 0.328-0.063t0.297-0.188l7.375-7.344 7.375 7.406q0.125 0.156 0.297 0.219t0.328 0.063q0.188 0 0.344-0.078t0.281-0.203q0.281-0.25 0.281-0.609t-0.281-0.641l-7.375-7.406z","#ffffff",26)],4)],8,["onClick"]);var n}}});let og,rg=null;const ig=()=>{rg=null,An((()=>{null==og||og.unmount(),og=null}))},sg=td("previewImage",((e,{resolve:t})=>{rg?c(rg,e):(rg=qt(e),An((()=>{og=Xm(ng,rg,ig),og.mount(Km("u-a-p"))}))),t()}),0,Hd);let ag=null;const lg=td("chooseVideo",(({sourceType:e,extension:t},{resolve:n,reject:o})=>{El();const{t:r}=wl();ag&&(document.body.removeChild(ag),ag=null),ag=jm({sourceType:e,extension:t,type:"video"}),document.body.appendChild(ag),ag.addEventListener("cancel",(()=>{o("chooseVideo:fail cancel")})),ag.addEventListener("change",(function(e){const t=e.target.files[0];let o="";const r={tempFilePath:o,tempFile:t,size:t.size,duration:0,width:0,height:0,name:t.name};Object.defineProperty(r,"tempFilePath",{get(){return o=o||hh(this.tempFile),o}});const i=document.createElement("video");if(void 0!==i.onloadedmetadata){const e=hh(t);i.onloadedmetadata=function(){ph(e),n(c(r,{duration:i.duration||0,width:i.videoWidth||0,height:i.videoHeight||0}))},setTimeout((()=>{i.onloadedmetadata=null,ph(e),n(r)}),300),i.src=e}else n(r)})),ag.click(),Rh()||console.warn(r("uni.chooseFile.notUserActivation"))}),0,jd),cg=Zu("request",(({url:e,data:t,header:n={},method:o,dataType:r,responseType:i,enableChunked:s,withCredentials:a,timeout:l=__uniConfig.networkTimeout.request},{resolve:c,reject:u})=>{let d=null;const h=function(e){const t=Object.keys(e).find((e=>"content-type"===e.toLowerCase()));if(!t)return;const n=e[t];if(!n)return"string";if(0===n.indexOf("application/json"))return"json";if(0===n.indexOf("application/x-www-form-urlencoded"))return"urlencoded";return"string"}(n);if("GET"!==o)if(v(t)||t instanceof ArrayBuffer)d=t;else if("json"===h)try{d=JSON.stringify(t)}catch(m){d=t.toString()}else if("urlencoded"===h){const e=[];for(const n in t)f(t,n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));d=e.join("&")}else d=t.toString();let p;if(s){if(void 0===typeof window.fetch||void 0===typeof window.AbortController)throw new Error("fetch or AbortController is not supported in this environment");const t=new AbortController,s=t.signal;p=new dg(t);const f={method:o,headers:n,body:d,signal:s,credentials:a?"include":"same-origin"},h=setTimeout((function(){p.abort(),u("timeout",{errCode:5})}),l);f.signal.addEventListener("abort",(function(){clearTimeout(h),u("abort",{errCode:600003})})),window.fetch(e,f).then((e=>{const t=e.status,n=e.headers,o=e.body,s={};n.forEach(((e,t)=>{s[t]=e}));const a=ug(s);if(p._emitter.emit("headersReceived",{header:s,statusCode:t,cookies:a}),!o)return void c({data:"",statusCode:t,header:s,cookies:a});const l=o.getReader(),u=[],d=()=>{l.read().then((({done:e,value:n})=>{if(e){const e=function(e){const t=e.reduce(((e,t)=>e+t.byteLength),0),n=new Uint8Array(t);let o=0;for(const r of e)n.set(new Uint8Array(r),o),o+=r.byteLength;return n.buffer}(u);let n="text"===i?(new TextDecoder).decode(e):e;return"text"===i&&(n=hg(n,i,r)),void c({data:n,statusCode:t,header:s,cookies:a})}const o=n;u.push(o),p._emitter.emit("chunkReceived",{data:o}),d()}))};d()}),(e=>{u(e,{errCode:5})}))}else{const t=new XMLHttpRequest;p=new dg(t),t.open(o,e);for(const e in n)f(n,e)&&t.setRequestHeader(e,n[e]);const s=setTimeout((function(){t.onload=t.onabort=t.onerror=null,p.abort(),u("timeout",{errCode:5})}),l);t.responseType=i,t.onload=function(){clearTimeout(s);const e=t.status;let n="text"===i?t.responseText:t.response;"text"===i&&(n=hg(n,i,r)),c({data:n,statusCode:e,header:fg(t.getAllResponseHeaders()),cookies:[]})},t.onabort=function(){clearTimeout(s),u("abort",{errCode:600003})},t.onerror=function(){clearTimeout(s),u(void 0,{errCode:5})},t.withCredentials=a,t.send(d)}return p}),0,Yd),ug=e=>{let t=e["Set-Cookie"]||e["set-cookie"],n=[];if(!t)return[];"["===t[0]&&"]"===t[t.length-1]&&(t=t.slice(1,-1));const o=t.split(";");for(let r=0;r{t===e&&(this._requestOnHeadersReceiveCallbacks.delete(n),this._emitter.off("headersReceived",e))}));const t=this._requestOnHeadersReceiveCallbacks.get(e);t&&(this._requestOnHeadersReceiveCallbacks.delete(e),this._emitter.off("headersReceived",t))}onChunkReceived(e){return this._emitter.on("chunkReceived",e),this._requestOnChunkReceiveCallbackId++,this._requestOnChunkReceiveCallbacks.set(this._requestOnChunkReceiveCallbackId,e),this._requestOnChunkReceiveCallbackId}offChunkReceived(e){if(null==e)return void this._emitter.off("chunkReceived");if("function"==typeof e)return void this._requestOnChunkReceiveCallbacks.forEach(((t,n)=>{t===e&&(this._requestOnChunkReceiveCallbacks.delete(n),this._emitter.off("chunkReceived",e))}));const t=this._requestOnChunkReceiveCallbacks.get(e);t&&(this._requestOnChunkReceiveCallbacks.delete(e),this._emitter.off("chunkReceived",t))}}function fg(e){const t={};return e.split("\n").forEach((e=>{const n=e.match(/(\S+\s*):\s*(.*)/);n&&3===n.length&&(t[n[1]]=n[2])})),t}function hg(e,t,n){let o=e;if("text"===t&&"json"===n)try{o=JSON.parse(o)}catch(r){}return o}class pg{constructor(e){this._callbacks=[],this._xhr=e}onProgressUpdate(e){g(e)&&this._callbacks.push(e)}offProgressUpdate(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}abort(){this._isAbort=!0,this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}const mg=Zu("uploadFile",(({url:e,file:t,filePath:n,name:o,files:r,header:i={},formData:s={},timeout:a=__uniConfig.networkTimeout.uploadFile},{resolve:l,reject:c})=>{var u=new pg;return h(r)&&r.length||(n||c("file error"),r=[{name:o,file:t,uri:n}]),Promise.all(r.map((({file:e,uri:t})=>e instanceof Blob?Promise.resolve(fh(e)):dh(t)))).then((function(t){var n,o=new XMLHttpRequest,d=new FormData;Object.keys(s).forEach((e=>{d.append(e,s[e])})),Object.values(r).forEach((({name:e},n)=>{const o=t[n];d.append(e||"file",o,o.name||`file-${Date.now()}`)})),o.open("POST",e),Object.keys(i).forEach((e=>{o.setRequestHeader(e,i[e])})),o.upload.onprogress=function(e){u._callbacks.forEach((t=>{var n=e.loaded,o=e.total;t({progress:Math.round(n/o*100),totalBytesSent:n,totalBytesExpectedToSend:o})}))},o.onerror=function(){clearTimeout(n),c("",{errCode:602001})},o.onabort=function(){clearTimeout(n),c("abort",{errCode:600003})},o.onload=function(){clearTimeout(n);const e=o.status,t=o.getAllResponseHeaders(),r=t?t.trim().split(/[\r\n]+/).reduce(((e,t)=>{const n=t.split(": "),o=n.shift(),r=n.join(": ");return e[o]=r,e}),{}):{};l({statusCode:e,data:o.responseText||o.response,header:r})},u._isAbort?c("abort",{errCode:600003}):(n=setTimeout((function(){o.upload.onprogress=o.onload=o.onabort=o.onerror=null,u.abort(),c("timeout",{errCode:5})}),a),o.send(d),u._xhr=o)})).catch((()=>{setTimeout((()=>{c("file error")}),0)})),u}),0,Ud),gg=[],vg={open:"",close:"",error:"",message:""};class yg{constructor(e,t,n){let o;this._callbacks={open:[],close:[],error:[],message:[]};try{const n=this._webSocket=new WebSocket(e,t);n.binaryType="arraybuffer";["open","close","error","message"].forEach((e=>{this._callbacks[e]=[],n.addEventListener(e,(t=>{const{data:n,code:o,reason:r}=t,i="message"===e?{data:n}:"close"===e?{code:o,reason:r}:{};if(this._callbacks[e].forEach((t=>{try{t(i)}catch(n){console.error(`thirdScriptError\n${n};at socketTask.on${A(e)} callback function\n`,n)}})),this===gg[0]&&vg[e]&&nv.invokeOnCallback(vg[e],i),"error"===e||"close"===e){const e=gg.indexOf(this);e>=0&&gg.splice(e,1)}}))}));["CLOSED","CLOSING","CONNECTING","OPEN","readyState"].forEach((e=>{Object.defineProperty(this,e,{get:()=>n[e]})}))}catch(r){o=r}n&&n(o,this)}send(e){const t=(e||{}).data,n=this._webSocket;try{if(n.readyState!==n.OPEN)throw pe(e,{errMsg:"sendSocketMessage:fail SocketTask.readyState is not OPEN",errCode:10002}),new Error("SocketTask.readyState is not OPEN");n.send(t),pe(e,"sendSocketMessage:ok")}catch(o){pe(e,{errMsg:`sendSocketMessage:fail ${o}`,errCode:602001})}}close(e={}){const t=this._webSocket;try{const n=e.code||1e3,o=e.reason;v(o)?t.close(n,o):t.close(n),pe(e,"closeSocket:ok")}catch(n){pe(e,`closeSocket:fail ${n}`)}}onOpen(e){this._callbacks.open.push(e)}onMessage(e){this._callbacks.message.push(e)}onError(e){this._callbacks.error.push(e)}onClose(e){this._callbacks.close.push(e)}}const _g=Zu("connectSocket",(({url:e,protocols:t},{resolve:n,reject:o})=>new yg(e,t,((e,t)=>{e?o(e.toString(),{errCode:600009}):(gg.push(t),n())}))),0,Xd),bg=td("navigateTo",(({url:e,events:t,isAutomatedTesting:n},{resolve:o,reject:r})=>{if(kf.handledBeforeEntryPageRoutes)return vf({type:"navigateTo",url:e,events:t,isAutomatedTesting:n}).then(o).catch(r);Ef.push({args:{type:"navigateTo",url:e,events:t,isAutomatedTesting:n},resolve:o,reject:r})}),0,Jd);function wg(e){__uniConfig.darkmode&&nv.on("onThemeChange",e)}function xg(e){nv.off("onThemeChange",e)}const Sg={light:{cancelColor:"#000000"},dark:{cancelColor:"rgb(170, 170, 170)"}},Cg=To({props:{title:{type:String,default:""},content:{type:String,default:""},showCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"Cancel"},cancelColor:{type:String,default:"#000000"},confirmText:{type:String,default:"OK"},confirmColor:{type:String,default:"#007aff"},visible:{type:Boolean},editable:{type:Boolean,default:!1},placeholderText:{type:String,default:""}},setup(e,{emit:t}){const n=an(""),o=()=>s.value=!1,r=()=>(o(),t("close","cancel")),i=()=>(o(),t("close","confirm",n.value)),s=Gm(e,{onEsc:r,onEnter:()=>{!e.editable&&i()}}),a=function(e){const t=an(e.cancelColor),n=({theme:e})=>{((e,t)=>{t.value=Sg[e].cancelColor})(e,t)};return ro((()=>{e.visible?(t.value=e.cancelColor,"#000"===e.cancelColor&&("dark"===xm()&&n({theme:"dark"}),wg(n))):xg(n)})),t}(e);return()=>{const{title:t,content:o,showCancel:l,confirmText:c,confirmColor:u,editable:d,placeholderText:f}=e;return n.value=o,ui(Vi,{name:"uni-fade"},{default:()=>[fo(ui("uni-modal",{onTouchmove:oc},[Um,ui("div",{class:"uni-modal"},[t?ui("div",{class:"uni-modal__hd"},[ui("strong",{class:"uni-modal__title",textContent:t||""},null,8,["textContent"])]):null,d?ui("textarea",{class:"uni-modal__textarea",rows:"1",placeholder:f,value:o,onInput:e=>n.value=e.target.value},null,40,["placeholder","value","onInput"]):ui("div",{class:"uni-modal__bd",onTouchmovePassive:rc,textContent:o},null,40,["onTouchmovePassive","textContent"]),ui("div",{class:"uni-modal__ft"},[l&&ui("div",{style:{color:a.value},class:"uni-modal__btn uni-modal__btn_default",onClick:r},[e.cancelText],12,["onClick"]),ui("div",{style:{color:u},class:"uni-modal__btn uni-modal__btn_primary",onClick:i},[c],12,["onClick"])])])],40,["onTouchmove"]),[[ts,s.value]])]})}}});let Tg;const kg=de((()=>{nv.on("onHidePopup",(()=>Tg.visible=!1))}));let Eg;function Og(e,t){const n="confirm"===e,o={confirm:n,cancel:"cancel"===e};n&&Tg.editable&&(o.content=t),Eg&&Eg(o)}const Mg=td("showModal",((e,{resolve:t})=>{kg(),Eg=t,Tg?(c(Tg,e),Tg.visible=!0):(Tg=qt(e),An((()=>(Xm(Cg,Tg,Og).mount(Km("u-a-m")),An((()=>Tg.visible=!0))))))}),0,sf),Lg={title:{type:String,default:""},icon:{default:"success",validator:e=>-1!==af.indexOf(e)},image:{type:String,default:""},duration:{type:Number,default:1500},mask:{type:Boolean,default:!1},visible:{type:Boolean}},Ag={light:"#fff",dark:"rgba(255,255,255,0.9)"},Pg=e=>Ag[e],$g=To({name:"Toast",props:Lg,setup(e){Cl(),Tl();const{Icon:t}=function(e){const t=an(Pg(xm())),n=({theme:e})=>t.value=Pg(e);ro((()=>{e.visible?wg(n):xg(n)}));return{Icon:$i((()=>{switch(e.icon){case"success":return ui(gc(pc,t.value,38),{class:"uni-toast__icon"});case"error":return ui(gc(mc,t.value,38),{class:"uni-toast__icon"});case"loading":return ui("i",{class:["uni-toast__icon","uni-loading"]},null,2);default:return null}}))}}(e),n=Gm(e,{});return()=>{const{mask:o,duration:r,title:i,image:s}=e;return ui(Vi,{name:"uni-fade"},{default:()=>[fo(ui("uni-toast",{"data-duration":r},[o?ui("div",{class:"uni-mask",style:"background: transparent;",onTouchmove:oc},null,40,["onTouchmove"]):"",s||t.value?ui("div",{class:"uni-toast"},[s?ui("img",{src:s,class:"uni-toast__icon"},null,10,["src"]):t.value,ui("p",{class:"uni-toast__content"},[i])]):ui("div",{class:"uni-sample-toast"},[ui("p",{class:"uni-simple-toast__text"},[i])])],8,["data-duration"]),[[ts,n.value]])]})}}});let Ig,Rg,Bg="";const Ng=je();function Dg(e){Ig?c(Ig,e):(Ig=qt(c(e,{visible:!1})),An((()=>{Ng.run((()=>{so([()=>Ig.visible,()=>Ig.duration],(([e,t])=>{if(e){if(Rg&&clearTimeout(Rg),"onShowLoading"===Bg)return;Rg=setTimeout((()=>{Wg("onHideToast")}),t)}else Rg&&clearTimeout(Rg)}))})),nv.on("onHidePopup",(()=>Wg("onHidePopup"))),Xm($g,Ig,(()=>{})).mount(Km("u-a-t"))}))),setTimeout((()=>{Ig.visible=!0}),10)}const jg=td("showToast",((e,{resolve:t,reject:n})=>{Dg(e),Bg="onShowToast",t()}),0,lf),Fg={icon:"loading",duration:1e8,image:""},Vg=td("showLoading",((e,{resolve:t,reject:n})=>{c(e,Fg),Dg(e),Bg="onShowLoading",t()}),0,rf),Hg=td("hideLoading",((e,{resolve:t,reject:n})=>{Wg("onHideLoading"),t()}));function Wg(e){const{t:t}=wl();if(!Bg)return;let n="";if("onHideToast"===e&&"onShowToast"!==Bg?n=t("uni.showToast.unpaired"):"onHideLoading"===e&&"onShowLoading"!==Bg&&(n=t("uni.showLoading.unpaired")),n)return console.warn(n);Bg="",setTimeout((()=>{Ig.visible=!1}),10)}function qg(e){function t(){var t;(t=e.navigationBar.titleText)&&t!==document.title&&(document.title=t),nv.emit("onNavigationBarChange",{titleText:t})}ro(t),Io(t)}const zg=su({name:"Layout",setup(e,{emit:t}){const n=an(null);lc({"--status-bar-height":"0px","--top-window-height":"0px","--window-left":"0px","--window-right":"0px","--window-margin":"0px","--tab-bar-height":"0px"});const o=function(){const e=cl();return{routeKey:$i((()=>Nf("/"+e.meta.route,Cu()))),isTabBar:$i((()=>e.meta.isTabBar)),routeCache:jf}}(),{layoutState:r,windowState:i}=function(){Su();{const e=qt({marginWidth:0,leftWindowWidth:0,rightWindowWidth:0});return so((()=>e.marginWidth),(e=>lc({"--window-margin":e+"px"}))),so((()=>e.leftWindowWidth+e.marginWidth),(e=>{lc({"--window-left":e+"px"})})),so((()=>e.rightWindowWidth+e.marginWidth),(e=>{lc({"--window-right":e+"px"})})),{layoutState:e,windowState:$i((()=>({})))}}}();!function(e,t){const n=Su();function o(){const o=document.body.clientWidth,r=$f();let i={};if(r.length>0){i=Tf(r[r.length-1]).meta}else{const e=Pc(n.path,!0);e&&(i=e.meta)}const s=parseInt(String((f(i,"maxWidth")?i.maxWidth:__uniConfig.globalStyle.maxWidth)||Number.MAX_SAFE_INTEGER));let a=!1;a=o>s,a&&s?(e.marginWidth=(o-s)/2,An((()=>{const e=t.value;e&&e.setAttribute("style","max-width:"+s+"px;margin:0 auto;")}))):(e.marginWidth=0,An((()=>{const e=t.value;e&&e.removeAttribute("style")})))}so([()=>n.path],o),zo((()=>{o(),window.addEventListener("resize",o)}))}(r,n);const s=function(e){const t=an(!1);return $i((()=>({"uni-app--showtabbar":e&&e.value,"uni-app--maxwidth":t.value})))}(!1);return()=>{const e=function(e,t,n,o,r,i){return function({routeKey:e,isTabBar:t,routeCache:n}){return ui(al,null,{default:Yn((({Component:o})=>[(Qr(),oi(Po,{matchBy:"key",cache:n},[(Qr(),oi(Zn(o),{type:t.value?"tabBar":"",key:e.value}))],1032,["cache"]))])),_:1})}(e)}(o);return ui("uni-app",{ref:n,class:s.value},[e,!1],2)}}});function Yg(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!ri(e)}function Ug(e){if(e.mode===Gg.TIME)return"00:00";if(e.mode===Gg.DATE){const t=(new Date).getFullYear()-150;switch(e.fields){case Jg.YEAR:return t.toString();case Jg.MONTH:return t+"-01";default:return t+"-01-01"}}return""}function Xg(e){if(e.mode===Gg.TIME)return"23:59";if(e.mode===Gg.DATE){const t=(new Date).getFullYear()+150;switch(e.fields){case Jg.YEAR:return t.toString();case Jg.MONTH:return t+"-12";default:return t+"-12-31"}}return""}function Kg(e,t,n,o){const r=e.mode===Gg.DATE?"-":":",i=e.mode===Gg.DATE?t.dateArray:t.timeArray;let s;if(e.mode===Gg.TIME)s=2;else switch(e.fields){case Jg.YEAR:s=1;break;case Jg.MONTH:s=2;break;default:s=3}const a=String(n).split(r);let l=[];for(let c=0;c=0&&(l=o?Kg(e,t,o):l.map((()=>0))),l}const Gg={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},Jg={YEAR:"year",MONTH:"month",DAY:"day"},Qg={PICKER:"picker",SELECT:"select"},Zg=iu({name:"Picker",compatConfig:{MODE:3},props:{name:{type:String,default:""},range:{type:Array,default:()=>[]},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:Gg.SELECTOR,validator:e=>Object.values(Gg).includes(e)},fields:{type:String,default:""},start:{type:String,default:e=>Ug(e)},end:{type:String,default:e=>Xg(e)},disabled:{type:[Boolean,String],default:!1},selectorType:{type:String,default:""}},emits:["change","cancel","columnchange"],setup(e,{emit:t,slots:n}){Ml();const{t:o}=wl(),r=an(null),i=an(null),s=an(null),a=an(null),l=an(!1),{state:u,rangeArray:d}=function(e){const t=qt({valueSync:void 0,visible:!1,contentVisible:!1,popover:null,valueChangeSource:"",timeArray:[],dateArray:[],valueArray:[],oldValueArray:[],isDesktop:!1,popupStyle:{content:{},triangle:{}}}),n=$i((()=>{let n=e.range;switch(e.mode){case Gg.SELECTOR:return[n];case Gg.MULTISELECTOR:return n;case Gg.TIME:return t.timeArray;case Gg.DATE:{const n=t.dateArray;switch(e.fields){case Jg.YEAR:return[n[0]];case Jg.MONTH:return[n[0],n[1]];default:return[n[0],n[1],n[2]]}}}return[]}));return{state:t,rangeArray:n}}(e),f=lu(r,t),{system:p,selectorTypeComputed:m,_show:g,_l10nColumn:v,_l10nItem:y,_input:_,_fixInputPosition:b,_pickerViewChange:w,_cancel:x,_change:S,_resetFormData:C,_getFormData:T,_createTime:k,_createDate:E,_setValueSync:O}=function(e,t,n,o,r,i,s){const a=function(){const e=an(!1);return e.value=(()=>0===String(navigator.vendor).indexOf("Apple")&&navigator.maxTouchPoints>0)(),e}(),l=function(){const e=an("");return e.value=(()=>{if(/win|mac/i.test(navigator.platform)){if("Google Inc."===navigator.vendor)return"chrome";if(/Firefox/.test(navigator.userAgent))return"firefox"}return""})(),e}(),c=$i((()=>{const t=e.selectorType;return Object.values(Qg).includes(t)?t:a.value?Qg.PICKER:Qg.SELECT})),u=$i((()=>e.mode===Gg.DATE&&!Object.values(Jg).includes(e.fields)&&t.isDesktop?l.value:"")),d=$i((()=>Kg(e,t,e.start,Ug(e)))),f=$i((()=>Kg(e,t,e.end,Xg(e))));function p(n){if(e.disabled)return;t.valueChangeSource="";let o=r.value,i=n.currentTarget;o.remove(),(document.querySelector("uni-app")||document.body).appendChild(o),o.style.display="block";const s=i.getBoundingClientRect();t.popover={top:s.top,left:s.left,width:s.width,height:s.height},setTimeout((()=>{t.visible=!0}),20)}function m(){return{value:t.valueSync,key:e.name}}function g(){switch(e.mode){case Gg.SELECTOR:t.valueSync=0;break;case Gg.MULTISELECTOR:t.valueSync=e.value.map((e=>0));break;case Gg.DATE:case Gg.TIME:t.valueSync=""}}function v(){let e=[],n=[];for(let t=0;t<24;t++)e.push((t<10?"0":"")+t);for(let t=0;t<60;t++)n.push((t<10?"0":"")+t);t.timeArray.push(e,n)}function y(){let t=(new Date).getFullYear(),n=t-150,o=t+150;if(e.start){const t=new Date(e.start).getFullYear();!isNaN(t)&&to&&(o=t)}return{start:n,end:o}}function _(){let e=[];const n=y();for(let t=n.start,i=n.end;t<=i;t++)e.push(String(t));let o=[];for(let t=1;t<=12;t++)o.push((t<10?"0":"")+t);let r=[];for(let t=1;t<=31;t++)r.push((t<10?"0":"")+t);t.dateArray.push(e,o,r)}function b(e){return 60*e[0]+e[1]}function w(e){const t=31;return e[0]*t*12+(e[1]||0)*t+(e[2]||0)}function x(e,t){for(let n=0;na?0:s)}}break;case Gg.TIME:case Gg.DATE:t.valueSync=String(n);break;default:{const e=Number(n);t.valueSync=e<0?0:e;break}}}function C(){let n,o=t.valueSync;switch(e.mode){case Gg.MULTISELECTOR:n=[...o];break;case Gg.TIME:n=Kg(e,t,o,he({mode:Gg.TIME}));break;case Gg.DATE:n=Kg(e,t,o,he({mode:Gg.DATE}));break;default:n=[o]}t.oldValueArray=[...n],t.valueArray=[...n]}function T(){let n=t.valueArray;switch(e.mode){case Gg.SELECTOR:return n[0];case Gg.MULTISELECTOR:return n.map((e=>e));case Gg.TIME:return t.valueArray.map(((e,n)=>t.timeArray[n][e])).join(":");case Gg.DATE:return t.valueArray.map(((e,n)=>t.dateArray[n][e])).join("-")}}function k(){O(),t.valueChangeSource="click";const e=T();t.valueSync=h(e)?e.map((e=>e)):e,n("change",{},{value:e})}function E(e){if("firefox"===u.value&&e){const{top:n,left:o,width:r,height:i}=t.popover,{pageX:s,pageY:a}=e;if(s>o&&sn&&a{let e=r.value;e.remove(),o.value.prepend(e),e.style.display="none"}),260)}function M(){e.mode===Gg.SELECTOR&&c.value===Qg.SELECT&&(i.value.scrollTop=34*t.valueArray[0])}function L(e){const n=e.target;t.valueSync=n.value,An((()=>{k()}))}function A(e){if("chrome"===u.value){const t=o.value.getBoundingClientRect(),n=32;s.value.style.left=e.clientX-t.left-1.5*n+"px",s.value.style.top=e.clientY-t.top-.5*n+"px"}}function P(e){t.valueArray=$(e.detail.value,!0)}function $(t,n){const{getLocale:o}=wl();if(e.mode===Gg.DATE){const r=o();if(!r.startsWith("zh"))switch(e.fields){case Jg.YEAR:return t;case Jg.MONTH:return[t[1],t[0]];default:switch(r){case"es":case"fr":return[t[2],t[1],t[0]];default:return n?[t[2],t[0],t[1]]:[t[1],t[2],t[0]]}}}return t}function I(t,n){const{getLocale:o}=wl();if(e.mode===Gg.DATE){const r=o();if(r.startsWith("zh")){return t+["年","月","日"][n]}if(e.fields!==Jg.YEAR&&n===(e.fields===Jg.MONTH||"es"!==r&&"fr"!==r?0:1)){let e;switch(r){case"es":e=["enero","febrero","marzo","abril","mayo","junio","​​julio","agosto","septiembre","octubre","noviembre","diciembre"];break;case"fr":e=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"];break;default:e=["January","February","March","April","May","June","July","August","September","October","November","December"]}return e[Number(t)-1]}}return t}return so((()=>t.visible),(e=>{e?(clearTimeout(ev),t.contentVisible=e,M()):ev=setTimeout((()=>{t.contentVisible=e}),300)})),so([()=>e.mode,()=>e.value,()=>e.range],S,{deep:!0}),so((()=>t.valueSync),C,{deep:!0}),so((()=>t.valueArray),(o=>{if(e.mode===Gg.TIME||e.mode===Gg.DATE){const n=e.mode===Gg.TIME?b:w,o=t.valueArray,r=d.value,i=f.value;if(e.mode===Gg.DATE){const e=t.dateArray,n=e[2].length,r=Number(e[2][o[2]])||1,i=new Date(`${e[0][o[0]]}/${e[1][o[1]]}/${r}`).getDate();in(i)&&x(o,i)}o.forEach(((o,r)=>{o!==t.oldValueArray[r]&&(t.oldValueArray[r]=o,e.mode===Gg.MULTISELECTOR&&n("columnchange",{},{column:r,value:o}))}))})),{selectorTypeComputed:c,system:u,_show:p,_cancel:E,_change:k,_l10nColumn:$,_l10nItem:I,_input:L,_resetFormData:g,_getFormData:m,_createTime:v,_createDate:_,_setValueSync:S,_fixInputPosition:A,_pickerViewChange:P}}(e,u,f,r,i,s,a);!function(e,t,n){const{key:o,disable:r}=Ym();ro((()=>{r.value=!e.visible})),so(o,(e=>{"esc"===e?t():"enter"===e&&n()}))}(u,x,S),function(e,t){const n=Tr(fu,!1);if(n){const o={reset:e,submit:()=>{const e=["",null],{key:n,value:o}=t();return""!==n&&(e[0]=n,e[1]=o),e}};n.addField(o),Xo((()=>{n.removeField(o)}))}}(C,T),k(),E(),O();const M=function(e){const t=an(0),n=an(0),o=$i((()=>t.value>=500&&n.value>=500)),r=$i((()=>{const t={content:{transform:"",left:"",top:"",bottom:""},triangle:{left:"",top:"",bottom:"","border-width":"","border-color":""}},r=t.content,i=t.triangle,s=e.popover;function a(e){return Number(e)||0}if(o.value&&s){c(i,{position:"absolute",width:"0",height:"0","margin-left":"-6px","border-style":"solid"});const e=a(s.left),t=a(s.width?s.width:300),o=a(s.top),l=a(s.height),u=e+t/2;r.transform="none !important";const d=Math.max(0,u-t/2);r.left=`${d}px`,s.width&&(r.width=`${t}px`);let f=Math.max(12,u-d);f=Math.min(t-12,f),i.left=`${f}px`;const h=n.value/2;o+l-h>h-o?(r.top="auto",r.bottom=n.value-o+6+"px",i.bottom="-6px",i["border-width"]="6px 6px 0 6px",i["border-color"]="#fcfcfd transparent transparent transparent"):(r.top=`${o+l+6}px`,i.top="-6px",i["border-width"]="0 6px 6px 6px",i["border-color"]="transparent transparent #fcfcfd transparent")}return t}));return zo((()=>{const e=()=>{const{windowWidth:e,windowHeight:o,windowTop:r}=Lm();t.value=e,n.value=o+(r||0)};window.addEventListener("resize",e),e(),Ko((()=>{window.removeEventListener("resize",e)}))})),{isDesktop:o,popupStyle:r}}(u);return ro((()=>{u.isDesktop=M.isDesktop.value,u.popupStyle=M.popupStyle.value})),Xo((()=>{i.value&&i.value.remove()})),zo((()=>{l.value=!0})),()=>{let t;const{visible:c,contentVisible:f,valueArray:h,popupStyle:C,valueSync:T}=u,{rangeKey:k,mode:E,start:O,end:M}=e,L=du(e,"disabled");return ui("uni-picker",vi({ref:r},L,{onClick:au(g)}),[l.value?ui("div",{ref:i,class:["uni-picker-container",`uni-${E}-${m.value}`],onWheel:oc,onTouchmove:oc},[ui(Vi,{name:"uni-fade"},{default:()=>[fo(ui("div",{class:"uni-mask uni-picker-mask",onClick:au(x),onMousemove:b},null,40,["onClick","onMousemove"]),[[ts,c]])]}),p.value?null:ui("div",{class:[{"uni-picker-toggle":c},"uni-picker-custom"],style:C.content},[ui("div",{class:"uni-picker-header",onClick:rc},[ui("div",{class:"uni-picker-action uni-picker-action-cancel",onClick:au(x)},[o("uni.picker.cancel")],8,["onClick"]),ui("div",{class:"uni-picker-action uni-picker-action-confirm",onClick:S},[o("uni.picker.done")],8,["onClick"])],8,["onClick"]),f?ui(wp,{value:v(h),class:"uni-picker-content",onChange:w},Yg(t=er(v(d.value),((e,t)=>{let n;return ui(Op,{key:t},Yg(n=er(e,((e,n)=>ui("div",{key:n,class:"uni-picker-item"},["object"==typeof e?e[k]||"":y(e,t)]))))?n:{default:()=>[n],_:1})})))?t:{default:()=>[t],_:1},8,["value","onChange"]):null,ui("div",{ref:s,class:"uni-picker-select",onWheel:rc,onTouchmove:rc},[er(d.value[0],((e,t)=>ui("div",{key:t,class:["uni-picker-item",{selected:h[0]===t}],onClick:()=>{h[0]=t,S()}},["object"==typeof e?e[k]||"":e],10,["onClick"])))],40,["onWheel","onTouchmove"]),ui("div",{style:C.triangle},null,4)],6)],40,["onWheel","onTouchmove"]):null,ui("div",null,[n.default&&n.default()]),p.value?ui("div",{class:"uni-picker-system",onMousemove:au(b)},[ui("input",{class:["uni-picker-system_input",p.value],ref:a,value:T,type:E,tabindex:"-1",min:O,max:M,onChange:e=>{_(e),rc(e)}},null,42,["value","type","min","max","onChange"])],40,["onMousemove"]):null],16,["onClick"])}}});let ev;const tv=c(Rl,{publishHandler(e,t,n){nv.subscribeHandler(e,t,n)}}),nv=c(Yc,{publishHandler(e,t,n){tv.subscribeHandler(e,t,n)}}),ov=su({name:"PageBody",setup(e,t){const n=an(null),o=an(null);return so((()=>false.enablePullDownRefresh),(()=>{o.value=null}),{immediate:!0}),()=>ui(Yr,null,[!1,ui("uni-page-wrapper",vi({ref:n},o.value),[ui("uni-page-body",null,[tr(t.slots,"default")]),null],16)])}}),rv=su({name:"Page",setup(e,t){let n=xu(Cu());n.navigationBar;const o={};return qg(n),()=>ui("uni-page",{"data-page":n.route,style:o},[iv(t),null])}});function iv(e){return Qr(),oi(ov,{key:0},{default:Yn((()=>[tr(e.slots,"page")])),_:3})}const sv={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0};window.uni={},window.wx={},window.rpx2px=ud;const av=Object.assign({}),lv=Object.assign;window.__uniConfig=lv({globalStyle:{backgroundColor:"#F8F8F8",navigationBar:{backgroundColor:"#F8F8F8",titleText:"机器人设置",type:"default",titleColor:"#000000"},isNVue:!1},uniIdRouter:{},compilerVersion:"5.03"},{appId:"__UNI__F23FDD2",appName:"wechatPlug",appVersion:"1.0.0",appVersionCode:"100",async:sv,debug:!1,networkTimeout:{request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},sdkConfigs:{},qqMapKey:void 0,bMapKey:void 0,googleMapKey:void 0,aMapKey:void 0,aMapSecurityJsCode:void 0,aMapServiceHost:void 0,nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:Object.keys(av).reduce(((e,t)=>{const n=t.replace(/\.\/locale\/(uni-app.)?(.*).json/,"$2");return lv(e[n]||(e[n]={}),av[t].default),e}),{}),router:{mode:"hash",base:"./",assets:"assets",routerBase:"/"},darkmode:!1,themeConfig:{}}),window.__uniLayout=window.__uniLayout||{};const cv={delay:sv.delay,timeout:sv.timeout,suspensible:sv.suspensible};sv.loading&&(cv.loadingComponent={name:"SystemAsyncLoading",render:()=>ui(Jn(sv.loading))}),sv.error&&(cv.errorComponent={name:"SystemAsyncError",props:["error"],render(){return ui(Jn(sv.error),{error:this.error})}});const uv=()=>t((()=>import("./pages-index-login.BFQQS4U7.js")),__vite__mapDeps([0,1,2,3]),import.meta.url).then((e=>pm(e.default||e))),dv=Eo(lv({loader:uv},cv)),fv=()=>t((()=>import("./pages-index-index.BgtT8MtD.js")),__vite__mapDeps([4,5,2,6,7,8,1,9]),import.meta.url).then((e=>pm(e.default||e))),hv=Eo(lv({loader:fv},cv)),pv=()=>t((()=>import("./pages-index-store.ChlVfoKf.js")),__vite__mapDeps([10,5,2,6,7,8,1,11]),import.meta.url).then((e=>pm(e.default||e))),mv=Eo(lv({loader:pv},cv)),gv=()=>t((()=>import("./pages-index-method.kqhTS_RO.js")),__vite__mapDeps([12,5,2,6,7,8,13]),import.meta.url).then((e=>pm(e.default||e))),vv=Eo(lv({loader:gv},cv)),yv=()=>t((()=>import("./pages-index-order.M2XVGrY0.js")),__vite__mapDeps([14,5,2,6,7,8,1,15]),import.meta.url).then((e=>pm(e.default||e))),_v=Eo(lv({loader:yv},cv)),bv=()=>t((()=>import("./pages-index-interior.TuurVpSQ.js")),__vite__mapDeps([16,5,2,6,1,7,8,17]),import.meta.url).then((e=>pm(e.default||e))),wv=Eo(lv({loader:bv},cv)),xv=()=>t((()=>import("./pages-index-groupSend.4IkvuQhu.js")),__vite__mapDeps([18,5,2,6,19]),import.meta.url).then((e=>pm(e.default||e))),Sv=Eo(lv({loader:xv},cv)),Cv=()=>t((()=>import("./pages-index-log._xK1nM0F.js")),__vite__mapDeps([20,5,2,6,1,21]),import.meta.url).then((e=>pm(e.default||e))),Tv=Eo(lv({loader:Cv},cv));function kv(e,t){return Qr(),oi(rv,null,{page:Yn((()=>[ui(e,lv({},t,{ref:"page"}),null,512)])),_:1})}window.__uniRoutes=[{path:"/",alias:"/pages/index/login",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(dv,t)}},loader:uv,meta:{isQuit:!0,isEntry:!0,titleNView:!1,navigationBar:{type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/index",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(hv,t)}},loader:fv,meta:{titleNView:!1,navigationBar:{type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/store",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(mv,t)}},loader:pv,meta:{titleNView:!1,navigationBar:{type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/method",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(vv,t)}},loader:gv,meta:{titleNView:!1,navigationBar:{type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/order",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(_v,t)}},loader:yv,meta:{titleNView:!1,navigationBar:{type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/interior",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(wv,t)}},loader:bv,meta:{titleNView:!1,navigationBar:{titleText:"内部群",type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/groupSend",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(Sv,t)}},loader:xv,meta:{titleNView:!1,navigationBar:{titleText:"群发",type:"default",style:"custom"},isNVue:!1}},{path:"/pages/index/log",component:{setup(){const e=um(),t=e&&e.$route&&e.$route.query||{};return()=>kv(Tv,t)}},loader:Cv,meta:{titleNView:!1,navigationBar:{titleText:"消息记录",type:"default",style:"custom"},isNVue:!1}}].map((e=>(e.meta.route=(e.alias||e.path).slice(1),e)));const Ev={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};hm(Ev,{init:dm,setup(e){const t=Su(),n=()=>{var n;n=e,Object.keys(Od).forEach((e=>{Od[e].forEach((t=>{Ho(e,t,n)}))}));const{onLaunch:o,onShow:r,onPageNotFound:i}=e,s=function({path:e,query:t}){return c(mh,{path:e,query:t}),c(gh,mh),c({},mh)}({path:t.path.slice(1)||__uniRoutes[0].meta.route,query:xe(t.query)});if(o&&I(o,s),r&&I(r,s),!t.matched.length){const e={notFound:!0,openType:"appLaunch",path:t.path,query:xe(t.query),scene:1001};yf(),i&&I(i,e)}};return Tr(Ga).isReady().then(n),zo((()=>{window.addEventListener("resize",Te(mm,50,{setTimeout:setTimeout,clearTimeout:clearTimeout})),window.addEventListener("message",gm),document.addEventListener("visibilitychange",vm),function(){let e=null;try{e=window.matchMedia("(prefers-color-scheme: dark)")}catch(t){}if(e){let t=e=>{nv.emit("onThemeChange",{theme:e.matches?"dark":"light"})};e.addEventListener?e.addEventListener("change",t):e.addListener(t)}}()})),t.query},before(e){e.mpType="app";const{setup:t}=e,n=()=>(Qr(),oi(zg));e.setup=(e,o)=>{const r=t&&t(e,o);return g(r)?n:r},e.render=n}}); +/*! + * pinia v2.1.7 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */ +let Ov;const Mv=e=>Ov=e,Lv=Symbol();function Av(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var Pv,$v;($v=Pv||(Pv={})).direct="direct",$v.patchObject="patch object",$v.patchFunction="patch function";const Iv=()=>{};function Rv(e,t,n,o=Iv){e.push(t);const r=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),o())};var i;return!n&&Fe()&&(i=r,Be&&Be.cleanups.push(i)),r}function Bv(e,...t){e.slice().forEach((e=>{e(...t)}))}const Nv=e=>e();function Dv(e,t){e instanceof Map&&t instanceof Map&&t.forEach(((t,n)=>e.set(n,t))),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];Av(r)&&Av(o)&&e.hasOwnProperty(n)&&!sn(o)&&!Xt(o)?e[n]=Dv(r,o):e[n]=o}return e}const jv=Symbol();const{assign:Fv}=Object;function Vv(e,t,n,o){const{state:r,actions:i,getters:s}=t,a=n.state.value[e];let l;return l=Hv(e,(function(){a||(n.state.value[e]=r?r():{});const t=function(e){const t=h(e)?new Array(e.length):{};for(const n in e)t[n]=vn(e,n);return t}(n.state.value[e]);return Fv(t,i,Object.keys(s||{}).reduce(((t,o)=>(t[o]=Zt($i((()=>{Mv(n);const t=n._s.get(e);return s[o].call(t,t)}))),t)),{}))}),t,n,o,!0),l}function Hv(e,t,n={},o,r,i){let s;const a=Fv({actions:{}},n),l={deep:!0};let c,u,d,f=[],h=[];const p=o.state.value[e];let m;function g(t){let n;c=u=!1,"function"==typeof t?(t(o.state.value[e]),n={type:Pv.patchFunction,storeId:e,events:d}):(Dv(o.state.value[e],t),n={type:Pv.patchObject,payload:t,storeId:e,events:d});const r=m=Symbol();An().then((()=>{m===r&&(c=!0)})),u=!0,Bv(f,n,o.state.value[e])}i||p||(o.state.value[e]={}),an({});const v=i?function(){const{state:e}=n,t=e?e():{};this.$patch((e=>{Fv(e,t)}))}:Iv;function y(t,n){return function(){Mv(o);const r=Array.from(arguments),i=[],s=[];function a(e){i.push(e)}function l(e){s.push(e)}let c;Bv(h,{args:r,name:t,store:_,after:a,onError:l});try{c=n.apply(this&&this.$id===e?this:_,r)}catch(u){throw Bv(s,u),u}return c instanceof Promise?c.then((e=>(Bv(i,e),e))).catch((e=>(Bv(s,e),Promise.reject(e)))):(Bv(i,c),c)}}const _=qt({_p:o,$id:e,$onAction:Rv.bind(null,h),$patch:g,$reset:v,$subscribe(t,n={}){const r=Rv(f,t,n.detached,(()=>i())),i=s.run((()=>so((()=>o.state.value[e]),(o=>{("sync"===n.flush?u:c)&&t({storeId:e,type:Pv.direct,events:d},o)}),Fv({},l,n))));return r},$dispose:function(){s.stop(),f=[],h=[],o._s.delete(e)}});o._s.set(e,_);const b=(o._a&&o._a.runWithContext||Nv)((()=>o._e.run((()=>(s=je()).run(t)))));for(const S in b){const t=b[S];if(sn(t)&&(!sn(x=t)||!x.effect)||Xt(t))i||(!p||Av(w=t)&&w.hasOwnProperty(jv)||(sn(t)?t.value=p[S]:Dv(t,p[S])),o.state.value[e][S]=t);else if("function"==typeof t){const e=y(S,t);b[S]=e,a.actions[S]=t}}var w,x;return Fv(_,b),Fv(Qt(_),b),Object.defineProperty(_,"$state",{get:()=>o.state.value[e],set:e=>{g((t=>{Fv(t,e)}))}}),o._p.forEach((e=>{Fv(_,s.run((()=>e({store:_,app:o._a,pinia:o,options:a}))))})),p&&i&&n.hydrate&&n.hydrate(_.$state,p),c=!0,u=!0,_}function Wv(e){{e=Qt(e);const t={};for(const n in e){const o=e[n];(sn(o)||Xt(o))&&(t[n]=gn(e,n))}return t}}const qv=function(e,t,n){let o,r;const i="function"==typeof t;function s(e,n){(e=e||(!!(wi||Wn||Sr)?Tr(Lv,null):null))&&Mv(e),(e=Ov)._s.has(o)||(i?Hv(o,t,r,e):Vv(o,r,e));return e._s.get(o)}return"string"==typeof e?(o=e,r=i?n:t):(r=e,o=e.id),s.$id=o,s}("source",{state:()=>{let e=Rm("SOURCE");return e||(e="wx",$m("SOURCE","wx")),{sources:Rm("SOURCES")||[],currentSource:e}},actions:{setSources(e){this.sources=e,$m("SOURCES",e)},addSource(e){this.sources.push(e),$m("SOURCES",this.sources)},clearSources(){this.sources=[],$m("SOURCES",[])},setCurrentSource(e){this.currentSource=e,$m("SOURCE",e)}}}),zv=function(){const e=je(!0),t=e.run((()=>an({})));let n=[],o=[];const r=Zt({install(e){Mv(r),r._a=e,e.provide(Lv,r),e.config.globalProperties.$pinia=r,o.forEach((e=>n.push(e))),o=[]},use(e){return this._a?n.push(e):o.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}();(function(){const e=Ls(Ev);return e.use(zv),{app:e}})().app.use(nm).mount("#app");export{Hg as $,_u as A,Pm as B,Hp as C,Dp as D,yl as E,Yr as F,tr as G,ae as H,Gh as I,wp as J,Jn as K,Zg as L,Lm as M,kd as N,fo as O,Op as P,ts as Q,sg as R,Ap as S,Wm as T,lg as U,mg as V,Bm as W,Nm as X,_g as Y,Vm as Z,Vg as _,pf as a,Rd as a0,Bd as a1,Pf as a2,fd as a3,Am as a4,Id as a5,Ed as a6,bg as a7,ff as a8,gf as a9,Md as aa,ui as b,oi as c,fi as d,Eh as e,Zn as f,Rm as g,ni as h,Wp as i,er as j,hi as k,bh as l,mu as m,_h as n,Qr as o,Wv as p,$m as q,cg as r,jg as s,U as t,qv as u,Mg as v,Yn as w,ci as x,le as y,Es as z}; diff --git a/app/assets/public/wechat_1.0.6/assets/index-CeBosqgw.css b/app/assets/public/wechat_1.0.6/assets/index-CeBosqgw.css new file mode 100644 index 0000000..14a6871 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/index-CeBosqgw.css @@ -0,0 +1 @@ +*{margin:0;-webkit-tap-highlight-color:transparent}html,body{-webkit-user-select:none;user-select:none;width:100%;height:100%}body{overflow-x:hidden;font-size:16px}uni-app,uni-page,uni-page-wrapper,uni-page-body{display:block;box-sizing:border-box;width:100%}uni-page-wrapper{position:relative}#app,uni-app,uni-page,uni-page-wrapper{height:100%}.uni-mask{position:fixed;z-index:999;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.5)}.uni-fade-enter-active,.uni-fade-leave-active{transition-duration:.25s;transition-property:opacity;transition-timing-function:ease}.uni-fade-enter-from,.uni-fade-leave-active{opacity:0}.uni-loading,uni-button[loading]:before{background-color:transparent;background-image:url(data:image/svg+xml;base64,\ PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=);background-repeat:no-repeat}.uni-loading{width:20px;height:20px;display:inline-block;vertical-align:middle;animation:uni-loading 1s steps(12,end) infinite;background-size:100%}@keyframes uni-loading{0%{transform:rotate3d(0,0,1,0)}to{transform:rotate3d(0,0,1,360deg)}}html{--primary-color: #007aff;--UI-BG: #fff;--UI-BG-1: #f7f7f7;--UI-BG-2: #fff;--UI-BG-3: #f7f7f7;--UI-BG-4: #4c4c4c;--UI-BG-5: #fff;--UI-FG: #000;--UI-FG-0: rgba(0, 0, 0, .9);--UI-FG-HALF: rgba(0, 0, 0, .9);--UI-FG-1: rgba(0, 0, 0, .5);--UI-FG-2: rgba(0, 0, 0, .3);--UI-FG-3: rgba(0, 0, 0, .1)}uni-page[data-type] uni-page-body{background-color:transparent}body:after{position:fixed;content:"";left:-1000px;top:-1000px;animation:shadow-preload .1s;animation-delay:3s}@keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}to{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}.uni-async-error{position:absolute;left:0;right:0;top:0;bottom:0;color:#999;padding:100px 10px;text-align:center}.uni-async-loading{box-sizing:border-box;width:100%;padding:50px;text-align:center}.uni-async-loading .uni-loading{width:30px;height:30px}.content{display:flex;flex-wrap:wrap;min-height:100vh;position:relative;background-color:#ccc}.content .box{width:calc(100% - 60px);z-index:0;display:flex;flex-wrap:wrap;height:100vh;position:relative}.content .box .contents{width:calc(100% - 20px);height:calc(100% - 20px);margin:10px;background-color:rgba(0,0,0,.1);position:relative}.content .box .contents .operator{position:absolute;height:40px;width:100%;box-sizing:border-box;bottom:40px;background-color:#fff;display:flex;flex-wrap:nowrap;padding-left:10px;z-index:10;top:0}.content .box .contents .operator .item{height:24px;line-height:24px;padding:0 5px;border:1px solid #cfcfcf;margin:8px 2px;background:#fff;color:#888;font-size:13px;border-radius:2px;cursor:pointer}.content .box .contents .operator .item.on{border:1px solid #000;color:#000}.content .box .contents .operator .item:hover{background-color:#bce4c4;color:#20a53a}.content .box .contents .operator .inputBox{height:24px;position:absolute;right:20px;width:230px;box-sizing:border-box;margin:8px 2px;display:flex;flex-wrap:nowrap}.content .box .contents .operator .inputBox .input{border:1px solid #999;width:200px;height:25px;line-height:25px;padding:0 10px;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-app-region:no-drag;font-size:12px}.content .box .contents .operator .inputBox .foucs{height:160px}.content .box .contents .operator .inputBox .plus{width:24px;height:24px;border:1px solid #999;box-sizing:border-box;text-align:center;line-height:24px;margin-left:6px;background-color:#fff;cursor:pointer}.content .box .contents .list{width:100%;height:100%;padding-bottom:40px;box-sizing:border-box}.content .box .contents .list .item{line-height:2.5rem;padding-left:.625rem;box-sizing:border-box}.content .box .contents .list .item:nth-child(2n){background-color:#eee}.content .box .contents .list .box{width:100%;height:100%;padding-top:40px;box-sizing:border-box;position:relative;transition:all .5s;font-size:12px}.content .box .contents .list .box .uni-list-cell{width:100%;line-height:60px;font-size:20px;display:flex;flex-wrap:wrap;background-color:rgba(255,255,255,.2);text-align:center;color:#000;border:1px solid #333;box-sizing:border-box}.content .box .contents .list .box .uni-list-cell:nth-child(2n){background-color:rgba(255,255,255,.6);color:#000}.content .box .contents .list .box .green{color:brown}.content .box .contents .list .box .blue{color:#00f}.content .box .contents .list .box .picked{color:#fff!important;background-color:#32cd32!important}.content .box .contents .list .box .goodsList{width:100%;height:100%;background-color:#fff}.content .box .contents .list .box .goodsList .operator_btn{font-size:13px;margin:0 4px;cursor:pointer}.content .box .contents .list .box .goodsList .operator_btn:hover{color:#00f}.content .box .contents .list .box .goodsList .uni-scroll-view-content{overflow-y:scroll}.content .box .contents .list .box .goodsList .item{width:100%;display:flex;flex-wrap:nowrap;line-height:20px;text-align:center;background-color:#efefef;box-sizing:border-box;font-size:12px}.content .box .contents .list .box .goodsList .item .POSTNUM{cursor:pointer}.content .box .contents .list .box .goodsList .item:nth-child(2n){background-color:#fff}.content .box .contents .list .box .goodsList .item:last-child{border-bottom:1px solid;box-sizing:border-box}.content .box .contents .list .box .goodsList .item:hover{background-color:green;color:#fff}.content .box .contents .list table{width:100%;height:100%;display:block!important;overflow-y:auto!important}.content .box .contents .list thead{height:30px;width:100%;position:-webkit-sticky;position:sticky;top:0;z-index:99}.content .box .contents .list tbody{height:100%;width:100%;box-sizing:border-box}.content .box .contents .list thead tr{background-color:#dde3f7}.content .box .contents .list tbody tr:hover{background-color:#ffffe0;color:#000}.content .box .contents .list .checkbox-group{display:contents}.content .box .contents .bottominfo{height:40px;line-height:40px;position:absolute;width:100%;bottom:0;left:0;z-index:9;background-color:#fff;border-top:1px solid #afafaf;box-sizing:border-box;overflow:hidden;text-align:right;padding:0 17px;font-size:13px;display:flex;flex-wrap:nowrap}.content .box .contents .bottominfo>uni-view{width:100%}.content .box .contents .bottominfo .Backup{text-align:left;width:400px}.content .box .contents .bottominfo .Backup .value{display:inline-block;vertical-align:middle;width:100px;height:30px;line-height:30px;background-color:#efefef;border:1px solid #000;box-sizing:border-box;padding:0 10px;text-align:center;font-size:14px}.content .box .contents .bottominfo .Backup .btn{cursor:pointer}.content .box .contents .bottominfo .normal{border:1px solid #ececec;color:#666;font-size:13px;height:28px;line-height:26px;display:inline-block;vertical-align:middle;box-sizing:border-box;padding:0 10px}.content .box .contents .bottominfo .noright{border-right:none}.content .box .contents .bottominfo .noborder{border:none}.content .box .contents .bottominfo .btn{border:1px solid #efefef;padding:5px;margin-left:5px}.content .box .contents .bottominfo .page{display:inline-block;border:1px solid #efefef;width:40px;text-align:center}.content .box .contents .bottominfo .topage:hover{background:#e8e8e8;color:#20a53a;text-shadow:0 1px 0 #fff;cursor:pointer}.content .box .contents .bottominfo .Pcurrent{color:#fff;background:#b5b5b5;cursor:default;border-color:#b5b5b5}.content .box .contents .bottominfo .t1{color:#333;padding:0 10px;margin-right:0;border-right:1px solid #ececec}.content .box .contents .bottominfo .page_select_number{height:28px;line-height:26px;color:#333;background-color:#e9e9ed;vertical-align:middle}.content .box .contents .bottominfo .page_select_number:focus-visible{outline:0px}.content .box .contents .bottominfo .page_jump_group{display:inline-block;height:28px;line-height:26px;margin-left:8px;vertical-align:middle}.content .box .contents .bottominfo .page_jump_group .page_jump_title{display:inline-block;border:none;height:28px;line-height:26px;padding:0 8px;vertical-align:middle}.content .box .contents .bottominfo .page_jump_group .page_jump_input{display:inline-block;height:28px;line-height:26px;width:50px;max-width:50px;vertical-align:middle;border:1px solid #ececec;outline:none;text-align:center;box-sizing:border-box}.content .box .contents .bottominfo .page_jump_group .page_jump_btn{display:inline-block;height:28px;line-height:26px;padding:0;border:0;vertical-align:middle;width:50px;font-size:13px;border-radius:0}.content .box .contents .bottominfo .page_jump_group .page_jump_btn:hover{background-color:green;color:#fff}.content:after{width:100%;height:100%;position:fixed;content:"";z-index:999999;pointer-events:none} diff --git a/app/assets/public/wechat_1.0.6/assets/index-D5HqLnJC.css b/app/assets/public/wechat_1.0.6/assets/index-D5HqLnJC.css new file mode 100644 index 0000000..449656b --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/index-D5HqLnJC.css @@ -0,0 +1 @@ +.win-box[data-v-65bb06e6]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:999;padding-left:60px;padding-top:40px;box-sizing:border-box}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6]{position:absolute;width:700px;height:400px;background-color:#ccc;margin:auto;top:20px;left:0;right:0;box-shadow:rgba(0,0,0,.3) 1px 1px 50px}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-head[data-v-65bb06e6]{width:100%;height:30px;line-height:30px;background-color:#87ceeb;position:relative}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-head[data-v-65bb06e6] .win-close[data-v-65bb06e6]{position:absolute;right:10px;cursor:pointer}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-head[data-v-65bb06e6] .win-title[data-v-65bb06e6]{position:absolute;left:10px;color:#fff}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6]{width:100%;height:370px;padding:5px;box-sizing:border-box;display:flex}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .win-infos[data-v-65bb06e6]{width:100%;height:100%;background-color:#fff;padding:5px;box-sizing:border-box}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .win-infos[data-v-65bb06e6] .line[data-v-65bb06e6]{width:100%;line-height:2.5rem;display:flex;flex-wrap:nowrap}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .win-infos[data-v-65bb06e6] .line[data-v-65bb06e6] .title[data-v-65bb06e6]{width:150px}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .win-infos[data-v-65bb06e6] .line[data-v-65bb06e6] .checkbox[data-v-65bb06e6]{height:12.5rem}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .win-infos[data-v-65bb06e6] .line[data-v-65bb06e6] .checkbox[data-v-65bb06e6] .uni-list-cell[data-v-65bb06e6]{display:flex;justify-content:flex-start;padding:0 .625rem}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .value[data-v-65bb06e6]{display:inline-block;vertical-align:middle;width:100px;height:30px;line-height:30px;background-color:#efefef;border:1px solid #000;box-sizing:border-box;padding:0 10px;text-align:center;font-size:14px}.win-box[data-v-65bb06e6] .win-win[data-v-65bb06e6] .win-content[data-v-65bb06e6] .btn[data-v-65bb06e6]{background-color:#00f;color:#fff;cursor:pointer}.content[data-v-44b5ecab]{flex-wrap:nowrap}.box[data-v-44b5ecab]{width:100%}.roomitem[data-v-44b5ecab]{line-height:40px;text-align:left;background-color:rgba(0,0,0,.4);margin:5px 0;padding-left:5px;display:flex;flex-wrap:nowrap}.roomitem .name[data-v-44b5ecab]{width:220px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7fff00}.roomitem uni-button[data-v-44b5ecab]{height:20px;line-height:20px;font-size:14px;display:inline;margin:10px 5px}.roomitem .red[data-v-44b5ecab]{background-color:red;color:#fff}.roomitem .blue[data-v-44b5ecab]{background-color:#00f;color:#fff!important}.list[data-v-44b5ecab]{width:100%;height:100%;padding-bottom:0!important;box-sizing:border-box} diff --git a/app/assets/public/wechat_1.0.6/assets/interior-CWVR9NZs.css b/app/assets/public/wechat_1.0.6/assets/interior-CWVR9NZs.css new file mode 100644 index 0000000..1f1f375 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/interior-CWVR9NZs.css @@ -0,0 +1 @@ +.win-add2[data-v-5d77a3e2]{position:fixed;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.3);display:flex;align-items:center;justify-content:center;z-index:9999}.win-content[data-v-5d77a3e2]{background:#fff;padding:24px;border-radius:8px;min-width:300px}.title[data-v-5d77a3e2]{font-size:18px;margin-bottom:16px}.form uni-input[data-v-5d77a3e2]{display:block;width:100%;margin-bottom:12px;padding:8px;border:1px solid #ccc;border-radius:4px}.actions[data-v-5d77a3e2]{display:flex;justify-content:flex-end}.actions uni-button[data-v-5d77a3e2]{margin-left:12px}.content[data-v-d8015cc3]{flex-wrap:nowrap}.box[data-v-d8015cc3]{width:100%}.list[data-v-d8015cc3]{width:100%;height:100%;padding-bottom:0!important;box-sizing:border-box} diff --git a/app/assets/public/wechat_1.0.6/assets/log-B1g-HYy6.css b/app/assets/public/wechat_1.0.6/assets/log-B1g-HYy6.css new file mode 100644 index 0000000..808add6 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/log-B1g-HYy6.css @@ -0,0 +1 @@ +.empty-tip[data-v-c01953dd]{color:#bbb;text-align:center;margin-top:40px;font-size:15px}.chat-box[data-v-c01953dd]{display:flex;flex-direction:column;height:100%;background:#fcfcfc}.chat-header[data-v-c01953dd]{padding:12px;background:#e6e6e6;font-weight:700;font-size:16px}.chat-content[data-v-c01953dd]{flex:1 1 0%;overflow-y:auto;padding:12px;min-height:0}.chat-list[data-v-c01953dd]{min-height:100%}.chat-message[data-v-c01953dd]{margin-bottom:10px;background:#fff;border-radius:6px;padding:8px 12px;box-shadow:0 1px 2px rgba(0,0,0,.03)}.msg-user[data-v-c01953dd]{color:#409eff;font-size:13px}.msg-content[data-v-c01953dd]{margin:2px 0;font-size:15px;word-break:break-all}.msg-reply[data-v-c01953dd]{background:#f0f4fa;color:#888;font-size:13px;border-left:3px solid #409eff;padding:2px 8px;margin-bottom:2px;border-radius:3px}.msg-time[data-v-c01953dd]{font-size:11px;color:#aaa;text-align:right}.chat-footer[data-v-c01953dd]{padding:8px 12px;display:flex;flex-direction:column;gap:6px;height:200px}.chat-footer .box[data-v-c01953dd]{width:100%;height:100%;border:1px solid #ccc;border-radius:4px;display:flex;flex-direction:column}.chat-footer .box .input-box[data-v-c01953dd]{flex:1;border:none;padding:8px 10px;font-size:15px;resize:none;width:100%;box-sizing:border-box}.footer-tools[data-v-c01953dd]{display:flex;gap:8px;margin-bottom:2px}.tool-btn[data-v-c01953dd]{background:none;border:none;font-size:20px;cursor:pointer}.footer-input[data-v-c01953dd]{display:flex;gap:8px}.input-box[data-v-c01953dd]{flex:1;border:1px solid #ccc;border-radius:4px;padding:6px 10px;font-size:15px;background:#fff}.send-btn[data-v-c01953dd]{background:#409eff;color:#fff;border:none;border-radius:4px;padding:0 18px;font-size:15px;cursor:pointer}.search-bar[data-v-bd7f5b03]{position:relative;display:flex;align-items:center}.search-bar .search-input[data-v-bd7f5b03]{flex:1}.search-bar .clear-btn[data-v-bd7f5b03]{position:absolute;right:20px;top:50%;transform:translateY(-50%);font-size:18px;color:#bbb;cursor:pointer;-webkit-user-select:none;user-select:none}.content[data-v-bd7f5b03]{flex-wrap:nowrap}.content .log-layout[data-v-bd7f5b03]{display:flex;height:100vh;flex-direction:row;width:100%}.content .log-layout .log-left[data-v-bd7f5b03]{width:300px;border-right:1px solid #ccc;display:flex;background-color:#eeeef0;flex-direction:column}.content .log-layout .log-left .log-title[data-v-bd7f5b03]{font-size:18px;font-weight:700;padding:10px}.content .log-layout .log-left .log-title .search-input[data-v-bd7f5b03]{background-color:#fff;border:none;padding:5px;border-radius:4px}.content .log-layout .log-left .group-list[data-v-bd7f5b03]{flex:1;overflow-y:auto}.content .log-layout .log-left .group-list .group-item[data-v-bd7f5b03]{padding:10px;cursor:pointer}.content .log-layout .log-left .group-list .group-item.active[data-v-bd7f5b03]{background-color:#fff}.content .log-layout .log-left .group-list .group-item .group-name[data-v-bd7f5b03]{font-size:16px}.content .log-layout .log-right[data-v-bd7f5b03]{flex:1 1 0%;min-width:0;display:flex;flex-direction:column;height:100vh;box-sizing:border-box;background-color:#fff} diff --git a/app/assets/public/wechat_1.0.6/assets/login-Bw0Vbjpk.css b/app/assets/public/wechat_1.0.6/assets/login-Bw0Vbjpk.css new file mode 100644 index 0000000..49a0ba9 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/login-Bw0Vbjpk.css @@ -0,0 +1 @@ +.form_box[data-v-06b9555e]{width:300px;height:280px;border-radius:5px;display:flex;flex-wrap:wrap;z-index:2;padding:40px 25px;box-sizing:border-box}.form_box .input[data-v-06b9555e]{width:250px;height:40px;line-height:40px;border:1px solid #ddd;border-radius:5px;padding:0 20px;box-sizing:border-box;background:#fff}.form_box .tipbox[data-v-06b9555e]{height:40px;width:100%}.form_box .inputTip[data-v-06b9555e]{color:red;height:40px;line-height:40px}.form_box .button[data-v-06b9555e]{width:250px;height:40px;line-height:40px;box-sizing:border-box;border:1px solid #ddd;border-radius:5px}.content[data-v-06b9555e]{justify-content:center;align-content:center;background-color:#fff8dc}.fackBar[data-v-06b9555e]{height:25px;line-height:25px;width:100%;position:fixed;top:0;left:0;background-color:#0078d7;color:#fff;padding-left:10px;font-size:14px;z-index:1;box-sizing:border-box}.rightbutton[data-v-06b9555e]{position:fixed;top:26px;right:0;background-color:#fff;height:40px;line-height:40px;padding:0 20px}.ercode[data-v-06b9555e]{width:250px;height:250px} diff --git a/app/assets/public/wechat_1.0.6/assets/m-nav-BN-ODETU.css b/app/assets/public/wechat_1.0.6/assets/m-nav-BN-ODETU.css new file mode 100644 index 0000000..dbad5a9 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/m-nav-BN-ODETU.css @@ -0,0 +1 @@ +.uniui-cart-filled[data-v-5610c8db]:before{content:""}.uniui-gift-filled[data-v-5610c8db]:before{content:""}.uniui-color[data-v-5610c8db]:before{content:""}.uniui-wallet[data-v-5610c8db]:before{content:""}.uniui-settings-filled[data-v-5610c8db]:before{content:""}.uniui-auth-filled[data-v-5610c8db]:before{content:""}.uniui-shop-filled[data-v-5610c8db]:before{content:""}.uniui-staff-filled[data-v-5610c8db]:before{content:""}.uniui-vip-filled[data-v-5610c8db]:before{content:""}.uniui-plus-filled[data-v-5610c8db]:before{content:""}.uniui-folder-add-filled[data-v-5610c8db]:before{content:""}.uniui-color-filled[data-v-5610c8db]:before{content:""}.uniui-tune-filled[data-v-5610c8db]:before{content:""}.uniui-calendar-filled[data-v-5610c8db]:before{content:""}.uniui-notification-filled[data-v-5610c8db]:before{content:""}.uniui-wallet-filled[data-v-5610c8db]:before{content:""}.uniui-medal-filled[data-v-5610c8db]:before{content:""}.uniui-fire-filled[data-v-5610c8db]:before{content:""}.uniui-refreshempty[data-v-5610c8db]:before{content:""}.uniui-location-filled[data-v-5610c8db]:before{content:""}.uniui-person-filled[data-v-5610c8db]:before{content:""}.uniui-personadd-filled[data-v-5610c8db]:before{content:""}.uniui-arrowthinleft[data-v-5610c8db]:before{content:""}.uniui-arrowthinup[data-v-5610c8db]:before{content:""}.uniui-arrowthindown[data-v-5610c8db]:before{content:""}.uniui-back[data-v-5610c8db]:before{content:""}.uniui-forward[data-v-5610c8db]:before{content:""}.uniui-arrow-right[data-v-5610c8db]:before{content:""}.uniui-arrow-left[data-v-5610c8db]:before{content:""}.uniui-arrow-up[data-v-5610c8db]:before{content:""}.uniui-arrow-down[data-v-5610c8db]:before{content:""}.uniui-arrowthinright[data-v-5610c8db]:before{content:""}.uniui-down[data-v-5610c8db]:before{content:""}.uniui-bottom[data-v-5610c8db]:before{content:""}.uniui-arrowright[data-v-5610c8db]:before{content:""}.uniui-right[data-v-5610c8db]:before{content:""}.uniui-up[data-v-5610c8db]:before{content:""}.uniui-top[data-v-5610c8db]:before{content:""}.uniui-left[data-v-5610c8db]:before{content:""}.uniui-arrowup[data-v-5610c8db]:before{content:""}.uniui-eye[data-v-5610c8db]:before{content:""}.uniui-eye-filled[data-v-5610c8db]:before{content:""}.uniui-eye-slash[data-v-5610c8db]:before{content:""}.uniui-eye-slash-filled[data-v-5610c8db]:before{content:""}.uniui-info-filled[data-v-5610c8db]:before{content:""}.uniui-reload[data-v-5610c8db]:before{content:""}.uniui-micoff-filled[data-v-5610c8db]:before{content:""}.uniui-map-pin-ellipse[data-v-5610c8db]:before{content:""}.uniui-map-pin[data-v-5610c8db]:before{content:""}.uniui-location[data-v-5610c8db]:before{content:""}.uniui-starhalf[data-v-5610c8db]:before{content:""}.uniui-star[data-v-5610c8db]:before{content:""}.uniui-star-filled[data-v-5610c8db]:before{content:""}.uniui-calendar[data-v-5610c8db]:before{content:""}.uniui-fire[data-v-5610c8db]:before{content:""}.uniui-medal[data-v-5610c8db]:before{content:""}.uniui-font[data-v-5610c8db]:before{content:""}.uniui-gift[data-v-5610c8db]:before{content:""}.uniui-link[data-v-5610c8db]:before{content:""}.uniui-notification[data-v-5610c8db]:before{content:""}.uniui-staff[data-v-5610c8db]:before{content:""}.uniui-vip[data-v-5610c8db]:before{content:""}.uniui-folder-add[data-v-5610c8db]:before{content:""}.uniui-tune[data-v-5610c8db]:before{content:""}.uniui-auth[data-v-5610c8db]:before{content:""}.uniui-person[data-v-5610c8db]:before{content:""}.uniui-email-filled[data-v-5610c8db]:before{content:""}.uniui-phone-filled[data-v-5610c8db]:before{content:""}.uniui-phone[data-v-5610c8db]:before{content:""}.uniui-email[data-v-5610c8db]:before{content:""}.uniui-personadd[data-v-5610c8db]:before{content:""}.uniui-chatboxes-filled[data-v-5610c8db]:before{content:""}.uniui-contact[data-v-5610c8db]:before{content:""}.uniui-chatbubble-filled[data-v-5610c8db]:before{content:""}.uniui-contact-filled[data-v-5610c8db]:before{content:""}.uniui-chatboxes[data-v-5610c8db]:before{content:""}.uniui-chatbubble[data-v-5610c8db]:before{content:""}.uniui-upload-filled[data-v-5610c8db]:before{content:""}.uniui-upload[data-v-5610c8db]:before{content:""}.uniui-weixin[data-v-5610c8db]:before{content:""}.uniui-compose[data-v-5610c8db]:before{content:""}.uniui-qq[data-v-5610c8db]:before{content:""}.uniui-download-filled[data-v-5610c8db]:before{content:""}.uniui-pyq[data-v-5610c8db]:before{content:""}.uniui-sound[data-v-5610c8db]:before{content:""}.uniui-trash-filled[data-v-5610c8db]:before{content:""}.uniui-sound-filled[data-v-5610c8db]:before{content:""}.uniui-trash[data-v-5610c8db]:before{content:""}.uniui-videocam-filled[data-v-5610c8db]:before{content:""}.uniui-spinner-cycle[data-v-5610c8db]:before{content:""}.uniui-weibo[data-v-5610c8db]:before{content:""}.uniui-videocam[data-v-5610c8db]:before{content:""}.uniui-download[data-v-5610c8db]:before{content:""}.uniui-help[data-v-5610c8db]:before{content:""}.uniui-navigate-filled[data-v-5610c8db]:before{content:""}.uniui-plusempty[data-v-5610c8db]:before{content:""}.uniui-smallcircle[data-v-5610c8db]:before{content:""}.uniui-minus-filled[data-v-5610c8db]:before{content:""}.uniui-micoff[data-v-5610c8db]:before{content:""}.uniui-closeempty[data-v-5610c8db]:before{content:""}.uniui-clear[data-v-5610c8db]:before{content:""}.uniui-navigate[data-v-5610c8db]:before{content:""}.uniui-minus[data-v-5610c8db]:before{content:""}.uniui-image[data-v-5610c8db]:before{content:""}.uniui-mic[data-v-5610c8db]:before{content:""}.uniui-paperplane[data-v-5610c8db]:before{content:""}.uniui-close[data-v-5610c8db]:before{content:""}.uniui-help-filled[data-v-5610c8db]:before{content:""}.uniui-paperplane-filled[data-v-5610c8db]:before{content:""}.uniui-plus[data-v-5610c8db]:before{content:""}.uniui-mic-filled[data-v-5610c8db]:before{content:""}.uniui-image-filled[data-v-5610c8db]:before{content:""}.uniui-locked-filled[data-v-5610c8db]:before{content:""}.uniui-info[data-v-5610c8db]:before{content:""}.uniui-locked[data-v-5610c8db]:before{content:""}.uniui-camera-filled[data-v-5610c8db]:before{content:""}.uniui-chat-filled[data-v-5610c8db]:before{content:""}.uniui-camera[data-v-5610c8db]:before{content:""}.uniui-circle[data-v-5610c8db]:before{content:""}.uniui-checkmarkempty[data-v-5610c8db]:before{content:""}.uniui-chat[data-v-5610c8db]:before{content:""}.uniui-circle-filled[data-v-5610c8db]:before{content:""}.uniui-flag[data-v-5610c8db]:before{content:""}.uniui-flag-filled[data-v-5610c8db]:before{content:""}.uniui-gear-filled[data-v-5610c8db]:before{content:""}.uniui-home[data-v-5610c8db]:before{content:""}.uniui-home-filled[data-v-5610c8db]:before{content:""}.uniui-gear[data-v-5610c8db]:before{content:""}.uniui-smallcircle-filled[data-v-5610c8db]:before{content:""}.uniui-map-filled[data-v-5610c8db]:before{content:""}.uniui-map[data-v-5610c8db]:before{content:""}.uniui-refresh-filled[data-v-5610c8db]:before{content:""}.uniui-refresh[data-v-5610c8db]:before{content:""}.uniui-cloud-upload[data-v-5610c8db]:before{content:""}.uniui-cloud-download-filled[data-v-5610c8db]:before{content:""}.uniui-cloud-download[data-v-5610c8db]:before{content:""}.uniui-cloud-upload-filled[data-v-5610c8db]:before{content:""}.uniui-redo[data-v-5610c8db]:before{content:""}.uniui-images-filled[data-v-5610c8db]:before{content:""}.uniui-undo-filled[data-v-5610c8db]:before{content:""}.uniui-more[data-v-5610c8db]:before{content:""}.uniui-more-filled[data-v-5610c8db]:before{content:""}.uniui-undo[data-v-5610c8db]:before{content:""}.uniui-images[data-v-5610c8db]:before{content:""}.uniui-paperclip[data-v-5610c8db]:before{content:""}.uniui-settings[data-v-5610c8db]:before{content:""}.uniui-search[data-v-5610c8db]:before{content:""}.uniui-redo-filled[data-v-5610c8db]:before{content:""}.uniui-list[data-v-5610c8db]:before{content:""}.uniui-mail-open-filled[data-v-5610c8db]:before{content:""}.uniui-hand-down-filled[data-v-5610c8db]:before{content:""}.uniui-hand-down[data-v-5610c8db]:before{content:""}.uniui-hand-up-filled[data-v-5610c8db]:before{content:""}.uniui-hand-up[data-v-5610c8db]:before{content:""}.uniui-heart-filled[data-v-5610c8db]:before{content:""}.uniui-mail-open[data-v-5610c8db]:before{content:""}.uniui-heart[data-v-5610c8db]:before{content:""}.uniui-loop[data-v-5610c8db]:before{content:""}.uniui-pulldown[data-v-5610c8db]:before{content:""}.uniui-scan[data-v-5610c8db]:before{content:""}.uniui-bars[data-v-5610c8db]:before{content:""}.uniui-checkbox[data-v-5610c8db]:before{content:""}.uniui-checkbox-filled[data-v-5610c8db]:before{content:""}.uniui-shop[data-v-5610c8db]:before{content:""}.uniui-headphones[data-v-5610c8db]:before{content:""}.uniui-cart[data-v-5610c8db]:before{content:""}@font-face{font-family:uniicons;src:url(./uniicons-DN59BOw4.ttf)}.uni-icons[data-v-5610c8db]{font-family:uniicons;text-decoration:none;text-align:center}.nav[data-v-a0074d12]{width:60px;z-index:2;position:relative;-webkit-app-region:drag;background-color:#2e2e2e;display:flex;flex-direction:column}.nav .info[data-v-a0074d12]{width:60px;height:60px;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;position:absolute;bottom:0;left:0;cursor:pointer;z-index:999;-webkit-app-region:no-drag}.nav .info .infoCard[data-v-a0074d12]{width:200px;height:200px;position:fixed;background-color:#fff;display:none;left:60px;bottom:0;z-index:99999}.nav .info:hover .infoCard[data-v-a0074d12]{display:block}.nav .navs[data-v-a0074d12]{width:60px;max-height:100%;padding-bottom:60px;box-sizing:border-box;position:relative;z-index:999;height:3.125rem;flex:1}.nav .navs .pages[data-v-a0074d12]{color:#fff;width:60px;display:flex;flex-wrap:wrap;height:60px;justify-content:center;padding:5px 0;cursor:pointer;-webkit-app-region:no-drag}.nav .navs .pages .icon[data-v-a0074d12]{width:30px;height:30px;line-height:30px;text-align:center;border-radius:5px;color:#fff}.nav .navs .pages .title[data-v-a0074d12]{width:80px;height:30px;line-height:30px;text-align:center;font-size:12px}.nav .navs .pages[data-v-a0074d12]:hover,.nav .navs .on[data-v-a0074d12]{background-color:rgba(255,255,255,.1)}.nav .bottom[data-v-a0074d12]{width:100%;height:80px;color:#fff;text-align:center;cursor:pointer}.menu[data-v-a0074d12]{width:150px;background:#eee;margin-left:auto} diff --git a/app/assets/public/wechat_1.0.6/assets/m-nav.CZV981Qo.js b/app/assets/public/wechat_1.0.6/assets/m-nav.CZV981Qo.js new file mode 100644 index 0000000..13786a0 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/m-nav.CZV981Qo.js @@ -0,0 +1 @@ +import{o,c as s,w as n,G as e,H as c,y as l,D as i,u as a,g as t,q as d,a7 as f,f as u,b as _,h as r,F as p,j as h,d as m,t as g,i as y,S as C}from"./index-B8U-SFxP.js";import{_ as S}from"./_plugin-vue_export-helper.BCo6x5W8.js";const E=[{font_class:"arrow-down",unicode:""},{font_class:"arrow-left",unicode:""},{font_class:"arrow-right",unicode:""},{font_class:"arrow-up",unicode:""},{font_class:"auth",unicode:""},{font_class:"auth-filled",unicode:""},{font_class:"back",unicode:""},{font_class:"bars",unicode:""},{font_class:"calendar",unicode:""},{font_class:"calendar-filled",unicode:""},{font_class:"camera",unicode:""},{font_class:"camera-filled",unicode:""},{font_class:"cart",unicode:""},{font_class:"cart-filled",unicode:""},{font_class:"chat",unicode:""},{font_class:"chat-filled",unicode:""},{font_class:"chatboxes",unicode:""},{font_class:"chatboxes-filled",unicode:""},{font_class:"chatbubble",unicode:""},{font_class:"chatbubble-filled",unicode:""},{font_class:"checkbox",unicode:""},{font_class:"checkbox-filled",unicode:""},{font_class:"checkmarkempty",unicode:""},{font_class:"circle",unicode:""},{font_class:"circle-filled",unicode:""},{font_class:"clear",unicode:""},{font_class:"close",unicode:""},{font_class:"closeempty",unicode:""},{font_class:"cloud-download",unicode:""},{font_class:"cloud-download-filled",unicode:""},{font_class:"cloud-upload",unicode:""},{font_class:"cloud-upload-filled",unicode:""},{font_class:"color",unicode:""},{font_class:"color-filled",unicode:""},{font_class:"compose",unicode:""},{font_class:"contact",unicode:""},{font_class:"contact-filled",unicode:""},{font_class:"down",unicode:""},{font_class:"bottom",unicode:""},{font_class:"download",unicode:""},{font_class:"download-filled",unicode:""},{font_class:"email",unicode:""},{font_class:"email-filled",unicode:""},{font_class:"eye",unicode:""},{font_class:"eye-filled",unicode:""},{font_class:"eye-slash",unicode:""},{font_class:"eye-slash-filled",unicode:""},{font_class:"fire",unicode:""},{font_class:"fire-filled",unicode:""},{font_class:"flag",unicode:""},{font_class:"flag-filled",unicode:""},{font_class:"folder-add",unicode:""},{font_class:"folder-add-filled",unicode:""},{font_class:"font",unicode:""},{font_class:"forward",unicode:""},{font_class:"gear",unicode:""},{font_class:"gear-filled",unicode:""},{font_class:"gift",unicode:""},{font_class:"gift-filled",unicode:""},{font_class:"hand-down",unicode:""},{font_class:"hand-down-filled",unicode:""},{font_class:"hand-up",unicode:""},{font_class:"hand-up-filled",unicode:""},{font_class:"headphones",unicode:""},{font_class:"heart",unicode:""},{font_class:"heart-filled",unicode:""},{font_class:"help",unicode:""},{font_class:"help-filled",unicode:""},{font_class:"home",unicode:""},{font_class:"home-filled",unicode:""},{font_class:"image",unicode:""},{font_class:"image-filled",unicode:""},{font_class:"images",unicode:""},{font_class:"images-filled",unicode:""},{font_class:"info",unicode:""},{font_class:"info-filled",unicode:""},{font_class:"left",unicode:""},{font_class:"link",unicode:""},{font_class:"list",unicode:""},{font_class:"location",unicode:""},{font_class:"location-filled",unicode:""},{font_class:"locked",unicode:""},{font_class:"locked-filled",unicode:""},{font_class:"loop",unicode:""},{font_class:"mail-open",unicode:""},{font_class:"mail-open-filled",unicode:""},{font_class:"map",unicode:""},{font_class:"map-filled",unicode:""},{font_class:"map-pin",unicode:""},{font_class:"map-pin-ellipse",unicode:""},{font_class:"medal",unicode:""},{font_class:"medal-filled",unicode:""},{font_class:"mic",unicode:""},{font_class:"mic-filled",unicode:""},{font_class:"micoff",unicode:""},{font_class:"micoff-filled",unicode:""},{font_class:"minus",unicode:""},{font_class:"minus-filled",unicode:""},{font_class:"more",unicode:""},{font_class:"more-filled",unicode:""},{font_class:"navigate",unicode:""},{font_class:"navigate-filled",unicode:""},{font_class:"notification",unicode:""},{font_class:"notification-filled",unicode:""},{font_class:"paperclip",unicode:""},{font_class:"paperplane",unicode:""},{font_class:"paperplane-filled",unicode:""},{font_class:"person",unicode:""},{font_class:"person-filled",unicode:""},{font_class:"personadd",unicode:""},{font_class:"personadd-filled",unicode:""},{font_class:"personadd-filled-copy",unicode:""},{font_class:"phone",unicode:""},{font_class:"phone-filled",unicode:""},{font_class:"plus",unicode:""},{font_class:"plus-filled",unicode:""},{font_class:"plusempty",unicode:""},{font_class:"pulldown",unicode:""},{font_class:"pyq",unicode:""},{font_class:"qq",unicode:""},{font_class:"redo",unicode:""},{font_class:"redo-filled",unicode:""},{font_class:"refresh",unicode:""},{font_class:"refresh-filled",unicode:""},{font_class:"refreshempty",unicode:""},{font_class:"reload",unicode:""},{font_class:"right",unicode:""},{font_class:"scan",unicode:""},{font_class:"search",unicode:""},{font_class:"settings",unicode:""},{font_class:"settings-filled",unicode:""},{font_class:"shop",unicode:""},{font_class:"shop-filled",unicode:""},{font_class:"smallcircle",unicode:""},{font_class:"smallcircle-filled",unicode:""},{font_class:"sound",unicode:""},{font_class:"sound-filled",unicode:""},{font_class:"spinner-cycle",unicode:""},{font_class:"staff",unicode:""},{font_class:"staff-filled",unicode:""},{font_class:"star",unicode:""},{font_class:"star-filled",unicode:""},{font_class:"starhalf",unicode:""},{font_class:"trash",unicode:""},{font_class:"trash-filled",unicode:""},{font_class:"tune",unicode:""},{font_class:"tune-filled",unicode:""},{font_class:"undo",unicode:""},{font_class:"undo-filled",unicode:""},{font_class:"up",unicode:""},{font_class:"top",unicode:""},{font_class:"upload",unicode:""},{font_class:"upload-filled",unicode:""},{font_class:"videocam",unicode:""},{font_class:"videocam-filled",unicode:""},{font_class:"vip",unicode:""},{font_class:"vip-filled",unicode:""},{font_class:"wallet",unicode:""},{font_class:"wallet-filled",unicode:""},{font_class:"weibo",unicode:""},{font_class:"weixin",unicode:""}];const b=S({name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customPrefix:{type:String,default:""},fontFamily:{type:String,default:""}},data:()=>({icons:E}),computed:{unicode(){let o=this.icons.find((o=>o.font_class===this.type));return o?o.unicode:""},iconSize(){return"number"==typeof(o=this.size)||/^[0-9]*$/g.test(o)?o+"px":o;var o},styleObj(){return""!==this.fontFamily?`color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`:`color: ${this.color}; font-size: ${this.iconSize};`}},methods:{_onClick(){this.$emit("click")}}},[["render",function(a,t,d,f,u,_){const r=i;return o(),s(r,{style:c(_.styleObj),class:l(["uni-icons",["uniui-"+d.type,d.customPrefix,d.customPrefix?d.type:""]]),onClick:_._onClick},{default:n((()=>[e(a.$slots,"default",{},void 0,!0)])),_:3},8,["style","class","onClick"])}],["__scopeId","data-v-5610c8db"]]);function O(o,s){return"string"==typeof o?s:o}const w=S({name:"navs",data:()=>({navs:[{title:"快递群",icon:"bars",page:"/pages/index/index"},{title:"货主群",icon:"bars",page:"/pages/index/store"},{title:"内部群",icon:"bars",page:"/pages/index/interior"},{title:"群发",icon:"bars",page:"/pages/index/groupSend"},{title:"消息记录",icon:"bars",page:"/pages/index/log"},{title:"订单采集",icon:"bars",page:"/pages/index/order"}],userinfo:{},SOURCE:"",NEXTSOURCECODE:"",SOURCECODES:{}}),props:{n:{type:Number,default:0,require:!0,validator:function(o){return o>=0}}},created(){const o=a();let s=t("SOURCE");if(s||(s="wx",d("SOURCE","wx")),Array.isArray(o.sources)&&o.sources.length>0){this.SOURCECODES=Object.fromEntries(o.sources.map((o=>[o.code,o.name]))),this.SOURCE=s;const n=o.sources.map((o=>o.code)),e=n.indexOf(this.SOURCE);this.NEXTSOURCECODE=n[(e+1)%n.length]}else this.SOURCECODES={wx:"微信",qiwe:"企业微信"},this.SOURCE=s,this.NEXTSOURCECODE="wx"===this.SOURCE?"qiwe":"wx"},methods:{toPage(o){f({url:o})},changeSource(){d("SOURCE",this.NEXTSOURCECODE),window.location.reload()}}},[["render",function(e,c,i,a,t,d){const f=y,S=O(u("uni-icons"),b),E=C;return o(),s(f,{class:"nav"},{default:n((()=>[_(f,{class:"region"}),_(E,{"scroll-y":"true",class:"navs"},{default:n((()=>[(o(!0),r(p,null,h(t.navs,((e,c)=>(o(),s(f,{class:l(["pages",i.n==c?"on":""]),onClick:o=>d.toPage(e.page)},{default:n((()=>[_(S,{type:e.icon,size:"30",class:"icon",color:"#FFF","custom-prefix":"iconfont"},null,8,["type"]),_(f,{class:"title"},{default:n((()=>[m(g(e.title),1)])),_:2},1024)])),_:2},1032,["class","onClick"])))),256))])),_:1}),_(f,{class:"bottom",onClick:d.changeSource},{default:n((()=>[_(f,null,{default:n((()=>[m("切换到")])),_:1}),_(f,null,{default:n((()=>[m(g(t.SOURCECODES[t.NEXTSOURCECODE]),1)])),_:1})])),_:1},8,["onClick"])])),_:1})}],["__scopeId","data-v-a0074d12"]]);export{b as _,w as a,O as r}; diff --git a/app/assets/public/wechat_1.0.6/assets/method-B5TbvMse.css b/app/assets/public/wechat_1.0.6/assets/method-B5TbvMse.css new file mode 100644 index 0000000..f3a41d0 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/method-B5TbvMse.css @@ -0,0 +1 @@ +.win-box[data-v-be5b4899]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:999;padding-left:60px;padding-top:40px;box-sizing:border-box}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899]{position:absolute;width:500px;height:500px;background-color:#ccc;margin:auto;top:20px;left:0;right:0;box-shadow:rgba(0,0,0,.3) 1px 1px 50px}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-head[data-v-be5b4899]{width:100%;height:30px;line-height:30px;background-color:#87ceeb;position:relative}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-head[data-v-be5b4899] .win-close[data-v-be5b4899]{position:absolute;right:10px;cursor:pointer}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-head[data-v-be5b4899] .win-title[data-v-be5b4899]{position:absolute;left:10px;color:#fff}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-content[data-v-be5b4899]{width:100%;height:470px;padding:5px;box-sizing:border-box;display:flex}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-content[data-v-be5b4899] .win-infos[data-v-be5b4899]{width:100%;height:100%;background-color:#fff;padding:5px;box-sizing:border-box}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-content[data-v-be5b4899] .win-infos[data-v-be5b4899] .line[data-v-be5b4899]{width:100%;min-height:2.5rem;line-height:2.5rem;display:flex;flex-wrap:nowrap}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-content[data-v-be5b4899] .win-infos[data-v-be5b4899] .line[data-v-be5b4899] .title[data-v-be5b4899]{width:100px}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-content[data-v-be5b4899] .value[data-v-be5b4899]{display:inline-block;vertical-align:middle;width:100px;height:30px;line-height:30px;background-color:#efefef;border:1px solid #000;box-sizing:border-box;padding:0 10px;text-align:center;font-size:14px}.win-box[data-v-be5b4899] .win-win[data-v-be5b4899] .win-content[data-v-be5b4899] .btn[data-v-be5b4899]{background-color:#00f;color:#fff;cursor:pointer}.win-box[data-v-be5b4899] .textarea[data-v-be5b4899]{cursor:pointer;flex:1;font-size:14px;border:1px solid #e5e5e5;box-sizing:border-box;border-radius:4px;padding:0 5px 0 10px;position:relative;display:flex;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;border-bottom:solid 1px #e5e5e5;width:100%} diff --git a/app/assets/public/wechat_1.0.6/assets/order-BaHcfnrg.css b/app/assets/public/wechat_1.0.6/assets/order-BaHcfnrg.css new file mode 100644 index 0000000..f726f78 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/order-BaHcfnrg.css @@ -0,0 +1 @@ +.uni-calendar-item__weeks-box[data-v-33ef2289]{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:1px 0;position:relative}.uni-calendar-item__weeks-box-text[data-v-33ef2289]{font-size:14px;font-weight:700;color:#001833}.uni-calendar-item__weeks-box-item[data-v-33ef2289]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:40px;height:40px;cursor:pointer}.uni-calendar-item__weeks-box-circle[data-v-33ef2289]{position:absolute;top:5px;right:5px;width:8px;height:8px;border-radius:8px;background-color:#dd524d}.uni-calendar-item__weeks-box .uni-calendar-item--disable[data-v-33ef2289]{cursor:default}.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable[data-v-33ef2289]{color:#d1d1d1}.uni-calendar-item--today[data-v-33ef2289]{position:absolute;top:10px;right:17%;background-color:#dd524d;width:6px;height:6px;border-radius:50%}.uni-calendar-item--extra[data-v-33ef2289]{color:#dd524d;opacity:.8}.uni-calendar-item__weeks-box .uni-calendar-item--checked[data-v-33ef2289]{background-color:#007aff;border-radius:50%;box-sizing:border-box;border:3px solid #fff}.uni-calendar-item--checked .uni-calendar-item--checked-text[data-v-33ef2289]{color:#fff}.uni-calendar-item--multiple .uni-calendar-item--checked-range-text[data-v-33ef2289]{color:#333}.uni-calendar-item--multiple[data-v-33ef2289]{background-color:#f6f7fc}.uni-calendar-item--multiple .uni-calendar-item--before-checked[data-v-33ef2289],.uni-calendar-item--multiple .uni-calendar-item--after-checked[data-v-33ef2289]{background-color:#007aff;border-radius:50%;box-sizing:border-box;border:3px solid #F6F7FC}.uni-calendar-item--before-checked .uni-calendar-item--checked-text[data-v-33ef2289],.uni-calendar-item--after-checked .uni-calendar-item--checked-text[data-v-33ef2289]{color:#fff}.uni-calendar-item--before-checked-x[data-v-33ef2289]{border-top-left-radius:50px;border-bottom-left-radius:50px;box-sizing:border-box;background-color:#f6f7fc}.uni-calendar-item--after-checked-x[data-v-33ef2289]{border-top-right-radius:50px;border-bottom-right-radius:50px;background-color:#f6f7fc}.uni-datetime-picker-view[data-v-8e4813cb]{height:130px;width:270px;cursor:pointer}.uni-datetime-picker-item[data-v-8e4813cb]{height:50px;line-height:50px;text-align:center;font-size:14px}.uni-datetime-picker-btn[data-v-8e4813cb]{margin-top:60px;display:flex;cursor:pointer;flex-direction:row;justify-content:space-between}.uni-datetime-picker-btn-text[data-v-8e4813cb]{font-size:14px;color:#007aff}.uni-datetime-picker-btn-group[data-v-8e4813cb]{display:flex;flex-direction:row}.uni-datetime-picker-cancel[data-v-8e4813cb]{margin-right:30px}.uni-datetime-picker-mask[data-v-8e4813cb]{position:fixed;bottom:0;top:0;left:0;right:0;background-color:rgba(0,0,0,.4);transition-duration:.3s;z-index:998}.uni-datetime-picker-popup[data-v-8e4813cb]{border-radius:8px;padding:30px;width:270px;background-color:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);transition-duration:.3s;z-index:999}.uni-datetime-picker-time[data-v-8e4813cb]{color:gray}.uni-datetime-picker-column[data-v-8e4813cb]{height:50px}.uni-datetime-picker-timebox[data-v-8e4813cb]{border:1px solid #E5E5E5;border-radius:5px;padding:7px 10px;box-sizing:border-box;cursor:pointer}.uni-datetime-picker-timebox-pointer[data-v-8e4813cb]{cursor:pointer}.uni-datetime-picker-disabled[data-v-8e4813cb]{opacity:.4;cursor:not-allowed!important}.uni-datetime-picker-text[data-v-8e4813cb]{font-size:14px;line-height:50px}.uni-datetime-picker-sign[data-v-8e4813cb]{position:absolute;top:53px;color:#999}.sign-left[data-v-8e4813cb]{left:86px}.sign-right[data-v-8e4813cb]{right:86px}.sign-center[data-v-8e4813cb]{left:135px}.uni-datetime-picker__container-box[data-v-8e4813cb]{position:relative;display:flex;align-items:center;justify-content:center;margin-top:40px}.time-hide-second[data-v-8e4813cb]{width:180px}.uni-calendar[data-v-24c3b263]{display:flex;flex-direction:column}.uni-calendar__mask[data-v-24c3b263]{position:fixed;bottom:0;top:0;left:0;right:0;background-color:rgba(0,0,0,.4);transition-property:opacity;transition-duration:.3s;opacity:0;z-index:99}.uni-calendar--mask-show[data-v-24c3b263]{opacity:1}.uni-calendar--fixed[data-v-24c3b263]{position:fixed;bottom:calc(var(--window-bottom));left:0;right:0;transition-property:transform;transition-duration:.3s;transform:translateY(460px);z-index:99}.uni-calendar--ani-show[data-v-24c3b263]{transform:translateY(0)}.uni-calendar__content[data-v-24c3b263]{background-color:#fff}.uni-calendar__content-mobile[data-v-24c3b263]{border-top-left-radius:10px;border-top-right-radius:10px;box-shadow:0 0 5px 3px rgba(0,0,0,.1)}.uni-calendar__header[data-v-24c3b263]{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:50px}.uni-calendar__header-mobile[data-v-24c3b263]{padding:10px 10px 0}.uni-calendar--fixed-top[data-v-24c3b263]{display:flex;flex-direction:row;justify-content:space-between;border-top-color:rgba(0,0,0,.4);border-top-style:solid;border-top-width:1px}.uni-calendar--fixed-width[data-v-24c3b263]{width:50px}.uni-calendar__backtoday[data-v-24c3b263]{position:absolute;right:0;top:.78125rem;padding:0 5px 0 10px;height:25px;line-height:25px;font-size:12px;border-top-left-radius:25px;border-bottom-left-radius:25px;color:#fff;background-color:#f1f1f1}.uni-calendar__header-text[data-v-24c3b263]{text-align:center;width:100px;font-size:15px;color:#666}.uni-calendar__button-text[data-v-24c3b263]{text-align:center;width:100px;font-size:14px;color:#007aff;letter-spacing:3px}.uni-calendar__header-btn-box[data-v-24c3b263]{display:flex;flex-direction:row;align-items:center;justify-content:center;width:50px;height:50px}.uni-calendar__header-btn[data-v-24c3b263]{width:9px;height:9px;border-left-color:gray;border-left-style:solid;border-left-width:1px;border-top-color:#555;border-top-style:solid;border-top-width:1px}.uni-calendar--left[data-v-24c3b263]{transform:rotate(-45deg)}.uni-calendar--right[data-v-24c3b263]{transform:rotate(135deg)}.uni-calendar__weeks[data-v-24c3b263]{position:relative;display:flex;flex-direction:row}.uni-calendar__weeks-item[data-v-24c3b263]{flex:1}.uni-calendar__weeks-day[data-v-24c3b263]{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;height:40px;border-bottom-color:#f5f5f5;border-bottom-style:solid;border-bottom-width:1px}.uni-calendar__weeks-day-text[data-v-24c3b263]{font-size:12px;color:#b2b2b2}.uni-calendar__box[data-v-24c3b263]{position:relative;padding-bottom:7px}.uni-calendar__box-bg[data-v-24c3b263]{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;right:0;bottom:0}.uni-calendar__box-bg-text[data-v-24c3b263]{font-size:200px;font-weight:700;color:#999;opacity:.1;text-align:center;line-height:1}.uni-date-changed[data-v-24c3b263]{padding:0 10px;text-align:center;color:#333;border-top-color:#dcdcdc;border-top-style:solid;border-top-width:1px;flex:1}.uni-date-btn--ok[data-v-24c3b263]{padding:20px 15px}.uni-date-changed--time-start[data-v-24c3b263],.uni-date-changed--time-end[data-v-24c3b263]{display:flex;align-items:center}.uni-date-changed--time-date[data-v-24c3b263]{color:#999;line-height:50px;margin-right:5px}.time-picker-style[data-v-24c3b263]{display:flex;justify-content:center;align-items:center}.mr-10[data-v-24c3b263]{margin-right:10px}.dialog-close[data-v-24c3b263]{position:absolute;top:0;right:0;bottom:0;display:flex;flex-direction:row;align-items:center;padding:0 25px;margin-top:10px}.dialog-close-plus[data-v-24c3b263]{width:16px;height:2px;background-color:#737987;border-radius:2px;transform:rotate(45deg)}.dialog-close-rotate[data-v-24c3b263]{position:absolute;transform:rotate(-45deg)}.uni-datetime-picker--btn[data-v-24c3b263]{border-radius:100px;height:40px;line-height:40px;background-color:#007aff;color:#fff;font-size:16px;letter-spacing:2px}.uni-datetime-picker--btn[data-v-24c3b263]:active{opacity:.7}.uni-date[data-v-242b3c99]{width:100%;flex:1}.uni-date-x[data-v-242b3c99]{display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:4px;background-color:#fff;color:#666;font-size:14px;flex:1}.uni-date-x .icon-calendar[data-v-242b3c99]{padding-left:3px}.uni-date-x .range-separator[data-v-242b3c99]{height:35px;padding:0 2px;line-height:35px}.uni-date-x--border[data-v-242b3c99]{box-sizing:border-box;border-radius:4px;border:1px solid #e5e5e5}.uni-date-editor--x[data-v-242b3c99]{display:flex;align-items:center;position:relative}.uni-date-editor--x .uni-date__icon-clear[data-v-242b3c99]{padding-right:3px;display:flex;align-items:center;cursor:pointer}.uni-date__x-input[data-v-242b3c99]{width:auto;height:35px;padding-left:5px;position:relative;flex:1;line-height:35px;font-size:14px;overflow:hidden}.text-center[data-v-242b3c99]{text-align:center}.uni-date__input[data-v-242b3c99]{height:40px;width:100%;line-height:40px;font-size:14px}.uni-date-range__input[data-v-242b3c99]{text-align:center;max-width:142px}.uni-date-picker__container[data-v-242b3c99]{position:relative}.uni-date-mask--pc[data-v-242b3c99]{position:fixed;bottom:0;top:0;left:0;right:0;background-color:rgba(0,0,0,0);transition-duration:.3s;z-index:996}.uni-date-single--x[data-v-242b3c99],.uni-date-range--x[data-v-242b3c99]{background-color:#fff;position:absolute;top:0;z-index:999;border:1px solid #EBEEF5;box-shadow:0 2px 12px rgba(0,0,0,.1);border-radius:4px}.uni-date-editor--x__disabled[data-v-242b3c99]{opacity:.4;cursor:default}.uni-date-editor--logo[data-v-242b3c99]{width:16px;height:16px;vertical-align:middle}.popup-x-header[data-v-242b3c99]{display:flex;flex-direction:row}.popup-x-header--datetime[data-v-242b3c99]{display:flex;flex-direction:row;flex:1}.popup-x-body[data-v-242b3c99]{display:flex}.popup-x-footer[data-v-242b3c99]{padding:0 15px;border-top-color:#f1f1f1;border-top-style:solid;border-top-width:1px;line-height:40px;text-align:right;color:#666}.popup-x-footer uni-text[data-v-242b3c99]:hover{color:#007aff;cursor:pointer;opacity:.8}.popup-x-footer .confirm-text[data-v-242b3c99]{margin-left:20px;color:#007aff}.uni-date-changed[data-v-242b3c99]{text-align:center;color:#333;border-bottom-color:#f1f1f1;border-bottom-style:solid;border-bottom-width:1px}.uni-date-changed--time uni-text[data-v-242b3c99]{height:50px;line-height:50px}.uni-date-changed .uni-date-changed--time[data-v-242b3c99]{flex:1}.uni-date-changed--time-date[data-v-242b3c99]{color:#333;opacity:.6}.mr-50[data-v-242b3c99]{margin-right:50px}.uni-popper__arrow[data-v-242b3c99],.uni-popper__arrow[data-v-242b3c99]:after{position:absolute;display:block;width:0;height:0;border:6px solid transparent;border-top-width:0}.uni-popper__arrow[data-v-242b3c99]{filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));top:-6px;left:10%;margin-right:3px;border-bottom-color:#ebeef5}.uni-popper__arrow[data-v-242b3c99]:after{content:" ";top:1px;margin-left:-6px;border-bottom-color:#fff}.textarea[data-v-419440fd]{border:1px solid #999;width:100%;height:520px}.win-box[data-v-419440fd]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:999;padding-left:60px;padding-top:40px;box-sizing:border-box}.win-box .win-win[data-v-419440fd]{position:absolute;width:820px;height:600px;background-color:#ccc;margin:auto;top:0;left:0;right:0;bottom:0;box-shadow:rgba(0,0,0,.3) 1px 1px 50px}.win-box .win-win .win-head[data-v-419440fd]{width:100%;height:30px;line-height:30px;background-color:#87ceeb;position:relative}.win-box .win-win .win-head .win-close[data-v-419440fd]{position:absolute;right:10px;cursor:pointer}.win-box .win-win .win-head .win-title[data-v-419440fd]{position:absolute;left:10px;color:#fff}.win-box .win-win .win-content[data-v-419440fd]{width:100%;height:570px;padding:5px;box-sizing:border-box;-webkit-user-select:text;user-select:text;display:flex;flex-direction:column}.win-box .win-win .win-content .win-infos[data-v-419440fd]{width:100%;height:100%;background-color:#fff;padding:5px;box-sizing:border-box;overflow:auto;overflow-x:hidden}.win-box .win-win .win-content .win-infos .line[data-v-419440fd]{width:100%;display:flex;flex-wrap:nowrap;line-height:40px;border-bottom:.15625rem solid #999;border-right:.15625rem solid #999}.win-box .win-win .win-content .win-infos .line .title[data-v-419440fd]{width:220px;border-right:.15625rem solid #999;border-left:.15625rem solid #999;padding-right:20px;margin-right:0;text-align:right;box-sizing:border-box}.win-box .win-win .win-content .win-infos .line .value[data-v-419440fd]{width:100%;line-height:40px;height:auto;padding-left:20px;box-sizing:border-box}.win-box .win-win .win-content .win-infos .line uni-input[data-v-419440fd]{border:1px solid greenyellow}.win-box .win-win .win-content .win-infos .line[data-v-419440fd]:nth-child(1){border-top:.15625rem solid #999}.win-box .win-win .win-content .btn[data-v-419440fd]{background-color:#00f;color:#fff;cursor:pointer}.win-box .win-win .bottom[data-v-419440fd]{width:100%;height:60px}.win-box .win-win .bottom uni-button[data-v-419440fd]{width:100px;height:40px;line-height:40px;margin-top:10px}.textarea[data-v-d4cc538f]{border:1px solid #999;width:100%;height:520px}.win-box[data-v-d4cc538f]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:999;padding-left:60px;padding-top:40px;box-sizing:border-box}.win-box .win-win[data-v-d4cc538f]{position:absolute;width:1220px;height:600px;background-color:#ccc;margin:auto;top:0;left:0;right:0;bottom:0;box-shadow:rgba(0,0,0,.3) 1px 1px 50px}.win-box .win-win .win-head[data-v-d4cc538f]{width:100%;height:30px;line-height:30px;background-color:#87ceeb;position:relative}.win-box .win-win .win-head .win-close[data-v-d4cc538f]{position:absolute;right:10px;cursor:pointer}.win-box .win-win .win-head .win-title[data-v-d4cc538f]{position:absolute;left:10px;color:#fff}.win-box .win-win .win-content[data-v-d4cc538f]{width:100%;height:570px;padding:5px;box-sizing:border-box;-webkit-user-select:text;user-select:text}.win-box .win-win .win-content .win-infos[data-v-d4cc538f]{width:100%;height:50%;background-color:#fff;padding:5px;box-sizing:border-box;overflow-y:auto;overflow-x:hidden}.win-box .win-win .win-content .win-infos .line[data-v-d4cc538f]{width:100%;display:flex;flex-wrap:nowrap;line-height:25px;border-bottom:.15625rem solid #999;border-left:.15625rem solid #999;border-right:.15625rem solid #999;font-size:12px;box-sizing:border-box}.win-box .win-win .win-content .win-infos .line .title[data-v-d4cc538f]{margin-right:20px;width:120px;border-right:.15625rem solid #999;padding-right:20px;text-align:right;box-sizing:border-box}.win-box .win-win .win-content .win-infos .line .title2[data-v-d4cc538f]{width:180px;text-align:center;border-right:.15625rem solid #999;box-sizing:border-box}.win-box .win-win .win-content .win-infos .line .title2[data-v-d4cc538f]:last-child{border:none}.win-box .win-win .win-content .win-infos .line .value[data-v-d4cc538f]{width:600px}.win-box .win-win .win-content .win-infos .line .search[data-v-d4cc538f]{height:30px;line-height:30px}.win-box .win-win .win-content .win-infos .from[data-v-d4cc538f]{width:100%;height:240px;overflow-y:auto}.win-box .win-win .win-content .win-infos .from2[data-v-d4cc538f]{width:100%;height:200px;overflow-y:auto}.win-box .win-win .win-content .win-infos .line[data-v-d4cc538f]:nth-child(1){border-top:.15625rem solid #999}.win-box .win-win .win-content .btn[data-v-d4cc538f]{background-color:#00f;color:#fff;cursor:pointer}table[data-v-d4cc538f]{width:100%;height:100%;display:block!important;overflow-y:auto!important}thead[data-v-d4cc538f]{height:30px;width:100%;position:-webkit-sticky;position:sticky;top:0;z-index:99}tbody[data-v-d4cc538f]{height:100%;width:100%;box-sizing:border-box}thead tr[data-v-d4cc538f]{background-color:#dde3f7}tbody tr[data-v-d4cc538f]:hover{background-color:#ffffe0;color:#000}.contents[data-v-02bae89d]{display:flex;flex-wrap:nowrap;flex-direction:column;overflow:hidden;width:100%!important;height:100%!important;margin:0!important;padding:.625rem;box-sizing:border-box}.contents .where[data-v-02bae89d]{overflow:hidden;height:0;transition:1s all;display:flex;background-color:#fff;flex-wrap:wrap}.contents .where .item[data-v-02bae89d]{min-width:12.5rem;height:2.1875rem;line-height:1.25rem;margin:.3125rem;box-sizing:border-box}.contents .where .item .input[data-v-02bae89d]{font-size:.875rem;border:1px solid #e5e5e5;box-sizing:border-box;height:2.1875rem;border-radius:.25rem;padding:0 .3125rem 0 .625rem;position:relative;display:flex;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;border-bottom:solid 1px #e5e5e5;width:100%}.contents .where .item .btn[data-v-02bae89d]{height:2.1875rem;line-height:2.1875rem}.contents .where .item .noBorder[data-v-02bae89d]{border:none}.contents .where.open[data-v-02bae89d]{height:auto;overflow:unset;z-index:999}.contents .bottominfo[data-v-02bae89d]{position:relative!important;height:3.125rem!important}.operator[data-v-02bae89d]{position:relative!important}.list[data-v-02bae89d]{flex-grow:1;padding-bottom:0!important;overflow:hidden}.list .box[data-v-02bae89d]{padding-top:0!important}.bottom[data-v-02bae89d]{height:2.5rem}.uni-select[data-v-02bae89d]{border:none!important}.checkbox-group .operator .btn[data-v-02bae89d]{margin:.625rem;color:#00f;cursor:pointer}.inputBox[data-v-02bae89d]{width:auto!important}.input-timebox[data-v-02bae89d]{width:230px!important} diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-groupSend.4IkvuQhu.js b/app/assets/public/wechat_1.0.6/assets/pages-index-groupSend.4IkvuQhu.js new file mode 100644 index 0000000..2dfb022 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-groupSend.4IkvuQhu.js @@ -0,0 +1 @@ +import{r as t,a as e,_ as a}from"./m-nav.CZV981Qo.js";import{f as s,c as n,w as i,i as l,o,b as c,x as d,h as r,j as f,F as u,S as h,t as g}from"./index-B8U-SFxP.js";import{_ as m}from"./_plugin-vue_export-helper.BCo6x5W8.js";const p=m({data:()=>({list:[]}),onLoad(){this.getList()},methods:{getList(t=!1){this.list=[{id:1,content:"群发内容A",time:"2026-03-20 10:00"},{id:2,content:"群发内容B",time:"2026-03-20 11:00"}]}}},[["render",function(m,p,_,b,x,w){const j=t(s("m-nav"),e),v=t(s("uni-icons"),a),y=l,L=h;return o(),n(y,{class:"content"},{default:i((()=>[c(j,{n:3}),c(y,{class:"box"},{default:i((()=>[c(y,{class:"contents"},{default:i((()=>[c(y,{class:"operator"},{default:i((()=>[c(y,{class:"item",onClick:p[0]||(p[0]=t=>w.getList(!0))},{default:i((()=>[c(v,{type:"refreshempty",size:"14"})])),_:1})])),_:1}),c(L,{class:"list"},{default:i((()=>[d("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2",class:"box"},[d("thead",null,[d("tr",null,[d("th",{align:"center",width:"1%"}),d("th",{align:"center",width:"20%"},"群发内容"),d("th",{align:"center",width:"20%"},"发送时间")])]),d("tbody",null,[(o(!0),r(u,null,f(x.list,((t,e)=>(o(),r("tr",{key:t.id,index:e,bgcolor:"#fff"},[d("td",{align:"center",width:"1%"}),d("td",{align:"center"},g(t.content),1),d("td",{align:"center"},g(t.time),1)],8,["index"])))),128))])])])),_:1})])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-a93c1656"]]);export{p as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-index.BgtT8MtD.js b/app/assets/public/wechat_1.0.6/assets/pages-index-index.BgtT8MtD.js new file mode 100644 index 0000000..14d7fa3 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-index.BgtT8MtD.js @@ -0,0 +1 @@ +import{r as e,g as t,s,f as a,o,c as i,w as l,b as d,d as n,t as c,h as r,F as h,j as u,k as m,i as g,l as p,m as _,n as f,S as w,p as C,u as k,q as S,v as x,x as E,y as O,z as R,A as b}from"./index-B8U-SFxP.js";import{r as y,_ as T,a as v}from"./m-nav.CZV981Qo.js";import{_ as L}from"./uni-data-select.i2-ymEG0.js";import{u as A}from"./user.Bm-2eyfO.js";import{_ as U}from"./_plugin-vue_export-helper.BCo6x5W8.js";const M=U({name:"win-add2",props:["isshow","storeid","storeName","wxid","name","isAdd","room"],data:()=>({tip:"",data:{room_id:null,islanshow:0},items:[{name:"默认",value:"default",checked:!1}],roomsRange:[],postcodeRange:[],storeRange:[],isMainRange:[{value:0,text:"否"},{value:1,text:"是"}],typeRange:[{value:1,text:"货主群"},{value:2,text:"内部群"},{value:3,text:"快递群"}]}),watch:{isshow:function(e,t){if(!e)throw"关闭";this.get_express_ecnotes(),this.isAdd?(this.get_all_nobing_rooms(),this.data={STOREID:"",POSTCODE:this.storeid,type:3,isMain:0,isStorge:0,isBack:0,auto_feedback_active:0,islanshow:0,ECNOTES:[]}):this.data={STOREID:"",POSTCODE:this.storeid,room_id:this.room.room_id,type:3,isMain:this.room.isMain,isStorge:this.room.isStorge,isBack:this.room.isBack,auto_feedback_active:this.room.auto_feedback_active,islanshow:this.room.islanshow,ECNOTES:this.room.ECNOTES?this.room.ECNOTES.split(","):[]},this.$forceUpdate()}},methods:{checkboxChange(e){const t=e.detail.value;this.data.ECNOTES=t},close(){this.tip="",this.$emit("close",!1)},save(){const a=this;console.log("saveClick"),console.log(A.getToken()),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/save_room",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:A.getToken(),Source:t("SOURCE")||"wx"},data:{data:this.data},success(e){if(1==e.data){let e=a.isAdd?"添加成功":"修改成功";s({title:e,duration:2e3}),a.close()}}})},get_all_nobing_rooms(){const s=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_all_nobing_rooms",method:"GET",header:{"X-Requested-With":"XMLHttpRequest",token:A.getToken(),Source:t("SOURCE")||"wx"},success(e){s.roomsRange=e.data.roomList,console.log(s.roomsRange)}})},get_express_ecnotes(){const s=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_express_ecnotes",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:A.getToken(),Source:t("SOURCE")||"wx"},data:{POSTCODE:this.storeid},success(e){console.log(e);s.items=[{name:"默认",value:"default",checked:!1},...e.data],s.items.forEach((e=>{e.checked=!1,s.data.ECNOTES.forEach((t=>{t==e.value&&(e.checked=!0)}))})),console.log("items",s.items)}})},getRoominfo(){const s=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/findRoom",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:A.getToken(),Source:t("SOURCE")||"wx"},data:{room_id:this.data.room_id},success(e){e.data?(s.data.type=e.data.type,s.data.STOREID=e.data.STOREID,s.data.POSTCODE=e.data.POSTCODE,s.data.isMain=e.data.isMain,s.data.isStorge=e.data.isStorge,s.data.isBack=e.data.isBack,s.data.auto_feedback_active=e.data.auto_feedback_active,s.$forceUpdate()):(s.data.type="",s.data.STOREID="",s.data.POSTCODE="",s.data.isMain=0,s.data.isStorge=0);let t="";s.storeRange.forEach((e=>{e.value==s.data.room_id&&(t=e.text)})),s.data.NAME=t}})},change(e){console.log(this.data),this.$forceUpdate()}}},[["render",function(e,t,s,C,k,S){const x=g,E=y(a("uni-icons"),T),O=y(a("uni-data-select"),L),R=p,b=_,v=f,A=w;return s.isshow?(o(),i(x,{key:0,class:"win-box"},{default:l((()=>[d(x,{class:"win-win"},{default:l((()=>[d(x,{class:"win-head"},{default:l((()=>[d(x,{class:"win-title"},{default:l((()=>[n(c(s.isAdd?"绑定":"修改")+"群",1)])),_:1}),d(x,{class:"win-close",onClick:S.close},{default:l((()=>[d(E,{type:"closeempty",size:"18",class:"icon closeempty",color:"red"})])),_:1},8,["onClick"])])),_:1}),d(x,{class:"win-content"},{default:l((()=>[d(x,{class:"win-infos"},{default:l((()=>[d(x,{class:"line"},{default:l((()=>[d(x,{class:"title"},{default:l((()=>[n("群聊")])),_:1}),s.isAdd?(o(),i(O,{key:0,class:"",clear:!1,modelValue:k.data.room_id,"onUpdate:modelValue":t[0]||(t[0]=e=>k.data.room_id=e),localdata:k.roomsRange,onChange:S.change},null,8,["modelValue","localdata","onChange"])):(o(),r(h,{key:1},[n(c(s.name),1)],64))])),_:1}),d(x,{class:"line"},{default:l((()=>[d(x,{class:"title"},{default:l((()=>[n("快递")])),_:1}),d(x,null,{default:l((()=>[n(c(s.storeName),1)])),_:1})])),_:1}),d(x,{class:"line"},{default:l((()=>[d(x,{class:"title"},{default:l((()=>[n("是否通知揽收")])),_:1}),d(O,{class:"",clear:!1,modelValue:k.data.islanshow,"onUpdate:modelValue":t[1]||(t[1]=e=>k.data.islanshow=e),localdata:k.isMainRange,onChange:S.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(x,{class:"line"},{default:l((()=>[d(x,{class:"title"},{default:l((()=>[n("快递接口")])),_:1}),d(A,{class:"checkbox","scroll-y":"true"},{default:l((()=>[d(v,{onChange:S.checkboxChange,style:{display:"flex","flex-wrap":"wrap"}},{default:l((()=>[(o(!0),r(h,null,u(k.items,(e=>(o(),i(b,{class:"uni-list-cell uni-list-cell-pd",key:e.value},{default:l((()=>[d(x,null,{default:l((()=>[d(R,{value:e.value,checked:e.checked},null,8,["value","checked"])])),_:2},1024),d(x,null,{default:l((()=>[n(c(e.name),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1},8,["onChange"])])),_:1})])),_:1}),d(x,{class:"value value-select btn",onClick:S.save},{default:l((()=>[n(c(s.isAdd?"添加":"修改"),1)])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})])),_:1})):m("",!0)}],["__scopeId","data-v-65bb06e6"]]);const D=U({data:()=>({navid:0,allids:[],orderids:[],page:1,pagesize:1e3,count:0,list:[],keyword:"",isfoucs:!1,tpage:1,isfoucs:!1,isshowStatusChange:!1,isshowTipChange:!1,isAdd:!1,room:{}}),computed:{...C(k())},onLoad(){let e=t("SOURCE");e||(e="wx",S("SOURCE","wx")),this.localSource=e,console.log("[Storage] SOURCE in onLoad:",this.localSource),this.getList()},methods:{editRoom(e){},deleteRoom(s){const a=this;x({title:"提示",content:"是否解除绑定",success:function(o){if(o.confirm){const o=t("SOURCE")||"wx";e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/del_rooms",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:A.getToken(),SOURCE:o},data:{id:s},success(e){a.getList()}})}else o.cancel&&console.log("用户点击取消")}})},getList(s=!1){const a=this;s&&(this.page=1);const o=t("SOURCE")||"wx";console.log("[Storage] SOURCE in getList:",o),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_express_rooms",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:A.getToken(),SOURCE:o},data:{page:this.page,pagesize:this.pagesize,keyword:this.keyword},success(e){console.log(e),a.list=e.data}})},select(e){console.log(e),this.pagesize=parseInt(e.target.value),this.toPage(1)},idsChange(e){console.log(e.detail),this.orderids=e.detail.value,this.$forceUpdate()},change(){this.$forceUpdate()},isSelect(e){return this.orderids.indexOf(e)>-1},lineClass(e){let t=[];return this.isSelect(e.ID)&&t.push("selected"),1==e.FLAG&&t.push("FLAG"),1==e.ISLOCK&&t.push("LOCKED"),t.join(" ")},saoma(e){console.log(e.detail.value)},blur(){this.isfoucs=!1,""!=this.keyword.trim()?this.getList(!0):this.getList()},add(e){this.storeid=e.CODE,this.name="",this.wxid="",this.isAdd=!0,this.storeName=e.NAME,this.isshowTipChange=!0},edit(e,t){this.storeid=t.CODE,this.name=e.name,console.log(e),this.wxid=e.room_id,this.room=e,this.isAdd=!1,this.storeName=t.NAME,this.isshowTipChange=!0},closeTip(){this.isshowTipChange=!1,this.getList()},toPage(e){this.page=e,this.getList()},truncateString:(e,t=15,s="...")=>e.length>t?e.substring(0,t)+s:e}},[["render",function(e,t,s,m,p,_){const f=y(a("m-nav"),v),C=y(a("uni-icons"),T),k=g,S=b,x=w,L=y(a("win-add2"),M);return o(),i(k,{class:"content"},{default:l((()=>[d(f,{n:p.navid},null,8,["n"]),d(k,{class:"box"},{default:l((()=>[d(k,{class:"contents"},{default:l((()=>[d(k,{class:"operator"},{default:l((()=>[d(k,{class:"item",onClick:t[0]||(t[0]=e=>_.getList(!0))},{default:l((()=>[d(C,{type:"refreshempty",size:"14"})])),_:1})])),_:1}),d(x,{class:"list"},{default:l((()=>[E("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2",class:"box"},[E("thead",null,[E("tr",null,[E("th",{align:"center",width:"1%"},[E("span",{style:{display:"block",transform:"scale(0.7)"}})]),E("th",{align:"center",width:"20%"},"快递名称"),E("th",{align:"center",width:"20%"},"群聊")])]),E("tbody",null,[(o(!0),r(h,null,u(p.list,((t,s)=>(o(),r("tr",{onDblclick:s=>e.showItemWinInfo(t.id),index:s,class:O(_.lineClass(t)),bgcolor:"#fff"},[E("td",{align:"center",width:"1%"}),E("td",{align:"center"},c(t.NAME),1),E("td",{align:"center"},[(o(!0),r(h,null,u(t.rooms,(e=>(o(),r("p",{class:"roomitem",title:e.name},[E("span",{class:"name"},c(e.name),1),d(S,{onClick:R((s=>_.edit(e,t)),["stop"]),class:"blue"},{default:l((()=>[n("编辑")])),_:2},1032,["onClick"]),d(S,{onClick:R((t=>_.deleteRoom(e.room_id)),["stop"]),class:"red"},{default:l((()=>[n("解绑")])),_:2},1032,["onClick"])],8,["title"])))),256)),E("p",{class:"roomitem"},[d(S,{class:"blue",style:{width:"120px"},onClick:e=>_.add(t)},{default:l((()=>[n("添加绑定")])),_:2},1032,["onClick"])])])],42,["onDblclick","index"])))),256))])])])),_:1}),d(L,{room:p.room,storeid:e.storeid,storeName:e.storeName,name:e.name,wxid:e.wxid,isAdd:p.isAdd,isshow:p.isshowTipChange,onClose:_.closeTip},null,8,["room","storeid","storeName","name","wxid","isAdd","isshow","onClose"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-44b5ecab"]]);export{D as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-interior.TuurVpSQ.js b/app/assets/public/wechat_1.0.6/assets/pages-index-interior.TuurVpSQ.js new file mode 100644 index 0000000..1f84b43 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-interior.TuurVpSQ.js @@ -0,0 +1 @@ +import{r as t,g as e,s,f as a,o as i,c as o,w as d,b as l,d as n,t as r,k as c,i as m,A as u,v as h,K as p,x as g,h as _,j as f,F as w,S as E,z as y}from"./index-B8U-SFxP.js";import{r as D,a as O,_ as b}from"./m-nav.CZV981Qo.js";import{u as k}from"./user.Bm-2eyfO.js";import{_ as S}from"./uni-data-select.i2-ymEG0.js";import{_ as R}from"./_plugin-vue_export-helper.BCo6x5W8.js";const C=R({components:{winAddInterior:R({name:"win-add-interior",props:{isshow:{type:Boolean,default:!1},group:{type:Object,default:()=>({})},params:{type:Object,default:()=>({})}},data:()=>({editData:{STOREID:"",POSTCODE:"",type:2,isMain:0,isStorge:0,isBack:0,auto_feedback_active:0,islanshow:0,ECNOTES:[],room_id:"",name:"",members:"",sub_type:""},roomsRange:[],types:{error:"错误群",normal:"普通群",stock:"库存群",door:"开门群"},typeOptions:[{value:"error",text:"错误群"},{value:"normal",text:"普通群"},{value:"stock",text:"库存群"},{value:"door",text:"开门群"}]}),watch:{group:{handler(t){this.editData={...t}},immediate:!0,deep:!0},isshow:{handler(t){if(t){this.getAllNoBindRooms();let t={STOREID:null,POSTCODE:"",type:2,isMain:0,isStorge:0,isBack:0,auto_feedback_active:0,islanshow:0,ECNOTES:[],room_id:"",name:"",members:"",sub_type:""};this.isEdit?this.editData={...t,...this.group,...this.params}:this.editData={...t,...this.params},void 0===this.editData.STOREID&&(this.editData.STOREID=null)}}}},computed:{isEdit(){return this.params&&Object.keys(this.params).length>0}},methods:{getRoomName(t){const e=this.roomsRange.find((e=>e.value===t));return e&&e.text?e.text:this.params&&this.params.name?this.params.name:this.group&&this.group.name?this.group.name:t||""},getAllNoBindRooms(){const s=this;t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_all_nobing_rooms",method:"GET",header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),Source:e("SOURCE")||"wx"},success(t){s.roomsRange=t.data.roomList||[]}})},changeRoom(t){const e=this.roomsRange.find((t=>t.value===this.editData.room_id));e&&(this.editData.name=e.text,e.POSTCODE&&(this.editData.POSTCODE=e.POSTCODE))},submit(){if(!this.editData.room_id)return void s({title:"请选择群聊",icon:"none"});if(!this.editData.sub_type)return void s({title:"请选择群类型",icon:"none"});this.editData={STOREID:null,POSTCODE:"",type:2,isMain:0,isStorge:0,isBack:0,auto_feedback_active:0,islanshow:0,ECNOTES:[],room_id:"",name:"",members:"",sub_type:"",...this.editData},void 0===this.editData.STOREID&&(this.editData.STOREID=null);const a=this;t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/save_room",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),Source:e("SOURCE")||"wx"},data:{data:this.editData},success(t){if(1==t.data){let t=a.isEdit?"修改成功":"添加成功";s({title:t,duration:2e3}),a.$emit("save",a.editData),a.$emit("close")}}})}}},[["render",function(t,e,s,h,p,g){const _=m,f=D(a("uni-data-select"),S),w=u;return s.isshow?(i(),o(_,{key:0,class:"win-add2"},{default:d((()=>[l(_,{class:"win-content"},{default:d((()=>[l(_,{class:"title"},{default:d((()=>[n(r(g.isEdit?"修改内部群":"新增内部群"),1)])),_:1}),l(_,{class:"form"},{default:d((()=>[l(_,{class:"line"},{default:d((()=>[l(_,{class:"title"},{default:d((()=>[n("群聊")])),_:1}),g.isEdit?(i(),o(_,{key:1},{default:d((()=>[n(r(p.editData.room_name),1)])),_:1})):(i(),o(f,{key:0,modelValue:p.editData.room_id,"onUpdate:modelValue":e[0]||(e[0]=t=>p.editData.room_id=t),localdata:p.roomsRange,onChange:g.changeRoom},null,8,["modelValue","localdata","onChange"]))])),_:1}),l(_,{class:"line"},{default:d((()=>[l(_,{class:"title"},{default:d((()=>[n("群类型")])),_:1}),l(f,{modelValue:p.editData.sub_type,"onUpdate:modelValue":e[1]||(e[1]=t=>p.editData.sub_type=t),localdata:p.typeOptions},null,8,["modelValue","localdata"])])),_:1})])),_:1}),l(_,{class:"actions"},{default:d((()=>[l(w,{onClick:g.submit},{default:d((()=>[n(r(g.isEdit?"保存":"添加"),1)])),_:1},8,["onClick"]),l(w,{onClick:e[2]||(e[2]=e=>t.$emit("close"))},{default:d((()=>[n("取消")])),_:1})])),_:1})])),_:1})])),_:1})):c("",!0)}],["__scopeId","data-v-5d77a3e2"]])},data:()=>({list:[],types:{error:"错误群",normal:"普通群",stock:"库存群",door:"开门群"},isshowEdit:!1,editGroup:{},editParams:{}}),onLoad(){this.getList()},methods:{closeEdit(){this.isshowEdit=!1,this.editGroup={},this.editParams={},this.getList()},edit(t){this.editGroup={...t},this.editParams={...t},this.isshowEdit=!0},addBind(){this.editGroup={},this.editParams={},this.isshowEdit=!0},saveEdit(t){this.getList()},getList(s=!1){this.isshowEdit=!1;const a=this;s&&(this.page=1),t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_interior_rooms",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),Source:e("SOURCE")||"wx"},data:{page:this.page||1,pagesize:this.pagesize||1e3},success(t){console.log(t),a.list=t.data&&t.data.rows?t.data.rows:[]}})},deleteRoom(s){const a=this;h({title:"提示",content:"是否解除绑定",success:function(i){if(i.confirm){const i=e("SOURCE")||"wx";t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/del_rooms",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),SOURCE:i},data:{id:s},success(t){a.getList()}})}else i.cancel&&console.log("用户点击取消")}})}}},[["render",function(t,e,s,c,h,k){const S=D(a("m-nav"),O),R=D(a("uni-icons"),b),C=m,v=u,T=E,x=p("win-add-interior");return i(),o(C,{class:"content"},{default:d((()=>[l(S,{n:2}),l(C,{class:"box"},{default:d((()=>[l(C,{class:"contents"},{default:d((()=>[l(C,{class:"operator"},{default:d((()=>[l(C,{class:"item",onClick:e[0]||(e[0]=t=>k.getList(!0))},{default:d((()=>[l(R,{type:"refreshempty",size:"14"})])),_:1}),l(C,{class:"item",onClick:k.addBind},{default:d((()=>[l(R,{type:"add",size:"14"}),n(" 新增绑定 ")])),_:1},8,["onClick"])])),_:1}),l(T,{class:"list"},{default:d((()=>[g("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2",class:"box"},[g("thead",null,[g("tr",null,[g("th",{align:"center",width:"1%"}),g("th",{align:"center",width:"20%"},"群名称"),g("th",{align:"center",width:"60%"},"群类型"),g("th",{align:"center",width:"60%"},"操作")])]),g("tbody",null,[(i(!0),_(w,null,f(h.list,((t,e)=>(i(),_("tr",{key:t.id,index:e,bgcolor:"#fff"},[g("td",{align:"center",width:"1%"}),g("td",{align:"center"},r(t.room_name),1),g("td",{align:"center"},r(h.types[t.sub_type]||"普通群"),1),g("td",{align:"center"},[g("p",null,[l(v,{onClick:y((e=>k.edit(t)),["stop"]),class:"blue"},{default:d((()=>[n("编辑")])),_:2},1032,["onClick"]),l(v,{onClick:y((e=>k.deleteRoom(t.room_id)),["stop"]),class:"red"},{default:d((()=>[n("解绑")])),_:2},1032,["onClick"])])])],8,["index"])))),128))])])])),_:1}),l(x,{isshow:h.isshowEdit,group:h.editGroup,params:h.editParams,onSave:k.saveEdit,onClose:k.closeEdit},null,8,["isshow","group","params","onSave","onClose"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-d8015cc3"]]);export{C as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-log._xK1nM0F.js b/app/assets/public/wechat_1.0.6/assets/pages-index-log._xK1nM0F.js new file mode 100644 index 0000000..16ad8ff --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-log._xK1nM0F.js @@ -0,0 +1 @@ +import{N as e,r as t,g as s,s as o,o as a,c as i,w as r,h as l,b as n,d,t as c,F as h,j as u,i as m,S as g,C as p,A as f,k as y,f as x,K as T,I as S,y as _}from"./index-B8U-SFxP.js";import{r as C,a as M}from"./m-nav.CZV981Qo.js";import{u as k}from"./user.Bm-2eyfO.js";import{_ as b}from"./_plugin-vue_export-helper.BCo6x5W8.js";const L=b({components:{ChatDialog:b({name:"ChatDialog",props:{roomId:{type:String,default:""},roomName:{type:String,default:""}},data:()=>({messages:[],inputText:"",maxInputLength:2e3,page:1,pagesize:20,hasMore:!0,loadingHistory:!1,sendingMessage:!1,scrollTop:0,currentScrollTop:0,lastKeySendAt:0,suppressNextConfirm:!1,debugKeyboard:!0,ctrlPressed:!1,metaPressed:!1,shiftPressed:!1,sendMessageType:1}),computed:{sortedMessages(){return this.messages.slice().sort(((e,t)=>this.normalizeTimestamp(e.time)-this.normalizeTimestamp(t.time)))}},watch:{roomId:{immediate:!0,handler(e){e?(this.resetMessageState(),this.fetchMessages(e,{page:1})):this.resetMessageState()}}},methods:{debugLog(e,t){this.debugKeyboard&&console.log(`[ChatDialog][${e}]`,t)},normalizeTimestamp(e){if(!e)return 0;const t=Number(e);if(Number.isNaN(t)){const t=new Date(e).getTime();return Number.isNaN(t)?0:t}return 10===`${Math.trunc(t)}`.length?1e3*t:t},formatTime(e){if(!e)return"";const t=this.normalizeTimestamp(e),s=new Date(t),o=e=>e<10?"0"+e:e;return`${s.getFullYear()}-${o(s.getMonth()+1)}-${o(s.getDate())} ${o(s.getHours())}:${o(s.getMinutes())}:${o(s.getSeconds())}`},resetMessageState(){this.messages=[],this.page=1,this.hasMore=!0,this.loadingHistory=!1,this.scrollTop=0,this.currentScrollTop=0,this.resetModifierState()},resetModifierState(){this.ctrlPressed=!1,this.metaPressed=!1,this.shiftPressed=!1},mergeMessages(e,t){const s=[],o=new Set;return e.concat(t).forEach((e=>{const t=e&&e.id?e.id:`${e.sender_name||""}-${e.time||""}-${e.content||""}`;o.has(t)||(o.add(t),s.push(e))})),s},handleScroll(e){this.currentScrollTop=Number(e.detail&&e.detail.scrollTop||0)},measureScrollMetrics(){return new Promise((t=>{this.$nextTick((()=>{setTimeout((()=>{const s=e().in(this);s.select(".chat-content").boundingClientRect(),s.select(".chat-list").boundingClientRect(),s.exec((e=>{const s=e&&e[0]?e[0]:{},o=e&&e[1]?e[1]:{};t({containerHeight:Number(s.height)||0,contentHeight:Number(o.height)||0,scrollTop:this.currentScrollTop})}))}),30)}))}))},async scrollToLatest(){const e=await this.measureScrollMetrics(),t=Math.max(e.contentHeight-e.containerHeight,0);this.scrollTop=t,this.currentScrollTop=t},async restoreScrollPosition(e){const t=await this.measureScrollMetrics(),s=Math.max(t.contentHeight-t.containerHeight-e,0);this.scrollTop=s,this.currentScrollTop=s},async fetchMessages(e,{page:o=1,prepend:a=!1}={}){if(this.loadingHistory)return;let i=0;if(a){const e=await this.measureScrollMetrics();i=Math.max(e.contentHeight-e.containerHeight-e.scrollTop,0)}const r=this;r.loadingHistory=!0,t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_group_messages",method:"POST",data:{room_id:e,page:o,pagesize:r.pagesize},header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),Source:s("SOURCE")||"wx"},success(e){const t=e.data&&e.data.rows?e.data.rows:[];r.page=o,r.hasMore=t.length>=r.pagesize,r.messages=a?r.mergeMessages(t,r.messages):r.mergeMessages([],t),r.$nextTick((async()=>{a?await r.restoreScrollPosition(i):await r.scrollToLatest()}))},fail(){a||(r.messages=[])},complete(){r.loadingHistory=!1}})},loadNextPage(){this.roomId&&this.hasMore&&!this.loadingHistory&&this.fetchMessages(this.roomId,{page:this.page+1,prepend:!0})},sendMsg(){const e=(this.inputText||"").trim();if(!e)return;if(!this.roomId)return void o({title:"请先选择群聊",icon:"none"});if(this.sendingMessage)return;this.sendingMessage=!0,this.debugLog("sendMsg",{roomId:this.roomId,textLength:e.length,type:this.sendMessageType,suppressNextConfirm:this.suppressNextConfirm});const a={room_id:this.roomId,content:e,type:this.sendMessageType};t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/send_group_message",method:"POST",data:a,header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),Source:s("SOURCE")||"wx"},success:t=>{this.debugLog("send.response",t),0!==t.data.code?(this.messages.push({id:Date.now(),sender_name:"我",content:e,time:Date.now(),type:this.sendMessageType}),this.inputText="",this.$nextTick((()=>{this.scrollToLatest()}))):o({title:t.data.message||"发送成功",icon:"none"})},fail:e=>{this.debugLog("send.fail",e),o({title:"发送失败",icon:"none"})},complete:()=>{this.sendingMessage=!1}})},handleTextareaKeydown(e){const t=e&&e.detail||{};this.debugLog("keydown.raw",{hasDetail:!(!e||!e.detail),eventKey:e&&e.key,eventKeyCode:e&&e.keyCode,detailKey:t.key,detailKeyCode:t.keyCode,detailCtrlKey:t.ctrlKey,detailMetaKey:t.metaKey,detailShiftKey:t.shiftKey,detailCursor:t.cursor,heldCtrl:this.ctrlPressed,heldMeta:this.metaPressed,heldShift:this.shiftPressed});const s=e&&e.key||t.key||"",o=Number(t.keyCode||e&&e.keyCode||("Enter"===s?13:0)),a=!!(t.ctrlKey||e&&e.ctrlKey),i=!!(t.metaKey||e&&e.metaKey),r=!!(t.shiftKey||e&&e.shiftKey);if("Control"===s||17===o)return void(this.ctrlPressed=!0);if("Meta"===s||"OS"===s||91===o||93===o)return void(this.metaPressed=!0);if("Shift"===s||16===o)return void(this.shiftPressed=!0);let l=Number(t.cursor);if(Number.isNaN(l)||l<0){const t=e&&e.target;l=t&&"number"==typeof t.selectionStart?t.selectionStart:-1}const n=a||i||r||this.ctrlPressed||this.metaPressed||this.shiftPressed;if(this.debugLog("keydown.parsed",{key:s,keyCode:o,ctrlKey:a,metaKey:i,shiftKey:r,heldCtrl:this.ctrlPressed,heldMeta:this.metaPressed,heldShift:this.shiftPressed,modifierPressed:n,cursor:l}),13===o){if(n){e&&"function"==typeof e.preventDefault&&e.preventDefault(),this.suppressNextConfirm=!0;const t=this.inputText||"";return!Number.isNaN(l)&&l>=0?this.inputText=`${t.slice(0,l)}\n${t.slice(l)}`:this.inputText=`${t}\n`,void this.debugLog("keydown.newline",{suppressNextConfirm:this.suppressNextConfirm,nextLength:this.inputText.length})}this.lastKeySendAt=0,this.debugLog("keydown.enter",{action:"wait_confirm_send"})}},handleTextareaKeyup(e){const t=e&&e.detail||{},s=e&&e.key||t.key||"",o=Number(t.keyCode||e&&e.keyCode||0);"Control"!==s&&17!==o||(this.ctrlPressed=!1),"Meta"!==s&&"OS"!==s&&91!==o&&93!==o||(this.metaPressed=!1),"Shift"!==s&&16!==o||(this.shiftPressed=!1),this.debugLog("keyup",{key:s,keyCode:o,heldCtrl:this.ctrlPressed,heldMeta:this.metaPressed,heldShift:this.shiftPressed})},handleTextareaConfirm(e){if(this.debugLog("confirm",{hasDetail:!(!e||!e.detail),suppressNextConfirm:this.suppressNextConfirm,heldCtrl:this.ctrlPressed,heldMeta:this.metaPressed,heldShift:this.shiftPressed,textLength:(this.inputText||"").length}),this.suppressNextConfirm)return this.suppressNextConfirm=!1,void this.debugLog("confirm.skip",{reason:"suppressNextConfirm"});this.sendMsg()},onEmoji(){},onImage(){}}},[["render",function(e,t,s,o,x,T){const S=m,_=g,C=p,M=f;return a(),i(S,{class:"chat-box"},{default:r((()=>[s.roomId?(a(),l(h,{key:0},[n(S,{class:"chat-header"},{default:r((()=>[d(c(s.roomName),1)])),_:1}),n(_,{class:"chat-content","scroll-y":"true","scroll-top":x.scrollTop,"upper-threshold":40,onScrolltoupper:T.loadNextPage,onScroll:T.handleScroll},{default:r((()=>[n(S,{class:"chat-list"},{default:r((()=>[(a(!0),l(h,null,u(T.sortedMessages,(e=>(a(),i(S,{key:e.id,class:"chat-message"},{default:r((()=>[n(S,{class:"msg-user"},{default:r((()=>[d(c(e.sender_name),1)])),_:2},1024),n(S,{class:"msg-content"},{default:r((()=>[d(c(e.content)+" ",1),e.back_content_json?(a(),i(S,{key:0,class:"msg-reply"},{default:r((()=>[d("@"+c(e.back_content_json),1)])),_:2},1024)):y("",!0)])),_:2},1024),n(S,{class:"msg-time"},{default:r((()=>[d(c(T.formatTime(e.time)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1},8,["scroll-top","onScrolltoupper","onScroll"]),n(S,{class:"chat-footer"},{default:r((()=>[n(S,{class:"box"},{default:r((()=>[n(C,{modelValue:x.inputText,"onUpdate:modelValue":t[0]||(t[0]=e=>x.inputText=e),class:"input-box",type:"text",placeholder:"请输入内容...",maxlength:x.maxInputLength,"confirm-type":"send","confirm-hold":!0,onKeydown:T.handleTextareaKeydown,onKeyup:T.handleTextareaKeyup,onBlur:T.resetModifierState,onConfirm:T.handleTextareaConfirm},null,8,["modelValue","maxlength","onKeydown","onKeyup","onBlur","onConfirm"]),n(S,{class:"footer-tools"},{default:r((()=>[n(M,{class:"tool-btn",onClick:T.onEmoji},{default:r((()=>[d("😊")])),_:1},8,["onClick"]),n(M,{class:"tool-btn",onClick:T.onImage},{default:r((()=>[d("📷")])),_:1},8,["onClick"]),n(M,{class:"send-btn",onClick:T.sendMsg},{default:r((()=>[d("发送")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})],64)):(a(),i(S,{key:1,class:"chat-content",style:{flex:"1",display:"flex","align-items":"center","justify-content":"center"}},{default:r((()=>[n(S,{class:"empty-tip"},{default:r((()=>[d("选择群聊")])),_:1})])),_:1}))])),_:1})}],["__scopeId","data-v-c01953dd"]])},data:()=>({groupList:[],selectedRoomId:null,selectedRoomName:"",searchText:"",allGroupList:[]}),onLoad(){this.getList()},methods:{getList(e=!1){const o=this;t({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_all_rooms",method:"GET",header:{"X-Requested-With":"XMLHttpRequest",token:k.getToken(),Source:s("SOURCE")||"wx"},success(e){o.groupList=e.data.roomList||[],o.allGroupList=e.data.roomList||[]},fail(){o.groupList=[],o.allGroupList=[]}})},clearSearch(){this.searchText="",this.groupList=this.allGroupList.slice()},watch:{searchText(e){this.groupList=e?this.allGroupList.filter((t=>(t.name||"").includes(e))):this.allGroupList.slice()}},selectGroup(e){this.selectedRoomId=e.room_id||null,this.selectedRoomName=e.room_name||"未命名群组"}}},[["render",function(e,t,s,o,p,f){const k=C(x("m-nav"),M),b=S,L=m,N=g,w=T("chat-dialog");return a(),i(L,{class:"content"},{default:r((()=>[n(k,{n:4}),n(L,{class:"box"},{default:r((()=>[n(L,{class:"log-layout"},{default:r((()=>[n(L,{class:"log-left"},{default:r((()=>[n(L,{class:"log-title search-bar"},{default:r((()=>[n(b,{type:"text",modelValue:p.searchText,"onUpdate:modelValue":t[0]||(t[0]=e=>p.searchText=e),placeholder:"搜索",class:"search-input"},null,8,["modelValue"]),p.searchText?(a(),l("span",{key:0,class:"clear-btn",onClick:t[1]||(t[1]=(...e)=>f.clearSearch&&f.clearSearch(...e))},"×")):y("",!0)])),_:1}),n(N,{class:"group-list","scroll-y":"true"},{default:r((()=>[(a(!0),l(h,null,u(p.groupList,(e=>(a(),i(L,{key:e.id,class:_(["group-item",e.room_id===p.selectedRoomId?"active":""]),onClick:t=>f.selectGroup(e)},{default:r((()=>[n(L,{class:"group-name"},{default:r((()=>[d(c(e.name||"未命名群组"),1)])),_:2},1024)])),_:2},1032,["class","onClick"])))),128))])),_:1})])),_:1}),n(L,{class:"log-right"},{default:r((()=>[n(w,{"room-id":p.selectedRoomId,"room-name":p.selectedRoomName},null,8,["room-id","room-name"])])),_:1})])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-bd7f5b03"]]);export{L as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-login.BFQQS4U7.js b/app/assets/public/wechat_1.0.6/assets/pages-index-login.BFQQS4U7.js new file mode 100644 index 0000000..4d1cd1e --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-login.BFQQS4U7.js @@ -0,0 +1 @@ +import{r as s,a as t,c as e,w as a,i as o,o as r,b as c,d as i,e as n}from"./index-B8U-SFxP.js";import{u as d}from"./user.Bm-2eyfO.js";import{_ as u}from"./_plugin-vue_export-helper.BCo6x5W8.js";const h=u({data:()=>({focus:!1,scan:!0,focus2:!1,username:"",password:"",usernameTip:!1,passwordTip:!1,timer:null,token:""}),onLoad(){this.showscan()},onUnload(){},methods:{showscan(){this.getErcode()},closescan(){clearTimeout(this.timer),this.scan=!1},checkUsername(){return this.focus=!1,this.$forceUpdate(),this.usernameTip=!this.username,this.focus2=!1,this.focus=!0,this.$forceUpdate(),console.log("this.usernameTip: ",this.usernameTip),this.usernameTip},checkPassword(){return this.focus2=!1,this.$forceUpdate(),this.passwordTip=!this.password,this.focus=!1,this.focus2=!0,this.$forceUpdate(),this.passwordTip},getErcode(){const t=this;s({url:"http://wms.gztbyc.com/auth/getLoginercode",method:"GET",success(s){console.log(s.data.data),t.token=s.data.data,t.scan=!0,t.getLoginStatus()}})},getLoginStatus(){const e=this;s({url:"http://wms.gztbyc.com/auth/getLoginstatus",method:"POST",data:{token:e.token},success(s){if(console.log(s.data.data.uuid),s.data.data.token){d.setToken(s.data.data.token),t({url:"/pages/index/index"})}else e.timer=setTimeout((()=>{e.getLoginStatus()}),2e3)}})}}},[["render",function(s,t,d,u,h,l){const m=o,f=n;return r(),e(m,{class:"content"},{default:a((()=>[c(m,{class:"fackBar"},{default:a((()=>[i(" 机器人设置 ")])),_:1}),c(m,{class:"form_box"},{default:a((()=>[c(f,{src:`https://ye4s.wms.gztbyc.com/qrcode/build?text=${h.token}&label=&logo=0&labelalignment=center&foreground=%23000000&background=%23ffffff&size=300&padding=10&logosize=50&labelfontsize=14&errorcorrection=medium`,class:"ercode"},null,8,["src"])])),_:1})])),_:1})}],["__scopeId","data-v-06b9555e"]]);export{h as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-method.kqhTS_RO.js b/app/assets/public/wechat_1.0.6/assets/pages-index-method.kqhTS_RO.js new file mode 100644 index 0000000..b8b6781 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-method.kqhTS_RO.js @@ -0,0 +1 @@ +import{r as e,B as a,s as t,f as s,o as l,c as o,w as n,b as i,d,t as c,k as u,i as g,C as h,y as p,x as r,h as m,j as f,F as _,l as k,m as y,n as C,S as w,D as x,I as v,A as b}from"./index-B8U-SFxP.js";import{r as S,_ as T,a as E}from"./m-nav.CZV981Qo.js";import{_ as O}from"./uni-data-select.i2-ymEG0.js";import{_ as R}from"./_plugin-vue_export-helper.BCo6x5W8.js";const D=R({name:"win-methodadd",props:["isshow","orderids"],data:()=>({tip:"",data:{roomid:null},methodsText:{},roomsRange:[],postcodeRange:[],storeRange:[],isAdd:!1,isMainRange:[{value:0,text:"否"},{value:1,text:"是"}],typeRange:[{value:1,text:"货主群"},{value:2,text:"内部群"},{value:3,text:"快递群"}],methodRange:[]}),created(){this.data.type="",this.getStore(),this.postcode()},methods:{getStore(){const a=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/methodsText",method:"GET",success(e){for(var t in console.log(e),a.methodsText=e.data,a.methodsText)a.methodRange.push({value:t,text:a.methodsText[t]});console.log(a.methodsText)}})},copy(e){a({data:e,success:function(){console.log("success")}})},postcode(){const a=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/postcode",method:"POST",data:{WAREHOUSEID:this.$WAREHOUSEID},success(e){console.log(e.data),a.postcodeRange=e.data.map((e=>({value:e.CODE,text:e.NAME})))}})},timestampToTime(e){var a=new Date(e);return a.getFullYear()+"-"+((a.getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+1)+"-")+((a.getDate()<10?"0"+a.getDate():a.getDate())+" ")+((a.getHours()<10?"0"+a.getHours():a.getHours())+":")+((a.getMinutes()<10?"0"+a.getMinutes():a.getMinutes())+":")+(a.getSeconds()<10?"0"+a.getSeconds():a.getSeconds())},close(){this.tip="",this.$emit("close",!1)},save(){const a=this;console.log("saveClick"),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/saveRoom",method:"POST",data:{data:this.data,WAREHOUSEID:this.$WAREHOUSEID},success(e){1==e.data&&(t({title:"修改成功",duration:2e3}),a.close())}})},getRoominfo(){const a=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/findRoom",method:"POST",data:{roomid:this.data.roomid,WAREHOUSEID:this.$WAREHOUSEID},success(e){e.data?(a.data.type=e.data.type,a.data.STOREID=e.data.STOREID,a.data.POSTCODE=e.data.POSTCODE,a.data.isMain=e.data.isMain,a.isAdd=!1,a.$forceUpdate()):(a.data.type="",a.data.STOREID="",a.data.POSTCODE="",a.data.isMain=0,a.isAdd=!0);let t="";a.storeRange.forEach((e=>{e.value==a.data.roomid&&(t=e.text)})),a.data.NAME=t}})},change(e){console.log(this.data),this.$forceUpdate()}}},[["render",function(e,a,t,p,r,m){const f=g,_=S(s("uni-icons"),T),k=S(s("uni-data-select"),O),y=h;return t.isshow?(l(),o(f,{key:0,class:"win-box"},{default:n((()=>[i(f,{class:"win-win"},{default:n((()=>[i(f,{class:"win-head"},{default:n((()=>[i(f,{class:"win-title"},{default:n((()=>[d(c(r.isAdd?"添加":"修改")+"群分类",1)])),_:1}),i(f,{class:"win-close",onClick:m.close},{default:n((()=>[i(_,{type:"closeempty",size:"18",class:"icon closeempty",color:"red"})])),_:1},8,["onClick"])])),_:1}),i(f,{class:"win-content"},{default:n((()=>[i(f,{class:"win-infos"},{default:n((()=>[i(f,{class:"line"},{default:n((()=>[i(f,{class:"title"},{default:n((()=>[d("群聊类型")])),_:1}),i(k,{class:"",clear:!1,modelValue:r.data.type,"onUpdate:modelValue":a[0]||(a[0]=e=>r.data.type=e),localdata:r.typeRange,onChange:m.change},null,8,["modelValue","localdata","onChange"])])),_:1}),i(f,{class:"line"},{default:n((()=>[i(f,{class:"title"},{default:n((()=>[d("事件")])),_:1}),i(k,{class:"",clear:!1,modelValue:r.data.method,"onUpdate:modelValue":a[1]||(a[1]=e=>r.data.method=e),localdata:r.methodRange,onChange:m.change},null,8,["modelValue","localdata","onChange"])])),_:1}),i(f,{class:"line"},{default:n((()=>[i(f,{class:"title"},{default:n((()=>[d("关键词(用|分割)")])),_:1}),i(y,{class:"textarea",placeholder:"用|分割",modelValue:r.data.key,"onUpdate:modelValue":a[2]||(a[2]=e=>r.data.key=e)},null,8,["modelValue"])])),_:1}),i(f,{class:"line"},{default:n((()=>[i(f,{class:"title"},{default:n((()=>[d("不匹配提示")])),_:1}),i(y,{class:"textarea",placeholder:"命中关键词,无快递号时提示",modelValue:r.data.tip,"onUpdate:modelValue":a[3]||(a[3]=e=>r.data.tip=e)},null,8,["modelValue"])])),_:1}),i(f,{class:"value value-select btn",onClick:m.save},{default:n((()=>[d(c(r.isAdd?"添加":"修改"),1)])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})])),_:1})):u("",!0)}],["__scopeId","data-v-be5b4899"]]);const P=R({data:()=>({navid:2,allids:[],orderids:[],page:1,pagesize:20,count:0,list:[],keyword:"",isfoucs:!1,tpage:1,isfoucs:!1,isshowStatusChange:!1,isshowTipChange:!1,methodText:{quxiaolanjie:"取消拦截"}}),onLoad(){this.getList()},methods:{getList(a=!1){const t=this;a&&(this.page=1),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/getMethods",method:"POST",data:{page:this.page,pagesize:this.pagesize,keyword:this.keyword},success(e){console.log(e),t.list=e.data.rows,t.count=e.data.count,t.allids=t.list.map((e=>e.id))}})},isSelect(e){return this.orderids.indexOf(e)>-1},idsChange(e){console.log(e.detail),this.orderids=e.detail.value,this.$forceUpdate()},lineClass(e){let a=[];return this.isSelect(e.ID)&&a.push("selected"),1==e.FLAG&&a.push("FLAG"),1==e.ISLOCK&&a.push("LOCKED"),a.join(" ")},saoma(e){console.log(e.detail.value)},blur(){this.isfoucs=!1,""!=this.keyword.trim()?this.getList(!0):this.getList()},add(){this.isshowTipChange=!0},closeTip(){this.isshowTipChange=!1}}},[["render",function(e,a,t,O,R,P){const M=S(s("m-nav"),E),z=S(s("uni-icons"),T),V=g,A=h,I=k,U=y,j=C,L=w,H=x,F=v,W=b,$=S(s("win-methodadd"),D);return l(),o(V,{class:"content"},{default:n((()=>[i(M,{n:R.navid},null,8,["n"]),i(V,{class:"box"},{default:n((()=>[i(V,{class:"contents"},{default:n((()=>[i(V,{class:"operator"},{default:n((()=>[i(V,{class:"item",onClick:a[0]||(a[0]=e=>P.getList(!0))},{default:n((()=>[i(z,{type:"refreshempty",size:"14"})])),_:1}),i(V,{class:"item on",onClick:P.add},{default:n((()=>[d("添加/修改")])),_:1},8,["onClick"]),i(V,{class:p(["item",R.orderids.length>0?"on":""]),onClick:e.del},{default:n((()=>[d("批量删除")])),_:1},8,["class","onClick"]),i(V,{class:"inputBox"},{default:n((()=>[i(A,{class:p(["input",R.isfoucs?"foucs":""]),placeholder:"群名",id:"input",onFocus:e.foucs,onBlur:P.blur,onConfirm:a[1]||(a[1]=e=>P.saoma(e)),modelValue:R.keyword,"onUpdate:modelValue":a[2]||(a[2]=e=>R.keyword=e),title:"使用速查则忽略以下条件",maxlength:"5000000"},null,8,["onFocus","onBlur","modelValue","class"]),i(V,{class:"plus",onClick:e.whereForm},{default:n((()=>[i(z,{type:"bars",size:"16"})])),_:1},8,["onClick"])])),_:1})])),_:1}),i(L,{class:"list"},{default:n((()=>[r("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2",class:"box"},[r("thead",null,[r("tr",null,[r("th",{align:"center",width:"1%"},[i(j,{style:{transform:"scale(0.7)"},onChange:e.allChange},{default:n((()=>[i(U,null,{default:n((()=>[i(I,{value:"cb",checked:R.orderids.length==R.allids.length},null,8,["checked"])])),_:1})])),_:1},8,["onChange"])]),r("th",{align:"center",width:"5%"},"事件"),r("th",{align:"center",width:"15%"},"关键词"),r("th",{align:"center",width:"15%"},"权重")])]),i(j,{onChange:P.idsChange,class:"checkbox-group"},{default:n((()=>[r("tbody",null,[(l(!0),m(_,null,f(R.list,((a,t)=>(l(),m("tr",{onDblclick:t=>e.showItemWinInfo(a.id),index:t,class:p(P.lineClass(a)),bgcolor:"#fff"},[r("td",{align:"center",width:"1%"},[i(I,{value:a.id,style:{transform:"scale(0.7)"},checked:P.isSelect(a.id)},null,8,["value","checked"])]),r("td",{align:"center",width:"5%"},c(R.methodText[a.method]),1),r("td",{align:"center",width:"15%"},c(a.keys),1),r("td",{align:"center",width:"15%"},c(a.weight),1)],42,["onDblclick","index"])))),256))])])),_:1},8,["onChange"])])])),_:1}),i(V,{class:"bottominfo"},{default:n((()=>[i(V,null,{default:n((()=>[R.page-1>0?(l(),o(H,{key:0,class:"normal noright topage",onClick:a[3]||(a[3]=a=>e.toPage(1))},{default:n((()=>[d("首页")])),_:1})):u("",!0),R.page-1>0?(l(),o(H,{key:1,class:"normal noright topage",onClick:a[4]||(a[4]=a=>e.toPage(R.page-1))},{default:n((()=>[d("上一页")])),_:1})):u("",!0),R.page-4>0?(l(),o(H,{key:2,class:"normal noright topage",onClick:a[5]||(a[5]=a=>e.toPage(R.page-4))},{default:n((()=>[d(c(R.page-4),1)])),_:1})):u("",!0),R.page-3>0?(l(),o(H,{key:3,class:"normal noright topage",onClick:a[6]||(a[6]=a=>e.toPage(R.page-3))},{default:n((()=>[d(c(R.page-3),1)])),_:1})):u("",!0),R.page-2>0?(l(),o(H,{key:4,class:"normal noright topage",onClick:a[7]||(a[7]=a=>e.toPage(R.page-2))},{default:n((()=>[d(c(R.page-2),1)])),_:1})):u("",!0),R.page-1>0?(l(),o(H,{key:5,class:"normal noright topage",onClick:a[8]||(a[8]=a=>e.toPage(R.page-1))},{default:n((()=>[d(c(R.page-1),1)])),_:1})):u("",!0),i(H,{class:"normal noright Pcurrent"},{default:n((()=>[d(c(R.page),1)])),_:1}),R.pagee.toPage(R.page+1))},{default:n((()=>[d(c(R.page+1),1)])),_:1})):u("",!0),R.page+1e.toPage(R.page+2))},{default:n((()=>[d(c(R.page+2),1)])),_:1})):u("",!0),R.page+2e.toPage(R.page+3))},{default:n((()=>[d(c(R.page+3),1)])),_:1})):u("",!0),R.page+3e.toPage(R.page+4))},{default:n((()=>[d(c(R.page+4),1)])),_:1})):u("",!0),Math.ceil(R.count/R.pagesize)>R.page?(l(),o(H,{key:10,class:"normal noright topage",onClick:a[13]||(a[13]=a=>e.toPage(R.page+1))},{default:n((()=>[d("下一页")])),_:1})):u("",!0),Math.ceil(R.count/R.pagesize)>R.page?(l(),o(H,{key:11,class:"normal noright topage",onClick:a[14]||(a[14]=a=>e.toPage(Math.ceil(R.count/R.pagesize)))},{default:n((()=>[d("尾页")])),_:1})):u("",!0),i(H,{class:"t1 normal"},{default:n((()=>[d("共"+c(R.count)+"条",1)])),_:1}),r("select",{class:"page_select_number normal",onChange:a[15]||(a[15]=a=>e.select(a))},[r("option",{value:"20"},"20条/页"),r("option",{value:"50"},"50条/页"),r("option",{value:"100"},"100条/页"),r("option",{value:"200"},"200条/页"),r("option",{value:"1000"},"1000条/页")],32),i(V,{class:"page_jump_group"},{default:n((()=>[i(H,{class:"page_jump_title"},{default:n((()=>[d("跳转到")])),_:1}),i(F,{type:"number",class:"page_jump_input page_jump_input_8iyEh",modelValue:R.tpage,"onUpdate:modelValue":a[16]||(a[16]=e=>R.tpage=e)},null,8,["modelValue"]),i(H,{class:"page_jump_title"},{default:n((()=>[d("页")])),_:1}),i(W,{type:"button",class:"page_jump_btn",onClick:a[17]||(a[17]=a=>e.toPage(R.tpage))},{default:n((()=>[d("确认")])),_:1})])),_:1})])),_:1})])),_:1}),i($,{orderids:R.orderids,isshow:R.isshowTipChange,onClose:P.closeTip},null,8,["orderids","isshow","onClose"])])),_:1})])),_:1})])),_:1})}]]);export{P as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-order.M2XVGrY0.js b/app/assets/public/wechat_1.0.6/assets/pages-index-order.M2XVGrY0.js new file mode 100644 index 0000000..a416f4c --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-order.M2XVGrY0.js @@ -0,0 +1 @@ +import{o as e,c as t,w as a,b as i,y as s,k as l,d as n,t as r,D as d,i as o,E as c,G as h,H as u,h as m,F as p,j as g,P as f,J as k,K as _,f as y,z as D,L as T,M as w,N as b,O as S,Q as x,I as C,r as R,B as v,x as M,A as V,s as $,R as O,l as P,v as I,m as E,n as H,S as U}from"./index-B8U-SFxP.js";import{r as N,_ as F,a as A}from"./m-nav.CZV981Qo.js";import{_ as j}from"./uni-data-select.i2-ymEG0.js";import{_ as W}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{u as z}from"./user.Bm-2eyfO.js";function q(e,t){return`${Y(e)} ${L(e,t)}`}function Y(e){e=Q(e);const t=(e=new Date(e)).getFullYear(),a=e.getMonth()+1,i=e.getDate();return`${t}-${B(a)}-${B(i)}`}function L(e,t){e=Q(e);const a=(e=new Date(e)).getHours(),i=e.getMinutes(),s=e.getSeconds();return t?`${B(a)}:${B(i)}`:`${B(a)}:${B(i)}:${B(s)}`}function B(e){return e<10&&(e=`0${e}`),e}function X(e){return e?"00:00":"00:00:00"}function K(e,t){return(e=new Date(Q(e)))<=(t=new Date(Q(t)))}function G(e){return e.match(/((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g)}const J=/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?)?$/;function Q(e){return"string"==typeof e&&J.test(e)&&(e=e.replace(/-/g,"/")),e}const Z=W({props:{weeks:{type:Object,default:()=>({})},calendar:{type:Object,default:()=>({})},selected:{type:Array,default:()=>[]},checkHover:{type:Boolean,default:!1}},methods:{choiceDate(e){this.$emit("change",e)},handleMousemove(e){this.$emit("handleMouse",e)}}},[["render",function(c,h,u,m,p,g){const f=d,k=o;return e(),t(k,{class:s(["uni-calendar-item__weeks-box",{"uni-calendar-item--disable":u.weeks.disable,"uni-calendar-item--before-checked-x":u.weeks.beforeMultiple,"uni-calendar-item--multiple":u.weeks.multiple,"uni-calendar-item--after-checked-x":u.weeks.afterMultiple}]),onClick:h[0]||(h[0]=e=>g.choiceDate(u.weeks)),onMouseenter:h[1]||(h[1]=e=>g.handleMousemove(u.weeks))},{default:a((()=>[i(k,{class:s(["uni-calendar-item__weeks-box-item",{"uni-calendar-item--checked":u.calendar.fullDate===u.weeks.fullDate&&(u.calendar.userChecked||!u.checkHover),"uni-calendar-item--checked-range-text":u.checkHover,"uni-calendar-item--before-checked":u.weeks.beforeMultiple,"uni-calendar-item--multiple":u.weeks.multiple,"uni-calendar-item--after-checked":u.weeks.afterMultiple,"uni-calendar-item--disable":u.weeks.disable}])},{default:a((()=>[u.selected&&u.weeks.extraInfo?(e(),t(f,{key:0,class:"uni-calendar-item__weeks-box-circle"})):l("",!0),i(f,{class:"uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text"},{default:a((()=>[n(r(u.weeks.date),1)])),_:1})])),_:1},8,["class"]),i(k,{class:s({"uni-calendar-item--today":u.weeks.isToday})},null,8,["class"])])),_:1},8,["class"])}],["__scopeId","data-v-33ef2289"]]),ee={en:{"uni-datetime-picker.selectDate":"select date","uni-datetime-picker.selectTime":"select time","uni-datetime-picker.selectDateTime":"select date and time","uni-datetime-picker.startDate":"start date","uni-datetime-picker.endDate":"end date","uni-datetime-picker.startTime":"start time","uni-datetime-picker.endTime":"end time","uni-datetime-picker.ok":"ok","uni-datetime-picker.clear":"clear","uni-datetime-picker.cancel":"cancel","uni-datetime-picker.year":"-","uni-datetime-picker.month":"","uni-calender.MON":"MON","uni-calender.TUE":"TUE","uni-calender.WED":"WED","uni-calender.THU":"THU","uni-calender.FRI":"FRI","uni-calender.SAT":"SAT","uni-calender.SUN":"SUN","uni-calender.confirm":"confirm"},"zh-Hans":{"uni-datetime-picker.selectDate":"选择日期","uni-datetime-picker.selectTime":"选择时间","uni-datetime-picker.selectDateTime":"选择日期时间","uni-datetime-picker.startDate":"开始日期","uni-datetime-picker.endDate":"结束日期","uni-datetime-picker.startTime":"开始时间","uni-datetime-picker.endTime":"结束时间","uni-datetime-picker.ok":"确定","uni-datetime-picker.clear":"清除","uni-datetime-picker.cancel":"取消","uni-datetime-picker.year":"年","uni-datetime-picker.month":"月","uni-calender.SUN":"日","uni-calender.MON":"一","uni-calender.TUE":"二","uni-calender.WED":"三","uni-calender.THU":"四","uni-calender.FRI":"五","uni-calender.SAT":"六","uni-calender.confirm":"确认"},"zh-Hant":{"uni-datetime-picker.selectDate":"選擇日期","uni-datetime-picker.selectTime":"選擇時間","uni-datetime-picker.selectDateTime":"選擇日期時間","uni-datetime-picker.startDate":"開始日期","uni-datetime-picker.endDate":"結束日期","uni-datetime-picker.startTime":"開始时间","uni-datetime-picker.endTime":"結束时间","uni-datetime-picker.ok":"確定","uni-datetime-picker.clear":"清除","uni-datetime-picker.cancel":"取消","uni-datetime-picker.year":"年","uni-datetime-picker.month":"月","uni-calender.SUN":"日","uni-calender.MON":"一","uni-calender.TUE":"二","uni-calender.WED":"三","uni-calender.THU":"四","uni-calender.FRI":"五","uni-calender.SAT":"六","uni-calender.confirm":"確認"}},{t:te}=c(ee);const ae=W({name:"UniDatetimePicker",data:()=>({indicatorStyle:"height: 50px;",visible:!1,fixNvueBug:{},dateShow:!0,timeShow:!0,title:"日期和时间",time:"",year:1920,month:0,day:0,hour:0,minute:0,second:0,startYear:1920,startMonth:1,startDay:1,startHour:0,startMinute:0,startSecond:0,endYear:2120,endMonth:12,endDay:31,endHour:23,endMinute:59,endSecond:59}),options:{virtualHost:!0},props:{type:{type:String,default:"datetime"},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},start:{type:[Number,String],default:""},end:{type:[Number,String],default:""},returnType:{type:String,default:"string"},disabled:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!0},hideSecond:{type:[Boolean,String],default:!1}},watch:{modelValue:{handler(e){e?(this.parseValue(Q(e)),this.initTime(!1)):(this.time="",this.parseValue(Date.now()))},immediate:!0},type:{handler(e){"date"===e?(this.dateShow=!0,this.timeShow=!1,this.title="日期"):"time"===e?(this.dateShow=!1,this.timeShow=!0,this.title="时间"):(this.dateShow=!0,this.timeShow=!0,this.title="日期和时间")},immediate:!0},start:{handler(e){this.parseDatetimeRange(Q(e),"start")},immediate:!0},end:{handler(e){this.parseDatetimeRange(Q(e),"end")},immediate:!0},months(e){this.checkValue("month",this.month,e)},days(e){this.checkValue("day",this.day,e)},hours(e){this.checkValue("hour",this.hour,e)},minutes(e){this.checkValue("minute",this.minute,e)},seconds(e){this.checkValue("second",this.second,e)}},computed:{years(){return this.getCurrentRange("year")},months(){return this.getCurrentRange("month")},days(){return this.getCurrentRange("day")},hours(){return this.getCurrentRange("hour")},minutes(){return this.getCurrentRange("minute")},seconds(){return this.getCurrentRange("second")},ymd(){return[this.year-this.minYear,this.month-this.minMonth,this.day-this.minDay]},hms(){return[this.hour-this.minHour,this.minute-this.minMinute,this.second-this.minSecond]},currentDateIsStart(){return this.year===this.startYear&&this.month===this.startMonth&&this.day===this.startDay},currentDateIsEnd(){return this.year===this.endYear&&this.month===this.endMonth&&this.day===this.endDay},minYear(){return this.startYear},maxYear(){return this.endYear},minMonth(){return this.year===this.startYear?this.startMonth:1},maxMonth(){return this.year===this.endYear?this.endMonth:12},minDay(){return this.year===this.startYear&&this.month===this.startMonth?this.startDay:1},maxDay(){return this.year===this.endYear&&this.month===this.endMonth?this.endDay:this.daysInMonth(this.year,this.month)},minHour(){return"datetime"===this.type?this.currentDateIsStart?this.startHour:0:"time"===this.type?this.startHour:void 0},maxHour(){return"datetime"===this.type?this.currentDateIsEnd?this.endHour:23:"time"===this.type?this.endHour:void 0},minMinute(){return"datetime"===this.type?this.currentDateIsStart&&this.hour===this.startHour?this.startMinute:0:"time"===this.type?this.hour===this.startHour?this.startMinute:0:void 0},maxMinute(){return"datetime"===this.type?this.currentDateIsEnd&&this.hour===this.endHour?this.endMinute:59:"time"===this.type?this.hour===this.endHour?this.endMinute:59:void 0},minSecond(){return"datetime"===this.type?this.currentDateIsStart&&this.hour===this.startHour&&this.minute===this.startMinute?this.startSecond:0:"time"===this.type?this.hour===this.startHour&&this.minute===this.startMinute?this.startSecond:0:void 0},maxSecond(){return"datetime"===this.type?this.currentDateIsEnd&&this.hour===this.endHour&&this.minute===this.endMinute?this.endSecond:59:"time"===this.type?this.hour===this.endHour&&this.minute===this.endMinute?this.endSecond:59:void 0},selectTimeText:()=>te("uni-datetime-picker.selectTime"),okText:()=>te("uni-datetime-picker.ok"),clearText:()=>te("uni-datetime-picker.clear"),cancelText:()=>te("uni-datetime-picker.cancel")},mounted(){},methods:{lessThanTen:e=>e<10?"0"+e:e,parseTimeType(e){if(e){let t=e.split(":");this.hour=Number(t[0]),this.minute=Number(t[1]),this.second=Number(t[2])}},initPickerValue(e){let t=null;e?t=this.compareValueWithStartAndEnd(e,this.start,this.end):(t=Date.now(),t=this.compareValueWithStartAndEnd(t,this.start,this.end)),this.parseValue(t)},compareValueWithStartAndEnd(e,t,a){let i=null;return e=this.superTimeStamp(e),t=this.superTimeStamp(t),a=this.superTimeStamp(a),i=t&&a?ea?new Date(a):new Date(e):t&&!a?t<=e?new Date(e):new Date(t):!t&&a?e<=a?new Date(e):new Date(a):new Date(e),i},superTimeStamp(e){let t="";if("time"===this.type&&e&&"string"==typeof e){const e=new Date;t=e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()+" "}return Number(e)&&(e=parseInt(e),t=0),this.createTimeStamp(t+e)},parseValue(e){if(e){if("time"===this.type&&"string"==typeof e)this.parseTimeType(e);else{let t=null;t=new Date(e),"time"!==this.type&&(this.year=t.getFullYear(),this.month=t.getMonth()+1,this.day=t.getDate()),"date"!==this.type&&(this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds())}this.hideSecond&&(this.second=0)}},parseDatetimeRange(e,t){if(!e)return"start"===t&&(this.startYear=1920,this.startMonth=1,this.startDay=1,this.startHour=0,this.startMinute=0,this.startSecond=0),void("end"===t&&(this.endYear=2120,this.endMonth=12,this.endDay=31,this.endHour=23,this.endMinute=59,this.endSecond=59));if("time"===this.type){const a=e.split(":");this[t+"Hour"]=Number(a[0]),this[t+"Minute"]=Number(a[1]),this[t+"Second"]=Number(a[2])}else{if(!e)return void("start"===t?this.startYear=this.year-60:this.endYear=this.year+60);Number(e)&&(e=parseInt(e));const a=/[0-9]:[0-9]/;"datetime"!==this.type||"end"!==t||"string"!=typeof e||a.test(e)||(e+=" 23:59:59");const i=new Date(e);this[t+"Year"]=i.getFullYear(),this[t+"Month"]=i.getMonth()+1,this[t+"Day"]=i.getDate(),"datetime"===this.type&&(this[t+"Hour"]=i.getHours(),this[t+"Minute"]=i.getMinutes(),this[t+"Second"]=i.getSeconds())}},getCurrentRange(e){const t=[];for(let a=this["min"+this.capitalize(e)];a<=this["max"+this.capitalize(e)];a++)t.push(a);return t},capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),checkValue(e,t,a){-1===a.indexOf(t)&&(this[e]=a[0])},daysInMonth:(e,t)=>new Date(e,t,0).getDate(),createTimeStamp(e){if(e)return"number"==typeof e?e:(e=e.replace(/-/g,"/"),"date"===this.type&&(e+=" 00:00:00"),Date.parse(e))},createDomSting(){const e=this.year+"-"+this.lessThanTen(this.month)+"-"+this.lessThanTen(this.day);let t=this.lessThanTen(this.hour)+":"+this.lessThanTen(this.minute);return this.hideSecond||(t=t+":"+this.lessThanTen(this.second)),"date"===this.type?e:"time"===this.type?t:e+" "+t},initTime(e=!0){this.time=this.createDomSting(),e&&("timestamp"===this.returnType&&"time"!==this.type?(this.$emit("change",this.createTimeStamp(this.time)),this.$emit("input",this.createTimeStamp(this.time)),this.$emit("update:modelValue",this.createTimeStamp(this.time))):(this.$emit("change",this.time),this.$emit("input",this.time),this.$emit("update:modelValue",this.time)))},bindDateChange(e){const t=e.detail.value;this.year=this.years[t[0]],this.month=this.months[t[1]],this.day=this.days[t[2]]},bindTimeChange(e){const t=e.detail.value;this.hour=this.hours[t[0]],this.minute=this.minutes[t[1]],this.second=this.seconds[t[2]]},initTimePicker(){if(this.disabled)return;const e=Q(this.time);this.initPickerValue(e),this.visible=!this.visible},tiggerTimePicker(e){this.visible=!this.visible},clearTime(){this.time="",this.$emit("change",this.time),this.$emit("input",this.time),this.$emit("update:modelValue",this.time),this.tiggerTimePicker()},setTime(){this.initTime(),this.tiggerTimePicker()}}},[["render",function(c,_,y,D,T,w){const b=d,S=o,x=f,C=k;return e(),t(S,{class:"uni-datetime-picker"},{default:a((()=>[i(S,{onClick:w.initTimePicker},{default:a((()=>[h(c.$slots,"default",{},(()=>[i(S,{class:s(["uni-datetime-picker-timebox-pointer",{"uni-datetime-picker-disabled":y.disabled,"uni-datetime-picker-timebox":y.border}])},{default:a((()=>[i(b,{class:"uni-datetime-picker-text"},{default:a((()=>[n(r(T.time),1)])),_:1}),T.time?l("",!0):(e(),t(S,{key:0,class:"uni-datetime-picker-time"},{default:a((()=>[i(b,{class:"uni-datetime-picker-text"},{default:a((()=>[n(r(w.selectTimeText),1)])),_:1})])),_:1}))])),_:1},8,["class"])]),!0)])),_:3},8,["onClick"]),T.visible?(e(),t(S,{key:0,id:"mask",class:"uni-datetime-picker-mask",onClick:w.tiggerTimePicker},null,8,["onClick"])):l("",!0),T.visible?(e(),t(S,{key:1,class:s(["uni-datetime-picker-popup",[T.dateShow&&T.timeShow?"":"fix-nvue-height"]]),style:u(T.fixNvueBug)},{default:a((()=>[i(S,{class:"uni-title"},{default:a((()=>[i(b,{class:"uni-datetime-picker-text"},{default:a((()=>[n(r(w.selectTimeText),1)])),_:1})])),_:1}),T.dateShow?(e(),t(S,{key:0,class:"uni-datetime-picker__container-box"},{default:a((()=>[i(C,{class:"uni-datetime-picker-view","indicator-style":T.indicatorStyle,value:w.ymd,onChange:w.bindDateChange},{default:a((()=>[i(x,null,{default:a((()=>[(e(!0),m(p,null,g(w.years,((s,l)=>(e(),t(S,{class:"uni-datetime-picker-item",key:l},{default:a((()=>[i(b,{class:"uni-datetime-picker-item"},{default:a((()=>[n(r(w.lessThanTen(s)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),i(x,null,{default:a((()=>[(e(!0),m(p,null,g(w.months,((s,l)=>(e(),t(S,{class:"uni-datetime-picker-item",key:l},{default:a((()=>[i(b,{class:"uni-datetime-picker-item"},{default:a((()=>[n(r(w.lessThanTen(s)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),i(x,null,{default:a((()=>[(e(!0),m(p,null,g(w.days,((s,l)=>(e(),t(S,{class:"uni-datetime-picker-item",key:l},{default:a((()=>[i(b,{class:"uni-datetime-picker-item"},{default:a((()=>[n(r(w.lessThanTen(s)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1},8,["indicator-style","value","onChange"]),i(b,{class:"uni-datetime-picker-sign sign-left"},{default:a((()=>[n("-")])),_:1}),i(b,{class:"uni-datetime-picker-sign sign-right"},{default:a((()=>[n("-")])),_:1})])),_:1})):l("",!0),T.timeShow?(e(),t(S,{key:1,class:"uni-datetime-picker__container-box"},{default:a((()=>[i(C,{class:s(["uni-datetime-picker-view",[y.hideSecond?"time-hide-second":""]]),"indicator-style":T.indicatorStyle,value:w.hms,onChange:w.bindTimeChange},{default:a((()=>[i(x,null,{default:a((()=>[(e(!0),m(p,null,g(w.hours,((s,l)=>(e(),t(S,{class:"uni-datetime-picker-item",key:l},{default:a((()=>[i(b,{class:"uni-datetime-picker-item"},{default:a((()=>[n(r(w.lessThanTen(s)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),i(x,null,{default:a((()=>[(e(!0),m(p,null,g(w.minutes,((s,l)=>(e(),t(S,{class:"uni-datetime-picker-item",key:l},{default:a((()=>[i(b,{class:"uni-datetime-picker-item"},{default:a((()=>[n(r(w.lessThanTen(s)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),y.hideSecond?l("",!0):(e(),t(x,{key:0},{default:a((()=>[(e(!0),m(p,null,g(w.seconds,((s,l)=>(e(),t(S,{class:"uni-datetime-picker-item",key:l},{default:a((()=>[i(b,{class:"uni-datetime-picker-item"},{default:a((()=>[n(r(w.lessThanTen(s)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}))])),_:1},8,["class","indicator-style","value","onChange"]),i(b,{class:s(["uni-datetime-picker-sign",[y.hideSecond?"sign-center":"sign-left"]])},{default:a((()=>[n(":")])),_:1},8,["class"]),y.hideSecond?l("",!0):(e(),t(b,{key:0,class:"uni-datetime-picker-sign sign-right"},{default:a((()=>[n(":")])),_:1}))])),_:1})):l("",!0),i(S,{class:"uni-datetime-picker-btn"},{default:a((()=>[i(S,{onClick:w.clearTime},{default:a((()=>[i(b,{class:"uni-datetime-picker-btn-text"},{default:a((()=>[n(r(w.clearText),1)])),_:1})])),_:1},8,["onClick"]),i(S,{class:"uni-datetime-picker-btn-group"},{default:a((()=>[i(S,{class:"uni-datetime-picker-cancel",onClick:w.tiggerTimePicker},{default:a((()=>[i(b,{class:"uni-datetime-picker-btn-text"},{default:a((()=>[n(r(w.cancelText),1)])),_:1})])),_:1},8,["onClick"]),i(S,{onClick:w.setTime},{default:a((()=>[i(b,{class:"uni-datetime-picker-btn-text"},{default:a((()=>[n(r(w.okText),1)])),_:1})])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1},8,["class","style"])):l("",!0)])),_:3})}],["__scopeId","data-v-8e4813cb"]]),{t:ie}=c(ee);const se=W({name:"UniDatetimePicker",options:{virtualHost:!0},components:{Calendar:W({components:{calendarItem:Z,timePicker:ae},options:{virtualHost:!0},props:{date:{type:String,default:""},defTime:{type:[String,Object],default:""},selectableTimes:{type:[Object],default:()=>({})},selected:{type:Array,default:()=>[]},startDate:{type:String,default:""},endDate:{type:String,default:""},startPlaceholder:{type:String,default:""},endPlaceholder:{type:String,default:""},range:{type:Boolean,default:!1},hasTime:{type:Boolean,default:!1},insert:{type:Boolean,default:!0},showMonth:{type:Boolean,default:!0},clearDate:{type:Boolean,default:!0},checkHover:{type:Boolean,default:!0},hideSecond:{type:[Boolean],default:!1},pleStatus:{type:Object,default:()=>({before:"",after:"",data:[],fulldate:""})},defaultValue:{type:[String,Object,Array],default:""}},data:()=>({show:!1,weeks:[],calendar:{},nowDate:{},aniMaskShow:!1,firstEnter:!0,time:"",timeRange:{startTime:"",endTime:""},tempSingleDate:"",tempRange:{before:"",after:""}}),watch:{date:{immediate:!0,handler(e){this.range||(this.tempSingleDate=e,setTimeout((()=>{this.init(e)}),100))}},defTime:{immediate:!0,handler(e){this.range?(this.timeRange.startTime=e.start,this.timeRange.endTime=e.end):this.time=e}},startDate(e){this.cale&&(this.cale.setStartDate(e),this.cale.setDate(this.nowDate.fullDate),this.weeks=this.cale.weeks)},endDate(e){this.cale&&(this.cale.setEndDate(e),this.cale.setDate(this.nowDate.fullDate),this.weeks=this.cale.weeks)},selected(e){this.cale&&(this.cale.setSelectInfo(this.nowDate.fullDate,e),this.weeks=this.cale.weeks)},pleStatus:{immediate:!0,handler(e){const{before:t,after:a,fulldate:i,which:s}=e;this.tempRange.before=t,this.tempRange.after=a,setTimeout((()=>{if(i)if(this.cale.setHoverMultiple(i),t&&a){if(this.cale.lastHover=!0,this.rangeWithinMonth(a,t))return;this.setDate(t)}else this.cale.setMultiple(i),this.setDate(this.nowDate.fullDate),this.calendar.fullDate="",this.cale.lastHover=!1;else{if(!this.cale)return;this.cale.setDefaultMultiple(t,a),"left"===s&&t?(this.setDate(t),this.weeks=this.cale.weeks):a&&(this.setDate(a),this.weeks=this.cale.weeks),this.cale.lastHover=!0}}),16)}}},computed:{timepickerStartTime(){return(this.range?this.tempRange.before:this.calendar.fullDate)===this.startDate?this.selectableTimes.start:""},timepickerEndTime(){return(this.range?this.tempRange.after:this.calendar.fullDate)===this.endDate?this.selectableTimes.end:""},selectDateText:()=>ie("uni-datetime-picker.selectDate"),startDateText(){return this.startPlaceholder||ie("uni-datetime-picker.startDate")},endDateText(){return this.endPlaceholder||ie("uni-datetime-picker.endDate")},okText:()=>ie("uni-datetime-picker.ok"),yearText:()=>ie("uni-datetime-picker.year"),monthText:()=>ie("uni-datetime-picker.month"),MONText:()=>ie("uni-calender.MON"),TUEText:()=>ie("uni-calender.TUE"),WEDText:()=>ie("uni-calender.WED"),THUText:()=>ie("uni-calender.THU"),FRIText:()=>ie("uni-calender.FRI"),SATText:()=>ie("uni-calender.SAT"),SUNText:()=>ie("uni-calender.SUN"),confirmText:()=>ie("uni-calender.confirm")},created(){this.cale=new class{constructor({selected:e,startDate:t,endDate:a,range:i}={}){this.date=this.getDateObj(new Date),this.selected=e||[],this.startDate=t,this.endDate=a,this.range=i,this.cleanMultipleStatus(),this.weeks={},this.lastHover=!1}setDate(e){const t=this.getDateObj(e);this.getWeeks(t.fullDate)}cleanMultipleStatus(){this.multipleStatus={before:"",after:"",data:[]}}setStartDate(e){this.startDate=e}setEndDate(e){this.endDate=e}getPreMonthObj(e){e=Q(e);const t=(e=new Date(e)).getMonth();e.setMonth(t-1);const a=e.getMonth();return 0!==t&&a-t==0&&e.setMonth(a-1),this.getDateObj(e)}getNextMonthObj(e){e=Q(e);const t=(e=new Date(e)).getMonth();e.setMonth(t+1);const a=e.getMonth();return a-t>1&&e.setMonth(a-1),this.getDateObj(e)}getDateObj(e){return e=Q(e),{fullDate:Y(e=new Date(e)),year:e.getFullYear(),month:B(e.getMonth()+1),date:B(e.getDate()),day:e.getDay()}}getPreMonthDays(e,t){const a=[];for(let i=e-1;i>=0;i--){const e=t.month-1;a.push({date:new Date(t.year,e,-i).getDate(),month:e,disable:!0})}return a}getCurrentMonthDays(e,t){const a=[],i=this.date.fullDate;for(let s=1;s<=e;s++){const e=`${t.year}-${t.month}-${B(s)}`,l=i===e,n=this.selected&&this.selected.find((t=>{if(this.dateEqual(e,t.date))return t}));this.startDate&&K(this.startDate,e),this.endDate&&K(e,this.endDate);let r=this.multipleStatus.data,d=-1;this.range&&r&&(d=r.findIndex((t=>this.dateEqual(t,e))));const o=-1!==d;a.push({fullDate:e,year:t.year,date:s,multiple:!!this.range&&o,beforeMultiple:this.isLogicBefore(e,this.multipleStatus.before,this.multipleStatus.after),afterMultiple:this.isLogicAfter(e,this.multipleStatus.before,this.multipleStatus.after),month:t.month,disable:this.startDate&&!K(this.startDate,e)||this.endDate&&!K(e,this.endDate),isToday:l,userChecked:!1,extraInfo:n})}return a}_getNextMonthDays(e,t){const a=[],i=t.month+1;for(let s=1;s<=e;s++)a.push({date:s,month:i,disable:!0});return a}getInfo(e){e||(e=new Date);return this.calendar.find((t=>t.fullDate===this.getDateObj(e).fullDate))||this.getDateObj(e)}dateEqual(e,t){return e=new Date(Q(e)),t=new Date(Q(t)),e.valueOf()===t.valueOf()}isLogicBefore(e,t,a){let i=t;return t&&a&&(i=K(t,a)?t:a),this.dateEqual(i,e)}isLogicAfter(e,t,a){let i=a;return t&&a&&(i=K(t,a)?a:t),this.dateEqual(i,e)}geDateAll(e,t){var a=[],i=e.split("-"),s=t.split("-"),l=new Date;l.setFullYear(i[0],i[1]-1,i[2]);var n=new Date;n.setFullYear(s[0],s[1]-1,s[2]);for(var r=l.getTime()-864e5,d=n.getTime()-864e5,o=r;o<=d;)o+=864e5,a.push(this.getDateObj(new Date(parseInt(o))).fullDate);return a}setMultiple(e){if(!this.range)return;let{before:t,after:a}=this.multipleStatus;if(t&&a){if(!this.lastHover)return void(this.lastHover=!0);this.multipleStatus.before=e,this.multipleStatus.after="",this.multipleStatus.data=[],this.multipleStatus.fulldate="",this.lastHover=!1}else t?(this.multipleStatus.after=e,K(this.multipleStatus.before,this.multipleStatus.after)?this.multipleStatus.data=this.geDateAll(this.multipleStatus.before,this.multipleStatus.after):this.multipleStatus.data=this.geDateAll(this.multipleStatus.after,this.multipleStatus.before),this.lastHover=!0):(this.multipleStatus.before=e,this.multipleStatus.after=void 0,this.lastHover=!1);this.getWeeks(e)}setHoverMultiple(e){if(!this.range||this.lastHover)return;const{before:t}=this.multipleStatus;t?(this.multipleStatus.after=e,K(this.multipleStatus.before,this.multipleStatus.after)?this.multipleStatus.data=this.geDateAll(this.multipleStatus.before,this.multipleStatus.after):this.multipleStatus.data=this.geDateAll(this.multipleStatus.after,this.multipleStatus.before)):this.multipleStatus.before=e,this.getWeeks(e)}setDefaultMultiple(e,t){this.multipleStatus.before=e,this.multipleStatus.after=t,e&&t&&(K(e,t)?(this.multipleStatus.data=this.geDateAll(e,t),this.getWeeks(t)):(this.multipleStatus.data=this.geDateAll(t,e),this.getWeeks(e)))}getWeeks(e){const{year:t,month:a}=this.getDateObj(e),i=new Date(t,a-1,1).getDay(),s=this.getPreMonthDays(i,this.getDateObj(e)),l=new Date(t,a,0).getDate(),n=42-i-l,r=[...s,...this.getCurrentMonthDays(l,this.getDateObj(e)),...this._getNextMonthDays(n,this.getDateObj(e))],d=new Array(6);for(let o=0;o{setTimeout((()=>{this.aniMaskShow=!0}),50)}))},close(){this.aniMaskShow=!1,this.$nextTick((()=>{setTimeout((()=>{this.show=!1,this.$emit("close")}),300)}))},confirm(){this.setEmit("confirm"),this.close()},change(e){(this.insert||e)&&this.setEmit("change")},monthSwitch(){let{year:e,month:t}=this.nowDate;this.$emit("monthSwitch",{year:e,month:Number(t)})},setEmit(e){this.range||(this.calendar.fullDate||(this.calendar=this.cale.getInfo(new Date),this.tempSingleDate=this.calendar.fullDate),this.hasTime&&!this.time&&(this.time=L(new Date,this.hideSecond)));let{year:t,month:a,date:i,fullDate:s,extraInfo:l}=this.calendar;this.$emit(e,{range:this.cale.multipleStatus,year:t,month:a,date:i,time:this.time,timeRange:this.timeRange,fulldate:s,extraInfo:l||{}})},choiceDate(e){if(e.disable)return;this.calendar=e,this.calendar.userChecked=!0,this.cale.setMultiple(this.calendar.fullDate,!0),this.weeks=this.cale.weeks,this.tempSingleDate=this.calendar.fullDate;const t=new Date(this.cale.multipleStatus.before).getTime(),a=new Date(this.cale.multipleStatus.after).getTime();t>a&&a?(this.tempRange.before=this.cale.multipleStatus.after,this.tempRange.after=this.cale.multipleStatus.before):(this.tempRange.before=this.cale.multipleStatus.before,this.tempRange.after=this.cale.multipleStatus.after),this.change(!0)},changeMonth(e){let t;"pre"===e?t=this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate:"next"===e&&(t=this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate),this.setDate(t),this.monthSwitch()},setDate(e){this.cale.setDate(e),this.weeks=this.cale.weeks,this.nowDate=this.cale.getInfo(e)}}},[["render",function(c,h,u,f,k,w){const b=o,S=d,x=T,C=_("calendar-item"),R=_("time-picker"),v=N(y("uni-icons"),F);return e(),t(b,{class:"uni-calendar",onMouseleave:w.leaveCale},{default:a((()=>[!u.insert&&k.show?(e(),t(b,{key:0,class:s(["uni-calendar__mask",{"uni-calendar--mask-show":k.aniMaskShow}]),onClick:w.maskClick},null,8,["class","onClick"])):l("",!0),u.insert||k.show?(e(),t(b,{key:1,class:s(["uni-calendar__content",{"uni-calendar--fixed":!u.insert,"uni-calendar--ani-show":k.aniMaskShow,"uni-calendar__content-mobile":k.aniMaskShow}])},{default:a((()=>[i(b,{class:s(["uni-calendar__header",{"uni-calendar__header-mobile":!u.insert}])},{default:a((()=>[i(b,{class:"uni-calendar__header-btn-box",onClick:h[0]||(h[0]=D((e=>w.changeMonth("pre")),["stop"]))},{default:a((()=>[i(b,{class:"uni-calendar__header-btn uni-calendar--left"})])),_:1}),i(x,{mode:"date",value:u.date,fields:"month",onChange:w.bindDateChange},{default:a((()=>[i(S,{class:"uni-calendar__header-text"},{default:a((()=>[n(r((k.nowDate.year||"")+w.yearText+(k.nowDate.month||"")+w.monthText),1)])),_:1})])),_:1},8,["value","onChange"]),i(b,{class:"uni-calendar__header-btn-box",onClick:h[1]||(h[1]=D((e=>w.changeMonth("next")),["stop"]))},{default:a((()=>[i(b,{class:"uni-calendar__header-btn uni-calendar--right"})])),_:1}),u.insert?l("",!0):(e(),t(b,{key:0,class:"dialog-close",onClick:w.maskClick},{default:a((()=>[i(b,{class:"dialog-close-plus","data-id":"close"}),i(b,{class:"dialog-close-plus dialog-close-rotate","data-id":"close"})])),_:1},8,["onClick"]))])),_:1},8,["class"]),i(b,{class:"uni-calendar__box"},{default:a((()=>[u.showMonth?(e(),t(b,{key:0,class:"uni-calendar__box-bg"},{default:a((()=>[i(S,{class:"uni-calendar__box-bg-text"},{default:a((()=>[n(r(k.nowDate.month),1)])),_:1})])),_:1})):l("",!0),i(b,{class:"uni-calendar__weeks",style:{"padding-bottom":"7px"}},{default:a((()=>[i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.SUNText),1)])),_:1})])),_:1}),i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.MONText),1)])),_:1})])),_:1}),i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.TUEText),1)])),_:1})])),_:1}),i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.WEDText),1)])),_:1})])),_:1}),i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.THUText),1)])),_:1})])),_:1}),i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.FRIText),1)])),_:1})])),_:1}),i(b,{class:"uni-calendar__weeks-day"},{default:a((()=>[i(S,{class:"uni-calendar__weeks-day-text"},{default:a((()=>[n(r(w.SATText),1)])),_:1})])),_:1})])),_:1}),(e(!0),m(p,null,g(k.weeks,((s,l)=>(e(),t(b,{class:"uni-calendar__weeks",key:l},{default:a((()=>[(e(!0),m(p,null,g(s,((s,l)=>(e(),t(b,{class:"uni-calendar__weeks-item",key:l},{default:a((()=>[i(C,{class:"uni-calendar-item--hook",weeks:s,calendar:k.calendar,selected:u.selected,checkHover:u.range,onChange:w.choiceDate,onHandleMouse:w.handleMouse},null,8,["weeks","calendar","selected","checkHover","onChange","onHandleMouse"])])),_:2},1024)))),128))])),_:2},1024)))),128))])),_:1}),u.insert||u.range||!u.hasTime?l("",!0):(e(),t(b,{key:0,class:"uni-date-changed uni-calendar--fixed-top",style:{padding:"0 80px"}},{default:a((()=>[i(b,{class:"uni-date-changed--time-date"},{default:a((()=>[n(r(k.tempSingleDate?k.tempSingleDate:w.selectDateText),1)])),_:1}),i(R,{type:"time",start:w.timepickerStartTime,end:w.timepickerEndTime,modelValue:k.time,"onUpdate:modelValue":h[2]||(h[2]=e=>k.time=e),disabled:!k.tempSingleDate,border:!1,"hide-second":u.hideSecond,class:"time-picker-style"},null,8,["start","end","modelValue","disabled","hide-second"])])),_:1})),!u.insert&&u.range&&u.hasTime?(e(),t(b,{key:1,class:"uni-date-changed uni-calendar--fixed-top"},{default:a((()=>[i(b,{class:"uni-date-changed--time-start"},{default:a((()=>[i(b,{class:"uni-date-changed--time-date"},{default:a((()=>[n(r(k.tempRange.before?k.tempRange.before:w.startDateText),1)])),_:1}),i(R,{type:"time",start:w.timepickerStartTime,modelValue:k.timeRange.startTime,"onUpdate:modelValue":h[3]||(h[3]=e=>k.timeRange.startTime=e),border:!1,"hide-second":u.hideSecond,disabled:!k.tempRange.before,class:"time-picker-style"},null,8,["start","modelValue","hide-second","disabled"])])),_:1}),i(b,{style:{"line-height":"50px"}},{default:a((()=>[i(v,{type:"arrowthinright",color:"#999"})])),_:1}),i(b,{class:"uni-date-changed--time-end"},{default:a((()=>[i(b,{class:"uni-date-changed--time-date"},{default:a((()=>[n(r(k.tempRange.after?k.tempRange.after:w.endDateText),1)])),_:1}),i(R,{type:"time",end:w.timepickerEndTime,modelValue:k.timeRange.endTime,"onUpdate:modelValue":h[4]||(h[4]=e=>k.timeRange.endTime=e),border:!1,"hide-second":u.hideSecond,disabled:!k.tempRange.after,class:"time-picker-style"},null,8,["end","modelValue","hide-second","disabled"])])),_:1})])),_:1})):l("",!0),u.insert?l("",!0):(e(),t(b,{key:2,class:"uni-date-changed uni-date-btn--ok"},{default:a((()=>[i(b,{class:"uni-datetime-picker--btn",onClick:w.confirm},{default:a((()=>[n(r(w.confirmText),1)])),_:1},8,["onClick"])])),_:1}))])),_:1},8,["class"])):l("",!0)])),_:1},8,["onMouseleave"])}],["__scopeId","data-v-24c3b263"]]),TimePicker:ae},data:()=>({isRange:!1,hasTime:!1,displayValue:"",inputDate:"",calendarDate:"",pickerTime:"",calendarRange:{startDate:"",startTime:"",endDate:"",endTime:""},displayRangeValue:{startDate:"",endDate:""},tempRange:{startDate:"",startTime:"",endDate:"",endTime:""},startMultipleStatus:{before:"",after:"",data:[],fulldate:""},endMultipleStatus:{before:"",after:"",data:[],fulldate:""},pickerVisible:!1,pickerPositionStyle:null,isEmitValue:!1,isPhone:!1,isFirstShow:!0,i18nT:()=>{}}),props:{type:{type:String,default:"datetime"},value:{type:[String,Number,Array,Date],default:""},modelValue:{type:[String,Number,Array,Date],default:""},start:{type:[Number,String],default:""},end:{type:[Number,String],default:""},returnType:{type:String,default:"string"},placeholder:{type:String,default:""},startPlaceholder:{type:String,default:""},endPlaceholder:{type:String,default:""},rangeSeparator:{type:String,default:"-"},border:{type:[Boolean],default:!0},disabled:{type:[Boolean],default:!1},clearIcon:{type:[Boolean],default:!0},hideSecond:{type:[Boolean],default:!1},defaultValue:{type:[String,Object,Array],default:""}},watch:{type:{immediate:!0,handler(e){this.hasTime=-1!==e.indexOf("time"),this.isRange=-1!==e.indexOf("range")}},modelValue:{immediate:!0,handler(e){this.isEmitValue?this.isEmitValue=!1:this.initPicker(e)}},start:{immediate:!0,handler(e){e&&(this.calendarRange.startDate=Y(e),this.hasTime&&(this.calendarRange.startTime=L(e)))}},end:{immediate:!0,handler(e){e&&(this.calendarRange.endDate=Y(e),this.hasTime&&(this.calendarRange.endTime=L(e,this.hideSecond)))}}},computed:{timepickerStartTime(){return(this.isRange?this.tempRange.startDate:this.inputDate)===this.calendarRange.startDate?this.calendarRange.startTime:""},timepickerEndTime(){return(this.isRange?this.tempRange.endDate:this.inputDate)===this.calendarRange.endDate?this.calendarRange.endTime:""},mobileCalendarTime(){const e={start:this.tempRange.startTime,end:this.tempRange.endTime};return this.isRange?e:this.pickerTime},mobSelectableTime(){return{start:this.calendarRange.startTime,end:this.calendarRange.endTime}},datePopupWidth(){return this.isRange?653:301},singlePlaceholderText(){return this.placeholder||("date"===this.type?this.selectDateText:this.selectDateTimeText)},startPlaceholderText(){return this.startPlaceholder||this.startDateText},endPlaceholderText(){return this.endPlaceholder||this.endDateText},selectDateText(){return this.i18nT("uni-datetime-picker.selectDate")},selectDateTimeText(){return this.i18nT("uni-datetime-picker.selectDateTime")},selectTimeText(){return this.i18nT("uni-datetime-picker.selectTime")},startDateText(){return this.startPlaceholder||this.i18nT("uni-datetime-picker.startDate")},startTimeText(){return this.i18nT("uni-datetime-picker.startTime")},endDateText(){return this.endPlaceholder||this.i18nT("uni-datetime-picker.endDate")},endTimeText(){return this.i18nT("uni-datetime-picker.endTime")},okText(){return this.i18nT("uni-datetime-picker.ok")},clearText(){return this.i18nT("uni-datetime-picker.clear")},showClearIcon(){return this.clearIcon&&!this.disabled&&(this.displayValue||this.displayRangeValue.startDate&&this.displayRangeValue.endDate)}},created(){this.initI18nT(),this.platform()},methods:{initI18nT(){const e=c(ee);this.i18nT=e.t},initPicker(e){if(!e&&!this.defaultValue||Array.isArray(e)&&!e.length)this.$nextTick((()=>{this.clear(!1)}));else if(Array.isArray(e)||this.isRange){const[t,a]=e;if(!t&&!a)return;const i=Y(t),s=L(t,this.hideSecond),l=Y(a),n=L(a,this.hideSecond),r=i,d=l;this.displayRangeValue.startDate=this.tempRange.startDate=r,this.displayRangeValue.endDate=this.tempRange.endDate=d,this.hasTime&&(this.displayRangeValue.startDate=`${i} ${s}`,this.displayRangeValue.endDate=`${l} ${n}`,this.tempRange.startTime=s,this.tempRange.endTime=n);const o={before:i,after:l};this.startMultipleStatus=Object.assign({},this.startMultipleStatus,o,{which:"right"}),this.endMultipleStatus=Object.assign({},this.endMultipleStatus,o,{which:"left"})}else e?(this.displayValue=this.inputDate=this.calendarDate=Y(e),this.hasTime&&(this.pickerTime=L(e,this.hideSecond),this.displayValue=`${this.displayValue} ${this.pickerTime}`)):this.defaultValue&&(this.inputDate=this.calendarDate=Y(this.defaultValue),this.hasTime&&(this.pickerTime=L(this.defaultValue,this.hideSecond)))},updateLeftCale(e){const t=this.$refs.left;t.cale.setHoverMultiple(e.after),t.setDate(this.$refs.left.nowDate.fullDate)},updateRightCale(e){const t=this.$refs.right;t.cale.setHoverMultiple(e.after),t.setDate(this.$refs.right.nowDate.fullDate)},platform(){if("undefined"!=typeof navigator)return void(this.isPhone=-1!==navigator.userAgent.toLowerCase().indexOf("mobile"));const{windowWidth:e}=w();this.isPhone=e<=500,this.windowWidth=e},show(){if(this.$emit("show"),this.disabled)return;if(this.platform(),this.isPhone)return void setTimeout((()=>{this.$refs.mobile.open()}),0);this.pickerPositionStyle={top:"10px"};b().in(this).select(".uni-date-editor").boundingClientRect((e=>{this.windowWidth-e.left{if(this.pickerVisible=!this.pickerVisible,!this.isPhone&&this.isRange&&this.isFirstShow){this.isFirstShow=!1;const{startDate:e,endDate:t}=this.calendarRange;e&&t?this.diffDate(e,t)<30&&this.$refs.right.changeMonth("pre"):this.isPhone&&(this.$refs.right.cale.lastHover=!1)}}),50)},close(){setTimeout((()=>{this.pickerVisible=!1,this.$emit("maskClick",this.value),this.$refs.mobile&&this.$refs.mobile.close()}),20)},setEmit(e){"timestamp"!==this.returnType&&"date"!==this.returnType||(Array.isArray(e)?(this.hasTime||(e[0]=e[0]+" 00:00:00",e[1]=e[1]+" 00:00:00"),e[0]=this.createTimestamp(e[0]),e[1]=this.createTimestamp(e[1]),"date"===this.returnType&&(e[0]=new Date(e[0]),e[1]=new Date(e[1]))):(this.hasTime||(e+=" 00:00:00"),e=this.createTimestamp(e),"date"===this.returnType&&(e=new Date(e)))),this.$emit("update:modelValue",e),this.$emit("input",e),this.$emit("change",e),this.isEmitValue=!0},createTimestamp:e=>(e=Q(e),Date.parse(new Date(e))),singleChange(e){this.calendarDate=this.inputDate=e.fulldate,this.hasTime||this.confirmSingleChange()},confirmSingleChange(){if(!G(this.inputDate)){const e=new Date;this.calendarDate=this.inputDate=Y(e),this.pickerTime=L(e,this.hideSecond)}let e,t,a=!1;if(this.start){let i=this.start;"number"==typeof this.start&&(i=q(this.start,this.hideSecond)),[e,t]=i.split(" "),this.start&&!K(e,this.inputDate)&&(a=!0,this.inputDate=e)}let i,s,l=!1;if(this.end){let e=this.end;"number"==typeof this.end&&(e=q(this.end,this.hideSecond)),[i,s]=e.split(" "),this.end&&!K(this.inputDate,i)&&(l=!0,this.inputDate=i)}this.hasTime?(a&&(this.pickerTime=t||X(this.hideSecond)),l&&(this.pickerTime=s||X(this.hideSecond)),this.pickerTime||(this.pickerTime=L(Date.now(),this.hideSecond)),this.displayValue=`${this.inputDate} ${this.pickerTime}`):this.displayValue=this.inputDate,this.setEmit(this.displayValue),this.pickerVisible=!1},leftChange(e){const{before:t,after:a}=e.range;this.rangeChange(t,a);const i={before:e.range.before,after:e.range.after,data:e.range.data,fulldate:e.fulldate};this.startMultipleStatus=Object.assign({},this.startMultipleStatus,i),this.$emit("calendarClick",e)},rightChange(e){const{before:t,after:a}=e.range;this.rangeChange(t,a);const i={before:e.range.before,after:e.range.after,data:e.range.data,fulldate:e.fulldate};this.endMultipleStatus=Object.assign({},this.endMultipleStatus,i),this.$emit("calendarClick",e)},mobileChange(e){if(this.isRange){const{before:t,after:a}=e.range;if(!t)return;if(this.handleStartAndEnd(t,a,!0),this.hasTime){const{startTime:t,endTime:a}=e.timeRange;this.tempRange.startTime=t,this.tempRange.endTime=a}this.confirmRangeChange()}else this.hasTime?this.displayValue=e.fulldate+" "+e.time:this.displayValue=e.fulldate,this.setEmit(this.displayValue),this.calendarDate=this.displayValue;this.$refs.mobile.close()},rangeChange(e,t){e&&t&&(this.handleStartAndEnd(e,t,!0),this.hasTime||this.confirmRangeChange())},confirmRangeChange(){if(!this.tempRange.startDate||!this.tempRange.endDate)return void(this.pickerVisible=!1);let e,t;G(this.tempRange.startDate)||(this.tempRange.startDate=Y(Date.now())),G(this.tempRange.endDate)||(this.tempRange.endDate=Y(Date.now()));let a,i,s=!1,l=!1,n=this.tempRange.startDate,r=this.tempRange.endDate;if(this.hasTime&&(n=`${this.tempRange.startDate} ${this.tempRange.startTime}`,r=`${this.tempRange.endDate} ${this.tempRange.endTime}`),this.start){let e=this.start;"number"==typeof this.start&&(e=q(this.start,this.hideSecond)),[a,i]=e.split(" "),this.start&&!K(this.start,n)&&(s=!0,this.tempRange.startDate=a),this.start&&!K(this.start,r)&&(l=!0,this.tempRange.endDate=a)}let d,o,c=!1,h=!1;if(this.end){let e=this.end;"number"==typeof this.end&&(e=q(this.end,this.hideSecond)),[d,o]=e.split(" "),this.end&&!K(n,this.end)&&(c=!0,this.tempRange.startDate=d),this.end&&!K(r,this.end)&&(h=!0,this.tempRange.endDate=d)}this.hasTime?(s?this.tempRange.startTime=i||X(this.hideSecond):c&&(this.tempRange.startTime=o||X(this.hideSecond)),this.tempRange.startTime||(this.tempRange.startTime=L(Date.now(),this.hideSecond)),l?this.tempRange.endTime=i||X(this.hideSecond):h&&(this.tempRange.endTime=o||X(this.hideSecond)),this.tempRange.endTime||(this.tempRange.endTime=L(Date.now(),this.hideSecond)),e=this.displayRangeValue.startDate=`${this.tempRange.startDate} ${this.tempRange.startTime}`,t=this.displayRangeValue.endDate=`${this.tempRange.endDate} ${this.tempRange.endTime}`):(e=this.displayRangeValue.startDate=this.tempRange.startDate,t=this.displayRangeValue.endDate=this.tempRange.endDate),K(e,t)||([e,t]=[t,e]),this.displayRangeValue.startDate=e,this.displayRangeValue.endDate=t;const u=[e,t];this.setEmit(u),this.pickerVisible=!1},handleStartAndEnd(e,t,a=!1){if(!e)return;t||(t=e);const i=a?"tempRange":"range",s=K(e,t);this[i].startDate=s?e:t,this[i].endDate=s?t:e},dateCompare:(e,t)=>(e=new Date(e.replace("-","/").replace("-","/")))<=(t=new Date(t.replace("-","/").replace("-","/"))),diffDate(e,t){e=new Date(e.replace("-","/").replace("-","/"));const a=((t=new Date(t.replace("-","/").replace("-","/")))-e)/864e5;return Math.abs(a)},clear(e=!0){this.isRange?(this.displayRangeValue.startDate="",this.displayRangeValue.endDate="",this.tempRange.startDate="",this.tempRange.startTime="",this.tempRange.endDate="",this.tempRange.endTime="",this.isPhone?this.$refs.mobile&&this.$refs.mobile.clearCalender():(this.$refs.left&&this.$refs.left.clearCalender(),this.$refs.right&&this.$refs.right.clearCalender(),this.$refs.right&&this.$refs.right.changeMonth("next")),e&&(this.$emit("change",[]),this.$emit("input",[]),this.$emit("update:modelValue",[]))):(this.displayValue="",this.inputDate="",this.pickerTime="",this.isPhone?this.$refs.mobile&&this.$refs.mobile.clearCalender():this.$refs.pcSingle&&this.$refs.pcSingle.clearCalender(),e&&(this.$emit("change",""),this.$emit("input",""),this.$emit("update:modelValue","")))},calendarClick(e){this.$emit("calendarClick",e)}}},[["render",function(c,m,p,g,f,k){const T=N(y("uni-icons"),F),w=o,b=C,R=_("time-picker"),v=_("Calendar"),M=d;return e(),t(w,{class:"uni-date"},{default:a((()=>[i(w,{class:"uni-date-editor",onClick:k.show},{default:a((()=>[h(c.$slots,"default",{},(()=>[i(w,{class:s(["uni-date-editor--x",{"uni-date-editor--x__disabled":p.disabled,"uni-date-x--border":p.border}])},{default:a((()=>[f.isRange?(e(),t(w,{key:1,class:"uni-date-x uni-date-range"},{default:a((()=>[i(T,{class:"icon-calendar",type:"calendar",color:"#c0c4cc",size:"22"}),i(w,{class:"uni-date__x-input text-center"},{default:a((()=>[n(r(f.displayRangeValue.startDate||k.startPlaceholderText),1)])),_:1}),i(w,{class:"range-separator"},{default:a((()=>[n(r(p.rangeSeparator),1)])),_:1}),i(w,{class:"uni-date__x-input text-center"},{default:a((()=>[n(r(f.displayRangeValue.endDate||k.endPlaceholderText),1)])),_:1})])),_:1})):(e(),t(w,{key:0,class:"uni-date-x uni-date-single"},{default:a((()=>[i(T,{class:"icon-calendar",type:"calendar",color:"#c0c4cc",size:"22"}),i(w,{class:"uni-date__x-input"},{default:a((()=>[n(r(f.displayValue||k.singlePlaceholderText),1)])),_:1})])),_:1})),k.showClearIcon?(e(),t(w,{key:2,class:"uni-date__icon-clear",onClick:D(k.clear,["stop"])},{default:a((()=>[i(T,{type:"clear",color:"#c0c4cc",size:"22"})])),_:1},8,["onClick"])):l("",!0)])),_:1},8,["class"])]),!0)])),_:3},8,["onClick"]),S(i(w,{class:"uni-date-mask--pc",onClick:k.close},null,8,["onClick"]),[[x,f.pickerVisible]]),f.isPhone?l("",!0):S((e(),t(w,{key:0,ref:"datePicker",class:"uni-date-picker__container"},{default:a((()=>[f.isRange?(e(),t(w,{key:1,class:"uni-date-range--x",style:u(f.pickerPositionStyle)},{default:a((()=>[i(w,{class:"uni-popper__arrow"}),f.hasTime?(e(),t(w,{key:0,class:"popup-x-header uni-date-changed"},{default:a((()=>[i(w,{class:"popup-x-header--datetime"},{default:a((()=>[i(b,{class:"uni-date__input uni-date-range__input",type:"text",modelValue:f.tempRange.startDate,"onUpdate:modelValue":m[3]||(m[3]=e=>f.tempRange.startDate=e),placeholder:k.startDateText},null,8,["modelValue","placeholder"]),i(R,{type:"time",modelValue:f.tempRange.startTime,"onUpdate:modelValue":m[5]||(m[5]=e=>f.tempRange.startTime=e),start:k.timepickerStartTime,border:!1,disabled:!f.tempRange.startDate,hideSecond:p.hideSecond},{default:a((()=>[i(b,{class:"uni-date__input uni-date-range__input",type:"text",modelValue:f.tempRange.startTime,"onUpdate:modelValue":m[4]||(m[4]=e=>f.tempRange.startTime=e),placeholder:k.startTimeText,disabled:!f.tempRange.startDate},null,8,["modelValue","placeholder","disabled"])])),_:1},8,["modelValue","start","disabled","hideSecond"])])),_:1}),i(T,{type:"arrowthinright",color:"#999",style:{"line-height":"40px"}}),i(w,{class:"popup-x-header--datetime"},{default:a((()=>[i(b,{class:"uni-date__input uni-date-range__input",type:"text",modelValue:f.tempRange.endDate,"onUpdate:modelValue":m[6]||(m[6]=e=>f.tempRange.endDate=e),placeholder:k.endDateText},null,8,["modelValue","placeholder"]),i(R,{type:"time",modelValue:f.tempRange.endTime,"onUpdate:modelValue":m[8]||(m[8]=e=>f.tempRange.endTime=e),end:k.timepickerEndTime,border:!1,disabled:!f.tempRange.endDate,hideSecond:p.hideSecond},{default:a((()=>[i(b,{class:"uni-date__input uni-date-range__input",type:"text",modelValue:f.tempRange.endTime,"onUpdate:modelValue":m[7]||(m[7]=e=>f.tempRange.endTime=e),placeholder:k.endTimeText,disabled:!f.tempRange.endDate},null,8,["modelValue","placeholder","disabled"])])),_:1},8,["modelValue","end","disabled","hideSecond"])])),_:1})])),_:1})):l("",!0),i(w,{class:"popup-x-body"},{default:a((()=>[i(v,{ref:"left",showMonth:!1,"start-date":f.calendarRange.startDate,"end-date":f.calendarRange.endDate,range:!0,pleStatus:f.endMultipleStatus,onChange:k.leftChange,onFirstEnterCale:k.updateRightCale,style:{padding:"0 8px"}},null,8,["start-date","end-date","pleStatus","onChange","onFirstEnterCale"]),i(v,{ref:"right",showMonth:!1,"start-date":f.calendarRange.startDate,"end-date":f.calendarRange.endDate,range:!0,onChange:k.rightChange,pleStatus:f.startMultipleStatus,onFirstEnterCale:k.updateLeftCale,style:{padding:"0 8px","border-left":"1px solid #F1F1F1"}},null,8,["start-date","end-date","onChange","pleStatus","onFirstEnterCale"])])),_:1}),f.hasTime?(e(),t(w,{key:1,class:"popup-x-footer"},{default:a((()=>[i(M,{onClick:k.clear},{default:a((()=>[n(r(k.clearText),1)])),_:1},8,["onClick"]),i(M,{class:"confirm-text",onClick:k.confirmRangeChange},{default:a((()=>[n(r(k.okText),1)])),_:1},8,["onClick"])])),_:1})):l("",!0)])),_:1},8,["style"])):(e(),t(w,{key:0,class:"uni-date-single--x",style:u(f.pickerPositionStyle)},{default:a((()=>[i(w,{class:"uni-popper__arrow"}),f.hasTime?(e(),t(w,{key:0,class:"uni-date-changed popup-x-header"},{default:a((()=>[i(b,{class:"uni-date__input text-center",type:"text",modelValue:f.inputDate,"onUpdate:modelValue":m[0]||(m[0]=e=>f.inputDate=e),placeholder:k.selectDateText},null,8,["modelValue","placeholder"]),i(R,{type:"time",modelValue:f.pickerTime,"onUpdate:modelValue":m[2]||(m[2]=e=>f.pickerTime=e),border:!1,disabled:!f.inputDate,start:k.timepickerStartTime,end:k.timepickerEndTime,hideSecond:p.hideSecond,style:{width:"100%"}},{default:a((()=>[i(b,{class:"uni-date__input text-center",type:"text",modelValue:f.pickerTime,"onUpdate:modelValue":m[1]||(m[1]=e=>f.pickerTime=e),placeholder:k.selectTimeText,disabled:!f.inputDate},null,8,["modelValue","placeholder","disabled"])])),_:1},8,["modelValue","disabled","start","end","hideSecond"])])),_:1})):l("",!0),i(v,{ref:"pcSingle",showMonth:!1,"start-date":f.calendarRange.startDate,"end-date":f.calendarRange.endDate,date:f.calendarDate,onChange:k.singleChange,"default-value":p.defaultValue,style:{padding:"0 8px"}},null,8,["start-date","end-date","date","onChange","default-value"]),f.hasTime?(e(),t(w,{key:1,class:"popup-x-footer"},{default:a((()=>[i(M,{class:"confirm-text",onClick:k.confirmSingleChange},{default:a((()=>[n(r(k.okText),1)])),_:1},8,["onClick"])])),_:1})):l("",!0)])),_:1},8,["style"]))])),_:1},512)),[[x,f.pickerVisible]]),f.isPhone?(e(),t(v,{key:1,ref:"mobile",clearDate:!1,date:f.calendarDate,defTime:k.mobileCalendarTime,"start-date":f.calendarRange.startDate,"end-date":f.calendarRange.endDate,selectableTimes:k.mobSelectableTime,startPlaceholder:p.startPlaceholder,endPlaceholder:p.endPlaceholder,"default-value":p.defaultValue,pleStatus:f.endMultipleStatus,showMonth:!1,range:f.isRange,hasTime:f.hasTime,insert:!1,hideSecond:p.hideSecond,onConfirm:k.mobileChange,onMaskClose:k.close,onChange:k.calendarClick},null,8,["date","defTime","start-date","end-date","selectableTimes","startPlaceholder","endPlaceholder","default-value","pleStatus","range","hasTime","hideSecond","onConfirm","onMaskClose","onChange"])):l("",!0)])),_:3})}],["__scopeId","data-v-242b3c99"]]);const le=W({name:"win-orderinfo",props:["isshow","info"],data:()=>({text:"",status:{0:"完成",1:"待推送",2:"推送回单出错",3:"待处理",4:"审核失败"},express_code:[{name:"申通",code:"p02"},{name:"中通",code:"p04"},{name:"邮政",code:"p22"},{name:"顺丰",code:"p05"},{name:"韵达",code:"p03"},{name:"圆通",code:"p01"},{name:"EMS",code:"p07"},{name:"百世",code:"p09"},{name:"京东快递",code:"p10"},{name:"安能",code:"p16"},{name:"中通快运",code:"p25"},{name:"德邦",code:"p26"},{name:"极兔",code:"p32"}],platform_code:[{name:"菜鸟",code:1},{name:"京东",code:3},{name:"拼多多",code:4},{name:"抖店",code:5},{name:"快手",code:6},{name:"视频号",code:7},{name:"小红书",code:8}]}),watch:{value(e){this.text=e.split(",").join("\n")}},methods:{_select(e){this.info.express_code=e.target.value,this.express_code.forEach((t=>{t.code==e.target.value&&(this.info.expressName=t.name)}))},_select2(e){this.info.platform_code=e.target.value},change(){const e={name:this.info.name,tel:this.info.tel,province:this.info.province,city:this.info.city,district:this.info.district,address:this.info.address,platform_code:this.info.platform_code,express_code:this.info.express_code,ordercode:this.info.ordercode};R({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/change_order",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},data:{data:e},success(e){console.log(e)}})},copy(e){v({data:e,success:function(){console.log("success")}})},clear(){this.text=""},timestampToTime(e){var t=new Date(e);return t.getFullYear()+"-"+((t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-")+((t.getDate()<10?"0"+t.getDate():t.getDate())+" ")+((t.getHours()<10?"0"+t.getHours():t.getHours())+":")+((t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":")+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())},close(){this.tip="",this.$emit("close",!1)}}},[["render",function(s,d,c,h,u,f){const k=o,_=N(y("uni-icons"),F),D=C,T=V;return c.isshow?(e(),t(k,{key:0,class:"win-box"},{default:a((()=>[i(k,{class:"win-win"},{default:a((()=>[i(k,{class:"win-head"},{default:a((()=>[i(k,{class:"win-title"},{default:a((()=>[n("订单详情")])),_:1}),i(k,{class:"win-close",onClick:f.close},{default:a((()=>[i(_,{type:"closeempty",size:"18",class:"icon closeempty",color:"red"})])),_:1},8,["onClick"])])),_:1}),i(k,{class:"win-content"},{default:a((()=>[i(k,{class:"win-infos"},{default:a((()=>[i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("货主")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.STORENAME),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("收件人")])),_:1}),i(D,{class:"value",modelValue:c.info.name,"onUpdate:modelValue":d[0]||(d[0]=e=>c.info.name=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("电话")])),_:1}),i(D,{class:"value",modelValue:c.info.tel,"onUpdate:modelValue":d[1]||(d[1]=e=>c.info.tel=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("省")])),_:1}),i(D,{class:"value",modelValue:c.info.province,"onUpdate:modelValue":d[2]||(d[2]=e=>c.info.province=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("市")])),_:1}),i(D,{class:"value",modelValue:c.info.city,"onUpdate:modelValue":d[3]||(d[3]=e=>c.info.city=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("区")])),_:1}),i(D,{class:"value",modelValue:c.info.district,"onUpdate:modelValue":d[4]||(d[4]=e=>c.info.district=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("详细地址")])),_:1}),i(D,{class:"value",modelValue:c.info.address,"onUpdate:modelValue":d[5]||(d[5]=e=>c.info.address=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("快递公司")])),_:1}),M("select",{class:"page_select_number normal value",onChange:d[6]||(d[6]=e=>f._select(e))},[(e(!0),m(p,null,g(u.express_code,(t=>(e(),m("option",{value:t.code,selected:c.info.express_code==t.code},r(t.name),9,["value","selected"])))),256))],32)])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("平台")])),_:1}),M("select",{class:"page_select_number normal value",onChange:d[7]||(d[7]=e=>f._select2(e))},[(e(!0),m(p,null,g(u.platform_code,(t=>(e(),m("option",{value:t.code,selected:c.info.platform_code==t.code},r(t.name),9,["value","selected"])))),256))],32)])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("创建时间")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.create_time_text),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("创建群")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.room_name),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("创建人")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.creator_name),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("运单号")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.postnum),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("外部订单号")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.ordercode),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("平台订单号")])),_:1}),i(D,{class:"value",modelValue:c.info.platform_order_id,"onUpdate:modelValue":d[8]||(d[8]=e=>c.info.platform_order_id=e)},null,8,["modelValue"])])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("信息原文")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.msg),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("状态")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(u.status[c.info.status]),1)])),_:1})])),_:1}),c.info.reviewer_id>0?(e(),m(p,{key:0},[i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("审核人")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.reviewer_name),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("审核时间")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.reviewer_time_text),1)])),_:1})])),_:1}),i(k,{class:"line"},{default:a((()=>[i(k,{class:"title"},{default:a((()=>[n("审核商品明细")])),_:1}),i(k,{class:"value"},{default:a((()=>[n(r(c.info.reviewer_items),1)])),_:1})])),_:1})],64)):l("",!0)])),_:1}),i(k,{class:"bottom"},{default:a((()=>[i(T,{onClick:f.change},{default:a((()=>[n("修改")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})])),_:1})):l("",!0)}],["__scopeId","data-v-419440fd"]]);const ne=W({name:"win-remask",props:["isshow","info"],data:()=>({text:"",status:{0:"完成",1:"待推送",2:"推送回单出错",3:"待处理",4:"审核失败"},list:[],selectlist:[],page:1,keyword:""}),watch:{value(e){this.text=e.split(",").join("\n")},keyword(e){this.queryStock()},isshow(e){e&&(this.keyword="",this.selectlist=[],this.queryStock())}},methods:{saveAndPush(){const e=this;let t=this.selectlist.map((e=>`${e.STOCKID},${e.COUNT}`));if(0==t.length)return $({title:"商品明细不能为空"}),!1;R({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/save_and_push",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},data:{order_id:this.info.ordercode,items:t.join("|")},success(t){e.tip="",e.$emit("close",!1)}})},del(e){this.selectlist.splice(e,1),this.$forceUpdate()},showImgs(e){O({urls:e})},add(e){let t=!1;this.selectlist.forEach((a=>{e.STOCKID==a.STOCKID&&(t=!0)}));let a=JSON.parse(JSON.stringify(e));a.COUNT=1,t||this.selectlist.push(a),this.$forceUpdate()},copy(e){v({data:e,success:function(){console.log("success")}})},clear(){this.text=""},timestampToTime(e){var t=new Date(e);return t.getFullYear()+"-"+((t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-")+((t.getDate()<10?"0"+t.getDate():t.getDate())+" ")+((t.getHours()<10?"0"+t.getHours():t.getHours())+":")+((t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":")+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())},close(){this.tip="",this.$emit("close",!1)},queryStock(){const e=this;R({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/query_stock",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},data:{keyword:this.keyword,storeid:this.info.store_id},success(t){console.log(t),e.list=t.data,console.log(e.list)}})}}},[["render",function(s,c,h,u,f,k){const _=o,D=N(y("uni-icons"),F),T=d,w=P,b=C,S=V;return h.isshow?(e(),t(_,{key:0,class:"win-box"},{default:a((()=>[i(_,{class:"win-win"},{default:a((()=>[i(_,{class:"win-head"},{default:a((()=>[i(_,{class:"win-title"},{default:a((()=>[n("订单审核")])),_:1}),i(_,{class:"win-close",onClick:k.close},{default:a((()=>[i(D,{type:"closeempty",size:"18",class:"icon closeempty",color:"red"})])),_:1},8,["onClick"])])),_:1}),i(_,{class:"win-content"},{default:a((()=>[i(_,{class:"win-infos"},{default:a((()=>[i(_,{class:"line"},{default:a((()=>[i(_,{class:"title"},{default:a((()=>[n("信息原文")])),_:1}),i(_,{class:"value"},{default:a((()=>[n(r(h.info.msg),1)])),_:1})])),_:1}),i(_,{class:"from"},{default:a((()=>[M("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2"},[M("thead",null,[M("tr",null,[M("th",null,[i(T)]),M("th",{align:"center",width:"14%"},"图片"),M("th",{align:"center",width:"28%"},"商品名称"),M("th",{align:"center",width:"20%"},"条码"),M("th",{align:"center",width:"8%"},"SKU"),M("th",{align:"center",width:"8%"},"颜色"),M("th",{align:"center",width:"8%"},"规格"),M("th",{align:"center",width:"14%"},"数量"),M("th",{align:"center",width:"14%"},"操作")])]),M("tbody",null,[(e(!0),m(p,null,g(f.selectlist,((t,s)=>(e(),m("tr",{bgColor:"#FFF"},[M("td",null,[i(w)]),M("td",{align:"center"},[t.IMG?(e(),m("img",{key:0,src:"http://ye4s.com/dl/"+t.IMG,style:{width:"30px",height:"30px","object-fit":"contain"},onClick:e=>k.showImgs(["http://ye4s.com/dl/"+t.IMG])},null,8,["src","onClick"])):l("",!0)]),M("td",{align:"center"},r(t.NAME),1),M("td",{align:"center"},r(t.BARCODE),1),M("td",{align:"center"},r(t.STOCKID),1),M("td",{align:"center"},r(t.COLOR),1),M("td",{align:"center"},r(t.STYLE),1),M("td",{align:"center"},[i(b,{modelValue:t.COUNT,"onUpdate:modelValue":e=>t.COUNT=e},null,8,["modelValue","onUpdate:modelValue"])]),M("td",{align:"center"},[i(S,{style:{width:"100px",height:"25px","line-height":"25px","background-color":"red",color:"#FFF"},onClick:e=>k.del(s)},{default:a((()=>[n("删除")])),_:2},1032,["onClick"])])])))),256))])])])),_:1})])),_:1}),i(_,{class:"win-infos"},{default:a((()=>[i(_,{class:"line"},{default:a((()=>[i(_,{class:"title"},{default:a((()=>[n("货主产品")])),_:1}),i(_,{class:"value"},{default:a((()=>[i(b,{placeholder:"搜索:SKU/条码/商品名称/颜色/规格/组合编码",style:{height:"30px","line-height":"30px","background-color":"antiquewhite"},modelValue:f.keyword,"onUpdate:modelValue":c[0]||(c[0]=e=>f.keyword=e)},null,8,["modelValue"])])),_:1})])),_:1}),i(_,{class:"from2"},{default:a((()=>[M("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2"},[M("thead",null,[M("tr",null,[M("th",null,[i(w)]),M("th",{align:"center",style:{width:"14%"}},"图片"),M("th",{align:"center",style:{width:"28%"}},"商品名称"),M("th",{align:"center",style:{width:"20%"}},"条码"),M("th",{align:"center",style:{width:"8%"}},"SKU"),M("th",{align:"center",style:{width:"8%"}},"颜色"),M("th",{align:"center",style:{width:"8%"}},"规格"),M("th",{align:"center",style:{width:"14%"}},"操作")])]),M("tbody",null,[(e(!0),m(p,null,g(f.list,((t,d)=>(e(),m("tr",{onDblclick:e=>s.showOrderItem(t),index:d,bgcolor:"#FFF"},[M("td"),M("td",{align:"center"},[t.IMG?(e(),m("img",{key:0,src:"http://ye4s.com/dl/"+t.IMG,style:{width:"30px",height:"30px","object-fit":"contain"},onClick:e=>k.showImgs(["http://ye4s.com/dl/"+t.IMG])},null,8,["src","onClick"])):l("",!0)]),M("td",{align:"center"},r(t.NAME),1),M("td",{align:"center"},r(t.BARCODE),1),M("td",{align:"center"},r(t.STOCKID),1),M("td",{align:"center"},r(t.COLOR),1),M("td",{align:"center"},r(t.STYLE),1),M("td",{align:"center"},[i(S,{style:{width:"100px",height:"25px","line-height":"25px","background-color":"blue",color:"#FFF"},onClick:e=>k.add(t)},{default:a((()=>[n("添加")])),_:2},1032,["onClick"])])],40,["onDblclick","index"])))),256))])])])),_:1}),i(_,{style:{height:"35px",overflow:"hidden"}},{default:a((()=>[i(S,{style:{width:"180px",height:"30px","line-height":"30px","font-size":"14px","background-color":"blue",color:"#FFF"},onClick:c[1]||(c[1]=e=>k.saveAndPush())},{default:a((()=>[n("提交到wms发货")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})):l("",!0)}],["__scopeId","data-v-d4cc538f"]]);const re=W({data:()=>({navid:5,orderids:[],showWhere:!1,allids:[],tpage:"",status:{0:"完成",1:"待推送",2:"推送回单出错",3:"待处理",4:"审核失败"},list:[],storeList:[],wheres:{status:3},POSTCODERange:[{text:"申通",value:"p02"},{text:"圆通",value:"p01"},{text:"中通",value:"p04"},{text:"极兔速递",value:"p32"},{text:"顺丰",value:"p05"},{text:"韵达",value:"p03"}],statusRange:[{text:"完成",value:0},{text:"待推送",value:1},{text:"推送回单出错",value:2},{text:"待处理",value:3},{text:"审核失败",value:4}],platformRange:[{text:"淘系",value:1},{text:"京东",value:3},{text:"拼多多",value:4},{text:"抖店",value:5},{text:"快手",value:6},{text:"视频号",value:7},{text:"小红书",value:8}],page:1,pagesize:20,count:0,end:0,start:0,showOrderInfo:!1,showRemsk:!1,orderItem:{}}),onLoad(){this.getStoreList(),this.end=new Date((new Date).toLocaleDateString()).getTime(),this.start=new Date((new Date).toLocaleDateString()).getTime()-80352e5,this.start2=new Date((new Date).toLocaleDateString()).getTime()-2592e5,this.wheres.startTime=[this.timestampToTime3(this.start2),this.timestampToTime3(this.end)],this.query()},methods:{cancel_order(e){const t=this;I({title:"提示",content:"是否取消订单,取消后将作废",success:function(a){a.confirm?R({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/cancel_order",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},data:{ids:e},success(e){t.query(),console.log(e)}}):a.cancel&&console.log("用户点击取消")}})},order_push(e){const t=this;R({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/order_push",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},data:{ids:e},success(e){t.query(),console.log(e)}})},cancel(e){this.cancel_order(this.orderids.join(","))},push(e){this.order_push(this.orderids.join(","))},explore(){},closeOrderInfo(){this.showOrderInfo=!1},showOrderItem(e){this.orderItem=JSON.parse(JSON.stringify(e)),this.showOrderInfo=!0},closeOrderRemask(){this.showRemsk=!1},showOrderRemask(e){this.orderItem=e,this.showRemsk=!0},Datechange(e){this.$forceUpdate()},clearWhere(){this.wheres={status:3},this.wheres.startTime=[this.timestampToTime3(this.start2),this.timestampToTime3(this.end)]},timestampToTime3(e){var t=new Date(e);return t.getFullYear()+"-"+((t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-")+(t.getDate()<10?"0"+t.getDate():t.getDate())},async toPage(e){e>0&&(this.page=e,this.query())},statusColor(e){let t="#fff";switch(e){case 1:t="#aaa";break;case 2:t="#Faa";break;case 4:t="#F00";break;case 0:t="#0F0"}return t},allChange(e){0==e.detail.value.length?this.orderids=[]:this.list.forEach((e=>{this.orderids.push(e.ordercode)})),this.$forceUpdate()},lineClass(e){},getStoreList(){const e=this;R({url:"https://ye4s.wms.gztbyc.com/api/wms/stores",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},success(t){e.storeList=t.data.data.map((e=>({value:e.STOREID,text:e.TITLE}))),console.log(e.storeList)}})},whereForm(){this.showWhere=!this.showWhere},idsChange(e){console.log(e.detail),this.orderids=e.detail.value,this.$forceUpdate()},showItemWinInfo(e){},isSelect(e){return this.orderids.indexOf(e)>-1},query(){const e=this;R({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/orders",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:z.getToken()},data:{page:this.page,pagesize:this.pagesize,keyword:this.keyword,where:this.wheres},success(t){console.log(t),e.list=t.data.rows,e.count=t.data.total,e.allids=e.list.map((e=>e.id))}})},_select(e){console.log(e),this.pagesize=parseInt(e.target.value),this.toPage(1)}}},[["render",function(c,h,u,f,k,_){const D=N(y("m-nav"),A),T=N(y("uni-data-select"),j),w=o,b=C,S=N(y("uni-datetime-picker"),se),x=V,R=N(y("uni-icons"),F),v=P,$=E,O=H,I=U,W=d,z=N(y("win-orderinfo"),le),q=N(y("win-remask"),ne);return e(),t(w,{class:"content"},{default:a((()=>[i(D,{n:k.navid},null,8,["n"]),i(w,{class:"box"},{default:a((()=>[i(w,{class:"contents"},{default:a((()=>[i(w,{class:s(["where",k.showWhere?"open":""])},{default:a((()=>[i(w,{class:"item"},{default:a((()=>[i(T,{class:"value value-select",modelValue:k.wheres.store_id,"onUpdate:modelValue":h[0]||(h[0]=e=>k.wheres.store_id=e),localdata:k.storeList,placeholder:"货主",clear:!0},null,8,["modelValue","localdata"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(b,{class:"input",modelValue:k.wheres.name,"onUpdate:modelValue":h[1]||(h[1]=e=>k.wheres.name=e),placeholder:"收件人姓名"},null,8,["modelValue"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(b,{class:"input",modelValue:k.wheres.postnum,"onUpdate:modelValue":h[2]||(h[2]=e=>k.wheres.postnum=e),placeholder:"快递号"},null,8,["modelValue"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(b,{class:"input",modelValue:k.wheres.tel,"onUpdate:modelValue":h[3]||(h[3]=e=>k.wheres.tel=e),placeholder:"手机号"},null,8,["modelValue"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(b,{class:"input",modelValue:k.wheres.storeName,"onUpdate:modelValue":h[4]||(h[4]=e=>k.wheres.storeName=e),placeholder:"省份"},null,8,["modelValue"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(T,{class:"value value-select",clear:!0,modelValue:k.wheres.status,"onUpdate:modelValue":h[5]||(h[5]=e=>k.wheres.status=e),localdata:k.statusRange,placeholder:"状态"},null,8,["modelValue","localdata"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(T,{class:"value value-select",clear:!0,modelValue:k.wheres.platform,"onUpdate:modelValue":h[6]||(h[6]=e=>k.wheres.platform=e),localdata:k.platformRange,placeholder:"状态"},null,8,["modelValue","localdata"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(T,{class:"value value-select",clear:!0,modelValue:k.wheres.POSTCODE,"onUpdate:modelValue":h[7]||(h[7]=e=>k.wheres.POSTCODE=e),localdata:k.POSTCODERange,placeholder:"快递"},null,8,["modelValue","localdata"])])),_:1}),i(w,{class:"item"},{default:a((()=>[i(S,{class:"input input-timebox",type:"daterange",modelValue:k.wheres.startTime,"onUpdate:modelValue":h[8]||(h[8]=e=>k.wheres.startTime=e),end:k.end,start:k.start,"clear-icon":!1,onChange:h[9]||(h[9]=e=>_.Datechange())},{default:a((()=>[n(r(k.wheres.startTime[0])+"——"+r(k.wheres.startTime[1]),1)])),_:1},8,["modelValue","end","start"])])),_:1}),i(w,{class:"item",style:{display:"flex","flex-wrap":"nowrap"}},{default:a((()=>[i(x,{class:"btn",onClick:_.query,style:{"background-color":"cadetblue",color:"#fff"}},{default:a((()=>[n("搜索")])),_:1},8,["onClick"]),i(x,{class:"btn",onClick:_.clearWhere,style:{"background-color":"red",color:"#fff"}},{default:a((()=>[n("清除条件")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["class"]),i(w,{class:"operator"},{default:a((()=>[i(w,{class:"item",onClick:h[10]||(h[10]=e=>_.query())},{default:a((()=>[i(R,{type:"refreshempty",size:"14"})])),_:1}),i(w,{class:s(["item",k.orderids.length>0?"on":""]),onClick:h[11]||(h[11]=e=>_.cancel())},{default:a((()=>[n(" 取消订单 ")])),_:1},8,["class"]),i(w,{class:s(["item",k.orderids.length>0?"on":""]),onClick:h[12]||(h[12]=e=>_.push(c.ids))},{default:a((()=>[n(" 推送 ")])),_:1},8,["class"]),i(w,{class:s(["item",k.orderids.length>0?"on":""]),onClick:h[13]||(h[13]=e=>_.explore(c.ids))},{default:a((()=>[n(" 导出 ")])),_:1},8,["class"]),i(w,{class:"item on",onClick:h[14]||(h[14]=e=>_.explore(0))},{default:a((()=>[n(" 导出全部 ")])),_:1}),i(w,{class:"inputBox"},{default:a((()=>[i(w,{class:"plus",onClick:_.whereForm},{default:a((()=>[i(R,{type:"bars",size:"16"})])),_:1},8,["onClick"])])),_:1})])),_:1}),i(w,{class:"list"},{default:a((()=>[i(I,{class:"list"},{default:a((()=>[M("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2",class:"box"},[M("thead",null,[M("tr",null,[M("th",{align:"center",width:"1%"},[i(O,{style:{transform:"scale(0.7)"},onChange:_.allChange},{default:a((()=>[i($,null,{default:a((()=>[i(v,{value:"cb",checked:k.orderids.length==k.allids.length},null,8,["checked"])])),_:1})])),_:1},8,["onChange"])]),M("th",{align:"center",width:"6%"},"货主"),M("th",{align:"center",width:"6%"},"运单号"),M("th",{align:"center",width:"6%"},"收件人"),M("th",{align:"center",width:"6%"},"电话"),M("th",{align:"center",width:"6%"},"省份"),M("th",{align:"center",width:"6%"},"快递类型"),M("th",{align:"center",width:"6%"},"平台"),M("th",{align:"center",width:"6%"},"创建时间"),M("th",{align:"center",width:"15%"},"地址"),M("th",{align:"center",width:"6%"},"订单状态"),M("th",{align:"center",width:"20%"},"操作")])]),i(O,{onChange:_.idsChange,class:"checkbox-group"},{default:a((()=>[M("tbody",null,[(e(!0),m(p,null,g(k.list,((t,a)=>(e(),m("tr",{onDblclick:e=>_.showOrderItem(t),index:a,class:s(_.lineClass(t)),bgcolor:_.statusColor(t.status)},[M("td",{align:"center",width:"1%"},[i(v,{value:t.ordercode,style:{transform:"scale(0.7)"},checked:_.isSelect(t.ordercode)},null,8,["value","checked"])]),M("td",{align:"center"},r(t.STORENAME),1),M("td",{align:"center"},r(t.postnum),1),M("td",{align:"center"},r(t.name),1),M("td",{align:"center"},r(t.tel),1),M("td",{align:"center"},r(t.province),1),M("td",{align:"center"},r(t.expressName),1),M("td",{align:"center"},r(t.platformName),1),M("td",{align:"center"},r(t.create_time_text),1),M("td",{align:"center"},r(t.address),1),M("td",{align:"center"},r(k.status[t.status]),1),M("td",{align:"center",class:"operator"},[1==t.status||2==t.status?(e(),m(p,{key:0},[M("span",{class:"btn",onClick:e=>_.showOrderItem(t)},"详情",8,["onClick"]),M("span",{class:"btn",onClick:e=>_.order_push(t.ordercode)},"推送",8,["onClick"]),M("span",{class:"btn",onClick:e=>_.cancel_order(t.ordercode)},"取消订单",8,["onClick"]),2==t.status?(e(),m("span",{key:0,class:"btn",title:t.error},"异常信息",8,["title"])):l("",!0)],64)):l("",!0),3==t.status?(e(),m(p,{key:1},[M("span",{class:"btn",onClick:e=>_.showOrderItem(t)},"详情",8,["onClick"]),M("span",{class:"btn",onClick:e=>_.showOrderRemask(t)},"审核",8,["onClick"]),M("span",{class:"btn",onClick:e=>_.cancel_order(t.ordercode)},"取消订单",8,["onClick"])],64)):l("",!0),4==t.status?(e(),m(p,{key:2},[M("span",{class:"btn",onClick:e=>_.showOrderItem(t)},"详情",8,["onClick"]),M("span",{class:"btn",onClick:e=>_.showOrderRemask(t)},"审核",8,["onClick"]),M("span",{class:"btn",onClick:e=>_.cancel_order(t.ordercode)},"取消订单",8,["onClick"]),M("span",{class:"btn",title:t.error},"异常信息",8,["title"])],64)):l("",!0),0==t.status?(e(),m("span",{key:3,class:"btn",onClick:e=>_.showOrderItem(t)},"详情",8,["onClick"])):l("",!0)])],42,["onDblclick","index","bgcolor"])))),256))])])),_:1},8,["onChange"])])])),_:1})])),_:1}),i(w,{class:"bottominfo"},{default:a((()=>[i(w,null,{default:a((()=>[M("select",{class:"page_select_number normal",onChange:h[15]||(h[15]=e=>_._select(e))},[M("option",{value:"20"},"20条/页"),M("option",{value:"50"},"50条/页"),M("option",{value:"100"},"100条/页"),M("option",{value:"200"},"200条/页"),M("option",{value:"1000"},"1000条/页")],32),k.page-1>0?(e(),t(W,{key:0,class:"normal noright topage",onClick:h[16]||(h[16]=e=>_.toPage(1))},{default:a((()=>[n("首页")])),_:1})):l("",!0),k.page-1>0?(e(),t(W,{key:1,class:"normal noright topage",onClick:h[17]||(h[17]=e=>_.toPage(k.page-1))},{default:a((()=>[n("上一页")])),_:1})):l("",!0),k.page-4>0?(e(),t(W,{key:2,class:"normal noright topage",onClick:h[18]||(h[18]=e=>_.toPage(k.page-4))},{default:a((()=>[n(r(k.page-4),1)])),_:1})):l("",!0),k.page-3>0?(e(),t(W,{key:3,class:"normal noright topage",onClick:h[19]||(h[19]=e=>_.toPage(k.page-3))},{default:a((()=>[n(r(k.page-3),1)])),_:1})):l("",!0),k.page-2>0?(e(),t(W,{key:4,class:"normal noright topage",onClick:h[20]||(h[20]=e=>_.toPage(k.page-2))},{default:a((()=>[n(r(k.page-2),1)])),_:1})):l("",!0),k.page-1>0?(e(),t(W,{key:5,class:"normal noright topage",onClick:h[21]||(h[21]=e=>_.toPage(k.page-1))},{default:a((()=>[n(r(k.page-1),1)])),_:1})):l("",!0),i(W,{class:"normal noright Pcurrent"},{default:a((()=>[n(r(k.page),1)])),_:1}),k.page_.toPage(k.page+1))},{default:a((()=>[n(r(k.page+1),1)])),_:1})):l("",!0),k.page+1_.toPage(k.page+2))},{default:a((()=>[n(r(k.page+2),1)])),_:1})):l("",!0),k.page+2_.toPage(k.page+3))},{default:a((()=>[n(r(k.page+3),1)])),_:1})):l("",!0),k.page+3_.toPage(k.page+4))},{default:a((()=>[n(r(k.page+4),1)])),_:1})):l("",!0),Math.ceil(k.count/k.pagesize)>k.page?(e(),t(W,{key:10,class:"normal noright topage",onClick:h[26]||(h[26]=e=>_.toPage(k.page+1))},{default:a((()=>[n("下一页")])),_:1})):l("",!0),Math.ceil(k.count/k.pagesize)>k.page?(e(),t(W,{key:11,class:"normal noright topage",onClick:h[27]||(h[27]=e=>_.toPage(Math.ceil(k.count/k.pagesize)))},{default:a((()=>[n("尾页")])),_:1})):l("",!0),i(W,{class:"t1 normal"},{default:a((()=>[n("共"+r(k.count)+"条",1)])),_:1}),i(w,{class:"page_jump_group"},{default:a((()=>[i(W,{class:"page_jump_title"},{default:a((()=>[n("跳转到")])),_:1}),i(b,{type:"number",class:"page_jump_input page_jump_input_8iyEh",modelValue:k.tpage,"onUpdate:modelValue":h[28]||(h[28]=e=>k.tpage=e)},null,8,["modelValue"]),i(W,{class:"page_jump_title"},{default:a((()=>[n("页")])),_:1}),i(x,{type:"button",class:"page_jump_btn",onClick:h[29]||(h[29]=e=>_.toPage(k.tpage))},{default:a((()=>[n("确认")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),i(z,{isshow:k.showOrderInfo,info:k.orderItem,onClose:_.closeOrderInfo},null,8,["isshow","info","onClose"]),i(q,{isshow:k.showRemsk,info:k.orderItem,onClose:_.closeOrderRemask},null,8,["isshow","info","onClose"])])),_:1})}],["__scopeId","data-v-02bae89d"]]);export{re as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/pages-index-store.ChlVfoKf.js b/app/assets/public/wechat_1.0.6/assets/pages-index-store.ChlVfoKf.js new file mode 100644 index 0000000..bda7cb0 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/pages-index-store.ChlVfoKf.js @@ -0,0 +1 @@ +import{r as e,g as a,s as t,f as s,o,c as l,w as i,b as d,d as n,t as c,h as r,F as u,k as h,i as m,v as g,y as p,x as _,j as f,I as w,S as k,z as C,A as y}from"./index-B8U-SFxP.js";import{r as R,_ as S,a as O}from"./m-nav.CZV981Qo.js";import{_ as x}from"./uni-data-select.i2-ymEG0.js";import{u as b}from"./user.Bm-2eyfO.js";import{_ as T}from"./_plugin-vue_export-helper.BCo6x5W8.js";const v=T({name:"win-add",props:["isshow","storeid","storeName","wxid","name","isAdd","room"],data:()=>({tip:"",data:{room_id:null},roomsRange:[],postcodeRange:[],storeRange:[],isMainRange:[{value:0,text:"否"},{value:1,text:"是"}],isMainRange2:[{value:1,text:"否"},{value:0,text:"是"}],typeRange:[{value:1,text:"货主群"},{value:2,text:"内部群"},{value:3,text:"快递群"}]}),watch:{isshow:function(e,a){this.isAdd&&e?(this.get_all_nobing_rooms(),this.data={STOREID:this.storeid,POSTCODE:"",type:1,isMain:0,isStorge:0,isBack:0,isOrder:0,auto_feedback_active:0,noreply:0}):(this.data={STOREID:this.storeid,POSTCODE:"",room_id:this.room.room_id,type:1,isMain:this.room.isMain,isStorge:this.room.isStorge,isBack:this.room.isBack,isOrder:this.room.isOrder,auto_feedback_active:this.room.auto_feedback_active,noreply:this.room.noreply},this.data.room_id=this.room.room_id)}},methods:{close(){this.tip="",this.$emit("close",!1)},save(){const s=this;console.log("saveClick"),console.log(b.getToken()),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/save_room",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:b.getToken(),Source:a("SOURCE")||"wx"},data:{data:this.data},success(e){if(1==e.data){let e=s.isAdd?"添加成功":"修改成功";t({title:e,duration:2e3}),s.close()}}})},get_all_nobing_rooms(){const t=this;a("SOURCE"),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_all_nobing_rooms",method:"GET",header:{"X-Requested-With":"XMLHttpRequest",token:b.getToken(),Source:a("SOURCE")||"wx"},success(e){t.roomsRange=e.data.roomList,console.log(t.roomsRange)}})},getRoominfo(){const t=this;e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/findRoom",method:"POST",data:{room_id:this.data.room_id},header:{"X-Requested-With":"XMLHttpRequest",token:b.getToken(),Source:a("SOURCE")||"wx"},success(e){e.data?(t.data.type=e.data.type,t.data.STOREID=e.data.STOREID,t.data.POSTCODE=e.data.POSTCODE,t.data.isMain=e.data.isMain,t.data.isStorge=e.data.isStorge,t.data.isBack=e.data.isBack,t.data.isOrder=e.data.isOrder,t.data.auto_feedback_active=e.data.auto_feedback_active,t.$forceUpdate()):(t.data.type="",t.data.STOREID="",t.data.POSTCODE="",t.data.isMain=0,t.data.isStorge=0);let a="";t.storeRange.forEach((e=>{e.value==t.data.room_id&&(a=e.text)})),t.data.NAME=a}})},change(e){console.log(this.data),this.$forceUpdate()}}},[["render",function(e,a,t,g,p,_){const f=m,w=R(s("uni-icons"),S),k=R(s("uni-data-select"),x);return t.isshow?(o(),l(f,{key:0,class:"win-box"},{default:i((()=>[d(f,{class:"win-win"},{default:i((()=>[d(f,{class:"win-head"},{default:i((()=>[d(f,{class:"win-title"},{default:i((()=>[n(c(t.isAdd?"绑定":"修改")+"群",1)])),_:1}),d(f,{class:"win-close",onClick:_.close},{default:i((()=>[d(w,{type:"closeempty",size:"18",class:"icon closeempty",color:"red"})])),_:1},8,["onClick"])])),_:1}),d(f,{class:"win-content"},{default:i((()=>[d(f,{class:"win-infos"},{default:i((()=>[d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("群聊")])),_:1}),t.isAdd?(o(),l(k,{key:0,class:"",clear:!1,modelValue:p.data.room_id,"onUpdate:modelValue":a[0]||(a[0]=e=>p.data.room_id=e),localdata:p.roomsRange,onChange:_.change},null,8,["modelValue","localdata","onChange"])):(o(),r(u,{key:1},[n(c(t.name),1)],64))])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("货主")])),_:1}),d(f,null,{default:i((()=>[n(c(t.storeName),1)])),_:1})])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("是否作为主群")])),_:1}),d(k,{class:"",clear:!1,modelValue:p.data.isMain,"onUpdate:modelValue":a[1]||(a[1]=e=>p.data.isMain=e),localdata:p.isMainRange,onChange:_.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("是否通知库存预警")])),_:1}),d(k,{class:"",clear:!1,modelValue:p.data.isStorge,"onUpdate:modelValue":a[2]||(a[2]=e=>p.data.isStorge=e),localdata:p.isMainRange,onChange:_.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("是否通知退回")])),_:1}),d(k,{class:"",clear:!1,modelValue:p.data.isBack,"onUpdate:modelValue":a[3]||(a[3]=e=>p.data.isBack=e),localdata:p.isMainRange,onChange:_.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("是否快递逆向通知")])),_:1}),d(k,{class:"",clear:!1,modelValue:p.data.auto_feedback_active,"onUpdate:modelValue":a[4]||(a[4]=e=>p.data.auto_feedback_active=e),localdata:p.isMainRange,onChange:_.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("是否回复信息")])),_:1}),d(k,{class:"",clear:!1,modelValue:p.data.noreply,"onUpdate:modelValue":a[5]||(a[5]=e=>p.data.noreply=e),localdata:p.isMainRange2,onChange:_.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(f,{class:"line"},{default:i((()=>[d(f,{class:"title"},{default:i((()=>[n("是否开启采集订单")])),_:1}),d(k,{class:"",clear:!1,modelValue:p.data.isOrder,"onUpdate:modelValue":a[6]||(a[6]=e=>p.data.isOrder=e),localdata:p.isMainRange,onChange:_.change},null,8,["modelValue","localdata","onChange"])])),_:1}),d(f,{class:"value value-select btn",onClick:_.save},{default:i((()=>[n(c(t.isAdd?"添加":"修改"),1)])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})])),_:1})):h("",!0)}],["__scopeId","data-v-f78a1d6f"]]);const E=T({data:()=>({navid:1,allids:[],orderids:[],page:1,pagesize:1e3,count:0,list:[],keyword:"",isfoucs:!1,tpage:1,isfoucs:!1,isshowStatusChange:!1,isshowTipChange:!1,isAdd:!1,room:{}}),onLoad(){this.getList()},methods:{deleteRoom(t){const s=this;g({title:"提示",content:"是否解除绑定",success:function(o){o.confirm?e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/del_rooms",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:b.getToken(),Source:a("SOURCE")||"wx"},data:{id:t},success(e){s.getList()}}):o.cancel&&console.log("用户点击取消")}})},getList(t=!1){const s=this;t&&(this.page=1),e({url:"https://ye4s.wms.gztbyc.com/index/wms/chat/get_store_rooms",method:"POST",header:{"X-Requested-With":"XMLHttpRequest",token:b.getToken(),Source:a("SOURCE")||"wx"},data:{page:this.page,pagesize:this.pagesize,keyword:this.keyword},success(e){console.log(e),s.list=e.data.rows,s.count=e.data.count,s.allids=s.list.map((e=>e.id))}})},select(e){console.log(e),this.pagesize=parseInt(e.target.value),this.toPage(1)},idsChange(e){console.log(e.detail),this.orderids=e.detail.value,this.$forceUpdate()},change(){this.$forceUpdate()},isSelect(e){return this.orderids.indexOf(e)>-1},lineClass(e){let a=[];return this.isSelect(e.ID)&&a.push("selected"),1==e.FLAG&&a.push("FLAG"),1==e.ISLOCK&&a.push("LOCKED"),a.join(" ")},saoma(e){console.log(e.detail.value)},blur(){this.isfoucs=!1,""!=this.keyword.trim()?this.getList(!0):this.getList()},add(e){this.storeid=e.STOREID,this.name="",this.wxid="",this.isAdd=!0,this.storeName=e.TITLE,this.isshowTipChange=!0},edit(e,a){this.storeid=a.STOREID,this.name=e.name,this.wxid=e.room_id,this.room=e,this.isAdd=!1,this.storeName=a.TITLE,this.isshowTipChange=!0},closeTip(){this.isshowTipChange=!1,this.getList()},toPage(e){this.page=e,this.getList()},truncateString:(e,a=15,t="...")=>e.length>a?e.substring(0,a)+t:e}},[["render",function(e,a,t,g,x,b){const T=R(s("m-nav"),O),E=R(s("uni-icons"),S),V=m,M=w,L=y,I=k,U=R(s("win-add"),v);return o(),l(V,{class:"content"},{default:i((()=>[d(T,{n:x.navid},null,8,["n"]),d(V,{class:"box"},{default:i((()=>[d(V,{class:"contents"},{default:i((()=>[d(V,{class:"operator"},{default:i((()=>[d(V,{class:"item",onClick:a[0]||(a[0]=e=>b.getList(!0))},{default:i((()=>[d(E,{type:"refreshempty",size:"14"})])),_:1}),d(V,{class:"inputBox"},{default:i((()=>[d(M,{class:p(["input",x.isfoucs?"foucs":""]),placeholder:"货主名",id:"input",onFocus:e.foucs,onBlur:b.blur,onConfirm:a[1]||(a[1]=e=>b.saoma(e)),modelValue:x.keyword,"onUpdate:modelValue":a[2]||(a[2]=e=>x.keyword=e),title:"使用速查则忽略以下条件",maxlength:"5000000"},null,8,["onFocus","onBlur","modelValue","class"]),d(V,{class:"plus",onClick:e.whereForm},{default:i((()=>[d(E,{type:"bars",size:"16"})])),_:1},8,["onClick"])])),_:1})])),_:1}),d(I,{class:"list"},{default:i((()=>[_("table",{cellpadding:"3",cellspacing:"1",border:"0",width:"100%",bgcolor:"#8ba0e2",class:"box"},[_("thead",null,[_("tr",null,[_("th",{align:"center",width:"1%"},[_("span",{style:{display:"block",transform:"scale(0.7)"}})]),_("th",{align:"center",width:"15%"},"货主"),_("th",{align:"center",width:"15%"},"群聊"),_("th",{align:"center",width:"15%"},"主群"),_("th",{align:"center",width:"15%"},"库存群"),_("th",{align:"center",width:"15%"},"退回通知群"),_("th",{align:"center",width:"15%"},"群采集订单")])]),_("tbody",null,[(o(!0),r(u,null,f(x.list,((a,t)=>(o(),r("tr",{onDblclick:t=>e.showItemWinInfo(a.id),index:t,class:p(b.lineClass(a)),bgcolor:"#fff"},[_("td",{align:"center",width:"1%"}),_("td",{align:"center"},c(a.TITLE),1),_("td",{align:"center"},[(o(!0),r(u,null,f(a.rooms,(e=>(o(),r("p",{class:"roomitem",title:e.name},[_("span",{class:"name"},c(e.name),1),d(L,{onClick:t=>b.edit(e,a)},{default:i((()=>[n("编辑")])),_:2},1032,["onClick"]),d(L,{onClick:C((a=>b.deleteRoom(e.room_id)),["stop"]),class:"red"},{default:i((()=>[n("解绑")])),_:2},1032,["onClick"])],8,["title"])))),256)),_("p",{class:"roomitem"},[d(L,{class:"blue",style:{width:"120px"},onClick:e=>b.add(a)},{default:i((()=>[n("添加绑定")])),_:2},1032,["onClick"])])]),_("td",{align:"center"},[1==x.room.isMain?(o(!0),r(u,{key:0},f(a.rooms,(e=>(o(),r("p",null,c(e.name),1)))),256)):h("",!0)]),_("td",{align:"center"},[1==x.room.isStorge?(o(!0),r(u,{key:0},f(a.rooms,(e=>(o(),r("p",null,c(e.name),1)))),256)):h("",!0)]),_("td",{align:"center"},[1==x.room.isBack?(o(!0),r(u,{key:0},f(a.rooms,(e=>(o(),r("p",null,c(e.name),1)))),256)):h("",!0)]),_("td",{align:"center"},[1==x.room.isOrder?(o(!0),r(u,{key:0},f(a.rooms,(e=>(o(),r("p",null,c(e.name),1)))),256)):h("",!0)])],42,["onDblclick","index"])))),256))])])])),_:1}),d(U,{room:x.room,storeid:e.storeid,storeName:e.storeName,name:e.name,wxid:e.wxid,isAdd:x.isAdd,isshow:x.isshowTipChange,onClose:b.closeTip},null,8,["room","storeid","storeName","name","wxid","isAdd","isshow","onClose"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-3ba456c7"]]);export{E as default}; diff --git a/app/assets/public/wechat_1.0.6/assets/store-fjY_tD81.css b/app/assets/public/wechat_1.0.6/assets/store-fjY_tD81.css new file mode 100644 index 0000000..e7ddf42 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/store-fjY_tD81.css @@ -0,0 +1 @@ +.win-box[data-v-f78a1d6f]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:999;padding-left:60px;padding-top:40px;box-sizing:border-box}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f]{position:absolute;width:700px;height:400px;background-color:#ccc;margin:auto;top:20px;left:0;right:0;box-shadow:rgba(0,0,0,.3) 1px 1px 50px}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-head[data-v-f78a1d6f]{width:100%;height:30px;line-height:30px;background-color:#87ceeb;position:relative}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-head[data-v-f78a1d6f] .win-close[data-v-f78a1d6f]{position:absolute;right:10px;cursor:pointer}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-head[data-v-f78a1d6f] .win-title[data-v-f78a1d6f]{position:absolute;left:10px;color:#fff}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-content[data-v-f78a1d6f]{width:100%;height:370px;padding:5px;box-sizing:border-box;display:flex}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-content[data-v-f78a1d6f] .win-infos[data-v-f78a1d6f]{width:100%;height:100%;background-color:#fff;padding:5px;box-sizing:border-box}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-content[data-v-f78a1d6f] .win-infos[data-v-f78a1d6f] .line[data-v-f78a1d6f]{width:100%;height:2.5rem;line-height:2.5rem;display:flex;flex-wrap:nowrap}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-content[data-v-f78a1d6f] .win-infos[data-v-f78a1d6f] .line[data-v-f78a1d6f] .title[data-v-f78a1d6f]{width:150px}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-content[data-v-f78a1d6f] .value[data-v-f78a1d6f]{display:inline-block;vertical-align:middle;width:100px;height:30px;line-height:30px;background-color:#efefef;border:1px solid #000;box-sizing:border-box;padding:0 10px;text-align:center;font-size:14px}.win-box[data-v-f78a1d6f] .win-win[data-v-f78a1d6f] .win-content[data-v-f78a1d6f] .btn[data-v-f78a1d6f]{background-color:#00f;color:#fff;cursor:pointer}.content[data-v-3ba456c7]{flex-wrap:nowrap}.box[data-v-3ba456c7]{width:100%}.roomitem[data-v-3ba456c7]{line-height:40px;text-align:left;background-color:rgba(0,0,0,.4);margin:5px 0;padding-left:5px;display:flex;flex-wrap:nowrap}.roomitem .name[data-v-3ba456c7]{width:220px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7fff00}.roomitem uni-button[data-v-3ba456c7]{height:20px;line-height:20px;font-size:14px;display:inline;margin:10px 5px}.roomitem .red[data-v-3ba456c7]{background-color:red;color:#fff}.roomitem .blue[data-v-3ba456c7]{background-color:#00f;color:#fff!important}.list[data-v-3ba456c7]{width:100%;height:100%;padding-bottom:0!important;box-sizing:border-box} diff --git a/app/assets/public/wechat_1.0.6/assets/uni-data-select-DiAp7CRJ.css b/app/assets/public/wechat_1.0.6/assets/uni-data-select-DiAp7CRJ.css new file mode 100644 index 0000000..3ec1c97 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/uni-data-select-DiAp7CRJ.css @@ -0,0 +1 @@ +@media screen and (max-width: 500px){.hide-on-phone[data-v-fe4b6be6]{display:none}}.uni-stat__select[data-v-fe4b6be6]{display:flex;align-items:center;cursor:pointer;width:100%;flex:1;box-sizing:border-box}.uni-stat-box[data-v-fe4b6be6],.uni-stat__actived[data-v-fe4b6be6]{width:100%;flex:1}.uni-label-text[data-v-fe4b6be6]{font-size:14px;font-weight:700;color:#6a6a6a;margin:auto 5px auto 0}.uni-select[data-v-fe4b6be6]{font-size:14px;border:1px solid #e5e5e5;box-sizing:border-box;border-radius:4px;padding:0 5px 0 10px;position:relative;display:flex;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;border-bottom:solid 1px #e5e5e5;width:100%;flex:1;height:35px}.uni-select--disabled[data-v-fe4b6be6]{background-color:#f5f7fa;cursor:not-allowed}.uni-select__label[data-v-fe4b6be6]{font-size:16px;height:35px;padding-right:10px;color:#909399}.uni-select__input-box[data-v-fe4b6be6]{height:35px;position:relative;display:flex;flex:1;flex-direction:row;align-items:center}.uni-select__input[data-v-fe4b6be6]{flex:1;font-size:14px;height:22px;line-height:22px}.uni-select__input-plac[data-v-fe4b6be6]{font-size:14px;color:#909399}.uni-select__selector[data-v-fe4b6be6]{box-sizing:border-box;position:absolute;left:0;width:100%;background-color:#fff;border:1px solid #EBEEF5;border-radius:6px;box-shadow:0 2px 12px rgba(0,0,0,.1);z-index:3;padding:4px 0}.uni-select__selector-scroll[data-v-fe4b6be6]{max-height:200px;box-sizing:border-box}@media (min-width: 768px){.uni-select__selector-scroll[data-v-fe4b6be6]{max-height:600px}}.uni-select__selector-empty[data-v-fe4b6be6],.uni-select__selector-item[data-v-fe4b6be6]{display:flex;cursor:pointer;line-height:35px;font-size:14px;text-align:center;padding:0 10px}.uni-select__selector-item[data-v-fe4b6be6]:hover{background-color:#f9f9f9}.uni-select__selector-empty[data-v-fe4b6be6]:last-child,.uni-select__selector-item[data-v-fe4b6be6]:last-child{border-bottom:none}.uni-select__selector__disabled[data-v-fe4b6be6]{opacity:.4;cursor:default}.uni-popper__arrow_bottom[data-v-fe4b6be6],.uni-popper__arrow_bottom[data-v-fe4b6be6]:after,.uni-popper__arrow_top[data-v-fe4b6be6],.uni-popper__arrow_top[data-v-fe4b6be6]:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}.uni-popper__arrow_bottom[data-v-fe4b6be6]{filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));top:-6px;left:10%;margin-right:3px;border-top-width:0;border-bottom-color:#ebeef5}.uni-popper__arrow_bottom[data-v-fe4b6be6]:after{content:" ";top:1px;margin-left:-6px;border-top-width:0;border-bottom-color:#fff}.uni-popper__arrow_top[data-v-fe4b6be6]{filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));bottom:-6px;left:10%;margin-right:3px;border-bottom-width:0;border-top-color:#ebeef5}.uni-popper__arrow_top[data-v-fe4b6be6]:after{content:" ";bottom:1px;margin-left:-6px;border-bottom-width:0;border-top-color:#fff}.uni-select__input-text[data-v-fe4b6be6]{width:100%;color:#333;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden}.uni-select__input-placeholder[data-v-fe4b6be6]{color:#6a6a6a;font-size:12px}.uni-select--mask[data-v-fe4b6be6]{position:fixed;top:0;bottom:0;right:0;left:0;z-index:2} diff --git a/app/assets/public/wechat_1.0.6/assets/uni-data-select.i2-ymEG0.js b/app/assets/public/wechat_1.0.6/assets/uni-data-select.i2-ymEG0.js new file mode 100644 index 0000000..8645702 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/uni-data-select.i2-ymEG0.js @@ -0,0 +1 @@ +import{T as e,U as t,r as n,V as s,q as r,g as o,W as i,X as a,Y as c,Z as u,_ as l,$ as h,s as d,v as f,a0 as p,a1 as g,a2 as m,a3 as y,M as _,a4 as w,a5 as v,a6 as S,a7 as I,a as k,a8 as A,a9 as T,aa as b,f as P,o as x,c as O,w as C,h as E,t as L,k as R,b as U,y as D,d as N,z as M,H as F,F as q,j,i as $,D as K,S as B}from"./index-B8U-SFxP.js";import{r as V,_ as H}from"./m-nav.CZV981Qo.js";import{_ as J}from"./_plugin-vue_export-helper.BCo6x5W8.js";const W={pages:[{path:"pages/index/login",style:{titleNView:!1}},{path:"pages/index/index",style:{titleNView:!1}},{path:"pages/index/store",style:{titleNView:!1}},{path:"pages/index/method",style:{titleNView:!1}},{path:"pages/index/order",style:{titleNView:!1}},{path:"pages/index/interior",style:{titleNView:!1,navigationBarTitleText:"内部群"}},{path:"pages/index/groupSend",style:{titleNView:!1,navigationBarTitleText:"群发"}},{path:"pages/index/log",style:{titleNView:!1,navigationBarTitleText:"消息记录"}}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"机器人设置",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},uniIdRouter:{}};function z(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var Q=z((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},r=s.lib={},o=r.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,s=this.sigBytes,r=e.sigBytes;if(this.clamp(),s%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[s+o>>>2]|=i<<24-(s+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,s=[],r=function(t){var n=987654321,s=4294967295;return function(){var r=((n=36969*(65535&n)+(n>>16)&s)<<16)+(t=18e3*(65535&t)+(t>>16)&s)&s;return r/=4294967296,(r+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-r%4*8&255;s.push((o>>>4).toString(16)),s.push((15&o).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,n=[],s=0;s>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new i.init(n,t/2)}},u=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,s=[],r=0;r>>2]>>>24-r%4*8&255;s.push(String.fromCharCode(o))}return s.join("")},parse:function(e){for(var t=e.length,n=[],s=0;s>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new i.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,s=n.words,r=n.sigBytes,o=this.blockSize,a=r/(4*o),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,u=e.min(4*c,r);if(c){for(var l=0;l>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,i=e[t+0],c=e[t+1],f=e[t+2],p=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],_=e[t+7],w=e[t+8],v=e[t+9],S=e[t+10],I=e[t+11],k=e[t+12],A=e[t+13],T=e[t+14],b=e[t+15],P=o[0],x=o[1],O=o[2],C=o[3];P=u(P,x,O,C,i,7,a[0]),C=u(C,P,x,O,c,12,a[1]),O=u(O,C,P,x,f,17,a[2]),x=u(x,O,C,P,p,22,a[3]),P=u(P,x,O,C,g,7,a[4]),C=u(C,P,x,O,m,12,a[5]),O=u(O,C,P,x,y,17,a[6]),x=u(x,O,C,P,_,22,a[7]),P=u(P,x,O,C,w,7,a[8]),C=u(C,P,x,O,v,12,a[9]),O=u(O,C,P,x,S,17,a[10]),x=u(x,O,C,P,I,22,a[11]),P=u(P,x,O,C,k,7,a[12]),C=u(C,P,x,O,A,12,a[13]),O=u(O,C,P,x,T,17,a[14]),P=l(P,x=u(x,O,C,P,b,22,a[15]),O,C,c,5,a[16]),C=l(C,P,x,O,y,9,a[17]),O=l(O,C,P,x,I,14,a[18]),x=l(x,O,C,P,i,20,a[19]),P=l(P,x,O,C,m,5,a[20]),C=l(C,P,x,O,S,9,a[21]),O=l(O,C,P,x,b,14,a[22]),x=l(x,O,C,P,g,20,a[23]),P=l(P,x,O,C,v,5,a[24]),C=l(C,P,x,O,T,9,a[25]),O=l(O,C,P,x,p,14,a[26]),x=l(x,O,C,P,w,20,a[27]),P=l(P,x,O,C,A,5,a[28]),C=l(C,P,x,O,f,9,a[29]),O=l(O,C,P,x,_,14,a[30]),P=h(P,x=l(x,O,C,P,k,20,a[31]),O,C,m,4,a[32]),C=h(C,P,x,O,w,11,a[33]),O=h(O,C,P,x,I,16,a[34]),x=h(x,O,C,P,T,23,a[35]),P=h(P,x,O,C,c,4,a[36]),C=h(C,P,x,O,g,11,a[37]),O=h(O,C,P,x,_,16,a[38]),x=h(x,O,C,P,S,23,a[39]),P=h(P,x,O,C,A,4,a[40]),C=h(C,P,x,O,i,11,a[41]),O=h(O,C,P,x,p,16,a[42]),x=h(x,O,C,P,y,23,a[43]),P=h(P,x,O,C,v,4,a[44]),C=h(C,P,x,O,k,11,a[45]),O=h(O,C,P,x,b,16,a[46]),P=d(P,x=h(x,O,C,P,f,23,a[47]),O,C,i,6,a[48]),C=d(C,P,x,O,_,10,a[49]),O=d(O,C,P,x,T,15,a[50]),x=d(x,O,C,P,m,21,a[51]),P=d(P,x,O,C,k,6,a[52]),C=d(C,P,x,O,p,10,a[53]),O=d(O,C,P,x,S,15,a[54]),x=d(x,O,C,P,c,21,a[55]),P=d(P,x,O,C,w,6,a[56]),C=d(C,P,x,O,b,10,a[57]),O=d(O,C,P,x,y,15,a[58]),x=d(x,O,C,P,A,21,a[59]),P=d(P,x,O,C,g,6,a[60]),C=d(C,P,x,O,I,10,a[61]),O=d(O,C,P,x,f,15,a[62]),x=d(x,O,C,P,v,21,a[63]),o[0]=o[0]+P|0,o[1]=o[1]+x|0,o[2]=o[2]+O|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,n=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var o=e.floor(s/4294967296),i=s;n[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,s,r,o,i){var a=e+(t&n|~t&s)+r+i;return(a<>>32-o)+t}function l(e,t,n,s,r,o,i){var a=e+(t&s|n&~s)+r+i;return(a<>>32-o)+t}function h(e,t,n,s,r,o,i){var a=e+(t^n^s)+r+i;return(a<>>32-o)+t}function d(e,t,n,s,r,o,i){var a=e+(n^(t|~s))+r+i;return(a<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)})),z((function(e,t){var n,s,r;e.exports=(s=(n=G).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=s.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,s=4*n;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),i=this._iKey=t.clone(),a=o.words,c=i.words,u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a>>6*(3-a)&63));var c=s.charAt(64);if(c)for(;r.length%4;)r.push(c);return r.join("")},parse:function(e){var t=e.length,n=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var o=0;o>>6-i%4*2;s[o>>>2]|=(a|c)<<24-o%4*8,o++}return r.create(s,o)}(e,t,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}));const ee="FUNCTION",te="pending",ne="rejected";function se(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function re(e){return"object"===se(e)}function oe(e){return"function"==typeof e}function ie(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}const ae="REJECTED",ce="NOT_PENDING";class ue{constructor({createPromise:e,retryRule:t=ae}={}){this.createPromise=e,this.status=null,this.promise=null,this.retryRule=t}get needRetry(){if(!this.status)return!0;switch(this.retryRule){case ae:return this.status===ne;case ce:return this.status!==te}}exec(){return this.needRetry?(this.status=te,this.promise=this.createPromise().then((e=>(this.status="fulfilled",Promise.resolve(e))),(e=>(this.status=ne,Promise.reject(e)))),this.promise):this.promise}}function le(e){return e&&"string"==typeof e?JSON.parse(e):e}const he=le([]);le("");const de=le("[]")||[];let fe="";try{fe="__UNI__F23FDD2"}catch(st){}let pe,ge={};function me(e,t={}){var n,s;return n=ge,s=e,Object.prototype.hasOwnProperty.call(n,s)||(ge[e]=t),ge[e]}const ye=["invoke","success","fail","complete"],_e=me("_globalUniCloudInterceptor");function we(e,t){_e[e]||(_e[e]={}),re(t)&&Object.keys(t).forEach((n=>{ye.indexOf(n)>-1&&function(e,t,n){let s=_e[e][t];s||(s=_e[e][t]=[]),-1===s.indexOf(n)&&oe(n)&&s.push(n)}(e,n,t[n])}))}function ve(e,t){_e[e]||(_e[e]={}),re(t)?Object.keys(t).forEach((n=>{ye.indexOf(n)>-1&&function(e,t,n){const s=_e[e][t];if(!s)return;const r=s.indexOf(n);r>-1&&s.splice(r,1)}(e,n,t[n])})):delete _e[e]}function Se(e,t){return e&&0!==e.length?e.reduce(((e,n)=>e.then((()=>n(t)))),Promise.resolve()):Promise.resolve()}function Ie(e,t){return _e[e]&&_e[e][t]||[]}function ke(e){we("callObject",e)}const Ae=me("_globalUniCloudListener"),Te="response",be="needLogin",Pe="refreshToken",xe="failover",Oe="clientdb",Ce="cloudfunction",Ee="cloudobject";function Le(e){return Ae[e]||(Ae[e]=[]),Ae[e]}function Re(e,t){const n=Le(e);n.includes(t)||n.push(t)}function Ue(e,t){const n=Le(e),s=n.indexOf(t);-1!==s&&n.splice(s,1)}function De(e,t){const n=Le(e);for(let s=0;s{Me&&e(),function t(){if("function"==typeof m){const t=m();t&&t[0]&&(Me=!0,e())}Me||setTimeout((()=>{t()}),30)}()})),Ne)}function qe(e){const t={};for(const n in e){const s=e[n];oe(s)&&(t[n]=ie(s))}return t}class je extends Error{constructor(e){const t=e.message||e.errMsg||"unknown system error";super(t),this.errMsg=t,this.code=this.errCode=e.code||e.errCode||"SYSTEM_ERROR",this.errSubject=this.subject=e.subject||e.errSubject,this.cause=e.cause,this.requestId=e.requestId}toJson(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}var $e={request:e=>n(e),uploadFile:e=>s(e),setStorageSync:(e,t)=>r(e,t),getStorageSync:e=>o(e),removeStorageSync:e=>i(e),clearStorageSync:()=>a(),connectSocket:e=>c(e)};function Ke(e){return e&&Ke(e.__v_raw)||e}function Be(){return{token:$e.getStorageSync("uni_id_token")||$e.getStorageSync("uniIdToken"),tokenExpired:$e.getStorageSync("uni_id_token_expired")}}function Ve({token:e,tokenExpired:t}={}){e&&$e.setStorageSync("uni_id_token",e),t&&$e.setStorageSync("uni_id_token_expired",t)}let He,Je;function We(){return He||(He=_()),He}function ze(){let e,t;try{if(b){if(b.toString().indexOf("not yet implemented")>-1)return;const{scene:n,channel:s}=b();e=s,t=n}}catch(n){}return{channel:e,scene:t}}let Qe={};function Ge(){const e=S&&S()||"en";if(Je)return{...Qe,...Je,locale:e,LOCALE:e};const t=We(),{deviceId:n,osName:s,uniPlatform:r,appId:o}=t,i=["appId","appLanguage","appName","appVersion","appVersionCode","appWgtVersion","browserName","browserVersion","deviceBrand","deviceId","deviceModel","deviceType","osName","osVersion","romName","romVersion","ua","hostName","hostVersion","uniPlatform","uniRuntimeVersion","uniRuntimeVersionCode","uniCompilerVersion","uniCompilerVersionCode"];for(const a in t)Object.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&delete t[a];return Je={PLATFORM:r,OS:s,APPID:o,DEVICEID:n,...ze(),...t},{...Qe,...Je,locale:e,LOCALE:e}}var Ye=function(e,t){let n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),Y(n,t).toString()},Xe=function(e,t){return new Promise(((n,s)=>{t(Object.assign(e,{complete(e){e||(e={});const t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400){const n=e.data&&e.data.error&&e.data.error.code||"SYS_ERR",r=e.data&&e.data.error&&e.data.error.message||e.errMsg||"request:fail";return s(new je({code:n,message:r,requestId:t}))}const r=e.data;if(r.error)return s(new je({code:r.error.code,message:r.error.message,requestId:t}));r.result=r.data,r.requestId=t,delete r.data,n(r)}}))}))},Ze=function(e){return Z.stringify(X.parse(e))},et={init(e){const t=new class{constructor(e){["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),this.config=Object.assign({},{endpoint:0===e.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=$e,this._getAccessTokenPromiseHub=new ue({createPromise:()=>this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((e=>{if(!e.result||!e.result.accessToken)throw new je({code:"AUTH_FAILED",message:"获取accessToken失败"});this.setAccessToken(e.result.accessToken)})),retryRule:ce})}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return Xe(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then((()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((t=>new Promise(((e,n)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((()=>this.getAccessToken())).then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})))):this.getAccessToken().then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=Ye(t.data,this.config.clientSecret),t}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),s={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,s["x-basement-token"]=this.accessToken),s["x-serverless-sign"]=Ye(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:s}}getAccessToken(){return this._getAccessTokenPromiseHub.exec()}async authorize(){await this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request({...this.setupRequest(t),timeout:e.timeout})}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:n,filePath:s,fileType:r,onUploadProgress:o}){return new Promise(((i,a)=>{const c=this.adapter.uploadFile({url:e,formData:t,name:n,filePath:s,fileType:r,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?i(e):a(new je({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){a(new je({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof o&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{o({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}async uploadFile({filePath:e,cloudPath:t,fileType:n="image",cloudPathAsRealPath:s=!1,onUploadProgress:r,config:o}){if("string"!==se(t))throw new je({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new je({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new je({code:"INVALID_PARAM",message:"cloudPath不合法"});const i=o&&o.envType||this.config.envType;if(s&&("/"!==t[0]&&(t="/"+t),t.indexOf("\\")>-1))throw new je({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});const a=(await this.getOSSUploadOptionsFromPath({env:i,filename:s?t.split("/").pop():t,fileId:s?t:void 0})).result,c="https://"+a.cdnDomain+"/"+a.ossPath,{securityToken:u,accessKeyId:l,signature:h,host:d,ossPath:f,id:p,policy:g,ossCallbackUrl:m}=a,y={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:l,Signature:h,host:d,id:p,key:f,policy:g,success_action_status:200};if(u&&(y["x-oss-security-token"]=u),m){const e=JSON.stringify({callbackUrl:m,callbackBody:JSON.stringify({fileId:p,spaceId:this.config.spaceId}),callbackBodyType:"application/json"});y.callback=Ze(e)}const _={url:"https://"+a.host,formData:y,fileName:"file",name:"file",filePath:e,fileType:n};if(await this.uploadFileToOSS(Object.assign({},_,{onUploadProgress:r})),m)return{success:!0,filePath:e,fileID:c};if((await this.reportOSSUpload({id:p})).success)return{success:!0,filePath:e,fileID:c};throw new je({code:"UPLOAD_FAILED",message:"文件上传失败"})}getTempFileURL({fileList:e}={}){return new Promise(((t,n)=>{Array.isArray(e)&&0!==e.length||n(new je({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),this.getFileInfo({fileList:e}).then((n=>{t({fileList:e.map(((e,t)=>{const s=n.fileList[t];return{fileID:e,tempFileURL:s&&s.url||e}}))})}))}))}async getFileInfo({fileList:e}={}){if(!Array.isArray(e)||0===e.length)throw new je({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const t={method:"serverless.file.resource.info",params:JSON.stringify({id:e.map((e=>e.split("?")[0])).join(",")})};return{fileList:(await this.request(this.setupRequest(t))).result}}}(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};const tt="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";var nt,st;(st=nt||(nt={})).local="local",st.none="none",st.session="session";var rt=function(){},ot=z((function(e,t){var n;e.exports=(n=G,function(e){var t=n,s=t.lib,r=s.WordArray,o=s.Hasher,i=t.algo,a=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),s=2;s<=n;s++)if(!(t%s))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var s=2,r=0;r<64;)t(s)&&(r<8&&(a[r]=n(e.pow(s,.5))),c[r]=n(e.pow(s,1/3)),r++),s++}();var u=[],l=i.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,s=n[0],r=n[1],o=n[2],i=n[3],a=n[4],l=n[5],h=n[6],d=n[7],f=0;f<64;f++){if(f<16)u[f]=0|e[t+f];else{var p=u[f-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=u[f-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[f]=g+u[f-7]+y+u[f-16]}var _=s&r^s&o^r&o,w=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),v=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&h)+c[f]+u[f];d=h,h=l,l=a,a=i+v|0,i=o,o=r,r=s,s=v+(w+_)|0}n[0]=n[0]+s|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+i|0,n[4]=n[4]+a|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(s/4294967296),n[15+(r+64>>>9<<4)]=s,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)})),it=ot,at=z((function(e,t){e.exports=G.HmacSHA256}));const ct=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new je({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}const t=new Promise(((t,n)=>{e=(e,s)=>e?n(e):t(s)}));return e.promise=t,e};function ut(e){return void 0===e}function lt(e){return"[object Null]"===Object.prototype.toString.call(e)}function ht(e=""){return e.replace(/([\s\S]+)\s+(请前往云开发AI小助手查看问题:.*)/,"$1")}function dt(e=32){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=t.length;let s="";for(let r=0;r=0?JSON.parse(n).content:""}removeStore(e){this._storage.removeItem(e)}}const wt={},vt={};function St(e){return wt[e]}class It{constructor(e,t){this.data=t||null,this.name=e}}class kt extends It{constructor(e,t){super("error",{error:e,data:t}),this.error=e}}const At=new class{constructor(){this._listeners={}}on(e,t){return n=e,s=t,(r=this._listeners)[n]=r[n]||[],r[n].push(s),this;var n,s,r}off(e,t){return function(e,t,n){if(n&&n[e]){const s=n[e].indexOf(t);-1!==s&&n[e].splice(s,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof kt)return console.error(e.error),this;const n="string"==typeof e?new It(e,t||{}):e,s=n.name;if(this._listens(s)){n.target=this;const e=this._listeners[s]?[...this._listeners[s]]:[];for(const t of e)t.call(this,n)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function Tt(e,t){At.on(e,t)}function bt(e,t={}){At.fire(e,t)}function Pt(e,t){At.off(e,t)}const xt="loginStateChanged",Ot="loginStateExpire",Ct="loginTypeChanged",Et="anonymousConverted",Lt="refreshAccessToken";var Rt;!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Rt||(Rt={}));class Ut{constructor(){this._fnPromiseMap=new Map}async run(e,t){let n=this._fnPromiseMap.get(e);return n||(n=new Promise((async(n,s)=>{try{await this._runIdlePromise();const s=t();n(await s)}catch(r){s(r)}finally{this._fnPromiseMap.delete(e)}})),this._fnPromiseMap.set(e,n)),n}_runIdlePromise(){return Promise.resolve()}}class Dt{constructor(e){this._singlePromise=new Ut,this._cache=St(e.env),this._baseURL=`https://${e.env}.ap-shanghai.tcb-api.tencentcloudapi.com`,this._reqClass=new pt.adapter.reqClass({timeout:e.timeout,timeoutMsg:`请求在${e.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]})}_getDeviceId(){if(this._deviceID)return this._deviceID;const{deviceIdKey:e}=this._cache.keys;let t=this._cache.getStore(e);return"string"==typeof t&&t.length>=16&&t.length<=48||(t=dt(),this._cache.setStore(e,t)),this._deviceID=t,t}async _request(e,t,n={}){const s={"x-request-id":dt(),"x-device-id":this._getDeviceId()};if(n.withAccessToken){const{tokenTypeKey:e}=this._cache.keys,t=await this.getAccessToken(),n=this._cache.getStore(e);s.authorization=`${n} ${t}`}return this._reqClass["get"===n.method?"get":"post"]({url:`${this._baseURL}${e}`,data:t,headers:s})}async _fetchAccessToken(){const{loginTypeKey:e,accessTokenKey:t,accessTokenExpireKey:n,tokenTypeKey:s}=this._cache.keys,r=this._cache.getStore(e);if(r&&r!==Rt.ANONYMOUS)throw new je({code:"INVALID_OPERATION",message:"非匿名登录不支持刷新 access token"});const o=await this._singlePromise.run("fetchAccessToken",(async()=>(await this._request("/auth/v1/signin/anonymously",{},{method:"post"})).data)),{access_token:i,expires_in:a,token_type:c}=o;return this._cache.setStore(s,c),this._cache.setStore(t,i),this._cache.setStore(n,Date.now()+1e3*a),i}isAccessTokenExpired(e,t){let n=!0;return e&&t&&(n=t(await this._request("/auth/v1/user/me",{},{withAccessToken:!0,method:"get"})).data))}}const Nt=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Mt={"X-SDK-Version":"1.3.5"};function Ft(e,t,n){const s=e[t];e[t]=function(t){const r={},o={};n.forEach((n=>{const{data:s,headers:i}=n.call(e,t);Object.assign(r,s),Object.assign(o,i)}));const i=t.data;return i&&(()=>{var e;if(e=i,"[object FormData]"!==Object.prototype.toString.call(e))t.data={...i,...r};else for(const t in r)i.append(t,r[t])})(),t.headers={...t.headers||{},...o},s.call(e,t)}}function qt(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{...Mt,"x-seqid":e}}}class jt{constructor(e={}){var t;this.config=e,this._reqClass=new pt.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]}),this._cache=St(this.config.env),this._localCache=(t=this.config.env,vt[t]),this.oauth=new Dt(this.config),Ft(this._reqClass,"post",[qt]),Ft(this._reqClass,"upload",[qt]),Ft(this._reqClass,"download",[qt])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(n){t=n}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n,loginTypeKey:s,anonymousUuidKey:r}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let o=this._cache.getStore(n);if(!o)throw new je({message:"未登录CloudBase"});const i={refresh_token:o},a=await this.request("auth.fetchAccessTokenWithRefreshToken",i);if(a.data.code){const{code:e}=a.data;if("SIGN_PARAM_INVALID"===e||"REFRESH_TOKEN_EXPIRED"===e||"INVALID_REFRESH_TOKEN"===e){if(this._cache.getStore(s)===Rt.ANONYMOUS&&"INVALID_REFRESH_TOKEN"===e){const e=this._cache.getStore(r),t=this._cache.getStore(n),s=await this.send("auth.signInAnonymously",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(s.refresh_token),this._refreshAccessToken()}bt(Ot),this._cache.removeStore(n)}throw new je({code:a.data.code,message:`刷新access token失败:${a.data.code}`})}if(a.data.access_token)return bt(Lt),this._cache.setStore(e,a.data.access_token),this._cache.setStore(t,a.data.access_token_expire+Date.now()),{accessToken:a.data.access_token,accessTokenExpire:a.data.access_token_expire};a.data.refresh_token&&(this._cache.removeStore(n),this._cache.setStore(n,a.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n}=this._cache.keys;if(!this._cache.getStore(n))throw new je({message:"refresh token不存在,登录状态异常"});let s=this._cache.getStore(e),r=this._cache.getStore(t),o=!0;return this._shouldRefreshAccessTokenHook&&!(await this._shouldRefreshAccessTokenHook(s,r))&&(o=!1),(!s||!r||r{e.wxOpenId&&e.wxPublicId&&(t=!0)})),{users:n,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send("auth.setPrimaryUid",{uid:e})}unlink(e){return this._request.send("auth.unlink",{platform:e})}async update(e){const{nickName:t,gender:n,avatarUrl:s,province:r,country:o,city:i}=e,{data:a}=await this._request.send("auth.updateUserInfo",{nickName:t,gender:n,avatarUrl:s,province:r,country:o,city:i});this.setLocalUserInfo(a)}async refresh(){const e=await this._request.oauth.getUserInfo();return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((e=>{this[e]=t[e]})),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class Ht{constructor(e){if(!e)throw new je({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=St(e);const{refreshTokenKey:t,accessTokenKey:n,accessTokenExpireKey:s}=this._cache.keys,r=this._cache.getStore(t),o=this._cache.getStore(n),i=this._cache.getStore(s);this.credential={refreshToken:r,accessToken:o,accessTokenExpire:i},this.user=new Vt(e)}get isAnonymousAuth(){return this.loginType===Rt.ANONYMOUS}get isCustomAuth(){return this.loginType===Rt.CUSTOM}get isWeixinAuth(){return this.loginType===Rt.WECHAT||this.loginType===Rt.WECHAT_OPEN||this.loginType===Rt.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class Jt extends Bt{async signIn(){this._cache.updatePersistence("local"),await this._request.oauth.getAccessToken(),bt(xt),bt(Ct,{env:this.config.env,loginType:Rt.ANONYMOUS,persistence:"local"});const e=new Ht(this.config.env);return await e.user.refresh(),e}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:n}=this._cache.keys,s=this._cache.getStore(t),r=this._cache.getStore(n),o=await this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:s,refresh_token:r,ticket:e});if(o.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(o.refresh_token),await this._request.refreshAccessToken(),bt(Et,{env:this.config.env}),bt(Ct,{loginType:Rt.CUSTOM,persistence:"local"}),{credential:{refreshToken:o.refresh_token}};throw new je({message:"匿名转化失败"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:n}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(n,Rt.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class Wt extends Bt{async signIn(e){if("string"!=typeof e)throw new je({code:"PARAM_ERROR",message:"ticket must be a string"});const{refreshTokenKey:t}=this._cache.keys,n=await this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(t)||""});if(n.refresh_token)return this.setRefreshToken(n.refresh_token),await this._request.refreshAccessToken(),bt(xt),bt(Ct,{env:this.config.env,loginType:Rt.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new Ht(this.config.env);throw new je({message:"自定义登录失败"})}}class zt extends Bt{async signIn(e,t){if("string"!=typeof e)throw new je({code:"PARAM_ERROR",message:"email must be a string"});const{refreshTokenKey:n}=this._cache.keys,s=await this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:t,refresh_token:this._cache.getStore(n)||""}),{refresh_token:r,access_token:o,access_token_expire:i}=s;if(r)return this.setRefreshToken(r),o&&i?this.setAccessToken(o,i):await this._request.refreshAccessToken(),await this.refreshUserInfo(),bt(xt),bt(Ct,{env:this.config.env,loginType:Rt.EMAIL,persistence:this.config.persistence}),new Ht(this.config.env);throw s.code?new je({code:s.code,message:`邮箱登录失败: ${s.message}`}):new je({message:"邮箱登录失败"})}async activate(e){return this._request.send("auth.activateEndUserMail",{token:e})}async resetPasswordWithToken(e,t){return this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:t})}}class Qt extends Bt{async signIn(e,t){if("string"!=typeof e)throw new je({code:"PARAM_ERROR",message:"username must be a string"});"string"!=typeof t&&(t="",console.warn("password is empty"));const{refreshTokenKey:n}=this._cache.keys,s=await this._request.send("auth.signIn",{loginType:Rt.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(n)||""}),{refresh_token:r,access_token_expire:o,access_token:i}=s;if(r)return this.setRefreshToken(r),i&&o?this.setAccessToken(i,o):await this._request.refreshAccessToken(),await this.refreshUserInfo(),bt(xt),bt(Ct,{env:this.config.env,loginType:Rt.USERNAME,persistence:this.config.persistence}),new Ht(this.config.env);throw s.code?new je({code:s.code,message:`用户名密码登录失败: ${s.message}`}):new je({message:"用户名密码登录失败"})}}class Gt{constructor(e){this.config=e,this._cache=St(e.env),this._request=Kt(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),Tt(Ct,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new Jt(this.config)}customAuthProvider(){return new Wt(this.config)}emailAuthProvider(){return new zt(this.config)}usernameAuthProvider(){return new Qt(this.config)}async signInAnonymously(){return new Jt(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new zt(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new Qt(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){return this._anonymousAuthProvider||(this._anonymousAuthProvider=new Jt(this.config)),Tt(Et,this._onAnonymousConverted),await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===Rt.ANONYMOUS)throw new je({message:"匿名用户不支持登出操作"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:n}=this._cache.keys,s=this._cache.getStore(e);if(!s)return;const r=await this._request.send("auth.logout",{refresh_token:s});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(n),bt(xt),bt(Ct,{env:this.config.env,loginType:Rt.NULL,persistence:this.config.persistence}),r}async signUpWithEmailAndPassword(e,t){return this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send("auth.sendPasswordResetEmail",{email:e})}onLoginStateChanged(e){Tt(xt,(()=>{const t=this.hasLoginState();e.call(this,t)}));const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){Tt(Ot,e.bind(this))}onAccessTokenRefreshed(e){Tt(Lt,e.bind(this))}onAnonymousConverted(e){Tt(Et,e.bind(this))}onLoginTypeChanged(e){Tt(Ct,(()=>{const t=this.hasLoginState();e.call(this,t)}))}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{accessTokenKey:e,accessTokenExpireKey:t}=this._cache.keys,n=this._cache.getStore(e),s=this._cache.getStore(t);return this._request.oauth.isAccessTokenExpired(n,s)?null:new Ht(this.config.env)}async isUsernameRegistered(e){if("string"!=typeof e)throw new je({code:"PARAM_ERROR",message:"username must be a string"});const{data:t}=await this._request.send("auth.isUsernameRegistered",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new Wt(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send("auth.getUserInfo",{}).then((e=>e.code?e:{...e.data,requestId:e.seqId}))}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,n=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(t)+"/@@/"+n}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:n,env:s}=e.data;s===this.config.env&&(this._cache.updatePersistence(n),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const Yt=function(e,t){t=t||ct();const n=Kt(this.config.env),{cloudPath:s,filePath:r,onUploadProgress:o,fileType:i="image"}=e;return n.send("storage.getUploadMetadata",{path:s}).then((e=>{const{data:{url:a,authorization:c,token:u,fileId:l,cosFileId:h},requestId:d}=e,f={key:s,signature:c,"x-cos-meta-fileid":h,success_action_status:"201","x-cos-security-token":u};n.upload({url:a,data:f,file:r,name:s,fileType:i,onUploadProgress:o}).then((e=>{201===e.statusCode?t(null,{fileID:l,requestId:d}):t(new je({code:"STORAGE_REQUEST_FAIL",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))})).catch((e=>{t(e)}))})).catch((e=>{t(e)})),t.promise},Xt=function(e,t){t=t||ct();const n=Kt(this.config.env),{cloudPath:s}=e;return n.send("storage.getUploadMetadata",{path:s}).then((e=>{t(null,e)})).catch((e=>{t(e)})),t.promise},Zt=function({fileList:e},t){if(t=t||ct(),!e||!Array.isArray(e))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};for(let s of e)if(!s||"string"!=typeof s)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"};const n={fileid_list:e};return Kt(this.config.env).send("storage.batchDeleteFile",n).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},en=function({fileList:e},t){t=t||ct(),e&&Array.isArray(e)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});let n=[];for(let r of e)"object"==typeof r?(r.hasOwnProperty("fileID")&&r.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),n.push({fileid:r.fileID,max_age:r.maxAge})):"string"==typeof r?n.push({fileid:r}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"});const s={file_list:n};return Kt(this.config.env).send("storage.batchGetDownloadUrl",s).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},tn=async function({fileID:e},t){const n=(await en.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if("SUCCESS"!==n.code)return t?t(n):new Promise((e=>{e(n)}));const s=Kt(this.config.env);let r=n.download_url;if(r=encodeURI(r),!t)return s.download({url:r});t(await s.download({url:r}))},nn=function({name:e,data:t,query:n,parse:s,search:r,timeout:o},i){const a=i||ct();let c;try{c=t?JSON.stringify(t):""}catch(l){return Promise.reject(l)}if(!e)return Promise.reject(new je({code:"PARAM_ERROR",message:"函数名不能为空"}));const u={inQuery:n,parse:s,search:r,function_name:e,request_data:c};return Kt(this.config.env).send("functions.invokeFunction",u,{timeout:o}).then((e=>{if(e.code)a(null,e);else{let n=e.data.response_data;if(s)a(null,{result:n,requestId:e.requestId});else try{n=JSON.parse(e.data.response_data),a(null,{result:n,requestId:e.requestId})}catch(t){a(new je({message:"response data must be json"}))}}return a.promise})).catch((e=>{a(e)})),a.promise},sn={timeout:15e3,persistence:"session"},rn={};class on{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(pt.adapter||(this.requestClient=new pt.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...sn,...e},!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new on(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||pt.adapter.primaryStorage||sn.persistence;var n;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;wt[t]=new _t(e),vt[t]=new _t({...e,persistence:"local"})}(this.config),n=this.config,$t[n.env]=new jt(n),this.authObj=new Gt(this.config),this.authObj}on(e,t){return Tt.apply(this,[e,t])}off(e,t){return Pt.apply(this,[e,t])}callFunction(e,t){return nn.apply(this,[e,t])}deleteFile(e,t){return Zt.apply(this,[e,t])}getTempFileURL(e,t){return en.apply(this,[e,t])}downloadFile(e,t){return tn.apply(this,[e,t])}uploadFile(e,t){return Yt.apply(this,[e,t])}getUploadMetadata(e,t){return Xt.apply(this,[e,t])}registerExtension(e){rn[e.name]=e}async invokeExtension(e,t){const n=rn[e];if(!n)throw new je({message:`扩展${e} 必须先注册`});return await n.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:n}=function(e){const t=(n=e,"[object Array]"===Object.prototype.toString.call(n)?e:[e]);var n;for(const s of t){const{isMatch:e,genAdapter:t,runtime:n}=s;if(e())return{adapter:t(),runtime:n}}}(e)||{};t&&(pt.adapter=t),n&&(pt.runtime=n)}}var an=new on;function cn(e,t,n){void 0===n&&(n={});var s=/\?/.test(t),r="";for(var o in n)""===r?!s&&(t+="?"):r+="&",r+=o+"="+encodeURIComponent(n[o]);return/^http(s)?:\/\//.test(t+=r)?t:""+e+t}class un{get(e){const{url:t,data:n,headers:s,timeout:r}=e;return new Promise(((e,o)=>{$e.request({url:cn("https:",t),data:n,method:"GET",header:s,timeout:r,success(t){e(t)},fail(e){o(e)}})}))}post(e){const{url:t,data:n,headers:s,timeout:r}=e;return new Promise(((e,o)=>{$e.request({url:cn("https:",t),data:n,method:"POST",header:s,timeout:r,success(t){e(t)},fail(e){o(e)}})}))}upload(e){return new Promise(((t,n)=>{const{url:s,file:r,data:o,headers:i,fileType:a}=e,c=$e.uploadFile({url:cn("https:",s),name:"file",formData:Object.assign({},o),filePath:r,fileType:a,header:i,success(e){const n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&o.success_action_status&&(n.statusCode=parseInt(o.success_action_status,10)),t(n)},fail(e){n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}const ln={setItem(e,t){$e.setStorageSync(e,t)},getItem:e=>$e.getStorageSync(e),removeItem(e){$e.removeStorageSync(e)},clear(){$e.clearStorageSync()}};var hn={genAdapter:function(){return{root:{},reqClass:un,localStorage:ln,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};an.useAdapters(hn);const dn=an,fn=dn.init;dn.init=function(e){e.env=e.spaceId;const t=fn.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const n=t.auth;return t.auth=function(e){const t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((e=>{var n;t[e]=(n=t[e],function(e){e=e||{};const{success:t,fail:s,complete:r}=qe(e);if(!(t||s||r))return n.call(this,e);n.call(this,e).then((e=>{t&&t(e),r&&r(e)}),(e=>{s&&s(e),r&&r(e)}))}).bind(t)})),t},t.customAuth=t.auth,t};var pn=dn;async function gn(e,t){const n=`http://${e}:${t}/system/ping`;try{const e=await(s={url:n,timeout:500},new Promise(((e,t)=>{$e.request({...s,success(t){e(t)},fail(e){t(e)}})})));return!(!e.data||0!==e.data.code)}catch(r){return!1}var s}const mn={"serverless.file.resource.generateProximalSign":"storage/generate-proximal-sign","serverless.file.resource.report":"storage/report","serverless.file.resource.delete":"storage/delete","serverless.file.resource.getTempFileURL":"storage/get-temp-file-url"};var yn={init(e){const t=new class{constructor(e){if(["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),!e.endpoint)throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");this.config=Object.assign({},e),this.config.provider="dcloud",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.adapter=$e}async request(e,t=!0){return e=this.setupRequest(e),Promise.resolve().then((()=>Xe(e,this.adapter.request)))}requestLocal(e){return new Promise(((t,n)=>{this.adapter.request(Object.assign(e,{complete(e){if(e||(e={}),!e.statusCode||e.statusCode>=400){const t=e.data&&e.data.code||"SYS_ERR",s=e.data&&e.data.message||"request:fail";return n(new je({code:t,message:s}))}t({success:!0,result:e.data})}}))}))}setupRequest(e){const t=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};n["x-serverless-sign"]=Ye(t,this.config.clientSecret);const s=Ge();n["x-client-info"]=encodeURIComponent(JSON.stringify(s));const{token:r}=Be();return n["x-client-token"]=r,{url:this.config.requestUrl,method:"POST",data:t,dataType:"json",header:JSON.parse(JSON.stringify(n))}}async setupLocalRequest(e){const t=Ge(),{token:n}=Be(),s=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now(),clientInfo:t,token:n}),{address:r,servePort:o}=this.__dev__&&this.__dev__.debugInfo||{},{address:i}=await async function(e,t){let n;for(let s=0;s{const{url:o,formData:i,name:a}=t.result;return r=t.result.fileUrl,new Promise(((t,r)=>{const c=this.adapter.uploadFile({url:o,formData:i,name:a,filePath:e,fileType:n,success(e){e&&e.statusCode<400?t(e):r(new je({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){r(new je({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))})).then((()=>this.reportUploadFile({cloudPath:t}))).then((t=>new Promise(((n,s)=>{t.success?n({success:!0,filePath:e,fileID:r}):s(new je({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(t).then((e=>{if(e.success)return e.result;throw new je({code:"DELETE_FILE_FAILED",message:"删除文件失败"})}))}getTempFileURL({fileList:e,maxAge:t}={}){if(!Array.isArray(e)||0===e.length)throw new je({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e,maxAge:t})};return this.request(n).then((e=>{if(e.success)return{fileList:e.result.fileList.map((e=>({fileID:e.fileID,tempFileURL:e.tempFileURL})))};throw new je({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})}))}}(e),n={signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},_n=z((function(e,t){e.exports=G.enc.Hex}));function wn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function vn(e="",t={}){const{data:n,functionName:s,method:r,headers:o,signHeaderKeys:i=[],config:a}=t,c=String(Date.now()),u=wn(),l=Object.assign({},o,{"x-from-app-id":a.spaceAppId,"x-from-env-id":a.spaceId,"x-to-env-id":a.spaceId,"x-from-instance-id":c,"x-from-function-name":s,"x-client-timestamp":c,"x-alipay-source":"client","x-request-id":u,"x-alipay-callid":u,"x-trace-id":u}),h=["x-from-app-id","x-from-env-id","x-to-env-id","x-from-instance-id","x-from-function-name","x-client-timestamp"].concat(i),[d="",f=""]=e.split("?")||[],p=function(e){const t=e.signedHeaders.join(";"),n=e.signedHeaders.map((t=>`${t.toLowerCase()}:${e.headers[t]}\n`)).join(""),s=it(e.body).toString(_n),r=`${e.method.toUpperCase()}\n${e.path}\n${e.query}\n${n}\n${t}\n${s}\n`,o=it(r).toString(_n),i=`HMAC-SHA256\n${e.timestamp}\n${o}\n`,a=at(i,e.secretKey).toString(_n);return`HMAC-SHA256 Credential=${e.secretId}, SignedHeaders=${t}, Signature=${a}`}({path:d,query:f,method:r,headers:l,timestamp:c,body:JSON.stringify(n),secretId:a.accessKey,secretKey:a.secretKey,signedHeaders:h.sort()});return{url:`${a.endpoint}${e}`,headers:Object.assign({},l,{Authorization:p})}}function Sn({url:e,data:t,method:n="POST",headers:s={},timeout:r}){return new Promise(((o,i)=>{$e.request({url:e,method:n,data:"object"==typeof t?JSON.stringify(t):t,header:s,dataType:"json",timeout:r,complete:(e={})=>{const t=s["x-trace-id"]||"";if(!e.statusCode||e.statusCode>=400){const{message:n,errMsg:s,trace_id:r}=e.data||{};return i(new je({code:"SYS_ERR",message:n||s||"request:fail",requestId:r||t}))}o({status:e.statusCode,data:e.data,headers:e.header,requestId:t})}})}))}function In(e,t){const{path:n,data:s,method:r="GET"}=e,{url:o,headers:i}=vn(n,{functionName:"",data:s,method:r,headers:{"x-alipay-cloud-mode":"oss","x-data-api-type":"oss","x-expire-timestamp":String(Date.now()+6e4)},signHeaderKeys:["x-data-api-type","x-expire-timestamp"],config:t});return Sn({url:o,data:s,method:r,headers:i}).then((e=>{const t=e.data||{};if(!t.success)throw new je({code:e.errCode,message:e.errMsg,requestId:e.requestId});return t.data||{}})).catch((e=>{throw new je({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}function kn(e=""){const t=e.trim().replace(/^cloud:\/\//,""),n=t.indexOf("/");if(n<=0)throw new je({code:"INVALID_PARAM",message:"fileID不合法"});const s=t.substring(0,n),r=t.substring(n+1);return s!==this.config.spaceId&&console.warn("file ".concat(e," does not belong to env ").concat(this.config.spaceId)),r}function An(e=""){return"cloud://".concat(this.config.spaceId,"/").concat(e.replace(/^\/+/,""))}class Tn{constructor(e){this.config=e}signedURL(e,t={}){const n=`/ws/function/${e}`,s=this.config.wsEndpoint.replace(/^ws(s)?:\/\//,""),r=Object.assign({},t,{accessKeyId:this.config.accessKey,signatureNonce:wn(),timestamp:""+Date.now()}),o=[n,["accessKeyId","authorization","signatureNonce","timestamp"].sort().map((function(e){return r[e]?"".concat(e,"=").concat(r[e]):null})).filter(Boolean).join("&"),`host:${s}`].join("\n"),i=["HMAC-SHA256",it(o).toString(_n)].join("\n"),a=at(i,this.config.secretKey).toString(_n),c=Object.keys(r).map((e=>`${e}=${encodeURIComponent(r[e])}`)).join("&");return`${this.config.wsEndpoint}${n}?${c}&signature=${a}`}}class bn{constructor(e){this.config=e}signedURL(e,t={}){const n=`/ws/sse/function/${e}`,s=this.config.endpoint.replace(/^http(s)?:\/\//,""),r=Object.assign({},t,{accessKeyId:this.config.accessKey,signatureNonce:wn(),timestamp:""+Date.now()}),o=["accessKeyId","authorization","signatureNonce","timestamp"].sort().map((function(e){return r[e]?"".concat(e,"=").concat(r[e]):null})).filter(Boolean).join("&"),i=[n.replace("/ws",""),o,`host:${s}`].join("\n"),a=["HMAC-SHA256",it(i).toString(_n)].join("\n"),c=at(a,this.config.secretKey).toString(_n),u=Object.keys(r).map((e=>`${e}=${encodeURIComponent(r[e])}`)).join("&");return`${this.config.endpoint}${n}?${u}&signature=${c}`}}var Pn={init:e=>{e.provider="alipay";const t=new class{constructor(e){if(["spaceId","spaceAppId","accessKey","secretKey"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),e.endpoint){if("string"!=typeof e.endpoint)throw new Error("endpoint must be string");if(!/^https:\/\//.test(e.endpoint))throw new Error("endpoint must start with https://");e.endpoint=e.endpoint.replace(/\/$/,"")}this.config=Object.assign({},e,{endpoint:e.endpoint||`https://${e.spaceId}.api-hz.cloudbasefunction.cn`,wsEndpoint:e.wsEndpoint||`wss://${e.spaceId}.api-hz.cloudbasefunction.cn`}),this._websocket=new Tn(this.config),this._sse=new bn(this.config)}callFunction(e){return function(e,t){const{name:n,data:s,async:r=!1,timeout:o}=e,i="POST",a={"x-to-function-name":n};r&&(a["x-function-invoke-type"]="async");const{url:c,headers:u}=vn("/functions/invokeFunction",{functionName:n,data:s,method:i,headers:a,signHeaderKeys:["x-to-function-name"],config:t});return Sn({url:c,data:s,method:i,headers:u,timeout:o}).then((e=>{let t=0;if(r){const n=e.data||{};t="200"===n.errCode?0:n.errCode,e.data=n.data||{},e.errMsg=n.errMsg}if(0!==t)throw new je({code:t,message:e.errMsg,requestId:e.requestId});return{errCode:t,success:0===t,requestId:e.requestId,result:e.data}})).catch((e=>{throw new je({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}(e,this.config)}uploadFileToOSS({url:e,filePath:t,fileType:n,formData:s,onUploadProgress:r}){return new Promise(((o,i)=>{const a=$e.uploadFile({url:e,filePath:t,fileType:n,formData:s,name:"file",success(e){e&&e.statusCode<400?o(e):i(new je({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){i(new je({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof r&&a&&"function"==typeof a.onProgressUpdate&&a.onProgressUpdate((e=>{r({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}async uploadFile({filePath:e,cloudPath:t="",fileType:n="image",onUploadProgress:s}){if("string"!==se(t))throw new je({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new je({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new je({code:"INVALID_PARAM",message:"cloudPath不合法"});const r=await In({path:"/".concat(t.replace(/^\//,""),"?post_url")},this.config),{file_id:o,upload_url:i,form_data:a}=r,c=a&&a.reduce(((e,t)=>(e[t.key]=t.value,e)),{});return this.uploadFileToOSS({url:i,filePath:e,fileType:n,formData:c,onUploadProgress:s}).then((()=>({fileID:o})))}async getTempFileURL({fileList:e}){return new Promise(((t,n)=>{(!e||e.length<0)&&t({code:"INVALID_PARAM",message:"fileList不能为空数组"}),e.length>50&&t({code:"INVALID_PARAM",message:"fileList数组长度不能超过50"});const s=[];for(const o of e){let e;"string"!==se(o)&&t({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});try{e=kn.call(this,o)}catch(r){console.warn(r.errCode,r.errMsg),e=o}s.push({file_id:e,expire:600})}In({path:"/?download_url",data:{file_list:s},method:"POST"},this.config).then((e=>{const{file_list:n=[]}=e;t({fileList:n.map((e=>({fileID:An.call(this,e.file_id),tempFileURL:e.download_url})))})})).catch((e=>n(e)))}))}async connectWebSocket(e){const{name:t,query:n}=e;return $e.connectSocket({url:this._websocket.signedURL(t,n),complete:()=>{}})}requestSSE(e){const{name:t,data:n}=e;return $e.request({method:"POST",url:this._sse.signedURL(t),data:n,header:{"content-type":"application/json"},dataType:"json"})}}(e);return t.auth=function(){return{signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!0)}}},t}};function xn({data:e}){let t;t=Ge();const n=JSON.parse(JSON.stringify(e||{}));if(Object.assign(n,{clientInfo:t}),!n.uniIdToken){const{token:e}=Be();e&&(n.uniIdToken=e)}return n}const On={enable:!1,interval:0,space:{}};let Cn=null,En=0,Ln=!1;function Rn(){return Array.isArray(de)&&de.length?de[0]:{}}function Un(e){return`${e}_${Rn().spaceId||"default"}`}function Dn(){if(Cn)return Cn;try{const e=$e.getStorageSync(Un("UNICLOUD_FAILOVER_CONFIG"));if(re(e))return Cn=e,e}catch(st){}return null}function Nn(e){En=e;try{$e.setStorageSync(Un("UNICLOUD_FAILOVER_LAST_REQUEST"),e)}catch(t){}}async function Mn(){const e=Rn(),{failoverEndpoint:t}=e;if(!t)return null;if(Ln)return Dn();Ln=!0;try{const e=`${t}/.unicloud/failover-cfg.json`,r=await $e.request({url:e,method:"GET",dataType:"json",timeout:5e3});if(Nn(Date.now()),200!==r.statusCode||!re(r.data))return null;const o={...On,...r.data},{enable:i=!1,interval:a=0,space:c={}}=o,u=Dn(),l=u&&u.enable,h=(s=o,(n=u)?n.enable!==s.enable||n.interval!==s.interval||!(!s._lastModifiedAt||n._lastModifiedAt===s._lastModifiedAt)||JSON.stringify(n.space)!==JSON.stringify(s.space):s.enable);return function(e){try{Cn=e,e&&e.enable?$e.setStorageSync(Un("UNICLOUD_FAILOVER_CONFIG"),e):($e.removeStorageSync(Un("UNICLOUD_FAILOVER_CONFIG")),$e.removeStorageSync(Un("UNICLOUD_FAILOVER_LAST_REQUEST")))}catch(t){}}({enable:i,interval:a,space:c,_lastModifiedAt:r.data._lastModifiedAt||Date.now()}),h&&De(xe,{isEnabled:i,hasStatusChanged:l!==i,failoverSpace:c}),o}catch(r){return Dn()}finally{Ln=!1}var n,s}const Fn=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}];var qn=/[\\^$.*+?()[\]{}|]/g,jn=RegExp(qn.source);function $n(e,t,n){return e.replace(new RegExp((s=t)&&jn.test(s)?s.replace(qn,"\\$&"):s,"g"),n);var s}const Kn=2e4,Bn={code:20101,message:"Invalid client"};function Vn(e){const{errSubject:t,subject:n,errCode:s,errMsg:r,code:o,message:i,cause:a}=e||{};return new je({subject:t||n||"uni-secure-network",code:s||o||Kn,message:r||i,cause:a})}let Hn;function Jn({secretType:e}={}){return"request"===e||"response"===e||"both"===e}function Wn({functionName:e,result:t,logPvd:n}){}function zn(e){const t=e.callFunction,n=function(n){const s=n.name;n.data=xn.call(e,{data:n.data});const r={aliyun:"aliyun",tencent:"tcb",tcb:"tcb",alipay:"alipay",dcloud:"dcloud"}[this.config.provider],o=Jn(n)||false;return t.call(this,n).then((e=>(e.errCode=0,!o&&Wn.call(this,{functionName:s,result:e,logPvd:r}),Promise.resolve(e))),(e=>(!o&&Wn.call(this,{functionName:s,result:e,logPvd:r}),e&&e.message&&(e.message=function({message:e="",extraInfo:t={},formatter:n=[]}={}){for(let s=0;sn.provider===e&&n.spaceId===t));return s&&s.config}({provider:e,spaceId:t});if(!a||!a.accessControl||!a.accessControl.enable)return!1;const c=a.accessControl.function||{},u=Object.keys(c);if(0===u.length)return!0;const l=function(e,t){let n,s,r;for(let o=0;oe.trim())).indexOf(t)>-1&&(s=i):r=i:n=i}return n||s||r}(u,n);if(!l)return!1;if((c[l]||[]).find(((e={})=>e.appId===s&&(e.platform||"").toLowerCase()===i.toLowerCase())))return!0;throw console.error(`此应用[appId: ${s}, platform: ${i}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`),Vn(Bn)}({provider:s,spaceId:r,functionName:o})?new Hn({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(n.bind(e))(t):i(t),Object.defineProperty(a,"result",{get:()=>(console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{})}),a.then((e=>e))}}Hn=class{constructor(){throw Vn({message:"Platform web is not supported by secure network"})}};const Qn=Symbol("CLIENT_DB_INTERNAL");function Gn(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=Qn,e.inspect=null,e.__v_raw=void 0,new Proxy(e,{get(e,n,s){if("_uniClient"===n)return null;if("symbol"==typeof n)return e[n];if(n in e||"string"!=typeof n){const t=e[n];return"function"==typeof t?t.bind(e):t}return t.get(e,n,s)}})}function Yn(e){return{on:(t,n)=>{e[t]=e[t]||[],e[t].indexOf(n)>-1||e[t].push(n)},off:(t,n)=>{e[t]=e[t]||[];const s=e[t].indexOf(n);-1!==s&&e[t].splice(s,1)}}}const Xn=["db.Geo","db.command","command.aggregate"];function Zn(e,t){return Xn.indexOf(`${e}.${t}`)>-1}function es(e){switch(se(e=Ke(e))){case"array":return e.map((e=>es(e)));case"object":return e._internalType===Qn||Object.keys(e).forEach((t=>{e[t]=es(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function ts(e){return e&&e.content&&e.content.$method}class ns{constructor(e,t,n){this.content=e,this.prevStage=t||null,this.udb=null,this._database=n}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((e=>({$method:e.$method,$param:es(e.$param)})))}}toString(){return JSON.stringify(this.toJSON())}getAction(){const e=this.toJSON().$db.find((e=>"action"===e.$method));return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter((e=>"action"!==e.$method))}}get isAggregate(){let e=this;for(;e;){const t=ts(e),n=ts(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}get isCommand(){let e=this;for(;e;){if("command"===ts(e))return!0;e=e.prevStage}return!1}get isAggregateCommand(){let e=this;for(;e;){const t=ts(e),n=ts(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}getNextStageFn(e){const t=this;return function(){return ss({$method:e,$param:es(Array.from(arguments))},t,t._database)}}get count(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}get remove(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}get(){return this._send("get",Array.from(arguments))}get add(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}update(){return this._send("update",Array.from(arguments))}end(){return this._send("end",Array.from(arguments))}get set(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}_send(e,t){const n=this.getAction(),s=this.getCommand();return s.$db.push({$method:e,$param:es(t)}),this._database._callCloudFunction({action:n,command:s})}}function ss(e,t,n){return Gn(new ns(e,t,n),{get(e,t){let s="db";return e&&e.content&&(s=e.content.$method),Zn(s,t)?ss({$method:t},e,n):function(){return ss({$method:t,$param:es(Array.from(arguments))},e,n)}}})}function rs({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map((e=>({$method:e}))),{$method:t,$param:this.param}]}}toString(){return JSON.stringify(this.toJSON())}}}function os(e,t={}){return Gn(new e(t),{get:(e,t)=>Zn("db",t)?ss({$method:t},null,e):function(){return ss({$method:t,$param:es(Array.from(arguments))},null,e)}})}class is extends class{constructor({uniClient:e={},isJQL:t=!1}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e._isDefault&&(this._dbCallBacks=me("_globalUniCloudDatabaseCallback")),t||(this.auth=Yn(this._authCallBacks)),this._isJQL=t,Object.assign(this,Yn(this._dbCallBacks)),this.env=Gn({},{get:(e,t)=>({$env:t})}),this.Geo=Gn({},{get:(e,t)=>rs({path:["Geo"],method:t})}),this.serverDate=rs({path:[],method:"serverDate"}),this.RegExp=rs({path:[],method:"RegExp"})}getCloudEnv(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}_callback(e,t){const n=this._dbCallBacks;n[e]&&n[e].forEach((e=>{e(...t)}))}_callbackAuth(e,t){const n=this._authCallBacks;n[e]&&n[e].forEach((e=>{e(...t)}))}multiSend(){const e=Array.from(arguments),t=e.map((e=>{const t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}startTransaction(){throw new Error("JQL 事务仅支持在云端使用")}commit(){throw new Error("JQL 事务仅支持在云端使用")}rollback(){throw new Error("JQL 事务仅支持在云端使用")}}{_parseResult(e){return this._isJQL?e.result:e}_callCloudFunction({action:e,command:t,multiCommand:n,queryList:s}){function r(e,t){if(n&&s)for(let n=0;nSe(Ie(i,"complete"),e))).then((()=>(r(null,e),De(Te,{type:Oe,content:e}),Promise.reject(e))))}const c=Se(Ie(i,"invoke")),u=this._uniClient;return c.then((()=>u.callFunction({name:"DCloud-clientDB",type:"CLIENT_DB",data:{action:e,command:t,multiCommand:n}}))).then((e=>{const{code:t,message:n,token:s,tokenExpired:c,systemInfo:u=[]}=e.result;if(u)for(let r=0;r(console.warn(n),s)})}}return h=e,Se(Ie(i,"success"),h).then((()=>Se(Ie(i,"complete"),h))).then((()=>{r(h,null);const e=o._parseResult(h);return De(Te,{type:Oe,content:e}),Promise.resolve(e)}));var h}),(e=>(/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),a(new je({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId})))))}}const as="token无效,跳转登录页面",cs="token过期,跳转登录页面",us={TOKEN_INVALID_TOKEN_EXPIRED:cs,TOKEN_INVALID_INVALID_CLIENTID:as,TOKEN_INVALID:as,TOKEN_INVALID_WRONG_TOKEN:as,TOKEN_INVALID_ANONYMOUS_USER:as},ls={"uni-id-token-expired":cs,"uni-id-check-token-failed":as,"uni-id-token-not-exist":as,"uni-id-check-device-feature-failed":as},hs={...us,...ls,default:"用户未登录或登录状态过期,自动跳转登录页面"};function ds(e,t){let n="";return n=e?`${e}/${t}`:t,n.replace(/^\//,"")}function fs(e=[],t=""){const n=[],s=[];return e.forEach((e=>{!0===e.needLogin?n.push(ds(t,e.path)):!1===e.needLogin&&s.push(ds(t,e.path))})),{needLoginPage:n,notNeedLoginPage:s}}function ps(e){return e.split("?")[0].replace(/^\//,"")}function gs(){return function(e){let t=e&&e.$page&&e.$page.fullPath;return t?("/"!==t.charAt(0)&&(t="/"+t),t):""}(function(){const e=m();return e[e.length-1]}())}function ms(){return ps(gs())}function ys(e="",t={}){if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;const n=t.list,s=ps(e);return n.some((e=>e.pagePath===s))}const _s=!!W.uniIdRouter,{loginPage:ws,routerNeedLogin:vs,resToLogin:Ss,needLoginPage:Is,notNeedLoginPage:ks,loginPageInTabBar:As}=function({pages:e=[],subPackages:t=[],uniIdRouter:n={},tabBar:s={}}=W){const{loginPage:r,needLogin:o=[],resToLogin:i=!0}=n,{needLoginPage:a,notNeedLoginPage:c}=fs(e),{needLoginPage:u,notNeedLoginPage:l}=function(e=[]){const t=[],n=[];return e.forEach((e=>{const{root:s,pages:r=[]}=e,{needLoginPage:o,notNeedLoginPage:i}=fs(r,s);t.push(...o),n.push(...i)})),{needLoginPage:t,notNeedLoginPage:n}}(t);return{loginPage:r,routerNeedLogin:o,resToLogin:i,needLoginPage:[...a,...u],notNeedLoginPage:[...c,...l],loginPageInTabBar:ys(r,s)}}();if(Is.indexOf(ws)>-1)throw new Error(`Login page [${ws}] should not be "needLogin", please check your pages.json`);function Ts(e){const t=ms();if("/"===e.charAt(0))return e;const[n,s]=e.split("?"),r=n.replace(/^\//,"").split("/"),o=t.split("/");o.pop();for(let i=0;i-1?s+`&uniIdRedirectUrl=${encodeURIComponent(r)}`:s+`?uniIdRedirectUrl=${encodeURIComponent(r)}`:s);var s,r;As?"navigateTo"!==e&&"redirectTo"!==e||(e="switchTab"):"switchTab"===e&&(e="navigateTo");const o={navigateTo:I,redirectTo:k,switchTab:A,reLaunch:T};setTimeout((()=>{o[e]({url:n})}),0)}function Os({url:e}={}){const t={abortLoginPageJump:!1,autoToLoginPage:!1},n=function(){const{token:e,tokenExpired:t}=Be();let n;if(e){if(t-1)&&(Is.indexOf(t)>-1||vs.some((n=>bs(t,n)||bs(e,n))))}(e)&&n){if(n.uniIdRedirectUrl=e,Le(be).length>0)return setTimeout((()=>{De(be,n)}),0),t.abortLoginPageJump=!0,t;t.autoToLoginPage=!0}return t}function Cs(){const e=gs(),{abortLoginPageJump:t,autoToLoginPage:n}=Os({url:e});t||n&&xs({api:"redirectTo",redirect:e})}function Es(){Cs();const e=["navigateTo","redirectTo","reLaunch","switchTab"];for(let t=0;t{(0===m().length?(Me=!1,Ne=null,Fe()):Promise.resolve()).then((()=>{Cs()}))}))}}function Ls(){this.onResponse((e=>{const{type:t,content:n}=e;let s=!1;switch(t){case"cloudobject":s=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in hs}(n);break;case"clientdb":s=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in us}(n)}s&&function(e={}){const t=Le(be);Fe().then((()=>{const n=gs();if(n&&Ps({redirect:n}))return t.length>0?De(be,Object.assign({uniIdRedirectUrl:n},e)):void(ws&&xs({api:"navigateTo",redirect:n}))}))}(n)}))}function Rs(e){e.onNeedLogin=function(e){Re(be,e)},e.offNeedLogin=function(e){Ue(be,e)},_s&&(me("_globalUniCloudStatus").needLoginInit||(me("_globalUniCloudStatus").needLoginInit=!0,Fe().then((()=>{Es.call(e)})),Ss&&Ls.call(e)))}function Us(e){var t;(t=e).onResponse=function(e){Re(Te,e)},t.offResponse=function(e){Ue(Te,e)},Rs(e),function(e){e.onRefreshToken=function(e){Re(Pe,e)},e.offRefreshToken=function(e){Ue(Pe,e)}}(e),function(e){e.onFailover=function(e){Re(xe,e)},e.offFailover=function(e){Ue(xe,e)},e.refreshFailoverConfig=function(){return e.config,Nn(0),Mn()},e.clearFailoverConfig=function(){!function(){Cn=null,En=0;try{$e.removeStorageSync(Un("UNICLOUD_FAILOVER_CONFIG")),$e.removeStorageSync(Un("UNICLOUD_FAILOVER_LAST_REQUEST"))}catch(t){}}()}}(e)}const Ds="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ns=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Ms(){const e=Be().token||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse(function(e){return decodeURIComponent(function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Ns.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,s,r="",o=0;o>16&255):64===s?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(t[1]))}catch(s){throw new Error("获取当前用户信息出错,详细错误信息为:"+s.message)}return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}var Fs=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(z((function(n,s){Object.defineProperty(s,"__esModule",{value:!0});const r="chooseAndUploadFile:ok",o="chooseAndUploadFile:fail";function i(e,t){return e.tempFiles.forEach(((e,n)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function a(e,t,{onChooseFile:n,onUploadProgress:s}){return t.then((e=>{if(n){const t=n(e);if(void 0!==t)return Promise.resolve(t).then((t=>void 0===t?e:t))}return e})).then((t=>!1===t?{errMsg:r,tempFilePaths:[],tempFiles:[]}:function(e,t,n=5,s){(t=Object.assign({},t)).errMsg=r;const o=t.tempFiles,i=o.length;let a=0;return new Promise((r=>{for(;a=i)return void(!o.find((e=>!e.url&&!e.errMsg))&&r(t));const u=o[n];e.uploadFile({provider:u.provider,filePath:u.path,cloudPath:u.cloudPath,fileType:u.fileType,cloudPathAsRealPath:u.cloudPathAsRealPath,onUploadProgress(e){e.index=n,e.tempFile=u,e.tempFilePath=u.path,s&&s(e)}}).then((e=>{u.url=e.fileID,n{u.errMsg=e.errMsg||e.message,n{e({count:n,sizeType:s,sourceType:r,extension:a,success(e){t(i(e,"image"))},fail(e){c({errMsg:e.errMsg.replace("chooseImage:fail",o)})}})}))}(s),s):"video"===s.type?a(n,function(e){const{camera:n,compressed:s,maxDuration:r,sourceType:a=["album","camera"],extension:c}=e;return new Promise(((e,u)=>{t({camera:n,compressed:s,maxDuration:r,sourceType:a,extension:c,success(t){const{tempFilePath:n,duration:s,size:r,height:o,width:a}=t;e(i({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:r,type:t.tempFile&&t.tempFile.type||"",width:a,height:o,duration:s,fileType:"video",cloudPath:""}]},"video"))},fail(e){u({errMsg:e.errMsg.replace("chooseVideo:fail",o)})}})}))}(s),s):a(n,function(e){const{count:t,extension:n}=e;return new Promise(((e,s)=>{let r=u;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(r=wx.chooseMessageFile),"function"!=typeof r)return s({errMsg:o+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});r({type:"all",count:t,extension:n,success(t){e(i(t))},fail(e){s({errMsg:e.errMsg.replace("chooseFile:fail",o)})}})}))}(s),s)}}})));function qs(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{},mixinDatacomError:null}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((()=>{var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{if("manual"===this.loadtime)return;let n=!1;const s=[];for(let r=2;r{this.mixinDatacomLoading=!1;const{data:s,count:r}=n.result;this.getcount&&(this.mixinDatacomPage.count=r),this.mixinDatacomHasMore=s.length{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,this.mixinDatacomError=e,n&&n(e)})))},mixinDatacomGet(t={}){let n;t=t||{},n="undefined"!=typeof __uniX&&__uniX?e.databaseForJQL(this.spaceInfo):e.database(this.spaceInfo);const s=t.action||this.action;s&&(n=n.action(s));const r=t.collection||this.collection;n=Array.isArray(r)?n.collection(...r):n.collection(r);const o=t.where||this.where;o&&Object.keys(o).length&&(n=n.where(o));const i=t.field||this.field;i&&(n=n.field(i));const a=t.foreignKey||this.foreignKey;a&&(n=n.foreignKey(a));const c=t.groupby||this.groupby;c&&(n=n.groupBy(c));const u=t.groupField||this.groupField;u&&(n=n.groupField(u)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(n=n.distinct());const l=t.orderby||this.orderby;l&&(n=n.orderBy(l));const h=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,d=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,f=void 0!==t.getcount?t.getcount:this.getcount,p=void 0!==t.gettree?t.gettree:this.gettree,g=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,m={getCount:f},y={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return p&&(m.getTree=y),g&&(m.getTreePath=y),n=n.skip(d*(h-1)).limit(d).get(m),n}}}}function js(e){return me("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}async function $s({openid:e,callLoginByWeixin:t=!1}={}){throw js(this),new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `web`")}async function Ks(e){const t=js(this);return t.initPromise||(t.initPromise=$s.call(this,e).then((e=>e)).catch((e=>{throw delete t.initPromise,e}))),t.initPromise}function Bs(e){Qe=e}function Vs(e){const t={getAppBaseInfo:w,getPushClientId:v};return function(n){return new Promise(((s,r)=>{t[e]({...n,success(e){s(e)},fail(e){r(e)}})}))}}class Hs extends class{constructor(){this._callback={}}addListener(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}on(e,t){return this.addListener(e,t)}removeListener(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');const n=this._callback[e];if(!n)return;const s=function(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]===t)return n;return-1}(n,t);n.splice(s,1)}off(e,t){return this.removeListener(e,t)}removeAllListener(e){delete this._callback[e]}emit(e,...t){const n=this._callback[e];if(n)for(let s=0;s{if(!e)throw new Error("Invalid appId, please check the manifest.json file");if(!t)throw new Error("Invalid push client id");this._appId=e,this._pushClientId=t,this._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),this.emit("open"),this._initMessageListener()}),(e=>{throw this.emit("error",e),this.close(),e}))}async open(){return this.init()}_isUniCloudSSE(e){if("receive"!==e.type)return!1;const t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}_receivePushMessage(e){if(!this._isUniCloudSSE(e))return;const t=e&&e.data&&e.data.payload,{action:n,messageId:s,message:r}=t;this._payloadQueue.push({action:n,messageId:s,message:r}),this._consumMessage()}_consumMessage(){for(;;){const e=this._payloadQueue.find((e=>e.messageId===this._currentMessageId+1));if(!e)break;this._currentMessageId++,this._parseMessagePayload(e)}}_parseMessagePayload(e){const{action:t,messageId:n,message:s}=e;"end"===t?this._end({messageId:n,message:s}):"message"===t&&this._appendMessage({messageId:n,message:s})}_appendMessage({messageId:e,message:t}={}){this.emit("message",t)}_end({messageId:e,message:t}={}){this.emit("end",t),this.close()}_initMessageListener(){p(this._uniPushMessageCallback)}_destroy(){g(this._uniPushMessageCallback)}toJSON(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}close(){this._destroy(),this.emit("close")}}const Js={tcb:pn,tencent:pn,aliyun:et,private:yn,dcloud:yn,alipay:Pn};let Ws=new class{init(e){let t={};const n=Js[e.provider];if(!n)throw new Error("未提供正确的provider参数");var s;return t=n.init(e),function(e){e._initPromiseHub||(e._initPromiseHub=new ue({createPromise:function(){let t=Promise.resolve();t=new Promise((e=>{setTimeout((()=>{e()}),1)}));const n=e.auth();return t.then((()=>n.getLoginState())).then((e=>e?Promise.resolve():n.signInAnonymously()))}}))}(t),zn(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),(s=t).database=function(e){if(e&&Object.keys(e).length>0)return s.init(e).database();if(this._database)return this._database;const t=os(is,{uniClient:s});return this._database=t,t},s.databaseForJQL=function(e){if(e&&Object.keys(e).length>0)return s.init(e).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;const t=os(is,{uniClient:s,isJQL:!0});return this._databaseForJQL=t,t},function(e){e.getCurrentUserInfo=Ms,e.chooseAndUploadFile=Fs.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return qs(e)}}),e.SSEChannel=Hs,e.initSecureNetworkByWeixin=function(e){return function({openid:t,callLoginByWeixin:n=!1}={}){return Ks.call(e,{openid:t,callLoginByWeixin:n})}}(e),e.setCustomClientInfo=Bs,e.importObject=function(t){return function(n,s={}){s=function(e,t={}){return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},s);const{customUI:r,loadingOptions:o,errorOptions:i,parseSystemError:a}=s,c=!r;return new Proxy({},{get(r,u){switch(u){case"toString":return"[object UniCloudObject]";case"toJSON":return{}}return function({fn:e,interceptorName:t,getCallbackArgs:n}={}){return async function(...s){const r=n?n({params:s}):{};let o,i;try{return await Se(Ie(t,"invoke"),{...r}),o=await e(...s),await Se(Ie(t,"success"),{...r,result:o}),o}catch(a){throw i=a,await Se(Ie(t,"fail"),{...r,error:i}),i}finally{await Se(Ie(t,"complete"),i?{...r,error:i}:{...r,result:o})}}}({fn:async function r(...p){let g;c&&l({title:o.title,mask:o.mask});const m={name:n,type:"OBJECT",data:{method:u,params:p}};"object"==typeof s.secretMethods&&function(e,t){const n=t.data.method,s=e.secretMethods||{},r=s[n]||s["*"];r&&(t.secretType=r)}(s,m);let y=!1;try{g=await t.callFunction(m)}catch(e){y=!0,g={result:new je(e)}}const{errSubject:_,errCode:w,errMsg:v,newToken:S}=g.result||{};if(c&&h(),S&&S.token&&S.tokenExpired&&(Ve(S),De(Pe,{...S})),w){let e=v;if(y&&a&&(e=(await a({objectName:n,methodName:u,params:p,errSubject:_,errCode:w,errMsg:v})).errMsg||v),c)if("toast"===i.type)d({title:e,icon:"none"});else{if("modal"!==i.type)throw new Error(`Invalid errorOptions.type: ${i.type}`);{const{confirm:t}=await async function({title:e,content:t,showCancel:n,cancelText:s,confirmText:r}={}){return new Promise(((o,i)=>{f({title:e,content:t,showCancel:n,cancelText:s,confirmText:r,success(e){o(e)},fail(){o({confirm:!1,cancel:!0})}})}))}({title:"提示",content:e,showCancel:i.retry,cancelText:"取消",confirmText:i.retry?"重试":"确定"});if(i.retry&&t)return r(...p)}}const t=new je({subject:_,code:w,message:v,requestId:g.requestId});throw t.detail=g.result,De(Te,{type:Ee,content:t}),t}return De(Te,{type:Ee,content:g.result}),g.result},interceptorName:"callObject",getCallbackArgs:function({params:e}={}){return{objectName:n,methodName:u,params:e}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((e=>{if(!t[e])return;const n=t[e];t[e]=function(){return n.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(n){let s=!1;if("callFunction"===t){const e=n&&n.type||ee;s=e!==ee}const r="callFunction"===t&&!s,o=this._initPromiseHub.exec();n=n||{};const{success:i,fail:a,complete:c}=qe(n),u=o.then((()=>s?Promise.resolve():Se(Ie(t,"invoke"),n))).then((()=>e.call(this,n))).then((e=>s?Promise.resolve(e):Se(Ie(t,"success"),e).then((()=>Se(Ie(t,"complete"),e))).then((()=>(r&&De(Te,{type:Ce,content:e}),Promise.resolve(e))))),(e=>s?Promise.reject(e):Se(Ie(t,"fail"),e).then((()=>Se(Ie(t,"complete"),e))).then((()=>(De(Te,{type:Ce,content:e}),Promise.reject(e))))));if(!(i||a||c))return u;u.then((e=>{i&&i(e),c&&c(e),r&&De(Te,{type:Ce,content:e})}),(e=>{a&&a(e),c&&c(e),r&&De(Te,{type:Ce,content:e})}))}}(t[e],e).bind(t)})),t.init=this.init,t}};(()=>{const e=Array.isArray(de)?de.length:0,t=function(){const e=Rn(),t=Dn();return t&&t.enable&&re(t.space)?t.space:e}();if(1===e)Ws=Ws.init(t),Ws._isDefault=!0;else{const t=["database","getCurrentUserInfo","importObject"];let n;n=e>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile",...t].forEach((e=>{Ws[e]=function(){if(console.error(n),-1===t.indexOf(e))return Promise.reject(new je({code:"SYS_ERR",message:n}));console.error(n)}}))}Object.assign(Ws,{get mixinDatacom(){return qs(Ws)}}),Us(Ws),Ws.addInterceptor=we,Ws.removeInterceptor=ve,Ws.interceptObject=ke;{const e=pe||(pe=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;function e(){return this}return void 0!==e()?e():new Function("return this")()}(),pe);e.uniCloud=Ws,e.UniCloudError=je}!function(){const{failoverEndpoint:e}=Rn();if(!e)return;Mn().catch((e=>{console.error("请求故障切换配置失败:",e)}));const t={fail(){const t=Dn();(function(t){if(null===t||t<0)return!1;if(0===t)return!0;const n=function(){if(En)return En;try{const e=$e.getStorageSync(Un("UNICLOUD_FAILOVER_LAST_REQUEST"));if(e&&"number"==typeof e)return En=e,e}catch(e){}return 0}();return!n||Date.now()-n>=t})(t&&t.interval||0)&&Mn().catch((e=>{console.error("请求故障切换配置失败:",e)}))}};we("callFunction",t),we("database",t),we("uploadFile",t)}()})();const zs=J({name:"uni-data-select",mixins:[Ws.mixinDatacom||{}],props:{localdata:{type:Array,default:()=>[]},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},label:{type:String,default:""},placeholder:{type:String,default:"请选择"},emptyTips:{type:String,default:"无选项"},clear:{type:Boolean,default:!0},defItem:{type:Number,default:0},disabled:{type:Boolean,default:!1},format:{type:String,default:""},placement:{type:String,default:"bottom"}},data:()=>({showSelector:!1,current:"",mixinDatacomResData:[],apps:[],channels:[],cacheKey:"uni-data-select-lastSelectedValue"}),created(){this.debounceGet=this.debounce((()=>{this.query()}),300),this.collection&&!this.localdata.length&&this.debounceGet()},computed:{typePlaceholder(){const e=this.placeholder,t={"opendb-stat-app-versions":"版本","opendb-app-channels":"渠道","opendb-app-list":"应用"}[this.collection];return t?e+t:e},valueCom(){return this.modelValue},textShow(){let e=this.current;return e.length>10?e.slice(0,25)+"...":e},getOffsetByPlacement(){switch(this.placement){case"top":return"bottom:calc(100% + 12px);";case"bottom":return"top:calc(100% + 12px);"}}},watch:{localdata:{immediate:!0,handler(e,t){Array.isArray(e)&&t!==e&&(this.mixinDatacomResData=e)}},valueCom(e,t){this.initDefVal()},mixinDatacomResData:{immediate:!0,handler(e){e.length&&this.initDefVal()}}},methods:{debounce(e,t=100){let n=null;return function(...s){n&&clearTimeout(n),n=setTimeout((()=>{e.apply(this,s)}),t)}},query(){this.mixinDatacomEasyGet()},onMixinDatacomPropsChange(){this.collection&&this.debounceGet()},initDefVal(){let e="";if(!this.valueCom&&0!==this.valueCom||this.isDisabled(this.valueCom)){let t;if(this.collection&&(t=this.getCache()),t||0===t)e=t;else{let t="";this.defItem>0&&this.defItem<=this.mixinDatacomResData.length&&(t=this.mixinDatacomResData[this.defItem-1].value),e=t}(e||0===e)&&this.emit(e)}else e=this.valueCom;const t=this.mixinDatacomResData.find((t=>t.value===e));this.current=t?this.formatItemName(t):""},isDisabled(e){let t=!1;return this.mixinDatacomResData.forEach((n=>{n.value===e&&(t=n.disable)})),t},clearVal(){this.emit(""),this.collection&&this.removeCache()},change(e){e.disable||(this.showSelector=!1,this.current=this.formatItemName(e),this.emit(e.value))},emit(e){this.$emit("input",e),this.$emit("update:modelValue",e),this.$emit("change",e),this.collection&&this.setCache(e)},toggleSelector(){this.disabled||(this.showSelector=!this.showSelector)},formatItemName(e){let{text:t,value:n,channel_code:s}=e;if(s=s?`(${s})`:"",this.format){let t="";t=this.format;for(let n in e)t=t.replace(new RegExp(`{${n}}`,"g"),e[n]);return t}return this.collection.indexOf("app-list")>0?`${t}(${n})`:t||`未命名${s}`},getLoadData(){return this.mixinDatacomResData},getCurrentCacheKey(){return this.collection},getCache(e=this.getCurrentCacheKey()){return(o(this.cacheKey)||{})[e]},setCache(e,t=this.getCurrentCacheKey()){let n=o(this.cacheKey)||{};n[t]=e,r(this.cacheKey,n)},removeCache(e=this.getCurrentCacheKey()){let t=o(this.cacheKey)||{};delete t[e],r(this.cacheKey,t)}}},[["render",function(e,t,n,s,r,o){const i=$,a=V(P("uni-icons"),H),c=K,u=B;return x(),O(i,{class:"uni-stat__select"},{default:C((()=>[n.label?(x(),E("span",{key:0,class:"uni-label-text hide-on-phone"},L(n.label+":"),1)):R("",!0),U(i,{class:D(["uni-stat-box",{"uni-stat__actived":r.current}])},{default:C((()=>[U(i,{class:D(["uni-select",{"uni-select--disabled":n.disabled}])},{default:C((()=>[U(i,{class:"uni-select__input-box",onClick:o.toggleSelector},{default:C((()=>[r.current?(x(),O(i,{key:0,class:"uni-select__input-text"},{default:C((()=>[N(L(o.textShow),1)])),_:1})):(x(),O(i,{key:1,class:"uni-select__input-text uni-select__input-placeholder"},{default:C((()=>[N(L(o.typePlaceholder),1)])),_:1})),r.current&&n.clear&&!n.disabled?(x(),O(i,{key:2,onClick:M(o.clearVal,["stop"])},{default:C((()=>[U(a,{type:"clear",color:"#c0c4cc",size:"24"})])),_:1},8,["onClick"])):(x(),O(i,{key:3},{default:C((()=>[U(a,{type:r.showSelector?"top":"bottom",size:"14",color:"#999"},null,8,["type"])])),_:1}))])),_:1},8,["onClick"]),r.showSelector?(x(),O(i,{key:0,class:"uni-select--mask",onClick:o.toggleSelector},null,8,["onClick"])):R("",!0),r.showSelector?(x(),O(i,{key:1,class:"uni-select__selector",style:F(o.getOffsetByPlacement)},{default:C((()=>[U(i,{class:D("bottom"==n.placement?"uni-popper__arrow_bottom":"uni-popper__arrow_top")},null,8,["class"]),U(u,{"scroll-y":"true",class:"uni-select__selector-scroll"},{default:C((()=>[0===r.mixinDatacomResData.length?(x(),O(i,{key:0,class:"uni-select__selector-empty"},{default:C((()=>[U(c,null,{default:C((()=>[N(L(n.emptyTips),1)])),_:1})])),_:1})):(x(!0),E(q,{key:1},j(r.mixinDatacomResData,((e,t)=>(x(),O(i,{class:"uni-select__selector-item",key:t,onClick:t=>o.change(e)},{default:C((()=>[U(c,{class:D({"uni-select__selector__disabled":e.disable})},{default:C((()=>[N(L(o.formatItemName(e)),1)])),_:2},1032,["class"])])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1},8,["style"])):R("",!0)])),_:1},8,["class"])])),_:1},8,["class"])])),_:1})}],["__scopeId","data-v-fe4b6be6"]]);export{zs as _}; diff --git a/app/assets/public/wechat_1.0.6/assets/uni.6c77786a.css b/app/assets/public/wechat_1.0.6/assets/uni.6c77786a.css new file mode 100644 index 0000000..eb34939 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/uni.6c77786a.css @@ -0,0 +1 @@ +uni-button{position:relative;display:block;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;box-sizing:border-box;font-size:18px;text-align:center;text-decoration:none;line-height:2.55555556;border-radius:5px;-webkit-tap-highlight-color:transparent;overflow:hidden;color:#000;background-color:#f8f8f8;cursor:pointer}uni-button[hidden]{display:none!important}uni-button:after{content:" ";width:200%;height:200%;position:absolute;top:0;left:0;border:1px solid rgba(0,0,0,.2);transform:scale(.5);transform-origin:0 0;box-sizing:border-box;border-radius:10px}uni-button[native]{padding-left:0;padding-right:0}uni-button[native] .uni-button-cover-view-wrapper{border:inherit;border-color:inherit;border-radius:inherit;background-color:inherit}uni-button[native] .uni-button-cover-view-inner{padding-left:14px;padding-right:14px}uni-button uni-cover-view{line-height:inherit;white-space:inherit}uni-button[type=default]{color:#000;background-color:#f8f8f8}uni-button[type=primary]{color:#fff;background-color:#007aff}uni-button[type=warn]{color:#fff;background-color:#e64340}uni-button[disabled]{color:rgba(255,255,255,.6);cursor:not-allowed}uni-button[disabled][type=default],uni-button[disabled]:not([type]){color:rgba(0,0,0,.3);background-color:#f7f7f7}uni-button[disabled][type=primary]{background-color:rgba(0,122,255,.6)}uni-button[disabled][type=warn]{background-color:#ec8b89}uni-button[type=primary][plain]{color:#007aff;border:1px solid #007aff;background-color:transparent}uni-button[type=primary][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=primary][plain]:after{border-width:0}uni-button[type=default][plain]{color:#353535;border:1px solid #353535;background-color:transparent}uni-button[type=default][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=default][plain]:after{border-width:0}uni-button[plain]{color:#353535;border:1px solid #353535;background-color:transparent}uni-button[plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[plain]:after{border-width:0}uni-button[plain][native] .uni-button-cover-view-inner{padding:0}uni-button[type=warn][plain]{color:#e64340;border:1px solid #e64340;background-color:transparent}uni-button[type=warn][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=warn][plain]:after{border-width:0}uni-button[size=mini]{display:inline-block;line-height:2.3;font-size:13px;padding:0 1.34em}uni-button[size=mini][native]{padding:0}uni-button[size=mini][native] .uni-button-cover-view-inner{padding:0 1.34em}uni-button[loading]:not([disabled]){cursor:progress}uni-button[loading]:before{content:" ";display:inline-block;width:18px;height:18px;vertical-align:middle;animation:uni-loading 1s steps(12,end) infinite;background-size:100%}uni-button[loading][type=primary]{color:rgba(255,255,255,.6);background-color:#0062cc}uni-button[loading][type=primary][plain]{color:#007aff;background-color:transparent}uni-button[loading][type=default]{color:rgba(0,0,0,.6);background-color:#dedede}uni-button[loading][type=default][plain]{color:#353535;background-color:transparent}uni-button[loading][type=warn]{color:rgba(255,255,255,.6);background-color:#ce3c39}uni-button[loading][type=warn][plain]{color:#e64340;background-color:transparent}uni-button[loading][native]:before{content:none}.button-hover{color:rgba(0,0,0,.6);background-color:#dedede}.button-hover[plain]{color:rgba(53,53,53,.6);border-color:rgba(53,53,53,.6);background-color:transparent}.button-hover[type=primary]{color:rgba(255,255,255,.6);background-color:#0062cc}.button-hover[type=primary][plain]{color:rgba(0,122,255,.6);border-color:rgba(0,122,255,.6);background-color:transparent}.button-hover[type=default]{color:rgba(0,0,0,.6);background-color:#dedede}.button-hover[type=default][plain]{color:rgba(53,53,53,.6);border-color:rgba(53,53,53,.6);background-color:transparent}.button-hover[type=warn]{color:rgba(255,255,255,.6);background-color:#ce3c39}.button-hover[type=warn][plain]{color:rgba(230,67,64,.6);border-color:rgba(230,67,64,.6);background-color:transparent}uni-checkbox-group[hidden]{display:none}uni-checkbox{-webkit-tap-highlight-color:transparent;display:inline-block;cursor:pointer}uni-checkbox[hidden]{display:none}uni-checkbox[disabled]{cursor:not-allowed}.uni-checkbox-wrapper{display:inline-flex;align-items:center;vertical-align:middle}.uni-checkbox-input{margin-right:5px;-webkit-appearance:none;appearance:none;outline:0;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:22px;height:22px;position:relative}.uni-checkbox-input svg{color:#007aff;font-size:22px;position:absolute;top:50%;left:50%;transform:translate(-50%,-48%) scale(.73)}@media (hover: hover){uni-checkbox:not([disabled]) .uni-checkbox-input:hover{border-color:var(--HOVER-BD-COLOR, #007aff)!important}}.uni-checkbox-input.uni-checkbox-input-disabled{background-color:#e1e1e1}.uni-checkbox-input.uni-checkbox-input-disabled:before{color:#adadad}uni-checkbox-group{display:block}uni-image{width:320px;height:240px;display:inline-block;overflow:hidden;position:relative}uni-image[hidden]{display:none}uni-image>div{width:100%;height:100%;background-repeat:no-repeat}uni-image>img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}uni-image>.uni-image-will-change{will-change:transform}uni-input{display:block;font-size:16px;line-height:1.4em;height:1.4em;min-height:1.4em;overflow:hidden}uni-input[hidden]{display:none}.uni-input-wrapper,.uni-input-placeholder,.uni-input-form,.uni-input-input{outline:none;border:none;padding:0;margin:0;text-decoration:inherit}.uni-input-wrapper,.uni-input-form{display:flex;position:relative;width:100%;height:100%;flex-direction:column;justify-content:center}.uni-input-placeholder,.uni-input-input{width:100%}.uni-input-placeholder{position:absolute;top:auto!important;left:0;color:gray;overflow:hidden;text-overflow:clip;white-space:pre;word-break:keep-all;pointer-events:none;line-height:inherit}.uni-input-input{position:relative;display:block;height:100%;background:none;color:inherit;opacity:1;font:inherit;line-height:inherit;letter-spacing:inherit;text-align:inherit;text-indent:inherit;text-transform:inherit;text-shadow:inherit}.uni-input-input[type=search]::-webkit-search-cancel-button,.uni-input-input[type=search]::-webkit-search-decoration{display:none}.uni-input-input::-webkit-outer-spin-button,.uni-input-input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}.uni-input-input[type=number]{-moz-appearance:textfield}.uni-input-input:disabled{-webkit-text-fill-color:currentcolor}.uni-label-pointer{cursor:pointer}uni-movable-area{display:block;position:relative;width:10px;height:10px}uni-movable-area[hidden]{display:none}uni-movable-view{display:inline-block;width:10px;height:10px;top:0;left:0;position:absolute;cursor:grab}uni-movable-view[hidden]{display:none}uni-picker-view-column{flex:1;position:relative;height:100%;overflow:hidden}uni-picker-view-column[hidden]{display:none}.uni-picker-view-group{height:100%;overflow:hidden}.uni-picker-view-mask{transform:translateZ(0)}.uni-picker-view-indicator,.uni-picker-view-mask{position:absolute;left:0;width:100%;z-index:3;pointer-events:none}.uni-picker-view-mask{top:0;height:100%;margin:0 auto;background-image:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.6)),linear-gradient(0deg,rgba(255,255,255,.95),rgba(255,255,255,.6));background-position:top,bottom;background-size:100% 102px;background-repeat:no-repeat;transform:translateZ(0)}.uni-picker-view-indicator{height:34px;top:50%;transform:translateY(-50%)}.uni-picker-view-content{position:absolute;top:0;left:0;width:100%;will-change:transform;padding:102px 0;cursor:pointer}.uni-picker-view-content>*{height:var(--picker-view-column-indicator-height);overflow:hidden}.uni-picker-view-indicator:before{top:0;border-top:1px solid #e5e5e5;transform-origin:0 0;transform:scaleY(.5)}.uni-picker-view-indicator:after{bottom:0;border-bottom:1px solid #e5e5e5;transform-origin:0 100%;transform:scaleY(.5)}.uni-picker-view-indicator:after,.uni-picker-view-indicator:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}uni-picker-view{display:block}.uni-picker-view-wrapper{display:flex;position:relative;overflow:hidden;height:100%}uni-picker-view[hidden]{display:none}.uni-scroll-view-refresher{position:relative;overflow:hidden;flex-shrink:0}.uni-scroll-view-refresher-container{position:absolute;width:100%;bottom:0;display:flex;flex-direction:column-reverse}.uni-scroll-view-refresh{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:row;justify-content:center;align-items:center}.uni-scroll-view-refresh-inner{display:flex;align-items:center;justify-content:center;line-height:0;width:40px;height:40px;border-radius:50%;background-color:#fff;box-shadow:0 1px 6px rgba(0,0,0,.118),0 1px 4px rgba(0,0,0,.118)}.uni-scroll-view-refresh__spinner{transform-origin:center center;animation:uni-scroll-view-refresh-rotate 2s linear infinite}.uni-scroll-view-refresh__spinner>circle{stroke:currentColor;stroke-linecap:round;animation:uni-scroll-view-refresh-dash 2s linear infinite}@keyframes uni-scroll-view-refresh-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes uni-scroll-view-refresh-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes once-show{0%{top:0}}uni-resize-sensor,uni-resize-sensor>div{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden}uni-resize-sensor{display:block;z-index:-1;visibility:hidden;animation:once-show 1ms}uni-resize-sensor>div>div{position:absolute;left:0;top:0}uni-resize-sensor>div:first-child>div{width:100000px;height:100000px}uni-resize-sensor>div:last-child>div{width:200%;height:200%}uni-scroll-view{display:block;width:100%}uni-scroll-view[hidden]{display:none}.uni-scroll-view{position:relative;-webkit-overflow-scrolling:touch;width:100%;height:100%;max-height:inherit}.uni-scroll-view-scrollbar-hidden::-webkit-scrollbar{display:none}.uni-scroll-view-scrollbar-hidden{-moz-scrollbars:none;scrollbar-width:none}.uni-scroll-view-content{width:100%;height:100%}uni-swiper-item{display:block;overflow:hidden;will-change:transform;position:absolute;width:100%;height:100%;cursor:grab}uni-swiper-item[hidden]{display:none}uni-swiper{display:block;height:150px}uni-swiper[hidden]{display:none}.uni-swiper-wrapper{overflow:hidden;position:relative;width:100%;height:100%;transform:translateZ(0)}.uni-swiper-slides{position:absolute;left:0;top:0;right:0;bottom:0}.uni-swiper-slide-frame{position:absolute;left:0;top:0;width:100%;height:100%;will-change:transform}.uni-swiper-dots{position:absolute;font-size:0}.uni-swiper-dots-horizontal{left:50%;bottom:10px;text-align:center;white-space:nowrap;transform:translate(-50%)}.uni-swiper-dots-horizontal .uni-swiper-dot{margin-right:8px}.uni-swiper-dots-horizontal .uni-swiper-dot:last-child{margin-right:0}.uni-swiper-dots-vertical{right:10px;top:50%;text-align:right;transform:translateY(-50%)}.uni-swiper-dots-vertical .uni-swiper-dot{display:block;margin-bottom:9px}.uni-swiper-dots-vertical .uni-swiper-dot:last-child{margin-bottom:0}.uni-swiper-dot{display:inline-block;width:8px;height:8px;cursor:pointer;transition-property:background-color;transition-timing-function:ease;background:rgba(0,0,0,.3);border-radius:50%}.uni-swiper-dot-active{background-color:#000}.uni-swiper-navigation{width:26px;height:26px;cursor:pointer;position:absolute;top:50%;margin-top:-13px;display:flex;align-items:center;transition:all .2s;border-radius:50%;opacity:1}.uni-swiper-navigation-disabled{opacity:.35;cursor:not-allowed}.uni-swiper-navigation-hide{opacity:0;cursor:auto;pointer-events:none}.uni-swiper-navigation-prev{left:10px}.uni-swiper-navigation-prev svg{margin-left:-1px;left:10px}.uni-swiper-navigation-prev.uni-swiper-navigation-vertical{top:18px;left:50%;margin-left:-13px}.uni-swiper-navigation-prev.uni-swiper-navigation-vertical svg{transform:rotate(90deg);margin-left:auto;margin-top:-2px}.uni-swiper-navigation-next{right:10px}.uni-swiper-navigation-next svg{transform:rotate(180deg)}.uni-swiper-navigation-next.uni-swiper-navigation-vertical{top:auto;bottom:5px;left:50%;margin-left:-13px}.uni-swiper-navigation-next.uni-swiper-navigation-vertical svg{margin-top:2px;transform:rotate(270deg)}uni-text[selectable]{cursor:auto;-webkit-user-select:text;user-select:text}uni-text{white-space:pre-line}uni-textarea{width:300px;height:150px;display:block;position:relative;font-size:16px;line-height:normal;white-space:pre-wrap;word-break:break-all}uni-textarea[hidden]{display:none}uni-textarea[auto-height=true]{height:fit-content!important}.uni-textarea-wrapper,.uni-textarea-placeholder,.uni-textarea-line,.uni-textarea-compute,.uni-textarea-textarea{outline:none;border:none;padding:0;margin:0;text-decoration:inherit}.uni-textarea-wrapper{display:block;position:relative;width:100%;height:100%;min-height:inherit;overflow-y:hidden}.uni-textarea-placeholder,.uni-textarea-line,.uni-textarea-compute,.uni-textarea-textarea{position:absolute;width:100%;height:100%;left:0;top:0;white-space:inherit;word-break:inherit}.uni-textarea-placeholder{color:gray;overflow:hidden}.uni-textarea-line,.uni-textarea-compute{visibility:hidden;height:auto}.uni-textarea-line{width:1em}.uni-textarea-compute-auto-height{overflow-wrap:break-word}.uni-textarea-textarea{resize:none;background:none;color:inherit;opacity:1;font:inherit;line-height:inherit;letter-spacing:inherit;text-align:inherit;text-indent:inherit;text-transform:inherit;text-shadow:inherit}.uni-textarea-textarea-fix-margin{width:auto;right:0;margin:0 -3px}.uni-textarea-textarea:disabled{-webkit-text-fill-color:currentcolor}uni-view{display:block}uni-view[hidden]{display:none}uni-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;display:block;box-sizing:border-box}.uni-modal{position:fixed;z-index:999;width:80%;max-width:300px;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#fff;text-align:center;border-radius:3px;overflow:hidden}.uni-modal *{box-sizing:border-box}.uni-modal__hd{padding:1em 1.6em .3em}.uni-modal__title{font-weight:400;font-size:18px;word-wrap:break-word;word-break:break-all;white-space:pre-wrap;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.uni-modal__bd{padding:1.3em 1.6em;min-height:40px;font-size:15px;line-height:1.4;word-wrap:break-word;word-break:break-all;white-space:pre-wrap;color:#999;max-height:400px;overflow-x:hidden;overflow-y:auto}.uni-modal__textarea{resize:none;border:0;margin:0;width:90%;padding:10px;font-size:20px;outline:none;border:none;background-color:#eee;text-decoration:inherit;line-height:1.2}.uni-modal__ft{position:relative;line-height:48px;font-size:18px;display:flex}.uni-modal__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #d5d5d6;color:#d5d5d6;transform-origin:0 0;transform:scaleY(.5)}.uni-modal__btn{display:block;flex:1;color:#3cc51f;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;cursor:pointer}.uni-modal__btn:active{background-color:#eee}.uni-modal__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #d5d5d6;color:#d5d5d6;transform-origin:0 0;transform:scaleX(.5)}.uni-modal__btn:first-child:after{display:none}.uni-modal__btn_default{color:#353535}.uni-modal__btn_primary{color:#007aff}uni-toast{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;display:block;box-sizing:border-box;pointer-events:none;font-size:16px}.uni-sample-toast{position:fixed;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;max-width:80%}.uni-simple-toast__text{display:inline-block;vertical-align:middle;color:#fff;background-color:rgba(17,17,17,.7);padding:10px 20px;border-radius:5px;font-size:13px;text-align:center;max-width:100%;word-break:break-word;white-space:normal}uni-toast .uni-mask{pointer-events:auto}.uni-toast{position:fixed;z-index:999;width:8em;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(17,17,17,.7);text-align:center;border-radius:5px;color:#fff}.uni-toast *{box-sizing:border-box}.uni-toast__icon{margin:20px 0 0;width:38px!important;height:38px!important;vertical-align:baseline!important}.uni-icon_toast{margin:15px 0 0}.uni-icon_toast.uni-icon-success-no-circle:before{color:#fff;font-size:55px}.uni-icon_toast.uni-loading{margin:20px 0 0;width:38px;height:38px;vertical-align:baseline}.uni-toast__content{margin:0 0 15px}uni-picker{position:relative;display:block;cursor:pointer}uni-picker[hidden]{display:none}uni-picker[disabled]{cursor:not-allowed}.uni-picker-container{display:none;position:fixed;left:0;right:0;top:0;bottom:0;box-sizing:border-box;z-index:999;font-size:16px}.uni-picker-container .uni-picker-custom *{box-sizing:border-box}.uni-picker-container .uni-picker-custom{position:fixed;left:0;bottom:0;transform:translateY(100%);backface-visibility:hidden;z-index:999;width:100%;background-color:#fff;visibility:hidden;transition:transform .3s,visibility .3s}.uni-picker-container .uni-picker-custom.uni-picker-toggle{visibility:visible;transform:translate(0)}.uni-picker-container .uni-picker-content{position:relative;display:block;width:100%;height:238px;background-color:#fff}.uni-picker-container .uni-picker-item{padding:0;height:34px;line-height:34px;text-align:center;color:#000;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;cursor:pointer}.uni-picker-container .uni-picker-header{display:block;position:relative;text-align:center;width:100%;height:45px}.uni-picker-container .uni-picker-header:after{content:"";position:absolute;left:0;bottom:0;right:0;height:1px;clear:both;border-bottom:1px solid #e5e5e5;color:#e5e5e5;transform-origin:0 100%;transform:scaleY(.5)}.uni-picker-container .uni-picker-action{display:block;max-width:50%;top:0;height:100%;box-sizing:border-box;padding:0 14px;font-size:17px;line-height:45px;overflow:hidden;cursor:pointer}.uni-picker-container .uni-picker-action.uni-picker-action-cancel{float:left;color:#888}.uni-picker-container .uni-picker-action.uni-picker-action-confirm{float:right;color:#007aff}.uni-picker-container .uni-picker-select{display:none}.uni-picker-system{position:absolute;display:none;display:block;top:0;left:0;width:100%;height:100%;overflow:hidden}.uni-picker-system>.uni-picker-system_input{position:absolute;border:none;height:100%;opacity:0;cursor:pointer}.uni-picker-system>.uni-picker-system_input.firefox{top:0;left:0;width:100%}.uni-picker-system>.uni-picker-system_input.chrome{top:0;left:0;width:2em;font-size:32px;height:32px}@media screen and (min-width: 500px) and (min-height: 500px){.uni-mask.uni-picker-mask{background:none}.uni-picker-container .uni-picker-custom{width:300px!important;left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);opacity:0;border-radius:5px;transition:opacity .3s,visibility .3s;box-shadow:0 0 20px 5px rgba(0,0,0,.3)}.uni-picker-container .uni-picker-header{border-radius:5px 5px 0 0}.uni-picker-container .uni-picker-content{transform:translate(0 0);overflow:hidden;border-radius:0 0 5px 5px}.uni-picker-container .uni-picker-custom.uni-picker-toggle{opacity:1;transform:translate(-50%,-50%)}.uni-selector-select .uni-picker-header,.uni-selector-select .uni-picker-content{display:none}.uni-selector-select .uni-picker-select{display:block;max-height:300px;overflow:auto;background-color:#fff;border-radius:5px;padding:6px 0}.uni-selector-select .uni-picker-item{padding:0 10px;color:#555}.uni-selector-select .uni-picker-item:hover{background-color:#f6f6f6}.uni-selector-select .uni-picker-item.selected{color:#007aff}} diff --git a/app/assets/public/wechat_1.0.6/assets/uniicons-DN59BOw4.ttf b/app/assets/public/wechat_1.0.6/assets/uniicons-DN59BOw4.ttf new file mode 100644 index 0000000..14696d0 Binary files /dev/null and b/app/assets/public/wechat_1.0.6/assets/uniicons-DN59BOw4.ttf differ diff --git a/app/assets/public/wechat_1.0.6/assets/user.Bm-2eyfO.js b/app/assets/public/wechat_1.0.6/assets/user.Bm-2eyfO.js new file mode 100644 index 0000000..cc11d87 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/assets/user.Bm-2eyfO.js @@ -0,0 +1 @@ +import{g as e,W as s,q as a}from"./index-B8U-SFxP.js";const r={getUserdata:()=>e("user"),clearUserdata(){s("user")},setUserdata(e){a("user",e)},setToken(e){a("Token",e)},getToken:()=>e("Token")};export{r as u}; diff --git a/app/assets/public/wechat_1.0.6/index.html b/app/assets/public/wechat_1.0.6/index.html new file mode 100644 index 0000000..762b557 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/index.html @@ -0,0 +1,23 @@ + + + + + + + + wechatPlug + + + + + + +
+ + diff --git a/app/assets/public/wechat_1.0.6/static/ifont/demo.css b/app/assets/public/wechat_1.0.6/static/ifont/demo.css new file mode 100644 index 0000000..a67054a --- /dev/null +++ b/app/assets/public/wechat_1.0.6/static/ifont/demo.css @@ -0,0 +1,539 @@ +/* Logo 字体 */ +@font-face { + font-family: "iconfont logo"; + src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); + src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); +} + +.logo { + font-family: "iconfont logo"; + font-size: 160px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* tabs */ +.nav-tabs { + position: relative; +} + +.nav-tabs .nav-more { + position: absolute; + right: 0; + bottom: 0; + height: 42px; + line-height: 42px; + color: #666; +} + +#tabs { + border-bottom: 1px solid #eee; +} + +#tabs li { + cursor: pointer; + width: 100px; + height: 40px; + line-height: 40px; + text-align: center; + font-size: 16px; + border-bottom: 2px solid transparent; + position: relative; + z-index: 1; + margin-bottom: -1px; + color: #666; +} + + +#tabs .active { + border-bottom-color: #f00; + color: #222; +} + +.tab-container .content { + display: none; +} + +/* 页面布局 */ +.main { + padding: 30px 100px; + width: 960px; + margin: 0 auto; +} + +.main .logo { + color: #333; + text-align: left; + margin-bottom: 30px; + line-height: 1; + height: 110px; + margin-top: -50px; + overflow: hidden; + *zoom: 1; +} + +.main .logo a { + font-size: 160px; + color: #333; +} + +.helps { + margin-top: 40px; +} + +.helps pre { + padding: 20px; + margin: 10px 0; + border: solid 1px #e7e1cd; + background-color: #fffdef; + overflow: auto; +} + +.icon_lists { + width: 100% !important; + overflow: hidden; + *zoom: 1; +} + +.icon_lists li { + width: 100px; + margin-bottom: 10px; + margin-right: 20px; + text-align: center; + list-style: none !important; + cursor: default; +} + +.icon_lists li .code-name { + line-height: 1.2; +} + +.icon_lists .icon { + display: block; + height: 100px; + line-height: 100px; + font-size: 42px; + margin: 10px auto; + color: #333; + -webkit-transition: font-size 0.25s linear, width 0.25s linear; + -moz-transition: font-size 0.25s linear, width 0.25s linear; + transition: font-size 0.25s linear, width 0.25s linear; +} + +.icon_lists .icon:hover { + font-size: 100px; +} + +.icon_lists .svg-icon { + /* 通过设置 font-size 来改变图标大小 */ + width: 1em; + /* 图标和文字相邻时,垂直对齐 */ + vertical-align: -0.15em; + /* 通过设置 color 来改变 SVG 的颜色/fill */ + fill: currentColor; + /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 + normalize.css 中也包含这行 */ + overflow: hidden; +} + +.icon_lists li .name, +.icon_lists li .code-name { + color: #666; +} + +/* markdown 样式 */ +.markdown { + color: #666; + font-size: 14px; + line-height: 1.8; +} + +.highlight { + line-height: 1.5; +} + +.markdown img { + vertical-align: middle; + max-width: 100%; +} + +.markdown h1 { + color: #404040; + font-weight: 500; + line-height: 40px; + margin-bottom: 24px; +} + +.markdown h2, +.markdown h3, +.markdown h4, +.markdown h5, +.markdown h6 { + color: #404040; + margin: 1.6em 0 0.6em 0; + font-weight: 500; + clear: both; +} + +.markdown h1 { + font-size: 28px; +} + +.markdown h2 { + font-size: 22px; +} + +.markdown h3 { + font-size: 16px; +} + +.markdown h4 { + font-size: 14px; +} + +.markdown h5 { + font-size: 12px; +} + +.markdown h6 { + font-size: 12px; +} + +.markdown hr { + height: 1px; + border: 0; + background: #e9e9e9; + margin: 16px 0; + clear: both; +} + +.markdown p { + margin: 1em 0; +} + +.markdown>p, +.markdown>blockquote, +.markdown>.highlight, +.markdown>ol, +.markdown>ul { + width: 80%; +} + +.markdown ul>li { + list-style: circle; +} + +.markdown>ul li, +.markdown blockquote ul>li { + margin-left: 20px; + padding-left: 4px; +} + +.markdown>ul li p, +.markdown>ol li p { + margin: 0.6em 0; +} + +.markdown ol>li { + list-style: decimal; +} + +.markdown>ol li, +.markdown blockquote ol>li { + margin-left: 20px; + padding-left: 4px; +} + +.markdown code { + margin: 0 3px; + padding: 0 5px; + background: #eee; + border-radius: 3px; +} + +.markdown strong, +.markdown b { + font-weight: 600; +} + +.markdown>table { + border-collapse: collapse; + border-spacing: 0px; + empty-cells: show; + border: 1px solid #e9e9e9; + width: 95%; + margin-bottom: 24px; +} + +.markdown>table th { + white-space: nowrap; + color: #333; + font-weight: 600; +} + +.markdown>table th, +.markdown>table td { + border: 1px solid #e9e9e9; + padding: 8px 16px; + text-align: left; +} + +.markdown>table th { + background: #F7F7F7; +} + +.markdown blockquote { + font-size: 90%; + color: #999; + border-left: 4px solid #e9e9e9; + padding-left: 0.8em; + margin: 1em 0; +} + +.markdown blockquote p { + margin: 0; +} + +.markdown .anchor { + opacity: 0; + transition: opacity 0.3s ease; + margin-left: 8px; +} + +.markdown .waiting { + color: #ccc; +} + +.markdown h1:hover .anchor, +.markdown h2:hover .anchor, +.markdown h3:hover .anchor, +.markdown h4:hover .anchor, +.markdown h5:hover .anchor, +.markdown h6:hover .anchor { + opacity: 1; + display: inline-block; +} + +.markdown>br, +.markdown>p>br { + clear: both; +} + + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #a71d5d; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +/* 代码高亮 */ +/* PrismJS 1.15.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +code[class*="language-"], +pre[class*="language-"] { + color: black; + background: none; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #b3d4fc; +} + +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} + +@media print { + + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +:not(pre)>code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} + +/* Inline code */ +:not(pre)>code[class*="language-"] { + padding: .1em; + border-radius: .3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; + background: hsla(0, 0%, 100%, .5); +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + +.token.function, +.token.class-name { + color: #DD4A68; +} + +.token.regex, +.token.important, +.token.variable { + color: #e90; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} diff --git a/app/assets/public/wechat_1.0.6/static/ifont/demo_index.html b/app/assets/public/wechat_1.0.6/static/ifont/demo_index.html new file mode 100644 index 0000000..d298f39 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/static/ifont/demo_index.html @@ -0,0 +1,437 @@ + + + + + iconfont Demo + + + + + + + + + + + + + +
+

+ + +

+ +
+
+
    + +
  • + +
    我的
    +
    &#xe601;
    +
  • + +
  • + +
    Minimize-2
    +
    &#xe65a;
    +
  • + +
  • + +
    设置
    +
    &#xe70f;
    +
  • + +
  • + +
    质检复核
    +
    &#xe63a;
    +
  • + +
  • + +
    置顶
    +
    &#xe890;
    +
  • + +
  • + +
    关闭
    +
    &#xe60a;
    +
  • + +
  • + +
    密码
    +
    &#xe8b2;
    +
  • + +
  • + +
    最大化
    +
    &#xe651;
    +
  • + +
  • + +
    称重
    +
    &#xe6ba;
    +
  • + +
  • + +
    账号中心 账号管理
    +
    &#xe6a0;
    +
  • + +
  • + +
    9A向下还原
    +
    &#xe674;
    +
  • + +
+
+

Unicode 引用

+
+ +

Unicode 是字体在网页端最原始的应用方式,特点是:

+
    +
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • +
  • 默认情况下不支持多色,直接添加多色图标会自动去色。
  • +
+
+

注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)

+
+

Unicode 使用步骤如下:

+

第一步:拷贝项目下面生成的 @font-face

+
@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.ttf?t=1700497612485') format('truetype');
+}
+
+

第二步:定义使用 iconfont 的样式

+
.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+

第三步:挑选相应图标并获取字体编码,应用于页面

+
+<span class="iconfont">&#x33;</span>
+
+
+

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    + 我的 +
    +
    .icon-iconfuzhi +
    +
  • + +
  • + +
    + Minimize-2 +
    +
    .icon-2zuixiaohua-2 +
    +
  • + +
  • + +
    + 设置 +
    +
    .icon-shezhi +
    +
  • + +
  • + +
    + 质检复核 +
    +
    .icon-zhijianfuhe +
    +
  • + +
  • + +
    + 置顶 +
    +
    .icon-zhiding +
    +
  • + +
  • + +
    + 关闭 +
    +
    .icon-guanbi +
    +
  • + +
  • + +
    + 密码 +
    +
    .icon-mima +
    +
  • + +
  • + +
    + 最大化 +
    +
    .icon-zuidahua +
    +
  • + +
  • + +
    + 称重 +
    +
    .icon-chengzhong +
    +
  • + +
  • + +
    + 账号中心 账号管理 +
    +
    .icon-zhanghaozhongxinzhanghaoguanli +
    +
  • + +
  • + +
    + 9A向下还原 +
    +
    .icon-a-9Axiangxiahuanyuan +
    +
  • + +
+
+

font-class 引用

+
+ +

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

+

与 Unicode 使用方式相比,具有如下特点:

+
    +
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • +
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 fontclass 代码:

+
<link rel="stylesheet" href="./iconfont.css">
+
+

第二步:挑选相应图标并获取类名,应用于页面:

+
<span class="iconfont icon-xxx"></span>
+
+
+

" + iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    我的
    +
    #icon-iconfuzhi
    +
  • + +
  • + +
    Minimize-2
    +
    #icon-2zuixiaohua-2
    +
  • + +
  • + +
    设置
    +
    #icon-shezhi
    +
  • + +
  • + +
    质检复核
    +
    #icon-zhijianfuhe
    +
  • + +
  • + +
    置顶
    +
    #icon-zhiding
    +
  • + +
  • + +
    关闭
    +
    #icon-guanbi
    +
  • + +
  • + +
    密码
    +
    #icon-mima
    +
  • + +
  • + +
    最大化
    +
    #icon-zuidahua
    +
  • + +
  • + +
    称重
    +
    #icon-chengzhong
    +
  • + +
  • + +
    账号中心 账号管理
    +
    #icon-zhanghaozhongxinzhanghaoguanli
    +
  • + +
  • + +
    9A向下还原
    +
    #icon-a-9Axiangxiahuanyuan
    +
  • + +
+
+

Symbol 引用

+
+ +

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 + 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

+
    +
  • 支持多色图标了,不再受单色限制。
  • +
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • +
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • +
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 symbol 代码:

+
<script src="./iconfont.js"></script>
+
+

第二步:加入通用 CSS 代码(引入一次就行):

+
<style>
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+</style>
+
+

第三步:挑选相应图标并获取类名,应用于页面:

+
<svg class="icon" aria-hidden="true">
+  <use xlink:href="#icon-xxx"></use>
+</svg>
+
+
+
+ +
+
+ + + diff --git a/app/assets/public/wechat_1.0.6/static/ifont/iconfont.css b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.css new file mode 100644 index 0000000..b96de42 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.css @@ -0,0 +1,57 @@ +@font-face { + font-family: "iconfont"; /* Project id */ + src: url('iconfont.ttf?t=1700497612485') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-iconfuzhi:before { + content: "\e601"; +} + +.icon-2zuixiaohua-2:before { + content: "\e65a"; +} + +.icon-shezhi:before { + content: "\e70f"; +} + +.icon-zhijianfuhe:before { + content: "\e63a"; +} + +.icon-zhiding:before { + content: "\e890"; +} + +.icon-guanbi:before { + content: "\e60a"; +} + +.icon-mima:before { + content: "\e8b2"; +} + +.icon-zuidahua:before { + content: "\e651"; +} + +.icon-chengzhong:before { + content: "\e6ba"; +} + +.icon-zhanghaozhongxinzhanghaoguanli:before { + content: "\e6a0"; +} + +.icon-a-9Axiangxiahuanyuan:before { + content: "\e674"; +} + diff --git a/app/assets/public/wechat_1.0.6/static/ifont/iconfont.js b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.js new file mode 100644 index 0000000..089f6e9 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_='',function(i){var t=(t=document.getElementsByTagName("script"))[t.length-1],a=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var e,o,h,n,c,l=function(t,a){a.parentNode.insertBefore(t,a)};if(a&&!i.__iconfont__svg__cssinject__){i.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}e=function(){var t,a=document.createElement("div");a.innerHTML=i._iconfont_svg_string_,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(t=document.body).firstChild?l(a,t.firstChild):t.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),e()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(h=e,n=i.document,c=!1,s(),n.onreadystatechange=function(){"complete"==n.readyState&&(n.onreadystatechange=null,d())})}function d(){c||(c=!0,h())}function s(){try{n.documentElement.doScroll("left")}catch(t){return void setTimeout(s,50)}d()}}(window); \ No newline at end of file diff --git a/app/assets/public/wechat_1.0.6/static/ifont/iconfont.json b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.json new file mode 100644 index 0000000..ae10629 --- /dev/null +++ b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.json @@ -0,0 +1,86 @@ +{ + "id": "", + "name": "", + "font_family": "iconfont", + "css_prefix_text": "icon-", + "description": "", + "glyphs": [ + { + "icon_id": "396599", + "name": "我的", + "font_class": "iconfuzhi", + "unicode": "e601", + "unicode_decimal": 58881 + }, + { + "icon_id": "1299763", + "name": "Minimize-2", + "font_class": "2zuixiaohua-2", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "3456457", + "name": "设置", + "font_class": "shezhi", + "unicode": "e70f", + "unicode_decimal": 59151 + }, + { + "icon_id": "5146949", + "name": "质检复核", + "font_class": "zhijianfuhe", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "9627002", + "name": "置顶", + "font_class": "zhiding", + "unicode": "e890", + "unicode_decimal": 59536 + }, + { + "icon_id": "10496865", + "name": "关闭", + "font_class": "guanbi", + "unicode": "e60a", + "unicode_decimal": 58890 + }, + { + "icon_id": "11372676", + "name": "密码", + "font_class": "mima", + "unicode": "e8b2", + "unicode_decimal": 59570 + }, + { + "icon_id": "11490920", + "name": "最大化", + "font_class": "zuidahua", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "15686488", + "name": "称重", + "font_class": "chengzhong", + "unicode": "e6ba", + "unicode_decimal": 59066 + }, + { + "icon_id": "16365909", + "name": "账号中心 账号管理", + "font_class": "zhanghaozhongxinzhanghaoguanli", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "29522579", + "name": "9A向下还原", + "font_class": "a-9Axiangxiahuanyuan", + "unicode": "e674", + "unicode_decimal": 58996 + } + ] +} diff --git a/app/assets/public/wechat_1.0.6/static/ifont/iconfont.ttf b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.ttf new file mode 100644 index 0000000..c983968 Binary files /dev/null and b/app/assets/public/wechat_1.0.6/static/ifont/iconfont.ttf differ diff --git a/app/assets/public/wechat_1.0.6/static/logo.png b/app/assets/public/wechat_1.0.6/static/logo.png new file mode 100644 index 0000000..b5771e2 Binary files /dev/null and b/app/assets/public/wechat_1.0.6/static/logo.png differ diff --git a/app/assets/robots.txt b/app/assets/robots.txt new file mode 100644 index 0000000..a279869 --- /dev/null +++ b/app/assets/robots.txt @@ -0,0 +1,5 @@ +User-agent: * +Disallow: /api/ +Disallow: /admin/ +Disallow: /socket.io/ +Allow: / diff --git a/app/assets/static/css/common.css b/app/assets/static/css/common.css new file mode 100644 index 0000000..e4e3ee3 --- /dev/null +++ b/app/assets/static/css/common.css @@ -0,0 +1,155 @@ +/* ========== Reset & Base ========== */ +*,*::before,*::after{box-sizing:border-box;margin:0;padding:0} +:root{ + --blue:#1a73e8;--blue-dark:#1557b0;--blue-light:#e8f0fe; + --gray-50:#f8fafc;--gray-100:#f1f5f9;--gray-200:#e2e8f0;--gray-300:#cbd5e1; + --gray-500:#64748b;--gray-700:#334155;--gray-800:#1e293b;--gray-900:#0f172a; + --white:#ffffff;--radius:12px;--shadow:0 4px 24px rgba(0,0,0,.08); + --shadow-lg:0 12px 48px rgba(0,0,0,.12);--transition:.3s cubic-bezier(.4,0,.2,1); + --max-width:1200px; +} +html{scroll-behavior:smooth;font-size:16px} +body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;color:var(--gray-800);line-height:1.7;background:var(--white);overflow-x:hidden} +a{text-decoration:none;color:inherit} +ul{list-style:none} +img{max-width:100%;display:block} + +/* ========== Navbar ========== */ +.navbar{position:fixed;top:0;left:0;right:0;z-index:1000;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--gray-200);transition:var(--transition)} +.navbar.scrolled{box-shadow:var(--shadow)} +.nav-inner{max-width:var(--max-width);margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 24px;height:64px} +.nav-logo{display:flex;align-items:center;gap:10px;font-size:1.25rem;font-weight:700;color:var(--gray-900)} +.nav-logo .logo-icon{width:36px;height:36px;background:var(--blue);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--white);font-size:1.1rem;font-weight:700} +.nav-links{display:flex;align-items:center;gap:32px} +.nav-links a{font-size:.9rem;color:var(--gray-700);transition:color var(--transition);position:relative} +.nav-links a:hover{color:var(--blue)} +.nav-links a::after{content:'';position:absolute;bottom:-4px;left:0;width:0;height:2px;background:var(--blue);transition:width var(--transition)} +.nav-links a:hover::after,.nav-links a.active::after{width:100%} +.nav-links a.active{color:var(--blue);font-weight:600} +.nav-cta{background:var(--blue);color:var(--white)!important;padding:8px 20px;border-radius:8px;font-weight:600;transition:background var(--transition)} +.nav-cta:hover{background:var(--blue-dark)} +.nav-cta::after{display:none!important} +.menu-toggle{display:none;flex-direction:column;gap:5px;cursor:pointer;background:none;border:none;padding:4px} +.menu-toggle span{display:block;width:24px;height:2px;background:var(--gray-800);border-radius:2px;transition:var(--transition)} + +/* ========== Sections Common ========== */ +section{padding:100px 24px} +.section-header{text-align:center;max-width:700px;margin:0 auto 64px} +.section-tag{display:inline-block;background:var(--blue-light);color:var(--blue);font-size:.8rem;font-weight:600;padding:4px 14px;border-radius:20px;margin-bottom:16px;letter-spacing:.5px} +.section-title{font-size:2.25rem;font-weight:800;color:var(--gray-900);margin-bottom:16px;line-height:1.3} +.section-desc{font-size:1.05rem;color:var(--gray-500);line-height:1.8} +.container{max-width:var(--max-width);margin:0 auto} + +/* ========== Page Hero ========== */ +.page-hero{padding-top:120px;padding-bottom:80px;text-align:center;background:linear-gradient(135deg,#f0f7ff 0%,#e8f0fe 30%,#f8fafc 60%,#e8f0fe 100%)} +.page-hero .section-title{font-size:2.5rem} +.page-hero .section-desc{max-width:600px;margin:0 auto} + +/* ========== Buttons ========== */ +.btn{padding:14px 32px;border-radius:10px;font-size:.95rem;font-weight:600;cursor:pointer;transition:all var(--transition);display:inline-flex;align-items:center;gap:8px;border:none} +.btn-primary{background:var(--blue);color:var(--white);box-shadow:0 4px 16px rgba(26,115,232,.3)} +.btn-primary:hover{background:var(--blue-dark);transform:translateY(-2px);box-shadow:0 8px 24px rgba(26,115,232,.4)} +.btn-outline{background:var(--white);color:var(--blue);border:2px solid var(--blue)} +.btn-outline:hover{background:var(--blue-light);transform:translateY(-2px)} +.btn .arrow{transition:transform var(--transition)} +.btn:hover .arrow{transform:translateX(4px)} + +/* ========== Footer ========== */ +.footer{background:var(--gray-900);color:var(--gray-300);padding:48px 24px 32px} +.footer-inner{max-width:var(--max-width);margin:0 auto;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:24px} +.footer-left{display:flex;align-items:center;gap:12px} +.footer-logo-icon{width:32px;height:32px;background:var(--blue);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--white);font-size:.85rem;font-weight:700} +.footer-info{font-size:.85rem;line-height:1.6} +.footer-info strong{color:var(--white)} +.footer-right{display:flex;gap:20px;font-size:.85rem} +.footer-right a{color:var(--gray-300);transition:color var(--transition)} +.footer-right a:hover{color:var(--white)} +.footer-bottom{max-width:var(--max-width);margin:32px auto 0;padding-top:24px;border-top:1px solid rgba(255,255,255,.08);text-align:center;font-size:.78rem;color:var(--gray-500)} + +/* ========== Back to Top ========== */ +.back-to-top{position:fixed;bottom:32px;right:32px;width:44px;height:44px;background:var(--blue);color:var(--white);border:none;border-radius:50%;cursor:pointer;font-size:1.2rem;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all var(--transition);box-shadow:0 4px 16px rgba(26,115,232,.4);z-index:999} +.back-to-top.visible{opacity:1;visibility:visible} +.back-to-top:hover{background:var(--blue-dark);transform:translateY(-3px)} + +/* ========== Features Page ========== */ +.feat-section{padding:60px 0;border-bottom:1px solid var(--gray-100)} +.feat-section:last-child{border-bottom:none} +.feat-grid{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center} +.feat-grid.reverse{direction:rtl} +.feat-grid.reverse .feat-text,.feat-grid.reverse .feat-visual{direction:ltr} +.feat-num{font-size:5rem;font-weight:900;color:var(--blue);opacity:.1;line-height:1;display:block;margin-bottom:8px} +.feat-text h2{font-size:1.6rem;font-weight:800;color:var(--gray-900);margin-bottom:12px} +.feat-lead{font-size:.95rem;color:var(--gray-500);margin-bottom:20px;line-height:1.7} +.feat-flow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:20px;font-size:.8rem} +.feat-flow span:first-child,.feat-flow span:nth-child(3),.feat-flow span:nth-child(5),.feat-flow span:nth-child(7),.feat-flow span:nth-child(9),.feat-flow span:nth-child(11){background:var(--blue-light);color:var(--blue);padding:4px 10px;border-radius:20px;font-weight:700} +.feat-flow span:nth-child(even){color:var(--gray-300)} +.check-list li{font-size:.88rem;color:var(--gray-500);padding:7px 0 7px 26px;position:relative;line-height:1.6} +.check-list li::before{content:'✓';position:absolute;left:0;top:7px;color:var(--blue);font-weight:700;font-size:.75rem} +.visual-box{width:100%;aspect-ratio:1;max-width:360px;margin:0 auto;border-radius:var(--radius);display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:3rem;border:2px dashed var(--gray-200);color:var(--gray-300)} +.visual-box small{font-size:.8rem;margin-top:8px} +.vb-blue{background:#e8f0fe;border-color:var(--blue);color:var(--blue)} +.vb-green{background:#dcfce7;border-color:#16a34a;color:#16a34a} +.vb-orange{background:#fff7ed;border-color:#ea580c;color:#ea580c} +.vb-purple{background:#f3e8ff;border-color:#9333ea;color:#9333ea} +.vb-cyan{background:#ecfeff;border-color:#0891b2;color:#0891b2} + +/* ========== Pricing Page ========== */ +.pricing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:40px 0} +.pricing-card{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius);padding:36px 28px;transition:all var(--transition);position:relative;display:flex;flex-direction:column} +.pricing-card:hover{box-shadow:var(--shadow-lg);border-color:transparent;transform:translateY(-4px)} +.pricing-card.featured{border-color:var(--blue);box-shadow:0 0 0 3px rgba(26,115,232,.1)} +.pricing-badge{position:absolute;top:-14px;left:50%;transform:translateX(-50%);background:var(--blue);color:var(--white);padding:4px 18px;border-radius:20px;font-size:.78rem;font-weight:700} +.pricing-header{text-align:center;margin-bottom:24px} +.pricing-header h3{font-size:1.3rem;font-weight:800;color:var(--gray-900);margin-bottom:4px} +.pricing-header p{font-size:.82rem;color:var(--gray-500)} +.pricing-price{font-size:2.5rem;font-weight:900;color:var(--gray-900);margin-top:16px} +.pricing-price .currency{font-size:1.2rem;vertical-align:top;margin-right:2px} +.pricing-price .period{font-size:1rem;color:var(--gray-500);font-weight:400} +.pricing-features{flex:1;margin-bottom:24px} +.pricing-features li{font-size:.85rem;padding:8px 0;color:var(--gray-700);border-bottom:1px solid var(--gray-50)} +.pricing-features li.disabled{color:var(--gray-300)} + +/* ========== Help / FAQ ========== */ +.help-section{margin-bottom:48px} +.help-cat{font-size:1.3rem;font-weight:800;color:var(--gray-900);margin-bottom:20px;padding-bottom:12px;border-bottom:2px solid var(--gray-100)} +.faq-list{display:flex;flex-direction:column;gap:2px} +.faq-item{background:var(--gray-50);border:1px solid var(--gray-100);border-radius:8px;padding:18px 22px;transition:all var(--transition)} +.faq-item:hover{background:var(--white);box-shadow:var(--shadow)} +.faq-item h4{font-size:.95rem;font-weight:700;color:var(--gray-800);margin-bottom:6px} +.faq-item p{font-size:.85rem;color:var(--gray-500);line-height:1.7} + +/* ========== About Page ========== */ +.about-block{margin-bottom:48px} +.about-block h2{font-size:1.4rem;font-weight:800;color:var(--gray-900);margin-bottom:16px;padding-bottom:12px;border-bottom:2px solid var(--blue-light)} +.about-block p{font-size:.95rem;color:var(--gray-500);line-height:1.9} +.advantage-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px;margin-top:20px} +.advantage-item{background:var(--gray-50);border-radius:var(--radius);padding:24px;text-align:center;transition:all var(--transition)} +.advantage-item:hover{box-shadow:var(--shadow);transform:translateY(-2px)} +.adv-icon{font-size:2rem;margin-bottom:12px} +.advantage-item h4{font-size:1rem;font-weight:700;color:var(--gray-900);margin-bottom:8px} +.advantage-item p{font-size:.82rem;color:var(--gray-500);line-height:1.6} +.tech-tag{background:var(--blue-light);color:var(--blue);padding:8px 16px;border-radius:8px;font-size:.82rem;font-weight:600;text-align:center} + +/* ========== Responsive ========== */ +@media(max-width:1024px){ + .feat-grid{grid-template-columns:1fr;gap:32px} + .feat-grid.reverse{direction:ltr} + .visual-box{max-width:240px;aspect-ratio:auto;padding:60px 20px} + .pricing-grid{grid-template-columns:1fr;max-width:440px;margin:0 auto} +} +@media(max-width:768px){ + :root{--max-width:100%} + .nav-links{display:none;position:absolute;top:64px;left:0;right:0;background:var(--white);flex-direction:column;padding:24px;gap:20px;border-bottom:1px solid var(--gray-200);box-shadow:var(--shadow)} + .nav-links.open{display:flex} + .menu-toggle{display:flex} + section{padding:64px 20px} + .section-title{font-size:1.7rem} + .page-hero .section-title{font-size:1.8rem} + .footer-inner{flex-direction:column;text-align:center} + .pricing-grid{max-width:100%} + .advantage-grid{grid-template-columns:1fr} + .feat-flow{gap:4px;font-size:.72rem} +} +@media(max-width:480px){ + .btn{width:100%;justify-content:center} +} diff --git a/app/assets/static/js/common.js b/app/assets/static/js/common.js new file mode 100644 index 0000000..a7a68ce --- /dev/null +++ b/app/assets/static/js/common.js @@ -0,0 +1,57 @@ +// Navbar scroll effect +const navbar = document.getElementById('navbar'); +const backToTop = document.getElementById('backToTop'); +window.addEventListener('scroll', () => { + if (navbar) navbar.classList.toggle('scrolled', window.scrollY > 10); + if (backToTop) backToTop.classList.toggle('visible', window.scrollY > 500); +}); + +// Back to top +if (backToTop) { + backToTop.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); +} + +// Mobile menu toggle +const menuToggle = document.getElementById('menuToggle'); +const navLinks = document.getElementById('navLinks'); +if (menuToggle && navLinks) { + menuToggle.addEventListener('click', () => { + navLinks.classList.toggle('open'); + }); + navLinks.querySelectorAll('a').forEach(link => { + link.addEventListener('click', () => { + navLinks.classList.remove('open'); + }); + }); +} + +// Scroll reveal animation +const observerOptions = { threshold: 0.1, rootMargin: '0px 0px -50px 0px' }; +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.style.opacity = '1'; + entry.target.style.transform = 'translateY(0)'; + } + }); +}, observerOptions); + +const animateEls = document.querySelectorAll('.feat-section, .pricing-card, .faq-item, .advantage-item, .about-block, .help-section'); +animateEls.forEach(el => { + el.style.opacity = '0'; + el.style.transform = 'translateY(20px)'; + el.style.transition = 'opacity .6s ease, transform .6s ease'; + observer.observe(el); +}); + +setTimeout(() => { + animateEls.forEach(el => { + const rect = el.getBoundingClientRect(); + if (rect.top < window.innerHeight) { + el.style.opacity = '1'; + el.style.transform = 'translateY(0)'; + } + }); +}, 200); diff --git a/app/controller/Auth.js b/app/controller/Auth.js new file mode 100644 index 0000000..fedd5d1 --- /dev/null +++ b/app/controller/Auth.js @@ -0,0 +1,15 @@ +const { Controller } = require('egg'); + +class authController extends Controller { + async getLoginercode() { + const { ctx } = this; + ctx.body = await ctx.service.auth.getLoginercode(); + } + async getLoginstatus(){ + const { ctx } = this; + const query = ctx.request.body; + ctx.body = await ctx.service.auth.getLoginstatus(query); + } +} + +module.exports = authController; \ No newline at end of file diff --git a/app/controller/Dashboard.js b/app/controller/Dashboard.js new file mode 100644 index 0000000..abc9b78 --- /dev/null +++ b/app/controller/Dashboard.js @@ -0,0 +1,10 @@ +const { Controller } = require('egg'); + +class dashboardController extends Controller { + async index() { + const { ctx } = this; + ctx.body = 'hi, egg'; + } +} + +module.exports = dashboardController; \ No newline at end of file diff --git a/app/controller/Dgj.js b/app/controller/Dgj.js new file mode 100644 index 0000000..086a64b --- /dev/null +++ b/app/controller/Dgj.js @@ -0,0 +1,35 @@ +const { Controller } = require('egg'); + +class dgjController extends Controller { + async Print(){ + const { ctx } = this; + const parmas = ctx.request.body; + if('orders' in parmas && 'expressName' in parmas){ + ctx.body = await ctx.service.dgj.Print(parmas.orders,parmas.expressName); + } + } + async Print1(){ + const { ctx } = this; + const parmas = ctx.request.body; + if('orders' in parmas && 'expressName' in parmas){ + ctx.body = await ctx.service.dgj.Print1(parmas.orders,parmas.expressName); + } + } + async Print2(){ + const { ctx } = this; + const parmas = ctx.request.body; + if('orders' in parmas && 'expressName' in parmas){ + ctx.body = await ctx.service.dgj.Print2(parmas.orders,parmas.expressName); + } + } + async CreateOrder(){ + const {ctx} = this; + const parmas = ctx.request.body; + if('orders' in parmas){ + ctx.body = await ctx.service.dgj.CreateOrder(parmas.orders); + }else{ + ctx.body = 0; + } + } +} +module.exports = dgjController; \ No newline at end of file diff --git a/app/controller/Express.js b/app/controller/Express.js new file mode 100644 index 0000000..4a3bb4d --- /dev/null +++ b/app/controller/Express.js @@ -0,0 +1,10 @@ +const { Controller } = require('egg'); + +class expressController extends Controller { + async aotoCheckLanshou() { + const { ctx } = this; + ctx.body = await ctx.service.express.aotoCheckLanshou(); + } +} + +module.exports = expressController; diff --git a/app/controller/Home.js b/app/controller/Home.js new file mode 100644 index 0000000..d3252df --- /dev/null +++ b/app/controller/Home.js @@ -0,0 +1,16 @@ +const { Controller } = require('egg'); + +class homeController extends Controller { + async index() { + const { ctx } = this; + ctx.body = 1; + ctx.page = true; + } + async exportWmsMonthOrderFile(){ + const { ctx } = this; + const parmas = ctx.request.body; + ctx.body = await ctx.service.home.exportWmsMonthOrderFile(parmas.month); + } +} + +module.exports = homeController; \ No newline at end of file diff --git a/app/controller/MiniProgram.js b/app/controller/MiniProgram.js new file mode 100644 index 0000000..551e316 --- /dev/null +++ b/app/controller/MiniProgram.js @@ -0,0 +1,10 @@ +const { Controller } = require('egg'); + +class miniProgramController extends Controller { + async index() { + const { ctx } = this; + ctx.body = 'hi, egg'; + } +} + +module.exports = miniProgramController; diff --git a/app/controller/Pda.js b/app/controller/Pda.js new file mode 100644 index 0000000..0162c7f --- /dev/null +++ b/app/controller/Pda.js @@ -0,0 +1,12 @@ +const { Controller } = require('egg'); + +class pdaController extends Controller { + async index() { + const { ctx } = this; + const query = this.ctx.query; + ctx.body = await ctx.service.tgdppda.push(query.sid); + console.log(query); + } +} + +module.exports = pdaController; diff --git a/app/controller/Robot.js b/app/controller/Robot.js new file mode 100644 index 0000000..204b349 --- /dev/null +++ b/app/controller/Robot.js @@ -0,0 +1,10 @@ +const { Controller } = require('egg'); + +class robotController extends Controller { + async index() { + const { ctx } = this; + ctx.body = 'hi, egg'; + } +} + +module.exports = robotController; \ No newline at end of file diff --git a/app/controller/Sandan.js b/app/controller/Sandan.js new file mode 100644 index 0000000..3c06aaa --- /dev/null +++ b/app/controller/Sandan.js @@ -0,0 +1,44 @@ +const { Controller } = require('egg'); + +class sandanController extends Controller { + async scan(){ + const { ctx } = this; + const query = await new Promise((resolve, reject) => { + let data = ''; + ctx.req.setEncoding('utf8'); + ctx.req.on('data', chunk => { + data += chunk; + }); + ctx.req.on('end', () => { + resolve(data); + }); + ctx.req.on('error', reject); + }); + ctx.body = await ctx.service.gzt.scan(query.replace(/[\r\n]/g, ""),ctx.request.header.gztcode); + } + + async scan2(){ + const { ctx } = this; + const query = await new Promise((resolve, reject) => { + let data = ''; + ctx.req.setEncoding('utf8'); + ctx.req.on('data', chunk => { + data += chunk; + }); + ctx.req.on('end', () => { + resolve(data); + }); + ctx.req.on('error', reject); + }); + ctx.body = await ctx.service.gzt.scan2(query.replace(/[\r\n]/g, ""),ctx.request.header.gztcode); + } + async createCache(){ + const { ctx } = this; + const parmas = ctx.request.body; + console.log(parmas); + ctx.service.gzt.getOrderInfo(parmas.POSTNUM,parmas.WAREHOUSEID); + ctx.body = 1; + } +} + +module.exports = sandanController; \ No newline at end of file diff --git a/app/controller/System.js b/app/controller/System.js new file mode 100644 index 0000000..8b9f274 --- /dev/null +++ b/app/controller/System.js @@ -0,0 +1,38 @@ +'use strict'; + +const { Controller } = require('egg'); + +class SystemController extends Controller { + /** + * 通用请求入口 + * POST /system + * Body: { "name": "someAction", "data": { ... } } + */ + async index() { + const { ctx } = this; + const { name, data } = ctx.request.body; + + if (!name) { + ctx.body = { + success: false, + message: '缺少 name 参数', + }; + ctx.status = 400; + return; + } + + try { + const result = await ctx.service.system.dispatch(name, data); + ctx.body = result; + } catch (err) { + ctx.logger.error('[System] 调度失败:', err.message); + ctx.body = { + success: false, + message: err.message || '内部错误', + }; + ctx.status = err.status || 500; + } + } +} + +module.exports = SystemController; diff --git a/app/controller/Tgdp.js b/app/controller/Tgdp.js new file mode 100644 index 0000000..5fa9724 --- /dev/null +++ b/app/controller/Tgdp.js @@ -0,0 +1,30 @@ +const { Controller } = require('egg'); + +class tgdpController extends Controller { + async ll() { + const { ctx } = this; + const WAREHOUSEID = ctx.request.body.WAREHOUSEID; + ctx.service.tgdp.ll(WAREHOUSEID); + ctx.body = 1; + } + async jh() { + const { ctx } = this; + const WAREHOUSEID = ctx.request.body.WAREHOUSEID; + ctx.service.tgdp.jh(WAREHOUSEID); + ctx.body = 1; + } + async fh() { + const { ctx } = this; + const WAREHOUSEID = ctx.request.body.WAREHOUSEID; + ctx.service.tgdp.fh(WAREHOUSEID); + ctx.body = 1; + } + async db() { + const { ctx } = this; + const WAREHOUSEID = ctx.request.body.WAREHOUSEID; + ctx.service.tgdp.db(WAREHOUSEID); + ctx.body = 1; + } +} + +module.exports = tgdpController; diff --git a/app/controller/Tool.js b/app/controller/Tool.js new file mode 100644 index 0000000..287bd9f --- /dev/null +++ b/app/controller/Tool.js @@ -0,0 +1,17 @@ +const { Controller } = require('egg'); + +class toolController extends Controller { + async index() { + const { ctx } = this; + ctx.body = await ctx.service.home.getUserinfo(); + } + async backMsg(){ + const { ctx } = this; + ctx.body = await ctx.service.tool.backMsg(ctx.request.body); + } + async createOrder(){ + const { ctx } = this; + ctx.body = await ctx.service.tool.createOrder(ctx.request.body); + } +} +module.exports = toolController; \ No newline at end of file diff --git a/app/controller/Workspace.js b/app/controller/Workspace.js new file mode 100644 index 0000000..17def42 --- /dev/null +++ b/app/controller/Workspace.js @@ -0,0 +1,10 @@ +const { Controller } = require('egg'); + +class WorkspaceController extends Controller { + async index() { + const { ctx } = this; + ctx.body = 'hi, egg'; + } +} + +module.exports = WorkspaceController; \ No newline at end of file diff --git a/app/extend/application.js b/app/extend/application.js new file mode 100644 index 0000000..8d14143 --- /dev/null +++ b/app/extend/application.js @@ -0,0 +1,22 @@ +const soap = require('soap'); + +module.exports = { + async wsdl(methodName, args) { + try { + const wsdlUrl = "http://ye4s.com/webservice/ws?wsdl"; + const obj = {}; + args.forEach((value, index) => { + obj['arg' + index] = value; + }); + const client = await soap.createClientAsync(wsdlUrl); + const result = await client[methodName + 'Async'](obj); + return result[0]; + } catch (error) { + console.error('Error calling SOAP service:', error); + throw error; + } + }, + async checkRule(path,module){ + + } +}; \ No newline at end of file diff --git a/app/io/controller/generic.js b/app/io/controller/generic.js new file mode 100644 index 0000000..dc82784 --- /dev/null +++ b/app/io/controller/generic.js @@ -0,0 +1,48 @@ +const Controller = require('egg').Controller; + +class GenericController extends Controller { + async generic() { + const { ctx, app } = this; + const data = ctx.args; + const { eventType, eventData } = data[0]; + const socket = ctx.socket; + const query = ctx.socket.handshake.query; + const { token,type } = query; + const sid = ctx.socket.id; + if(type=="tgdp"){ + const listValues = await this.app.redis.get('cache').lrange(`tgdp_user_${ctx.socket.userinfo.warehouseid}`, 0, -1); + const containsSid = listValues.includes(sid); + if(!containsSid && ctx.socket.istgdp){ + await this.app.redis.get('cache').lpush(`tgdp_user_${ctx.socket.userinfo.warehouseid}`,sid); + } + } + let result = null; + switch (type) { + case 'tgdp': + if (ctx.service.tgdp && ctx.service.tgdp[eventType]) { + // 如果有对应的 Service 存在,则调用对应的 Service 处理 + result = await ctx.service.tgdp[eventType](eventData); + } else { + // 如果没有对应的 Service 存在,则返回默认值 0 + result = 0; + } + break; + case 'gzt': + // code + if (ctx.service.gzt && ctx.service.gzt[eventType]) { + // 如果有对应的 Service 存在,则调用对应的 Service 处理 + result = await ctx.service.gzt[eventType](eventData); + } else { + // 如果没有对应的 Service 存在,则返回默认值 0 + result = 0; + } + break; + default: + } + + // 将处理结果返回给客户端 + socket.emit('genericResponse', {method:eventType,data:result}); + } +} + +module.exports = GenericController; diff --git a/app/io/middleware/connection.js b/app/io/middleware/connection.js new file mode 100644 index 0000000..7196d0c --- /dev/null +++ b/app/io/middleware/connection.js @@ -0,0 +1,72 @@ +const axios = require('axios'); +module.exports = app => { + return async (ctx, next) => { + const sid = ctx.socket.id; + const nsp = app.io.of('/'); + const query = ctx.socket.handshake.query; + + const { token,type } = query; + let islogin = false; + if(!token){ + if(type=="tgdp"){ + ctx.socket.disconnect(); + } + if(type=="gzt"){ + let datas = await ctx.service.gzt.getBindCode(sid); + ctx.socket.emit('genericResponse', {method:"getBindCode",data:datas}); + } + }else{ + //根据token获取用户信息 + switch (type) { + case 'tgdp': + // code + const apiUrl = 'https://ye4s.wms.gztbyc.com/api/user/index'; + const headers = { + 'token': token + }; + try { + const response = await axios.get(apiUrl,{headers}); + ctx.socket.userinfo = response.data.data[0]; + ctx.socket.rules = response.data.data[1]; + ctx.socket.istgdp = false; + islogin = true; + if(type=="tgdp"){ + let istgdp = false; + for(let i=0;i { + if(ctx.socket.istgdp){ + const listKey = `tgdp_user_${ctx.socket.userinfo.warehouseid}`; + await app.redis.get('cache').lrem(listKey, 0, sid); + } + }); + await next(); + }; +}; diff --git a/app/middleware/auth.js b/app/middleware/auth.js new file mode 100644 index 0000000..cf782f2 --- /dev/null +++ b/app/middleware/auth.js @@ -0,0 +1,18 @@ +const AuthHandler = require('../utils/auth'); +module.exports = async (ctx, next) => { + // 在这里进行鉴权逻辑,这里只是示例,您可以根据实际情况进行修改 + const token = ctx.header.authorization; + const authHandler = new AuthHandler(ctx); + const auth = await authHandler.init(token); + if(!auth){ + ctx.status = 401; + let err_essage = await authHandler.getError(); + ctx.body = { message: err_essage }; + return; + }else{ + ctx.state.user = await authHandler.getUser(); + ctx.state.wmsuser = await authHandler.getWmsUser(); + ctx.state.rules = await authHandler.getRuleList(); + await next(); + } +}; \ No newline at end of file diff --git a/app/middleware/formatResponse.js b/app/middleware/formatResponse.js new file mode 100644 index 0000000..4839d10 --- /dev/null +++ b/app/middleware/formatResponse.js @@ -0,0 +1,30 @@ +module.exports = () => { + return async function formatResponse(ctx, next) { + try { + await next(); + // 统一输出数据格式 + if(ctx.page!=true){ + if (ctx.body) { + ctx.body = { + code: ctx.status || 200, + data: ctx.body, + message: ctx.message || 'Success', + }; + } else { + ctx.status = 404; + ctx.body = { + code: 404, + message: 'Not Found', + }; + } + } + } catch (err) { + // 处理异常情况 + ctx.status = err.status || 500; + ctx.body = { + code: ctx.status, + message: err.message || 'Internal Server Error', + }; + } + }; +}; \ No newline at end of file diff --git a/app/public/scan_logs.txt b/app/public/scan_logs.txt new file mode 100644 index 0000000..d49c4b3 --- /dev/null +++ b/app/public/scan_logs.txt @@ -0,0 +1,537 @@ +320691483887730,33 +320691495281866,33 +320691503196019,33 +320691482905982,33 +320691493554067,33 +320691476834625,33 +320691476809758,33 +320691492646440,33 +320691485597427,33 +320691482906381,33 +320691501135309,33 +320691501145796,33 +320691496383539,33 +320691503176675,33 +320691502164685,33 +320691503180323,33 +320691504126110,33 +320691483886337,33 +320691502161042,33 +320691490981591,33 +320691503179585,33 +320691476837058,33 +320691491891015,33 +320691476831262,33 +320691468958934,33 +320691501153701,33 +320691496387066,33 +320691491886453,33 +320691491886453,33 +320691491886453,33 +320691501155896,33 +320691502170822,33 +320691485654053,33 +320691503239584,33 +320691505130712,33 +320691503225583,33 +320691478766229,33 +320691489419274,33 +320691493621767,33 +320691498205574,33 +320691481840389,33 +320691501179804,33 +320691492675735,33 +320691505130136,33 +320691476847233,33 +320691505124787,33 +320691501189704,33 +320691506243285,33 +320691501185695,33 +320691501185211,33 +320691492676158,33 +320691501177896,33 +320691493630286,33 +320691496417646,33 +320691500248600,33 +320691483924958,33 +320691482965738,33 +320691492687073,33 +320691493630379,33 +320691476866416,33 +320691482950477,33 +320691476876138,33 +320691483906974,33 +320691494493167,33 +320691476876229,33 +320691491968090,33 +320691505125487,33 +320691482942365,33 +320691508270401,33 +320691484628635,33 +320691479962167,33 +320691479962351,33 +320691507002629,33 +320691496416170,33 +320691481849653,33 +320691476866137,33 +320691496416261,33 +320691489413462,33 +320691501192819,33 +320691481840484,33 +320691481842561,33 +320691503229399,33 +320691500248216,33 +320691496417171,33 +320691501192516,33 +320691488758237,33 +320691483928085,33 +320691484628536,33 +320691493621666,33 +320691504161498,33 +320691491980690,33 +320691482950774,33 +320691483935540,33 +320691493631368,33 +320691481848549,33 +320691483911679,33 +320691501177208,33 +320691486678420,33 +320691496433074,33 +320691483923270,33 +320691492684949,33 +320691500210178,33 +320691500248125,33 +320691496416354,33 +320691492695078,33 +320691483920106,33 +320691496417955,33 +320691476876613,33 +320691483913279,33 +320691476874421,33 +320691494493543,33 +320691505122214,33 +320691482966072,33 +320691488755327,33 +320691476857715,33 +320691483923963,33 +320691476858518,33 +320691485655614,33 +320691499672078,33 +320691483886064,33 +320691505130920,33 +320691493602677,33 +320691468997731,33 +320691500213242,33 +320691476866321,33 +320691501194312,33 +320691482946844,33 +320691481848852,33 +320691493602481,33 +320691491977856,33 +320691483907002,33 +320691485656049,33 +320691485658142,33 +320691482953262,33 +320691505114120,33 +320691476858233,33 +320691503251495,33 +320691490981399,33 +320691485658053,33 +320691483936842,33 +320691496412465,33 +320691504163779,33 +320691503239784,33 +320691481832374,33 +320691500231335,33 +320691476860452,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691500212942,33 +320691488757719,33 +320691495317553,33 +320691501185304,33 +320691492687162,33 +320691503226017,33 +320691496433163,33 +320691493625846,33 +320691505121316,33 +320691493631463,33 +320691498213571,33 +320691505130611,33 +320691485648056,33 +320691505131216,33 +320691497174356,33 +320691493604566,33 +320691501192615,33 +320691485658718,33 +320691481845546,33 +320691481845449,33 +320691505124686,33 +320691500213151,33 +320691501177117,33 +320691493605098,33 +320691482942181,33 +320691486675229,33 +320691492687253,33 +320691476868717,33 +320691493631095,33 +320691496422456,33 +320691479962078,33 +320691482950877,33 +320691508258001,33 +320691492684640,33 +320691535520667,33 +320691531418980,33 +320691542400125,33 +320691537369248,33 +320691546143082,33 +320691553534244,33 +320691525754431,33 +320691567204370,33 +320691537369533,33 +320691530754859,33 +320691540917679,33 +320691563196451,33 +320691549215368,33 +320691525754152,33 +320691540278566,33 +320691540915988,33 +320691546145442,33 +320691540282389,33 +320691535514953,33 +320691561305984,33 +320691542399960,33 +320691543587524,33 +320691537373069,33 +320691562307666,33 +320691525759436,33 +320691531418671,33 +320691568211983,33 +320691540277763,33 +320691544239082,33 +320691545284633,33 +320691535519550,33 +320691533839848,33 +320691565199957,33 +320691568208565,33 +320691545285834,33 +320691546142962,33 +320691516941003,33 +320691516941003,33 +320691516941003,33 +320691525758336,33 +320691516941003,33 +320691563194752,33 +320691535520871,33 +320691540282781,33 +320691525758431,33 +320691535514848,33 +320691568210786,33 +320691533839953,33 +320691571011325,33 +320691525758152,33 +320691546145638,33 +320691563194855,33 +320691543587427,33 +320691525755428,33 +320691540282581,33 +320691546144445,33 +320691544237347,33 +320691532885638,33 +320691537373342,33 +320691535520471,33 +320691532881466,33 +320691531418007,33 +320691543587239,33 +320691525753733,33 +320691540282884,33 +320691538288257,33 +320691534504967,33 +320691568211575,33 +320691532883262,33 +320691540283198,33 +320691537373437,33 +320691532882857,33 +320691561306478,33 +320691532884845,33 +320691530754964,33 +320691547041478,33 +320691532885442,33 +320691525755525,33 +320691540278974,33 +320691565199749,33 +320691549215659,33 +320691533842547,33 +320691575045851,33 +320691531418287,33 +320691568213274,33 +320691542400036,33 +320691546143262,33 +320691550062497,33 +320691533840002,33 +320691540278869,33 +320691533842955,33 +320691563195648,33 +320691567204465,33 +320691562307767,33 +320691546146073,33 +320691525753941,33 +320691553534337,33 +320691542400309,33 +320691525753836,33 +320691563195957,33 +320691540278665,33 +320691546145539,33 +320691562307470,33 +320691571013036,33 +320691533840282,33 +320691525758528,33 +320691563195549,33 +320691545286065,33 +320691532880982,33 +320691532881563,33 +320691489419094,33 +320691496431090,33 +320691486678232,33 +320691508257763,33 +320691506232582,33 +320691482947077,33 +320691493630670,33 +320691497174748,33 +320691505129895,33 +320691489413274,33 +320691485655923,33 +320691483933851,33 +320691479969071,33 +320691499669438,33 +320691481832469,33 +320691483911580,33 +320691476866048,33 +320691498212778,33 +320691485666921,33 +320691476875515,33 +320691476868517,33 +320691505114304,33 +320691501192419,33 +320691505132300,33 +320691485665229,33 +320691503226297,33 +320691478766322,33 +320691483935639,33 +320691501169908,33 +320691482942557,33 +320691503252298,33 +320691482951371,33 +320691505122599,33 +320691490969379,33 +320691508257971,33 +320691489418857,33 +320691485667049,33 +320691503252583,33 +320691496432546,33 +320691496432546,33 +320691496432546,33 +320691496432546,33 +320691501187899,33 +320691501177692,33 +320691500210089,33 +320691482954950,33 +320691483935348,33 +320691495313096,33 +320691495313096,33 +320691503225391,33 +320691500215422,33 +320691505131804,33 +320691498213670,33 +320691505131804,33 +320691505131804,33 +320691505131804,33 +320691505131804,33 +320691505131804,33 +320691505131804,33 +320691505131804,33 +320691505131804,33 +6901028011778,33 +320691500231151,33 +320691493630571,33 +320691507002433,33 +320691476858053,33 +320691476858617,33 +320691506232390,33 +320691501192324,33 +320691493628954,33 +320691503252391,33 +320691501182319,33 +320691485665613,33 +320691478766049,33 +320691493623266,33 +320691482958166,33 +320691505132027,33 +320691485667514,33 +320691505132027,33 +320691505132027,33 +320691505131909,33 +320691482957947,33 +320691496422753,33 +320691498202688,33 +320691498202688,33 +320691498202688,33 +320691498202688,33 +320691505124890,33 +320691476866228,33 +320691496415955,33 +320691571008707,33 +320691561306199,33 +320691540912210,33 +320691575039369,33 +320691568213183,33 +320691557547816,33 +320691565197256,33 +320691566404357,33 +320691551814372,33 +320691540916678,33 +320691568204000,33 +320691560806581,33 +320691567204762,33 +320691553533942,33 +320691570061911,33 +320691553526067,33 +320691565194352,33 +320691571009415,33 +320691547654614,33 +320691547652727,33 +320691568208373,33 +320691562304473,33 +320691562309290,33 +320691568212566,33 +320691568203285,33 +320691562309010,33 +320691565200118,33 +320691571012811,33 +320691572018995,33 +320691547651635,33 +320691540911912,33 +320691540917883,33 +320691565199264,33 +320691572020045,33 +320691537921280,33 +320691553533837,33 +320691571010063,33 +320691568211199,33 +320691568203378,33 +320691550787083,33 +320691553526732,33 +320691565195444,33 +320691561306290,33 +320691568202292,33 +320691560806781,33 +320691572022689,33 +320691575039276,33 +320691568207762,33 +320691562312195,33 +320691572020134,33 +320691562304570,33 +320691562312195,33 +320691561305011,33 +320691537921373,33 +320691568208280,33 +320691568202985,33 +320691571012132,33 +320691572019895,33 +320691575038756,33 +320691540911807,33 +320691575040391,33 +320691547652430,33 +320691547654515,33 +320691557547921,33 +320691562308770,33 +320691551813668,33 +320691571008042,33 +320691540910139,33 +320691547652151,33 +320691562304285,33 +320691540911603,33 +320691540910230,33 +320691565199452,33 +320691571007312,33 +320691568202385,33 +320691551820202,33 +320691565197349,33 +320691563195084,33 +320691563193460,33 +320691575039464,33 +320691575039561,33 +320691571008222,33 +320691572019792,33 +320691571011820,33 +320691571009136,33 +320691568204280,33 +320691562308873,33 +320691553526532,33 +320691547652830,33 +320691540912498,33 +320691568203473,33 +320691572022493,33 +320691535520768,33 +320691535516444,33 +320691540917780,33 +320691540279474,33 +320691553526247,33 +320691567204661,33 +320691571009712,33 +320691568212374,33 +320691565194744,33 +320691540910418,33 +320691571008810,33 +320691540910050,33 +320691565200029,33 +320691571007128,33 +320691562308473,33 +320691571008507,33 +320691540910818,33 +320691571009815,33 +320691563196356,33 +320691571009611,33 +320691568208189,33 +320691562304378,33 +320691571007704,33 +320691571011232,33 +320691562311988,33 +320691558647050,33 +320691540916779,33 +320691562309383,33 +320691562311780,33 +320691571008131,33 +320691550786646,33 +320691572022205,33 +320691558641842,33 +320691550786747,33 +320691565194447,33 +320691540918298,33 +320691560804585,33 +320691575040583,33 +320691553529076,33 +320691560805106,33 +320691571011717,33 +320691560804888,33 +320691550786850,33 +320691562308570,33 +320691560804993,33 +320691568211674,33 +320691571007219,33 +320691575039660,33 +320691565199173,33 +320691565199357,33 +320691568212190,33 +320691565194259,33 +320691565194259,33 +320691571009920,33 +320691561305879,33 +5419,33 +219j5429,33 diff --git a/app/router.js b/app/router.js new file mode 100644 index 0000000..3265a53 --- /dev/null +++ b/app/router.js @@ -0,0 +1,84 @@ +/** + * @param {Egg.Application} app - egg application + */ + const fs = require('fs').promises; + const path = require('path'); +module.exports = app => { + const { router, controller,io } = app; + // 定义一个需要鉴权的路由组 + function mapRoutes(routes) { + routes.forEach(route => { + const [path, method, auth] = route.split('|'); + const [controllerName, methodName] = path.split('/'); + const handler = controller[controllerName][methodName]; + + let middleware = null; + if (auth === '1') { + middleware = app.middleware.auth; + } + + if (handler && typeof handler === 'function') { + if (method === 'get') { + if(middleware){ + router.get(`/${controllerName}/${methodName}`, middleware, handler); + }else{ + router.get(`/${controllerName}/${methodName}`, handler); + } + } else if (method === 'post') { + if(middleware){ + router.post(`/${controllerName}/${methodName}`, middleware, handler); + }else{ + router.post(`/${controllerName}/${methodName}`, handler); + } + } + // Add more methods as needed + } else { + console.error(`Handler function ${controllerName}.${methodName} is not defined or is not a function.`); + } + }); + } + + const authRoutesList = [ + 'auth/getLoginercode|get|0', + 'auth/getLoginstatus|post|0', + 'tgdp/ll|post|0', + 'tgdp/jh|post|0', + 'tgdp/fh|post|0', + 'tgdp/db|post|0', + 'workspace/index|post|1', + 'robot/index|post|1', + 'tool/index|post|1', + 'tool/backMsg|post|0', + 'tool/createOrder|post|0', + 'dashboard/index|post|1', + 'pda/index|get|0', + 'miniProgram/index|post|1', + 'dgj/Print|post|0', + 'dgj/Print1|post|0', + 'dgj/Print2|post|0', + 'dgj/CreateOrder|post|0', + 'express/aotoCheckLanshou|get|0', + 'sandan/scan|post|0', + 'sandan/scan2|post|0', + 'sandan/createCache|post|0' + ]; + mapRoutes(authRoutesList); + + // 通用请求接口: POST /system { "name": "someAction", "data": { ... } } + router.post('/system', controller.system.index); + //home 首页 + //router.get('/', controller.home.index); + router.get('/', async ctx => { + try { + ctx.page = true; + const filePath = path.join(app.baseDir, 'app/assets/index.html'); + const content = await fs.readFile(filePath); + ctx.type = 'html'; + ctx.body = content; + } catch (err) { + ctx.status = 404; + ctx.body = 'File not found'; + } + }); + io.of('/').route('genericEvent', io.controller.generic.generic); +}; diff --git a/app/schedule/checkOnline.js b/app/schedule/checkOnline.js new file mode 100644 index 0000000..be80cee --- /dev/null +++ b/app/schedule/checkOnline.js @@ -0,0 +1,17 @@ +const Subscription = require('egg').Subscription; + +class checkOnline extends Subscription { + static get schedule() { + return { + interval: '300s', + type: 'worker', + }; + } + async subscribe() { + const { + ctx + } = this; + await this.ctx.service.tgdp.checkOnline(); + } +} +module.exports = checkOnline; diff --git a/app/service/auth.js b/app/service/auth.js new file mode 100644 index 0000000..2bf461e --- /dev/null +++ b/app/service/auth.js @@ -0,0 +1,46 @@ +const Service = require('egg').Service; +const { v4: uuidv4 } = require('uuid'); +const axios = require('axios'); + +class Auth extends Service { + async getLoginercode(){ + const uuid = uuidv4(); + let task = await this.app.mysql.get('dblocal').insert(`ye4s_logins`,{token:uuid}); + return uuid; + } + async getLoginstatus(params){ + let task = await this.app.mysql.get('dblocal').get(`ye4s_logins`,{token:params.token}); + if(task.uuid){ + console.log(task.uuid); + const res = await this.loginByUuid(task.uuid); + return {token:res}; + }else{ + return {token:null}; + } + } + async loginByUuid(uuid){ + const apiUrl = 'https://ye4s.wms.gztbyc.com/api/user/loginByUUid'; // FastAdmin API 的 URL + const postData = { + uuid: uuid + }; + try { + const response = await axios.post(apiUrl, postData); + console.log(response); + return response.data.data.userinfo.token; + } catch (error) { + console.log("error",error); + return 0; + } + } + async getUserinfo(){ + const {ctx} = this; + let task = await ctx.app.wsdl('getPDAUser',['caige01', 'wu123456']); + let data = JSON.parse(task.return); + data.push(ctx.state.user); + data.push(ctx.state.wmsuser); + let rules = ctx.state.rules; + console.log(rules); + return data; + } +} +module.exports = Auth; \ No newline at end of file diff --git a/app/service/dgj.js b/app/service/dgj.js new file mode 100644 index 0000000..7113dbb --- /dev/null +++ b/app/service/dgj.js @@ -0,0 +1,625 @@ +const Service = require('egg').Service; +const axios = require('axios'); + +class Dgj extends Service { + async Print1(order,expressName){ + console.log(order); + const pingtais_default_PlatformType = { + "1":"Taobao", + "3":"JingdongPurchase", + "4":"Pinduoduo", + "5":"TouTiao", + "6":"KuaiShou", + "7":"WxVideo", + "8":"XiaoHongShu" + }; + const pingtais = { + "1":"ali", + "6":"ali", + "8":"ali", + "4":"pdd", + "5":"dd", + "7":"ali", + "3":"jd" + }; + let opingtai = null; + let orders_arr = order.split("|").filter(value => value !== null && value !== undefined && value !== '' && value.indexOf('TB')==-1 && value.indexOf('jst')==-1); + let pingtaiOrder = {}; + let hasError = null; + let tmp_list = []; + let fin_list = []; + for(let i = 0;i value !== null && value !== undefined && value !== ''); + fin_list.push(order_item[0]); + if (!order_item.hasOwnProperty(1)) { + hasError = `${r},orders入参错误,格式为外部订单编号,平台编号|外部订单编号,平台编号,传入的值为${order}`; + break; + } + let pingtai = (order_item[1] in pingtais)?pingtais[order_item[1]]:null; + if(order_item.hasOwnProperty(2) && order_item[2]=="1"){ + opingtai = pingtai; + pingtai = "ali"; + } + if(!pingtai){ + hasError = `${order_item[1]}在程序中pingtais无对应键值`; + break; + } + if(pingtai in pingtaiOrder){ + pingtaiOrder[pingtai].push(order_item[0]); + }else{ + pingtaiOrder[pingtai] = [order_item[0]]; + } + } + if(hasError){ + return {code:0,msg:hasError}; + } + let pingtaiOrder2 = {}; + for(let key in pingtaiOrder){ + let filters = [ + { + TableAlias:"o", + FieldType:"string", + TableName:"LogicOrder", + Name:"PlatformOrderId", + Value:pingtaiOrder[key].join(","), + Contract:"in", + CustomQuery:"PlatformOrderIdSearch" + }, + ]; + let MultiFilters = []; + let pageSize =500; + let pageIndex = 1; + const orders_list = await this.NewOrderList1(key,filters,MultiFilters,pageSize,pageIndex); + const rows = orders_list.rows; + let TemplateList = await this.LoadTemplateListInOrderList(key); + let TemplateLists = []; + for(let i=0;i-1){ + TemplateLists.push(TemplateList.Data[i]); + } + } + if(TemplateLists.length==0){ + hasError = `快递${expressName}在店管家中无对应的模板,如果有,可以更改店管家中自定义模板名称包含\"${expressName}\",再重试`; + break; + } + let orderPls = {}; + for(let i = 0;i0 && rr.OrderTags[0].TagValue=="douyin") || rr.ExtField1=="douyin"){ + rr.PlatformType="TouTiao"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="pinduoduo") || rr.ExtField1=="pinduoduo"){ + rr.PlatformType="Pinduoduo"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="xiaohongshu") || rr.ExtField1=="xiaohongshu"){ + rr.PlatformType="XiaoHongShu"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="kuaishou") || rr.ExtField1=="kuaishou"){ + rr.PlatformType="KuaiShou"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="kuaishou") || rr.ExtField1=="kuaishou"){ + rr.PlatformType="KuaiShou"; + }else{ + rr.PlatformType="Taobao"; + } + }else if(rr.PlatformType=="AlibabaC2M"){ + rr.PlatformType="Taobao"; + } + if(rr.PlatformType=="Other_Heliang"){ + for(let ii = 0;ii value !== null && value !== undefined && value !== ''); + console.log("order_item",order_item,pingtais_default_PlatformType,order_item[1]); + if(order_item[0]==rr.PlatformOrderId){ + rr.PlatformType = pingtais_default_PlatformType[order_item[1]]; + } + } + } + if(rr.PlatformType in orderPls){ + orderPls[rr.PlatformType].orders.push(rr); + }else{ + orderPls[rr.PlatformType] = {orders:[rr],Template:[]} + } + } + for(let PlatformType in orderPls){ + let rr = orderPls[PlatformType]; + let Template = null; + for(let i=0;i0){ + if(r[key2].orders[index_order].WaybillCodes[0].TemplateId!=r[key2].Template.Id){ + continue; + } + } + orders_tmp.push(r[key2].orders[index_order]); + } + let orders = await this.arrayChunk(orders_tmp, 10); + await Promise.all(orders.map(async (order) => { + let res = []; + if (key2 === "Pinduoduo") { + res = await this.ExpressPrint(key, order, r[key2].Template, true); + } else { + res = await this.ExpressPrint(key, order, r[key2].Template, false); + } + list.push({ Platform: key2, print_datas: res }); + })); + } + } + return list; + } + async Print2(order,expressName){ + console.log(order); + const pingtais_default_PlatformType = { + "1":"Taobao", + "3":"JingdongPurchase", + "4":"Pinduoduo", + "5":"TouTiao", + "6":"KuaiShou", + "7":"WxVideo", + "8":"XiaoHongShu" + }; + const pingtais = { + "1":"ali", + "6":"ali", + "8":"ali", + "4":"pdd", + "5":"dd", + "7":"ali", + "3":"jd" + }; + let opingtai = null; + let orders_arr = order.split("|").filter(value => value !== null && value !== undefined && value !== ''); + let pingtaiOrder = {}; + let hasError = null; + let tmp_list = []; + let fin_list = []; + for(let i = 0;i value !== null && value !== undefined && value !== ''); + let res = await this.app.redis.get("post_order_cache").get(order_item[0]); + if(res){ + + console.log(res,"订单锁定,跳过"); + continue; + }else{ + console.log("订单无锁"); + if(order_item){ + await this.app.redis.get("post_order_cache").set(order_item[0],1,'EX',600); + fin_list.push(order_item[0]); + } + } + if (!order_item.hasOwnProperty(1)) { + hasError = `${r},orders入参错误,格式为外部订单编号,平台编号|外部订单编号,平台编号,传入的值为${order}`; + break; + } + let pingtai = (order_item[1] in pingtais)?pingtais[order_item[1]]:null; + if(order_item.hasOwnProperty(2) && order_item[2]=="1"){ + opingtai = pingtai; + pingtai = "ali"; + } + if(!pingtai){ + hasError = `${order_item[1]}在程序中pingtais无对应键值`; + break; + } + if(pingtai in pingtaiOrder){ + pingtaiOrder[pingtai].push(order_item[0]); + }else{ + pingtaiOrder[pingtai] = [order_item[0]]; + } + } + if(hasError){ + return {code:0,msg:hasError}; + } + let pingtaiOrder2 = {}; + for(let key in pingtaiOrder){ + let filters = [ + { + TableAlias:"o", + FieldType:"string", + TableName:"LogicOrder", + Name:"PlatformOrderId", + Value:pingtaiOrder[key].join(","), + Contract:"in", + CustomQuery:"PlatformOrderIdSearch" + }, + ]; + let MultiFilters = []; + let pageSize =500; + let pageIndex = 1; + const orders_list = await this.NewOrderList1(key,filters,MultiFilters,pageSize,pageIndex); + const rows = orders_list.rows; + let TemplateList = await this.LoadTemplateListInOrderList(key); + let TemplateLists = []; + for(let i=0;i-1){ + TemplateLists.push(TemplateList.Data[i]); + } + } + if(expressName=="京东快递"){ + console.log("TemplateLists",TemplateLists); + } + if(TemplateLists.length==0){ + hasError = `快递${expressName}在店管家中无对应的模板,如果有,可以更改店管家中自定义模板名称包含\"${expressName}\",再重试`; + break; + } + let orderPls = {}; + for(let i = 0;i0 && rr.OrderTags[0].TagValue=="douyin") || rr.ExtField1=="douyin"){ + rr.PlatformType="TouTiao"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="pinduoduo") || rr.ExtField1=="pinduoduo"){ + rr.PlatformType="Pinduoduo"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="xiaohongshu") || rr.ExtField1=="xiaohongshu"){ + rr.PlatformType="XiaoHongShu"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="kuaishou") || rr.ExtField1=="kuaishou"){ + rr.PlatformType="KuaiShou"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="kuaishou") || rr.ExtField1=="kuaishou"){ + rr.PlatformType="KuaiShou"; + }else{ + rr.PlatformType="Taobao"; + } + }else if(rr.PlatformType=="AlibabaC2M"){ + rr.PlatformType="Taobao"; + } + if(rr.PlatformType=="Other_Heliang"){ + for(let ii = 0;ii value !== null && value !== undefined && value !== ''); + console.log("order_item",order_item,pingtais_default_PlatformType,order_item[1]); + if(order_item[0]==rr.PlatformOrderId){ + rr.PlatformType = pingtais_default_PlatformType[order_item[1]]; + } + } + } + if(rr.PlatformType=="JingdongPurchase"){ + rr.PlatformType="Jingdong"; + } + if(rr.PlatformType in orderPls){ + orderPls[rr.PlatformType].orders.push(rr); + }else{ + orderPls[rr.PlatformType] = {orders:[rr],Template:[]} + } + } + for(let PlatformType in orderPls){ + let rr = orderPls[PlatformType]; + let Template = null; + for(let i=0;i0){ + if(r[key2].orders[index_order].WaybillCodes[0].TemplateId!=r[key2].Template.Id){ + continue; + } + } + orders_tmp.push(r[key2].orders[index_order]); + } + let orders = await this.arrayChunk(orders_tmp, 10); + await Promise.all(orders.map(async (order) => { + let res = []; + if (key2 === "Pinduoduo") { + res = await this.ExpressPrint(key, order, r[key2].Template, true); + } else { + res = await this.ExpressPrint(key, order, r[key2].Template, false); + } + list.push({ Platform: key2, print_datas: res }); + })); + } + } + for(let i=0;i value !== null && value !== undefined && value !== ''); + let pingtaiOrder = {}; + let hasError = null; + let tmp_list = []; + let fin_list = []; + for(let i = 0;i value !== null && value !== undefined && value !== ''); + let res = await this.app.redis.get("post_order_cache").get(order_item[0]); + if(res){ + + console.log(res,"订单锁定,跳过"); + continue; + }else{ + console.log("订单无锁"); + if(order_item){ + await this.app.redis.get("post_order_cache").set(order_item[0],1,'EX',600); + fin_list.push(order_item[0]); + } + } + if (!order_item.hasOwnProperty(1)) { + hasError = `${r},orders入参错误,格式为外部订单编号,平台编号|外部订单编号,平台编号,传入的值为${order}`; + break; + } + let pingtai = (order_item[1] in pingtais)?pingtais[order_item[1]]:null; + if(order_item.hasOwnProperty(2) && order_item[2]=="1"){ + opingtai = pingtai; + pingtai = "ali"; + } + if(!pingtai){ + hasError = `${order_item[1]}在程序中pingtais无对应键值`; + break; + } + if(pingtai in pingtaiOrder){ + pingtaiOrder[pingtai].push(order_item[0]); + }else{ + pingtaiOrder[pingtai] = [order_item[0]]; + } + } + if(hasError){ + return {code:0,msg:hasError}; + } + let pingtaiOrder2 = {}; + for(let key in pingtaiOrder){ + let filters = [ + { + TableAlias:"o", + FieldType:"string", + TableName:"LogicOrder", + Name:"PlatformOrderId", + Value:pingtaiOrder[key].join(","), + Contract:"in", + CustomQuery:"PlatformOrderIdSearch" + }, + ]; + let MultiFilters = []; + let pageSize =500; + let pageIndex = 1; + const orders_list = await this.NewOrderList1(key,filters,MultiFilters,pageSize,pageIndex); + const rows = orders_list.rows; + let TemplateList = await this.LoadTemplateListInOrderList(key); + let TemplateLists = []; + for(let i=0;i-1){ + TemplateLists.push(TemplateList.Data[i]); + } + } + if(expressName=="京东快递"){ + console.log("TemplateLists",TemplateLists); + } + if(TemplateLists.length==0){ + hasError = `快递${expressName}在店管家中无对应的模板,如果有,可以更改店管家中自定义模板名称包含\"${expressName}\",再重试`; + break; + } + let orderPls = {}; + for(let i = 0;i0 && rr.OrderTags[0].TagValue=="douyin") || rr.ExtField1=="douyin"){ + rr.PlatformType="TouTiao"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="pinduoduo") || rr.ExtField1=="pinduoduo"){ + rr.PlatformType="Pinduoduo"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="xiaohongshu") || rr.ExtField1=="xiaohongshu"){ + rr.PlatformType="XiaoHongShu"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="kuaishou") || rr.ExtField1=="kuaishou"){ + rr.PlatformType="KuaiShou"; + }else if((rr.OrderTags.length>0 && rr.OrderTags[0].TagValue=="kuaishou") || rr.ExtField1=="kuaishou"){ + rr.PlatformType="KuaiShou"; + }else{ + rr.PlatformType="Taobao"; + } + }else if(rr.PlatformType=="AlibabaC2M"){ + rr.PlatformType="Taobao"; + } + if(rr.PlatformType=="Other_Heliang"){ + for(let ii = 0;ii value !== null && value !== undefined && value !== ''); + console.log("order_item",order_item,pingtais_default_PlatformType,order_item[1]); + if(order_item[0]==rr.PlatformOrderId){ + rr.PlatformType = pingtais_default_PlatformType[order_item[1]]; + } + } + } + if(rr.PlatformType=="JingdongPurchase"){ + rr.PlatformType="Jingdong"; + } + if(rr.PlatformType in orderPls){ + orderPls[rr.PlatformType].orders.push(rr); + }else{ + orderPls[rr.PlatformType] = {orders:[rr],Template:[]} + } + } + for(let PlatformType in orderPls){ + let rr = orderPls[PlatformType]; + let Template = null; + for(let i=0;i0){ + if(r[key2].orders[index_order].WaybillCodes[0].TemplateId!=r[key2].Template.Id){ + continue; + } + } + orders_tmp.push(r[key2].orders[index_order]); + } + let orders = await this.arrayChunk(orders_tmp, 10); + await Promise.all(orders.map(async (order) => { + let res = []; + if (key2 === "Pinduoduo") { + res = await this.ExpressPrint(key, order, r[key2].Template, true); + } else { + res = await this.ExpressPrint(key, order, r[key2].Template, false); + } + list.push({ Platform: key2, print_datas: res }); + })); + } + } + for(let i=0;i + array.slice(index * size, index * size + size) + ); + } + async NewOrderList1(pingtai,filters,MultiFilters,pageSize,pageIndex){ + let parmas = { + pingtai:pingtai, + filters:filters, + MultiFilters:MultiFilters, + pageSize:pageSize, + pageIndex:pageIndex + }; + const apiUrl = 'https://ye4s.wms.gztbyc.com/index/wms/Dianguanjia/NewOrderListout'; + try { + const response = await axios.post(apiUrl, parmas); + return response.data; + } catch (error) { + console.log("error",error); + return 0; + } + } + async LoadTemplateListInOrderList(pingtai){ + let parmas = { + pingtai:pingtai + }; + const apiUrl = 'https://ye4s.wms.gztbyc.com/index/wms/Dianguanjia/LoadTemplateListInOrderListout'; + try { + const response = await axios.post(apiUrl, parmas); + return response.data; + } catch (error) { + console.log("error",error); + return error; + } + } + async ExpressPrint(pingtai,orders,Template,isPdd=false){ + let parmas = { + pingtai:pingtai, + orderList:orders, + Template:Template, + ispdd:isPdd + }; + const apiUrl = 'https://ye4s.wms.gztbyc.com/index/wms/Dianguanjia/ExpressPrintout'; + try { + const response = await axios.post(apiUrl, parmas); + return response.data; + } catch (error) { + console.log("error",error); + return error; + } + } + async CreateOrder(orders){ + let faileCount = 0; + await Promise.all(orders.map(async (order) => { + let res = await this.query_createOrder(order); + if(!res){ + faileCount++; + } + })); + return faileCount; + } + async query_createOrder(order_data){ + const apiUrl = 'https://ye4s.wms.gztbyc.com/index/wms/Dianguanjia/order_create'; + if(order_data.length<26){ + return false; + } + let parmas = {order:order_data}; + console.log(parmas); + try { + const response = await axios.post(apiUrl, parmas); + return response.data; + } catch (error) { + console.log("error",error); + return error; + } + } +} +module.exports = Dgj; \ No newline at end of file diff --git a/app/service/express.js b/app/service/express.js new file mode 100644 index 0000000..0010975 --- /dev/null +++ b/app/service/express.js @@ -0,0 +1,51 @@ +const Service = require('egg').Service; +const { v4: uuidv4 } = require('uuid'); +const axios = require('axios'); + +class Express extends Service { + async aotoCheckLanshou(){ + let orders = await this.app.mysql.get('dbwms').query(` + select POSTNUM,POSTCODE from yj_wmsorder where DISPLAYFLAG=0 and OPERATERECORDS not like "%揽收%" and WAREHOUSEID=5400 and POSTFLAG=1 and POSTCODE in ('p01','p02','p03','p04','p32'); + `); + let pageSize = 200; + let responses = []; + let page_count = parseInt(orders.length / pageSize); + const apiUrl = 'http://express.gztbyc.com/query_tasks2'; + for (let i = 0; i < page_count+1; i++) { + const promises = orders.slice(i*pageSize, (i+1)*pageSize).map(async order => { + try { + /* code */ + let parmas = [`${order.POSTNUM}|${order.POSTNUM}|${order.POSTCODE}`]; + const response = await axios.post(apiUrl, parmas); + if(response.data.length>0){ + responses.push(response.data[0].waybillNo); + } + } catch (e) { + console.log(e); + } + }) + await Promise.all(promises); + } + let postnums = responses.map(item=>{ + return `'${item}'`; + }) + postnums = postnums.join(",") + const currentTime =await this.getCurrentChinaTime(); + let sql = `UPDATE yj_wmsorder SET OPERATERECORDS = CONCAT(OPERATERECORDS, '检测到揽收;${currentTime};自动任务|') WHERE POSTNUM IN (${postnums})`; + const result = await this.app.mysql.get('dbwms').query(sql); + return [result,postnums]; + } + async getCurrentChinaTime() { + const now = new Date(); + + const year = now.getFullYear(); + const month = String(now.getMonth() + 1).padStart(2, '0'); // 补零 + const day = String(now.getDate()).padStart(2, '0'); // 补零 + const hours = String(now.getHours()).padStart(2, '0'); // 补零 + const minutes = String(now.getMinutes()).padStart(2, '0'); // 补零 + const seconds = String(now.getSeconds()).padStart(2, '0'); // 补零 + + return `${year}年${month}月${day}日 ${hours}:${minutes}:${seconds}`; + } +} +module.exports = Express; \ No newline at end of file diff --git a/app/service/gzt.js b/app/service/gzt.js new file mode 100644 index 0000000..4df06e8 --- /dev/null +++ b/app/service/gzt.js @@ -0,0 +1,507 @@ +const Service = require('egg').Service; +const { v4: uuidv4 } = require('uuid'); +const axios = require('axios'); +const fs = require('fs'); +class Gzt extends Service { + async index(){ + let task = await this.app.mysql.get('dblocal').query(`select * from ye4s_warehouse`); + return task; + } + async getBindCode(sid){ + const {ctx} = this; + let ssid = ctx.socket.id; + if(sid){ + ssid = sid; + } + let code = uuidv4(); + this.app.redis.get("cache").set(`bindcode_${code}`,ssid,'EX',200); + return `https://ye4s.wms.gztbyc.com/qrcode/build?text=${code}&label=&logo=0&labelalignment=center&foreground=%23000000&background=%23ffffff&size=300&padding=10&logosize=50&labelfontsize=14&errorcorrection=medium`; + } + async startRecording(gztid,grabnum){ + let apiUrl = "http://file2.gztbyc.com/startRecording"; + const params = new URLSearchParams(); + params.append('id', gztid); + params.append('code', grabnum); + try { + const response = await axios.post(apiUrl, params, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }); + return response.data; + } catch (error) { + //console.log("error",error); + return error; + } + } + async getBindInfo(code){ + const {ctx} = this; + const sid = ctx.socket.id; + let results = {}; + let gzt = await this.getGztByCode(code); + if(!gzt){ + return {}; + } + await this.app.redis.get('cache').set(`gzt_${gzt.id}`,sid); + gzt.user = await this.getUser(gzt.workers_ids); + gzt.work = await this.getWork(gzt.work_id); + if(gzt.user){ + this.todayCount(sid,gzt.user.id,gzt.wareHouseId); + } + this.scanLogger(sid,gzt.id,gzt.wareHouseId); + return gzt; + } + async todayCount(sid,userid,WAREHOUSEID){ + if(!userid){ + return false; + } + let WAREHOUSE = await this.app.mysql.get('dblocal').get('ye4s_warehouse',{WAREHOUSEID:WAREHOUSEID}); + let workDate = WAREHOUSE.workDate; + const counts = await this.app.mysql.get('dblocal').query( + `select COALESCE(SUM(dabaos), 0) as orderCount,COALESCE(SUM(GOODSCOUNT), 0) as GOODSCOUNT from ye4s_workers_works where WAREHOUSEID=? and userId=? and workDate=?`, + [WAREHOUSEID, userid, workDate] + ); + const todayCountData = { + orderCount:parseInt(counts[0].orderCount), + GOODSCOUNT:parseInt(counts[0].GOODSCOUNT) + } + this._push(sid, 'todayCount', todayCountData); + } + async getMyWork(sid,userid,WAREHOUSEID){ + const lastOrder = await this.app.mysql.get('dblocal').get('ye4s_workers_works', { + userId: userid, + dabaos: 1, + WAREHOUSEID:WAREHOUSEID + }, { + orders: [['createtime', 'desc']], // 按 createtime 降序排序 + limit: 1, // 限制只获取一行数据 + }); + let order = await this.app.mysql.get('dbwms').get(`yj_wmsorder`,{POSTNUM:lastOrder.POSTNUM}); + const pack = await this.app.mysql.get('dbwms').get(`yj_pack`,{ID:order.PACKID,WAREHOUSEID:WAREHOUSEID}); + order.PACKNAME = pack?pack.NAME:""; + order.items = order.ITEMS.split("|").filter(item => item !== undefined && item !== null && item !== '').map(item=>{ + let tmp_item = item.split(","); + return [tmp_item[2]+tmp_item[3],tmp_item[1]]; + }); + this._push(sid, 'order', order); + } + async scan2(barcode,gztid){ + await this.appendToFile(`${barcode},${gztid}`); + return 1; + } + async appendToFile(contentToAppend) { + const filePath = `app/public/scan_logs.txt`; + + // 追加内容到文件 + fs.appendFile(filePath, contentToAppend+"\n", (err) => { + if (err) { + //console.error('Error appending to file:', err); + return; + } + //console.log('Content was appended to file successfully.'); + }); + } + async scan(barcode,gztid){ + const {ctx} = this; + ctx.logger.info(`[scan] 开始处理 | barcode=${barcode} | gztid=${gztid}`); + const sid = await this.app.redis.get('cache').get(`gzt_${gztid}`); + const gzt = await this.getGztInfo(gztid); + if(!gzt){ + ctx.logger.warn(`[scan] 工作台不存在 | gztid=${gztid}`); + return 0; + } + ctx.logger.info(`[scan] 工作台信息 | gztid=${gztid} | WAREHOUSEID=${gzt.WAREHOUSEID} | userid=${gzt.userid} | wms_order_ids=${gzt.wms_order_ids}`); + console.log("gzt",gzt); + let logininfo = ""; + try { + const tmp = JSON.parse(atob(barcode)); + if(tmp.uuid){ + ctx.logger.info(`[scan] 识别为工牌 | uuid=${tmp.uuid}`); + const user = await this.getUserIdByUUid(barcode); + //console.log(user); + if(user){ + ctx.logger.info(`[scan] 工牌用户有效 | userId=${user.id} | 当前工作台用户=${gzt.userid}`); + this.scanLogger(sid,gztid,5400,"工牌"); + if(gzt.userid==user.id){ + //登出 + this._push(sid, 'logout', user); + //打包完成 + if(gzt.work_id){ + await this.app.mysql.get('dblocal').update("ye4s_workers_works",{updatetime:Math.round(new Date() / 1000)},{where:{id:gzt.work_id}}); + this.stopVideo(gzt); + } + // 登出时发送结束打包任务(通知外部WMS) + await this._finishPack({ + workbench_id: gzt.other_id || gztid, + warehouse_id: gzt.WAREHOUSEID, + }); + await this.app.mysql.get('dblocal').update("ye4s_gzt",{workers_ids:null,work_id:null},{where:{id:gztid}}); + }else{ + //其他工作台登出 + const other_gzt = await this.app.mysql.get('dblocal').get("ye4s_gzt",{workers_ids:user.id.toString(),type:2}); + if(other_gzt){ + if(other_gzt.work_id){ + await this.app.mysql.get('dblocal').update("ye4s_workers_works",{updatetime:Math.round(new Date() / 1000)},{where:{id:other_gzt.work_id}}); + this.stopVideo(other_gzt); + } + await this.app.mysql.get('dblocal').update("ye4s_gzt",{workers_ids:null,work_id:null},{where:{id:other_gzt.id}}); + + const other_sid = await this.app.redis.get('cache').get(`gzt_${other_gzt.id}`); + if(other_sid){ + this._push(other_sid, 'logout', user); + } + } + //登入 + await this.app.mysql.get('dblocal').update("ye4s_gzt",{workers_ids:user.id},{where:{id:gztid}}); + //登入通知工作台 + if(sid){ + this._push(sid, 'login', user); + } + this.todayCount(sid,user.id,gzt.WAREHOUSEID); + } + }else{ + throw new Error("无用户"); + } + }else{ + throw new Error("非工牌"); + } + } catch (e) { + ctx.logger.info(`[scan] 非工牌,进入订单/包材判断 | barcode=${barcode}`); + // 非工牌,判断是包材还是订单 + const pack = await this.app.redis.get("cache").get(`pack_${barcode}`); + if (pack) { + ctx.logger.info(`[scan] 识别为包材 | barcode=${barcode} | wms_order_ids=${gzt.wms_order_ids}`); + if (!gzt.wms_order_ids) { + ctx.logger.info(`[scan] 包材-无打包订单,拒绝 | barcode=${barcode}`); + this._push(sid, 'msg', '当前无打包订单,不需要扫描包材'); + } else { + ctx.logger.info(`[scan] 包材-绑定打包 | barcode=${barcode}`); + this.bindPack(); + } + } else { + ctx.logger.info(`[scan] 非包材,查询订单 | barcode=${barcode} | WAREHOUSEID=${gzt.WAREHOUSEID}`); + // 尝试本地订单 → 外部WMS → 无记录 + let order = await this.getOrderInfo(barcode.replace(/-1-1-/g, ''), gzt.WAREHOUSEID); + let isWmsOrder = false; + if (!order) { + ctx.logger.info(`[scan] 本地订单未找到,查询外部WMS | barcode=${barcode}`); + const wmsResult = await this.ctx.service.newWms.queryOrder(barcode, gzt.WAREHOUSEID); + if (wmsResult && wmsResult.success) { + ctx.logger.info(`[scan] 外部WMS订单命中 | barcode=${barcode}`); + order = wmsResult.data; + isWmsOrder = true; + } else { + ctx.logger.info(`[scan] 外部WMS也未找到 | barcode=${barcode}`); + } + } else { + ctx.logger.info(`[scan] 本地订单命中 | barcode=${barcode} | PLSENDFLAG=${order.PLSENDFLAG}`); + } + + if (order) { + if (!gzt.userid) { + ctx.logger.info(`[scan] 订单-未登录,拒绝打包 | barcode=${barcode}`); + this._push(sid, 'msg', '请先扫描工号登陆'); + } else if (isWmsOrder) { + ctx.logger.info(`[scan] 订单-外部WMS打包 | barcode=${barcode}`); + // 外部WMS订单:回传打包状态到外部 + await this._packWmsOrder(gzt, order, sid); + } else if (order.PLSENDFLAG === 0) { + ctx.logger.info(`[scan] 订单-未复核,拒绝打包 | barcode=${barcode} | PLSENDFLAG=${order.PLSENDFLAG}`); + this._push(sid, 'msg', '订单未复核'); + } else { + ctx.logger.info(`[scan] 订单-本地打包 | barcode=${barcode} | grabnum=${order.grabnum}`); + await this._packOrder(gzt, order, sid); + } + } else { + ctx.logger.info(`[scan] 无记录 | barcode=${barcode}`); + this._push(sid, 'msg', '无记录'); + } + } + this.scanLogger(sid, gztid, 5400, barcode); + ctx.logger.info(`[scan] 处理完成 | barcode=${barcode}`); + } + return 1; + } + // 本地订单打包处理 + async _packOrder(gzt, order, sid) { + const { ctx } = this; + + // 当前订单非外部仓库时,检测上一个订单是否是外部WMS订单,如果是则发送结束任务 + if (order.types !== 4) { + const lastTask = await this.app.mysql.get('dblocal').query( + `select id from ye4s_workers_works + where gztid=? and WAREHOUSEID=? and types=4 and dabaos>0 + order by id desc limit 1`, + [gzt.gztid, gzt.WAREHOUSEID] + ); + if (lastTask && lastTask.length > 0) { + ctx.logger.info(`[_packOrder] 检测到上一个订单为外部WMS,发送结束任务 | gztid=${gzt.gztid} | other_id=${gzt.other_id}`); + await this._finishPack({ + workbench_id: gzt.other_id || gzt.gztid, + warehouse_id: gzt.WAREHOUSEID, + }); + } + } + + const lastTime = Math.round(new Date() / 1000) - 864000; + const dupField = order.isSandan == 1 ? 'POSTNUM' : 'grabnum'; + const dupValue = order.isSandan == 1 ? order.POSTNUM : order.grabnum; + const line = await this.app.mysql.get('dblocal').query( + `select id from ye4s_workers_works where ${dupField}=? and dabaos>0 and createtime>?`, + [dupValue, lastTime] + ); + if (line.length > 0) { + const Name = order.isSandan == 1 ? order.POSTNUM : order.grabnum; + this._push(sid, 'msg', `${Name}已打包`); + return; + } + try { + order.userId = gzt.userid; + order.gztid = gzt.gztid; + delete order.PLSENDFLAG; + const row = await this.app.mysql.get('dblocal').insert("ye4s_workers_works", order); + const packorder = await this.getWork(row.insertId); + this._push(sid, 'order', packorder); + if (sid) { + this.todayCount(sid, gzt.userid, gzt.WAREHOUSEID); + } + const record_res = await this.startRecording(gzt.gztid, order.isSandan == 1 ? order.POSTNUM : order.grabnum); + await this.app.mysql.get('dblocal').update("ye4s_workers_works", { updatetime: Math.round(new Date() / 1000) }, { where: { id: gzt.work_id } }); + await this.app.mysql.get('dblocal').update("ye4s_gzt", { work_id: row.insertId, info: JSON.stringify(record_res) }, { where: { id: gzt.gztid } }); + ctx.app.wsdl('addOperate', [gzt.WAREHOUSEID, order.isSandan == 1 ? order.POSTNUM : order.grabnum, gzt.wmsusername, `${gzt.user_real_name}/打包`]); + } catch (e) { + console.error("打包错误", e); + } + } + + // 外部WMS订单打包处理(仅回传给外部WMS,不写入本地DB) + async _packWmsOrder(gzt, order, sid) { + const { ctx } = this; + // 防重:Redis 标记 24h 内是否已回传 + const dupKey = `wms_pack_${order.POSTNUM}`; + const dup = await this.app.redis.get('cache').get(dupKey); + if (dup) { + this._push(sid, 'msg', `${order.POSTNUM}已打包`); + return; + } + try { + // 设置工作台ID,使用 gzt 表的 other_id + order.gztid = gzt.other_id || ''; + // 回传给外部WMS + const reportResult = await this.ctx.service.newWms.reportPackStatus(order); + if (!reportResult || reportResult.flag !== 'success') { + ctx.logger.warn(`[scan] 外部WMS回传失败 | POSTNUM=${order.POSTNUM} | result=`, reportResult); + this._push(sid, 'msg', '外部WMS回传失败'); + return; + } + // Redis 标记防重(24h) + await this.app.redis.get('cache').set(dupKey, '1', 'EX', 86400); + // 推送前端 + this._push(sid, 'order', order); + if (sid) { + this.todayCount(sid, gzt.userid, gzt.WAREHOUSEID); + } + ctx.app.wsdl('addOperate', [gzt.WAREHOUSEID, order.grabnum, gzt.wmsusername, `${gzt.user_real_name}/打包`]); + } catch (e) { + ctx.logger.error('[scan] WMS打包错误:', e); + console.error("WMS打包错误", e); + } + } + + // 结束打包任务:直接关闭该工作台最后一个未结束任务(不限订单) + // 与 _packOrder 的差异:_packOrder 是在新任务到来时关闭其他订单的旧任务; + // _finishPack 是直接关闭该工作台最后一个未结束任务 + async _finishPack({ workbench_id, warehouse_id }) { + const { ctx } = this; + if (!workbench_id) { + ctx.logger.warn('[_finishPack] workbench_id 不能为空'); + return { finished: false, message: 'workbench_id 不能为空' }; + } + if (!warehouse_id) { + ctx.logger.warn('[_finishPack] warehouse_id 不能为空'); + return { finished: false, message: 'warehouse_id 不能为空' }; + } + + // 查询该工作台下最新的打包任务(不限订单类型,不限是否WMS) + const lastTask = await this.app.mysql.get('dblocal').query( + `select id, grabnum, wms_order_ids, POSTNUM, createtime, types, dabaos from ye4s_workers_works + where gztid=? and WAREHOUSEID=? and dabaos>0 + order by id desc limit 1`, + [workbench_id, warehouse_id] + ); + + const end_time = Math.round(new Date() / 1000); + + // 始终通知外部WMS结束打包任务(即使本地无记录,外部WMS可能有自己的任务追踪) + try { + const wmsResult = await ctx.service.newWms.finishPack({ + workbench_id, + warehouse_id, + }); + ctx.logger.info(`[_finishPack] 外部WMS结束任务返回:`, JSON.stringify(wmsResult)); + } catch (e) { + ctx.logger.error('[_finishPack] 调用外部WMS结束任务异常:', e.message); + } + + if (!lastTask || lastTask.length === 0) { + ctx.logger.info(`[_finishPack] 本地无未结束的打包任务 | workbench_id=${workbench_id}`); + return { finished: false, message: '无未结束的打包任务' }; + } + + const task = lastTask[0]; + ctx.logger.info(`[_finishPack] 结束本地打包任务 | task_id=${task.id} | POSTNUM=${task.POSTNUM} | types=${task.types} | workbench_id=${workbench_id}`); + + return { + finished: true, + task_id: task.id, + order_id: task.wms_order_ids || task.POSTNUM, + end_time, + }; + } + + async bindPack(){ + + } + async startOrder(sid,gzt,WAREHOUSEID,orders){ + //开始打包 + //记录数据库 + //开启打包视频 + //推送信息到前端 + } + async stopVideo(gzt){ + //结束打包视频 + } + async getUser(userId){ + if(!userId){ + return {}; + } + let user_results = await this.app.mysql.get('dblocal').select(`ye4s_user`,{where:{id:userId},columns:['id','wms_userid','real_name']}); + return user_results?user_results[0]:{}; + } + async getWork(work_id){ + if(!work_id){ + return {}; + } + const work = await this.app.mysql.get("dblocal").select("ye4s_workers_works",{where:{id:work_id},columns:['grabnum','POSTNUM','items','dabaos','wms_order_ids','PACKNAME','GOODSCOUNT'],limit:1}); + let work_tmp = work.length>0?work[0]:{}; + if(work_tmp.items){ + work_tmp.items = work_tmp.items.split("|").filter(item1 => item1.trim()).map(item=>{ + return item.split(","); + }); + } + return work_tmp; + } + async getOrderInfo(postNumer,WAREHOUSEID){ + let datas = await this.app.redis.get("post_order_cache").get(`order:${WAREHOUSEID}:${postNumer}`); + if(!datas){ + datas = await this.getOrderInfoBySql(postNumer,WAREHOUSEID); + let datas_tmp = JSON.stringify(datas); + await this.app.redis.get("post_order_cache").set(`order:${WAREHOUSEID}:${postNumer}`,datas_tmp,'EX',60*60*6); + }else{ + datas = JSON.parse(datas); + } + return datas; + } + async getOrderInfoBySql(postNumer,WAREHOUSEID){ + const order_tmp = await this.app.mysql.get('dbwms').query( + `select order1.ID as ID,GRABNUM,POSTNUM,pack.NAME as PACKNAME,PLSENDFLAG,ITEMS from yj_wmsorder order1 left join yj_pack pack on pack.ID=order1.PACKID where order1.POSTNUM=? and order1.WAREHOUSEID=?`, + [postNumer, WAREHOUSEID] + ); + const order = order_tmp?order_tmp[0]:null; + if(!order){ + return null; + } + const WAREHOUSE = await this.app.mysql.get('dblocal').get('ye4s_warehouse',{WAREHOUSEID:WAREHOUSEID}); + const items_counts = order.ITEMS.split("|").map(item=>{ + let count = 0; + try { + count = parseInt(item.split(',')[1])?parseInt(item.split(',')[1]):0; + } catch (e) { + count = 0; + } + return count; + }) + let item_count=0; + items_counts.forEach(item=>{ + item_count+=item; + }) + let datas = { + dabaos:1, + workDate:WAREHOUSE.workDate, + userId:0, + types:3, + count:1, + grabnum:order.GRABNUM, + POSTNUM:postNumer, + WAREHOUSEID:WAREHOUSEID, + createtime:Math.round(new Date() / 1000), + workers:'', + GOODSCOUNT:item_count, + items:order.ITEMS, + orders:[order.POSTNUM].join(','), + wms_order_ids:[order.ID].join(','), + PACKNAME:order.PACKNAME, + isSandan:1, + PLSENDFLAG:order.PLSENDFLAG + } + if(order.GRABNUM.indexOf('B')>-1){ + //团购 + const orders = await this.app.mysql.get('dbwms').select("yj_wmsorder",{where:{GRABNUM:order.GRABNUM}}); + datas.dabaos = orders.length; + datas.count = orders.length; + datas.orders = orders.map(item=>{ + return item.POSTNUM; + }).join(','); + datas.wms_order_ids = orders.map(item=>{ + return item.ID; + }).join(','); + datas.GOODSCOUNT *= orders.length; + datas.isSandan = 0; + return datas; + }else{ + //散单 + return datas; + } + } + async getGztByCode(tmp_code){ + const results = await this.app.mysql.get('dblocal').select(`ye4s_gzt`,{where:{tmp_code:tmp_code},columns:['name','workers_ids','id','wareHouseId','work_id','sandanType','other_id'],limit:1}); + return results?results[0]:null; + } + async getGztInfo(gztid){ + const gzt = await this.app.mysql.get('dblocal').query( + `select gzt.wareHouseId as WAREHOUSEID,gzt.name as name,gzt.username as wmsusername,gzt.sandanType as sandanType,gzt.id as gztid,gzt.other_id as other_id,works.grabnum as grabnum,works.POSTNUM,works.items,works.dabaos,works.wms_order_ids,user.id as userid,user.real_name as user_real_name,gzt.work_id as work_id from ye4s_gzt gzt left join ye4s_workers_works works on works.id=gzt.work_id left join ye4s_user user on user.id=gzt.workers_ids where gzt.id=?`, + [gztid] + ); + return gzt?gzt[0]:null; + } + async getUserIdByUUid(uuid){ + const user = await this.app.mysql.get('dblocal').get("ye4s_user",{tmp_code:uuid}); + return user?user:null; + } + async scanLogger(sid,gzt_id,WAREHOUSEID,code=null){ + if(code){ + await this.app.mysql.get('dblocal').insert('ye4s_scan_logger',{code:code,gztid:gzt_id,createTime:Math.round(new Date() / 1000),WAREHOUSEID:WAREHOUSEID}); + } + const lastOrder = await this.app.mysql.get('dblocal').select('ye4s_scan_logger',{ + where:{ + gztid: gzt_id, + WAREHOUSEID:WAREHOUSEID + }, + columns:['code'], + orders: [['createtime', 'desc']], // 按 createtime 降序排序 + limit: 10, // 限制只获取一行数据 + }); + this._push(sid, 'scanLogger', lastOrder); + } + async order(sid,userid,WAREHOUSEID){ + let msg = "扫描成功,开始打包"; + this._push(sid, 'order', { orders: order, msg: msg }); + } + + // ========== IO 推送 ========== + _push(sid, method, data) { + if (!sid) return; + this.app.io.to(sid).emit('genericResponse', { method, data }); + } +} +module.exports = Gzt; \ No newline at end of file diff --git a/app/service/home.js b/app/service/home.js new file mode 100644 index 0000000..ea1d573 --- /dev/null +++ b/app/service/home.js @@ -0,0 +1,22 @@ +const Service = require('egg').Service; + +class Home extends Service { + async index(){ + let task = await this.app.mysql.get('dblocal').query(`select * from ye4s_warehouse`); + return task; + } + async getUserinfo(){ + const {ctx} = this; + let task = await ctx.app.wsdl('getPDAUser',['caige01', 'wu123456']); + let data = JSON.parse(task.return); + data.push(ctx.state.user); + data.push(ctx.state.wmsuser); + let rules = ctx.state.rules; + console.log(rules); + return data; + } + async exportWmsMonthOrderFile(){ + let task = await this.app.mysql.get('dbwms').query(`select * from ye4s_warehouse`); + } +} +module.exports = Home; \ No newline at end of file diff --git a/app/service/new_wms.js b/app/service/new_wms.js new file mode 100644 index 0000000..f99b96f --- /dev/null +++ b/app/service/new_wms.js @@ -0,0 +1,160 @@ +const Service = require('egg').Service; +const axios = require('axios'); + +// ========== 配置常量 ========== +const CONFIG = { + // 外部 WMS API 地址 + API: { + uri: 'http://127.0.0.1:6060/system', // WMS API + method: 'workbench.business', // query 参数: 业务模块 + version: '1.0', // query 参数: 版本号 + warehouseId: '1000028', // 仓库ID 常量 + }, + // 请求配置 + REQUEST: { + TIMEOUT: 5000, + HEADERS: { + 'Content-Type': 'application/json', + 'platform': 'web', + 'project': 'all', + }, + }, + // 订单类型标识 + ORDER_TYPE: 4, // 4 = 外部WMS订单 + // 打包状态值 + PACK_STATUS: 'packed', +}; + +class NewWms extends Service { + + // ========== 扫码查单 ========== + async queryOrder(barcode, WAREHOUSEID) { + try { + // 外部WMS固定使用配置的仓库ID,忽略内部传入的WAREHOUSEID + const warehouseId = CONFIG.API.warehouseId; + const params = { + method: CONFIG.API.method, + v: CONFIG.API.version, + timestamp: Math.round(Date.now() / 1000), + }; + const response = await axios.post(CONFIG.API.uri, { + name: 'queryOrder', + data: { barcode, warehouseId }, + }, { + params, + headers: CONFIG.REQUEST.HEADERS, + timeout: CONFIG.REQUEST.TIMEOUT, + }); + const result = response.data; + // WMS 返回 { flag, code, message, order, express, barcode, batch, ... } + this.ctx.logger.info(`[new_wms] WMS查单原始返回 | barcode=${barcode} | result=`, JSON.stringify(result)); + if (result && result.flag === 'success' && result.order) { + return { success: true, data: this._formatOrder(result, warehouseId, barcode) }; + } + return { success: false, message: result?.message || 'WMS 返回异常', wmsResult: result }; + } catch (err) { + this.ctx.logger.error('[new_wms] 查单失败:', err.message); + return null; + } + } + + // ========== 回传打包状态 ========== + async reportPackStatus(orderData) { + try { + const params = { + method: CONFIG.API.method, + v: CONFIG.API.version, + timestamp: Math.round(Date.now() / 1000), + }; + const postData = { + name: 'packOrder', + data: { + delivery_order_code: orderData._wms_delivery_order_code || orderData.POSTNUM, + wave_no: orderData.grabnum, + warehouse_id: orderData.WAREHOUSEID, + order_id: orderData.wms_order_ids || '', + workbench_id: orderData.gztid || '', + is_sandan: orderData.isSandan || 0, + wave_total_orders: orderData.wave_total_orders || orderData.dabaos || 0, + package_material_name: orderData.PACKNAME || '', + status: CONFIG.PACK_STATUS, + pack_time: Math.round(Date.now() / 1000), + }, + }; + this.ctx.logger.info('[new_wms] reportPackStatus 传参:', JSON.stringify(postData)); + const response = await axios.post(CONFIG.API.uri, postData, { + params, + headers: CONFIG.REQUEST.HEADERS, + timeout: CONFIG.REQUEST.TIMEOUT, + }); + return response.data; + } catch (err) { + this.ctx.logger.error('[new_wms] 回传打包状态失败:', err.message); + return null; + } + } + + // ========== 结束打包任务 ========== + async finishPack({ workbench_id, warehouse_id }) { + try { + // 外部WMS固定使用配置的仓库ID,忽略内部传入的WAREHOUSEID + const whId = CONFIG.API.warehouseId; + const params = { + method: CONFIG.API.method, + v: CONFIG.API.version, + timestamp: Math.round(Date.now() / 1000), + }; + const postData = { + name: 'finishPack', + data: { + workbench_id, + warehouse_id: whId, + finish_time: Math.round(Date.now() / 1000), + }, + }; + this.ctx.logger.info('[new_wms] finishPack 传参:', JSON.stringify(postData)); + const response = await axios.post(CONFIG.API.uri, postData, { + params, + headers: CONFIG.REQUEST.HEADERS, + timeout: CONFIG.REQUEST.TIMEOUT, + }); + return response.data; + } catch (err) { + this.ctx.logger.error('[new_wms] 结束打包任务失败:', err.message); + return null; + } + } + + // ========== 内部:订单数据格式化为系统统一格式 ========== + _formatOrder(wmsResult, WAREHOUSEID, barcode) { + const order = wmsResult.order || {}; + // items 在 WMS 返回的顶层,不在 order 内 + const wmsItems = wmsResult.items || []; + const formattedItems = wmsItems.map(item => [ + item.item_code || '', + item.item_name || '', + String(item.plan_qty || 1) + ]); + return { + dabaos: 1, + workDate: new Date().toISOString().slice(0, 10).replace(/-/g, ''), + userId: 0, + types: CONFIG.ORDER_TYPE, + count: order.items_count || 1, + grabnum: order.wave_no || '', + POSTNUM: wmsResult.barcode || barcode, + WAREHOUSEID: order.warehouse_id || WAREHOUSEID, + createtime: Math.round(new Date() / 1000), + workers: '', + GOODSCOUNT: order.items_total || order.items_count || 1, + items: formattedItems, + orders: order.delivery_order_code || '', + wms_order_ids: order.id || '', + PACKNAME: wmsResult.express?.package_material_name || '', + isSandan: wmsResult.isSandan || 0, + _wms_delivery_order_code: order.delivery_order_code || '', + }; + } +} + +module.exports = NewWms; diff --git a/app/service/query.js b/app/service/query.js new file mode 100644 index 0000000..1f0a0dc --- /dev/null +++ b/app/service/query.js @@ -0,0 +1,246 @@ +const Service = require('egg').Service; +class Query extends Service { + async gettime(dateString){ + var regex = /(\d{4})年(\d{1,2})月(\d{1,2})日 (\d{1,2}):(\d{1,2}):(\d{1,2})/; + var match = dateString.match(regex); + var year = parseInt(match[1]); + var month = parseInt(match[2]) - 1; // 月份从0开始计算,所以要减1 + var day = parseInt(match[3]); + var hour = parseInt(match[4]); + var minute = parseInt(match[5]); + var second = parseInt(match[6]); + + var timestamp = new Date(year, month, day, hour, minute, second).getTime(); + return timestamp; + } + async jhList(wareHouseId){ + let results = await this.app.mysql.get('dbwms').query(`select OPERATERECORDS,sum(GOODSCOUNT) as GOODSCOUNT,count(*) as ordercount,GRABNUM FROM yj_wmsorder where PICKINGFLAG = 3 and FLAG=0 and DISPLAYFLAG=0 and WAREHOUSEID=${wareHouseId} and GRABNUM like '%B%' group by GRABNUM` ); + let list = []; + for(var ii=0;ii value !== null && value !== undefined && value !== ''); + for(var i=0;i-1){ + results[ii].username = item2[2]; + results[ii].time = await this.gettime(item2[1]); + } + } + if(results[ii].username){ + list.push(results[ii]); + } + } + const jhList = list.sort((a,b)=>{ + return b.time-a.time; + }) + return jhList.slice(0,5); + } + async fhList(wareHouseId){ + let results = await this.app.mysql.get('dbwms').query(`select OPERATERECORDS,sum(GOODSCOUNT) as GOODSCOUNT,count(*) as ordercount,GRABNUM FROM yj_wmsorder where PLSENDFLAG = 1 and FLAG=0 and DISPLAYFLAG=0 and WAREHOUSEID=${wareHouseId} and GRABNUM like '%B%' group by GRABNUM` ); + let list = []; + for(var ii=0;ii-1){ + results[ii].username = item2[2]; + results[ii].time = await this.gettime(item2[1]); + } + } + if(results[ii].username){ + list.push(results[ii]); + } + } + const jhList = list.sort((a,b)=>{ + return b.time-a.time; + }) + return jhList.slice(0,5); + } + async getGzts(wareHouseId){ + const gzt = await this.app.mysql.get('dblocal').select('ye4s_gzt', {where:{wareHouseId:wareHouseId},orders: [['username','desc']]}); + const gztList = gzt.map(item2=>{ + let tmp = { + userid:item2.userid, + name:item2.name, + ordercount:item2.ordercount, + grabcount:item2.grabcount, + workers:item2.workers.split("|").filter(item => item), + grabnum:item2.grabnum, + }; + return tmp; + }) + let currentTime = Math.round(new Date() / 1000)-3600; + const WAREHOUSE = await this.app.mysql.get('dblocal').get("ye4s_warehouse",{WAREHOUSEID:wareHouseId}); + const gztWorkers = await this.app.mysql.get('dblocal').query(` + SELECT + userId, + SUM(dabaos) as ordercount, + COUNT(*) as grabcount + FROM + ye4s_workers_works + WHERE + WAREHOUSEID = ${wareHouseId} + AND workDate =${WAREHOUSE.workDate} + GROUP BY + userId; + `); + const gztWorkers2 = await this.app.mysql.get('dblocal').query(` + SELECT + userId, + SUM(dabaos) as ordercount, + COUNT(*) as grabcount + FROM + ye4s_workers_works + WHERE + WAREHOUSEID = ${wareHouseId} + AND workDate =${WAREHOUSE.workDate} + AND createtime >${currentTime} + GROUP BY + userId; + `); + let list = gztList.map(item => { + for (let i = 0; i < gztWorkers.length; i++) { + if (gztWorkers[i].userId.toString() === item.userid) { // 修改此处条件判断 + item.grabcount = gztWorkers[i].grabcount; + item.ordercount = gztWorkers[i].ordercount; + } + } + for (let i = 0; i < gztWorkers2.length; i++) { + if (gztWorkers2[i].userId.toString() === item.userid) { // 修改此处条件判断 + item.grabcount2 = gztWorkers2[i].grabcount; // 修改此处赋值 + item.ordercount2 = gztWorkers2[i].ordercount; // 修改此处赋值 + } + } + if (item.grabcount > 0 || item.grabnum !== '' || item.ordercount > 0 || item.workers.length > 0) { + return item; + } + }); + list = list.filter(n => n); + const gztLists = list.sort((a,b)=>{ + return b.ordercount-a.ordercount; + }) + return gztLists; + } + async getwarehouseName(wareHouseId){ + let results = await this.app.mysql.get('dbwms').get("yj_warehouse",{id:wareHouseId}); + return results.NAME; + } + async dfhList(wareHouseId){ + let results = await this.app.mysql.get('dbwms').query(`select OPERATERECORDS,GRABNUM FROM yj_wmsorder where PLSENDFLAG = 0 and FLAG=0 and PICKINGFLAG = 3 and DISPLAYFLAG=0 and WAREHOUSEID=${wareHouseId} and GRABNUM like '%B%' group by GRABNUM` ); + let list = []; + for(var ii=0;ii-1){ + results[ii].username = item2[2]; + results[ii].time = await this.gettime(item2[1]); + } + } + if(results[ii].username){ + list.push(results[ii]); + } + } + const jhList = list.sort((a,b)=>{ + return a.time-b.time; + }) + return jhList; + } + async ddbList(wareHouseId){ + let results = await this.app.mysql.get('dbwms').query(`select OPERATERECORDS,GRABNUM FROM yj_wmsorder where PLSENDFLAG = 1 and FLAG=0 and WAREHOUSEID=${wareHouseId} and DISPLAYFLAG=0 and GRABNUM like '%B%' and OPERATERECORDS not like '%打包%' group by GRABNUM` ); + let list = []; + for(var ii=0;ii-1){ + results[ii].username = item2[2]; + results[ii].time = await this.gettime(item2[1]); + } + } + if(results[ii].username){ + list.push(results[ii]); + } + } + const GRABNUMs = list.map((item)=>{ + return `'${item.GRABNUM}'`; + }); + const query_string = GRABNUMs.join(","); + let has_results = []; + if(query_string){ + has_results = await this.app.mysql.get('dblocal').query(`select GRABNUM from ye4s_workers_works where grabnum in (${query_string}) and dabaos>0`); + } + for (var ii = 0; ii < list.length; ii++) { + for (var iii = 0; iii < has_results.length; iii++) { + if (list[ii]&&list[ii].GRABNUM === has_results[iii].GRABNUM) { + list.splice(ii, 1); // 从 list 中删除索引为 ii 的元素 + ii--; // 调整 ii 的值,因为数组长度减少了一个 + } + } + } + const jhList = list.sort((a,b)=>{ + return a.time-b.time; + }) + return jhList; + } + async djhList(wareHouseId){ + let results = await this.app.mysql.get('dbwms').query(`select OPERATERECORDS,GRABNUM FROM yj_wmsorder where PICKINGFLAG = 0 and FLAG=0 and WAREHOUSEID=${wareHouseId} and DISPLAYFLAG=0 and GRABNUM like '%B%' and OPERATERECORDS like '%领取快递面单%' group by GRABNUM` ); + let list = []; + for(var ii=0;ii-1){ + results[ii].username = item2[2]; + results[ii].time = await this.gettime(item2[1]); + } + } + if(results[ii].username){ + list.push(results[ii]); + } + } + const jhList = list.sort((a,b)=>{ + return a.time-b.time; + }) + return jhList; + } + async dllList(wareHouseId){ + let results = await this.app.mysql.get('dbwms').query(`select a.GRABNUM as GRABNUM,a.OPERATERECORDS as OPERATERECORDS,CAST(b.CREATIONDATE as SIGNED) as time FROM yj_wmsorder a left join yj_grabprint b on a.GRABNUM = b.GRABNUM and a.WAREHOUSEID=b.WAREHOUSEID and a.POSTCODE=b.POSTCODE where a.PRINTTIMES=1 and a.PICKINGFLAG=0 and a.WAREHOUSEID=${wareHouseId} and a.GRABNUM like '%B%' and a.DISPLAYFLAG=0 and a.OPERATERECORDS not like '%领取快递面单%' group by a.GRABNUM` ); + let list =[]; + for(var ii=0;ii-1){ + results[ii].time = await this.gettime(item2[1]); + } + } + } + delete results[ii].OPERATERECORDS; + list.push(results[ii]); + } + const jhList = list.sort((a,b)=>{ + return a.time-b.time; + }) + return jhList; + } +} +module.exports = Query; \ No newline at end of file diff --git a/app/service/sandan.js b/app/service/sandan.js new file mode 100644 index 0000000..3cb922b --- /dev/null +++ b/app/service/sandan.js @@ -0,0 +1,9 @@ +const Service = require('egg').Service; + +class Sandan extends Service { + async scan(data){ + console.log("扫描上传内容",data); + return data; + } +} +module.exports = Sandan; \ No newline at end of file diff --git a/app/service/system.js b/app/service/system.js new file mode 100644 index 0000000..c9ee347 --- /dev/null +++ b/app/service/system.js @@ -0,0 +1,44 @@ +'use strict'; + +const Service = require('egg').Service; + +/** + * 通用方法调度服务 + * method 固定为 workbench.business,name 为变量入参 + */ +class SystemService extends Service { + + /** + * 调度入口 + * @param {string} name - 操作名称 + * @param {object} data - 请求数据 + */ + async dispatch(name, data) { + const { ctx } = this; + + // method 固定为 workbench.business,调用 workbench service + if (ctx.service.workbench) { + return await this._callService(ctx.service.workbench, name, data); + } + + return { + success: false, + message: `workbench 服务未实现`, + }; + } + + /** + * 调用 service 实例上的指定方法 + */ + async _callService(serviceInstance, name, data) { + if (!serviceInstance || typeof serviceInstance[name] !== 'function') { + return { + success: false, + message: `方法 ${name} 不存在`, + }; + } + return await serviceInstance[name](data); + } +} + +module.exports = SystemService; diff --git a/app/service/tgdp.js b/app/service/tgdp.js new file mode 100644 index 0000000..95ec59a --- /dev/null +++ b/app/service/tgdp.js @@ -0,0 +1,110 @@ +const Service = require('egg').Service; + +class Tgdp extends Service { + async index(){ + let task = await this.app.mysql.get('dblocal').query(`select * from ye4s_warehouse`); + return task; + } + async getUserinfo(){ + const {ctx} = this; + let task = await ctx.app.wsdl('getPDAUser',['caige01', 'wu123456']); + let data = JSON.parse(task.return); + data.push(ctx.state.user); + data.push(ctx.state.wmsuser); + let rules = ctx.state.rules; + return data; + } + async getAllinfo(wareHouseId){ + const jhList = await this.ctx.service.query.jhList(wareHouseId); + const fhList = await this.ctx.service.query.fhList(wareHouseId); + const ddbList = await this.ctx.service.query.ddbList(wareHouseId); + const dfhList = await this.ctx.service.query.dfhList(wareHouseId); + const djhList = await this.ctx.service.query.djhList(wareHouseId); + const dllList = await this.ctx.service.query.dllList(wareHouseId); + const gztList = await this.ctx.service.query.getGzts(wareHouseId); + const warehouseName = await this.ctx.service.query.getwarehouseName(wareHouseId); + return { + jhList: jhList, + fhList:fhList, + ddbList:ddbList, + dfhList:dfhList, + djhList:djhList, + dllList:dllList, + gztList:gztList, + warehouseName:warehouseName + } + } + async AllList(){ + const {ctx} = this; + const data = await this.getAllinfo(ctx.socket.userinfo.warehouseid); + return data; + } + async dll(){ + const {ctx} = this; + const dllList = await this.ctx.service.query.dllList(ctx.socket.userinfo.warehouseid); + return dllList; + } + async getUserInfo(){ + const {ctx} = this; + return [ctx.socket.userinfo,ctx.socket.istgdp]; + } + async init(token){ + return token; + } + async checkOnline(){ + + const {ctx,app} = this; + let list = await this.app.redis.get('cache').lrange("tgdp_user_5400", 0, -1); + let socketIds = this.app.io.of('/').sockets; + let list2 = []; + for(let socketId in socketIds){ + list2.push(socketId); + } + for(let i=0;i0){ + let user = await this.UserHand._get(user_id); + if(!user){ + await this.setError('Account not exist'); + return false; + } + if(user.status !='normal'){ + await this.setError('Account is locked'); + return false; + } + let wms_user = await this.UserHand._getWmsUser(user.wms_userid); + this._user = user; + this._wms_user = wms_user; + this._logined = true; + this._token = token; + return true; + }else{ + await this.setError('You are not logged in'); + return false; + } + return true; + } + async getRuleList(){ + if(this._rules){ + return this._rules; + } + let group = this._user.group; + if(!group){ + return []; + } + console.log(group.rules); + this.rules = this.app.mysql.get("dblocal").query(`select id,pid,name,title,ismenu from ye4s_user_rule where status="normal" and id in (${group.rules})`); + return this.rules; + } + async setError(_error){ + this._error = _error; + } + async getError(){ + return this._error; + } + async getUser(){ + return this._user; + } + async getWmsUser(){ + return this._wms_user; + } +} + +module.exports = AuthHandler \ No newline at end of file diff --git a/app/utils/token.js b/app/utils/token.js new file mode 100644 index 0000000..0585433 --- /dev/null +++ b/app/utils/token.js @@ -0,0 +1,30 @@ +class Token{ + constructor(app) { + this.app = app; + this.handler = null; + } + async _get(_token,_default=false){ + return this.__get(_token)||_default; + } + async init(){ + + } + async __get(token){ + let data = await this.app.mysql.get('dblocal').query(`select * from ye4s_user_token where token="${token}"`); + data = data[0]; + if(data){ + if(data.expiretime || data.expiretime>Math.round(new Date() / 1000)){ + data.token =token; + data.expires_in = await this.getExpiredIn(data.expires_in); + return data; + }else{ + this.delete(token); + } + } + return {}; + } + async getExpiredIn(expiretime){ + return expiretime ? Math.max(0, expiretime - Math.round(new Date() / 1000)) : 365 * 86400; + } +} +module.exports = Token \ No newline at end of file diff --git a/app/utils/user.js b/app/utils/user.js new file mode 100644 index 0000000..2ac0362 --- /dev/null +++ b/app/utils/user.js @@ -0,0 +1,22 @@ +class User{ + constructor(app) { + this.app = app; + this.handler = null; + } + async _get(user_id){ + let data = await this.app.mysql.get('dblocal').query(`select * from ye4s_user where id=${user_id}`); + if(data){ + let user = data[0]; + let group = await this.app.mysql.get('dblocal').query(`select * from ye4s_user_group where id=${user.group_id}`); + user.group = group[0]||{}; + return user; + } + } + async _getWmsUser(user_id){ + let data = await this.app.mysql.get('dbwms').query(`select * from yj_user where userID=${user_id}`); + if(data){ + return data[0]; + } + } +} +module.exports = User \ No newline at end of file diff --git a/config/config.default.js b/config/config.default.js new file mode 100644 index 0000000..2185062 --- /dev/null +++ b/config/config.default.js @@ -0,0 +1,120 @@ +/* eslint valid-jsdoc: "off" */ +const path = require('path'); +/** + * @param {Egg.EggAppInfo} appInfo app info + */ +module.exports = appInfo => { + /** + * built-in config + * @type {Egg.EggAppConfig} + **/ + const config = exports = {}; + + // use for cookie sign key, should change to your own and keep security + config.keys = appInfo.name + '_1738834822345_7260'; + + // add your user config here + const userConfig = { + // myAppName: 'egg', + }; + config.static = { prefix: '/', dir: path.join(appInfo.baseDir, 'app/assets'),index: 'index.html',index: ['index.html'] }; + config.middleware = ['formatResponse']; + config.cors = { + origin: '*', + allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH' + }; + config.redis = { + clients: { + express:{ + port: 6379, // Redis 端口 + host: '47.100.78.112', // Redis 地址 + password: 'qwe2019', // Redis 密码 + db: 2, // Redis 数据库索引 + }, + cache:{ + port: 6379, + host: '127.0.0.1', + password: 'qwe2019', + db: 2, + }, + post_order_cache:{ + port: 6379, + host: '127.0.0.1', + password: 'qwe2019', + db: 5, + }, + wms_cache:{ + port: 6379, + host: '127.0.0.1', + password: 'qwe2019', + db: 9, + } + } + }; + config.io = { + init:{ + wsEngine: 'ws', + }, + namespace:{ + '/':{ + packetMiddleware: [], + connectionMiddleware:["connection"] + }, + }, + redis: { + host: '127.0.0.1', + password: 'qwe2019', + port: 6379, + db: 4, + } + } + config.security = { + csrf: { + enable: false, + }, + }; + config.mysql = { + clients: { + // clientId, 获取client实例,需要通过 app.mysql.get('clientId') 获取 + dblocal: { + // host + host: '127.0.0.1', + // 端口号 + port: '3306', + // 用户名 + user: 'ye4s', + // 密码 + password: 'H@8h^QE4N$L.F_*', + // 数据库名 + database: 'ye4s', + // 兼容 MySQL 8.0+ caching_sha2_password + ssl: { rejectUnauthorized: false } + }, + dbwms: { + // host + host: 'ye4s.com', + // 端口号 + port: '3306', + // 用户名 + user: 'xiaowuge', + // 密码 + password: 'Xiaowuge@123456', + // 数据库名 + database: 'ye4s' + }, + // ... + }, + // 所有数据库配置的默认值 + default: {}, + + // 是否加载到 app 上,默认开启 + app: true, + // 是否加载到 agent 上,默认关闭 + agent: false, + }; + + return { + ...config, + ...userConfig, + }; +}; diff --git a/config/config.unittest.js b/config/config.unittest.js new file mode 100644 index 0000000..1865afa --- /dev/null +++ b/config/config.unittest.js @@ -0,0 +1,34 @@ +'use strict'; + +/** + * 单元测试环境配置 + * 覆盖默认配置,避免测试时连接真实的数据库/Redis + */ +module.exports = () => { + const config = {}; + + // 禁用 MySQL(测试时不连数据库) + config.mysql = { + clients: {}, + app: false, + agent: false, + }; + + // 禁用 Redis + config.redis = { + clients: {}, + }; + + // 禁用 socket.io + config.io = { + enable: false, + }; + + // 关闭日志 + config.logger = { + level: 'NONE', + consoleLevel: 'NONE', + }; + + return config; +}; diff --git a/config/deploy.config.example.cjs b/config/deploy.config.example.cjs new file mode 100644 index 0000000..2cae01e --- /dev/null +++ b/config/deploy.config.example.cjs @@ -0,0 +1,24 @@ +module.exports = { + production: { + host: '__FILL_SSH_HOST__', + port: 22, + username: '__FILL_SSH_USERNAME__', + privateKeyPath: 'C:/Users/your-user/.ssh/id_rsa', + deployRoot: '/www/wwwroot/ye4s', + sharedDirs: [ 'logs', 'run', 'tmp' ], + keepBackups: 5, + preDeployCommands: [ + 'node -v', + 'npm -v', + ], + postDeployCommands: [ + 'npm install --production', + 'npm run stop || true', + 'npm start', + ], + healthCheckUrl: 'http://127.0.0.1:7071/', + sshOptions: [ + 'StrictHostKeyChecking=accept-new', + ], + }, +}; diff --git a/config/plugin.js b/config/plugin.js new file mode 100644 index 0000000..b0e0813 --- /dev/null +++ b/config/plugin.js @@ -0,0 +1,23 @@ +/** @type Egg.EggPlugin */ +module.exports = { + // had enabled by egg + // static: { + // enable: true, + // } + mysql:{ + enable: true, + package: 'egg-mysql', + }, + redis:{ + enable: true, + package: 'egg-redis', + }, + io:{ + enable: true, + package: 'egg-socket.io', + } +}; +exports.io = { + enable: true, + package: 'egg-socket.io', +}; \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..1bbed3f --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,5 @@ +{ + "include": [ + "**/*" + ] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..ed73134 --- /dev/null +++ b/package.json @@ -0,0 +1,64 @@ +{ + "name": "ye4s", + "version": "1.0.0", + "description": "tbyc", + "private": true, + "egg": { + "declarations": true + }, + "dependencies": { + "axios": "^1.8.3", + "egg": "^3.17.5", + "egg-cors": "^3.0.1", + "egg-mysql": "^4.0.0", + "egg-redis": "^2.6.1", + "egg-scripts": "2", + "egg-socket.io": "^4.1.6", + "mysql2": "^3.22.6", + "soap": "^1.1.7" + }, + "devDependencies": { + "egg-bin": "6", + "egg-mock": "5", + "eslint": "8", + "eslint-config-egg": "13" + }, + "engines": { + "node": ">=18.0.0" + }, + "scripts": { + "start": "egg-scripts start --daemon --title=egg-server-ye4s --sticky", + "stop": "egg-scripts stop --title=egg-server-ye4s", + "stop:v1": "egg-scripts stop --title=egg-server-ye4s-v1", + "stop:v2": "egg-scripts stop --title=egg-server-ye4s-v2", + "dev": "egg-bin dev --sticky", + "test": "npm run lint -- --fix && npm run test:local", + "test:local": "egg-bin test", + "cov": "egg-bin cov", + "lint": "eslint .", + "ci": "npm run lint && npm run cov", + "deploy:precheck": "node ./script/deploy-precheck.cjs", + "deploy:authcheck": "node ./script/deploy-auth-check.cjs", + "deploy:version": "node ./script/deploy-version.cjs production", + "deploy:version:history": "node ./script/deploy-version.cjs production --history=20", + "deploy:inspect": "node ./script/deploy-ops.cjs production inspect", + "deploy:smoke": "node ./script/deploy-ops.cjs production smoke", + "deploy:verify": "node ./script/deploy-ops.cjs production verify", + "deploy:cleanup-backups": "node ./script/deploy-ops.cjs production cleanup-backups", + "deploy:gateway-probe": "node ./script/deploy-ops.cjs production gateway-probe", + "version:record": "node ./script/version-record.cjs", + "version:history": "node ./script/version-history.cjs --limit=50", + "deploy": "npm run deploy:prod", + "deploy:prod": "node ./script/deploy-remote.cjs production", + "rollback": "npm run rollback:prod", + "rollback:prod": "node ./script/rollback-remote.cjs production", + "guard:git": "node ./script/git-safety-check.cjs", + "setup:hooks": "node ./script/setup-git-hooks.cjs" + }, + "repository": { + "type": "git", + "url": "" + }, + "author": "mingren", + "license": "MIT" +} diff --git a/script/deploy-auth-check.cjs b/script/deploy-auth-check.cjs new file mode 100644 index 0000000..c4ca5a9 --- /dev/null +++ b/script/deploy-auth-check.cjs @@ -0,0 +1,42 @@ +'use strict'; + +const { spawnSync } = require('node:child_process'); +const { loadDeployConfig } = require('./deploy-lib.cjs'); + +function main() { + const config = loadDeployConfig('production'); + + const args = [ '-vv' ]; + args.push('-p', String(config.port)); + args.push('-i', config.privateKeyPath); + for (const option of config.sshOptions) { + args.push('-o', option); + } + args.push(`${config.username}@${config.host}`); + args.push('echo AUTH_CHECK_OK'); + + const result = spawnSync('ssh', args, { + encoding: 'utf8', + stdio: 'pipe', + shell: false, + }); + + const text = `${result.stdout || ''}\n${result.stderr || ''}`; + const summary = { + keyOffered: /Offering public key:/i.test(text) || /Will attempt key:/i.test(text), + keyAccepted: /Authenticated to .* using "publickey"/i.test(text) || /AUTH_CHECK_OK/i.test(text), + authFailed: /Permission denied|Authentication failed/i.test(text), + hostKeyFailed: /Host key verification failed|REMOTE HOST IDENTIFICATION HAS CHANGED/i.test(text), + networkFailed: /Connection timed out|No route to host|Connection refused|Could not resolve hostname|Operation timed out/i.test(text), + }; + + console.log(JSON.stringify(summary, null, 2)); + + if (summary.keyAccepted) { + process.exit(0); + } + + process.exit(1); +} + +main(); diff --git a/script/deploy-lib.cjs b/script/deploy-lib.cjs new file mode 100644 index 0000000..59f1006 --- /dev/null +++ b/script/deploy-lib.cjs @@ -0,0 +1,357 @@ +'use strict'; + +const fs = require('node:fs'); +const path = require('node:path'); +const { spawnSync } = require('node:child_process'); + +const ROOT = path.resolve(__dirname, '..'); +const LOCAL_CONFIG_PATH = path.join(ROOT, 'config', 'deploy.config.local.cjs'); +const EXAMPLE_CONFIG_PATH = path.join(ROOT, 'config', 'deploy.config.example.cjs'); +const DEFAULT_ENV = 'production'; +const DEFAULT_EGG_MINIMAL_INCLUDE_PATHS = [ + 'app.js', + 'app/**', + 'package.json', + 'package-lock.json', +]; +const DEFAULT_POST_DEPLOY_COMMANDS = [ + 'npm install --production', + 'npm run stop || true', + 'npm start', +]; + +function quoteForBash(value) { + return `'${String(value).replace(/'/g, `'"'"'`)}'`; +} + +function isGitAvailable() { + const result = spawnSync('git', [ 'rev-parse', '--git-dir' ], { + cwd: ROOT, + encoding: 'utf8', + stdio: 'pipe', + shell: false, + }); + return result.status === 0; +} + +/** + * 检查是否有未提交的更改 + */ +function hasUncommittedChanges() { + if (!isGitAvailable()) return false; + const output = runCommandSafe('git', [ 'status', '--porcelain' ]); + return output.trim().length > 0; +} + +function runCommand(command, args, options = {}) { + const result = spawnSync(command, args, { + cwd: options.cwd || ROOT, + encoding: 'utf8', + stdio: options.stdio || 'pipe', + shell: false, + }); + + if (result.error) { + throw result.error; + } + + if (result.status !== 0) { + const stderr = (result.stderr || '').trim(); + const stdout = (result.stdout || '').trim(); + throw new Error(stderr || stdout || `${command} exited with code ${result.status}`); + } + + return (result.stdout || '').trim(); +} + +/** + * 安全执行命令,失败时返回空字符串而不是抛出异常 + */ +function runCommandSafe(command, args, options = {}) { + const result = spawnSync(command, args, { + cwd: options.cwd || ROOT, + encoding: 'utf8', + stdio: 'pipe', + shell: false, + }); + + if (result.error || result.status !== 0) { + return ''; + } + + return (result.stdout || '').trim(); +} + +function ensureCommandAvailable(command, installHint) { + const result = spawnSync(command, [], { + cwd: ROOT, + encoding: 'utf8', + stdio: 'pipe', + shell: false, + }); + + if (result.error && result.error.code === 'ENOENT') { + throw new Error(`${command} 不可用。${installHint}`); + } +} + +function getNowStamp() { + const now = new Date(); + const pad = value => String(value).padStart(2, '0'); + return `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`; +} + +function ensureTempDeployDir() { + const tempDir = path.join(ROOT, 'tmp', 'deploy'); + fs.mkdirSync(tempDir, { recursive: true }); + return tempDir; +} + +function isPlaceholder(value) { + if (!value) { + return true; + } + return String(value).includes('__FILL_'); +} + +function normalizeDeployConfig(config, envName) { + const deployRoot = config.deployRoot || '/www/wwwroot/ye4s'; + const privateKeyPath = config.privateKeyPath ? path.resolve(ROOT, config.privateKeyPath) : ''; + const sshOptions = Array.isArray(config.sshOptions) ? [ ...config.sshOptions ] : []; + const preserveDirs = Array.isArray(config.preserveDirs) ? [ ...config.preserveDirs ] : [ 'config' ]; + + if (!preserveDirs.includes('config')) { + preserveDirs.push('config'); + } + + if (!sshOptions.some(option => /^IdentitiesOnly=/i.test(option))) { + sshOptions.push('IdentitiesOnly=yes'); + } + if (!sshOptions.some(option => /^PreferredAuthentications=/i.test(option))) { + sshOptions.push('PreferredAuthentications=publickey'); + } + if (!sshOptions.some(option => /^PubkeyAuthentication=/i.test(option))) { + sshOptions.push('PubkeyAuthentication=yes'); + } + if (!sshOptions.some(option => /^PasswordAuthentication=/i.test(option))) { + sshOptions.push('PasswordAuthentication=no'); + } + if (!sshOptions.some(option => /^KbdInteractiveAuthentication=/i.test(option))) { + sshOptions.push('KbdInteractiveAuthentication=no'); + } + if (!sshOptions.some(option => /^BatchMode=/i.test(option))) { + sshOptions.push('BatchMode=yes'); + } + if (!sshOptions.some(option => /^ConnectTimeout=/i.test(option))) { + sshOptions.push('ConnectTimeout=10'); + } + + const configuredPostDeployCommands = Array.isArray(config.postDeployCommands) && config.postDeployCommands.length > 0 + ? [ ...config.postDeployCommands ] + : [ ...DEFAULT_POST_DEPLOY_COMMANDS ]; + + if (!configuredPostDeployCommands.some(cmd => /^npm\s+install\s+--production(?:\s|$)/i.test(String(cmd).trim()))) { + configuredPostDeployCommands.unshift('npm install --production'); + } + + return { + envName, + host: config.host, + port: Number(config.port || 22), + username: config.username, + privateKeyPath, + deployRoot, + controlDir: `${deployRoot}/.deploy`, + incomingDir: `${deployRoot}/.deploy/incoming`, + backupDir: `${deployRoot}/.deploy/backups`, + stateDir: `${deployRoot}/.deploy/state`, + sharedDirs: Array.isArray(config.sharedDirs) ? config.sharedDirs : [ 'logs', 'run', 'tmp' ], + preserveDirs, + keepBackups: Number(config.keepBackups || 5), + preDeployCommands: Array.isArray(config.preDeployCommands) ? config.preDeployCommands : [], + postDeployCommands: configuredPostDeployCommands, + healthCheckUrl: config.healthCheckUrl || '', + deployIncludePaths: Array.isArray(config.deployIncludePaths) && config.deployIncludePaths.length > 0 + ? config.deployIncludePaths + : DEFAULT_EGG_MINIMAL_INCLUDE_PATHS, + deployExcludePaths: Array.isArray(config.deployExcludePaths) ? config.deployExcludePaths : [ 'config/**' ], + sshOptions, + }; +} + +function validateDeployConfig(config, configPath, envName) { + if (!config) { + throw new Error(`${configPath} 中未找到 ${envName} 配置。`); + } + + const missing = []; + if (isPlaceholder(config.host)) missing.push('host'); + if (isPlaceholder(config.username)) missing.push('username'); + if (isPlaceholder(config.privateKeyPath)) missing.push('privateKeyPath'); + + if (missing.length > 0) { + throw new Error(`请先完善 SSH 配置字段: ${missing.join(', ')}。配置文件: ${configPath}`); + } + + const resolvedPrivateKeyPath = path.resolve(ROOT, config.privateKeyPath); + if (!fs.existsSync(resolvedPrivateKeyPath)) { + throw new Error(`SSH 私钥不存在: ${resolvedPrivateKeyPath}。请先修正 config/deploy.config.local.cjs 中的 privateKeyPath。`); + } +} + +function loadDeployConfig(envName = DEFAULT_ENV) { + if (!fs.existsSync(LOCAL_CONFIG_PATH)) { + throw new Error(`缺少本地部署配置 ${LOCAL_CONFIG_PATH}。请复制 ${EXAMPLE_CONFIG_PATH} 并填入 SSH 信息。`); + } + + delete require.cache[LOCAL_CONFIG_PATH]; + const loaded = require(LOCAL_CONFIG_PATH); + const config = loaded[envName]; + validateDeployConfig(config, LOCAL_CONFIG_PATH, envName); + return normalizeDeployConfig(config, envName); +} + +function buildSshBaseArgs(config) { + const args = [ '-p', String(config.port), '-i', config.privateKeyPath ]; + for (const option of config.sshOptions) { + args.push('-o', option); + } + return args; +} + +function runSsh(config, remoteScript, options = {}) { + const args = [ + ...buildSshBaseArgs(config), + `${config.username}@${config.host}`, + `bash -lc ${quoteForBash(remoteScript)}`, + ]; + + return runCommand('ssh', args, { + stdio: options.stdio || 'inherit', + }); +} + +function runScp(config, localPath, remotePath) { + const args = [ '-P', String(config.port), '-i', config.privateKeyPath ]; + for (const option of config.sshOptions) { + args.push('-o', option); + } + + args.push( + localPath, + `${config.username}@${config.host}:${remotePath}`, + ); + + return runCommand('scp', args, { stdio: 'inherit' }); +} + +function normalizeRule(rule) { + return String(rule || '').replace(/\\/g, '/').trim(); +} + +function pathMatchesRule(filePath, rule) { + const normalizedPath = String(filePath || '').replace(/\\/g, '/'); + const normalizedRule = normalizeRule(rule); + + if (!normalizedRule) { + return false; + } + if (normalizedRule.endsWith('/**')) { + const prefix = normalizedRule.slice(0, -3); + return normalizedPath === prefix || normalizedPath.startsWith(`${prefix}/`); + } + if (normalizedRule.endsWith('/')) { + return normalizedPath.startsWith(normalizedRule); + } + return normalizedPath === normalizedRule; +} + +/** + * 递归遍历目录获取所有文件(非 git 模式回退方案) + */ +function walkDir(dir, basePath) { + const results = []; + const entries = fs.readdirSync(dir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + const relativePath = path.relative(basePath, fullPath).replace(/\\/g, '/'); + + // 跳过不需要的目录 + if (entry.isDirectory()) { + const skipDirs = [ '.git', 'node_modules', 'logs', 'run', 'tmp', '.deploy', '.vscode', '.idea' ]; + if (skipDirs.includes(entry.name)) continue; + results.push(...walkDir(fullPath, basePath)); + } else { + results.push(relativePath); + } + } + return results; +} + +function listDeployableFiles(config) { + const includeRules = Array.isArray(config && config.deployIncludePaths) ? config.deployIncludePaths : DEFAULT_EGG_MINIMAL_INCLUDE_PATHS; + const excludeRules = Array.isArray(config && config.deployExcludePaths) ? config.deployExcludePaths : [ 'config/**' ]; + + let allFiles; + + if (isGitAvailable()) { + // Git 模式:使用 git ls-files + const output = runCommandSafe('git', [ 'ls-files', '--cached', '--others', '--exclude-standard' ]); + allFiles = output + .split(/\r?\n/) + .map(item => item.trim()) + .filter(Boolean) + .filter(item => !item.startsWith('.git/')) + .filter(item => fs.existsSync(path.join(ROOT, item))); + } else { + // 非 Git 模式:遍历目录 + console.warn('[WARN] 未检测到 Git 仓库,使用文件系统遍历模式。建议初始化 Git 仓库以获得更精确的发布文件列表。'); + allFiles = walkDir(ROOT, ROOT); + } + + return Array.from(new Set( + allFiles + .filter(item => includeRules.some(rule => pathMatchesRule(item, rule))) + .filter(item => !excludeRules.some(rule => pathMatchesRule(item, rule))) + )); +} + +function buildArchive(stamp, config) { + const tempDir = ensureTempDeployDir(); + const listPath = path.join(tempDir, `deploy-files-${stamp}.txt`); + const archivePath = path.join(tempDir, `release-${stamp}.tar.gz`); + const files = listDeployableFiles(config); + + if (files.length === 0) { + throw new Error('git ls-files 未返回可发布文件,无法生成发布包。'); + } + + fs.writeFileSync(listPath, files.join('\n') + '\n', 'utf8'); + runCommand('tar', [ '-czf', archivePath, '-T', listPath ], { stdio: 'inherit' }); + + return { + archivePath, + listPath, + }; +} + +function buildRemoteCleanupGuard(sharedDirs, preserveDirs = []) { + const preserved = [ '.deploy', ...sharedDirs, ...preserveDirs ]; + return preserved.map(item => `! -name ${quoteForBash(item)}`).join(' '); +} + +module.exports = { + ROOT, + buildArchive, + buildRemoteCleanupGuard, + ensureCommandAvailable, + getNowStamp, + hasUncommittedChanges, + isGitAvailable, + loadDeployConfig, + quoteForBash, + runCommand, + runCommandSafe, + runScp, + runSsh, +}; diff --git a/script/deploy-ops.cjs b/script/deploy-ops.cjs new file mode 100644 index 0000000..97bcaa0 --- /dev/null +++ b/script/deploy-ops.cjs @@ -0,0 +1,209 @@ +'use strict'; + +const { loadDeployConfig, quoteForBash, runSsh } = require('./deploy-lib.cjs'); + +const COMMANDS = new Set([ 'inspect', 'smoke', 'verify', 'cleanup-backups', 'gateway-probe' ]); + +/** + * 解析命令行参数,返回环境名、命令及额外参数 + * + * @param {string[]} argv - 命令行参数数组 + * @return {{ envName: string, command: string, args: string[] }} 解析后的选项对象 + */ +function parseArgs(argv) { + const options = { + envName: 'production', + command: '', + args: [], + }; + + const tokens = [ ...argv ]; + if (tokens.length === 0) { + throw new Error('缺少命令: inspect | smoke | verify | cleanup-backups | gateway-probe'); + } + + const first = tokens[0]; + if (!COMMANDS.has(first)) { + options.envName = first; + tokens.shift(); + } + + if (tokens.length === 0) { + throw new Error('缺少命令: inspect | smoke | verify | cleanup-backups | gateway-probe'); + } + + options.command = tokens[0]; + options.args = tokens.slice(1); + + if (!COMMANDS.has(options.command)) { + throw new Error(`不支持的命令: ${options.command}`); + } + + return options; +} + +/** + * 通过 SSH 读取远端 current.md 文件,获取当前活跃端口 + * v1 → 7071,v2 → 7072 + * + * @param {object} config - 部署配置对象 + * @return {{ port: number, version: string, rawContent: string }} 活跃端口、版本标识及 current.md 原始内容 + * @throws {Error} 如果读取失败或内容不是 v1/v2 + */ +function getActivePortInfo(config) { + const currentMdPath = `${config.deployRoot}/current.md`; + const remoteScript = [ + 'set -euo pipefail', + `cat ${quoteForBash(currentMdPath)} 2>/dev/null || true`, + ].join('\n'); + + const output = runSsh(config, remoteScript, { stdio: 'pipe' }); + const rawContent = String(output || '').trim(); + + if (!rawContent) { + throw new Error( + `无法读取远端 ${currentMdPath},内容为空或文件不存在。` + ); + } + + const version = rawContent.replace(/\r/g, '').trim(); + if (version !== 'v1' && version !== 'v2') { + throw new Error( + `远端 current.md 内容无效: "${rawContent}",期望值为 v1 或 v2。文件路径: ${currentMdPath}` + ); + } + + const port = version === 'v1' ? 7071 : 7072; + + return { port, version, rawContent }; +} + +/** + * 通过 SSH 检查远端部署状态(state 目录、备份等) + * + * @param {object} config - 部署配置对象 + * @return {string} SSH 远程执行输出 + */ +function inspectState(config) { + const latestBackupFile = `${config.stateDir}/latest-backup.txt`; + const remoteScript = [ + 'set -euo pipefail', + `STATE_DIR=${quoteForBash(config.stateDir)}`, + `BACKUP_DIR=${quoteForBash(config.backupDir)}`, + `LATEST_FILE=${quoteForBash(latestBackupFile)}`, + 'printf "[STATE]\\n"', + 'ls -la "$STATE_DIR" 2>/dev/null || echo EMPTY', + 'printf "\\n[LATEST_BACKUP]\\n"', + 'if [ -f "$LATEST_FILE" ]; then cat "$LATEST_FILE"; else echo MISSING; fi', + 'printf "\\n[BACKUPS]\\n"', + 'ls -1 "$BACKUP_DIR" 2>/dev/null || echo EMPTY', + 'printf "\\n[INSTANCES]\\n"', + 'ls -la "$DEPLOY_ROOT/v1" 2>/dev/null | head -3 || echo "v1 EMPTY"', + 'ls -la "$DEPLOY_ROOT/v2" 2>/dev/null | head -3 || echo "v2 EMPTY"', + 'printf "\\n[CURRENT_MD]\\n"', + 'cat "$DEPLOY_ROOT/current.md" 2>/dev/null || echo MISSING', + ].join('\n'); + + return runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); +} + +/** + * 对当前活跃端口的关键路由执行冒烟探测 + * + * @param {object} config - 部署配置对象 + * @return {string} 各路由的 HTTP 状态码输出 + */ +function smokeRoutes(config) { + const { port } = getActivePortInfo(config); + const remoteScript = [ + 'set -euo pipefail', + `PORT=${port}`, + 'for path in /; do', + ' code=$(curl -sS -o /dev/null -w "%{http_code}" "http://127.0.0.1:$PORT$path" || true)', + ' printf "%s %s\\n" "$path" "$code"', + 'done', + ].join('\n'); + + return runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); +} + +/** + * 清理远端备份目录中指定的备份文件 + * + * @param {object} config - 部署配置对象 + * @param {string[]} names - 要清理的备份文件名列表 + * @return {string} 清理结果输出 + */ +function cleanupBackups(config, names) { + if (!names.length) { + throw new Error('cleanup-backups 需要至少一个备份文件名'); + } + + const remoteScript = [ + 'set -euo pipefail', + `BACKUP_DIR=${quoteForBash(config.backupDir)}`, + ...names.map((name, index) => `FILE_${index}=${quoteForBash(name)}`), + ...names.map((_, index) => `if [ -f "$BACKUP_DIR/$FILE_${index}" ]; then rm -f "$BACKUP_DIR/$FILE_${index}"; echo "REMOVED $FILE_${index}"; else echo "MISS $FILE_${index}"; fi`), + ].join('\n'); + + return runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); +} + +/** + * 对指定端口做基础连通性探测,用于故障排查 + * + * @param {object} config - 部署配置对象 + * @param {string} probePort - 目标端口号(字符串),为空则探测当前活跃端口 + * @return {string} 探测结果输出 + */ +function gatewayProbe(config, probePort) { + let targetPort; + if (probePort && /^\d+$/.test(probePort)) { + targetPort = Number(probePort); + } else { + targetPort = getActivePortInfo(config).port; + } + + const remoteScript = [ + 'set -euo pipefail', + `PORT=${targetPort}`, + 'echo "[GATEWAY_PROBE] port=$PORT"', + 'if curl -fsS --connect-timeout 2 --max-time 4 "http://127.0.0.1:$PORT/" >/dev/null 2>&1; then', + ' echo "GATEWAY_OK"', + 'else', + ' echo "GATEWAY_FAIL"', + 'fi', + ].join('\n'); + + return runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); +} + +function main() { + const options = parseArgs(process.argv.slice(2)); + const config = loadDeployConfig(options.envName); + + switch (options.command) { + case 'inspect': + console.log(inspectState(config)); + break; + case 'smoke': + console.log(smokeRoutes(config)); + break; + case 'verify': { + const activeInfo = getActivePortInfo(config); + console.log(`ACTIVE_VERSION=${activeInfo.version}`); + console.log(`ACTIVE_PORT=${activeInfo.port}`); + break; + } + case 'cleanup-backups': + console.log(cleanupBackups(config, options.args)); + break; + case 'gateway-probe': + console.log(gatewayProbe(config, options.args[0] || '')); + break; + default: + throw new Error(`不支持的命令: ${options.command}`); + } +} + +main(); diff --git a/script/deploy-precheck.cjs b/script/deploy-precheck.cjs new file mode 100644 index 0000000..12c3776 --- /dev/null +++ b/script/deploy-precheck.cjs @@ -0,0 +1,77 @@ +'use strict'; + +const { + loadDeployConfig, + runSsh, + ensureCommandAvailable, +} = require('./deploy-lib.cjs'); + +function main() { + try { + [ 'ssh', 'scp', 'tar', 'git' ].forEach(cmd => ensureCommandAvailable(cmd, '')); + console.log('LOCAL_TOOLS_OK'); + + const config = loadDeployConfig('production'); + const remoteScript = [ + 'set -euo pipefail', + `DEPLOY_ROOT=${JSON.stringify(config.deployRoot)}`, + 'PARENT_DIR=$(dirname "$DEPLOY_ROOT")', + 'if [ -d "$DEPLOY_ROOT" ]; then echo DEPLOY_ROOT_EXISTS; else echo DEPLOY_ROOT_MISSING; fi', + 'if [ -d "$DEPLOY_ROOT" ] && [ -w "$DEPLOY_ROOT" ]; then echo DEPLOY_ROOT_WRITABLE; else echo DEPLOY_ROOT_NOT_WRITABLE; fi', + 'if [ -d "$DEPLOY_ROOT/config" ]; then echo DEPLOY_CONFIG_EXISTS; else echo DEPLOY_CONFIG_MISSING; fi', + 'if [ -d "$PARENT_DIR" ] && [ -w "$PARENT_DIR" ]; then echo PARENT_WRITABLE; else echo PARENT_NOT_WRITABLE; fi', + 'if [ -d "$DEPLOY_ROOT/v1" ]; then echo V1_DIR_EXISTS; else echo V1_DIR_MISSING; fi', + 'if [ -d "$DEPLOY_ROOT/v2" ]; then echo V2_DIR_EXISTS; else echo V2_DIR_MISSING; fi', + 'if [ -f "$DEPLOY_ROOT/nginx-upstream.conf" ]; then echo NGINX_UPSTREAM_EXISTS; else echo NGINX_UPSTREAM_MISSING; fi', + 'if command -v node >/dev/null 2>&1; then echo REMOTE_NODE_OK; node -v; else echo REMOTE_NODE_MISSING; fi', + 'if command -v npm >/dev/null 2>&1; then echo REMOTE_NPM_OK; npm -v; else echo REMOTE_NPM_MISSING; fi', + 'if command -v tar >/dev/null 2>&1; then echo REMOTE_TAR_OK; tar --version | head -n 1; else echo REMOTE_TAR_MISSING; fi', + 'if command -v curl >/dev/null 2>&1; then', + ' CURRENT_FILE="$DEPLOY_ROOT/current.md"', + ' if [ -f "$CURRENT_FILE" ]; then', + ' ACTIVE_VERSION=$(cat "$CURRENT_FILE" | tr -d "[:space:]")', + ' if [ "$ACTIVE_VERSION" = "v1" ]; then', + ' if curl -fsS http://127.0.0.1:7071/ >/dev/null; then echo HEALTHCHECK_LOCAL_OK; else echo HEALTHCHECK_LOCAL_FAIL; fi', + ' elif [ "$ACTIVE_VERSION" = "v2" ]; then', + ' if curl -fsS http://127.0.0.1:7072/ >/dev/null; then echo HEALTHCHECK_LOCAL_OK; else echo HEALTHCHECK_LOCAL_FAIL; fi', + ' else', + ' echo HEALTHCHECK_LOCAL_SKIP_UNKNOWN_VERSION', + ' fi', + ' else', + ' V1_OK=false; V2_OK=false', + ' if curl -fsS http://127.0.0.1:7071/ >/dev/null; then V1_OK=true; fi', + ' if curl -fsS http://127.0.0.1:7072/ >/dev/null; then V2_OK=true; fi', + ' if [ "$V1_OK" = "true" ] || [ "$V2_OK" = "true" ]; then echo HEALTHCHECK_LOCAL_OK; else echo HEALTHCHECK_LOCAL_FAIL; fi', + ' fi', + 'else echo REMOTE_CURL_MISSING; fi', + ].join('\n'); + + const output = runSsh(config, remoteScript, { stdio: 'pipe' }); + for (const line of output.split(/\r?\n/)) { + if (line.trim()) { + console.log(line.trim()); + } + } + + console.log('PRECHECK_OK'); + } catch (error) { + const message = String(error && error.message ? error.message : ''); + let reason = 'UNKNOWN'; + + if (/Permission denied|Authentication failed/i.test(message)) { + reason = 'AUTH'; + } else if (/Connection timed out|No route to host|Connection refused|Could not resolve hostname/i.test(message)) { + reason = 'NETWORK'; + } else if (/Host key verification failed|REMOTE HOST IDENTIFICATION HAS CHANGED/i.test(message)) { + reason = 'HOST_KEY'; + } else if (/Operation timed out/i.test(message)) { + reason = 'TIMEOUT'; + } + + console.log('PRECHECK_FAIL'); + console.log(`PRECHECK_REASON_${reason}`); + process.exit(1); + } +} + +main(); diff --git a/script/deploy-remote.cjs b/script/deploy-remote.cjs new file mode 100644 index 0000000..2806b07 --- /dev/null +++ b/script/deploy-remote.cjs @@ -0,0 +1,462 @@ +'use strict'; + +const fs = require('node:fs'); +const path = require('node:path'); +const { + ROOT, + buildArchive, + buildRemoteCleanupGuard, + ensureCommandAvailable, + getNowStamp, + isGitAvailable, + loadDeployConfig, + quoteForBash, + runCommand, + runCommandSafe, + runScp, + runSsh, +} = require('./deploy-lib.cjs'); + +/** + * 通过 SSH 读取远端 current.md 文件,获取当前活跃版本标识(v1 或 v2) + * + * @param {object} config - 部署配置对象 + * @param {string} deployRoot - 远端部署根目录,如 /www/wwwroot/ye4s + * @return {string} 当前活跃版本标识,如 'v1' 或 'v2' + * @throws {Error} 如果读取失败或内容无效 + */ +function readRemoteCurrentVersion(config, deployRoot) { + const currentMdPath = `${deployRoot}/current.md`; + const script = `cat ${quoteForBash(currentMdPath)} 2>/dev/null || true`; + + const output = runSsh(config, script, { stdio: 'pipe' }); + const rawVersion = String(output || '').trim(); + + if (!rawVersion) { + throw new Error( + `无法读取远端当前版本文件: ${currentMdPath}。请确保远端已存在 /www/wwwroot/ye4s/current.md 且内容为 v1 或 v2。` + ); + } + + const normalized = rawVersion.replace(/\r/g, '').trim(); + if (normalized !== 'v1' && normalized !== 'v2') { + throw new Error( + `远端 current.md 内容无效: "${rawVersion}",期望值为 v1 或 v2。文件路径: ${currentMdPath}` + ); + } + + return normalized; +} + +/** + * 根据当前活跃版本确定目标部署目录(另一个实例目录) + * + * @param {string} currentVersion - 当前活跃版本,'v1' 或 'v2' + * @param {string} deployRoot - 远端部署根目录,如 /www/wwwroot/ye4s + * @return {string} 目标部署目录,如 /www/wwwroot/ye4s/v2 + */ +function resolveTargetDir(currentVersion, deployRoot) { + if (currentVersion === 'v1') { + return `${deployRoot}/v2`; + } + return `${deployRoot}/v1`; +} + +/** + * 根据当前活跃版本推导目标版本标识(v1 ↔ v2 互换) + * + * @param {string} currentVersion - 当前活跃版本,'v1' 或 'v2' + * @return {string} 目标版本标识,'v1' 或 'v2' + */ +function resolveTargetVersion(currentVersion) { + if (currentVersion === 'v1') { + return 'v2'; + } + return 'v1'; +} + +/** + * 根据版本标识返回对应监听端口(v1 → 7071,v2 → 7072) + * + * @param {string} targetVersion - 目标版本标识,'v1' 或 'v2' + * @return {number} 对应端口号 + */ +function getTargetPort(targetVersion) { + if (targetVersion === 'v1') { + return 7071; + } + return 7072; +} + +/** + * 根据版本标识返回进程 title(v1 → egg-server-ye4s-v1,v2 → egg-server-ye4s-v2) + * + * @param {string} version - 版本标识,'v1' 或 'v2' + * @return {string} 进程 title + */ +function getProcessTitle(version) { + return `egg-server-ye4s-${version}`; +} + +function main() { + const envName = process.argv[2] || 'production'; + const config = loadDeployConfig(envName); + + ensureCommandAvailable('git', '请先安装 Git 并确保 git 在 PATH 中。'); + ensureCommandAvailable('tar', '请先安装 tar,Windows 10/11 通常已内置 bsdtar。'); + ensureCommandAvailable('ssh', '请先安装 OpenSSH Client 并确保 ssh 在 PATH 中。'); + ensureCommandAvailable('scp', '请先安装 OpenSSH Client 并确保 scp 在 PATH 中。'); + + // 1. 部署前安全检查 + console.log('========================================'); + console.log('ye4s 蓝绿部署'); + console.log(`环境: ${envName}`); + console.log(`目标: ${config.username}@${config.host}:${config.port}`); + console.log(`远端根目录: ${config.deployRoot}`); + console.log('========================================'); + + // 检查 Git 未提交更改 + if (isGitAvailable()) { + const uncommitted = runCommandSafe('git', [ 'status', '--porcelain' ]); + if (uncommitted) { + console.warn('[WARN] 检测到未提交的更改:'); + const changes = uncommitted.split(/\r?\n/).filter(Boolean); + for (const line of changes.slice(0, 10)) { + console.warn(` ${line}`); + } + if (changes.length > 10) { + console.warn(` ... 还有 ${changes.length - 10} 处更改`); + } + console.warn('[WARN] 未提交的更改不会被包含在发布包中!'); + console.warn('[WARN] 建议先 git add && git commit 后再部署。'); + } + } + + // 1. 读取远端 current.md,确定目标目录 + const currentVersion = readRemoteCurrentVersion(config, config.deployRoot); + const targetDir = resolveTargetDir(currentVersion, config.deployRoot); + console.log(`远端当前活跃版本: ${currentVersion},目标部署目录: ${targetDir}`); + + // 2. 本地打包 + const stamp = getNowStamp(); + const packageJson = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8')); + const packageVersion = String(packageJson.version || '0.0.0'); + let gitCommitShort = 'nogit'; + if (isGitAvailable()) { + gitCommitShort = runCommandSafe('git', [ 'rev-parse', '--short', 'HEAD' ]) || 'nogit'; + } + const releaseVersion = `v${packageVersion}-${stamp}-${gitCommitShort}`; + + const { archivePath } = buildArchive(stamp, config); + const remoteArchive = `${config.incomingDir}/release-${stamp}.tar.gz`; + + // 3. 远端创建目录结构(目标目录 + incoming/backups/state 目录) + const setupScript = [ + 'set -euo pipefail', + `mkdir -p ${quoteForBash(targetDir)} ${quoteForBash(config.incomingDir)} ${quoteForBash(config.backupDir)} ${quoteForBash(config.stateDir)}`, + ].join('\n'); + runSsh(config, setupScript); + console.log(`远端目录已就绪: ${targetDir}`); + + // 3.5. 远端备份当前目标目录(如果已有内容) + const backupScript = [ + 'set -euo pipefail', + `TARGET_DIR=${quoteForBash(targetDir)}`, + `BACKUP_DIR=${quoteForBash(config.backupDir)}`, + `STAMP=${quoteForBash(stamp)}`, + 'if [ -f "$TARGET_DIR/package.json" ]; then', + ' BACKUP_FILE="$BACKUP_DIR/backup-${STAMP}.tar.gz"', + ' cd "$TARGET_DIR"', + ' tar -czf "$BACKUP_FILE" . --exclude="./node_modules" --exclude="./.deploy" --exclude="./logs" --exclude="./run" --exclude="./tmp" 2>/dev/null || true', + ' echo "已备份目标目录到: $BACKUP_FILE"', + 'else', + ' echo "目标目录为空,跳过备份"', + 'fi', + ].join('\n'); + try { + const backupOutput = runSsh(config, backupScript, { stdio: 'pipe' }); + console.log(String(backupOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 备份失败(非致命): ${err.message}`); + } + + // 4. SCP 上传 tar.gz 到远端 incoming 目录 + runScp(config, archivePath, remoteArchive); + console.log(`发布包已上传到远端: ${remoteArchive}`); + + // 5. 在目标目录清理旧代码、解压、安装依赖 + const cleanupGuard = buildRemoteCleanupGuard(config.sharedDirs, config.preserveDirs); + + const remoteScript = [ + 'set -euo pipefail', + `TARGET_DIR=${quoteForBash(targetDir)}`, + `REMOTE_ARCHIVE=${quoteForBash(remoteArchive)}`, + // 进入目标目录,清理旧代码文件(保留 node_modules、logs、run、tmp、.deploy 等运行时/状态目录) + 'cd "$TARGET_DIR"', + `find . -mindepth 1 -maxdepth 1 ${cleanupGuard} -exec rm -rf {} +`, + // 解压发布包 + 'tar -xzf "$REMOTE_ARCHIVE" -C "$TARGET_DIR"', + 'rm -f "$REMOTE_ARCHIVE"', + // 检查 config 目录是否存在,不存在则从活跃版本复制 + 'if [ ! -d "$TARGET_DIR/config" ]; then', + ` ACTIVE_DIR=${quoteForBash(`${config.deployRoot}/${currentVersion}`)}`, + ' if [ -d "$ACTIVE_DIR/config" ]; then', + ' cp -a "$ACTIVE_DIR/config" "$TARGET_DIR/config"', + ' echo "已从活跃版本 ($ACTIVE_DIR) 复制 config 目录"', + ' else', + ` FALLBACK_DIR=${quoteForBash(config.deployRoot)}`, + ' if [ -d "$FALLBACK_DIR/config" ]; then', + ' cp -a "$FALLBACK_DIR/config" "$TARGET_DIR/config"', + ' echo "已从根目录 ($FALLBACK_DIR) 复制 config 目录"', + ' else', + ' echo "[WARN] 未找到 config 目录来源,目标目录将缺少 config 配置!"', + ' fi', + ' fi', + 'fi', + // 在目标目录安装生产依赖 + 'npm install --production', + ].join('\n'); + + runSsh(config, remoteScript); + console.log(`远端目标目录已清理、解压并安装依赖: ${targetDir}`); + + // 推导目标版本标识与启动日志路径 + const targetVersion = resolveTargetVersion(currentVersion); + const targetPort = getTargetPort(targetVersion); + const targetTitle = getProcessTitle(targetVersion); + const currentTitle = getProcessTitle(currentVersion); + const startLogPath = `/tmp/ye4s-${targetVersion}-start.log`; + const currentMdPath = `${config.deployRoot}/current.md`; + const oldDir = `${config.deployRoot}/${currentVersion}`; + + // 6. 停止目标目录可能残留的旧进程(使用版本专用 title) + const stopTargetScript = [ + 'set -euo pipefail', + `TARGET_DIR=${quoteForBash(targetDir)}`, + `TARGET_VERSION=${quoteForBash(targetVersion)}`, + `TARGET_TITLE=${quoteForBash(targetTitle)}`, + // 先按目录路径查找进程 + 'TARGET_PIDS=$(ps -eo pid=,args= | awk -v root="$TARGET_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + // 再按 title 查找 + 'TITLE_PIDS=$(ps -eo pid=,args= | awk -v t="$TARGET_TITLE" \'index($0, t) { print $1 }\')', + 'ALL_PIDS=$(echo "$TARGET_PIDS $TITLE_PIDS" | tr " " "\\n" | sort -u | grep -v "^$" | tr "\\n" " ")', + 'if [ -z "$ALL_PIDS" ]; then', + ' echo "未找到目标目录 ($TARGET_VERSION) 残留进程"', + 'else', + ' echo "正在停止目标目录 ($TARGET_VERSION) 残留进程: $ALL_PIDS"', + ' kill $ALL_PIDS || true', + ' sleep 2', + ' REMAIN=$(ps -eo pid=,args= | awk -v root="$TARGET_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + ' if [ -n "$REMAIN" ]; then', + ' kill -9 $REMAIN || true', + ' fi', + ' echo "目标目录 ($TARGET_VERSION) 残留进程已停止"', + 'fi', + ].join('\n'); + + try { + const stopTargetOutput = runSsh(config, stopTargetScript, { stdio: 'pipe' }); + console.log(String(stopTargetOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 停止目标目录残留进程失败: ${err.message}`); + } + + // 6.5. 检测并停止旧版根目录遗留进程(端口 7001 等,首次蓝绿迁移时需要) + const legacyRootDir = config.deployRoot; + const stopLegacyScript = [ + 'set -euo pipefail', + `ROOT_DIR=${quoteForBash(legacyRootDir)}`, + // 查找 baseDir 指向根目录(而非 v1/v2)的 egg 进程 + 'LEGACY_PIDS=$(ps -eo pid=,args= | awk -v root="$ROOT_DIR" \'index($0, "baseDir") && index($0, root) && !index($0, root"/v1") && !index($0, root"/v2") { print $1 }\')', + 'if [ -z "$LEGACY_PIDS" ]; then', + ' echo "未发现旧版根目录遗留进程"', + 'else', + ' echo "发现旧版根目录遗留进程: $LEGACY_PIDS,正在停止..."', + ' kill $LEGACY_PIDS || true', + ' sleep 3', + ' REMAIN=$(ps -eo pid=,args= | awk -v root="$ROOT_DIR" \'index($0, "baseDir") && index($0, root) && !index($0, root"/v1") && !index($0, root"/v2") { print $1 }\')', + ' if [ -n "$REMAIN" ]; then', + ' kill -9 $REMAIN || true', + ' fi', + ' echo "旧版根目录遗留进程已停止"', + 'fi', + ].join('\n'); + + try { + const legacyOutput = runSsh(config, stopLegacyScript, { stdio: 'pipe' }); + console.log(String(legacyOutput || '').trim()); + } catch (err) { + // 旧版进程清理失败不阻塞部署 + console.warn(`[WARN] 旧版进程清理: ${err.message}`); + } + + // 7. 启动新实例(先不切换 current.md) + const startScript = [ + 'set -euo pipefail', + `cd ${quoteForBash(targetDir)}`, + `nohup bash -lc 'npx egg-scripts start --daemon --title=${targetTitle} --sticky --port=${targetPort} --ignore-stderr' > ${quoteForBash(startLogPath)} 2>&1 &`, + `echo "已在 ${targetDir} 启动新实例 ${targetVersion} (title=${targetTitle}, 端口 ${targetPort}),启动日志: ${startLogPath}"`, + ].join('\n'); + + const startOutput = runSsh(config, startScript, { stdio: 'pipe' }); + console.log(String(startOutput || '').trim()); + + // 8. 健康检查新实例(curl 循环等待,最多 60 秒) + const healthCheckScript = [ + 'set -euo pipefail', + `TARGET_PORT=${targetPort}`, + 'HEALTH_OK=false', + 'for attempt in $(seq 1 30); do', + ' if curl -fsS --connect-timeout 2 --max-time 4 "http://127.0.0.1:$TARGET_PORT/" >/dev/null 2>&1; then', + ` echo "新实例 (${targetVersion}) 健康检查通过 (端口 $TARGET_PORT, 第 $attempt 次)"`, + ' HEALTH_OK=true', + ' break', + ' fi', + ' sleep 2', + 'done', + 'if [ "$HEALTH_OK" != "true" ]; then', + ` echo "FATAL: 新实例 (${targetVersion}) 健康检查超时 (端口 $TARGET_PORT)" >&2`, + ' exit 1', + 'fi', + ].join('\n'); + + let healthPassed = false; + try { + const healthOutput = runSsh(config, healthCheckScript, { stdio: 'pipe' }); + console.log(String(healthOutput || '').trim()); + healthPassed = true; + } catch (err) { + console.error(`[FATAL] 新实例健康检查失败: ${err.message}`); + console.error(`[FATAL] 新实例 (${targetVersion}) 未能正常启动,保留当前活跃版本 (${currentVersion}) 不变。`); + console.error(`[FATAL] 请检查启动日志: ssh ${config.username}@${config.host} "cat ${startLogPath}"`); + console.error('[FATAL] 部署已中止,当前服务不受影响。'); + + // 尝试停止失败的新实例 + const cleanupFailedScript = [ + 'set -euo pipefail', + `TARGET_DIR=${quoteForBash(targetDir)}`, + 'FAILED_PIDS=$(ps -eo pid=,args= | awk -v root="$TARGET_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + 'if [ -n "$FAILED_PIDS" ]; then kill -9 $FAILED_PIDS || true; fi', + 'echo "已清理失败的新实例进程"', + ].join('\n'); + try { + runSsh(config, cleanupFailedScript, { stdio: 'pipe' }); + } catch (_) { /* ignore */ } + + process.exit(1); + } + + // 9. 健康检查通过 → 切换 current.md + const switchCurrentMdScript = [ + 'set -euo pipefail', + `printf '%s\\n' ${quoteForBash(targetVersion)} > ${quoteForBash(currentMdPath)}`, + `echo "current.md 已切换 -> ${targetVersion}"`, + ].join('\n'); + const switchOutput2 = runSsh(config, switchCurrentMdScript, { stdio: 'pipe' }); + console.log(String(switchOutput2 || '').trim()); + + // 10. 切换 Nginx upstream 端口并 reload + const nginxUpstreamPath = `${config.deployRoot}/nginx-upstream.conf`; + const switchNginxScript = [ + 'set -euo pipefail', + `printf 'proxy_pass http://127.0.0.1:%s;\\n' ${targetPort} > ${quoteForBash(nginxUpstreamPath)}`, + 'nginx -t && nginx -s reload', + `echo "Nginx upstream 已切换至 127.0.0.1:${targetPort}"`, + ].join('\n'); + + try { + const nginxOutput = runSsh(config, switchNginxScript, { stdio: 'pipe' }); + console.log(String(nginxOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] Nginx upstream 切换失败: ${err.message}`); + console.warn(`[WARN] 新实例已在端口 ${targetPort} 运行,但 Nginx 未自动切换。`); + console.warn(`[WARN] 请手动更新 ${nginxUpstreamPath} 并执行 nginx -s reload`); + } + + // 11. 停止旧实例(kill + 兜底 kill -9) + const stopOldScript = [ + 'set -euo pipefail', + `OLD_DIR=${quoteForBash(oldDir)}`, + `OLD_VERSION=${quoteForBash(currentVersion)}`, + `OLD_TITLE=${quoteForBash(currentTitle)}`, + 'OLD_PIDS=$(ps -eo pid=,args= | awk -v root="$OLD_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + 'if [ -z "$OLD_PIDS" ]; then', + ' echo "未找到旧实例 ($OLD_VERSION) 进程,跳过停止步骤"', + 'else', + ' echo "正在停止旧实例 ($OLD_VERSION): $OLD_PIDS"', + ' kill $OLD_PIDS || true', + ' sleep 3', + ' OLD_PIDS_REMAIN=$(ps -eo pid=,args= | awk -v root="$OLD_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + ' if [ -n "$OLD_PIDS_REMAIN" ]; then', + ' echo "旧实例 ($OLD_VERSION) 仍有残留进程,强制停止: $OLD_PIDS_REMAIN"', + ' kill -9 $OLD_PIDS_REMAIN || true', + ' fi', + ' echo "旧实例 ($OLD_VERSION) 已停止"', + 'fi', + ].join('\n'); + + try { + const stopOutput = runSsh(config, stopOldScript, { stdio: 'pipe' }); + console.log(String(stopOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 停止旧实例失败: ${err.message}`); + console.warn(`[WARN] 旧实例 (${currentVersion}) 可能仍在运行,请人工确认并停止`); + } + + // 11. 记录远端 release 状态 + const remoteStateFile = `${config.stateDir}/current-release.json`; + const remoteHistoryFile = `${config.stateDir}/release-history.jsonl`; + const releaseEntry = { + releaseVersion, + packageVersion, + gitCommitShort, + deployRoot: config.deployRoot, + targetVersion, + targetPort, + deployedAt: new Date().toISOString(), + }; + const releaseJson = JSON.stringify(releaseEntry); + + const recordReleaseScript = [ + 'set -euo pipefail', + `STATE_FILE=${quoteForBash(remoteStateFile)}`, + `HISTORY_FILE=${quoteForBash(remoteHistoryFile)}`, + `ENTRY=${quoteForBash(releaseJson)}`, + 'printf "%s\\n" "$ENTRY" > "$STATE_FILE"', + 'printf "%s\\n" "$ENTRY" >> "$HISTORY_FILE"', + 'echo "远端 release 状态已记录"', + ].join('\n'); + + try { + const recordOutput = runSsh(config, recordReleaseScript, { stdio: 'pipe' }); + console.log(String(recordOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 记录远端 release 状态失败: ${err.message}`); + } + + // 12. 清理旧备份(保留最近 N 个) + const cleanupBackupsScript = [ + 'set -euo pipefail', + `BACKUP_DIR=${quoteForBash(config.backupDir)}`, + `KEEP=${Number(config.keepBackups)}`, + 'cd "$BACKUP_DIR"', + 'ls -1t backup-*.tar.gz 2>/dev/null | tail -n +$((KEEP + 1)) | while read -r f; do rm -f "$f"; echo "已清理旧备份: $f"; done', + 'echo "备份清理完成(保留最近 ${KEEP} 个)"', + ].join('\n'); + + try { + const cleanupOutput = runSsh(config, cleanupBackupsScript, { stdio: 'pipe' }); + console.log(String(cleanupOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 清理旧备份失败: ${err.message}`); + } + + // 13. 打印完成信息 + console.log('========================================'); + console.log(`发布完成: ${envName} -> ${config.username}@${config.host}:${targetDir}`); + console.log(`线上版本号: ${releaseVersion}`); + console.log(`当前活跃版本已切换为: ${targetVersion} (端口 ${targetPort})`); + console.log('========================================'); +} + +main(); diff --git a/script/deploy-version.cjs b/script/deploy-version.cjs new file mode 100644 index 0000000..3dfa648 --- /dev/null +++ b/script/deploy-version.cjs @@ -0,0 +1,182 @@ +'use strict'; + +const path = require('node:path'); +const { + ensureCommandAvailable, + loadDeployConfig, + quoteForBash, + runSsh, +} = require('./deploy-lib.cjs'); + +function parseArgs(argv) { + const options = { + history: 0, + }; + + for (const item of argv) { + if (!item) continue; + if (item.startsWith('--history=')) { + const value = Number(item.slice('--history='.length)); + if (Number.isFinite(value) && value > 0) { + options.history = Math.floor(value); + } + } + } + + return options; +} + +/** + * 查询远端 v1/v2 活跃实例状态 + * @param {object} config - 部署配置 + * @return {{ version: string, port: number, currentMd: string } | null} 活跃实例信息,读不到返回 null + */ +function queryActiveInstance(config) { + const currentMdFile = path.posix.join(config.deployRoot, 'current.md'); + const remoteScript = [ + 'set -euo pipefail', + `FILE=${quoteForBash(currentMdFile)}`, + 'if [ -f "$FILE" ]; then', + ' cat "$FILE"', + 'else', + ' echo CURRENT_MD_NOT_FOUND', + 'fi', + ].join('\n'); + + const raw = runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); + if (!raw || raw === 'CURRENT_MD_NOT_FOUND') { + return null; + } + + const version = raw.replace(/[\r\n\s]/g, ''); + if (version !== 'v1' && version !== 'v2') { + return null; + } + + const port = version === 'v2' ? 7072 : 7071; + return { version, port, currentMd: raw.split('\n')[0].trim() }; +} + +/** + * 查询远端当前 release 信息 + * @param {object} config - 部署配置 + * @return {object | string | null} 解析后的 JSON 或原始字符串,查不到返回 null + */ +function queryCurrentRelease(config) { + const releaseFile = path.posix.join(config.stateDir, 'current-release.json'); + const remoteScript = [ + 'set -euo pipefail', + `FILE=${quoteForBash(releaseFile)}`, + 'if [ -f "$FILE" ]; then', + ' cat "$FILE"', + 'else', + ' echo ONLINE_VERSION_NOT_FOUND', + 'fi', + ].join('\n'); + + const output = runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); + if (!output || output === 'ONLINE_VERSION_NOT_FOUND') { + return null; + } + + try { + return JSON.parse(output); + } catch (error) { + return output; + } +} + +/** + * 查询远端 release 历史记录 + * @param {object} config - 部署配置 + * @param {number} limit - 返回最近 N 条记录 + * @return {Array | null} 历史记录数组,查不到返回 null + */ +function queryReleaseHistory(config, limit) { + const historyFile = path.posix.join(config.stateDir, 'release-history.jsonl'); + const remoteScript = [ + 'set -euo pipefail', + `FILE=${quoteForBash(historyFile)}`, + `LIMIT=${Number(limit)}`, + 'if [ -f "$FILE" ]; then', + ' tail -n "$LIMIT" "$FILE"', + 'else', + ' echo ONLINE_VERSION_HISTORY_NOT_FOUND', + 'fi', + ].join('\n'); + + const output = runSsh(config, remoteScript, { stdio: 'pipe' }).trim(); + if (!output || output === 'ONLINE_VERSION_HISTORY_NOT_FOUND') { + return null; + } + + const records = []; + for (const line of output.split(/\r?\n/)) { + const trimmed = line.trim(); + if (!trimmed) continue; + try { + records.push(JSON.parse(trimmed)); + } catch (error) { + records.push({ raw: trimmed }); + } + } + return records; +} + +function main() { + const envName = process.argv[2] || 'production'; + const options = parseArgs(process.argv.slice(3)); + const config = loadDeployConfig(envName); + + ensureCommandAvailable('ssh', '请先安装 OpenSSH Client 并确保 ssh 在 PATH 中。'); + + const active = queryActiveInstance(config); + const currentRelease = queryCurrentRelease(config); + + console.log('========================================'); + console.log(`部署环境: ${envName}`); + console.log(`远端主机: ${config.username}@${config.host}:${config.port}`); + console.log(`部署根目录: ${config.deployRoot}`); + console.log('========================================'); + + if (active) { + console.log(`活跃版本: ${active.version} (端口 ${active.port})`); + } else { + console.log('活跃版本: 未检测到(current.md 不存在或无效)'); + } + + console.log('----------------------------------------'); + + if (currentRelease && typeof currentRelease === 'object') { + console.log('当前线上版本:'); + console.log(` 发布版本: ${currentRelease.releaseVersion || 'N/A'}`); + console.log(` package版本: ${currentRelease.packageVersion || 'N/A'}`); + console.log(` Git commit: ${currentRelease.gitCommitShort || 'N/A'}`); + console.log(` 目标版本: ${currentRelease.targetVersion || 'N/A'} (端口 ${currentRelease.targetPort || 'N/A'})`); + console.log(` 发布时间: ${currentRelease.deployedAt || 'N/A'}`); + } else if (currentRelease) { + console.log(`当前线上版本 (原始): ${String(currentRelease)}`); + } else { + console.log('当前线上版本: 未记录'); + } + + // 历史记录 + if (options.history > 0) { + console.log('----------------------------------------'); + console.log(`最近 ${options.history} 条发布记录:`); + const history = queryReleaseHistory(config, options.history); + if (history && history.length > 0) { + for (const record of history) { + if (record.releaseVersion) { + console.log(` ${record.releaseVersion} | ${record.targetVersion || '?'} | ${record.deployedAt || '?'}`); + } else { + console.log(` ${JSON.stringify(record)}`); + } + } + } else { + console.log(' (无历史记录)'); + } + } +} + +main(); diff --git a/script/git-safety-check.cjs b/script/git-safety-check.cjs new file mode 100644 index 0000000..b2fb4b8 --- /dev/null +++ b/script/git-safety-check.cjs @@ -0,0 +1,46 @@ +'use strict'; + +const path = require('node:path'); +const { runCommandSafe } = require('./deploy-lib.cjs'); + +const BLOCKED_PATH_PATTERNS = [ + /^config\/config\.local\.js$/, + /^config\/deploy\.config\.local\.cjs$/, + /^tmp\/(?!docs\/).+/, + /^logs\//, + /^run\//, + /\.pem$/i, + /\.key$/i, + /^\.env(?:\..+)?$/, +]; + +function normalizePath(filePath) { + return filePath.replace(/\\/g, '/'); +} + +function listStagedFiles() { + const output = runCommandSafe('git', [ 'diff', '--cached', '--name-only', '--diff-filter=ACMR' ]); + if (!output) { + return []; + } + return output.split(/\r?\n/).map(item => normalizePath(item.trim())).filter(Boolean); +} + +function main() { + const stagedFiles = listStagedFiles(); + const blocked = stagedFiles.filter(filePath => BLOCKED_PATH_PATTERNS.some(pattern => pattern.test(filePath))); + + if (blocked.length === 0) { + console.log('git safety check passed'); + return; + } + + console.error('以下文件禁止提交到 git,请先取消暂存:'); + for (const filePath of blocked) { + console.error(`- ${filePath}`); + } + console.error('建议使用 git restore --staged 取消暂存,再继续提交。'); + process.exit(1); +} + +main(); diff --git a/script/rollback-remote.cjs b/script/rollback-remote.cjs new file mode 100644 index 0000000..88b1a29 --- /dev/null +++ b/script/rollback-remote.cjs @@ -0,0 +1,231 @@ +'use strict'; + +const path = require('node:path'); +const { + buildRemoteCleanupGuard, + ensureCommandAvailable, + loadDeployConfig, + quoteForBash, + runSsh, +} = require('./deploy-lib.cjs'); + +/** + * 通过 SSH 读取远端 current.md 文件,获取当前活跃版本标识(v1 或 v2) + * + * @param {object} config - 部署配置对象 + * @param {string} deployRoot - 远端部署根目录,如 /www/wwwroot/ye4s + * @return {string} 当前活跃版本标识,如 'v1' 或 'v2' + * @throws {Error} 如果读取失败或内容无效 + */ +function readRemoteCurrentVersion(config, deployRoot) { + const currentMdPath = `${deployRoot}/current.md`; + const script = `cat ${quoteForBash(currentMdPath)} 2>/dev/null || true`; + + const output = runSsh(config, script, { stdio: 'pipe' }); + const rawVersion = String(output || '').trim(); + + if (!rawVersion) { + throw new Error( + `无法读取远端当前版本文件: ${currentMdPath}。请确保远端已存在 ${deployRoot}/current.md 且内容为 v1 或 v2。` + ); + } + + const normalized = rawVersion.replace(/\r/g, '').trim(); + if (normalized !== 'v1' && normalized !== 'v2') { + throw new Error( + `远端 current.md 内容无效: "${rawVersion}",期望值为 v1 或 v2。文件路径: ${currentMdPath}` + ); + } + + return normalized; +} + +/** + * 根据版本标识返回对应监听端口(v1 → 7071,v2 → 7072) + * + * @param {string} targetVersion - 目标版本标识,'v1' 或 'v2' + * @return {number} 对应端口号 + */ +function getTargetPort(targetVersion) { + if (targetVersion === 'v1') { + return 7071; + } + return 7072; +} + +/** + * 解析命令行中的 --backup= 参数,提取备份包名称 + * + * @param {string[]} argv - 命令行参数数组 + * @return {string} 备份包名称,如未指定则返回空字符串 + */ +function parseBackupArg(argv) { + const backupArg = argv.find(item => item.startsWith('--backup=')); + if (!backupArg) { + return ''; + } + return backupArg.slice('--backup='.length).trim(); +} + +/** + * 根据版本标识返回进程 title(v1 → egg-server-ye4s-v1,v2 → egg-server-ye4s-v2) + * + * @param {string} version - 版本标识,'v1' 或 'v2' + * @return {string} 进程 title + */ +function getProcessTitle(version) { + return `egg-server-ye4s-${version}`; +} + +/** + * 回滚入口函数: + * 读取远端 current.md → 确定当前活跃版本目录和端口 → 选择备份包 + * → 停进程 → 清理代码 → 解压备份 → npm install → 重启 → 健康检查 → 切换 Nginx + */ +function main() { + const envName = process.argv[2] || 'production'; + const config = loadDeployConfig(envName); + const backupName = parseBackupArg(process.argv.slice(3)); + + ensureCommandAvailable('ssh', '请先安装 OpenSSH Client 并确保 ssh 在 PATH 中。'); + + // 1. 读取远端 current.md,确定当前活跃版本和目录 + const currentVersion = readRemoteCurrentVersion(config, config.deployRoot); + const currentDir = `${config.deployRoot}/${currentVersion}`; + const currentPort = getTargetPort(currentVersion); + const currentTitle = getProcessTitle(currentVersion); + console.log(`远端当前活跃版本: ${currentVersion},活跃目录: ${currentDir},端口: ${currentPort}`); + + // 2. 确定备份包 + const latestBackupFile = path.posix.join(config.stateDir, 'latest-backup.txt'); + const selectBackupScript = [ + 'set -euo pipefail', + `BACKUP_DIR=${quoteForBash(config.backupDir)}`, + `LATEST_BACKUP_FILE=${quoteForBash(latestBackupFile)}`, + `REQUESTED_BACKUP=${quoteForBash(backupName)}`, + 'if [ -n "$REQUESTED_BACKUP" ]; then', + ' TARGET_BACKUP="$REQUESTED_BACKUP"', + 'elif [ -f "$LATEST_BACKUP_FILE" ]; then', + ' TARGET_BACKUP="$(cat "$LATEST_BACKUP_FILE")"', + 'else', + ' echo "ERROR: 未找到最近一次发布备份,请通过 --backup=backup-时间戳.tar.gz 指定回退包。" >&2', + ' exit 1', + 'fi', + 'if [ ! -f "$BACKUP_DIR/$TARGET_BACKUP" ]; then', + ' echo "ERROR: 备份包不存在: $BACKUP_DIR/$TARGET_BACKUP" >&2', + ' exit 1', + 'fi', + 'echo "SELECTED_BACKUP=$TARGET_BACKUP"', + 'echo "$TARGET_BACKUP"', + ].join('\n'); + + const selectedBackup = runSsh(config, selectBackupScript, { stdio: 'pipe' }).trim(); + const backupFile = selectedBackup.replace(/^SELECTED_BACKUP=/, '').split('\n').pop().trim(); + if (!backupFile || backupFile.startsWith('ERROR:')) { + throw new Error(selectedBackup); + } + console.log(`使用备份包: ${config.backupDir}/${backupFile}`); + + // 3. 停止当前活跃实例 + const stopCurrentScript = [ + 'set -euo pipefail', + `CURRENT_DIR=${quoteForBash(currentDir)}`, + `CURRENT_VERSION=${quoteForBash(currentVersion)}`, + 'CURRENT_PIDS=$(ps -eo pid=,args= | awk -v root="$CURRENT_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + 'if [ -z "$CURRENT_PIDS" ]; then', + ' echo "未找到当前实例 ($CURRENT_VERSION) 进程"', + 'else', + ' echo "正在停止当前实例 ($CURRENT_VERSION): $CURRENT_PIDS"', + ' kill $CURRENT_PIDS || true', + ' sleep 3', + ' REMAIN=$(ps -eo pid=,args= | awk -v root="$CURRENT_DIR" \'index($0, root) && $2 ~ /node$/ { print $1 }\')', + ' if [ -n "$REMAIN" ]; then', + ' kill -9 $REMAIN || true', + ' fi', + ' echo "当前实例 ($CURRENT_VERSION) 已停止"', + 'fi', + ].join('\n'); + + try { + const stopOutput = runSsh(config, stopCurrentScript, { stdio: 'pipe' }); + console.log(String(stopOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 停止当前实例失败: ${err.message}`); + } + + // 4. 清理当前活跃目录并解压备份包 + const cleanupGuard = buildRemoteCleanupGuard(config.sharedDirs, config.preserveDirs); + const rollbackScript = [ + 'set -euo pipefail', + `CURRENT_DIR=${quoteForBash(currentDir)}`, + `BACKUP_DIR=${quoteForBash(config.backupDir)}`, + `BACKUP_FILE=${quoteForBash(backupFile)}`, + 'cd "$CURRENT_DIR"', + `find . -mindepth 1 -maxdepth 1 ${cleanupGuard} -exec rm -rf {} +`, + 'tar -xzf "$BACKUP_DIR/$BACKUP_FILE" -C "$CURRENT_DIR"', + 'npm install --production', + 'echo "备份包已解压并安装依赖: $BACKUP_FILE"', + ].join('\n'); + + runSsh(config, rollbackScript); + console.log(`回滚包已解压到: ${currentDir}`); + + // 5. 重启当前实例(指定端口和版本专用 title) + const startLogPath = `/tmp/ye4s-${currentVersion}-rollback.log`; + const restartScript = [ + 'set -euo pipefail', + `cd ${quoteForBash(currentDir)}`, + `nohup bash -lc 'npx egg-scripts start --daemon --title=${currentTitle} --sticky --port=${currentPort} --ignore-stderr' > ${quoteForBash(startLogPath)} 2>&1 &`, + `echo "已在 ${currentDir} 重启实例 ${currentVersion} (title=${currentTitle}, 端口 ${currentPort}),启动日志: ${startLogPath}"`, + ].join('\n'); + + const restartOutput = runSsh(config, restartScript, { stdio: 'pipe' }); + console.log(String(restartOutput || '').trim()); + + // 6. 健康检查 + const healthCheckScript = [ + 'set -euo pipefail', + `TARGET_PORT=${currentPort}`, + 'for attempt in $(seq 1 30); do', + ' if curl -fsS --connect-timeout 2 --max-time 4 "http://127.0.0.1:$TARGET_PORT/" >/dev/null 2>&1; then', + ` echo "回滚实例 (${currentVersion}) 健康检查通过 (端口 $TARGET_PORT)"`, + ' break', + ' fi', + ' if [ "$attempt" -eq 30 ]; then', + ` echo "回滚实例 (${currentVersion}) 健康检查超时 (端口 $TARGET_PORT)" >&2`, + ' exit 1', + ' fi', + ' sleep 2', + 'done', + ].join('\n'); + + try { + const healthOutput = runSsh(config, healthCheckScript, { stdio: 'pipe' }); + console.log(String(healthOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] 回滚实例健康检查失败: ${err.message}`); + } + + // 7. 确保 Nginx upstream 指向当前端口 + const nginxUpstreamPath = `${config.deployRoot}/nginx-upstream.conf`; + const switchNginxScript = [ + 'set -euo pipefail', + `printf 'proxy_pass http://127.0.0.1:%s;\\n' ${currentPort} > ${quoteForBash(nginxUpstreamPath)}`, + 'nginx -t && nginx -s reload', + `echo "Nginx upstream 已确认指向 127.0.0.1:${currentPort}"`, + ].join('\n'); + + try { + const nginxOutput = runSsh(config, switchNginxScript, { stdio: 'pipe' }); + console.log(String(nginxOutput || '').trim()); + } catch (err) { + console.warn(`[WARN] Nginx upstream 切换失败: ${err.message}`); + } + + console.log('========================================'); + console.log(`回滚完成: ${currentVersion} (端口 ${currentPort})`); + console.log(`使用备份包: ${backupFile}`); + console.log('========================================'); +} + +main(); diff --git a/script/setup-git-hooks.cjs b/script/setup-git-hooks.cjs new file mode 100644 index 0000000..4ddd7e0 --- /dev/null +++ b/script/setup-git-hooks.cjs @@ -0,0 +1,45 @@ +'use strict'; + +const fs = require('node:fs'); +const path = require('node:path'); +const { ROOT } = require('./deploy-lib.cjs'); + +function main() { + const hooksDir = path.join(ROOT, '.githooks'); + const gitHooksDir = path.join(ROOT, '.git', 'hooks'); + + if (!fs.existsSync(hooksDir)) { + fs.mkdirSync(hooksDir, { recursive: true }); + } + + // 创建 pre-commit hook 脚本 + const preCommitPath = path.join(hooksDir, 'pre-commit'); + const preCommitContent = [ + '#!/bin/sh', + 'node script/git-safety-check.cjs', + '', + ].join('\n'); + fs.writeFileSync(preCommitPath, preCommitContent, { mode: 0o755 }); + + // 配置 git 使用 .githooks 目录 + const { execSync } = require('node:child_process'); + try { + execSync('git config core.hooksPath .githooks', { cwd: ROOT, encoding: 'utf8' }); + console.log('Git hooks 已配置: core.hooksPath = .githooks'); + } catch (error) { + console.warn('配置 git core.hooksPath 失败,请手动执行: git config core.hooksPath .githooks'); + } + + // 确保 .gitignore 中有 versioning 相关规则 + const gitignorePath = path.join(ROOT, '.gitignore'); + if (fs.existsSync(gitignorePath)) { + const content = fs.readFileSync(gitignorePath, 'utf8'); + if (!content.includes('versioning/')) { + console.warn('建议在 .gitignore 中添加 versioning/ 规则以保护本地版本记录'); + } + } + + console.log('Git hooks 设置完成。'); +} + +main(); diff --git a/script/version-history.cjs b/script/version-history.cjs new file mode 100644 index 0000000..f032de9 --- /dev/null +++ b/script/version-history.cjs @@ -0,0 +1,27 @@ +'use strict'; + +const { readVersionHistory } = require('./version-registry.cjs'); + +function parseLimit(argv) { + for (const item of argv) { + if (item.startsWith('--limit=')) { + const value = Number(item.slice('--limit='.length)); + if (Number.isFinite(value) && value > 0) { + return Math.floor(value); + } + } + } + return 20; +} + +function main() { + const limit = parseLimit(process.argv.slice(2)); + const records = readVersionHistory(limit); + if (records.length === 0) { + console.log('LOCAL_VERSION_HISTORY_EMPTY'); + return; + } + console.log(JSON.stringify(records, null, 2)); +} + +main(); diff --git a/script/version-record.cjs b/script/version-record.cjs new file mode 100644 index 0000000..bec408e --- /dev/null +++ b/script/version-record.cjs @@ -0,0 +1,24 @@ +'use strict'; + +const { recordVersionUpdate } = require('./version-registry.cjs'); + +function parseArgs(argv) { + let note = ''; + for (const item of argv) { + if (item.startsWith('--note=')) { + note = item.slice('--note='.length).trim(); + } + } + return { note }; +} + +function main() { + const options = parseArgs(process.argv.slice(2)); + const entry = recordVersionUpdate({ + source: 'version:record', + note: options.note || 'package-version-update', + }); + console.log(JSON.stringify(entry, null, 2)); +} + +main(); diff --git a/script/version-registry.cjs b/script/version-registry.cjs new file mode 100644 index 0000000..7acbc51 --- /dev/null +++ b/script/version-registry.cjs @@ -0,0 +1,95 @@ +'use strict'; + +const fs = require('node:fs'); +const path = require('node:path'); +const { ROOT, runCommand, runCommandSafe, isGitAvailable } = require('./deploy-lib.cjs'); + +const VERSION_DIR = path.join(ROOT, 'versioning'); +const VERSION_HISTORY_FILE = path.join(VERSION_DIR, 'package-version-history.jsonl'); +const VERSION_CURRENT_FILE = path.join(VERSION_DIR, 'package-version-current.json'); + +function ensureVersionDir() { + fs.mkdirSync(VERSION_DIR, { recursive: true }); +} + +function getPackageMeta() { + const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8')); + const packageVersion = String(pkg.version || '0.0.0'); + + let gitCommit = ''; + let gitCommitShort = ''; + let gitBranch = ''; + if (isGitAvailable()) { + try { + gitCommit = runCommand('git', [ 'rev-parse', 'HEAD' ]); + gitCommitShort = runCommand('git', [ 'rev-parse', '--short', 'HEAD' ]); + gitBranch = runCommand('git', [ 'rev-parse', '--abbrev-ref', 'HEAD' ]); + } catch (error) { + gitCommit = ''; + gitCommitShort = ''; + gitBranch = ''; + } + } + + return { + packageVersion, + gitCommit, + gitCommitShort, + gitBranch, + }; +} + +function recordVersionUpdate(options = {}) { + ensureVersionDir(); + + const meta = getPackageMeta(); + const entry = { + recordedAt: new Date().toISOString(), + source: options.source || 'manual', + note: options.note || '', + packageVersion: meta.packageVersion, + gitCommit: meta.gitCommit, + gitCommitShort: meta.gitCommitShort, + gitBranch: meta.gitBranch, + releaseVersion: options.releaseVersion || '', + deployRoot: options.deployRoot || '', + remoteBackupFile: options.remoteBackupFile || '', + remoteStateFile: options.remoteStateFile || '', + remoteHistoryFile: options.remoteHistoryFile || '', + }; + + fs.appendFileSync(VERSION_HISTORY_FILE, `${JSON.stringify(entry)}\n`, 'utf8'); + fs.writeFileSync(VERSION_CURRENT_FILE, `${JSON.stringify(entry, null, 2)}\n`, 'utf8'); + return entry; +} + +function readVersionHistory(limit = 20) { + if (!fs.existsSync(VERSION_HISTORY_FILE)) { + return []; + } + + const lines = fs.readFileSync(VERSION_HISTORY_FILE, 'utf8') + .split(/\r?\n/) + .map(item => item.trim()) + .filter(Boolean); + + const take = Math.max(1, Number(limit || 20)); + const selected = lines.slice(-take); + const records = []; + for (const line of selected) { + try { + records.push(JSON.parse(line)); + } catch (error) { + records.push({ raw: line }); + } + } + return records; +} + +module.exports = { + VERSION_CURRENT_FILE, + VERSION_DIR, + VERSION_HISTORY_FILE, + readVersionHistory, + recordVersionUpdate, +}; diff --git a/test/app/controller/home.test.js b/test/app/controller/home.test.js new file mode 100644 index 0000000..ea43dbb --- /dev/null +++ b/test/app/controller/home.test.js @@ -0,0 +1,23 @@ +const { strict: assert } = require('node:assert'); +const path = require('node:path'); +const { statSync } = require('node:fs'); +const { app } = require('egg-mock/bootstrap'); + +describe('test/app/controller/home.test.js', () => { + it('should assert', async () => { + const pkg = require('../../../package.json'); + assert(app.config.keys.startsWith(pkg.name)); + }); + + it('should typings exists', async () => { + const typings = path.join(__dirname, '../../../typings'); + assert(statSync(typings)); + }); + + it('should GET /', async () => { + return app.httpRequest() + .get('/') + .expect('hi, egg') + .expect(200); + }); +}); diff --git a/test/app/controller/system.test.js b/test/app/controller/system.test.js new file mode 100644 index 0000000..a3bff9e --- /dev/null +++ b/test/app/controller/system.test.js @@ -0,0 +1,58 @@ +'use strict'; + +const { strict: assert } = require('node:assert'); +const { app } = require('egg-mock/bootstrap'); + +describe('test/app/controller/system.test.js', () => { + + it('POST /system someAction 调用 new_wms.queryOrder', async () => { + const res = await app.httpRequest() + .post('/system') + .send({ + name: 'someAction', + data: { barcode: 'TEST001', warehouseId: 'WH001' }, + }); + + console.log('状态码:', res.status); + console.log('响应内容:', JSON.stringify(res.body, null, 2)); + assert(res.body.data !== undefined); + }); + + it('POST /system query 调用 new_wms.queryOrder', async () => { + const res = await app.httpRequest() + .post('/system') + .send({ + name: 'query', + data: { barcode: 'TEST002', warehouseId: 'WH001' }, + }); + + console.log('状态码:', res.status); + console.log('响应内容:', JSON.stringify(res.body, null, 2)); + assert(res.body.data !== undefined); + }); + + it('POST /system 缺少 name 应返回 400', async () => { + const res = await app.httpRequest() + .post('/system') + .send({ + data: { barcode: 'TEST003', warehouseId: 'WH001' }, + }) + .expect(400); + + assert(res.body.data.success === false); + assert(res.body.data.message === '缺少 name 参数'); + }); + + it('POST /system 缺少必要参数应返回错误', async () => { + const res = await app.httpRequest() + .post('/system') + .send({ + name: 'someAction', + data: {}, + }) + .expect(200); + + console.log('响应内容:', JSON.stringify(res.body, null, 2)); + assert(res.body.data.success === false); + }); +}); diff --git a/versioning/.gitkeep b/versioning/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ye4s.code-workspace b/ye4s.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/ye4s.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file