diff --git a/404.html b/404.html new file mode 100644 index 00000000..f17be883 --- /dev/null +++ b/404.html @@ -0,0 +1,20 @@ + + + + + + Rubick + + + + + + + + +

404

How did we get here?
+ Take me home. +
+ + + diff --git a/api/index.html b/api/index.html new file mode 100644 index 00000000..3f661098 --- /dev/null +++ b/api/index.html @@ -0,0 +1,127 @@ + + + + + + 事件 | Rubick + + + + + + + + +

# 事件

# onPluginReady(callback)、onPluginEnter(callback)

  • callback Function

callback 内会返回一个 object 对象,来描述进入当前插件的环境信息:

  • code String

plugin.json 配置的 feature.code

  • type String

plugin.json 配置的 feature.cmd.type,可以为 "text"、"img"、 "files"、 "regex"、 "over"、"window"

  • payload String | Object | Array

feature.cmd.type 对应匹配的数据

当插件装载成功,rubick 将会主动调用这个方法, 所有的 api 都应该在 onPluginReady 之后进行调用。

# 示例

rubick.onPluginReady(({ code, type, payload }) => {
+  console.log('插件装配完成,已准备好')
+})
+/* 
+type 为 "files" 时, payload 值示例
+[
+	{
+		"isFile": true,
+		"isDirectory": false,
+		"name": "demo.js",
+		"path": "C:\\demo.js"
+	}
+]
+
+type 为 "img" 时, payload 值示例
+data:image/png;base64,...
+
+type 为 "text"、"regex"、 "over" 时, payload 值为进入插件时的主输入框文本
+*/
+

# onPluginOut(callback)

  • callback Function

每当插件从前台进入到后台时,rubick 将会主动调用这个方法。

# 窗口交互

# hideMainWindow()

隐藏主窗口

# showMainWindow()

显示主窗口

# setExpendHeight(height)

执行该方法将会修改插件窗口的高度。

  • height Integer
  • 返回 Boolean

# 示例

rubick.setExpendHeight(100)
+

# setSubInput(onChange, placeholder)

设置插件输入框监听,当进入插件后,用户搜索会触发onChange 函数

  • onChange Function +
    • Object
      • text String

子输入框文本修改时触发

  • placeholder String (可选)

子输入框占位符

  • isFocus Boolean (可选)

子输入框是否获得焦点,默认 true

返回 Boolean

# 示例

rubick.setSubInput(({ text }) => {
+  console.log(text)
+}, '搜索')
+

# setSubInputValue(value)

直接对子输入框的值进行设置。

  • value String
  • 返回 Boolean

# 示例

rubick.setSubInputValue('rubick')
+

# 系统

# showNotification(body)

显示系统通知

  • body String
rubick.showNotification('Hi, rubick')
+

# shellOpenPath(fullPath)

打开给定路径的文件

  • fullPath String
rubick.shellOpenPath('/path/file')
+

# shellOpenExternal(url)

浏览器打开URL

  • url String
rubick.shellOpenExternal('https://www.baidu.com')
+

# getPath(name)

electron 内置 getPath 能力,详见 electron API (opens new window)

console.log(rubick.getPath('cache'));
+

# 本地数据库

rubick db 是基于开源的 pouchdb (opens new window) 封装的

# rubick.db.put(doc)

  • doc Object
  • 返回 Object

# 示例

// 创建请求
+rubick.db.put({
+  _id: "demo",
+  data: "demo"
+})
+// 返回 {id: "demo", ok: true, rev: "1-05c9b92e6f24287dc1f4ec79d9a34fa8"}
+
+// 更新请求
+rubick.db.put({
+  _id: "demo",
+  data: "demo",
+  _rev: "1-05c9b92e6f24287dc1f4ec79d9a34fa8"
+})
+

_id 代表这个文档在数据库中唯一值,如果值不存在,则会创建一个新的文档,如果值已经存在,则会进行更新。你可能已经注意到,返回对象中包含一个 rev +属性,这是代表此文档的版本,每次对文档进行更新时,都要带上最新的版本号,否则更新将失败,版本化的意义在于解决同步时数据冲突。

另外需要注意,每次更新时都要传入完整的文档数据,无法对单个字段进行更新。

# rubick.db.get(id)

执行该方法将会根据文档 ID 获取数据

  • id String
  • 返回 Object
rubick.db.get("demo")
+// 返回 {_id: "demo", _rev: "3-9836c5c68af5aef618e17d615882942a", data: "demo"}
+

# rubick.db.remove(doc)

  • doc String | Object
  • 返回 Object 执行该方法将会删除数据库文档,可以传入文档对象或文档 id 进行操作。
rubick.db.remove("demo")
+// 返回 {id: "demo", ok: true, rev: "2-effe5dbc23dffc180d8411b23f3108fb"}
+

# rubick.db.bulkDocs(docs)

  • docs Array
  • 返回 Array 执行该方法将会批量更新数据库文档,传入需要更改的文档对象合并成数组进行批量更新。
rubick.db.bulkDocs([{
+  _id: "demo1",
+  data: "demo",
+  _rev: "1-c8817a74e292eda4cba1a45924853af6"
+}, {
+  _id: "demo2",
+  data: "demo",
+  _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7"
+}])
+/* 返回
+[{
+id: "demo1", ok: true, rev: "2-7857b2801bc0303d2cc0bb82e8afd796"
+}, {
+id: "demo2", ok: true, rev: "2-7857b2801bc0303d2cc0bb82e8afd796"
+}]
+*/
+

# rubick.db.allDocs(key)

  • key String | Array
  • 返回 Array 执行该方法将会获取所有数据库文档,如果传入字符串,则会返回以字符串开头的文档,也可以传入指定 ID 的数组,不传入则为获取所有文档。
