@gkd-kit/inspect 0.0.1720861174729 → 0.0.1721406632680
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-tnJIBUK8.js → ActionCard.vue_vue_type_script_setup_true_lang-O8yaGYTd.js} +2 -2
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-tnJIBUK8.js.map → ActionCard.vue_vue_type_script_setup_true_lang-O8yaGYTd.js.map} +1 -1
- package/dist/assets/{DevicePage-BHBf8foh.js → DevicePage-Djqn6f7M.js} +2 -2
- package/dist/assets/{DevicePage-BHBf8foh.js.map → DevicePage-Djqn6f7M.js.map} +1 -1
- package/dist/assets/{HomePage-CX6-M3SS.js → HomePage-T-ueNFEN.js} +14 -14
- package/dist/assets/{HomePage-CX6-M3SS.js.map → HomePage-T-ueNFEN.js.map} +1 -1
- package/dist/assets/{ImportPage-xpLre9Xd.js → ImportPage-BcGduI1F.js} +2 -2
- package/dist/assets/{ImportPage-xpLre9Xd.js.map → ImportPage-BcGduI1F.js.map} +1 -1
- package/dist/assets/{PreviewSharePage-Cm88Xk1h.js → PreviewSharePage-Cemv8gvh.js} +2 -2
- package/dist/assets/{PreviewSharePage-Cm88Xk1h.js.map → PreviewSharePage-Cemv8gvh.js.map} +1 -1
- package/dist/assets/{SnapshotPage-L-uGhGz_.js → SnapshotPage-DsxbIwcQ.js} +4 -4
- package/dist/assets/{SnapshotPage-L-uGhGz_.js.map → SnapshotPage-DsxbIwcQ.js.map} +1 -1
- package/dist/assets/{TrackGraph-CjK0hN2J.js → TrackGraph-DMhIY-8G.js} +2 -2
- package/dist/assets/{TrackGraph-CjK0hN2J.js.map → TrackGraph-DMhIY-8G.js.map} +1 -1
- package/dist/assets/{_404Page-ZeIn41o7.js → _404Page-CpuTtnOS.js} +2 -2
- package/dist/assets/{_404Page-ZeIn41o7.js.map → _404Page-CpuTtnOS.js.map} +1 -1
- package/dist/assets/{dayjs.min-BWmpvkSo.js → dayjs.min-Cu4Q2xgI.js} +2 -2
- package/dist/assets/{dayjs.min-BWmpvkSo.js.map → dayjs.min-Cu4Q2xgI.js.map} +1 -1
- package/dist/assets/{error-BeqUZxjM.js → error-CeRmdgMM.js} +2 -2
- package/dist/assets/{error-BeqUZxjM.js.map → error-CeRmdgMM.js.map} +1 -1
- package/dist/assets/{export-C9LC-BrV.js → export-fYbfcKTX.js} +2 -2
- package/dist/assets/{export-C9LC-BrV.js.map → export-fYbfcKTX.js.map} +1 -1
- package/dist/assets/{fetch-BGxWU4ow.js → fetch-TQbL9E8h.js} +2 -2
- package/dist/assets/{fetch-BGxWU4ow.js.map → fetch-TQbL9E8h.js.map} +1 -1
- package/dist/assets/{import-32Y3b71y.js → import-DwrN5Zkq.js} +2 -2
- package/dist/assets/{import-32Y3b71y.js.map → import-DwrN5Zkq.js.map} +1 -1
- package/dist/assets/{index-B2Y1218n.js → index-C8rjOWxU.js} +2 -2
- package/dist/assets/{index-B2Y1218n.js.map → index-C8rjOWxU.js.map} +1 -1
- package/dist/assets/index-DEAqsSIR.css +1 -0
- package/dist/assets/{index-KWWybI-L.js → index-mjukiBBo.js} +43 -43
- package/dist/assets/index-mjukiBBo.js.map +1 -0
- package/dist/assets/{index-C67C_fdO.js → index-pWUXVHyD.js} +2 -2
- package/dist/assets/{index-C67C_fdO.js.map → index-pWUXVHyD.js.map} +1 -1
- package/dist/assets/{table-Cm6qQxNN.js → table-DpqBZFll.js} +2 -2
- package/dist/assets/{table-Cm6qQxNN.js.map → table-DpqBZFll.js.map} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/index-BzBmBg2w.css +0 -1
- package/dist/assets/index-KWWybI-L.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Ut,c as zt,a as Xe,b as A,i as et,e as
|
|
1
|
+
import{d as Ut,c as zt,a as Xe,b as A,i as et,e as xe,f as O,g as tt,h as Ye,u as Dt,j as dt,k as Ft,r as Ae,t as Vt,l as $t,m as se,n as G,p as Me,o as J,q as Ht,s as Ie,v as z,w as Z,N as Kt,x as Ot,y as Re,z as Jt,A as $,B as ue,C as me,D as y,E as S,F as d,G as $e,H as ft,I as ve,J as ye,K as M,L as U,M as V,O as ht,P as gt,Q as Wt,R as nt,S as Yt,T as jt,U as qt,V as Qt,W as ot,X as ee,Y as Gt,Z as it,_ as Zt}from"./index-mjukiBBo.js";import{_ as Xt,w as rt,s as at}from"./ActionCard.vue_vue_type_script_setup_true_lang-O8yaGYTd.js";import{u as en,b as tn,a as nn,c as on,d as rn}from"./export-fYbfcKTX.js";import{c as an,d as ln}from"./fetch-TQbL9E8h.js";import{u as j,g as lt,N as sn,a as Pe,b as ge}from"./dayjs.min-Cu4Q2xgI.js";import{u as un,l as Le,N as He,a as ae}from"./index-pWUXVHyD.js";import{i as cn,a as dn}from"./import-DwrN5Zkq.js";import{u as fn,N as hn,r as gn}from"./table-DpqBZFll.js";import"./index-CE_5kTG8.js";const wn={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"},pn=e=>{const{primaryColor:t,opacityDisabled:r,borderRadius:i,textColor3:n}=e;return Object.assign(Object.assign({},wn),{iconColor:n,textColor:"white",loadingColor:t,opacityDisabled:r,railColor:"rgba(0, 0, 0, .14)",railColorActive:t,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:i,railBorderRadiusMedium:i,railBorderRadiusLarge:i,buttonBorderRadiusSmall:i,buttonBorderRadiusMedium:i,buttonBorderRadiusLarge:i,boxShadowFocus:`0 0 0 2px ${zt(t,{alpha:.2})}`})},mn={name:"Switch",common:Ut,self:pn},vn=Xe("switch",`
|
|
2
2
|
height: var(--n-height);
|
|
3
3
|
min-width: var(--n-width);
|
|
4
4
|
vertical-align: middle;
|
|
@@ -47,9 +47,9 @@ import{d as Ut,c as zt,a as Xe,b as A,i as et,e as Te,f as O,g as tt,h as Ye,u a
|
|
|
47
47
|
left: 0;
|
|
48
48
|
justify-content: flex-end;
|
|
49
49
|
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
50
|
-
`),
|
|
50
|
+
`),xe("&:focus",[A("rail",`
|
|
51
51
|
box-shadow: var(--n-box-shadow-focus);
|
|
52
|
-
`)]),O("round",[A("rail","border-radius: calc(var(--n-rail-height) / 2);",[A("button","border-radius: calc(var(--n-button-height) / 2);")])]),tt("disabled",[tt("icon",[O("rubber-band",[O("pressed",[A("rail",[A("button","max-width: var(--n-button-width-pressed);")])]),A("rail",[
|
|
52
|
+
`)]),O("round",[A("rail","border-radius: calc(var(--n-rail-height) / 2);",[A("button","border-radius: calc(var(--n-button-height) / 2);")])]),tt("disabled",[tt("icon",[O("rubber-band",[O("pressed",[A("rail",[A("button","max-width: var(--n-button-width-pressed);")])]),A("rail",[xe("&:active",[A("button","max-width: var(--n-button-width-pressed);")])]),O("active",[O("pressed",[A("rail",[A("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),A("rail",[xe("&:active",[A("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),O("active",[A("rail",[A("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),A("rail",`
|
|
53
53
|
overflow: hidden;
|
|
54
54
|
height: var(--n-rail-height);
|
|
55
55
|
min-width: var(--n-rail-width);
|
|
@@ -99,21 +99,21 @@ import{d as Ut,c as zt,a as Xe,b as A,i as et,e as Te,f as O,g as tt,h as Ye,u a
|
|
|
99
99
|
`)]),O("disabled",[A("rail",`
|
|
100
100
|
cursor: not-allowed;
|
|
101
101
|
opacity: .5;
|
|
102
|
-
`)])]),yn=Object.assign(Object.assign({},dt.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let se;const bn=Ye({name:"Switch",props:yn,setup(e){se===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?se=CSS.supports("width","max(1px)"):se=!1:se=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Dt(e),i=dt("Switch","-switch",vn,mn,e,t),n=Ft(e),{mergedSizeRef:o,mergedDisabledRef:a}=n,s=Ae(e.defaultValue),l=Vt(e,"value"),u=$t(l,s),f=le(()=>u.value===e.checkedValue),b=Ae(!1),c=Ae(!1),h=le(()=>{const{railStyle:k}=e;if(k)return k({focused:c.value,checked:f.value})});function v(k){const{"onUpdate:value":P,onChange:R,onUpdateValue:D}=e,{nTriggerFormInput:H,nTriggerFormChange:L}=n;P&&Re(P,k),D&&Re(D,k),R&&Re(R,k),s.value=k,H(),L()}function C(){const{nTriggerFormFocus:k}=n;k()}function M(){const{nTriggerFormBlur:k}=n;k()}function p(){e.loading||a.value||(u.value!==e.checkedValue?v(e.checkedValue):v(e.uncheckedValue))}function B(){c.value=!0,C()}function m(){c.value=!1,M(),b.value=!1}function w(k){e.loading||a.value||k.key===" "&&(u.value!==e.checkedValue?v(e.checkedValue):v(e.uncheckedValue),b.value=!1)}function N(k){e.loading||a.value||k.key===" "&&(k.preventDefault(),b.value=!0)}const x=le(()=>{const{value:k}=o,{self:{opacityDisabled:P,railColor:R,railColorActive:D,buttonBoxShadow:H,buttonColor:L,boxShadowFocus:X,loadingColor:E,textColor:g,iconColor:_,[q("buttonHeight",k)]:W,[q("buttonWidth",k)]:It,[q("buttonWidthPressed",k)]:Mt,[q("railHeight",k)]:Y,[q("railWidth",k)]:re,[q("railBorderRadius",k)]:Rt,[q("buttonBorderRadius",k)]:Pt},common:{cubicBezierEaseInOut:Lt}}=i.value;let xe,Ne,_e;return se?(xe=`calc((${Y} - ${W}) / 2)`,Ne=`max(${Y}, ${W})`,_e=`max(${re}, calc(${re} + ${W} - ${Y}))`):(xe=Ie((J(Y)-J(W))/2),Ne=Ie(Math.max(J(Y),J(W))),_e=J(Y)>J(W)?re:Ie(J(re)+J(W)-J(Y))),{"--n-bezier":Lt,"--n-button-border-radius":Pt,"--n-button-box-shadow":H,"--n-button-color":L,"--n-button-width":It,"--n-button-width-pressed":Mt,"--n-button-height":W,"--n-height":Ne,"--n-offset":xe,"--n-opacity-disabled":P,"--n-rail-border-radius":Rt,"--n-rail-color":R,"--n-rail-color-active":D,"--n-rail-height":Y,"--n-rail-width":re,"--n-width":_e,"--n-box-shadow-focus":X,"--n-loading-color":E,"--n-text-color":g,"--n-icon-color":_}}),T=r?Ht("switch",le(()=>o.value[0]),x,e):void 0;return{handleClick:p,handleBlur:m,handleFocus:B,handleKeyup:w,handleKeydown:N,mergedRailStyle:h,pressed:b,mergedClsPrefix:t,mergedValue:u,checked:f,mergedDisabled:a,cssVars:r?void 0:x,themeClass:T==null?void 0:T.themeClass,onRender:T==null?void 0:T.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:r,mergedRailStyle:i,onRender:n,$slots:o}=this;n==null||n();const{checked:a,unchecked:s,icon:l,"checked-icon":u,"unchecked-icon":f}=o,b=!(Me(l)&&Me(u)&&Me(f));return z("div",{role:"switch","aria-checked":r,class:[`${e}-switch`,this.themeClass,b&&`${e}-switch--icon`,r&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},z("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:i},Z(a,c=>Z(s,h=>c||h?z("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},z("div",{class:`${e}-switch__rail-placeholder`},z("div",{class:`${e}-switch__button-placeholder`}),c),z("div",{class:`${e}-switch__rail-placeholder`},z("div",{class:`${e}-switch__button-placeholder`}),h)):null)),z("div",{class:`${e}-switch__button`},Z(l,c=>Z(u,h=>Z(f,v=>z(Kt,null,{default:()=>this.loading?z(Ot,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(h||c)?z("div",{class:`${e}-switch__button-icon`,key:h?"checked-icon":"icon"},h||c):!this.checked&&(v||c)?z("div",{class:`${e}-switch__button-icon`,key:v?"unchecked-icon":"icon"},v||c):null})))),Z(a,c=>c&&z("div",{key:"checked",class:`${e}-switch__checked`},c)),Z(s,c=>c&&z("div",{key:"unchecked",class:`${e}-switch__unchecked`},c)))))}});var fe={},Cn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},wt={},F={};let je;const Bn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];F.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};F.getSymbolTotalCodewords=function(t){return Bn[t]};F.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};F.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');je=t};F.isKanjiModeEnabled=function(){return typeof je<"u"};F.toSJIS=function(t){return je(t)};var Be={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,n){if(e.isValid(i))return i;try{return t(i)}catch{return n}}})(Be);function pt(){this.buffer=[],this.length=0}pt.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var kn=pt;function he(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}he.prototype.set=function(e,t,r,i){const n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)};he.prototype.get=function(e,t){return this.data[e*this.size+t]};he.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};he.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var En=he,mt={};(function(e){const t=F.getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,o=t(i),a=o===145?26:Math.ceil((o-13)/(2*n-2))*2,s=[o-7];for(let l=1;l<n-1;l++)s[l]=s[l-1]-a;return s.push(6),s.reverse()},e.getPositions=function(i){const n=[],o=e.getRowColCoords(i),a=o.length;for(let s=0;s<a;s++)for(let l=0;l<a;l++)s===0&&l===0||s===0&&l===a-1||s===a-1&&l===0||n.push([o[s],o[l]]);return n}})(mt);var vt={};const Sn=F.getSymbolSize,lt=7;vt.getPositions=function(t){const r=Sn(t);return[[0,0],[r-lt,0],[0,r-lt]]};var yt={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const o=n.size;let a=0,s=0,l=0,u=null,f=null;for(let b=0;b<o;b++){s=l=0,u=f=null;for(let c=0;c<o;c++){let h=n.get(b,c);h===u?s++:(s>=5&&(a+=t.N1+(s-5)),u=h,s=1),h=n.get(c,b),h===f?l++:(l>=5&&(a+=t.N1+(l-5)),f=h,l=1)}s>=5&&(a+=t.N1+(s-5)),l>=5&&(a+=t.N1+(l-5))}return a},e.getPenaltyN2=function(n){const o=n.size;let a=0;for(let s=0;s<o-1;s++)for(let l=0;l<o-1;l++){const u=n.get(s,l)+n.get(s,l+1)+n.get(s+1,l)+n.get(s+1,l+1);(u===4||u===0)&&a++}return a*t.N2},e.getPenaltyN3=function(n){const o=n.size;let a=0,s=0,l=0;for(let u=0;u<o;u++){s=l=0;for(let f=0;f<o;f++)s=s<<1&2047|n.get(u,f),f>=10&&(s===1488||s===93)&&a++,l=l<<1&2047|n.get(f,u),f>=10&&(l===1488||l===93)&&a++}return a*t.N3},e.getPenaltyN4=function(n){let o=0;const a=n.data.length;for(let l=0;l<a;l++)o+=n.data[l];return Math.abs(Math.ceil(o*100/a/5)-10)*t.N4};function r(i,n,o){switch(i){case e.Patterns.PATTERN000:return(n+o)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(n+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return n*o%2+n*o%3===0;case e.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case e.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(n,o){const a=o.size;for(let s=0;s<a;s++)for(let l=0;l<a;l++)o.isReserved(l,s)||o.xor(l,s,r(n,l,s))},e.getBestMask=function(n,o){const a=Object.keys(e.Patterns).length;let s=0,l=1/0;for(let u=0;u<a;u++){o(u),e.applyMask(u,n);const f=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),f<l&&(l=f,s=u)}return s}})(yt);var ke={};const Q=Be,we=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],pe=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ke.getBlocksCount=function(t,r){switch(r){case Q.L:return we[(t-1)*4+0];case Q.M:return we[(t-1)*4+1];case Q.Q:return we[(t-1)*4+2];case Q.H:return we[(t-1)*4+3];default:return}};ke.getTotalCodewordsCount=function(t,r){switch(r){case Q.L:return pe[(t-1)*4+0];case Q.M:return pe[(t-1)*4+1];case Q.Q:return pe[(t-1)*4+2];case Q.H:return pe[(t-1)*4+3];default:return}};var bt={},Ee={};const ue=new Uint8Array(512),be=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)ue[r]=t,be[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)ue[r]=ue[r-255]})();Ee.log=function(t){if(t<1)throw new Error("log("+t+")");return be[t]};Ee.exp=function(t){return ue[t]};Ee.mul=function(t,r){return t===0||r===0?0:ue[be[t]+be[r]]};(function(e){const t=Ee;e.mul=function(i,n){const o=new Uint8Array(i.length+n.length-1);for(let a=0;a<i.length;a++)for(let s=0;s<n.length;s++)o[a+s]^=t.mul(i[a],n[s]);return o},e.mod=function(i,n){let o=new Uint8Array(i);for(;o.length-n.length>=0;){const a=o[0];for(let l=0;l<n.length;l++)o[l]^=t.mul(n[l],a);let s=0;for(;s<o.length&&o[s]===0;)s++;o=o.slice(s)}return o},e.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let o=0;o<i;o++)n=e.mul(n,new Uint8Array([1,t.exp(o)]));return n}})(bt);const Ct=bt;function Qe(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Qe.prototype.initialize=function(t){this.degree=t,this.genPoly=Ct.generateECPolynomial(this.degree)};Qe.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(t.length+this.degree);r.set(t);const i=Ct.mod(r,this.genPoly),n=this.degree-i.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(i,n),o}return i};var xn=Qe,Bt={},G={},Ge={};Ge.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var K={};const kt="[0-9]+",Nn="[A-Z $%*+\\-./:]+";let de="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";de=de.replace(/u/g,"\\u");const _n="(?:(?![A-Z0-9 $%*+\\-./:]|"+de+`)(?:.|[\r
|
|
103
|
-
]))+`;K.KANJI=new RegExp(de,"g");K.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");K.BYTE=new RegExp(_n,"g");K.NUMERIC=new RegExp(kt,"g");K.ALPHANUMERIC=new RegExp(Nn,"g");const
|
|
104
|
-
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var Kn=ie,Nt={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,i,n){var o={},a={};a[i]=0;var
|
|
105
|
-
Suggested mode is: `+t.toString(w));switch(m===t.KANJI&&!
|
|
102
|
+
`)])]),yn=Object.assign(Object.assign({},dt.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let le;const bn=Ye({name:"Switch",props:yn,setup(e){le===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?le=CSS.supports("width","max(1px)"):le=!1:le=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=Dt(e),i=dt("Switch","-switch",vn,mn,e,t),n=Ft(e),{mergedSizeRef:o,mergedDisabledRef:a}=n,l=Ae(e.defaultValue),s=Vt(e,"value"),c=$t(s,l),f=se(()=>c.value===e.checkedValue),b=Ae(!1),u=Ae(!1),h=se(()=>{const{railStyle:k}=e;if(k)return k({focused:u.value,checked:f.value})});function v(k){const{"onUpdate:value":P,onChange:R,onUpdateValue:D}=e,{nTriggerFormInput:H,nTriggerFormChange:L}=n;P&&Re(P,k),D&&Re(D,k),R&&Re(R,k),l.value=k,H(),L()}function C(){const{nTriggerFormFocus:k}=n;k()}function I(){const{nTriggerFormBlur:k}=n;k()}function p(){e.loading||a.value||(c.value!==e.checkedValue?v(e.checkedValue):v(e.uncheckedValue))}function B(){u.value=!0,C()}function m(){u.value=!1,I(),b.value=!1}function w(k){e.loading||a.value||k.key===" "&&(c.value!==e.checkedValue?v(e.checkedValue):v(e.uncheckedValue),b.value=!1)}function N(k){e.loading||a.value||k.key===" "&&(k.preventDefault(),b.value=!0)}const T=se(()=>{const{value:k}=o,{self:{opacityDisabled:P,railColor:R,railColorActive:D,buttonBoxShadow:H,buttonColor:L,boxShadowFocus:X,loadingColor:E,textColor:g,iconColor:_,[G("buttonHeight",k)]:W,[G("buttonWidth",k)]:Mt,[G("buttonWidthPressed",k)]:It,[G("railHeight",k)]:Y,[G("railWidth",k)]:re,[G("railBorderRadius",k)]:Rt,[G("buttonBorderRadius",k)]:Pt},common:{cubicBezierEaseInOut:Lt}}=i.value;let Te,Ne,_e;return le?(Te=`calc((${Y} - ${W}) / 2)`,Ne=`max(${Y}, ${W})`,_e=`max(${re}, calc(${re} + ${W} - ${Y}))`):(Te=Me((J(Y)-J(W))/2),Ne=Me(Math.max(J(Y),J(W))),_e=J(Y)>J(W)?re:Me(J(re)+J(W)-J(Y))),{"--n-bezier":Lt,"--n-button-border-radius":Pt,"--n-button-box-shadow":H,"--n-button-color":L,"--n-button-width":Mt,"--n-button-width-pressed":It,"--n-button-height":W,"--n-height":Ne,"--n-offset":Te,"--n-opacity-disabled":P,"--n-rail-border-radius":Rt,"--n-rail-color":R,"--n-rail-color-active":D,"--n-rail-height":Y,"--n-rail-width":re,"--n-width":_e,"--n-box-shadow-focus":X,"--n-loading-color":E,"--n-text-color":g,"--n-icon-color":_}}),x=r?Ht("switch",se(()=>o.value[0]),T,e):void 0;return{handleClick:p,handleBlur:m,handleFocus:B,handleKeyup:w,handleKeydown:N,mergedRailStyle:h,pressed:b,mergedClsPrefix:t,mergedValue:c,checked:f,mergedDisabled:a,cssVars:r?void 0:T,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:r,mergedRailStyle:i,onRender:n,$slots:o}=this;n==null||n();const{checked:a,unchecked:l,icon:s,"checked-icon":c,"unchecked-icon":f}=o,b=!(Ie(s)&&Ie(c)&&Ie(f));return z("div",{role:"switch","aria-checked":r,class:[`${e}-switch`,this.themeClass,b&&`${e}-switch--icon`,r&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},z("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:i},Z(a,u=>Z(l,h=>u||h?z("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},z("div",{class:`${e}-switch__rail-placeholder`},z("div",{class:`${e}-switch__button-placeholder`}),u),z("div",{class:`${e}-switch__rail-placeholder`},z("div",{class:`${e}-switch__button-placeholder`}),h)):null)),z("div",{class:`${e}-switch__button`},Z(s,u=>Z(c,h=>Z(f,v=>z(Kt,null,{default:()=>this.loading?z(Ot,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(h||u)?z("div",{class:`${e}-switch__button-icon`,key:h?"checked-icon":"icon"},h||u):!this.checked&&(v||u)?z("div",{class:`${e}-switch__button-icon`,key:v?"unchecked-icon":"icon"},v||u):null})))),Z(a,u=>u&&z("div",{key:"checked",class:`${e}-switch__checked`},u)),Z(l,u=>u&&z("div",{key:"unchecked",class:`${e}-switch__unchecked`},u)))))}});var fe={},Cn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},wt={},F={};let je;const Bn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];F.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};F.getSymbolTotalCodewords=function(t){return Bn[t]};F.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};F.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');je=t};F.isKanjiModeEnabled=function(){return typeof je<"u"};F.toSJIS=function(t){return je(t)};var Be={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,n){if(e.isValid(i))return i;try{return t(i)}catch{return n}}})(Be);function pt(){this.buffer=[],this.length=0}pt.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var kn=pt;function he(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}he.prototype.set=function(e,t,r,i){const n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)};he.prototype.get=function(e,t){return this.data[e*this.size+t]};he.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};he.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var En=he,mt={};(function(e){const t=F.getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,o=t(i),a=o===145?26:Math.ceil((o-13)/(2*n-2))*2,l=[o-7];for(let s=1;s<n-1;s++)l[s]=l[s-1]-a;return l.push(6),l.reverse()},e.getPositions=function(i){const n=[],o=e.getRowColCoords(i),a=o.length;for(let l=0;l<a;l++)for(let s=0;s<a;s++)l===0&&s===0||l===0&&s===a-1||l===a-1&&s===0||n.push([o[l],o[s]]);return n}})(mt);var vt={};const Sn=F.getSymbolSize,st=7;vt.getPositions=function(t){const r=Sn(t);return[[0,0],[r-st,0],[0,r-st]]};var yt={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const o=n.size;let a=0,l=0,s=0,c=null,f=null;for(let b=0;b<o;b++){l=s=0,c=f=null;for(let u=0;u<o;u++){let h=n.get(b,u);h===c?l++:(l>=5&&(a+=t.N1+(l-5)),c=h,l=1),h=n.get(u,b),h===f?s++:(s>=5&&(a+=t.N1+(s-5)),f=h,s=1)}l>=5&&(a+=t.N1+(l-5)),s>=5&&(a+=t.N1+(s-5))}return a},e.getPenaltyN2=function(n){const o=n.size;let a=0;for(let l=0;l<o-1;l++)for(let s=0;s<o-1;s++){const c=n.get(l,s)+n.get(l,s+1)+n.get(l+1,s)+n.get(l+1,s+1);(c===4||c===0)&&a++}return a*t.N2},e.getPenaltyN3=function(n){const o=n.size;let a=0,l=0,s=0;for(let c=0;c<o;c++){l=s=0;for(let f=0;f<o;f++)l=l<<1&2047|n.get(c,f),f>=10&&(l===1488||l===93)&&a++,s=s<<1&2047|n.get(f,c),f>=10&&(s===1488||s===93)&&a++}return a*t.N3},e.getPenaltyN4=function(n){let o=0;const a=n.data.length;for(let s=0;s<a;s++)o+=n.data[s];return Math.abs(Math.ceil(o*100/a/5)-10)*t.N4};function r(i,n,o){switch(i){case e.Patterns.PATTERN000:return(n+o)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(n+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return n*o%2+n*o%3===0;case e.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case e.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(n,o){const a=o.size;for(let l=0;l<a;l++)for(let s=0;s<a;s++)o.isReserved(s,l)||o.xor(s,l,r(n,s,l))},e.getBestMask=function(n,o){const a=Object.keys(e.Patterns).length;let l=0,s=1/0;for(let c=0;c<a;c++){o(c),e.applyMask(c,n);const f=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(c,n),f<s&&(s=f,l=c)}return l}})(yt);var ke={};const q=Be,we=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],pe=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ke.getBlocksCount=function(t,r){switch(r){case q.L:return we[(t-1)*4+0];case q.M:return we[(t-1)*4+1];case q.Q:return we[(t-1)*4+2];case q.H:return we[(t-1)*4+3];default:return}};ke.getTotalCodewordsCount=function(t,r){switch(r){case q.L:return pe[(t-1)*4+0];case q.M:return pe[(t-1)*4+1];case q.Q:return pe[(t-1)*4+2];case q.H:return pe[(t-1)*4+3];default:return}};var bt={},Ee={};const ce=new Uint8Array(512),be=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)ce[r]=t,be[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)ce[r]=ce[r-255]})();Ee.log=function(t){if(t<1)throw new Error("log("+t+")");return be[t]};Ee.exp=function(t){return ce[t]};Ee.mul=function(t,r){return t===0||r===0?0:ce[be[t]+be[r]]};(function(e){const t=Ee;e.mul=function(i,n){const o=new Uint8Array(i.length+n.length-1);for(let a=0;a<i.length;a++)for(let l=0;l<n.length;l++)o[a+l]^=t.mul(i[a],n[l]);return o},e.mod=function(i,n){let o=new Uint8Array(i);for(;o.length-n.length>=0;){const a=o[0];for(let s=0;s<n.length;s++)o[s]^=t.mul(n[s],a);let l=0;for(;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},e.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let o=0;o<i;o++)n=e.mul(n,new Uint8Array([1,t.exp(o)]));return n}})(bt);const Ct=bt;function qe(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}qe.prototype.initialize=function(t){this.degree=t,this.genPoly=Ct.generateECPolynomial(this.degree)};qe.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(t.length+this.degree);r.set(t);const i=Ct.mod(r,this.genPoly),n=this.degree-i.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(i,n),o}return i};var Tn=qe,Bt={},Q={},Qe={};Qe.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var K={};const kt="[0-9]+",Nn="[A-Z $%*+\\-./:]+";let de="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";de=de.replace(/u/g,"\\u");const _n="(?:(?![A-Z0-9 $%*+\\-./:]|"+de+`)(?:.|[\r
|
|
103
|
+
]))+`;K.KANJI=new RegExp(de,"g");K.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");K.BYTE=new RegExp(_n,"g");K.NUMERIC=new RegExp(kt,"g");K.ALPHANUMERIC=new RegExp(Nn,"g");const xn=new RegExp("^"+de+"$"),An=new RegExp("^"+kt+"$"),Mn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");K.testKanji=function(t){return xn.test(t)};K.testNumeric=function(t){return An.test(t)};K.testAlphanumeric=function(t){return Mn.test(t)};(function(e){const t=Qe,r=K;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return r.testNumeric(o)?e.NUMERIC:r.testAlphanumeric(o)?e.ALPHANUMERIC:r.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(o,a){if(e.isValid(o))return o;try{return i(o)}catch{return a}}})(Q);(function(e){const t=F,r=ke,i=Be,n=Q,o=Qe,a=7973,l=t.getBCHDigit(a);function s(u,h,v){for(let C=1;C<=40;C++)if(h<=e.getCapacity(C,v,u))return C}function c(u,h){return n.getCharCountIndicator(u,h)+4}function f(u,h){let v=0;return u.forEach(function(C){const I=c(C.mode,h);v+=I+C.getBitsLength()}),v}function b(u,h){for(let v=1;v<=40;v++)if(f(u,v)<=e.getCapacity(v,h,n.MIXED))return v}e.from=function(h,v){return o.isValid(h)?parseInt(h,10):v},e.getCapacity=function(h,v,C){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=n.BYTE);const I=t.getSymbolTotalCodewords(h),p=r.getTotalCodewordsCount(h,v),B=(I-p)*8;if(C===n.MIXED)return B;const m=B-c(C,h);switch(C){case n.NUMERIC:return Math.floor(m/10*3);case n.ALPHANUMERIC:return Math.floor(m/11*2);case n.KANJI:return Math.floor(m/13);case n.BYTE:default:return Math.floor(m/8)}},e.getBestVersionForData=function(h,v){let C;const I=i.from(v,i.M);if(Array.isArray(h)){if(h.length>1)return b(h,I);if(h.length===0)return 1;C=h[0]}else C=h;return s(C.mode,C.getLength(),I)},e.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let v=h<<12;for(;t.getBCHDigit(v)-l>=0;)v^=a<<t.getBCHDigit(v)-l;return h<<12|v}})(Bt);var Et={};const Ke=F,St=1335,In=21522,ut=Ke.getBCHDigit(St);Et.getEncodedBits=function(t,r){const i=t.bit<<3|r;let n=i<<10;for(;Ke.getBCHDigit(n)-ut>=0;)n^=St<<Ke.getBCHDigit(n)-ut;return(i<<10|n)^In};var Tt={};const Rn=Q;function te(e){this.mode=Rn.NUMERIC,this.data=e.toString()}te.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};te.prototype.getLength=function(){return this.data.length};te.prototype.getBitsLength=function(){return te.getBitsLength(this.data.length)};te.prototype.write=function(t){let r,i,n;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),n=parseInt(i,10),t.put(n,10);const o=this.data.length-r;o>0&&(i=this.data.substr(r),n=parseInt(i,10),t.put(n,o*3+1))};var Pn=te;const Ln=Q,Ue=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ne(e){this.mode=Ln.ALPHANUMERIC,this.data=e}ne.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};ne.prototype.getLength=function(){return this.data.length};ne.prototype.getBitsLength=function(){return ne.getBitsLength(this.data.length)};ne.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let i=Ue.indexOf(this.data[r])*45;i+=Ue.indexOf(this.data[r+1]),t.put(i,11)}this.data.length%2&&t.put(Ue.indexOf(this.data[r]),6)};var Un=ne,zn=function(t){for(var r=[],i=t.length,n=0;n<i;n++){var o=t.charCodeAt(n);if(o>=55296&&o<=56319&&i>n+1){var a=t.charCodeAt(n+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,n+=1)}if(o<128){r.push(o);continue}if(o<2048){r.push(o>>6|192),r.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){r.push(o>>12|224),r.push(o>>6&63|128),r.push(o&63|128);continue}if(o>=65536&&o<=1114111){r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const Dn=zn,Fn=Q;function oe(e){this.mode=Fn.BYTE,typeof e=="string"&&(e=Dn(e)),this.data=new Uint8Array(e)}oe.getBitsLength=function(t){return t*8};oe.prototype.getLength=function(){return this.data.length};oe.prototype.getBitsLength=function(){return oe.getBitsLength(this.data.length)};oe.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)};var Vn=oe;const $n=Q,Hn=F;function ie(e){this.mode=$n.KANJI,this.data=e}ie.getBitsLength=function(t){return t*13};ie.prototype.getLength=function(){return this.data.length};ie.prototype.getBitsLength=function(){return ie.getBitsLength(this.data.length)};ie.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=Hn.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
104
|
+
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var Kn=ie,Nt={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,i,n){var o={},a={};a[i]=0;var l=t.PriorityQueue.make();l.push(i,0);for(var s,c,f,b,u,h,v,C,I;!l.empty();){s=l.pop(),c=s.value,b=s.cost,u=r[c]||{};for(f in u)u.hasOwnProperty(f)&&(h=u[f],v=b+h,C=a[f],I=typeof a[f]>"u",(I||C>v)&&(a[f]=v,l.push(f,v),o[f]=c))}if(typeof n<"u"&&typeof a[n]>"u"){var p=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(r,i){for(var n=[],o=i;o;)n.push(o),r[o],o=r[o];return n.reverse(),n},find_path:function(r,i,n){var o=t.single_source_shortest_paths(r,i,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(r){var i=t.PriorityQueue,n={},o;r=r||{};for(o in i)i.hasOwnProperty(o)&&(n[o]=i[o]);return n.queue=[],n.sorter=r.sorter||i.default_sorter,n},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var n={value:r,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Nt);var On=Nt.exports;(function(e){const t=Q,r=Pn,i=Un,n=Vn,o=Kn,a=K,l=F,s=On;function c(p){return unescape(encodeURIComponent(p)).length}function f(p,B,m){const w=[];let N;for(;(N=p.exec(m))!==null;)w.push({data:N[0],index:N.index,mode:B,length:N[0].length});return w}function b(p){const B=f(a.NUMERIC,t.NUMERIC,p),m=f(a.ALPHANUMERIC,t.ALPHANUMERIC,p);let w,N;return l.isKanjiModeEnabled()?(w=f(a.BYTE,t.BYTE,p),N=f(a.KANJI,t.KANJI,p)):(w=f(a.BYTE_KANJI,t.BYTE,p),N=[]),B.concat(m,w,N).sort(function(x,k){return x.index-k.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function u(p,B){switch(B){case t.NUMERIC:return r.getBitsLength(p);case t.ALPHANUMERIC:return i.getBitsLength(p);case t.KANJI:return o.getBitsLength(p);case t.BYTE:return n.getBitsLength(p)}}function h(p){return p.reduce(function(B,m){const w=B.length-1>=0?B[B.length-1]:null;return w&&w.mode===m.mode?(B[B.length-1].data+=m.data,B):(B.push(m),B)},[])}function v(p){const B=[];for(let m=0;m<p.length;m++){const w=p[m];switch(w.mode){case t.NUMERIC:B.push([w,{data:w.data,mode:t.ALPHANUMERIC,length:w.length},{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.ALPHANUMERIC:B.push([w,{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.KANJI:B.push([w,{data:w.data,mode:t.BYTE,length:c(w.data)}]);break;case t.BYTE:B.push([{data:w.data,mode:t.BYTE,length:c(w.data)}])}}return B}function C(p,B){const m={},w={start:{}};let N=["start"];for(let T=0;T<p.length;T++){const x=p[T],k=[];for(let P=0;P<x.length;P++){const R=x[P],D=""+T+P;k.push(D),m[D]={node:R,lastCount:0},w[D]={};for(let H=0;H<N.length;H++){const L=N[H];m[L]&&m[L].node.mode===R.mode?(w[L][D]=u(m[L].lastCount+R.length,R.mode)-u(m[L].lastCount,R.mode),m[L].lastCount+=R.length):(m[L]&&(m[L].lastCount=R.length),w[L][D]=u(R.length,R.mode)+4+t.getCharCountIndicator(R.mode,B))}}N=k}for(let T=0;T<N.length;T++)w[N[T]].end=0;return{map:w,table:m}}function I(p,B){let m;const w=t.getBestModeForData(p);if(m=t.from(B,w),m!==t.BYTE&&m.bit<w.bit)throw new Error('"'+p+'" cannot be encoded with mode '+t.toString(m)+`.
|
|
105
|
+
Suggested mode is: `+t.toString(w));switch(m===t.KANJI&&!l.isKanjiModeEnabled()&&(m=t.BYTE),m){case t.NUMERIC:return new r(p);case t.ALPHANUMERIC:return new i(p);case t.KANJI:return new o(p);case t.BYTE:return new n(p)}}e.fromArray=function(B){return B.reduce(function(m,w){return typeof w=="string"?m.push(I(w,null)):w.data&&m.push(I(w.data,w.mode)),m},[])},e.fromString=function(B,m){const w=b(B,l.isKanjiModeEnabled()),N=v(w),T=C(N,m),x=s.find_path(T.map,"start","end"),k=[];for(let P=1;P<x.length-1;P++)k.push(T.table[x[P]].node);return e.fromArray(h(k))},e.rawSplit=function(B){return e.fromArray(b(B,l.isKanjiModeEnabled()))}})(Tt);const Se=F,ze=Be,Jn=kn,Wn=En,Yn=mt,jn=vt,Oe=yt,Je=ke,qn=Tn,Ce=Bt,Qn=Et,Gn=Q,De=Tt;function Zn(e,t){const r=e.size,i=jn.getPositions(t);for(let n=0;n<i.length;n++){const o=i[n][0],a=i[n][1];for(let l=-1;l<=7;l++)if(!(o+l<=-1||r<=o+l))for(let s=-1;s<=7;s++)a+s<=-1||r<=a+s||(l>=0&&l<=6&&(s===0||s===6)||s>=0&&s<=6&&(l===0||l===6)||l>=2&&l<=4&&s>=2&&s<=4?e.set(o+l,a+s,!0,!0):e.set(o+l,a+s,!1,!0))}}function Xn(e){const t=e.size;for(let r=8;r<t-8;r++){const i=r%2===0;e.set(r,6,i,!0),e.set(6,r,i,!0)}}function eo(e,t){const r=Yn.getPositions(t);for(let i=0;i<r.length;i++){const n=r[i][0],o=r[i][1];for(let a=-2;a<=2;a++)for(let l=-2;l<=2;l++)a===-2||a===2||l===-2||l===2||a===0&&l===0?e.set(n+a,o+l,!0,!0):e.set(n+a,o+l,!1,!0)}}function to(e,t){const r=e.size,i=Ce.getEncodedBits(t);let n,o,a;for(let l=0;l<18;l++)n=Math.floor(l/3),o=l%3+r-8-3,a=(i>>l&1)===1,e.set(n,o,a,!0),e.set(o,n,a,!0)}function Fe(e,t,r){const i=e.size,n=Qn.getEncodedBits(t,r);let o,a;for(o=0;o<15;o++)a=(n>>o&1)===1,o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(i-15+o,8,a,!0),o<8?e.set(8,i-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(i-8,8,1,!0)}function no(e,t){const r=e.size;let i=-1,n=r-1,o=7,a=0;for(let l=r-1;l>0;l-=2)for(l===6&&l--;;){for(let s=0;s<2;s++)if(!e.isReserved(n,l-s)){let c=!1;a<t.length&&(c=(t[a]>>>o&1)===1),e.set(n,l-s,c),o--,o===-1&&(a++,o=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}function oo(e,t,r){const i=new Jn;r.forEach(function(s){i.put(s.mode.bit,4),i.put(s.getLength(),Gn.getCharCountIndicator(s.mode,e)),s.write(i)});const n=Se.getSymbolTotalCodewords(e),o=Je.getTotalCodewordsCount(e,t),a=(n-o)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const l=(a-i.getLengthInBits())/8;for(let s=0;s<l;s++)i.put(s%2?17:236,8);return io(i,e,t)}function io(e,t,r){const i=Se.getSymbolTotalCodewords(t),n=Je.getTotalCodewordsCount(t,r),o=i-n,a=Je.getBlocksCount(t,r),l=i%a,s=a-l,c=Math.floor(i/a),f=Math.floor(o/a),b=f+1,u=c-f,h=new qn(u);let v=0;const C=new Array(a),I=new Array(a);let p=0;const B=new Uint8Array(e.buffer);for(let x=0;x<a;x++){const k=x<s?f:b;C[x]=B.slice(v,v+k),I[x]=h.encode(C[x]),v+=k,p=Math.max(p,k)}const m=new Uint8Array(i);let w=0,N,T;for(N=0;N<p;N++)for(T=0;T<a;T++)N<C[T].length&&(m[w++]=C[T][N]);for(N=0;N<u;N++)for(T=0;T<a;T++)m[w++]=I[T][N];return m}function ro(e,t,r,i){let n;if(Array.isArray(e))n=De.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const f=De.rawSplit(e);c=Ce.getBestVersionForData(f,r)}n=De.fromString(e,c||40)}else throw new Error("Invalid data");const o=Ce.getBestVersionForData(n,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<o)throw new Error(`
|
|
106
106
|
The chosen QR Code version cannot contain this amount of data.
|
|
107
107
|
Minimum version required to store current data is: `+o+`.
|
|
108
|
-
`);const a=oo(t,r,n),
|
|
109
|
-
`;return typeof i=="function"&&i(null,
|
|
110
|
-
`).map(g=>g.trim()).filter(g=>
|
|
108
|
+
`);const a=oo(t,r,n),l=Se.getSymbolSize(t),s=new Wn(l);return Zn(s,t),Xn(s),eo(s,t),Fe(s,r,0),t>=7&&to(s,t),no(s,a),isNaN(i)&&(i=Oe.getBestMask(s,Fe.bind(null,s,r))),Oe.applyMask(i,s),Fe(s,r,i),{modules:s,version:t,errorCorrectionLevel:r,maskPattern:i,segments:n}}wt.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");let i=ze.M,n,o;return typeof r<"u"&&(i=ze.from(r.errorCorrectionLevel,ze.M),n=Ce.from(r.version),o=Oe.from(r.maskPattern),r.toSJISFunc&&Se.setToSJISFunction(r.toSJISFunc)),ro(t,n,i,o)};var _t={},Ge={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,a=i.scale||4;return{width:o,scale:o?4:a,margin:n,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},e.getImageWidth=function(i,n){const o=e.getScale(i,n);return Math.floor((i+n.margin*2)*o)},e.qrToImageData=function(i,n,o){const a=n.modules.size,l=n.modules.data,s=e.getScale(a,o),c=Math.floor((a+o.margin*2)*s),f=o.margin*s,b=[o.color.light,o.color.dark];for(let u=0;u<c;u++)for(let h=0;h<c;h++){let v=(u*c+h)*4,C=o.color.light;if(u>=f&&h>=f&&u<c-f&&h<c-f){const I=Math.floor((u-f)/s),p=Math.floor((h-f)/s);C=b[l[I*a+p]?1:0]}i[v++]=C.r,i[v++]=C.g,i[v++]=C.b,i[v]=C.a}}})(Ge);(function(e){const t=Ge;function r(n,o,a){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,a,l){let s=l,c=a;typeof s>"u"&&(!a||!a.getContext)&&(s=a,a=void 0),a||(c=i()),s=t.getOptions(s);const f=t.getImageWidth(o.modules.size,s),b=c.getContext("2d"),u=b.createImageData(f,f);return t.qrToImageData(u.data,o,s),r(b,c,f),b.putImageData(u,0,0),c},e.renderToDataURL=function(o,a,l){let s=l;typeof s>"u"&&(!a||!a.getContext)&&(s=a,a=void 0),s||(s={});const c=e.render(o,a,s),f=s.type||"image/png",b=s.rendererOpts||{};return c.toDataURL(f,b.quality)}})(_t);var xt={};const ao=Ge;function ct(e,t){const r=e.a/255,i=t+'="'+e.hex+'"';return r<1?i+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function Ve(e,t,r){let i=e+t;return typeof r<"u"&&(i+=" "+r),i}function lo(e,t,r){let i="",n=0,o=!1,a=0;for(let l=0;l<e.length;l++){const s=Math.floor(l%t),c=Math.floor(l/t);!s&&!o&&(o=!0),e[l]?(a++,l>0&&s>0&&e[l-1]||(i+=o?Ve("M",s+r,.5+c+r):Ve("m",n,0),n=0,o=!1),s+1<t&&e[l+1]||(i+=Ve("h",a),a=0)):n++}return i}xt.render=function(t,r,i){const n=ao.getOptions(r),o=t.modules.size,a=t.modules.data,l=o+n.margin*2,s=n.color.light.a?"<path "+ct(n.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+ct(n.color.dark,"stroke")+' d="'+lo(a,o,n.margin)+'"/>',f='viewBox="0 0 '+l+" "+l+'"',u='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+f+' shape-rendering="crispEdges">'+s+c+`</svg>
|
|
109
|
+
`;return typeof i=="function"&&i(null,u),u};const so=Cn,We=wt,At=_t,uo=xt;function Ze(e,t,r,i,n){const o=[].slice.call(arguments,1),a=o.length,l=typeof o[a-1]=="function";if(!l&&!so())throw new Error("Callback required as last argument");if(l){if(a<2)throw new Error("Too few arguments provided");a===2?(n=r,r=t,t=i=void 0):a===3&&(t.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=r,r=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=t,t=i=void 0):a===2&&!t.getContext&&(i=r,r=t,t=void 0),new Promise(function(s,c){try{const f=We.create(r,i);s(e(f,t,i))}catch(f){c(f)}})}try{const s=We.create(r,i);n(null,e(s,t,i))}catch(s){n(s)}}fe.create=We.create;fe.toCanvas=Ze.bind(null,At.render);fe.toDataURL=Ze.bind(null,At.renderToDataURL);fe.toString=Ze.bind(null,function(e,t,r){return uo.render(e,r)});const co=["src"],fo=Ye({__name:"BuildShareDlg",props:{show:{default:!1},showModifiers:{}},emits:["update:show"],setup(e){const t=ft(),r=Jt(e,"show"),i=$(""),n=$(!1),o=un(()=>{try{Le.parse(i.value),n.value=!1}catch{n.value=!0}},500);ue(()=>{i.value.trim()?o():n.value=!0});const a=$(!1),l=$(""),s=$("");ue(()=>{l.value?fe.toDataURL(l.value,{width:256,margin:2}).then(b=>{s.value=b}):s.value=""});const c=()=>{an(l.value),a.value=!1},f=j(async()=>{const b=Le.parse(i.value),u=await en(new TextEncoder().encode(Le.stringify({data:b,ctime:Date.now(),type:"share"})),"file.txt"),h=location.origin+t.resolve(`/s/${u.id}`).href;l.value=h,a.value=!0});return(b,u)=>(ve(),me($e,null,[y(d(ye),{show:r.value,"onUpdate:show":u[1]||(u[1]=h=>r.value=h),preset:"dialog",title:"分享规则",positiveText:d(f).loading?"分享中...":"分享",onPositiveClick:d(f).invoke,loading:d(f).loading,positiveButtonProps:{disabled:n.value},style:{width:"800px"},onAfterLeave:u[2]||(u[2]=h=>i.value="")},{default:S(()=>[y(d(He),{class:"gkd_code h-[calc(var(--gkd-height)*0.6)]",type:"textarea","show-count":"",value:i.value,"onUpdate:value":u[0]||(u[0]=h=>{d(f).loading||(i.value=h)}),placeholder:"请输入需要分享的规则"},null,8,["value"])]),_:1},8,["show","positiveText","onPositiveClick","loading","positiveButtonProps"]),y(d(ye),{show:a.value,"onUpdate:show":u[3]||(u[3]=h=>a.value=h),preset:"dialog",title:"分享成功",positiveText:"复制并关闭",negativeText:"重新分享",onPositiveClick:c,onNegativeClick:u[4]||(u[4]=h=>{a.value=!1,i.value="",r.value=!0}),onAfterLeave:u[5]||(u[5]=h=>l.value=""),maskClosable:!1},{default:S(()=>[M("div",null,[y(d(U),{text:"",tag:"a",href:l.value,target:"_blank",type:"primary"},{default:S(()=>[V(ht(l.value),1)]),_:1},8,["href"]),s.value?(ve(),me("img",{key:0,src:s.value,"size-200px":"",block:""},null,8,co)):gt("",!0)])]),_:1},8,["show"])],64))}}),ho={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},go={flex:""},wo=M("svg",{viewBox:"0 0 32 32"},[M("path",{d:"M29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29zM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9z",fill:"currentColor"})],-1),po={"h-full":"",flex:"","flex-items-center":""},mo=M("div",{"flex-1":""},null,-1),vo={flex:"","gap-24px":"","items-center":"","pr-8px":""},yo=M("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[M("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98c0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.566.566 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98c0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73c0 .21-.02.43-.05.73l-.14 1.13l.89.7l1.08.84l-.7 1.21l-1.27-.51l-1.04-.42l-.9.68c-.43.32-.84.56-1.25.73l-1.06.43l-.16 1.13l-.2 1.35h-1.4l-.19-1.35l-.16-1.13l-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7l-1.06.43l-1.27.51l-.7-1.21l1.08-.84l.89-.7l-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13l-.89-.7l-1.08-.84l.7-1.21l1.27.51l1.04.42l.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43l.16-1.13l.2-1.35h1.39l.19 1.35l.16 1.13l1.06.43c.43.18.83.41 1.23.71l.91.7l1.06-.43l1.27-.51l.7 1.21l-1.07.85l-.89.7l.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4s-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"})],-1),bo=M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[M("path",{fill:"currentColor",d:"M28 19H14.83l2.58-2.59L16 15l-5 5l5 5l1.41-1.41L14.83 21H28z"}),M("path",{fill:"currentColor",d:"M24 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 16 2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H6V4h8v6a2 2 0 0 0 2 2h6v2Zm-8-4V4.41L21.59 10Z"})],-1),Co={flex:"",href:"/device",title:"连接设备"},Bo=M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[M("path",{fill:"currentColor",d:"M18.35 14.85L16.9 13.4q.3-.275.463-.637t.162-.763t-.162-.763t-.463-.637l1.45-1.45q.575.575.875 1.313t.3 1.537t-.3 1.538t-.875 1.312m2.45 2.45l-1.4-1.4q.775-.775 1.2-1.775T21.025 12T20.6 9.875T19.4 8.1l1.4-1.4q1.075 1.05 1.65 2.425T23.025 12t-.575 2.875T20.8 17.3M7 23q-.825 0-1.412-.587T5 21V3q0-.825.588-1.412T7 1h10q.825 0 1.413.588T19 3v4h-2V6H7v12h10v-1h2v4q0 .825-.587 1.413T17 23zm0-3v1h10v-1zM7 4h10V3H7zm0 0V3zm0 16v1z"})],-1),ko={flex:"",href:"https://github.com/gkd-kit/inspect",target:"_blank",rel:"noopener noreferrer"},Eo=M("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 496 512"},[M("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9c1.6 2.3 4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2z",fill:"currentColor"})],-1),So=M("div",{"h-1px":"","my-10px":"",bg:"#eee"},null,-1),To=M("div",{"h-1px":"","my-10px":"",bg:"#eee"},null,-1),No={flex:"","gap-10px":""},_o=M("div",null,"打开快照页面自动生成分享链接(请确保不含隐私)",-1),Do=Ye({__name:"HomePage",setup(e){ft();const t=$([]),r=$(!0),i=async()=>{r.value=!0,t.value=(await qt.getAllItems()).reverse(),T.value=[],r.value=!1};Wt(i);const n=nt({query:"",actualQuery:"",updateQuery:()=>{n.actualQuery=n.query.trim(),T.value=[]}}),o=se(()=>{const E=n.actualQuery;return E?t.value.filter(g=>(lt(g).name||"").includes(E)||(g.appId||"").includes(E)||(g.activityId||"").includes(E)):t.value}),a=j(async()=>{await cn(),await i()}),{activityIdCol:l,appIdCol:s,appNameCol:c,ctimeCol:f,mtimeCol:b,deviceCol:u,appVersionCodeCol:h,appVersionNameCol:v,resetColWidth:C}=fn();ue(()=>{const E=o.value.reduce((g,_)=>(g.add(gn(_)),g),new Set);if(E.size<=1){u.filterOptions=void 0;return}u.filterOptions=[...E.values()].map(g=>({value:g,label:g}))}),ue(()=>{const E=o.value.reduce((g,_)=>(g.add(lt(_).name),g),new Set);if(E.size<=1){c.filterOptions=void 0;return}c.filterOptions=[...E.values()].map(g=>({value:g,label:g}))}),ue(()=>{const E=o.value.reduce((g,_)=>(g.add(_.activityId),g),new Set);if(E.size<=1){l.filterOptions=void 0;return}l.filterOptions=[...E.values()].map(g=>({value:g,label:g}))});const I=Yt([{type:"selection"},f,b,u,c,s,h,v,l,{key:"actions",title:"操作",fixed:"right",width:"160px",render(E){return y(Xt,{snapshot:E,onDelete:i},null)}}]),p=nt({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:E=>{p.page=E},onUpdatePageSize:E=>{p.pageSize=E,p.page=1}});jt(p,C);const B=E=>{[f,b].forEach(g=>{E.columnKey!=g.key?g.sortOrder=void 0:g.sortOrder=E.order})};b.sortOrder="descend";const m=$(!1),w=$(""),N=j(async()=>{const E=w.value.trim().split(`
|
|
110
|
+
`).map(g=>g.trim()).filter(g=>Gt(g));E.length!=0&&(await dn(E),await i(),w.value="")}),T=$([]),x=()=>Promise.all(T.value.map(E=>it.getItem(E))),k=j(async()=>{await new Promise((E,g)=>{ln.warning({title:"删除",content:`是否批量删除 ${T.value.length} 个快照`,negativeText:"取消",positiveText:"确认",onClose:g,onEsc:g,onMaskClick:g,onNegativeClick:g,onPositiveClick:E})}),await Promise.all(T.value.map(E=>it.removeItem(E))),await i()}),P=j(async()=>{await tn(await x())}),R=j(async()=>{await nn(await x())}),D=j(async()=>{await rt();const E=await on(await x());at({content:E.map(g=>Zt(g)).join(`
|
|
111
111
|
`)+`
|
|
112
|
-
`})}),H=j(async()=>{await rt();const E=await rn(await
|
|
112
|
+
`})}),H=j(async()=>{await rt();const E=await rn(await x());at({content:E.map(g=>location.origin+"/i/"+g).join(`
|
|
113
113
|
`)+`
|
|
114
|
-
`})}),L=$(!1),X=$(!1);return(E,g)=>(ve(),me($e,null,[
|
|
114
|
+
`})}),L=$(!1),X=$(!1);return(E,g)=>(ve(),me($e,null,[M("div",ho,[M("div",go,[y(d(ge),null,{default:S(()=>[y(d(sn),null,{default:S(()=>[y(d(He),{placeholder:"请输入应用名称/应用ID/界面ID",clearable:"",class:"min-w-320px",value:d(n).query,"onUpdate:value":g[0]||(g[0]=_=>d(n).query=_),onKeyup:Qt(d(n).updateQuery,["enter"]),onChange:d(n).updateQuery},null,8,["value","onKeyup","onChange"]),y(d(U),{onClick:d(n).updateQuery},{icon:S(()=>[y(d(ae),null,{default:S(()=>[wo]),_:1})]),_:1},8,["onClick"])]),_:1}),T.value.length?(ve(),me($e,{key:0},[y(d(Pe),null,{trigger:S(()=>[y(d(U),null,{default:S(()=>[V(" 批量下载 ")]),_:1})]),default:S(()=>[y(d(ge),{vertical:""},{default:S(()=>[y(d(U),{onClick:d(R).invoke,loading:d(R).loading},{default:S(()=>[V(" 批量下载-快照 ")]),_:1},8,["onClick","loading"]),y(d(U),{onClick:d(P).invoke,loading:d(P).loading},{default:S(()=>[V(" 批量下载-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),y(d(Pe),null,{trigger:S(()=>[y(d(U),null,{default:S(()=>[V(" 批量分享 ")]),_:1})]),default:S(()=>[y(d(ge),{vertical:""},{default:S(()=>[y(d(U),{onClick:d(H).invoke,loading:d(H).loading},{default:S(()=>[V(" 批量生成链接-快照 ")]),_:1},8,["onClick","loading"]),y(d(U),{onClick:d(D).invoke,loading:d(D).loading},{default:S(()=>[V(" 批量生成链接-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),y(d(U),{onClick:d(k).invoke},{default:S(()=>[V(" 批量删除 ")]),_:1},8,["onClick"]),M("div",po,ht(`已选中 ${T.value.length} 个快照`),1)],64)):gt("",!0)]),_:1}),mo,M("div",vo,[y(d(U),{text:"",title:"设置",onClick:g[1]||(g[1]=_=>X.value=!0)},{icon:S(()=>[y(d(ae),{size:24},{default:S(()=>[yo]),_:1})]),_:1}),y(d(Pe),null,{trigger:S(()=>[y(d(U),{text:""},{icon:S(()=>[y(d(ae),{size:24},{default:S(()=>[bo]),_:1})]),_:1})]),default:S(()=>[y(d(ge),{vertical:""},{default:S(()=>[y(d(U),{onClick:d(a).invoke,loading:d(a).loading},{default:S(()=>[V(" 导入本地文件 ")]),_:1},8,["onClick","loading"]),y(d(U),{onClick:g[2]||(g[2]=_=>m.value=!0),loading:d(N).loading},{default:S(()=>[V(" 导入网络文件 ")]),_:1},8,["loading"])]),_:1})]),_:1}),M("a",Co,[y(d(U),{text:""},{icon:S(()=>[y(d(ae),{size:24},{default:S(()=>[Bo]),_:1})]),_:1})]),M("a",ko,[y(d(U),{text:""},{icon:S(()=>[y(d(ae),{size:24},{default:S(()=>[Eo]),_:1})]),_:1})])])]),y(d(hn),{striped:"",data:o.value,columns:I,scrollX:1800,pagination:d(p),checkedRowKeys:T.value,"onUpdate:checkedRowKeys":g[3]||(g[3]=_=>T.value=_),rowKey:_=>_.id,"onUpdate:sorter":B,size:"small",class:"flex-1",flexHeight:"",loading:r.value},null,8,["data","columns","pagination","checkedRowKeys","rowKey","loading"])]),y(d(ye),{show:m.value,"onUpdate:show":g[5]||(g[5]=_=>m.value=_),preset:"dialog",title:"导入网络文件",showIcon:!1,positiveText:"确认",negativeText:"取消",style:{width:"800px"},onPositiveClick:d(N).invoke,loading:d(N).loading,onAfterLeave:g[6]||(g[6]=_=>w.value="")},{default:S(()=>[y(d(He),{value:w.value,"onUpdate:value":g[4]||(g[4]=_=>{d(N).loading||(w.value=_)}),type:"textarea",placeholder:`1.支持ZIP文件链接
|
|
115
115
|
2.支持快照链接
|
|
116
116
|
每行一个
|
|
117
117
|
空白行自动忽略
|
|
118
|
-
非法链接行自动忽略`,autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;"}},null,8,["value"])]),_:1},8,["show","onPositiveClick","loading"]),y(fo,{show:L.value,"onUpdate:show":g[7]||(g[7]=_=>L.value=_)},null,8,["show"]),y(d(ye),{show:X.value,"onUpdate:show":g[11]||(g[11]=_=>X.value=_),preset:"dialog",title:"设置",showIcon:!1,positiveText:"关闭",style:{width:"600px"},onPositiveClick:g[12]||(g[12]=_=>X.value=!1)},{default:S(()=>[y(d(ot),{checked:d(ee).ignoreUploadWarn,"onUpdate:checked":g[8]||(g[8]=_=>d(ee).ignoreUploadWarn=_)},{default:S(()=>[V(" 关闭生成分享链接弹窗提醒 ")]),_:1},8,["checked"]),So,y(d(ot),{checked:d(ee).ignoreWasmWarn,"onUpdate:checked":g[9]||(g[9]=_=>d(ee).ignoreWasmWarn=_)},{default:S(()=>[V(" 关闭浏览器版本正则表达式 WASM(GC) 提醒 ")]),_:1},8,["checked"]),
|
|
119
|
-
//# sourceMappingURL=HomePage-
|
|
118
|
+
非法链接行自动忽略`,autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;"}},null,8,["value"])]),_:1},8,["show","onPositiveClick","loading"]),y(fo,{show:L.value,"onUpdate:show":g[7]||(g[7]=_=>L.value=_)},null,8,["show"]),y(d(ye),{show:X.value,"onUpdate:show":g[11]||(g[11]=_=>X.value=_),preset:"dialog",title:"设置",showIcon:!1,positiveText:"关闭",style:{width:"600px"},onPositiveClick:g[12]||(g[12]=_=>X.value=!1)},{default:S(()=>[y(d(ot),{checked:d(ee).ignoreUploadWarn,"onUpdate:checked":g[8]||(g[8]=_=>d(ee).ignoreUploadWarn=_)},{default:S(()=>[V(" 关闭生成分享链接弹窗提醒 ")]),_:1},8,["checked"]),So,y(d(ot),{checked:d(ee).ignoreWasmWarn,"onUpdate:checked":g[9]||(g[9]=_=>d(ee).ignoreWasmWarn=_)},{default:S(()=>[V(" 关闭浏览器版本正则表达式 WASM(GC) 提醒 ")]),_:1},8,["checked"]),To,M("div",No,[y(d(bn),{value:d(ee).autoUploadImport,"onUpdate:value":g[10]||(g[10]=_=>d(ee).autoUploadImport=_)},null,8,["value"]),_o])]),_:1},8,["show"])],64))}});export{Do as default};
|
|
119
|
+
//# sourceMappingURL=HomePage-T-ueNFEN.js.map
|