mirror of
https://github.com/silenty4ng/k5web
synced 2024-11-14 14:33:23 +00:00
update
This commit is contained in:
parent
4eddac7a20
commit
797e225c12
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/arco.949c921a.js.gz
Normal file
BIN
assets/arco.949c921a.js.gz
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import{d as N_,s as Ia,i as Pa,t as z_,c as Ti,g as F_,w as Ra,a as Jh,o as V_,b as G_,h as jh,n as H_,u as W_}from"./arco.768e32d2.js";/*! *****************************************************************************
|
||||
import{d as N_,s as Ia,i as Pa,t as z_,c as Ti,g as F_,w as Ra,a as Jh,o as V_,b as G_,h as jh,n as H_,u as W_}from"./arco.949c921a.js";/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/default-layout.27536332.js.gz
Normal file
BIN
assets/default-layout.27536332.js.gz
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/dep-6deb4e3a.8b0d70b3.js.gz
Normal file
BIN
assets/dep-6deb4e3a.8b0d70b3.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/dialog.8e077a55.js.gz
Normal file
BIN
assets/dialog.8e077a55.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/form-model.480c6188.js.gz
Normal file
BIN
assets/form-model.480c6188.js.gz
Normal file
Binary file not shown.
Binary file not shown.
14
assets/helper.196ee190.js
Normal file
14
assets/helper.196ee190.js
Normal file
@ -0,0 +1,14 @@
|
||||
import{c as v,b as f}from"./useConfig.aff24c27.js";import{f as b,i as d}from"./index.ab5e1824.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function h(e){if(Array.isArray(e))return e}function m(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,i,n,o,u=[],l=!0,c=!1;try{if(n=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=n.call(r)).done)&&(u.push(a.value),u.length!==t);l=!0);}catch(s){c=!0,i=s}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e,t){return h(e)||m(e,t)||v(e,t)||g()}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var p=b,y=d,_="[object Number]";function A(e){return typeof e=="number"||y(e)&&p(e)==_}var E=A;/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function M(){if(typeof navigator>"u"||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator,t=e.userAgent,r=t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1,a=t.indexOf("Trident")>-1&&t.indexOf("rv:11.0")>-1;if(r){var i=new RegExp("MSIE (\\d+\\.\\d+);"),n=t.match(i);if(!n)return-1;var o=parseFloat(n[1]);return o<7?6:o}return a?11:Number.MAX_SAFE_INTEGER}function T(){var e,t,r;if(typeof navigator>"u"||!navigator)return!1;var a=navigator.userAgent,i=a.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(i==null||(e=i[1])===null||e===void 0?void 0:e.split(".")[0])<100)return!0;var n=a.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(n==null||(t=n[1])===null||t===void 0?void 0:t.split(".")[0])<12)return!0;var o=M();if(o<=11)return!0;var u=a.match(/Firefox\/(.+)/i);return Number(u==null||(r=u[1])===null||r===void 0?void 0:r.split(".")[0])<100}function F(e,t){var r=E(t);if(!e||e.length===0)return r?{length:0,characters:e}:0;for(var a=0,i=0;i<e.length;i++){var n=0;if(e.charCodeAt(i)>127?n=2:n=1,r&&a+n>t)return{length:a,characters:e.slice(0,i)};a+=n}return r?{length:a,characters:e}:a}function O(e){return f(e!=null?e:"").length}function j(e,t,r){return f(r!=null?r:"").slice().length===t?r||"":f(e!=null?e:"").slice(0,t).join("")}export{N as _,F as a,M as b,h as c,g as d,T as e,O as g,E as i,j as l};
|
BIN
assets/helper.196ee190.js.gz
Normal file
BIN
assets/helper.196ee190.js.gz
Normal file
Binary file not shown.
@ -1,13 +1,13 @@
|
||||
import{m as j,u as x,i as p,_ as z,c as l}from"./useConfig.62a71898.js";import{d as w,c as m,aI as u,aK as N}from"./arco.768e32d2.js";import{A as C,J as _,K as y,B as F}from"./index.3a3bc300.js";import{a as A}from"./slot.687a5bca.js";/**
|
||||
import{e as j,i as v,_ as w}from"./helper.196ee190.js";import{u as x,_ as l}from"./useConfig.aff24c27.js";import{d as z,c as m,aI as u,aK as N}from"./arco.949c921a.js";import{c as _,M as C,N as y,w as F}from"./index.ab5e1824.js";import{a as T}from"./slot.411a67eb.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var T={align:{type:String,validator:function(e){return e?["start","end","center","baseline"].includes(e):!0}},breakLine:Boolean,direction:{type:String,default:"horizontal",validator:function(e){return e?["vertical","horizontal"].includes(e):!0}},separator:{type:[String,Function]},size:{type:[String,Number,Array],default:"medium"}};/**
|
||||
*/var k={align:{type:String,validator:function(e){return e?["start","end","center","baseline"].includes(e):!0}},breakLine:Boolean,direction:{type:String,default:"horizontal",validator:function(e){return e?["vertical","horizontal"].includes(e):!0}},separator:{type:[String,Function]},size:{type:[String,Number,Array],default:"medium"}};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),r.push.apply(r,a)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?g(Object(r),!0).forEach(function(a){l(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}var O={small:"8px",medium:"16px",large:"24px"},k=j(),D=w({name:"TSpace",props:b(b({},T),{},{forceFlexGapPolyfill:Boolean}),setup:function(e){var r=x("space"),a=C(),f=A(),v=m(function(){return e.forceFlexGapPolyfill||k}),S=m(function(){var n="";_(e.size)?n=e.size.map(function(o){return p(o)?"".concat(o,"px"):y(o)&&O[o]||o}).join(" "):y(e.size)?n=O[e.size]||e.size:p(e.size)&&(n="".concat(e.size,"px"));var i={};if(v.value){var d=n.split(" "),c=z(d,2),s=c[0],h=c[1];i["--td-space-column-gap"]=s,i["--td-space-row-gap"]=h||s}else i.gap=n;return i});function P(){var n=f(),i=a("separator");return n.map(function(d,c){var s=c+1!==n.length&&i;return u(N,null,[u("div",{class:"".concat(r.value,"-item")},[d]),s&&u("div",{class:"".concat(r.value,"-item-separator")},[i])])})}return function(){var n=["".concat(r.value),l(l(l(l({},"".concat(r.value,"-align-").concat(e.align),e.align),"".concat(r.value,"-").concat(e.direction),e.direction),"".concat(r.value,"--break-line"),e.breakLine),"".concat(r.value,"--polyfill"),v.value)];return u("div",{class:n,style:S.value},[P()])}}});/**
|
||||
*/function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),r.push.apply(r,a)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?g(Object(r),!0).forEach(function(a){l(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}var O={small:"8px",medium:"16px",large:"24px"},A=j(),D=z({name:"TSpace",props:b(b({},k),{},{forceFlexGapPolyfill:Boolean}),setup:function(e){var r=x("space"),a=_(),f=T(),p=m(function(){return e.forceFlexGapPolyfill||A}),S=m(function(){var n="";C(e.size)?n=e.size.map(function(o){return v(o)?"".concat(o,"px"):y(o)&&O[o]||o}).join(" "):y(e.size)?n=O[e.size]||e.size:v(e.size)&&(n="".concat(e.size,"px"));var i={};if(p.value){var d=n.split(" "),c=w(d,2),s=c[0],h=c[1];i["--td-space-column-gap"]=s,i["--td-space-row-gap"]=h||s}else i.gap=n;return i});function P(){var n=f(),i=a("separator");return n.map(function(d,c){var s=c+1!==n.length&&i;return u(N,null,[u("div",{class:"".concat(r.value,"-item")},[d]),s&&u("div",{class:"".concat(r.value,"-item-separator")},[i])])})}return function(){var n=["".concat(r.value),l(l(l(l({},"".concat(r.value,"-align-").concat(e.align),e.align),"".concat(r.value,"-").concat(e.direction),e.direction),"".concat(r.value,"--break-line"),e.breakLine),"".concat(r.value,"--polyfill"),p.value)];return u("div",{class:n,style:S.value},[P()])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var M=F(D);export{M as S};
|
||||
*/var J=F(D);export{J as S};
|
BIN
assets/index.00c6ff80.js.gz
Normal file
BIN
assets/index.00c6ff80.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{v as j,ak as C,_ as E}from"./index.3a3bc300.js";/* empty css *//* empty css */import{d as L,r as O,w as V,o as $,bS as B,bH as H,C as p,D as g,aI as r,aH as i,u as I,aK as w,aJ as x,aE as y,aM as S,aN as b,bT as T,a$ as U,bI as J,bJ as R}from"./arco.768e32d2.js";import{f as F}from"./vue.5a5bc6a2.js";import{u as Y}from"./loading.c097827a.js";import{S as q}from"./index.46b0294a.js";import"./chart.affe3403.js";import"./useConfig.62a71898.js";import"./slot.687a5bca.js";const A={class:"container"},G={name:"DIY"},K=L({...G,setup(z){const M=F(),{t:N}=j.exports.useI18n(),k=()=>{M.push({path:"/tool/flash",query:{url:"https://k5.vicicode.com/diyapi/LOSEHU"+t.flag.join("")+".bin?v="+new Date().getTime()}})},t=O({versions:[],flag:[],disMatrix:[],disName:[],showSort:[]});V(()=>[...t.flag],()=>{h()});const h=()=>{t.flag.map((a,o)=>{t.disMatrix[o].forEach((l,n)=>{t.versions.indexOf("LOSEHU"+t.flag.join("").substring(0,o)+n+t.flag.join("").substring(o+1)+".bin")==-1?t.disMatrix[o].set(n,!0):t.disMatrix[o].set(n,!1)})})},{loading:D,setLoading:v}=Y(!0);return $(async()=>{v(!0);let a=await(await fetch("https://k5.vicicode.com/diyapi/function.json?v="+new Date().getTime())).text();a=JSON.parse(a);let o=[],l=[];a.map(e=>{o[e[e.length-1]-1]=e,l.push(e[e.length-1]-1)}),a=o;let n=[],u=[];a.map(e=>{let _=new Map,c=new Map;for(let s=e[0]*2+1;s<e[0]*3+1;s++)_.set(e[s],!1),N("idea.diy")!=="LOSEHU DIY"?c.set(e[s],e[s-e[0]-e[0]]):c.set(e[s],e[s-e[0]]);n.push(_),u.push(c)}),t.flag=new Array(a.length).fill("0"),t.disName=u,t.disMatrix=n,t.showSort=l;const f=await(await fetch("https://k5.vicicode.com/diyapi/version.json?v="+new Date().getTime())).text();t.versions=JSON.parse(f),h(),v(!1)}),(a,o)=>{const l=C,n=B,u=T,f=U,e=q,_=H,c=J,s=R;return p(),g("div",A,[r(l,{items:[a.$t("menu.workshop"),a.$t("idea.diy")]},null,8,["items"]),r(s,{gutter:20,align:"stretch"},{default:i(()=>[r(c,{span:24},{default:i(()=>[r(_,{class:"general-card",title:a.$t("idea.diy"),loading:I(D)},{default:i(()=>[r(e,{direction:"vertical"},{default:i(()=>[(p(!0),g(w,null,x(t.showSort,m=>(p(),y(u,{modelValue:t.flag[m],"onUpdate:modelValue":d=>t.flag[m]=d,type:"button"},{default:i(()=>[(p(!0),g(w,null,x(t.disMatrix[m],d=>(p(),y(n,{value:d[0],disabled:d[1]},{default:i(()=>[S(b(t.disName[m].get(d[0])),1)]),_:2},1032,["value","disabled"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"]))),256)),r(f,{type:"primary",onClick:k},{default:i(()=>[S(b(a.$t("diy.generate")),1)]),_:1})]),_:1})]),_:1},8,["title","loading"])]),_:1})]),_:1})])}}});const nt=E(K,[["__scopeId","data-v-101e557a"]]);export{nt as default};
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
import{b as o}from"./dialog.6aec0de8.js";import{B as a}from"./index.3a3bc300.js";import"./arco.768e32d2.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var m=a(o);export{m as D};
|
@ -1,13 +1,13 @@
|
||||
import{d as R,c as t,aI as a,aU as V}from"./arco.768e32d2.js";import{u,b as W}from"./useConfig.62a71898.js";import{A as X,K as Z,B as K}from"./index.3a3bc300.js";import{L as U}from"./index.392520af.js";/**
|
||||
import{d as R,c as t,aI as a,aU as V}from"./arco.949c921a.js";import{u,a as W}from"./useConfig.aff24c27.js";import{c as X,N as Z,w as U}from"./index.ab5e1824.js";import{L as k}from"./index.df0a6ce7.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var k={actions:{type:[String,Function]},avatar:{type:[String,Function]},bordered:{type:Boolean,default:!0},content:{type:[String,Function]},cover:{type:[String,Function]},default:{type:[String,Function]},description:{type:[String,Function]},footer:{type:[String,Function]},header:{type:[String,Function]},headerBordered:Boolean,hoverShadow:Boolean,loading:{type:[Boolean,Function],default:!1},loadingProps:{type:Object},shadow:Boolean,size:{type:String,default:"medium",validator:function(e){return e?["medium","small"].includes(e):!0}},status:{type:String,default:""},subtitle:{type:[String,Function]},theme:{type:String,default:"normal",validator:function(e){return e?["normal","poster1","poster2"].includes(e):!0}},title:{type:[String,Function]}};/**
|
||||
*/var q={actions:{type:[String,Function]},avatar:{type:[String,Function]},bordered:{type:Boolean,default:!0},content:{type:[String,Function]},cover:{type:[String,Function]},default:{type:[String,Function]},description:{type:[String,Function]},footer:{type:[String,Function]},header:{type:[String,Function]},headerBordered:Boolean,hoverShadow:Boolean,loading:{type:[Boolean,Function],default:!1},loadingProps:{type:Object},shadow:Boolean,size:{type:String,default:"medium",validator:function(e){return e?["medium","small"].includes(e):!0}},status:{type:String,default:""},subtitle:{type:[String,Function]},theme:{type:String,default:"normal",validator:function(e){return e?["normal","poster1","poster2"].includes(e):!0}},title:{type:[String,Function]}};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function q(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!V(i)}var G=R({name:"TCard",props:k,setup:function(e,w){var o=w.slots,n=X(),l=u("card"),y=W(),b=y.SIZE,p=t(function(){var r=[l.value];return e.size==="small"&&r.push("".concat(b.value[e.size])),e.bordered&&r.push("".concat(l.value,"--bordered")),e.shadow&&r.push("".concat(l.value,"--shadow")),e.hoverShadow&&r.push("".concat(l.value,"--shadow-hover")),r}),d=t(function(){var r=["".concat(l.value,"__header")];return e.headerBordered?r.concat("".concat(l.value,"__title--bordered")):["".concat(l.value,"__header")]}),F=u("card__header-wrapper"),N=u("card__avatar"),B=u("card__title"),T=u("card__subtitle"),A=u("card__description"),c=u("card__actions"),O=u("card__body"),P=u("card__cover"),j=u("card__footer"),x=u("card__footer-wrapper"),v=t(function(){return e.theme==="poster2"}),f=t(function(){return e.title||o.title}),h=t(function(){return e.header||o.header}),_=t(function(){return e.subtitle||o.subtitle}),C=t(function(){return e.avatar||o.avatar}),m=t(function(){return e.description||o.description}),S=t(function(){return e.status||o.status}),s=t(function(){return e.actions||o.actions}),E=t(function(){return e.footer||o.footer}),H=t(function(){return e.cover||o.cover}),I=t(function(){return e.loading||o.loading}),z=t(function(){return e.content||o.content||e.default||o.default}),L=t(function(){return h.value||f.value||_.value||m.value||C.value||S.value&&v.value||s.value&&!v.value}),D=t(function(){return E.value||s.value&&v.value}),J=function(){return h.value?a("div",{class:d.value},[n("header")]):a("div",{class:d.value},[a("div",{class:F.value},[C.value&&a("div",{class:N.value},[n("avatar")]),a("div",null,[f.value&&a("div",{class:B.value},[n("title")]),_.value&&a("div",{class:T.value},[n("subtitle")]),m.value&&a("p",{class:A.value},[n("description")])])]),s.value&&!v.value&&a("div",{class:c.value},[n("actions")]),S.value&&a("div",{class:c.value},[n("status")])])},M=function(){var g=Z(e.cover);return a("div",{class:P.value},[g?a("img",{src:e.cover},null):n("cover")])};return function(){var r=a("div",{class:p.value},[L.value?J():null,H.value?M():null,z.value&&a("div",{class:O.value},[n("default")||n("content")]),D.value&&a("div",{class:j.value},[a("div",{class:x.value},[n("footer")]),s.value&&v.value&&a("div",{class:c.value},[n("actions")])])]);return I.value?n("loading")||a(U,e.loadingProps,q(r)?r:{default:function(){return[r]}}):r}}});/**
|
||||
*/function G(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!V(i)}var K=R({name:"TCard",props:q,setup:function(e,w){var o=w.slots,n=X(),l=u("card"),y=W(),b=y.SIZE,p=t(function(){var r=[l.value];return e.size==="small"&&r.push("".concat(b.value[e.size])),e.bordered&&r.push("".concat(l.value,"--bordered")),e.shadow&&r.push("".concat(l.value,"--shadow")),e.hoverShadow&&r.push("".concat(l.value,"--shadow-hover")),r}),d=t(function(){var r=["".concat(l.value,"__header")];return e.headerBordered?r.concat("".concat(l.value,"__title--bordered")):["".concat(l.value,"__header")]}),F=u("card__header-wrapper"),N=u("card__avatar"),B=u("card__title"),T=u("card__subtitle"),O=u("card__description"),c=u("card__actions"),P=u("card__body"),j=u("card__cover"),x=u("card__footer"),A=u("card__footer-wrapper"),v=t(function(){return e.theme==="poster2"}),f=t(function(){return e.title||o.title}),h=t(function(){return e.header||o.header}),_=t(function(){return e.subtitle||o.subtitle}),C=t(function(){return e.avatar||o.avatar}),m=t(function(){return e.description||o.description}),S=t(function(){return e.status||o.status}),s=t(function(){return e.actions||o.actions}),E=t(function(){return e.footer||o.footer}),H=t(function(){return e.cover||o.cover}),I=t(function(){return e.loading||o.loading}),z=t(function(){return e.content||o.content||e.default||o.default}),L=t(function(){return h.value||f.value||_.value||m.value||C.value||S.value&&v.value||s.value&&!v.value}),D=t(function(){return E.value||s.value&&v.value}),J=function(){return h.value?a("div",{class:d.value},[n("header")]):a("div",{class:d.value},[a("div",{class:F.value},[C.value&&a("div",{class:N.value},[n("avatar")]),a("div",null,[f.value&&a("div",{class:B.value},[n("title")]),_.value&&a("div",{class:T.value},[n("subtitle")]),m.value&&a("p",{class:O.value},[n("description")])])]),s.value&&!v.value&&a("div",{class:c.value},[n("actions")]),S.value&&a("div",{class:c.value},[n("status")])])},M=function(){var g=Z(e.cover);return a("div",{class:j.value},[g?a("img",{src:e.cover},null):n("cover")])};return function(){var r=a("div",{class:p.value},[L.value?J():null,H.value?M():null,z.value&&a("div",{class:P.value},[n("default")||n("content")]),D.value&&a("div",{class:x.value},[a("div",{class:A.value},[n("footer")]),s.value&&v.value&&a("div",{class:c.value},[n("actions")])])]);return I.value?n("loading")||a(k,e.loadingProps,G(r)?r:{default:function(){return[r]}}):r}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var ae=K(G);export{ae as C};
|
||||
*/var ae=U(K);export{ae as C};
|
BIN
assets/index.12828262.js.gz
Normal file
BIN
assets/index.12828262.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{e as B,ak as D,_ as N}from"./index.3a3bc300.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as T,r as H,aX as K,bO as L,bH as R,C as E,D as F,aI as e,aH as r,aM as V,aN as A,u as J,a6 as M,a$ as O,ba as W,bI as X,bJ as j,b7 as q,bc as x}from"./arco.768e32d2.js";import{u as z}from"./loading.c097827a.js";import{e as $,a as S,f as w,s as h,b as P,g as G}from"./serial.c741fbda.js";import"./chart.affe3403.js";import"./vue.5a5bc6a2.js";const Q={class:"container"},Y={name:"Chi"},Z=T({...Y,setup(oo){const o=B(),{loading:I,setLoading:C}=z(!1),t=H({logo_line1:"",logo_line2:"",mdc_audio_local:!0}),v=async()=>{var n,i,f,c,u,m,_,g,d,s,b,y;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(await $(o.connectPort),C(!0),((n=o.configuration)==null?void 0:n.charset)=="losehu"){let a=new Uint8Array(38);a.set(await S(o.connectPort,123680,38,(i=o.configuration)==null?void 0:i.uart),0),t.logo_line1=w(a.subarray(0,19),(f=o.configuration)==null?void 0:f.charset),t.logo_line2=w(a.subarray(19,38),(c=o.configuration)==null?void 0:c.charset)}else if(((u=o.configuration)==null?void 0:u.charset)=="gb2312"){let a=new Uint8Array(36);a.set(await S(o.connectPort,8192,36,(m=o.configuration)==null?void 0:m.uart),0),t.logo_line1=w(a.subarray(0,18),(_=o.configuration)==null?void 0:_.charset),t.logo_line2=w(a.subarray(18,36),(g=o.configuration)==null?void 0:g.charset)}else{let a=new Uint8Array(32);a.set(await S(o.connectPort,3760,32,(d=o.configuration)==null?void 0:d.uart),0),t.logo_line1=w(a.subarray(0,16),(s=o.configuration)==null?void 0:s.charset),t.logo_line2=w(a.subarray(16,32),(b=o.configuration)==null?void 0:b.charset)}parseInt(await S(o.connectPort,8189,1,(y=o.configuration)==null?void 0:y.uart))==0?t.mdc_audio_local=!1:t.mdc_audio_local=!0,C(!1)},k=async()=>{var n,i,f,c,u,m,_,g,d,s,b,y,a,p,U;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(C(!0),await $(o.connectPort),((n=o.configuration)==null?void 0:n.charset)=="losehu"){let l=new Uint8Array(38);l.set(h(t.logo_line1,(i=o.configuration)==null?void 0:i.charset).subarray(0,19),0),l.set(h(t.logo_line2,(f=o.configuration)==null?void 0:f.charset).subarray(0,19),19),await P(o.connectPort,123678,[18,18],2,(c=o.configuration)==null?void 0:c.uart),await P(o.connectPort,123680,l,38,(u=o.configuration)==null?void 0:u.uart)}else if(((m=o.configuration)==null?void 0:m.charset)=="gb2312"){let l=new Uint8Array(36);l.set(h(t.logo_line1,(_=o.configuration)==null?void 0:_.charset).subarray(0,18),0),l.set(h(t.logo_line2,(g=o.configuration)==null?void 0:g.charset).subarray(0,18),18),await P(o.connectPort,8228,[18,18],2,(d=o.configuration)==null?void 0:d.uart),await P(o.connectPort,8192,l,36,(s=o.configuration)==null?void 0:s.uart)}else{let l=new Uint8Array(32);l.set(h(t.logo_line1,(b=o.configuration)==null?void 0:b.charset).subarray(0,16),0),l.set(h(t.logo_line2,(y=o.configuration)==null?void 0:y.charset).subarray(0,16),16),await P(o.connectPort,3760,l,32,(a=o.configuration)==null?void 0:a.uart)}(p=o.configuration)!=null&&p.localmdc&&await P(o.connectPort,8189,new Uint8Array([t.mdc_audio_local?1:0]),1,(U=o.configuration)==null?void 0:U.uart),await G(o.connectPort),C(!1)};return(n,i)=>{const f=D,c=M,u=O,m=W,_=X,g=j,d=q,s=x,b=K,y=L,a=R;return E(),F("div",Q,[e(f,{items:[n.$t("menu.dashboard"),n.$t("menu.cps.settings")]},null,8,["items"]),e(g,{gutter:20,align:"stretch"},{default:r(()=>[e(_,{span:24},{default:r(()=>[e(a,{class:"general-card",title:n.$t("menu.cps.settings")+n.$t("global.onStart")},{default:r(()=>[e(g,{style:{"margin-bottom":"16px"}},{default:r(()=>[e(_,{span:12},{default:r(()=>[e(m,null,{default:r(()=>[e(u,{type:"primary",onClick:v},{icon:r(()=>[e(c)]),default:r(()=>[V(" "+A(n.$t("cps.onDeviceRead")),1)]),_:1}),e(u,{onClick:k},{icon:r(()=>[e(c)]),default:r(()=>[V(" "+A(n.$t("cps.onDeviceWrite")),1)]),_:1})]),_:1})]),_:1})]),_:1}),e(y,{loading:J(I),style:{width:"100%"}},{default:r(()=>[e(s,{"label-col-style":{width:"25%"},field:"logo_line1",label:n.$t("cps.line1")},{default:r(()=>[e(d,{modelValue:t.logo_line1,"onUpdate:modelValue":i[0]||(i[0]=p=>t.logo_line1=p)},null,8,["modelValue"])]),_:1},8,["label"]),e(s,{"label-col-style":{width:"25%"},field:"logo_line2",label:n.$t("cps.line2")},{default:r(()=>[e(d,{modelValue:t.logo_line2,"onUpdate:modelValue":i[1]||(i[1]=p=>t.logo_line2=p)},null,8,["modelValue"])]),_:1},8,["label"]),e(s,{"label-col-style":{width:"25%"},field:"logo_line2",label:n.$t("cps.mdclocplay")},{default:r(()=>[e(b,{modelValue:t.mdc_audio_local,"onUpdate:modelValue":i[2]||(i[2]=p=>t.mdc_audio_local=p),type:"round"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["loading"])]),_:1},8,["title"])]),_:1})]),_:1})])}}});const _o=N(Z,[["__scopeId","data-v-739b81b7"]]);export{_o as default};
|
Binary file not shown.
1
assets/index.1f632797.css
Normal file
1
assets/index.1f632797.css
Normal file
@ -0,0 +1 @@
|
||||
.container[data-v-6971e3a2]{padding:0 20px 20px}.container[data-v-6971e3a2] .arco-list-content{overflow-x:hidden}.container[data-v-6971e3a2] .arco-card-meta-title{font-size:14px}[data-v-6971e3a2] .arco-list-col{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}[data-v-6971e3a2] .arco-list-item{width:33%}[data-v-6971e3a2] .block-title{margin:0 0 12px;font-size:14px}[data-v-6971e3a2] .list-wrap .list-row{align-items:stretch}[data-v-6971e3a2] .list-wrap .list-row .list-col{margin-bottom:16px}[data-v-6971e3a2] .list-wrap :deep(.arco-space){width:100%}[data-v-6971e3a2] .list-wrap :deep(.arco-space) .arco-space-item:last-child{flex:1}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
assets/index.2dddab87.js
Normal file
1
assets/index.2dddab87.js
Normal file
@ -0,0 +1 @@
|
||||
import{v as H,k as M,ak as N,_ as U}from"./index.ab5e1824.js";/* empty css *//* empty css *//* empty css */import{d as V,r as y,c as L,bH as O,C as j,D as G,aI as s,aH as r,G as S,aN as f,aM as g,u as h,a6 as W,a$ as Z,ba as q,bI as F,bK as J}from"./arco.949c921a.js";import{u as Q}from"./loading.68e8c78e.js";import{e as v,a as P,u as w,f as X,h as D,s as Y,b,g as ee}from"./serial.c741fbda.js";import{I as C}from"./form-model.480c6188.js";import{M as te,T as ae}from"./index.de96f4cb.js";import{B as ne}from"./index.a9d4e900.js";import"./chart.b6f2f6d9.js";import"./vue.d12e9c08.js";import"./useConfig.aff24c27.js";import"./dialog.8e077a55.js";import"./index.df0a6ce7.js";import"./helper.196ee190.js";import"./useDisabled.d1f2a1bc.js";import"./dep-6deb4e3a.8b0d70b3.js";import"./slot.411a67eb.js";const oe={class:"container"},re={name:"Radio"},ie=V({...re,setup(se){const{t:m}=H.exports.useI18n(),o=M(),{loading:I,setLoading:u}=Q(!1),a=y({renderData:Array.from({length:16}).map(e=>({})),pageSize:16,nowPage:1}),z=y({showHide:0}),R=e=>{a.renderData=e.newData},A=L(()=>[{colKey:"drag",title:m("cps.sort"),width:46},{title:"#",colKey:"index",align:"left",width:100},{title:m("cps.contact"),colKey:"name",width:250,align:"left",cell:(e,{row:t})=>t.name?t.name.replace(/[^a-zA-Z0-9_]/g,""):void 0,edit:{component:C,props:{clearable:!0},onEdited:e=>{const t=[...a.renderData];t.splice((a.nowPage-1)*a.pageSize+e.rowIndex,1,e.newRowData),a.renderData=t}}},{title:m("cps.mdcid"),colKey:"mdcid",align:"left",width:200,cell:(e,{row:t})=>parseInt(t.mdcid,16)<=65535?parseInt(t.mdcid,16).toString(16):void 0,edit:{component:C,props:{clearable:!0},onEdited:e=>{e.newRowData.mdcid=e.newRowData.mdcid?e.newRowData.mdcid:void 0;const t=[...a.renderData];t.splice((a.nowPage-1)*a.pageSize+e.rowIndex,1,e.newRowData),a.renderData=t}}},{title:m("cps.operate"),colKey:"operate",align:"left",width:150}]),$=async()=>{var d,c;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}await v(o.connectPort),u(!0);let e=new Uint8Array(256);for(let n=7424;n<7680;n+=16){const i=await P(o.connectPort,n,16,(d=o.configuration)==null?void 0:d.uart);e.set(i,n-7424)}const t=[];for(let n=0;n<256;n+=16)w(e.subarray(n,n+2))!="ffff"?t.push({name:X(e.subarray(n+2,n+16),(c=o.configuration)==null?void 0:c.charset).trim(),mdcid:w(e.subarray(n,n+1))+w(e.subarray(n+1,n+2))}):t.push({});a.renderData=t,u(!1)},k=async()=>{var t,d,c,n;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}await v(o.connectPort),u(!0);for(let i=0;i<256;i+=16)if(a.renderData[i/16].mdcid){const p=new Uint8Array(16).fill(32);p.set(D(a.renderData[i/16].mdcid.padStart(4,"0").substring(0,2))),p.set(D(a.renderData[i/16].mdcid.padStart(4,"0").substring(2,4)),1),p.set(Y(a.renderData[i/16].name),2),await b(o.connectPort,i+7424,p,16,(t=o.configuration)==null?void 0:t.uart)}else await b(o.connectPort,i+7424,D("ffffffffffffffffffffffffffffffff"),16,(d=o.configuration)==null?void 0:d.uart);const e=await P(o.connectPort,8176,16,(c=o.configuration)==null?void 0:c.uart);e.set([16],16-1),await b(o.connectPort,8176,e,16,(n=o.configuration)==null?void 0:n.uart),await ee(o.connectPort),u(!1)},T=async e=>{const t=[...a.renderData];t.splice(e,1,{scanlist:[]}),a.renderData=t};return(e,t)=>{const d=N,c=W,n=Z,i=q,p=F,K=J,B=ne,x=ae,E=O;return j(),G("div",oe,[s(d,{items:[e.$t("menu.dashboard"),e.$t("menu.cps.mdc")]},null,8,["items"]),s(E,{class:"general-card"},{title:r(()=>[S("span",{onClick:t[0]||(t[0]=()=>{z.showHide+=1})},f(e.$t("menu.cps.mdc")+e.$t("global.onStart")),1)]),default:r(()=>[s(K,{style:{"margin-bottom":"16px"}},{default:r(()=>[s(p,{span:12},{default:r(()=>[s(i,null,{default:r(()=>[s(n,{type:"primary",onClick:$},{icon:r(()=>[s(c)]),default:r(()=>[g(" "+f(e.$t("cps.onDeviceRead")),1)]),_:1}),s(n,{onClick:k},{icon:r(()=>[s(c)]),default:r(()=>[g(" "+f(e.$t("cps.onDeviceWrite")),1)]),_:1})]),_:1})]),_:1})]),_:1}),s(x,{class:"ttable",loading:h(I),size:"medium",columns:A.value,data:a.renderData,pagination:{defaultPageSize:a.pageSize,total:a.renderData.length,defaultCurrent:1,pageSizeOptions:[15,30,50,100,200]},onChange:t[1]||(t[1]=l=>{a.pageSize=l.pagination.pageSize,a.nowPage=l.pagination.current}),bordered:"","lazy-load":"",headerAffixedTop:{offsetTop:60},hover:!0,"drag-sort":"row-handler",onDragSort:R},{drag:r(({row:l,rowIndex:_})=>[S("span",null,[s(h(te))])]),index:r(({row:l,rowIndex:_})=>[g(f((a.nowPage-1)*a.pageSize+_+1),1)]),operate:r(({row:l,rowIndex:_})=>[s(B,{theme:"default",variant:"dashed",onClick:ce=>T((a.nowPage-1)*a.pageSize+_)},{default:r(()=>[g(f(e.$t("cps.clear")),1)]),_:2},1032,["onClick"])]),_:1},8,["loading","columns","data","pagination"])]),_:1})])}}});const Re=U(ie,[["__scopeId","data-v-9ba38d74"]]);export{Re as default};
|
BIN
assets/index.2dddab87.js.gz
Normal file
BIN
assets/index.2dddab87.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
.arco-layout{display:flex;flex:1;flex-direction:column;margin:0;padding:0}.arco-layout-sider{position:relative;flex:none;width:auto;margin:0;padding:0;background:var(--color-menu-dark-bg);transition:width .2s cubic-bezier(.34,.69,.1,1)}.arco-layout-sider-children{height:100%;overflow:auto}.arco-layout-sider-collapsed .arco-layout-sider-children::-webkit-scrollbar{width:0}.arco-layout-sider-has-trigger{box-sizing:border-box;padding-bottom:48px}.arco-layout-sider-trigger{z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:48px;color:var(--color-white);background:rgba(255,255,255,.2);cursor:pointer;transition:width .2s cubic-bezier(.34,.69,.1,1)}.arco-layout-sider-trigger-light{color:var(--color-text-1);background:var(--color-menu-light-bg);border-top:1px solid var(--color-bg-5)}.arco-layout-sider-light{background:var(--color-menu-light-bg);box-shadow:0 2px 5px #00000014}.arco-layout-header{flex:0 0 auto;box-sizing:border-box;margin:0}.arco-layout-content{flex:1}.arco-layout-footer{flex:0 0 auto;margin:0}.arco-layout-has-sider{flex-direction:row}.arco-layout-has-sider>.arco-layout,.arco-layout-has-sider>.arco-layout-content{overflow-x:hidden}.footer[data-v-77ebf61d]{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}
|
||||
.arco-layout{display:flex;flex:1;flex-direction:column;margin:0;padding:0}.arco-layout-sider{position:relative;flex:none;width:auto;margin:0;padding:0;background:var(--color-menu-dark-bg);transition:width .2s cubic-bezier(.34,.69,.1,1)}.arco-layout-sider-children{height:100%;overflow:auto}.arco-layout-sider-collapsed .arco-layout-sider-children::-webkit-scrollbar{width:0}.arco-layout-sider-has-trigger{box-sizing:border-box;padding-bottom:48px}.arco-layout-sider-trigger{z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:48px;color:var(--color-white);background:rgba(255,255,255,.2);cursor:pointer;transition:width .2s cubic-bezier(.34,.69,.1,1)}.arco-layout-sider-trigger-light{color:var(--color-text-1);background:var(--color-menu-light-bg);border-top:1px solid var(--color-bg-5)}.arco-layout-sider-light{background:var(--color-menu-light-bg);box-shadow:0 2px 5px #00000014}.arco-layout-header{flex:0 0 auto;box-sizing:border-box;margin:0}.arco-layout-content{flex:1}.arco-layout-footer{flex:0 0 auto;margin:0}.arco-layout-has-sider{flex-direction:row}.arco-layout-has-sider>.arco-layout,.arco-layout-has-sider>.arco-layout-content{overflow-x:hidden}.footer[data-v-c84d14b1]{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}
|
BIN
assets/index.302bc987.css.gz
Normal file
BIN
assets/index.302bc987.css.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{v as K,e as H,ak as M,_ as N}from"./index.3a3bc300.js";/* empty css *//* empty css *//* empty css */import{d as F,r as S,c as O,bH as U,C as V,D as L,aI as i,aH as s,G as h,aN as u,aM as _,u as x,a6 as j,a$ as G,ba as J,bI as W,bJ as q}from"./arco.768e32d2.js";import{u as Q}from"./loading.c097827a.js";import{e as b,a as y,u as v,b as g,h as w,g as X}from"./serial.c741fbda.js";import{I as Y}from"./form-model.d137f973.js";import{M as Z,T as ee}from"./index.2d220bda.js";import{B as te}from"./index.7a4cefac.js";import"./chart.affe3403.js";import"./vue.5a5bc6a2.js";import"./useConfig.62a71898.js";import"./dialog.6aec0de8.js";import"./index.392520af.js";import"./dep-6deb4e3a.cb002766.js";import"./slot.687a5bca.js";const ae={class:"container"},oe={name:"Radio"},ne=F({...oe,setup(re){const{t:D}=K.exports.useI18n(),o=H(),{loading:P,setLoading:f}=Q(!1),a=S({renderData:Array.from({length:20}).map(t=>({})),pageSize:50,nowPage:1}),I=S({showHide:0}),C=t=>{a.renderData=t.newData},R=O(()=>[{colKey:"drag",title:D("cps.sort"),width:46},{title:"#",colKey:"index",align:"left",width:100},{title:D("cps.rx"),colKey:"rx",align:"left",width:200,cell:(t,{row:n})=>parseFloat(n.rx)?parseFloat(n.rx).toFixed(2):void 0,edit:{component:Y,props:{clearable:!0},onEdited:t=>{t.newRowData.rx=t.newRowData.rx?t.newRowData.rx:void 0;const n=[...a.renderData];n.splice((a.nowPage-1)*a.pageSize+t.rowIndex,1,t.newRowData),a.renderData=n}}},{title:D("cps.operate"),colKey:"operate",align:"left",width:150}]),z=async()=>{var t,n,p;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(await b(o.connectPort),f(!0),(t=o.configuration)!=null&&t.fm30){let c=new Uint8Array(60);for(let e=131008;e<131057;e+=8){const l=await y(o.connectPort,e,8,(n=o.configuration)==null?void 0:n.uart);c.set(l,e-131008)}const r=[];for(let e=0;e<60;e+=2){const l=v(c.subarray(e,e+2));l!="ffff"?r.push({rx:parseInt(l,16)/10}):r.push({})}a.renderData=r}else{let c=new Uint8Array(40);for(let e=3648;e<3681;e+=8){const l=await y(o.connectPort,e,8,(p=o.configuration)==null?void 0:p.uart);c.set(l,e-3648)}const r=[];for(let e=0;e<40;e+=2){const l=v(c.subarray(e,e+2));l!="ffff"?r.push({rx:parseInt(l,16)/10}):r.push({})}a.renderData=r}f(!1)},$=async()=>{var t,n,p,c,r;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(await b(o.connectPort),f(!0),(t=o.configuration)!=null&&t.fm30)for(let e=0;e<60;e+=2)a.renderData[e/2].rx?await g(o.connectPort,e+131008,w(parseInt(a.renderData[e/2].rx*10).toString(16).padStart(4,"0")),2,(n=o.configuration)==null?void 0:n.uart):await g(o.connectPort,e+131008,w("0000"),2,(p=o.configuration)==null?void 0:p.uart);else for(let e=0;e<40;e+=2)a.renderData[e/2].rx?await g(o.connectPort,e+3648,w(parseInt(a.renderData[e/2].rx*10).toString(16).padStart(4,"0")),2,(c=o.configuration)==null?void 0:c.uart):await g(o.connectPort,e+3648,w("0000"),2,(r=o.configuration)==null?void 0:r.uart);await X(o.connectPort),f(!1)},k=async t=>{const n=[...a.renderData];n.splice(t,1,{scanlist:[]}),a.renderData=n};return(t,n)=>{const p=M,c=j,r=G,e=J,l=W,A=q,B=te,T=ee,E=U;return V(),L("div",ae,[i(p,{items:[t.$t("menu.dashboard"),t.$t("menu.cps.radio")]},null,8,["items"]),i(E,{class:"general-card"},{title:s(()=>[h("span",{onClick:n[0]||(n[0]=()=>{I.showHide+=1})},u(t.$t("menu.cps.radio")+t.$t("global.onStart")),1)]),default:s(()=>[i(A,{style:{"margin-bottom":"16px"}},{default:s(()=>[i(l,{span:12},{default:s(()=>[i(e,null,{default:s(()=>[i(r,{type:"primary",onClick:z},{icon:s(()=>[i(c)]),default:s(()=>[_(" "+u(t.$t("cps.onDeviceRead")),1)]),_:1}),i(r,{onClick:$},{icon:s(()=>[i(c)]),default:s(()=>[_(" "+u(t.$t("cps.onDeviceWrite")),1)]),_:1})]),_:1})]),_:1})]),_:1}),i(T,{class:"ttable",loading:x(P),size:"medium",columns:R.value,data:a.renderData,pagination:{defaultPageSize:a.pageSize,total:a.renderData.length,defaultCurrent:1,pageSizeOptions:[15,30,50,100,200]},onChange:n[1]||(n[1]=d=>{a.pageSize=d.pagination.pageSize,a.nowPage=d.pagination.current}),bordered:"","lazy-load":"",headerAffixedTop:{offsetTop:60},hover:!0,"drag-sort":"row-handler",onDragSort:C},{drag:s(({row:d,rowIndex:m})=>[h("span",null,[i(x(Z))])]),index:s(({row:d,rowIndex:m})=>[_(u((a.nowPage-1)*a.pageSize+m+1),1)]),operate:s(({row:d,rowIndex:m})=>[i(B,{theme:"default",variant:"dashed",onClick:se=>k((a.nowPage-1)*a.pageSize+m)},{default:s(()=>[_(u(t.$t("cps.clear")),1)]),_:2},1032,["onClick"])]),_:1},8,["loading","columns","data","pagination"])]),_:1})])}}});const ve=N(ne,[["__scopeId","data-v-be263a43"]]);export{ve as default};
|
Binary file not shown.
5
assets/index.3836ef6c.js
Normal file
5
assets/index.3836ef6c.js
Normal file
@ -0,0 +1,5 @@
|
||||
import{b as o}from"./dialog.8e077a55.js";import{w as a}from"./index.ab5e1824.js";import"./arco.949c921a.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var m=a(o);export{m as D};
|
Binary file not shown.
Binary file not shown.
1
assets/index.3d761282.js
Normal file
1
assets/index.3d761282.js
Normal file
@ -0,0 +1 @@
|
||||
import{d as o,D as r,C as a}from"./arco.949c921a.js";import{f as s,h as n}from"./vue.d12e9c08.js";const i=o({__name:"index",setup(c){const e=s(),t=n().params.path;return e.replace({path:t}),(u,m)=>(a(),r("div"))}});export{i as default};
|
File diff suppressed because one or more lines are too long
BIN
assets/index.3f6500a4.js.gz
Normal file
BIN
assets/index.3f6500a4.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{e as B,ak as k,_ as E}from"./index.3a3bc300.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as v,r as A,o as C,bH as N,C as $,D as I,aI as i,aH as c,aM as p,aN as f,G as H,n as b,a$ as P,ba as S,bF as T,bI as D,bJ as M}from"./arco.768e32d2.js";import{h as V}from"./vue.5a5bc6a2.js";import{d as y,c as q,r as _,j as x,k as h,l as R,m as j}from"./serial.c741fbda.js";import"./chart.affe3403.js";const L={class:"container"},U=["innerHTML"],O={name:"Flash"},z=v({...O,setup(G){const m=B(),e=A({status:"\u70B9\u51FB\u66F4\u65B0\u6309\u94AE\u66F4\u65B0\u56FA\u4EF6\u5230\u8BBE\u5907<br/><br/>",binaryFile:void 0,binaryName:""}),d=V();C(async()=>{var t;if(d.query.url){const o=await fetch(d.query.url),r=(t=o==null?void 0:o.body)==null?void 0:t.getReader();if(r){const n=[];for(;;){const{done:u,value:l}=await r.read();if(u)break;n.push(...l)}const a=new Uint8Array(n);e.binaryFile=a,e.binaryName=d.query.url.substring(d.query.url.lastIndexOf("/")+1).split("?")[0]+" "}}});const F=()=>{const t=document.createElement("input");t.type="file",t.onchange=async()=>{const o=new Blob([t.files[0]],{type:"application/octet-stream"}),r=new Uint8Array(await o.arrayBuffer());e.binaryFile=r,e.binaryName=t.files[0].name},t.click()},g=async()=>{if(!e.binaryFile){alert("\u8BF7\u9009\u62E9\u6587\u4EF6");return}m.connectPort&&await y(m.connectPort);let t=await q();await _(t,24,1e3);const o=x(e.binaryFile),r=new Uint8Array([48,5,o.length,0,...o]);await h(t,r),await _(t,24);const n=R(e.binaryFile);if(n.length>61439)throw new Error("Last resort boundary check failed. Whoever touched the code is an idiot.");for(let a=0;a<n.length;a+=256){const u=n.slice(a,a+256),l=j(u,a,n.length);try{await h(t,l),await _(t,26)}catch(s){return console.log("Flash command rejected. Aborting."),Promise.reject(s)}e.status=e.status+`\u66F4\u65B0\u8FDB\u5EA6 ${(a/n.length*100).toFixed(1)}%<br/>`,b(()=>{const s=document==null?void 0:document.getElementById("statusArea");s&&(s.scrollTop=s==null?void 0:s.scrollHeight)})}e.status=e.status+"\u66F4\u65B0\u8FDB\u5EA6 100.0%<br/>",e.status=e.status+"\u56FA\u4EF6\u66F4\u65B0\u6210\u529F",b(()=>{const a=document==null?void 0:document.getElementById("statusArea");a&&(a.scrollTop=a==null?void 0:a.scrollHeight)}),y(t),m.updateSettings({connectState:!1})};return(t,o)=>{const r=k,n=P,a=S,u=T,l=N,s=D,w=M;return $(),I("div",L,[i(r,{items:[t.$t("menu.list"),t.$t("menu.flash")]},null,8,["items"]),i(w,{gutter:20,align:"stretch"},{default:c(()=>[i(s,{span:24},{default:c(()=>[i(l,{class:"general-card",title:t.$t("menu.flash")+t.$t("global.onBoot")},{default:c(()=>[i(a,null,{default:c(()=>[i(n,{onClick:F},{default:c(()=>[p(f(e.binaryFile?e.binaryName:t.$t("tool.selectFirmware")),1)]),_:1}),i(n,{type:"primary",disabled:!e.binaryFile,onClick:g},{default:c(()=>[p(f(t.$t("tool.flash")),1)]),_:1},8,["disabled"])]),_:1}),i(u),H("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:e.status},null,8,U)]),_:1},8,["title"])]),_:1})]),_:1})])}}});const at=E(z,[["__scopeId","data-v-5cb91e08"]]);export{at as default};
|
||||
import{k as B,ak as k,_ as E}from"./index.ab5e1824.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as v,r as A,o as C,bH as N,C as $,D as I,aI as i,aH as c,aM as p,aN as f,G as H,n as b,a$ as P,ba as S,bF as T,bI as D,bK as M}from"./arco.949c921a.js";import{h as V}from"./vue.d12e9c08.js";import{d as y,c as q,r as _,j as x,k as h,l as R,m as j}from"./serial.c741fbda.js";import"./chart.b6f2f6d9.js";const L={class:"container"},U=["innerHTML"],O={name:"Flash"},z=v({...O,setup(G){const m=B(),e=A({status:"\u70B9\u51FB\u66F4\u65B0\u6309\u94AE\u66F4\u65B0\u56FA\u4EF6\u5230\u8BBE\u5907<br/><br/>",binaryFile:void 0,binaryName:""}),d=V();C(async()=>{var t;if(d.query.url){const o=await fetch(d.query.url),r=(t=o==null?void 0:o.body)==null?void 0:t.getReader();if(r){const n=[];for(;;){const{done:u,value:l}=await r.read();if(u)break;n.push(...l)}const a=new Uint8Array(n);e.binaryFile=a,e.binaryName=d.query.url.substring(d.query.url.lastIndexOf("/")+1).split("?")[0]+" "}}});const F=()=>{const t=document.createElement("input");t.type="file",t.onchange=async()=>{const o=new Blob([t.files[0]],{type:"application/octet-stream"}),r=new Uint8Array(await o.arrayBuffer());e.binaryFile=r,e.binaryName=t.files[0].name},t.click()},g=async()=>{if(!e.binaryFile){alert("\u8BF7\u9009\u62E9\u6587\u4EF6");return}m.connectPort&&await y(m.connectPort);let t=await q();await _(t,24,1e3);const o=x(e.binaryFile),r=new Uint8Array([48,5,o.length,0,...o]);await h(t,r),await _(t,24);const n=R(e.binaryFile);if(n.length>61439)throw new Error("Last resort boundary check failed. Whoever touched the code is an idiot.");for(let a=0;a<n.length;a+=256){const u=n.slice(a,a+256),l=j(u,a,n.length);try{await h(t,l),await _(t,26)}catch(s){return console.log("Flash command rejected. Aborting."),Promise.reject(s)}e.status=e.status+`\u66F4\u65B0\u8FDB\u5EA6 ${(a/n.length*100).toFixed(1)}%<br/>`,b(()=>{const s=document==null?void 0:document.getElementById("statusArea");s&&(s.scrollTop=s==null?void 0:s.scrollHeight)})}e.status=e.status+"\u66F4\u65B0\u8FDB\u5EA6 100.0%<br/>",e.status=e.status+"\u56FA\u4EF6\u66F4\u65B0\u6210\u529F",b(()=>{const a=document==null?void 0:document.getElementById("statusArea");a&&(a.scrollTop=a==null?void 0:a.scrollHeight)}),y(t),m.updateSettings({connectState:!1})};return(t,o)=>{const r=k,n=P,a=S,u=T,l=N,s=D,w=M;return $(),I("div",L,[i(r,{items:[t.$t("menu.list"),t.$t("menu.flash")]},null,8,["items"]),i(w,{gutter:20,align:"stretch"},{default:c(()=>[i(s,{span:24},{default:c(()=>[i(l,{class:"general-card",title:t.$t("menu.flash")+t.$t("global.onBoot")},{default:c(()=>[i(a,null,{default:c(()=>[i(n,{onClick:F},{default:c(()=>[p(f(e.binaryFile?e.binaryName:t.$t("tool.selectFirmware")),1)]),_:1}),i(n,{type:"primary",disabled:!e.binaryFile,onClick:g},{default:c(()=>[p(f(t.$t("tool.flash")),1)]),_:1},8,["disabled"])]),_:1}),i(u),H("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:e.status},null,8,U)]),_:1},8,["title"])]),_:1})]),_:1})])}}});const at=E(z,[["__scopeId","data-v-5cb91e08"]]);export{at as default};
|
BIN
assets/index.44cffefc.js.gz
Normal file
BIN
assets/index.44cffefc.js.gz
Normal file
Binary file not shown.
1
assets/index.458b53c8.js
Normal file
1
assets/index.458b53c8.js
Normal file
@ -0,0 +1 @@
|
||||
import{d as x,c as q,b5 as R,C as i,D as u,G as s,aI as e,aH as n,aK as D,aJ as E,aE as j,aN as r,b6 as z,f as A,r as G,b7 as H,b8 as J,b9 as K,ba as Q,bb as T,u as C,aM as f,a_ as W,bc as O,bd as X,a$ as Y,be as Z,bf as ee}from"./arco.949c921a.js";import{F as oe}from"./index.e1cff722.js";import{v as V,_ as k,u as se,I as ae,a as ne}from"./index.ab5e1824.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{f as te,g as re}from"./vue.d12e9c08.js";import{u as le}from"./loading.68e8c78e.js";import"./index.f30896f8.js";import"./useConfig.aff24c27.js";import"./useDisabled.d1f2a1bc.js";import"./chart.b6f2f6d9.js";const S=""+new URL("login-banner.426fb77f.png",import.meta.url).href,ce={class:"banner"},ie={class:"banner-inner"},de={class:"carousel-title"},_e={class:"carousel-sub-title"},me=["src"],ue=x({__name:"banner",setup(c){const{t}=V.exports.useI18n(),g=q(()=>[{slogan:t("login.banner.slogan1"),subSlogan:t("login.banner.subSlogan1"),image:S},{slogan:t("login.banner.slogan2"),subSlogan:t("login.banner.subSlogan2"),image:S},{slogan:t("login.banner.slogan3"),subSlogan:t("login.banner.subSlogan3"),image:S}]);return(b,v)=>{const p=z,h=R;return i(),u("div",ce,[s("div",ie,[e(h,{class:"carousel","animation-name":"fade"},{default:n(()=>[(i(!0),u(D,null,E(g.value,a=>(i(),j(p,{key:a.slogan},{default:n(()=>[(i(),u("div",{key:a.slogan,class:"carousel-item"},[s("div",de,r(a.slogan),1),s("div",_e,r(a.subSlogan),1),s("img",{class:"carousel-image",src:a.image},null,8,me)]))]),_:2},1024))),128))]),_:1})])])}}});const ge=k(ue,[["__scopeId","data-v-741ef175"]]),pe={class:"login-form-wrapper"},fe={class:"login-form-title"},be={class:"login-form-sub-title"},ve={class:"login-form-error-msg"},he={class:"login-form-password-actions"},we=x({__name:"login-form",setup(c){const t=te(),{t:g}=V.exports.useI18n(),b=A(""),{loading:v,setLoading:p}=le(),h=se(),a=re("login-config",{rememberPassword:!0,username:"admin",password:"admin"}),d=G({username:a.value.username,password:a.value.password}),F=async({errors:o,values:l})=>{if(!v.value&&!o){p(!0);try{await h.login(l);const{redirect:_,...w}=t.currentRoute.value.query;t.push({name:_||"Workplace",query:{...w}}),W.success(g("login.form.login.success"));const{rememberPassword:m}=a.value,{username:$,password:y}=l;a.value.username=m?$:"",a.value.password=m?y:""}catch(_){b.value=_.message}finally{p(!1)}}},L=o=>{a.value.rememberPassword=o};return(o,l)=>{const _=ae,w=H,m=O,$=ne,y=X,B=J,N=K,P=Y,M=Q,U=T;return i(),u("div",pe,[s("div",fe,r(o.$t("login.form.title")),1),s("div",be,r(o.$t("login.form.title")),1),s("div",ve,r(b.value),1),e(U,{ref:"loginForm",model:d,class:"login-form",layout:"vertical",onSubmit:F},{default:n(()=>[e(m,{field:"username",rules:[{required:!0,message:o.$t("login.form.userName.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:n(()=>[e(w,{modelValue:d.username,"onUpdate:modelValue":l[0]||(l[0]=I=>d.username=I),placeholder:o.$t("login.form.userName.placeholder")},{prefix:n(()=>[e(_)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),e(m,{field:"password",rules:[{required:!0,message:o.$t("login.form.password.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:n(()=>[e(y,{modelValue:d.password,"onUpdate:modelValue":l[1]||(l[1]=I=>d.password=I),placeholder:o.$t("login.form.password.placeholder"),"allow-clear":""},{prefix:n(()=>[e($)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),e(M,{size:16,direction:"vertical"},{default:n(()=>[s("div",he,[e(B,{checked:"rememberPassword","model-value":C(a).rememberPassword,onChange:L},{default:n(()=>[f(r(o.$t("login.form.rememberPassword")),1)]),_:1},8,["model-value","onChange"]),e(N,null,{default:n(()=>[f(r(o.$t("login.form.forgetPassword")),1)]),_:1})]),e(P,{type:"primary","html-type":"submit",long:"",loading:C(v)},{default:n(()=>[f(r(o.$t("login.form.login")),1)]),_:1},8,["loading"]),e(P,{type:"text",long:"",class:"login-form-register-btn"},{default:n(()=>[f(r(o.$t("login.form.register")),1)]),_:1})]),_:1})]),_:1},8,["model"])])}}});const $e=k(we,[["__scopeId","data-v-12db3177"]]),ye=c=>(Z("data-v-24cebde1"),c=c(),ee(),c),Ie={class:"container"},Se=ye(()=>s("div",{class:"logo"},[s("img",{alt:"logo",src:"//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/dfdba5317c0c20ce20e64fac803d52bc.svg~tplv-49unhts6dw-image.image"}),s("div",{class:"logo-text"},"Arco Design Pro")],-1)),xe={class:"content"},ke={class:"content-inner"},Pe={class:"footer"},Ce=x({__name:"index",setup(c){return(t,g)=>(i(),u("div",Ie,[Se,e(ge),s("div",xe,[s("div",ke,[e($e)]),s("div",Pe,[e(oe)])])]))}});const Ge=k(Ce,[["__scopeId","data-v-24cebde1"]]);export{Ge as default};
|
BIN
assets/index.458b53c8.js.gz
Normal file
BIN
assets/index.458b53c8.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.4b759091.js.gz
Normal file
BIN
assets/index.4b759091.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{_ as t}from"./index.3a3bc300.js";import{C as a,aE as s,aH as _,bg as c,be as n,bf as r,G as d}from"./arco.768e32d2.js";const p={},f=e=>(n("data-v-77ebf61d"),e=e(),r(),e),i=f(()=>d("a",{href:"https://github.com/silenty4ng/k5web",target:"_blank"},"K5Web - V0.1.202405130020",-1));function b(e,l){const o=c;return a(),s(o,{class:"footer"},{default:_(()=>[i]),_:1})}const m=t(p,[["render",b],["__scopeId","data-v-77ebf61d"]]);export{m as F};
|
Binary file not shown.
Binary file not shown.
1
assets/index.5c524a82.css
Normal file
1
assets/index.5c524a82.css
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.5c524a82.css.gz
Normal file
BIN
assets/index.5c524a82.css.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{v as H,e as M,ak as N,_ as U}from"./index.3a3bc300.js";/* empty css *//* empty css *//* empty css */import{d as V,r as y,c as L,bH as O,C as j,D as G,aI as s,aH as r,G as S,aN as f,aM as g,u as h,a6 as J,a$ as W,ba as Z,bI as q,bJ as F}from"./arco.768e32d2.js";import{u as Q}from"./loading.c097827a.js";import{e as v,a as P,u as w,f as X,h as D,s as Y,b,g as ee}from"./serial.c741fbda.js";import{I as C}from"./form-model.d137f973.js";import{M as te,T as ae}from"./index.2d220bda.js";import{B as ne}from"./index.7a4cefac.js";import"./chart.affe3403.js";import"./vue.5a5bc6a2.js";import"./useConfig.62a71898.js";import"./dialog.6aec0de8.js";import"./index.392520af.js";import"./dep-6deb4e3a.cb002766.js";import"./slot.687a5bca.js";const oe={class:"container"},re={name:"Radio"},ie=V({...re,setup(se){const{t:m}=H.exports.useI18n(),o=M(),{loading:I,setLoading:u}=Q(!1),a=y({renderData:Array.from({length:16}).map(e=>({})),pageSize:16,nowPage:1}),z=y({showHide:0}),R=e=>{a.renderData=e.newData},A=L(()=>[{colKey:"drag",title:m("cps.sort"),width:46},{title:"#",colKey:"index",align:"left",width:100},{title:m("cps.contact"),colKey:"name",width:250,align:"left",cell:(e,{row:t})=>t.name?t.name.replace(/[^a-zA-Z0-9_]/g,""):void 0,edit:{component:C,props:{clearable:!0},onEdited:e=>{const t=[...a.renderData];t.splice((a.nowPage-1)*a.pageSize+e.rowIndex,1,e.newRowData),a.renderData=t}}},{title:m("cps.mdcid"),colKey:"mdcid",align:"left",width:200,cell:(e,{row:t})=>parseInt(t.mdcid,16)<=65535?parseInt(t.mdcid,16).toString(16):void 0,edit:{component:C,props:{clearable:!0},onEdited:e=>{e.newRowData.mdcid=e.newRowData.mdcid?e.newRowData.mdcid:void 0;const t=[...a.renderData];t.splice((a.nowPage-1)*a.pageSize+e.rowIndex,1,e.newRowData),a.renderData=t}}},{title:m("cps.operate"),colKey:"operate",align:"left",width:150}]),$=async()=>{var d,c;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}await v(o.connectPort),u(!0);let e=new Uint8Array(256);for(let n=7424;n<7680;n+=16){const i=await P(o.connectPort,n,16,(d=o.configuration)==null?void 0:d.uart);e.set(i,n-7424)}const t=[];for(let n=0;n<256;n+=16)w(e.subarray(n,n+2))!="ffff"?t.push({name:X(e.subarray(n+2,n+16),(c=o.configuration)==null?void 0:c.charset).trim(),mdcid:w(e.subarray(n,n+1))+w(e.subarray(n+1,n+2))}):t.push({});a.renderData=t,u(!1)},T=async()=>{var t,d,c,n;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}await v(o.connectPort),u(!0);for(let i=0;i<256;i+=16)if(a.renderData[i/16].mdcid){const l=new Uint8Array(16).fill(32);l.set(D(a.renderData[i/16].mdcid.padStart(4,"0").substring(0,2))),l.set(D(a.renderData[i/16].mdcid.padStart(4,"0").substring(2,4)),1),l.set(Y(a.renderData[i/16].name),2),await b(o.connectPort,i+7424,l,16,(t=o.configuration)==null?void 0:t.uart)}else await b(o.connectPort,i+7424,D("ffffffffffffffffffffffffffffffff"),16,(d=o.configuration)==null?void 0:d.uart);const e=await P(o.connectPort,8176,16,(c=o.configuration)==null?void 0:c.uart);e.set([16],16-1),await b(o.connectPort,8176,e,16,(n=o.configuration)==null?void 0:n.uart),await ee(o.connectPort),u(!1)},k=async e=>{const t=[...a.renderData];t.splice(e,1,{scanlist:[]}),a.renderData=t};return(e,t)=>{const d=N,c=J,n=W,i=Z,l=q,B=F,K=ne,x=ae,E=O;return j(),G("div",oe,[s(d,{items:[e.$t("menu.dashboard"),e.$t("menu.cps.mdc")]},null,8,["items"]),s(E,{class:"general-card"},{title:r(()=>[S("span",{onClick:t[0]||(t[0]=()=>{z.showHide+=1})},f(e.$t("menu.cps.mdc")+e.$t("global.onStart")),1)]),default:r(()=>[s(B,{style:{"margin-bottom":"16px"}},{default:r(()=>[s(l,{span:12},{default:r(()=>[s(i,null,{default:r(()=>[s(n,{type:"primary",onClick:$},{icon:r(()=>[s(c)]),default:r(()=>[g(" "+f(e.$t("cps.onDeviceRead")),1)]),_:1}),s(n,{onClick:T},{icon:r(()=>[s(c)]),default:r(()=>[g(" "+f(e.$t("cps.onDeviceWrite")),1)]),_:1})]),_:1})]),_:1})]),_:1}),s(x,{class:"ttable",loading:h(I),size:"medium",columns:A.value,data:a.renderData,pagination:{defaultPageSize:a.pageSize,total:a.renderData.length,defaultCurrent:1,pageSizeOptions:[15,30,50,100,200]},onChange:t[1]||(t[1]=p=>{a.pageSize=p.pagination.pageSize,a.nowPage=p.pagination.current}),bordered:"","lazy-load":"",headerAffixedTop:{offsetTop:60},hover:!0,"drag-sort":"row-handler",onDragSort:R},{drag:r(({row:p,rowIndex:_})=>[S("span",null,[s(h(te))])]),index:r(({row:p,rowIndex:_})=>[g(f((a.nowPage-1)*a.pageSize+_+1),1)]),operate:r(({row:p,rowIndex:_})=>[s(K,{theme:"default",variant:"dashed",onClick:ce=>k((a.nowPage-1)*a.pageSize+_)},{default:r(()=>[g(f(e.$t("cps.clear")),1)]),_:2},1032,["onClick"])]),_:1},8,["loading","columns","data","pagination"])]),_:1})])}}});const Ie=U(ie,[["__scopeId","data-v-9ba38d74"]]);export{Ie as default};
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
.container[data-v-739b81b7]{padding:0 20px 20px}.container[data-v-739b81b7] .arco-list-content{overflow-x:hidden}.container[data-v-739b81b7] .arco-card-meta-title{font-size:14px}[data-v-739b81b7] .arco-list-col{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}[data-v-739b81b7] .arco-list-item{width:33%}[data-v-739b81b7] .block-title{margin:0 0 12px;font-size:14px}[data-v-739b81b7] .list-wrap .list-row{align-items:stretch}[data-v-739b81b7] .list-wrap .list-row .list-col{margin-bottom:16px}[data-v-739b81b7] .list-wrap :deep(.arco-space){width:100%}[data-v-739b81b7] .list-wrap :deep(.arco-space) .arco-space-item:last-child{flex:1}
|
Binary file not shown.
1
assets/index.68b95abd.js
Normal file
1
assets/index.68b95abd.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.68b95abd.js.gz
Normal file
BIN
assets/index.68b95abd.js.gz
Normal file
Binary file not shown.
1
assets/index.6f086bc7.js
Normal file
1
assets/index.6f086bc7.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.6f086bc7.js.gz
Normal file
BIN
assets/index.6f086bc7.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{_ as n}from"./index.3a3bc300.js";import{d as c,bG as _,a$ as r,D as u,aI as e,G as p,aH as i,C as d,aM as l}from"./arco.768e32d2.js";import{f as m}from"./vue.5a5bc6a2.js";import"./chart.affe3403.js";const f={class:"content"},x={class:"operation-row"},b=c({__name:"index",setup(k){const t=m(),o=()=>{t.push({name:"Workplace"})};return(h,v)=>{const s=_,a=r;return d(),u("div",f,[e(s,{class:"result",status:"404",subtitle:"\u627E\u4E0D\u5230\u7F51\u9875"}),p("div",x,[e(a,{key:"back",type:"primary",onClick:o},{default:i(()=>[l(" \u8FD4\u56DE ")]),_:1})])])}}});const E=n(b,[["__scopeId","data-v-8bef407f"]]);export{E as default};
|
||||
import{_ as n}from"./index.ab5e1824.js";import{d as c,bG as _,a$ as r,D as u,aI as e,G as p,aH as i,C as d,aM as l}from"./arco.949c921a.js";import{f as m}from"./vue.d12e9c08.js";import"./chart.b6f2f6d9.js";const f={class:"content"},x={class:"operation-row"},b=c({__name:"index",setup(k){const t=m(),o=()=>{t.push({name:"Workplace"})};return(h,v)=>{const s=_,a=r;return d(),u("div",f,[e(s,{class:"result",status:"404",subtitle:"\u627E\u4E0D\u5230\u7F51\u9875"}),p("div",x,[e(a,{key:"back",type:"primary",onClick:o},{default:i(()=>[l(" \u8FD4\u56DE ")]),_:1})])])}}});const E=n(b,[["__scopeId","data-v-8bef407f"]]);export{E as default};
|
@ -1,33 +0,0 @@
|
||||
import{u as D,b as R,c as d,d as N}from"./useConfig.62a71898.js";import{f as A,o as I,bs as z,c as S,i as F,g as M,d as $,aI as E,h as X}from"./arco.768e32d2.js";import{L as G}from"./index.392520af.js";import{N as _,z as K,O as U,P as V,A as W,G as J,B as Z}from"./index.3a3bc300.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var q={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},ghost:Boolean,href:{type:String,default:""},icon:{type:Function},loading:Boolean,shape:{type:String,default:"rectangle",validator:function(e){return e?["rectangle","square","round","circle"].includes(e):!0}},size:{type:String,default:"medium",validator:function(e){return e?["extra-small","small","medium","large"].includes(e):!0}},suffix:{type:Function},tag:{type:String,validator:function(e){return e?["button","a","div"].includes(e):!0}},theme:{type:String,validator:function(e){return e?["default","primary","danger","warning","success"].includes(e):!0}},type:{type:String,default:"button",validator:function(e){return e?["submit","reset","button"].includes(e):!0}},variant:{type:String,default:"base",validator:function(e){return e?["base","outline","dashed","text"].includes(e):!0}},onClick:Function};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var H=_.expand,Q=_.ripple,Y=_.fade;function ee(){var t=K("animation"),e=t.globalConfig,n=function(o){var l,c,r=e.value;return r&&!((l=r.exclude)!==null&&l!==void 0&&l.includes(o))&&((c=r.include)===null||c===void 0?void 0:c.includes(o))};return{keepExpand:n(H),keepRipple:n(Q),keepFade:n(Y)}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function L(t,e){var n=Object.keys(e);n.forEach(function(a){t.style[a]=e[a]})}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var T=200,te="rgba(0, 0, 0, 0)",ne="rgba(0, 0, 0, 0.35)",ae=function(e,n){var a;if(n)return n;if(e!=null&&(a=e.dataset)!==null&&a!==void 0&&a.ripple){var o=e.dataset.ripple;return o}var l=getComputedStyle(e).getPropertyValue("--ripple-color");return l||ne};function re(t,e){var n=A(null),a=D(),o=ee(),l=o.keepRipple,c=function(g){var i=t.value,h=ae(i,e==null?void 0:e.value);if(!(g.button!==0||!t||!l)&&!(i.classList.contains("".concat(a.value,"-is-active"))||i.classList.contains("".concat(a.value,"-is-disabled"))||i.classList.contains("".concat(a.value,"-is-checked"))||i.classList.contains("".concat(a.value,"-is-loading")))){var b=getComputedStyle(i),v=parseInt(b.borderWidth,10),y=v>0?v:0,f=i.offsetWidth,u=i.offsetHeight;n.value.parentNode===null&&(L(n.value,{position:"absolute",left:"".concat(0-y,"px"),top:"".concat(0-y,"px"),width:"".concat(f,"px"),height:"".concat(u,"px"),borderRadius:b.borderRadius,pointerEvents:"none",overflow:"hidden"}),i.appendChild(n.value));var s=document.createElement("div");L(s,{marginTop:"0",marginLeft:"0",right:"".concat(f,"px"),width:"".concat(f+20,"px"),height:"100%",transition:"transform ".concat(T,"ms cubic-bezier(.38, 0, .24, 1), background ").concat(T*2,"ms linear"),transform:"skewX(-8deg)",pointerEvents:"none",position:"absolute",zIndex:0,backgroundColor:h,opacity:"0.9"});for(var k=new WeakMap,C=i.children.length,m=0;m<C;++m){var p=i.children[m];p.style.zIndex===""&&p!==n.value&&(p.style.zIndex="1",k.set(p,!0))}var x=i.style.position?i.style.position:getComputedStyle(i).position;(x===""||x==="static")&&(i.style.position="relative"),n.value.insertBefore(s,n.value.firstChild),setTimeout(function(){s.style.transform="translateX(".concat(f,"px)")},0);var w=function B(){s.style.backgroundColor=te,t.value&&(t.value.removeEventListener("pointerup",B,!1),t.value.removeEventListener("pointerleave",B,!1),setTimeout(function(){s.remove(),n.value.children.length===0&&n.value.remove()},T*2+100))};t.value.addEventListener("pointerup",w,!1),t.value.addEventListener("pointerleave",w,!1)}};I(function(){var r=t==null?void 0:t.value;!r||(n.value=document.createElement("div"),r.addEventListener("pointerdown",c,!1))}),z(function(){var r;t==null||(r=t.value)===null||r===void 0||r.removeEventListener("pointerdown",c,!1)})}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var ie=U,oe=V,ue="[object Boolean]";function le(t){return t===!0||t===!1||oe(t)&&ie(t)==ue}var O=le;/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function se(t){var e=M(),n=S(function(){return e.props.disabled}),a=F("formDisabled",Object.create(null));return S(function(){var o;return O(t==null?void 0:t.beforeDisabled.value)?t.beforeDisabled.value:O(n.value)?n.value:O(t==null?void 0:t.afterDisabled.value)?t.afterDisabled.value:O((o=a.disabled)===null||o===void 0?void 0:o.value)?a.disabled.value:!1})}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?P(Object(n),!0).forEach(function(a){d(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}var ce=$({name:"TButton",props:q,setup:function(e,n){var a=n.attrs,o=n.slots,l=W(),c=J(),r=D("button"),g=R(),i=g.STATUS,h=g.SIZE,b=A();re(b);var v=se(),y=S(function(){var u=e.theme,s=e.variant;return u||(s==="base"?"primary":"default")}),f=S(function(){return["".concat(r.value),"".concat(r.value,"--variant-").concat(e.variant),"".concat(r.value,"--theme-").concat(y.value),d(d(d(d(d(d({},h.value[e.size],e.size!=="medium"),i.value.disabled,v.value),i.value.loading,e.loading),"".concat(r.value,"--shape-").concat(e.shape),e.shape!=="rectangle"),"".concat(r.value,"--ghost"),e.ghost),h.value.block,e.block)]});return function(){var u=c("default","content"),s=e.loading?E(G,{inheritColor:!0},null):l("icon"),k=s&&!u,C=e.suffix||o.suffix?E("span",{className:"".concat(r.value,"__suffix")},[l("suffix")]):null;u=u?E("span",{class:"".concat(r.value,"__text")},[u]):"",s&&(u=[s,u]),C&&(u=[u].concat(C));var m=function(){return!e.tag&&e.href?"a":e.tag||"button"},p={class:[].concat(N(f.value),[d({},"".concat(r.value,"--icon-only"),k)]),type:e.type,disabled:v.value||e.loading,href:e.href,tabindex:v.value?void 0:"0"};return X(m(),j(j(j({ref:b},a),p),{},{onClick:e.onClick}),[u])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var be=Z(ce);export{be as B,re as a,O as i,se as u};
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{e as v,ak as B,_ as E}from"./index.3a3bc300.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as $,r as C,bH as A,C as F,D as S,aI as n,aH as o,G as y,aN as _,aM as b,a$ as H,ba as R,bF as D,bI as I,bJ as P,n as T}from"./arco.768e32d2.js";import{i as M,e as N,b as U,g as V}from"./serial.c741fbda.js";import{C as z}from"./index.24207e1f.js";import"./chart.affe3403.js";import"./vue.5a5bc6a2.js";import"./useConfig.62a71898.js";import"./index.392520af.js";const L={class:"container"},G=["innerHTML"],J={name:"Chi"},K=$({...J,setup(O){const i=v(),u=C({status:"\u70B9\u51FB\u5199\u5165\u6309\u94AE\u5199\u5165\u5B57\u5E93\u5230\u8BBE\u5907<br/><br/>",eepromType:"",showHide:0}),w=async(e=0,t)=>{var p;await N(i.connectPort);for(let a=e;a<t.length+e;a+=128)await U(i.connectPort,a,t.slice(a-e,a-e+128),128,(p=i.configuration)==null?void 0:p.uart),u.status=u.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A"+((a-e)/t.length*100).toFixed(1)+"%<br/>",T(()=>{const r=document==null?void 0:document.getElementById("statusArea");r&&(r.scrollTop=r==null?void 0:r.scrollHeight)});u.status=u.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A100.0%<br/>",await V(i.connectPort)},h=async(e=1)=>{var p,a,r,m,g;if(i.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((p=i.configuration)==null?void 0:p.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}u.status=u.status+"\u6B63\u5728\u4E0B\u8F7D\u5B57\u5E93...<br />";let t;if(e==4){(a=i.configuration)!=null&&a.newpinyin?t=await fetch("/pinyin_plus.bin"):t=await fetch("/pinyin.bin");const c=t.body.getReader(),s=[];for(;;){const{done:d,value:f}=await c.read();if(d)break;s.push(...f)}const l=new Uint8Array(s);await w(131072,l);return}if(e==5){const c=await M(i.connectPort,(r=i.configuration)==null?void 0:r.uart);if(c!=262144&&c!=524288){u.status=u.status+"\u53EA\u652F\u6301 2Mbit \u4EE5\u4E0A EEPROM \u5199\u5165<br/>";return}t=await fetch("/ssb.bin");const s=t.body.getReader(),l=[];for(;;){const{done:f,value:k}=await s.read();if(f)break;l.push(...k)}const d=new Uint8Array(l);await w(246312,d);return}if(e==1){if(((m=i.configuration)==null?void 0:m.charset)=="losehu"){t=await fetch("/old_font.bin");const c=t.body.getReader(),s=[];for(;;){const{done:d,value:f}=await c.read();if(d)break;s.push(...f)}const l=new Uint8Array(s);await w(8192,l);return}if(((g=i.configuration)==null?void 0:g.charset)=="gb2312"){t=await fetch("/new_font_k.bin");const c=t.body.getReader(),s=[];for(;;){const{done:d,value:f}=await c.read();if(d)break;s.push(...f)}const l=new Uint8Array(s);await w(9344,l);return}}};return(e,t)=>{const p=B,a=H,r=z,m=R,g=D,c=A,s=I,l=P;return F(),S("div",L,[n(p,{items:[e.$t("menu.list"),e.$t("menu.font")]},null,8,["items"]),n(l,{gutter:20,align:"stretch"},{default:o(()=>[n(s,{span:24},{default:o(()=>[n(c,{class:"general-card"},{title:o(()=>[y("span",{onClick:t[0]||(t[0]=()=>{u.showHide+=1})},_(e.$t("menu.font")+e.$t("global.onStart")),1)]),default:o(()=>[n(m,null,{default:o(()=>[n(r,{bordered:""},{header:o(()=>[b(_(e.$t("tool.fontwrite")),1)]),default:o(()=>[n(a,{onClick:t[1]||(t[1]=d=>h(1))},{default:o(()=>[b(_(e.$t("tool.writefontwrite")),1)]),_:1})]),_:1}),n(r,{bordered:""},{header:o(()=>[b(_(e.$t("tool.pinyinwrite")),1)]),default:o(()=>[n(m,null,{default:o(()=>[n(a,{onClick:t[2]||(t[2]=d=>h(4))},{default:o(()=>[b(_(e.$t("tool.writepinyin")),1)]),_:1})]),_:1})]),_:1}),n(r,{bordered:""},{header:o(()=>[b(_(e.$t("tool.ssbpatch")),1)]),default:o(()=>[n(m,null,{default:o(()=>[n(a,{onClick:t[3]||(t[3]=d=>h(5))},{default:o(()=>[b(_(e.$t("tool.writessbpatch")),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(g),y("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:u.status},null,8,G)]),_:1})]),_:1})]),_:1})])}}});const at=E(K,[["__scopeId","data-v-38246451"]]);export{at as default};
|
Binary file not shown.
1
assets/index.85faa4af.js
Normal file
1
assets/index.85faa4af.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.85faa4af.js.gz
Normal file
BIN
assets/index.85faa4af.js.gz
Normal file
Binary file not shown.
1
assets/index.90bdf82b.css
Normal file
1
assets/index.90bdf82b.css
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.90bdf82b.css.gz
Normal file
BIN
assets/index.90bdf82b.css.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{d as o,D as r,C as a}from"./arco.768e32d2.js";import{f as s,h as n}from"./vue.5a5bc6a2.js";const i=o({__name:"index",setup(c){const e=s(),t=n().params.path;return e.replace({path:t}),(u,m)=>(a(),r("div"))}});export{i as default};
|
1
assets/index.93c0e9d3.js
Normal file
1
assets/index.93c0e9d3.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.93c0e9d3.js.gz
Normal file
BIN
assets/index.93c0e9d3.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{e as L,ak as N,_ as F}from"./index.3a3bc300.js";/* empty css *//* empty css *//* empty css */import{d as U,r as V,o as j,bH as O,bO as A,C as h,D as b,aI as f,aH as g,G as x,aK as $,aJ as k,F as H,aM as y,aN as v,a$ as T,ba as q,bI as z,bJ as J,be as K,bf as G}from"./arco.768e32d2.js";import{h as Q}from"./vue.5a5bc6a2.js";import{e as W,b as X,g as Y}from"./serial.c741fbda.js";import"./chart.affe3403.js";const E=w=>(K("data-v-ffb80c1d"),w=w(),G(),w),Z={class:"container"},tt=E(()=>x("div",{id:"canvasDiv",style:{zoom:"250%",display:"none"}},null,-1)),et={style:{padding:"0",margin:"0","border-spacing":"0"}},ot=["onMousedown","onMouseover"],nt=E(()=>x("br",null,null,-1)),at={name:"Backup"},it=U({...at,setup(w){const p=L(),s=V({binaryFile:void 0,loading:!1,matrix:[],mousedown:!1}),I=Q();j(async()=>{if(I.query.url){const e=await fetch(I.query.url,{responseType:"blob"});M(window.URL.createObjectURL(await e.blob()))}});const D=()=>{const e=s.matrix;e.map((n,t)=>{n.map((a,l)=>{e[t][l]=a=="#fff"?"#000":"#fff"})}),s.matrix=e},S=(e,n)=>{if(s.mousedown){const t=s.matrix;t[n][e]=s.matrix[n][e]=="#fff"?"#000":"#fff",s.matrix=t}},M=e=>{const n=document.createElement("canvas");n.width=128,n.height=64;const t=n.cloneNode(),a=document.getElementById("canvasDiv");a.innerHTML="",a==null||a.append(n,t);const l=new Image;l.src=e,l.onload=()=>{const i=n.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,n.width,n.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},R=()=>{const e=document.createElement("input");e.type="file",e.onchange=async()=>{const n=new Blob([e.files[0]],{type:"application/octet-stream"}),t=URL.createObjectURL(n),a=document.createElement("canvas");a.width=128,a.height=64;const l=new Image;l.src=t,l.onload=()=>{const i=a.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,a.width,a.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},e.click()},B=async()=>{const e=s.matrix,n=document.createElement("canvas");n.width=128,n.height=64;const t=n.getContext("2d");t&&(t.fillStyle="#fff",t.fillRect(0,0,n.width,n.height),t.fillStyle="#000");for(let l=0;l<64;l++)for(let i=0;i<128;i++)e[l][i]=="#000"&&(t==null||t.beginPath(),t==null||t.rect(i,l,1,1),t==null||t.fill());const a=document.createElement("a");a.href=n.toDataURL("image/jpeg",1),a.download="image.jpg",a.click()},P=async()=>{var l,i,m,_,d;const e=new Uint8Array(1024);let n=0;for(let o=0;o<64;o+=8)for(let r=0;r<128;r++){let u=0;for(let c=0;c<8;c++)u|=(s.matrix[o+c][r]=="#000"?1:0)<<c;e[n++]=u}if(s.binaryFile=e,p.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((l=p.configuration)==null?void 0:l.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}if(((i=p.configuration)==null?void 0:i.charset)!="losehu"&&((m=p.configuration)==null?void 0:m.charset)!="gb2312"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}s.loading=!0;let t=123728;((_=p.configuration)==null?void 0:_.charset)=="gb2312"&&(t=8320),await W(p.connectPort);const a=s.binaryFile;for(let o=t;o<a.length+t;o+=128)await X(p.connectPort,o,a.slice(o-t,o-t+128),128,(d=p.configuration)==null?void 0:d.uart);await Y(p.connectPort),s.loading=!1};return(e,n)=>{const t=N,a=T,l=q,i=O,m=A,_=z,d=J;return h(),b("div",Z,[f(t,{items:[e.$t("menu.list"),e.$t("menu.image")]},null,8,["items"]),f(d,{gutter:20,align:"stretch"},{default:g(()=>[f(_,{span:24},{default:g(()=>[f(m,{loading:s.loading,tip:"\u5199\u5165\u4E2D...",style:{width:"100%"}},{default:g(()=>[f(i,{class:"general-card",title:e.$t("menu.image")+e.$t("global.onStart")},{default:g(()=>[tt,x("div",null,[x("table",et,[(h(!0),b($,null,k(s.matrix,(o,r)=>(h(),b("tr",null,[(h(!0),b($,null,k(o,(u,c)=>(h(),b("td",{onMousedown:C=>{s.mousedown=!0,S(c,r)},onMouseup:n[0]||(n[0]=C=>{s.mousedown=!1}),onMouseover:C=>S(c,r),style:H("background-color: "+u+"; height: 5px; width: 3.5px;")},null,44,ot))),256))]))),256))])]),nt,f(l,null,{default:g(()=>[f(a,{onClick:R},{default:g(()=>[y(v(e.$t("tool.selectImage")),1)]),_:1}),f(a,{disabled:s.matrix.length<64,onClick:D},{default:g(()=>[y(v(e.$t("image.negative")),1)]),_:1},8,["disabled"]),f(a,{disabled:s.matrix.length<64,onClick:B},{default:g(()=>[y(v(e.$t("cps.save")),1)]),_:1},8,["disabled"]),f(a,{type:"primary",disabled:s.matrix.length<64,onClick:P},{default:g(()=>[y(v(e.$t("tool.write")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}});const pt=F(it,[["__scopeId","data-v-ffb80c1d"]]);export{pt as default};
|
||||
import{k as L,ak as N,_ as F}from"./index.ab5e1824.js";/* empty css *//* empty css *//* empty css */import{d as U,r as V,o as j,bH as A,bP as H,C as h,D as b,aI as f,aH as g,G as x,aK as k,aJ as $,F as K,aM as y,aN as v,a$ as O,ba as T,bI as q,bK as z,be as G,bf as J}from"./arco.949c921a.js";import{h as Q}from"./vue.d12e9c08.js";import{e as W,b as X,g as Y}from"./serial.c741fbda.js";import"./chart.b6f2f6d9.js";const E=w=>(G("data-v-ffb80c1d"),w=w(),J(),w),Z={class:"container"},tt=E(()=>x("div",{id:"canvasDiv",style:{zoom:"250%",display:"none"}},null,-1)),et={style:{padding:"0",margin:"0","border-spacing":"0"}},ot=["onMousedown","onMouseover"],nt=E(()=>x("br",null,null,-1)),at={name:"Backup"},it=U({...at,setup(w){const p=L(),s=V({binaryFile:void 0,loading:!1,matrix:[],mousedown:!1}),I=Q();j(async()=>{if(I.query.url){const e=await fetch(I.query.url,{responseType:"blob"});M(window.URL.createObjectURL(await e.blob()))}});const D=()=>{const e=s.matrix;e.map((n,t)=>{n.map((a,l)=>{e[t][l]=a=="#fff"?"#000":"#fff"})}),s.matrix=e},S=(e,n)=>{if(s.mousedown){const t=s.matrix;t[n][e]=s.matrix[n][e]=="#fff"?"#000":"#fff",s.matrix=t}},M=e=>{const n=document.createElement("canvas");n.width=128,n.height=64;const t=n.cloneNode(),a=document.getElementById("canvasDiv");a.innerHTML="",a==null||a.append(n,t);const l=new Image;l.src=e,l.onload=()=>{const i=n.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,n.width,n.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},P=()=>{const e=document.createElement("input");e.type="file",e.onchange=async()=>{const n=new Blob([e.files[0]],{type:"application/octet-stream"}),t=URL.createObjectURL(n),a=document.createElement("canvas");a.width=128,a.height=64;const l=new Image;l.src=t,l.onload=()=>{const i=a.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,a.width,a.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},e.click()},R=async()=>{const e=s.matrix,n=document.createElement("canvas");n.width=128,n.height=64;const t=n.getContext("2d");t&&(t.fillStyle="#fff",t.fillRect(0,0,n.width,n.height),t.fillStyle="#000");for(let l=0;l<64;l++)for(let i=0;i<128;i++)e[l][i]=="#000"&&(t==null||t.beginPath(),t==null||t.rect(i,l,1,1),t==null||t.fill());const a=document.createElement("a");a.href=n.toDataURL("image/jpeg",1),a.download="image.jpg",a.click()},B=async()=>{var l,i,m,_,d;const e=new Uint8Array(1024);let n=0;for(let o=0;o<64;o+=8)for(let r=0;r<128;r++){let u=0;for(let c=0;c<8;c++)u|=(s.matrix[o+c][r]=="#000"?1:0)<<c;e[n++]=u}if(s.binaryFile=e,p.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((l=p.configuration)==null?void 0:l.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}if(((i=p.configuration)==null?void 0:i.charset)!="losehu"&&((m=p.configuration)==null?void 0:m.charset)!="gb2312"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}s.loading=!0;let t=123728;((_=p.configuration)==null?void 0:_.charset)=="gb2312"&&(t=8320),await W(p.connectPort);const a=s.binaryFile;for(let o=t;o<a.length+t;o+=128)await X(p.connectPort,o,a.slice(o-t,o-t+128),128,(d=p.configuration)==null?void 0:d.uart);await Y(p.connectPort),s.loading=!1};return(e,n)=>{const t=N,a=O,l=T,i=A,m=H,_=q,d=z;return h(),b("div",Z,[f(t,{items:[e.$t("menu.list"),e.$t("menu.image")]},null,8,["items"]),f(d,{gutter:20,align:"stretch"},{default:g(()=>[f(_,{span:24},{default:g(()=>[f(m,{loading:s.loading,tip:"\u5199\u5165\u4E2D...",style:{width:"100%"}},{default:g(()=>[f(i,{class:"general-card",title:e.$t("menu.image")+e.$t("global.onStart")},{default:g(()=>[tt,x("div",null,[x("table",et,[(h(!0),b(k,null,$(s.matrix,(o,r)=>(h(),b("tr",null,[(h(!0),b(k,null,$(o,(u,c)=>(h(),b("td",{onMousedown:C=>{s.mousedown=!0,S(c,r)},onMouseup:n[0]||(n[0]=C=>{s.mousedown=!1}),onMouseover:C=>S(c,r),style:K("background-color: "+u+"; height: 5px; width: 3.5px;")},null,44,ot))),256))]))),256))])]),nt,f(l,null,{default:g(()=>[f(a,{onClick:P},{default:g(()=>[y(v(e.$t("tool.selectImage")),1)]),_:1}),f(a,{disabled:s.matrix.length<64,onClick:D},{default:g(()=>[y(v(e.$t("image.negative")),1)]),_:1},8,["disabled"]),f(a,{disabled:s.matrix.length<64,onClick:R},{default:g(()=>[y(v(e.$t("cps.save")),1)]),_:1},8,["disabled"]),f(a,{type:"primary",disabled:s.matrix.length<64,onClick:B},{default:g(()=>[y(v(e.$t("tool.write")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}});const pt=F(it,[["__scopeId","data-v-ffb80c1d"]]);export{pt as default};
|
BIN
assets/index.9ce7b977.js.gz
Normal file
BIN
assets/index.9ce7b977.js.gz
Normal file
Binary file not shown.
1
assets/index.9d3248bf.js
Normal file
1
assets/index.9d3248bf.js
Normal file
@ -0,0 +1 @@
|
||||
import{k as v,ak as B,_ as E}from"./index.ab5e1824.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as $,r as C,bH as A,C as F,D as S,aI as n,aH as o,G as k,aN as _,aM as b,a$ as H,ba as R,bF as D,bI as I,bK as P,n as T}from"./arco.949c921a.js";import{i as M,e as N,b as U,g as V}from"./serial.c741fbda.js";import{C as z}from"./index.12828262.js";import"./chart.b6f2f6d9.js";import"./vue.d12e9c08.js";import"./useConfig.aff24c27.js";import"./index.df0a6ce7.js";import"./helper.196ee190.js";const K={class:"container"},L=["innerHTML"],G={name:"Chi"},O=$({...G,setup(j){const s=v(),u=C({status:"\u70B9\u51FB\u5199\u5165\u6309\u94AE\u5199\u5165\u5B57\u5E93\u5230\u8BBE\u5907<br/><br/>",eepromType:"",showHide:0}),w=async(e=0,t)=>{var p;await N(s.connectPort);for(let a=e;a<t.length+e;a+=128)await U(s.connectPort,a,t.slice(a-e,a-e+128),128,(p=s.configuration)==null?void 0:p.uart),u.status=u.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A"+((a-e)/t.length*100).toFixed(1)+"%<br/>",T(()=>{const r=document==null?void 0:document.getElementById("statusArea");r&&(r.scrollTop=r==null?void 0:r.scrollHeight)});u.status=u.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A100.0%<br/>",await V(s.connectPort)},h=async(e=1)=>{var p,a,r,m,g;if(s.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((p=s.configuration)==null?void 0:p.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}u.status=u.status+"\u6B63\u5728\u4E0B\u8F7D\u5B57\u5E93...<br />";let t;if(e==4){(a=s.configuration)!=null&&a.newpinyin?t=await fetch("/pinyin_plus.bin"):t=await fetch("/pinyin.bin");const c=t.body.getReader(),i=[];for(;;){const{done:d,value:f}=await c.read();if(d)break;i.push(...f)}const l=new Uint8Array(i);await w(131072,l);return}if(e==5){const c=await M(s.connectPort,(r=s.configuration)==null?void 0:r.uart);if(c!=262144&&c!=524288){u.status=u.status+"\u53EA\u652F\u6301 2Mbit \u4EE5\u4E0A EEPROM \u5199\u5165<br/>";return}t=await fetch("/ssb.bin");const i=t.body.getReader(),l=[];for(;;){const{done:f,value:y}=await i.read();if(f)break;l.push(...y)}const d=new Uint8Array(l);await w(246312,d);return}if(e==1){if(((m=s.configuration)==null?void 0:m.charset)=="losehu"){t=await fetch("/old_font.bin");const c=t.body.getReader(),i=[];for(;;){const{done:d,value:f}=await c.read();if(d)break;i.push(...f)}const l=new Uint8Array(i);await w(8192,l);return}if(((g=s.configuration)==null?void 0:g.charset)=="gb2312"){t=await fetch("/new_font_k.bin");const c=t.body.getReader(),i=[];for(;;){const{done:d,value:f}=await c.read();if(d)break;i.push(...f)}const l=new Uint8Array(i);await w(9344,l);return}}};return(e,t)=>{const p=B,a=H,r=z,m=R,g=D,c=A,i=I,l=P;return F(),S("div",K,[n(p,{items:[e.$t("menu.list"),e.$t("menu.font")]},null,8,["items"]),n(l,{gutter:20,align:"stretch"},{default:o(()=>[n(i,{span:24},{default:o(()=>[n(c,{class:"general-card"},{title:o(()=>[k("span",{onClick:t[0]||(t[0]=()=>{u.showHide+=1})},_(e.$t("menu.font")+e.$t("global.onStart")),1)]),default:o(()=>[n(m,null,{default:o(()=>[n(r,{bordered:""},{header:o(()=>[b(_(e.$t("tool.fontwrite")),1)]),default:o(()=>[n(a,{onClick:t[1]||(t[1]=d=>h(1))},{default:o(()=>[b(_(e.$t("tool.writefontwrite")),1)]),_:1})]),_:1}),n(r,{bordered:""},{header:o(()=>[b(_(e.$t("tool.pinyinwrite")),1)]),default:o(()=>[n(m,null,{default:o(()=>[n(a,{onClick:t[2]||(t[2]=d=>h(4))},{default:o(()=>[b(_(e.$t("tool.writepinyin")),1)]),_:1})]),_:1})]),_:1}),n(r,{bordered:""},{header:o(()=>[b(_(e.$t("tool.ssbpatch")),1)]),default:o(()=>[n(m,null,{default:o(()=>[n(a,{onClick:t[3]||(t[3]=d=>h(5))},{default:o(()=>[b(_(e.$t("tool.writessbpatch")),1)]),_:1})]),_:1})]),_:1})]),_:1}),n(g),k("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:u.status},null,8,L)]),_:1})]),_:1})]),_:1})])}}});const rt=E(O,[["__scopeId","data-v-38246451"]]);export{rt as default};
|
BIN
assets/index.9d3248bf.js.gz
Normal file
BIN
assets/index.9d3248bf.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
.banner[data-v-7f92e336]{width:100%;padding:20px 20px 0;background-color:var(--color-bg-2);border-radius:4px 4px 0 0}[data-v-7f92e336] .arco-icon-home{margin-right:6px}.container[data-v-8f743d99]{background-color:var(--color-fill-2);padding:16px 20px 0;display:flex}.left-side[data-v-8f743d99]{flex:1;overflow:auto}.right-side[data-v-8f743d99]{width:280px;margin-left:16px}.panel[data-v-8f743d99]{background-color:var(--color-bg-2);border-radius:4px;overflow:auto}[data-v-8f743d99] .panel-border{margin-bottom:0;border-bottom:1px solid rgb(var(--gray-2))}.moduler-wrap[data-v-8f743d99]{border-radius:4px;background-color:var(--color-bg-2)}.moduler-wrap[data-v-8f743d99] .text{font-size:12px;text-align:center;color:rgb(var(--gray-8))}.moduler-wrap[data-v-8f743d99] .wrapper{margin-bottom:8px;text-align:center;cursor:pointer}.moduler-wrap[data-v-8f743d99] .wrapper:last-child .text{margin-bottom:0}.moduler-wrap[data-v-8f743d99] .wrapper:hover .icon{color:rgb(var(--arcoblue-6));background-color:#e8f3ff}.moduler-wrap[data-v-8f743d99] .wrapper:hover .text{color:rgb(var(--arcoblue-6))}.moduler-wrap[data-v-8f743d99] .icon{display:inline-block;width:32px;height:32px;margin-bottom:4px;color:rgb(var(--dark-gray-1));line-height:32px;font-size:16px;text-align:center;background-color:rgb(var(--gray-1));border-radius:4px}.mobile .container[data-v-8f743d99]{display:block}.mobile .right-side[data-v-8f743d99]{width:100%;margin-left:0;margin-top:16px}
|
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.a21175a0.js.gz
Normal file
BIN
assets/index.a21175a0.js.gz
Normal file
Binary file not shown.
25
assets/index.a9d4e900.js
Normal file
25
assets/index.a9d4e900.js
Normal file
@ -0,0 +1,25 @@
|
||||
import{u as A,a as B,_ as d,b as N}from"./useConfig.aff24c27.js";import{f as R,o as I,bs as z,d as D,c as _,aI as k,h as F}from"./arco.949c921a.js";import{L as M}from"./index.df0a6ce7.js";import{P as w,d as X,c as $,b as K,w as U}from"./index.ab5e1824.js";import{u as V}from"./useDisabled.d1f2a1bc.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var W={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},ghost:Boolean,href:{type:String,default:""},icon:{type:Function},loading:Boolean,shape:{type:String,default:"rectangle",validator:function(e){return e?["rectangle","square","round","circle"].includes(e):!0}},size:{type:String,default:"medium",validator:function(e){return e?["extra-small","small","medium","large"].includes(e):!0}},suffix:{type:Function},tag:{type:String,validator:function(e){return e?["button","a","div"].includes(e):!0}},theme:{type:String,validator:function(e){return e?["default","primary","danger","warning","success"].includes(e):!0}},type:{type:String,default:"button",validator:function(e){return e?["submit","reset","button"].includes(e):!0}},variant:{type:String,default:"base",validator:function(e){return e?["base","outline","dashed","text"].includes(e):!0}},onClick:Function};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var J=w.expand,Z=w.ripple,q=w.fade;function H(){var t=X("animation"),e=t.globalConfig,n=function(s){var u,c,r=e.value;return r&&!((u=r.exclude)!==null&&u!==void 0&&u.includes(s))&&((c=r.include)===null||c===void 0?void 0:c.includes(s))};return{keepExpand:n(J),keepRipple:n(Z),keepFade:n(q)}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function j(t,e){var n=Object.keys(e);n.forEach(function(a){t.style[a]=e[a]})}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var O=200,G="rgba(0, 0, 0, 0)",Q="rgba(0, 0, 0, 0.35)",Y=function(e,n){var a;if(n)return n;if(e!=null&&(a=e.dataset)!==null&&a!==void 0&&a.ripple){var s=e.dataset.ripple;return s}var u=getComputedStyle(e).getPropertyValue("--ripple-color");return u||Q};function ee(t,e){var n=R(null),a=A(),s=H(),u=s.keepRipple,c=function(b){var i=t.value,h=Y(i,e==null?void 0:e.value);if(!(b.button!==0||!t||!u)&&!(i.classList.contains("".concat(a.value,"-is-active"))||i.classList.contains("".concat(a.value,"-is-disabled"))||i.classList.contains("".concat(a.value,"-is-checked"))||i.classList.contains("".concat(a.value,"-is-loading")))){var m=getComputedStyle(i),v=parseInt(m.borderWidth,10),y=v>0?v:0,f=i.offsetWidth,o=i.offsetHeight;n.value.parentNode===null&&(j(n.value,{position:"absolute",left:"".concat(0-y,"px"),top:"".concat(0-y,"px"),width:"".concat(f,"px"),height:"".concat(o,"px"),borderRadius:m.borderRadius,pointerEvents:"none",overflow:"hidden"}),i.appendChild(n.value));var l=document.createElement("div");j(l,{marginTop:"0",marginLeft:"0",right:"".concat(f,"px"),width:"".concat(f+20,"px"),height:"100%",transition:"transform ".concat(O,"ms cubic-bezier(.38, 0, .24, 1), background ").concat(O*2,"ms linear"),transform:"skewX(-8deg)",pointerEvents:"none",position:"absolute",zIndex:0,backgroundColor:h,opacity:"0.9"});for(var x=new WeakMap,C=i.children.length,g=0;g<C;++g){var p=i.children[g];p.style.zIndex===""&&p!==n.value&&(p.style.zIndex="1",x.set(p,!0))}var S=i.style.position?i.style.position:getComputedStyle(i).position;(S===""||S==="static")&&(i.style.position="relative"),n.value.insertBefore(l,n.value.firstChild),setTimeout(function(){l.style.transform="translateX(".concat(f,"px)")},0);var T=function P(){l.style.backgroundColor=G,t.value&&(t.value.removeEventListener("pointerup",P,!1),t.value.removeEventListener("pointerleave",P,!1),setTimeout(function(){l.remove(),n.value.children.length===0&&n.value.remove()},O*2+100))};t.value.addEventListener("pointerup",T,!1),t.value.addEventListener("pointerleave",T,!1)}};I(function(){var r=t==null?void 0:t.value;!r||(n.value=document.createElement("div"),r.addEventListener("pointerdown",c,!1))}),z(function(){var r;t==null||(r=t.value)===null||r===void 0||r.removeEventListener("pointerdown",c,!1)})}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L(Object(n),!0).forEach(function(a){d(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}var te=D({name:"TButton",props:W,setup:function(e,n){var a=n.attrs,s=n.slots,u=$(),c=K(),r=A("button"),b=B(),i=b.STATUS,h=b.SIZE,m=R();ee(m);var v=V(),y=_(function(){var o=e.theme,l=e.variant;return o||(l==="base"?"primary":"default")}),f=_(function(){return["".concat(r.value),"".concat(r.value,"--variant-").concat(e.variant),"".concat(r.value,"--theme-").concat(y.value),d(d(d(d(d(d({},h.value[e.size],e.size!=="medium"),i.value.disabled,v.value),i.value.loading,e.loading),"".concat(r.value,"--shape-").concat(e.shape),e.shape!=="rectangle"),"".concat(r.value,"--ghost"),e.ghost),h.value.block,e.block)]});return function(){var o=c("default","content"),l=e.loading?k(M,{inheritColor:!0},null):u("icon"),x=l&&!o,C=e.suffix||s.suffix?k("span",{className:"".concat(r.value,"__suffix")},[u("suffix")]):null;o=o?k("span",{class:"".concat(r.value,"__text")},[o]):"",l&&(o=[l,o]),C&&(o=[o].concat(C));var g=function(){return!e.tag&&e.href?"a":e.tag||"button"},p={class:[].concat(N(f.value),[d({},"".concat(r.value,"--icon-only"),x)]),type:e.type,disabled:v.value||e.loading,href:e.href,tabindex:v.value?void 0:"0"};return F(g(),E(E(E({ref:m},a),p),{},{onClick:e.onClick}),[o])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var ue=U(te);export{ue as B,ee as u};
|
BIN
assets/index.a9d4e900.js.gz
Normal file
BIN
assets/index.a9d4e900.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.ab5e1824.js.gz
Normal file
BIN
assets/index.ab5e1824.js.gz
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user