rubick/public/feature/js/chunk-ca86664e.b3dc97d9.js
2023-10-12 14:04:10 +08:00

2 lines
10 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ca86664e"],{"7db0":function(e,t,n){"use strict";var c=n("23e7"),r=n("b727").find,a=n("44d2"),i="find",b=!0;i in[]&&Array(1)[i]((function(){b=!1})),c({target:"Array",proto:!0,forced:b},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a(i)},"81bd":function(e,t,n){},a15b:function(e,t,n){"use strict";var c=n("23e7"),r=n("e330"),a=n("44ad"),i=n("fc6a"),b=n("a640"),u=r([].join),l=a!=Object,o=b("join",",");c({target:"Array",proto:!0,forced:l||!o},{join:function(e){return u(i(this),void 0===e?",":e)}})},d97c:function(e,t,n){"use strict";n("81bd")},e6b9:function(e,t,n){"use strict";n.r(t);var c=n("c7eb"),r=n("1da1"),a=n("5530"),i=(n("a15b"),n("4de4"),n("d3b7"),n("b0c0"),n("7db0"),n("e9c4"),n("a4d3"),n("e01a"),n("7a23")),b=n("5502"),u=n("6c02"),l=n("df7c"),o=n.n(l),s={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"},O=s,d=n("b3f0");function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},c=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(c=c.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),c.forEach((function(t){f(e,t,n[t])}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(e,t){var n=j({},e,t.attrs);return Object(i["q"])(d["a"],j({},n,{icon:O}),null)};p.displayName="CaretRightOutlined",p.inheritAttrs=!1;var v=p,m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"},g=m;function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},c=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(c=c.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),c.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=function(e,t){var n=y({},e,t.attrs);return Object(i["q"])(d["a"],y({},n,{icon:g}),null)};h.displayName="PushpinOutlined",h.inheritAttrs=!1;var k=h,L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]},name:"pushpin",theme:"filled"},P=L;function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},c=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(c=c.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),c.forEach((function(t){_(e,t,n[t])}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e,t){var n=q({},e,t.attrs);return Object(i["q"])(d["a"],q({},n,{icon:P}),null)};x.displayName="PushpinFilled",x.inheritAttrs=!1;var S=x,X=n("35c8"),U=n("f64c"),N={class:"installed"},z={class:"view-title"},A={class:"view-container"},C={key:0},D={key:1,class:"container"},$={class:"installed-list"},B=["onClick"],J=["src"],M={class:"info"},Y={class:"title"},E={class:"desc"},Q={class:"plugin-detail"},R={class:"plugin-top"},T={class:"left"},F={class:"title"},I={class:"desc"},G={class:"desc"},H={class:"right"},K={class:"feature-container"},V={key:0,class:"desc-item"},W={__name:"index",setup:function(e){var t=window.require("electron"),n=(t.ipcRenderer,window.require("@electron/remote")),l=(window.require("fs"),n.app.getPath("userData")),s=(o.a.join(l,"./rubick-plugins"),Object(b["b"])()),O=Object(u["c"])(),d=Object(i["j"])((function(){return s.state.localPlugins.filter((function(e){return"rubick-system-feature"!==e.name}))})),j=function(){return s.dispatch("updateLocalPlugin")},f=function(e){return s.dispatch("startUnDownload",e)},p=function(e){return s.dispatch("errorUnDownload",e)},m=Object(i["Q"])([O.query.plugin||d.value[0].name]),g=Object(i["j"])((function(){return d.value.find((function(e){return e.name===m.value[0]}))||{}})),y=Object(i["Q"])(window.rubick.db.get("super-panel-user-plugins")||{data:[],_id:"super-panel-user-plugins"}),w=function(e,t,n){"open"===e?q({code:t.code,cmd:n}):"add"===e?h({cmd:n,code:t.code}):L({cmd:n,name:t.name})},h=function(e){var t=e.cmd,n=e.code,c=Object(a["a"])(Object(a["a"])({},Object(i["Y"])(g.value)),{},{cmd:t,ext:{code:n,type:"text",payload:null}});y.value.data.push(c),window.rubick.db.put(Object(i["Y"])(y.value))},L=function(e){var t=e.cmd,n=e.name;y.value.data=Object(i["Y"])(y.value).data.filter((function(e){return n?e.name!==n:e.cmd!==t})),window.rubick.db.put(Object(i["Y"])(y.value))},P=function(e){var t=!1;return y.value.data.some((function(n){return n.cmd===e&&(t=!0,!0)})),t},q=function(e){var t=e.cmd,n=e.code;window.rubick.openPlugin(JSON.parse(JSON.stringify(Object(a["a"])(Object(a["a"])({},g.value),{},{cmd:t,ext:{code:n,type:"text",payload:null}}))))},_=function(){var e=Object(r["a"])(Object(c["a"])().mark((function e(t){var n;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return f(t.name),n=setTimeout((function(){p(t.name),U["a"].error("卸载超时,请重试!")}),2e4),e.next=4,window.market.deletePlugin(t);case 4:L({name:t.name}),j(),clearTimeout(n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return function(e,t){var n=Object(i["U"])("a-result"),c=Object(i["U"])("a-tag"),r=Object(i["U"])("a-button"),a=Object(i["U"])("a-menu-item"),b=Object(i["U"])("a-menu"),u=Object(i["U"])("a-dropdown");return Object(i["L"])(),Object(i["n"])("div",N,[Object(i["o"])("div",z,Object(i["X"])(e.$t("feature.installed.title")),1),Object(i["o"])("div",A,[Object(i["bb"])(d).length?(Object(i["L"])(),Object(i["n"])("div",D,[Object(i["o"])("div",$,[(Object(i["L"])(!0),Object(i["n"])(i["b"],null,Object(i["S"])(Object(i["bb"])(d),(function(e,t){return Object(i["L"])(),Object(i["n"])("div",{class:Object(i["B"])(m.value[0]===e.name?"item active":"item"),key:t,onClick:function(t){return m.value=[e.name]}},[Object(i["o"])("img",{src:e.logo},null,8,J),Object(i["o"])("div",M,[Object(i["o"])("div",Y,Object(i["X"])(e.pluginName),1),Object(i["o"])("div",E,Object(i["X"])(e.description),1)])],10,B)})),128))]),Object(i["o"])("div",Q,[Object(i["o"])("div",R,[Object(i["o"])("div",T,[Object(i["o"])("div",F,[Object(i["p"])(Object(i["X"])(Object(i["bb"])(g).pluginName)+" ",1),Object(i["q"])(c,null,{default:Object(i["gb"])((function(){return[Object(i["p"])(Object(i["X"])(Object(i["bb"])(g).version),1)]})),_:1})]),Object(i["o"])("div",I,Object(i["X"])(e.$t("feature.installed.developer"))+""+Object(i["X"])("".concat(Object(i["bb"])(g).author||e.$t("feature.installed.unknown"))),1),Object(i["o"])("div",G,Object(i["X"])(Object(i["bb"])(g).description),1)]),Object(i["o"])("div",H,[Object(i["q"])(r,{type:"primary",size:"small",shape:"round",loading:Object(i["bb"])(g).isloading,onClick:t[0]||(t[0]=function(e){return _(Object(i["bb"])(g))})},{default:Object(i["gb"])((function(){return[Object(i["p"])(Object(i["X"])(e.$t("feature.installed.remove")),1)]})),_:1},8,["loading"])])]),Object(i["o"])("div",K,[(Object(i["L"])(!0),Object(i["n"])(i["b"],null,Object(i["S"])(Object(i["bb"])(g).features,(function(e,t){return Object(i["L"])(),Object(i["n"])(i["b"],{key:t},[e.cmds.filter((function(e){return!e.label})).length>0?(Object(i["L"])(),Object(i["n"])("div",V,[Object(i["o"])("div",null,Object(i["X"])(e.explain),1),(Object(i["L"])(!0),Object(i["n"])(i["b"],null,Object(i["S"])(e.cmds,(function(t){return Object(i["L"])(),Object(i["n"])(i["b"],{key:t},[t.label?Object(i["m"])("",!0):(Object(i["L"])(),Object(i["l"])(u,{key:0,class:Object(i["B"])({executable:!t.label})},{overlay:Object(i["gb"])((function(){return[Object(i["q"])(b,{onClick:function(n){var c=n.key;return w(c,e,t)}},{default:Object(i["gb"])((function(){return[Object(i["q"])(a,{key:"open"},{default:Object(i["gb"])((function(){return[Object(i["q"])(Object(i["bb"])(v)),Object(i["p"])(" 运行 ")]})),_:1}),P(t)?(Object(i["L"])(),Object(i["l"])(a,{key:"remove"},{default:Object(i["gb"])((function(){return[Object(i["q"])(Object(i["bb"])(S)),Object(i["p"])(" 从超级面板中取消固定 ")]})),_:1})):(Object(i["L"])(),Object(i["l"])(a,{key:"add"},{default:Object(i["gb"])((function(){return[Object(i["q"])(Object(i["bb"])(k)),Object(i["p"])(" 固定到超级面板 ")]})),_:1}))]})),_:2},1032,["onClick"])]})),default:Object(i["gb"])((function(){return[Object(i["q"])(r,{size:"small",class:"keyword-tag"},{default:Object(i["gb"])((function(){return[Object(i["p"])(Object(i["X"])(t.label||t)+" ",1),Object(i["q"])(Object(i["bb"])(X["a"]))]})),_:2},1024)]})),_:2},1032,["class"]))],64)})),128))])):Object(i["m"])("",!0)],64)})),128))])])])):(Object(i["L"])(),Object(i["n"])("div",C,[Object(i["q"])(n,{status:"404",title:e.$t("feature.installed.tips1"),"sub-title":e.$t("feature.installed.tips2")},null,8,["title","sub-title"])]))])])}}},Z=(n("d97c"),n("6b0d")),ee=n.n(Z);const te=ee()(W,[["__scopeId","data-v-6aedeb48"]]);t["default"]=te}}]);
//# sourceMappingURL=chunk-ca86664e.b3dc97d9.js.map