// 获取所有文档
+rubick.db.allDocs()
+
+// 传入字符串,则返回id以 demo 开头的文档
+rubick.db.allDocs("demo")
+/* 返回
+[{
+_id: "demo/123", _rev: "2-7857b2801bc0303d2cc0bb82e8afd796", data: "demo"
+}, {
+_id: "demo/124", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"
+}, {
+_id: "demo/125", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"
+}]
+*/
+// 根据id数组请求
+rubick.db.allDocs([
+  "demo1",
+  "demo2"
+])
+/* 返回
+[{
+_id: "demo1", _rev: "2-7857b2801bc0303d2cc0bb82e8afd796", data: "demo"
+}, {
+_id: "demo2", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"
+}]
+*/
+
+ + + diff --git a/assets/css/0.styles.a1fe2806.css b/assets/css/0.styles.a1fe2806.css new file mode 100644 index 00000000..f183ac35 --- /dev/null +++ b/assets/css/0.styles.a1fe2806.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#ff4ea4}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#ff4ea4}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:focus .header-anchor,h1:hover .header-anchor,h2:focus .header-anchor,h2:hover .header-anchor,h3:focus .header-anchor,h3:hover .header-anchor,h4:focus .header-anchor,h4:hover .header-anchor,h5:focus .header-anchor,h5:hover .header-anchor,h6:focus .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;-webkit-user-select:none;user-select:none;opacity:0}a.header-anchor:focus,a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#ff4ea4;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #ff4ea4,0 0 5px #ff4ea4;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#ff4ea4 transparent transparent #ff4ea4;border-style:solid;border-width:2px;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#ff4ea4;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #ff2d93}.home .hero .action-button:hover{background-color:#ff60ad}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/rubick/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#ff4ea4}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#ff4ea4}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#ff4ea4}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#ff4ea4}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #ff4ea4;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#ff4ea4}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #ff5cab}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#ff4ea4;border-left-color:#ff4ea4}.sidebar-heading.clickable:hover{color:#ff4ea4}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#ff4ea4}a.sidebar-link.active{font-weight:600;color:#ff4ea4;border-left-color:#ff4ea4}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:1}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}.sidebar-group.is-sub-group>.sidebar-heading[data-v-15b7b770]:not(.clickable){opacity:1}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.sidebar-group.is-sub-group>.sidebar-heading[data-v-deefee04]:not(.clickable){opacity:1}.theme-code-group__nav[data-v-deefee04]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-deefee04]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-deefee04]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-deefee04]{border-bottom:1px solid #42b983}.pre-blank[data-v-deefee04]{color:#42b983}.theme-code-block[data-v-759a7d02]{display:none}.theme-code-block__active[data-v-759a7d02]{display:block}.theme-code-block>pre[data-v-759a7d02]{background-color:orange} \ No newline at end of file diff --git a/assets/img/search.83621669.svg b/assets/img/search.83621669.svg new file mode 100644 index 00000000..03d83913 --- /dev/null +++ b/assets/img/search.83621669.svg @@ -0,0 +1 @@ + diff --git a/assets/js/10.f7f1aa99.js b/assets/js/10.f7f1aa99.js new file mode 100644 index 00000000..5b25f77f --- /dev/null +++ b/assets/js/10.f7f1aa99.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{285:function(t,e,a){"use strict";a.r(e);var r=a(14),_=Object(r.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h2",{attrs:{id:"赞助"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#赞助"}},[t._v("#")]),t._v(" 赞助")]),t._v(" "),e("p",[e("code",[t._v("rubick")]),t._v(" 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️.")]),t._v(" "),e("img",{attrs:{width:"200",src:"https://pic1.zhimg.com/80/v2-688385687a37e962fe32daf136139feb_720w.png"}}),t._v(" "),e("img",{attrs:{width:"200",src:"https://pica.zhimg.com/80/v2-1ba296fd2cece45ee1094ee7c259035c_720w.png"}}),t._v(" "),e("h2",{attrs:{id:"前言"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#前言"}},[t._v("#")]),t._v(" 前言")]),t._v(" "),e("p",[t._v("rubick 之前的插件管理,依托于云服务器存储,我们需要为服务器存储支付一笔不小的开销。\n由于项目完全开源,所以几乎无任何收入,所以为了让 rubick 先生存下去,我们再三抉择把插件包管理方式托管到了"),e("code",[t._v("npm")]),t._v(" 上。")]),t._v(" "),e("p",[t._v("由于 rubick 的插件管理体系是基于 npm 的包管理体系,所以当您需要使用插件的时候,需要手动保证当前电脑已经安装好了"),e("code",[t._v("node")]),t._v("环境。\n如果当前电脑已经安装过 "),e("code",[t._v("node")]),t._v(",那么您可以直接下载 "),e("code",[t._v("rubick")]),t._v(" 进行使用啦!")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://juejin.cn/post/6844903886541553672",target:"_blank",rel:"noopener noreferrer"}},[t._v("macos 下安装 nodejs 方法"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{href:"https://juejin.cn/post/6892790243687137287",target:"_blank",rel:"noopener noreferrer"}},[t._v("windows 下安装 nodejs 方法"),e("OutboundLink")],1)]),t._v(" "),e("h2",{attrs:{id:"下载-rubick"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#下载-rubick"}},[t._v("#")]),t._v(" 下载 rubick")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://github.com/rubickCenter/rubick/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("rubick 下载安装地址"),e("OutboundLink")],1)]),t._v(" "),e("p",[t._v("macos 选择 "),e("code",[t._v("pkg")]),t._v(" 文件,windows 选择 "),e("code",[t._v("exe")]),t._v(" 文件,Debian/Ubuntu选择"),e("code",[t._v("deb")]),t._v("。\n安装完成后打开 rubick 即可看到主搜索界面:")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/26f0fbe2c69246b6a3ed139b0df1ca0b~tplv-k3u1fbpfcp-watermark.image",alt:""}})]),t._v(" "),e("h2",{attrs:{id:"功能说明"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#功能说明"}},[t._v("#")]),t._v(" 功能说明")]),t._v(" "),e("p",[t._v("接下来详细介绍 rubick 所包含和支持的功能")]),t._v(" "),e("h3",{attrs:{id:"_1-搜索系统应用"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-搜索系统应用"}},[t._v("#")]),t._v(" 1. 搜索系统应用")]),t._v(" "),e("p",[t._v("支持拼音和缩写来搜索系统安装应用:")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ba363e8f60f540e6a5c365c4317c4413~tplv-k3u1fbpfcp-watermark.image",alt:""}})]),t._v(" "),e("h3",{attrs:{id:"_2-ui类插件安装"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-ui类插件安装"}},[t._v("#")]),t._v(" 2. UI类插件安装")]),t._v(" "),e("p",[t._v("点击搜索框右侧 "),e("code",[t._v("rubick")]),t._v(" 图标,进入插件市场,选择所需插件,点击下载按钮即可下载,下载完成后在已安装 tab 下可以找到安装插件。\n安装完成后,输入插件呼起命令即可使用对应插件:")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7ae45c7ede1f4e3bb7d35ae845e60b64~tplv-k3u1fbpfcp-watermark.image",alt:""}})]),t._v(" "),e("h3",{attrs:{id:"_3-系统类插件安装"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-系统类插件安装"}},[t._v("#")]),t._v(" 3. 系统类插件安装")]),t._v(" "),e("p",[t._v("系统插件安装方式和UI类一样,在插件市场选择"),e("code",[t._v("系统分类")]),t._v(",寻找适合自己的系统插件安装即可。")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),e("p",[t._v("系统插件安装成功后,需要重启 "),e("code",[t._v("rubick")]),t._v(" 才能生效")])]),t._v(" "),e("h3",{attrs:{id:"_4-输入框聚焦自动根据剪切板内容匹配插件"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-输入框聚焦自动根据剪切板内容匹配插件"}},[t._v("#")]),t._v(" 4. 输入框聚焦自动根据剪切板内容匹配插件")]),t._v(" "),e("p",[t._v("在 "),e("code",[t._v("rubick")]),t._v(" 内搜索"),e("code",[t._v("偏好设置")]),t._v(",然后开启"),e("code",[t._v("自动粘贴")]),t._v(" 功能,即可匹配剪切板内容自动匹配适合插件进行使用。")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/01ef50fbfa064ba9a88bebe1531eacd4~tplv-k3u1fbpfcp-watermark.image",alt:""}})]),t._v(" "),e("h3",{attrs:{id:"内网部署"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#内网部署"}},[t._v("#")]),t._v(" 内网部署")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("如果把插件发布到公网 "),e("code",[t._v("npm")]),t._v(" 如果不符合您的公司安全要求,"),e("code",[t._v("rubick")]),t._v(" 支持内网私有源和私有插件库,如果您需要内网部署使用,可以自行配置以下规则。")])]),t._v(" "),e("p",[e("code",[t._v("rubick")]),t._v(" 依赖 "),e("code",[t._v("npm")]),t._v(" 仓库做插件管理,依赖 "),e("code",[t._v("gitcode")]),t._v(" 做插件数据存储,所以如果要进行内网部署,主要需要替换这2个设置。详细设置:\n"),e("code",[t._v("插件市场 -> 设置 -> 内网部署设置")])]),t._v(" "),e("p",[e("img",{attrs:{src:"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1319b177fb544017ae10b4a703e8efa6~tplv-k3u1fbpfcp-watermark.image?",alt:"image.png"}})]),t._v(" "),e("h4",{attrs:{id:"_1-替换-npm-源"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-替换-npm-源"}},[t._v("#")]),t._v(" 1. 替换 npm 源")]),t._v(" "),e("p",[t._v("插件发布到私有 "),e("code",[t._v("npm")]),t._v(" 源即可。")]),t._v(" "),e("h4",{attrs:{id:"_2-替换-gitcode-源为内网-gitlab-database-url"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-替换-gitcode-源为内网-gitlab-database-url"}},[t._v("#")]),t._v(" 2. 替换 "),e("code",[t._v("gitcode")]),t._v(" 源为内网 "),e("code",[t._v("gitlab")]),t._v(": database url")]),t._v(" "),e("ul",[e("li",[t._v("clone 下载 rubick 插件库:"),e("a",{attrs:{href:"https://gitcode.net/rubickcenter/rubick-database",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://gitcode.net/rubickcenter/rubick-database"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("提交仓库到私有 "),e("code",[t._v("gitlab")]),t._v(" 库。")])]),t._v(" "),e("p",[t._v("替换格式:"),e("code",[t._v("https://gitlab.xxx.com/api/v4/projects/{projectId}/repository/files/")]),t._v(" 。因为接口为 "),e("code",[t._v("gitlab openAPI")]),t._v(",所以需要填写仓库 "),e("code",[t._v("access_token")])]),t._v(" "),e("h3",{attrs:{id:"更多功能"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#更多功能"}},[t._v("#")]),t._v(" 更多功能")]),t._v(" "),e("p",[t._v("如果您还需要更多功能,欢迎来这里给我们提建议:"),e("a",{attrs:{href:"https://github.com/rubickCenter/rubick/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("issues"),e("OutboundLink")],1),t._v(" 。\n有价值的想法我们会加入到后期的开发当中。同时也欢迎一起加入共建。")])])}),[],!1,null,null,null);e.default=_.exports}}]); \ No newline at end of file diff --git a/assets/js/11.861f0d8b.js b/assets/js/11.861f0d8b.js new file mode 100644 index 00000000..4ebff36f --- /dev/null +++ b/assets/js/11.861f0d8b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{283:function(s,a,t){"use strict";t.r(a);var e=t(14),n=Object(e.a)({},(function(){var s=this,a=s._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h2",{attrs:{id:"赞助"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#赞助"}},[s._v("#")]),s._v(" 赞助")]),s._v(" "),a("p",[a("code",[s._v("rubick")]),s._v(" 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️.")]),s._v(" "),a("img",{attrs:{width:"200",src:"https://pic1.zhimg.com/80/v2-688385687a37e962fe32daf136139feb_720w.png"}}),s._v(" "),a("img",{attrs:{width:"200",src:"https://pica.zhimg.com/80/v2-1ba296fd2cece45ee1094ee7c259035c_720w.png"}}),s._v(" "),a("h2",{attrs:{id:"贡献代码"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#贡献代码"}},[s._v("#")]),s._v(" 贡献代码")]),s._v(" "),a("h3",{attrs:{id:"rubick-目录介绍"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rubick-目录介绍"}},[s._v("#")]),s._v(" rubick 目录介绍")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v(".")]),s._v("\n├── docs "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 文档存方目录")]),s._v("\n│ ├── docs\n│ ├── package-lock.json\n│ ├── package.json\n│ └── pnpm-lock.yaml\n├── feature "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 插件市场插件")]),s._v("\n│ ├── README.md\n│ ├── babel.config.js\n│ ├── package-lock.json\n│ ├── package.json\n│ ├── public\n│ ├── src\n│ ├── tsconfig.json\n│ └── vue.config.js\n├── public "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# rubick __static 目录")]),s._v("\n│ ├── favicon.ico\n│ ├── feature\n│ ├── icons\n│ ├── index.html\n│ ├── preload.js\n│ └── tpl\n├── src "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# rubick 核心源码")]),s._v("\n│ ├── common "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 一些通用的函数")]),s._v("\n│ ├── core "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 一些核心的能力,比如 app search")]),s._v("\n│ ├── main "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 主进程")]),s._v("\n│ └── renderer "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 渲染进程")]),s._v("\n├── tpl "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# rubick 模板插件")]),s._v("\n│ ├── README.md\n│ ├── babel.config.js\n│ ├── package-lock.json\n│ ├── package.json\n│ ├── public\n│ ├── src\n│ ├── tsconfig.json\n│ └── vue.config.js\n├── LICENSE "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# MIT 协议")]),s._v("\n├── README.md "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 英文文档")]),s._v("\n├── README.zh-CN.md "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# 中文文档")]),s._v("\n├── babel.config.js\n├── deploy-doc.sh "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("# rubick doc 发布脚本")]),s._v("\n├── tsconfig.json\n├── package-lock.json\n├── package.json\n└── vue.config.js\n")])])]),a("h3",{attrs:{id:"启动"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#启动"}},[s._v("#")]),s._v(" 启动")]),s._v(" "),a("h4",{attrs:{id:"_1-安装依赖"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-安装依赖"}},[s._v("#")]),s._v(" 1. 安装依赖")]),s._v(" "),a("p",[a("code",[s._v("rubick")]),s._v(" 启动主要涉及到3个目录:")]),s._v(" "),a("ol",[a("li",[s._v("根目录:"),a("code",[s._v("rubick")]),s._v(" 核心进程")]),s._v(" "),a("li",[s._v("feature:"),a("code",[s._v("rubick")]),s._v(" 内置的插件市场插件")]),s._v(" "),a("li",[s._v("tpl: "),a("code",[s._v("rubick")]),s._v(" 内置的模板插件")])]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[s._v("$ "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" i\n$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("cd")]),s._v(" feature "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" i\n$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("cd")]),s._v(" tpl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" i\n")])])]),a("h4",{attrs:{id:"_2-启动核心进程"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-启动核心进程"}},[s._v("#")]),s._v(" 2. 启动核心进程")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[s._v("$ "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" run electron:serve\n")])])]),a("h4",{attrs:{id:"_3-启动插件中心"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-启动插件中心"}},[s._v("#")]),s._v(" 3. 启动插件中心 "),a("Badge",{attrs:{type:"warning",text:"非必须",vertical:"top"}})],1),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[s._v("$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("cd")]),s._v(" feature "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" run serve\n")])])]),a("h4",{attrs:{id:"_4-启动模板插件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-启动模板插件"}},[s._v("#")]),s._v(" 4. 启动模板插件 "),a("Badge",{attrs:{type:"warning",text:"非必须",vertical:"top"}})],1),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[s._v("$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("cd")]),s._v(" tpl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" run serve\n")])])]),a("h3",{attrs:{id:"编译"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#编译"}},[s._v("#")]),s._v(" 编译")]),s._v(" "),a("div",{staticClass:"language-shell extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[s._v("$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("cd")]),s._v(" feature "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" run build\n$ "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v("cd")]),s._v(" tpl "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("&&")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" run build\n$ "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("npm")]),s._v(" run electron:build\n")])])]),a("h3",{attrs:{id:"pr"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pr"}},[s._v("#")]),s._v(" PR")]),s._v(" "),a("ol",[a("li",[s._v("Create an issue about the features, such as new components.")]),s._v(" "),a("li",[s._v("Fork the repo to your own account.")]),s._v(" "),a("li",[s._v("Clone your fork.")]),s._v(" "),a("li",[s._v("Create a new branch base on dev, if you want to add new component, the branch name should be formatted as component-[Component Name]. (e.g. component-steps) And the commit info should be formatted as [Component Name]: Info about commit.")]),s._v(" "),a("li",[s._v("Make sure that running npm run prepublish outputs the correct files.")]),s._v(" "),a("li",[s._v("Rebase before creating a PR to keep commit history clear. (Merge request to branch dev)")]),s._v(" "),a("li",[s._v("Provide some description about your PR.")])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.8083ac2d.js b/assets/js/12.8083ac2d.js new file mode 100644 index 00000000..6e0d7fdd --- /dev/null +++ b/assets/js/12.8083ac2d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{284:function(v,_,t){"use strict";t.r(_);var r=t(14),c=Object(r.a)({},(function(){var v=this,_=v._self._c;return _("ContentSlotsDistributor",{attrs:{"slot-key":v.$parent.slotKey}},[_("h1",{attrs:{id:"特殊服务"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#特殊服务"}},[v._v("#")]),v._v(" 特殊服务")]),v._v(" "),_("h2",{attrs:{id:"说明"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#说明"}},[v._v("#")]),v._v(" 说明")]),v._v(" "),_("p",[_("code",[v._v("rubick")]),v._v(" 一直坚持开源免费,现在不会变,以后也不会变。但是纯开源 "),_("code",[v._v("MIT")]),v._v(" 模式下,是一种 0 收入用爱发电的,完全依靠\n作者自己的爱好和激情。但这种用爱发电的模式很难持续维持,为了更好的持续迭代和发展壮大 "),_("code",[v._v("rubick")]),v._v(", 我们需要一定的现金持续激励 "),_("code",[v._v("rubick")]),v._v(" 的核心开发者们,让更多的人成为 "),_("code",[v._v("rubick")]),v._v("\n的核心开发者。所以 "),_("code",[v._v("rubick")]),v._v(" 开启了一个新的模式尝试,那是服务付费:"),_("code",[v._v("rubick")]),v._v(" 用户可以购买我们提供技术支持、答疑解惑、定制化插件开发、二次定制化开发 "),_("code",[v._v("rubick")]),v._v(" 等等官方服务...")]),v._v(" "),_("h2",{attrs:{id:"可以提供哪些服务"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#可以提供哪些服务"}},[v._v("#")]),v._v(" 可以提供哪些服务?")]),v._v(" "),_("p",[v._v("我们收集了大量用户的问题,目前约定可以支持到的服务有:")]),v._v(" "),_("ol",[_("li",[v._v("二次定制化开发 "),_("code",[v._v("rubick")])]),v._v(" "),_("li",[v._v("轻量级插件开发")]),v._v(" "),_("li",[_("code",[v._v("rubick")]),v._v(" 实现原理手把手介绍")]),v._v(" "),_("li",[_("code",[v._v("rubick")]),v._v(" 使用答疑")]),v._v(" "),_("li",[_("code",[v._v("rubick")]),v._v(" 内网部署一条龙服务")]),v._v(" "),_("li",[v._v("前端圈各种技术支持(作者分别是前蚂蚁集团和字节跳动的前端技术专家)")]),v._v(" "),_("li",[v._v("未来能提供的一切...")])]),v._v(" "),_("h2",{attrs:{id:"如何加入特殊服务"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#如何加入特殊服务"}},[v._v("#")]),v._v(" 如何加入特殊服务?")]),v._v(" "),_("p",[v._v("扫描下方的二维码,加入知识星球即可:\n"),_("img",{attrs:{width:"400",src:"https://picx.zhimg.com/80/v2-6deabf65175d18080439ef813102d18c_720w.png"}})])])}),[],!1,null,null,null);_.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/2.733019b2.js b/assets/js/2.733019b2.js new file mode 100644 index 00000000..cca61c05 --- /dev/null +++ b/assets/js/2.733019b2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return r})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return b}));n(90);const s=/#.*$/,i=/\.(md|html)$/,a=/\/$/,r=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(s,"").replace(i,"")}function l(t){return r.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(l(t))return t;const e=t.match(s),n=e?e[0]:"",i=o(t);return a.test(i)?t:i+".html"+n}function p(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(s);if(e)return e[0]}(e);if(i&&n!==i)return!1;return o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const s=t.charAt(0);if("/"===s)return t;if("?"===s||"#"===s)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,s,i=1){if("string"==typeof e)return d(n,e,s);if(Array.isArray(e))return Object.assign(d(n,e[0],s),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,s),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,s,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){},242:function(t,e,n){},243:function(t,e,n){},244:function(t,e,n){},245:function(t,e,n){},246:function(t,e,n){},247:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,n){},249:function(t,e,n){},250:function(t,e,n){},251:function(t,e,n){},252:function(t,e,n){},253:function(t,e,n){},257:function(t,e,n){"use strict";n.r(e);var s=n(239),i={name:"SidebarGroup",components:{DropdownTransition:n(258).a},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=n(257).default},methods:{isActive:s.e}},a=(n(270),n(14)),r=Object(a.a)(i,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null).exports;function o(t,e,n,s,i){const a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:s,"sidebar-link":!0}};return i>2&&(a.style={"padding-left":i+"rem"}),t("RouterLink",a,n)}function l(t,e,n,i,a,r=1){return!e||r>a?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(s.e)(i,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[o(t,n+"#"+e.slug,e.title,u,e.level-1),l(t,e.children,n,i,a,r+1)])}))}var u={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:i,$themeConfig:a,$themeLocaleConfig:r},props:{item:u,sidebarDepth:c}}){const h=Object(s.e)(i,u.path),p="auto"===u.type?h||u.children.some(t=>Object(s.e)(i,u.basePath+"#"+t.slug)):h,d="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):o(t,u.path,u.title||u.path,p),f=[e.frontmatter.sidebarDepth,c,r.sidebarDepth,a.sidebarDepth,1].find(t=>void 0!==t),g=r.displayAllHeaders||a.displayAllHeaders;if("auto"===u.type)return[d,l(t,u.children,u.basePath,i,f)];if((p||g)&&u.headers&&!s.d.test(u.path)){return[d,l(t,Object(s.c)(u.headers),u.path,i,f)]}return d}};n(271);function c(t,e){if("group"===e.type){const n=e.path&&Object(s.e)(t,e.path),i=e.children.some(e=>"group"===e.type?c(t,e):"page"===e.type&&Object(s.e)(t,e.path));return n||i}return!1}var h={name:"SidebarLinks",components:{SidebarGroup:r,SidebarLink:Object(a.a)(u,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(s.e)(this.$route,t.regularPath)}}},p=Object(a.a)(h,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,s){return e("li",{key:s},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:s===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(s)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=p.exports},258:function(t,e,n){"use strict";var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(262),n(14)),a=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.a=a.exports},259:function(t,e,n){"use strict";n(240)},260:function(t,e,n){"use strict";n(241)},261:function(t,e,n){"use strict";n(242)},262:function(t,e,n){"use strict";n(243)},263:function(t,e,n){"use strict";n(244)},264:function(t,e,n){"use strict";n(245)},265:function(t,e,n){"use strict";n(246)},266:function(t,e,n){"use strict";n(248)},267:function(t,e,n){var s=n(11),i=n(4),a=n(10);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==s(t)}},268:function(t,e,n){"use strict";n(249)},269:function(t,e,n){"use strict";n(250)},270:function(t,e,n){"use strict";n(251)},271:function(t,e,n){"use strict";n(252)},272:function(t,e,n){"use strict";n(253)},276:function(t,e,n){"use strict";n.r(e);var s=n(239),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(s.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(s.g)(this.link)||Object(s.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(s.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(s.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},a=n(14),r=Object(a.a)(i,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null).exports,o={name:"Home",components:{NavLink:r},computed:{data(){return this.$page.frontmatter},actionLink(){return{link:this.data.actionLink,text:this.data.actionText}}}},l=(n(259),Object(a.a)(o,(function(){var t=this,e=t._self._c;return e("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[e("header",{staticClass:"hero"},[t.data.heroImage?e("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?e("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?e("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?e("p",{staticClass:"action"},[e("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?e("div",{staticClass:"features"},t._l(t.data.features,(function(n,s){return e("div",{key:s,staticClass:"feature"},[e("h2",[t._v(t._s(n.title))]),t._v(" "),e("p",[t._v(t._s(n.details))])])})),0):t._e(),t._v(" "),e("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?e("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):e("Content",{staticClass:"footer",attrs:{"slot-key":"footer"}})],1)}),[],!1,null,null,null).exports),u=(n(90),n(91)),c=n.n(u),h=(t,e,n=null)=>{let s=c()(e,"title","");return c()(e,"frontmatter.tags")&&(s+=" "+e.frontmatter.tags.join(" ")),n&&(s+=" "+n),p(t,s)};const p=(t,e)=>{const n=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp("[^\0-]"),i=t.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t);if(s.test(t))return i.some(t=>e.toLowerCase().indexOf(t)>-1);{const s=t.endsWith(" ");return new RegExp(i.map((t,e)=>i.length!==e+1||s?`(?=.*\\b${n(t)}\\b)`:`(?=.*\\b${n(t)})`).join("")+".+","gi").test(e)}};var d={name:"SearchBox",data:()=>({query:"",focused:!1,focusIndex:0,placeholder:void 0}),computed:{showSuggestions(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions(){const t=this.query.trim().toLowerCase();if(!t)return;const{pages:e}=this.$site,n=this.$site.themeConfig.searchMaxSuggestions||5,s=this.$localePath,i=[];for(let a=0;a=n);a++){const r=e[a];if(this.getPageLocalePath(r)===s&&this.isSearchable(r))if(h(t,r))i.push(r);else if(r.headers)for(let e=0;e=n);e++){const n=r.headers[e];n.title&&h(t,r,n.title)&&i.push(Object.assign({},r,{path:r.path+"#"+n.slug,header:n}))}}return i},alignRight(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath(t){for(const e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable(t){let e=null;return null===e||(e=Array.isArray(e)?e:new Array(e),e.filter(e=>t.path.match(e)).length>0)},onHotkey(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown(){this.showSuggestions&&(this.focusIndex "+t._s(n.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports),g=(n(261),Object(a.a)({},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sidebar-button",on:{click:function(e){return t.$emit("toggle-sidebar")}}},[e("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[e("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null).exports),m=n(258),b=n(92),v=n.n(b),k={name:"DropdownLink",components:{NavLink:r,DropdownTransition:m.a},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>v()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},_=(n(263),{name:"NavLinks",components:{NavLink:r,DropdownLink:Object(a.a)(k,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,s){return e("li",{key:n.link||s,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(s){return e("li",{key:s.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:s},on:{focusout:function(e){t.isLastItemOfArray(s,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null).exports},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,s=this.$site.themeConfig.locales||{},i={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(i=>{const a=t[i],r=s[i]&&s[i].label||a.lang;let o;return a.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,i),n.some(t=>t.path===o)||(o=i)),{text:r,link:o}})};return[...this.userNav,i]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(s.j)(t),{items:(t.items||[]).map(s.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n({linksWrapMaxWidth:null}),computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName}},mounted(){const t=parseInt(C(this.$el,"paddingLeft"))+parseInt(C(this.$el,"paddingRight")),e=()=>{document.documentElement.clientWidth<719?this.linksWrapMaxWidth=null:this.linksWrapMaxWidth=this.$el.offsetWidth-t-(this.$refs.siteName&&this.$refs.siteName.offsetWidth||0)};e(),window.addEventListener("resize",e,!1)}},$=(n(265),Object(a.a)(L,(function(){var t=this,e=t._self._c;return e("header",{staticClass:"navbar"},[e("SidebarButton",{on:{"toggle-sidebar":function(e){return t.$emit("toggle-sidebar")}}}),t._v(" "),e("RouterLink",{staticClass:"home-link",attrs:{to:t.$localePath}},[t.$site.themeConfig.logo?e("img",{staticClass:"logo",attrs:{src:t.$withBase(t.$site.themeConfig.logo),alt:t.$siteTitle}}):t._e(),t._v(" "),t.$siteTitle?e("span",{ref:"siteName",staticClass:"site-name",class:{"can-hide":t.$site.themeConfig.logo}},[t._v(t._s(t.$siteTitle))]):t._e()]),t._v(" "),e("div",{staticClass:"links",style:t.linksWrapMaxWidth?{"max-width":t.linksWrapMaxWidth+"px"}:{}},[t.isAlgoliaSearch?e("AlgoliaSearchBox",{attrs:{options:t.algolia}}):!1!==t.$site.themeConfig.search&&!1!==t.$page.frontmatter.search?e("SearchBox"):t._e(),t._v(" "),e("NavLinks",{staticClass:"can-hide"})],1)],1)}),[],!1,null,null,null).exports),y=n(247),w=n.n(y),O={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=w()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:s="master",docsRepo:i=e}=this.$site.themeConfig;return t&&i&&this.$page.relativePath?this.createEditLink(e,i,n,s,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,i,a){if(/bitbucket.org/.test(e)){return e.replace(s.a,"")+"/src"+`/${i}/`+(n?n.replace(s.a,"")+"/":"")+a+`?mode=edit&spa=0&at=${i}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(s.a,"")+"/-/edit"+`/${i}/`+(n?n.replace(s.a,"")+"/":"")+a}return(s.i.test(e)?e:"https://github.com/"+e).replace(s.a,"")+"/edit"+`/${i}/`+(n?n.replace(s.a,"")+"/":"")+a}}},S=(n(266),Object(a.a)(O,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null).exports),I=n(267),j=n.n(I),N={name:"PageNav",props:["sidebarItems"],computed:{prev(){return P(T.PREV,this)},next(){return P(T.NEXT,this)}}};const T={NEXT:{resolveLink:function(t,e){return A(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return A(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function P(t,{$themeConfig:e,$page:n,$route:i,$site:a,sidebarItems:r}){const{resolveLink:o,getThemeLinkConfig:l,getPageLinkConfig:u}=t,c=l(e),h=u(n),p=w()(h)?c:h;return!1===p?void 0:j()(p)?Object(s.k)(a.pages,p,i.path):o(n,r)}function A(t,e,n){const s=[];!function t(e,n){for(let s=0,i=e.length;s({isSidebarOpen:!1}),computed:{shouldShowNavbar(){const{themeConfig:t}=this.$site,{frontmatter:e}=this.$page;return!1!==e.navbar&&!1!==t.navbar&&(this.$title||t.logo||t.repo||t.nav||this.$themeLocaleConfig.nav)},shouldShowSidebar(){const{frontmatter:t}=this.$page;return!t.home&&!1!==t.sidebar&&this.sidebarItems.length},sidebarItems(){return Object(s.l)(this.$page,this.$page.regularPath,this.$site,this.$localePath)},pageClasses(){const t=this.$page.frontmatter.pageClass;return[{"no-navbar":!this.shouldShowNavbar,"sidebar-open":this.isSidebarOpen,"no-sidebar":!this.shouldShowSidebar},t]}},mounted(){this.$router.afterEach(()=>{this.isSidebarOpen=!1})},methods:{toggleSidebar(t){this.isSidebarOpen="boolean"==typeof t?t:!this.isSidebarOpen,this.$emit("toggle-sidebar",this.isSidebarOpen)},onTouchStart(t){this.touchStart={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}},onTouchEnd(t){const e=t.changedTouches[0].clientX-this.touchStart.x,n=t.changedTouches[0].clientY-this.touchStart.y;Math.abs(e)>Math.abs(n)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}}),G=Object(a.a)(U,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?e("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),e("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),e("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?e("Home"):e("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=G.exports}}]); \ No newline at end of file diff --git a/assets/js/3.64801815.js b/assets/js/3.64801815.js new file mode 100644 index 00000000..3282e729 --- /dev/null +++ b/assets/js/3.64801815.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{254:function(t,e,n){},273:function(t,e,n){"use strict";n(254)},286:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:(t,{props:e,slots:n})=>t("span",{class:["badge",e.type],style:{verticalAlign:e.vertical}},e.text||n().default)},p=(n(273),n(14)),l=Object(p.a)(i,void 0,void 0,!1,null,"15b7b770",null);e.default=l.exports}}]); \ No newline at end of file diff --git a/assets/js/4.fc333d27.js b/assets/js/4.fc333d27.js new file mode 100644 index 00000000..d37550c1 --- /dev/null +++ b/assets/js/4.fc333d27.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{256:function(t,e,a){},275:function(t,e,a){"use strict";a(256)},279:function(t,e,a){"use strict";a.r(e);var s={name:"CodeBlock",props:{title:{type:String,required:!0},active:{type:Boolean,default:!1}},mounted(){this.$parent&&this.$parent.loadTabs&&this.$parent.loadTabs()}},i=(a(275),a(14)),n=Object(i.a)(s,(function(){return(0,this._self._c)("div",{staticClass:"theme-code-block",class:{"theme-code-block__active":this.active}},[this._t("default")],2)}),[],!1,null,"759a7d02",null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/5.bfef3080.js b/assets/js/5.bfef3080.js new file mode 100644 index 00000000..d01fa9e8 --- /dev/null +++ b/assets/js/5.bfef3080.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{255:function(e,t,a){},274:function(e,t,a){"use strict";a(255)},278:function(e,t,a){"use strict";a.r(t);var o={name:"CodeGroup",data:()=>({codeTabs:[],activeCodeTabIndex:-1}),watch:{activeCodeTabIndex(e){this.activateCodeTab(e)}},mounted(){this.loadTabs()},methods:{changeCodeTab(e){this.activeCodeTabIndex=e},loadTabs(){this.codeTabs=(this.$slots.default||[]).filter(e=>Boolean(e.componentOptions)).map((e,t)=>(""===e.componentOptions.propsData.active&&(this.activeCodeTabIndex=t),{title:e.componentOptions.propsData.title,elm:e.elm})),-1===this.activeCodeTabIndex&&this.codeTabs.length>0&&(this.activeCodeTabIndex=0),this.activateCodeTab(0)},activateCodeTab(e){this.codeTabs.forEach(e=>{e.elm&&e.elm.classList.remove("theme-code-block__active")}),this.codeTabs[e].elm&&this.codeTabs[e].elm.classList.add("theme-code-block__active")}}},s=(a(274),a(14)),c=Object(s.a)(o,(function(){var e=this,t=e._self._c;return t("ClientOnly",[t("div",{staticClass:"theme-code-group"},[t("div",{staticClass:"theme-code-group__nav"},[t("ul",{staticClass:"theme-code-group__ul"},e._l(e.codeTabs,(function(a,o){return t("li",{key:a.title,staticClass:"theme-code-group__li"},[t("button",{staticClass:"theme-code-group__nav-tab",class:{"theme-code-group__nav-tab-active":o===e.activeCodeTabIndex},on:{click:function(t){return e.changeCodeTab(o)}}},[e._v("\n "+e._s(a.title)+"\n ")])])})),0)]),e._v(" "),e._t("default"),e._v(" "),e.codeTabs.length<1?t("pre",{staticClass:"pre-blank"},[e._v("// Make sure to add code blocks to your code group")]):e._e()],2)])}),[],!1,null,"deefee04",null);t.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/6.2d0a63f8.js b/assets/js/6.2d0a63f8.js new file mode 100644 index 00000000..dac0b616 --- /dev/null +++ b/assets/js/6.2d0a63f8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{277:function(t,e,s){"use strict";s.r(e);const o=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."];var n={methods:{getMsg:()=>o[Math.floor(Math.random()*o.length)]}},h=s(14),i=Object(h.a)(n,(function(){var t=this._self._c;return t("div",{staticClass:"theme-container"},[t("div",{staticClass:"theme-default-content"},[t("h1",[this._v("404")]),this._v(" "),t("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),t("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/7.9c9172a7.js b/assets/js/7.9c9172a7.js new file mode 100644 index 00000000..4e2997ef --- /dev/null +++ b/assets/js/7.9c9172a7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{280:function(t,n,s){"use strict";s.r(n);var e=s(14),o=Object(e.a)({},(function(){return(0,this._self._c)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/8.010bfadc.js b/assets/js/8.010bfadc.js new file mode 100644 index 00000000..8981e8bc --- /dev/null +++ b/assets/js/8.010bfadc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{281:function(t,a,s){"use strict";s.r(a);var n=s(14),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h2",{attrs:{id:"事件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#事件"}},[t._v("#")]),t._v(" 事件")]),t._v(" "),a("h3",{attrs:{id:"onpluginready-callback-、onpluginenter-callback"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#onpluginready-callback-、onpluginenter-callback"}},[t._v("#")]),t._v(" onPluginReady(callback)、onPluginEnter(callback)")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("callback")]),t._v(" Function")])]),t._v(" "),a("p",[a("code",[t._v("callback")]),t._v(" 内会返回一个 "),a("code",[t._v("object")]),t._v(" 对象,来描述进入当前插件的环境信息:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("code")]),t._v(" String")])]),t._v(" "),a("blockquote",[a("p",[t._v("plugin.json 配置的 feature.code")])]),t._v(" "),a("ul",[a("li",[a("code",[t._v("type")]),t._v(" String")])]),t._v(" "),a("blockquote",[a("p",[t._v('plugin.json 配置的 feature.cmd.type,可以为 "text"、"img"、 "files"、 "regex"、 "over"、"window"')])]),t._v(" "),a("ul",[a("li",[t._v("payload String | Object | Array")])]),t._v(" "),a("blockquote",[a("p",[t._v("feature.cmd.type 对应匹配的数据")])]),t._v(" "),a("p",[t._v("当插件装载成功,rubick 将会主动调用这个方法, 所有的 "),a("code",[t._v("api")]),t._v(" 都应该在 "),a("code",[t._v("onPluginReady")]),t._v(" 之后进行调用。")]),t._v(" "),a("h4",{attrs:{id:"示例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#示例"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onPluginReady")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" code"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" type"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'插件装配完成,已准备好'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('/* \ntype 为 "files" 时, payload 值示例\n[\n\t{\n\t\t"isFile": true,\n\t\t"isDirectory": false,\n\t\t"name": "demo.js",\n\t\t"path": "C:\\\\demo.js"\n\t}\n]\n\ntype 为 "img" 时, payload 值示例\ndata:image/png;base64,...\n\ntype 为 "text"、"regex"、 "over" 时, payload 值为进入插件时的主输入框文本\n*/')]),t._v("\n")])])]),a("h3",{attrs:{id:"onpluginout-callback"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#onpluginout-callback"}},[t._v("#")]),t._v(" onPluginOut(callback)")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("callback")]),t._v(" Function")])]),t._v(" "),a("p",[t._v("每当插件从前台进入到后台时,rubick 将会主动调用这个方法。")]),t._v(" "),a("h2",{attrs:{id:"窗口交互"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#窗口交互"}},[t._v("#")]),t._v(" 窗口交互")]),t._v(" "),a("h3",{attrs:{id:"hidemainwindow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#hidemainwindow"}},[t._v("#")]),t._v(" hideMainWindow()")]),t._v(" "),a("p",[t._v("隐藏主窗口")]),t._v(" "),a("h3",{attrs:{id:"showmainwindow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#showmainwindow"}},[t._v("#")]),t._v(" showMainWindow()")]),t._v(" "),a("p",[t._v("显示主窗口")]),t._v(" "),a("h3",{attrs:{id:"setexpendheight-height"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setexpendheight-height"}},[t._v("#")]),t._v(" setExpendHeight(height)")]),t._v(" "),a("p",[t._v("执行该方法将会修改插件窗口的高度。")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("height")]),t._v(" Integer")]),t._v(" "),a("li",[t._v("返回 "),a("code",[t._v("Boolean")])])]),t._v(" "),a("h4",{attrs:{id:"示例-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#示例-2"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setExpendHeight")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"setsubinput-onchange-placeholder"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setsubinput-onchange-placeholder"}},[t._v("#")]),t._v(" setSubInput(onChange, placeholder)")]),t._v(" "),a("p",[t._v("设置插件输入框监听,当进入插件后,用户搜索会触发"),a("code",[t._v("onChange")]),t._v(" 函数")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("onChange")]),t._v(" Function\n"),a("ul",[a("li",[a("code",[t._v("Object")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("text")]),t._v(" String")])])])])])]),t._v(" "),a("blockquote",[a("p",[t._v("子输入框文本修改时触发")])]),t._v(" "),a("ul",[a("li",[a("code",[t._v("placeholder")]),t._v(" String (可选)")])]),t._v(" "),a("blockquote",[a("p",[t._v("子输入框占位符")])]),t._v(" "),a("ul",[a("li",[a("code",[t._v("isFocus")]),t._v(" Boolean (可选)")])]),t._v(" "),a("blockquote",[a("p",[t._v("子输入框是否获得焦点,默认 true")])]),t._v(" "),a("p",[a("code",[t._v("返回 Boolean")])]),t._v(" "),a("h4",{attrs:{id:"示例-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#示例-3"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setSubInput")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" text "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("text"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'搜索'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"setsubinputvalue-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setsubinputvalue-value"}},[t._v("#")]),t._v(" setSubInputValue(value)")]),t._v(" "),a("p",[t._v("直接对子输入框的值进行设置。")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("value")]),t._v(" String")]),t._v(" "),a("li",[a("code",[t._v("返回")]),t._v(" Boolean")])]),t._v(" "),a("h4",{attrs:{id:"示例-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#示例-4"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("setSubInputValue")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'rubick'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h2",{attrs:{id:"系统"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#系统"}},[t._v("#")]),t._v(" 系统")]),t._v(" "),a("h3",{attrs:{id:"shownotification-body"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#shownotification-body"}},[t._v("#")]),t._v(" showNotification(body)")]),t._v(" "),a("p",[t._v("显示系统通知")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("body")]),t._v(" String")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("showNotification")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Hi, rubick'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"shellopenpath-fullpath"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#shellopenpath-fullpath"}},[t._v("#")]),t._v(" shellOpenPath(fullPath)")]),t._v(" "),a("p",[t._v("打开给定路径的文件")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("fullPath")]),t._v(" String")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("shellOpenPath")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/path/file'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"shellopenexternal-url"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#shellopenexternal-url"}},[t._v("#")]),t._v(" shellOpenExternal(url)")]),t._v(" "),a("p",[t._v("浏览器打开URL")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("url")]),t._v(" String")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("shellOpenExternal")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://www.baidu.com'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"getpath-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getpath-name"}},[t._v("#")]),t._v(" getPath(name)")]),t._v(" "),a("p",[t._v("electron 内置 getPath 能力,详见 "),a("a",{attrs:{href:"https://www.electronjs.org/docs/latest/api/app#appgetpathname",target:"_blank",rel:"noopener noreferrer"}},[t._v("electron API"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("getPath")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cache'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("h2",{attrs:{id:"本地数据库"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#本地数据库"}},[t._v("#")]),t._v(" 本地数据库")]),t._v(" "),a("p",[a("code",[t._v("rubick db")]),t._v(" 是基于开源的 "),a("a",{attrs:{href:"https://github.com/pouchdb/pouchdb",target:"_blank",rel:"noopener noreferrer"}},[t._v("pouchdb"),a("OutboundLink")],1),t._v(" 封装的")]),t._v(" "),a("h3",{attrs:{id:"rubick-db-put-doc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rubick-db-put-doc"}},[t._v("#")]),t._v(" rubick.db.put(doc)")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("doc")]),t._v(" Object")]),t._v(" "),a("li",[a("code",[t._v("返回")]),t._v(" Object")])]),t._v(" "),a("h4",{attrs:{id:"示例-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#示例-5"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 创建请求")]),t._v("\nrubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_id")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// 返回 {id: "demo", ok: true, rev: "1-05c9b92e6f24287dc1f4ec79d9a34fa8"}')]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 更新请求")]),t._v("\nrubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_id")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_rev")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1-05c9b92e6f24287dc1f4ec79d9a34fa8"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("_id 代表这个文档在数据库中唯一值,如果值不存在,则会创建一个新的文档,如果值已经存在,则会进行更新。你可能已经注意到,返回对象中包含一个 rev\n属性,这是代表此文档的版本,每次对文档进行更新时,都要带上最新的版本号,否则更新将失败,版本化的意义在于解决同步时数据冲突。")]),t._v(" "),a("p",[t._v("另外需要注意,每次更新时都要传入完整的文档数据,无法对单个字段进行更新。")]),t._v(" "),a("h3",{attrs:{id:"rubick-db-get-id"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rubick-db-get-id"}},[t._v("#")]),t._v(" rubick.db.get(id)")]),t._v(" "),a("p",[t._v("执行该方法将会根据文档 ID 获取数据")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("id")]),t._v(" String")]),t._v(" "),a("li",[a("code",[t._v("返回")]),t._v(" Object")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// 返回 {_id: "demo", _rev: "3-9836c5c68af5aef618e17d615882942a", data: "demo"}')]),t._v("\n")])])]),a("h3",{attrs:{id:"rubick-db-remove-doc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rubick-db-remove-doc"}},[t._v("#")]),t._v(" rubick.db.remove(doc)")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("doc")]),t._v(" String | Object")]),t._v(" "),a("li",[a("code",[t._v("返回")]),t._v(" Object 执行该方法将会删除数据库文档,可以传入文档对象或文档 id 进行操作。")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("remove")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// 返回 {id: "demo", ok: true, rev: "2-effe5dbc23dffc180d8411b23f3108fb"}')]),t._v("\n")])])]),a("h3",{attrs:{id:"rubick-db-bulkdocs-docs"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rubick-db-bulkdocs-docs"}},[t._v("#")]),t._v(" rubick.db.bulkDocs(docs)")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("docs")]),t._v(" Array")]),t._v(" "),a("li",[a("code",[t._v("返回")]),t._v(" Array 执行该方法将会批量更新数据库文档,传入需要更改的文档对象合并成数组进行批量更新。")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("rubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("bulkDocs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_id")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_rev")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1-c8817a74e292eda4cba1a45924853af6"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_id")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("_rev")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1-f0399b42cc6123a9cc8503632ba7b3a7"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('/* 返回\n[{\nid: "demo1", ok: true, rev: "2-7857b2801bc0303d2cc0bb82e8afd796"\n}, {\nid: "demo2", ok: true, rev: "2-7857b2801bc0303d2cc0bb82e8afd796"\n}]\n*/')]),t._v("\n")])])]),a("h3",{attrs:{id:"rubick-db-alldocs-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rubick-db-alldocs-key"}},[t._v("#")]),t._v(" rubick.db.allDocs(key)")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("key")]),t._v(" String | Array")]),t._v(" "),a("li",[a("code",[t._v("返回")]),t._v(" Array 执行该方法将会获取所有数据库文档,如果传入字符串,则会返回以字符串开头的文档,也可以传入指定 ID 的数组,不传入则为获取所有文档。")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 获取所有文档")]),t._v("\nrubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("allDocs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 传入字符串,则返回id以 demo 开头的文档")]),t._v("\nrubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("allDocs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('/* 返回\n[{\n_id: "demo/123", _rev: "2-7857b2801bc0303d2cc0bb82e8afd796", data: "demo"\n}, {\n_id: "demo/124", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"\n}, {\n_id: "demo/125", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"\n}]\n*/')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 根据id数组请求")]),t._v("\nrubick"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("db"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("allDocs")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo2"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v('/* 返回\n[{\n_id: "demo1", _rev: "2-7857b2801bc0303d2cc0bb82e8afd796", data: "demo"\n}, {\n_id: "demo2", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"\n}]\n*/')]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/9.3b2c34da.js b/assets/js/9.3b2c34da.js new file mode 100644 index 00000000..ad119268 --- /dev/null +++ b/assets/js/9.3b2c34da.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{282:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h2",{attrs:{id:"插件说明"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#插件说明"}},[t._v("#")]),t._v(" 插件说明")]),t._v(" "),s("p",[s("code",[t._v("rubick")]),t._v(" 插件分为 "),s("code",[t._v("UI插件")]),t._v(" 和 "),s("code",[t._v("系统插件")]),t._v(" 2类。下面分别介绍这 2 类插件的区别和作用。")]),t._v(" "),s("ol",[s("li",[t._v("UI 插件 "),s("Badge",{attrs:{type:"tip",text:"最常用"}}),t._v(":都会有 UI 界面,用于和用户交互,且需要通过关键词搜索选择进行使用,比如 "),s("code",[t._v("斗图")]),t._v(" 插件,有界面展示,且需要再搜索框内搜索关键词选择后进行呼起才能使用。")],1),t._v(" "),s("li",[t._v("系统插件:可能不会有 UI 界面,在 "),s("code",[t._v("rubick")]),t._v(" 启动的时候,会注册执行系统插件。比如"),s("code",[t._v("超级面板")]),t._v(" 插件,安装完成后,即可在 "),s("code",[t._v("rubick")]),t._v(" 运行时随时使用,不需要任何关键词和匹配。")])]),t._v(" "),s("h2",{attrs:{id:"开发-ui-插件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#开发-ui-插件"}},[t._v("#")]),t._v(" 开发 UI 插件")]),t._v(" "),s("p",[t._v("一个最基础插件的目录是这样的:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("rubick-plugin-demo\n |-- index.html\n |-- package.json\n |-- preload.js\n")])])]),s("h3",{attrs:{id:"文件说明"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#文件说明"}},[t._v("#")]),t._v(" 文件说明")]),t._v(" "),s("h4",{attrs:{id:"package-json"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#package-json"}},[t._v("#")]),t._v(" package.json")]),t._v(" "),s("p",[t._v("用于指定插件最基础的配置,一个最基础的配置信息如下:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rubick-ui-plugin-demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pluginName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"插件demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rubick ui 插件demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"muwoo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"main"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index.html"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"logo"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://www.img/demo.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.0.1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"preload"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"preload.js"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"homePage"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://gitee.com/rubick-center/rubick-ui-plugin-demo/raw/master/README.md"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pluginType"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ui"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"features"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explain"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"测试插件"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cmds"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"测试"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("核心字段说明:")]),t._v(" "),s("ul",[s("li",[t._v("name: 插件 "),s("code",[t._v("npm")]),t._v(" 包名称,"),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("pluginName: 插件显示名称,用于展示给使用者 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("description: 插件描述,描述这个插件的作用 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("author: 插件作者")]),t._v(" "),s("li",[t._v("main: 入口文件,一般为 "),s("code",[t._v("index.html")])]),t._v(" "),s("li",[t._v("logo: 尺寸建议 200 * 200, 插件的 logo, 需要是 http/https 在线地址,不支持本地logo "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("version: 插件的版本 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("preload: 预加载脚本")]),t._v(" "),s("li",[t._v("homePage: 插件 readme raw 地址")]),t._v(" "),s("li",[t._v("pluginType: 插件类型,枚举:ui, system. 当前选 ui "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("features: 插件核心功能列表 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("features.code: 插件某个功能的识别码,可用于区分不同的功能 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("features.explain: 插件某个功能的解释 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("features.cmds: 输入框内搜索该 cmd 进入插件 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1)]),t._v(" "),s("h4",{attrs:{id:"index-html"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#index-html"}},[t._v("#")]),t._v(" index.html")]),t._v(" "),s("p",[t._v("插件的入口文件,用于展示插件的样式,一个最基础的 "),s("code",[t._v("html")]),t._v(" 结构可以是这样:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token doctype"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("html")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("body")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n hello Rubick\n "),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("button")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("showNotification"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("通知"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}},[s("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'showNotification'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEventListener")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'click'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n window"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("showNotification")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h4",{attrs:{id:"preload-js"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preload-js"}},[t._v("#")]),t._v(" preload.js")]),t._v(" "),s("p",[t._v("细心的同学可能已经注意到上面的 "),s("code",[t._v("index.html")]),t._v(" 使用了一个全局函数 "),s("code",[t._v("showNotification")]),t._v(" 那么这个函数是在哪里定义的呢?\n答案就是在 "),s("code",[t._v("preload.js")]),t._v(" 里面。"),s("code",[t._v("preload.js")]),t._v(" 可以为页面提供全局函数")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("window"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("showNotification")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n rubick"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("showNotification")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'HI, rubick'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("rubick 更多支持 API 能力参考:"),s("a",{attrs:{href:"https://github.com/rubickCenter/rubick/blob/master/static/preload.js#L49",target:"_blank",rel:"noopener noreferrer"}},[t._v("rubick 全局API"),s("OutboundLink")],1)]),t._v(" "),s("h3",{attrs:{id:"测试写好的插件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#测试写好的插件"}},[t._v("#")]),t._v(" 测试写好的插件")]),t._v(" "),s("p",[t._v("由于 "),s("code",[t._v("rubick")]),t._v(" 插件是基于 "),s("code",[t._v("npm")]),t._v(" 的管理方式,所以开发者调试插件,也是基于 "),s("code",[t._v("npm")]),t._v(" 的软连接的方式进行调试。\n首先需要再插件 "),s("code",[t._v("package.json")]),t._v(" 目录下执行:")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("link")]),t._v("\n")])])]),s("p",[t._v("然后将插件通过插件市场的 "),s("code",[t._v("开发者")]),t._v(" 菜单进行安装,填写插件的 "),s("code",[t._v("name")]),t._v(" 即可,如果插件需要调试,可以通过右上角 ... 来打开开发者工具进行调试,页面变更直接刷新即可:")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://pica.zhimg.com/80/v2-d7d6d5cba1151527aeff8e2c9b8cefb4_720w.gif",alt:""}})]),t._v(" "),s("p",[t._v("本小节所有代码:"),s("a",{attrs:{href:"https://gitee.com/rubick-center/rubick-ui-plugin-demo",target:"_blank",rel:"noopener noreferrer"}},[t._v("rubick-ui-plugin-demo"),s("OutboundLink")],1)]),t._v(" "),s("h2",{attrs:{id:"开发系统插件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#开发系统插件"}},[t._v("#")]),t._v(" 开发系统插件")]),t._v(" "),s("p",[t._v("一个最基础插件的目录是这样的:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("rubick-system-plugin-demo\n |-- package.json\n |-- index.js\n")])])]),s("h3",{attrs:{id:"文件说明-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#文件说明-2"}},[t._v("#")]),t._v(" 文件说明")]),t._v(" "),s("h4",{attrs:{id:"package-json-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#package-json-2"}},[t._v("#")]),t._v(" package.json")]),t._v(" "),s("p",[t._v("用于指定插件最基础的配置,一个最基础的配置信息如下:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rubick-system-plugin-demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pluginName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rubick 系统插件demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rubick 系统插件demo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"entry"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index.js"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"logo"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://xxxx/upload/202112/08/5bac90649c5343cabb63930b131cf8e6.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pluginType"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"muwoo"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"homepage"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("核心字段说明:")]),t._v(" "),s("ul",[s("li",[t._v("name: 插件 "),s("code",[t._v("npm")]),t._v(" 包名称,"),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("pluginName: 插件显示名称,用于展示给使用者 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("description: 插件描述,描述这个插件的作用 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("author: 插件作者")]),t._v(" "),s("li",[t._v("entry: 入口文件,一般为 "),s("code",[t._v("index.js")])]),t._v(" "),s("li",[t._v("logo: 尺寸建议 200 * 200, 插件的 logo, 需要是 http/https 在线地址,不支持本地logo "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("version: 插件的版本 "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1),t._v(" "),s("li",[t._v("homePage: 插件 readme raw 地址")]),t._v(" "),s("li",[t._v("pluginType: 插件类型,枚举:ui, system. 当前选 system "),s("Badge",{attrs:{type:"tip",text:"必填"}})],1)]),t._v(" "),s("h4",{attrs:{id:"index-js"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#index-js"}},[t._v("#")]),t._v(" index.js")]),t._v(" "),s("p",[t._v("插件的入口文件,用于 rubick 主进程进行加载执行:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("module"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("exports")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("onReady")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("ctx")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" Notification "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ctx"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Notification")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("title")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"测试系统插件"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"这是一个系统插件,在rubick运行时,立即被加载"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("show")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("code",[t._v("index.js")]),t._v(" 需要返回一个包含 "),s("code",[t._v("onReady")]),t._v(" 生命周期的函数,该函数接受 "),s("code",[t._v("ctx")]),t._v(" 对象作为参数,我们可以通过 "),s("code",[t._v("ctx")]),t._v(" 使用 "),s("code",[t._v("electron")]),t._v(" 主进程所有能力。\n同时也为 "),s("code",[t._v("ctx")]),t._v(" 上扩展挂在了 "),s("code",[t._v("mainWindow")]),t._v(" 对象。")]),t._v(" "),s("h4",{attrs:{id:"调试插件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#调试插件"}},[t._v("#")]),t._v(" 调试插件")]),t._v(" "),s("p",[t._v("由于 "),s("code",[t._v("rubick")]),t._v(" 插件是基于 "),s("code",[t._v("npm")]),t._v(" 的管理方式,所以开发者调试插件,也是基于 "),s("code",[t._v("npm")]),t._v(" 的软连接的方式进行调试。\n首先需要再插件 "),s("code",[t._v("package.json")]),t._v(" 目录下执行:")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("link")]),t._v("\n")])])]),s("p",[t._v("然后将插件通过插件市场的 "),s("code",[t._v("开发者")]),t._v(" 菜单进行安装,填写插件的 "),s("code",[t._v("name")]),t._v(" 即可。由于插件依赖于主进程启动执行,所以安装完成后需要重启 rubick 后才能生效。")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://pic3.zhimg.com/80/v2-e218500a0686a8735d80f417aa53b7aa_720w.gif",alt:""}})]),t._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),s("p",[t._v("系统插件目前无法直接通过 "),s("code",[t._v("devtools")]),t._v(" 进行调试,后面会进行优化")])]),t._v(" "),s("h2",{attrs:{id:"发布插件"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#发布插件"}},[t._v("#")]),t._v(" 发布插件")]),t._v(" "),s("p",[t._v("这里介绍完了如何开发插件,最后非常欢迎为 "),s("code",[t._v("rubick")]),t._v(" 贡献开源插件,发布插件也非常简单,首先需要把自己的插件发布到 "),s("code",[t._v("npm")]),t._v(" 仓库:")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" publish\n")])])]),s("p",[t._v("然后再给 "),s("a",{attrs:{href:"https://gitcode.net/rubickcenter/rubick-database/-/blob/master/plugins/total-plugins.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("rubick-database/plugins/total-plugins.json"),s("OutboundLink")],1),t._v(" 仓库提个 "),s("code",[t._v("pull request")]),t._v(", 把你的 "),s("code",[t._v("package.json")]),t._v(" 信息加入 "),s("code",[t._v("json")]),t._v(" 文件内,等我们 merge 了您的提交,插件将会自动上架。")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/app.802a86ab.js b/assets/js/app.802a86ab.js new file mode 100644 index 00000000..4392de27 --- /dev/null +++ b/assets/js/app.802a86ab.js @@ -0,0 +1,16 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],u=e[1],c=e[2],l=0,p=[];l
'};function o(t,e,n){return tn?n:t}function i(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=o(t,r.minimum,1),n.status=1===t?null:t;var u=n.render(!e),c=u.querySelector(r.barSelector),f=r.speed,l=r.easing;return u.offsetWidth,a((function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,function(t,e,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+i(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(t)+"%,0)"}:{"margin-left":i(t)+"%"}).transition="all "+e+"ms "+n,o}(t,f,l)),1===t?(s(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){s(u,{transition:"all "+f+"ms linear",opacity:0}),setTimeout((function(){n.remove(),e()}),f)}),f)):setTimeout(e,f)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout((function(){n.status&&(n.trickle(),t())}),r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*o(Math.random()*e,.1,.95)),e=o(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always((function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var o,a=e.querySelector(r.barSelector),u=t?"-100":i(n.status||0),f=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(o=e.querySelector(r.spinnerSelector))&&p(o),f!=document.body&&c(f,"nprogress-custom-parent"),f.appendChild(e),e},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&p(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()})),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,o=t.length,i=e.charAt(0).toUpperCase()+e.slice(1);o--;)if((r=t[o]+i)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,o,i=arguments;if(2==i.length)for(n in e)void 0!==(o=e[n])&&e.hasOwnProperty(n)&&r(t,n,o);else r(t,i[1],i[2])}}();function u(t,e){return("string"==typeof t?t:l(t)).indexOf(" "+e+" ")>=0}function c(t,e){var n=l(t),r=n+e;u(n,e)||(t.className=r.substring(1))}function f(t,e){var n,r=l(t);u(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function l(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function p(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=o)},function(t,e,n){var r=n(1),o=n(45).f,i=n(12),a=n(103),s=n(32),u=n(61),c=n(119);t.exports=function(t,e){var n,f,l,p,d,h=t.target,v=t.global,y=t.stat;if(n=v?r:y?r[h]||s(h,{}):(r[h]||{}).prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(d=o(n,f))&&d.value:n[f],!c(v?f:h+(y?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},function(t,e,n){var r=n(25),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(t,e,n){var r=n(2);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(46),o=n(47);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(1),o=n(0),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(0),o=n(99),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},function(t,e,n){var r=n(1),o=n(56),i=n(7),a=n(58),s=n(54),u=n(53),c=r.Symbol,f=o("wks"),l=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=s&&i(c,t)?c[t]:l("Symbol."+t)),f[t]}},function(t,e,n){var r=n(1),o=n(32),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(1),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(47),o=Object;t.exports=function(t){return o(r(t))}},function(t,e,n){var r=n(8),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},function(t,e,n){var r=n(116);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(143),o=n(10),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(9)(n(6),"Map");t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(163),o=n(170),i=n(172),a=n(173),s=n(174);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(4),o=n(43),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(a.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(11),o=n(10);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(5),o=n(24),i=n(95),a=n(26),s=n(27),u=n(49),c=n(7),f=n(59),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=u(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,n){var r=n(3),o=n(2),i=n(15),a=Object,s=r("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?s(t,""):a(t)}:a},function(t,e,n){var r=n(48),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){var r=n(96),o=n(51);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e){var n="object"==typeof document&&document.all,r=void 0===n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:r}},function(t,e,n){var r=n(28),o=n(0),i=n(52),a=n(53),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},function(t,e,n){var r=n(3);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r=n(54);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(55),o=n(2),i=n(1).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){var r,o,i=n(1),a=n(97),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,f=c&&c.v8;f&&(o=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(57),o=n(31);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.31.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,e){t.exports=!1},function(t,e,n){var r=n(3),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,n){var r=n(5),o=n(2),i=n(101);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e){t.exports={}},function(t,e,n){var r=n(7),o=n(110),i=n(45),a=n(16);t.exports=function(t,e,n){for(var s=o(e),u=a.f,c=i.f,f=0;ff))return!1;var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var h=-1,v=!0,y=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h-1&&t%1==0&&t]/;t.exports=function(t){var e,n=""+t,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a=e||n<0||y&&t-c>=i}function x(){var t=d();if(_(t))return w(t);s=setTimeout(x,function(t){var n=e-(t-u);return y?p(n,i-(t-c)):n}(t))}function w(t){return s=void 0,m&&r?g(t):(r=o=void 0,a)}function O(){var t=d(),n=_(t);if(r=arguments,o=this,u=t,n){if(void 0===s)return b(u);if(y)return s=setTimeout(x,e),g(u)}return void 0===s&&(s=setTimeout(x,e)),a}return e=v(e)||0,h(n)&&(f=!!n.leading,i=(y="maxWait"in n)?l(v(n.maxWait)||0,e):i,m="trailing"in n?!!n.trailing:m),O.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=o=s=void 0},O.flush=function(){return void 0===s?a:w(d())},O}},function(t,e,n){"use strict";var r=n(23),o=n(33),i=n(35),a=n(123),s=n(125);r({target:"Array",proto:!0,arity:1,forced:n(2)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=i(e),r=arguments.length;s(n+r);for(var u=0;u79&&a<83||!i("reduce")},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(24),o=n(8),i=n(51),a=n(98),s=n(100),u=n(30),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,u=a(t,f);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!o(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){var r=n(29),o=n(48);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,n){var r=n(24),o=n(0),i=n(8),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw a("Can't convert object to primitive value")}},function(t,e,n){var r=n(1),o=n(8),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(5),o=n(2);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){var r=n(0),o=n(16),i=n(104),a=n(32);t.exports=function(t,e,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(r(n)&&i(n,c,s),s.global)u?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},function(t,e,n){var r=n(3),o=n(2),i=n(0),a=n(7),s=n(5),u=n(105).CONFIGURABLE,c=n(106),f=n(107),l=f.enforce,p=f.get,d=String,h=Object.defineProperty,v=r("".slice),y=r("".replace),m=r([].join),g=s&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=t.exports=function(t,e,n){"Symbol("===v(d(e),0,7)&&(e="["+y(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&a(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return a(r,"source")||(r.source=m(b,"string"==typeof e?e:"")),t};Function.prototype.toString=_((function(){return i(this)&&p(this).source||c(this)}),"toString")},function(t,e,n){var r=n(5),o=n(7),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},function(t,e,n){var r=n(3),o=n(0),i=n(31),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,n){var r,o,i,a=n(108),s=n(1),u=n(8),c=n(12),f=n(7),l=n(31),p=n(109),d=n(60),h=s.TypeError,v=s.WeakMap;if(a||l.state){var y=l.state||(l.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,r=function(t,e){if(y.has(t))throw h("Object already initialized");return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var m=p("state");d[m]=!0,r=function(t,e){if(f(t,m))throw h("Object already initialized");return e.facade=t,c(t,m,e),e},o=function(t){return f(t,m)?t[m]:{}},i=function(t){return f(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(1),o=n(0),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},function(t,e,n){var r=n(56),o=n(58),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(28),o=n(3),i=n(111),a=n(118),s=n(34),u=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?u(e,n(t)):e}},function(t,e,n){var r=n(112),o=n(117).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(3),o=n(7),i=n(27),a=n(113).indexOf,s=n(60),u=r([].push);t.exports=function(t,e){var n,r=i(t),c=0,f=[];for(n in r)!o(s,n)&&o(r,n)&&u(f,n);for(;e.length>c;)o(r,n=e[c++])&&(~a(f,n)||u(f,n));return f}},function(t,e,n){var r=n(27),o=n(114),i=n(35),a=function(t){return function(e,n,a){var s,u=r(e),c=i(u),f=o(a,c);if(t&&n!=n){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(62),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},function(t,e,n){var r=n(62),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(2),o=n(0),i=/#|\.prototype\./,a=function(t,e){var n=u[s(t)];return n==f||n!=c&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},function(t,e,n){var r=n(29),o=n(33),i=n(46),a=n(35),s=TypeError,u=function(t){return function(e,n,u,c){r(n);var f=o(e),l=i(f),p=a(f),d=t?p-1:0,h=t?-1:1;if(u<2)for(;;){if(d in l){c=l[d],d+=h;break}if(d+=h,t?d<0:p<=d)throw s("Reduce of empty array with no initial value")}for(;t?d>=0:p>d;d+=h)d in l&&(c=n(c,l[d],d,f));return c}};t.exports={left:u(!1),right:u(!0)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){var r=n(15);t.exports="undefined"!=typeof process&&"process"==r(process)},function(t,e,n){"use strict";var r=n(5),o=n(124),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},function(t,e,n){var r=n(15);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e){var n=TypeError;t.exports=function(t){if(t>9007199254740991)throw n("Maximum allowed index exceeded");return t}},function(t,e,n){var r=n(23),o=n(1),i=n(127),a=n(128),s=o.WebAssembly,u=7!==Error("e",{cause:7}).cause,c=function(t,e){var n={};n[t]=a(t,e,u),r({global:!0,constructor:!0,arity:1,forced:u},n)},f=function(t,e){if(s&&s[t]){var n={};n[t]=a("WebAssembly."+t,e,u),r({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:u},n)}};c("Error",(function(t){return function(e){return i(t,this,arguments)}})),c("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),c("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),c("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),c("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),c("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),c("URIError",(function(t){return function(e){return i(t,this,arguments)}})),f("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),f("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),f("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},function(t,e,n){var r=n(25),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},function(t,e,n){"use strict";var r=n(28),o=n(7),i=n(12),a=n(52),s=n(63),u=n(61),c=n(131),f=n(132),l=n(133),p=n(137),d=n(138),h=n(5),v=n(57);t.exports=function(t,e,n,y){var m=y?2:1,g=t.split("."),b=g[g.length-1],_=r.apply(null,g);if(_){var x=_.prototype;if(!v&&o(x,"cause")&&delete x.cause,!n)return _;var w=r("Error"),O=e((function(t,e){var n=l(y?e:t,void 0),r=y?new _(t):new _;return void 0!==n&&i(r,"message",n),d(r,O,r.stack,2),this&&a(x,this)&&f(r,this,O),arguments.length>m&&p(r,arguments[m]),r}));if(O.prototype=x,"Error"!==b?s?s(O,w):u(O,w,{name:!0}):h&&"stackTraceLimit"in _&&(c(O,_,"stackTraceLimit"),c(O,_,"prepareStackTrace")),u(O,_),!v)try{x.name!==b&&i(x,"name",b),x.constructor=O}catch(t){}return O}}},function(t,e,n){var r=n(3),o=n(29);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},function(t,e,n){var r=n(0),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},function(t,e,n){var r=n(16).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},function(t,e,n){var r=n(0),o=n(8),i=n(63);t.exports=function(t,e,n){var a,s;return i&&r(a=e.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&i(t,s),t}},function(t,e,n){var r=n(134);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},function(t,e,n){var r=n(135),o=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},function(t,e,n){var r=n(136),o=n(0),i=n(15),a=n(30)("toStringTag"),s=Object,u="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:u?i(e):"Object"==(r=i(e))&&o(e.callee)?"Arguments":r}},function(t,e,n){var r={};r[n(30)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(8),o=n(12);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},function(t,e,n){var r=n(12),o=n(139),i=n(140),a=Error.captureStackTrace;t.exports=function(t,e,n,s){i&&(a?a(t,e):r(t,"stack",o(n,s)))}},function(t,e,n){var r=n(3),o=Error,i=r("".replace),a=String(o("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(a);t.exports=function(t,e){if(u&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,s,"");return t}},function(t,e,n){var r=n(2),o=n(26);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},function(t,e,n){var r=n(64),o=n(142);t.exports=function t(e,n,i,a,s){var u=-1,c=e.length;for(i||(i=o),s||(s=[]);++u0&&i(f)?n>1?t(f,n-1,i,a,s):r(s,f):a||(s[s.length]=f)}return s}},function(t,e,n){var r=n(13),o=n(36),i=n(4),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},function(t,e,n){var r=n(11),o=n(10);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e,n){var r=n(13),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(147),o=n(203),i=n(44),a=n(4),s=n(213);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(148),o=n(202),i=n(82);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(66),o=n(70);t.exports=function(t,e,n,i){var a=n.length,s=a,u=!i;if(null==t)return!s;for(t=Object(t);a--;){var c=n[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a-1}},function(t,e,n){var r=n(18);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(17);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(17),o=n(37),i=n(39);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(68),o=n(160),i=n(38),a=n(69),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,l=c.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:s).test(a(t))}},function(t,e,n){var r,o=n(161),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(6)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(164),o=n(17),i=n(37);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(165),o=n(166),i=n(167),a=n(168),s=n(169);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(72),o=n(225),i=n(230),a=n(73),s=n(231),u=n(40);t.exports=function(t,e,n){var c=-1,f=o,l=t.length,p=!0,d=[],h=d;if(n)p=!1,f=i;else if(l>=200){var v=e?null:s(t);if(v)return u(v);p=!1,f=a,h=new r}else h=e?[]:d;t:for(;++c-1}},function(t,e,n){var r=n(227),o=n(228),i=n(229);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},function(t,e){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i=0&&Math.floor(e)===e&&isFinite(t)}function v(t){return a(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function y(t){return null==t?"":Array.isArray(t)||p(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(r,1)}}var x=Object.prototype.hasOwnProperty;function w(t,e){return x.call(t,e)}function O(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var $=/-(\w)/g,k=O((function(t){return t.replace($,(function(t,e){return e?e.toUpperCase():""}))})),C=O((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),j=/\B([A-Z])/g,S=O((function(t){return t.replace(j,"-$1").toLowerCase()}));var E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function A(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function P(t,e){for(var n in e)t[n]=e[n];return t}function T(t){for(var e={},n=0;n0,Z=J&&J.indexOf("edge/")>0;J&&J.indexOf("android");var Q=J&&/iphone|ipad|ipod|ios/.test(J);J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J);var tt,et=J&&J.match(/firefox\/(\d+)/),nt={}.watch,rt=!1;if(G)try{var ot={};Object.defineProperty(ot,"passive",{get:function(){rt=!0}}),window.addEventListener("test-passive",null,ot)}catch(t){}var it=function(){return void 0===tt&&(tt=!G&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),tt},at=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return"function"==typeof t&&/native code/.test(t.toString())}var ut,ct="undefined"!=typeof Symbol&&st(Symbol)&&"undefined"!=typeof Reflect&&st(Reflect.ownKeys);ut="undefined"!=typeof Set&&st(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ft=null;function lt(t){void 0===t&&(t=null),t||ft&&ft._scope.off(),ft=t,t&&t._scope.on()}var pt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),dt=function(t){void 0===t&&(t="");var e=new pt;return e.text=t,e.isComment=!0,e};function ht(t){return new pt(void 0,void 0,void 0,String(t))}function vt(t){var e=new pt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var yt=0,mt=[],gt=function(){function t(){this._pending=!1,this.id=yt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,mt.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.filter((function(t){return t}));for(var n=0,r=e.length;n0&&(Jt((c=t(c,"".concat(n||"","_").concat(r)))[0])&&Jt(l)&&(p[f]=ht(l.text+c[0].text),c.shift()),p.push.apply(p,c)):u(c)?Jt(l)?p[f]=ht(l.text+c):""!==c&&p.push(ht(c)):Jt(c)&&Jt(l)?p[f]=ht(l.text+c.text):(s(e._isVList)&&a(c.tag)&&i(c.key)&&a(n)&&(c.key="__vlist".concat(n,"_").concat(r,"__")),p.push(c)));return p}(t):void 0}function Jt(t){return a(t)&&a(t.text)&&!1===t.isComment}function Xt(t,e){var n,r,i,s,u=null;if(o(t)||"string"==typeof t)for(u=new Array(t.length),n=0,r=t.length;n0,s=e?!!e.$stable:!a,u=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==r&&u===o.$key&&!a&&!o.$hasNormal)return o;for(var c in i={},e)e[c]&&"$"!==c[0]&&(i[c]=ve(t,n,c,e[c]))}else i={};for(var f in n)f in i||(i[f]=ye(n,f));return e&&Object.isExtensible(e)&&(e._normalized=i),H(i,"$stable",s),H(i,"$key",u),H(i,"$hasNormal",a),i}function ve(t,e,n,r){var i=function(){var e=ft;lt(t);var n=arguments.length?r.apply(null,arguments):r({}),i=(n=n&&"object"==typeof n&&!o(n)?[n]:Gt(n))&&n[0];return lt(e),n&&(!i||1===n.length&&i.isComment&&!de(i))?void 0:n};return r.proxy&&Object.defineProperty(e,n,{get:i,enumerable:!0,configurable:!0}),i}function ye(t,e){return function(){return t[e]}}function me(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};H(e,"_v_attr_proxy",!0),ge(e,t.$attrs,r,t,"$attrs")}return t._attrsProxy},get listeners(){t._listenersProxy||ge(t._listenersProxy={},t.$listeners,r,t,"$listeners");return t._listenersProxy},get slots(){return function(t){t._slotsProxy||_e(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(t)},emit:E(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(n){return Ut(t,e,n)}))}}}function ge(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,be(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function be(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function _e(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var xe=null;function we(t,e){return(t.__esModule||ct&&"Module"===t[Symbol.toStringTag])&&(t=t.default),f(t)?e.extend(t):t}function Oe(t){if(o(t))for(var e=0;edocument.createEvent("Event").timeStamp&&(un=function(){return cn.now()})}var fn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function ln(){var t,e;for(sn=un(),on=!0,tn.sort(fn),an=0;anan&&tn[n].id>t.id;)n--;tn.splice(n+1,0,t)}else tn.push(t);rn||(rn=!0,Ne(ln))}}function dn(t,e){if(t){for(var n=Object.create(null),r=ct?Reflect.ownKeys(t):Object.keys(t),o=0;o-1)if(i&&!w(o,"default"))a=!1;else if(""===a||a===S(t)){var u=Mn(String,o.type);(u<0||s-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function Xn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Yn(n,i,r,o)}}}function Yn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,_(n,e)}Wn.prototype._init=function(t){var e=this;e._uid=qn++,e._isVue=!0,e.__v_skip=!0,e._scope=new zt(!0),e._scope._vm=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=En(Hn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ge(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=le(e._renderChildren,o),t.$scopedSlots=n?he(t.$parent,n.data.scopedSlots,t.$slots):r,t._c=function(e,n,r,o){return $e(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return $e(t,e,n,r,o,!0)};var i=n&&n.data;Pt(t,"$attrs",i&&i.attrs||r,null,!0),Pt(t,"$listeners",e._parentListeners||r,null,!0)}(e),Qe(e,"beforeCreate",void 0,!1),function(t){var e=dn(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach((function(n){Pt(t,n,e[n])})),jt(!0))}(e),Nn(e),function(t){var e=t.$options.provide;if(e){var n=c(e)?e.call(t):e;if(!f(n))return;for(var r=Bt(t),o=ct?Reflect.ownKeys(n):Object.keys(n),i=0;i1?A(n):n;for(var r=A(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&Yn(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Yn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Xn(t,(function(t){return Jn(e,t)}))})),this.$watch("exclude",(function(e){Xn(t,(function(t){return!Jn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Oe(t),n=e&&e.componentOptions;if(n){var r=Gn(n),o=this.include,i=this.exclude;if(o&&(!r||!Jn(o,r))||i&&r&&Jn(i,r))return e;var a=this.cache,s=this.keys,u=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[u]?(e.componentInstance=a[u].componentInstance,_(s,u),s.push(u)):(this.vnodeToCache=e,this.keyToCache=u),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:wn,extend:P,mergeOptions:En,defineReactive:Pt},t.set=Tt,t.delete=Rt,t.nextTick=Ne,t.observable=function(t){return At(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,P(t.options.components,Qn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=A(arguments,1);return n.unshift(this),c(t.install)?t.install.apply(t,n):c(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=En(this.options,t),this}}(t),Kn(t),function(t){F.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&p(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&c(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Wn),Object.defineProperty(Wn.prototype,"$isServer",{get:it}),Object.defineProperty(Wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Wn,"FunctionalRenderContext",{value:hn}),Wn.version="2.7.14";var tr=g("style,class"),er=g("input,textarea,option,select,progress"),nr=g("contenteditable,draggable,spellcheck"),rr=g("events,caret,typing,plaintext-only"),or=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),ir="http://www.w3.org/1999/xlink",ar=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},sr=function(t){return ar(t)?t.slice(6,t.length):""},ur=function(t){return null==t||!1===t};function cr(t){for(var e=t.data,n=t,r=t;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=fr(r.data,e));for(;a(n=n.parent);)n&&n.data&&(e=fr(e,n.data));return function(t,e){if(a(t)||a(e))return lr(t,pr(e));return""}(e.staticClass,e.class)}function fr(t,e){return{staticClass:lr(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function lr(t,e){return t?e?t+" "+e:t:e||""}function pr(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?Ir(t,e,n):or(e)?ur(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):nr(e)?t.setAttribute(e,function(t,e){return ur(e)||"false"===e?"false":"contenteditable"===t&&rr(e)?e:"true"}(e,n)):ar(e)?ur(n)?t.removeAttributeNS(ir,sr(e)):t.setAttributeNS(ir,e,n):Ir(t,e,n)}function Ir(t,e,n){if(ur(n))t.removeAttribute(e);else{if(X&&!Y&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Dr={create:Lr,update:Lr};function Nr(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=cr(e),u=n._transitionClasses;a(u)&&(s=lr(s,pr(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Ur,Fr={create:Nr,update:Nr};function zr(t,e,n){var r=Ur;return function o(){var i=e.apply(null,arguments);null!==i&&qr(t,o,n,r)}}var Br=Ae&&!(et&&Number(et[1])<=53);function Vr(t,e,n,r){if(Br){var o=sn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Ur.addEventListener(t,e,rt?{capture:n,passive:r}:n)}function qr(t,e,n,r){(r||Ur).removeEventListener(t,e._wrapper||e,n)}function Hr(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Ur=e.elm||t.elm,function(t){if(a(t.__r)){var e=X?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}a(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),Ht(n,r,Vr,qr,zr,e.context),Ur=void 0}}var Wr,Kr={create:Hr,update:Hr,destroy:function(t){return Hr(t,Or)}};function Gr(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,u=t.data.domProps||{},c=e.data.domProps||{};for(n in(a(c.__ob__)||s(c._v_attr_proxy))&&(c=e.data.domProps=P({},c)),u)n in c||(o[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===u[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var f=i(r)?"":String(r);Jr(o,f)&&(o.value=f)}else if("innerHTML"===n&&vr(o.tagName)&&i(o.innerHTML)){(Wr=Wr||document.createElement("div")).innerHTML="".concat(r,"");for(var l=Wr.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}else if(r!==u[n])try{o[n]=r}catch(t){}}}}function Jr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return m(n)!==m(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Xr={create:Gr,update:Gr},Yr=O((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Zr(t){var e=Qr(t.style);return t.staticStyle?P(t.staticStyle,e):e}function Qr(t){return Array.isArray(t)?T(t):"string"==typeof t?Yr(t):t}var to,eo=/^--/,no=/\s*!important$/,ro=function(t,e,n){if(eo.test(e))t.style.setProperty(e,n);else if(no.test(n))t.style.setProperty(S(e),n.replace(no,""),"important");else{var r=io(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(uo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function fo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(uo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function lo(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&P(e,po(t.name||"v")),P(e,t),e}return"string"==typeof t?po(t):void 0}}var po=O((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),ho=G&&!Y,vo="transition",yo="transitionend",mo="animation",go="animationend";ho&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(vo="WebkitTransition",yo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(mo="WebkitAnimation",go="webkitAnimationEnd"));var bo=G?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function _o(t){bo((function(){bo(t)}))}function xo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),co(t,e))}function wo(t,e){t._transitionClasses&&_(t._transitionClasses,e),fo(t,e)}function Oo(t,e,n){var r=ko(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?yo:go,u=0,c=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++u>=a&&c()};setTimeout((function(){u0&&(n="transition",f=a,l=i.length):"animation"===e?c>0&&(n="animation",f=c,l=u.length):l=(n=(f=Math.max(a,c))>0?a>c?"transition":"animation":null)?"transition"===n?i.length:u.length:0,{type:n,timeout:f,propCount:l,hasTransform:"transition"===n&&$o.test(r[vo+"Property"])}}function Co(t,e){for(;t.length1}function To(t,e){!0!==e.data.show&&So(e)}var Ro=function(t){var e,n,r={},c=t.modules,f=t.nodeOps;for(e=0;e<$r.length;++e)for(r[$r[e]]=[],n=0;nh?_(t,i(n[m+1])?null:n[m+1].elm,n,d,m,r):d>m&&w(e,l,h)}(l,v,m,n,c):a(m)?(a(t.text)&&f.setTextContent(l,""),_(l,null,m,0,m.length-1,n)):a(v)?w(v,0,v.length-1):a(t.text)&&f.setTextContent(l,""):t.text!==e.text&&f.setTextContent(l,e.text),a(h)&&a(d=h.hook)&&a(d=d.postpatch)&&d(t,e)}}}function C(t,e,n){if(s(n)&&a(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(I(No(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Do(t,e){return e.every((function(e){return!I(e,t)}))}function No(t){return"_value"in t?t._value:t.value}function Uo(t){t.target.composing=!0}function Fo(t){t.target.composing&&(t.target.composing=!1,zo(t.target,"input"))}function zo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Bo(t){return!t.componentInstance||t.data&&t.data.transition?t:Bo(t.componentInstance._vnode)}var Vo={model:Lo,show:{bind:function(t,e,n){var r=e.value,o=(n=Bo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,So(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Bo(n)).data&&n.data.transition?(n.data.show=!0,r?So(n,(function(){t.style.display=t.__vOriginalDisplay})):Eo(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},qo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ho(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ho(Oe(e.children)):t}function Wo(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[k(r)]=o[r];return e}function Ko(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Go=function(t){return t.tag||de(t)},Jo=function(t){return"show"===t.name},Xo={name:"transition",props:qo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Go)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=Ho(o);if(!i)return o;if(this._leaving)return Ko(t,o);var a="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?a+"comment":a+i.tag:u(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Wo(this),c=this._vnode,f=Ho(c);if(i.data.directives&&i.data.directives.some(Jo)&&(i.data.show=!0),f&&f.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,f)&&!de(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=P({},s);if("out-in"===r)return this._leaving=!0,Wt(l,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Ko(t,o);if("in-out"===r){if(de(i))return c;var p,d=function(){p()};Wt(s,"afterEnter",d),Wt(s,"enterCancelled",d),Wt(l,"delayLeave",(function(t){p=t}))}}return o}}},Yo=P({tag:String,moveClass:String},qo);function Zo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Qo(t){t.data.newPos=t.elm.getBoundingClientRect()}function ti(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}delete Yo.mode;var ei={Transition:Xo,TransitionGroup:{props:Yo,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Xe(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Wo(this),s=0;s-1?mr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:mr[t]=/HTMLUnknownElement/.test(e.toString())},P(Wn.options.directives,Vo),P(Wn.options.components,ei),Wn.prototype.__patch__=G?Ro:R,Wn.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=dt),Qe(t,"beforeMount"),r=function(){t._update(t._render(),n)},new qe(t,r,R,{before:function(){t._isMounted&&!t._isDestroyed&&Qe(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(o.path||""),c=e&&e.path||"/",f=u.path?wi(u.path,c,n||o.append):c,l=function(t,e,n){void 0===e&&(e={});var r,o=n||ci;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(ui):ui(a)}return r}(u.query,o.query,r&&r.options.parseQuery),p=o.hash||u.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:f,query:l,hash:p}}var Vi,qi=function(){},Hi={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,s=o.href,u={},c=n.options.linkActiveClass,f=n.options.linkExactActiveClass,l=null==c?"router-link-active":c,p=null==f?"router-link-exact-active":f,d=null==this.activeClass?l:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,v=a.redirectedFrom?pi(null,Bi(a.redirectedFrom),null,n):a;u[h]=mi(r,v,this.exactPath),u[d]=this.exact||this.exactPath?u[h]:function(t,e){return 0===t.path.replace(li,"/").indexOf(e.path.replace(li,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,v);var y=u[h]?this.ariaCurrentValue:null,m=function(t){Wi(t)&&(e.replace?n.replace(i,qi):n.push(i,qi))},g={click:Wi};Array.isArray(this.event)?this.event.forEach((function(t){g[t]=m})):g[this.event]=m;var b={class:u},_=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:a,navigate:m,isActive:u[d],isExactActive:u[h]});if(_){if(1===_.length)return _[0];if(_.length>1||!_.length)return 0===_.length?t():t("span",{},_)}if("a"===this.tag)b.on=g,b.attrs={href:s,"aria-current":y};else{var x=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=zi(f.path,s.params),u(f,s,a)}if(s.path){s.params={};for(var d=0;d-1}function Oa(t,e){return wa(t)&&t._isRouter&&(null==e||t.type===e)}function $a(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function ka(t){return function(e,n,r){var o=!1,i=0,a=null;Ca(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var u,c=Ea((function(e){var o;((o=e).__esModule||Sa&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:Vi.extend(e),n.components[s]=e,--i<=0&&r()})),f=Ea((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=wa(t)?t:new Error(e),r(a))}));try{u=t(c,f)}catch(t){f(t)}if(u)if("function"==typeof u.then)u.then(c,f);else{var l=u.component;l&&"function"==typeof l.then&&l.then(c,f)}}})),o||r()}}function Ca(t,e){return ja(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function ja(t){return Array.prototype.concat.apply([],t)}var Sa="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Ea(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Aa=function(t,e){this.router=t,this.base=function(t){if(!t)if(Ki){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=hi,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Pa(t,e,n,r){var o=Ca(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=Vi.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return ja(r?o.reverse():o)}function Ta(t,e){if(e)return function(){return t.apply(e,arguments)}}Aa.prototype.listen=function(t){this.cb=t},Aa.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Aa.prototype.onError=function(t){this.errorCbs.push(t)},Aa.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&(Oa(t,ma.redirected)&&i===hi||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Aa.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!Oa(t)&&wa(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},u=t.matched.length-1,c=o.matched.length-1;if(mi(t,o)&&u===c&&t.matched[u]===o.matched[c])return this.ensureURL(),t.hash&&ia(this.router,o,t,!1),s(((a=_a(i=o,t,ma.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var f=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=ha&&n;r&&this.listeners.push(oa());var o=function(){var n=t.current,o=La(t.base);t.current===hi&&o===t._startLocation||t.transitionTo(o,(function(t){r&&ia(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){va(Oi(r.base+t.fullPath)),ia(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){ya(Oi(r.base+t.fullPath)),ia(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(La(this.base)!==this.current.fullPath){var e=Oi(this.base+this.current.fullPath);t?va(e):ya(e)}},e.prototype.getCurrentLocation=function(){return La(this.base)},e}(Aa);function La(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(Oi(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Ma=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=La(t);if(!/^\/#/.test(e))return window.location.replace(Oi(t+"/#"+e)),!0}(this.base)||Ia()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=ha&&e;n&&this.listeners.push(oa());var r=function(){var e=t.current;Ia()&&t.transitionTo(Da(),(function(r){n&&ia(t.router,r,e,!0),ha||Fa(r.fullPath)}))},o=ha?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ua(t.fullPath),ia(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Fa(t.fullPath),ia(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Da()!==e&&(t?Ua(e):Fa(e))},e.prototype.getCurrentLocation=function(){return Da()},e}(Aa);function Ia(){var t=Da();return"/"===t.charAt(0)||(Fa("/"+t),!1)}function Da(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Na(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Ua(t){ha?va(Na(t)):window.location.hash=t}function Fa(t){ha?ya(Na(t)):window.location.replace(Na(t))}var za=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Oa(t,ma.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Aa),Ba=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Xi(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!ha&&!1!==t.fallback,this.fallback&&(e="hash"),Ki||(e="abstract"),this.mode=e,e){case"history":this.history=new Ra(this,t.base);break;case"hash":this.history=new Ma(this,t.base,this.fallback);break;case"abstract":this.history=new za(this,t.base);break;default:0}},Va={currentRoute:{configurable:!0}};Ba.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Va.currentRoute.get=function(){return this.history&&this.history.current},Ba.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Ra||n instanceof Ma){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;ha&&o&&"fullPath"in t&&ia(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ba.prototype.beforeEach=function(t){return Ha(this.beforeHooks,t)},Ba.prototype.beforeResolve=function(t){return Ha(this.resolveHooks,t)},Ba.prototype.afterEach=function(t){return Ha(this.afterHooks,t)},Ba.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ba.prototype.onError=function(t){this.history.onError(t)},Ba.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ba.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ba.prototype.go=function(t){this.history.go(t)},Ba.prototype.back=function(){this.go(-1)},Ba.prototype.forward=function(){this.go(1)},Ba.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ba.prototype.resolve=function(t,e,n){var r=Bi(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?Oi(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},Ba.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ba.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==hi&&this.history.transitionTo(this.history.getCurrentLocation())},Ba.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==hi&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ba.prototype,Va);var qa=Ba;function Ha(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ba.install=function t(e){if(!t.installed||Vi!==e){t.installed=!0,Vi=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",_i),e.component("RouterLink",Hi);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ba.version="3.6.5",Ba.isNavigationFailure=Oa,Ba.NavigationFailureType=ma,Ba.START_LOCATION=hi,Ki&&window.Vue&&window.Vue.use(Ba);n(94);n(90),n(126);var Wa={NotFound:()=>n.e(6).then(n.bind(null,277)),Layout:()=>Promise.all([n.e(0),n.e(2)]).then(n.bind(null,276))},Ka={"v-576a7f8a":()=>n.e(7).then(n.bind(null,280)),"v-2b5e6918":()=>n.e(8).then(n.bind(null,281)),"v-3523617e":()=>n.e(9).then(n.bind(null,282)),"v-19996edc":()=>n.e(11).then(n.bind(null,283)),"v-3e8722b2":()=>n.e(12).then(n.bind(null,284)),"v-85756420":()=>n.e(10).then(n.bind(null,285))};function Ga(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const Ja=/-(\w)/g,Xa=Ga(t=>t.replace(Ja,(t,e)=>e?e.toUpperCase():"")),Ya=/\B([A-Z])/g,Za=Ga(t=>t.replace(Ya,"-$1").toLowerCase()),Qa=Ga(t=>t.charAt(0).toUpperCase()+t.slice(1));function ts(t,e){if(!e)return;if(t(e))return t(e);return e.includes("-")?t(Qa(Xa(e))):t(Qa(e))||t(Za(e))}const es=Object.assign({},Wa,Ka),ns=t=>es[t],rs=t=>Ka[t],os=t=>Wa[t],is=t=>Wn.component(t);function as(t){return ts(rs,t)}function ss(t){return ts(os,t)}function us(t){return ts(ns,t)}function cs(t){return ts(is,t)}function fs(...t){return Promise.all(t.filter(t=>t).map(async t=>{if(!cs(t)&&us(t)){const e=await us(t)();Wn.component(t,e.default)}}))}function ls(t,e){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[t]=e)}var ps=n(87),ds=n.n(ps),hs=n(88),vs=n.n(hs),ys={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${vs()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=gs(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=bs(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return ds()([{name:"description",content:this.$description}],t,this.siteMeta,_s)},updateCanonicalLink(){ms(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",gs(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){bs(null,this.currentMetaTags),ms()}};function ms(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function gs(t=""){return t?``:""}function bs(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function _s(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var xs=n(89),ws={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(xs)()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},Os=n(22),$s=n.n(Os),ks=[ys,ws,{mounted(){$s.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||Wn.component(t.name)||$s.a.start(),n()}),this.$router.afterEach(()=>{$s.a.done(),this.isSidebarOpen=!1})}}],Cs={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return ls("layout",t),Wn.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},js=n(14),Ss=Object(js.a)(Cs,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(t,e,n){switch(e){case"components":t[e]||(t[e]={}),Object.assign(t[e],n);break;case"mixins":t[e]||(t[e]=[]),t[e].push(...n);break;default:throw new Error("Unknown option name.")}}(Ss,"mixins",ks);const Es=[{name:"v-576a7f8a",path:"/",component:Ss,beforeEnter:(t,e,n)=>{fs("Layout","v-576a7f8a").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-2b5e6918",path:"/api/",component:Ss,beforeEnter:(t,e,n)=>{fs("Layout","v-2b5e6918").then(n)}},{path:"/api/index.html",redirect:"/api/"},{name:"v-3523617e",path:"/dev/",component:Ss,beforeEnter:(t,e,n)=>{fs("Layout","v-3523617e").then(n)}},{path:"/dev/index.html",redirect:"/dev/"},{name:"v-19996edc",path:"/run/",component:Ss,beforeEnter:(t,e,n)=>{fs("Layout","v-19996edc").then(n)}},{path:"/run/index.html",redirect:"/run/"},{name:"v-3e8722b2",path:"/super/",component:Ss,beforeEnter:(t,e,n)=>{fs("Layout","v-3e8722b2").then(n)}},{path:"/super/index.html",redirect:"/super/"},{name:"v-85756420",path:"/guide/",component:Ss,beforeEnter:(t,e,n)=>{fs("Layout","v-85756420").then(n)}},{path:"/guide/index.html",redirect:"/guide/"},{path:"*",component:Ss}],As={title:"Rubick",description:"你的开源桌面插件应用",base:"/rubick/",headTags:[],pages:[{title:"Home",frontmatter:{home:!0,heroImage:"/images/logo.png",heroText:"Rubick",tagline:"基于 Electron 开源的插件化工具箱",actionText:"快速上手 →",actionLink:"/guide/",features:[{title:"极其轻量",details:"rubick 仅仅包含插件运行所需要的API,本身不内置任何插件,可以看成是 electron 的二次封装框架。"},{title:"更强大的插件能力",details:"不仅仅支持ui插件(需要搜索呼起使用),还支持系统插件(不需要搜索,只要rubick在运行,系统插件即可用)"},{title:"更便捷的插件管理",details:"rubick 插件全部托管在 npm 仓库,rubick 插件的安装、使用、删除就是 npm 包的安装、使用、删除"}],footer:"MIT Licensed | Copyright (c) 2021 muwoo"},regularPath:"/",relativePath:"README.md",key:"v-576a7f8a",path:"/"},{title:"事件",frontmatter:{},regularPath:"/api/",relativePath:"api/README.md",key:"v-2b5e6918",path:"/api/",headers:[{level:2,title:"事件",slug:"事件"},{level:3,title:"onPluginReady(callback)、onPluginEnter(callback)",slug:"onpluginready-callback-、onpluginenter-callback"},{level:3,title:"onPluginOut(callback)",slug:"onpluginout-callback"},{level:2,title:"窗口交互",slug:"窗口交互"},{level:3,title:"hideMainWindow()",slug:"hidemainwindow"},{level:3,title:"showMainWindow()",slug:"showmainwindow"},{level:3,title:"setExpendHeight(height)",slug:"setexpendheight-height"},{level:3,title:"setSubInput(onChange, placeholder)",slug:"setsubinput-onchange-placeholder"},{level:3,title:"setSubInputValue(value)",slug:"setsubinputvalue-value"},{level:2,title:"系统",slug:"系统"},{level:3,title:"showNotification(body)",slug:"shownotification-body"},{level:3,title:"shellOpenPath(fullPath)",slug:"shellopenpath-fullpath"},{level:3,title:"shellOpenExternal(url)",slug:"shellopenexternal-url"},{level:3,title:"getPath(name)",slug:"getpath-name"},{level:2,title:"本地数据库",slug:"本地数据库"},{level:3,title:"rubick.db.put(doc)",slug:"rubick-db-put-doc"},{level:3,title:"rubick.db.get(id)",slug:"rubick-db-get-id"},{level:3,title:"rubick.db.remove(doc)",slug:"rubick-db-remove-doc"},{level:3,title:"rubick.db.bulkDocs(docs)",slug:"rubick-db-bulkdocs-docs"},{level:3,title:"rubick.db.allDocs(key)",slug:"rubick-db-alldocs-key"}]},{title:"插件说明",frontmatter:{},regularPath:"/dev/",relativePath:"dev/README.md",key:"v-3523617e",path:"/dev/",headers:[{level:2,title:"插件说明",slug:"插件说明"},{level:2,title:"开发 UI 插件",slug:"开发-ui-插件"},{level:3,title:"文件说明",slug:"文件说明"},{level:3,title:"测试写好的插件",slug:"测试写好的插件"},{level:2,title:"开发系统插件",slug:"开发系统插件"},{level:3,title:"文件说明",slug:"文件说明-2"},{level:2,title:"发布插件",slug:"发布插件"}]},{title:"赞助",frontmatter:{},regularPath:"/run/",relativePath:"run/README.md",key:"v-19996edc",path:"/run/",headers:[{level:2,title:"赞助",slug:"赞助"},{level:2,title:"贡献代码",slug:"贡献代码"},{level:3,title:"rubick 目录介绍",slug:"rubick-目录介绍"},{level:3,title:"启动",slug:"启动"},{level:3,title:"编译",slug:"编译"},{level:3,title:"PR",slug:"pr"}]},{title:"特殊服务",frontmatter:{},regularPath:"/super/",relativePath:"super/README.md",key:"v-3e8722b2",path:"/super/",headers:[{level:2,title:"说明",slug:"说明"},{level:2,title:"可以提供哪些服务?",slug:"可以提供哪些服务"},{level:2,title:"如何加入特殊服务?",slug:"如何加入特殊服务"}]},{title:"赞助",frontmatter:{},regularPath:"/guide/",relativePath:"guide/README.md",key:"v-85756420",path:"/guide/",headers:[{level:2,title:"赞助",slug:"赞助"},{level:2,title:"前言",slug:"前言"},{level:2,title:"下载 rubick",slug:"下载-rubick"},{level:2,title:"功能说明",slug:"功能说明"},{level:3,title:"1. 搜索系统应用",slug:"_1-搜索系统应用"},{level:3,title:"2. UI类插件安装",slug:"_2-ui类插件安装"},{level:3,title:"3. 系统类插件安装",slug:"_3-系统类插件安装"},{level:3,title:"4. 输入框聚焦自动根据剪切板内容匹配插件",slug:"_4-输入框聚焦自动根据剪切板内容匹配插件"},{level:3,title:"内网部署",slug:"内网部署"},{level:3,title:"更多功能",slug:"更多功能"}]}],themeConfig:{themeColor:{blue:"#2196f3",red:"#2196f3",green:"#2196f3",orange:"#2196f3"},logo:"/images/logo.png",nav:[{text:"使用文档",link:"/guide/"},{text:"开发者",link:"/dev/"}],sidebar:[{title:"使用文档",path:"/guide/",sidebarDepth:1},{title:"插件开发",path:"/dev/"},{title:"特殊服务",path:"/super/"},{title:"API",path:"/api/"},{title:"贡献 rubick",path:"/run/"}],repo:"https://github.com/rubickCenter/rubick",repoLabel:"Github",editLinks:!0,editLinkText:"帮助我们改善此页面!"}};n(234);Wn.component("Badge",()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,286))),Wn.component("CodeGroup",()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,278))),Wn.component("CodeBlock",()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,279)));n(235);var Ps=[{},({Vue:t})=>{t.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{}],Ts=[];class Rs extends class{constructor(){this.store=new Wn({data:{state:{}}})}$get(t){return this.store.state[t]}$set(t,e){Wn.set(this.store.state,t,e)}$emit(...t){this.store.$emit(...t)}$on(...t){this.store.$on(...t)}}{}Object.assign(Rs.prototype,{getPageAsyncComponent:as,getLayoutAsyncComponent:ss,getAsyncComponent:us,getVueComponent:cs});var Ls={install(t){const e=new Rs;t.$vuepress=e,t.prototype.$vuepress=e}};function Ms(t,e){const n=e.toLowerCase();return t.options.routes.some(t=>t.path.toLowerCase()===n)}var Is={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(t){const e=this.pageKey||this.$parent.$page.key;return ls("pageKey",e),Wn.component(e)||Wn.component(e,as(e)),Wn.component(e)?t(e):t("")}},Ds={functional:!0,props:{slotKey:String,required:!0},render:(t,{props:e,slots:n})=>t("div",{class:["content__"+e.slotKey]},n()[e.slotKey])},Ns={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},Us=(n(236),n(237),Object(js.a)(Ns,(function(){var t=this._self._c;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),Fs={functional:!0,render(t,{parent:e,children:n}){if(e._isMounted)return n;e.$once("hook:mounted",()=>{e.$forceUpdate()})}};Wn.config.productionTip=!1,Wn.use(qa),Wn.use(Ls),Wn.mixin(function(t,e,n=Wn){!function(t){t.locales&&Object.keys(t.locales).forEach(e=>{t.locales[e].path=e});Object.freeze(t)}(e),n.$vuepress.$set("siteData",e);const r=new(t(n.$vuepress.$get("siteData"))),o=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(r)),i={};return Object.keys(o).reduce((t,e)=>(e.startsWith("$")&&(t[e]=o[e].get),t),i),{computed:i}}(t=>class{setPage(t){this.__page=t}get $site(){return t}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:t={}}=this.$site;let e,n;for(const r in t)"/"===r?n=t[r]:0===this.$page.path.indexOf(r)&&(e=t[r]);return e||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:t}=this.$page.frontmatter;return"string"==typeof t&&t}get $title(){const t=this.$page,{metaTitle:e}=this.$page.frontmatter;if("string"==typeof e)return e;const n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const t=function(t){if(t){const e=t.filter(t=>"description"===t.name)[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(t,e){for(let n=0;nn||(t.hash?!Wn.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(t.hash)}:{x:0,y:0})});!function(t){t.beforeEach((e,n,r)=>{if(Ms(t,e.path))r();else if(/(\/|\.html)$/.test(e.path))if(/\/$/.test(e.path)){const n=e.path.replace(/\/$/,"")+".html";Ms(t,n)?r(n):r()}else r();else{const n=e.path+"/",o=e.path+".html";Ms(t,o)?r(o):Ms(t,n)?r(n):r()}})}(n);const r={};try{await Promise.all(Ps.filter(t=>"function"==typeof t).map(e=>e({Vue:Wn,options:r,router:n,siteData:As,isServer:t})))}catch(t){console.error(t)}return{app:new Wn(Object.assign(r,{router:n,render:t=>t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},Ts.map(e=>t(e)))])})),router:n}}(!1).then(({app:t,router:e})=>{e.onReady(()=>{t.$mount("#app")})})}]); \ No newline at end of file diff --git a/dev/index.html b/dev/index.html new file mode 100644 index 00000000..eb7e8e3d --- /dev/null +++ b/dev/index.html @@ -0,0 +1,111 @@ + + + + + + 插件说明 | Rubick + + + + + + + + +

# 插件说明

rubick 插件分为 UI插件系统插件 2类。下面分别介绍这 2 类插件的区别和作用。

  1. UI 插件 最常用:都会有 UI 界面,用于和用户交互,且需要通过关键词搜索选择进行使用,比如 斗图 插件,有界面展示,且需要再搜索框内搜索关键词选择后进行呼起才能使用。
  2. 系统插件:可能不会有 UI 界面,在 rubick 启动的时候,会注册执行系统插件。比如超级面板 插件,安装完成后,即可在 rubick 运行时随时使用,不需要任何关键词和匹配。

# 开发 UI 插件

一个最基础插件的目录是这样的:

rubick-plugin-demo
+  |-- index.html
+  |-- package.json
+  |-- preload.js
+

# 文件说明

# package.json

用于指定插件最基础的配置,一个最基础的配置信息如下:

{
+  "name": "rubick-ui-plugin-demo",
+  "pluginName": "插件demo",
+  "description": "rubick ui 插件demo",
+  "author": "muwoo",
+  "main": "index.html",
+  "logo": "https://www.img/demo.png",
+  "version": "0.0.1",
+  "preload":"preload.js",
+  "homePage": "https://gitee.com/rubick-center/rubick-ui-plugin-demo/raw/master/README.md",
+  "pluginType": "ui",
+  "features": [
+    {
+      "code": "index",
+      "explain": "测试插件",
+      "cmds":[
+        "demo",
+        "测试"
+      ]
+    }
+  ]
+}
+

核心字段说明:

  • name: 插件 npm 包名称,必填
  • pluginName: 插件显示名称,用于展示给使用者 必填
  • description: 插件描述,描述这个插件的作用 必填
  • author: 插件作者
  • main: 入口文件,一般为 index.html
  • logo: 尺寸建议 200 * 200, 插件的 logo, 需要是 http/https 在线地址,不支持本地logo 必填
  • version: 插件的版本 必填
  • preload: 预加载脚本
  • homePage: 插件 readme raw 地址
  • pluginType: 插件类型,枚举:ui, system. 当前选 ui 必填
  • features: 插件核心功能列表 必填
  • features.code: 插件某个功能的识别码,可用于区分不同的功能 必填
  • features.explain: 插件某个功能的解释 必填
  • features.cmds: 输入框内搜索该 cmd 进入插件 必填

# index.html

插件的入口文件,用于展示插件的样式,一个最基础的 html 结构可以是这样:

<!DOCTYPE html>
+<html>
+<body>
+  hello Rubick
+  <button id="showNotification">通知</button>
+</body>
+<script>
+  document.getElementById('showNotification').addEventListener('click', () => {
+    window.showNotification();
+  })
+</script>
+</html>
+

# preload.js

细心的同学可能已经注意到上面的 index.html 使用了一个全局函数 showNotification 那么这个函数是在哪里定义的呢? +答案就是在 preload.js 里面。preload.js 可以为页面提供全局函数

window.showNotification = function () {
+  rubick.showNotification('HI, rubick')
+}
+

rubick 更多支持 API 能力参考:rubick 全局API (opens new window)

# 测试写好的插件

由于 rubick 插件是基于 npm 的管理方式,所以开发者调试插件,也是基于 npm 的软连接的方式进行调试。 +首先需要再插件 package.json 目录下执行:

$ npm link
+

然后将插件通过插件市场的 开发者 菜单进行安装,填写插件的 name 即可,如果插件需要调试,可以通过右上角 ... 来打开开发者工具进行调试,页面变更直接刷新即可:

本小节所有代码:rubick-ui-plugin-demo (opens new window)

# 开发系统插件

一个最基础插件的目录是这样的:

rubick-system-plugin-demo
+  |-- package.json
+  |-- index.js
+

# 文件说明

# package.json

用于指定插件最基础的配置,一个最基础的配置信息如下:

{
+  "name": "rubick-system-plugin-demo",
+  "pluginName": "rubick 系统插件demo",
+  "version": "0.0.0",
+  "description": "rubick 系统插件demo",
+  "entry": "index.js",
+  "logo": "https://xxxx/upload/202112/08/5bac90649c5343cabb63930b131cf8e6.png",
+  "pluginType": "system",
+  "author": "muwoo",
+  "homepage": ""
+}
+

核心字段说明:

  • name: 插件 npm 包名称,必填
  • pluginName: 插件显示名称,用于展示给使用者 必填
  • description: 插件描述,描述这个插件的作用 必填
  • author: 插件作者
  • entry: 入口文件,一般为 index.js
  • logo: 尺寸建议 200 * 200, 插件的 logo, 需要是 http/https 在线地址,不支持本地logo 必填
  • version: 插件的版本 必填
  • homePage: 插件 readme raw 地址
  • pluginType: 插件类型,枚举:ui, system. 当前选 system 必填

# index.js

插件的入口文件,用于 rubick 主进程进行加载执行:

module.exports = () => {
+  return {
+    onReady(ctx) {
+      const { Notification } = ctx;
+      new Notification({
+        title: "测试系统插件",
+        body: "这是一个系统插件,在rubick运行时,立即被加载"
+      }).show()
+    }
+  }
+}
+

index.js 需要返回一个包含 onReady 生命周期的函数,该函数接受 ctx 对象作为参数,我们可以通过 ctx 使用 electron 主进程所有能力。 +同时也为 ctx 上扩展挂在了 mainWindow 对象。

# 调试插件

由于 rubick 插件是基于 npm 的管理方式,所以开发者调试插件,也是基于 npm 的软连接的方式进行调试。 +首先需要再插件 package.json 目录下执行:

$ npm link
+

然后将插件通过插件市场的 开发者 菜单进行安装,填写插件的 name 即可。由于插件依赖于主进程启动执行,所以安装完成后需要重启 rubick 后才能生效。

DANGER

系统插件目前无法直接通过 devtools 进行调试,后面会进行优化

# 发布插件

这里介绍完了如何开发插件,最后非常欢迎为 rubick 贡献开源插件,发布插件也非常简单,首先需要把自己的插件发布到 npm 仓库:

$ npm publish
+

然后再给 rubick-database/plugins/total-plugins.json (opens new window) 仓库提个 pull request, 把你的 package.json 信息加入 json 文件内,等我们 merge 了您的提交,插件将会自动上架。

+ + + diff --git a/guide/index.html b/guide/index.html new file mode 100644 index 00000000..f9e2fab9 --- /dev/null +++ b/guide/index.html @@ -0,0 +1,40 @@ + + + + + + 赞助 | Rubick + + + + + + + + +

# 赞助

rubick 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️.

# 前言

rubick 之前的插件管理,依托于云服务器存储,我们需要为服务器存储支付一笔不小的开销。 +由于项目完全开源,所以几乎无任何收入,所以为了让 rubick 先生存下去,我们再三抉择把插件包管理方式托管到了npm 上。

由于 rubick 的插件管理体系是基于 npm 的包管理体系,所以当您需要使用插件的时候,需要手动保证当前电脑已经安装好了node环境。 +如果当前电脑已经安装过 node,那么您可以直接下载 rubick 进行使用啦!

macos 下安装 nodejs 方法 (opens new window)

windows 下安装 nodejs 方法 (opens new window)

# 下载 rubick

rubick 下载安装地址 (opens new window)

macos 选择 pkg 文件,windows 选择 exe 文件,Debian/Ubuntu选择deb。 +安装完成后打开 rubick 即可看到主搜索界面:

# 功能说明

接下来详细介绍 rubick 所包含和支持的功能

# 1. 搜索系统应用

支持拼音和缩写来搜索系统安装应用:

# 2. UI类插件安装

点击搜索框右侧 rubick 图标,进入插件市场,选择所需插件,点击下载按钮即可下载,下载完成后在已安装 tab 下可以找到安装插件。 +安装完成后,输入插件呼起命令即可使用对应插件:

# 3. 系统类插件安装

系统插件安装方式和UI类一样,在插件市场选择系统分类,寻找适合自己的系统插件安装即可。

DANGER

系统插件安装成功后,需要重启 rubick 才能生效

# 4. 输入框聚焦自动根据剪切板内容匹配插件

rubick 内搜索偏好设置,然后开启自动粘贴 功能,即可匹配剪切板内容自动匹配适合插件进行使用。

# 内网部署

TIP

如果把插件发布到公网 npm 如果不符合您的公司安全要求,rubick 支持内网私有源和私有插件库,如果您需要内网部署使用,可以自行配置以下规则。

rubick 依赖 npm 仓库做插件管理,依赖 gitcode 做插件数据存储,所以如果要进行内网部署,主要需要替换这2个设置。详细设置: +插件市场 -> 设置 -> 内网部署设置

image.png

# 1. 替换 npm 源

插件发布到私有 npm 源即可。

# 2. 替换 gitcode 源为内网 gitlab: database url

替换格式:https://gitlab.xxx.com/api/v4/projects/{projectId}/repository/files/ 。因为接口为 gitlab openAPI,所以需要填写仓库 access_token

# 更多功能

如果您还需要更多功能,欢迎来这里给我们提建议:issues (opens new window) 。 +有价值的想法我们会加入到后期的开发当中。同时也欢迎一起加入共建。

+ + + diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 00000000..b42ef76c Binary files /dev/null and b/images/logo.png differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..c93f9492 --- /dev/null +++ b/index.html @@ -0,0 +1,38 @@ + + + + + + Rubick + + + + + + + + +
hero

+ Rubick +

+ 基于 Electron 开源的插件化工具箱 +

+ 快速上手 → +

极其轻量

rubick 仅仅包含插件运行所需要的API,本身不内置任何插件,可以看成是 electron 的二次封装框架。

更强大的插件能力

不仅仅支持ui插件(需要搜索呼起使用),还支持系统插件(不需要搜索,只要rubick在运行,系统插件即可用)

更便捷的插件管理

rubick 插件全部托管在 npm 仓库,rubick 插件的安装、使用、删除就是 npm 包的安装、使用、删除

+ + + diff --git a/run/index.html b/run/index.html new file mode 100644 index 00000000..c72da004 --- /dev/null +++ b/run/index.html @@ -0,0 +1,88 @@ + + + + + + 赞助 | Rubick + + + + + + + + +

# 赞助

rubick 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️.

# 贡献代码

# rubick 目录介绍

.
+├── docs # 文档存方目录
+│   ├── docs
+│   ├── package-lock.json
+│   ├── package.json
+│   └── pnpm-lock.yaml
+├── feature # 插件市场插件
+│   ├── README.md
+│   ├── babel.config.js
+│   ├── package-lock.json
+│   ├── package.json
+│   ├── public
+│   ├── src
+│   ├── tsconfig.json
+│   └── vue.config.js
+├── public # rubick __static 目录
+│   ├── favicon.ico
+│   ├── feature
+│   ├── icons
+│   ├── index.html
+│   ├── preload.js
+│   └── tpl
+├── src # rubick 核心源码
+│   ├── common # 一些通用的函数
+│   ├── core # 一些核心的能力,比如 app search
+│   ├── main # 主进程
+│   └── renderer # 渲染进程
+├── tpl # rubick 模板插件
+│   ├── README.md
+│   ├── babel.config.js
+│   ├── package-lock.json
+│   ├── package.json
+│   ├── public
+│   ├── src
+│   ├── tsconfig.json
+│   └── vue.config.js
+├── LICENSE # MIT 协议
+├── README.md # 英文文档
+├── README.zh-CN.md # 中文文档
+├── babel.config.js
+├── deploy-doc.sh # rubick doc 发布脚本
+├── tsconfig.json
+├── package-lock.json
+├── package.json
+└── vue.config.js
+

# 启动

# 1. 安装依赖

rubick 启动主要涉及到3个目录:

  1. 根目录:rubick 核心进程
  2. feature:rubick 内置的插件市场插件
  3. tpl: rubick 内置的模板插件
$ npm i
+$ cd feature && npm i
+$ cd tpl && npm i
+

# 2. 启动核心进程

$ npm run electron:serve
+

# 3. 启动插件中心 非必须

$ cd feature && npm run serve
+

# 4. 启动模板插件 非必须

$ cd tpl && npm run serve
+

# 编译

$ cd feature && npm run build
+$ cd tpl && npm run build
+$ npm run electron:build
+

# PR

  1. Create an issue about the features, such as new components.
  2. Fork the repo to your own account.
  3. Clone your fork.
  4. Create a new branch base on dev, if you want to add new component, the branch name should be formatted as component-[Component Name]. (e.g. component-steps) And the commit info should be formatted as [Component Name]: Info about commit.
  5. Make sure that running npm run prepublish outputs the correct files.
  6. Rebase before creating a PR to keep commit history clear. (Merge request to branch dev)
  7. Provide some description about your PR.
+ + + diff --git a/super/index.html b/super/index.html new file mode 100644 index 00000000..cc147182 --- /dev/null +++ b/super/index.html @@ -0,0 +1,41 @@ + + + + + + 特殊服务 | Rubick + + + + + + + + +

# 特殊服务

# 说明

rubick 一直坚持开源免费,现在不会变,以后也不会变。但是纯开源 MIT 模式下,是一种 0 收入用爱发电的,完全依靠 +作者自己的爱好和激情。但这种用爱发电的模式很难持续维持,为了更好的持续迭代和发展壮大 rubick, 我们需要一定的现金持续激励 rubick 的核心开发者们,让更多的人成为 rubick +的核心开发者。所以 rubick 开启了一个新的模式尝试,那是服务付费:rubick 用户可以购买我们提供技术支持、答疑解惑、定制化插件开发、二次定制化开发 rubick 等等官方服务...

# 可以提供哪些服务?

我们收集了大量用户的问题,目前约定可以支持到的服务有:

  1. 二次定制化开发 rubick
  2. 轻量级插件开发
  3. rubick 实现原理手把手介绍
  4. rubick 使用答疑
  5. rubick 内网部署一条龙服务
  6. 前端圈各种技术支持(作者分别是前蚂蚁集团和字节跳动的前端技术专家)
  7. 未来能提供的一切...

# 如何加入特殊服务?

扫描下方的二维码,加入知识星球即可: +

+ + +