if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global2 = uni.requireGlobal(); ArrayBuffer = global2.ArrayBuffer; Int8Array = global2.Int8Array; Uint8Array = global2.Uint8Array; Uint8ClampedArray = global2.Uint8ClampedArray; Int16Array = global2.Int16Array; Uint16Array = global2.Uint16Array; Int32Array = global2.Int32Array; Uint32Array = global2.Uint32Array; Float32Array = global2.Float32Array; Float64Array = global2.Float64Array; BigInt64Array = global2.BigInt64Array; BigUint64Array = global2.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); } else { console[type].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom) { return typeof component === "string" ? easycom : component; } const popup = { data() { return {}; }, created() { this.popup = this.getParent(); }, methods: { /** * 获取父元素实例 */ getParent(name = "uniPopup") { let parent = this.$parent; let parentName = parent.$options.name; while (parentName !== name) { parent = parent.$parent; if (!parent) return false; parentName = parent.$options.name; } return parent; } } }; const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const _sfc_main$h = { name: "uniPopupMessage", mixins: [popup], props: { /** * 主题 success/warning/info/error 默认 success */ type: { type: String, default: "success" }, /** * 消息文字 */ message: { type: String, default: "" }, /** * 显示时间,设置为 0 则不会自动关闭 */ duration: { type: Number, default: 3e3 }, maskShow: { type: Boolean, default: false } }, data() { return {}; }, created() { this.popup.maskShow = this.maskShow; this.popup.messageChild = this; }, methods: { timerClose() { if (this.duration === 0) return; clearTimeout(this.timer); this.timer = setTimeout(() => { this.popup.close(); }, this.duration); } } }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-message" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-popup-message__box fixforpc-width", "uni-popup__" + $props.type]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: vue.normalizeClass(["uni-popup-message-text", "uni-popup__" + $props.type + "-text"]) }, vue.toDisplayString($props.message), 3 /* TEXT, CLASS */ ) ], true) ], 2 /* CLASS */ ) ]); } const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-a4566996"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue"]]); class MPAnimation { constructor(options, _this) { this.options = options; this.animation = uni.createAnimation({ ...options }); this.currentStepAnimates = {}; this.next = 0; this.$ = _this; } _nvuePushAnimates(type, args) { let aniObj = this.currentStepAnimates[this.next]; let styles = {}; if (!aniObj) { styles = { styles: {}, config: {} }; } else { styles = aniObj; } if (animateTypes1.includes(type)) { if (!styles.styles.transform) { styles.styles.transform = ""; } let unit = ""; if (type === "rotate") { unit = "deg"; } styles.styles.transform += `${type}(${args + unit}) `; } else { styles.styles[type] = `${args}`; } this.currentStepAnimates[this.next] = styles; } _animateRun(styles = {}, config = {}) { let ref = this.$.$refs["ani"].ref; if (!ref) return; return new Promise((resolve, reject) => { nvueAnimation.transition(ref, { styles, ...config }, (res) => { resolve(); }); }); } _nvueNextAnimate(animates, step = 0, fn) { let obj = animates[step]; if (obj) { let { styles, config } = obj; this._animateRun(styles, config).then(() => { step += 1; this._nvueNextAnimate(animates, step, fn); }); } else { this.currentStepAnimates = {}; typeof fn === "function" && fn(); this.isEnd = true; } } step(config = {}) { this.animation.step(config); return this; } run(fn) { this.$.animationData = this.animation.export(); this.$.timer = setTimeout(() => { typeof fn === "function" && fn(); }, this.$.durationTime); } } const animateTypes1 = [ "matrix", "matrix3d", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "skew", "skewX", "skewY", "translate", "translate3d", "translateX", "translateY", "translateZ" ]; const animateTypes2 = ["opacity", "backgroundColor"]; const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"]; animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => { MPAnimation.prototype[type] = function(...args) { this.animation[type](...args); return this; }; }); function createAnimation(option, _this) { if (!_this) return; clearTimeout(_this.timer); return new MPAnimation(option, _this); } const _sfc_main$g = { name: "uniTransition", emits: ["click", "change"], props: { show: { type: Boolean, default: false }, modeClass: { type: [Array, String], default() { return "fade"; } }, duration: { type: Number, default: 300 }, styles: { type: Object, default() { return {}; } }, customClass: { type: String, default: "" }, onceRender: { type: Boolean, default: false } }, data() { return { isShow: false, transform: "", opacity: 1, animationData: {}, durationTime: 300, config: {} }; }, watch: { show: { handler(newVal) { if (newVal) { this.open(); } else { if (this.isShow) { this.close(); } } }, immediate: true } }, computed: { // 生成样式数据 stylesObject() { let styles = { ...this.styles, "transition-duration": this.duration / 1e3 + "s" }; let transform = ""; for (let i2 in styles) { let line = this.toLine(i2); transform += line + ":" + styles[i2] + ";"; } return transform; }, // 初始化动画条件 transformStyles() { return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject; } }, created() { this.config = { duration: this.duration, timingFunction: "ease", transformOrigin: "50% 50%", delay: 0 }; this.durationTime = this.duration; }, methods: { /** * ref 触发 初始化动画 */ init(obj = {}) { if (obj.duration) { this.durationTime = obj.duration; } this.animation = createAnimation(Object.assign(this.config, obj), this); }, /** * 点击组件触发回调 */ onClick() { this.$emit("click", { detail: this.isShow }); }, /** * ref 触发 动画分组 * @param {Object} obj */ step(obj, config = {}) { if (!this.animation) return; for (let i2 in obj) { try { if (typeof obj[i2] === "object") { this.animation[i2](...obj[i2]); } else { this.animation[i2](obj[i2]); } } catch (e2) { formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:148", `方法 ${i2} 不存在`); } } this.animation.step(config); return this; }, /** * ref 触发 执行动画 */ run(fn) { if (!this.animation) return; this.animation.run(fn); }, // 开始过度动画 open() { clearTimeout(this.timer); this.transform = ""; this.isShow = true; let { opacity, transform } = this.styleInit(false); if (typeof opacity !== "undefined") { this.opacity = opacity; } this.transform = transform; this.$nextTick(() => { this.timer = setTimeout(() => { this.animation = createAnimation(this.config, this); this.tranfromInit(false).step(); this.animation.run(); this.$emit("change", { detail: this.isShow }); }, 20); }); }, // 关闭过度动画 close(type) { if (!this.animation) return; this.tranfromInit(true).step().run(() => { this.isShow = false; this.animationData = null; this.animation = null; let { opacity, transform } = this.styleInit(false); this.opacity = opacity || 1; this.transform = transform; this.$emit("change", { detail: this.isShow }); }); }, // 处理动画开始前的默认样式 styleInit(type) { let styles = { transform: "" }; let buildStyle = (type2, mode) => { if (mode === "fade") { styles.opacity = this.animationType(type2)[mode]; } else { styles.transform += this.animationType(type2)[mode] + " "; } }; if (typeof this.modeClass === "string") { buildStyle(type, this.modeClass); } else { this.modeClass.forEach((mode) => { buildStyle(type, mode); }); } return styles; }, // 处理内置组合动画 tranfromInit(type) { let buildTranfrom = (type2, mode) => { let aniNum = null; if (mode === "fade") { aniNum = type2 ? 0 : 1; } else { aniNum = type2 ? "-100%" : "0"; if (mode === "zoom-in") { aniNum = type2 ? 0.8 : 1; } if (mode === "zoom-out") { aniNum = type2 ? 1.2 : 1; } if (mode === "slide-right") { aniNum = type2 ? "100%" : "0"; } if (mode === "slide-bottom") { aniNum = type2 ? "100%" : "0"; } } this.animation[this.animationMode()[mode]](aniNum); }; if (typeof this.modeClass === "string") { buildTranfrom(type, this.modeClass); } else { this.modeClass.forEach((mode) => { buildTranfrom(type, mode); }); } return this.animation; }, animationType(type) { return { fade: type ? 0 : 1, "slide-top": `translateY(${type ? "0" : "-100%"})`, "slide-right": `translateX(${type ? "0" : "100%"})`, "slide-bottom": `translateY(${type ? "0" : "100%"})`, "slide-left": `translateX(${type ? "0" : "-100%"})`, "zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`, "zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})` }; }, // 内置动画类型与实际动画对应字典 animationMode() { return { fade: "opacity", "slide-top": "translateY", "slide-right": "translateX", "slide-bottom": "translateY", "slide-left": "translateX", "zoom-in": "scale", "zoom-out": "scale" }; }, // 驼峰转中横线 toLine(name) { return name.replace(/([A-Z])/g, "-$1").toLowerCase(); } } }; function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", { ref: "ani", animation: $data.animationData, class: vue.normalizeClass($props.customClass), style: vue.normalizeStyle($options.transformStyles), onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default") ], 14, ["animation"])), [ [vue.vShow, $data.isShow] ]); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]); const _sfc_main$f = { name: "uniPopup", components: {}, emits: ["change", "maskClick"], props: { // 开启动画 animation: { type: Boolean, default: true }, // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层 // message: 消息提示 ; dialog : 对话框 type: { type: String, default: "center" }, // maskClick isMaskClick: { type: Boolean, default: null }, // TODO 2 个版本后废弃属性 ,使用 isMaskClick maskClick: { type: Boolean, default: null }, backgroundColor: { type: String, default: "none" }, safeArea: { type: Boolean, default: true }, maskBackgroundColor: { type: String, default: "rgba(0, 0, 0, 0.4)" }, borderRadius: { type: String } }, watch: { /** * 监听type类型 */ type: { handler: function(type) { if (!this.config[type]) return; this[this.config[type]](true); }, immediate: true }, isDesktop: { handler: function(newVal) { if (!this.config[newVal]) return; this[this.config[this.type]](true); }, immediate: true }, /** * 监听遮罩是否可点击 * @param {Object} val */ maskClick: { handler: function(val) { this.mkclick = val; }, immediate: true }, isMaskClick: { handler: function(val) { this.mkclick = val; }, immediate: true }, // H5 下禁止底部滚动 showPopup(show) { } }, data() { return { duration: 300, ani: [], showPopup: false, showTrans: false, popupWidth: 0, popupHeight: 0, config: { top: "top", bottom: "bottom", center: "center", left: "left", right: "right", message: "top", dialog: "center", share: "bottom" }, maskClass: { position: "fixed", bottom: 0, top: 0, left: 0, right: 0, backgroundColor: "rgba(0, 0, 0, 0.4)" }, transClass: { backgroundColor: "transparent", borderRadius: this.borderRadius || "0", position: "fixed", left: 0, right: 0 }, maskShow: true, mkclick: true, popupstyle: "top" }; }, computed: { getStyles() { let res = { backgroundColor: this.bg }; if (this.borderRadius || "0") { res = Object.assign(res, { borderRadius: this.borderRadius }); } return res; }, isDesktop() { return this.popupWidth >= 500 && this.popupHeight >= 500; }, bg() { if (this.backgroundColor === "" || this.backgroundColor === "none") { return "transparent"; } return this.backgroundColor; } }, mounted() { const fixSize = () => { const { windowWidth, windowHeight, windowTop, safeArea, screenHeight, safeAreaInsets } = uni.getSystemInfoSync(); this.popupWidth = windowWidth; this.popupHeight = windowHeight + (windowTop || 0); if (safeArea && this.safeArea) { this.safeAreaInsets = safeAreaInsets.bottom; } else { this.safeAreaInsets = 0; } }; fixSize(); }, // TODO vue3 unmounted() { this.setH5Visible(); }, activated() { this.setH5Visible(!this.showPopup); }, deactivated() { this.setH5Visible(true); }, created() { if (this.isMaskClick === null && this.maskClick === null) { this.mkclick = true; } else { this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick; } if (this.animation) { this.duration = 300; } else { this.duration = 0; } this.messageChild = null; this.clearPropagation = false; this.maskClass.backgroundColor = this.maskBackgroundColor; }, methods: { setH5Visible(visible = true) { }, /** * 公用方法,不显示遮罩层 */ closeMask() { this.maskShow = false; }, /** * 公用方法,遮罩层禁止点击 */ disableMask() { this.mkclick = false; }, // TODO nvue 取消冒泡 clear(e2) { e2.stopPropagation(); this.clearPropagation = true; }, open(direction) { if (this.showPopup) { return; } let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"]; if (!(direction && innerType.indexOf(direction) !== -1)) { direction = this.type; } if (!this.config[direction]) { formatAppLog("error", "at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:298", "缺少类型:", direction); return; } this[this.config[direction]](); this.$emit("change", { show: true, type: direction }); }, close(type) { this.showTrans = false; this.$emit("change", { show: false, type: this.type }); clearTimeout(this.timer); this.timer = setTimeout(() => { this.showPopup = false; }, 300); }, // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容 touchstart() { this.clearPropagation = false; }, onTap() { if (this.clearPropagation) { this.clearPropagation = false; return; } this.$emit("maskClick"); if (!this.mkclick) return; this.close(); }, /** * 顶部弹出样式处理 */ top(type) { this.popupstyle = this.isDesktop ? "fixforpc-top" : "top"; this.ani = ["slide-top"]; this.transClass = { position: "fixed", left: 0, right: 0, backgroundColor: this.bg, borderRadius: this.borderRadius || "0" }; if (type) return; this.showPopup = true; this.showTrans = true; this.$nextTick(() => { if (this.messageChild && this.type === "message") { this.messageChild.timerClose(); } }); }, /** * 底部弹出样式处理 */ bottom(type) { this.popupstyle = "bottom"; this.ani = ["slide-bottom"]; this.transClass = { position: "fixed", left: 0, right: 0, bottom: 0, paddingBottom: this.safeAreaInsets + "px", backgroundColor: this.bg, borderRadius: this.borderRadius || "0" }; if (type) return; this.showPopup = true; this.showTrans = true; }, /** * 中间弹出样式处理 */ center(type) { this.popupstyle = "center"; this.ani = ["zoom-out", "fade"]; this.transClass = { position: "fixed", display: "flex", flexDirection: "column", bottom: 0, left: 0, right: 0, top: 0, justifyContent: "center", alignItems: "center", borderRadius: this.borderRadius || "0" }; if (type) return; this.showPopup = true; this.showTrans = true; }, left(type) { this.popupstyle = "left"; this.ani = ["slide-left"]; this.transClass = { position: "fixed", left: 0, bottom: 0, top: 0, backgroundColor: this.bg, borderRadius: this.borderRadius || "0", display: "flex", flexDirection: "column" }; if (type) return; this.showPopup = true; this.showTrans = true; }, right(type) { this.popupstyle = "right"; this.ani = ["slide-right"]; this.transClass = { position: "fixed", bottom: 0, right: 0, top: 0, backgroundColor: this.bg, borderRadius: this.borderRadius || "0", display: "flex", flexDirection: "column" }; if (type) return; this.showPopup = true; this.showTrans = true; } } }; function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$3); return $data.showPopup ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]]) }, [ vue.createElementVNode( "view", { onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args)) }, [ $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, { key: "1", name: "mask", "mode-class": "fade", styles: $data.maskClass, duration: $data.duration, show: $data.showTrans, onClick: $options.onTap }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_uni_transition, { key: "2", "mode-class": $data.ani, name: "content", styles: $data.transClass, duration: $data.duration, show: $data.showTrans, onClick: $options.onTap }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]), style: vue.normalizeStyle($options.getStyles), onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["mode-class", "styles", "duration", "show", "onClick"]) ], 32 /* NEED_HYDRATION */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true); } const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-4dd3c44b"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]); const pages = [ { path: "pages/index/index", style: { navigationBarTitleText: "" } }, { path: "pages/home/index", style: { navigationBarTitleText: "" } }, { path: "pages/details/index", style: { navigationBarTitleText: "" } }, { path: "pages/electricity/index", style: { navigationBarTitleText: "" } }, { path: "pages/supply/supply", style: { navigationBarTitleText: "" } }, { path: "pages/supplyss/supplyss", style: { navigationBarTitleText: "" } }, { path: "pages/faultlist/index", style: { navigationBarTitleText: "" } }, { path: "pages/SYSifo/index", style: { navigationBarTitleText: "" } } ]; const globalStyle = { navigationBarTextStyle: "black", navigationBarTitleText: "", navigationStyle: "custom", navigationBarBackgroundColor: "#F8F8F8", backgroundColor: "#F8F8F8" }; const uniIdRouter = {}; const e = { pages, globalStyle, uniIdRouter }; var define_process_env_UNI_SECURE_NETWORK_CONFIG_default = []; function t$2(e2) { return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2; } function n(e2, t2, n2) { return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) { return function() { throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs"); }(null == t3 && n2.path); } }, n2.exports), n2.exports; } var s = n(function(e2, t2) { var n2; e2.exports = (n2 = n2 || function(e3, t3) { var n3 = Object.create || /* @__PURE__ */ function() { function e4() { } return function(t4) { var n4; return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4; }; }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) { var t4 = n3(this); return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() { t4.$super.init.apply(this, arguments); }), t4.init.prototype = t4, t4.$super = this, t4; }, create: function() { var e4 = this.extend(); return e4.init.apply(e4, arguments), e4; }, init: function() { }, mixIn: function(e4) { for (var t4 in e4) e4.hasOwnProperty(t4) && (this[t4] = e4[t4]); e4.hasOwnProperty("toString") && (this.toString = e4.toString); }, clone: function() { return this.init.prototype.extend(this); } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) { e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length; }, toString: function(e4) { return (e4 || c2).stringify(this); }, concat: function(e4) { var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes; if (this.clamp(), s3 % 4) for (var i3 = 0; i3 < r3; i3++) { var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255; t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8; } else for (i3 = 0; i3 < r3; i3 += 4) t4[s3 + i3 >>> 2] = n4[i3 >>> 2]; return this.sigBytes += r3, this; }, clamp: function() { var t4 = this.words, n4 = this.sigBytes; t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4); }, clone: function() { var e4 = i2.clone.call(this); return e4.words = this.words.slice(0), e4; }, random: function(t4) { for (var n4, s3 = [], r3 = function(t5) { t5 = t5; var n5 = 987654321, s4 = 4294967295; return function() { var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4; return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1); }; }, i3 = 0; i3 < t4; i3 += 4) { var a3 = r3(4294967296 * (n4 || e3.random())); n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0); } return new o2.init(s3, t4); } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) { for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) { var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16)); } return s3.join(""); }, parse: function(e4) { for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2) n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4; return new o2.init(n4, t4 / 2); } }, u2 = a2.Latin1 = { stringify: function(e4) { for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) { var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; s3.push(String.fromCharCode(i3)); } return s3.join(""); }, parse: function(e4) { for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++) n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8; return new o2.init(n4, t4); } }, h2 = a2.Utf8 = { stringify: function(e4) { try { return decodeURIComponent(escape(u2.stringify(e4))); } catch (e5) { throw new Error("Malformed UTF-8 data"); } }, parse: function(e4) { return u2.parse(unescape(encodeURIComponent(e4))); } }, l2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() { this._data = new o2.init(), this._nDataBytes = 0; }, _append: function(e4) { "string" == typeof e4 && (e4 = h2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes; }, _process: function(t4) { var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3); if (c3) { for (var h3 = 0; h3 < c3; h3 += i3) this._doProcessBlock(s3, h3); var l3 = s3.splice(0, c3); n4.sigBytes -= u3; } return new o2.init(l3, u3); }, clone: function() { var e4 = i2.clone.call(this); return e4._data = this._data.clone(), e4; }, _minBufferSize: 0 }); r2.Hasher = l2.extend({ cfg: i2.extend(), init: function(e4) { this.cfg = this.cfg.extend(e4), this.reset(); }, reset: function() { l2.reset.call(this), this._doReset(); }, update: function(e4) { return this._append(e4), this._process(), this; }, finalize: function(e4) { return e4 && this._append(e4), this._doFinalize(); }, blockSize: 16, _createHelper: function(e4) { return function(t4, n4) { return new e4.init(n4).finalize(t4); }; }, _createHmacHelper: function(e4) { return function(t4, n4) { return new d2.HMAC.init(e4, n4).finalize(t4); }; } }); var d2 = s2.algo = {}; return s2; }(Math), n2); }), r = s, i = (n(function(e2, t2) { var n2; e2.exports = (n2 = r, function(e3) { var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = []; !function() { for (var t4 = 0; t4 < 64; t4++) a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0; }(); var c2 = o2.MD5 = i2.extend({ _doReset: function() { this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]); }, _doProcessBlock: function(e4, t4) { for (var n3 = 0; n3 < 16; n3++) { var s3 = t4 + n3, r3 = e4[s3]; e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8); } var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k2 = e4[t4 + 13], A2 = e4[t4 + 14], C2 = e4[t4 + 15], P2 = i3[0], T2 = i3[1], x2 = i3[2], O2 = i3[3]; P2 = u2(P2, T2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, T2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, T2, p2, 17, a2[2]), T2 = u2(T2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, T2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, T2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, T2, y2, 17, a2[6]), T2 = u2(T2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, T2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, T2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, T2, I2, 17, a2[10]), T2 = u2(T2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, T2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, T2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, T2, A2, 17, a2[14]), P2 = h2(P2, T2 = u2(T2, x2, O2, P2, C2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = h2(O2, P2, T2, x2, y2, 9, a2[17]), x2 = h2(x2, O2, P2, T2, S2, 14, a2[18]), T2 = h2(T2, x2, O2, P2, o3, 20, a2[19]), P2 = h2(P2, T2, x2, O2, m2, 5, a2[20]), O2 = h2(O2, P2, T2, x2, I2, 9, a2[21]), x2 = h2(x2, O2, P2, T2, C2, 14, a2[22]), T2 = h2(T2, x2, O2, P2, g2, 20, a2[23]), P2 = h2(P2, T2, x2, O2, v2, 5, a2[24]), O2 = h2(O2, P2, T2, x2, A2, 9, a2[25]), x2 = h2(x2, O2, P2, T2, f2, 14, a2[26]), T2 = h2(T2, x2, O2, P2, w2, 20, a2[27]), P2 = h2(P2, T2, x2, O2, k2, 5, a2[28]), O2 = h2(O2, P2, T2, x2, p2, 9, a2[29]), x2 = h2(x2, O2, P2, T2, _2, 14, a2[30]), P2 = l2(P2, T2 = h2(T2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = l2(O2, P2, T2, x2, w2, 11, a2[33]), x2 = l2(x2, O2, P2, T2, S2, 16, a2[34]), T2 = l2(T2, x2, O2, P2, A2, 23, a2[35]), P2 = l2(P2, T2, x2, O2, c3, 4, a2[36]), O2 = l2(O2, P2, T2, x2, g2, 11, a2[37]), x2 = l2(x2, O2, P2, T2, _2, 16, a2[38]), T2 = l2(T2, x2, O2, P2, I2, 23, a2[39]), P2 = l2(P2, T2, x2, O2, k2, 4, a2[40]), O2 = l2(O2, P2, T2, x2, o3, 11, a2[41]), x2 = l2(x2, O2, P2, T2, f2, 16, a2[42]), T2 = l2(T2, x2, O2, P2, y2, 23, a2[43]), P2 = l2(P2, T2, x2, O2, v2, 4, a2[44]), O2 = l2(O2, P2, T2, x2, b2, 11, a2[45]), x2 = l2(x2, O2, P2, T2, C2, 16, a2[46]), P2 = d2(P2, T2 = l2(T2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, T2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, T2, A2, 15, a2[50]), T2 = d2(T2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, T2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, T2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, T2, I2, 15, a2[54]), T2 = d2(T2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, T2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, T2, x2, C2, 10, a2[57]), x2 = d2(x2, O2, P2, T2, y2, 15, a2[58]), T2 = d2(T2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, T2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, T2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, T2, p2, 15, a2[62]), T2 = d2(T2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + T2 | 0, i3[2] = i3[2] + x2 | 0, i3[3] = i3[3] + O2 | 0; }, _doFinalize: function() { var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes; n3[r3 >>> 5] |= 128 << 24 - r3 % 32; var i3 = e3.floor(s3 / 4294967296), o3 = s3; n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process(); for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) { var h3 = c3[u3]; c3[u3] = 16711935 & (h3 << 8 | h3 >>> 24) | 4278255360 & (h3 << 24 | h3 >>> 8); } return a3; }, clone: function() { var e4 = i2.clone.call(this); return e4._hash = this._hash.clone(), e4; } }); function u2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function h2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function l2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function d2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2); }(Math), n2.MD5); }), n(function(e2, t2) { var n2; e2.exports = (n2 = r, void function() { var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8; e3.algo.HMAC = t3.extend({ init: function(e4, t4) { e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4)); var n3 = e4.blockSize, r2 = 4 * n3; t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp(); for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++) a2[u2] ^= 1549556828, c2[u2] ^= 909522486; i2.sigBytes = o2.sigBytes = r2, this.reset(); }, reset: function() { var e4 = this._hasher; e4.reset(), e4.update(this._iKey); }, update: function(e4) { return this._hasher.update(e4), this; }, finalize: function(e4) { var t4 = this._hasher, n3 = t4.finalize(e4); return t4.reset(), t4.finalize(this._oKey.clone().concat(n3)); } }); }()); }), n(function(e2, t2) { e2.exports = r.HmacMD5; })), o = n(function(e2, t2) { e2.exports = r.enc.Utf8; }), a = n(function(e2, t2) { var n2; e2.exports = (n2 = r, function() { var e3 = n2, t3 = e3.lib.WordArray; function s2(e4, n3, s3) { for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++) if (o2 % 4) { var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2; r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++; } return t3.create(r2, i2); } e3.enc.Base64 = { stringify: function(e4) { var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map; e4.clamp(); for (var r2 = [], i2 = 0; i2 < n3; i2 += 3) for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++) r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63)); var c2 = s3.charAt(64); if (c2) for (; r2.length % 4; ) r2.push(c2); return r2.join(""); }, parse: function(e4) { var t4 = e4.length, n3 = this._map, r2 = this._reverseMap; if (!r2) { r2 = this._reverseMap = []; for (var i2 = 0; i2 < n3.length; i2++) r2[n3.charCodeAt(i2)] = i2; } var o2 = n3.charAt(64); if (o2) { var a2 = e4.indexOf(o2); -1 !== a2 && (t4 = a2); } return s2(e4, t4, r2); }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }; }(), n2.enc.Base64); }); const c = "FUNCTION", u = "OBJECT", h = "CLIENT_DB", l = "pending", d = "fulfilled", p = "rejected"; function f(e2) { return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase(); } function g(e2) { return "object" === f(e2); } function m(e2) { return "function" == typeof e2; } function y(e2) { return function() { try { return e2.apply(e2, arguments); } catch (e3) { console.error(e3); } }; } const _ = "REJECTED", w = "NOT_PENDING"; class v { constructor({ createPromise: e2, retryRule: t2 = _ } = {}) { this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2; } get needRetry() { if (!this.status) return true; switch (this.retryRule) { case _: return this.status === p; case w: return this.status !== l; } } exec() { return this.needRetry ? (this.status = l, this.promise = this.createPromise().then((e2) => (this.status = d, Promise.resolve(e2)), (e2) => (this.status = p, Promise.reject(e2))), this.promise) : this.promise; } } function I(e2) { return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2; } const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = I(""), T = I("[]") || []; let O = ""; try { O = "__UNI__8782431"; } catch (e2) { } let E = {}; function L(e2, t2 = {}) { var n2, s2; return n2 = E, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (E[e2] = t2), E[e2]; } E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {}; const R = ["invoke", "success", "fail", "complete"], U = L("_globalUniCloudInterceptor"); function N(e2, t2) { U[e2] || (U[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => { R.indexOf(n2) > -1 && function(e3, t3, n3) { let s2 = U[e3][t3]; s2 || (s2 = U[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3); }(e2, n2, t2[n2]); }); } function D(e2, t2) { U[e2] || (U[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => { R.indexOf(n2) > -1 && function(e3, t3, n3) { const s2 = U[e3][t3]; if (!s2) return; const r2 = s2.indexOf(n3); r2 > -1 && s2.splice(r2, 1); }(e2, n2, t2[n2]); }) : delete U[e2]; } function M(e2, t2) { return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve(); } function q(e2, t2) { return U[e2] && U[e2][t2] || []; } function F(e2) { N("callObject", e2); } const K = L("_globalUniCloudListener"), j = "response", $ = "needLogin", B = "refreshToken", W = "clientdb", H = "cloudfunction", z = "cloudobject"; function J(e2) { return K[e2] || (K[e2] = []), K[e2]; } function V(e2, t2) { const n2 = J(e2); n2.includes(t2) || n2.push(t2); } function G(e2, t2) { const n2 = J(e2), s2 = n2.indexOf(t2); -1 !== s2 && n2.splice(s2, 1); } function Y(e2, t2) { const n2 = J(e2); for (let e3 = 0; e3 < n2.length; e3++) { (0, n2[e3])(t2); } } let Q, X = false; function Z() { return Q || (Q = new Promise((e2) => { X && e2(), function t2() { if ("function" == typeof getCurrentPages) { const t3 = getCurrentPages(); t3 && t3[0] && (X = true, e2()); } X || setTimeout(() => { t2(); }, 30); }(); }), Q); } function ee(e2) { const t2 = {}; for (const n2 in e2) { const s2 = e2[n2]; m(s2) && (t2[n2] = y(s2)); } return t2; } class te extends Error { constructor(e2) { super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId; } toJson(e2 = 0) { if (!(e2 >= 10)) return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause }; } } var ne = { request: (e2) => uni.request(e2), uploadFile: (e2) => uni.uploadFile(e2), setStorageSync: (e2, t2) => uni.setStorageSync(e2, t2), getStorageSync: (e2) => uni.getStorageSync(e2), removeStorageSync: (e2) => uni.removeStorageSync(e2), clearStorageSync: () => uni.clearStorageSync(), connectSocket: (e2) => uni.connectSocket(e2) }; function se(e2) { return e2 && se(e2.__v_raw) || e2; } function re() { return { token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"), tokenExpired: ne.getStorageSync("uni_id_token_expired") }; } function ie({ token: e2, tokenExpired: t2 } = {}) { e2 && ne.setStorageSync("uni_id_token", e2), t2 && ne.setStorageSync("uni_id_token_expired", t2); } let oe, ae; function ce() { return oe || (oe = uni.getSystemInfoSync()), oe; } function ue() { let e2, t2; try { if (uni.getLaunchOptionsSync) { if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return; const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync(); e2 = s2, t2 = n2; } } catch (e3) { } return { channel: e2, scene: t2 }; } let he = {}; function le() { const e2 = uni.getLocale && uni.getLocale() || "en"; if (ae) return { ...he, ...ae, locale: e2, LOCALE: e2 }; const t2 = ce(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["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 e3 in t2) Object.hasOwnProperty.call(t2, e3) && -1 === o2.indexOf(e3) && delete t2[e3]; return ae = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...ue(), ...t2 }, { ...he, ...ae, locale: e2, LOCALE: e2 }; } var de = { sign: function(e2, t2) { let n2 = ""; return Object.keys(e2).sort().forEach(function(t3) { e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]); }), n2 = n2.slice(1), i(n2, t2).toString(); }, wrappedRequest: function(e2, t2) { return new Promise((n2, s2) => { t2(Object.assign(e2, { complete(e3) { e3 || (e3 = {}); const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"]; if (!e3.statusCode || e3.statusCode >= 400) { const n3 = e3.data && e3.data.error && e3.data.error.code || "SYS_ERR", r3 = e3.data && e3.data.error && e3.data.error.message || e3.errMsg || "request:fail"; return s2(new te({ code: n3, message: r3, requestId: t3 })); } const r2 = e3.data; if (r2.error) return s2(new te({ code: r2.error.code, message: r2.error.message, requestId: t3 })); r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2); } })); }); }, toBase64: function(e2) { return a.stringify(o.parse(e2)); } }; var pe = class { constructor(e2) { ["spaceId", "clientSecret"].forEach((t2) => { if (!Object.prototype.hasOwnProperty.call(e2, t2)) throw new Error(`${t2} required`); }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), 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 = ne, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => { if (!e3.result || !e3.result.accessToken) throw new te({ code: "AUTH_FAILED", message: "获取accessToken失败" }); this.setAccessToken(e3.result.accessToken); }), retryRule: w }); } get hasAccessToken() { return !!this.accessToken; } setAccessToken(e2) { this.accessToken = e2; } requestWrapped(e2) { return de.wrappedRequest(e2, this.adapter.request); } requestAuth(e2) { return this.requestWrapped(e2); } request(e2, t2) { return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => { !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3(); }).then(() => this.getAccessToken()).then(() => { const t4 = this.rebuildRequest(e2); return this.request(t4, true); })) : this.getAccessToken().then(() => { const t3 = this.rebuildRequest(e2); return this.request(t3, true); })); } rebuildRequest(e2) { const t2 = Object.assign({}, e2); return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = de.sign(t2.data, this.config.clientSecret), t2; } setupRequest(e2, t2) { const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 }; } getAccessToken() { return this._getAccessTokenPromiseHub.exec(); } async authorize() { await this.getAccessToken(); } callFunction(e2) { const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) }; return this.request(this.setupRequest(t2)); } getOSSUploadOptionsFromPath(e2) { const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) }; return this.request(this.setupRequest(t2)); } uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) { return new Promise((o2, a2) => { const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) { e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => { i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } reportOSSUpload(e2) { const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) }; return this.request(this.setupRequest(t2)); } async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) { if ("string" !== f(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" }); if (!(t2 = t2.trim())) throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" }); if (/:\/\//.test(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" }); const o2 = i2 && i2.envType || this.config.envType; if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1)) throw new te({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" }); const a2 = (await this.getOSSUploadOptionsFromPath({ env: o2, filename: s2 ? t2.split("/").pop() : t2, fileId: s2 ? t2 : void 0 })).result, c2 = "https://" + a2.cdnDomain + "/" + a2.ossPath, { securityToken: u2, accessKeyId: h2, signature: l2, host: d2, ossPath: p2, id: g2, policy: m2, ossCallbackUrl: y2 } = a2, _2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: h2, Signature: l2, host: d2, id: g2, key: p2, policy: m2, success_action_status: 200 }; if (u2 && (_2["x-oss-security-token"] = u2), y2) { const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" }); _2.callback = de.toBase64(e3); } const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 }; if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2) return { success: true, filePath: e2, fileID: c2 }; if ((await this.reportOSSUpload({ id: g2 })).success) return { success: true, filePath: e2, fileID: c2 }; throw new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }); } getTempFileURL({ fileList: e2 } = {}) { return new Promise((t2, n2) => { Array.isArray(e2) && 0 !== e2.length || n2(new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) }); }); } async getFileInfo({ fileList: e2 } = {}) { if (!Array.isArray(e2) || 0 === e2.length) throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }); const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) }; return { fileList: (await this.request(this.setupRequest(t2))).result }; } }; var fe = { init(e2) { const t2 = new pe(e2), n2 = { signInAnonymously: function() { return t2.authorize(); }, getLoginState: function() { return Promise.resolve(false); } }; return t2.auth = function() { return n2; }, t2.customAuth = t2.auth, t2; } }; const ge = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:"; var me; !function(e2) { e2.local = "local", e2.none = "none", e2.session = "session"; }(me || (me = {})); var ye = function() { }, _e = n(function(e2, t2) { var n2; e2.exports = (n2 = r, function(e3) { var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = []; !function() { function t4(t5) { for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++) if (!(t5 % s4)) return false; return true; } function n3(e4) { return 4294967296 * (e4 - (0 | e4)) | 0; } for (var s3 = 2, r3 = 0; r3 < 64; ) t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++; }(); var u2 = [], h2 = o2.SHA256 = i2.extend({ _doReset: function() { this._hash = new r2.init(a2.slice(0)); }, _doProcessBlock: function(e4, t4) { for (var n3 = this._hash.words, s3 = n3[0], r3 = n3[1], i3 = n3[2], o3 = n3[3], a3 = n3[4], h3 = n3[5], l2 = n3[6], d2 = n3[7], p2 = 0; p2 < 64; p2++) { if (p2 < 16) u2[p2] = 0 | e4[t4 + p2]; else { var f2 = u2[p2 - 15], g2 = (f2 << 25 | f2 >>> 7) ^ (f2 << 14 | f2 >>> 18) ^ f2 >>> 3, m2 = u2[p2 - 2], y2 = (m2 << 15 | m2 >>> 17) ^ (m2 << 13 | m2 >>> 19) ^ m2 >>> 10; u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16]; } var _2 = s3 & r3 ^ s3 & i3 ^ r3 & i3, w2 = (s3 << 30 | s3 >>> 2) ^ (s3 << 19 | s3 >>> 13) ^ (s3 << 10 | s3 >>> 22), v2 = d2 + ((a3 << 26 | a3 >>> 6) ^ (a3 << 21 | a3 >>> 11) ^ (a3 << 7 | a3 >>> 25)) + (a3 & h3 ^ ~a3 & l2) + c2[p2] + u2[p2]; d2 = l2, l2 = h3, h3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0; } n3[0] = n3[0] + s3 | 0, n3[1] = n3[1] + r3 | 0, n3[2] = n3[2] + i3 | 0, n3[3] = n3[3] + o3 | 0, n3[4] = n3[4] + a3 | 0, n3[5] = n3[5] + h3 | 0, n3[6] = n3[6] + l2 | 0, n3[7] = n3[7] + d2 | 0; }, _doFinalize: function() { var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes; return n3[r3 >>> 5] |= 128 << 24 - r3 % 32, n3[14 + (r3 + 64 >>> 9 << 4)] = e3.floor(s3 / 4294967296), n3[15 + (r3 + 64 >>> 9 << 4)] = s3, t4.sigBytes = 4 * n3.length, this._process(), this._hash; }, clone: function() { var e4 = i2.clone.call(this); return e4._hash = this._hash.clone(), e4; } }); t3.SHA256 = i2._createHelper(h2), t3.HmacSHA256 = i2._createHmacHelper(h2); }(Math), n2.SHA256); }), we = _e, ve = n(function(e2, t2) { e2.exports = r.HmacSHA256; }); const Ie = () => { let e2; if (!Promise) { e2 = () => { }, e2.promise = {}; const t3 = () => { throw new te({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' }); }; return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2; } const t2 = new Promise((t3, n2) => { e2 = (e3, s2) => e3 ? n2(e3) : t3(s2); }); return e2.promise = t2, e2; }; function Se(e2) { return void 0 === e2; } function be(e2) { return "[object Null]" === Object.prototype.toString.call(e2); } var ke; function Ae(e2) { const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]); var n2; for (const e3 of t2) { const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3; if (t3()) return { adapter: n3(), runtime: s2 }; } } !function(e2) { e2.WEB = "web", e2.WX_MP = "wx_mp"; }(ke || (ke = {})); const Ce = { adapter: null, runtime: void 0 }, Pe = ["anonymousUuidKey"]; class Te extends ye { constructor() { super(), Ce.adapter.root.tcbObject || (Ce.adapter.root.tcbObject = {}); } setItem(e2, t2) { Ce.adapter.root.tcbObject[e2] = t2; } getItem(e2) { return Ce.adapter.root.tcbObject[e2]; } removeItem(e2) { delete Ce.adapter.root.tcbObject[e2]; } clear() { delete Ce.adapter.root.tcbObject; } } function xe(e2, t2) { switch (e2) { case "local": return t2.localStorage || new Te(); case "none": return new Te(); default: return t2.sessionStorage || new Te(); } } class Oe { constructor(e2) { if (!this._storage) { this._persistence = Ce.adapter.primaryStorage || e2.persistence, this._storage = xe(this._persistence, Ce.adapter); const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = `user_info_${e2.env}`; this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 }; } } updatePersistence(e2) { if (e2 === this._persistence) return; const t2 = "local" === this._persistence; this._persistence = e2; const n2 = xe(e2, Ce.adapter); for (const e3 in this.keys) { const s2 = this.keys[e3]; if (t2 && Pe.includes(e3)) continue; const r2 = this._storage.getItem(s2); Se(r2) || be(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2)); } this._storage = n2; } setStore(e2, t2, n2) { if (!this._storage) return; const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2); try { this._storage.setItem(e2, r2); } catch (e3) { throw e3; } } getStore(e2, t2) { try { if (!this._storage) return; } catch (e3) { return ""; } t2 = t2 || "localCachev1"; const n2 = this._storage.getItem(e2); if (!n2) return ""; if (n2.indexOf(t2) >= 0) { return JSON.parse(n2).content; } return ""; } removeStore(e2) { this._storage.removeItem(e2); } } const Ee = {}, Le = {}; function Re(e2) { return Ee[e2]; } class Ue { constructor(e2, t2) { this.data = t2 || null, this.name = e2; } } class Ne extends Ue { constructor(e2, t2) { super("error", { error: e2, data: t2 }), this.error = e2; } } const De = new class { constructor() { this._listeners = {}; } on(e2, t2) { return function(e3, t3, n2) { n2[e3] = n2[e3] || [], n2[e3].push(t3); }(e2, t2, this._listeners), this; } off(e2, t2) { return function(e3, t3, n2) { if (n2 && n2[e3]) { const s2 = n2[e3].indexOf(t3); -1 !== s2 && n2[e3].splice(s2, 1); } }(e2, t2, this._listeners), this; } fire(e2, t2) { if (e2 instanceof Ne) return console.error(e2.error), this; const n2 = "string" == typeof e2 ? new Ue(e2, t2 || {}) : e2; const s2 = n2.name; if (this._listens(s2)) { n2.target = this; const e3 = this._listeners[s2] ? [...this._listeners[s2]] : []; for (const t3 of e3) t3.call(this, n2); } return this; } _listens(e2) { return this._listeners[e2] && this._listeners[e2].length > 0; } }(); function Me(e2, t2) { De.on(e2, t2); } function qe(e2, t2 = {}) { De.fire(e2, t2); } function Fe(e2, t2) { De.off(e2, t2); } const Ke = "loginStateChanged", je = "loginStateExpire", $e = "loginTypeChanged", Be = "anonymousConverted", We = "refreshAccessToken"; var He; !function(e2) { e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL"; }(He || (He = {})); const ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Je = { "X-SDK-Version": "1.3.5" }; function Ve(e2, t2, n2) { const s2 = e2[t2]; e2[t2] = function(t3) { const r2 = {}, i2 = {}; n2.forEach((n3) => { const { data: s3, headers: o3 } = n3.call(e2, t3); Object.assign(r2, s3), Object.assign(i2, o3); }); const o2 = t3.data; return o2 && (() => { var e3; if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3)) t3.data = { ...o2, ...r2 }; else for (const e4 in r2) o2.append(e4, r2[e4]); })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3); }; } function Ge() { const e2 = Math.random().toString(16).slice(2); return { data: { seqId: e2 }, headers: { ...Je, "x-seqid": e2 } }; } class Ye { constructor(e2 = {}) { var t2; this.config = e2, this._reqClass = new Ce.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Re(this.config.env), this._localCache = (t2 = this.config.env, Le[t2]), Ve(this._reqClass, "post", [Ge]), Ve(this._reqClass, "upload", [Ge]), Ve(this._reqClass, "download", [Ge]); } async post(e2) { return await this._reqClass.post(e2); } async upload(e2) { return await this._reqClass.upload(e2); } async download(e2) { return await this._reqClass.download(e2); } async refreshAccessToken() { let e2, t2; this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken()); try { e2 = await this._refreshAccessTokenPromise; } catch (e3) { t2 = e3; } if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2) throw t2; return e2; } async _refreshAccessToken() { const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys; this._cache.removeStore(e2), this._cache.removeStore(t2); let i2 = this._cache.getStore(n2); if (!i2) throw new te({ message: "未登录CloudBase" }); const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2); if (a2.data.code) { const { code: e3 } = a2.data; if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) { if (this._cache.getStore(s2) === He.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) { const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 }); return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken(); } qe(je), this._cache.removeStore(n2); } throw new te({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` }); } if (a2.data.access_token) return qe(We), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire }; a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken()); } async getAccessToken() { const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys; if (!this._cache.getStore(n2)) throw new te({ message: "refresh token不存在,登录状态异常" }); let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true; return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 }; } async request(e2, t2, n2) { const s2 = `x-tcb-trace_${this.config.env}`; let r2 = "application/x-www-form-urlencoded"; const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 }; if (-1 === ze.indexOf(e2)) { const { refreshTokenKey: e3 } = this._cache.keys; this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken); } let o2; if ("storage.uploadFile" === e2) { o2 = new FormData(); for (let e3 in o2) o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]); r2 = "multipart/form-data"; } else { r2 = "application/json", o2 = {}; for (let e3 in i2) void 0 !== i2[e3] && (o2[e3] = i2[e3]); } let a2 = { headers: { "content-type": r2 } }; n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress); const c2 = this._localCache.getStore(s2); c2 && (a2.headers["X-TCB-Trace"] = c2); const { parse: u2, inQuery: h2, search: l2 } = t2; let d2 = { env: this.config.env }; u2 && (d2.parse = true), h2 && (d2 = { ...h2, ...d2 }); let p2 = function(e3, t3, n3 = {}) { const s3 = /\?/.test(t3); let r3 = ""; for (let e4 in n3) "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`; return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`; }(ge, "//tcb-api.tencentcloudapi.com/web", d2); l2 && (p2 += l2); const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"]; if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data) throw new te({ code: "NETWORK_ERROR", message: "network request error" }); return f2; } async send(e2, t2 = {}) { const n2 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress }); if ("ACCESS_TOKEN_EXPIRED" === n2.data.code && -1 === ze.indexOf(e2)) { await this.refreshAccessToken(); const n3 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress }); if (n3.data.code) throw new te({ code: n3.data.code, message: n3.data.message }); return n3.data; } if (n2.data.code) throw new te({ code: n2.data.code, message: n2.data.message }); return n2.data; } setRefreshToken(e2) { const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2); } } const Qe = {}; function Xe(e2) { return Qe[e2]; } class Ze { constructor(e2) { this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env); } setRefreshToken(e2) { const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2); } setAccessToken(e2, t2) { const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys; this._cache.setStore(n2, e2), this._cache.setStore(s2, t2); } async refreshUserInfo() { const { data: e2 } = await this._request.send("auth.getUserInfo", {}); return this.setLocalUserInfo(e2), e2; } setLocalUserInfo(e2) { const { userInfoKey: t2 } = this._cache.keys; this._cache.setStore(t2, e2); } } class et { constructor(e2) { if (!e2) throw new te({ code: "PARAM_ERROR", message: "envId is not defined" }); this._envId = e2, this._cache = Re(this._envId), this._request = Xe(this._envId), this.setUserInfo(); } linkWithTicket(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "ticket must be string" }); return this._request.send("auth.linkWithTicket", { ticket: e2 }); } linkWithRedirect(e2) { e2.signInWithRedirect(); } updatePassword(e2, t2) { return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 }); } updateEmail(e2) { return this._request.send("auth.updateEmail", { newEmail: e2 }); } updateUsername(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); return this._request.send("auth.updateUsername", { username: e2 }); } async getLinkedUidList() { const { data: e2 } = await this._request.send("auth.getLinkedUidList", {}); let t2 = false; const { users: n2 } = e2; return n2.forEach((e3) => { e3.wxOpenId && e3.wxPublicId && (t2 = true); }), { users: n2, hasPrimaryUid: t2 }; } setPrimaryUid(e2) { return this._request.send("auth.setPrimaryUid", { uid: e2 }); } unlink(e2) { return this._request.send("auth.unlink", { platform: e2 }); } async update(e2) { const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 }); this.setLocalUserInfo(a2); } async refresh() { const { data: e2 } = await this._request.send("auth.getUserInfo", {}); return this.setLocalUserInfo(e2), e2; } setUserInfo() { const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2); ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => { this[e3] = t2[e3]; }), this.location = { country: t2.country, province: t2.province, city: t2.city }; } setLocalUserInfo(e2) { const { userInfoKey: t2 } = this._cache.keys; this._cache.setStore(t2, e2), this.setUserInfo(); } } class tt { constructor(e2) { if (!e2) throw new te({ code: "PARAM_ERROR", message: "envId is not defined" }); this._cache = Re(e2); const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2); this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new et(e2); } get isAnonymousAuth() { return this.loginType === He.ANONYMOUS; } get isCustomAuth() { return this.loginType === He.CUSTOM; } get isWeixinAuth() { return this.loginType === He.WECHAT || this.loginType === He.WECHAT_OPEN || this.loginType === He.WECHAT_PUBLIC; } get loginType() { return this._cache.getStore(this._cache.keys.loginTypeKey); } } class nt extends Ze { async signIn() { this._cache.updatePersistence("local"); const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 }); if (r2.uuid && r2.refresh_token) { this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.ANONYMOUS, persistence: "local" }); const e3 = new tt(this.config.env); return await e3.user.refresh(), e3; } throw new te({ message: "匿名登录失败" }); } async linkAndRetrieveDataWithTicket(e2) { const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 }); if (i2.refresh_token) return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), qe(Be, { env: this.config.env }), qe($e, { loginType: He.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } }; throw new te({ message: "匿名转化失败" }); } _setAnonymousUUID(e2) { const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, He.ANONYMOUS); } _clearAnonymousUUID() { this._cache.removeStore(this._cache.keys.anonymousUuidKey); } } class st extends Ze { async signIn(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "ticket must be a string" }); const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" }); if (n2.refresh_token) return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new tt(this.config.env); throw new te({ message: "自定义登录失败" }); } } class rt extends Ze { async signIn(e2, t2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "email must be a string" }); const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2; if (r2) return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.EMAIL, persistence: this.config.persistence }), new tt(this.config.env); throw s2.code ? new te({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new te({ message: "邮箱登录失败" }); } async activate(e2) { return this._request.send("auth.activateEndUserMail", { token: e2 }); } async resetPasswordWithToken(e2, t2) { return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 }); } } class it extends Ze { async signIn(e2, t2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); "string" != typeof t2 && (t2 = "", console.warn("password is empty")); const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: He.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2; if (r2) return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.USERNAME, persistence: this.config.persistence }), new tt(this.config.env); throw s2.code ? new te({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new te({ message: "用户名密码登录失败" }); } } class ot { constructor(e2) { this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Me($e, this._onLoginTypeChanged); } get currentUser() { const e2 = this.hasLoginState(); return e2 && e2.user || null; } get loginType() { return this._cache.getStore(this._cache.keys.loginTypeKey); } anonymousAuthProvider() { return new nt(this.config); } customAuthProvider() { return new st(this.config); } emailAuthProvider() { return new rt(this.config); } usernameAuthProvider() { return new it(this.config); } async signInAnonymously() { return new nt(this.config).signIn(); } async signInWithEmailAndPassword(e2, t2) { return new rt(this.config).signIn(e2, t2); } signInWithUsernameAndPassword(e2, t2) { return new it(this.config).signIn(e2, t2); } async linkAndRetrieveDataWithTicket(e2) { this._anonymousAuthProvider || (this._anonymousAuthProvider = new nt(this.config)), Me(Be, this._onAnonymousConverted); return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2); } async signOut() { if (this.loginType === He.ANONYMOUS) throw new te({ message: "匿名用户不支持登出操作" }); const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2); if (!s2) return; const r2 = await this._request.send("auth.logout", { refresh_token: s2 }); return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), qe(Ke), qe($e, { env: this.config.env, loginType: He.NULL, persistence: this.config.persistence }), r2; } async signUpWithEmailAndPassword(e2, t2) { return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 }); } async sendPasswordResetEmail(e2) { return this._request.send("auth.sendPasswordResetEmail", { email: e2 }); } onLoginStateChanged(e2) { Me(Ke, () => { const t3 = this.hasLoginState(); e2.call(this, t3); }); const t2 = this.hasLoginState(); e2.call(this, t2); } onLoginStateExpired(e2) { Me(je, e2.bind(this)); } onAccessTokenRefreshed(e2) { Me(We, e2.bind(this)); } onAnonymousConverted(e2) { Me(Be, e2.bind(this)); } onLoginTypeChanged(e2) { Me($e, () => { const t2 = this.hasLoginState(); e2.call(this, t2); }); } async getAccessToken() { return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env }; } hasLoginState() { const { refreshTokenKey: e2 } = this._cache.keys; return this._cache.getStore(e2) ? new tt(this.config.env) : null; } async isUsernameRegistered(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 }); return t2 && t2.isRegistered; } getLoginState() { return Promise.resolve(this.hasLoginState()); } async signInWithTicket(e2) { return new st(this.config).signIn(e2); } shouldRefreshAccessToken(e2) { this._request._shouldRefreshAccessTokenHook = e2.bind(this); } getUserInfo() { return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId }); } getAuthHeader() { const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2); return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 }; } _onAnonymousConverted(e2) { const { env: t2 } = e2.data; t2 === this.config.env && this._cache.updatePersistence(this.config.persistence); } _onLoginTypeChanged(e2) { const { loginType: t2, persistence: n2, env: s2 } = e2.data; s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2)); } } const at = function(e2, t2) { t2 = t2 || Ie(); const n2 = Xe(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2; return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => { const { data: { url: a2, authorization: c2, token: u2, fileId: h2, cosFileId: l2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": l2, success_action_status: "201", "x-cos-security-token": u2 }; n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => { 201 === e4.statusCode ? t2(null, { fileID: h2, requestId: d2 }) : t2(new te({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` })); }).catch((e4) => { t2(e4); }); }).catch((e3) => { t2(e3); }), t2.promise; }, ct = function(e2, t2) { t2 = t2 || Ie(); const n2 = Xe(this.config.env), { cloudPath: s2 } = e2; return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => { t2(null, e3); }).catch((e3) => { t2(e3); }), t2.promise; }, ut = function({ fileList: e2 }, t2) { if (t2 = t2 || Ie(), !e2 || !Array.isArray(e2)) return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" }; for (let t3 of e2) if (!t3 || "string" != typeof t3) return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }; const n2 = { fileid_list: e2 }; return Xe(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => { e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId }); }).catch((e3) => { t2(e3); }), t2.promise; }, ht = function({ fileList: e2 }, t2) { t2 = t2 || Ie(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" }); let n2 = []; for (let s3 of e2) "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" }); const s2 = { file_list: n2 }; return Xe(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => { e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId }); }).catch((e3) => { t2(e3); }), t2.promise; }, lt = async function({ fileID: e2 }, t2) { const n2 = (await ht.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0]; if ("SUCCESS" !== n2.code) return t2 ? t2(n2) : new Promise((e3) => { e3(n2); }); const s2 = Xe(this.config.env); let r2 = n2.download_url; if (r2 = encodeURI(r2), !t2) return s2.download({ url: r2 }); t2(await s2.download({ url: r2 })); }, dt = function({ name: e2, data: t2, query: n2, parse: s2, search: r2 }, i2) { const o2 = i2 || Ie(); let a2; try { a2 = t2 ? JSON.stringify(t2) : ""; } catch (e3) { return Promise.reject(e3); } if (!e2) return Promise.reject(new te({ code: "PARAM_ERROR", message: "函数名不能为空" })); const c2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: a2 }; return Xe(this.config.env).send("functions.invokeFunction", c2).then((e3) => { if (e3.code) o2(null, e3); else { let t3 = e3.data.response_data; if (s2) o2(null, { result: t3, requestId: e3.requestId }); else try { t3 = JSON.parse(e3.data.response_data), o2(null, { result: t3, requestId: e3.requestId }); } catch (e4) { o2(new te({ message: "response data must be json" })); } } return o2.promise; }).catch((e3) => { o2(e3); }), o2.promise; }, pt = { timeout: 15e3, persistence: "session" }, ft = {}; class gt { constructor(e2) { this.config = e2 || this.config, this.authObj = void 0; } init(e2) { switch (Ce.adapter || (this.requestClient = new Ce.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...pt, ...e2 }, true) { 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 gt(this.config); } auth({ persistence: e2 } = {}) { if (this.authObj) return this.authObj; const t2 = e2 || Ce.adapter.primaryStorage || pt.persistence; var n2; return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) { const { env: t3 } = e3; Ee[t3] = new Oe(e3), Le[t3] = new Oe({ ...e3, persistence: "local" }); }(this.config), n2 = this.config, Qe[n2.env] = new Ye(n2), this.authObj = new ot(this.config), this.authObj; } on(e2, t2) { return Me.apply(this, [e2, t2]); } off(e2, t2) { return Fe.apply(this, [e2, t2]); } callFunction(e2, t2) { return dt.apply(this, [e2, t2]); } deleteFile(e2, t2) { return ut.apply(this, [e2, t2]); } getTempFileURL(e2, t2) { return ht.apply(this, [e2, t2]); } downloadFile(e2, t2) { return lt.apply(this, [e2, t2]); } uploadFile(e2, t2) { return at.apply(this, [e2, t2]); } getUploadMetadata(e2, t2) { return ct.apply(this, [e2, t2]); } registerExtension(e2) { ft[e2.name] = e2; } async invokeExtension(e2, t2) { const n2 = ft[e2]; if (!n2) throw new te({ message: `扩展${e2} 必须先注册` }); return await n2.invoke(t2, this); } useAdapters(e2) { const { adapter: t2, runtime: n2 } = Ae(e2) || {}; t2 && (Ce.adapter = t2), n2 && (Ce.runtime = n2); } } var mt = new gt(); function yt(e2, t2, n2) { void 0 === n2 && (n2 = {}); var s2 = /\?/.test(t2), r2 = ""; for (var i2 in n2) "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]); return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2; } class _t { post(e2) { const { url: t2, data: n2, headers: s2 } = e2; return new Promise((e3, r2) => { ne.request({ url: yt("https:", t2), data: n2, method: "POST", header: s2, success(t3) { e3(t3); }, fail(e4) { r2(e4); } }); }); } upload(e2) { return new Promise((t2, n2) => { const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = ne.uploadFile({ url: yt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) { const n3 = { statusCode: e3.statusCode, data: e3.data || {} }; 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3); }, fail(e3) { n2(new Error(e3.errMsg || "uploadFile:fail")); } }); "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => { e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend }); }); }); } } const wt = { setItem(e2, t2) { ne.setStorageSync(e2, t2); }, getItem: (e2) => ne.getStorageSync(e2), removeItem(e2) { ne.removeStorageSync(e2); }, clear() { ne.clearStorageSync(); } }; var vt = { genAdapter: function() { return { root: {}, reqClass: _t, localStorage: wt, primaryStorage: "local" }; }, isMatch: function() { return true; }, runtime: "uni_app" }; mt.useAdapters(vt); const It = mt, St = It.init; It.init = function(e2) { e2.env = e2.spaceId; const t2 = St.call(this, e2); t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId; const n2 = t2.auth; return t2.auth = function(e3) { const t3 = n2.call(this, e3); return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => { var n3; t3[e4] = (n3 = t3[e4], function(e5) { e5 = e5 || {}; const { success: t4, fail: s2, complete: r2 } = ee(e5); if (!(t4 || s2 || r2)) return n3.call(this, e5); n3.call(this, e5).then((e6) => { t4 && t4(e6), r2 && r2(e6); }, (e6) => { s2 && s2(e6), r2 && r2(e6); }); }).bind(t3); }), t3; }, t2.customAuth = t2.auth, t2; }; var bt = It; var kt = class extends pe { getAccessToken() { return new Promise((e2, t2) => { const n2 = "Anonymous_Access_token"; this.setAccessToken(n2), e2(n2); }); } setupRequest(e2, t2) { const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret); const r2 = le(); s2["x-client-info"] = encodeURIComponent(JSON.stringify(r2)); const { token: i2 } = re(); return s2["x-client-token"] = i2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) }; } uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) { return new Promise((o2, a2) => { const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, success(e3) { e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => { i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) { if (!t2) throw new te({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" }); let r2; return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => { const { url: i2, formData: o2, name: a2 } = t3.result; r2 = t3.result.fileUrl; const c2 = { url: i2, formData: o2, name: a2, filePath: e2, fileType: n2 }; return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 })); }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => { t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); })); } deleteFile({ fileList: e2 }) { const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) }; return this.request(this.setupRequest(t2)).then((e3) => { if (e3.success) return e3.result; throw new te({ code: "DELETE_FILE_FAILED", message: "删除文件失败" }); }); } getTempFileURL({ fileList: e2, maxAge: t2 } = {}) { if (!Array.isArray(e2) || 0 === e2.length) throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }); const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) }; return this.request(this.setupRequest(n2)).then((e3) => { if (e3.success) return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) }; throw new te({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" }); }); } }; var At = { init(e2) { const t2 = new kt(e2), n2 = { signInAnonymously: function() { return t2.authorize(); }, getLoginState: function() { return Promise.resolve(false); } }; return t2.auth = function() { return n2; }, t2.customAuth = t2.auth, t2; } }, Ct = n(function(e2, t2) { e2.exports = r.enc.Hex; }); function Pt() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) { var t2 = 16 * Math.random() | 0; return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16); }); } function Tt(e2 = "", t2 = {}) { const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = Date.now(), u2 = Pt(), h2 = Object.assign({}, i2, { "x-from-app-id": a2.spaceAppId, "x-from-env-id": a2.spaceId, "x-to-env-id": a2.spaceId, "x-from-instance-id": c2, "x-from-function-name": s2, "x-client-timestamp": c2, "x-alipay-source": "client", "x-request-id": u2, "x-alipay-callid": u2, "x-trace-id": u2 }), l2 = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o2), [d2 = "", p2 = ""] = e2.split("?") || [], f2 = function(e3) { const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]} `).join(""), s3 = we(e3.body).toString(Ct), r3 = `${e3.method.toUpperCase()} ${e3.path} ${e3.query} ${n3} ${t3} ${s3} `, i3 = we(r3).toString(Ct), o3 = `HMAC-SHA256 ${e3.timestamp} ${i3} `, a3 = ve(o3, e3.secretKey).toString(Ct); return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`; }({ path: d2, query: p2, method: r2, headers: h2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.accessKey, secretKey: a2.secretKey, signedHeaders: l2.sort() }); return { url: `${a2.endpoint}${e2}`, headers: Object.assign({}, h2, { Authorization: f2 }) }; } function xt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {} }) { return new Promise((r2, i2) => { ne.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", complete: (e3 = {}) => { const t3 = s2["x-trace-id"] || ""; if (!e3.statusCode || e3.statusCode >= 400) { const { message: n3, errMsg: s3, trace_id: r3 } = e3.data || {}; return i2(new te({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 })); } r2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 }); } }); }); } function Ot(e2, t2) { const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Tt(n2, { functionName: "", data: s2, method: r2, headers: { "x-alipay-cloud-mode": "oss", "x-data-api-type": "oss", "x-expire-timestamp": Date.now() + 6e4 }, signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"], config: t2 }); return xt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => { const t3 = e3.data || {}; if (!t3.success) throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId }); return t3.data || {}; }).catch((e3) => { throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId }); }); } function Et(e2 = "") { const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/"); if (n2 <= 0) throw new te({ code: "INVALID_PARAM", message: "fileID不合法" }); const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1); return s2 !== this.config.spaceId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.spaceId)), r2; } function Lt(e2 = "") { return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, "")); } class Rt { constructor(e2) { this.config = e2; } signedURL(e2, t2 = {}) { const n2 = `/ws/function/${e2}`, s2 = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""), r2 = Object.assign({}, t2, { accessKeyId: this.config.accessKey, signatureNonce: Pt(), timestamp: "" + Date.now() }), i2 = [n2, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function(e3) { return r2[e3] ? "".concat(e3, "=").concat(r2[e3]) : null; }).filter(Boolean).join("&"), `host:${s2}`].join("\n"), o2 = ["HMAC-SHA256", we(i2).toString(Ct)].join("\n"), a2 = ve(o2, this.config.secretKey).toString(Ct), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&"); return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`; } } var Ut = class { constructor(e2) { if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t2) => { if (!Object.prototype.hasOwnProperty.call(e2, t2)) throw new Error(`${t2} required`); }), e2.endpoint) { if ("string" != typeof e2.endpoint) throw new Error("endpoint must be string"); if (!/^https:\/\//.test(e2.endpoint)) throw new Error("endpoint must start with https://"); e2.endpoint = e2.endpoint.replace(/\/$/, ""); } this.config = Object.assign({}, e2, { endpoint: e2.endpoint || `https://${e2.spaceId}.api-hz.cloudbasefunction.cn`, wsEndpoint: e2.wsEndpoint || `wss://${e2.spaceId}.api-hz.cloudbasefunction.cn` }), this._websocket = new Rt(this.config); } callFunction(e2) { return function(e3, t2) { const { name: n2, data: s2, async: r2 = false } = e3, i2 = "POST", o2 = { "x-to-function-name": n2 }; r2 && (o2["x-function-invoke-type"] = "async"); const { url: a2, headers: c2 } = Tt("/functions/invokeFunction", { functionName: n2, data: s2, method: i2, headers: o2, signHeaderKeys: ["x-to-function-name"], config: t2 }); return xt({ url: a2, data: s2, method: i2, headers: c2 }).then((e4) => { let t3 = 0; if (r2) { const n3 = e4.data || {}; t3 = "200" === n3.errCode ? 0 : n3.errCode, e4.data = n3.data || {}, e4.errMsg = n3.errMsg; } if (0 !== t3) throw new te({ code: t3, message: e4.errMsg, requestId: e4.requestId }); return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data }; }).catch((e4) => { throw new te({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId }); }); }(e2, this.config); } uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) { return new Promise((i2, o2) => { const a2 = ne.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) { e3 && e3.statusCode < 400 ? i2(e3) : o2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { o2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => { r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) { if ("string" !== f(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" }); if (!(t2 = t2.trim())) throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" }); if (/:\/\//.test(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" }); const r2 = await Ot({ path: "/".concat(t2.replace(/^\//, ""), "?post_url") }, this.config), { file_id: i2, upload_url: o2, form_data: a2 } = r2, c2 = a2 && a2.reduce((e3, t3) => (e3[t3.key] = t3.value, e3), {}); return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 })); } async getTempFileURL({ fileList: e2 }) { return new Promise((t2, n2) => { (!e2 || e2.length < 0) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" })); const s2 = []; for (const t3 of e2) { "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" })); const e3 = Et.call(this, t3); s2.push({ file_id: e3, expire: 600 }); } Ot({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => { const { file_list: n3 = [] } = e3; t2({ fileList: n3.map((e4) => ({ fileID: Lt.call(this, e4.file_id), tempFileURL: e4.download_url })) }); }).catch((e3) => n2(e3)); }); } async connectWebSocket(e2) { const { name: t2, query: n2 } = e2; return ne.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => { } }); } }; var Nt = { init: (e2) => { e2.provider = "alipay"; const t2 = new Ut(e2); return t2.auth = function() { return { signInAnonymously: function() { return Promise.resolve(); }, getLoginState: function() { return Promise.resolve(true); } }; }, t2; } }; function Dt({ data: e2 }) { let t2; t2 = le(); const n2 = JSON.parse(JSON.stringify(e2 || {})); if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) { const { token: e3 } = re(); e3 && (n2.uniIdToken = e3); } return n2; } async function Mt({ name: e2, data: t2 } = {}) { await this.__dev__.initLocalNetwork(); const { localAddress: n2, localPort: s2 } = this.__dev__, r2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay" }[this.config.provider], i2 = this.config.spaceId, o2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e2}`; return new Promise((t3, n3) => { ne.request({ method: "POST", url: o2, data: { name: e2, platform: C, provider: r2, spaceId: i2 }, timeout: 3e3, success(e3) { t3(e3); }, fail() { t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } }); } }); }).then(({ data: e3 } = {}) => { const { code: t3, message: n3 } = e3 || {}; return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" }; }).then(({ code: n3, message: s3 }) => { if (0 !== n3) { switch (n3) { case "MODULE_ENCRYPTED": console.error(`此云函数(${e2})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`); break; case "FUNCTION_ENCRYPTED": console.error(`此云函数(${e2})已加密不可本地调试,自动切换为云端已部署的云函数`); break; case "ACTION_ENCRYPTED": console.error(s3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境"); break; case "NETWORK_ERROR": console.error(s3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下"); break; case "SWITCH_TO_CLOUD": break; default: { const e3 = `检测本地调试服务出现错误:${s3},请检查网络环境或重启客户端再试`; throw console.error(e3), new Error(e3); } } return this._callCloudFunction({ name: e2, data: t2 }); } return new Promise((e3, n4) => { const s4 = Dt.call(this, { data: t2 }); ne.request({ method: "POST", url: a2, data: { provider: r2, platform: C, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new te({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e3({ result: s5 }), fail(e4) { n4(new te({ code: e4.code || e4.errCode || "SYS_ERR", message: e4.message || e4.errMsg || "request:fail" })); } }); }); }); } const qt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }]; var Ft = /[\\^$.*+?()[\]{}|]/g, Kt = RegExp(Ft.source); function jt(e2, t2, n2) { return e2.replace(new RegExp((s2 = t2) && Kt.test(s2) ? s2.replace(Ft, "\\$&") : s2, "g"), n2); var s2; } const Bt = "request", Wt = "response", Ht = "both"; const Tn = { code: 2e4, message: "System error" }, xn = { code: 20101, message: "Invalid client" }; function Ln(e2) { const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {}; return new te({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || Tn.code, message: r2 || o2, cause: a2 }); } let Un; function Fn({ secretType: e2 } = {}) { return e2 === Bt || e2 === Wt || e2 === Ht; } function Kn({ name: e2, data: t2 = {} } = {}) { return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action; } function jn({ provider: e2, spaceId: t2, functionName: n2 } = {}) { const { appId: s2, uniPlatform: r2, osName: i2 } = ce(); let o2 = r2; "app" === r2 && (o2 = i2); const a2 = function({ provider: e3, spaceId: t3 } = {}) { const n3 = A; if (!n3) return {}; e3 = /* @__PURE__ */ function(e4) { return "tencent" === e4 ? "tcb" : e4; }(e3); const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3); return s3 && s3.config; }({ provider: e2, spaceId: t2 }); if (!a2 || !a2.accessControl || !a2.accessControl.enable) return false; const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2); if (0 === u2.length) return true; const h2 = function(e3, t3) { let n3, s3, r3; for (let i3 = 0; i3 < e3.length; i3++) { const o3 = e3[i3]; o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3; } return n3 || s3 || r3; }(u2, n2); if (!h2) return false; if ((c2[h2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase())) return true; throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), Ln(xn); } function $n({ functionName: e2, result: t2, logPvd: n2 }) { if (this.__dev__.debugLog && t2 && t2.requestId) { const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId }); console.log(`[${n2}-request]${s2}[/${n2}-request]`); } } function Bn(e2) { const t2 = e2.callFunction, n2 = function(n3) { const s2 = n3.name; n3.data = Dt.call(e2, { data: n3.data }); const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay" }[this.config.provider], i2 = Fn(n3), o2 = Kn(n3), a2 = i2 || o2; return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) { for (let s3 = 0; s3 < n4.length; s3++) { const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3); if (!a3) continue; let c2 = i3; for (let e5 = 1; e5 < a3.length; e5++) c2 = jt(c2, `{$${e5}}`, a3[e5]); for (const e5 in t3) c2 = jt(c2, `{${e5}}`, t3[e5]); return "replace" === o3 ? c2 : e4 + c2; } return e4; }({ message: `[${n3.name}]: ${e3.message}`, formatter: qt, extraInfo: { functionName: s2 } })), Promise.reject(e3))); }; e2.callFunction = function(t3) { const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name; let o2, a2; if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && T ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Mt), o2 = Mt) : o2 = n2, o2 = o2.bind(e2), Kn(t3)) a2 = n2.call(e2, t3); else if (Fn(t3)) { a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3); } else if (jn({ provider: s2, spaceId: r2, functionName: i2 })) { a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3); } else a2 = o2(t3); return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2.then((e3) => ("undefined" != typeof UTSJSONObject && (e3.result = new UTSJSONObject(e3.result)), e3)); }; } Un = class { constructor() { throw Ln({ message: `Platform ${C} is not enabled, please check whether secure network module is enabled in your manifest.json` }); } }; const Wn = Symbol("CLIENT_DB_INTERNAL"); function Hn(e2, t2) { return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Wn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) { if ("_uniClient" === n2) return null; if ("symbol" == typeof n2) return e3[n2]; if (n2 in e3 || "string" != typeof n2) { const t3 = e3[n2]; return "function" == typeof t3 ? t3.bind(e3) : t3; } return t2.get(e3, n2, s2); } }); } function zn(e2) { return { on: (t2, n2) => { e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2); }, off: (t2, n2) => { e2[t2] = e2[t2] || []; const s2 = e2[t2].indexOf(n2); -1 !== s2 && e2[t2].splice(s2, 1); } }; } const Jn = ["db.Geo", "db.command", "command.aggregate"]; function Vn(e2, t2) { return Jn.indexOf(`${e2}.${t2}`) > -1; } function Gn(e2) { switch (f(e2 = se(e2))) { case "array": return e2.map((e3) => Gn(e3)); case "object": return e2._internalType === Wn || Object.keys(e2).forEach((t2) => { e2[t2] = Gn(e2[t2]); }), e2; case "regexp": return { $regexp: { source: e2.source, flags: e2.flags } }; case "date": return { $date: e2.toISOString() }; default: return e2; } } function Yn(e2) { return e2 && e2.content && e2.content.$method; } class Qn { constructor(e2, t2, n2) { this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2; } toJSON() { let e2 = this; const t2 = [e2.content]; for (; e2.prevStage; ) e2 = e2.prevStage, t2.push(e2.content); return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: Gn(e3.$param) })) }; } toString() { return JSON.stringify(this.toJSON()); } getAction() { const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method); return e2 && e2.$param && e2.$param[0]; } getCommand() { return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) }; } get isAggregate() { let e2 = this; for (; e2; ) { const t2 = Yn(e2), n2 = Yn(e2.prevStage); if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2) return true; e2 = e2.prevStage; } return false; } get isCommand() { let e2 = this; for (; e2; ) { if ("command" === Yn(e2)) return true; e2 = e2.prevStage; } return false; } get isAggregateCommand() { let e2 = this; for (; e2; ) { const t2 = Yn(e2), n2 = Yn(e2.prevStage); if ("aggregate" === t2 && "command" === n2) return true; e2 = e2.prevStage; } return false; } getNextStageFn(e2) { const t2 = this; return function() { return Xn({ $method: e2, $param: Gn(Array.from(arguments)) }, t2, t2._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(e2, t2) { const n2 = this.getAction(), s2 = this.getCommand(); if (s2.$db.push({ $method: e2, $param: Gn(t2) }), S) { const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param; t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。"); } return this._database._callCloudFunction({ action: n2, command: s2 }); } } function Xn(e2, t2, n2) { return Hn(new Qn(e2, t2, n2), { get(e3, t3) { let s2 = "db"; return e3 && e3.content && (s2 = e3.content.$method), Vn(s2, t3) ? Xn({ $method: t3 }, e3, n2) : function() { return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, e3, n2); }; } }); } function Zn({ path: e2, method: t2 }) { return class { constructor() { this.param = Array.from(arguments); } toJSON() { return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] }; } toString() { return JSON.stringify(this.toJSON()); } }; } function es$1(e2, t2 = {}) { return Hn(new e2(t2), { get: (e3, t3) => Vn("db", t3) ? Xn({ $method: t3 }, null, e3) : function() { return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, null, e3); } }); } class ts extends class { constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) { this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t2 || (this.auth = zn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, zn(this._dbCallBacks)), this.env = Hn({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = Hn({}, { get: (e3, t3) => Zn({ path: ["Geo"], method: t3 }) }), this.serverDate = Zn({ path: [], method: "serverDate" }), this.RegExp = Zn({ path: [], method: "RegExp" }); } getCloudEnv(e2) { if ("string" != typeof e2 || !e2.trim()) throw new Error("getCloudEnv参数错误"); return { $env: e2.replace("$cloudEnv_", "") }; } _callback(e2, t2) { const n2 = this._dbCallBacks; n2[e2] && n2[e2].forEach((e3) => { e3(...t2); }); } _callbackAuth(e2, t2) { const n2 = this._authCallBacks; n2[e2] && n2[e2].forEach((e3) => { e3(...t2); }); } multiSend() { const e2 = Array.from(arguments), t2 = e2.map((e3) => { const t3 = e3.getAction(), n2 = e3.getCommand(); if ("getTemp" !== n2.$db[n2.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp"); return { action: t3, command: n2 }; }); return this._callCloudFunction({ multiCommand: t2, queryList: e2 }); } } { _parseResult(e2) { return this._isJQL ? e2.result : e2; } _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) { function r2(e3, t3) { if (n2 && s2) for (let n3 = 0; n3 < s2.length; n3++) { const r3 = s2[n3]; r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3])); } } const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database"; function a2(e3) { return i2._callback("error", [e3]), M(q(o2, "fail"), e3).then(() => M(q(o2, "complete"), e3)).then(() => (r2(null, e3), Y(j, { type: W, content: e3 }), Promise.reject(e3))); } const c2 = M(q(o2, "invoke")), u2 = this._uniClient; return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: h, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => { const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result; if (u3) for (let e4 = 0; e4 < u3.length; e4++) { const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log; let i3 = "[System Info]" + n4; s4 && (i3 = `${i3} 详细信息:${s4}`), r3(i3); } if (t3) { return a2(new te({ code: t3, message: n3, requestId: e3.requestId })); } e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ie({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y(B, { token: s3, tokenExpired: c3 })); const h2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }]; for (let t4 = 0; t4 < h2.length; t4++) { const { prop: n4, tips: s4 } = h2[t4]; if (n4 in e3.result) { const t5 = e3.result[n4]; Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) }); } } return function(e4) { return M(q(o2, "success"), e4).then(() => M(q(o2, "complete"), e4)).then(() => { r2(e4, null); const t4 = i2._parseResult(e4); return Y(j, { type: W, content: t4 }), Promise.resolve(t4); }); }(e3); }, (e3) => { /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"); return a2(new te({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId })); }); } } const ns = "token无效,跳转登录页面", ss = "token过期,跳转登录页面", rs = { TOKEN_INVALID_TOKEN_EXPIRED: ss, TOKEN_INVALID_INVALID_CLIENTID: ns, TOKEN_INVALID: ns, TOKEN_INVALID_WRONG_TOKEN: ns, TOKEN_INVALID_ANONYMOUS_USER: ns }, is = { "uni-id-token-expired": ss, "uni-id-check-token-failed": ns, "uni-id-token-not-exist": ns, "uni-id-check-device-feature-failed": ns }; function os(e2, t2) { let n2 = ""; return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, ""); } function as(e2 = [], t2 = "") { const n2 = [], s2 = []; return e2.forEach((e3) => { true === e3.needLogin ? n2.push(os(t2, e3.path)) : false === e3.needLogin && s2.push(os(t2, e3.path)); }), { needLoginPage: n2, notNeedLoginPage: s2 }; } function cs(e2) { return e2.split("?")[0].replace(/^\//, ""); } function us() { return function(e2) { let t2 = e2 && e2.$page && e2.$page.fullPath || ""; return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2; }(function() { const e2 = getCurrentPages(); return e2[e2.length - 1]; }()); } function hs() { return cs(us()); } function ls(e2 = "", t2 = {}) { if (!e2) return false; if (!(t2 && t2.list && t2.list.length)) return false; const n2 = t2.list, s2 = cs(e2); return n2.some((e3) => e3.pagePath === s2); } const ds = !!e.uniIdRouter; const { loginPage: ps, routerNeedLogin: fs, resToLogin: gs, needLoginPage: ms, notNeedLoginPage: ys, loginPageInTabBar: _s } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) { const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = as(t2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e2 = []) { const t3 = [], n3 = []; return e2.forEach((e3) => { const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = as(r3, s3); t3.push(...i3), n3.push(...o3); }), { needLoginPage: t3, notNeedLoginPage: n3 }; }(n2); return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...h2], notNeedLoginPage: [...u2, ...l2], loginPageInTabBar: ls(i2, r2) }; }(); if (ms.indexOf(ps) > -1) throw new Error(`Login page [${ps}] should not be "needLogin", please check your pages.json`); function ws(e2) { const t2 = hs(); if ("/" === e2.charAt(0)) return e2; const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/"); i2.pop(); for (let e3 = 0; e3 < r2.length; e3++) { const t3 = r2[e3]; ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3); } return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : ""); } function vs(e2) { const t2 = cs(ws(e2)); return !(ys.indexOf(t2) > -1) && (ms.indexOf(t2) > -1 || fs.some((t3) => function(e3, t4) { return new RegExp(t4).test(e3); }(e2, t3))); } function Is({ redirect: e2 }) { const t2 = cs(e2), n2 = cs(ps); return hs() !== n2 && t2 !== n2; } function Ss({ api: e2, redirect: t2 } = {}) { if (!t2 || !Is({ redirect: t2 })) return; const n2 = function(e3, t3) { return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3; }(ps, t2); _s ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo"); const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch }; setTimeout(() => { s2[e2]({ url: n2 }); }, 0); } function bs({ url: e2 } = {}) { const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() { const { token: e3, tokenExpired: t3 } = re(); let n3; if (e3) { if (t3 < Date.now()) { const e4 = "uni-id-token-expired"; n3 = { errCode: e4, errMsg: is[e4] }; } } else { const e4 = "uni-id-check-token-failed"; n3 = { errCode: e4, errMsg: is[e4] }; } return n3; }(); if (vs(e2) && n2) { n2.uniIdRedirectUrl = e2; if (J($).length > 0) return setTimeout(() => { Y($, n2); }, 0), t2.abortLoginPageJump = true, t2; t2.autoToLoginPage = true; } return t2; } function ks() { !function() { const e3 = us(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = bs({ url: e3 }); t2 || n2 && Ss({ api: "redirectTo", redirect: e3 }); }(); const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]; for (let t2 = 0; t2 < e2.length; t2++) { const n2 = e2[t2]; uni.addInterceptor(n2, { invoke(e3) { const { abortLoginPageJump: t3, autoToLoginPage: s2 } = bs({ url: e3.url }); return t3 ? e3 : s2 ? (Ss({ api: n2, redirect: ws(e3.url) }), false) : e3; } }); } } function As() { this.onResponse((e2) => { const { type: t2, content: n2 } = e2; let s2 = false; switch (t2) { case "cloudobject": s2 = function(e3) { if ("object" != typeof e3) return false; const { errCode: t3 } = e3 || {}; return t3 in is; }(n2); break; case "clientdb": s2 = function(e3) { if ("object" != typeof e3) return false; const { errCode: t3 } = e3 || {}; return t3 in rs; }(n2); } s2 && function(e3 = {}) { const t3 = J($); Z().then(() => { const n3 = us(); if (n3 && Is({ redirect: n3 })) return t3.length > 0 ? Y($, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (ps && Ss({ api: "navigateTo", redirect: n3 })); }); }(n2); }); } function Cs(e2) { !function(e3) { e3.onResponse = function(e4) { V(j, e4); }, e3.offResponse = function(e4) { G(j, e4); }; }(e2), function(e3) { e3.onNeedLogin = function(e4) { V($, e4); }, e3.offNeedLogin = function(e4) { G($, e4); }, ds && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = true, Z().then(() => { ks.call(e3); }), gs && As.call(e3))); }(e2), function(e3) { e3.onRefreshToken = function(e4) { V(B, e4); }, e3.offRefreshToken = function(e4) { G(B, e4); }; }(e2); } let Ps; const Ts = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", xs = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/; function Os() { const e2 = re().token || "", t2 = e2.split("."); if (!e2 || 3 !== t2.length) return { uid: null, role: [], permission: [], tokenExpired: 0 }; let n2; try { n2 = JSON.parse((s2 = t2[1], decodeURIComponent(Ps(s2).split("").map(function(e3) { return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2); }).join("")))); } catch (e3) { throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message); } var s2; return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2; } Ps = "function" != typeof atob ? function(e2) { if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !xs.test(e2)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); var t2; e2 += "==".slice(2 - (3 & e2.length)); for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; ) t2 = Ts.indexOf(e2.charAt(i2++)) << 18 | Ts.indexOf(e2.charAt(i2++)) << 12 | (n2 = Ts.indexOf(e2.charAt(i2++))) << 6 | (s2 = Ts.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2); return r2; } : atob; var Es = n(function(e2, t2) { Object.defineProperty(t2, "__esModule", { value: true }); const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail"; function r2(e3, t3) { return e3.tempFiles.forEach((e4, n3) => { e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf(".")); }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3; } function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) { return t3.then((e4) => { if (s3) { const t4 = s3(e4); if (void 0 !== t4) return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5); } return e4; }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) { (t5 = Object.assign({}, t5)).errMsg = n2; const i3 = t5.tempFiles, o2 = i3.length; let a2 = 0; return new Promise((n3) => { for (; a2 < s4; ) c2(); function c2() { const s5 = a2++; if (s5 >= o2) return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5)); const u2 = i3[s5]; e4.uploadFile({ provider: u2.provider, filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) { e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5); } }).then((e5) => { u2.url = e5.fileID, s5 < o2 && c2(); }).catch((e5) => { u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2(); }); } }); }(e3, t4, 5, r3)); } t2.initChooseAndUploadFile = function(e3) { return function(t3 = { type: "all" }) { return "image" === t3.type ? i2(e3, function(e4) { const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4; return new Promise((e5, a2) => { uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) { e5(r2(t5, "image")); }, fail(e6) { a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) }); } }); }); }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) { const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4; return new Promise((e5, c2) => { uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) { const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5; e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video")); }, fail(e6) { c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) }); } }); }); }(t3), t3) : i2(e3, function(e4) { const { count: t4, extension: n3 } = e4; return new Promise((e5, i3) => { let o2 = uni.chooseFile; if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2) return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" }); o2({ type: "all", count: t4, extension: n3, success(t5) { e5(r2(t5)); }, fail(e6) { i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) }); } }); }); }(t3), t3); }; }; }), Ls = t$2(Es); const Rs = "manual"; function Us(e2) { 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: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {}, mixinDatacomError: null }), created() { this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => { var e3 = []; return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => { e3.push(this[t2]); }), e3; }, (e3, t2) => { if (this.loadtime === Rs) return; let n2 = false; const s2 = []; for (let r2 = 2; r2 < e3.length; r2++) e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true); e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2); }); }, methods: { onMixinDatacomPropsChange(e3, t2) { }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) { this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then((n3) => { this.mixinDatacomLoading = false; const { data: s2, count: r2 } = n3.result; this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize; const i2 = e3 ? s2.length ? s2[0] : void 0 : s2; this.mixinDatacomResData = i2, t2 && t2(i2); }).catch((e4) => { this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, this.mixinDatacomError = e4, n2 && n2(e4); })); }, mixinDatacomGet(t2 = {}) { let n2; t2 = t2 || {}, n2 = "undefined" != typeof __uniX && __uniX ? e2.databaseForJQL(this.spaceInfo) : e2.database(this.spaceInfo); const s2 = t2.action || this.action; s2 && (n2 = n2.action(s2)); const r2 = t2.collection || this.collection; n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2); const i2 = t2.where || this.where; i2 && Object.keys(i2).length && (n2 = n2.where(i2)); const o2 = t2.field || this.field; o2 && (n2 = n2.field(o2)); const a2 = t2.foreignKey || this.foreignKey; a2 && (n2 = n2.foreignKey(a2)); const c2 = t2.groupby || this.groupby; c2 && (n2 = n2.groupBy(c2)); const u2 = t2.groupField || this.groupField; u2 && (n2 = n2.groupField(u2)); true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct()); const h2 = t2.orderby || this.orderby; h2 && (n2 = n2.orderBy(h2)); const l2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith }; return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (l2 - 1)).limit(d2).get(m2), n2; } } }; } function Ns(e2) { return function(t2, n2 = {}) { n2 = function(e3, t3 = {}) { return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3; }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2); const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2; return new Proxy({}, { get(s3, c2) { switch (c2) { case "toString": return "[object UniCloudObject]"; case "toJSON": return {}; } return function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) { return async function(...s4) { const r3 = n3 ? n3({ params: s4 }) : {}; let i3, o3; try { return await M(q(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await M(q(t3, "success"), { ...r3, result: i3 }), i3; } catch (e4) { throw o3 = e4, await M(q(t3, "fail"), { ...r3, error: o3 }), o3; } finally { await M(q(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 }); } }; }({ fn: async function s4(...h2) { let l2; a2 && uni.showLoading({ title: r2.title, mask: r2.mask }); const d2 = { name: t2, type: u, data: { method: c2, params: h2 } }; "object" == typeof n2.secretMethods && function(e3, t3) { const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"]; r3 && (t3.secretType = r3); }(n2, d2); let p2 = false; try { l2 = await e2.callFunction(d2); } catch (e3) { p2 = true, l2 = { result: new te(e3) }; } const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {}; if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ie(y2), Y(B, { ...y2 })), g2) { let e3 = m2; if (p2 && o2) { e3 = (await o2({ objectName: t2, methodName: c2, params: h2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2; } if (a2) if ("toast" === i2.type) uni.showToast({ title: e3, icon: "none" }); else { if ("modal" !== i2.type) throw new Error(`Invalid errorOptions.type: ${i2.type}`); { const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) { return new Promise((i3, o3) => { uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) { i3(e5); }, fail() { i3({ confirm: false, cancel: true }); } }); }); }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" }); if (i2.retry && t3) return s4(...h2); } } const n3 = new te({ subject: f2, code: g2, message: m2, requestId: l2.requestId }); throw n3.detail = l2.result, Y(j, { type: z, content: n3 }), n3; } return Y(j, { type: z, content: l2.result }), l2.result; }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) { return { objectName: t2, methodName: c2, params: e3 }; } }); } }); }; } function Ds(e2) { return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId)); } async function Ms({ openid: e2, callLoginByWeixin: t2 = false } = {}) { Ds(this); throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${C}\``); } async function qs(e2) { const t2 = Ds(this); return t2.initPromise || (t2.initPromise = Ms.call(this, e2).then((e3) => e3).catch((e3) => { throw delete t2.initPromise, e3; })), t2.initPromise; } function Fs(e2) { return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) { return qs.call(e2, { openid: t2, callLoginByWeixin: n2 }); }; } function Ks(e2) { !function(e3) { he = e3; }(e2); } function js(e2) { const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId }; return function(n2) { return new Promise((s2, r2) => { t2[e2]({ ...n2, success(e3) { s2(e3); }, fail(e3) { r2(e3); } }); }); }; } class $s extends class { constructor() { this._callback = {}; } addListener(e2, t2) { this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2); } on(e2, t2) { return this.addListener(e2, t2); } removeListener(e2, t2) { if (!t2) throw new Error('The "listener" argument must be of type function. Received undefined'); const n2 = this._callback[e2]; if (!n2) return; const s2 = function(e3, t3) { for (let n3 = e3.length - 1; n3 >= 0; n3--) if (e3[n3] === t3) return n3; return -1; }(n2, t2); n2.splice(s2, 1); } off(e2, t2) { return this.removeListener(e2, t2); } removeAllListener(e2) { delete this._callback[e2]; } emit(e2, ...t2) { const n2 = this._callback[e2]; if (n2) for (let e3 = 0; e3 < n2.length; e3++) n2[e3](...t2); } } { constructor() { super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = []; } init() { return Promise.all([js("getSystemInfo")(), js("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => { if (!e2) throw new Error("Invalid appId, please check the manifest.json file"); if (!t2) throw new Error("Invalid push client id"); this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener(); }, (e2) => { throw this.emit("error", e2), this.close(), e2; }); } async open() { return this.init(); } _isUniCloudSSE(e2) { if ("receive" !== e2.type) return false; const t2 = e2 && e2.data && e2.data.payload; return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId); } _receivePushMessage(e2) { if (!this._isUniCloudSSE(e2)) return; const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2; this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage(); } _consumMessage() { for (; ; ) { const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1); if (!e2) break; this._currentMessageId++, this._parseMessagePayload(e2); } } _parseMessagePayload(e2) { const { action: t2, messageId: n2, message: s2 } = e2; "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 }); } _appendMessage({ messageId: e2, message: t2 } = {}) { this.emit("message", t2); } _end({ messageId: e2, message: t2 } = {}) { this.emit("end", t2), this.close(); } _initMessageListener() { uni.onPushMessage(this._uniPushMessageCallback); } _destroy() { uni.offPushMessage(this._uniPushMessageCallback); } toJSON() { return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId }; } close() { this._destroy(), this.emit("close"); } } async function Bs(e2, t2) { const n2 = `http://${e2}:${t2}/system/ping`; try { const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => { ne.request({ ...s2, success(t4) { e4(t4); }, fail(e5) { t3(e5); } }); })); return !(!e3.data || 0 !== e3.data.code); } catch (e3) { return false; } var s2; } async function Ws(e2) { { const { osName: e3, osVersion: t3 } = ce(); "ios" === e3 && function(e4) { if (!e4 || "string" != typeof e4) return 0; const t4 = e4.match(/^(\d+)./); return t4 && t4[1] ? parseInt(t4[1]) : 0; }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)"); } const t2 = e2.__dev__; if (!t2.debugInfo) return; const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await async function(e3, t3) { let n3; for (let s3 = 0; s3 < e3.length; s3++) { const r3 = e3[s3]; if (await Bs(r3, t3)) { n3 = r3; break; } } return { address: n3, port: t3 }; }(n2, s2); if (r2) return t2.localAddress = r2, void (t2.localPort = s2); const i2 = console["error"]; let o2 = ""; if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === C.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote) throw new Error(o2); i2(o2); } function Hs(e2) { e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() { let t2 = Promise.resolve(); var n2; n2 = 1, t2 = new Promise((e3) => { setTimeout(() => { e3(); }, n2); }); const s2 = e2.auth(); return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously()); } })); } const zs = { tcb: bt, tencent: bt, aliyun: fe, private: At, alipay: Nt }; let Js = new class { init(e2) { let t2 = {}; const n2 = zs[e2.provider]; if (!n2) throw new Error("未提供正确的provider参数"); t2 = n2.init(e2), function(e3) { const t3 = {}; e3.__dev__ = t3, t3.debugLog = "app" === C; const n3 = P; n3 && !n3.code && (t3.debugInfo = n3); const s2 = new v({ createPromise: function() { return Ws(e3); } }); t3.initLocalNetwork = function() { return s2.exec(); }; }(t2), Hs(t2), Bn(t2), function(e3) { const t3 = e3.uploadFile; e3.uploadFile = function(e4) { return t3.call(this, e4); }; }(t2), function(e3) { e3.database = function(t3) { if (t3 && Object.keys(t3).length > 0) return e3.init(t3).database(); if (this._database) return this._database; const n3 = es$1(ts, { uniClient: e3 }); return this._database = n3, n3; }, e3.databaseForJQL = function(t3) { if (t3 && Object.keys(t3).length > 0) return e3.init(t3).databaseForJQL(); if (this._databaseForJQL) return this._databaseForJQL; const n3 = es$1(ts, { uniClient: e3, isJQL: true }); return this._databaseForJQL = n3, n3; }; }(t2), function(e3) { e3.getCurrentUserInfo = Os, e3.chooseAndUploadFile = Ls.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() { return Us(e3); } }), e3.SSEChannel = $s, e3.initSecureNetworkByWeixin = Fs(e3), e3.setCustomClientInfo = Ks, e3.importObject = Ns(e3); }(t2); return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => { if (!t2[e3]) return; const n3 = t2[e3]; t2[e3] = function() { return n3.apply(t2, Array.from(arguments)); }, t2[e3] = (/* @__PURE__ */ function(e4, t3) { return function(n4) { let s2 = false; if ("callFunction" === t3) { const e5 = n4 && n4.type || c; s2 = e5 !== c; } const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec(); n4 = n4 || {}; const { success: o2, fail: a2, complete: u2 } = ee(n4), h2 = i2.then(() => s2 ? Promise.resolve() : M(q(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : M(q(t3, "success"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (r2 && Y(j, { type: H, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : M(q(t3, "fail"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (Y(j, { type: H, content: e5 }), Promise.reject(e5)))); if (!(o2 || a2 || u2)) return h2; h2.then((e5) => { o2 && o2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 }); }, (e5) => { a2 && a2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 }); }); }; }(t2[e3], e3)).bind(t2); }), t2.init = this.init, t2; } }(); (() => { const e2 = T; let t2 = {}; if (e2 && 1 === e2.length) t2 = e2[0], Js = Js.init(t2), Js._isDefault = true; else { const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"]; let n2; n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => { Js[e3] = function() { return console.error(n2), Promise.reject(new te({ code: "SYS_ERR", message: n2 })); }; }); } Object.assign(Js, { get mixinDatacom() { return Us(Js); } }), Cs(Js), Js.addInterceptor = N, Js.removeInterceptor = D, Js.interceptObject = F; })(); var Vs = Js; const fontData = [ { "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 getVal = (val) => { const reg = /^[0-9]*$/g; return typeof val === "number" || reg.test(val) ? val + "px" : val; }; const _sfc_main$e = { 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() { return { icons: fontData }; }, computed: { unicode() { let code = this.icons.find((v2) => v2.font_class === this.type); if (code) { return code.unicode; } return ""; }, iconSize() { return getVal(this.size); }, styleObj() { if (this.fontFamily !== "") { return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`; } return `color: ${this.color}; font-size: ${this.iconSize};`; } }, methods: { _onClick() { this.$emit("click"); } } }; function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { style: vue.normalizeStyle($options.styleObj), class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]), onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]); const _sfc_main$d = { name: "uni-data-select", mixins: [Vs.mixinDatacom || {}], props: { localdata: { type: Array, default() { return []; } }, 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: true }, defItem: { type: Number, default: 0 }, disabled: { type: Boolean, default: false }, // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}" format: { type: String, default: "" }, placement: { type: String, default: "bottom" } }, data() { return { showSelector: false, current: "", mixinDatacomResData: [], apps: [], channels: [], cacheKey: "uni-data-select-lastSelectedValue" }; }, created() { this.debounceGet = this.debounce(() => { this.query(); }, 300); if (this.collection && !this.localdata.length) { this.debounceGet(); } }, computed: { typePlaceholder() { const text = { "opendb-stat-app-versions": "版本", "opendb-app-channels": "渠道", "opendb-app-list": "应用" }; const common = this.placeholder; const placeholder = text[this.collection]; return placeholder ? common + placeholder : common; }, valueCom() { return this.modelValue; }, textShow() { let text = this.current; if (text.length > 10) { return text.slice(0, 25) + "..."; } return text; }, getOffsetByPlacement() { switch (this.placement) { case "top": return "bottom:calc(100% + 12px);"; case "bottom": return "top:calc(100% + 12px);"; } } }, watch: { localdata: { immediate: true, handler(val, old) { if (Array.isArray(val) && old !== val) { this.mixinDatacomResData = val; } } }, valueCom(val, old) { this.initDefVal(); }, mixinDatacomResData: { immediate: true, handler(val) { if (val.length) { this.initDefVal(); } } } }, methods: { debounce(fn, time = 100) { let timer = null; return function(...args) { if (timer) clearTimeout(timer); timer = setTimeout(() => { fn.apply(this, args); }, time); }; }, // 执行数据库查询 query() { this.mixinDatacomEasyGet(); }, // 监听查询条件变更事件 onMixinDatacomPropsChange() { if (this.collection) { this.debounceGet(); } }, initDefVal() { let defValue = ""; if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) { defValue = this.valueCom; } else { let strogeValue; if (this.collection) { strogeValue = this.getCache(); } if (strogeValue || strogeValue === 0) { defValue = strogeValue; } else { let defItem = ""; if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) { defItem = this.mixinDatacomResData[this.defItem - 1].value; } defValue = defItem; } if (defValue || defValue === 0) { this.emit(defValue); } } const def = this.mixinDatacomResData.find((item) => item.value === defValue); this.current = def ? this.formatItemName(def) : ""; }, /** * @param {[String, Number]} value * 判断用户给的 value 是否同时为禁用状态 */ isDisabled(value) { let isDisabled = false; this.mixinDatacomResData.forEach((item) => { if (item.value === value) { isDisabled = item.disable; } }); return isDisabled; }, clearVal() { this.emit(""); if (this.collection) { this.removeCache(); } }, change(item) { if (!item.disable) { this.showSelector = false; this.current = this.formatItemName(item); this.emit(item.value); } }, emit(val) { this.$emit("input", val); this.$emit("update:modelValue", val); this.$emit("change", val); if (this.collection) { this.setCache(val); } }, toggleSelector() { if (this.disabled) { return; } this.showSelector = !this.showSelector; }, formatItemName(item) { let { text, value, channel_code } = item; channel_code = channel_code ? `(${channel_code})` : ""; if (this.format) { let str = ""; str = this.format; for (let key in item) { str = str.replace(new RegExp(`{${key}}`, "g"), item[key]); } return str; } else { return this.collection.indexOf("app-list") > 0 ? `${text}(${value})` : text ? text : `未命名${channel_code}`; } }, // 获取当前加载的数据 getLoadData() { return this.mixinDatacomResData; }, // 获取当前缓存key getCurrentCacheKey() { return this.collection; }, // 获取缓存 getCache(name = this.getCurrentCacheKey()) { let cacheData = uni.getStorageSync(this.cacheKey) || {}; return cacheData[name]; }, // 设置缓存 setCache(value, name = this.getCurrentCacheKey()) { let cacheData = uni.getStorageSync(this.cacheKey) || {}; cacheData[name] = value; uni.setStorageSync(this.cacheKey, cacheData); }, // 删除缓存 removeCache(name = this.getCurrentCacheKey()) { let cacheData = uni.getStorageSync(this.cacheKey) || {}; delete cacheData[name]; uni.setStorageSync(this.cacheKey, cacheData); } } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-stat__select" }, [ $props.label ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: "uni-label-text hide-on-phone" }, vue.toDisplayString($props.label + ":"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-stat-box", { "uni-stat__actived": $data.current }]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-select", { "uni-select--disabled": $props.disabled }]) }, [ vue.createElementVNode("view", { class: "uni-select__input-box", onClick: _cache[1] || (_cache[1] = (...args) => $options.toggleSelector && $options.toggleSelector(...args)) }, [ $data.current ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "uni-select__input-text" }, vue.toDisplayString($options.textShow), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "uni-select__input-text uni-select__input-placeholder" }, vue.toDisplayString($options.typePlaceholder), 1 /* TEXT */ )), $data.current && $props.clear && !$props.disabled ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clearVal && $options.clearVal(...args), ["stop"])) }, [ vue.createVNode(_component_uni_icons, { type: "clear", color: "#c0c4cc", size: "24" }) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [ vue.createVNode(_component_uni_icons, { type: $data.showSelector ? "top" : "bottom", size: "20", color: "#999" }, null, 8, ["type"]) ])) ]), $data.showSelector ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-select--mask", onClick: _cache[2] || (_cache[2] = (...args) => $options.toggleSelector && $options.toggleSelector(...args)) })) : vue.createCommentVNode("v-if", true), $data.showSelector ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "uni-select__selector", style: vue.normalizeStyle($options.getOffsetByPlacement) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($props.placement == "bottom" ? "uni-popper__arrow_bottom" : "uni-popper__arrow_top") }, null, 2 /* CLASS */ ), vue.createElementVNode("scroll-view", { "scroll-y": "true", class: "uni-select__selector-scroll" }, [ $data.mixinDatacomResData.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-select__selector-empty" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($props.emptyTips), 1 /* TEXT */ ) ])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($data.mixinDatacomResData, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-select__selector-item", key: index, onClick: ($event) => $options.change(item) }, [ vue.createElementVNode( "text", { class: vue.normalizeClass($options.textShow == item.text ? "uni-select__selector__disabled" : "uni-select__selector__disabled1") }, vue.toDisplayString($options.formatItemName(item)), 3 /* TEXT, CLASS */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ) ], 2 /* CLASS */ ) ]); } const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-ddf9e0a2"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue"]]); const control = async (data) => { try { const response2 = await uni.$http.post(`/api/v1/items/rt/${data.id}`, data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` }); formatAppLog("log", "at api/api.js:5", response2); if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") { uni.removeStorageSync("token"); login(); return response2.data; } return response2.data; } catch (error) { formatAppLog("log", "at api/api.js:18", error); login(); return response.data; } }; const getuidatas = async (data) => { try { const response2 = await uni.$http.get("/api/v1/uidatas/rt/uis/3224a3eb-2375-4dfc-99ce-b182edd30996", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` }); formatAppLog("log", "at api/api.js:32", response2); if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") { uni.removeStorageSync("token"); login(); return response2.data; } return response2.data; } catch (error) { formatAppLog("log", "at api/api.js:48", error); login(); return response.data; } }; const getfaultsList = async (data) => { try { const response2 = await uni.$http.get("/api/v1/faults", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` }); formatAppLog("log", "at api/api.js:63", response2.data); if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") { uni.removeStorageSync("token"); login(); return response2.data; } return response2.data; } catch (error) { formatAppLog("error", "at api/api.js:76", "Network request failed:", error); formatAppLog("log", "at api/api.js:77", error); uni.removeStorageSync("token"); login(); return response.data; } }; const login = async (start, count) => { try { formatAppLog("log", "at api/api.js:91", "login request"); const response2 = await uni.$http.post( "/api/v1/login", { name: "dexnui", pwd: "dexn1001" }, { "Content-Type": "application/json;charset=utf-8" } ); formatAppLog("log", "at api/api.js:94", response2); if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") { return response2.data; } formatAppLog("log", "at api/api.js:103", response2.data); uni.setStorageSync("token", response2.data.data.token); return response2.data; } catch (error) { return response.data; } }; const getTime = (format2 = "yyyy/MM/dd hh:mm:ss") => { const date = /* @__PURE__ */ new Date(); const year = date.getFullYear(); const month = ("0" + (date.getMonth() + 1)).slice(-2); const day = ("0" + date.getDate()).slice(-2); const hours = ("0" + date.getHours()).slice(-2); const minutes = ("0" + date.getMinutes()).slice(-2); const seconds = ("0" + date.getSeconds()).slice(-2); return format2.replace("yyyy", year).replace("MM", month).replace("dd", day).replace("hh", hours).replace("mm", minutes).replace("ss", seconds); }; function getDevtoolsGlobalHook() { return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; } const isProxyAvailable = typeof Proxy === "function"; const HOOK_SETUP = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; class ApiProxy { constructor(plugin, hook) { this.target = null; this.targetQueue = []; this.onQueue = []; this.plugin = plugin; this.hook = hook; const defaultSettings = {}; if (plugin.settings) { for (const id in plugin.settings) { const item = plugin.settings[id]; defaultSettings[id] = item.defaultValue; } } const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; let currentSettings = { ...defaultSettings }; try { const raw = localStorage.getItem(localSettingsSaveId); const data = JSON.parse(raw); Object.assign(currentSettings, data); } catch (e2) { } this.fallbacks = { getSettings() { return currentSettings; }, setSettings(value) { try { localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); } catch (e2) { } currentSettings = value; } }; hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { if (pluginId === this.plugin.id) { this.fallbacks.setSettings(value); } }); this.proxiedOn = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target.on[prop]; } else { return (...args) => { this.onQueue.push({ method: prop, args }); }; } } }); this.proxiedTarget = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target[prop]; } else if (prop === "on") { return this.proxiedOn; } else if (Object.keys(this.fallbacks).includes(prop)) { return (...args) => { this.targetQueue.push({ method: prop, args, resolve: () => { } }); return this.fallbacks[prop](...args); }; } else { return (...args) => { return new Promise((resolve) => { this.targetQueue.push({ method: prop, args, resolve }); }); }; } } }); } async setRealTarget(target) { this.target = target; for (const item of this.onQueue) { this.target.on[item.method](...item.args); } for (const item of this.targetQueue) { item.resolve(await this.target[item.method](...item.args)); } } } function setupDevtoolsPlugin(pluginDescriptor, setupFn) { const target = getTarget(); const hook = getDevtoolsGlobalHook(); const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null; const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list.push({ pluginDescriptor, setupFn, proxy }); if (proxy) setupFn(proxy.proxiedTarget); } } /*! * vuex v4.1.0 * (c) 2022 Evan You * @license MIT */ var storeKey = "store"; function forEachValue(obj, fn) { Object.keys(obj).forEach(function(key) { return fn(obj[key], key); }); } function isObject$3(obj) { return obj !== null && typeof obj === "object"; } function isPromise(val) { return val && typeof val.then === "function"; } function assert(condition, msg) { if (!condition) { throw new Error("[vuex] " + msg); } } function partial(fn, arg) { return function() { return fn(arg); }; } function genericSubscribe(fn, subs, options) { if (subs.indexOf(fn) < 0) { options && options.prepend ? subs.unshift(fn) : subs.push(fn); } return function() { var i2 = subs.indexOf(fn); if (i2 > -1) { subs.splice(i2, 1); } }; } function resetStore(store, hot) { store._actions = /* @__PURE__ */ Object.create(null); store._mutations = /* @__PURE__ */ Object.create(null); store._wrappedGetters = /* @__PURE__ */ Object.create(null); store._modulesNamespaceMap = /* @__PURE__ */ Object.create(null); var state2 = store.state; installModule(store, state2, [], store._modules.root, true); resetStoreState(store, state2, hot); } function resetStoreState(store, state2, hot) { var oldState = store._state; var oldScope = store._scope; store.getters = {}; store._makeLocalGettersCache = /* @__PURE__ */ Object.create(null); var wrappedGetters = store._wrappedGetters; var computedObj = {}; var computedCache = {}; var scope = vue.effectScope(true); scope.run(function() { forEachValue(wrappedGetters, function(fn, key) { computedObj[key] = partial(fn, store); computedCache[key] = vue.computed(function() { return computedObj[key](); }); Object.defineProperty(store.getters, key, { get: function() { return computedCache[key].value; }, enumerable: true // for local getters }); }); }); store._state = vue.reactive({ data: state2 }); store._scope = scope; if (store.strict) { enableStrictMode(store); } if (oldState) { if (hot) { store._withCommit(function() { oldState.data = null; }); } } if (oldScope) { oldScope.stop(); } } function installModule(store, rootState, path, module, hot) { var isRoot = !path.length; var namespace = store._modules.getNamespace(path); if (module.namespaced) { if (store._modulesNamespaceMap[namespace] && true) { console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/")); } store._modulesNamespaceMap[namespace] = module; } if (!isRoot && !hot) { var parentState = getNestedState(rootState, path.slice(0, -1)); var moduleName = path[path.length - 1]; store._withCommit(function() { { if (moduleName in parentState) { console.warn( '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"' ); } } parentState[moduleName] = module.state; }); } var local = module.context = makeLocalContext(store, namespace, path); module.forEachMutation(function(mutation, key) { var namespacedType = namespace + key; registerMutation(store, namespacedType, mutation, local); }); module.forEachAction(function(action, key) { var type = action.root ? key : namespace + key; var handler = action.handler || action; registerAction(store, type, handler, local); }); module.forEachGetter(function(getter, key) { var namespacedType = namespace + key; registerGetter(store, namespacedType, getter, local); }); module.forEachChild(function(child, key) { installModule(store, rootState, path.concat(key), child, hot); }); } function makeLocalContext(store, namespace, path) { var noNamespace = namespace === ""; var local = { dispatch: noNamespace ? store.dispatch : function(_type, _payload, _options) { var args = unifyObjectStyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type = args.type; if (!options || !options.root) { type = namespace + type; if (!store._actions[type]) { console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type); return; } } return store.dispatch(type, payload); }, commit: noNamespace ? store.commit : function(_type, _payload, _options) { var args = unifyObjectStyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type = args.type; if (!options || !options.root) { type = namespace + type; if (!store._mutations[type]) { console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type); return; } } store.commit(type, payload, options); } }; Object.defineProperties(local, { getters: { get: noNamespace ? function() { return store.getters; } : function() { return makeLocalGetters(store, namespace); } }, state: { get: function() { return getNestedState(store.state, path); } } }); return local; } function makeLocalGetters(store, namespace) { if (!store._makeLocalGettersCache[namespace]) { var gettersProxy = {}; var splitPos = namespace.length; Object.keys(store.getters).forEach(function(type) { if (type.slice(0, splitPos) !== namespace) { return; } var localType = type.slice(splitPos); Object.defineProperty(gettersProxy, localType, { get: function() { return store.getters[type]; }, enumerable: true }); }); store._makeLocalGettersCache[namespace] = gettersProxy; } return store._makeLocalGettersCache[namespace]; } function registerMutation(store, type, handler, local) { var entry = store._mutations[type] || (store._mutations[type] = []); entry.push(function wrappedMutationHandler(payload) { handler.call(store, local.state, payload); }); } function registerAction(store, type, handler, local) { var entry = store._actions[type] || (store._actions[type] = []); entry.push(function wrappedActionHandler(payload) { var res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, getters: local.getters, state: local.state, rootGetters: store.getters, rootState: store.state }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } if (store._devtoolHook) { return res.catch(function(err) { store._devtoolHook.emit("vuex:error", err); throw err; }); } else { return res; } }); } function registerGetter(store, type, rawGetter, local) { if (store._wrappedGetters[type]) { { console.error("[vuex] duplicate getter key: " + type); } return; } store._wrappedGetters[type] = function wrappedGetter(store2) { return rawGetter( local.state, // local state local.getters, // local getters store2.state, // root state store2.getters // root getters ); }; } function enableStrictMode(store) { vue.watch(function() { return store._state.data; }, function() { { assert(store._committing, "do not mutate vuex store state outside mutation handlers."); } }, { deep: true, flush: "sync" }); } function getNestedState(state2, path) { return path.reduce(function(state22, key) { return state22[key]; }, state2); } function unifyObjectStyle(type, payload, options) { if (isObject$3(type) && type.type) { options = payload; payload = type; type = type.type; } { assert(typeof type === "string", "expects string as the type, but found " + typeof type + "."); } return { type, payload, options }; } var LABEL_VUEX_BINDINGS = "vuex bindings"; var MUTATIONS_LAYER_ID = "vuex:mutations"; var ACTIONS_LAYER_ID = "vuex:actions"; var INSPECTOR_ID = "vuex"; var actionId = 0; function addDevtools(app, store) { setupDevtoolsPlugin( { id: "org.vuejs.vuex", app, label: "Vuex", homepage: "https://next.vuex.vuejs.org/", logo: "https://vuejs.org/images/icons/favicon-96x96.png", packageName: "vuex", componentStateTypes: [LABEL_VUEX_BINDINGS] }, function(api) { api.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: "Vuex Mutations", color: COLOR_LIME_500 }); api.addTimelineLayer({ id: ACTIONS_LAYER_ID, label: "Vuex Actions", color: COLOR_LIME_500 }); api.addInspector({ id: INSPECTOR_ID, label: "Vuex", icon: "storage", treeFilterPlaceholder: "Filter stores..." }); api.on.getInspectorTree(function(payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { if (payload.filter) { var nodes = []; flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, ""); payload.rootNodes = nodes; } else { payload.rootNodes = [ formatStoreForInspectorTree(store._modules.root, "") ]; } } }); api.on.getInspectorState(function(payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { var modulePath = payload.nodeId; makeLocalGetters(store, modulePath); payload.state = formatStoreForInspectorState( getStoreModule(store._modules, modulePath), modulePath === "root" ? store.getters : store._makeLocalGettersCache, modulePath ); } }); api.on.editInspectorState(function(payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { var modulePath = payload.nodeId; var path = payload.path; if (modulePath !== "root") { path = modulePath.split("/").filter(Boolean).concat(path); } store._withCommit(function() { payload.set(store._state.data, path, payload.state.value); }); } }); store.subscribe(function(mutation, state2) { var data = {}; if (mutation.payload) { data.payload = mutation.payload; } data.state = state2; api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: Date.now(), title: mutation.type, data } }); }); store.subscribeAction({ before: function(action, state2) { var data = {}; if (action.payload) { data.payload = action.payload; } action._id = actionId++; action._time = Date.now(); data.state = state2; api.addTimelineEvent({ layerId: ACTIONS_LAYER_ID, event: { time: action._time, title: action.type, groupId: action._id, subtitle: "start", data } }); }, after: function(action, state2) { var data = {}; var duration = Date.now() - action._time; data.duration = { _custom: { type: "duration", display: duration + "ms", tooltip: "Action duration", value: duration } }; if (action.payload) { data.payload = action.payload; } data.state = state2; api.addTimelineEvent({ layerId: ACTIONS_LAYER_ID, event: { time: Date.now(), title: action.type, groupId: action._id, subtitle: "end", data } }); } }); } ); } var COLOR_LIME_500 = 8702998; var COLOR_DARK = 6710886; var COLOR_WHITE = 16777215; var TAG_NAMESPACED = { label: "namespaced", textColor: COLOR_WHITE, backgroundColor: COLOR_DARK }; function extractNameFromPath(path) { return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root"; } function formatStoreForInspectorTree(module, path) { return { id: path || "root", // all modules end with a `/`, we want the last segment only // cart/ -> cart // nested/cart/ -> cart label: extractNameFromPath(path), tags: module.namespaced ? [TAG_NAMESPACED] : [], children: Object.keys(module._children).map( function(moduleName) { return formatStoreForInspectorTree( module._children[moduleName], path + moduleName + "/" ); } ) }; } function flattenStoreForInspectorTree(result, module, filter, path) { if (path.includes(filter)) { result.push({ id: path || "root", label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root", tags: module.namespaced ? [TAG_NAMESPACED] : [] }); } Object.keys(module._children).forEach(function(moduleName) { flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/"); }); } function formatStoreForInspectorState(module, getters, path) { getters = path === "root" ? getters : getters[path]; var gettersKeys = Object.keys(getters); var storeState = { state: Object.keys(module.state).map(function(key) { return { key, editable: true, value: module.state[key] }; }) }; if (gettersKeys.length) { var tree = transformPathsToObjectTree(getters); storeState.getters = Object.keys(tree).map(function(key) { return { key: key.endsWith("/") ? extractNameFromPath(key) : key, editable: false, value: canThrow(function() { return tree[key]; }) }; }); } return storeState; } function transformPathsToObjectTree(getters) { var result = {}; Object.keys(getters).forEach(function(key) { var path = key.split("/"); if (path.length > 1) { var target = result; var leafKey = path.pop(); path.forEach(function(p2) { if (!target[p2]) { target[p2] = { _custom: { value: {}, display: p2, tooltip: "Module", abstract: true } }; } target = target[p2]._custom.value; }); target[leafKey] = canThrow(function() { return getters[key]; }); } else { result[key] = canThrow(function() { return getters[key]; }); } }); return result; } function getStoreModule(moduleMap, path) { var names = path.split("/").filter(function(n2) { return n2; }); return names.reduce( function(module, moduleName, i2) { var child = module[moduleName]; if (!child) { throw new Error('Missing module "' + moduleName + '" for path "' + path + '".'); } return i2 === names.length - 1 ? child : child._children; }, path === "root" ? moduleMap : moduleMap.root._children ); } function canThrow(cb) { try { return cb(); } catch (e2) { return e2; } } var Module = function Module2(rawModule, runtime) { this.runtime = runtime; this._children = /* @__PURE__ */ Object.create(null); this._rawModule = rawModule; var rawState = rawModule.state; this.state = (typeof rawState === "function" ? rawState() : rawState) || {}; }; var prototypeAccessors$1 = { namespaced: { configurable: true } }; prototypeAccessors$1.namespaced.get = function() { return !!this._rawModule.namespaced; }; Module.prototype.addChild = function addChild(key, module) { this._children[key] = module; }; Module.prototype.removeChild = function removeChild(key) { delete this._children[key]; }; Module.prototype.getChild = function getChild(key) { return this._children[key]; }; Module.prototype.hasChild = function hasChild(key) { return key in this._children; }; Module.prototype.update = function update(rawModule) { this._rawModule.namespaced = rawModule.namespaced; if (rawModule.actions) { this._rawModule.actions = rawModule.actions; } if (rawModule.mutations) { this._rawModule.mutations = rawModule.mutations; } if (rawModule.getters) { this._rawModule.getters = rawModule.getters; } }; Module.prototype.forEachChild = function forEachChild(fn) { forEachValue(this._children, fn); }; Module.prototype.forEachGetter = function forEachGetter(fn) { if (this._rawModule.getters) { forEachValue(this._rawModule.getters, fn); } }; Module.prototype.forEachAction = function forEachAction(fn) { if (this._rawModule.actions) { forEachValue(this._rawModule.actions, fn); } }; Module.prototype.forEachMutation = function forEachMutation(fn) { if (this._rawModule.mutations) { forEachValue(this._rawModule.mutations, fn); } }; Object.defineProperties(Module.prototype, prototypeAccessors$1); var ModuleCollection = function ModuleCollection2(rawRootModule) { this.register([], rawRootModule, false); }; ModuleCollection.prototype.get = function get(path) { return path.reduce(function(module, key) { return module.getChild(key); }, this.root); }; ModuleCollection.prototype.getNamespace = function getNamespace(path) { var module = this.root; return path.reduce(function(namespace, key) { module = module.getChild(key); return namespace + (module.namespaced ? key + "/" : ""); }, ""); }; ModuleCollection.prototype.update = function update$1(rawRootModule) { update2([], this.root, rawRootModule); }; ModuleCollection.prototype.register = function register(path, rawModule, runtime) { var this$1$1 = this; if (runtime === void 0) runtime = true; { assertRawModule(path, rawModule); } var newModule = new Module(rawModule, runtime); if (path.length === 0) { this.root = newModule; } else { var parent = this.get(path.slice(0, -1)); parent.addChild(path[path.length - 1], newModule); } if (rawModule.modules) { forEachValue(rawModule.modules, function(rawChildModule, key) { this$1$1.register(path.concat(key), rawChildModule, runtime); }); } }; ModuleCollection.prototype.unregister = function unregister(path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; var child = parent.getChild(key); if (!child) { { console.warn( "[vuex] trying to unregister module '" + key + "', which is not registered" ); } return; } if (!child.runtime) { return; } parent.removeChild(key); }; ModuleCollection.prototype.isRegistered = function isRegistered(path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; if (parent) { return parent.hasChild(key); } return false; }; function update2(path, targetModule, newModule) { { assertRawModule(path, newModule); } targetModule.update(newModule); if (newModule.modules) { for (var key in newModule.modules) { if (!targetModule.getChild(key)) { { console.warn( "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed" ); } return; } update2( path.concat(key), targetModule.getChild(key), newModule.modules[key] ); } } } var functionAssert = { assert: function(value) { return typeof value === "function"; }, expected: "function" }; var objectAssert = { assert: function(value) { return typeof value === "function" || typeof value === "object" && typeof value.handler === "function"; }, expected: 'function or object with "handler" function' }; var assertTypes = { getters: functionAssert, mutations: functionAssert, actions: objectAssert }; function assertRawModule(path, rawModule) { Object.keys(assertTypes).forEach(function(key) { if (!rawModule[key]) { return; } var assertOptions = assertTypes[key]; forEachValue(rawModule[key], function(value, type) { assert( assertOptions.assert(value), makeAssertionMessage(path, key, type, value, assertOptions.expected) ); }); }); } function makeAssertionMessage(path, key, type, value, expected) { var buf = key + " should be " + expected + ' but "' + key + "." + type + '"'; if (path.length > 0) { buf += ' in module "' + path.join(".") + '"'; } buf += " is " + JSON.stringify(value) + "."; return buf; } function createStore(options) { return new Store$1(options); } var Store$1 = function Store2(options) { var this$1$1 = this; if (options === void 0) options = {}; { assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser."); assert(this instanceof Store2, "store must be called with the new operator."); } var plugins = options.plugins; if (plugins === void 0) plugins = []; var strict = options.strict; if (strict === void 0) strict = false; var devtools2 = options.devtools; this._committing = false; this._actions = /* @__PURE__ */ Object.create(null); this._actionSubscribers = []; this._mutations = /* @__PURE__ */ Object.create(null); this._wrappedGetters = /* @__PURE__ */ Object.create(null); this._modules = new ModuleCollection(options); this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null); this._subscribers = []; this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null); this._scope = null; this._devtools = devtools2; var store = this; var ref = this; var dispatch2 = ref.dispatch; var commit2 = ref.commit; this.dispatch = function boundDispatch(type, payload) { return dispatch2.call(store, type, payload); }; this.commit = function boundCommit(type, payload, options2) { return commit2.call(store, type, payload, options2); }; this.strict = strict; var state2 = this._modules.root.state; installModule(this, state2, [], this._modules.root); resetStoreState(this, state2); plugins.forEach(function(plugin) { return plugin(this$1$1); }); }; var prototypeAccessors = { state: { configurable: true } }; Store$1.prototype.install = function install(app, injectKey) { app.provide(injectKey || storeKey, this); app.config.globalProperties.$store = this; var useDevtools = this._devtools !== void 0 ? this._devtools : true; if (useDevtools) { addDevtools(app, this); } }; prototypeAccessors.state.get = function() { return this._state.data; }; prototypeAccessors.state.set = function(v2) { { assert(false, "use store.replaceState() to explicit replace store state."); } }; Store$1.prototype.commit = function commit(_type, _payload, _options) { var this$1$1 = this; var ref = unifyObjectStyle(_type, _payload, _options); var type = ref.type; var payload = ref.payload; var options = ref.options; var mutation = { type, payload }; var entry = this._mutations[type]; if (!entry) { { console.error("[vuex] unknown mutation type: " + type); } return; } this._withCommit(function() { entry.forEach(function commitIterator(handler) { handler(payload); }); }); this._subscribers.slice().forEach(function(sub) { return sub(mutation, this$1$1.state); }); if (options && options.silent) { console.warn( "[vuex] mutation type: " + type + ". Silent option has been removed. Use the filter functionality in the vue-devtools" ); } }; Store$1.prototype.dispatch = function dispatch(_type, _payload) { var this$1$1 = this; var ref = unifyObjectStyle(_type, _payload); var type = ref.type; var payload = ref.payload; var action = { type, payload }; var entry = this._actions[type]; if (!entry) { { console.error("[vuex] unknown action type: " + type); } return; } try { this._actionSubscribers.slice().filter(function(sub) { return sub.before; }).forEach(function(sub) { return sub.before(action, this$1$1.state); }); } catch (e2) { { console.warn("[vuex] error in before action subscribers: "); console.error(e2); } } var result = entry.length > 1 ? Promise.all(entry.map(function(handler) { return handler(payload); })) : entry[0](payload); return new Promise(function(resolve, reject) { result.then(function(res) { try { this$1$1._actionSubscribers.filter(function(sub) { return sub.after; }).forEach(function(sub) { return sub.after(action, this$1$1.state); }); } catch (e2) { { console.warn("[vuex] error in after action subscribers: "); console.error(e2); } } resolve(res); }, function(error) { try { this$1$1._actionSubscribers.filter(function(sub) { return sub.error; }).forEach(function(sub) { return sub.error(action, this$1$1.state, error); }); } catch (e2) { { console.warn("[vuex] error in error action subscribers: "); console.error(e2); } } reject(error); }); }); }; Store$1.prototype.subscribe = function subscribe(fn, options) { return genericSubscribe(fn, this._subscribers, options); }; Store$1.prototype.subscribeAction = function subscribeAction(fn, options) { var subs = typeof fn === "function" ? { before: fn } : fn; return genericSubscribe(subs, this._actionSubscribers, options); }; Store$1.prototype.watch = function watch$1(getter, cb, options) { var this$1$1 = this; { assert(typeof getter === "function", "store.watch only accepts a function."); } return vue.watch(function() { return getter(this$1$1.state, this$1$1.getters); }, cb, Object.assign({}, options)); }; Store$1.prototype.replaceState = function replaceState(state2) { var this$1$1 = this; this._withCommit(function() { this$1$1._state.data = state2; }); }; Store$1.prototype.registerModule = function registerModule(path, rawModule, options) { if (options === void 0) options = {}; if (typeof path === "string") { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); assert(path.length > 0, "cannot register the root module by using registerModule."); } this._modules.register(path, rawModule); installModule(this, this.state, path, this._modules.get(path), options.preserveState); resetStoreState(this, this.state); }; Store$1.prototype.unregisterModule = function unregisterModule(path) { var this$1$1 = this; if (typeof path === "string") { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); } this._modules.unregister(path); this._withCommit(function() { var parentState = getNestedState(this$1$1.state, path.slice(0, -1)); delete parentState[path[path.length - 1]]; }); resetStore(this); }; Store$1.prototype.hasModule = function hasModule(path) { if (typeof path === "string") { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); } return this._modules.isRegistered(path); }; Store$1.prototype.hotUpdate = function hotUpdate(newOptions) { this._modules.update(newOptions); resetStore(this, true); }; Store$1.prototype._withCommit = function _withCommit(fn) { var committing = this._committing; this._committing = true; fn(); this._committing = committing; }; Object.defineProperties(Store$1.prototype, prototypeAccessors); var mapState = normalizeNamespace(function(namespace, states) { var res = {}; if (!isValidMap(states)) { console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"); } normalizeMap(states).forEach(function(ref) { var key = ref.key; var val = ref.val; res[key] = function mappedState() { var state2 = this.$store.state; var getters = this.$store.getters; if (namespace) { var module = getModuleByNamespace(this.$store, "mapState", namespace); if (!module) { return; } state2 = module.context.state; getters = module.context.getters; } return typeof val === "function" ? val.call(this, state2, getters) : state2[val]; }; res[key].vuex = true; }); return res; }); function normalizeMap(map) { if (!isValidMap(map)) { return []; } return Array.isArray(map) ? map.map(function(key) { return { key, val: key }; }) : Object.keys(map).map(function(key) { return { key, val: map[key] }; }); } function isValidMap(map) { return Array.isArray(map) || isObject$3(map); } function normalizeNamespace(fn) { return function(namespace, map) { if (typeof namespace !== "string") { map = namespace; namespace = ""; } else if (namespace.charAt(namespace.length - 1) !== "/") { namespace += "/"; } return fn(namespace, map); }; } function getModuleByNamespace(store, helper, namespace) { var module = store._modulesNamespaceMap[namespace]; if (!module) { console.error("[vuex] module namespace not found in " + helper + "(): " + namespace); } return module; } const _imports_0 = "/static/logo.png"; const _imports_1$3 = "/static/img/energy1.png"; const _imports_2$3 = "/static/img/Energybrightness1.png"; const _imports_3$4 = "/static/img/energy2.png"; const _imports_4$3 = "/static/img/Energybrightness2.png"; const _imports_5$1 = "/static/img/energy3.png"; const _imports_6$1 = "/static/img/Energybrightness3.png"; const _imports_7$1 = "/static/img/energy4.png"; const _imports_8$1 = "/static/img/Energybrightness4.png"; const _imports_9 = "/static/img/setup.png"; const _imports_10$1 = "/static/!.png"; const _sfc_main$c = { data() { return { title: "", uidatas: "", formatTimeid: "", messageText: "", appVersion: "", // 用于存储应用版本号 appLanguage: "zh-Hans", range: [ { value: "zh-Hans", text: "中文" }, { value: "en", text: "English" } ] }; }, created() { }, mounted() { this.appLanguage = uni.getStorageSync("userLanguage") || "zh-Hans"; }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status", "selectorid", "selectorindex"]), ...mapState({ uidatasdata: (state2) => state2.uidatasdata }) }, onLoad() { uni.getSystemInfo({ success: (res) => { formatAppLog("log", "at pages/index/index.vue:235", res); this.appVersion = res.appWgtVersion; }, fail: (err) => { formatAppLog("error", "at pages/index/index.vue:239", "获取系统信息失败:", err); } }); }, beforeUnmount() { clearInterval(this.uidatas); }, methods: { changeLanguage(locale) { formatAppLog("log", "at pages/index/index.vue:249", locale); this.$i18n.locale = locale; uni.setStorageSync("userLanguage", locale); }, onclick(e2) { this.pattern(e2); }, pattern(unm) { let data = { id: "c32e6a80-9159-4f6e-9acc-8525cf177808", issaveinitvalue: true, value: unm + "" // 直流供电=1,直流补电=4,交流供电=2,交流补电=3 }; control(data).then((data2) => { formatAppLog("log", "at pages/index/index.vue:263", data2); if (data2.status == "ok") { if (unm == 3) { uni.redirectTo({ url: "/pages/home/index" }); } else if (unm == 2) { uni.redirectTo({ url: "/pages/electricity/index" }); } else if (unm == 4) { uni.redirectTo({ url: "/pages/supply/supply" }); } else if (unm == 1) { uni.redirectTo({ url: "/pages/supplyss/supplyss" }); } } else { this.messageText = "选择模式失败请重新选择"; this.$refs.message.open(); return; } }); }, onget(unm) { if (unm == 3) { uni.redirectTo({ url: "/pages/home/index" }); } else if (unm == 2) { uni.redirectTo({ url: "/pages/electricity/index" }); } else if (unm == 4) { uni.redirectTo({ url: "/pages/supply/supply" }); } else if (unm == 1) { uni.redirectTo({ url: "/pages/supplyss/supplyss" }); } }, system() { uni.redirectTo({ url: "/pages/faultlist/index" }); } } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1); const _component_uni_data_select = resolveEasycom(vue.resolveDynamicComponent("uni-data-select"), __easycom_2); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createCommentVNode(' '), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "tap" }, [ vue.createElementVNode("view", { class: "tap_1" }, " AC "), vue.createElementVNode("view", { class: "tap_2" }, " DC "), vue.createElementVNode("view", { class: "tap_3" }, " SYS ") ]), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "power" }, [ vue.createCommentVNode(' \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n '), _ctx.selectorid != 3 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_1$3, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("CommunicationRecharge")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, onClick: _cache[0] || (_cache[0] = ($event) => $options.onclick(3)) }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bright" }, [ vue.createElementVNode("image", { src: _imports_2$3, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title_bright" }, vue.toDisplayString(_ctx.$t("CommunicationRecharge")), 1 /* TEXT */ ) ]) ])), _ctx.selectorid != 2 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_3$4, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("CommunicationSupply")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, onClick: _cache[1] || (_cache[1] = ($event) => $options.onclick(2)) }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bright" }, [ vue.createElementVNode("image", { src: _imports_4$3, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title_bright" }, vue.toDisplayString(_ctx.$t("CommunicationSupply")), 1 /* TEXT */ ) ]) ])), _ctx.selectorid != 4 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_5$1, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("DirectRecharge")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 5, onClick: _cache[2] || (_cache[2] = ($event) => $options.onclick(4)) }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bright" }, [ vue.createElementVNode("image", { src: _imports_6$1, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title_bright" }, vue.toDisplayString(_ctx.$t("DirectRecharge")), 1 /* TEXT */ ) ]) ])), _ctx.selectorid != 1 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_7$1, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("DirectSupply")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 7, onClick: _cache[3] || (_cache[3] = ($event) => $options.onclick(1)) }, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bright" }, [ vue.createElementVNode("image", { src: _imports_8$1, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title_bright" }, vue.toDisplayString(_ctx.$t("SystemInformation")), 1 /* TEXT */ ) ]) ])), vue.createElementVNode("view", { class: "power_5", onClick: _cache[4] || (_cache[4] = (...args) => $options.system && $options.system(...args)) }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_9, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("SystemInformation")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "power" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_1$3, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("CommunicationRecharge")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_3$4, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("CommunicationSupply")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_5$1, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("DirectRecharge")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "power_1" }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_7$1, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("DirectSupply")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "power_5", onClick: _cache[5] || (_cache[5] = (...args) => $options.system && $options.system(...args)) }, [ vue.createElementVNode("view", { class: "power_bj" }, [ vue.createElementVNode("image", { src: _imports_9, mode: "" }) ]), vue.createElementVNode( "view", { class: "power_title" }, vue.toDisplayString(_ctx.$t("SystemInformation")), 1 /* TEXT */ ) ]) ])), _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "power_6" }, [ vue.createElementVNode("image", { src: _imports_10$1, mode: "" }), vue.createTextVNode( vue.toDisplayString(_ctx.$t("Tipswarning")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createVNode( _component_uni_popup, { ref: "message", type: "message" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_message, { type: "error", message: $data.messageText, duration: 2500 }, null, 8, ["message"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "switch-container" }, [ vue.createVNode(_component_uni_data_select, { modelValue: $data.appLanguage, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.appLanguage = $event), localdata: $data.range, clear: false, onChange: $options.changeLanguage }, null, 8, ["modelValue", "localdata", "onChange"]) ]), vue.createElementVNode( "view", { class: "appVersioncss" }, vue.toDisplayString(_ctx.$t("version")) + vue.toDisplayString($data.appVersion), 1 /* TEXT */ ) ]); } const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/project/esswisdom_ipad/pages/index/index.vue"]]); const _sfc_main$b = { name: "cmd-progress", props: { /** * 类型默认:line,可选 line circle dashboard */ type: { validator: (val) => { return ["line", "circle", "dashboard"].includes(val); }, default: "line" }, /** * 百分比 */ percent: { type: Number, default: 0 }, /** * 已完成的分段百分,仅支持类型line */ successPercent: { type: Number, default: 0 }, /** * 是否显示进度数值或状态图标 */ showInfo: { type: Boolean, default: true }, /** * 进度状态,可选:normal success exception (active仅支持类型line */ status: { validator: (val) => { return ["normal", "success", "exception", "active"].includes(val); }, default: "normal" }, /** * 条线的宽度1-50,与width有关 */ strokeWidth: { type: Number, default: 6 }, /** * 条线的颜色,渐变色仅支持类型line */ strokeColor: { type: String, default: "" }, /** * 条线两端的形状 可选:'round', 'square' */ strokeShape: { validator: (val) => { return ["round", "square"].includes(val); }, default: "round" }, /** * 圆形进度条画布宽度,支持类型circle dashboard */ width: { type: Number, default: 80 }, /** * 圆形进度条缺口角度,可取值 0 ~ 360,支持类型circle dashboard */ gapDegree: { type: Number, default: 120 }, /** * 圆形进度条缺口位置,可取值'top', 'bottom', 'left', 'right' ,支持类型circle dashboard */ gapPosition: { validator: (val) => { return ["top", "bottom", "left", "right"].includes(val); }, default: "top" } }, computed: { /** * 如果需要自定义格式就在这改 */ setFormat() { return `${this.setProgress}%`; }, /** * 设置显示进度值,禁止小于0和超过100 */ setProgress() { let percent = this.percent; if (!this.percent || this.percent < 0) { percent = 0; } else if (this.percent >= 100) { percent = 100; } return percent; }, /** * 进度圈svg大小 */ setCircleStyle() { return `width: ${this.width}px; height: ${this.width}px; fontSize: ${this.width * 0.15 + 6}px;`; }, /** * 圈底色 */ setCircleTrailStyle() { const radius = 50 - this.strokeWidth / 2; const len = Math.PI * 2 * radius; const gapDeg = this.gapDegree || this.type === "dashboard" && 75; return `stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px; stroke-dashoffset: -${(gapDeg || 0) / 2}px; transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;`; }, /** * 圈进度 */ setCirclePathStyle() { const radius = 50 - this.strokeWidth / 2; const len = Math.PI * 2 * radius; const gapDeg = this.gapDegree || this.type === "dashboard" && 75; return `stroke: ${this.strokeColor}; stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px; stroke-dashoffset: -${(gapDeg || 0) / 2}px; transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;`; }, /** * 绘制圈 */ setCirclePath() { const radius = 50 - this.strokeWidth / 2; let beginPositionX = 0; let beginPositionY = -radius; let endPositionX = 0; let endPositionY = -2 * radius; const gapPos = this.type === "dashboard" && "bottom" || this.gapPosition || "top"; switch (gapPos) { case "left": beginPositionX = -radius; beginPositionY = 0; endPositionX = 2 * radius; endPositionY = 0; break; case "right": beginPositionX = radius; beginPositionY = 0; endPositionX = -2 * radius; endPositionY = 0; break; case "bottom": beginPositionY = radius; endPositionY = 2 * radius; break; } return `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`; }, /** * 非H5端,绘制进度圈svg转base URL */ setCircle() { const radius = 50 - this.strokeWidth / 2; const len = Math.PI * 2 * radius; const gapDeg = this.gapDegree || this.type === "dashboard" && 75; let currentColor = "#108ee9"; if (this.status == "exception") { currentColor = "#f5222d"; } if (this.status == "success" || this.setProgress >= 100 || this.strokeColor) { currentColor = this.strokeColor || "#52c41a"; } let svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' class='cmd-progress-circle'%3E%3Cpath d='${this.setCirclePath}' stroke='%23f3f3f3' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-trail' style='stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px;stroke-dashoffset: -${(gapDeg || 0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;'%3E%3C/path%3E%3Cpath d='${this.setCirclePath}' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-path' style='stroke: ${escape(currentColor)};stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px;stroke-dashoffset: -${(gapDeg || 0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;'%3E%3C/path%3E%3C/svg%3E`; return `background-image: url("${svgToBase}"); background-size: cover; display: inline-block; ${this.setCircleStyle}`; }, /** * 设置进度圈状态图标 */ setCircleIcon() { let currentColor = "#108ee9"; let svgToBase = ""; if (this.status == "exception") { currentColor = "#f5222d"; svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z'%3E%3C/path%3E %3C/svg%3E`; } if (this.status == "success" || this.setProgress >= 100) { currentColor = this.strokeColor || "#52c41a"; svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z'%3E%3C/path%3E %3C/svg%3E`; } return `background-image: url("${svgToBase}"); background-size: cover; display: inline-block; width: 1em; height: 1em;`; }, /** * 设置进度条样式 */ setLineStyle() { return `width: ${this.setProgress}%; height: ${this.strokeWidth}px; background: ${this.strokeColor}; border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`; }, /** * 设置已完成分段进度 */ setLineSuccessStyle() { let successPercent = this.successPercent; if (!this.successPercent || this.successPercent < 0 || this.setProgress < this.successPercent) { successPercent = 0; } else if (this.successPercent >= 100) { successPercent = 100; } return `width: ${successPercent}%; height: ${this.strokeWidth}px; border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`; }, /** * 设置进度条状态图标 */ setLineStatusIcon() { let currentColor = "#108ee9"; let svgToBase = ""; if (this.status == "exception") { currentColor = "#f5222d"; svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z'%3E%3C/path%3E %3C/svg%3E`; } if (this.status == "success" || this.setProgress >= 100) { currentColor = this.strokeColor || "#52c41a"; svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z'%3E%3C/path%3E %3C/svg%3E`; } return `background-image: url("${svgToBase}"); background-size: cover; display: inline-block; width: 1em; height: 1em;`; }, /** * 状态样式 */ setStatusClass() { let statusClass = []; if (this.status == "exception") { statusClass.push("cmd-progress-status-exception"); } if (this.status == "success" || this.setProgress >= 100) { statusClass.push("cmd-progress-status-success"); } if (this.status == "active") { statusClass.push("cmd-progress-status-active"); } if (this.showInfo) { statusClass.push("cmd-progress-show-info"); } if (this.type === "line") { statusClass.push("cmd-progress-line"); } if (this.type === "circle" || this.type === "dashboard") { statusClass.push("cmd-progress-circle"); } statusClass.push("cmd-progress-status-normal"); return statusClass; } } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass]) }, [ $props.type == "circle" || $props.type == "dashboard" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass]) }, [ vue.createElementVNode( "view", { class: "cmd-progress-inner", style: vue.normalizeStyle($options.setCircleStyle) }, [ vue.createCommentVNode(" 绘制圈 start "), vue.createElementVNode( "text", { style: vue.normalizeStyle($options.setCircle) }, null, 4 /* STYLE */ ), vue.createCommentVNode(" 绘制圈 end "), vue.createCommentVNode(" 状态文本 start "), $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "cmd-progress-text", title: $options.setFormat }, [ $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString($options.setFormat), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: vue.normalizeStyle($options.setCircleIcon) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 8, ["title"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 状态文本 end ") ], 4 /* STYLE */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), $props.type == "line" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 进度条 start "), vue.createElementVNode("view", { class: "cmd-progress-outer" }, [ vue.createElementVNode( "view", { class: "cmd-progress-inner", style: vue.normalizeStyle({ "border-radius": $props.strokeShape == "square" ? 0 : "100px" }) }, [ vue.createElementVNode( "view", { class: "cmd-progress-bg", style: vue.normalizeStyle($options.setLineStyle) }, null, 4 /* STYLE */ ), $props.successPercent ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "cmd-progress-success-bg", style: vue.normalizeStyle($options.setLineSuccessStyle) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]), vue.createCommentVNode(" 进度条 end "), vue.createCommentVNode(" 进度条是否显示信息 start "), $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "cmd-progress-text", title: $options.setFormat }, [ $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString($options.setFormat), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: vue.normalizeStyle($options.setLineStatusIcon) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 8, ["title"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 进度条是否显示信息 end ") ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-06762d5e"], ["__file", "D:/project/esswisdom_ipad/components/cmd-progress/cmd-progress.vue"]]); const isObject$2 = (val) => val !== null && typeof val === "object"; const defaultDelimiters = ["{", "}"]; class BaseFormatter { constructor() { this._caches = /* @__PURE__ */ Object.create(null); } interpolate(message, values, delimiters = defaultDelimiters) { if (!values) { return [message]; } let tokens = this._caches[message]; if (!tokens) { tokens = parse$1(message, delimiters); this._caches[message] = tokens; } return compile(tokens, values); } } const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse$1(format2, [startDelimiter, endDelimiter]) { const tokens = []; let position = 0; let text = ""; while (position < format2.length) { let char = format2[position++]; if (char === startDelimiter) { if (text) { tokens.push({ type: "text", value: text }); } text = ""; let sub = ""; char = format2[position++]; while (char !== void 0 && char !== endDelimiter) { sub += char; char = format2[position++]; } const isClosed = char === endDelimiter; const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; tokens.push({ value: sub, type }); } else { text += char; } } text && tokens.push({ type: "text", value: text }); return tokens; } function compile(tokens, values) { const compiled = []; let index = 0; const mode = Array.isArray(values) ? "list" : isObject$2(values) ? "named" : "unknown"; if (mode === "unknown") { return compiled; } while (index < tokens.length) { const token = tokens[index]; switch (token.type) { case "text": compiled.push(token.value); break; case "list": compiled.push(values[parseInt(token.value, 10)]); break; case "named": if (mode === "named") { compiled.push(values[token.value]); } else { { console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`); } } break; case "unknown": { console.warn(`Detect 'unknown' type of token!`); } break; } index++; } return compiled; } const LOCALE_ZH_HANS = "zh-Hans"; const LOCALE_ZH_HANT = "zh-Hant"; const LOCALE_EN = "en"; const LOCALE_FR = "fr"; const LOCALE_ES = "es"; const hasOwnProperty$2 = Object.prototype.hasOwnProperty; const hasOwn$2 = (val, key) => hasOwnProperty$2.call(val, key); const defaultFormatter = new BaseFormatter(); function include(str, parts) { return !!parts.find((part) => str.indexOf(part) !== -1); } function startsWith(str, parts) { return parts.find((part) => str.indexOf(part) === 0); } function normalizeLocale(locale, messages2) { if (!locale) { return; } locale = locale.trim().replace(/_/g, "-"); if (messages2 && messages2[locale]) { return locale; } locale = locale.toLowerCase(); if (locale === "chinese") { return LOCALE_ZH_HANS; } if (locale.indexOf("zh") === 0) { if (locale.indexOf("-hans") > -1) { return LOCALE_ZH_HANS; } if (locale.indexOf("-hant") > -1) { return LOCALE_ZH_HANT; } if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { return LOCALE_ZH_HANT; } return LOCALE_ZH_HANS; } let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES]; if (messages2 && Object.keys(messages2).length > 0) { locales = Object.keys(messages2); } const lang = startsWith(locale, locales); if (lang) { return lang; } } class I18n { constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) { this.locale = LOCALE_EN; this.fallbackLocale = LOCALE_EN; this.message = {}; this.messages = {}; this.watchers = []; if (fallbackLocale) { this.fallbackLocale = fallbackLocale; } this.formater = formater2 || defaultFormatter; this.messages = messages2 || {}; this.setLocale(locale || LOCALE_EN); if (watcher) { this.watchLocale(watcher); } } setLocale(locale) { const oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; if (!this.messages[this.locale]) { this.messages[this.locale] = {}; } this.message = this.messages[this.locale]; if (oldLocale !== this.locale) { this.watchers.forEach((watcher) => { watcher(this.locale, oldLocale); }); } } getLocale() { return this.locale; } watchLocale(fn) { const index = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index, 1); }; } add(locale, message, override = true) { const curMessages = this.messages[locale]; if (curMessages) { if (override) { Object.assign(curMessages, message); } else { Object.keys(message).forEach((key) => { if (!hasOwn$2(curMessages, key)) { curMessages[key] = message[key]; } }); } } else { this.messages[locale] = message; } } f(message, values, delimiters) { return this.formater.interpolate(message, values, delimiters).join(""); } t(key, locale, values) { let message = this.message; if (typeof locale === "string") { locale = normalizeLocale(locale, this.messages); locale && (message = this.messages[locale]); } else { values = locale; } if (!hasOwn$2(message, key)) { console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); return key; } return this.formater.interpolate(message[key], values).join(""); } } function watchAppLocale(appVm, i18n2) { if (appVm.$watchLocale) { appVm.$watchLocale((newLocale) => { i18n2.setLocale(newLocale); }); } else { appVm.$watch(() => appVm.$locale, (newLocale) => { i18n2.setLocale(newLocale); }); } } function getDefaultLocale() { if (typeof uni !== "undefined" && uni.getLocale) { return uni.getLocale(); } if (typeof global !== "undefined" && global.getLocale) { return global.getLocale(); } return LOCALE_EN; } function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) { if (typeof locale !== "string") { const options = [ messages2, locale ]; locale = options[0]; messages2 = options[1]; } if (typeof locale !== "string") { locale = getDefaultLocale(); } if (typeof fallbackLocale !== "string") { fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN; } const i18n2 = new I18n({ locale, fallbackLocale, messages: messages2, watcher }); let t2 = (key, values) => { if (typeof getApp !== "function") { t2 = function(key2, values2) { return i18n2.t(key2, values2); }; } else { let isWatchedAppLocale = false; t2 = function(key2, values2) { const appVm = getApp().$vm; if (appVm) { appVm.$locale; if (!isWatchedAppLocale) { isWatchedAppLocale = true; watchAppLocale(appVm, i18n2); } } return i18n2.t(key2, values2); }; } return t2(key, values); }; return { i18n: i18n2, f(message, values, delimiters) { return i18n2.f(message, values, delimiters); }, t(key, values) { return t2(key, values); }, add(locale2, message, override = true) { return i18n2.add(locale2, message, override); }, watch(fn) { return i18n2.watchLocale(fn); }, getLocale() { return i18n2.getLocale(); }, setLocale(newLocale) { return i18n2.setLocale(newLocale); } }; } const en$2 = { "uni-popup.cancel": "cancel", "uni-popup.ok": "ok", "uni-popup.placeholder": "pleace enter", "uni-popup.title": "Hint", "uni-popup.shareTitle": "Share to" }; const zhHans$2 = { "uni-popup.cancel": "取消", "uni-popup.ok": "确定", "uni-popup.placeholder": "请输入", "uni-popup.title": "提示", "uni-popup.shareTitle": "分享到" }; const zhHant$2 = { "uni-popup.cancel": "取消", "uni-popup.ok": "確定", "uni-popup.placeholder": "請輸入", "uni-popup.title": "提示", "uni-popup.shareTitle": "分享到" }; const messages$2 = { en: en$2, "zh-Hans": zhHans$2, "zh-Hant": zhHant$2 }; const { t: t$1 } = initVueI18n(messages$2); const _sfc_main$a = { name: "uniPopupDialog", mixins: [popup], emits: ["confirm", "close", "update:modelValue", "input"], props: { inputType: { type: String, default: "text" }, showClose: { type: Boolean, default: true }, modelValue: { type: [Number, String], default: "" }, placeholder: { type: [String, Number], default: "" }, type: { type: String, default: "error" }, mode: { type: String, default: "base" }, title: { type: String, default: "" }, content: { type: String, default: "" }, beforeClose: { type: Boolean, default: false }, cancelText: { type: String, default: "" }, confirmText: { type: String, default: "" }, maxlength: { type: Number, default: -1 }, focus: { type: Boolean, default: true } }, data() { return { dialogType: "error", val: "" }; }, computed: { okText() { return this.confirmText || t$1("uni-popup.ok"); }, closeText() { return this.cancelText || t$1("uni-popup.cancel"); }, placeholderText() { return this.placeholder || t$1("uni-popup.placeholder"); }, titleText() { return this.title || t$1("uni-popup.title"); } }, watch: { type(val) { this.dialogType = val; }, mode(val) { if (val === "input") { this.dialogType = "info"; } }, value(val) { if (this.maxlength != -1 && this.mode === "input") { this.val = val.slice(0, this.maxlength); } else { this.val = val; } }, val(val) { this.$emit("update:modelValue", val); } }, created() { this.popup.disableMask(); if (this.mode === "input") { this.dialogType = "info"; this.val = this.value; this.val = this.modelValue; } else { this.dialogType = this.type; } }, methods: { /** * 点击确认按钮 */ onOk() { if (this.mode === "input") { this.$emit("confirm", this.val); } else { this.$emit("confirm"); } if (this.beforeClose) return; this.popup.close(); }, /** * 点击取消按钮 */ closeDialog() { this.$emit("close"); if (this.beforeClose) return; this.popup.close(); }, close() { this.popup.close(); } } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-dialog" }, [ vue.createElementVNode("view", { class: "uni-dialog-title" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["uni-dialog-title-text", ["uni-popup__" + $data.dialogType]]) }, vue.toDisplayString($options.titleText), 3 /* TEXT, CLASS */ ) ]), $props.mode === "base" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-dialog-content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "uni-dialog-content-text" }, vue.toDisplayString($props.content), 1 /* TEXT */ ) ], true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uni-dialog-content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.withDirectives(vue.createElementVNode("input", { class: "uni-dialog-input", maxlength: $props.maxlength, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.val = $event), type: $props.inputType, placeholder: $options.placeholderText, focus: $props.focus }, null, 8, ["maxlength", "type", "placeholder", "focus"]), [ [vue.vModelDynamic, $data.val] ]) ], true) ])), vue.createElementVNode("view", { class: "uni-dialog-button-group" }, [ $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-dialog-button", onClick: _cache[1] || (_cache[1] = (...args) => $options.closeDialog && $options.closeDialog(...args)) }, [ vue.createElementVNode( "text", { class: "uni-dialog-button-text" }, vue.toDisplayString($options.closeText), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-dialog-button", $props.showClose ? "uni-border-left" : ""]), onClick: _cache[2] || (_cache[2] = (...args) => $options.onOk && $options.onOk(...args)) }, [ vue.createElementVNode( "text", { class: "uni-dialog-button-text uni-button-color" }, vue.toDisplayString($options.okText), 1 /* TEXT */ ) ], 2 /* CLASS */ ) ]) ]); } const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-d78c88b7"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]); const _imports_1$2 = "/static/dian1.png"; const _imports_2$2 = "/static/dian2.png"; const _imports_3$3 = "/static/che.png"; const _imports_4$2 = "/static/y8.png"; const _imports_5 = "/static/y6.png"; const _imports_6 = "/static/SOC.png"; const _imports_7 = "/static/Battery.png"; const _imports_8 = "/static/setup.png"; const _imports_1$1 = "/static/home.png"; const _imports_10 = "/static/home1.png"; const _sfc_main$9 = { components: { cmdProgress: __easycom_0$1 }, data() { return { successtype: "success", confirmText: "确认启动", title: "你确定要开启该设备吗?", content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!", value: "", modeinput: "", segmented: 1, uidatas: "", formatTimeid: "", faultsdata: [] }; }, onLoad() { this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status"]), ...mapState({ uidatasdata: (state2) => state2.uidatasdata }) }, mounted() { this.onfaultsdata(); }, beforeUnmount() { if (this.scrollInterval) { clearInterval(this.scrollInterval); } }, watch: { uidatasdata: { handler(newVal, oldVal) { formatAppLog("log", "at pages/home/index.vue:669", "uidatasdata 发生变化:", newVal); this.handleDataChange(newVal); }, deep: true // 监听深层次的变化 } }, methods: { handleDataChange(newData) { formatAppLog("log", "at pages/home/index.vue:680", "数据变化处理:", newData); }, onfaultsdata() { let data = { page: 1, rows: 10, device: "", starttime: "", endtime: "", rt: 0, type: "故障" }; getfaultsList(data).then((res) => { formatAppLog("log", "at pages/home/index.vue:694", res); if (res.status == "ok") { this.faultsdata = res.data.list; } }); }, // 返回首页 onreturn() { uni.redirectTo({ url: "/pages/index/index" }); }, // 启动设备弹窗 dialogToggle() { this.modeinput = "base"; this.successtype = "success"; this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); this.$refs.alertDialog.open(); }, onstopit() { this.modeinput = "base"; this.successtype = "error"; this.confirmText = this.$t("ConfirmStop"); this.title = this.$t("popUpTitleStop"); this.content = this.$t("popUpContentStop"); this.$refs.alertDialog.open(); }, onpower() { this.modeinput = "input"; this.title = this.$t("ACinputpowergiven"); this.confirmText = this.$t("confirm"); this.$refs.alertDialog.open(); }, // this.uidatasdata.AC_In_380V_63A1_Status==0 // this.messageText = '需将AC输出端63A1的开关手动断开' // this.$refs.message.open() // this.uidatasdata.AC_In_380V_63A2_Status==0 // this.messageText = '需将AC输出端63A2的开关手动断开' // this.$refs.message.open() // 确定 dialogConfirm() { let data = {}; if (this.title == this.$t("ACinputpowergiven")) { data = { id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa", issaveinitvalue: false, value: this.value }; } else { data = { id: "c35c4db0-113f-442a-9e26-728489265fdb", issaveinitvalue: false, value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0" }; } let uidatasdata = this.$store.state.uidatasdata; if (this.confirmText == this.$t("ConfirmStart")) { if (uidatasdata.AC_Out_380V_125A_Status == 0 || uidatasdata.AC_Out_380V_63A_Status == 0 || uidatasdata.AC_Out_220V_16A_Status == 0) { this.messageText = this.$t("ACRechargeelectricitytext"); this.$refs.message.open(); return; } } control(data).then((data2) => { formatAppLog("log", "at pages/home/index.vue:766", data2); if (data2.status == "ok") { if (this.title == this.$t("ACinputpowergiven")) { plus.navigator.hideSystemNavigation(); } this.$refs.alertDialog.close(); uni.showToast({ title: this.$t("OperationSuccessful"), icon: "none", duration: 2e3 // 显示时长,单位为毫秒 }); } else { this.$refs.alertDialog.close(); uni.showToast({ title: this.$t("operationFailed"), icon: "none", // 使用 'none' 图标来表示失败 duration: 2e3 // 显示时长,单位为毫秒 }); } }); }, dialogClose() { if (this.title == this.$t("ACinputpowergiven")) { plus.navigator.hideSystemNavigation(); } this.$refs.alertDialog.close(); }, ontap(e2) { formatAppLog("log", "at pages/home/index.vue:796", e2); this.segmented = e2; } } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1); const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1); const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("view", { class: "parameter_left" }, [ vue.createElementVNode("view", { class: "parameter_left1" }, [ vue.createCommentVNode(" "), vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [ vue.createVNode(_component_cmd_progress, { type: "dashboard", percent: _ctx.uidatasdata.SOC ?? 0, "stroke-color": "#B0D0FF", "stroke-width": 6, width: 180, "stroke-shape": "square", showInfo: false }, null, 8, ["percent"]), vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [ vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%") ]), vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC") ]), vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [ vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [ vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"), vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%") ]) ]) ]), vue.createCommentVNode(' \r\n \r\n 0\r\n \r\n \r\n 100%\r\n \r\n ') ]), vue.createElementVNode("image", { class: "parameter_leftdian1", src: _imports_1$2, alt: "" }), vue.createElementVNode("view", { class: "parameter_lef2" }, [ vue.createElementVNode("image", { src: _imports_2$2, mode: "" }) ]), vue.createElementVNode("image", { class: "parameter_leftche", src: _imports_3$3, mode: "" }), vue.createCommentVNode(' '), vue.createCommentVNode(' '), vue.createCommentVNode(' '), vue.createElementVNode( "view", { class: "parameter_leftview" }, vue.toDisplayString(_ctx.$t("CommunicationRechargeInput")), 1 /* TEXT */ ), vue.createCommentVNode(' 交流供电 '), vue.createCommentVNode(' 直流补电 '), vue.createCommentVNode(' 直流供电 ') ]), vue.createElementVNode("view", { class: "parameter_right" }, [ vue.createElementVNode("view", { class: "parameter_righttop" }, [ vue.createElementVNode("view", { class: "parameter_1" }, [ vue.createElementVNode("view", { class: "parameter_2" }, [ vue.createElementVNode("view", { class: "parameter_3" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.AC_In_380V_63A1_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("state163A")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.AC_In_380V_63A1_Status == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "parameter_3" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.AC_In_380V_63A2_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("state63A2")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.AC_In_380V_63A2_Status == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ]) ]), vue.createElementVNode("view", { class: "parameter_SOC" }, [ vue.createElementVNode("image", { src: _imports_6, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "parameter_SOCright2" }, vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"), 1 /* TEXT */ ), vue.createTextVNode(), vue.createElementVNode("text", null, "%") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_Battery" }, [ vue.createElementVNode("image", { src: _imports_7, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("BatteryStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("fault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ChuShiHua")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("NotupyetVoltage")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("HighVoltageMedium")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("voltagehasbeen")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("Underhighpressure")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")), vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_state" }, [ vue.createElementVNode("image", { src: _imports_8, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("SystemStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("uncharged")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("Chargingprogress")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("Chargingmalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("full")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 4 }, [ vue.createCommentVNode(` \r {{$t('Chargingstopped')}}\r `), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("retain")), 1 /* TEXT */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — ")) ]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_tap" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1)) }, vue.toDisplayString(_ctx.$t("exchangeinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2)) }, vue.toDisplayString(_ctx.$t("Batteryinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3)) }, vue.toDisplayString(_ctx.$t("statisticalinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4)) }, vue.toDisplayString(_ctx.$t("coolinginformation")), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "parameter_zheng", key: "index" }, [ $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageAV")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageBV")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageCV")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("Supplementarypower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }, [ vue.createCommentVNode(" A{{$t('PhaseCurrent')}} "), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("PhaseVoltageAA")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageBA")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageCA")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11", style: { "height": "30px" } }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }, [ vue.createCommentVNode(" {{$t('powerSupply')}} ") ]), vue.createCommentVNode(` \r {{uidatasdata.PCSACChargeEnergy??'—'}} kWh\r `) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createCommentVNode(` \r \r {{$t('Batterypower')}}\r \r \r {{uidatasdata.BatSysSt2_BatPower??'—'}} kW\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("TotalPressure")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowChargingPower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatteryCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createCommentVNode(` \r \r {{$t('TotalExternalPressure')}}\r \r \r {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} V\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowChargingCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng10" }, [ vue.createCommentVNode(` \r \r {{$t('AccumulatedChargingCapacityCommunication')}}\r \r \r {{uidatasdata.PCSACChargeEnergy??'—'}} kWh \r \r \r \r \r {{$t('AccumulatedDCChargingCapacity')}}\r \r \r {{uidatasdata.PCSDCDisChargeEnergy??'—'}} kWh \r \r `), vue.createElementVNode("view", { class: "parameter_zhengbox" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("RunningTimes")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createTextVNode(" 0.0 "), vue.createElementVNode( "text", { class: "parameter_zheng14" }, vue.toDisplayString(_ctx.$t("RunningTimesmin")), 1 /* TEXT */ ), vue.createTextVNode(), vue.createElementVNode("text") ]) ]), vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("InputCapacity")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createTextVNode(" 0.0 "), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"), vue.createTextVNode(), vue.createElementVNode("text") ]) ]), vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AccumulateInput")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createCommentVNode(` {{uidatasdata.PCSACChargeEnergy??'—'}} kWh `), vue.createTextVNode(" 0.0 "), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"), vue.createTextVNode(), vue.createElementVNode("text") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("WorkingMode")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} kW '), vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "), _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("OffMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("CoolingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("HeatingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("CirculatingMode")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("OutletTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('PowerDemand')}} ") ]), vue.createCommentVNode(` \r {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} kW\r `) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "), _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("DisconnectedState")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ClosedState")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("waterTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('FaultLevel')}} ") ]), vue.createCommentVNode(` \r \r \r {{$t('NoMalfunction')}}\r \r \r 1{{$t('LevelLault')}}\r \r \r 2{{$t('LevelLault')}}\r \r \r 3{{$t('LevelLault')}}\r \r \r —\r \r `) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "parameter_zheng3" }, [ _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_zheng31111", onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])), _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_zheng31111", onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng33" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])), vue.createElementVNode("view", { class: "parameter_zheng31111", onClick: _cache[6] || (_cache[6] = (...args) => $options.onpower && $options.onpower(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ _ctx.$t("power") == "功率" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_zheng34" }, [ vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("power")), 1 /* TEXT */ ), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("given")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_zheng34" }, [ vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("power")) + " " + vue.toDisplayString(_ctx.$t("given")), 1 /* TEXT */ ) ])) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_home" }, [ vue.createElementVNode("view", { class: "parameter_home1", onClick: _cache[7] || (_cache[7] = (...args) => $options.onreturn && $options.onreturn(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_hometext" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_home2" }, [ vue.createElementVNode("image", { src: _imports_10, mode: "" }), vue.createElementVNode("swiper", { class: "swiper", circular: "", autoplay: true, interval: 2e3, duration: 500, vertical: true }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.faultsdata, (item, index) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [ vue.createElementVNode( "view", { class: "parameter_home3" }, vue.toDisplayString(item["CONTENT"]), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]) ]), vue.createVNode( _component_uni_popup, { ref: "alertDialog" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_dialog, { mode: $data.modeinput, placeholder: _ctx.$t("powergiven") + "(0~80kW)", modelValue: $data.value, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.value = $event), focus: false, type: $data.successtype, cancelText: _ctx.$t("CancelReturn"), confirmText: $data.confirmText, beforeClose: true, title: $data.title, content: $data.content, onConfirm: $options.dialogConfirm, onClose: $options.dialogClose }, null, 8, ["mode", "placeholder", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), vue.createVNode( _component_uni_popup, { ref: "message", type: "message" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_message, { type: "error", message: _ctx.messageText, duration: 3e3 }, null, 8, ["message"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]); } const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-4978fed5"], ["__file", "D:/project/esswisdom_ipad/pages/home/index.vue"]]); const _sfc_main$8 = { props: { visible: Boolean, color: { type: String, default: "#303133" }, placement: { type: String, default: "top" }, content: { type: String, default: "" }, show: { type: Boolean, default: false } }, data() { return { isShow: this.visible, title: "Hello", arrowLeft: 0, query: null, style: {}, arrowStyle: {} }; }, onLoad() { }, watch: { isShow: { handler(val) { this.$emit("update:visible", val); }, immediate: true }, visible: { handler(val) { if (val) { this.$nextTick(() => { this.getPosition(); }); } this.isShow = val; }, immediate: true } }, mounted() { this.getPosition(); }, methods: { close() { this.isShow = false; }, fixedWrap() { this.isShow = false; }, async handleClick() { if (this.isShow) { return this.isShow = false; } await this.getPosition(); this.isShow = true; }, getPosition() { return new Promise((resolve) => { uni.createSelectorQuery().in(this).selectAll(".zb_tooltip_content,.zb_tooltip__popper").boundingClientRect(async (data) => { let { left, bottom, right, top, width, height } = data[0]; let obj1 = data[1]; let objStyle = {}; let objStyle1 = {}; switch (this.placement) { case "top": if (obj1.width > width) { objStyle.left = `-${(obj1.width - width) / 2}px`; } else { objStyle.left = `${Math.abs(obj1.width - width) / 2}px`; } objStyle.bottom = `${height + 8}px`; objStyle1.left = obj1.width / 2 - 6 + "px"; break; case "top-start": objStyle.left = `0px`; objStyle.bottom = `${height + 8}px`; break; case "top-end": objStyle.right = `0px`; objStyle.bottom = `${height + 8}px`; objStyle1.right = `8px`; break; case "bottom": if (obj1.width > width) { objStyle.left = `-${(obj1.width - width) / 2}px`; } else { objStyle.left = `${Math.abs(obj1.width - width) / 2}px`; } objStyle.top = `${height + 8}px`; objStyle1.left = obj1.width / 2 - 6 + "px"; break; case "bottom-start": objStyle.left = `0px`; objStyle.top = `${height + 8}px`; objStyle1.left = `8px`; break; case "bottom-end": objStyle.right = `0px`; objStyle.top = `${height + 8}px`; objStyle1.right = `8px`; break; case "right": objStyle.left = `${width + 8}px`; if (obj1.height > height) { objStyle.top = `-${(obj1.height - height) / 2}px`; } else { objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`; } objStyle1.top = `${obj1.height / 2 - 6}px`; break; case "right-start": objStyle.left = `${width + 8}px`; objStyle.top = `0px`; objStyle1.top = `8px`; break; case "right-end": objStyle.left = `${width + 8}px`; objStyle.bottom = `0px`; objStyle1.bottom = `8px`; break; case "left": objStyle.right = `${width + 8}px`; if (obj1.height > height) { objStyle.top = `-${(obj1.height - height) / 2}px`; } else { objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`; } objStyle1.top = `${obj1.height / 2 - 6}px`; break; case "left-start": objStyle.right = `${width + 8}px`; objStyle.top = `0px`; objStyle1.top = `8px`; break; case "left-end": objStyle.right = `${width + 8}px`; objStyle.bottom = `0px`; objStyle1.bottom = `8px`; break; } this.style = objStyle; this.arrowStyle = objStyle1; resolve(); }).exec(); }); } } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "zb-tooltip", style: vue.normalizeStyle({ "--theme-bg-color": $props.color }) }, [ vue.createElementVNode("view", { class: "zb_tooltip_content", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.handleClick && $options.handleClick(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createElementVNode( "view", { class: "zb_tooltip__popper", onClick: vue.withModifiers(() => { }, ["stop"]), style: vue.normalizeStyle([$data.style, { visibility: $data.isShow ? "visible" : "hidden", color: $props.color === "white" ? "" : "#fff", boxShadow: $props.color === "white" ? "0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d" : "" }]) }, [ vue.renderSlot(_ctx.$slots, "content", {}, () => [ vue.createTextVNode( vue.toDisplayString($props.content), 1 /* TEXT */ ) ], true), vue.createElementVNode( "view", { class: vue.normalizeClass(["zb_popper__icon", [{ "zb_popper__up": $props.placement.indexOf("bottom") === 0, "zb_popper__arrow": $props.placement.indexOf("top") === 0, "zb_popper__right": $props.placement.indexOf("right") === 0, "zb_popper__left": $props.placement.indexOf("left") === 0 }]]), style: vue.normalizeStyle([$data.arrowStyle]) }, null, 6 /* CLASS, STYLE */ ) ], 4 /* STYLE */ ) ]) ], 4 /* STYLE */ ); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-13dad3a2"], ["__file", "D:/project/esswisdom_ipad/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue"]]); const en$1 = { "uni-pagination.prevText": "prev", "uni-pagination.nextText": "next", "uni-pagination.piecePerPage": "piece/page" }; const es = { "uni-pagination.prevText": "anterior", "uni-pagination.nextText": "prxima", "uni-pagination.piecePerPage": "Art��culo/P��gina" }; const fr = { "uni-pagination.prevText": "précédente", "uni-pagination.nextText": "suivante", "uni-pagination.piecePerPage": "Articles/Pages" }; const zhHans$1 = { "uni-pagination.prevText": "上一页", "uni-pagination.nextText": "下一页", "uni-pagination.piecePerPage": "条/页" }; const zhHant$1 = { "uni-pagination.prevText": "上一頁", "uni-pagination.nextText": "下一頁", "uni-pagination.piecePerPage": "條/頁" }; const messages$1 = { en: en$1, es, fr, "zh-Hans": zhHans$1, "zh-Hant": zhHant$1 }; const { t } = initVueI18n(messages$1); const _sfc_main$7 = { name: "UniPagination", emits: ["update:modelValue", "input", "change", "pageSizeChange"], props: { value: { type: [Number, String], default: 1 }, modelValue: { type: [Number, String], default: 1 }, prevText: { type: String }, nextText: { type: String }, piecePerPageText: { type: String }, current: { type: [Number, String], default: 1 }, total: { // 数据总量 type: [Number, String], default: 0 }, pageSize: { // 每页数据量 type: [Number, String], default: 10 }, showIcon: { // 是否以 icon 形式展示按钮 type: [Boolean, String], default: false }, showPageSize: { // 是否以 icon 形式展示按钮 type: [Boolean, String], default: false }, pagerCount: { type: Number, default: 5 }, pageSizeRange: { type: Array, default: () => [20, 50, 100, 500] } }, data() { return { pageSizeIndex: 0, currentIndex: 1, paperData: [], pickerShow: false }; }, computed: { piecePerPage() { return this.piecePerPageText || t("uni-pagination.piecePerPage"); }, prevPageText() { return this.prevText || t("uni-pagination.prevText"); }, nextPageText() { return this.nextText || t("uni-pagination.nextText"); }, maxPage() { let maxPage = 1; let total = Number(this.total); let pageSize = Number(this.pageSize); if (total && pageSize) { maxPage = Math.ceil(total / pageSize); } return maxPage; }, paper() { const num = this.currentIndex; const pagerCount = this.pagerCount; const total = this.total; const pageSize = this.pageSize; let totalArr = []; let showPagerArr = []; let pagerNum = Math.ceil(total / pageSize); for (let i2 = 0; i2 < pagerNum; i2++) { totalArr.push(i2 + 1); } showPagerArr.push(1); const totalNum = totalArr[totalArr.length - (pagerCount + 1) / 2]; totalArr.forEach((item, index) => { if ((pagerCount + 1) / 2 >= num) { if (item < pagerCount + 1 && item > 1) { showPagerArr.push(item); } } else if (num + 2 <= totalNum) { if (item > num - (pagerCount + 1) / 2 && item < num + (pagerCount + 1) / 2) { showPagerArr.push(item); } } else { if ((item > num - (pagerCount + 1) / 2 || pagerNum - pagerCount < item) && item < totalArr[totalArr.length - 1]) { showPagerArr.push(item); } } }); if (pagerNum > pagerCount) { if ((pagerCount + 1) / 2 >= num) { showPagerArr[showPagerArr.length - 1] = "..."; } else if (num + 2 <= totalNum) { showPagerArr[1] = "..."; showPagerArr[showPagerArr.length - 1] = "..."; } else { showPagerArr[1] = "..."; } showPagerArr.push(totalArr[totalArr.length - 1]); } else { if ((pagerCount + 1) / 2 >= num) ; else if (num + 2 <= totalNum) ; else { showPagerArr.shift(); showPagerArr.push(totalArr[totalArr.length - 1]); } } return showPagerArr; } }, watch: { current: { immediate: true, handler(val, old) { if (val < 1) { this.currentIndex = 1; } else { this.currentIndex = val; } } }, value: { immediate: true, handler(val) { if (Number(this.current) !== 1) return; if (val < 1) { this.currentIndex = 1; } else { this.currentIndex = val; } } }, pageSizeIndex(val) { this.$emit("pageSizeChange", this.pageSizeRange[val]); } }, methods: { pickerChange(e2) { this.pageSizeIndex = e2.detail.value; this.pickerClick(); }, pickerClick() { }, // 选择标签 selectPage(e2, index) { if (parseInt(e2)) { this.currentIndex = e2; this.change("current"); } else { let pagerNum = Math.ceil(this.total / this.pageSize); if (index <= 1) { if (this.currentIndex - 5 > 1) { this.currentIndex -= 5; } else { this.currentIndex = 1; } return; } if (index >= 6) { if (this.currentIndex + 5 > pagerNum) { this.currentIndex = pagerNum; } else { this.currentIndex += 5; } return; } } }, clickLeft() { if (Number(this.currentIndex) === 1) { return; } this.currentIndex -= 1; this.change("prev"); }, clickRight() { if (Number(this.currentIndex) >= this.maxPage) { return; } this.currentIndex += 1; this.change("next"); }, change(e2) { this.$emit("input", this.currentIndex); this.$emit("update:modelValue", this.currentIndex); this.$emit("change", { type: e2, current: this.currentIndex }); } } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2); return vue.openBlock(), vue.createElementBlock("view", { class: "box" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "uni-pagination" }, [ $props.showPageSize === true || $props.showPageSize === "true" ? (vue.openBlock(), vue.createElementBlock("picker", { key: 0, class: "select-picker", mode: "selector", value: $data.pageSizeIndex, range: $props.pageSizeRange, onChange: _cache[0] || (_cache[0] = (...args) => $options.pickerChange && $options.pickerChange(...args)), onCancel: _cache[1] || (_cache[1] = (...args) => $options.pickerClick && $options.pickerClick(...args)), onClick: _cache[2] || (_cache[2] = (...args) => $options.pickerClick && $options.pickerClick(...args)) }, [ vue.createElementVNode("button", { type: "default", size: "mini", plain: true }, [ vue.createElementVNode( "text", null, vue.toDisplayString($props.pageSizeRange[$data.pageSizeIndex]) + " " + vue.toDisplayString($options.piecePerPage), 1 /* TEXT */ ), vue.createVNode(_component_uni_icons, { class: "select-picker-icon", type: "arrowdown", size: "12", color: "#999" }) ]) ], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' 共 {{ total }} 条 '), vue.createElementVNode("view", { class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex === 1 ? "uni-pagination--disabled" : "uni-pagination--enabled"]), "hover-class": $data.currentIndex === 1 ? "" : "uni-pagination--hover", "hover-start-time": 20, "hover-stay-time": 70, onClick: _cache[3] || (_cache[3] = (...args) => $options.clickLeft && $options.clickLeft(...args)) }, [ $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createVNode(_component_uni_icons, { color: "#666", size: "24", type: "left" }), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("LastPage")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "uni-pagination__child-btn" }, vue.toDisplayString($options.prevPageText), 1 /* TEXT */ )) ], 10, ["hover-class"]), vue.createElementVNode("view", { class: "uni-pagination__num uni-pagination__num-flex-none" }, [ vue.createElementVNode("view", { class: "uni-pagination__num-current" }, [ vue.createElementVNode( "text", { class: "uni-pagination__num-current-text is-pc-hide current-index-text" }, vue.toDisplayString($data.currentIndex), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "uni-pagination__num-current-text is-pc-hide" }, "/" + vue.toDisplayString($options.maxPage || 0), 1 /* TEXT */ ), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.paper, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: vue.normalizeClass([{ "page--active": item === $data.currentIndex }, "uni-pagination__num-tag tag--active is-phone-hide"]), onClick: ($event) => $options.selectPage(item, index) }, [ vue.createElementVNode( "view", { class: "uni-pagination__num-tagwight" }, vue.toDisplayString(item), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex >= $options.maxPage ? "uni-pagination--disabled" : "uni-pagination--enabled"]), "hover-class": $data.currentIndex === $options.maxPage ? "" : "uni-pagination--hover", "hover-start-time": 20, "hover-stay-time": 70, onClick: _cache[4] || (_cache[4] = (...args) => $options.clickRight && $options.clickRight(...args)) }, [ $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("NextPage")) + " ", 1 /* TEXT */ ), vue.createVNode(_component_uni_icons, { color: "#666", size: "24", type: "right" }) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "uni-pagination__child-btn" }, vue.toDisplayString($options.nextPageText), 1 /* TEXT */ )) ], 10, ["hover-class"]) ]) ]); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-88b7506d"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue"]]); const _imports_2$1 = "/static/Return.png"; const _sfc_main$6 = { data() { return { current: 1, total: 0, pageSize: 10, faulttaps: "实时", faultsList: [] }; }, onLoad() { this.faulttaps = this.$store.state.event; this.onfaultsList(); }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status", "event"]) }, beforeUnmount() { }, methods: { onfaultsList() { let data = { page: this.current, rows: this.pageSize, device: "", starttime: "", endtime: "", rt: 0, type: this.faulttaps }; getfaultsList(data).then((res) => { formatAppLog("log", "at pages/details/index.vue:165", res); if (res.status == "ok") { this.faultsList = res.data.list; this.total = res.data.pagination.total; } }); }, onclick() { uni.redirectTo({ url: "/pages/index/index" }); }, onReturn() { uni.redirectTo({ url: "/pages/faultlist/index" }); }, change(e2) { formatAppLog("log", "at pages/details/index.vue:188", e2); this.current = e2.current; this.onfaultsList(); }, // taps(e) { // this.faulttaps = e // this.current = 1 // __f__('log','at pages/details/index.vue:195',e); // this.onfaultsList() // }, // 文字提示 closedevice() { for (let i2 = 1; i2 < this.total; i2++) { this.$refs["device" + i2].close(); } }, close() { for (let i2 = 1; i2 < this.total; i2++) { this.$refs["tooltip" + i2].close(); } } } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { const _component_zb_tooltip = resolveEasycom(vue.resolveDynamicComponent("zb-tooltip"), __easycom_0); const _component_uni_pagination = resolveEasycom(vue.resolveDynamicComponent("uni-pagination"), __easycom_1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createCommentVNode(' '), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("view", { class: "parameter_xian" }, [ vue.createElementVNode( "view", { class: "parameter_xian1" }, vue.toDisplayString(_ctx.$t("formNO")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "parameter_xian2" }, vue.toDisplayString(_ctx.$t("formUnit")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "parameter_xian3" }, vue.toDisplayString(_ctx.$t("formDescription")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "parameter_xian4" }, vue.toDisplayString(_ctx.$t("formFailure")), 1 /* TEXT */ ), vue.createCommentVNode(' \r\n 发生时间\r\n '), _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_xian6" }, vue.toDisplayString(_ctx.$t("formRecover")), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "parameter_box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.faultsList, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(item.RESETTIME == "" && _ctx.event != "事件" ? "parameter_divred" : "parameter_div"), key: index }, [ vue.createElementVNode( "view", { class: "parameter_xian1" }, vue.toDisplayString(item.ID), 1 /* TEXT */ ), vue.createCommentVNode(' \r\n {{item.TYPE}}\r\n '), vue.createVNode(_component_zb_tooltip, { onClick: $options.close, content: item.DEVICE, placement: "top", ref_for: true, ref: "tooltip" + index }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "parameter_xian4" }, vue.toDisplayString(item.DEVICE), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1032, ["onClick", "content"]), vue.createVNode(_component_zb_tooltip, { onClick: $options.closedevice, content: item.CONTENT, placement: "top", ref_for: true, ref: "device" + index }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "parameter_xian3" }, vue.toDisplayString(item.CONTENT), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1032, ["onClick", "content"]), vue.createElementVNode( "view", { class: "parameter_xian5" }, vue.toDisplayString(item.FAULTTIME.substring(0, 19)), 1 /* TEXT */ ), _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_xian6" }, vue.toDisplayString(item.RESETTIME.substring(0, 19)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "parameter_bottom" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", { class: "parameter_bottom1", onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_bottom2" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_bottom11", onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args)) }, [ vue.createElementVNode("image", { src: _imports_2$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_bottom2" }, vue.toDisplayString(_ctx.$t("Return")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(` \r \r 实时\r \r \r \r 故障\r \r \r 告警\r \r \r 事件\r \r `), vue.createElementVNode("view", { class: "parameter_bottom4" }, [ vue.createElementVNode( "view", { class: "eliminate" }, vue.toDisplayString(_ctx.$t("FaultClearing")), 1 /* TEXT */ ), vue.createVNode(_component_uni_pagination, { total: $data.total, current: $data.current, title: "标题文字", "show-icon": true, onChange: $options.change }, null, 8, ["total", "current", "onChange"]) ]) ]) ]) ]); } const PagesDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-a45dfdea"], ["__file", "D:/project/esswisdom_ipad/pages/details/index.vue"]]); const _imports_3$2 = "/static/fang.png"; const _sfc_main$5 = { components: { cmdProgress: __easycom_0$1 }, data() { return { successtype: "success", confirmText: "确认启动", title: "你确定要开启该设备吗?", content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!", value: "", modeinput: "", segmented: 1, uidatas: "", formatTimeid: "", faultsdata: [], messageText: "" }; }, onLoad() { this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status"]), ...mapState({ uidatasdata: (state2) => state2.uidatasdata }) }, mounted() { this.onfaultsdata(); }, beforeUnmount() { }, methods: { onfaultsdata() { let data = { page: 1, rows: 10, device: "", starttime: "", endtime: "", rt: 0, type: "故障" }; getfaultsList(data).then((res) => { formatAppLog("log", "at pages/electricity/index.vue:634", res); if (res.status == "ok") { this.faultsdata = res.data.list; } }); }, // 返回首页 onreturn() { uni.redirectTo({ url: "/pages/index/index" }); }, // 启动设备弹窗 dialogToggle() { this.modeinput = "base"; this.successtype = "success"; this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); this.$refs.alertDialog.open(); }, onstopit() { this.modeinput = "base"; this.successtype = "error"; this.confirmText = this.$t("ConfirmStop"); this.title = this.$t("popUpTitleStop"); this.content = this.$t("popUpContentStop"); this.$refs.alertDialog.open(); }, // 确认弹窗 dialogConfirm() { let uidatasdata = this.$store.state.uidatasdata; let data = { id: "c35c4db0-113f-442a-9e26-728489265fdb", issaveinitvalue: false, value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0" }; if (this.confirmText == this.$t("ConfirmStart")) { if (uidatasdata.AC_In_380V_63A1_Status == 0 || uidatasdata.AC_In_380V_63A2_Status == 0) { this.messageText = this.$t("ACpowerSupplytext"); this.$refs.message.open(); return; } } control(data).then((data2) => { if (data2.status == "ok") { this.$refs.alertDialog.close(); uni.showToast({ title: this.$t("OperationSuccessful"), icon: "none", duration: 2e3 // 显示时长,单位为毫秒 }); } else { this.$refs.alertDialog.close(); uni.showToast({ title: this.$t("operationFailed"), icon: "none", // 使用 'none' 图标来表示失败 duration: 2e3 // 显示时长,单位为毫秒 }); } }); }, dialogClose() { formatAppLog("log", "at pages/electricity/index.vue:706", this.value); this.$refs.alertDialog.close(); }, ontap(e2) { formatAppLog("log", "at pages/electricity/index.vue:710", e2); this.segmented = e2; } } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1); const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1); const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("view", { class: "parameter_left" }, [ vue.createElementVNode("view", { class: "parameter_left1" }, [ vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [ vue.createVNode(_component_cmd_progress, { type: "dashboard", percent: _ctx.uidatasdata.SOC ?? 0, "stroke-color": "#B0D0FF", "stroke-width": 6, width: 180, "stroke-shape": "square", showInfo: false }, null, 8, ["percent"]), vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [ vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%") ]), vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC") ]), vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [ vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [ vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"), vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%") ]) ]) ]), vue.createCommentVNode(' \r\n \r\n \r\n 0\r\n \r\n \r\n 100%\r\n \r\n ') ]), vue.createElementVNode("image", { class: "parameter_leftdian1", src: _imports_1$2, alt: "" }), vue.createElementVNode("view", { class: "parameter_lef2" }, [ vue.createElementVNode("image", { src: _imports_2$2, mode: "" }) ]), vue.createElementVNode("image", { class: "parameter_leftche1", src: _imports_3$2, mode: "" }), vue.createElementVNode( "view", { class: "parameter_leftview" }, vue.toDisplayString(_ctx.$t("CommunicationSupplyOutput")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_right" }, [ vue.createElementVNode("view", { class: "parameter_righttop" }, [ vue.createElementVNode("view", { class: "parameter_1" }, [ vue.createElementVNode("view", { class: "parameter_2" }, [ vue.createElementVNode("view", { class: "parameter_31" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.AC_Out_380V_125A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("state125A")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.AC_Out_380V_125A_Status == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "parameter_31" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.AC_Out_380V_63A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("state63A")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.AC_Out_380V_63A_Status == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "parameter_31" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.AC_Out_220V_16A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("state16A")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.AC_Out_220V_16A_Status == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ]) ]), vue.createElementVNode("view", { class: "parameter_SOC" }, [ vue.createElementVNode("image", { src: _imports_6, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "parameter_SOCright2" }, vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", null, " %") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_Battery" }, [ vue.createElementVNode("image", { src: _imports_7, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("BatteryStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("fault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ChuShiHua")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("NotupyetVoltage")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("HighVoltageMedium")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("voltagehasbeen")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("Underhighpressure")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")), vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_state" }, [ vue.createElementVNode("image", { src: _imports_8, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("SystemStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("uncharged")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("Chargingprogress")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("Chargingmalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("full")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("retain")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — ")) ]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_tap" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1)) }, vue.toDisplayString(_ctx.$t("exchangeinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2)) }, vue.toDisplayString(_ctx.$t("Batteryinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3)) }, vue.toDisplayString(_ctx.$t("statisticalinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4)) }, vue.toDisplayString(_ctx.$t("coolinginformation")), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "parameter_zheng" }, [ $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageAV")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageBV")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageCV")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("DischargePower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageAA")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageBA")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("PhaseVoltageCA")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11", style: { "height": "30px" } }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }, [ vue.createCommentVNode(" {{$t('DischargeCapacity')}} ") ]), vue.createCommentVNode(` \r {{uidatasdata.PCSACDisChargeEnergy??'—'}} kWh\r `) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createCommentVNode(` \r \r {{$t('Batterypower')}}\r \r \r {{uidatasdata.BatSysSt2_BatPower??'—'}} kW\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("TotalPressure")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowableDischargepower")), 1 /* TEXT */ ), vue.createCommentVNode(" DchChgCurPowLimit_MaxDischargeCurrentLimit "), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatteryCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createCommentVNode(` \r \r {{$t('TotalExternalPressure')}}\r \r \r {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} V\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createCommentVNode(" {{uidatasdata.ChargingInformation_Chg_Max_Cur??'—'}} \r \r {{$t('AccumulatedChargingCapacityCommunication')}}\r \r \r {{uidatasdata.PCSACChargeEnergy??'—'}} kW \r \r \r \r \r {{$t('AccumulatedDCChargingCapacity')}}\r \r \r {{uidatasdata.PCSDCDisChargeEnergy??'—'}} V \r \r `), vue.createElementVNode("view", { class: "parameter_zhengbox" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("RunningTimesdischarge")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createTextVNode(" 0.0 "), vue.createElementVNode( "text", { class: "parameter_zheng14" }, vue.toDisplayString(_ctx.$t("RunningTimesmin")), 1 /* TEXT */ ), vue.createTextVNode(), vue.createElementVNode("text") ]) ]), vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("InputCapacitydischarge")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createTextVNode(" 0.0 "), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"), vue.createTextVNode(), vue.createElementVNode("text") ]) ]), vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AccumulateInputdischarge")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createCommentVNode(` {{uidatasdata.PCSDCDisChargeEnergy??'—'}} kWh `), vue.createTextVNode(" 0.0 "), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"), vue.createTextVNode(), vue.createElementVNode("text") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("WorkingMode")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} kW '), vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "), _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("OffMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("CoolingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("HeatingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("CirculatingMode")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("OutletTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('PowerDemand')}} ") ]), vue.createCommentVNode(` \r {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} kW\r `) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "), _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("DisconnectedState")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ClosedState")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("waterTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('FaultLevel')}} ") ]), vue.createCommentVNode(` \r \r \r {{$t('NoMalfunction')}}\r \r \r 1{{$t('LevelLault')}}\r \r \r 2{{$t('LevelLault')}}\r \r \r 3{{$t('LevelLault')}}\r \r \r —\r \r `) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "parameter_zheng3" }, [ _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_zheng31111", onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])), _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_zheng31111", onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng33" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) ]) ]), vue.createElementVNode("view", { class: "parameter_home" }, [ vue.createElementVNode("view", { class: "parameter_home1", onClick: _cache[6] || (_cache[6] = (...args) => $options.onreturn && $options.onreturn(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_hometext" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_home2" }, [ vue.createElementVNode("image", { src: _imports_10, mode: "" }), vue.createElementVNode("swiper", { class: "swiper", circular: "", autoplay: true, interval: 2e3, duration: 500, vertical: true }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.faultsdata, (item, index) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [ vue.createElementVNode( "view", { class: "parameter_home3" }, vue.toDisplayString(item["CONTENT"]), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]) ]), vue.createVNode( _component_uni_popup, { ref: "alertDialog" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_dialog, { mode: $data.modeinput, placeholder: "请输入内容", modelValue: $data.value, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.value = $event), type: $data.successtype, cancelText: _ctx.$t("CancelReturn"), confirmText: $data.confirmText, title: $data.title, content: $data.content, beforeClose: true, onConfirm: $options.dialogConfirm, onClose: $options.dialogClose }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), vue.createVNode( _component_uni_popup, { ref: "message", type: "message" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_message, { type: "error", message: $data.messageText, duration: 3e3 }, null, 8, ["message"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]); } const PagesElectricityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-a9482145"], ["__file", "D:/project/esswisdom_ipad/pages/electricity/index.vue"]]); const _imports_4$1 = "/static/shan.png"; const _sfc_main$4 = { components: { cmdProgress: __easycom_0$1 }, data() { return { successtype: "success", confirmText: "确认启动", title: "你确定要开启该设备吗?", content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!", value: "", modeinput: "", segmented: 1, uidatas: "", formatTimeid: "", faultsdata: [] }; }, onLoad() { this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status"]), ...mapState({ uidatasdata: (state2) => state2.uidatasdata }) }, mounted() { this.onfaultsdata(); }, beforeUnmount() { }, methods: { onfaultsdata() { let data = { page: 1, rows: 10, device: "", starttime: "", endtime: "", rt: 0, type: "故障" }; getfaultsList(data).then((res) => { formatAppLog("log", "at pages/supply/supply.vue:649", res); if (res.status == "ok") { this.faultsdata = res.data.list; } }); }, // 返回首页 onreturn() { uni.redirectTo({ url: "/pages/index/index" }); }, // 启动设备弹窗 dialogToggle() { this.modeinput = "base"; this.successtype = "success"; this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); this.$refs.alertDialog.open(); }, onstopit() { this.modeinput = "base"; this.successtype = "error"; this.confirmText = this.$t("ConfirmStop"); this.title = this.$t("popUpTitleStop"); this.content = this.$t("popUpContentStop"); this.$refs.alertDialog.open(); }, // 确认弹窗 dialogConfirm() { let data = { id: "c35c4db0-113f-442a-9e26-728489265fdb", issaveinitvalue: false, value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0" }; control(data).then((data2) => { if (data2.status == "ok") { uni.showToast({ title: this.$t("OperationSuccessful"), icon: "none", duration: 2e3 // 显示时长,单位为毫秒 }); } else { uni.showToast({ title: this.$t("operationFailed"), icon: "none", // 使用 'none' 图标来表示失败 duration: 2e3 // 显示时长,单位为毫秒 }); } }); }, dialogClose() { formatAppLog("log", "at pages/supply/supply.vue:709", this.value); this.$refs.alertDialog.close(); }, ontap(e2) { formatAppLog("log", "at pages/supply/supply.vue:713", e2); this.segmented = e2; } } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1); const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("view", { class: "parameter_left" }, [ vue.createElementVNode("view", { class: "parameter_left1" }, [ vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [ vue.createVNode(_component_cmd_progress, { type: "dashboard", percent: _ctx.uidatasdata.SOC ?? 0, "stroke-color": "#B0D0FF", "stroke-width": 6, width: 180, "stroke-shape": "square", showInfo: false }, null, 8, ["percent"]), vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [ vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%") ]), vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC") ]), vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [ vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [ vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"), vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%") ]) ]) ]), vue.createCommentVNode(' \r\n \r\n \r\n 0\r\n \r\n \r\n 100%\r\n \r\n ') ]), vue.createElementVNode("image", { class: "parameter_leftdian1", src: _imports_1$2, alt: "" }), vue.createElementVNode("view", { class: "parameter_lef2" }, [ vue.createElementVNode("image", { src: _imports_2$2, mode: "" }) ]), vue.createElementVNode("image", { class: "parameter_leftche", src: _imports_3$3, mode: "" }), vue.createElementVNode( "view", { class: "parameter_leftview" }, vue.toDisplayString(_ctx.$t("DirectRechargeInput")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_right" }, [ vue.createElementVNode("view", { class: "parameter_righttop" }, [ vue.createElementVNode("view", { class: "parameter_1" }, [ vue.createElementVNode("view", { class: "parameter_shan" }, [ vue.createElementVNode("image", { src: _imports_4$1, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("ChargingPower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createElementVNode( "text", { class: "parameter_SOCright2" }, vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatPower ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", null, " kW") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_SOC" }, [ vue.createElementVNode("image", { src: _imports_6, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "parameter_SOCright2" }, vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", null, " %") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_Battery" }, [ vue.createElementVNode("image", { src: _imports_7, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("BatteryStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("fault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ChuShiHua")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("NotupyetVoltage")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("HighVoltageMedium")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("voltagehasbeen")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("Underhighpressure")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")), vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_state" }, [ vue.createElementVNode("image", { src: _imports_8, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("SystemStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "), vue.createCommentVNode(' \r\n 无连接\r\n \r\n \r\n 快充连接\r\n '), _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("uncharged")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("Chargingprogress")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("Chargingmalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("full")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("Chargingstopped")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("retain")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")) ]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_tap" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1)) }, vue.toDisplayString(_ctx.$t("Batteryinformation")), 3 /* TEXT, CLASS */ ), vue.createCommentVNode(` \r {{$t('ConnectionInformation')}}\r `), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(3)) }, vue.toDisplayString(_ctx.$t("statisticalinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(4)) }, vue.toDisplayString(_ctx.$t("coolinginformation")), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "parameter_zheng" }, [ $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createCommentVNode(` \r \r {{$t('Batterypower')}}\r \r \r {{uidatasdata.BatSysSt2_BatPower??'—'}} KW\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("TotalPressure")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowChargingPower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "KW") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "v") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatteryCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createCommentVNode(` \r \r {{$t('TotalExternalPressure')}}\r \r \r {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} V\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowChargingCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, " A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, " v") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, " ℃") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("invalid")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("DischargeMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("pcsChargingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatterySystemStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("initialization")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("NotupyetVoltage")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("HighVoltageMedium")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("voltagehasbeen")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("Underhighpressure")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("fault")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_ChargeStatus==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("uncharged")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("Chargingprogress")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("Chargingmalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("full")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("retain")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — ")) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")), 1 /* TEXT */ ), _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_Batterystate1" }, vue.toDisplayString(_ctx.$t("FastChargingConnection")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_Batterystate1" }, vue.toDisplayString(_ctx.$t("NoConnection")), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12", style: { "height": "30px" } }, vue.toDisplayString(_ctx.$t("BatteryFaultLevel")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [ _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("NoMalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, " 1" + vue.toDisplayString(_ctx.$t("LevelLault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, " 2" + vue.toDisplayString(_ctx.$t("LevelLault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, " 3" + vue.toDisplayString(_ctx.$t("LevelLault")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng10" }, [ vue.createCommentVNode(` \r \r {{$t('AccumulatedChargingCapacityCommunication')}}\r \r \r {{uidatasdata.PCSACChargeEnergy??'—'}} kWh \r \r \r \r \r {{$t('AccumulatedDCChargingCapacity')}}\r \r \r {{uidatasdata.PCSDCDisChargeEnergy??'—'}} kWh \r \r `), vue.createElementVNode("view", { class: "parameter_zhengbox" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("RunningTimes")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createTextVNode(" 0.0 "), vue.createElementVNode( "text", { class: "parameter_zheng14" }, vue.toDisplayString(_ctx.$t("RunningTimesmin")), 1 /* TEXT */ ), vue.createTextVNode(), vue.createElementVNode("text") ]) ]), vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("InputCapacity")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createTextVNode(" 0.0 "), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"), vue.createTextVNode(), vue.createElementVNode("text") ]) ]), vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AccumulateInput")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [ vue.createCommentVNode(` {{uidatasdata.PCSACChargeEnergy??'—'}} kWh `), vue.createTextVNode(" 0.0 "), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"), vue.createTextVNode(), vue.createElementVNode("text") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("WorkingMode")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} kW '), vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "), _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("OffMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("CoolingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("HeatingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("CirculatingMode")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("OutletTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('PowerDemand')}} ") ]), vue.createCommentVNode(` \r {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} kW\r `) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "), _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("DisconnectedState")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ClosedState")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("waterTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('FaultLevel')}} ") ]), vue.createCommentVNode(` \r \r {{$t('NoMalfunction')}}\r \r \r 1{{$t('LevelLault')}}\r \r \r 2{{$t('LevelLault')}}\r \r \r 3{{$t('LevelLault')}}\r \r \r —\r \r `) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "parameter_zheng3" }, [ _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_zheng31111", onClick: _cache[3] || (_cache[3] = (...args) => $options.dialogToggle && $options.dialogToggle(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])), _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_zheng31111", onClick: _cache[4] || (_cache[4] = (...args) => $options.onstopit && $options.onstopit(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng33" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) ]) ]), vue.createElementVNode("view", { class: "parameter_home" }, [ vue.createElementVNode("view", { class: "parameter_home1", onClick: _cache[5] || (_cache[5] = (...args) => $options.onreturn && $options.onreturn(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_hometext" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_home2" }, [ vue.createElementVNode("image", { src: _imports_10, mode: "" }), vue.createElementVNode("swiper", { class: "swiper", circular: "", autoplay: true, interval: 2e3, duration: 500, vertical: true }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.faultsdata, (item, index) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [ vue.createElementVNode( "view", { class: "parameter_home3" }, vue.toDisplayString(item["CONTENT"]), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]) ]), vue.createVNode( _component_uni_popup, { ref: "alertDialog" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_dialog, { mode: $data.modeinput, placeholder: "请输入内容", modelValue: $data.value, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.value = $event), type: $data.successtype, cancelText: _ctx.$t("CancelReturn"), confirmText: $data.confirmText, title: $data.title, content: $data.content, onConfirm: $options.dialogConfirm, onClose: $options.dialogClose }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]); } const PagesSupplySupply = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-80112fae"], ["__file", "D:/project/esswisdom_ipad/pages/supply/supply.vue"]]); const _imports_3$1 = "/static/che1.png"; const _sfc_main$3 = { components: { cmdProgress: __easycom_0$1 }, data() { return { successtype: "success", confirmText: "确认启动", title: "你确定要开启该设备吗?", content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!", value: "", modeinput: "", segmented: 1, ChargingStation: 1, faultsdata: [] }; }, onLoad() { this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status"]), ...mapState({ uidatasdata: (state2) => state2.uidatasdata }) }, mounted() { this.onfaultsdata(); }, beforeUnmount() { }, methods: { onfaultsdata() { let data = { page: 1, rows: 10, device: "", starttime: "", endtime: "", rt: 0, type: "故障" }; getfaultsList(data).then((res) => { formatAppLog("log", "at pages/supplyss/supplyss.vue:903", res); if (res.status == "ok") { this.faultsdata = res.data.list; } }); }, // 返回首页 onreturn() { uni.redirectTo({ url: "/pages/index/index" }); }, // 启动设备弹窗 dialogToggle() { this.modeinput = "base"; this.successtype = "success"; this.confirmText = this.$t("ConfirmStart"); this.title = this.$t("popUpTitle"); this.content = this.$t("popUpContent"); this.$refs.alertDialog.open(); }, // 关闭设备弹窗 onstopit() { this.modeinput = "base"; this.successtype = "error"; this.confirmText = this.$t("ConfirmStop"); this.title = this.$t("popUpTitleStop"); this.content = this.$t("popUpContentStop"); this.$refs.alertDialog.open(); }, // 确定 dialogConfirm() { let data = {}; if (this.segmented == 1) { data = { id: "3b26469f-ad5b-43bf-b715-4213921321d0", issaveinitvalue: false, value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0" }; } else if (this.segmented == 2) { data = { id: "78f59493-65f3-4860-8296-7f07bb0ca55b", issaveinitvalue: false, value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0" }; } else { data = { id: "c35c4db0-113f-442a-9e26-728489265fdb", issaveinitvalue: false, value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0" }; } control(data).then((data2) => { formatAppLog("log", "at pages/supplyss/supplyss.vue:960", data2); if (data2.status == "ok") { uni.showToast({ title: this.$t("OperationSuccessful"), icon: "none", duration: 2e3 // 显示时长,单位为毫秒 }); } else { uni.showToast({ title: this.$t("operationFailed"), icon: "none", // 使用 'none' 图标来表示失败 duration: 2e3 // 显示时长,单位为毫秒 }); } }); }, // 取消 dialogClose() { formatAppLog("log", "at pages/supplyss/supplyss.vue:979", this.value); this.$refs.alertDialog.close(); }, // 切换标签 ontap(e2) { formatAppLog("log", "at pages/supplyss/supplyss.vue:984", e2); this.segmented = e2; if (this.segmented == 1) { this.ChargingStation = 1; } else if (this.segmented == 2) { this.ChargingStation = 2; } } } }; function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1); const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1); const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createCommentVNode(' '), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("view", { class: "parameter_left" }, [ vue.createElementVNode("view", { class: "parameter_left1" }, [ vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [ vue.createVNode(_component_cmd_progress, { type: "dashboard", percent: _ctx.uidatasdata.SOC ?? 0, "stroke-color": "#B0D0FF", "stroke-width": 6, width: 180, "stroke-shape": "square", showInfo: false }, null, 8, ["percent"]), vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [ vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%") ]), vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC") ]), vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [ vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [ vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"), vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%") ]) ]) ]), vue.createCommentVNode(' \r\n \r\n \r\n 0\r\n \r\n \r\n 100% \r\n \r\n ') ]), vue.createElementVNode("image", { class: "parameter_leftdian1", src: _imports_1$2, alt: "" }), vue.createElementVNode("view", { class: "parameter_lef2" }, [ vue.createElementVNode("image", { src: _imports_2$2, mode: "" }) ]), vue.createElementVNode("image", { class: "parameter_leftche2", src: _imports_3$1, mode: "" }), vue.createElementVNode( "view", { class: "parameter_leftview" }, vue.toDisplayString(_ctx.$t("DirectSupplyOutput")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_right" }, [ vue.createElementVNode("view", { class: "parameter_righttop" }, [ vue.createElementVNode("view", { class: "parameter_1" }, [ vue.createElementVNode("view", { class: "parameter_2" }, [ $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_3" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_3" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")), 1 /* TEXT */ ) ]), _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_51" }, vue.toDisplayString(_ctx.$t("connect")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_5" }, vue.toDisplayString(_ctx.$t("breakoff")), 1 /* TEXT */ )) ])), $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_3" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("workingCondition")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("StandbyMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("work")), 1 /* TEXT */ )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("ChargingCompleted")), 1 /* TEXT */ )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("ChargingPause")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ])) : vue.createCommentVNode("v-if", true), $data.ChargingStation == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_3" }, [ vue.createElementVNode("view", { class: "parameter_4" }, [ _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_4$2, mode: "" })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_5, mode: "" })), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("workingCondition")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("StandbyMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("work")), 1 /* TEXT */ )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("ChargingCompleted")), 1 /* TEXT */ )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("ChargingPause")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]), vue.createCommentVNode(' \r\n 断开\r\n ') ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "parameter_SOC" }, [ vue.createElementVNode("image", { src: _imports_6, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "), vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "parameter_SOCright2" }, vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", null, "%") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_Battery" }, [ vue.createElementVNode("image", { src: _imports_7, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("BatteryStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("fault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ChuShiHua")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("NotupyetVoltage")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("HighVoltageMedium")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("voltagehasbeen")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("Underhighpressure")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")), vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_state" }, [ vue.createElementVNode("image", { src: _imports_8, mode: "" }), vue.createElementVNode("view", { class: "parameter_SOCright" }, [ vue.createElementVNode( "view", { class: "parameter_SOCright1" }, vue.toDisplayString(_ctx.$t("SystemStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("uncharged")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("Chargingprogress")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("Chargingmalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("full")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 4 }, [ vue.createCommentVNode(` \r {{$t('Chargingstopped')}}\r `), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("retain")), 1 /* TEXT */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — ")) ]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_tap" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1)) }, vue.toDisplayString(_ctx.$t("GunAinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2)) }, vue.toDisplayString(_ctx.$t("GunBinformation")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3)) }, vue.toDisplayString(_ctx.$t("Batteryinformation")), 3 /* TEXT, CLASS */ ), vue.createCommentVNode(` \r {{$t('ConnectionInformation')}}\r `), vue.createElementVNode( "view", { class: vue.normalizeClass($data.segmented == 5 ? "parameter_tap1" : "parameter_tap2"), onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(5)) }, vue.toDisplayString(_ctx.$t("coolinginformation")), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "parameter_zheng" }, [ $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("VehicleSOC")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_soc ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "%") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("CharingPower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingCapacity")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_ThisChargePower ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh") ]) ]), vue.createCommentVNode(` \r \r {{$t('ChargingFee')}}\r \r \r {{uidatasdata.ChargingStation_1_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r {{$t('USD')}}\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingTime")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "min") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }), vue.createElementVNode("view", { class: "parameter_zheng13" }) ]), vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }), vue.createElementVNode("view", { class: "parameter_zheng13" }) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("VehicleSOC")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_soc ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, " %") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("CharingPower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingCapacity")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_ThisChargePower ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh") ]) ]), vue.createCommentVNode(` \r \r {{$t('ChargingFee')}}\r \r \r \r {{uidatasdata.ChargingStation_2_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r {{$t('USD')}}\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingTime")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "min") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }), vue.createElementVNode("view", { class: "parameter_zheng13" }) ]), vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [ vue.createElementVNode("view", { class: "parameter_zheng12" }), vue.createElementVNode("view", { class: "parameter_zheng13" }) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createCommentVNode(` \r \r {{$t('Batterypower')}}\r \r \r {{uidatasdata.BatSysSt2_BatPower??'—'}} kW\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("TotalPressure")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowableDischargepower")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MaximumTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatteryCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createCommentVNode(` \r \r {{$t('TotalExternalPressure')}}\r \r \r \r {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} V\r \r `), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—"), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "A") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "V") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("invalid")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("DischargeMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("pcsChargingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatterySystemStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} "), _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("initialization")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("NotupyetVoltage")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("HighVoltageMedium")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("voltagehasbeen")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4 }, vue.toDisplayString(_ctx.$t("Underhighpressure")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5 }, vue.toDisplayString(_ctx.$t("fault")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("uncharged")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("Chargingprogress")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("Chargingmalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("full")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 4 }, [ vue.createCommentVNode(` \r {{$t('Chargingstopped')}}\r `), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.$t("retain")), 1 /* TEXT */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — ")) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng22" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")), 1 /* TEXT */ ), _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "parameter_Batterystate1" }, vue.toDisplayString(_ctx.$t("FastChargingConnection")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "parameter_Batterystate1" }, vue.toDisplayString(_ctx.$t("NoConnection")), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("BatteryFaultLevel")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [ vue.createCommentVNode(" {{uidatasdata.bms_BatteryFaultLevl==0.00?'无故障':'有效'}} "), _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("NoMalfunction")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, " 1" + vue.toDisplayString(_ctx.$t("LevelLault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, " 2" + vue.toDisplayString(_ctx.$t("LevelLault")), 1 /* TEXT */ )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, " 3" + vue.toDisplayString(_ctx.$t("LevelLault")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.segmented == 5 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "parameter_box" }, [ vue.createElementVNode("view", { class: "parameter_zheng1" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("WorkingMode")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} kW '), vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "), _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("OffMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("CoolingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2 }, vue.toDisplayString(_ctx.$t("HeatingMode")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3 }, vue.toDisplayString(_ctx.$t("CirculatingMode")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("OutletTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('PowerDemand')}} ") ]), vue.createCommentVNode(` \r {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} kW\r `) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng2" }, [ vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_Batterystate" }, [ vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "), _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(_ctx.$t("DisconnectedState")), 1 /* TEXT */ )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(_ctx.$t("ClosedState")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — ")) ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode( "view", { class: "parameter_zheng12" }, vue.toDisplayString(_ctx.$t("waterTemperature")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "parameter_zheng13" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃") ]) ]), vue.createElementVNode("view", { class: "parameter_zheng11" }, [ vue.createElementVNode("view", { class: "parameter_zheng12", style: { "height": "30px" } }, [ vue.createCommentVNode(" {{$t('FaultLevel')}} ") ]), vue.createCommentVNode(` \r \r \r {{$t('NoMalfunction')}}\r \r \r 1{{$t('LevelLault')}}\r \r \r 2{{$t('LevelLault')}}\r \r \r 3{{$t('LevelLault')}}\r \r \r —\r \r `) ]) ]) ])) : vue.createCommentVNode("v-if", true), this.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "parameter_zheng3" }, [ _ctx.uidatasdata.SysControl_Gun1RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_zheng31111", onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])), _ctx.uidatasdata.SysControl_Gun1RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_zheng31111", onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng33" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) ])) : vue.createCommentVNode("v-if", true), this.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "parameter_zheng3" }, [ _ctx.uidatasdata.SysControl_Gun2RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "parameter_zheng31111", onClick: _cache[6] || (_cache[6] = (...args) => $options.dialogToggle && $options.dialogToggle(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("open")), 1 /* TEXT */ ) ]) ])), _ctx.uidatasdata.SysControl_Gun2RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "parameter_zheng31111", onClick: _cache[7] || (_cache[7] = (...args) => $options.onstopit && $options.onstopit(...args)) }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng33" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "parameter_zheng31111" }, [ vue.createElementVNode("view", { class: "parameter_zheng31" }, [ vue.createElementVNode( "view", { class: "parameter_zheng32ccc" }, vue.toDisplayString(_ctx.$t("stopIt")), 1 /* TEXT */ ) ]) ])) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "parameter_home" }, [ vue.createElementVNode("view", { class: "parameter_home1", onClick: _cache[8] || (_cache[8] = (...args) => $options.onreturn && $options.onreturn(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_hometext" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_home2" }, [ vue.createElementVNode("image", { src: _imports_10, mode: "" }), vue.createElementVNode("swiper", { class: "swiper", circular: "", autoplay: true, interval: 2e3, duration: 500, vertical: true }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.faultsdata, (item, index) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [ vue.createElementVNode( "view", { class: "parameter_home3" }, vue.toDisplayString(item["CONTENT"]), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]) ]), vue.createVNode( _component_uni_popup, { ref: "alertDialog" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_popup_dialog, { mode: $data.modeinput, placeholder: "请输入内容", modelValue: $data.value, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.value = $event), type: $data.successtype, cancelText: _ctx.$t("CancelReturn"), confirmText: $data.confirmText, title: $data.title, content: $data.content, onConfirm: $options.dialogConfirm, onClose: $options.dialogClose }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]); } const PagesSupplyssSupplyss = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-0d60935b"], ["__file", "D:/project/esswisdom_ipad/pages/supplyss/supplyss.vue"]]); const _imports_1 = "/static/faultlist.png"; const _imports_2 = "/static/fault.png"; const _imports_3 = "/static/event.png"; const _imports_4 = "/static/Basics.png"; const _sfc_main$2 = { data() { return {}; }, onLoad() { }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status"]) }, beforeUnmount() { }, methods: { // 返回首页 onreturn(e2) { formatAppLog("log", "at pages/faultlist/index.vue:109", e2); this.$store.commit("getevent", e2); if (e2 == "基础") { uni.redirectTo({ url: "/pages/SYSifo/index" }); } else { uni.redirectTo({ url: "/pages/details/index" }); } }, onclick() { uni.redirectTo({ url: "/pages/index/index" }); } } }; function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createCommentVNode(' '), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("view", { class: "parameter_list" }, [ vue.createElementVNode("view", { class: "parameter_box", onClick: _cache[0] || (_cache[0] = ($event) => $options.onreturn("故障")) }, [ vue.createElementVNode("view", { class: "parameter_list1" }, [ vue.createElementVNode("image", { src: _imports_1, mode: "" }) ]), vue.createElementVNode( "view", { class: "fault_txt" }, vue.toDisplayString(_ctx.$t("FaultRec")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_box", onClick: _cache[1] || (_cache[1] = ($event) => $options.onreturn("告警")) }, [ vue.createElementVNode("view", { class: "parameter_list1" }, [ vue.createElementVNode("image", { src: _imports_2, mode: "" }) ]), vue.createElementVNode( "view", { class: "fault_txt" }, vue.toDisplayString(_ctx.$t("WarningRec")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_box", onClick: _cache[2] || (_cache[2] = ($event) => $options.onreturn("事件")) }, [ vue.createElementVNode("view", { class: "parameter_list1" }, [ vue.createElementVNode("image", { src: _imports_3, mode: "" }) ]), vue.createElementVNode( "view", { class: "fault_txt" }, vue.toDisplayString(_ctx.$t("RunningRec")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_box", onClick: _cache[3] || (_cache[3] = ($event) => $options.onreturn("基础")) }, [ vue.createElementVNode("view", { class: "parameter_list1" }, [ vue.createElementVNode("image", { src: _imports_4, mode: "" }) ]), vue.createElementVNode( "view", { class: "fault_txt" }, vue.toDisplayString(_ctx.$t("SYSIfo")), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "parameter_bottom" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", { class: "parameter_bottom1", onClick: _cache[4] || (_cache[4] = (...args) => $options.onclick && $options.onclick(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_bottom2" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]) ]) ]) ]); } const PagesFaultlistIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-108f6e37"], ["__file", "D:/project/esswisdom_ipad/pages/faultlist/index.vue"]]); const _sfc_main$1 = { data() { return {}; }, onLoad() { }, computed: { // 使用 mapState 映射多个状态到组件的计算属性 ...mapState(["formattedTime", "status"]), backgroundStyle() { return { backgroundImage: `url(${this.$t("offline")})`, backgroundSize: "100% 100%" }; } }, beforeUnmount() { }, methods: { onclick() { uni.redirectTo({ url: "/pages/index/index" }); }, onReturn() { uni.redirectTo({ url: "/pages/faultlist/index" }); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { class: "top_logo", src: _imports_0, mode: "" }), vue.createCommentVNode(' '), vue.createElementVNode( "view", { class: "tite" }, vue.toDisplayString(_ctx.$t("MainTitle")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time" }, [ vue.createElementVNode( "view", { class: "time_top" }, vue.toDisplayString(_ctx.formattedTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "time_bottom" }, [ vue.createElementVNode("view"), vue.createElementVNode("view", { class: "time_bottom1" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("status")) + " ", 1 /* TEXT */ ), _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time_state" }, vue.toDisplayString(_ctx.$t("online")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "time_state1" }, vue.toDisplayString(_ctx.$t("offline")), 1 /* TEXT */ )) ]) ]) ]) ]), vue.createElementVNode("view", { class: "parameter" }, [ vue.createElementVNode("image", { class: "parameter_list", src: _ctx.$t("sysifoURL"), mode: "" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "parameter_bottom" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("view", { class: "parameter_bottom1", onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args)) }, [ vue.createElementVNode("image", { src: _imports_1$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_bottom2" }, vue.toDisplayString(_ctx.$t("ReturnModeSelection")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "parameter_bottom11", onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args)) }, [ vue.createElementVNode("image", { src: _imports_2$1, mode: "" }), vue.createElementVNode( "text", { class: "parameter_bottom2" }, vue.toDisplayString(_ctx.$t("Return")), 1 /* TEXT */ ) ]) ]) ]) ]); } const PagesSYSifoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-b487f3c0"], ["__file", "D:/project/esswisdom_ipad/pages/SYSifo/index.vue"]]); __definePage("pages/index/index", PagesIndexIndex); __definePage("pages/home/index", PagesHomeIndex); __definePage("pages/details/index", PagesDetailsIndex); __definePage("pages/electricity/index", PagesElectricityIndex); __definePage("pages/supply/supply", PagesSupplySupply); __definePage("pages/supplyss/supplyss", PagesSupplyssSupplyss); __definePage("pages/faultlist/index", PagesFaultlistIndex); __definePage("pages/SYSifo/index", PagesSYSifoIndex); const _sfc_main = { data() { return { // uidatas:'' }; }, computed: {}, onLaunch: function() { plus.navigator.setFullscreen(true); plus.navigator.hideSystemNavigation(); }, mounted() { this.$store.dispatch("startClock"); this.$store.dispatch("fetchFaultsList"); }, beforeUnmount() { }, methods: {}, onShow: function() { formatAppLog("log", "at App.vue:37", "App Show"); }, onHide: function() { formatAppLog("log", "at App.vue:40", "App Hide"); } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/project/esswisdom_ipad/App.vue"]]); const Store = createStore({ state: { formattedTime: getTime("yyyy-MM-dd hh:mm:ss"), uidatasdata: {}, selectorid: null, selectorindex: null, status: null, num: 0, event: "故障" }, mutations: { increment(state2, n2) { if (n2 == 1) { state2.num++; } else { state2.num = 0; } }, getevent(state2, event) { state2.event = event; }, setFormattedTime(state2, time) { state2.formattedTime = time; }, setUidatasData(state2, data) { state2.uidatasdata = data; }, setstatus(state2, status2) { state2.status = status2; }, setSelectorId(state2, id) { state2.selectorid = id; }, setSelectorIndex(state2, index) { state2.selectorindex = index; } }, actions: { startClock({ commit }) { setInterval(() => { const customFormat = "yyyy-MM-dd hh:mm:ss"; const formattedTime = getTime(customFormat); commit("setFormattedTime", formattedTime); }, 1e3); }, async fetchFaultsList({ commit, state: state2 }) { try { let data = { id: "3224a3eb-2375-4dfc-99ce-b182edd30996", page: 1, rows: 1e4 }; const response2 = await getuidatas(data); if (response2.status == "ok") { if (response2.data != null && response2.data != []) { const uidatasdata = response2.data.reduce((obj, item) => { let a2 = item.module; let b2 = item[a2]; let numericValue = parseFloat(b2); let roundedValue = ""; if (item.id == "BatCellVPeak_ValMaxCellVoltage" || item.id == "BatCellVPeak_ValMinCellVoltage" || item.id == "PCSTotalOutputPower") { roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(3); } else { if (item.id == "CellTemperatureLimitsStatus_MaxTemp" || item.id == "CellTemperatureLimitsStatus_MinTemp" || item.id == "TMS_Status_TMS_WATEROUT_TEMP" || item.id == "TMS_Status_TMS_WATERIN_TEMP") { roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1); } else { if (item.id == "SOC" || item.id == "ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime" || item.id == "ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime") { roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(0); } else { if (item.id == "PCSPortAPhaseVoltage" || item.id == "PCSPortBPhaseVoltage" || item.id == "PCSPortCPhaseVoltage" || item.id == "PCSOutputA-phaseCurrent" || item.id == "PCSOutputB-phaseCurrent" || item.id == "PCSOutputC-phaseCurrent") { roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(2); } else { roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1); } } } } if (!isNaN(numericValue) && numericValue < 0) { roundedValue = Math.abs(numericValue); } return { ...obj, [item.id]: roundedValue }; }, {}); commit("setUidatasData", uidatasdata); if (uidatasdata.SysControl_RunCmd == 1 || uidatasdata.SysControl_Gun1RunCmd == 1 || uidatasdata.SysControl_Gun2RunCmd == 1) { commit("setSelectorId", uidatasdata.SysInstall_EssRunModeManual); commit("setSelectorIndex", 1); } else { commit("setSelectorId", null); commit("setSelectorIndex", null); } if (state2.num >= 3) { commit("increment", 0); commit("setstatus", response2.status); } commit("increment", 1); } else { if (state2.num >= 3) { commit("increment", 0); commit("setstatus", "NO"); } commit("increment", 1); } } else { } } catch (error) { formatAppLog("log", "at store/index.js:151", error); commit("setstatus", "NO"); } finally { setTimeout(() => { this.dispatch("fetchFaultsList"); }, 2e3); } } } }); const MainTitle$1 = "Mobile Ev Charger"; const status$1 = "SYS Staus:"; const version$1 = "version"; const CommunicationRecharge$2 = "AC IN"; const CommunicationRechargeInput$1 = "AC Input"; const CommunicationSupply$2 = "AC OUT"; const CommunicationSupplyOutput$1 = "AC Output"; const DirectRecharge$2 = "DC IN"; const DirectRechargeInput$1 = "DC Input"; const DirectSupply$2 = "DC OUT"; const DirectSupplyOutput$1 = "DC Output"; const SystemInformation$1 = "SYS Info"; const state$1 = "Breaker"; const state163A$1 = "Breaker1 63A"; const state63A2$1 = "Breaker2 63A"; const state125A$1 = "Breaker1 125A"; const state63A$1 = "Breaker2 63A"; const state16A$1 = "Breaker3 16A"; const online$1 = "ON Line"; const offline$1 = "Off Line"; const connect$1 = "ON"; const breakoff$1 = "OFF"; const workingCondition$1 = "Running Status"; const StandbyMode$1 = "Standby"; const work$1 = "Running"; const ChargingCompleted$1 = "Finished"; const ChargingPause$1 = "Pause"; const BatteryStatus$1 = "BAT Status"; const fault$1 = "Fault"; const ChuShiHua$1 = "Available"; const SystemStatus$1 = "SYS Status"; const NotupyetVoltage$1 = "Ready"; const HighVoltageMedium$1 = "Unknown"; const voltagehasbeen$1 = "Connected"; const Underhighpressure$1 = "Unknown"; const uncharged$1 = "Unavailable"; const Chargingprogress$1 = "Discharge"; const Chargingmalfunction$1 = "AC charge"; const full$1 = "DC Charge"; const retain$1 = "Retain"; const GunAinformation$1 = "A Gun"; const GunBinformation$1 = "B Gun"; const exchangeinformation$1 = "AC Info"; const Batteryinformation$1 = "BAT Info"; const statisticalinformation$1 = "Running Info"; const coolinginformation$1 = "TMS Info"; const PhaseVoltage = "Phase"; const PhaseVoltageAV$1 = "Phase A"; const PhaseVoltageBV$1 = "Phase B"; const PhaseVoltageCV$1 = "Phase C"; const PhaseVoltageAA$1 = "Phase A"; const PhaseVoltageBA$1 = "Phase B"; const PhaseVoltageCA$1 = "Phase C"; const powerSupply$1 = "Power Input"; const DischargeCapacity$1 = "Power Output"; const PhaseCurrent$1 = "Phase"; const DischargePower$1 = "Power Output"; const Supplementarypower$1 = "Power Input"; const TotalPressure$1 = "BAT Voltage"; const AllowChargingPower$1 = "Max Power"; const MaximumVoltage$1 = "Max Cell"; const MaximumTemperature$1 = "Max Temp"; const BatteryCurrent$1 = "BAT Current"; const AllowChargingCurrent$1 = "Max Current"; const MinimumIndividualVoltage$1 = "Mini Cell"; const MinimumMonomerTemperature$1 = "Mini Temp"; const invalid$1 = "Unavailable"; const DischargeMode$1 = "Discharge"; const pcsChargingMode$1 = "AC charge"; const EuropeanStandardChargingMode$1 = "DC Charge"; const WorkingMode$1 = "Running Mode"; const OffMode$1 = "Standby"; const CoolingMode$1 = "Cooling"; const HeatingMode$1 = "Heating"; const CirculatingMode$1 = "Self Loop"; const NO$1 = "NO"; const OutletTemperature$1 = "Outlets"; const HighVoltageRelayStatus$1 = "TMS Relay"; const DisconnectedState$1 = "Disconnected state"; const ClosedState$1 = "Closed state"; const waterTemperature$1 = "Inlets"; const open$1 = "Start"; const stopIt$1 = "Stop"; const power$1 = "AC"; const given$1 = "IN"; const powergiven$1 = "Power"; const ACinputpowergiven$1 = "AC input Power"; const confirm$1 = "ok"; const ReturnModeSelection$1 = "Back to Home"; const Return$1 = "Return"; const CancelReturn$1 = "Back"; const ConfirmStart$1 = "ok"; const ConfirmStop$1 = "ok"; const popUpTitle$1 = "Tips"; const popUpTitleStop$1 = "Tips"; const popUpContent$1 = "Are you sure to START the iTrailer?"; const popUpContentStop$1 = "Are you sure to STOp the iTrailer?"; const ACRechargeelectricitytext$1 = "When AC power is replenished, all AC output terminals should be disconnected"; const ACpowerSupplytext$1 = "When AC power is supplied, all AC input terminals should be disconnected"; const OperationSuccessful$1 = "Operation successful"; const operationFailed$1 = "operation failed"; const ChargingPower$1 = "Input Power"; const ChargingVoltage$1 = "Charing Voltage"; const ChargingCurrent$1 = "Charing Current"; const VehicleSOC$1 = "EV SOC"; const ChargingCapacity$1 = "Charging capacity"; const CharingPower$1 = "Charing Power"; const ChargingFee$1 = "Charing Fee"; const USD$1 = "USD"; const ChargingTime$1 = "Unknown"; const AllowableDischargepower$1 = "Max Power"; const AllowDischargeCurrent$1 = "Max Current"; const ConnectionStatus$1 = "Link Status"; const formNO$1 = "NO"; const formFailure$1 = "Failure"; const formUnit$1 = "Unit"; const formDescription$1 = "Description"; const formRecover$1 = "Recover"; const FaultRec$1 = "Fault Rec"; const WarningRec$1 = "Warning Rec"; const RunningRec$1 = "Running Rec"; const SYSIfo$1 = "SYS Ifo"; const FaultClearing$1 = "Recover"; const LastPage$1 = "Last page"; const NextPage$1 = "Next page"; const RunningTimes$1 = "Running Times"; const InputCapacity$1 = "Input capacity"; const AccumulateInput$1 = "Accumulate Input"; const RunningTimesdischarge$1 = "Running Times"; const InputCapacitydischarge$1 = "Output capacity"; const AccumulateInputdischarge$1 = "Accumulate Output"; const RunningTimesmin$1 = "min"; const sysifoURL$1 = "../../static/enBasicdata3.png"; const Tipswarning$1 = "Only a mode can be used at the same time"; const en = { MainTitle: MainTitle$1, status: status$1, version: version$1, CommunicationRecharge: CommunicationRecharge$2, CommunicationRechargeInput: CommunicationRechargeInput$1, CommunicationSupply: CommunicationSupply$2, CommunicationSupplyOutput: CommunicationSupplyOutput$1, DirectRecharge: DirectRecharge$2, DirectRechargeInput: DirectRechargeInput$1, DirectSupply: DirectSupply$2, DirectSupplyOutput: DirectSupplyOutput$1, SystemInformation: SystemInformation$1, state: state$1, state163A: state163A$1, state63A2: state63A2$1, state125A: state125A$1, state63A: state63A$1, state16A: state16A$1, online: online$1, offline: offline$1, connect: connect$1, breakoff: breakoff$1, workingCondition: workingCondition$1, StandbyMode: StandbyMode$1, work: work$1, ChargingCompleted: ChargingCompleted$1, ChargingPause: ChargingPause$1, BatteryStatus: BatteryStatus$1, fault: fault$1, ChuShiHua: ChuShiHua$1, SystemStatus: SystemStatus$1, NotupyetVoltage: NotupyetVoltage$1, HighVoltageMedium: HighVoltageMedium$1, voltagehasbeen: voltagehasbeen$1, Underhighpressure: Underhighpressure$1, uncharged: uncharged$1, Chargingprogress: Chargingprogress$1, Chargingmalfunction: Chargingmalfunction$1, full: full$1, retain: retain$1, GunAinformation: GunAinformation$1, GunBinformation: GunBinformation$1, exchangeinformation: exchangeinformation$1, Batteryinformation: Batteryinformation$1, statisticalinformation: statisticalinformation$1, coolinginformation: coolinginformation$1, PhaseVoltage, PhaseVoltageAV: PhaseVoltageAV$1, PhaseVoltageBV: PhaseVoltageBV$1, PhaseVoltageCV: PhaseVoltageCV$1, PhaseVoltageAA: PhaseVoltageAA$1, PhaseVoltageBA: PhaseVoltageBA$1, PhaseVoltageCA: PhaseVoltageCA$1, powerSupply: powerSupply$1, DischargeCapacity: DischargeCapacity$1, PhaseCurrent: PhaseCurrent$1, DischargePower: DischargePower$1, Supplementarypower: Supplementarypower$1, TotalPressure: TotalPressure$1, AllowChargingPower: AllowChargingPower$1, MaximumVoltage: MaximumVoltage$1, MaximumTemperature: MaximumTemperature$1, BatteryCurrent: BatteryCurrent$1, AllowChargingCurrent: AllowChargingCurrent$1, MinimumIndividualVoltage: MinimumIndividualVoltage$1, MinimumMonomerTemperature: MinimumMonomerTemperature$1, invalid: invalid$1, DischargeMode: DischargeMode$1, pcsChargingMode: pcsChargingMode$1, EuropeanStandardChargingMode: EuropeanStandardChargingMode$1, WorkingMode: WorkingMode$1, OffMode: OffMode$1, CoolingMode: CoolingMode$1, HeatingMode: HeatingMode$1, CirculatingMode: CirculatingMode$1, NO: NO$1, OutletTemperature: OutletTemperature$1, HighVoltageRelayStatus: HighVoltageRelayStatus$1, DisconnectedState: DisconnectedState$1, ClosedState: ClosedState$1, waterTemperature: waterTemperature$1, open: open$1, stopIt: stopIt$1, power: power$1, given: given$1, powergiven: powergiven$1, ACinputpowergiven: ACinputpowergiven$1, confirm: confirm$1, ReturnModeSelection: ReturnModeSelection$1, Return: Return$1, CancelReturn: CancelReturn$1, ConfirmStart: ConfirmStart$1, ConfirmStop: ConfirmStop$1, popUpTitle: popUpTitle$1, popUpTitleStop: popUpTitleStop$1, popUpContent: popUpContent$1, popUpContentStop: popUpContentStop$1, ACRechargeelectricitytext: ACRechargeelectricitytext$1, ACpowerSupplytext: ACpowerSupplytext$1, OperationSuccessful: OperationSuccessful$1, operationFailed: operationFailed$1, ChargingPower: ChargingPower$1, ChargingVoltage: ChargingVoltage$1, ChargingCurrent: ChargingCurrent$1, VehicleSOC: VehicleSOC$1, ChargingCapacity: ChargingCapacity$1, CharingPower: CharingPower$1, ChargingFee: ChargingFee$1, USD: USD$1, ChargingTime: ChargingTime$1, AllowableDischargepower: AllowableDischargepower$1, AllowDischargeCurrent: AllowDischargeCurrent$1, ConnectionStatus: ConnectionStatus$1, formNO: formNO$1, formFailure: formFailure$1, formUnit: formUnit$1, formDescription: formDescription$1, formRecover: formRecover$1, FaultRec: FaultRec$1, WarningRec: WarningRec$1, RunningRec: RunningRec$1, SYSIfo: SYSIfo$1, FaultClearing: FaultClearing$1, LastPage: LastPage$1, NextPage: NextPage$1, RunningTimes: RunningTimes$1, InputCapacity: InputCapacity$1, AccumulateInput: AccumulateInput$1, RunningTimesdischarge: RunningTimesdischarge$1, InputCapacitydischarge: InputCapacitydischarge$1, AccumulateInputdischarge: AccumulateInputdischarge$1, RunningTimesmin: RunningTimesmin$1, sysifoURL: sysifoURL$1, Tipswarning: Tipswarning$1 }; const MainTitle = "移动储能充电系统"; const status = "连接状态:"; const version = "应用版本"; const CommunicationRecharge$1 = "交流补电"; const CommunicationRechargeInput = "交流补电"; const CommunicationSupply$1 = "交流供电"; const CommunicationSupplyOutput = "交流供电"; const DirectRecharge$1 = "直流补电"; const DirectRechargeInput = "直流补电"; const DirectSupply$1 = "直流供电"; const DirectSupplyOutput = "直流供电"; const SystemInformation = "系统信息"; const state = "状态"; const state163A = "63A1状态"; const state63A2 = "63A2状态"; const state125A = "125A状态"; const state63A = "63A状态"; const state16A = "16A状态"; const online = "在线"; const offline = "离线"; const connect = "连接"; const breakoff = "断开"; const workingCondition = "工作状态"; const StandbyMode = "待机"; const work = "工作"; const ChargingCompleted = "充电完成"; const ChargingPause = "充电暂停"; const BatteryStatus = "电池状态"; const fault = "故障"; const ChuShiHua = "出始化"; const SystemStatus = "系统状态"; const NotupyetVoltage = "未上高压"; const HighVoltageMedium = "上高压中"; const voltagehasbeen = "已上高压"; const Underhighpressure = "下高压中"; const ChargingStatus = "充电状态"; const uncharged = "无效"; const Chargingprogress = "未充电"; const Chargingmalfunction = "PCS充电"; const full = "欧标充电"; const retain = "保留"; const ChargingConnectionStatus = "充电连接状态"; const FastChargingConnection = "快充连接"; const NoConnection = "无连接"; const GunAinformation = "枪A信息"; const GunBinformation = "枪B信息"; const exchangeinformation = "交流信息"; const Batteryinformation = "电池信息"; const statisticalinformation = "统计信息"; const coolinginformation = "液冷信息"; const PhaseVoltageAV = "A相电压"; const PhaseVoltageBV = "B相电压"; const PhaseVoltageCV = "C相电压"; const PhaseVoltageAA = "A相电流"; const PhaseVoltageBA = "B相电流"; const PhaseVoltageCA = "C相电流"; const powerSupply = "补电电量"; const DischargeCapacity = "放电电量"; const PhaseCurrent = "相电流"; const DischargePower = "放电功率"; const Supplementarypower = "补电功率"; const TotalPressure = "电池内总压"; const AllowChargingPower = "最大允许充电功率"; const MaximumVoltage = "最大单体电压"; const MaximumTemperature = "最大单体温度"; const BatteryCurrent = "电池总电流"; const AllowChargingCurrent = "最大允许充电电流"; const MinimumIndividualVoltage = "最小单体电压"; const MinimumMonomerTemperature = "最小单体温度"; const WorkingModeBatterySystem = "电池系统工作模式"; const invalid = "无效"; const DischargeMode = "放电模式"; const pcsChargingMode = "pcs充电模式"; const EuropeanStandardChargingMode = "欧标充电模式"; const BatterySystemStatus = "电池系统状态"; const initialization = "初始化"; const AccumulatedChargingCapacityCommunication = "交流累计充电电量"; const WorkingMode = "工作模式"; const OffMode = "待机模式"; const CoolingMode = "制冷模式"; const HeatingMode = "自热模式"; const CirculatingMode = "自循环模式"; const NO = "NO"; const OutletTemperature = "出水温度"; const PowerDemand = "需求功率"; const HighVoltageRelayStatus = "高压继电器状态"; const DisconnectedState = "OFF"; const ClosedState = "ON"; const waterTemperature = "入水温度"; const BatteryFaultLevel = "电池故障等级"; const NoMalfunction = "无故障"; const LevelLault = "级故障"; const open = "开启"; const stopIt = "停止"; const power = "功率"; const given = "给定"; const powergiven = "功率给定"; const ACinputpowergiven = "功率给定"; const confirm = "确认"; const ReturnModeSelection = "返回模式选择"; const Return = "返回上页"; const CancelReturn = "取消返回"; const ConfirmStart = "确认启动"; const ConfirmStop = "确认停止"; const popUpTitle = "你确定要开启该设备吗?"; const popUpTitleStop = "你确定要停止该设备吗?"; const popUpContent = "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!"; const popUpContentStop = "设备完全停止后,方能进行后续操作,否则可能危及生命安全!"; const ACRechargeelectricitytext = "AC补电时AC输出端应全部断开"; const ACpowerSupplytext = "AC供电时AC输入端应全部断开'"; const OperationSuccessful = "操作成功"; const operationFailed = "操作失败"; const ChargingPower = "充电功率"; const ChargingVoltage = "充电电压"; const ChargingCurrent = "充电电流"; const VehicleSOC = "车辆SOC"; const ChargingCapacity = "充电电量"; const CharingPower = "充电功率"; const ChargingFee = "充电费用"; const USD = "元"; const ChargingTime = "充电时间"; const AllowableDischargepower = "最大允许放电功率"; const AllowDischargeCurrent = "最大允许放电电流"; const ConnectionStatus = "连接状态"; const formNO = "序号"; const formUnit = "设备"; const formDescription = "内容"; const formFailure = "发生时间"; const formRecover = "恢复时间"; const FaultRec = "故障记录"; const WarningRec = "告警记录"; const RunningRec = "运行记录"; const SYSIfo = "系统信息"; const FaultClearing = "故障清除"; const LastPage = "上一页"; const NextPage = "下一页"; const RunningTimes = "本次补电时长"; const InputCapacity = "本次补电电量"; const AccumulateInput = "累计补电电量"; const RunningTimesdischarge = "本次放电时长"; const InputCapacitydischarge = "本次放电电量"; const AccumulateInputdischarge = "累计放电电量"; const RunningTimesmin = "分钟"; const sysifoURL = "../../static/zhBasicdata3.png"; const Tipswarning = "若想重新选择模式,请返回之前模式停止以后再重新选择!"; const zhHans = { MainTitle, status, version, CommunicationRecharge: CommunicationRecharge$1, CommunicationRechargeInput, CommunicationSupply: CommunicationSupply$1, CommunicationSupplyOutput, DirectRecharge: DirectRecharge$1, DirectRechargeInput, DirectSupply: DirectSupply$1, DirectSupplyOutput, SystemInformation, state, state163A, state63A2, state125A, state63A, state16A, online, offline, connect, breakoff, workingCondition, StandbyMode, work, ChargingCompleted, ChargingPause, BatteryStatus, fault, ChuShiHua, SystemStatus, NotupyetVoltage, HighVoltageMedium, voltagehasbeen, Underhighpressure, ChargingStatus, uncharged, Chargingprogress, Chargingmalfunction, full, retain, ChargingConnectionStatus, FastChargingConnection, NoConnection, GunAinformation, GunBinformation, exchangeinformation, Batteryinformation, statisticalinformation, coolinginformation, PhaseVoltageAV, PhaseVoltageBV, PhaseVoltageCV, PhaseVoltageAA, PhaseVoltageBA, PhaseVoltageCA, powerSupply, DischargeCapacity, PhaseCurrent, DischargePower, Supplementarypower, TotalPressure, AllowChargingPower, MaximumVoltage, MaximumTemperature, BatteryCurrent, AllowChargingCurrent, MinimumIndividualVoltage, MinimumMonomerTemperature, WorkingModeBatterySystem, invalid, DischargeMode, pcsChargingMode, EuropeanStandardChargingMode, BatterySystemStatus, initialization, AccumulatedChargingCapacityCommunication, WorkingMode, OffMode, CoolingMode, HeatingMode, CirculatingMode, NO, OutletTemperature, PowerDemand, HighVoltageRelayStatus, DisconnectedState, ClosedState, waterTemperature, BatteryFaultLevel, NoMalfunction, LevelLault, open, stopIt, power, given, powergiven, ACinputpowergiven, confirm, ReturnModeSelection, Return, CancelReturn, ConfirmStart, ConfirmStop, popUpTitle, popUpTitleStop, popUpContent, popUpContentStop, ACRechargeelectricitytext, ACpowerSupplytext, OperationSuccessful, operationFailed, ChargingPower, ChargingVoltage, ChargingCurrent, VehicleSOC, ChargingCapacity, CharingPower, ChargingFee, USD, ChargingTime, AllowableDischargepower, AllowDischargeCurrent, ConnectionStatus, formNO, formUnit, formDescription, formFailure, formRecover, FaultRec, WarningRec, RunningRec, SYSIfo, FaultClearing, LastPage, NextPage, RunningTimes, InputCapacity, AccumulateInput, RunningTimesdischarge, InputCapacitydischarge, AccumulateInputdischarge, RunningTimesmin, sysifoURL, Tipswarning }; const CommunicationRecharge = "交流补电"; const CommunicationSupply = "交流供电"; const DirectRecharge = "交流补电"; const DirectSupply = "交流补电"; const zhHant = { CommunicationRecharge, CommunicationSupply, DirectRecharge, DirectSupply }; /*! * @intlify/shared v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const inBrowser = typeof window !== "undefined"; let mark; let measure; { const perf = inBrowser && window.performance; if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) { mark = (tag) => perf.mark(tag); measure = (name, startTag, endTag) => { perf.measure(name, startTag, endTag); perf.clearMarks(startTag); perf.clearMarks(endTag); }; } } const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g; function format(message, ...args) { if (args.length === 1 && isObject$1(args[0])) { args = args[0]; } if (!args || !args.hasOwnProperty) { args = {}; } return message.replace(RE_ARGS, (match, identifier) => { return args.hasOwnProperty(identifier) ? args[identifier] : ""; }); } const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; const makeSymbol = (name) => hasSymbol ? Symbol(name) : name; const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source }); const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"); const isNumber = (val) => typeof val === "number" && isFinite(val); const isDate = (val) => toTypeString(val) === "[object Date]"; const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0; function warn(msg, err) { if (typeof console !== "undefined") { console.warn(`[intlify] ` + msg); if (err) { console.warn(err.stack); } } } const assign = Object.assign; let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; function escapeHtml(rawText) { return rawText.replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); } const hasOwnProperty$1 = Object.prototype.hasOwnProperty; function hasOwn$1(obj, key) { return hasOwnProperty$1.call(obj, key); } const isArray = Array.isArray; const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isBoolean = (val) => typeof val === "boolean"; const isObject$1 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const isPlainObject = (val) => toTypeString(val) === "[object Object]"; const toDisplayString = (val) => { return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val); }; const RANGE = 2; function generateCodeFrame(source, start = 0, end = source.length) { const lines = source.split(/\r?\n/); let count = 0; const res = []; for (let i2 = 0; i2 < lines.length; i2++) { count += lines[i2].length + 1; if (count >= start) { for (let j2 = i2 - RANGE; j2 <= i2 + RANGE || end > count; j2++) { if (j2 < 0 || j2 >= lines.length) continue; const line = j2 + 1; res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j2]}`); const lineLength = lines[j2].length; if (j2 === i2) { const pad = start - (count - lineLength) + 1; const length = Math.max(1, end > count ? lineLength - pad : end - start); res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); } else if (j2 > i2) { if (end > count) { const length = Math.max(Math.min(end - count, lineLength), 1); res.push(` | ` + "^".repeat(length)); } count += lineLength + 1; } } break; } } return res.join("\n"); } function createEmitter() { const events = /* @__PURE__ */ new Map(); const emitter = { events, on(event, handler) { const handlers = events.get(event); const added = handlers && handlers.push(handler); if (!added) { events.set(event, [handler]); } }, off(event, handler) { const handlers = events.get(event); if (handlers) { handlers.splice(handlers.indexOf(handler) >>> 0, 1); } }, emit(event, payload) { (events.get(event) || []).slice().map((handler) => handler(payload)); (events.get("*") || []).slice().map((handler) => handler(event, payload)); } }; return emitter; } /*! * @intlify/message-resolver v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn(obj, key) { return hasOwnProperty.call(obj, key); } const isObject = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const pathStateMachine = []; pathStateMachine[ 0 /* BEFORE_PATH */ ] = { [ "w" /* WORKSPACE */ ]: [ 0 /* BEFORE_PATH */ ], [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4 /* IN_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7 /* AFTER_PATH */ ] }; pathStateMachine[ 1 /* IN_PATH */ ] = { [ "w" /* WORKSPACE */ ]: [ 1 /* IN_PATH */ ], [ "." /* DOT */ ]: [ 2 /* BEFORE_IDENT */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4 /* IN_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7 /* AFTER_PATH */ ] }; pathStateMachine[ 2 /* BEFORE_IDENT */ ] = { [ "w" /* WORKSPACE */ ]: [ 2 /* BEFORE_IDENT */ ], [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "0" /* ZERO */ ]: [ 3, 0 /* APPEND */ ] }; pathStateMachine[ 3 /* IN_IDENT */ ] = { [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "0" /* ZERO */ ]: [ 3, 0 /* APPEND */ ], [ "w" /* WORKSPACE */ ]: [ 1, 1 /* PUSH */ ], [ "." /* DOT */ ]: [ 2, 1 /* PUSH */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4, 1 /* PUSH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7, 1 /* PUSH */ ] }; pathStateMachine[ 4 /* IN_SUB_PATH */ ] = { [ "'" /* SINGLE_QUOTE */ ]: [ 5, 0 /* APPEND */ ], [ '"' /* DOUBLE_QUOTE */ ]: [ 6, 0 /* APPEND */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4, 2 /* INC_SUB_PATH_DEPTH */ ], [ "]" /* RIGHT_BRACKET */ ]: [ 1, 3 /* PUSH_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 4, 0 /* APPEND */ ] }; pathStateMachine[ 5 /* IN_SINGLE_QUOTE */ ] = { [ "'" /* SINGLE_QUOTE */ ]: [ 4, 0 /* APPEND */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 5, 0 /* APPEND */ ] }; pathStateMachine[ 6 /* IN_DOUBLE_QUOTE */ ] = { [ '"' /* DOUBLE_QUOTE */ ]: [ 4, 0 /* APPEND */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 6, 0 /* APPEND */ ] }; const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; function isLiteral(exp) { return literalValueRE.test(exp); } function stripQuotes(str) { const a2 = str.charCodeAt(0); const b2 = str.charCodeAt(str.length - 1); return a2 === b2 && (a2 === 34 || a2 === 39) ? str.slice(1, -1) : str; } function getPathCharType(ch) { if (ch === void 0 || ch === null) { return "o"; } const code = ch.charCodeAt(0); switch (code) { case 91: case 93: case 46: case 34: case 39: return ch; case 95: case 36: case 45: return "i"; case 9: case 10: case 13: case 160: case 65279: case 8232: case 8233: return "w"; } return "i"; } function formatSubPath(path) { const trimmed = path.trim(); if (path.charAt(0) === "0" && isNaN(parseInt(path))) { return false; } return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed; } function parse(path) { const keys = []; let index = -1; let mode = 0; let subPathDepth = 0; let c2; let key; let newChar; let type; let transition; let action; let typeMap; const actions = []; actions[ 0 /* APPEND */ ] = () => { if (key === void 0) { key = newChar; } else { key += newChar; } }; actions[ 1 /* PUSH */ ] = () => { if (key !== void 0) { keys.push(key); key = void 0; } }; actions[ 2 /* INC_SUB_PATH_DEPTH */ ] = () => { actions[ 0 /* APPEND */ ](); subPathDepth++; }; actions[ 3 /* PUSH_SUB_PATH */ ] = () => { if (subPathDepth > 0) { subPathDepth--; mode = 4; actions[ 0 /* APPEND */ ](); } else { subPathDepth = 0; if (key === void 0) { return false; } key = formatSubPath(key); if (key === false) { return false; } else { actions[ 1 /* PUSH */ ](); } } }; function maybeUnescapeQuote() { const nextChar = path[index + 1]; if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') { index++; newChar = "\\" + nextChar; actions[ 0 /* APPEND */ ](); return true; } } while (mode !== null) { index++; c2 = path[index]; if (c2 === "\\" && maybeUnescapeQuote()) { continue; } type = getPathCharType(c2); typeMap = pathStateMachine[mode]; transition = typeMap[type] || typeMap[ "l" /* ELSE */ ] || 8; if (transition === 8) { return; } mode = transition[0]; if (transition[1] !== void 0) { action = actions[transition[1]]; if (action) { newChar = c2; if (action() === false) { return; } } } if (mode === 7) { return keys; } } } const cache = /* @__PURE__ */ new Map(); function resolveValue(obj, path) { if (!isObject(obj)) { return null; } let hit = cache.get(path); if (!hit) { hit = parse(path); if (hit) { cache.set(path, hit); } } if (!hit) { return null; } const len = hit.length; let last = obj; let i2 = 0; while (i2 < len) { const val = last[hit[i2]]; if (val === void 0) { return null; } last = val; i2++; } return last; } function handleFlatJson(obj) { if (!isObject(obj)) { return obj; } for (const key in obj) { if (!hasOwn(obj, key)) { continue; } if (!key.includes( "." /* DOT */ )) { if (isObject(obj[key])) { handleFlatJson(obj[key]); } } else { const subKeys = key.split( "." /* DOT */ ); const lastIndex = subKeys.length - 1; let currentObj = obj; for (let i2 = 0; i2 < lastIndex; i2++) { if (!(subKeys[i2] in currentObj)) { currentObj[subKeys[i2]] = {}; } currentObj = currentObj[subKeys[i2]]; } currentObj[subKeys[lastIndex]] = obj[key]; delete obj[key]; if (isObject(currentObj[subKeys[lastIndex]])) { handleFlatJson(currentObj[subKeys[lastIndex]]); } } } return obj; } /*! * @intlify/runtime v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const DEFAULT_MODIFIER = (str) => str; const DEFAULT_MESSAGE = (ctx) => ""; const DEFAULT_MESSAGE_DATA_TYPE = "text"; const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join(""); const DEFAULT_INTERPOLATE = toDisplayString; function pluralDefault(choice, choicesLength) { choice = Math.abs(choice); if (choicesLength === 2) { return choice ? choice > 1 ? 1 : 0 : 1; } return choice ? Math.min(choice, 2) : 0; } function getPluralIndex(options) { const index = isNumber(options.pluralIndex) ? options.pluralIndex : -1; return options.named && (isNumber(options.named.count) || isNumber(options.named.n)) ? isNumber(options.named.count) ? options.named.count : isNumber(options.named.n) ? options.named.n : index : index; } function normalizeNamed(pluralIndex, props) { if (!props.count) { props.count = pluralIndex; } if (!props.n) { props.n = pluralIndex; } } function createMessageContext(options = {}) { const locale = options.locale; const pluralIndex = getPluralIndex(options); const pluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault; const orgPluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0; const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)]; const _list = options.list || []; const list = (index) => _list[index]; const _named = options.named || {}; isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named); const named = (key) => _named[key]; function message(key) { const msg = isFunction(options.messages) ? options.messages(key) : isObject$1(options.messages) ? options.messages[key] : false; return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg; } const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER; const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE; const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE; const type = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE; const ctx = { [ "list" /* LIST */ ]: list, [ "named" /* NAMED */ ]: named, [ "plural" /* PLURAL */ ]: plural, [ "linked" /* LINKED */ ]: (key, modifier) => { const msg = message(key)(ctx); return isString(modifier) ? _modifier(modifier)(msg) : msg; }, [ "message" /* MESSAGE */ ]: message, [ "type" /* TYPE */ ]: type, [ "interpolate" /* INTERPOLATE */ ]: interpolate, [ "normalize" /* NORMALIZE */ ]: normalize }; return ctx; } /*! * @intlify/message-compiler v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const errorMessages$2 = { // tokenizer error messages [ 0 /* EXPECTED_TOKEN */ ]: `Expected token: '{0}'`, [ 1 /* INVALID_TOKEN_IN_PLACEHOLDER */ ]: `Invalid token in placeholder: '{0}'`, [ 2 /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */ ]: `Unterminated single quote in placeholder`, [ 3 /* UNKNOWN_ESCAPE_SEQUENCE */ ]: `Unknown escape sequence: \\{0}`, [ 4 /* INVALID_UNICODE_ESCAPE_SEQUENCE */ ]: `Invalid unicode escape sequence: {0}`, [ 5 /* UNBALANCED_CLOSING_BRACE */ ]: `Unbalanced closing brace`, [ 6 /* UNTERMINATED_CLOSING_BRACE */ ]: `Unterminated closing brace`, [ 7 /* EMPTY_PLACEHOLDER */ ]: `Empty placeholder`, [ 8 /* NOT_ALLOW_NEST_PLACEHOLDER */ ]: `Not allowed nest placeholder`, [ 9 /* INVALID_LINKED_FORMAT */ ]: `Invalid linked format`, // parser error messages [ 10 /* MUST_HAVE_MESSAGES_IN_PLURAL */ ]: `Plural must have messages`, [ 11 /* UNEXPECTED_EMPTY_LINKED_MODIFIER */ ]: `Unexpected empty linked modifier`, [ 12 /* UNEXPECTED_EMPTY_LINKED_KEY */ ]: `Unexpected empty linked key`, [ 13 /* UNEXPECTED_LEXICAL_ANALYSIS */ ]: `Unexpected lexical analysis in token: '{0}'` }; function createCompileError(code, loc, options = {}) { const { domain, messages: messages2, args } = options; const msg = format((messages2 || errorMessages$2)[code] || "", ...args || []); const error = new SyntaxError(String(msg)); error.code = code; if (loc) { error.location = loc; } error.domain = domain; return error; } /*! * @intlify/devtools-if v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const IntlifyDevToolsHooks = { I18nInit: "i18n:init", FunctionTranslate: "function:translate" }; /*! * @intlify/core-base v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ let devtools = null; function setDevToolsHook(hook) { devtools = hook; } function initI18nDevTools(i18n2, version2, meta) { devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, { timestamp: Date.now(), i18n: i18n2, version: version2, meta }); } const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate); function createDevToolsHook(hook) { return (payloads) => devtools && devtools.emit(hook, payloads); } const warnMessages$1 = { [ 0 /* NOT_FOUND_KEY */ ]: `Not found '{key}' key in '{locale}' locale messages.`, [ 1 /* FALLBACK_TO_TRANSLATE */ ]: `Fall back to translate '{key}' key with '{target}' locale.`, [ 2 /* CANNOT_FORMAT_NUMBER */ ]: `Cannot format a number value due to not supported Intl.NumberFormat.`, [ 3 /* FALLBACK_TO_NUMBER_FORMAT */ ]: `Fall back to number format '{key}' key with '{target}' locale.`, [ 4 /* CANNOT_FORMAT_DATE */ ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`, [ 5 /* FALLBACK_TO_DATE_FORMAT */ ]: `Fall back to datetime format '{key}' key with '{target}' locale.` }; function getWarnMessage$1(code, ...args) { return format(warnMessages$1[code], ...args); } const VERSION$1 = "9.1.9"; const NOT_REOSLVED = -1; const MISSING_RESOLVE_VALUE = ""; function getDefaultLinkedModifiers() { return { upper: (val) => isString(val) ? val.toUpperCase() : val, lower: (val) => isString(val) ? val.toLowerCase() : val, // prettier-ignore capitalize: (val) => isString(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val }; } let _compiler; let _additionalMeta = null; const setAdditionalMeta = (meta) => { _additionalMeta = meta; }; const getAdditionalMeta = () => _additionalMeta; let _cid = 0; function createCoreContext(options = {}) { const version2 = isString(options.version) ? options.version : VERSION$1; const locale = isString(options.locale) ? options.locale : "en-US"; const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale; const messages2 = isPlainObject(options.messages) ? options.messages : { [locale]: {} }; const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale]: {} }; const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale]: {} }; const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers()); const pluralRules = options.pluralRules || {}; const missing = isFunction(options.missing) ? options.missing : null; const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; const fallbackFormat = !!options.fallbackFormat; const unresolving = !!options.unresolving; const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null; const processor = isPlainObject(options.processor) ? options.processor : null; const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; const escapeParameter = !!options.escapeParameter; const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler; const onWarn = isFunction(options.onWarn) ? options.onWarn : warn; const internalOptions = options; const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map(); const __numberFormatters = isObject$1(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map(); const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {}; _cid++; const context = { version: version2, cid: _cid, locale, fallbackLocale, messages: messages2, datetimeFormats, numberFormats, modifiers, pluralRules, missing, missingWarn, fallbackWarn, fallbackFormat, unresolving, postTranslation, processor, warnHtmlMessage, escapeParameter, messageCompiler, onWarn, __datetimeFormatters, __numberFormatters, __meta }; { context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0; } { initI18nDevTools(context, version2, __meta); } return context; } function isTranslateFallbackWarn(fallback, key) { return fallback instanceof RegExp ? fallback.test(key) : fallback; } function isTranslateMissingWarn(missing, key) { return missing instanceof RegExp ? missing.test(key) : missing; } function handleMissing(context, key, locale, missingWarn, type) { const { missing, onWarn } = context; { const emitter = context.__v_emitter; if (emitter) { emitter.emit("missing", { locale, key, type, groupId: `${type}:${key}` }); } } if (missing !== null) { const ret = missing(context, locale, key, type); return isString(ret) ? ret : key; } else { if (isTranslateMissingWarn(missingWarn, key)) { onWarn(getWarnMessage$1(0, { key, locale })); } return key; } } function getLocaleChain(ctx, fallback, start) { const context = ctx; if (!context.__localeChainCache) { context.__localeChainCache = /* @__PURE__ */ new Map(); } let chain = context.__localeChainCache.get(start); if (!chain) { chain = []; let block = [start]; while (isArray(block)) { block = appendBlockToChain(chain, block, fallback); } const defaults = isArray(fallback) ? fallback : isPlainObject(fallback) ? fallback["default"] ? fallback["default"] : null : fallback; block = isString(defaults) ? [defaults] : defaults; if (isArray(block)) { appendBlockToChain(chain, block, false); } context.__localeChainCache.set(start, chain); } return chain; } function appendBlockToChain(chain, block, blocks) { let follow = true; for (let i2 = 0; i2 < block.length && isBoolean(follow); i2++) { const locale = block[i2]; if (isString(locale)) { follow = appendLocaleToChain(chain, block[i2], blocks); } } return follow; } function appendLocaleToChain(chain, locale, blocks) { let follow; const tokens = locale.split("-"); do { const target = tokens.join("-"); follow = appendItemToChain(chain, target, blocks); tokens.splice(-1, 1); } while (tokens.length && follow === true); return follow; } function appendItemToChain(chain, target, blocks) { let follow = false; if (!chain.includes(target)) { follow = true; if (target) { follow = target[target.length - 1] !== "!"; const locale = target.replace(/!/g, ""); chain.push(locale); if ((isArray(blocks) || isPlainObject(blocks)) && blocks[locale]) { follow = blocks[locale]; } } } return follow; } function updateFallbackLocale(ctx, locale, fallback) { const context = ctx; context.__localeChainCache = /* @__PURE__ */ new Map(); getLocaleChain(ctx, fallback, locale); } function createCoreError(code) { return createCompileError(code, null, { messages: errorMessages$1 }); } const errorMessages$1 = { [ 14 /* INVALID_ARGUMENT */ ]: "Invalid arguments", [ 15 /* INVALID_DATE_ARGUMENT */ ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.", [ 16 /* INVALID_ISO_DATE_ARGUMENT */ ]: "The argument provided is not a valid ISO date string" }; const NOOP_MESSAGE_FUNCTION = () => ""; const isMessageFunction = (val) => isFunction(val); function translate(context, ...args) { const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context; const [key, options] = parseTranslateArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter; const resolvedMessage = !!options.resolvedMessage; const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : key : fallbackFormat ? key : ""; const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== ""; const locale = isString(options.locale) ? options.locale : context.locale; escapeParameter && escapeParams(options); let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [ key, locale, messages2[locale] || {} ]; let cacheBaseKey = key; if (!resolvedMessage && !(isString(format2) || isMessageFunction(format2))) { if (enableDefaultMsg) { format2 = defaultMsgOrKey; cacheBaseKey = format2; } } if (!resolvedMessage && (!(isString(format2) || isMessageFunction(format2)) || !isString(targetLocale))) { return unresolving ? NOT_REOSLVED : key; } if (isString(format2) && context.messageCompiler == null) { warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`); return key; } let occurred = false; const errorDetector = () => { occurred = true; }; const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2; if (occurred) { return format2; } const ctxOptions = getMessageContextOptions(context, targetLocale, message, options); const msgContext = createMessageContext(ctxOptions); const messaged = evaluateMessage(context, msg, msgContext); const ret = postTranslation ? postTranslation(messaged) : messaged; { const payloads = { timestamp: Date.now(), key: isString(key) ? key : isMessageFunction(format2) ? format2.key : "", locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""), format: isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "", message: ret }; payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {}); translateDevTools(payloads); } return ret; } function escapeParams(options) { if (isArray(options.list)) { options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item); } else if (isObject$1(options.named)) { Object.keys(options.named).forEach((key) => { if (isString(options.named[key])) { options.named[key] = escapeHtml(options.named[key]); } }); } } function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) { const { messages: messages2, onWarn } = context; const locales = getLocaleChain(context, fallbackLocale, locale); let message = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type = "translate"; for (let i2 = 0; i2 < locales.length; i2++) { targetLocale = to = locales[i2]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(1, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type, key, from, to, groupId: `${type}:${key}` }); } } message = messages2[targetLocale] || {}; let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-resolve-start"; endTag = "intlify-message-resolve-end"; mark && mark(startTag); } if ((format2 = resolveValue(message, key)) === null) { format2 = message[key]; } if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start && format2) { emitter.emit("message-resolve", { type: "message-resolve", key, message: format2, time: end - start, groupId: `${type}:${key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message resolve", startTag, endTag); } } if (isString(format2) || isFunction(format2)) break; const missingRet = handleMissing(context, key, targetLocale, missingWarn, type); if (missingRet !== key) { format2 = missingRet; } from = to; } return [format2, targetLocale, message]; } function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) { const { messageCompiler, warnHtmlMessage } = context; if (isMessageFunction(format2)) { const msg2 = format2; msg2.locale = msg2.locale || targetLocale; msg2.key = msg2.key || key; return msg2; } let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-compilation-start"; endTag = "intlify-message-compilation-end"; mark && mark(startTag); } const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector)); if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start) { emitter.emit("message-compilation", { type: "message-compilation", message: format2, time: end - start, groupId: `${"translate"}:${key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message compilation", startTag, endTag); } } msg.locale = targetLocale; msg.key = key; msg.source = format2; return msg; } function evaluateMessage(context, msg, msgCtx) { let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-evaluation-start"; endTag = "intlify-message-evaluation-end"; mark && mark(startTag); } const messaged = msg(msgCtx); if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start) { emitter.emit("message-evaluation", { type: "message-evaluation", value: messaged, time: end - start, groupId: `${"translate"}:${msg.key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message evaluation", startTag, endTag); } } return messaged; } function parseTranslateArgs(...args) { const [arg1, arg2, arg3] = args; const options = {}; if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1; if (isNumber(arg2)) { options.plural = arg2; } else if (isString(arg2)) { options.default = arg2; } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) { options.named = arg2; } else if (isArray(arg2)) { options.list = arg2; } if (isNumber(arg3)) { options.plural = arg3; } else if (isString(arg3)) { options.default = arg3; } else if (isPlainObject(arg3)) { assign(options, arg3); } return [key, options]; } function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) { return { warnHtmlMessage, onError: (err) => { errorDetector && errorDetector(err); { const message = `Message compilation error: ${err.message}`; const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset); const emitter = context.__v_emitter; if (emitter) { emitter.emit("compile-error", { message: source, error: err.message, start: err.location && err.location.start.offset, end: err.location && err.location.end.offset, groupId: `${"translate"}:${key}` }); } console.error(codeFrame ? `${message} ${codeFrame}` : message); } }, onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2) }; } function getMessageContextOptions(context, locale, message, options) { const { modifiers, pluralRules } = context; const resolveMessage = (key) => { const val = resolveValue(message, key); if (isString(val)) { let occurred = false; const errorDetector = () => { occurred = true; }; const msg = compileMessageFormat(context, key, locale, val, key, errorDetector); return !occurred ? msg : NOOP_MESSAGE_FUNCTION; } else if (isMessageFunction(val)) { return val; } else { return NOOP_MESSAGE_FUNCTION; } }; const ctxOptions = { locale, modifiers, pluralRules, messages: resolveMessage }; if (context.processor) { ctxOptions.processor = context.processor; } if (options.list) { ctxOptions.list = options.list; } if (options.named) { ctxOptions.named = options.named; } if (isNumber(options.plural)) { ctxOptions.pluralIndex = options.plural; } return ctxOptions; } const intlDefined = typeof Intl !== "undefined"; const Availabilities = { dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined", numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined" }; function datetime(context, ...args) { const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context; const { __datetimeFormatters } = context; if (!Availabilities.dateTimeFormat) { onWarn(getWarnMessage$1( 4 /* CANNOT_FORMAT_DATE */ )); return MISSING_RESOLVE_VALUE; } const [key, value, options, overrides] = parseDateTimeArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const part = !!options.part; const locale = isString(options.locale) ? options.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString(key) || key === "") { return new Intl.DateTimeFormat(locale).format(value); } let datetimeFormat = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type = "datetime format"; for (let i2 = 0; i2 < locales.length; i2++) { targetLocale = to = locales[i2]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(5, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type, key, from, to, groupId: `${type}:${key}` }); } } datetimeFormat = datetimeFormats[targetLocale] || {}; format2 = datetimeFormat[key]; if (isPlainObject(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type); from = to; } if (!isPlainObject(format2) || !isString(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __datetimeFormatters.get(id); if (!formatter) { formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides)); __datetimeFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } function parseDateTimeArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options = {}; let overrides = {}; let value; if (isString(arg1)) { if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } value = new Date(arg1); try { value.toISOString(); } catch (e2) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } } else if (isDate(arg1)) { if (isNaN(arg1.getTime())) { throw createCoreError( 15 /* INVALID_DATE_ARGUMENT */ ); } value = arg1; } else if (isNumber(arg1)) { value = arg1; } else { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } if (isString(arg2)) { options.key = arg2; } else if (isPlainObject(arg2)) { options = arg2; } if (isString(arg3)) { options.locale = arg3; } else if (isPlainObject(arg3)) { overrides = arg3; } if (isPlainObject(arg4)) { overrides = arg4; } return [options.key || "", value, options, overrides]; } function clearDateTimeFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__datetimeFormatters.has(id)) { continue; } context.__datetimeFormatters.delete(id); } } function number(context, ...args) { const { numberFormats, unresolving, fallbackLocale, onWarn } = context; const { __numberFormatters } = context; if (!Availabilities.numberFormat) { onWarn(getWarnMessage$1( 2 /* CANNOT_FORMAT_NUMBER */ )); return MISSING_RESOLVE_VALUE; } const [key, value, options, overrides] = parseNumberArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const part = !!options.part; const locale = isString(options.locale) ? options.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString(key) || key === "") { return new Intl.NumberFormat(locale).format(value); } let numberFormat = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type = "number format"; for (let i2 = 0; i2 < locales.length; i2++) { targetLocale = to = locales[i2]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(3, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type, key, from, to, groupId: `${type}:${key}` }); } } numberFormat = numberFormats[targetLocale] || {}; format2 = numberFormat[key]; if (isPlainObject(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type); from = to; } if (!isPlainObject(format2) || !isString(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __numberFormatters.get(id); if (!formatter) { formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides)); __numberFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } function parseNumberArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options = {}; let overrides = {}; if (!isNumber(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const value = arg1; if (isString(arg2)) { options.key = arg2; } else if (isPlainObject(arg2)) { options = arg2; } if (isString(arg3)) { options.locale = arg3; } else if (isPlainObject(arg3)) { overrides = arg3; } if (isPlainObject(arg4)) { overrides = arg4; } return [options.key || "", value, options, overrides]; } function clearNumberFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__numberFormatters.has(id)) { continue; } context.__numberFormatters.delete(id); } } /*! * @intlify/vue-devtools v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const VueDevToolsLabels = { [ "vue-devtools-plugin-vue-i18n" /* PLUGIN */ ]: "Vue I18n devtools", [ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ]: "I18n Resources", [ "vue-i18n-timeline" /* TIMELINE */ ]: "Vue I18n" }; const VueDevToolsPlaceholders = { [ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ]: "Search for scopes ..." }; const VueDevToolsTimelineColors = { [ "vue-i18n-timeline" /* TIMELINE */ ]: 16764185 }; /*! * vue-i18n v9.1.9 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const VERSION = "9.1.9"; function initFeatureFlags() { let needWarn = false; { needWarn = true; } if (needWarn) { console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`); } } const warnMessages = { [ 6 /* FALLBACK_TO_ROOT */ ]: `Fall back to {type} '{key}' with root locale.`, [ 7 /* NOT_SUPPORTED_PRESERVE */ ]: `Not supported 'preserve'.`, [ 8 /* NOT_SUPPORTED_FORMATTER */ ]: `Not supported 'formatter'.`, [ 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ ]: `Not supported 'preserveDirectiveContent'.`, [ 10 /* NOT_SUPPORTED_GET_CHOICE_INDEX */ ]: `Not supported 'getChoiceIndex'.`, [ 11 /* COMPONENT_NAME_LEGACY_COMPATIBLE */ ]: `Component name legacy compatible: '{name}' -> 'i18n'`, [ 12 /* NOT_FOUND_PARENT_SCOPE */ ]: `Not found parent scope. use the global scope.` }; function getWarnMessage(code, ...args) { return format(warnMessages[code], ...args); } function createI18nError(code, ...args) { return createCompileError(code, null, { messages: errorMessages, args }); } const errorMessages = { [ 14 /* UNEXPECTED_RETURN_TYPE */ ]: "Unexpected return type in composer", [ 15 /* INVALID_ARGUMENT */ ]: "Invalid argument", [ 16 /* MUST_BE_CALL_SETUP_TOP */ ]: "Must be called at the top of a `setup` function", [ 17 /* NOT_INSLALLED */ ]: "Need to install with `app.use` function", [ 22 /* UNEXPECTED_ERROR */ ]: "Unexpected error", [ 18 /* NOT_AVAILABLE_IN_LEGACY_MODE */ ]: "Not available in legacy mode", [ 19 /* REQUIRED_VALUE */ ]: `Required in value: {0}`, [ 20 /* INVALID_VALUE */ ]: `Invalid value`, [ 21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */ ]: `Cannot setup vue-devtools plugin` }; const DEVTOOLS_META = "__INTLIFY_META__"; const TransrateVNodeSymbol = makeSymbol("__transrateVNode"); const DatetimePartsSymbol = makeSymbol("__datetimeParts"); const NumberPartsSymbol = makeSymbol("__numberParts"); const EnableEmitter = makeSymbol("__enableEmitter"); const DisableEmitter = makeSymbol("__disableEmitter"); const SetPluralRulesSymbol = makeSymbol("__setPluralRules"); const InejctWithOption = makeSymbol("__injectWithOption"); let composerID = 0; function defineCoreMissingHandler(missing) { return (ctx, locale, key, type) => { return missing(locale, key, vue.getCurrentInstance() || void 0, type); }; } function getLocaleMessages(locale, options) { const { messages: messages2, __i18n } = options; const ret = isPlainObject(messages2) ? messages2 : isArray(__i18n) ? {} : { [locale]: {} }; if (isArray(__i18n)) { __i18n.forEach(({ locale: locale2, resource }) => { if (locale2) { ret[locale2] = ret[locale2] || {}; deepCopy(resource, ret[locale2]); } else { deepCopy(resource, ret); } }); } if (options.flatJson) { for (const key in ret) { if (hasOwn$1(ret, key)) { handleFlatJson(ret[key]); } } } return ret; } const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray(val); function deepCopy(src, des) { if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) { throw createI18nError( 20 /* INVALID_VALUE */ ); } for (const key in src) { if (hasOwn$1(src, key)) { if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) { des[key] = src[key]; } else { deepCopy(src[key], des[key]); } } } } const getMetaInfo = () => { const instance = vue.getCurrentInstance(); return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null; }; function createComposer(options = {}) { const { __root } = options; const _isGlobal = __root === void 0; let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true; const _locale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : "en-US" ); const _fallbackLocale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value ); const _messages = vue.ref(getLocaleMessages(_locale.value, options)); const _datetimeFormats = vue.ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} }); const _numberFormats = vue.ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} }); let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true; let _fallbackFormat = !!options.fallbackFormat; let _missing = isFunction(options.missing) ? options.missing : null; let _runtimeMissing = isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null; let _postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null; let _warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; let _escapeParameter = !!options.escapeParameter; const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {}; let _pluralRules = options.pluralRules || __root && __root.pluralRules; let _context; function getCoreContext() { return createCoreContext({ version: VERSION, locale: _locale.value, fallbackLocale: _fallbackLocale.value, messages: _messages.value, messageCompiler: function compileToFunction(source) { return (ctx) => { return ctx.normalize([source]); }; }, datetimeFormats: _datetimeFormats.value, numberFormats: _numberFormats.value, modifiers: _modifiers, pluralRules: _pluralRules, missing: _runtimeMissing === null ? void 0 : _runtimeMissing, missingWarn: _missingWarn, fallbackWarn: _fallbackWarn, fallbackFormat: _fallbackFormat, unresolving: true, postTranslation: _postTranslation === null ? void 0 : _postTranslation, warnHtmlMessage: _warnHtmlMessage, escapeParameter: _escapeParameter, __datetimeFormatters: isPlainObject(_context) ? _context.__datetimeFormatters : void 0, __numberFormatters: isPlainObject(_context) ? _context.__numberFormatters : void 0, __v_emitter: isPlainObject(_context) ? _context.__v_emitter : void 0, __meta: { framework: "vue" } }); } _context = getCoreContext(); updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); function trackReactivityValues() { return [ _locale.value, _fallbackLocale.value, _messages.value, _datetimeFormats.value, _numberFormats.value ]; } const locale = vue.computed({ get: () => _locale.value, set: (val) => { _locale.value = val; _context.locale = _locale.value; } }); const fallbackLocale = vue.computed({ get: () => _fallbackLocale.value, set: (val) => { _fallbackLocale.value = val; _context.fallbackLocale = _fallbackLocale.value; updateFallbackLocale(_context, _locale.value, val); } }); const messages2 = vue.computed(() => _messages.value); const datetimeFormats = vue.computed(() => _datetimeFormats.value); const numberFormats = vue.computed(() => _numberFormats.value); function getPostTranslationHandler() { return isFunction(_postTranslation) ? _postTranslation : null; } function setPostTranslationHandler(handler) { _postTranslation = handler; _context.postTranslation = handler; } function getMissingHandler() { return _missing; } function setMissingHandler(handler) { if (handler !== null) { _runtimeMissing = defineCoreMissingHandler(handler); } _missing = handler; _context.missing = _runtimeMissing; } function isResolvedTranslateMessage(type, arg) { return type !== "translate" || !!arg.resolvedMessage === false; } function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) { trackReactivityValues(); let ret; { try { setAdditionalMeta(getMetaInfo()); ret = fn(_context); } finally { setAdditionalMeta(null); } } if (isNumber(ret) && ret === NOT_REOSLVED) { const [key, arg2] = argumentParser(); if (__root && isString(key) && isResolvedTranslateMessage(warnType, arg2)) { if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) { warn(getWarnMessage(6, { key, type: warnType })); } { const { __v_emitter: emitter } = _context; if (emitter && _fallbackRoot) { emitter.emit("fallback", { type: warnType, key, to: "global", groupId: `${warnType}:${key}` }); } } } return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key); } else if (successCondition(ret)) { return ret; } else { throw createI18nError( 14 /* UNEXPECTED_RETURN_TYPE */ ); } } function t2(...args) { return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString(val)); } function rt2(...args) { const [arg1, arg2, arg3] = args; if (arg3 && !isObject$1(arg3)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } return t2(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]); } function d2(...args) { return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val)); } function n2(...args) { return wrapWithDeps((context) => number(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val)); } function normalize(values) { return values.map((val) => isString(val) ? vue.createVNode(vue.Text, null, val, 0) : val); } const interpolate = (val) => val; const processor = { normalize, interpolate, type: "vnode" }; function transrateVNode(...args) { return wrapWithDeps( (context) => { let ret; const _context2 = context; try { _context2.processor = processor; ret = translate(_context2, ...args); } finally { _context2.processor = null; } return ret; }, () => parseTranslateArgs(...args), "translate", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[TransrateVNodeSymbol](...args), (key) => [vue.createVNode(vue.Text, null, key, 0)], (val) => isArray(val) ); } function numberParts(...args) { return wrapWithDeps( (context) => number(context, ...args), () => parseNumberArgs(...args), "number format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[NumberPartsSymbol](...args), () => [], (val) => isString(val) || isArray(val) ); } function datetimeParts(...args) { return wrapWithDeps( (context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[DatetimePartsSymbol](...args), () => [], (val) => isString(val) || isArray(val) ); } function setPluralRules(rules) { _pluralRules = rules; _context.pluralRules = _pluralRules; } function te2(key, locale2) { const targetLocale = isString(locale2) ? locale2 : _locale.value; const message = getLocaleMessage(targetLocale); return resolveValue(message, key) !== null; } function resolveMessages(key) { let messages22 = null; const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value); for (let i2 = 0; i2 < locales.length; i2++) { const targetLocaleMessages = _messages.value[locales[i2]] || {}; const messageValue = resolveValue(targetLocaleMessages, key); if (messageValue != null) { messages22 = messageValue; break; } } return messages22; } function tm(key) { const messages22 = resolveMessages(key); return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {}; } function getLocaleMessage(locale2) { return _messages.value[locale2] || {}; } function setLocaleMessage(locale2, message) { _messages.value[locale2] = message; _context.messages = _messages.value; } function mergeLocaleMessage(locale2, message) { _messages.value[locale2] = _messages.value[locale2] || {}; deepCopy(message, _messages.value[locale2]); _context.messages = _messages.value; } function getDateTimeFormat(locale2) { return _datetimeFormats.value[locale2] || {}; } function setDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = format2; _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function mergeDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2); _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function getNumberFormat(locale2) { return _numberFormats.value[locale2] || {}; } function setNumberFormat(locale2, format2) { _numberFormats.value[locale2] = format2; _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } function mergeNumberFormat(locale2, format2) { _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2); _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } composerID++; if (__root) { vue.watch(__root.locale, (val) => { if (_inheritLocale) { _locale.value = val; _context.locale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); vue.watch(__root.fallbackLocale, (val) => { if (_inheritLocale) { _fallbackLocale.value = val; _context.fallbackLocale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); } const composer = { id: composerID, locale, fallbackLocale, get inheritLocale() { return _inheritLocale; }, set inheritLocale(val) { _inheritLocale = val; if (val && __root) { _locale.value = __root.locale.value; _fallbackLocale.value = __root.fallbackLocale.value; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }, get availableLocales() { return Object.keys(_messages.value).sort(); }, messages: messages2, datetimeFormats, numberFormats, get modifiers() { return _modifiers; }, get pluralRules() { return _pluralRules || {}; }, get isGlobal() { return _isGlobal; }, get missingWarn() { return _missingWarn; }, set missingWarn(val) { _missingWarn = val; _context.missingWarn = _missingWarn; }, get fallbackWarn() { return _fallbackWarn; }, set fallbackWarn(val) { _fallbackWarn = val; _context.fallbackWarn = _fallbackWarn; }, get fallbackRoot() { return _fallbackRoot; }, set fallbackRoot(val) { _fallbackRoot = val; }, get fallbackFormat() { return _fallbackFormat; }, set fallbackFormat(val) { _fallbackFormat = val; _context.fallbackFormat = _fallbackFormat; }, get warnHtmlMessage() { return _warnHtmlMessage; }, set warnHtmlMessage(val) { _warnHtmlMessage = val; _context.warnHtmlMessage = val; }, get escapeParameter() { return _escapeParameter; }, set escapeParameter(val) { _escapeParameter = val; _context.escapeParameter = val; }, t: t2, rt: rt2, d: d2, n: n2, te: te2, tm, getLocaleMessage, setLocaleMessage, mergeLocaleMessage, getDateTimeFormat, setDateTimeFormat, mergeDateTimeFormat, getNumberFormat, setNumberFormat, mergeNumberFormat, getPostTranslationHandler, setPostTranslationHandler, getMissingHandler, setMissingHandler, [TransrateVNodeSymbol]: transrateVNode, [NumberPartsSymbol]: numberParts, [DatetimePartsSymbol]: datetimeParts, [SetPluralRulesSymbol]: setPluralRules, [InejctWithOption]: options.__injectWithOption // eslint-disable-line @typescript-eslint/no-explicit-any }; { composer[EnableEmitter] = (emitter) => { _context.__v_emitter = emitter; }; composer[DisableEmitter] = () => { _context.__v_emitter = void 0; }; } return composer; } function convertComposerOptions(options) { const locale = isString(options.locale) ? options.locale : "en-US"; const fallbackLocale = isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale; const missing = isFunction(options.missing) ? options.missing : void 0; const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true; const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true; const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true; const fallbackFormat = !!options.formatFallbackMessages; const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {}; const pluralizationRules = options.pluralizationRules; const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : void 0; const warnHtmlMessage = isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true; const escapeParameter = !!options.escapeParameterHtml; const inheritLocale = isBoolean(options.sync) ? options.sync : true; if (options.formatter) { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); } if (options.preserveDirectiveContent) { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); } let messages2 = options.messages; if (isPlainObject(options.sharedMessages)) { const sharedMessages = options.sharedMessages; const locales = Object.keys(sharedMessages); messages2 = locales.reduce((messages22, locale2) => { const message = messages22[locale2] || (messages22[locale2] = {}); assign(message, sharedMessages[locale2]); return messages22; }, messages2 || {}); } const { __i18n, __root, __injectWithOption } = options; const datetimeFormats = options.datetimeFormats; const numberFormats = options.numberFormats; const flatJson = options.flatJson; return { locale, fallbackLocale, messages: messages2, flatJson, datetimeFormats, numberFormats, missing, missingWarn, fallbackWarn, fallbackRoot, fallbackFormat, modifiers, pluralRules: pluralizationRules, postTranslation, warnHtmlMessage, escapeParameter, inheritLocale, __i18n, __root, __injectWithOption }; } function createVueI18n(options = {}) { const composer = createComposer(convertComposerOptions(options)); const vueI18n = { // id id: composer.id, // locale get locale() { return composer.locale.value; }, set locale(val) { composer.locale.value = val; }, // fallbackLocale get fallbackLocale() { return composer.fallbackLocale.value; }, set fallbackLocale(val) { composer.fallbackLocale.value = val; }, // messages get messages() { return composer.messages.value; }, // datetimeFormats get datetimeFormats() { return composer.datetimeFormats.value; }, // numberFormats get numberFormats() { return composer.numberFormats.value; }, // availableLocales get availableLocales() { return composer.availableLocales; }, // formatter get formatter() { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); return { interpolate() { return []; } }; }, set formatter(val) { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); }, // missing get missing() { return composer.getMissingHandler(); }, set missing(handler) { composer.setMissingHandler(handler); }, // silentTranslationWarn get silentTranslationWarn() { return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn; }, set silentTranslationWarn(val) { composer.missingWarn = isBoolean(val) ? !val : val; }, // silentFallbackWarn get silentFallbackWarn() { return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn; }, set silentFallbackWarn(val) { composer.fallbackWarn = isBoolean(val) ? !val : val; }, // modifiers get modifiers() { return composer.modifiers; }, // formatFallbackMessages get formatFallbackMessages() { return composer.fallbackFormat; }, set formatFallbackMessages(val) { composer.fallbackFormat = val; }, // postTranslation get postTranslation() { return composer.getPostTranslationHandler(); }, set postTranslation(handler) { composer.setPostTranslationHandler(handler); }, // sync get sync() { return composer.inheritLocale; }, set sync(val) { composer.inheritLocale = val; }, // warnInHtmlMessage get warnHtmlInMessage() { return composer.warnHtmlMessage ? "warn" : "off"; }, set warnHtmlInMessage(val) { composer.warnHtmlMessage = val !== "off"; }, // escapeParameterHtml get escapeParameterHtml() { return composer.escapeParameter; }, set escapeParameterHtml(val) { composer.escapeParameter = val; }, // preserveDirectiveContent get preserveDirectiveContent() { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); return true; }, set preserveDirectiveContent(val) { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); }, // pluralizationRules get pluralizationRules() { return composer.pluralRules || {}; }, // for internal __composer: composer, // t t(...args) { const [arg1, arg2, arg3] = args; const options2 = {}; let list = null; let named = null; if (!isString(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString(arg2)) { options2.locale = arg2; } else if (isArray(arg2)) { list = arg2; } else if (isPlainObject(arg2)) { named = arg2; } if (isArray(arg3)) { list = arg3; } else if (isPlainObject(arg3)) { named = arg3; } return composer.t(key, list || named || {}, options2); }, rt(...args) { return composer.rt(...args); }, // tc tc(...args) { const [arg1, arg2, arg3] = args; const options2 = { plural: 1 }; let list = null; let named = null; if (!isString(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString(arg2)) { options2.locale = arg2; } else if (isNumber(arg2)) { options2.plural = arg2; } else if (isArray(arg2)) { list = arg2; } else if (isPlainObject(arg2)) { named = arg2; } if (isString(arg3)) { options2.locale = arg3; } else if (isArray(arg3)) { list = arg3; } else if (isPlainObject(arg3)) { named = arg3; } return composer.t(key, list || named || {}, options2); }, // te te(key, locale) { return composer.te(key, locale); }, // tm tm(key) { return composer.tm(key); }, // getLocaleMessage getLocaleMessage(locale) { return composer.getLocaleMessage(locale); }, // setLocaleMessage setLocaleMessage(locale, message) { composer.setLocaleMessage(locale, message); }, // mergeLocaleMessage mergeLocaleMessage(locale, message) { composer.mergeLocaleMessage(locale, message); }, // d d(...args) { return composer.d(...args); }, // getDateTimeFormat getDateTimeFormat(locale) { return composer.getDateTimeFormat(locale); }, // setDateTimeFormat setDateTimeFormat(locale, format2) { composer.setDateTimeFormat(locale, format2); }, // mergeDateTimeFormat mergeDateTimeFormat(locale, format2) { composer.mergeDateTimeFormat(locale, format2); }, // n n(...args) { return composer.n(...args); }, // getNumberFormat getNumberFormat(locale) { return composer.getNumberFormat(locale); }, // setNumberFormat setNumberFormat(locale, format2) { composer.setNumberFormat(locale, format2); }, // mergeNumberFormat mergeNumberFormat(locale, format2) { composer.mergeNumberFormat(locale, format2); }, // getChoiceIndex // eslint-disable-next-line @typescript-eslint/no-unused-vars getChoiceIndex(choice, choicesLength) { warn(getWarnMessage( 10 /* NOT_SUPPORTED_GET_CHOICE_INDEX */ )); return -1; }, // for internal __onComponentInstanceCreated(target) { const { componentInstanceCreatedListener } = options; if (componentInstanceCreatedListener) { componentInstanceCreatedListener(target, vueI18n); } } }; { vueI18n.__enableEmitter = (emitter) => { const __composer = composer; __composer[EnableEmitter] && __composer[EnableEmitter](emitter); }; vueI18n.__disableEmitter = () => { const __composer = composer; __composer[DisableEmitter] && __composer[DisableEmitter](); }; } return vueI18n; } const baseFormatProps = { tag: { type: [String, Object] }, locale: { type: String }, scope: { type: String, validator: (val) => val === "parent" || val === "global", default: "parent" }, i18n: { type: Object } }; const Translation = { /* eslint-disable */ name: "i18n-t", props: assign({ keypath: { type: String, required: true }, plural: { type: [Number, String], // eslint-disable-next-line @typescript-eslint/no-explicit-any validator: (val) => isNumber(val) || !isNaN(val) } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const { slots, attrs } = context; const i18n2 = props.i18n || useI18n({ useScope: props.scope, __useComponent: true }); const keys = Object.keys(slots).filter((key) => key !== "_"); return () => { const options = {}; if (props.locale) { options.locale = props.locale; } if (props.plural !== void 0) { options.plural = isString(props.plural) ? +props.plural : props.plural; } const arg = getInterpolateArg(context, keys); const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options); const assignedAttrs = assign({}, attrs); return isString(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children); }; } }; function getInterpolateArg({ slots }, keys) { if (keys.length === 1 && keys[0] === "default") { return slots.default ? slots.default() : []; } else { return keys.reduce((arg, key) => { const slot = slots[key]; if (slot) { arg[key] = slot(); } return arg; }, {}); } } function renderFormatter(props, context, slotKeys, partFormatter) { const { slots, attrs } = context; return () => { const options = { part: true }; let overrides = {}; if (props.locale) { options.locale = props.locale; } if (isString(props.format)) { options.key = props.format; } else if (isObject$1(props.format)) { if (isString(props.format.key)) { options.key = props.format.key; } overrides = Object.keys(props.format).reduce((options2, prop) => { return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2; }, {}); } const parts = partFormatter(...[props.value, options, overrides]); let children = [options.key]; if (isArray(parts)) { children = parts.map((part, index) => { const slot = slots[part.type]; return slot ? slot({ [part.type]: part.value, index, parts }) : [part.value]; }); } else if (isString(parts)) { children = [parts]; } const assignedAttrs = assign({}, attrs); return isString(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children); }; } const NUMBER_FORMAT_KEYS = [ "localeMatcher", "style", "unit", "unitDisplay", "currency", "currencyDisplay", "useGrouping", "numberingSystem", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "notation", "formatMatcher" ]; const NumberFormat = { /* eslint-disable */ name: "i18n-n", props: assign({ value: { type: Number, required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n2[NumberPartsSymbol](...args) )); } }; const DATETIME_FORMAT_KEYS = [ "dateStyle", "timeStyle", "fractionalSecondDigits", "calendar", "dayPeriod", "numberingSystem", "localeMatcher", "timeZone", "hour12", "hourCycle", "formatMatcher", "weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName" ]; const DatetimeFormat = { /* eslint-disable */ name: "i18n-d", props: assign({ value: { type: [Number, Date], required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n2[DatetimePartsSymbol](...args) )); } }; function getComposer$2(i18n2, instance) { const i18nInternal = i18n2; if (i18n2.mode === "composition") { return i18nInternal.__getInstance(instance) || i18n2.global; } else { const vueI18n = i18nInternal.__getInstance(instance); return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer; } } function vTDirective(i18n2) { const bind = (el, { instance, value, modifiers }) => { if (!instance || !instance.$) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const composer = getComposer$2(i18n2, instance.$); if (modifiers.preserve) { warn(getWarnMessage( 7 /* NOT_SUPPORTED_PRESERVE */ )); } const parsedValue = parseValue(value); el.textContent = composer.t(...makeParams(parsedValue)); }; return { beforeMount: bind, beforeUpdate: bind }; } function parseValue(value) { if (isString(value)) { return { path: value }; } else if (isPlainObject(value)) { if (!("path" in value)) { throw createI18nError(19, "path"); } return value; } else { throw createI18nError( 20 /* INVALID_VALUE */ ); } } function makeParams(value) { const { path, locale, args, choice, plural } = value; const options = {}; const named = args || {}; if (isString(locale)) { options.locale = locale; } if (isNumber(choice)) { options.plural = choice; } if (isNumber(plural)) { options.plural = plural; } return [path, named, options]; } function apply(app, i18n2, ...options) { const pluginOptions = isPlainObject(options[0]) ? options[0] : {}; const useI18nComponentName = !!pluginOptions.useI18nComponentName; const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true; if (globalInstall && useI18nComponentName) { warn(getWarnMessage(11, { name: Translation.name })); } if (globalInstall) { app.component(!useI18nComponentName ? Translation.name : "i18n", Translation); app.component(NumberFormat.name, NumberFormat); app.component(DatetimeFormat.name, DatetimeFormat); } app.directive("t", vTDirective(i18n2)); } const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties"; let devtoolsApi; async function enableDevTools(app, i18n2) { return new Promise((resolve, reject) => { try { setupDevtoolsPlugin({ id: "vue-devtools-plugin-vue-i18n", label: VueDevToolsLabels[ "vue-devtools-plugin-vue-i18n" /* PLUGIN */ ], packageName: "vue-i18n", homepage: "https://vue-i18n.intlify.dev", logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png", componentStateTypes: [VUE_I18N_COMPONENT_TYPES], app }, (api) => { devtoolsApi = api; api.on.visitComponentTree(({ componentInstance, treeNode }) => { updateComponentTreeTags(componentInstance, treeNode, i18n2); }); api.on.inspectComponent(({ componentInstance, instanceData }) => { if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) { if (i18n2.mode === "legacy") { if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) { inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__); } } else { inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__); } } }); api.addInspector({ id: "vue-i18n-resource-inspector", label: VueDevToolsLabels[ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ], icon: "language", treeFilterPlaceholder: VueDevToolsPlaceholders[ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ] }); api.on.getInspectorTree((payload) => { if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") { registerScope(payload, i18n2); } }); api.on.getInspectorState((payload) => { if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") { inspectScope(payload, i18n2); } }); api.on.editInspectorState((payload) => { if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") { editScope(payload, i18n2); } }); api.addTimelineLayer({ id: "vue-i18n-timeline", label: VueDevToolsLabels[ "vue-i18n-timeline" /* TIMELINE */ ], color: VueDevToolsTimelineColors[ "vue-i18n-timeline" /* TIMELINE */ ] }); resolve(true); }); } catch (e2) { console.error(e2); reject(false); } }); } function updateComponentTreeTags(instance, treeNode, i18n2) { const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; if (instance && instance.vnode.el.__VUE_I18N__) { if (instance.vnode.el.__VUE_I18N__ !== global2) { const label = instance.type.name || instance.type.displayName || instance.type.__file; const tag = { label: `i18n (${label} Scope)`, textColor: 0, backgroundColor: 16764185 }; treeNode.tags.push(tag); } } } function inspectComposer(instanceData, composer) { const type = VUE_I18N_COMPONENT_TYPES; instanceData.state.push({ type, key: "locale", editable: true, value: composer.locale.value }); instanceData.state.push({ type, key: "availableLocales", editable: false, value: composer.availableLocales }); instanceData.state.push({ type, key: "fallbackLocale", editable: true, value: composer.fallbackLocale.value }); instanceData.state.push({ type, key: "inheritLocale", editable: true, value: composer.inheritLocale }); instanceData.state.push({ type, key: "messages", editable: false, value: getLocaleMessageValue(composer.messages.value) }); instanceData.state.push({ type, key: "datetimeFormats", editable: false, value: composer.datetimeFormats.value }); instanceData.state.push({ type, key: "numberFormats", editable: false, value: composer.numberFormats.value }); } function getLocaleMessageValue(messages2) { const value = {}; Object.keys(messages2).forEach((key) => { const v2 = messages2[key]; if (isFunction(v2) && "source" in v2) { value[key] = getMessageFunctionDetails(v2); } else if (isObject$1(v2)) { value[key] = getLocaleMessageValue(v2); } else { value[key] = v2; } }); return value; } const ESC = { "<": "<", ">": ">", '"': """, "&": "&" }; function escape$1(s2) { return s2.replace(/[<>"&]/g, escapeChar); } function escapeChar(a2) { return ESC[a2] || a2; } function getMessageFunctionDetails(func) { const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`; return { _custom: { type: "function", display: `ƒ ${argString}` } }; } function registerScope(payload, i18n2) { payload.rootNodes.push({ id: "global", label: "Global Scope" }); const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; for (const [keyInstance, instance] of i18n2.__instances) { const composer = i18n2.mode === "composition" ? instance : instance.__composer; if (global2 === composer) { continue; } const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file; payload.rootNodes.push({ id: composer.id.toString(), label: `${label} Scope` }); } } function getComposer$1(nodeId, i18n2) { if (nodeId === "global") { return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; } else { const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId); if (instance) { return i18n2.mode === "composition" ? instance : instance.__composer; } else { return null; } } } function inspectScope(payload, i18n2) { const composer = getComposer$1(payload.nodeId, i18n2); if (composer) { payload.state = makeScopeInspectState(composer); } } function makeScopeInspectState(composer) { const state2 = {}; const localeType = "Locale related info"; const localeStates = [ { type: localeType, key: "locale", editable: true, value: composer.locale.value }, { type: localeType, key: "fallbackLocale", editable: true, value: composer.fallbackLocale.value }, { type: localeType, key: "availableLocales", editable: false, value: composer.availableLocales }, { type: localeType, key: "inheritLocale", editable: true, value: composer.inheritLocale } ]; state2[localeType] = localeStates; const localeMessagesType = "Locale messages info"; const localeMessagesStates = [ { type: localeMessagesType, key: "messages", editable: false, value: getLocaleMessageValue(composer.messages.value) } ]; state2[localeMessagesType] = localeMessagesStates; const datetimeFormatsType = "Datetime formats info"; const datetimeFormatsStates = [ { type: datetimeFormatsType, key: "datetimeFormats", editable: false, value: composer.datetimeFormats.value } ]; state2[datetimeFormatsType] = datetimeFormatsStates; const numberFormatsType = "Datetime formats info"; const numberFormatsStates = [ { type: numberFormatsType, key: "numberFormats", editable: false, value: composer.numberFormats.value } ]; state2[numberFormatsType] = numberFormatsStates; return state2; } function addTimelineEvent(event, payload) { if (devtoolsApi) { let groupId; if (payload && "groupId" in payload) { groupId = payload.groupId; delete payload.groupId; } devtoolsApi.addTimelineEvent({ layerId: "vue-i18n-timeline", event: { title: event, groupId, time: Date.now(), meta: {}, data: payload || {}, logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default" } }); } } function editScope(payload, i18n2) { const composer = getComposer$1(payload.nodeId, i18n2); if (composer) { const [field] = payload.path; if (field === "locale" && isString(payload.state.value)) { composer.locale.value = payload.state.value; } else if (field === "fallbackLocale" && (isString(payload.state.value) || isArray(payload.state.value) || isObject$1(payload.state.value))) { composer.fallbackLocale.value = payload.state.value; } else if (field === "inheritLocale" && isBoolean(payload.state.value)) { composer.inheritLocale = payload.state.value; } } } function defineMixin(vuei18n, composer, i18n2) { return { beforeCreate() { const instance = vue.getCurrentInstance(); if (!instance) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const options = this.$options; if (options.i18n) { const optionsI18n = options.i18n; if (options.__i18n) { optionsI18n.__i18n = options.__i18n; } optionsI18n.__root = composer; if (this === this.$root) { this.$i18n = mergeToRoot(vuei18n, optionsI18n); } else { optionsI18n.__injectWithOption = true; this.$i18n = createVueI18n(optionsI18n); } } else if (options.__i18n) { if (this === this.$root) { this.$i18n = mergeToRoot(vuei18n, options); } else { this.$i18n = createVueI18n({ __i18n: options.__i18n, __injectWithOption: true, __root: composer }); } } else { this.$i18n = vuei18n; } vuei18n.__onComponentInstanceCreated(this.$i18n); i18n2.__setInstance(instance, this.$i18n); this.$t = (...args) => this.$i18n.t(...args); this.$rt = (...args) => this.$i18n.rt(...args); this.$tc = (...args) => this.$i18n.tc(...args); this.$te = (key, locale) => this.$i18n.te(key, locale); this.$d = (...args) => this.$i18n.d(...args); this.$n = (...args) => this.$i18n.n(...args); this.$tm = (key) => this.$i18n.tm(key); }, mounted() { { this.$el.__VUE_I18N__ = this.$i18n.__composer; const emitter = this.__v_emitter = createEmitter(); const _vueI18n = this.$i18n; _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter); emitter.on("*", addTimelineEvent); } }, beforeUnmount() { const instance = vue.getCurrentInstance(); if (!instance) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } { if (this.__v_emitter) { this.__v_emitter.off("*", addTimelineEvent); delete this.__v_emitter; } const _vueI18n = this.$i18n; _vueI18n.__disableEmitter && _vueI18n.__disableEmitter(); delete this.$el.__VUE_I18N__; } delete this.$t; delete this.$rt; delete this.$tc; delete this.$te; delete this.$d; delete this.$n; delete this.$tm; i18n2.__deleteInstance(instance); delete this.$i18n; } }; } function mergeToRoot(root, options) { root.locale = options.locale || root.locale; root.fallbackLocale = options.fallbackLocale || root.fallbackLocale; root.missing = options.missing || root.missing; root.silentTranslationWarn = options.silentTranslationWarn || root.silentFallbackWarn; root.silentFallbackWarn = options.silentFallbackWarn || root.silentFallbackWarn; root.formatFallbackMessages = options.formatFallbackMessages || root.formatFallbackMessages; root.postTranslation = options.postTranslation || root.postTranslation; root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage; root.escapeParameterHtml = options.escapeParameterHtml || root.escapeParameterHtml; root.sync = options.sync || root.sync; root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules); const messages2 = getLocaleMessages(root.locale, { messages: options.messages, __i18n: options.__i18n }); Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale])); if (options.datetimeFormats) { Object.keys(options.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale])); } if (options.numberFormats) { Object.keys(options.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options.numberFormats[locale])); } return root; } function createI18n(options = {}) { const __legacyMode = isBoolean(options.legacy) ? options.legacy : true; const __globalInjection = !!options.globalInjection; const __instances = /* @__PURE__ */ new Map(); const __global = __legacyMode ? createVueI18n(options) : createComposer(options); const symbol = makeSymbol("vue-i18n"); const i18n2 = { // mode get mode() { return __legacyMode ? "legacy" : "composition"; }, // install plugin async install(app, ...options2) { { app.__VUE_I18N__ = i18n2; } app.__VUE_I18N_SYMBOL__ = symbol; app.provide(app.__VUE_I18N_SYMBOL__, i18n2); if (!__legacyMode && __globalInjection) { injectGlobalFields(app, i18n2.global); } { apply(app, i18n2, ...options2); } if (__legacyMode) { app.mixin(defineMixin(__global, __global.__composer, i18n2)); } { const ret = await enableDevTools(app, i18n2); if (!ret) { throw createI18nError( 21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */ ); } const emitter = createEmitter(); if (__legacyMode) { const _vueI18n = __global; _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter); } else { const _composer = __global; _composer[EnableEmitter] && _composer[EnableEmitter](emitter); } emitter.on("*", addTimelineEvent); } }, // global accessor get global() { return __global; }, // @internal __instances, // @internal __getInstance(component) { return __instances.get(component) || null; }, // @internal __setInstance(component, instance) { __instances.set(component, instance); }, // @internal __deleteInstance(component) { __instances.delete(component); } }; return i18n2; } function useI18n(options = {}) { const instance = vue.getCurrentInstance(); if (instance == null) { throw createI18nError( 16 /* MUST_BE_CALL_SETUP_TOP */ ); } if (!instance.appContext.app.__VUE_I18N_SYMBOL__) { throw createI18nError( 17 /* NOT_INSLALLED */ ); } const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__); if (!i18n2) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; const scope = isEmptyObject(options) ? "__i18n" in instance.type ? "local" : "global" : !options.useScope ? "local" : options.useScope; if (scope === "global") { let messages2 = isObject$1(options.messages) ? options.messages : {}; if ("__i18nGlobal" in instance.type) { messages2 = getLocaleMessages(global2.locale.value, { messages: messages2, __i18n: instance.type.__i18nGlobal }); } const locales = Object.keys(messages2); if (locales.length) { locales.forEach((locale) => { global2.mergeLocaleMessage(locale, messages2[locale]); }); } if (isObject$1(options.datetimeFormats)) { const locales2 = Object.keys(options.datetimeFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeDateTimeFormat(locale, options.datetimeFormats[locale]); }); } } if (isObject$1(options.numberFormats)) { const locales2 = Object.keys(options.numberFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeNumberFormat(locale, options.numberFormats[locale]); }); } } return global2; } if (scope === "parent") { let composer2 = getComposer(i18n2, instance, options.__useComponent); if (composer2 == null) { { warn(getWarnMessage( 12 /* NOT_FOUND_PARENT_SCOPE */ )); } composer2 = global2; } return composer2; } if (i18n2.mode === "legacy") { throw createI18nError( 18 /* NOT_AVAILABLE_IN_LEGACY_MODE */ ); } const i18nInternal = i18n2; let composer = i18nInternal.__getInstance(instance); if (composer == null) { const type = instance.type; const composerOptions = assign({}, options); if (type.__i18n) { composerOptions.__i18n = type.__i18n; } if (global2) { composerOptions.__root = global2; } composer = createComposer(composerOptions); setupLifeCycle(i18nInternal, instance, composer); i18nInternal.__setInstance(instance, composer); } return composer; } function getComposer(i18n2, target, useComponent = false) { let composer = null; const root = target.root; let current = target.parent; while (current != null) { const i18nInternal = i18n2; if (i18n2.mode === "composition") { composer = i18nInternal.__getInstance(current); } else { const vueI18n = i18nInternal.__getInstance(current); if (vueI18n != null) { composer = vueI18n.__composer; } if (useComponent && composer && !composer[InejctWithOption]) { composer = null; } } if (composer != null) { break; } if (root === current) { break; } current = current.parent; } return composer; } function setupLifeCycle(i18n2, target, composer) { let emitter = null; vue.onMounted(() => { if (target.vnode.el) { target.vnode.el.__VUE_I18N__ = composer; emitter = createEmitter(); const _composer = composer; _composer[EnableEmitter] && _composer[EnableEmitter](emitter); emitter.on("*", addTimelineEvent); } }, target); vue.onUnmounted(() => { if (target.vnode.el && target.vnode.el.__VUE_I18N__) { emitter && emitter.off("*", addTimelineEvent); const _composer = composer; _composer[DisableEmitter] && _composer[DisableEmitter](); delete target.vnode.el.__VUE_I18N__; } i18n2.__deleteInstance(target); }, target); } const globalExportProps = [ "locale", "fallbackLocale", "availableLocales" ]; const globalExportMethods = ["t", "rt", "d", "n", "tm"]; function injectGlobalFields(app, composer) { const i18n2 = /* @__PURE__ */ Object.create(null); globalExportProps.forEach((prop) => { const desc = Object.getOwnPropertyDescriptor(composer, prop); if (!desc) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const wrap = vue.isRef(desc.value) ? { get() { return desc.value.value; }, // eslint-disable-next-line @typescript-eslint/no-explicit-any set(val) { desc.value.value = val; } } : { get() { return desc.get && desc.get(); } }; Object.defineProperty(i18n2, prop, wrap); }); app.config.globalProperties.$i18n = i18n2; globalExportMethods.forEach((method) => { const desc = Object.getOwnPropertyDescriptor(composer, method); if (!desc || !desc.value) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } Object.defineProperty(app.config.globalProperties, `$${method}`, desc); }); } { initFeatureFlags(); } { const target = getGlobalThis(); target.__INTLIFY__ = true; setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__); } class Request { constructor(options = {}) { this.baseUrl = options.baseUrl || "http://10.168.1.100"; this.url = options.url || ""; this.method = "GET"; this.data = null; this.header = options.header || {}; this.beforeRequest = null; this.afterRequest = null; } // 添加对header的支持 _mergeHeaders(customHeader = {}) { return Object.assign({}, this.header, customHeader); } get(url, data = {}, header = {}) { this.method = "GET"; this.url = this.baseUrl + url; this.data = data; this.header = this._mergeHeaders(header); return this._(); } post(url, data = {}, header = {}) { this.method = "POST"; this.url = this.baseUrl + url; this.data = data; this.header = this._mergeHeaders(header); return this._(); } put(url, data = {}) { this.method = "PUT"; this.url = this.baseUrl + url; this.data = data; return this._(); } delete(url, data = {}) { this.method = "DELETE"; this.url = this.baseUrl + url; this.data = data; return this._(); } _() { if (this.baseUrl == "") { this.url = "http://10.168.1.100" + this.url; } this.beforeRequest && typeof this.beforeRequest === "function" && this.beforeRequest(this); return new Promise((resolve, reject) => { let weixin = wx; if ("undefined" !== typeof uni) { weixin = uni; } weixin.request({ url: this.url, method: this.method, data: this.data, header: this.header, success: (res) => { resolve(res); }, fail: (err) => { reject(err); }, complete: (res) => { this.afterRequest && typeof this.afterRequest === "function" && this.afterRequest(res); } }); }); } } const $http = new Request(); const messages = { en, "zh-Hans": zhHans, "zh-Hant": zhHant }; let i18nConfig = { locale: uni.getStorageSync("userLanguage") || "zh-Hans", // 获取已设置的语言 messages }; const i18n = createI18n(i18nConfig); function createApp() { const app = vue.createVueApp(App); app.use(i18n); app.use(Store); return { app }; } uni.$http = $http; $http.baseUrl = ""; $http.beforeRequest = function(options) { }; $http.afterRequest = function() { }; const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp(); uni.Vuex = __Vuex__; uni.Pinia = __Pinia__; __app__.provide("__globalStyles", __uniConfig.styles); __app__._component.mpType = "app"; __app__._component.render = () => { }; __app__.mount("#app"); })(Vue);