diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..d54c3268 --- /dev/null +++ b/404.html @@ -0,0 +1,23 @@ + + + + + + 404 | 轻雪机器人 + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/assets/app.B6hFbXUP.js b/assets/app.B6hFbXUP.js new file mode 100644 index 00000000..95f2eb7a --- /dev/null +++ b/assets/app.B6hFbXUP.js @@ -0,0 +1 @@ +import{t as p}from"./chunks/theme.rDkprPqD.js";import{U as o,a5 as u,a6 as c,a7 as l,a8 as f,a9 as d,aa as m,ab as h,ac as g,ad as A,ae as y,d as P,u as v,y as C,x as b,af as w,ag as E,ah as R,ai as S}from"./chunks/framework.C3o_UkTa.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(p),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function x(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function D(){return g(T)}function _(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&x().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{x as createApp}; diff --git a/assets/chunks/@localSearchIndexen.CgaiBpBo.js b/assets/chunks/@localSearchIndexen.CgaiBpBo.js new file mode 100644 index 00000000..0c955f00 --- /dev/null +++ b/assets/chunks/@localSearchIndexen.CgaiBpBo.js @@ -0,0 +1 @@ +const e=`{"documentCount":321,"nextId":321,"documentIds":{"0":"/en/deploy/config.html#configurations","1":"/en/deploy/config.html#basic-configuration","2":"/en/deploy/config.html#other-configurations","3":"/en/deploy/config.html#example-configuration-of-onebot-implementation-side-connected-to-nonebot","4":"/en/deploy/config.html#other","5":"/en/deploy/fandq.html#faq","6":"/en/deploy/fandq.html#frequently-asked-questions","7":"/en/deploy/fandq.html#other-questions","8":"/en/deploy/fandq.html#recommended-solution-qq","9":"/en/deploy/fandq.html#recommended-solution-minecraft","10":"/en/deploy/fandq.html#acknowledgements","11":"/en/deploy/install.html#install","12":"/en/deploy/install.html#normal-installation","13":"/en/deploy/install.html#run-with-docker","14":"/en/deploy/install.html#use-trss-script","15":"/en/deploy/install.html#device-requirements","16":"/en/deploy/install.html#for-other-questions-please-refer-to-faq","17":"/en/dev/api/api.html#liteyuki","18":"/en/dev/api/api.html#var-version","19":"/en/dev/api/bot/bot.html#liteyuki-bot","20":"/en/dev/api/bot/bot.html#class-liteyukibot","21":"/en/dev/api/bot/bot.html#def-init-self-args-kwargs-none","22":"/en/dev/api/bot/bot.html#async-def-run-self","23":"/en/dev/api/bot/bot.html#def-run-self","24":"/en/dev/api/bot/bot.html#async-def-keep-alive-self","25":"/en/dev/api/bot/bot.html#def-handle-exit-self-signum-frame","26":"/en/dev/api/bot/bot.html#def-restart-self-delay-int-0","27":"/en/dev/api/bot/bot.html#def-restart-process-self-name-optional-str-none","28":"/en/dev/api/bot/bot.html#def-init-self-args-kwargs","29":"/en/dev/api/bot/bot.html#def-init-logger-self","30":"/en/dev/api/bot/bot.html#def-stop-self","31":"/en/dev/api/bot/bot.html#def-on-before-start-self-func-lifespan-func","32":"/en/dev/api/bot/bot.html#def-on-after-start-self-func-lifespan-func","33":"/en/dev/api/bot/bot.html#def-on-after-shutdown-self-func-lifespan-func","34":"/en/dev/api/bot/bot.html#def-on-before-process-shutdown-self-func-lifespan-func","35":"/en/dev/api/bot/bot.html#def-on-before-process-restart-self-func-lifespan-func","36":"/en/dev/api/bot/bot.html#def-on-after-restart-self-func-lifespan-func","37":"/en/dev/api/bot/bot.html#def-get-bot-liteyukibot","38":"/en/dev/api/bot/bot.html#def-get-config-key-str-default-any-none-any","39":"/en/dev/api/bot/bot.html#def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-none-any","40":"/en/dev/api/bot/bot.html#def-print-logo","41":"/en/dev/api/bot/#liteyuki-bot","42":"/en/dev/api/bot/#class-liteyukibot","43":"/en/dev/api/bot/#def-init-self-args-kwargs-none","44":"/en/dev/api/bot/#async-def-run-self","45":"/en/dev/api/bot/#def-run-self","46":"/en/dev/api/bot/#async-def-keep-alive-self","47":"/en/dev/api/bot/#def-handle-exit-self-signum-frame","48":"/en/dev/api/bot/#def-restart-self-delay-int-0","49":"/en/dev/api/bot/#def-restart-process-self-name-optional-str-none","50":"/en/dev/api/bot/#def-init-self-args-kwargs","51":"/en/dev/api/bot/#def-init-logger-self","52":"/en/dev/api/bot/#def-stop-self","53":"/en/dev/api/bot/#def-on-before-start-self-func-lifespan-func","54":"/en/dev/api/bot/#def-on-after-start-self-func-lifespan-func","55":"/en/dev/api/bot/#def-on-after-shutdown-self-func-lifespan-func","56":"/en/dev/api/bot/#def-on-before-process-shutdown-self-func-lifespan-func","57":"/en/dev/api/bot/#def-on-before-process-restart-self-func-lifespan-func","58":"/en/dev/api/bot/#def-on-after-restart-self-func-lifespan-func","59":"/en/dev/api/bot/#def-get-bot-liteyukibot","60":"/en/dev/api/bot/#def-get-config-key-str-default-any-none-any","61":"/en/dev/api/bot/#def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-none-any","62":"/en/dev/api/bot/#def-print-logo","63":"/en/dev/api/bot/lifespan.html#liteyuki-bot-lifespan","64":"/en/dev/api/bot/lifespan.html#class-lifespan","65":"/en/dev/api/bot/lifespan.html#def-init-self-none","66":"/en/dev/api/bot/lifespan.html#async-def-run-funcs-funcs-list-async-lifespan-func-process-lifespan-func-args-kwargs-none","67":"/en/dev/api/bot/lifespan.html#def-on-before-start-self-func-lifespan-func-lifespan-func","68":"/en/dev/api/bot/lifespan.html#def-on-after-start-self-func-lifespan-func-lifespan-func","69":"/en/dev/api/bot/lifespan.html#def-on-before-process-shutdown-self-func-lifespan-func-lifespan-func","70":"/en/dev/api/bot/lifespan.html#def-on-after-shutdown-self-func-lifespan-func-lifespan-func","71":"/en/dev/api/bot/lifespan.html#def-on-before-process-restart-self-func-lifespan-func-lifespan-func","72":"/en/dev/api/bot/lifespan.html#def-on-after-restart-self-func-lifespan-func-lifespan-func","73":"/en/dev/api/bot/lifespan.html#async-def-before-start-self-none","74":"/en/dev/api/bot/lifespan.html#async-def-after-start-self-none","75":"/en/dev/api/bot/lifespan.html#async-def-before-process-shutdown-self-none","76":"/en/dev/api/bot/lifespan.html#async-def-after-shutdown-self-none","77":"/en/dev/api/bot/lifespan.html#async-def-before-process-restart-self-none","78":"/en/dev/api/bot/lifespan.html#async-def-after-restart-self-none","79":"/en/dev/api/comm/channel.html#liteyuki-comm-channel","80":"/en/dev/api/comm/channel.html#class-channel-generic-t","81":"/en/dev/api/comm/channel.html#def-init-self-name-str-type-check-optional-bool-none","82":"/en/dev/api/comm/channel.html#def-get-generic-type-self-optional-type","83":"/en/dev/api/comm/channel.html#def-validate-structure-self-data-any-structure-type-bool","84":"/en/dev/api/comm/channel.html#def-send-self-data-t","85":"/en/dev/api/comm/channel.html#def-receive-self-t","86":"/en/dev/api/comm/channel.html#async-def-async-receive-self-t","87":"/en/dev/api/comm/channel.html#def-on-receive-self-filter-func-optional-filter-func-none-callable-callable-t-any-callable-t-any","88":"/en/dev/api/comm/channel.html#async-def-run-on-receive-funcs-self-data-any","89":"/en/dev/api/comm/channel.html#async-def-start-receive-loop-self","90":"/en/dev/api/comm/channel.html#var-active-channel","91":"/en/dev/api/comm/channel.html#var-publish-channel","92":"/en/dev/api/comm/channel.html#var-channel-deliver-active-channel","93":"/en/dev/api/comm/channel.html#def-set-channel-name-str-channel-channel","94":"/en/dev/api/comm/channel.html#def-set-channels-channels-dict-str-channel","95":"/en/dev/api/comm/channel.html#def-get-channel-name-str-channel","96":"/en/dev/api/comm/channel.html#def-get-channels-dict-str-channel","97":"/en/dev/api/comm/channel.html#def-on-set-channel-data-tuple-str-dict-str-any","98":"/en/dev/api/comm/channel.html#def-on-get-channel-data-tuple-str-dict-str-any","99":"/en/dev/api/comm/channel.html#def-on-get-channels-data-tuple-str-dict-str-any","100":"/en/dev/api/comm/comm.html#liteyuki-comm","101":"/en/dev/api/comm/#liteyuki-comm","102":"/en/dev/api/comm/event.html#liteyuki-comm-event","103":"/en/dev/api/comm/event.html#class-event","104":"/en/dev/api/comm/event.html#def-init-self-name-str-data-dict-str-any","105":"/en/dev/api/comm/rpc.html#liteyuki-comm-rpc","106":"/en/dev/api/comm/rpc.html#class-rpc","107":"/en/dev/api/comm/rpc.html#def-init-self-on-calling-on-calling-func-none","108":"/en/dev/api/comm/rpc.html#def-call-self-args-tuple-kwargs-dict-any","109":"/en/dev/api/comm/socks_channel.html#liteyuki-comm-socks-channel","110":"/en/dev/api/comm/socks_channel.html#class-sockschannel","111":"/en/dev/api/comm/socks_channel.html#def-init-self-name-str","112":"/en/dev/api/comm/socks_channel.html#def-send-self-data","113":"/en/dev/api/comm/socks_channel.html#def-receive-self","114":"/en/dev/api/comm/socks_channel.html#def-close-self","115":"/en/dev/api/comm/storage.html#liteyuki-comm-storage","116":"/en/dev/api/comm/storage.html#var-on-main-subscriber-receive-funcs","117":"/en/dev/api/comm/storage.html#var-on-sub-subscriber-receive-funcs","118":"/en/dev/api/comm/storage.html#class-keyvaluestore","119":"/en/dev/api/comm/storage.html#def-init-self","120":"/en/dev/api/comm/storage.html#def-set-self-key-str-value-any-none","121":"/en/dev/api/comm/storage.html#def-get-self-key-str-default-optional-any-none-optional-any","122":"/en/dev/api/comm/storage.html#def-delete-self-key-str-ignore-key-error-bool-true-none","123":"/en/dev/api/comm/storage.html#def-get-all-self-dict-str-any","124":"/en/dev/api/comm/storage.html#def-publish-self-channel-str-data-any-none","125":"/en/dev/api/comm/storage.html#def-on-subscriber-receive-self-channel-str-callable-on-receive-func-on-receive-func","126":"/en/dev/api/comm/storage.html#async-def-run-subscriber-receive-funcs-channel-str-data-any","127":"/en/dev/api/comm/storage.html#async-def-start-receive-loop-self","128":"/en/dev/api/comm/storage.html#class-globalkeyvaluestore","129":"/en/dev/api/comm/storage.html#def-get-instance-cls","130":"/en/dev/api/comm/storage.html#attr-instance-none","131":"/en/dev/api/comm/storage.html#attr-lock-threading-lock","132":"/en/dev/api/comm/storage.html#var-ref-count","133":"/en/dev/api/comm/storage.html#def-on-get-data-tuple-str-dict-str-any","134":"/en/dev/api/comm/storage.html#def-on-set-data-tuple-str-dict-str-any","135":"/en/dev/api/comm/storage.html#def-on-delete-data-tuple-str-dict-str-any","136":"/en/dev/api/comm/storage.html#def-on-get-all-data-tuple-str-dict-str-any","137":"/en/dev/api/config.html#liteyuki-config","138":"/en/dev/api/config.html#def-flat-config-config-dict-str-any-dict-str-any","139":"/en/dev/api/config.html#def-load-from-yaml-file-str-dict-str-any","140":"/en/dev/api/config.html#def-load-from-json-file-str-dict-str-any","141":"/en/dev/api/config.html#def-load-from-toml-file-str-dict-str-any","142":"/en/dev/api/config.html#def-load-from-files-files-str-no-warning-bool-false-dict-str-any","143":"/en/dev/api/config.html#def-load-configs-from-dirs-directories-str-no-waring-bool-false-dict-str-any","144":"/en/dev/api/config.html#def-load-config-in-default-no-waring-bool-false-dict-str-any","145":"/en/dev/api/core/core.html#liteyuki-core","146":"/en/dev/api/core/#liteyuki-core","147":"/en/dev/api/core/manager.html#liteyuki-core-manager","148":"/en/dev/api/core/manager.html#class-channeldeliver","149":"/en/dev/api/core/manager.html#def-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any","150":"/en/dev/api/core/manager.html#class-processmanager","151":"/en/dev/api/core/manager.html#def-init-self-lifespan-lifespan","152":"/en/dev/api/core/manager.html#async-def-run-process-self-name-str","153":"/en/dev/api/core/manager.html#async-def-start-all-self","154":"/en/dev/api/core/manager.html#def-add-target-self-name-str-target-target-func-args-tuple-kwargs-none","155":"/en/dev/api/core/manager.html#def-join-all-self","156":"/en/dev/api/core/manager.html#def-terminate-self-name-str","157":"/en/dev/api/core/manager.html#def-terminate-all-self","158":"/en/dev/api/core/manager.html#def-is-process-alive-self-name-str-bool","159":"/en/dev/api/dev/dev.html#liteyuki-dev","160":"/en/dev/api/dev/#liteyuki-dev","161":"/en/dev/api/dev/observer.html#liteyuki-dev-observer","162":"/en/dev/api/dev/observer.html#var-callback-func","163":"/en/dev/api/dev/observer.html#var-filter-func","164":"/en/dev/api/dev/observer.html#def-debounce-wait","165":"/en/dev/api/dev/observer.html#class-codemodifiedhandler-filesystemeventhandler","166":"/en/dev/api/dev/observer.html#def-on-modified-self-event","167":"/en/dev/api/dev/observer.html#def-on-created-self-event","168":"/en/dev/api/dev/observer.html#def-on-deleted-self-event","169":"/en/dev/api/dev/observer.html#def-on-moved-self-event","170":"/en/dev/api/dev/observer.html#def-on-any-event-self-event","171":"/en/dev/api/dev/observer.html#def-on-file-system-event-directories-tuple-str-recursive-bool-true-event-filter-filter-func-none-callable-callback-func-callback-func","172":"/en/dev/api/dev/plugin.html#liteyuki-dev-plugin","173":"/en/dev/api/dev/plugin.html#def-run-plugins-module-path-str-path","174":"/en/dev/api/exception.html#liteyuki-exception","175":"/en/dev/api/exception.html#class-liteyukiexception-baseexception","176":"/en/dev/api/#liteyuki","177":"/en/dev/api/#var-version","178":"/en/dev/api/log.html#liteyuki-log","179":"/en/dev/api/log.html#def-get-format-level-str-str","180":"/en/dev/api/log.html#def-init-log-config-dict","181":"/en/dev/api/message/event.html#liteyuki-message-event","182":"/en/dev/api/message/event.html#class-messageevent","183":"/en/dev/api/message/event.html#def-init-self-bot-id-str-message-list-dict-str-any-str-message-type-str-raw-message-str-session-id-str-user-id-str-session-type-str-receive-channel-optional-channel-messageevent-none-data-optional-dict-str-any-none","184":"/en/dev/api/message/event.html#def-reply-self-message-str-dict-str-any","185":"/en/dev/api/message/#liteyuki-message","186":"/en/dev/api/message/matcher.html#liteyuki-message-matcher","187":"/en/dev/api/message/matcher.html#class-matcher","188":"/en/dev/api/message/matcher.html#def-init-self-rule-rule-priority-int-block-bool","189":"/en/dev/api/message/matcher.html#def-handle-self-callable-eventhandler-eventhandler","190":"/en/dev/api/message/matcher.html#async-def-run-self-event-messageevent-none","191":"/en/dev/api/message/message.html#liteyuki-message","192":"/en/dev/api/message/on.html#liteyuki-message-on","193":"/en/dev/api/message/on.html#def-add-matcher-matcher-matcher","194":"/en/dev/api/message/on.html#def-on-message-rule-rule-empty-rule-priority-int-0-block-bool-false-matcher","195":"/en/dev/api/message/on.html#def-on-keywords-keywords-list-str-rule-empty-rule-priority-int-0-block-bool-false-matcher","196":"/en/dev/api/message/rule.html#liteyuki-message-rule","197":"/en/dev/api/message/rule.html#var-rulehandlerfunc","198":"/en/dev/api/message/rule.html#class-rule","199":"/en/dev/api/message/rule.html#def-init-self-handler-rulehandlerfunc","200":"/en/dev/api/message/rule.html#def-or-self-other-rule-rule","201":"/en/dev/api/message/rule.html#def-and-self-other-rule-rule","202":"/en/dev/api/message/rule.html#async-def-call-self-event-messageevent-bool","203":"/en/dev/api/message/rule.html#async-def-empty-rule-event-messageevent-bool","204":"/en/dev/api/message/rule.html#async-def-is-su-rule-event-messageevent-bool","205":"/en/dev/api/message/session.html#liteyuki-message-session","206":"/en/dev/api/mkdoc.html#liteyuki-mkdoc","207":"/en/dev/api/mkdoc.html#class-deftype-enum","208":"/en/dev/api/mkdoc.html#attr-function-function","209":"/en/dev/api/mkdoc.html#attr-method-method","210":"/en/dev/api/mkdoc.html#attr-static-method-staticmethod","211":"/en/dev/api/mkdoc.html#attr-class-method-classmethod","212":"/en/dev/api/mkdoc.html#attr-property-property","213":"/en/dev/api/mkdoc.html#class-functioninfo-basemodel","214":"/en/dev/api/mkdoc.html#attr-name-str-no-default","215":"/en/dev/api/mkdoc.html#attr-args-list-tuple-str-str-no-default","216":"/en/dev/api/mkdoc.html#attr-return-type-str-no-default","217":"/en/dev/api/mkdoc.html#attr-docstring-str-no-default","218":"/en/dev/api/mkdoc.html#attr-source-code-str","219":"/en/dev/api/mkdoc.html#attr-type-deftype-no-default","220":"/en/dev/api/mkdoc.html#attr-is-async-bool-no-default","221":"/en/dev/api/mkdoc.html#class-attributeinfo-basemodel","222":"/en/dev/api/mkdoc.html#attr-name-str-no-default-1","223":"/en/dev/api/mkdoc.html#attr-type-str-no-default","224":"/en/dev/api/mkdoc.html#attr-value-any-none","225":"/en/dev/api/mkdoc.html#attr-docstring-str","226":"/en/dev/api/mkdoc.html#class-classinfo-basemodel","227":"/en/dev/api/mkdoc.html#attr-name-str-no-default-2","228":"/en/dev/api/mkdoc.html#attr-docstring-str-no-default-1","229":"/en/dev/api/mkdoc.html#attr-methods-list-functioninfo-no-default","230":"/en/dev/api/mkdoc.html#attr-attributes-list-attributeinfo-no-default","231":"/en/dev/api/mkdoc.html#attr-inherit-list-str-no-default","232":"/en/dev/api/mkdoc.html#class-moduleinfo-basemodel","233":"/en/dev/api/mkdoc.html#attr-module-path-str-no-default","234":"/en/dev/api/mkdoc.html#attr-functions-list-functioninfo-no-default","235":"/en/dev/api/mkdoc.html#attr-classes-list-classinfo-no-default","236":"/en/dev/api/mkdoc.html#attr-attributes-list-attributeinfo-no-default-1","237":"/en/dev/api/mkdoc.html#attr-docstring-str-no-default-2","238":"/en/dev/api/mkdoc.html#def-get-relative-path-base-path-str-target-path-str-str","239":"/en/dev/api/mkdoc.html#def-write-to-files-file-data-dict-str-str","240":"/en/dev/api/mkdoc.html#def-get-file-list-module-folder-str","241":"/en/dev/api/mkdoc.html#def-get-module-info-normal-file-path-str-ignore-private-bool-true-moduleinfo","242":"/en/dev/api/mkdoc.html#def-generate-markdown-module-info-moduleinfo-front-matter-none-lang-str-zh-cn-str","243":"/en/dev/api/mkdoc.html#def-generate-docs-module-folder-str-output-dir-str-with-top-bool-false-lang-str-zh-cn-ignored-paths-none","244":"/en/dev/api/mkdoc.html#var-no-module-name-pyfile-path","245":"/en/dev/api/plugin/#liteyuki-plugin","246":"/en/dev/api/plugin/#def-get-loaded-plugins-dict-str-plugin","247":"/en/dev/api/plugin/load.html#liteyuki-plugin-load","248":"/en/dev/api/plugin/load.html#def-load-plugin-module-path-str-path-optional-plugin","249":"/en/dev/api/plugin/load.html#def-load-plugins-plugin-dir-str-ignore-warning-bool-true-set-plugin","250":"/en/dev/api/plugin/load.html#def-format-display-name-display-name-str-plugin-type-plugintype-str","251":"/en/dev/api/plugin/manager.html#liteyuki-plugin-manager","252":"/en/dev/api/plugin/model.html#liteyuki-plugin-model","253":"/en/dev/api/plugin/model.html#class-plugintype-enum","254":"/en/dev/api/plugin/model.html#attr-application-application","255":"/en/dev/api/plugin/model.html#attr-service-service","256":"/en/dev/api/plugin/model.html#attr-module-module","257":"/en/dev/api/plugin/model.html#attr-unclassified-unclassified","258":"/en/dev/api/plugin/model.html#attr-test-test","259":"/en/dev/api/plugin/model.html#class-pluginmetadata-basemodel","260":"/en/dev/api/plugin/model.html#attr-name-str-no-default","261":"/en/dev/api/plugin/model.html#attr-description-str","262":"/en/dev/api/plugin/model.html#attr-usage-str","263":"/en/dev/api/plugin/model.html#attr-type-plugintype-plugintype-unclassified","264":"/en/dev/api/plugin/model.html#attr-author-str","265":"/en/dev/api/plugin/model.html#attr-homepage-str","266":"/en/dev/api/plugin/model.html#attr-extra-dict-str-any","267":"/en/dev/api/plugin/model.html#class-plugin-basemodel","268":"/en/dev/api/plugin/model.html#def-hash-self","269":"/en/dev/api/plugin/model.html#attr-model-config-arbitrary-types-allowed-true","270":"/en/dev/api/plugin/model.html#attr-name-str-no-default-1","271":"/en/dev/api/plugin/model.html#attr-module-moduletype-no-default","272":"/en/dev/api/plugin/model.html#attr-module-name-str-no-default","273":"/en/dev/api/plugin/model.html#attr-metadata-optional-pluginmetadata-none","274":"/en/dev/api/plugin/plugin.html#liteyuki-plugin","275":"/en/dev/api/plugin/plugin.html#def-get-loaded-plugins-dict-str-plugin","276":"/en/dev/api/plugins/liteecho.html#liteyuki-plugins-liteecho","277":"/en/dev/api/plugins/liteecho.html#async-def-liteecho-event-messageevent","278":"/en/dev/api/plugins/plugin_loader/#liteyuki-plugins-plugin-loader","279":"/en/dev/api/plugins/plugin_loader/#def-default-plugins-loader","280":"/en/dev/api/plugins/plugin_loader/plugin_loader.html#liteyuki-plugins-plugin-loader","281":"/en/dev/api/plugins/plugin_loader/plugin_loader.html#def-default-plugins-loader","282":"/en/dev/api/utils.html#liteyuki-utils","283":"/en/dev/api/utils.html#def-is-coroutine-callable-call-callable-any-bool","284":"/en/dev/api/utils.html#def-run-coroutine-coro-coroutine","285":"/en/dev/api/utils.html#def-run-coroutine-in-thread-coro-coroutine","286":"/en/dev/api/utils.html#def-path-to-module-name-path-path-str","287":"/en/dev/api/utils.html#def-async-wrapper-func-callable-any-callable-coroutine","288":"/en/dev/comm.html#channel-communication","289":"/en/dev/comm.html#introduction","290":"/en/dev/comm.html#example","291":"/en/dev/comm.html#共享内存通信","292":"/en/dev/comm.html#简介","293":"/en/dev/comm.html#示例","294":"/en/dev/lyfunc.html#轻雪函数","295":"/en/dev/lyfunc.html#函数文件","296":"/en/dev/lyfunc.html#命令文档","297":"/en/dev/lyfunc.html#示例","298":"/en/dev/lyfunc.html#api","299":"/en/dev/lyfunc.html#结束关键字","300":"/en/dev/plugin.html#简介","301":"/en/dev/plugin.html#开始","302":"/en/dev/plugin.html#创建插件","303":"/en/dev/plugin.html#编写逻辑部分","304":"/en/dev/plugin.html#加载插件","305":"/en/dev/plugin.html#方法1","306":"/en/dev/plugin.html#方法2","307":"/en/dev/resource.html#简介","308":"/en/dev/resource.html#加载资源包","309":"/en/usage/agreement.html#用户协议","310":"/en/usage/basic.html#基础插件","311":"/en/usage/basic.html#轻雪命令liteyuki-command","312":"/en/usage/basic.html#命令别名","313":"/en/usage/basic.html#插件-包管理器-liteyuki-pacman","314":"/en/usage/basic.html#命令别名-1","315":"/en/usage/basic.html#用户管理liteyuki-user","316":"/en/usage/extra.html#功能插件命令","317":"/en/usage/extra.html#轻雪天气liteyuki-weather","318":"/en/usage/extra.html#命令别名","319":"/en/usage/extra.html#统计信息liteyuki-statistics","320":"/en/usage/extra.html#命令别名-1"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[1,1,50],"1":[2,1,82],"2":[2,1,67],"3":[9,1,71],"4":[1,1,21],"5":[1,1,1],"6":[3,1,172],"7":[2,1,18],"8":[4,1,31],"9":[4,1,25],"10":[1,1,14],"11":[1,1,1],"12":[2,1,59],"13":[3,1,57],"14":[3,1,18],"15":[2,1,83],"16":[6,3,1],"17":[1,1,1],"18":[3,1,7],"19":[2,1,1],"20":[2,2,1],"21":[7,4,72],"22":[5,4,23],"23":[4,4,21],"24":[6,4,32],"25":[7,4,28],"26":[8,4,56],"27":[10,4,40],"28":[6,4,17],"29":[5,4,14],"30":[4,4,16],"31":[9,4,21],"32":[9,4,21],"33":[9,4,22],"34":[10,4,23],"35":[10,4,23],"36":[9,4,22],"37":[5,2,38],"38":[10,2,27],"39":[14,2,45],"40":[4,2,24],"41":[2,1,1],"42":[2,2,1],"43":[7,4,72],"44":[5,4,23],"45":[4,4,21],"46":[6,4,32],"47":[7,4,28],"48":[8,4,56],"49":[10,4,40],"50":[6,4,17],"51":[5,4,14],"52":[4,4,16],"53":[9,4,21],"54":[9,4,21],"55":[9,4,22],"56":[10,4,23],"57":[10,4,23],"58":[9,4,22],"59":[5,2,38],"60":[10,2,27],"61":[14,2,45],"62":[4,2,24],"63":[3,1,25],"64":[2,3,1],"65":[5,5,33],"66":[14,5,45],"67":[9,5,24],"68":[9,5,24],"69":[10,5,25],"70":[9,5,24],"71":[10,5,25],"72":[9,5,24],"73":[7,5,24],"74":[7,5,24],"75":[8,5,25],"76":[7,5,24],"77":[8,5,25],"78":[7,5,24],"79":[3,1,27],"80":[5,3,1],"81":[12,8,75],"82":[8,8,27],"83":[9,8,45],"84":[6,8,48],"85":[5,8,31],"86":[6,8,32],"87":[16,8,67],"88":[10,8,36],"89":[7,8,47],"90":[3,3,9],"91":[3,3,15],"92":[4,3,11],"93":[7,3,44],"94":[7,3,23],"95":[7,3,34],"96":[8,3,38],"97":[10,3,27],"98":[10,3,30],"99":[10,3,29],"100":[2,1,9],"101":[2,1,9],"102":[3,1,25],"103":[2,3,1],"104":[9,5,16],"105":[3,1,5],"106":[2,3,1],"107":[10,5,17],"108":[9,5,20],"109":[4,1,25],"110":[2,4,1],"111":[6,6,24],"112":[5,6,17],"113":[4,6,17],"114":[4,6,13],"115":[3,1,5],"116":[6,3,12],"117":[6,3,12],"118":[2,3,1],"119":[4,5,33],"120":[9,5,35],"121":[12,5,42],"122":[12,5,47],"123":[9,5,34],"124":[9,5,26],"125":[13,5,56],"126":[11,5,32],"127":[7,5,45],"128":[2,3,2],"129":[5,5,21],"130":[4,5,1],"131":[6,5,1],"132":[3,3,17],"133":[9,3,31],"134":[9,3,29],"135":[9,3,29],"136":[10,3,29],"137":[2,1,20],"138":[8,2,43],"139":[10,2,38],"140":[10,2,37],"141":[10,2,37],"142":[14,2,46],"143":[16,2,52],"144":[15,2,37],"145":[2,1,1],"146":[2,1,1],"147":[3,1,25],"148":[2,3,1],"149":[14,5,21],"150":[2,3,1],"151":[6,5,20],"152":[8,5,69],"153":[6,5,34],"154":[14,5,52],"155":[5,5,16],"156":[6,5,36],"157":[5,5,15],"158":[9,5,32],"159":[2,1,3],"160":[2,1,3],"161":[3,1,6],"162":[3,3,9],"163":[3,3,9],"164":[4,3,28],"165":[4,3,3],"166":[6,7,19],"167":[6,7,12],"168":[6,7,12],"169":[6,7,12],"170":[6,7,12],"171":[20,3,56],"172":[3,1,25],"173":[9,3,36],"174":[2,1,3],"175":[4,2,1],"176":[1,1,1],"177":[3,1,7],"178":[2,1,25],"179":[6,2,20],"180":[6,2,50],"181":[3,1,25],"182":[2,3,1],"183":[24,5,52],"184":[9,5,39],"185":[2,1,25],"186":[3,1,25],"187":[2,3,1],"188":[10,5,30],"189":[7,5,24],"190":[8,5,35],"191":[2,1,25],"192":[3,1,25],"193":[5,3,24],"194":[15,3,21],"195":[16,3,32],"196":[3,1,25],"197":[2,3,11],"198":[2,3,1],"199":[6,5,13],"200":[6,5,21],"201":[6,5,22],"202":[8,5,23],"203":[8,3,19],"204":[9,3,24],"205":[3,1,25],"206":[2,1,25],"207":[4,2,1],"208":[5,6,1],"209":[5,6,1],"210":[6,6,1],"211":[6,6,1],"212":[5,6,1],"213":[4,2,1],"214":[6,6,1],"215":[8,6,1],"216":[7,6,1],"217":[6,6,1],"218":[6,6,1],"219":[6,6,1],"220":[7,6,1],"221":[4,2,1],"222":[6,6,1],"223":[6,6,1],"224":[5,6,1],"225":[5,6,1],"226":[4,2,1],"227":[6,6,1],"228":[6,6,1],"229":[7,6,1],"230":[7,6,1],"231":[7,6,1],"232":[4,2,1],"233":[7,6,1],"234":[7,6,1],"235":[7,6,1],"236":[7,6,1],"237":[6,6,1],"238":[8,2,24],"239":[9,2,40],"240":[8,2,30],"241":[15,2,147],"242":[15,2,99],"243":[20,2,98],"244":[6,2,10],"245":[2,1,1],"246":[9,2,21],"247":[3,1,25],"248":[12,3,84],"249":[15,3,62],"250":[9,3,44],"251":[3,1,25],"252":[3,1,25],"253":[4,3,1],"254":[5,7,1],"255":[5,7,1],"256":[5,7,1],"257":[5,7,1],"258":[5,7,1],"259":[4,3,1],"260":[6,7,1],"261":[5,7,1],"262":[5,7,1],"263":[5,7,1],"264":[5,7,1],"265":[5,7,1],"266":[7,7,1],"267":[4,3,1],"268":[4,7,13],"269":[9,7,1],"270":[6,7,1],"271":[6,7,1],"272":[7,7,1],"273":[6,7,1],"274":[2,1,1],"275":[9,2,21],"276":[3,1,31],"277":[6,3,23],"278":[4,1,25],"279":[5,4,24],"280":[4,1,25],"281":[5,4,24],"282":[2,1,6],"283":[9,2,35],"284":[6,2,47],"285":[8,2,25],"286":[8,2,43],"287":[9,2,30],"288":[2,1,1],"289":[1,2,46],"290":[1,2,105],"291":[1,2,1],"292":[1,3,9],"293":[1,3,18],"294":[1,1,9],"295":[1,1,25],"296":[1,1,33],"297":[1,2,26],"298":[1,1,7],"299":[1,1,18],"300":[1,1,4],"301":[1,1,1],"302":[1,2,42],"303":[1,2,58],"304":[1,2,1],"305":[1,3,6],"306":[1,3,25],"307":[1,1,31],"308":[1,1,56],"309":[1,1,28],"310":[1,1,16],"311":[2,1,86],"312":[1,3,30],"313":[4,1,53],"314":[1,5,38],"315":[2,1,20],"316":[1,1,1],"317":[2,1,30],"318":[1,3,8],"319":[2,1,35],"320":[1,3,17]},"averageFieldLength":[5.803738317757008,3.5046728971962615,23.074766355140184],"storedFields":{"0":{"title":"Configurations","titles":[]},"1":{"title":"Basic Configuration","titles":["Configurations"]},"2":{"title":"Other configurations","titles":["Configurations"]},"3":{"title":"Example: Configuration of OneBot implementation side connected to NoneBot","titles":["Configurations"]},"4":{"title":"Other","titles":["Configurations"]},"5":{"title":"FAQ","titles":[]},"6":{"title":"Frequently Asked Questions","titles":["FAQ"]},"7":{"title":"Other questions","titles":["FAQ"]},"8":{"title":"Recommended Solution(QQ)","titles":["FAQ"]},"9":{"title":"Recommended Solution(Minecraft)","titles":["FAQ"]},"10":{"title":"Acknowledgements","titles":["FAQ"]},"11":{"title":"Install","titles":[]},"12":{"title":"Normal Installation","titles":["Install"]},"13":{"title":"Run with Docker","titles":["Install"]},"14":{"title":"Use TRSS Script","titles":["Install"]},"15":{"title":"Device Requirements","titles":["Install"]},"16":{"title":"For other questions, please refer to","titles":["Install","Device Requirements"]},"17":{"title":"liteyuki","titles":[]},"18":{"title":"var __version__","titles":["liteyuki"]},"19":{"title":"liteyuki.bot","titles":[]},"20":{"title":"class LiteyukiBot","titles":["liteyuki.bot"]},"21":{"title":"def __init__(self, *args, **kwargs) -> None","titles":["liteyuki.bot","class LiteyukiBot"]},"22":{"title":"async def _run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"23":{"title":"def run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"24":{"title":"async def keep_alive(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"25":{"title":"def _handle_exit(self, signum, frame)","titles":["liteyuki.bot","class LiteyukiBot"]},"26":{"title":"def restart(self, delay: int = 0)","titles":["liteyuki.bot","class LiteyukiBot"]},"27":{"title":"def restart_process(self, name: Optional[str] = None)","titles":["liteyuki.bot","class LiteyukiBot"]},"28":{"title":"def init(self, *args, **kwargs)","titles":["liteyuki.bot","class LiteyukiBot"]},"29":{"title":"def init_logger(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"30":{"title":"def stop(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"31":{"title":"def on_before_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"32":{"title":"def on_after_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"33":{"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"34":{"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"35":{"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"36":{"title":"def on_after_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"37":{"title":"def get_bot() -> LiteyukiBot","titles":["liteyuki.bot"]},"38":{"title":"def get_config(key: str, default: Any = None) -> Any","titles":["liteyuki.bot"]},"39":{"title":"def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any","titles":["liteyuki.bot"]},"40":{"title":"def print_logo()","titles":["liteyuki.bot"]},"41":{"title":"liteyuki.bot","titles":[]},"42":{"title":"class LiteyukiBot","titles":["liteyuki.bot"]},"43":{"title":"def __init__(self, *args, **kwargs) -> None","titles":["liteyuki.bot","class LiteyukiBot"]},"44":{"title":"async def _run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"45":{"title":"def run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"46":{"title":"async def keep_alive(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"47":{"title":"def _handle_exit(self, signum, frame)","titles":["liteyuki.bot","class LiteyukiBot"]},"48":{"title":"def restart(self, delay: int = 0)","titles":["liteyuki.bot","class LiteyukiBot"]},"49":{"title":"def restart_process(self, name: Optional[str] = None)","titles":["liteyuki.bot","class LiteyukiBot"]},"50":{"title":"def init(self, *args, **kwargs)","titles":["liteyuki.bot","class LiteyukiBot"]},"51":{"title":"def init_logger(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"52":{"title":"def stop(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"53":{"title":"def on_before_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"54":{"title":"def on_after_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"55":{"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"56":{"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"57":{"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"58":{"title":"def on_after_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"59":{"title":"def get_bot() -> LiteyukiBot","titles":["liteyuki.bot"]},"60":{"title":"def get_config(key: str, default: Any = None) -> Any","titles":["liteyuki.bot"]},"61":{"title":"def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any","titles":["liteyuki.bot"]},"62":{"title":"def print_logo()","titles":["liteyuki.bot"]},"63":{"title":"liteyuki.bot.lifespan","titles":[]},"64":{"title":"class Lifespan","titles":["liteyuki.bot.lifespan"]},"65":{"title":"def __init__(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"66":{"title":"async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"67":{"title":"def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"68":{"title":"def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"69":{"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"70":{"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"71":{"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"72":{"title":"def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"73":{"title":"async def before_start(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"74":{"title":"async def after_start(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"75":{"title":"async def before_process_shutdown(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"76":{"title":"async def after_shutdown(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"77":{"title":"async def before_process_restart(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"78":{"title":"async def after_restart(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"79":{"title":"liteyuki.comm.channel","titles":[]},"80":{"title":"class Channel(Generic[T])","titles":["liteyuki.comm.channel"]},"81":{"title":"def __init__(self, name: str, type_check: Optional[bool] = None)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"82":{"title":"def _get_generic_type(self) -> Optional[type]","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"83":{"title":"def _validate_structure(self, data: Any, structure: type) -> bool","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"84":{"title":"def send(self, data: T)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"85":{"title":"def receive(self) -> T","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"86":{"title":"async def async_receive(self) -> T","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"87":{"title":"def on_receive(self, filter_func: Optional[FILTER_FUNC] = None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"88":{"title":"async def _run_on_receive_funcs(self, data: Any)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"89":{"title":"async def start_receive_loop(self)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"90":{"title":"var active_channel","titles":["liteyuki.comm.channel"]},"91":{"title":"var publish_channel","titles":["liteyuki.comm.channel"]},"92":{"title":"var channel_deliver_active_channel","titles":["liteyuki.comm.channel"]},"93":{"title":"def set_channel(name: str, channel: Channel)","titles":["liteyuki.comm.channel"]},"94":{"title":"def set_channels(channels: dict[str, Channel])","titles":["liteyuki.comm.channel"]},"95":{"title":"def get_channel(name: str) -> Channel","titles":["liteyuki.comm.channel"]},"96":{"title":"def get_channels() -> dict[str, Channel]","titles":["liteyuki.comm.channel"]},"97":{"title":"def on_set_channel(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.channel"]},"98":{"title":"def on_get_channel(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.channel"]},"99":{"title":"def on_get_channels(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.channel"]},"100":{"title":"liteyuki.comm","titles":[]},"101":{"title":"liteyuki.comm","titles":[]},"102":{"title":"liteyuki.comm.event","titles":[]},"103":{"title":"class Event","titles":["liteyuki.comm.event"]},"104":{"title":"def __init__(self, name: str, data: dict[str, Any])","titles":["liteyuki.comm.event","class Event"]},"105":{"title":"liteyuki.comm.rpc","titles":[]},"106":{"title":"class RPC","titles":["liteyuki.comm.rpc"]},"107":{"title":"def __init__(self, on_calling: ON_CALLING_FUNC) -> None","titles":["liteyuki.comm.rpc","class RPC"]},"108":{"title":"def call(self, args: tuple, kwargs: dict) -> Any","titles":["liteyuki.comm.rpc","class RPC"]},"109":{"title":"liteyuki.comm.socks_channel","titles":[]},"110":{"title":"class SocksChannel","titles":["liteyuki.comm.socks_channel"]},"111":{"title":"def __init__(self, name: str)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"112":{"title":"def send(self, data)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"113":{"title":"def receive(self)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"114":{"title":"def close(self)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"115":{"title":"liteyuki.comm.storage","titles":[]},"116":{"title":"var _on_main_subscriber_receive_funcs","titles":["liteyuki.comm.storage"]},"117":{"title":"var _on_sub_subscriber_receive_funcs","titles":["liteyuki.comm.storage"]},"118":{"title":"class KeyValueStore","titles":["liteyuki.comm.storage"]},"119":{"title":"def __init__(self)","titles":["liteyuki.comm.storage","class KeyValueStore"]},"120":{"title":"def set(self, key: str, value: Any) -> None","titles":["liteyuki.comm.storage","class KeyValueStore"]},"121":{"title":"def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]","titles":["liteyuki.comm.storage","class KeyValueStore"]},"122":{"title":"def delete(self, key: str, ignore_key_error: bool = True) -> None","titles":["liteyuki.comm.storage","class KeyValueStore"]},"123":{"title":"def get_all(self) -> dict[str, Any]","titles":["liteyuki.comm.storage","class KeyValueStore"]},"124":{"title":"def publish(self, channel_: str, data: Any) -> None","titles":["liteyuki.comm.storage","class KeyValueStore"]},"125":{"title":"def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]","titles":["liteyuki.comm.storage","class KeyValueStore"]},"126":{"title":"async def run_subscriber_receive_funcs(channel_: str, data: Any)","titles":["liteyuki.comm.storage","class KeyValueStore"]},"127":{"title":"async def start_receive_loop(self)","titles":["liteyuki.comm.storage","class KeyValueStore"]},"128":{"title":"class GlobalKeyValueStore","titles":["liteyuki.comm.storage"]},"129":{"title":"def get_instance(cls)","titles":["liteyuki.comm.storage","class GlobalKeyValueStore"]},"130":{"title":"attr _instance = None","titles":["liteyuki.comm.storage","class GlobalKeyValueStore"]},"131":{"title":"attr _lock = threading.Lock()","titles":["liteyuki.comm.storage","class GlobalKeyValueStore"]},"132":{"title":"var _ref_count","titles":["liteyuki.comm.storage"]},"133":{"title":"def on_get(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"134":{"title":"def on_set(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"135":{"title":"def on_delete(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"136":{"title":"def on_get_all(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"137":{"title":"liteyuki.config","titles":[]},"138":{"title":"def flat_config(config: dict[str, Any]) -> dict[str, Any]","titles":["liteyuki.config"]},"139":{"title":"def load_from_yaml(file_: str) -> dict[str, Any]","titles":["liteyuki.config"]},"140":{"title":"def load_from_json(file_: str) -> dict[str, Any]","titles":["liteyuki.config"]},"141":{"title":"def load_from_toml(file_: str) -> dict[str, Any]","titles":["liteyuki.config"]},"142":{"title":"def load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]","titles":["liteyuki.config"]},"143":{"title":"def load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]","titles":["liteyuki.config"]},"144":{"title":"def load_config_in_default(no_waring: bool = False) -> dict[str, Any]","titles":["liteyuki.config"]},"145":{"title":"liteyuki.core","titles":[]},"146":{"title":"liteyuki.core","titles":[]},"147":{"title":"liteyuki.core.manager","titles":[]},"148":{"title":"class ChannelDeliver","titles":["liteyuki.core.manager"]},"149":{"title":"def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])","titles":["liteyuki.core.manager","class ChannelDeliver"]},"150":{"title":"class ProcessManager","titles":["liteyuki.core.manager"]},"151":{"title":"def __init__(self, lifespan: Lifespan)","titles":["liteyuki.core.manager","class ProcessManager"]},"152":{"title":"async def _run_process(self, name: str)","titles":["liteyuki.core.manager","class ProcessManager"]},"153":{"title":"async def start_all(self)","titles":["liteyuki.core.manager","class ProcessManager"]},"154":{"title":"def add_target(self, name: str, target: TARGET_FUNC, args: tuple = (), kwargs = None)","titles":["liteyuki.core.manager","class ProcessManager"]},"155":{"title":"def join_all(self)","titles":["liteyuki.core.manager","class ProcessManager"]},"156":{"title":"def terminate(self, name: str)","titles":["liteyuki.core.manager","class ProcessManager"]},"157":{"title":"def terminate_all(self)","titles":["liteyuki.core.manager","class ProcessManager"]},"158":{"title":"def is_process_alive(self, name: str) -> bool","titles":["liteyuki.core.manager","class ProcessManager"]},"159":{"title":"liteyuki.dev","titles":[]},"160":{"title":"liteyuki.dev","titles":[]},"161":{"title":"liteyuki.dev.observer","titles":[]},"162":{"title":"var CALLBACK_FUNC","titles":["liteyuki.dev.observer"]},"163":{"title":"var FILTER_FUNC","titles":["liteyuki.dev.observer"]},"164":{"title":"def debounce(wait)","titles":["liteyuki.dev.observer"]},"165":{"title":"class CodeModifiedHandler(FileSystemEventHandler)","titles":["liteyuki.dev.observer"]},"166":{"title":"def on_modified(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"167":{"title":"def on_created(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"168":{"title":"def on_deleted(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"169":{"title":"def on_moved(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"170":{"title":"def on_any_event(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"171":{"title":"def on_file_system_event(directories: tuple[str], recursive: bool = True, event_filter: FILTER_FUNC = None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]","titles":["liteyuki.dev.observer"]},"172":{"title":"liteyuki.dev.plugin","titles":[]},"173":{"title":"def run_plugins(*module_path: str | Path)","titles":["liteyuki.dev.plugin"]},"174":{"title":"liteyuki.exception","titles":[]},"175":{"title":"class LiteyukiException(BaseException)","titles":["liteyuki.exception"]},"176":{"title":"liteyuki","titles":[]},"177":{"title":"var __version__","titles":["liteyuki"]},"178":{"title":"liteyuki.log","titles":[]},"179":{"title":"def get_format(level: str) -> str","titles":["liteyuki.log"]},"180":{"title":"def init_log(config: dict)","titles":["liteyuki.log"]},"181":{"title":"liteyuki.message.event","titles":[]},"182":{"title":"class MessageEvent","titles":["liteyuki.message.event"]},"183":{"title":"def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)","titles":["liteyuki.message.event","class MessageEvent"]},"184":{"title":"def reply(self, message: str | dict[str, Any])","titles":["liteyuki.message.event","class MessageEvent"]},"185":{"title":"liteyuki.message","titles":[]},"186":{"title":"liteyuki.message.matcher","titles":[]},"187":{"title":"class Matcher","titles":["liteyuki.message.matcher"]},"188":{"title":"def __init__(self, rule: Rule, priority: int, block: bool)","titles":["liteyuki.message.matcher","class Matcher"]},"189":{"title":"def handle(self) -> Callable[[EventHandler], EventHandler]","titles":["liteyuki.message.matcher","class Matcher"]},"190":{"title":"async def run(self, event: MessageEvent) -> None","titles":["liteyuki.message.matcher","class Matcher"]},"191":{"title":"liteyuki.message","titles":[]},"192":{"title":"liteyuki.message.on","titles":[]},"193":{"title":"def add_matcher(matcher: Matcher)","titles":["liteyuki.message.on"]},"194":{"title":"def on_message(rule: Rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher","titles":["liteyuki.message.on"]},"195":{"title":"def on_keywords(keywords: list[str], rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher","titles":["liteyuki.message.on"]},"196":{"title":"liteyuki.message.rule","titles":[]},"197":{"title":"var RuleHandlerFunc","titles":["liteyuki.message.rule"]},"198":{"title":"class Rule","titles":["liteyuki.message.rule"]},"199":{"title":"def __init__(self, handler: RuleHandlerFunc)","titles":["liteyuki.message.rule","class Rule"]},"200":{"title":"def __or__(self, other: Rule) -> Rule","titles":["liteyuki.message.rule","class Rule"]},"201":{"title":"def __and__(self, other: Rule) -> Rule","titles":["liteyuki.message.rule","class Rule"]},"202":{"title":"async def __call__(self, event: MessageEvent) -> bool","titles":["liteyuki.message.rule","class Rule"]},"203":{"title":"async def empty_rule(event: MessageEvent) -> bool","titles":["liteyuki.message.rule"]},"204":{"title":"async def is_su_rule(event: MessageEvent) -> bool","titles":["liteyuki.message.rule"]},"205":{"title":"liteyuki.message.session","titles":[]},"206":{"title":"liteyuki.mkdoc","titles":[]},"207":{"title":"class DefType(Enum)","titles":["liteyuki.mkdoc"]},"208":{"title":"attr FUNCTION = 'function'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"209":{"title":"attr METHOD = 'method'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"210":{"title":"attr STATIC_METHOD = 'staticmethod'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"211":{"title":"attr CLASS_METHOD = 'classmethod'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"212":{"title":"attr PROPERTY = 'property'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"213":{"title":"class FunctionInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"214":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"215":{"title":"attr args: list[tuple[str, str]] = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"216":{"title":"attr return_type: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"217":{"title":"attr docstring: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"218":{"title":"attr source_code: str = ''","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"219":{"title":"attr type: DefType = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"220":{"title":"attr is_async: bool = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"221":{"title":"class AttributeInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"222":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"223":{"title":"attr type: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"224":{"title":"attr value: Any = None","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"225":{"title":"attr docstring: str = ''","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"226":{"title":"class ClassInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"227":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"228":{"title":"attr docstring: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"229":{"title":"attr methods: list[FunctionInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"230":{"title":"attr attributes: list[AttributeInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"231":{"title":"attr inherit: list[str] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"232":{"title":"class ModuleInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"233":{"title":"attr module_path: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"234":{"title":"attr functions: list[FunctionInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"235":{"title":"attr classes: list[ClassInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"236":{"title":"attr attributes: list[AttributeInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"237":{"title":"attr docstring: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"238":{"title":"def get_relative_path(base_path: str, target_path: str) -> str","titles":["liteyuki.mkdoc"]},"239":{"title":"def write_to_files(file_data: dict[str, str])","titles":["liteyuki.mkdoc"]},"240":{"title":"def get_file_list(module_folder: str)","titles":["liteyuki.mkdoc"]},"241":{"title":"def get_module_info_normal(file_path: str, ignore_private: bool = True) -> ModuleInfo","titles":["liteyuki.mkdoc"]},"242":{"title":"def generate_markdown(module_info: ModuleInfo, front_matter = None, lang: str = 'zh-CN') -> str","titles":["liteyuki.mkdoc"]},"243":{"title":"def generate_docs(module_folder: str, output_dir: str, with_top: bool = False, lang: str = 'zh-CN', ignored_paths = None)","titles":["liteyuki.mkdoc"]},"244":{"title":"var no_module_name_pyfile_path","titles":["liteyuki.mkdoc"]},"245":{"title":"liteyuki.plugin","titles":[]},"246":{"title":"def get_loaded_plugins() -> dict[str, Plugin]","titles":["liteyuki.plugin"]},"247":{"title":"liteyuki.plugin.load","titles":[]},"248":{"title":"def load_plugin(module_path: str | Path) -> Optional[Plugin]","titles":["liteyuki.plugin.load"]},"249":{"title":"def load_plugins(*plugin_dir: str, *, ignore_warning: bool = True) -> set[Plugin]","titles":["liteyuki.plugin.load"]},"250":{"title":"def format_display_name(display_name: str, plugin_type: PluginType) -> str","titles":["liteyuki.plugin.load"]},"251":{"title":"liteyuki.plugin.manager","titles":[]},"252":{"title":"liteyuki.plugin.model","titles":[]},"253":{"title":"class PluginType(Enum)","titles":["liteyuki.plugin.model"]},"254":{"title":"attr APPLICATION = 'application'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"255":{"title":"attr SERVICE = 'service'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"256":{"title":"attr MODULE = 'module'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"257":{"title":"attr UNCLASSIFIED = 'unclassified'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"258":{"title":"attr TEST = 'test'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"259":{"title":"class PluginMetadata(BaseModel)","titles":["liteyuki.plugin.model"]},"260":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"261":{"title":"attr description: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"262":{"title":"attr usage: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"263":{"title":"attr type: PluginType = PluginType.UNCLASSIFIED","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"264":{"title":"attr author: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"265":{"title":"attr homepage: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"266":{"title":"attr extra: dict[str, Any] = {}","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"267":{"title":"class Plugin(BaseModel)","titles":["liteyuki.plugin.model"]},"268":{"title":"def __hash__(self)","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"269":{"title":"attr model_config = {'arbitrary_types_allowed': True}","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"270":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"271":{"title":"attr module: ModuleType = NO_DEFAULT","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"272":{"title":"attr module_name: str = NO_DEFAULT","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"273":{"title":"attr metadata: Optional[PluginMetadata] = None","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"274":{"title":"liteyuki.plugin","titles":[]},"275":{"title":"def get_loaded_plugins() -> dict[str, Plugin]","titles":["liteyuki.plugin"]},"276":{"title":"liteyuki.plugins.liteecho","titles":[]},"277":{"title":"async def liteecho(event: MessageEvent)","titles":["liteyuki.plugins.liteecho"]},"278":{"title":"liteyuki.plugins.plugin_loader","titles":[]},"279":{"title":"def default_plugins_loader()","titles":["liteyuki.plugins.plugin_loader"]},"280":{"title":"liteyuki.plugins.plugin_loader","titles":[]},"281":{"title":"def default_plugins_loader()","titles":["liteyuki.plugins.plugin_loader"]},"282":{"title":"liteyuki.utils","titles":[]},"283":{"title":"def is_coroutine_callable(call: Callable[..., Any]) -> bool","titles":["liteyuki.utils"]},"284":{"title":"def run_coroutine(*coro: Coroutine)","titles":["liteyuki.utils"]},"285":{"title":"def run_coroutine_in_thread(*coro: Coroutine)","titles":["liteyuki.utils"]},"286":{"title":"def path_to_module_name(path: Path) -> str","titles":["liteyuki.utils"]},"287":{"title":"def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]","titles":["liteyuki.utils"]},"288":{"title":"Channel Communication","titles":[]},"289":{"title":"Introduction","titles":["Channel Communication"]},"290":{"title":"Example","titles":["Channel Communication"]},"291":{"title":"共享内存通信","titles":["Channel Communication"]},"292":{"title":"简介","titles":["Channel Communication","共享内存通信"]},"293":{"title":"示例","titles":["Channel Communication","共享内存通信"]},"294":{"title":"轻雪函数","titles":[]},"295":{"title":"函数文件","titles":["轻雪函数"]},"296":{"title":"命令文档","titles":["轻雪函数"]},"297":{"title":"示例","titles":["轻雪函数","命令文档"]},"298":{"title":"API","titles":["轻雪函数"]},"299":{"title":"结束关键字","titles":["轻雪函数"]},"300":{"title":"简介","titles":[]},"301":{"title":"开始","titles":["简介"]},"302":{"title":"创建插件","titles":["简介","开始"]},"303":{"title":"编写逻辑部分","titles":["简介","开始"]},"304":{"title":"加载插件","titles":["简介","开始"]},"305":{"title":"方法1","titles":["简介","开始","加载插件"]},"306":{"title":"方法2","titles":["简介","开始","加载插件"]},"307":{"title":"简介","titles":[]},"308":{"title":"加载资源包","titles":["简介"]},"309":{"title":"用户协议","titles":[]},"310":{"title":"基础插件","titles":[]},"311":{"title":"轻雪命令liteyuki_command","titles":["基础插件"]},"312":{"title":"命令别名","titles":["基础插件","轻雪命令liteyuki_command"]},"313":{"title":"插件/包管理器 liteyuki_pacman","titles":["基础插件"]},"314":{"title":"命令别名","titles":["基础插件","插件/包管理器 liteyuki_pacman"]},"315":{"title":"用户管理liteyuki_user","titles":["基础插件"]},"316":{"title":"功能插件命令","titles":[]},"317":{"title":"轻雪天气liteyuki_weather","titles":["功能插件命令"]},"318":{"title":"命令别名","titles":["功能插件命令","轻雪天气liteyuki_weather"]},"319":{"title":"统计信息liteyuki_statistics","titles":["功能插件命令"]},"320":{"title":"命令别名","titles":["功能插件命令","统计信息liteyuki_statistics"]}},"dirtCount":0,"index":[["或",{"2":{"319":2}}],["或插件路径",{"2":{"248":2}}],["秒",{"2":{"319":2}}],["小时",{"2":{"319":2}}],["天",{"2":{"319":2}}],["天气",{"2":{"317":1,"318":1}}],["格式",{"2":{"319":1}}],["格式为onebot",{"2":{"311":1}}],["统计时间范围为duration",{"2":{"319":1}}],["统计周期为period",{"2":{"319":1}}],["统计信息",{"2":{"319":1}}],["统计信息liteyuki",{"0":{"319":1},"1":{"320":1}}],["功能",{"2":{"319":1}}],["功能插件命令",{"0":{"316":1},"1":{"317":1,"318":1,"319":1,"320":1}}],["绑定城市",{"2":{"318":1}}],["绑定查询城市",{"2":{"317":1}}],["个人全局生效",{"2":{"317":1}}],["个人信息",{"2":{"315":1}}],["海淀",{"2":{"317":1}}],["北京",{"2":{"317":1}}],["支持中英文",{"2":{"317":2}}],["支持中英文城市名",{"2":{"317":1}}],["支持多个关键词查询",{"2":{"317":1}}],["支持绑定城市",{"2":{"317":1}}],["支持单行注释",{"2":{"295":1}}],["受限于nonebot2钩子函数的依赖注入参数",{"2":{"314":1}}],["帮助",{"2":{"314":1}}],["列表",{"2":{"314":1}}],["列出所有资源包",{"2":{"313":1}}],["列出所有插件",{"2":{"313":1}}],["更改",{"2":{"314":1}}],["更新",{"2":{"314":1}}],["更新插件商店索引",{"2":{"313":1}}],["更新轻雪",{"2":{"311":1,"312":1}}],["全局停用",{"2":{"314":1}}],["全局启用",{"2":{"313":1,"314":1}}],["搜索",{"2":{"314":1}}],["卸载",{"2":{"314":2}}],["卸载资源包",{"2":{"313":1}}],["卸载插件",{"2":{"313":1}}],["私聊所有人可用",{"2":{"313":2}}],["私聊通常为用户id",{"2":{"183":1}}],["当前bot",{"2":{"319":1}}],["当前群聊",{"2":{"319":1}}],["当前会话启用",{"2":{"313":1}}],["当前的轻雪实例",{"2":{"37":2,"59":2}}],["包管理器",{"0":{"313":1},"1":{"314":1}}],["包括子task",{"2":{"296":1}}],["切换图片模式",{"2":{"312":1}}],["状态",{"2":{"312":1}}],["别名",{"2":{"312":1,"314":1,"315":1,"318":1,"320":1}}],["群号",{"2":{"311":1}}],["群聊",{"2":{"312":1}}],["群聊仅群主",{"2":{"311":1,"313":2}}],["群聊通常为群id",{"2":{"183":1}}],["管理员",{"2":{"311":1,"313":2}}],["停用插件",{"2":{"313":2}}],["停用",{"2":{"312":1,"314":1}}],["停用机器人",{"2":{"311":1}}],["停止后",{"2":{"76":2}}],["停止前",{"2":{"75":2}}],["停止",{"2":{"65":2}}],["停止轻雪",{"2":{"27":2,"30":2,"49":2,"52":2}}],["该功能需要commit",{"2":{"311":1}}],["该模块封装通道实现",{"2":{"292":1}}],["该模块用于存放一些开发工具",{"2":{"159":1,"160":1}}],["该模块用于常用配置文件的加载",{"2":{"137":1}}],["该模块用于轻雪主进程和nonebot子进程之间的通信",{"2":{"100":1,"101":1}}],["推荐私聊使用",{"2":{"311":1}}],["推荐在编写html时同时更改对应js代码",{"2":{"307":1}}],["查询目标地实时天气",{"2":{"317":1}}],["查询实时天气",{"2":{"317":1}}],["查询",{"2":{"312":1,"315":1}}],["查询配置项",{"2":{"311":1}}],["查看用户信息菜单",{"2":{"315":1}}],["查看插件帮助",{"2":{"313":1}}],["查看轻雪文档",{"2":{"311":1}}],["查看统计信息和状态",{"2":{"311":1}}],["查看当前bot",{"2":{"311":1}}],["和风天气的天气key",{"2":{"317":1}}],["和",{"2":{"311":1}}],["和10是不一样的",{"2":{"311":1}}],["和config目录下的所有配置文件",{"2":{"144":2}}],["输入值会被执行以转换为正确的类型",{"2":{"311":1}}],["输出",{"2":{"295":1}}],["输出文件夹",{"2":{"243":2}}],["输出文件",{"2":{"239":2}}],["版本",{"2":{"311":1}}],["❌",{"2":{"311":11}}],["超级用户可用",{"2":{"311":1,"313":2}}],["超级用户",{"2":{"311":10,"313":10}}],["重载",{"2":{"314":1}}],["重载所有资源包",{"2":{"313":1}}],["重载资源",{"2":{"312":1}}],["重载轻雪",{"2":{"311":1}}],["重启轻雪",{"2":{"312":1}}],["重启轻雪即可加载插件",{"2":{"305":1}}],["重启轻雪本体",{"2":{"26":2,"48":2}}],["重启后",{"2":{"78":2}}],["重启前",{"2":{"77":2}}],["重启",{"2":{"65":2}}],["举例",{"2":{"311":1}}],["权限",{"2":{"311":1,"313":2,"315":1}}],["说明",{"2":{"311":1,"313":2,"315":1}}],["~代替",{"2":{"310":1}}],["~可以使用插件",{"2":{"310":1}}],["安装插件",{"2":{"313":1}}],["安装",{"2":{"310":1,"314":1}}],["安装的插件",{"2":{"248":2}}],["命令",{"2":{"311":1,"312":1,"313":2,"314":1,"315":2,"317":1,"318":1,"319":1,"320":1}}],["命令别名",{"0":{"312":1,"314":1,"318":1,"320":1},"2":{"310":1,"315":1}}],["命令文档",{"0":{"296":1},"1":{"297":1}}],["且通过安全的方式传输到轻雪的服务器",{"2":{"309":1}}],["且通道标识为",{"2":{"290":1}}],["系统信息及python信息",{"2":{"309":1}}],["内存",{"2":{"309":1}}],["内存共享是线程安全的",{"2":{"292":1}}],["内存共享使得代码编写更加简洁",{"2":{"292":1}}],["分钟",{"2":{"319":2}}],["分发",{"2":{"309":1}}],["分工明确",{"2":{"137":1}}],["修改优先级",{"2":{"313":1}}],["修改",{"2":{"309":1}}],["本项目不会收集用户的任何隐私信息",{"2":{"309":1}}],["本项目遵循mit协议",{"2":{"309":1}}],["本模块用于实现rpc",{"2":{"105":1}}],["本模块定义了一个通用的通道类",{"2":{"79":1}}],["同时用户也应该自行选择可用的资源包",{"2":{"308":1}}],["同步接收数据",{"2":{"85":2}}],["第三方资源包开发者需要注意版本兼容性",{"2":{"308":1}}],["对于主动推送的插件不生效",{"2":{"314":1}}],["对于不同资源包的不同文件",{"2":{"308":1}}],["对外启动方法",{"2":{"153":2}}],["└─",{"2":{"308":1}}],["└───",{"2":{"308":1}}],["└─resource",{"2":{"308":2}}],["├─templates",{"2":{"308":1}}],["├─metadata",{"2":{"308":2}}],["正常的路径应该是这样的",{"2":{"308":1}}],["只需要将其解压到根目录resources目录下即可",{"2":{"308":1}}],["以上内容仅用于项目的优化",{"2":{"309":1}}],["以避免出现无法预料的问题",{"2":{"307":1}}],["以下我们会编写一个简单的插件",{"2":{"303":1}}],["错位等无法预料的事情发生",{"2":{"307":1}}],["异常",{"2":{"307":1}}],["异步任务结束关键字",{"2":{"299":1}}],["异步等待",{"2":{"296":1}}],["异步包装器",{"2":{"287":2}}],["异步接收数据",{"2":{"86":2}}],["欢迎各位投稿资源包到轻雪资源商店",{"2":{"307":1}}],["部分异常信息",{"2":{"309":1}}],["部分内容制作需要一点点前端基础",{"2":{"307":1}}],["部分来源于",{"2":{"282":1}}],["讲起打包成一个新的资源包",{"2":{"307":1}}],["仅需按照原有路径进行文件替换即可",{"2":{"307":1}}],["那么加载b包后",{"2":{"308":1}}],["那么你能够很快就上手",{"2":{"307":1}}],["那么当前所有函数包的task都会被截停销毁",{"2":{"299":1}}],["如果你接触过minecraft的资源包",{"2":{"307":1}}],["如果你想同时输出多行内容可以尝试换行符",{"2":{"295":1}}],["主题包中的html渲染使用js来规定数据的渲染位置",{"2":{"307":1}}],["主题商店提供了一些资源包供你选择",{"2":{"307":1}}],["主进程中",{"2":{"290":1}}],["主进程中通过get",{"2":{"290":1}}],["主进程订阅者接收函数",{"2":{"116":1}}],["主进程创建单例",{"2":{"91":1,"92":1}}],["资源",{"2":{"307":1}}],["资源包管理",{"2":{"313":1}}],["资源包的结构会随着轻雪的更新而有变动",{"2":{"308":1}}],["资源包的制作很简单",{"2":{"307":1}}],["资源包加载遵循一个优先级",{"2":{"308":1}}],["资源包描述",{"2":{"308":1}}],["资源包名称",{"2":{"308":1}}],["资源包通常是以",{"2":{"308":1}}],["资源包",{"2":{"307":1,"314":1}}],["它允许你一定程度上自定义轻雪的外观",{"2":{"307":1}}],["它允许你在轻雪中运行一些自定义的由数据驱动的命令",{"2":{"294":1}}],["字体包",{"2":{"307":1}}],["字符串",{"2":{"242":2}}],["亦可根据用途称为主题包",{"2":{"307":1}}],["保存后轻雪会自动重载nonebot进程",{"2":{"306":1}}],["保持轻雪运行",{"2":{"24":2,"46":2}}],["我们在src",{"2":{"306":1}}],["然后运行python",{"2":{"306":1}}],["方法2",{"0":{"306":1}}],["方法1",{"0":{"305":1}}],["用户管理liteyuki",{"0":{"315":1}}],["用户协议",{"0":{"309":1}}],["用observer的on",{"2":{"303":1}}],["用于统计bot接收到的消息",{"2":{"319":1}}],["用于开发nonebot时进行文件系统变更重载",{"2":{"303":1}}],["用于结束当前已完成function的执行",{"2":{"299":1}}],["用于回复消息",{"2":{"183":1}}],["用于获取和唯一标识",{"2":{"154":2}}],["用于进程间通信",{"2":{"79":1}}],["排除的文件扩展名",{"2":{"303":1}}],["因此插件主要是一些后台任务或者与聊天机器人的通信",{"2":{"303":1}}],["定义插件元数据",{"2":{"302":1}}],["定义变量",{"2":{"296":1}}],["导入轻雪bot和日志",{"2":{"303":1}}],["导入文件系统事件",{"2":{"303":1}}],["导入文件系统观察器",{"2":{"303":1}}],["导入文件夹下多个插件",{"2":{"249":2}}],["导入逻辑部分",{"2":{"302":1}}],["即后加载的资源包会覆盖前面的资源包",{"2":{"308":1}}],["即可创建一个插件",{"2":{"302":1}}],["即不等待",{"2":{"296":1}}],["首先创建一个文件夹",{"2":{"302":1}}],["编写逻辑部分",{"0":{"303":1}}],["编写轻雪函数推荐你使用vs",{"2":{"299":1}}],["编辑时的语法高亮可采取shell格式",{"2":{"295":1}}],["有一个task任务没有完成而await被执行了",{"2":{"299":1}}],["的情况是效率提升的关键",{"2":{"299":1}}],["单线程走到底",{"2":{"299":1}}],["单位s",{"2":{"296":1}}],["避免出现",{"2":{"299":1}}],["所有人",{"2":{"311":1,"313":1,"315":3}}],["所有进程",{"2":{"27":2,"49":2}}],["所以在编写lyfunction时也要注意异步的调用",{"2":{"299":1}}],["由于liteyukibot基于异步运行",{"2":{"299":1}}],["理论上所有基于onebotv11的api都可调用",{"2":{"298":1}}],["则该文件夹不会被识别为资源包",{"2":{"308":1}}],["则需要删除await",{"2":{"297":1}}],["则传入泛型默认开启",{"2":{"81":2}}],["无需手动创建实例",{"2":{"306":1}}],["无需手动初始化bot",{"2":{"173":2}}],["无限戳",{"2":{"297":1}}],["执行",{"2":{"297":1}}],["疯狂戳好友",{"2":{"297":1}}],["否则会导致渲染失败或渲染结果不理想",{"2":{"307":1}}],["否则task对象会被销毁",{"2":{"296":1}}],["否则默认关闭",{"2":{"81":2}}],["需要在最后调用",{"2":{"296":1}}],["需要在对应进程都调度一次",{"2":{"89":2}}],["等待所有异步任务结束",{"2":{"296":1}}],["等待接收数据",{"2":{"86":1}}],["结束关键字",{"0":{"299":1}}],["结束函数关键字",{"2":{"296":1}}],["结构",{"2":{"83":2}}],["使用通用日期简写",{"2":{"319":2}}],["使用此项目代表你已经同意以上协议",{"2":{"309":1}}],["使用开发工具快速运行插件",{"2":{"306":1}}],["使用",{"2":{"297":1}}],["使用新的task执行命令",{"2":{"296":1}}],["使用watchdog监控文件变化并重启bot",{"2":{"161":1}}],["也支持句末注释",{"2":{"295":1}}],["例如npm",{"2":{"310":1}}],["例如nonebot插件中",{"2":{"290":1}}],["例如你在a中定义了templates",{"2":{"308":1}}],["例如html",{"2":{"307":1}}],["例如main",{"2":{"306":1}}],["例如watchdog",{"2":{"302":1,"305":1}}],["例如",{"2":{"295":2,"308":1,"317":1}}],["例如test",{"2":{"295":1,"306":1}}],["函数文件放在资源包的functions目录下",{"2":{"295":1}}],["函数文件",{"0":{"295":1}}],["属于资源包的一部分",{"2":{"294":1}}],["类似于minecraft的mcfunction",{"2":{"294":1}}],["类似于redis",{"2":{"115":1}}],["是可以相对引用的",{"2":{"308":1}}],["是轻雪的一个功能",{"2":{"294":1}}],["是否为协程可调用对象",{"2":{"283":2}}],["是否忽略警告",{"2":{"249":2}}],["是否忽略键不存在的错误",{"2":{"122":2}}],["是否包含顶层文件夹",{"2":{"243":2}}],["是否阻断后续优先级更低的匹配器",{"2":{"188":2}}],["是否递归监听子目录",{"2":{"171":2}}],["是否通过验证",{"2":{"83":2}}],["是否开启类型检查",{"2":{"81":2}}],["示例",{"0":{"293":1,"297":1}}],["线程锁会自动保护共享内存的读写操作",{"2":{"292":1}}],["相比于普通进程通信",{"2":{"292":1}}],["相对路径",{"2":{"239":2}}],["简介",{"0":{"292":1,"300":1,"307":1},"1":{"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"308":1}}],["共享内存通信",{"0":{"291":1},"1":{"292":1,"293":1}}],["共享内存模块",{"2":{"115":1}}],["被动模式",{"2":{"290":1}}],["每隔0",{"2":{"297":1}}],["每行一个命令",{"2":{"295":1}}],["每次接收到字符串数据时都会运行",{"2":{"290":1}}],["每3秒发送一次消息",{"2":{"290":1}}],["每个配置文件给一个或一类服务提供配置",{"2":{"137":1}}],["创建入口文件",{"2":{"306":1}}],["创建插件",{"0":{"302":1}}],["创建子进程的同时会初始化一个被动通道和一个主动通道",{"2":{"290":1}}],["创建asyncio",{"2":{"153":2}}],["路径a",{"2":{"286":2}}],["转换路径为模块名",{"2":{"286":2}}],["可用",{"2":{"311":1}}],["可用参数",{"2":{"311":1}}],["可以在配置文件中把auto",{"2":{"309":1}}],["可以在a的index",{"2":{"308":1}}],["可以在此基础上进行修改",{"2":{"307":1}}],["可以很高程度地扩展轻雪的功能",{"2":{"300":1}}],["可以是本地插件或是通过",{"2":{"248":2}}],["可递归",{"2":{"296":1}}],["可调用对象",{"2":{"283":2}}],["判断是否为协程可调用对象",{"2":{"283":2}}],["一个",{"2":{"302":1}}],["一个键不要多次出现",{"2":{"137":1}}],["一些常用的工具类",{"2":{"282":1}}],["应在初始化时调用",{"2":{"279":2,"281":2}}],["根据不同类型插件设置颜色",{"2":{"250":2}}],["参数列表",{"2":{"311":2}}],["参数为调用set",{"2":{"290":1}}],["参数",{"2":{"248":1,"249":1,"310":1,"319":1}}],["参考\`liteyuki",{"2":{"173":1}}],["参考liteyuki",{"2":{"173":1}}],["加载",{"2":{"314":1}}],["加载资源包",{"0":{"308":1},"2":{"313":1}}],["加载插件",{"0":{"304":1},"1":{"305":1,"306":1}}],["加载插件加载器",{"2":{"21":1,"43":1}}],["加载单个插件",{"2":{"248":2}}],["插件停用只能阻断传入响应",{"2":{"314":1}}],["插件管理",{"2":{"313":1,"314":1}}],["插件",{"0":{"313":1},"1":{"314":1}}],["插件信息",{"2":{"309":1}}],["插件描述",{"2":{"302":1}}],["插件版本",{"2":{"302":1}}],["插件类型",{"2":{"250":2,"302":1}}],["插件名称",{"2":{"248":2,"250":2,"302":1}}],["插件字典",{"2":{"246":2,"275":2}}],["插件路径",{"2":{"173":2}}],["去头路径",{"2":{"244":1}}],["忽略的路径",{"2":{"243":2}}],["忽略私有函数和类",{"2":{"241":2}}],["模块名",{"2":{"286":2}}],["模块文件夹",{"2":{"243":2}}],["模块信息",{"2":{"241":2,"242":2}}],["源代码",{"2":{"242":1,"293":1}}],["语言包等",{"2":{"307":1}}],["语言",{"2":{"242":2,"243":2}}],["自定义选项title",{"2":{"242":2}}],["自动调用",{"2":{"28":2,"50":2}}],["你在a包中定义了一个index",{"2":{"308":1}}],["你自己制作的资源包也应该遵循这个规则",{"2":{"308":1}}],["你也可以自己制作资源包",{"2":{"307":1}}],["你的插件代码",{"2":{"302":1}}],["你可以选择开启auto",{"2":{"309":1}}],["你可以自由使用",{"2":{"309":1}}],["你可以自定义一些信息",{"2":{"308":1}}],["你可以在多个线程中读写共享内存",{"2":{"292":1}}],["你可以通过storage模块实现内存共享通信",{"2":{"292":1}}],["你可在此自定义生成的markdown格式",{"2":{"242":2}}],["你应该使用其他储存方式",{"2":{"137":1}}],["生成文档",{"2":{"243":2}}],["生成模块的markdown",{"2":{"242":2}}],["生命周期管理",{"2":{"21":1,"43":1}}],["文件内容为一系列的命令",{"2":{"295":1}}],["文件名以",{"2":{"295":1}}],["文件夹路径",{"2":{"249":2}}],["文件路径",{"2":{"241":2}}],["文件数据",{"2":{"239":2}}],["目标路径",{"2":{"238":2}}],["基础插件",{"0":{"310":1},"1":{"311":1,"312":1,"313":1,"314":1,"315":1}}],["基础路径",{"2":{"238":2}}],["基于ipc",{"2":{"105":1}}],["添加配置项",{"2":{"311":1}}],["添加sleep",{"2":{"297":1}}],["添加处理函数",{"2":{"189":2}}],["添加进程",{"2":{"154":2}}],["优先级",{"2":{"188":2}}],["规则函数签名",{"2":{"197":1}}],["规则",{"2":{"188":2}}],["匹配器",{"2":{"188":2}}],["回复消息",{"2":{"184":2}}],["附加数据",{"2":{"183":1}}],["原始消息",{"2":{"183":1}}],["消息类型",{"2":{"183":1}}],["消息段数组",{"2":{"183":1}}],["消息",{"2":{"183":1}}],["机器人id",{"2":{"183":1}}],["轻雪天气liteyuki",{"0":{"317":1},"1":{"318":1}}],["轻雪文档",{"2":{"312":1}}],["轻雪命令liteyuki",{"0":{"311":1},"1":{"312":1}}],["轻雪会收集以下内容",{"2":{"309":1}}],["轻雪原版资源包请查看liteyukibot",{"2":{"307":1}}],["轻雪主进程不涉及聊天部分",{"2":{"303":1}}],["轻雪插件是轻雪内置的一部分功能",{"2":{"300":1}}],["轻雪函数",{"0":{"294":1},"1":{"295":1,"296":1,"297":1,"298":1,"299":1},"2":{"294":1}}],["轻雪框架提供了一个内存共享通信的接口",{"2":{"292":1}}],["轻雪抽象消息事件",{"2":{"183":2}}],["轻雪生命周期管理",{"2":{"65":2}}],["⭕",{"2":{"180":1}}],["⚠️",{"2":{"180":1}}],["✅",{"2":{"180":1}}],["ℹ️信息",{"2":{"290":4}}],["ℹ️",{"2":{"180":1}}],["🐛",{"2":{"180":1}}],["在群聊启用",{"2":{"311":1}}],["在普通图片和markdown大图之间切换",{"2":{"311":1}}],["在b中定义了templates",{"2":{"308":1}}],["在配置文件中的liteyuki",{"2":{"305":1}}],["在设备上执行命令",{"2":{"296":1}}],["在发信器输出",{"2":{"295":1}}],["在任意进程中均可使用",{"2":{"293":1}}],["在子进程中",{"2":{"290":1}}],["在轻雪插件中",{"2":{"290":1}}],["在新线程中运行协程",{"2":{"285":2}}],["在语言加载完成后执行",{"2":{"180":2}}],["在主进程中运行",{"2":{"127":2}}],["上午12",{"2":{"252":1}}],["上午11",{"2":{"147":1}}],["上午6",{"2":{"206":1}}],["上午9",{"2":{"178":1}}],["上午5",{"2":{"172":1}}],["返回true则执行回调函数",{"2":{"171":2}}],["事件过滤器",{"2":{"171":2}}],["事件循环",{"2":{"21":1,"43":1}}],["监听目录们",{"2":{"171":2}}],["防抖函数",{"2":{"164":2}}],["防止获取空指针",{"2":{"132":1}}],["位置1为filesystemevent",{"2":{"162":1,"163":1}}],["启用",{"2":{"312":1,"314":1}}],["启用插件后",{"2":{"306":1}}],["启用该模块需要在配置文件中设置dev",{"2":{"161":1}}],["启动所有进程",{"2":{"153":2}}],["启动发布订阅接收器循环",{"2":{"127":2}}],["启动后控制台输出",{"2":{"290":1}}],["启动后",{"2":{"74":2}}],["启动前",{"2":{"73":2}}],["启动",{"2":{"65":2}}],["启动逻辑",{"2":{"22":2,"44":2}}],["此模块用于注册观察者函数",{"2":{"161":1}}],["检查进程是否存活",{"2":{"158":2}}],["终止进程并从进程字典中删除",{"2":{"156":2}}],["进程函数关键字参数",{"2":{"154":2}}],["进程函数参数",{"2":{"154":2}}],["进程函数",{"2":{"154":2}}],["进程名",{"2":{"154":2}}],["进程名称",{"2":{"27":2,"49":2}}],["请阅读插件主页的说明",{"2":{"314":1}}],["请确保您所编写的html代码能被bot解析",{"2":{"307":1}}],["请注意",{"2":{"307":1}}],["请创建task",{"2":{"152":2}}],["请不要将需要动态加载的内容写入配置文件",{"2":{"137":1}}],["并且应该在metadata",{"2":{"308":1}}],["并且不用修改源代码",{"2":{"307":1}}],["并在其中写入一些代码",{"2":{"306":1}}],["并在其中写入以下代码",{"2":{"306":1}}],["并在其中创建一个",{"2":{"302":1}}],["并遵循其许可进行修改",{"2":{"282":1}}],["并添加到进程字典中",{"2":{"152":2}}],["并发运行异步函数",{"2":{"66":2}}],["开始",{"0":{"301":1},"1":{"302":1,"303":1,"304":1,"305":1,"306":1}}],["开始接收数据",{"2":{"89":2}}],["开启后自动监控进程",{"2":{"152":2}}],["项目目录下的配置文件优先",{"2":{"144":2}}],["项目目录下的配置文件优先级高于config目录下的配置文件",{"2":{"137":1}}],["项目目录下的config",{"2":{"144":2}}],["按照读取文件的优先级反向覆盖",{"2":{"143":2}}],["不带key返回配置项列表",{"2":{"311":1}}],["不包含任何隐私信息",{"2":{"309":1}}],["不含隐私部分",{"2":{"309":1}}],["不含插件数据",{"2":{"309":1}}],["不同adapter",{"2":{"298":1}}],["不递归",{"2":{"143":2}}],["不要出现过多的嵌套",{"2":{"137":1}}],["从一个标准的轻雪项目加载配置文件",{"2":{"144":2}}],["从目录下加载配置文件",{"2":{"143":2}}],["从指定文件加载配置项",{"2":{"142":2}}],["但请注意甄别第三方插件的安全性",{"2":{"309":1}}],["但请保证以上三个字段",{"2":{"308":1}}],["但是请保留原作者信息",{"2":{"309":1}}],["但是更加轻量级并且线程安全",{"2":{"115":1}}],["但若出现非单function的情况",{"2":{"299":1}}],["但需单独起篇幅",{"2":{"294":1}}],["但也包含原有的键值对",{"2":{"138":2}}],["扁平化后的配置文件",{"2":{"138":2}}],["扁平化配置文件",{"2":{"138":2}}],["扁平化编写",{"2":{"137":1}}],["注意不要嵌套文件夹",{"2":{"308":1}}],["注意冲突时的优先级",{"2":{"137":1}}],["注册一个函数在nonebot启动后运行",{"2":{"290":1}}],["注册一个函数在轻雪启动后运行",{"2":{"290":1}}],["注册文件系统变化监听器",{"2":{"171":2}}],["注册重启时的函数",{"2":{"71":2}}],["注册重启后的函数",{"2":{"36":2,"58":2,"72":2}}],["注册停止前的函数",{"2":{"69":2}}],["注册停止后的函数",{"2":{"33":2,"55":2,"70":2}}],["注册进程重启前的函数",{"2":{"35":2,"57":2}}],["注册进程停止前的函数",{"2":{"34":2,"56":2}}],["注册启动时的函数",{"2":{"67":2,"68":2}}],["注册启动后的函数",{"2":{"32":2,"54":2}}],["注册启动前的函数",{"2":{"31":2,"53":2}}],["尽量不要冲突",{"2":{"137":1}}],["多配置文件编写原则",{"2":{"137":1}}],["引用计数",{"2":{"132":1}}],["若不存在则返回空",{"2":{"311":1}}],["若不存在则创建于config",{"2":{"311":1}}],["若存在则返回",{"2":{"311":1}}],["若存在则覆盖",{"2":{"311":1}}],["若存在则会覆盖",{"2":{"311":1}}],["若你不希望提供这些信息",{"2":{"309":1}}],["若没有metadata",{"2":{"308":1}}],["若要戳20s后停止",{"2":{"297":1}}],["若函数中启动了其他task",{"2":{"296":1}}],["若有子进程订阅则推送给子进程",{"2":{"127":2}}],["若为空",{"2":{"81":2}}],["运行环境的设备信息",{"2":{"309":1}}],["运行在主进程中",{"2":{"300":1}}],["运行协程",{"2":{"284":2}}],["运行处理函数",{"2":{"190":2}}],["运行插件",{"2":{"173":2}}],["运行订阅者接收函数",{"2":{"126":2}}],["运行接收函数",{"2":{"88":2}}],["订阅者接收消息时的回调",{"2":{"125":2}}],["频道",{"2":{"124":2,"125":2,"126":2}}],["发布消息",{"2":{"124":2}}],["发送函数为同步函数",{"2":{"84":2}}],["发送数据",{"2":{"84":2,"112":2}}],["删除键值对",{"2":{"122":2}}],["值",{"2":{"120":2,"121":2}}],["键值对",{"2":{"123":2}}],["键",{"2":{"120":2,"121":2,"122":2}}],["设置用户信息或打开属性设置菜单",{"2":{"315":1}}],["设置",{"2":{"312":1,"315":1}}],["设置共享内存",{"2":{"293":1}}],["设置后的插件名称",{"2":{"250":2}}],["设置插件名称颜色",{"2":{"250":2}}],["设置键值对",{"2":{"120":2}}],["设置通道实例",{"2":{"93":2,"94":2}}],["关闭通道",{"2":{"114":2}}],["8",{"2":{"109":1,"139":1,"140":1,"141":1,"172":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"239":1,"241":1,"276":1,"277":1,"278":1,"280":1}}],["调用机器人函数",{"2":{"311":1}}],["调用机器人api",{"2":{"311":1}}],["调用重启进程方法",{"2":{"303":1}}],["调用函数",{"2":{"296":1}}],["调用bot",{"2":{"296":1}}],["调用",{"2":{"108":2}}],["通过关键词搜索插件",{"2":{"313":1}}],["通过装饰器注册一个函数在接收到消息时运行",{"2":{"290":1}}],["通常是目录不存在或目录为空",{"2":{"249":2}}],["通常为纯文本的格式",{"2":{"183":1}}],["通常会默认传入chan",{"2":{"154":2}}],["通信",{"2":{"105":1}}],["通道实例",{"2":{"93":2}}],["通道名称",{"2":{"93":2,"94":2,"95":2}}],["通道传递通道",{"2":{"91":1,"92":1}}],["通道id",{"2":{"81":2,"111":2}}],["依赖关系",{"2":{"100":1,"101":1}}],["子进程中获取通道直接导入进程全局单例即可",{"2":{"290":1}}],["子进程中导入单例active",{"2":{"290":1}}],["子进程订阅者接收函数",{"2":{"117":1}}],["子进程初始化时实例化",{"2":{"91":1,"92":1}}],["子进程可用的主动和被动通道",{"2":{"90":1}}],["装饰一个函数在接收到数据后执行",{"2":{"87":2,"171":2}}],["装饰器",{"2":{"87":2,"125":2,"171":2,"189":4}}],["为可选参数",{"2":{"310":1}}],["为必填参数",{"2":{"310":1}}],["为none则不过滤",{"2":{"87":2}}],["为子进程重启时调用",{"2":{"35":2,"57":2}}],["为子进程停止时调用",{"2":{"34":2,"56":2}}],["过滤函数",{"2":{"87":2}}],["接收频道",{"2":{"183":1}}],["接收数据",{"2":{"113":2}}],["接收数据并执行函数",{"2":{"87":2}}],["接收到数据",{"2":{"86":1}}],["会触发最大递归深度限制",{"2":{"297":1}}],["会话负载信息",{"2":{"309":1}}],["会话类型",{"2":{"183":1}}],["会话id",{"2":{"183":1}}],["会阻塞",{"2":{"152":2}}],["会阻塞线程",{"2":{"85":2}}],["会自动判断key版本",{"2":{"317":1}}],["会自动判断主进程和子进程",{"2":{"89":2}}],["会自动识别文件格式",{"2":{"142":2}}],["会挂起等待",{"2":{"86":2}}],["没有异步的必要",{"2":{"84":2}}],["zip格式压缩的",{"2":{"308":1}}],["zip",{"2":{"83":1}}],["zh",{"0":{"242":1,"243":1},"2":{"2":1,"242":2,"243":1}}],["数据",{"2":{"83":2,"84":2,"88":2,"112":2,"113":2,"124":2,"126":2}}],["验证数据结构",{"2":{"83":2}}],["泛型类型",{"2":{"82":2}}],["下午3",{"2":{"109":1}}],["下午12",{"2":{"276":1}}],["下午10",{"2":{"102":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"278":1,"280":1}}],["下午11",{"2":{"79":1,"247":1,"251":1}}],["下午8",{"2":{"63":1}}],["7",{"2":{"63":1,"79":1,"102":1,"147":1,"178":1,"247":1,"251":1,"252":1}}],["|$$$$$",{"2":{"40":1,"62":1}}],["|$$",{"2":{"40":5,"62":5}}],["|",{"0":{"66":1,"173":1,"183":1,"184":1,"248":1},"2":{"40":45,"62":45,"66":1,"173":1,"183":1,"184":1,"248":1}}],["+",{"2":{"40":2,"62":2,"242":2,"286":1}}],["+=",{"2":{"26":1,"48":1,"87":1,"242":15}}],["x26",{"2":{"195":1,"242":4}}],["x1b",{"2":{"40":2,"62":2}}],["x3c",{"2":{"26":1,"40":1,"48":1,"62":1,"180":5,"193":1,"242":8,"248":2,"250":4,"296":6,"317":2,"319":2}}],["兼容键",{"2":{"39":2,"61":2}}],["兼容旧版本",{"2":{"39":2,"61":2}}],["默认普通图片",{"2":{"311":1}}],["默认开启",{"2":{"309":1}}],["默认插件加载器",{"2":{"279":2,"281":2}}],["默认执行扁平化选项",{"2":{"142":2,"143":2}}],["默认值",{"2":{"38":2,"39":2,"60":2,"61":2,"121":2}}],["默认为none",{"2":{"27":2,"49":2}}],["获取用户信息",{"2":{"315":1}}],["获取唯一的轻雪bot实例",{"2":{"303":1}}],["获取共享内存",{"2":{"293":1}}],["获取主动通道",{"2":{"290":1}}],["获取被动通道",{"2":{"290":1}}],["获取已加载的插件",{"2":{"246":2,"275":2}}],["获取函数和类",{"2":{"241":2}}],["获取相对路径",{"2":{"238":2}}],["获取所有键值对",{"2":{"123":2}}],["获取键值对",{"2":{"121":2}}],["获取通道实例",{"2":{"95":2,"96":2}}],["获取通道传递泛型类型",{"2":{"82":2}}],["获取配置",{"2":{"38":2,"39":2,"60":2,"61":2}}],["获取轻雪实例",{"2":{"37":2,"59":2}}],["未实现",{"2":{"33":2,"36":2,"55":2,"58":2}}],["505468b及以后的lagrange",{"2":{"311":1}}],["59",{"2":{"247":1,"251":1}}],["55",{"2":{"196":1}}],["52",{"2":{"192":1}}],["51",{"2":{"186":1}}],["54",{"2":{"109":1}}],["5",{"2":{"24":1,"46":1,"137":1}}],["外部启动接口",{"2":{"23":2,"45":2}}],["信号处理",{"2":{"21":1,"25":2,"43":1,"47":2}}],["初始化通道",{"2":{"81":2,"111":2}}],["初始化轻雪",{"2":{"28":2,"50":2}}],["初始化轻雪实例",{"2":{"21":2,"43":2}}],["初始化",{"2":{"21":1,"43":1}}],["=none",{"2":{"27":1,"49":1,"81":1,"87":1,"121":1,"183":2}}],["==",{"2":{"26":3,"48":3,"89":1,"96":1,"97":2,"98":2,"99":1,"127":1,"132":1,"133":2,"134":2,"135":2,"136":1,"152":2,"179":1,"241":4,"242":2,"286":1}}],["=",{"0":{"26":1,"27":1,"38":1,"39":1,"48":1,"49":1,"60":1,"61":1,"81":1,"87":1,"121":1,"122":1,"130":1,"131":1,"142":1,"143":1,"144":1,"154":2,"171":2,"183":2,"194":3,"195":3,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"241":1,"242":2,"243":3,"249":1,"254":1,"255":1,"256":1,"257":1,"258":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"21":7,"26":6,"27":2,"43":7,"48":6,"49":2,"65":7,"66":2,"81":10,"83":1,"84":1,"85":1,"86":2,"87":1,"89":2,"93":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":2,"107":1,"111":4,"119":6,"120":2,"121":2,"122":1,"123":1,"125":2,"127":1,"129":1,"133":3,"134":2,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":5,"151":3,"152":4,"154":5,"156":1,"164":3,"171":2,"173":4,"180":1,"183":10,"184":1,"188":5,"194":1,"199":1,"240":1,"241":17,"242":16,"243":13,"248":12,"249":6,"250":5,"283":1,"284":2,"286":1,"287":1,"290":5,"293":1,"302":1,"303":2}}],["常规操作",{"2":{"21":1,"43":1}}],[">=",{"2":{"188":1}}],[">",{"2":{"21":1,"37":1,"38":1,"39":1,"43":1,"59":1,"60":1,"61":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"85":1,"86":1,"87":3,"95":1,"96":1,"107":1,"108":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":2,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"158":1,"164":1,"171":2,"179":1,"189":2,"190":1,"194":1,"195":1,"200":2,"201":2,"202":1,"203":1,"204":1,"238":1,"241":1,"242":3,"243":1,"246":1,"248":1,"249":1,"250":3,"275":1,"283":1,"286":2,"287":1,"317":2}}],["配置项",{"2":{"317":1}}],["配置项目",{"2":{"138":2}}],["配置了命令别名的命令可以使用别名代替原命令",{"2":{"310":1}}],["配置文件尽量扁平化",{"2":{"137":1}}],["配置值",{"2":{"38":2,"39":2,"60":2,"61":2}}],["配置键",{"2":{"38":2,"39":2,"60":2,"61":2}}],["配置",{"2":{"21":3,"43":3,"312":1}}],["31",{"2":{"276":1}}],["34m",{"2":{"40":1,"62":1}}],["3",{"2":{"18":1,"137":1,"177":1,"249":1,"290":1}}],["300~500mb",{"2":{"15":1}}],["6",{"2":{"18":1,"177":1}}],["测试版本号",{"2":{"18":1,"177":1}}],["$$$$",{"2":{"40":1,"62":1}}],["$$$$$",{"2":{"40":1,"62":1}}],["$$$$$$$$",{"2":{"40":4,"62":4}}],["$$$$$$",{"2":{"40":5,"62":5}}],["$$",{"2":{"40":54,"62":54}}],["$",{"2":{"13":3}}],["kill",{"2":{"156":1}}],["k",{"2":{"83":4,"138":2,"242":2}}],["keyword",{"2":{"195":2}}],["keywords为城市名",{"2":{"317":2}}],["keywords",{"0":{"195":2},"2":{"195":5,"313":1,"317":2}}],["keyerror",{"2":{"122":1,"152":1}}],["keyvaluestore",{"0":{"118":1},"1":{"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1},"2":{"129":1}}],["keys",{"0":{"39":1,"61":1},"2":{"39":4,"61":4}}],["key",{"0":{"38":1,"39":1,"60":1,"61":1,"120":1,"121":1,"122":2},"2":{"38":4,"39":11,"60":4,"61":11,"120":7,"121":7,"122":13,"133":3,"134":3,"135":3,"138":2,"293":2,"311":4,"315":2,"317":1}}],["keyboardinterrupt",{"2":{"23":1,"24":1,"45":1,"46":1}}],["keep",{"0":{"24":1,"46":1},"2":{"22":1,"24":1,"44":1,"46":1}}],["kwargs=none",{"2":{"154":1}}],["kwargs=self",{"2":{"152":1}}],["kwargs",{"0":{"21":1,"28":1,"43":1,"50":1,"66":1,"108":1,"154":1},"2":{"21":4,"28":1,"43":4,"50":1,"66":3,"108":2,"154":5,"164":2,"287":2,"311":2}}],["kritor",{"2":{"8":1}}],["know",{"2":{"6":2}}],["qq群号",{"2":{"319":1}}],["qq",{"0":{"8":1},"2":{"7":1,"8":3}}],["question",{"2":{"6":1}}],["questions",{"0":{"6":1,"7":1,"16":1}}],["quot",{"2":{"3":2,"299":2,"311":2,"317":4}}],["js",{"2":{"8":1}}],["json",{"0":{"140":1},"2":{"0":2,"140":5,"142":2,"144":1}}],["join",{"0":{"155":1},"2":{"7":1,"26":1,"48":1,"143":1,"155":2,"156":1,"240":1,"242":4,"243":1,"249":2,"286":2}}],["g",{"2":{"250":1,"320":1}}],["group",{"2":{"183":2,"311":9,"312":1,"313":2,"319":3,"320":1}}],["group775840726",{"2":{"7":1}}],["green>",{"2":{"180":1}}],["gather",{"2":{"66":1,"284":1}}],["getattr",{"2":{"283":1}}],["get",{"0":{"37":1,"38":1,"39":1,"59":1,"60":1,"61":1,"82":1,"95":1,"96":1,"98":1,"99":1,"121":1,"123":1,"129":1,"133":1,"136":1,"179":1,"238":1,"240":1,"241":1,"246":1,"275":1},"2":{"27":2,"37":2,"38":3,"39":5,"49":2,"59":2,"60":3,"61":5,"66":1,"81":2,"82":2,"84":1,"86":1,"95":2,"96":2,"97":1,"98":4,"99":3,"120":1,"121":4,"122":1,"123":2,"129":1,"132":1,"133":3,"135":1,"136":3,"152":1,"153":1,"173":1,"179":1,"180":2,"238":1,"240":1,"241":5,"243":3,"244":1,"246":1,"248":3,"249":1,"275":1,"279":2,"281":2,"284":1,"290":8,"293":1,"303":2,"311":3,"312":1,"315":2}}],["generic",{"0":{"80":1,"82":1},"1":{"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1},"2":{"81":2,"82":1,"84":1}}],["generate",{"0":{"242":1,"243":1},"2":{"0":1,"242":1,"243":3}}],["gensokyo",{"2":{"8":1}}],["globalkeyvaluestore",{"0":{"128":1},"1":{"129":1,"130":1,"131":1}}],["global",{"2":{"21":1,"43":1,"87":1,"313":2,"314":2}}],["gt",{"0":{"21":1,"37":1,"38":1,"39":1,"43":1,"59":1,"60":1,"61":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"85":1,"86":1,"87":1,"95":1,"96":1,"107":1,"108":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"158":1,"171":1,"179":1,"189":1,"190":1,"194":1,"195":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"241":1,"242":1,"246":1,"248":1,"249":1,"250":1,"275":1,"283":1,"286":1,"287":1},"2":{"100":3,"101":3,"138":1,"188":1,"286":1,"310":1,"311":7,"313":10,"315":2}}],["go",{"2":{"8":2,"289":1}}],["github",{"2":{"7":1,"12":1,"13":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["git",{"2":{"6":1,"12":2,"13":1,"15":2}}],["\`pathlib",{"2":{"248":1}}],["\`path",{"2":{"248":1}}],["\`pip\`",{"2":{"248":1}}],["\`",{"2":{"3":1,"242":14,"248":1}}],["validate",{"0":{"83":1},"2":{"83":4,"84":1}}],["value=ast",{"2":{"241":1}}],["values",{"2":{"153":1}}],["valueerror",{"2":{"81":2,"93":1}}],["value2",{"2":{"2":1}}],["value1",{"2":{"2":1}}],["value",{"0":{"120":1,"224":1},"2":{"2":1,"3":3,"120":6,"134":3,"138":3,"241":6,"242":3,"293":2,"311":2,"315":1}}],["var=value",{"2":{"296":1}}],["var2=value2",{"2":{"296":1}}],["var1=value1>",{"2":{"296":1}}],["var",{"0":{"18":1,"90":1,"91":1,"92":1,"116":1,"117":1,"132":1,"162":1,"163":1,"177":1,"197":1,"244":1},"2":{"242":2}}],["version=",{"2":{"302":1}}],["version",{"0":{"18":1,"177":1},"2":{"15":1,"308":1}}],["venv",{"2":{"12":4}}],["v",{"2":{"13":2,"138":2,"242":2}}],["view",{"2":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["virtual",{"2":{"6":1,"12":3}}],["visit",{"2":{"3":1}}],["v11协议api",{"2":{"311":2}}],["v11",{"2":{"3":1,"298":1}}],["2s戳两次",{"2":{"297":1}}],["22",{"2":{"276":1}}],["27",{"2":{"147":1,"178":1}}],["25",{"2":{"109":1}}],["21",{"2":{"79":1}}],["26",{"2":{"79":1,"102":1}}],["24",{"2":{"63":1,"252":1}}],["23",{"2":{"63":1,"206":1,"247":1,"251":1}}],["20代替空格",{"2":{"311":1}}],["20和end",{"2":{"297":1}}],["2024",{"2":{"63":2,"79":2,"102":2,"109":2,"147":2,"172":2,"178":2,"181":2,"185":2,"186":2,"191":2,"192":2,"196":2,"205":2,"206":2,"247":2,"251":2,"252":2,"276":2,"278":2,"280":2}}],["2020",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["20216",{"2":{"1":1,"3":1,"13":4}}],["20",{"2":{"15":1}}],["2019+",{"2":{"15":1}}],["2",{"2":{"2":1,"137":1,"152":1,"297":1,"308":1}}],["object",{"2":{"289":1}}],["observer",{"0":{"161":1},"1":{"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1},"2":{"171":1,"303":2}}],["occurred",{"2":{"284":1}}],["occupy",{"2":{"15":1}}],["os",{"2":{"142":1,"143":3,"238":1,"239":4,"240":2,"241":1,"243":2,"249":9,"303":2}}],["outlook",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["output",{"0":{"243":1},"2":{"2":1,"243":6}}],["option",{"2":{"310":1}}],["optional",{"0":{"27":1,"49":1,"81":1,"82":1,"87":1,"121":2,"183":2,"248":1,"273":1},"2":{"27":1,"49":1,"81":1,"82":3,"87":1,"119":2,"121":3,"183":2,"248":1}}],["opt",{"2":{"248":3}}],["open",{"2":{"26":1,"48":1,"139":1,"140":1,"141":1,"239":1,"241":1}}],["openshamrock",{"2":{"8":1}}],["order",{"2":{"243":1}}],["orig",{"2":{"82":2}}],["or",{"0":{"200":1},"2":{"4":1,"6":2,"15":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":2,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":3,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":5,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["of",{"0":{"3":1},"2":{"6":3,"9":1,"13":1,"15":1,"84":1,"93":1,"248":1}}],["other",{"0":{"2":1,"4":1,"7":1,"16":1,"200":1,"201":1},"2":{"2":1,"3":1,"9":1,"15":2,"183":1,"200":2,"201":2,"289":3}}],["one",{"2":{"6":1,"290":1}}],["onebotv11",{"2":{"8":4}}],["onebot",{"0":{"3":1},"2":{"2":2,"3":2,"4":1,"6":2,"8":1,"298":1,"311":1}}],["only",{"2":{"0":1,"6":1,"87":1,"290":1}}],["on",{"0":{"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"87":1,"88":1,"97":1,"98":1,"99":1,"107":2,"116":1,"117":1,"125":3,"133":1,"134":1,"135":1,"136":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"192":1,"194":1,"195":1},"1":{"193":1,"194":1,"195":1},"2":{"0":1,"3":1,"6":1,"7":1,"8":4,"12":1,"15":3,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":3,"32":3,"33":3,"34":3,"35":3,"36":3,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":3,"54":3,"55":3,"56":3,"57":3,"58":3,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":3,"82":1,"83":1,"84":1,"85":1,"86":1,"87":5,"88":4,"89":4,"93":1,"94":1,"95":1,"96":2,"97":4,"98":4,"99":3,"104":1,"107":5,"108":2,"111":1,"112":1,"113":1,"114":1,"116":1,"117":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":12,"126":2,"127":1,"129":1,"132":1,"133":4,"134":4,"135":4,"136":3,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":3,"167":3,"168":3,"169":3,"170":3,"171":3,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"192":1,"193":1,"194":2,"195":5,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"276":1,"277":2,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1,"290":6,"303":1}}],["45m",{"2":{"319":2}}],["44",{"2":{"185":1,"191":1}}],["47",{"2":{"102":1,"181":1,"205":1}}],["41",{"2":{"13":1}}],["40",{"2":{"13":1}}],["4",{"2":{"1":1,"137":1}}],["utils",{"0":{"282":1},"1":{"283":1,"284":1,"285":1,"286":1,"287":1}}],["utf",{"2":{"139":1,"140":1,"141":1,"239":1,"241":1}}],["ubuntu",{"2":{"15":1}}],["unload",{"2":{"313":1,"314":1}}],["until",{"2":{"284":2}}],["unclassified",{"0":{"257":2,"263":1}}],["unparse",{"2":{"241":10}}],["unknown",{"2":{"152":1}}],["unsupported",{"2":{"142":1}}],["underlying",{"2":{"10":1}}],["uninstall",{"2":{"6":2,"313":1,"314":1}}],["usage",{"0":{"262":1}}],["using",{"2":{"6":2,"13":1}}],["user",{"0":{"183":1,"315":1},"2":{"183":3,"184":2,"204":1,"297":3}}],["used",{"2":{"87":1,"290":1}}],["use",{"0":{"14":1},"2":{"1":1,"3":2,"4":2,"6":6,"8":1,"12":4,"13":1,"14":1,"15":2,"39":1,"61":1,"248":1}}],["updates",{"2":{"1":1}}],["update",{"2":{"1":2,"2":2,"6":1,"15":2,"142":3,"143":1,"144":1,"311":1,"312":1,"313":1,"314":1}}],["flat",{"0":{"138":1},"2":{"138":2,"139":1,"140":1,"141":1}}],["flag",{"2":{"65":1}}],["f",{"2":{"26":1,"27":2,"39":1,"48":1,"49":2,"61":1,"81":4,"84":1,"89":2,"93":2,"138":1,"139":1,"140":1,"141":1,"142":2,"143":1,"152":4,"156":2,"158":1,"239":2,"242":19,"243":1,"248":5,"249":9,"250":1,"284":1,"290":2,"303":1}}],["friend",{"2":{"297":2}}],["front",{"0":{"242":1},"2":{"242":6,"243":3}}],["from",{"0":{"139":1,"140":1,"141":1,"142":1,"143":1},"2":{"85":1,"139":4,"140":4,"141":4,"142":4,"143":2,"144":2,"289":1,"290":4,"302":1,"303":3}}],["frame",{"0":{"25":1,"47":1},"2":{"25":3,"47":3}}],["framework",{"2":{"10":1,"289":1}}],["frequently",{"0":{"6":1}}],["future",{"2":{"284":1}}],["func=none",{"2":{"171":1}}],["func=lambda",{"2":{"96":1,"97":2,"98":2,"99":1,"290":1}}],["funcs",{"0":{"66":2,"88":1,"116":1,"117":1,"126":1},"2":{"65":6,"66":5,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":2,"74":2,"75":2,"76":2,"77":2,"78":2,"87":1,"88":3,"89":1,"125":6,"126":2,"127":1}}],["func",{"0":{"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"66":2,"67":3,"68":3,"69":3,"70":3,"71":3,"72":3,"87":2,"107":1,"125":2,"154":1,"162":1,"163":1,"171":3,"287":1},"2":{"31":5,"32":5,"33":5,"34":5,"35":5,"36":5,"53":5,"54":5,"55":5,"56":5,"57":5,"58":5,"65":6,"66":6,"67":9,"68":9,"69":9,"70":9,"71":9,"72":9,"81":2,"87":20,"88":6,"89":1,"107":1,"116":1,"117":1,"125":8,"126":2,"154":1,"164":2,"171":7,"241":2,"242":9,"283":2,"287":5,"296":1}}],["function实现语法高亮",{"2":{"299":1}}],["functiondef",{"2":{"241":3}}],["functioninfo",{"0":{"213":1,"229":1,"234":1},"1":{"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1},"2":{"241":2}}],["functions=",{"2":{"241":1}}],["functions",{"0":{"234":1},"2":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"241":1,"242":1}}],["function",{"0":{"208":2},"2":{"6":2,"15":2,"89":1,"241":3,"290":1,"294":1,"296":1,"297":2,"311":3}}],["full",{"2":{"6":1,"290":1}}],["failed",{"2":{"6":2,"248":1}}],["faq",{"0":{"5":1},"1":{"6":1,"7":1,"8":1,"9":1,"10":1}}],["false时例如docs",{"2":{"243":2}}],["false",{"0":{"142":1,"143":1,"144":1,"194":1,"195":1,"243":1},"2":{"2":4,"81":2,"83":4,"111":1,"119":2,"283":1}}],["folder",{"0":{"240":1,"243":1},"2":{"240":2,"243":5,"244":1}}],["following",{"2":{"2":1}}],["found",{"2":{"84":1,"93":1,"142":1,"143":1,"152":1,"156":1,"158":1}}],["font",{"2":{"10":1}}],["fonts",{"2":{"1":1}}],["format=get",{"2":{"180":1}}],["formats",{"2":{"143":1}}],["format",{"0":{"179":1,"250":1},"2":{"142":1,"179":3,"180":1,"248":2,"250":1}}],["for",{"0":{"16":1},"2":{"1":1,"3":2,"6":2,"8":1,"27":1,"39":1,"49":1,"61":1,"66":1,"81":1,"83":3,"88":2,"89":2,"94":1,"126":1,"138":2,"142":1,"143":2,"153":3,"155":1,"157":1,"171":1,"190":1,"193":1,"195":1,"239":1,"240":2,"241":12,"242":9,"243":3,"249":2,"279":2,"281":2,"284":2,"289":1,"290":1,"302":1}}],["filter=lambda",{"2":{"303":1}}],["filter",{"0":{"87":2,"163":1,"171":2},"2":{"87":8,"96":1,"97":2,"98":2,"99":1,"171":6,"290":1}}],["file",{"0":{"139":1,"140":1,"141":1,"171":1,"239":1,"240":1,"241":1},"2":{"3":1,"6":1,"63":1,"79":1,"102":1,"109":1,"139":5,"140":5,"141":5,"142":12,"143":3,"147":1,"171":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"239":4,"240":7,"241":9,"243":6,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1,"303":3}}],["filesystemeventhandler",{"0":{"165":1},"1":{"166":1,"167":1,"168":1,"169":1,"170":1}}],["filesystemevent",{"2":{"162":1,"163":1,"171":1,"303":2}}],["files",{"0":{"142":2,"239":1},"2":{"0":4,"142":3,"143":1,"144":1,"239":1,"240":2,"243":1}}],["fill",{"2":{"1":1,"3":1}}],["fields",{"2":{"0":1,"3":2}}],["first",{"2":{"0":1,"6":1,"241":2}}],["b包也定义了一个index",{"2":{"308":1}}],["block",{"0":{"188":1,"194":1,"195":1},"2":{"188":5,"194":2,"195":2}}],["blue>",{"2":{"180":1}}],["break",{"2":{"152":1,"193":1}}],["browser",{"2":{"6":1}}],["b",{"2":{"138":3,"243":4,"286":4,"320":1}}],["body",{"2":{"241":1}}],["bool=false",{"2":{"142":1,"143":1,"144":1,"194":1,"195":1,"243":1}}],["bool=true",{"2":{"122":1,"171":1,"241":1,"249":1}}],["bool",{"0":{"81":1,"83":1,"122":1,"142":1,"143":1,"144":1,"158":1,"171":1,"188":1,"194":1,"195":1,"202":1,"203":1,"204":1,"220":1,"241":1,"243":1,"249":1,"283":1},"2":{"81":1,"83":3,"158":1,"163":1,"188":1,"197":1,"200":1,"201":1,"202":1,"203":1,"204":1,"283":3}}],["bot",{"0":{"19":1,"37":1,"41":1,"59":1,"63":1,"183":1},"1":{"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1},"2":{"1":1,"2":1,"6":2,"9":1,"12":1,"15":1,"21":2,"37":4,"38":1,"39":4,"43":2,"59":4,"60":1,"61":4,"173":2,"183":4,"184":2,"290":4,"295":1,"303":2,"311":1,"319":3,"320":1}}],["build",{"2":{"13":2}}],["but",{"2":{"3":1,"6":1,"290":1}}],["bind",{"2":{"318":1}}],["binding",{"2":{"1":1}}],["bin",{"2":{"12":1}}],["bases",{"2":{"241":1}}],["base",{"0":{"238":1},"2":{"238":4,"241":2}}],["basemodel",{"0":{"213":1,"221":1,"226":1,"232":1,"259":1,"267":1},"1":{"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1}}],["baseexception",{"0":{"175":1}}],["based",{"2":{"8":4}}],["bash",{"2":{"12":1}}],["basically",{"2":{"3":1}}],["basic",{"0":{"1":1}}],["before",{"0":{"31":1,"34":1,"35":1,"53":1,"56":1,"57":1,"67":1,"69":1,"71":1,"73":1,"75":1,"77":1},"2":{"22":1,"31":2,"34":2,"35":2,"44":1,"53":2,"56":2,"57":2,"65":3,"67":2,"69":2,"71":2,"73":3,"75":3,"77":3,"152":3}}],["below",{"2":{"6":1}}],["been",{"2":{"6":1}}],["between",{"2":{"6":1}}],["be",{"2":{"3":1,"6":2,"15":1,"39":1,"61":1,"84":1,"87":1,"93":1,"166":1,"290":1}}],["by",{"2":{"3":1,"4":1,"6":2,"290":1}}],["14s",{"2":{"319":2}}],["1h",{"2":{"319":2}}],["1d",{"2":{"319":2}}],["1145141919810",{"2":{"311":1}}],["11",{"2":{"278":1,"280":1}}],["19",{"2":{"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1}}],["1919810",{"2":{"1":1}}],["18",{"2":{"172":1}}],["12",{"2":{"147":1,"178":1}}],["127",{"2":{"1":1,"3":1}}],["10",{"2":{"18":1,"177":1,"311":1}}],["10+",{"2":{"12":1,"15":1}}],["1gb",{"2":{"15":2}}],["1vcpu",{"2":{"15":1}}],["1",{"2":{"1":1,"2":1,"3":1,"26":2,"27":2,"48":2,"49":2,"87":1,"97":2,"98":2,"99":1,"127":2,"133":3,"134":2,"135":1,"136":1,"137":1,"138":3,"152":2,"165":1,"166":1,"242":6,"243":1,"248":4,"286":2,"302":1,"308":2}}],["03",{"2":{"290":2}}],["0000",{"2":{"290":3}}],["00",{"2":{"290":18}}],["02",{"2":{"252":1,"278":1,"280":1}}],["04",{"2":{"172":1}}],["04+",{"2":{"15":1}}],["0m",{"2":{"40":1,"62":1}}],["0",{"0":{"26":1,"48":1,"194":1,"195":1},"2":{"1":2,"3":2,"21":1,"24":1,"25":1,"26":1,"43":1,"46":1,"47":1,"48":1,"65":1,"82":1,"83":1,"89":1,"96":1,"97":2,"98":2,"99":1,"127":1,"132":2,"133":2,"134":2,"135":2,"136":1,"152":2,"188":2,"241":1,"242":7,"297":1,"302":2,"308":2}}],["html中用",{"2":{"308":1}}],["html",{"2":{"308":1}}],["html文件会被覆盖",{"2":{"308":1}}],["html文件",{"2":{"308":2}}],["https",{"2":{"12":1,"13":1}}],["hint",{"2":{"81":1,"241":1,"242":1}}],["handlers",{"2":{"188":1,"189":1,"190":1}}],["handler",{"0":{"199":1},"2":{"171":3,"189":5,"190":2,"199":3,"200":4,"201":4,"202":2}}],["handle",{"0":{"25":1,"47":1,"189":1},"2":{"6":1,"21":2,"25":1,"43":2,"47":1,"189":1,"276":1,"277":1}}],["hash",{"0":{"268":1},"2":{"268":2}}],["hasattr",{"2":{"82":1}}],["has",{"2":{"6":1}}],["have",{"2":{"3":1,"6":3,"7":1,"13":1,"15":1}}],["homepage",{"0":{"265":1}}],["how",{"2":{"6":2}}],["host",{"2":{"1":1}}],["hello",{"2":{"295":5,"311":1}}],["help",{"2":{"6":2,"313":1,"314":1}}],["here",{"2":{"3":2}}],["header",{"2":{"1":1,"6":1}}],["echo",{"2":{"295":3}}],["e",{"2":{"122":2,"248":1,"250":1,"284":2}}],["emsp",{"2":{"242":4}}],["email",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["empty",{"0":{"194":1,"195":1,"203":1},"2":{"1":1,"203":1,"248":1,"249":1}}],["else",{"2":{"26":1,"27":1,"37":1,"48":1,"49":1,"59":1,"66":1,"81":1,"87":2,"88":1,"93":1,"95":1,"96":1,"120":1,"121":1,"122":1,"123":1,"125":2,"139":1,"140":1,"141":1,"152":1,"179":1,"180":5,"193":1,"241":9,"242":10,"243":2,"248":2,"284":1,"286":1}}],["elif",{"2":{"26":2,"48":2,"81":1,"83":3,"87":1,"142":4,"152":1,"241":5,"248":2,"249":1}}],["event装饰器监听文件系统事件",{"2":{"303":1}}],["events",{"2":{"303":1}}],["eventhandler",{"0":{"189":2},"2":{"188":1,"189":4}}],["event",{"0":{"102":1,"103":1,"166":1,"167":1,"168":1,"169":1,"170":2,"171":2,"181":1,"190":1,"202":1,"203":1,"204":1,"277":1},"1":{"103":1,"104":2,"182":1,"183":1,"184":1},"2":{"21":4,"24":1,"30":1,"43":4,"46":1,"52":1,"100":1,"101":1,"102":1,"166":1,"167":2,"168":2,"169":2,"170":3,"171":9,"181":1,"184":2,"190":5,"195":2,"200":3,"201":3,"202":2,"203":1,"204":2,"277":3,"284":2,"303":8}}],["every",{"2":{"1":1}}],["errors=true",{"2":{"243":1}}],["errors",{"2":{"6":1}}],["error",{"0":{"122":1},"2":{"6":1,"122":4,"180":2,"284":1}}],["extra",{"0":{"266":1}}],["extensions",{"2":{"303":2}}],["extend",{"2":{"173":1}}],["external",{"2":{"1":1}}],["exclude",{"2":{"303":2}}],["exc",{"2":{"190":1,"248":1}}],["exception模块包含了liteyuki运行中的所有错误",{"2":{"174":1}}],["exception",{"0":{"174":1},"1":{"175":1},"2":{"190":1,"248":1,"284":2}}],["except",{"2":{"23":1,"24":1,"45":1,"46":1,"122":1,"190":1,"248":1,"284":2}}],["executor",{"2":{"86":1}}],["executable",{"2":{"6":1,"15":1,"26":3,"48":3}}],["exist",{"2":{"249":1}}],["exists",{"2":{"81":2,"93":1,"142":1,"143":1,"239":1,"249":2}}],["exit",{"0":{"25":1,"47":1},"2":{"21":2,"25":2,"26":1,"43":2,"47":2,"48":1}}],["example",{"0":{"3":1,"290":1},"2":{"6":2}}],["end",{"2":{"296":1}}],["endswith",{"2":{"142":3,"143":1,"240":1,"249":1,"303":1}}],["enum",{"0":{"207":1,"253":1},"1":{"208":1,"209":1,"210":1,"211":1,"212":1,"254":1,"255":1,"256":1,"257":1,"258":1}}],["enumerate",{"2":{"193":1}}],["encoding=",{"2":{"139":1,"140":1,"141":1,"239":1,"241":1}}],["encountered",{"2":{"9":1}}],["enforcing",{"2":{"81":1}}],["environment",{"2":{"12":4}}],["environments",{"2":{"3":1,"6":1,"15":1}}],["enter",{"2":{"6":1}}],["ensure",{"2":{"1":1,"284":1}}],["enable",{"2":{"1":1,"311":2,"312":1,"313":2,"314":2}}],["msg",{"2":{"311":1}}],["mcfunction",{"2":{"295":2}}],["mkdir",{"2":{"243":1}}],["mkdoc",{"0":{"206":1},"1":{"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1},"2":{"206":1}}],["md",{"2":{"243":15}}],["m",{"2":{"12":1,"15":1,"193":2,"250":1,"320":1}}],["minimum",{"2":{"15":1}}],["minecraftonebot",{"2":{"9":1}}],["minecraft",{"0":{"9":1},"2":{"9":1}}],["misans",{"2":{"10":1}}],["must",{"2":{"84":1,"93":1,"166":1}}],["much",{"2":{"6":1}}],["multiple",{"2":{"0":1,"15":1}}],["my",{"2":{"6":1}}],["member",{"2":{"311":1}}],["memory",{"2":{"15":1,"119":3,"132":1,"133":3,"134":3,"135":3,"136":2,"153":1,"154":1,"289":1,"293":3}}],["meta",{"2":{"248":4,"302":1}}],["metadata",{"0":{"273":1},"2":{"248":13}}],["method",{"0":{"209":2,"210":1,"211":1},"2":{"241":5,"242":13}}],["methods=",{"2":{"241":1}}],["methods",{"0":{"229":1},"2":{"3":1,"241":1,"242":1}}],["means",{"2":{"6":1}}],["message=",{"2":{"184":1,"311":1}}],["message=message",{"2":{"184":1}}],["messageevent",{"0":{"182":1,"183":1,"190":1,"202":1,"203":1,"204":1,"277":1},"1":{"183":1,"184":1},"2":{"183":1,"184":1,"190":1,"195":1,"197":1,"200":1,"201":1,"202":1,"203":1,"204":1,"277":1}}],["messages",{"2":{"6":2,"289":2}}],["message",{"0":{"181":1,"183":3,"184":1,"185":1,"186":1,"191":1,"192":1,"194":1,"196":1,"205":1},"1":{"182":1,"183":1,"184":1,"187":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1},"2":{"4":1,"6":1,"183":12,"184":6,"194":1,"195":2,"277":1,"319":1,"320":1}}],["merge",{"2":{"0":1}}],["match",{"2":{"250":1}}],["matcher",{"0":{"186":1,"187":1,"193":3,"194":1,"195":1},"1":{"187":1,"188":2,"189":2,"190":2},"2":{"186":1,"193":9,"194":6,"195":1}}],["matter=none",{"2":{"242":1}}],["matter",{"0":{"242":1},"2":{"242":5,"243":3}}],["markdown",{"0":{"242":1},"2":{"242":3,"243":1}}],["maplemono",{"2":{"10":1}}],["makedirs",{"2":{"239":1}}],["make",{"2":{"6":2}}],["mainprocess",{"2":{"289":1}}],["main",{"0":{"116":1},"2":{"6":1,"12":1,"37":1,"59":1,"81":4,"87":4,"88":2,"89":1,"93":1,"95":1,"96":1,"119":1,"120":1,"121":1,"122":1,"123":1,"125":5,"126":1,"127":1,"289":1,"290":6,"306":1}}],["manager",{"0":{"147":1,"251":1},"1":{"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1},"2":{"21":2,"22":1,"26":1,"27":1,"43":2,"44":1,"48":1,"49":1,"147":1,"251":1}}],["manage",{"2":{"14":1}}],["management",{"2":{"14":1}}],["many",{"2":{"6":1}}],["manually",{"2":{"2":1,"81":1}}],["may",{"2":{"3":1}}],["moved",{"0":{"169":1},"2":{"169":1}}],["more",{"2":{"2":1,"14":1,"15":1}}],["moduletype",{"0":{"271":1}}],["module=module",{"2":{"248":1}}],["moduleinfo",{"0":{"232":1,"241":1,"242":1},"1":{"233":1,"234":1,"235":1,"236":1,"237":1},"2":{"241":2,"242":1}}],["module",{"0":{"173":1,"233":1,"240":1,"241":1,"242":1,"243":1,"244":1,"248":1,"256":2,"271":1,"272":1,"286":1},"2":{"173":4,"240":2,"241":11,"242":6,"243":26,"244":1,"248":27,"249":9,"250":1,"268":1,"286":1}}],["modified",{"0":{"166":1},"2":{"13":1,"166":2,"167":1,"168":1,"169":1,"170":1,"171":4}}],["modify",{"2":{"0":2}}],["modes",{"2":{"290":1}}],["model",{"0":{"252":1,"269":1},"1":{"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"252":1}}],["mode为true",{"2":{"161":1}}],["mode",{"2":{"2":5,"6":3,"290":5,"311":2,"312":1}}],["most",{"2":{"0":1}}],["lt",{"2":{"310":1,"311":7,"313":10,"315":2}}],["lyf结尾",{"2":{"295":1}}],["lyfunction语法",{"2":{"311":1}}],["lyfunction",{"2":{"295":1}}],["len",{"2":{"83":2,"89":1}}],["least",{"2":{"15":2}}],["level=0",{"2":{"180":1}}],["level",{"0":{"179":1},"2":{"1":3,"179":2,"180":6}}],["lsposed",{"2":{"8":1}}],["llonebot",{"2":{"8":1}}],["laptop",{"2":{"243":2}}],["lang",{"0":{"242":1,"243":1},"2":{"242":4,"243":3}}],["language",{"2":{"2":2}}],["last",{"2":{"164":4}}],["lambda",{"2":{"132":1,"133":2,"134":2,"135":2,"136":1}}],["lagrange",{"2":{"8":2}}],["locks",{"2":{"122":1}}],["lock",{"0":{"131":2},"2":{"120":3,"121":3,"122":3,"129":1}}],["local",{"2":{"1":1}}],["loop",{"0":{"89":1,"127":1},"2":{"21":4,"30":1,"43":4,"52":1,"66":2,"81":1,"86":3,"89":3,"119":2,"127":2,"153":2,"284":10}}],["log0000",{"2":{"290":1}}],["logger",{"0":{"29":1,"51":1},"2":{"21":1,"23":1,"24":1,"25":1,"26":1,"28":1,"29":1,"39":1,"43":1,"45":1,"46":1,"47":1,"48":1,"50":1,"51":1,"61":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":2,"89":2,"139":1,"140":1,"141":1,"142":2,"143":1,"152":3,"156":2,"158":1,"180":7,"248":3,"249":3,"284":1,"290":3,"303":2}}],["logo",{"0":{"40":1,"62":1},"2":{"21":1,"40":1,"43":1,"62":1}}],["logic",{"2":{"6":1}}],["login",{"2":{"6":2}}],["logs",{"2":{"2":1}}],["log",{"0":{"178":1,"180":1},"1":{"179":1,"180":1},"2":{"1":4,"6":1,"29":1,"51":1,"178":1,"180":3,"290":1}}],["loaded",{"0":{"246":1,"275":1},"2":{"246":1,"275":1}}],["loader",{"0":{"278":1,"279":1,"280":1,"281":1},"1":{"279":1,"281":1},"2":{"21":1,"43":1,"279":1,"281":1}}],["loading",{"2":{"139":1,"140":1,"141":1}}],["load",{"0":{"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"247":1,"248":1,"249":1},"1":{"248":1,"249":1,"250":1},"2":{"0":1,"2":2,"21":1,"43":1,"139":4,"140":4,"141":4,"142":4,"143":2,"144":3,"173":3,"247":1,"248":3,"249":2,"279":2,"281":2,"313":1,"314":1}}],["like",{"2":{"289":1}}],["life",{"2":{"65":1}}],["lifespan=self",{"2":{"21":1,"43":1}}],["lifespan",{"0":{"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"63":1,"64":1,"66":2,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"151":2},"1":{"64":1,"65":2,"66":2,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"73":2,"74":2,"75":2,"76":2,"77":2,"78":2},"2":{"21":3,"22":2,"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"43":3,"44":2,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"63":1,"65":6,"66":2,"67":4,"68":4,"69":4,"70":4,"71":4,"72":4,"151":4,"152":3}}],["liteecho",{"0":{"276":1,"277":1},"1":{"277":1},"2":{"276":2,"277":2,"311":1}}],["liteloader",{"2":{"8":1}}],["liteyukiexception",{"0":{"175":1}}],["liteyukistudio",{"2":{"12":1,"13":1,"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["liteyuki",{"0":{"17":1,"19":1,"41":1,"63":1,"79":1,"100":1,"101":1,"102":1,"105":1,"109":1,"115":1,"137":1,"145":1,"146":1,"147":1,"159":1,"160":1,"161":1,"172":1,"174":1,"176":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"245":1,"247":1,"251":1,"252":1,"274":1,"276":1,"278":1,"280":1,"282":1,"313":1},"1":{"18":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"104":1,"106":1,"107":1,"108":1,"110":1,"111":1,"112":1,"113":1,"114":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"175":1,"177":1,"179":1,"180":1,"182":1,"183":1,"184":1,"187":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"246":1,"248":1,"249":1,"250":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1,"314":1},"2":{"1":6,"2":4,"3":2,"4":2,"6":6,"12":1,"14":1,"15":1,"21":2,"23":1,"24":1,"37":1,"43":2,"45":1,"46":1,"59":1,"173":2,"248":5,"279":3,"281":3,"289":1,"290":12,"293":2,"294":1,"302":1,"303":4,"306":1,"307":1,"311":4,"312":3}}],["liteyukibot",{"0":{"20":1,"37":1,"42":1,"59":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1},"2":{"0":5,"9":1,"12":2,"13":6,"14":1,"26":1,"37":3,"48":1,"59":3,"173":1,"289":1}}],["linux",{"2":{"8":1,"12":1,"14":1,"15":1,"26":1,"48":1}}],["limited",{"2":{"4":1}}],["listdir",{"2":{"143":1,"249":2}}],["listen",{"2":{"289":1}}],["listening",{"2":{"1":1}}],["listed",{"2":{"6":1}}],["list",{"0":{"66":1,"183":1,"195":1,"215":1,"229":1,"230":1,"231":1,"234":1,"235":1,"236":1,"240":1},"2":{"1":4,"65":6,"66":1,"81":2,"83":2,"116":1,"117":1,"183":1,"188":1,"193":3,"195":1,"240":4,"241":4,"243":3,"311":1,"313":2,"314":1}}],["switch",{"2":{"311":2,"312":1}}],["sync",{"2":{"287":2}}],["sys",{"2":{"25":1,"26":3,"47":1,"48":3,"180":1}}],["system",{"0":{"171":1},"2":{"15":2,"26":4,"48":4,"171":1,"303":2}}],["src",{"2":{"279":1,"281":1,"303":5}}],["schedule",{"2":{"171":1}}],["script",{"0":{"14":1},"2":{"14":1}}],["scripts",{"2":{"12":1}}],["sm",{"2":{"153":2}}],["shinjuku",{"2":{"317":1}}],["shellstatistic",{"2":{"319":1}}],["shellbind",{"2":{"317":1}}],["shellweather",{"2":{"317":1}}],["shellmain",{"2":{"308":1}}],["shellvar",{"2":{"296":1}}],["shellcmd",{"2":{"295":1}}],["shell",{"2":{"295":1,"297":1}}],["shutil",{"2":{"243":1}}],["shutdown",{"0":{"33":1,"34":1,"55":1,"56":1,"69":1,"70":1,"75":1,"76":1},"2":{"33":2,"34":2,"55":2,"56":2,"65":2,"69":2,"70":2,"75":3,"76":3,"152":2}}],["show",{"2":{"180":6}}],["should",{"2":{"81":1}}],["shared",{"2":{"119":3,"132":1,"133":3,"134":3,"135":3,"136":2,"153":1,"154":1,"289":1,"293":3}}],["snowykami",{"2":{"63":2,"79":2,"102":2,"109":2,"147":2,"172":2,"178":2,"181":2,"185":2,"186":2,"191":2,"192":2,"196":2,"205":2,"206":2,"247":2,"251":2,"252":2,"276":2,"278":2,"280":2}}],["sleep",{"2":{"24":1,"26":1,"46":1,"48":1,"290":1,"296":1,"297":1}}],["simple",{"2":{"302":1}}],["signature",{"2":{"287":2}}],["signal",{"2":{"21":6,"25":1,"43":6,"47":1}}],["signum",{"0":{"25":1,"47":1},"2":{"25":3,"47":3}}],["sigterm",{"2":{"21":1,"43":1}}],["sigint",{"2":{"21":1,"43":1}}],["sides",{"2":{"3":1,"6":1}}],["side",{"0":{"3":1},"2":{"6":4}}],["style",{"2":{"308":2}}],["stem",{"2":{"286":2}}],["stdout",{"2":{"180":1}}],["store",{"2":{"119":1,"120":1,"121":1,"122":2,"123":1}}],["storage",{"0":{"115":1},"1":{"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1},"2":{"100":2,"101":2,"293":2}}],["stopping",{"2":{"23":1,"24":1,"25":1,"45":1,"46":1,"47":1,"152":1}}],["stop",{"0":{"30":1,"52":1},"2":{"21":1,"24":2,"25":1,"30":3,"43":1,"46":2,"47":1,"52":3}}],["strip",{"2":{"277":2}}],["str=",{"2":{"242":1,"243":1}}],["structure",{"0":{"83":2},"2":{"83":17,"84":1}}],["str",{"0":{"27":1,"38":1,"39":2,"49":1,"60":1,"61":2,"81":1,"93":1,"94":1,"95":1,"96":1,"97":2,"98":2,"99":2,"104":2,"111":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"133":2,"134":2,"135":2,"136":2,"138":2,"139":2,"140":2,"141":2,"142":2,"143":2,"144":1,"149":2,"152":1,"154":1,"156":1,"158":1,"171":1,"173":1,"179":2,"183":9,"184":2,"195":1,"214":1,"215":2,"216":1,"217":1,"218":1,"222":1,"223":1,"225":1,"227":1,"228":1,"231":1,"233":1,"237":1,"238":3,"239":2,"240":1,"241":1,"242":2,"243":3,"246":1,"248":1,"249":1,"250":2,"260":1,"261":1,"262":1,"264":1,"265":1,"266":1,"270":1,"272":1,"275":1,"286":1},"2":{"21":1,"27":1,"38":1,"39":2,"43":1,"49":1,"60":1,"61":2,"81":2,"91":2,"93":1,"94":1,"95":1,"96":2,"97":2,"98":2,"99":2,"104":2,"111":1,"116":1,"117":1,"119":5,"120":1,"121":1,"122":1,"123":4,"124":1,"125":1,"126":1,"133":2,"134":2,"135":2,"136":2,"138":2,"139":2,"140":2,"141":2,"142":2,"143":2,"144":1,"149":2,"151":2,"152":1,"154":1,"156":1,"158":1,"171":1,"173":1,"179":2,"183":11,"184":2,"195":1,"204":1,"238":3,"239":2,"240":1,"241":1,"242":1,"243":4,"246":3,"248":1,"249":1,"250":4,"275":3,"286":3,"290":1}}],["stat",{"2":{"320":1}}],["statistic",{"2":{"320":1}}],["statistics",{"0":{"319":1},"1":{"320":1}}],["static",{"0":{"210":1},"2":{"241":1}}],["staticmethod",{"0":{"210":1},"2":{"65":1,"66":1,"125":1,"126":1,"241":1}}],["status",{"2":{"311":1,"312":1}}],["standard",{"2":{"6":2}}],["startup",{"2":{"290":2}}],["startswith",{"2":{"241":3,"276":1,"277":1}}],["started",{"2":{"6":1}}],["start",{"0":{"31":1,"32":1,"53":1,"54":1,"67":1,"68":1,"73":1,"74":1,"89":1,"127":1,"153":1},"2":{"1":2,"6":3,"12":1,"22":3,"26":2,"31":2,"32":2,"44":3,"48":2,"53":2,"54":2,"65":2,"67":2,"68":2,"73":3,"74":3,"89":1,"127":2,"152":4,"153":3,"285":1,"290":1}}],["starting",{"2":{"0":1,"89":1}}],["s",{"2":{"15":1,"83":2}}],["split",{"2":{"248":4}}],["space",{"2":{"15":1}}],["specified",{"2":{"248":1}}],["specific",{"2":{"15":1}}],["specify",{"2":{"6":1}}],["sockschannel",{"0":{"110":1},"1":{"111":1,"112":1,"113":1,"114":1}}],["socks",{"0":{"109":1},"1":{"110":1,"111":1,"112":1,"113":1,"114":1}}],["software",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["source",{"0":{"218":1},"2":{"12":1,"15":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":3,"242":7,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["solution",{"0":{"8":1,"9":1}}],["some",{"2":{"1":1,"6":2}}],["search",{"2":{"313":1,"314":1}}],["service",{"0":{"255":2},"2":{"250":1,"302":1}}],["server",{"2":{"1":1,"3":1,"9":1,"15":1}}],["sep",{"2":{"241":3}}],["session",{"0":{"183":2,"205":1},"2":{"183":8,"184":5,"205":1}}],["set",{"0":{"93":1,"94":1,"97":1,"120":1,"134":1,"249":1},"2":{"21":1,"24":1,"30":1,"43":1,"46":1,"52":1,"81":1,"93":2,"94":2,"96":1,"97":3,"120":2,"133":1,"134":3,"249":2,"284":1,"293":1,"311":2,"312":1,"315":2}}],["self",{"0":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"65":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"127":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"166":1,"167":1,"168":1,"169":1,"170":1,"183":1,"184":1,"188":1,"189":1,"190":1,"199":1,"200":1,"201":1,"202":1,"268":1},"2":{"21":14,"22":5,"23":2,"24":3,"25":2,"26":4,"27":2,"28":2,"29":1,"30":3,"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"43":14,"44":5,"45":2,"46":3,"47":2,"48":4,"49":2,"50":2,"51":1,"52":3,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"65":8,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"73":3,"74":3,"75":3,"76":3,"77":3,"78":3,"81":14,"82":3,"83":4,"84":6,"85":3,"86":2,"87":3,"88":3,"89":8,"104":3,"107":2,"108":2,"111":5,"112":1,"113":1,"114":1,"119":7,"120":3,"121":3,"122":4,"123":3,"124":2,"125":1,"127":4,"149":6,"151":4,"152":8,"153":3,"154":2,"155":2,"156":3,"157":3,"158":3,"166":1,"167":2,"168":2,"169":2,"170":2,"183":10,"184":3,"188":5,"189":2,"190":3,"199":2,"200":2,"201":2,"202":3,"241":1,"242":1,"268":2}}],["send",{"0":{"84":1,"112":1},"2":{"6":1,"27":2,"49":2,"81":2,"84":4,"93":1,"95":1,"96":1,"98":1,"99":1,"111":1,"112":1,"120":1,"121":1,"122":1,"123":1,"124":1,"127":1,"133":1,"136":1,"184":1,"289":1,"290":3,"311":1}}],["summary>",{"2":{"242":3}}],["summary>源代码",{"2":{"242":1}}],["su",{"0":{"204":1},"2":{"204":1,"276":1,"277":1}}],["succeeded",{"2":{"248":1}}],["success",{"2":{"156":1,"180":2,"248":2}}],["such",{"2":{"6":1}}],["subscribe",{"2":{"125":1}}],["subscriber",{"0":{"116":1,"117":1,"125":1,"126":1},"2":{"125":7,"126":2,"127":1}}],["sub",{"0":{"117":1},"2":{"37":1,"59":1,"81":2,"87":1,"88":1,"119":1,"125":4,"127":1}}],["submit",{"2":{"7":1}}],["sure",{"2":{"6":2}}],["supported",{"2":{"4":1,"143":1}}],["supports",{"2":{"0":1,"8":5}}],["superuser",{"2":{"1":1}}],["superusers",{"2":{"0":1,"1":1,"6":1,"204":1}}],["same",{"2":{"3":2}}],["safe",{"2":{"2":2,"6":3,"139":1}}],["num为每页显示数量",{"2":{"313":2}}],["num",{"2":{"313":2}}],["number",{"2":{"13":2}}],["nliteyuki",{"2":{"295":1}}],["n\`\`\`",{"2":{"242":2}}],["n\`\`\`python",{"2":{"242":2}}],["n",{"2":{"40":10,"62":10,"242":52,"243":2}}],["name>",{"2":{"296":2}}],["name=module",{"2":{"248":3}}],["name=target",{"2":{"241":2}}],["name=class",{"2":{"241":1}}],["name=node",{"2":{"241":2}}],["name=f",{"2":{"154":2}}],["name=",{"2":{"90":1,"91":1,"119":3,"302":1}}],["name",{"0":{"27":1,"49":1,"81":1,"93":1,"95":1,"104":1,"111":1,"152":1,"154":1,"156":1,"158":1,"214":1,"222":1,"227":1,"244":1,"250":2,"260":1,"270":1,"272":1,"286":1},"2":{"27":7,"49":7,"81":12,"89":2,"93":8,"94":2,"95":6,"97":3,"98":3,"104":3,"111":5,"152":14,"153":2,"154":6,"155":1,"156":7,"157":2,"158":6,"241":11,"242":7,"243":2,"248":20,"249":9,"250":7,"268":1,"286":1,"290":2,"311":4,"313":8}}],["ntqq",{"2":{"8":1}}],["npm",{"2":{"6":1,"313":7,"314":1}}],["new",{"2":{"21":1,"43":1,"138":3,"284":1}}],["necessary",{"2":{"6":1}}],["needs",{"2":{"290":1}}],["need",{"2":{"0":1,"2":1,"6":1}}],["nonlocal",{"2":{"164":1}}],["nonedog",{"2":{"302":1}}],["none",{"0":{"21":1,"27":1,"38":1,"39":1,"43":1,"49":1,"60":1,"61":1,"65":1,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"87":1,"107":1,"120":1,"121":1,"122":1,"124":1,"130":1,"154":1,"171":1,"183":2,"190":1,"224":1,"242":1,"243":1,"273":1},"2":{"21":1,"27":1,"37":1,"43":1,"49":1,"59":1,"65":1,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":3,"82":1,"84":1,"86":1,"87":1,"107":1,"111":2,"120":1,"122":1,"124":1,"129":2,"139":1,"140":1,"141":1,"154":1,"162":1,"164":1,"171":1,"183":1,"190":1,"197":2,"202":1,"241":3,"243":1,"248":4,"249":1,"283":1}}],["nonebot2",{"2":{"4":2,"10":1}}],["nonebot",{"0":{"3":1},"2":{"1":2,"2":2,"3":1,"10":1,"282":1,"290":3,"302":1,"303":4,"306":1}}],["nohup",{"2":{"26":2,"48":2,"296":1,"297":1}}],["nodes",{"2":{"241":2}}],["node",{"2":{"8":1,"15":1,"241":42}}],["notimplementederror",{"2":{"166":1}}],["not",{"2":{"1":1,"2":1,"4":1,"6":4,"15":2,"24":1,"27":1,"37":1,"46":1,"49":1,"59":1,"81":1,"83":3,"84":2,"87":4,"89":1,"93":1,"122":1,"125":3,"127":1,"139":1,"140":1,"141":1,"142":3,"143":3,"152":2,"156":2,"158":2,"171":2,"190":1,"239":1,"241":8,"248":1,"249":8,"303":2}}],["normal>",{"2":{"180":1}}],["normal",{"0":{"12":1,"241":1},"2":{"1":1,"241":1,"243":1}}],["no",{"0":{"142":1,"143":1,"144":1,"214":1,"215":1,"216":1,"217":1,"219":1,"220":1,"222":1,"223":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"244":1,"260":1,"270":1,"271":1,"272":1},"2":{"1":1,"89":1,"92":1,"142":3,"143":3,"144":3,"241":3,"242":1,"243":2}}],["nickname",{"2":{"0":1,"1":2,"6":3}}],["ignored",{"0":{"243":1},"2":{"152":1,"243":8}}],["ignore",{"0":{"122":1,"241":1,"249":1},"2":{"122":4,"241":6,"243":1,"249":6}}],["id仅超级用户可用",{"2":{"311":1}}],["id=user",{"2":{"297":2}}],["id=1234567",{"2":{"311":2}}],["id=123456",{"2":{"297":1}}],["id=self",{"2":{"184":3}}],["id",{"0":{"183":3},"2":{"87":5,"88":4,"183":11,"184":3,"204":1,"241":6,"297":2,"311":2,"313":1,"319":4}}],["ids",{"2":{"81":2,"87":2,"88":2,"89":1}}],["impossible",{"2":{"289":1}}],["import",{"2":{"132":1,"248":1,"290":5,"293":1,"302":2,"303":3,"306":1}}],["implemented",{"2":{"166":1,"290":1}}],["implement",{"2":{"6":1,"290":1}}],["implementation",{"0":{"3":1},"2":{"3":1,"6":4,"8":1}}],["image",{"2":{"13":1,"311":2,"312":1}}],["i",{"2":{"6":2,"193":2,"290":6}}],["icon=f",{"2":{"180":5}}],["icon",{"2":{"1":2,"180":7,"242":2,"243":2}}],["isclass",{"2":{"283":1}}],["iscoroutinefunction",{"2":{"283":2}}],["isroutine",{"2":{"283":1}}],["isfile",{"2":{"249":1,"303":1}}],["isdir",{"2":{"249":2}}],["isinstance",{"2":{"83":8,"93":1,"138":1,"241":13,"248":1,"290":1}}],["issues",{"2":{"9":2}}],["issue",{"2":{"7":1}}],["is",{"0":{"158":1,"204":1,"220":1,"283":1},"2":{"1":3,"2":1,"3":3,"4":1,"6":2,"12":1,"15":1,"21":1,"23":1,"24":2,"27":1,"37":2,"43":1,"45":1,"46":2,"49":1,"59":2,"66":1,"81":6,"84":1,"87":5,"88":1,"89":1,"93":1,"95":1,"96":1,"119":2,"120":1,"121":1,"122":1,"123":1,"125":3,"127":1,"129":2,"139":1,"140":1,"141":1,"154":1,"156":1,"158":2,"171":1,"183":1,"202":1,"204":1,"241":2,"242":2,"243":1,"248":1,"249":2,"283":1,"284":1,"289":2,"290":3}}],["if",{"2":{"1":2,"2":4,"3":1,"6":2,"7":1,"13":2,"15":2,"26":2,"27":1,"37":2,"39":2,"48":2,"49":1,"59":2,"61":2,"66":1,"81":5,"82":1,"83":4,"84":3,"85":1,"87":6,"88":1,"89":1,"93":3,"95":1,"96":1,"120":1,"121":1,"122":3,"123":1,"125":5,"127":2,"129":2,"138":1,"139":1,"140":1,"141":1,"142":2,"143":3,"152":2,"154":1,"156":2,"158":1,"164":1,"171":1,"179":1,"180":5,"183":1,"184":1,"190":1,"193":1,"202":1,"239":1,"240":1,"241":20,"242":10,"243":4,"248":2,"249":9,"283":2,"284":1,"286":1}}],["index",{"2":{"242":2,"243":1,"308":1}}],["inherit=",{"2":{"241":1}}],["inherit",{"0":{"231":1},"2":{"242":5}}],["inspect",{"2":{"283":4,"287":1}}],["insert",{"2":{"193":1}}],["instance",{"0":{"129":1,"130":1},"2":{"21":2,"37":4,"43":2,"59":4,"84":1,"93":1,"129":5}}],["installed",{"2":{"15":1}}],["installation",{"0":{"12":1},"2":{"6":2}}],["install",{"0":{"11":1},"1":{"12":1,"13":1,"14":1,"15":1,"16":1},"2":{"6":3,"12":3,"13":1,"15":2,"310":1,"313":1,"314":1}}],["instead",{"2":{"6":2,"13":1,"39":1,"61":1}}],["inner",{"2":{"81":2}}],["initialized",{"2":{"37":1,"59":1,"81":2}}],["initializing",{"2":{"21":1,"43":1}}],["init",{"0":{"21":1,"28":1,"29":1,"43":1,"50":1,"51":1,"65":1,"81":1,"104":1,"107":1,"111":1,"119":1,"149":1,"151":1,"180":1,"183":1,"188":1,"199":1},"2":{"21":2,"28":2,"29":2,"43":2,"50":2,"51":2,"65":1,"81":1,"104":1,"107":1,"111":1,"119":1,"149":1,"151":1,"180":1,"183":1,"185":1,"188":1,"191":1,"199":1,"241":1,"243":2,"249":2,"278":1,"280":1,"286":1,"302":3}}],["including",{"2":{"15":1}}],["inter",{"2":{"289":1}}],["interpreter",{"2":{"6":1}}],["interpreters",{"2":{"6":2}}],["introduction",{"0":{"289":1}}],["int=0",{"2":{"26":1,"48":1,"194":1,"195":1}}],["int",{"0":{"26":1,"48":1,"188":1,"194":1,"195":1},"2":{"65":1,"81":2,"188":1}}],["intact",{"2":{"6":1}}],["invalidgitrepositoryerror",{"2":{"6":1}}],["information",{"2":{"3":1}}],["info",{"0":{"241":1,"242":1},"2":{"1":1,"21":1,"23":1,"24":1,"25":1,"26":1,"43":1,"45":1,"46":1,"47":1,"48":1,"152":2,"180":3,"241":12,"242":6,"243":5,"290":2}}],["in",{"0":{"144":1,"285":1},"2":{"0":3,"1":1,"2":1,"3":2,"6":3,"27":1,"37":1,"39":3,"49":1,"59":1,"61":3,"66":1,"81":5,"83":4,"86":1,"87":1,"88":2,"93":1,"94":1,"122":1,"125":3,"126":1,"127":1,"138":2,"142":1,"143":2,"144":1,"152":1,"153":3,"155":1,"156":1,"157":1,"158":1,"171":1,"173":1,"190":1,"193":1,"195":2,"204":1,"239":1,"240":2,"241":13,"242":9,"243":5,"249":2,"279":2,"281":2,"284":2,"285":1,"289":1,"303":1}}],["iter",{"2":{"241":2}}],["items",{"2":{"0":1,"6":1,"94":1,"138":2,"239":1,"242":1,"243":1}}],["itself",{"2":{"6":1,"9":1}}],["it",{"2":{"0":1,"2":2,"3":1,"6":5,"12":1,"289":2}}],["r>",{"2":{"248":2}}],["rv",{"2":{"243":2}}],["rk",{"2":{"243":2}}],["rmtree",{"2":{"243":1}}],["rpm",{"2":{"313":5,"314":1}}],["rp",{"2":{"239":4}}],["rpc",{"0":{"105":1,"106":1},"1":{"106":1,"107":2,"108":2},"2":{"100":1,"101":1}}],["rule=is",{"2":{"276":1,"277":1}}],["rule=empty",{"2":{"194":1,"195":1}}],["rulehandlerfunc",{"0":{"197":1,"199":1},"2":{"199":1}}],["rule",{"0":{"188":2,"194":3,"195":2,"196":1,"198":1,"200":2,"201":2,"203":1,"204":1},"1":{"197":1,"198":1,"199":2,"200":2,"201":2,"202":2,"203":1,"204":1},"2":{"188":6,"190":1,"194":3,"195":5,"196":1,"200":3,"201":3,"202":1,"203":3,"204":2,"276":1,"277":1}}],["running",{"2":{"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"86":1,"89":1,"119":2,"284":2,"289":1}}],["runtimeerror",{"2":{"37":2,"59":2,"84":1,"85":1,"87":1,"125":1,"127":1,"284":1}}],["run",{"0":{"13":1,"22":1,"23":1,"44":1,"45":1,"66":1,"88":1,"126":1,"152":1,"173":1,"190":1,"284":1,"285":1},"2":{"0":1,"12":1,"13":2,"15":1,"22":1,"23":3,"44":1,"45":3,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"88":1,"89":1,"126":1,"127":1,"152":1,"153":1,"173":2,"190":1,"284":3,"285":1,"306":2}}],["raw",{"0":{"183":1},"2":{"183":4,"184":1,"195":1,"277":1}}],["raise",{"2":{"37":2,"59":2,"81":3,"84":2,"85":1,"87":1,"93":2,"122":1,"125":1,"127":1,"152":1,"166":1}}],["rights",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["root",{"2":{"13":1,"240":2}}],["r",{"2":{"12":1,"15":1,"139":1,"140":1,"141":1,"241":1}}],["readme",{"2":{"243":2}}],["read",{"2":{"241":1}}],["reload",{"2":{"311":1,"312":2,"313":1,"314":1}}],["reloading",{"2":{"303":1}}],["rel",{"2":{"243":4,"286":5}}],["relpath",{"2":{"238":1}}],["relative",{"0":{"238":1},"2":{"238":1,"243":1,"244":1,"286":1}}],["red>",{"2":{"180":1}}],["remove",{"2":{"180":1}}],["ref",{"0":{"132":1}}],["refer",{"0":{"16":1},"2":{"6":1}}],["reference",{"2":{"3":1}}],["return",{"0":{"216":1},"2":{"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":2,"38":2,"39":4,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":2,"60":2,"61":4,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"82":3,"83":9,"85":1,"86":1,"87":7,"89":1,"95":2,"96":2,"108":1,"113":1,"121":3,"123":3,"125":3,"129":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"156":1,"158":1,"164":3,"171":4,"179":2,"189":3,"190":1,"194":1,"195":2,"200":2,"201":2,"202":2,"203":1,"204":1,"238":1,"240":1,"241":4,"242":4,"246":2,"248":2,"249":1,"250":2,"268":1,"275":2,"283":4,"286":3,"287":3}}],["returns",{"2":{"24":1,"25":1,"26":1,"27":1,"28":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"46":1,"47":1,"48":1,"49":1,"50":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"87":1,"95":1,"96":1,"113":1,"121":1,"122":1,"123":1,"124":1,"125":1,"138":1,"152":1,"156":1,"158":1,"171":1,"180":1,"184":1,"189":1,"190":1,"241":5,"242":1,"246":1,"250":1,"275":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["registered",{"2":{"89":1}}],["register",{"2":{"21":1,"43":1}}],["reply",{"0":{"184":1},"2":{"184":3,"277":1}}],["replace",{"2":{"13":1,"241":3,"242":4,"243":8}}],["repo",{"2":{"13":1}}],["report设定为false",{"2":{"309":1}}],["reports",{"2":{"6":1}}],["report",{"2":{"1":2,"6":2,"309":1}}],["required",{"2":{"81":1}}],["requires",{"2":{"15":1}}],["requirements",{"0":{"15":1},"1":{"16":1},"2":{"12":1,"15":1}}],["requests",{"2":{"1":1}}],["resources",{"2":{"307":1,"308":1,"312":1}}],["resolve",{"2":{"286":2}}],["reserved",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["response",{"2":{"6":2}}],["respond",{"2":{"6":1}}],["restarting",{"2":{"26":1,"48":1,"152":1}}],["restart",{"0":{"26":1,"27":1,"35":1,"36":1,"48":1,"49":1,"57":1,"58":1,"71":1,"72":1,"77":1,"78":1},"2":{"0":1,"21":1,"26":3,"27":1,"35":2,"36":2,"43":1,"48":3,"49":1,"57":2,"58":2,"65":2,"71":2,"72":2,"77":3,"78":3,"152":1,"303":2}}],["reverse",{"2":{"3":2}}],["receiving",{"2":{"290":1}}],["received",{"2":{"25":1,"47":1,"152":1}}],["receive",{"0":{"85":1,"86":1,"87":1,"88":1,"89":1,"113":1,"116":1,"117":1,"125":3,"126":1,"127":1,"183":1},"2":{"1":1,"81":3,"85":2,"86":2,"87":4,"88":3,"89":7,"95":1,"96":2,"97":2,"98":2,"99":1,"113":1,"116":1,"117":1,"119":2,"121":1,"123":1,"125":11,"126":2,"127":4,"132":1,"133":2,"134":2,"135":2,"136":1,"152":1,"153":2,"183":4,"184":3,"290":11}}],["recursive=recursive",{"2":{"171":1}}],["recursive",{"0":{"171":1},"2":{"171":3}}],["recv",{"2":{"81":2,"85":2,"95":5,"96":5,"98":3,"99":3,"111":1,"121":5,"123":5,"133":3,"136":3}}],["recommended",{"0":{"8":1,"9":1},"2":{"3":1,"6":1,"12":1,"14":1,"15":2}}],["city",{"2":{"317":1,"318":1}}],["css相对路径引用b中的css",{"2":{"308":1}}],["css",{"2":{"307":1,"308":1}}],["cwd",{"2":{"286":1}}],["cfg",{"2":{"173":4}}],["current|bot",{"2":{"319":1}}],["current|group",{"2":{"319":1}}],["current",{"2":{"164":3,"319":2,"320":1}}],["custom",{"2":{"2":4}}],["customize",{"2":{"2":1}}],["c",{"2":{"63":1,"79":1,"102":1,"109":1,"138":3,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"250":1,"251":1,"252":1,"276":1,"278":1,"280":1,"284":4,"286":4,"320":1}}],["cmd",{"2":{"26":5,"48":5,"295":2,"296":1}}],["cpu",{"2":{"15":1,"309":1}}],["cd",{"2":{"12":1,"13":1}}],["cls",{"0":{"129":1},"2":{"129":6,"241":1,"242":11}}],["close",{"0":{"114":1},"2":{"114":1,"284":1}}],["closed",{"2":{"81":1,"84":2,"85":2,"89":1,"111":1}}],["clone",{"2":{"12":2,"13":2}}],["cloning",{"2":{"6":1}}],["classdef",{"2":{"241":3}}],["classes=",{"2":{"241":1}}],["classes",{"0":{"235":1},"2":{"241":1,"242":1}}],["classinfo",{"0":{"226":1,"235":1},"1":{"227":1,"228":1,"229":1,"230":1,"231":1},"2":{"241":1}}],["classmethod",{"0":{"211":1},"2":{"128":1,"129":1,"241":1}}],["class",{"0":{"20":1,"42":1,"64":1,"80":1,"103":1,"106":1,"110":1,"118":1,"128":1,"148":1,"150":1,"165":1,"175":1,"182":1,"187":1,"198":1,"207":1,"211":1,"213":1,"221":1,"226":1,"232":1,"253":1,"259":1,"267":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"130":1,"131":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"166":1,"167":1,"168":1,"169":1,"170":1,"183":1,"184":1,"188":1,"189":1,"190":1,"199":1,"200":1,"201":1,"202":1,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"254":1,"255":1,"256":1,"257":1,"258":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"82":2,"241":24,"242":2}}],["client",{"2":{"8":1}}],["cqhttp",{"2":{"8":1}}],["child",{"2":{"241":2,"289":1}}],["chromium",{"2":{"15":1}}],["channel时的通道标识",{"2":{"290":1}}],["channel即可",{"2":{"290":1}}],["channel及passive",{"2":{"290":1}}],["channel函数获取通道对象",{"2":{"290":2}}],["channel=none",{"2":{"184":1}}],["channeldeliver",{"0":{"148":1},"1":{"149":1},"2":{"154":1}}],["channelv2",{"2":{"109":1}}],["channels",{"0":{"94":2,"96":1,"99":1},"2":{"94":5,"96":2,"98":1,"99":3,"153":1}}],["channel",{"0":{"79":1,"80":1,"90":1,"91":1,"92":2,"93":3,"94":1,"95":2,"96":1,"97":1,"98":1,"109":1,"124":1,"125":1,"126":1,"149":8,"183":2,"288":1},"1":{"80":1,"81":2,"82":2,"83":2,"84":2,"85":2,"86":2,"87":2,"88":2,"89":2,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"110":1,"111":1,"112":1,"113":1,"114":1,"289":1,"290":1,"291":1,"292":1,"293":1},"2":{"27":2,"49":2,"79":1,"81":7,"84":1,"85":1,"90":3,"91":3,"92":2,"93":19,"94":4,"95":8,"96":9,"97":11,"98":7,"99":2,"100":2,"101":2,"119":4,"121":1,"123":1,"124":5,"125":9,"126":4,"127":2,"149":12,"152":1,"154":12,"183":5,"184":2,"289":3,"290":14}}],["chan",{"2":{"27":4,"49":4,"95":5,"96":5,"98":3,"99":3,"119":2,"120":1,"121":6,"122":1,"123":6,"124":1,"127":1,"132":1,"133":5,"134":2,"135":2,"136":4,"152":2,"153":2,"154":2,"290":2}}],["changed",{"2":{"303":1}}],["change",{"2":{"12":1,"13":1,"313":1,"314":1}}],["chat",{"2":{"6":1,"7":1,"9":1}}],["check",{"0":{"81":1},"2":{"1":1,"6":1,"81":9,"84":1}}],["cn",{"0":{"242":1,"243":1},"2":{"2":1,"242":2,"243":1}}],["color",{"2":{"250":7}}],["colors=true",{"2":{"248":3}}],["color=",{"2":{"180":5}}],["copy",{"2":{"138":1}}],["copyright",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["count",{"0":{"132":1},"2":{"21":1,"26":2,"43":1,"48":2}}],["code插件liteyuki",{"2":{"299":1}}],["code=ast",{"2":{"241":2}}],["codemodifiedhandler",{"0":{"165":1},"1":{"166":1,"167":1,"168":1,"169":1,"170":1},"2":{"171":1}}],["code",{"0":{"218":1},"2":{"15":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":4,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":7,"243":3,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["coro",{"0":{"284":1,"285":1},"2":{"284":6,"285":3}}],["coroutine",{"0":{"283":1,"284":2,"285":2,"287":1},"2":{"66":1,"87":2,"125":1,"197":1,"283":1,"284":2,"285":3,"287":3}}],["core",{"0":{"145":1,"146":1,"147":1},"1":{"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1},"2":{"8":1}}],["correctly",{"2":{"6":2}}],["come",{"2":{"289":1}}],["combined",{"2":{"200":2,"201":2}}],["com",{"2":{"12":1,"13":1,"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["compat",{"0":{"39":2,"61":2},"2":{"39":9,"61":9}}],["complete",{"2":{"284":2}}],["completion",{"2":{"2":2}}],["complies",{"2":{"6":1}}],["computer",{"2":{"6":1}}],["communicate",{"2":{"289":1}}],["communication",{"0":{"288":1},"1":{"289":1,"290":1,"291":1,"292":1,"293":1},"2":{"3":1,"289":1}}],["comm",{"0":{"79":1,"100":1,"101":1,"102":1,"105":1,"109":1,"115":1},"1":{"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"104":1,"106":1,"107":1,"108":1,"110":1,"111":1,"112":1,"113":1,"114":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1},"2":{"290":2,"293":2}}],["command>",{"2":{"296":2}}],["command",{"0":{"311":1},"1":{"312":1},"2":{"1":4,"6":5,"10":1}}],["content",{"2":{"241":2,"242":17,"243":2}}],["continue",{"2":{"143":1,"152":1,"241":1,"243":1,"249":3}}],["container",{"2":{"13":1}}],["contact",{"2":{"6":1}}],["conn",{"2":{"81":4,"84":1,"85":1,"111":2}}],["connect",{"2":{"6":1}}],["connected",{"0":{"3":1}}],["convenient",{"2":{"14":1}}],["confirm",{"2":{"6":1}}],["configs",{"0":{"143":1},"2":{"143":1,"144":1}}],["config=self",{"2":{"29":1,"51":1}}],["configured",{"2":{"3":1}}],["configuration",{"0":{"1":1,"3":1},"2":{"0":5,"1":1,"2":2,"3":1,"6":2}}],["configurations",{"0":{"0":1,"2":1},"1":{"1":1,"2":1,"3":1,"4":1},"2":{"2":1}}],["config",{"0":{"38":1,"39":1,"60":1,"61":1,"137":1,"138":2,"144":1,"180":1,"269":1},"1":{"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1},"2":{"0":5,"2":2,"21":2,"29":1,"38":2,"39":6,"43":2,"51":1,"60":2,"61":6,"138":10,"139":7,"140":7,"141":7,"142":7,"143":4,"144":9,"173":1,"180":3,"279":2,"281":2,"311":4,"312":1}}],["conflict",{"2":{"6":1}}],["conflicts",{"2":{"6":1,"12":1}}],["console",{"2":{"1":1}}],["created",{"0":{"167":1},"2":{"167":1}}],["create",{"2":{"0":1,"12":1,"88":2,"126":1,"153":3}}],["case",{"2":{"250":4}}],["cases",{"2":{"0":1}}],["category",{"2":{"242":2,"243":2}}],["calling",{"0":{"107":2},"2":{"107":4,"108":1}}],["callback",{"0":{"162":1,"171":2},"2":{"87":1,"88":2,"171":4,"290":1}}],["callable",{"0":{"87":3,"125":1,"171":1,"189":1,"283":2,"287":2},"2":{"66":1,"87":7,"125":2,"151":1,"162":1,"163":1,"171":1,"189":1,"197":1,"283":2,"287":6}}],["call",{"0":{"108":1,"202":1,"283":1},"2":{"21":1,"26":2,"43":1,"48":2,"108":1,"164":4,"202":1,"283":8,"290":1}}],["cache",{"2":{"13":2}}],["cannot",{"2":{"6":1,"84":1,"85":1,"125":1,"127":1}}],["can",{"2":{"0":2,"4":1,"6":2,"7":1,"12":1,"37":1,"59":1,"87":1,"289":1,"290":1}}],["duration>",{"2":{"319":1}}],["duration",{"2":{"319":2,"320":1}}],["duplex",{"2":{"290":1}}],["driver",{"2":{"290":4}}],["d",{"2":{"83":4,"132":2,"133":4,"134":4,"135":4,"136":2,"286":4,"320":1}}],["daemon=true",{"2":{"152":1,"285":1}}],["data=",{"2":{"184":1}}],["data",{"0":{"83":1,"84":1,"88":1,"97":1,"98":1,"99":1,"104":1,"112":1,"124":1,"126":1,"133":1,"134":1,"135":1,"136":1,"183":1,"239":1},"2":{"83":12,"84":7,"85":2,"86":2,"87":5,"88":5,"89":2,"96":2,"97":7,"98":7,"99":4,"104":3,"112":3,"113":2,"124":5,"125":3,"126":4,"127":6,"133":4,"134":3,"135":2,"136":2,"152":4,"183":7,"239":6,"243":5,"290":7}}],["darwin",{"2":{"26":1,"48":1}}],["day",{"2":{"1":1}}],["dog",{"2":{"302":1,"303":1}}],["dot",{"2":{"241":1}}],["docs",{"0":{"243":1},"2":{"243":5,"311":1,"312":1}}],["docstring=method",{"2":{"241":1}}],["docstring=module",{"2":{"241":1}}],["docstring=class",{"2":{"241":1}}],["docstring=function",{"2":{"241":1}}],["docstring",{"0":{"217":1,"225":1,"228":1,"237":1},"2":{"241":16,"242":12}}],["docker",{"0":{"13":1},"2":{"13":4}}],["documentation",{"2":{"6":1,"9":1}}],["don",{"2":{"6":1,"7":1,"9":1}}],["download",{"2":{"6":1}}],["does",{"2":{"6":4,"249":1}}],["do",{"2":{"6":1,"15":1}}],["diagnose=false",{"2":{"180":1}}],["dict",{"0":{"94":1,"96":1,"97":1,"98":1,"99":1,"104":1,"108":1,"123":1,"133":1,"134":1,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"180":1,"183":2,"184":1,"239":1,"246":1,"266":1,"275":1},"2":{"21":1,"43":1,"83":2,"91":1,"94":1,"96":2,"97":1,"98":1,"99":1,"104":1,"108":1,"116":1,"117":1,"119":2,"123":4,"133":1,"134":1,"135":1,"136":1,"138":3,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":3,"180":1,"183":3,"184":1,"239":1,"243":1,"246":3,"248":6,"275":3}}],["disable",{"2":{"311":1,"312":1,"313":2,"314":2}}],["disk",{"2":{"15":1}}],["display",{"0":{"250":2},"2":{"1":1,"248":7,"250":5}}],["different",{"2":{"3":2,"6":1}}],["dir",{"0":{"243":1,"249":1},"2":{"243":6,"249":17,"279":2,"281":2}}],["dirname",{"2":{"239":2}}],["directories=",{"2":{"303":1}}],["directories",{"0":{"143":1,"171":1},"2":{"143":2,"171":4}}],["directory",{"2":{"0":4,"1":1,"2":1,"12":1,"13":2,"143":6,"171":2,"249":1}}],["directly",{"2":{"15":1}}],["direct",{"2":{"6":1,"289":1}}],["dirs",{"0":{"143":1},"2":{"1":1,"143":1,"144":1,"240":1,"279":1,"281":1}}],["details>",{"2":{"242":4}}],["detailed",{"2":{"2":1,"3":1}}],["debounce",{"0":{"164":1},"2":{"164":1,"165":1,"166":1}}],["debug",{"2":{"2":2,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":2,"89":1,"139":1,"140":1,"141":1,"179":2,"180":2,"303":1}}],["deepcopy",{"2":{"138":1}}],["decorator",{"2":{"87":2,"125":2,"164":2,"171":2,"189":2,"241":13,"290":1}}],["del",{"2":{"122":2}}],["deleted",{"0":{"168":1},"2":{"168":1}}],["delete",{"0":{"122":1,"135":1},"2":{"122":2,"134":1,"135":3}}],["deliver",{"0":{"92":1,"149":2},"2":{"93":1,"95":1,"96":2,"97":2,"98":2,"99":1,"149":6,"154":6}}],["delivery",{"2":{"4":1,"154":1}}],["delay",{"0":{"26":1,"48":1},"2":{"26":2,"48":2}}],["deftype",{"0":{"207":1,"219":1},"1":{"208":1,"209":1,"210":1,"211":1,"212":1},"2":{"241":4,"242":1}}],["def",{"0":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1},"2":{"22":1,"24":1,"44":1,"46":1,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"87":2,"88":1,"89":1,"97":1,"98":1,"99":1,"125":2,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"152":2,"153":1,"164":2,"166":1,"171":2,"189":1,"190":1,"195":1,"200":1,"201":1,"202":1,"203":1,"204":1,"241":4,"242":2,"277":1,"287":1,"290":3,"303":1}}],["default",{"0":{"38":1,"39":1,"60":1,"61":1,"121":1,"144":1,"214":1,"215":1,"216":1,"217":1,"219":1,"220":1,"222":1,"223":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"260":1,"270":1,"271":1,"272":1,"279":1,"281":1},"2":{"1":1,"2":3,"3":1,"18":1,"38":4,"39":4,"60":4,"61":4,"90":1,"91":1,"92":2,"116":1,"117":1,"121":6,"132":1,"133":3,"144":1,"162":1,"163":1,"173":1,"177":1,"179":1,"197":1,"244":1,"279":1,"281":1}}],["deprecated",{"2":{"39":1,"61":1}}],["depth=1",{"2":{"12":1,"13":1}}],["deploy",{"2":{"6":1}}],["depend",{"2":{"15":1}}],["dependency",{"2":{"12":1}}],["dependencies",{"2":{"12":1,"15":1}}],["depends",{"2":{"3":1,"15":1}}],["depending",{"2":{"0":1}}],["description=",{"2":{"302":1}}],["description",{"0":{"261":1},"2":{"3":1,"18":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"63":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"100":1,"101":1,"102":1,"105":1,"108":1,"109":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"132":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"147":1,"152":1,"153":1,"154":1,"156":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"171":1,"172":1,"173":1,"174":1,"177":1,"178":1,"180":1,"181":1,"183":1,"184":1,"185":1,"186":1,"188":1,"189":1,"190":1,"191":1,"192":1,"196":1,"197":1,"205":1,"206":1,"238":1,"239":1,"241":1,"242":1,"243":1,"244":1,"246":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"275":1,"276":1,"278":1,"279":1,"280":1,"281":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"308":1}}],["device",{"0":{"15":1},"1":{"16":1},"2":{"15":1}}],["developer",{"2":{"302":1}}],["developers",{"2":{"9":1}}],["develop",{"2":{"9":1}}],["development",{"2":{"2":3}}],["dev",{"0":{"159":1,"160":1,"161":1,"172":1},"1":{"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1},"2":{"2":1,"303":1,"306":1}}],["two",{"2":{"290":1}}],["types",{"0":{"269":1}}],["type=plugintype",{"2":{"302":1}}],["type=attr",{"2":{"241":1}}],["type=ast",{"2":{"241":3}}],["type=def",{"2":{"241":1}}],["type=deftype",{"2":{"241":1}}],["type=self",{"2":{"184":2}}],["typealias",{"2":{"162":1,"163":1,"197":1}}],["typeerror",{"2":{"81":1,"84":1,"93":1}}],["type",{"0":{"81":1,"82":2,"83":1,"183":2,"216":1,"219":1,"223":1,"250":1,"263":1},"2":{"81":12,"82":4,"83":2,"84":7,"90":1,"91":1,"92":1,"93":1,"116":1,"117":1,"162":1,"163":1,"183":9,"184":2,"197":1,"241":11,"242":13,"248":2,"250":5}}],["target",{"0":{"154":3,"238":1},"2":{"154":6,"238":4,"241":5}}],["target=run",{"2":{"285":1}}],["target=self",{"2":{"152":1}}],["target=os",{"2":{"26":1,"48":1}}],["targets",{"2":{"151":1,"152":4,"153":1,"154":1,"155":1,"157":1,"158":1,"241":2}}],["task",{"2":{"88":2,"126":1,"153":5}}],["tasks",{"2":{"66":2}}],["tuple=",{"2":{"154":1}}],["tuple",{"0":{"39":1,"61":1,"97":1,"98":1,"99":1,"108":1,"133":1,"134":1,"135":1,"136":1,"149":2,"154":1,"171":1,"215":1},"2":{"39":1,"61":1,"83":2,"91":1,"97":1,"98":1,"99":1,"108":1,"119":3,"133":1,"134":1,"135":1,"136":1,"149":2,"151":2,"171":1}}],["title",{"2":{"243":2}}],["time>",{"2":{"296":1}}],["timeout",{"2":{"156":1}}],["time",{"2":{"24":1,"26":1,"46":1,"48":1,"63":1,"79":1,"102":1,"109":1,"147":1,"164":9,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["tip",{"2":{"12":1,"13":1,"299":1,"308":1,"310":1}}],["test",{"0":{"258":2},"2":{"250":1}}],["text",{"2":{"242":3}}],["terminated",{"2":{"156":1}}],["terminate",{"0":{"156":1,"157":1},"2":{"21":1,"26":1,"43":1,"48":1,"152":2,"156":2,"157":2}}],["telegram",{"2":{"6":1}}],["txt",{"2":{"12":1,"15":1}}],["transfer",{"2":{"289":1}}],["traceback",{"2":{"190":1,"248":1}}],["tree",{"2":{"241":3}}],["try",{"2":{"23":1,"24":1,"45":1,"46":1,"122":1,"190":1,"248":1,"284":1}}],["trss",{"0":{"14":1},"2":{"8":1,"14":1}}],["true时例如docs",{"2":{"243":2}}],["true",{"0":{"122":1,"171":1,"241":1,"249":1,"269":1},"2":{"1":3,"2":4,"6":1,"85":1,"89":1,"127":1,"152":1,"180":1,"202":1,"203":1,"243":1,"290":2}}],["t",{"0":{"80":1,"84":1,"85":1,"86":1,"87":2},"1":{"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1},"2":{"6":1,"7":1,"9":1,"13":1,"37":1,"59":1,"84":1,"85":1,"86":1,"87":5}}],["through",{"2":{"289":2}}],["thread",{"0":{"285":1},"2":{"26":1,"48":1,"285":2}}],["threading",{"0":{"131":1},"2":{"21":1,"26":1,"43":1,"48":1,"285":1}}],["that",{"2":{"6":2,"289":1,"290":1}}],["this",{"2":{"6":3}}],["then",{"2":{"6":1,"12":1}}],["therefore",{"2":{"289":1}}],["there",{"2":{"1":1,"6":1,"15":1}}],["these",{"2":{"0":1}}],["the",{"2":{"0":6,"1":1,"2":4,"3":6,"4":2,"6":20,"9":2,"10":3,"12":3,"13":2,"15":4,"248":1,"289":1,"290":2}}],["tokyo",{"2":{"317":1}}],["token",{"2":{"2":2}}],["top",{"0":{"243":1},"2":{"243":4}}],["too",{"2":{"6":1}}],["to",{"0":{"3":1,"16":1,"239":1,"286":1},"2":{"0":1,"1":6,"2":3,"3":2,"4":1,"6":17,"12":6,"13":1,"14":2,"15":5,"84":1,"239":1,"243":1,"248":7,"249":2,"286":2,"289":3,"290":2}}],["toml",{"0":{"141":1},"2":{"0":2,"141":5,"142":2,"144":1}}],["world",{"2":{"295":5}}],["w",{"2":{"239":1}}],["write",{"0":{"239":1},"2":{"239":2,"243":1}}],["wrapper",{"0":{"287":1},"2":{"66":1,"87":2,"125":4,"154":1,"164":2,"171":2,"287":4}}],["watchdog",{"2":{"303":1,"306":1}}],["watch",{"2":{"302":1,"303":1}}],["walk",{"2":{"240":1,"241":1}}],["wait",{"0":{"164":1},"2":{"164":2}}],["waring=no",{"2":{"144":1}}],["waring",{"0":{"143":1,"144":1},"2":{"143":3,"144":3}}],["warning=no",{"2":{"143":1,"144":1}}],["warning",{"0":{"142":1,"249":1},"2":{"15":2,"39":1,"61":1,"89":1,"142":5,"143":1,"152":1,"156":1,"158":1,"180":2,"248":1,"249":9,"299":1,"314":1}}],["way",{"2":{"14":1}}],["want",{"2":{"1":1}}],["weather",{"0":{"317":1},"1":{"318":1},"2":{"317":1,"318":1}}],["we",{"2":{"9":1}}],["websocket",{"2":{"3":2}}],["windows10+",{"2":{"15":1}}],["windows",{"2":{"13":1,"15":2,"26":1,"48":1}}],["without",{"2":{"15":1}}],["with",{"0":{"13":1,"39":1,"61":1,"243":1},"2":{"6":2,"13":1,"39":1,"61":1,"120":1,"121":1,"122":1,"129":1,"239":1,"241":1,"242":5,"243":4,"289":1,"290":1}}],["will",{"2":{"0":3,"2":3,"6":1,"15":2,"39":1,"61":1}}],["while",{"2":{"24":1,"46":1,"85":1,"89":1,"127":1,"152":1,"290":2}}],["which",{"2":{"6":2,"14":1}}],["why",{"2":{"6":1}}],["whether",{"2":{"1":3,"2":1}}],["when",{"2":{"0":2}}],["ws",{"2":{"3":2}}],["poke",{"2":{"297":4}}],["port",{"2":{"1":2,"13":2}}],["publish=publish",{"2":{"154":1}}],["publish",{"0":{"91":1,"124":1,"149":1},"2":{"91":1,"119":2,"124":2,"127":2,"149":3}}],["pwd",{"2":{"13":3}}],["p",{"2":{"13":1,"320":1}}],["pipe",{"2":{"81":2}}],["pip",{"2":{"12":1,"15":1,"248":1}}],["period\`",{"2":{"320":1}}],["period>",{"2":{"319":1}}],["period",{"2":{"319":2}}],["persists",{"2":{"6":1}}],["personal",{"2":{"0":1}}],["permission",{"2":{"6":1}}],["py即可启动插件",{"2":{"306":1}}],["pyo",{"2":{"303":1}}],["pycache",{"2":{"303":1}}],["pyc",{"2":{"303":1}}],["pycharm",{"2":{"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["py文件",{"2":{"302":1}}],["py文件或一个包含",{"2":{"302":1}}],["py的文件夹即可被识别为插件",{"2":{"302":1}}],["pyfile",{"0":{"244":1},"2":{"243":8,"244":1}}],["pyi",{"2":{"240":1,"241":1}}],["py",{"2":{"6":1,"12":1,"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":2,"186":1,"191":2,"192":1,"196":1,"205":1,"206":1,"240":1,"241":1,"243":1,"247":1,"249":3,"251":1,"252":1,"276":1,"278":2,"280":2,"293":1,"302":1,"303":1,"306":2,"308":1}}],["python格式",{"2":{"295":1}}],["pythonfrom",{"2":{"290":1,"293":1,"302":1,"306":1}}],["pythonimport",{"2":{"290":1,"303":1}}],["pythonasync",{"2":{"22":1,"24":1,"44":1,"46":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"88":1,"89":1,"127":1,"152":1,"153":1,"190":1,"202":1}}],["pythondef",{"2":{"21":1,"23":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"45":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":1,"82":1,"83":1,"84":1,"85":1,"87":1,"93":1,"94":1,"95":1,"96":1,"104":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["python3",{"2":{"12":1,"15":1}}],["python",{"2":{"6":5,"12":2,"15":3,"66":1,"97":1,"98":1,"99":1,"126":1,"129":1,"133":1,"134":1,"135":1,"136":1,"166":1,"203":1,"204":1,"241":2,"277":1}}],["page为页数",{"2":{"313":2}}],["page",{"2":{"313":2}}],["pacman",{"0":{"313":1},"1":{"314":1}}],["pack",{"2":{"308":2,"313":3}}],["param",{"2":{"310":1}}],["parts",{"2":{"286":2}}],["parent",{"2":{"241":4}}],["parse",{"2":{"241":1}}],["parser",{"2":{"10":1}}],["parsed",{"2":{"6":1}}],["parsing",{"2":{"1":1}}],["pass",{"2":{"112":1,"113":1,"114":1}}],["passive=channel",{"2":{"154":1}}],["passive=chan",{"2":{"154":1}}],["passive",{"0":{"149":2},"2":{"93":1,"95":1,"96":2,"97":2,"98":2,"99":1,"119":2,"120":1,"121":1,"122":1,"123":1,"132":1,"133":2,"134":2,"135":2,"136":1,"149":6,"154":6,"290":15}}],["pathlib",{"2":{"248":1}}],["paths=none",{"2":{"243":1}}],["paths",{"0":{"243":1},"2":{"243":5}}],["path=dot",{"2":{"241":1}}],["path",{"0":{"173":2,"233":1,"238":3,"241":1,"244":1,"248":2,"286":3},"2":{"6":2,"13":1,"15":3,"142":1,"143":2,"173":5,"238":10,"239":3,"240":1,"241":7,"243":22,"244":2,"248":19,"249":26,"286":12,"303":5}}],["platform",{"2":{"26":3,"48":3}}],["platforms",{"2":{"6":1}}],["playwright",{"2":{"6":2}}],["plugintype",{"0":{"250":1,"253":1,"263":2},"1":{"254":1,"255":1,"256":1,"257":1,"258":1},"2":{"250":5,"302":1}}],["pluginmetadata",{"0":{"259":1,"273":1},"1":{"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1},"2":{"248":4,"302":2}}],["plugin\`",{"2":{"248":1}}],["plugin\`的函数签名",{"2":{"173":1}}],["plugin的函数签名",{"2":{"173":1}}],["plugin",{"0":{"172":1,"245":1,"246":1,"247":1,"248":2,"249":2,"250":1,"251":1,"252":1,"267":1,"274":1,"275":1,"278":1,"280":1},"1":{"173":1,"246":1,"248":1,"249":1,"250":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":2,"269":2,"270":2,"271":2,"272":2,"273":2,"275":1,"279":1,"281":1},"2":{"1":3,"4":1,"6":3,"8":1,"10":1,"21":2,"43":2,"172":1,"246":3,"248":15,"249":6,"250":5,"275":3,"279":6,"281":6,"289":1,"302":4,"305":1,"306":2,"313":5}}],["plugins下创建一个文件",{"2":{"306":1}}],["plugins中添加你的插件路径",{"2":{"305":1}}],["plugins",{"0":{"173":1,"246":1,"249":1,"275":1,"276":1,"278":1,"279":1,"280":1,"281":1},"1":{"277":1,"279":1,"281":1},"2":{"1":1,"2":2,"6":2,"15":3,"21":1,"43":1,"173":6,"246":2,"248":3,"249":9,"275":2,"279":4,"281":4,"303":1,"306":2}}],["please",{"0":{"16":1},"2":{"1":2,"2":1,"3":2,"6":4,"9":1,"13":2,"15":1}}],["priority",{"0":{"188":1,"194":1,"195":1},"2":{"188":5,"193":2,"194":2,"195":2}}],["prioritize",{"2":{"9":1}}],["private",{"0":{"241":1},"2":{"183":2,"241":6}}],["print",{"0":{"40":1,"62":1},"2":{"21":1,"40":2,"43":1,"62":2,"86":2,"190":1,"243":1,"248":1}}],["profile",{"2":{"315":4}}],["property",{"0":{"212":2},"2":{"241":2}}],["provides",{"2":{"10":3,"14":1,"289":1}}],["provided",{"2":{"3":1,"6":1}}],["problematic",{"2":{"6":1}}],["problem",{"2":{"6":1}}],["problems",{"2":{"1":1}}],["processmanager",{"0":{"150":1},"1":{"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1},"2":{"21":2,"43":2}}],["process",{"0":{"27":1,"34":1,"35":1,"49":1,"56":1,"57":1,"66":1,"69":1,"71":1,"75":1,"77":1,"152":1,"158":1},"2":{"21":2,"22":1,"26":1,"27":4,"34":2,"35":2,"37":2,"43":2,"44":1,"48":1,"49":4,"56":2,"57":2,"59":2,"65":2,"66":1,"69":2,"71":2,"75":2,"77":2,"81":4,"87":3,"88":1,"93":1,"95":1,"96":1,"120":1,"121":1,"122":1,"123":1,"125":3,"127":2,"151":1,"152":14,"153":1,"155":2,"156":7,"158":2,"289":2,"290":8,"303":2}}],["processes",{"2":{"6":1,"15":1,"25":1,"27":1,"47":1,"49":1,"151":1,"152":1,"156":2,"158":1,"289":4}}],["processing",{"2":{"6":1}}],["protocol",{"2":{"3":1,"6":1,"8":6}}],["production",{"2":{"3":1}}],["project",{"2":{"0":1,"6":2,"9":2,"12":1,"13":1}}],["prefix",{"2":{"1":1}}],["preference",{"2":{"0":1}}],["y",{"2":{"250":1}}],["y>",{"2":{"250":1}}],["y>name",{"2":{"250":1}}],["yellow>",{"2":{"180":1}}],["yunzai",{"2":{"8":1}}],["yml格式的所有合法内容",{"2":{"311":1}}],["yml文件",{"2":{"308":1}}],["yml中填写一些信息",{"2":{"308":1}}],["yml",{"2":{"0":2,"142":1,"144":1,"308":2,"311":1}}],["you",{"2":{"0":4,"1":1,"2":1,"3":1,"4":1,"6":6,"7":2,"12":1,"13":2,"15":2,"289":1}}],["your",{"2":{"0":1,"13":1,"15":1,"248":4}}],["yamlweather",{"2":{"317":1}}],["yamlname",{"2":{"308":1}}],["yaml",{"0":{"139":1},"2":{"0":2,"1":1,"2":2,"139":5,"142":2,"144":1}}],["a包中的index",{"2":{"308":1}}],["application",{"0":{"254":2},"2":{"250":1}}],["append",{"2":{"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"87":2,"125":2,"189":1,"193":1,"240":1,"241":5}}],["api格式为onebot",{"2":{"311":1}}],["api文档",{"2":{"298":1}}],["api也有差别",{"2":{"298":1}}],["api",{"0":{"298":1},"2":{"243":10,"296":3,"297":2,"311":3}}],["await",{"2":{"22":4,"44":4,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"87":2,"89":2,"125":1,"127":2,"152":4,"190":2,"200":2,"201":2,"202":1,"290":1,"296":1,"297":1,"299":1}}],["arbitrary",{"0":{"269":1}}],["arg",{"2":{"241":13,"242":16}}],["argv",{"2":{"26":1,"48":1}}],["arguments",{"2":{"21":1,"25":1,"27":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"38":1,"39":1,"43":1,"47":1,"49":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"60":1,"61":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":1,"83":1,"84":1,"87":1,"88":1,"93":1,"94":1,"95":1,"111":1,"112":1,"120":1,"121":1,"122":1,"124":1,"125":1,"126":1,"138":1,"152":1,"154":1,"156":1,"158":1,"171":1,"173":1,"184":1,"188":1,"190":1,"238":1,"239":1,"241":1,"242":1,"243":1,"248":1,"249":1,"250":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["args=coro",{"2":{"285":1}}],["args=self",{"2":{"152":1}}],["args=",{"2":{"26":1,"48":1,"241":2}}],["args",{"0":{"21":1,"28":1,"43":1,"50":1,"66":1,"108":1,"154":1,"215":1},"2":{"21":4,"25":1,"26":2,"27":1,"28":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"38":1,"39":1,"43":4,"47":1,"48":2,"49":1,"50":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"60":1,"61":1,"66":4,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":1,"82":1,"83":1,"84":1,"85":1,"87":1,"88":1,"93":1,"94":1,"95":1,"108":2,"111":1,"112":1,"120":1,"121":1,"122":1,"124":1,"125":1,"126":1,"138":1,"152":1,"154":5,"156":1,"158":1,"164":2,"171":1,"173":1,"183":1,"184":1,"188":1,"190":1,"238":1,"239":1,"241":9,"242":9,"243":1,"250":1,"283":1,"284":1,"285":1,"286":1,"287":3,"311":4}}],["arch",{"2":{"14":1}}],["are",{"2":{"1":1,"6":2,"13":1,"15":1,"289":1}}],["abs",{"2":{"243":4}}],["absolute",{"2":{"13":1}}],["able",{"2":{"15":1}}],["about",{"2":{"6":1}}],["active和",{"2":{"290":1}}],["active和chan",{"2":{"154":2}}],["active=channel",{"2":{"154":1}}],["active=chan",{"2":{"154":1}}],["active",{"0":{"90":1,"92":1,"149":2},"2":{"27":6,"49":6,"90":1,"119":2,"124":1,"127":1,"149":6,"152":3,"154":4,"290":13}}],["activate",{"2":{"12":4}}],["acknowledgements",{"0":{"10":1}}],["account",{"2":{"7":1}}],["according",{"2":{"6":1}}],["accesstoken",{"2":{"3":2}}],["access",{"2":{"2":2}}],["author",{"0":{"264":1},"2":{"6":1,"63":1,"79":1,"102":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["auto",{"2":{"1":2,"2":2}}],["automatically",{"2":{"0":1,"1":2}}],["after",{"0":{"32":1,"33":1,"36":1,"54":1,"55":1,"58":1,"68":1,"70":1,"72":1,"74":1,"76":1,"78":1},"2":{"6":2,"22":1,"32":2,"33":2,"36":2,"44":1,"54":2,"55":2,"58":2,"65":3,"68":2,"70":2,"72":2,"74":3,"76":3,"78":3,"290":1}}],["avoid",{"2":{"6":1,"12":1}}],["available",{"2":{"1":1}}],["a",{"2":{"3":1,"6":4,"7":1,"8":3,"9":1,"12":2,"14":1,"84":1,"85":1,"138":3,"243":4,"249":1,"286":2,"289":1,"290":1,"302":1}}],["annassign",{"2":{"241":1}}],["annotation",{"2":{"241":6}}],["an",{"2":{"6":1,"7":1,"84":1,"93":1}}],["any=none",{"2":{"38":1,"39":1,"60":1,"61":1}}],["any",{"0":{"38":2,"39":2,"60":2,"61":2,"83":1,"87":2,"88":1,"97":1,"98":1,"99":1,"104":1,"108":1,"120":1,"121":2,"123":1,"124":1,"126":1,"133":1,"134":1,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":4,"170":1,"183":2,"184":1,"224":1,"266":1,"283":1,"287":1},"2":{"2":1,"4":1,"21":1,"38":3,"39":3,"43":1,"60":3,"61":3,"83":1,"87":5,"88":1,"91":1,"92":1,"95":1,"96":1,"97":1,"98":1,"99":1,"104":1,"108":1,"119":3,"120":1,"121":5,"123":4,"124":1,"125":1,"126":1,"133":1,"134":1,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":4,"170":1,"183":3,"184":1,"195":1,"241":7,"243":1,"283":1,"287":1}}],["and",{"0":{"201":1},"2":{"0":6,"4":1,"6":7,"9":1,"12":2,"15":2,"83":1,"84":1,"171":1,"201":2,"241":7,"242":1,"249":3,"289":3,"290":2,"303":2}}],["adapter",{"2":{"3":1,"4":2}}],["advanced",{"2":{"2":1}}],["add",{"0":{"154":1,"193":1},"2":{"2":1,"154":1,"180":1,"193":1,"194":1,"249":1}}],["address",{"2":{"1":1,"3":2}}],["amp",{"2":{"13":2}}],["am",{"2":{"1":1,"290":6}}],["attributes=",{"2":{"241":2}}],["attributes",{"0":{"230":1,"236":1},"2":{"241":2,"242":2}}],["attributeinfo",{"0":{"221":1,"230":1,"236":1},"1":{"222":1,"223":1,"224":1,"225":1},"2":{"241":2}}],["attr",{"0":{"130":1,"131":1,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"254":1,"255":1,"256":1,"257":1,"258":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"241":2,"242":14}}],["atexit",{"2":{"21":1,"43":1}}],["at",{"2":{"1":1,"15":2}}],["already",{"2":{"81":2,"93":1}}],["alive",{"0":{"24":1,"46":1,"158":1},"2":{"22":1,"24":1,"44":1,"46":1,"156":1,"158":2}}],["alconna",{"2":{"1":2,"2":2,"10":1}}],["allowed",{"0":{"269":1}}],["allow",{"2":{"2":2}}],["all",{"0":{"123":1,"136":1,"153":1,"155":1,"157":1},"2":{"0":1,"2":1,"21":1,"22":1,"25":1,"26":1,"43":1,"44":1,"47":1,"48":1,"63":1,"79":1,"83":3,"102":1,"109":1,"123":2,"135":1,"136":3,"147":1,"153":1,"155":1,"157":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["assign",{"2":{"241":2}}],["ast",{"2":{"241":29}}],["asynchronous",{"2":{"287":2}}],["async=isinstance",{"2":{"241":2}}],["asyncfunctiondef",{"2":{"241":3}}],["async",{"0":{"22":1,"24":1,"44":1,"46":1,"66":2,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":2,"88":1,"89":1,"126":1,"127":1,"152":1,"153":1,"190":1,"202":1,"203":1,"204":1,"220":1,"277":1,"287":1},"2":{"66":3,"86":1,"87":1,"89":1,"116":1,"117":1,"125":1,"126":1,"127":1,"152":1,"195":1,"200":1,"201":1,"203":1,"204":1,"242":4,"277":1,"287":2,"290":2}}],["asyncio",{"2":{"21":2,"23":1,"43":2,"45":1,"66":2,"86":1,"88":2,"126":1,"153":3,"284":5,"290":2}}],["ask",{"2":{"9":1}}],["asked",{"0":{"6":1}}],["as",{"2":{"0":1,"3":1,"6":2,"122":1,"239":1,"241":1,"248":1,"284":1}}]],"serializationVersion":2}`;export{e as default}; diff --git a/assets/chunks/@localSearchIndexroot.ButuspH0.js b/assets/chunks/@localSearchIndexroot.ButuspH0.js new file mode 100644 index 00000000..7436961f --- /dev/null +++ b/assets/chunks/@localSearchIndexroot.ButuspH0.js @@ -0,0 +1 @@ +const e=`{"documentCount":321,"nextId":321,"documentIds":{"0":"/deploy/config.html#配置","1":"/deploy/config.html#基础配置项","2":"/deploy/config.html#其他配置","3":"/deploy/config.html#示例-与nonebot对接的onebot实现端配置","4":"/deploy/config.html#其他","5":"/deploy/fandq.html#答疑","6":"/deploy/fandq.html#常见问题","7":"/deploy/fandq.html#其他问题","8":"/deploy/fandq.html#推荐方案-qq","9":"/deploy/fandq.html#推荐方案-minecraft","10":"/deploy/fandq.html#鸣谢","11":"/deploy/install.html#安装","12":"/deploy/install.html#常规部署","13":"/deploy/install.html#使用docker构建","14":"/deploy/install.html#使用trss-scripts部署","15":"/deploy/install.html#装置要求","16":"/deploy/install.html#其他问题请移步至答疑","17":"/dev/api/api.html#liteyuki","18":"/dev/api/api.html#var-version","19":"/dev/api/bot/bot.html#liteyuki-bot","20":"/dev/api/bot/bot.html#class-liteyukibot","21":"/dev/api/bot/bot.html#def-init-self-args-kwargs-none","22":"/dev/api/bot/bot.html#async-def-run-self","23":"/dev/api/bot/bot.html#def-run-self","24":"/dev/api/bot/bot.html#async-def-keep-alive-self","25":"/dev/api/bot/bot.html#def-handle-exit-self-signum-frame","26":"/dev/api/bot/bot.html#def-restart-self-delay-int-0","27":"/dev/api/bot/bot.html#def-restart-process-self-name-optional-str-none","28":"/dev/api/bot/bot.html#def-init-self-args-kwargs","29":"/dev/api/bot/bot.html#def-init-logger-self","30":"/dev/api/bot/bot.html#def-stop-self","31":"/dev/api/bot/bot.html#def-on-before-start-self-func-lifespan-func","32":"/dev/api/bot/bot.html#def-on-after-start-self-func-lifespan-func","33":"/dev/api/bot/bot.html#def-on-after-shutdown-self-func-lifespan-func","34":"/dev/api/bot/bot.html#def-on-before-process-shutdown-self-func-lifespan-func","35":"/dev/api/bot/bot.html#def-on-before-process-restart-self-func-lifespan-func","36":"/dev/api/bot/bot.html#def-on-after-restart-self-func-lifespan-func","37":"/dev/api/bot/bot.html#def-get-bot-liteyukibot","38":"/dev/api/bot/bot.html#def-get-config-key-str-default-any-none-any","39":"/dev/api/bot/bot.html#def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-none-any","40":"/dev/api/bot/bot.html#def-print-logo","41":"/dev/api/bot/#liteyuki-bot","42":"/dev/api/bot/#class-liteyukibot","43":"/dev/api/bot/#def-init-self-args-kwargs-none","44":"/dev/api/bot/#async-def-run-self","45":"/dev/api/bot/#def-run-self","46":"/dev/api/bot/#async-def-keep-alive-self","47":"/dev/api/bot/#def-handle-exit-self-signum-frame","48":"/dev/api/bot/#def-restart-self-delay-int-0","49":"/dev/api/bot/#def-restart-process-self-name-optional-str-none","50":"/dev/api/bot/#def-init-self-args-kwargs","51":"/dev/api/bot/#def-init-logger-self","52":"/dev/api/bot/#def-stop-self","53":"/dev/api/bot/#def-on-before-start-self-func-lifespan-func","54":"/dev/api/bot/#def-on-after-start-self-func-lifespan-func","55":"/dev/api/bot/#def-on-after-shutdown-self-func-lifespan-func","56":"/dev/api/bot/#def-on-before-process-shutdown-self-func-lifespan-func","57":"/dev/api/bot/#def-on-before-process-restart-self-func-lifespan-func","58":"/dev/api/bot/#def-on-after-restart-self-func-lifespan-func","59":"/dev/api/bot/#def-get-bot-liteyukibot","60":"/dev/api/bot/#def-get-config-key-str-default-any-none-any","61":"/dev/api/bot/#def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-none-any","62":"/dev/api/bot/#def-print-logo","63":"/dev/api/bot/lifespan.html#liteyuki-bot-lifespan","64":"/dev/api/bot/lifespan.html#class-lifespan","65":"/dev/api/bot/lifespan.html#def-init-self-none","66":"/dev/api/bot/lifespan.html#async-def-run-funcs-funcs-list-async-lifespan-func-process-lifespan-func-args-kwargs-none","67":"/dev/api/bot/lifespan.html#def-on-before-start-self-func-lifespan-func-lifespan-func","68":"/dev/api/bot/lifespan.html#def-on-after-start-self-func-lifespan-func-lifespan-func","69":"/dev/api/bot/lifespan.html#def-on-before-process-shutdown-self-func-lifespan-func-lifespan-func","70":"/dev/api/bot/lifespan.html#def-on-after-shutdown-self-func-lifespan-func-lifespan-func","71":"/dev/api/bot/lifespan.html#def-on-before-process-restart-self-func-lifespan-func-lifespan-func","72":"/dev/api/bot/lifespan.html#def-on-after-restart-self-func-lifespan-func-lifespan-func","73":"/dev/api/bot/lifespan.html#async-def-before-start-self-none","74":"/dev/api/bot/lifespan.html#async-def-after-start-self-none","75":"/dev/api/bot/lifespan.html#async-def-before-process-shutdown-self-none","76":"/dev/api/bot/lifespan.html#async-def-after-shutdown-self-none","77":"/dev/api/bot/lifespan.html#async-def-before-process-restart-self-none","78":"/dev/api/bot/lifespan.html#async-def-after-restart-self-none","79":"/dev/api/comm/channel.html#liteyuki-comm-channel","80":"/dev/api/comm/channel.html#class-channel-generic-t","81":"/dev/api/comm/channel.html#def-init-self-name-str-type-check-optional-bool-none","82":"/dev/api/comm/channel.html#def-get-generic-type-self-optional-type","83":"/dev/api/comm/channel.html#def-validate-structure-self-data-any-structure-type-bool","84":"/dev/api/comm/channel.html#def-send-self-data-t","85":"/dev/api/comm/channel.html#def-receive-self-t","86":"/dev/api/comm/channel.html#async-def-async-receive-self-t","87":"/dev/api/comm/channel.html#def-on-receive-self-filter-func-optional-filter-func-none-callable-callable-t-any-callable-t-any","88":"/dev/api/comm/channel.html#async-def-run-on-receive-funcs-self-data-any","89":"/dev/api/comm/channel.html#async-def-start-receive-loop-self","90":"/dev/api/comm/channel.html#var-active-channel","91":"/dev/api/comm/channel.html#var-publish-channel","92":"/dev/api/comm/channel.html#var-channel-deliver-active-channel","93":"/dev/api/comm/channel.html#def-set-channel-name-str-channel-channel","94":"/dev/api/comm/channel.html#def-set-channels-channels-dict-str-channel","95":"/dev/api/comm/channel.html#def-get-channel-name-str-channel","96":"/dev/api/comm/channel.html#def-get-channels-dict-str-channel","97":"/dev/api/comm/channel.html#def-on-set-channel-data-tuple-str-dict-str-any","98":"/dev/api/comm/channel.html#def-on-get-channel-data-tuple-str-dict-str-any","99":"/dev/api/comm/channel.html#def-on-get-channels-data-tuple-str-dict-str-any","100":"/dev/api/comm/comm.html#liteyuki-comm","101":"/dev/api/comm/event.html#liteyuki-comm-event","102":"/dev/api/comm/event.html#class-event","103":"/dev/api/comm/event.html#def-init-self-name-str-data-dict-str-any","104":"/dev/api/comm/#liteyuki-comm","105":"/dev/api/comm/rpc.html#liteyuki-comm-rpc","106":"/dev/api/comm/rpc.html#class-rpc","107":"/dev/api/comm/rpc.html#def-init-self-on-calling-on-calling-func-none","108":"/dev/api/comm/rpc.html#def-call-self-args-tuple-kwargs-dict-any","109":"/dev/api/comm/socks_channel.html#liteyuki-comm-socks-channel","110":"/dev/api/comm/socks_channel.html#class-sockschannel","111":"/dev/api/comm/socks_channel.html#def-init-self-name-str","112":"/dev/api/comm/socks_channel.html#def-send-self-data","113":"/dev/api/comm/socks_channel.html#def-receive-self","114":"/dev/api/comm/socks_channel.html#def-close-self","115":"/dev/api/comm/storage.html#liteyuki-comm-storage","116":"/dev/api/comm/storage.html#var-on-main-subscriber-receive-funcs","117":"/dev/api/comm/storage.html#var-on-sub-subscriber-receive-funcs","118":"/dev/api/comm/storage.html#class-keyvaluestore","119":"/dev/api/comm/storage.html#def-init-self","120":"/dev/api/comm/storage.html#def-set-self-key-str-value-any-none","121":"/dev/api/comm/storage.html#def-get-self-key-str-default-optional-any-none-optional-any","122":"/dev/api/comm/storage.html#def-delete-self-key-str-ignore-key-error-bool-true-none","123":"/dev/api/comm/storage.html#def-get-all-self-dict-str-any","124":"/dev/api/comm/storage.html#def-publish-self-channel-str-data-any-none","125":"/dev/api/comm/storage.html#def-on-subscriber-receive-self-channel-str-callable-on-receive-func-on-receive-func","126":"/dev/api/comm/storage.html#async-def-run-subscriber-receive-funcs-channel-str-data-any","127":"/dev/api/comm/storage.html#async-def-start-receive-loop-self","128":"/dev/api/comm/storage.html#class-globalkeyvaluestore","129":"/dev/api/comm/storage.html#def-get-instance-cls","130":"/dev/api/comm/storage.html#attr-instance-none","131":"/dev/api/comm/storage.html#attr-lock-threading-lock","132":"/dev/api/comm/storage.html#var-ref-count","133":"/dev/api/comm/storage.html#def-on-get-data-tuple-str-dict-str-any","134":"/dev/api/comm/storage.html#def-on-set-data-tuple-str-dict-str-any","135":"/dev/api/comm/storage.html#def-on-delete-data-tuple-str-dict-str-any","136":"/dev/api/comm/storage.html#def-on-get-all-data-tuple-str-dict-str-any","137":"/dev/api/config.html#liteyuki-config","138":"/dev/api/config.html#def-flat-config-config-dict-str-any-dict-str-any","139":"/dev/api/config.html#def-load-from-yaml-file-str-dict-str-any","140":"/dev/api/config.html#def-load-from-json-file-str-dict-str-any","141":"/dev/api/config.html#def-load-from-toml-file-str-dict-str-any","142":"/dev/api/config.html#def-load-from-files-files-str-no-warning-bool-false-dict-str-any","143":"/dev/api/config.html#def-load-configs-from-dirs-directories-str-no-waring-bool-false-dict-str-any","144":"/dev/api/config.html#def-load-config-in-default-no-waring-bool-false-dict-str-any","145":"/dev/api/core/core.html#liteyuki-core","146":"/dev/api/core/#liteyuki-core","147":"/dev/api/core/manager.html#liteyuki-core-manager","148":"/dev/api/core/manager.html#class-channeldeliver","149":"/dev/api/core/manager.html#def-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any","150":"/dev/api/core/manager.html#class-processmanager","151":"/dev/api/core/manager.html#def-init-self-lifespan-lifespan","152":"/dev/api/core/manager.html#async-def-run-process-self-name-str","153":"/dev/api/core/manager.html#async-def-start-all-self","154":"/dev/api/core/manager.html#def-add-target-self-name-str-target-target-func-args-tuple-kwargs-none","155":"/dev/api/core/manager.html#def-join-all-self","156":"/dev/api/core/manager.html#def-terminate-self-name-str","157":"/dev/api/core/manager.html#def-terminate-all-self","158":"/dev/api/core/manager.html#def-is-process-alive-self-name-str-bool","159":"/dev/api/dev/dev.html#liteyuki-dev","160":"/dev/api/dev/#liteyuki-dev","161":"/dev/api/dev/observer.html#liteyuki-dev-observer","162":"/dev/api/dev/observer.html#var-callback-func","163":"/dev/api/dev/observer.html#var-filter-func","164":"/dev/api/dev/observer.html#def-debounce-wait","165":"/dev/api/dev/observer.html#class-codemodifiedhandler-filesystemeventhandler","166":"/dev/api/dev/observer.html#def-on-modified-self-event","167":"/dev/api/dev/observer.html#def-on-created-self-event","168":"/dev/api/dev/observer.html#def-on-deleted-self-event","169":"/dev/api/dev/observer.html#def-on-moved-self-event","170":"/dev/api/dev/observer.html#def-on-any-event-self-event","171":"/dev/api/dev/observer.html#def-on-file-system-event-directories-tuple-str-recursive-bool-true-event-filter-filter-func-none-callable-callback-func-callback-func","172":"/dev/api/dev/plugin.html#liteyuki-dev-plugin","173":"/dev/api/dev/plugin.html#def-run-plugins-module-path-str-path","174":"/dev/api/exception.html#liteyuki-exception","175":"/dev/api/exception.html#class-liteyukiexception-baseexception","176":"/dev/api/#liteyuki","177":"/dev/api/#var-version","178":"/dev/api/log.html#liteyuki-log","179":"/dev/api/log.html#def-get-format-level-str-str","180":"/dev/api/log.html#def-init-log-config-dict","181":"/dev/api/message/event.html#liteyuki-message-event","182":"/dev/api/message/event.html#class-messageevent","183":"/dev/api/message/event.html#def-init-self-bot-id-str-message-list-dict-str-any-str-message-type-str-raw-message-str-session-id-str-user-id-str-session-type-str-receive-channel-optional-channel-messageevent-none-data-optional-dict-str-any-none","184":"/dev/api/message/event.html#def-reply-self-message-str-dict-str-any","185":"/dev/api/message/#liteyuki-message","186":"/dev/api/message/matcher.html#liteyuki-message-matcher","187":"/dev/api/message/matcher.html#class-matcher","188":"/dev/api/message/matcher.html#def-init-self-rule-rule-priority-int-block-bool","189":"/dev/api/message/matcher.html#def-handle-self-callable-eventhandler-eventhandler","190":"/dev/api/message/matcher.html#async-def-run-self-event-messageevent-none","191":"/dev/api/message/message.html#liteyuki-message","192":"/dev/api/message/on.html#liteyuki-message-on","193":"/dev/api/message/on.html#def-add-matcher-matcher-matcher","194":"/dev/api/message/on.html#def-on-message-rule-rule-empty-rule-priority-int-0-block-bool-false-matcher","195":"/dev/api/message/on.html#def-on-keywords-keywords-list-str-rule-empty-rule-priority-int-0-block-bool-false-matcher","196":"/dev/api/message/rule.html#liteyuki-message-rule","197":"/dev/api/message/rule.html#var-rulehandlerfunc","198":"/dev/api/message/rule.html#class-rule","199":"/dev/api/message/rule.html#def-init-self-handler-rulehandlerfunc","200":"/dev/api/message/rule.html#def-or-self-other-rule-rule","201":"/dev/api/message/rule.html#def-and-self-other-rule-rule","202":"/dev/api/message/rule.html#async-def-call-self-event-messageevent-bool","203":"/dev/api/message/rule.html#async-def-empty-rule-event-messageevent-bool","204":"/dev/api/message/rule.html#async-def-is-su-rule-event-messageevent-bool","205":"/dev/api/message/session.html#liteyuki-message-session","206":"/dev/api/mkdoc.html#liteyuki-mkdoc","207":"/dev/api/mkdoc.html#class-deftype-enum","208":"/dev/api/mkdoc.html#attr-function-function","209":"/dev/api/mkdoc.html#attr-method-method","210":"/dev/api/mkdoc.html#attr-static-method-staticmethod","211":"/dev/api/mkdoc.html#attr-class-method-classmethod","212":"/dev/api/mkdoc.html#attr-property-property","213":"/dev/api/mkdoc.html#class-functioninfo-basemodel","214":"/dev/api/mkdoc.html#attr-name-str-no-default","215":"/dev/api/mkdoc.html#attr-args-list-tuple-str-str-no-default","216":"/dev/api/mkdoc.html#attr-return-type-str-no-default","217":"/dev/api/mkdoc.html#attr-docstring-str-no-default","218":"/dev/api/mkdoc.html#attr-source-code-str","219":"/dev/api/mkdoc.html#attr-type-deftype-no-default","220":"/dev/api/mkdoc.html#attr-is-async-bool-no-default","221":"/dev/api/mkdoc.html#class-attributeinfo-basemodel","222":"/dev/api/mkdoc.html#attr-name-str-no-default-1","223":"/dev/api/mkdoc.html#attr-type-str-no-default","224":"/dev/api/mkdoc.html#attr-value-any-none","225":"/dev/api/mkdoc.html#attr-docstring-str","226":"/dev/api/mkdoc.html#class-classinfo-basemodel","227":"/dev/api/mkdoc.html#attr-name-str-no-default-2","228":"/dev/api/mkdoc.html#attr-docstring-str-no-default-1","229":"/dev/api/mkdoc.html#attr-methods-list-functioninfo-no-default","230":"/dev/api/mkdoc.html#attr-attributes-list-attributeinfo-no-default","231":"/dev/api/mkdoc.html#attr-inherit-list-str-no-default","232":"/dev/api/mkdoc.html#class-moduleinfo-basemodel","233":"/dev/api/mkdoc.html#attr-module-path-str-no-default","234":"/dev/api/mkdoc.html#attr-functions-list-functioninfo-no-default","235":"/dev/api/mkdoc.html#attr-classes-list-classinfo-no-default","236":"/dev/api/mkdoc.html#attr-attributes-list-attributeinfo-no-default-1","237":"/dev/api/mkdoc.html#attr-docstring-str-no-default-2","238":"/dev/api/mkdoc.html#def-get-relative-path-base-path-str-target-path-str-str","239":"/dev/api/mkdoc.html#def-write-to-files-file-data-dict-str-str","240":"/dev/api/mkdoc.html#def-get-file-list-module-folder-str","241":"/dev/api/mkdoc.html#def-get-module-info-normal-file-path-str-ignore-private-bool-true-moduleinfo","242":"/dev/api/mkdoc.html#def-generate-markdown-module-info-moduleinfo-front-matter-none-lang-str-zh-cn-str","243":"/dev/api/mkdoc.html#def-generate-docs-module-folder-str-output-dir-str-with-top-bool-false-lang-str-zh-cn-ignored-paths-none","244":"/dev/api/mkdoc.html#var-no-module-name-pyfile-path","245":"/dev/api/plugin/#liteyuki-plugin","246":"/dev/api/plugin/#def-get-loaded-plugins-dict-str-plugin","247":"/dev/api/plugin/load.html#liteyuki-plugin-load","248":"/dev/api/plugin/load.html#def-load-plugin-module-path-str-path-optional-plugin","249":"/dev/api/plugin/load.html#def-load-plugins-plugin-dir-str-ignore-warning-bool-true-set-plugin","250":"/dev/api/plugin/load.html#def-format-display-name-display-name-str-plugin-type-plugintype-str","251":"/dev/api/plugin/manager.html#liteyuki-plugin-manager","252":"/dev/api/plugin/model.html#liteyuki-plugin-model","253":"/dev/api/plugin/model.html#class-plugintype-enum","254":"/dev/api/plugin/model.html#attr-application-application","255":"/dev/api/plugin/model.html#attr-service-service","256":"/dev/api/plugin/model.html#attr-module-module","257":"/dev/api/plugin/model.html#attr-unclassified-unclassified","258":"/dev/api/plugin/model.html#attr-test-test","259":"/dev/api/plugin/model.html#class-pluginmetadata-basemodel","260":"/dev/api/plugin/model.html#attr-name-str-no-default","261":"/dev/api/plugin/model.html#attr-description-str","262":"/dev/api/plugin/model.html#attr-usage-str","263":"/dev/api/plugin/model.html#attr-type-plugintype-plugintype-unclassified","264":"/dev/api/plugin/model.html#attr-author-str","265":"/dev/api/plugin/model.html#attr-homepage-str","266":"/dev/api/plugin/model.html#attr-extra-dict-str-any","267":"/dev/api/plugin/model.html#class-plugin-basemodel","268":"/dev/api/plugin/model.html#def-hash-self","269":"/dev/api/plugin/model.html#attr-model-config-arbitrary-types-allowed-true","270":"/dev/api/plugin/model.html#attr-name-str-no-default-1","271":"/dev/api/plugin/model.html#attr-module-moduletype-no-default","272":"/dev/api/plugin/model.html#attr-module-name-str-no-default","273":"/dev/api/plugin/model.html#attr-metadata-optional-pluginmetadata-none","274":"/dev/api/plugin/plugin.html#liteyuki-plugin","275":"/dev/api/plugin/plugin.html#def-get-loaded-plugins-dict-str-plugin","276":"/dev/api/plugins/liteecho.html#liteyuki-plugins-liteecho","277":"/dev/api/plugins/liteecho.html#async-def-liteecho-event-messageevent","278":"/dev/api/plugins/plugin_loader/#liteyuki-plugins-plugin-loader","279":"/dev/api/plugins/plugin_loader/#def-default-plugins-loader","280":"/dev/api/plugins/plugin_loader/plugin_loader.html#liteyuki-plugins-plugin-loader","281":"/dev/api/plugins/plugin_loader/plugin_loader.html#def-default-plugins-loader","282":"/dev/api/utils.html#liteyuki-utils","283":"/dev/api/utils.html#def-is-coroutine-callable-call-callable-any-bool","284":"/dev/api/utils.html#def-run-coroutine-coro-coroutine","285":"/dev/api/utils.html#def-run-coroutine-in-thread-coro-coroutine","286":"/dev/api/utils.html#def-path-to-module-name-path-path-str","287":"/dev/api/utils.html#def-async-wrapper-func-callable-any-callable-coroutine","288":"/dev/comm.html#通道通信","289":"/dev/comm.html#简介","290":"/dev/comm.html#示例","291":"/dev/comm.html#共享内存通信","292":"/dev/comm.html#简介-1","293":"/dev/comm.html#示例-1","294":"/dev/lyfunc.html#轻雪函数","295":"/dev/lyfunc.html#函数文件","296":"/dev/lyfunc.html#命令文档","297":"/dev/lyfunc.html#示例","298":"/dev/lyfunc.html#api","299":"/dev/lyfunc.html#结束关键字","300":"/dev/plugin.html#简介","301":"/dev/plugin.html#开始","302":"/dev/plugin.html#创建插件","303":"/dev/plugin.html#编写逻辑部分","304":"/dev/plugin.html#加载插件","305":"/dev/plugin.html#方法1","306":"/dev/plugin.html#方法2","307":"/dev/resource.html#简介","308":"/dev/resource.html#加载资源包","309":"/usage/agreement.html#用户协议","310":"/usage/basic.html#基础插件","311":"/usage/basic.html#轻雪命令liteyuki-command","312":"/usage/basic.html#命令别名","313":"/usage/basic.html#插件-包管理器-liteyuki-pacman","314":"/usage/basic.html#命令别名-1","315":"/usage/basic.html#用户管理liteyuki-user","316":"/usage/extra.html#功能插件命令","317":"/usage/extra.html#轻雪天气liteyuki-weather","318":"/usage/extra.html#命令别名","319":"/usage/extra.html#统计信息liteyuki-statistics","320":"/usage/extra.html#命令别名-1"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[1,1,16],"1":[1,1,51],"2":[1,1,48],"3":[2,1,28],"4":[1,1,3],"5":[1,1,1],"6":[1,1,55],"7":[1,1,2],"8":[3,1,30],"9":[3,1,6],"10":[1,1,8],"11":[1,1,1],"12":[1,1,44],"13":[1,1,35],"14":[2,1,7],"15":[1,1,39],"16":[1,2,1],"17":[1,1,1],"18":[3,1,7],"19":[2,1,1],"20":[2,2,1],"21":[7,4,69],"22":[5,4,20],"23":[4,4,18],"24":[6,4,29],"25":[7,4,25],"26":[8,4,53],"27":[10,4,37],"28":[6,4,14],"29":[5,4,11],"30":[4,4,13],"31":[9,4,19],"32":[9,4,19],"33":[9,4,20],"34":[10,4,21],"35":[10,4,21],"36":[9,4,20],"37":[5,2,35],"38":[10,2,24],"39":[14,2,42],"40":[4,2,21],"41":[2,1,1],"42":[2,2,1],"43":[7,4,69],"44":[5,4,20],"45":[4,4,18],"46":[6,4,29],"47":[7,4,25],"48":[8,4,53],"49":[10,4,37],"50":[6,4,14],"51":[5,4,11],"52":[4,4,13],"53":[9,4,19],"54":[9,4,19],"55":[9,4,20],"56":[10,4,21],"57":[10,4,21],"58":[9,4,20],"59":[5,2,35],"60":[10,2,24],"61":[14,2,42],"62":[4,2,21],"63":[3,1,25],"64":[2,3,1],"65":[5,5,30],"66":[14,5,42],"67":[9,5,22],"68":[9,5,22],"69":[10,5,23],"70":[9,5,22],"71":[10,5,23],"72":[9,5,22],"73":[7,5,21],"74":[7,5,21],"75":[8,5,22],"76":[7,5,21],"77":[8,5,22],"78":[7,5,21],"79":[3,1,27],"80":[5,3,1],"81":[12,8,73],"82":[8,8,24],"83":[9,8,43],"84":[6,8,45],"85":[5,8,28],"86":[6,8,29],"87":[16,8,65],"88":[10,8,34],"89":[7,8,45],"90":[3,3,9],"91":[3,3,15],"92":[4,3,11],"93":[7,3,41],"94":[7,3,20],"95":[7,3,31],"96":[8,3,36],"97":[10,3,25],"98":[10,3,28],"99":[10,3,27],"100":[2,1,9],"101":[3,1,25],"102":[2,3,1],"103":[9,5,13],"104":[2,1,9],"105":[3,1,5],"106":[2,3,1],"107":[10,5,15],"108":[9,5,18],"109":[4,1,25],"110":[2,4,1],"111":[6,6,21],"112":[5,6,14],"113":[4,6,14],"114":[4,6,10],"115":[3,1,5],"116":[6,3,12],"117":[6,3,12],"118":[2,3,1],"119":[4,5,30],"120":[9,5,32],"121":[12,5,39],"122":[12,5,44],"123":[9,5,31],"124":[9,5,23],"125":[13,5,54],"126":[11,5,30],"127":[7,5,42],"128":[2,3,2],"129":[5,5,18],"130":[4,5,1],"131":[6,5,1],"132":[3,3,17],"133":[9,3,29],"134":[9,3,27],"135":[9,3,27],"136":[10,3,27],"137":[2,1,20],"138":[8,2,40],"139":[10,2,35],"140":[10,2,34],"141":[10,2,34],"142":[14,2,43],"143":[16,2,49],"144":[15,2,34],"145":[2,1,1],"146":[2,1,1],"147":[3,1,25],"148":[2,3,1],"149":[14,5,18],"150":[2,3,1],"151":[6,5,17],"152":[8,5,66],"153":[6,5,31],"154":[14,5,49],"155":[5,5,13],"156":[6,5,33],"157":[5,5,12],"158":[9,5,29],"159":[2,1,3],"160":[2,1,3],"161":[3,1,6],"162":[3,3,9],"163":[3,3,9],"164":[4,3,25],"165":[4,3,3],"166":[6,7,17],"167":[6,7,10],"168":[6,7,10],"169":[6,7,10],"170":[6,7,10],"171":[20,3,55],"172":[3,1,25],"173":[9,3,33],"174":[2,1,3],"175":[4,2,1],"176":[1,1,1],"177":[3,1,7],"178":[2,1,25],"179":[6,2,17],"180":[6,2,47],"181":[3,1,25],"182":[2,3,1],"183":[24,5,49],"184":[9,5,36],"185":[2,1,25],"186":[3,1,25],"187":[2,3,1],"188":[10,5,27],"189":[7,5,21],"190":[8,5,32],"191":[2,1,25],"192":[3,1,25],"193":[5,3,21],"194":[15,3,19],"195":[16,3,30],"196":[3,1,25],"197":[2,3,11],"198":[2,3,1],"199":[6,5,10],"200":[6,5,19],"201":[6,5,19],"202":[8,5,20],"203":[8,3,16],"204":[9,3,21],"205":[3,1,25],"206":[2,1,25],"207":[4,2,1],"208":[5,6,1],"209":[5,6,1],"210":[6,6,1],"211":[6,6,1],"212":[5,6,1],"213":[4,2,1],"214":[6,6,1],"215":[8,6,1],"216":[7,6,1],"217":[6,6,1],"218":[6,6,1],"219":[6,6,1],"220":[7,6,1],"221":[4,2,1],"222":[6,6,1],"223":[6,6,1],"224":[5,6,1],"225":[5,6,1],"226":[4,2,1],"227":[6,6,1],"228":[6,6,1],"229":[7,6,1],"230":[7,6,1],"231":[7,6,1],"232":[4,2,1],"233":[7,6,1],"234":[7,6,1],"235":[7,6,1],"236":[7,6,1],"237":[6,6,1],"238":[8,2,21],"239":[9,2,37],"240":[8,2,27],"241":[15,2,145],"242":[15,2,97],"243":[20,2,96],"244":[6,2,10],"245":[2,1,1],"246":[9,2,18],"247":[3,1,25],"248":[12,3,80],"249":[15,3,58],"250":[9,3,41],"251":[3,1,25],"252":[3,1,25],"253":[4,3,1],"254":[5,7,1],"255":[5,7,1],"256":[5,7,1],"257":[5,7,1],"258":[5,7,1],"259":[4,3,1],"260":[6,7,1],"261":[5,7,1],"262":[5,7,1],"263":[5,7,1],"264":[5,7,1],"265":[5,7,1],"266":[7,7,1],"267":[4,3,1],"268":[4,7,10],"269":[9,7,1],"270":[6,7,1],"271":[6,7,1],"272":[7,7,1],"273":[6,7,1],"274":[2,1,1],"275":[9,2,18],"276":[3,1,31],"277":[6,3,21],"278":[4,1,25],"279":[5,4,21],"280":[4,1,25],"281":[5,4,21],"282":[2,1,6],"283":[9,2,32],"284":[6,2,44],"285":[8,2,22],"286":[8,2,40],"287":[9,2,27],"288":[1,1,1],"289":[1,1,12],"290":[1,1,83],"291":[1,1,1],"292":[1,2,9],"293":[1,2,18],"294":[1,1,9],"295":[1,1,25],"296":[1,1,33],"297":[1,2,26],"298":[1,1,7],"299":[1,1,18],"300":[1,1,4],"301":[1,1,1],"302":[1,2,42],"303":[1,2,58],"304":[1,2,1],"305":[1,3,6],"306":[1,3,25],"307":[1,1,31],"308":[1,1,56],"309":[1,1,28],"310":[1,1,16],"311":[2,1,86],"312":[1,3,30],"313":[4,1,53],"314":[1,5,38],"315":[2,1,20],"316":[1,1,1],"317":[2,1,30],"318":[1,3,8],"319":[2,1,35],"320":[1,3,17]},"averageFieldLength":[5.725856697819316,3.485981308411215,20.401869158878498],"storedFields":{"0":{"title":"配置","titles":[]},"1":{"title":"基础配置项","titles":["配置"]},"2":{"title":"其他配置","titles":["配置"]},"3":{"title":"示例:与NoneBot对接的OneBot实现端配置","titles":["配置"]},"4":{"title":"其他","titles":["配置"]},"5":{"title":"答疑","titles":[]},"6":{"title":"常见问题","titles":["答疑"]},"7":{"title":"其他问题","titles":["答疑"]},"8":{"title":"推荐方案(QQ)","titles":["答疑"]},"9":{"title":"推荐方案(Minecraft)","titles":["答疑"]},"10":{"title":"鸣谢","titles":["答疑"]},"11":{"title":"安装","titles":[]},"12":{"title":"常规部署","titles":["安装"]},"13":{"title":"使用Docker构建","titles":["安装"]},"14":{"title":"使用TRSS Scripts部署","titles":["安装"]},"15":{"title":"装置要求","titles":["安装"]},"16":{"title":"其他问题请移步至","titles":["安装","装置要求"]},"17":{"title":"liteyuki","titles":[]},"18":{"title":"var __version__","titles":["liteyuki"]},"19":{"title":"liteyuki.bot","titles":[]},"20":{"title":"class LiteyukiBot","titles":["liteyuki.bot"]},"21":{"title":"def __init__(self, *args, **kwargs) -> None","titles":["liteyuki.bot","class LiteyukiBot"]},"22":{"title":"async def _run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"23":{"title":"def run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"24":{"title":"async def keep_alive(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"25":{"title":"def _handle_exit(self, signum, frame)","titles":["liteyuki.bot","class LiteyukiBot"]},"26":{"title":"def restart(self, delay: int = 0)","titles":["liteyuki.bot","class LiteyukiBot"]},"27":{"title":"def restart_process(self, name: Optional[str] = None)","titles":["liteyuki.bot","class LiteyukiBot"]},"28":{"title":"def init(self, *args, **kwargs)","titles":["liteyuki.bot","class LiteyukiBot"]},"29":{"title":"def init_logger(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"30":{"title":"def stop(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"31":{"title":"def on_before_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"32":{"title":"def on_after_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"33":{"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"34":{"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"35":{"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"36":{"title":"def on_after_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"37":{"title":"def get_bot() -> LiteyukiBot","titles":["liteyuki.bot"]},"38":{"title":"def get_config(key: str, default: Any = None) -> Any","titles":["liteyuki.bot"]},"39":{"title":"def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any","titles":["liteyuki.bot"]},"40":{"title":"def print_logo()","titles":["liteyuki.bot"]},"41":{"title":"liteyuki.bot","titles":[]},"42":{"title":"class LiteyukiBot","titles":["liteyuki.bot"]},"43":{"title":"def __init__(self, *args, **kwargs) -> None","titles":["liteyuki.bot","class LiteyukiBot"]},"44":{"title":"async def _run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"45":{"title":"def run(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"46":{"title":"async def keep_alive(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"47":{"title":"def _handle_exit(self, signum, frame)","titles":["liteyuki.bot","class LiteyukiBot"]},"48":{"title":"def restart(self, delay: int = 0)","titles":["liteyuki.bot","class LiteyukiBot"]},"49":{"title":"def restart_process(self, name: Optional[str] = None)","titles":["liteyuki.bot","class LiteyukiBot"]},"50":{"title":"def init(self, *args, **kwargs)","titles":["liteyuki.bot","class LiteyukiBot"]},"51":{"title":"def init_logger(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"52":{"title":"def stop(self)","titles":["liteyuki.bot","class LiteyukiBot"]},"53":{"title":"def on_before_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"54":{"title":"def on_after_start(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"55":{"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"56":{"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"57":{"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"58":{"title":"def on_after_restart(self, func: LIFESPAN_FUNC)","titles":["liteyuki.bot","class LiteyukiBot"]},"59":{"title":"def get_bot() -> LiteyukiBot","titles":["liteyuki.bot"]},"60":{"title":"def get_config(key: str, default: Any = None) -> Any","titles":["liteyuki.bot"]},"61":{"title":"def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any","titles":["liteyuki.bot"]},"62":{"title":"def print_logo()","titles":["liteyuki.bot"]},"63":{"title":"liteyuki.bot.lifespan","titles":[]},"64":{"title":"class Lifespan","titles":["liteyuki.bot.lifespan"]},"65":{"title":"def __init__(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"66":{"title":"async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"67":{"title":"def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"68":{"title":"def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"69":{"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"70":{"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"71":{"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"72":{"title":"def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","titles":["liteyuki.bot.lifespan","class Lifespan"]},"73":{"title":"async def before_start(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"74":{"title":"async def after_start(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"75":{"title":"async def before_process_shutdown(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"76":{"title":"async def after_shutdown(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"77":{"title":"async def before_process_restart(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"78":{"title":"async def after_restart(self) -> None","titles":["liteyuki.bot.lifespan","class Lifespan"]},"79":{"title":"liteyuki.comm.channel","titles":[]},"80":{"title":"class Channel(Generic[T])","titles":["liteyuki.comm.channel"]},"81":{"title":"def __init__(self, name: str, type_check: Optional[bool] = None)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"82":{"title":"def _get_generic_type(self) -> Optional[type]","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"83":{"title":"def _validate_structure(self, data: Any, structure: type) -> bool","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"84":{"title":"def send(self, data: T)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"85":{"title":"def receive(self) -> T","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"86":{"title":"async def async_receive(self) -> T","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"87":{"title":"def on_receive(self, filter_func: Optional[FILTER_FUNC] = None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"88":{"title":"async def _run_on_receive_funcs(self, data: Any)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"89":{"title":"async def start_receive_loop(self)","titles":["liteyuki.comm.channel","class Channel(Generic[T])"]},"90":{"title":"var active_channel","titles":["liteyuki.comm.channel"]},"91":{"title":"var publish_channel","titles":["liteyuki.comm.channel"]},"92":{"title":"var channel_deliver_active_channel","titles":["liteyuki.comm.channel"]},"93":{"title":"def set_channel(name: str, channel: Channel)","titles":["liteyuki.comm.channel"]},"94":{"title":"def set_channels(channels: dict[str, Channel])","titles":["liteyuki.comm.channel"]},"95":{"title":"def get_channel(name: str) -> Channel","titles":["liteyuki.comm.channel"]},"96":{"title":"def get_channels() -> dict[str, Channel]","titles":["liteyuki.comm.channel"]},"97":{"title":"def on_set_channel(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.channel"]},"98":{"title":"def on_get_channel(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.channel"]},"99":{"title":"def on_get_channels(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.channel"]},"100":{"title":"liteyuki.comm","titles":[]},"101":{"title":"liteyuki.comm.event","titles":[]},"102":{"title":"class Event","titles":["liteyuki.comm.event"]},"103":{"title":"def __init__(self, name: str, data: dict[str, Any])","titles":["liteyuki.comm.event","class Event"]},"104":{"title":"liteyuki.comm","titles":[]},"105":{"title":"liteyuki.comm.rpc","titles":[]},"106":{"title":"class RPC","titles":["liteyuki.comm.rpc"]},"107":{"title":"def __init__(self, on_calling: ON_CALLING_FUNC) -> None","titles":["liteyuki.comm.rpc","class RPC"]},"108":{"title":"def call(self, args: tuple, kwargs: dict) -> Any","titles":["liteyuki.comm.rpc","class RPC"]},"109":{"title":"liteyuki.comm.socks_channel","titles":[]},"110":{"title":"class SocksChannel","titles":["liteyuki.comm.socks_channel"]},"111":{"title":"def __init__(self, name: str)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"112":{"title":"def send(self, data)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"113":{"title":"def receive(self)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"114":{"title":"def close(self)","titles":["liteyuki.comm.socks_channel","class SocksChannel"]},"115":{"title":"liteyuki.comm.storage","titles":[]},"116":{"title":"var _on_main_subscriber_receive_funcs","titles":["liteyuki.comm.storage"]},"117":{"title":"var _on_sub_subscriber_receive_funcs","titles":["liteyuki.comm.storage"]},"118":{"title":"class KeyValueStore","titles":["liteyuki.comm.storage"]},"119":{"title":"def __init__(self)","titles":["liteyuki.comm.storage","class KeyValueStore"]},"120":{"title":"def set(self, key: str, value: Any) -> None","titles":["liteyuki.comm.storage","class KeyValueStore"]},"121":{"title":"def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]","titles":["liteyuki.comm.storage","class KeyValueStore"]},"122":{"title":"def delete(self, key: str, ignore_key_error: bool = True) -> None","titles":["liteyuki.comm.storage","class KeyValueStore"]},"123":{"title":"def get_all(self) -> dict[str, Any]","titles":["liteyuki.comm.storage","class KeyValueStore"]},"124":{"title":"def publish(self, channel_: str, data: Any) -> None","titles":["liteyuki.comm.storage","class KeyValueStore"]},"125":{"title":"def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]","titles":["liteyuki.comm.storage","class KeyValueStore"]},"126":{"title":"async def run_subscriber_receive_funcs(channel_: str, data: Any)","titles":["liteyuki.comm.storage","class KeyValueStore"]},"127":{"title":"async def start_receive_loop(self)","titles":["liteyuki.comm.storage","class KeyValueStore"]},"128":{"title":"class GlobalKeyValueStore","titles":["liteyuki.comm.storage"]},"129":{"title":"def get_instance(cls)","titles":["liteyuki.comm.storage","class GlobalKeyValueStore"]},"130":{"title":"attr _instance = None","titles":["liteyuki.comm.storage","class GlobalKeyValueStore"]},"131":{"title":"attr _lock = threading.Lock()","titles":["liteyuki.comm.storage","class GlobalKeyValueStore"]},"132":{"title":"var _ref_count","titles":["liteyuki.comm.storage"]},"133":{"title":"def on_get(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"134":{"title":"def on_set(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"135":{"title":"def on_delete(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"136":{"title":"def on_get_all(data: tuple[str, dict[str, Any]])","titles":["liteyuki.comm.storage"]},"137":{"title":"liteyuki.config","titles":[]},"138":{"title":"def flat_config(config: dict[str, Any]) -> dict[str, Any]","titles":["liteyuki.config"]},"139":{"title":"def load_from_yaml(file_: str) -> dict[str, Any]","titles":["liteyuki.config"]},"140":{"title":"def load_from_json(file_: str) -> dict[str, Any]","titles":["liteyuki.config"]},"141":{"title":"def load_from_toml(file_: str) -> dict[str, Any]","titles":["liteyuki.config"]},"142":{"title":"def load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]","titles":["liteyuki.config"]},"143":{"title":"def load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]","titles":["liteyuki.config"]},"144":{"title":"def load_config_in_default(no_waring: bool = False) -> dict[str, Any]","titles":["liteyuki.config"]},"145":{"title":"liteyuki.core","titles":[]},"146":{"title":"liteyuki.core","titles":[]},"147":{"title":"liteyuki.core.manager","titles":[]},"148":{"title":"class ChannelDeliver","titles":["liteyuki.core.manager"]},"149":{"title":"def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])","titles":["liteyuki.core.manager","class ChannelDeliver"]},"150":{"title":"class ProcessManager","titles":["liteyuki.core.manager"]},"151":{"title":"def __init__(self, lifespan: Lifespan)","titles":["liteyuki.core.manager","class ProcessManager"]},"152":{"title":"async def _run_process(self, name: str)","titles":["liteyuki.core.manager","class ProcessManager"]},"153":{"title":"async def start_all(self)","titles":["liteyuki.core.manager","class ProcessManager"]},"154":{"title":"def add_target(self, name: str, target: TARGET_FUNC, args: tuple = (), kwargs = None)","titles":["liteyuki.core.manager","class ProcessManager"]},"155":{"title":"def join_all(self)","titles":["liteyuki.core.manager","class ProcessManager"]},"156":{"title":"def terminate(self, name: str)","titles":["liteyuki.core.manager","class ProcessManager"]},"157":{"title":"def terminate_all(self)","titles":["liteyuki.core.manager","class ProcessManager"]},"158":{"title":"def is_process_alive(self, name: str) -> bool","titles":["liteyuki.core.manager","class ProcessManager"]},"159":{"title":"liteyuki.dev","titles":[]},"160":{"title":"liteyuki.dev","titles":[]},"161":{"title":"liteyuki.dev.observer","titles":[]},"162":{"title":"var CALLBACK_FUNC","titles":["liteyuki.dev.observer"]},"163":{"title":"var FILTER_FUNC","titles":["liteyuki.dev.observer"]},"164":{"title":"def debounce(wait)","titles":["liteyuki.dev.observer"]},"165":{"title":"class CodeModifiedHandler(FileSystemEventHandler)","titles":["liteyuki.dev.observer"]},"166":{"title":"def on_modified(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"167":{"title":"def on_created(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"168":{"title":"def on_deleted(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"169":{"title":"def on_moved(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"170":{"title":"def on_any_event(self, event)","titles":["liteyuki.dev.observer","class CodeModifiedHandler(FileSystemEventHandler)"]},"171":{"title":"def on_file_system_event(directories: tuple[str], recursive: bool = True, event_filter: FILTER_FUNC = None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]","titles":["liteyuki.dev.observer"]},"172":{"title":"liteyuki.dev.plugin","titles":[]},"173":{"title":"def run_plugins(*module_path: str | Path)","titles":["liteyuki.dev.plugin"]},"174":{"title":"liteyuki.exception","titles":[]},"175":{"title":"class LiteyukiException(BaseException)","titles":["liteyuki.exception"]},"176":{"title":"liteyuki","titles":[]},"177":{"title":"var __version__","titles":["liteyuki"]},"178":{"title":"liteyuki.log","titles":[]},"179":{"title":"def get_format(level: str) -> str","titles":["liteyuki.log"]},"180":{"title":"def init_log(config: dict)","titles":["liteyuki.log"]},"181":{"title":"liteyuki.message.event","titles":[]},"182":{"title":"class MessageEvent","titles":["liteyuki.message.event"]},"183":{"title":"def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)","titles":["liteyuki.message.event","class MessageEvent"]},"184":{"title":"def reply(self, message: str | dict[str, Any])","titles":["liteyuki.message.event","class MessageEvent"]},"185":{"title":"liteyuki.message","titles":[]},"186":{"title":"liteyuki.message.matcher","titles":[]},"187":{"title":"class Matcher","titles":["liteyuki.message.matcher"]},"188":{"title":"def __init__(self, rule: Rule, priority: int, block: bool)","titles":["liteyuki.message.matcher","class Matcher"]},"189":{"title":"def handle(self) -> Callable[[EventHandler], EventHandler]","titles":["liteyuki.message.matcher","class Matcher"]},"190":{"title":"async def run(self, event: MessageEvent) -> None","titles":["liteyuki.message.matcher","class Matcher"]},"191":{"title":"liteyuki.message","titles":[]},"192":{"title":"liteyuki.message.on","titles":[]},"193":{"title":"def add_matcher(matcher: Matcher)","titles":["liteyuki.message.on"]},"194":{"title":"def on_message(rule: Rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher","titles":["liteyuki.message.on"]},"195":{"title":"def on_keywords(keywords: list[str], rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher","titles":["liteyuki.message.on"]},"196":{"title":"liteyuki.message.rule","titles":[]},"197":{"title":"var RuleHandlerFunc","titles":["liteyuki.message.rule"]},"198":{"title":"class Rule","titles":["liteyuki.message.rule"]},"199":{"title":"def __init__(self, handler: RuleHandlerFunc)","titles":["liteyuki.message.rule","class Rule"]},"200":{"title":"def __or__(self, other: Rule) -> Rule","titles":["liteyuki.message.rule","class Rule"]},"201":{"title":"def __and__(self, other: Rule) -> Rule","titles":["liteyuki.message.rule","class Rule"]},"202":{"title":"async def __call__(self, event: MessageEvent) -> bool","titles":["liteyuki.message.rule","class Rule"]},"203":{"title":"async def empty_rule(event: MessageEvent) -> bool","titles":["liteyuki.message.rule"]},"204":{"title":"async def is_su_rule(event: MessageEvent) -> bool","titles":["liteyuki.message.rule"]},"205":{"title":"liteyuki.message.session","titles":[]},"206":{"title":"liteyuki.mkdoc","titles":[]},"207":{"title":"class DefType(Enum)","titles":["liteyuki.mkdoc"]},"208":{"title":"attr FUNCTION = 'function'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"209":{"title":"attr METHOD = 'method'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"210":{"title":"attr STATIC_METHOD = 'staticmethod'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"211":{"title":"attr CLASS_METHOD = 'classmethod'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"212":{"title":"attr PROPERTY = 'property'","titles":["liteyuki.mkdoc","class DefType(Enum)"]},"213":{"title":"class FunctionInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"214":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"215":{"title":"attr args: list[tuple[str, str]] = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"216":{"title":"attr return_type: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"217":{"title":"attr docstring: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"218":{"title":"attr source_code: str = ''","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"219":{"title":"attr type: DefType = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"220":{"title":"attr is_async: bool = NO_DEFAULT","titles":["liteyuki.mkdoc","class FunctionInfo(BaseModel)"]},"221":{"title":"class AttributeInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"222":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"223":{"title":"attr type: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"224":{"title":"attr value: Any = None","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"225":{"title":"attr docstring: str = ''","titles":["liteyuki.mkdoc","class AttributeInfo(BaseModel)"]},"226":{"title":"class ClassInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"227":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"228":{"title":"attr docstring: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"229":{"title":"attr methods: list[FunctionInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"230":{"title":"attr attributes: list[AttributeInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"231":{"title":"attr inherit: list[str] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ClassInfo(BaseModel)"]},"232":{"title":"class ModuleInfo(BaseModel)","titles":["liteyuki.mkdoc"]},"233":{"title":"attr module_path: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"234":{"title":"attr functions: list[FunctionInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"235":{"title":"attr classes: list[ClassInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"236":{"title":"attr attributes: list[AttributeInfo] = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"237":{"title":"attr docstring: str = NO_DEFAULT","titles":["liteyuki.mkdoc","class ModuleInfo(BaseModel)"]},"238":{"title":"def get_relative_path(base_path: str, target_path: str) -> str","titles":["liteyuki.mkdoc"]},"239":{"title":"def write_to_files(file_data: dict[str, str])","titles":["liteyuki.mkdoc"]},"240":{"title":"def get_file_list(module_folder: str)","titles":["liteyuki.mkdoc"]},"241":{"title":"def get_module_info_normal(file_path: str, ignore_private: bool = True) -> ModuleInfo","titles":["liteyuki.mkdoc"]},"242":{"title":"def generate_markdown(module_info: ModuleInfo, front_matter = None, lang: str = 'zh-CN') -> str","titles":["liteyuki.mkdoc"]},"243":{"title":"def generate_docs(module_folder: str, output_dir: str, with_top: bool = False, lang: str = 'zh-CN', ignored_paths = None)","titles":["liteyuki.mkdoc"]},"244":{"title":"var no_module_name_pyfile_path","titles":["liteyuki.mkdoc"]},"245":{"title":"liteyuki.plugin","titles":[]},"246":{"title":"def get_loaded_plugins() -> dict[str, Plugin]","titles":["liteyuki.plugin"]},"247":{"title":"liteyuki.plugin.load","titles":[]},"248":{"title":"def load_plugin(module_path: str | Path) -> Optional[Plugin]","titles":["liteyuki.plugin.load"]},"249":{"title":"def load_plugins(*plugin_dir: str, *, ignore_warning: bool = True) -> set[Plugin]","titles":["liteyuki.plugin.load"]},"250":{"title":"def format_display_name(display_name: str, plugin_type: PluginType) -> str","titles":["liteyuki.plugin.load"]},"251":{"title":"liteyuki.plugin.manager","titles":[]},"252":{"title":"liteyuki.plugin.model","titles":[]},"253":{"title":"class PluginType(Enum)","titles":["liteyuki.plugin.model"]},"254":{"title":"attr APPLICATION = 'application'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"255":{"title":"attr SERVICE = 'service'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"256":{"title":"attr MODULE = 'module'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"257":{"title":"attr UNCLASSIFIED = 'unclassified'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"258":{"title":"attr TEST = 'test'","titles":["liteyuki.plugin.model","class PluginType(Enum)"]},"259":{"title":"class PluginMetadata(BaseModel)","titles":["liteyuki.plugin.model"]},"260":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"261":{"title":"attr description: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"262":{"title":"attr usage: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"263":{"title":"attr type: PluginType = PluginType.UNCLASSIFIED","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"264":{"title":"attr author: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"265":{"title":"attr homepage: str = ''","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"266":{"title":"attr extra: dict[str, Any] = {}","titles":["liteyuki.plugin.model","class PluginMetadata(BaseModel)"]},"267":{"title":"class Plugin(BaseModel)","titles":["liteyuki.plugin.model"]},"268":{"title":"def __hash__(self)","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"269":{"title":"attr model_config = {'arbitrary_types_allowed': True}","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"270":{"title":"attr name: str = NO_DEFAULT","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"271":{"title":"attr module: ModuleType = NO_DEFAULT","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"272":{"title":"attr module_name: str = NO_DEFAULT","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"273":{"title":"attr metadata: Optional[PluginMetadata] = None","titles":["liteyuki.plugin.model","class Plugin(BaseModel)"]},"274":{"title":"liteyuki.plugin","titles":[]},"275":{"title":"def get_loaded_plugins() -> dict[str, Plugin]","titles":["liteyuki.plugin"]},"276":{"title":"liteyuki.plugins.liteecho","titles":[]},"277":{"title":"async def liteecho(event: MessageEvent)","titles":["liteyuki.plugins.liteecho"]},"278":{"title":"liteyuki.plugins.plugin_loader","titles":[]},"279":{"title":"def default_plugins_loader()","titles":["liteyuki.plugins.plugin_loader"]},"280":{"title":"liteyuki.plugins.plugin_loader","titles":[]},"281":{"title":"def default_plugins_loader()","titles":["liteyuki.plugins.plugin_loader"]},"282":{"title":"liteyuki.utils","titles":[]},"283":{"title":"def is_coroutine_callable(call: Callable[..., Any]) -> bool","titles":["liteyuki.utils"]},"284":{"title":"def run_coroutine(*coro: Coroutine)","titles":["liteyuki.utils"]},"285":{"title":"def run_coroutine_in_thread(*coro: Coroutine)","titles":["liteyuki.utils"]},"286":{"title":"def path_to_module_name(path: Path) -> str","titles":["liteyuki.utils"]},"287":{"title":"def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]","titles":["liteyuki.utils"]},"288":{"title":"通道通信","titles":[]},"289":{"title":"简介","titles":["通道通信"]},"290":{"title":"示例","titles":["通道通信"]},"291":{"title":"共享内存通信","titles":["通道通信"]},"292":{"title":"简介","titles":["通道通信","共享内存通信"]},"293":{"title":"示例","titles":["通道通信","共享内存通信"]},"294":{"title":"轻雪函数","titles":[]},"295":{"title":"函数文件","titles":["轻雪函数"]},"296":{"title":"命令文档","titles":["轻雪函数"]},"297":{"title":"示例","titles":["轻雪函数","命令文档"]},"298":{"title":"API","titles":["轻雪函数"]},"299":{"title":"结束关键字","titles":["轻雪函数"]},"300":{"title":"简介","titles":[]},"301":{"title":"开始","titles":["简介"]},"302":{"title":"创建插件","titles":["简介","开始"]},"303":{"title":"编写逻辑部分","titles":["简介","开始"]},"304":{"title":"加载插件","titles":["简介","开始"]},"305":{"title":"方法1","titles":["简介","开始","加载插件"]},"306":{"title":"方法2","titles":["简介","开始","加载插件"]},"307":{"title":"简介","titles":[]},"308":{"title":"加载资源包","titles":["简介"]},"309":{"title":"用户协议","titles":[]},"310":{"title":"基础插件","titles":[]},"311":{"title":"轻雪命令liteyuki_command","titles":["基础插件"]},"312":{"title":"命令别名","titles":["基础插件","轻雪命令liteyuki_command"]},"313":{"title":"插件/包管理器 liteyuki_pacman","titles":["基础插件"]},"314":{"title":"命令别名","titles":["基础插件","插件/包管理器 liteyuki_pacman"]},"315":{"title":"用户管理liteyuki_user","titles":["基础插件"]},"316":{"title":"功能插件命令","titles":[]},"317":{"title":"轻雪天气liteyuki_weather","titles":["功能插件命令"]},"318":{"title":"命令别名","titles":["功能插件命令","轻雪天气liteyuki_weather"]},"319":{"title":"统计信息liteyuki_statistics","titles":["功能插件命令"]},"320":{"title":"命令别名","titles":["功能插件命令","统计信息liteyuki_statistics"]}},"dirtCount":0,"index":[["秒",{"2":{"319":2}}],["小时",{"2":{"319":2}}],["天",{"2":{"319":2}}],["天气",{"2":{"317":1,"318":1}}],["格式",{"2":{"319":1}}],["格式为onebot",{"2":{"311":1}}],["统计时间范围为duration",{"2":{"319":1}}],["统计周期为period",{"2":{"319":1}}],["统计信息",{"2":{"319":1}}],["统计信息liteyuki",{"0":{"319":1},"1":{"320":1}}],["功能",{"2":{"319":1}}],["功能插件命令",{"0":{"316":1},"1":{"317":1,"318":1,"319":1,"320":1}}],["个人全局生效",{"2":{"317":1}}],["个人信息",{"2":{"315":1}}],["绑定城市",{"2":{"318":1}}],["绑定查询城市",{"2":{"317":1}}],["绑定端口",{"2":{"1":1}}],["海淀",{"2":{"317":1}}],["北京",{"2":{"317":1}}],["受限于nonebot2钩子函数的依赖注入参数",{"2":{"314":1}}],["帮助",{"2":{"314":1}}],["列表",{"2":{"314":1}}],["列出所有资源包",{"2":{"313":1}}],["列出所有插件",{"2":{"313":1}}],["更改",{"2":{"314":1}}],["更新",{"2":{"314":1}}],["更新插件商店索引",{"2":{"313":1}}],["更新轻雪",{"2":{"311":1,"312":1}}],["更新轻雪失败",{"2":{"6":1}}],["全局停用",{"2":{"314":1}}],["全局启用",{"2":{"313":1,"314":1}}],["搜索",{"2":{"314":1}}],["卸载",{"2":{"314":2}}],["卸载资源包",{"2":{"313":1}}],["卸载插件",{"2":{"313":1}}],["私聊所有人可用",{"2":{"313":2}}],["私聊通常为用户id",{"2":{"183":1}}],["当前bot",{"2":{"319":1}}],["当前群聊",{"2":{"319":1}}],["当前会话启用",{"2":{"313":1}}],["当前的轻雪实例",{"2":{"37":2,"59":2}}],["包管理器",{"0":{"313":1},"1":{"314":1}}],["包括子task",{"2":{"296":1}}],["包括chromium",{"2":{"15":1}}],["切换图片模式",{"2":{"312":1}}],["切换到bot目录下",{"2":{"12":1}}],["状态",{"2":{"312":1}}],["别名",{"2":{"312":1,"314":1,"315":1,"318":1,"320":1}}],["别用你那b",{"2":{"15":1}}],["群号",{"2":{"311":1}}],["群聊",{"2":{"312":1}}],["群聊仅群主",{"2":{"311":1,"313":2}}],["群聊通常为群id",{"2":{"183":1}}],["管理员",{"2":{"311":1,"313":2}}],["停用插件",{"2":{"313":2}}],["停用",{"2":{"312":1,"314":1}}],["停用机器人",{"2":{"311":1}}],["停止后",{"2":{"76":2}}],["停止前",{"2":{"75":2}}],["停止",{"2":{"65":2}}],["停止轻雪",{"2":{"27":2,"30":2,"49":2,"52":2}}],["查询目标地实时天气",{"2":{"317":1}}],["查询实时天气",{"2":{"317":1}}],["查询",{"2":{"312":1,"315":1}}],["查询配置项",{"2":{"311":1}}],["查看用户信息菜单",{"2":{"315":1}}],["查看插件帮助",{"2":{"313":1}}],["查看轻雪文档",{"2":{"311":1}}],["查看统计信息和状态",{"2":{"311":1}}],["查看当前bot",{"2":{"311":1}}],["版本",{"2":{"311":1}}],["❌",{"2":{"311":11}}],["超级用户可用",{"2":{"311":1,"313":2}}],["超级用户",{"2":{"311":10,"313":10}}],["超级用户列表",{"2":{"1":1}}],["重载",{"2":{"314":1}}],["重载所有资源包",{"2":{"313":1}}],["重载资源",{"2":{"312":1}}],["重载轻雪",{"2":{"311":1}}],["重启轻雪",{"2":{"312":1}}],["重启轻雪即可加载插件",{"2":{"305":1}}],["重启轻雪本体",{"2":{"26":2,"48":2}}],["重启后",{"2":{"78":2}}],["重启前",{"2":{"77":2}}],["重启",{"2":{"65":2}}],["举例",{"2":{"311":1}}],["权限",{"2":{"311":1,"313":2,"315":1}}],["~代替",{"2":{"310":1}}],["~可以使用插件",{"2":{"310":1}}],["命令",{"2":{"311":1,"312":1,"313":2,"314":1,"315":2,"317":1,"318":1,"319":1,"320":1}}],["命令别名",{"0":{"312":1,"314":1,"318":1,"320":1},"2":{"310":1,"315":1}}],["命令文档",{"0":{"296":1},"1":{"297":1}}],["系统信息及python信息",{"2":{"309":1}}],["分钟",{"2":{"319":2}}],["分发",{"2":{"309":1}}],["分工明确",{"2":{"137":1}}],["修改优先级",{"2":{"313":1}}],["修改",{"2":{"309":1}}],["同时用户也应该自行选择可用的资源包",{"2":{"308":1}}],["同步接收数据",{"2":{"85":2}}],["第三方资源包开发者需要注意版本兼容性",{"2":{"308":1}}],["└─",{"2":{"308":1}}],["└───",{"2":{"308":1}}],["└─resource",{"2":{"308":2}}],["├─templates",{"2":{"308":1}}],["├─metadata",{"2":{"308":2}}],["正常的路径应该是这样的",{"2":{"308":1}}],["只需要将其解压到根目录resources目录下即可",{"2":{"308":1}}],["只负责处理和回应消息",{"2":{"6":1}}],["错位等无法预料的事情发生",{"2":{"307":1}}],["异常",{"2":{"307":1}}],["异步任务结束关键字",{"2":{"299":1}}],["异步等待",{"2":{"296":1}}],["异步包装器",{"2":{"287":2}}],["异步接收数据",{"2":{"86":2}}],["欢迎各位投稿资源包到轻雪资源商店",{"2":{"307":1}}],["部分异常信息",{"2":{"309":1}}],["部分内容制作需要一点点前端基础",{"2":{"307":1}}],["部分来源于",{"2":{"282":1}}],["讲起打包成一个新的资源包",{"2":{"307":1}}],["仅需按照原有路径进行文件替换即可",{"2":{"307":1}}],["资源",{"2":{"307":1}}],["资源包管理",{"2":{"313":1}}],["资源包的结构会随着轻雪的更新而有变动",{"2":{"308":1}}],["资源包的制作很简单",{"2":{"307":1}}],["资源包加载遵循一个优先级",{"2":{"308":1}}],["资源包描述",{"2":{"308":1}}],["资源包名称",{"2":{"308":1}}],["资源包通常是以",{"2":{"308":1}}],["资源包",{"2":{"307":1,"314":1}}],["它允许你一定程度上自定义轻雪的外观",{"2":{"307":1}}],["它允许你在轻雪中运行一些自定义的由数据驱动的命令",{"2":{"294":1}}],["亦可根据用途称为主题包",{"2":{"307":1}}],["保存后轻雪会自动重载nonebot进程",{"2":{"306":1}}],["保持轻雪运行",{"2":{"24":2,"46":2}}],["我们在src",{"2":{"306":1}}],["我们专门为minecraft开发的服务器bot",{"2":{"9":1}}],["方法2",{"0":{"306":1}}],["方法1",{"0":{"305":1}}],["用户管理liteyuki",{"0":{"315":1}}],["用户协议",{"0":{"309":1}}],["用observer的on",{"2":{"303":1}}],["用于统计bot接收到的消息",{"2":{"319":1}}],["用于开发nonebot时进行文件系统变更重载",{"2":{"303":1}}],["用于结束当前已完成function的执行",{"2":{"299":1}}],["用于回复消息",{"2":{"183":1}}],["用于获取和唯一标识",{"2":{"154":2}}],["用于进程间通信",{"2":{"79":1}}],["排除的文件扩展名",{"2":{"303":1}}],["因此插件主要是一些后台任务或者与聊天机器人的通信",{"2":{"303":1}}],["因此无法通过内存共享和直接对象传递的方式进行通信",{"2":{"289":1}}],["定义插件元数据",{"2":{"302":1}}],["定义变量",{"2":{"296":1}}],["导入轻雪bot和日志",{"2":{"303":1}}],["导入文件系统事件",{"2":{"303":1}}],["导入文件系统观察器",{"2":{"303":1}}],["导入文件夹下多个插件",{"2":{"249":2}}],["导入逻辑部分",{"2":{"302":1}}],["首先创建一个文件夹",{"2":{"302":1}}],["首次运行后生成config",{"2":{"0":1}}],["编写逻辑部分",{"0":{"303":1}}],["编写轻雪函数推荐你使用vs",{"2":{"299":1}}],["编辑时的语法高亮可采取shell格式",{"2":{"295":1}}],["那么加载b包后",{"2":{"308":1}}],["那么你能够很快就上手",{"2":{"307":1}}],["那么当前所有函数包的task都会被截停销毁",{"2":{"299":1}}],["那么将会被解析为nickname而不是命令",{"2":{"6":1}}],["的情况是效率提升的关键",{"2":{"299":1}}],["单线程走到底",{"2":{"299":1}}],["单位s",{"2":{"296":1}}],["避免出现",{"2":{"299":1}}],["所有人",{"2":{"311":1,"313":1,"315":3}}],["所有进程",{"2":{"27":2,"49":2}}],["所以在编写lyfunction时也要注意异步的调用",{"2":{"299":1}}],["由于liteyukibot基于异步运行",{"2":{"299":1}}],["理论上所有基于onebotv11的api都可调用",{"2":{"298":1}}],["则该文件夹不会被识别为资源包",{"2":{"308":1}}],["则需要删除await",{"2":{"297":1}}],["则传入泛型默认开启",{"2":{"81":2}}],["无需手动创建实例",{"2":{"306":1}}],["无需手动初始化bot",{"2":{"173":2}}],["无限戳",{"2":{"297":1}}],["执行",{"2":{"297":1}}],["疯狂戳好友",{"2":{"297":1}}],["否则会导致渲染失败或渲染结果不理想",{"2":{"307":1}}],["否则task对象会被销毁",{"2":{"296":1}}],["否则默认关闭",{"2":{"81":2}}],["等待所有异步任务结束",{"2":{"296":1}}],["等待接收数据",{"2":{"86":1}}],["结束关键字",{"0":{"299":1}}],["结束函数关键字",{"2":{"296":1}}],["结构",{"2":{"83":2}}],["也支持句末注释",{"2":{"295":1}}],["也可以监听其他进程的消息",{"2":{"289":1}}],["支持中英文",{"2":{"317":2}}],["支持中英文城市名",{"2":{"317":1}}],["支持多个关键词查询",{"2":{"317":1}}],["支持绑定城市",{"2":{"317":1}}],["支持单行注释",{"2":{"295":1}}],["支持onebotv11标准",{"2":{"9":1}}],["函数文件放在资源包的functions目录下",{"2":{"295":1}}],["函数文件",{"0":{"295":1}}],["属于资源包的一部分",{"2":{"294":1}}],["是可以相对引用的",{"2":{"308":1}}],["是轻雪的一个功能",{"2":{"294":1}}],["是否为协程可调用对象",{"2":{"283":2}}],["是否忽略警告",{"2":{"249":2}}],["是否忽略键不存在的错误",{"2":{"122":2}}],["是否包含顶层文件夹",{"2":{"243":2}}],["是否阻断后续优先级更低的匹配器",{"2":{"188":2}}],["是否递归监听子目录",{"2":{"171":2}}],["是否通过验证",{"2":{"83":2}}],["是否开启类型检查",{"2":{"81":2}}],["是否允许更新",{"2":{"2":1}}],["是否自动更新轻雪",{"2":{"1":1}}],["是否自动上报问题给轻雪服务器",{"2":{"1":1}}],["是否显示日志等级图标",{"2":{"1":1}}],["线程锁会自动保护共享内存的读写操作",{"2":{"292":1}}],["相比于普通进程通信",{"2":{"292":1}}],["相对路径",{"2":{"239":2}}],["共享内存通信",{"0":{"291":1},"1":{"292":1,"293":1}}],["共享内存模块",{"2":{"115":1}}],["被动模式",{"2":{"290":1}}],["被动模式由chan",{"2":{"290":1}}],["且通过安全的方式传输到轻雪的服务器",{"2":{"309":1}}],["且通道标识为",{"2":{"290":1}}],["且遵守了相关字体开源协议",{"2":{"10":1}}],["创建入口文件",{"2":{"306":1}}],["创建插件",{"0":{"302":1}}],["创建子进程的同时会初始化一个被动通道和一个主动通道",{"2":{"290":1}}],["创建asyncio",{"2":{"153":2}}],["实现",{"2":{"290":1}}],["实现端本身不负责处理响应逻辑",{"2":{"6":1}}],["主题包中的html渲染使用js来规定数据的渲染位置",{"2":{"307":1}}],["主题商店提供了一些资源包供你选择",{"2":{"307":1}}],["主动模式需调用chan",{"2":{"290":1}}],["主进程中",{"2":{"290":1}}],["主进程中通过get",{"2":{"290":1}}],["主进程接收到消息后重启对应子进程",{"2":{"289":1}}],["主进程订阅者接收函数",{"2":{"116":1}}],["主进程创建单例",{"2":{"91":1,"92":1}}],["即后加载的资源包会覆盖前面的资源包",{"2":{"308":1}}],["即可创建一个插件",{"2":{"302":1}}],["即不等待",{"2":{"296":1}}],["即被动模式和主动模式",{"2":{"290":1}}],["即轻雪作为服务端",{"2":{"3":1}}],["有一个task任务没有完成而await被执行了",{"2":{"299":1}}],["有两种接收模式",{"2":{"290":1}}],["有的插件安装后报错无法启动",{"2":{"6":1}}],["这时可以通过通道对主进程发送消息",{"2":{"289":1}}],["这里给出一个参考值",{"2":{"3":1}}],["里",{"2":{"289":1}}],["简介",{"0":{"289":1,"292":1,"300":1,"307":1},"1":{"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"308":1}}],["路径a",{"2":{"286":2}}],["转换路径为模块名",{"2":{"286":2}}],["判断是否为协程可调用对象",{"2":{"283":2}}],["一个",{"2":{"302":1}}],["一个键不要多次出现",{"2":{"137":1}}],["一些常用的工具类",{"2":{"282":1}}],["应在初始化时调用",{"2":{"279":2,"281":2}}],["根据不同类型插件设置颜色",{"2":{"250":2}}],["可用",{"2":{"311":1}}],["可用参数",{"2":{"311":1}}],["可以在配置文件中把auto",{"2":{"309":1}}],["可以在a的index",{"2":{"308":1}}],["可以在此基础上进行修改",{"2":{"307":1}}],["可以很高程度地扩展轻雪的功能",{"2":{"300":1}}],["可以是本地插件或是通过",{"2":{"248":2}}],["可递归",{"2":{"296":1}}],["可调用对象",{"2":{"283":2}}],["可使用ws",{"2":{"8":1}}],["插件停用只能阻断传入响应",{"2":{"314":1}}],["插件管理",{"2":{"313":1,"314":1}}],["插件",{"0":{"313":1},"1":{"314":1}}],["插件信息",{"2":{"309":1}}],["插件描述",{"2":{"302":1}}],["插件版本",{"2":{"302":1}}],["插件类型",{"2":{"250":2,"302":1}}],["插件名称",{"2":{"248":2,"250":2,"302":1}}],["插件字典",{"2":{"246":2,"275":2}}],["插件路径",{"2":{"173":2}}],["去头路径",{"2":{"244":1}}],["忽略的路径",{"2":{"243":2}}],["忽略私有函数和类",{"2":{"241":2}}],["模块名",{"2":{"286":2}}],["模块文件夹",{"2":{"243":2}}],["模块信息",{"2":{"241":2,"242":2}}],["\`pathlib",{"2":{"248":1}}],["\`path",{"2":{"248":1}}],["\`pip\`",{"2":{"248":1}}],["\`",{"2":{"242":14,"248":1}}],["字体包",{"2":{"307":1}}],["字符串",{"2":{"242":2}}],["字段",{"2":{"3":1}}],["语言包等",{"2":{"307":1}}],["语言",{"2":{"242":2,"243":2}}],["文件内容为一系列的命令",{"2":{"295":1}}],["文件名以",{"2":{"295":1}}],["文件夹路径",{"2":{"249":2}}],["文件路径",{"2":{"241":2}}],["文件数据",{"2":{"239":2}}],["输入值会被执行以转换为正确的类型",{"2":{"311":1}}],["输入playwright",{"2":{"6":1}}],["输出",{"2":{"295":1}}],["输出文件夹",{"2":{"243":2}}],["输出文件",{"2":{"239":2}}],["目标路径",{"2":{"238":2}}],["目前可用性较低",{"2":{"8":1}}],["目前markdown消息支持lagrange",{"2":{"8":1}}],["添加配置项",{"2":{"311":1}}],["添加sleep",{"2":{"297":1}}],["添加处理函数",{"2":{"189":2}}],["添加进程",{"2":{"154":2}}],["优先级",{"2":{"188":2}}],["规则函数签名",{"2":{"197":1}}],["规则",{"2":{"188":2}}],["匹配器",{"2":{"188":2}}],["回复消息",{"2":{"184":2}}],["附加数据",{"2":{"183":1}}],["原始消息",{"2":{"183":1}}],["原生实现",{"2":{"8":1}}],["消息类型",{"2":{"183":1}}],["消息段数组",{"2":{"183":1}}],["消息",{"2":{"183":1}}],["机器人id",{"2":{"183":1}}],["机器人昵称列表",{"2":{"1":1}}],["⭕",{"2":{"180":1}}],["⚠️",{"2":{"180":1}}],["✅",{"2":{"180":1}}],["ℹ️信息",{"2":{"290":4}}],["ℹ️",{"2":{"180":1}}],["🐛",{"2":{"180":1}}],["上午12",{"2":{"252":1}}],["上午11",{"2":{"147":1}}],["上午6",{"2":{"206":1}}],["上午9",{"2":{"178":1}}],["上午5",{"2":{"172":1}}],["事件过滤器",{"2":{"171":2}}],["事件循环",{"2":{"21":1,"43":1}}],["防抖函数",{"2":{"164":2}}],["防止获取空指针",{"2":{"132":1}}],["位置1为filesystemevent",{"2":{"162":1,"163":1}}],["启用",{"2":{"312":1,"314":1}}],["启用插件后",{"2":{"306":1}}],["启用该模块需要在配置文件中设置dev",{"2":{"161":1}}],["启动所有进程",{"2":{"153":2}}],["启动发布订阅接收器循环",{"2":{"127":2}}],["启动后控制台输出",{"2":{"290":1}}],["启动后",{"2":{"74":2}}],["启动前",{"2":{"73":2}}],["启动",{"2":{"65":2}}],["启动逻辑",{"2":{"22":2,"44":2}}],["启动容器",{"2":{"13":1}}],["启动bot",{"2":{"12":1}}],["启动时会加载项目目录下config",{"2":{"0":1}}],["此模块用于注册观察者函数",{"2":{"161":1}}],["检查进程是否存活",{"2":{"158":2}}],["终止进程并从进程字典中删除",{"2":{"156":2}}],["对于主动推送的插件不生效",{"2":{"314":1}}],["对于不同资源包的不同文件",{"2":{"308":1}}],["对外启动方法",{"2":{"153":2}}],["对公开放时建议设置",{"2":{"2":1}}],["项目目录下的配置文件优先",{"2":{"144":2}}],["项目目录下的配置文件优先级高于config目录下的配置文件",{"2":{"137":1}}],["项目目录下的config",{"2":{"144":2}}],["按照读取文件的优先级反向覆盖",{"2":{"143":2}}],["从一个标准的轻雪项目加载配置文件",{"2":{"144":2}}],["从目录下加载配置文件",{"2":{"143":2}}],["从指定文件加载配置项",{"2":{"142":2}}],["但请注意甄别第三方插件的安全性",{"2":{"309":1}}],["但请保证以上三个字段",{"2":{"308":1}}],["但若出现非单function的情况",{"2":{"299":1}}],["但需单独起篇幅",{"2":{"294":1}}],["但一个通道只能使用一种",{"2":{"290":1}}],["但也包含原有的键值对",{"2":{"138":2}}],["但是请保留原作者信息",{"2":{"309":1}}],["但是更加轻量级并且线程安全",{"2":{"115":1}}],["但是bot昵称有一个help",{"2":{"6":1}}],["但是基本上都是一样的",{"2":{"3":1}}],["但是部分内容会被覆盖",{"2":{"1":1}}],["扁平化后的配置文件",{"2":{"138":2}}],["扁平化配置文件",{"2":{"138":2}}],["扁平化编写",{"2":{"137":1}}],["注意不要嵌套文件夹",{"2":{"308":1}}],["注意冲突时的优先级",{"2":{"137":1}}],["注册一个函数在nonebot启动后运行",{"2":{"290":1}}],["注册一个函数在轻雪启动后运行",{"2":{"290":1}}],["注册文件系统变化监听器",{"2":{"171":2}}],["注册重启时的函数",{"2":{"71":2}}],["注册重启后的函数",{"2":{"36":2,"58":2,"72":2}}],["注册停止前的函数",{"2":{"69":2}}],["注册停止后的函数",{"2":{"33":2,"55":2,"70":2}}],["注册进程重启前的函数",{"2":{"35":2,"57":2}}],["注册进程停止前的函数",{"2":{"34":2,"56":2}}],["注册启动时的函数",{"2":{"67":2,"68":2}}],["注册启动后的函数",{"2":{"32":2,"54":2}}],["注册启动前的函数",{"2":{"31":2,"53":2}}],["45m",{"2":{"319":2}}],["44",{"2":{"185":1,"191":1}}],["4",{"2":{"137":1}}],["47",{"2":{"101":1,"181":1,"205":1}}],["每隔0",{"2":{"297":1}}],["每行一个命令",{"2":{"295":1}}],["每次接收到字符串数据时都会运行",{"2":{"290":1}}],["每3秒发送一次消息",{"2":{"290":1}}],["每个配置文件给一个或一类服务提供配置",{"2":{"137":1}}],["每天4点检查更新",{"2":{"1":1}}],["尽量不要冲突",{"2":{"137":1}}],["多配置文件编写原则",{"2":{"137":1}}],["引用计数",{"2":{"132":1}}],["运行环境的设备信息",{"2":{"309":1}}],["运行在主进程中",{"2":{"300":1}}],["运行协程",{"2":{"284":2}}],["运行处理函数",{"2":{"190":2}}],["运行插件",{"2":{"173":2}}],["运行订阅者接收函数",{"2":{"126":2}}],["运行接收函数",{"2":{"88":2}}],["订阅者接收消息时的回调",{"2":{"125":2}}],["频道",{"2":{"124":2,"125":2,"126":2}}],["发布消息",{"2":{"124":2}}],["发送函数为同步函数",{"2":{"84":2}}],["发送数据",{"2":{"84":2,"112":2}}],["删除键值对",{"2":{"122":2}}],["值",{"2":{"120":2,"121":2}}],["键值对",{"2":{"123":2}}],["键",{"2":{"120":2,"121":2,"122":2}}],["类似于minecraft的mcfunction",{"2":{"294":1}}],["类似于redis",{"2":{"115":1}}],["类型",{"2":{"90":1,"91":1,"92":1,"116":1,"117":1,"162":1,"163":1,"197":1}}],["关闭通道",{"2":{"114":2}}],["8",{"2":{"109":1,"139":1,"140":1,"141":1,"172":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"239":1,"241":1,"276":1,"277":1,"278":1,"280":1}}],["调用机器人函数",{"2":{"311":1}}],["调用机器人api",{"2":{"311":1}}],["调用重启进程方法",{"2":{"303":1}}],["调用函数",{"2":{"296":1}}],["调用bot",{"2":{"296":1}}],["调用",{"2":{"108":2}}],["通过关键词搜索插件",{"2":{"313":1}}],["通过装饰器注册一个函数在接收到消息时运行",{"2":{"290":1}}],["通常是目录不存在或目录为空",{"2":{"249":2}}],["通常为纯文本的格式",{"2":{"183":1}}],["通常会默认传入chan",{"2":{"154":2}}],["通信",{"2":{"105":1}}],["通道是全双工的",{"2":{"290":1}}],["通道通信",{"0":{"288":1},"1":{"289":1,"290":1,"291":1,"292":1,"293":1}}],["通道实例",{"2":{"93":2}}],["通道名称",{"2":{"93":2,"94":2,"95":2}}],["通道传递通道",{"2":{"91":1,"92":1}}],["通道id",{"2":{"81":2,"111":2}}],["依赖关系",{"2":{"100":1,"104":1}}],["设置用户信息或打开属性设置菜单",{"2":{"315":1}}],["设置",{"2":{"312":1,"315":1}}],["设置共享内存",{"2":{"293":1}}],["设置后的插件名称",{"2":{"250":2}}],["设置插件名称颜色",{"2":{"250":2}}],["设置键值对",{"2":{"120":2}}],["设置通道实例",{"2":{"93":2,"94":2}}],["设备上python环境太乱了",{"2":{"6":1}}],["子进程中获取通道直接导入进程全局单例即可",{"2":{"290":1}}],["子进程中导入单例active",{"2":{"290":1}}],["子进程订阅者接收函数",{"2":{"117":1}}],["子进程初始化时实例化",{"2":{"91":1,"92":1}}],["子进程可用的主动和被动通道",{"2":{"90":1}}],["装饰回调函数实现",{"2":{"290":1}}],["装饰一个函数在接收到数据后执行",{"2":{"87":2,"171":2}}],["装饰器",{"2":{"87":2,"125":2,"171":2,"189":4}}],["装置要求",{"0":{"15":1},"1":{"16":1}}],["过滤函数",{"2":{"87":2}}],["接收频道",{"2":{"183":1}}],["接收数据",{"2":{"113":2}}],["接收数据并执行函数",{"2":{"87":2}}],["接收到数据",{"2":{"86":1}}],["会触发最大递归深度限制",{"2":{"297":1}}],["会话负载信息",{"2":{"309":1}}],["会话类型",{"2":{"183":1}}],["会话id",{"2":{"183":1}}],["会阻塞",{"2":{"152":2}}],["会阻塞线程",{"2":{"85":2}}],["会自动判断key版本",{"2":{"317":1}}],["会自动判断主进程和子进程",{"2":{"89":2}}],["会自动识别文件格式",{"2":{"142":2}}],["会挂起等待",{"2":{"86":2}}],["没有异步的必要",{"2":{"84":2}}],["zip格式压缩的",{"2":{"308":1}}],["zip",{"2":{"83":1}}],["zh",{"0":{"242":1,"243":1},"2":{"2":1,"242":2,"243":1}}],["数据",{"2":{"83":2,"84":2,"88":2,"112":2,"113":2,"124":2,"126":2}}],["验证数据结构",{"2":{"83":2}}],["泛型类型",{"2":{"82":2}}],["并且应该在metadata",{"2":{"308":1}}],["并且不用修改源代码",{"2":{"307":1}}],["并在其中写入一些代码",{"2":{"306":1}}],["并在其中写入以下代码",{"2":{"306":1}}],["并在其中创建一个",{"2":{"302":1}}],["并遵循其许可进行修改",{"2":{"282":1}}],["并添加到进程字典中",{"2":{"152":2}}],["并发运行异步函数",{"2":{"66":2}}],["并使用克隆而非直接下载的方式部署轻雪",{"2":{"6":1}}],["下午3",{"2":{"109":1}}],["下午12",{"2":{"276":1}}],["下午10",{"2":{"101":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"278":1,"280":1}}],["下午11",{"2":{"79":1,"247":1,"251":1}}],["下午8",{"2":{"63":1}}],["下面已经列出一些推荐的实现端",{"2":{"6":1}}],["7",{"2":{"63":1,"79":1,"101":1,"147":1,"178":1,"247":1,"251":1,"252":1}}],["|$$$$$",{"2":{"40":1,"62":1}}],["|$$",{"2":{"40":5,"62":5}}],["|",{"0":{"66":1,"173":1,"183":1,"184":1,"248":1},"2":{"40":45,"62":45,"66":1,"173":1,"183":1,"184":1,"248":1}}],["+",{"2":{"40":2,"62":2,"242":2,"286":1}}],["+=",{"2":{"26":1,"48":1,"87":1,"242":15}}],["x26",{"2":{"195":1,"242":4}}],["x1b",{"2":{"40":2,"62":2}}],["x3c",{"2":{"26":1,"40":1,"48":1,"62":1,"180":5,"193":1,"242":8,"248":2,"250":4,"296":6,"317":2,"319":2}}],["兼容键",{"2":{"39":2,"61":2}}],["兼容旧版本",{"2":{"39":2,"61":2}}],["获取用户信息",{"2":{"315":1}}],["获取唯一的轻雪bot实例",{"2":{"303":1}}],["获取共享内存",{"2":{"293":1}}],["获取主动通道",{"2":{"290":1}}],["获取被动通道",{"2":{"290":1}}],["获取已加载的插件",{"2":{"246":2,"275":2}}],["获取函数和类",{"2":{"241":2}}],["获取相对路径",{"2":{"238":2}}],["获取所有键值对",{"2":{"123":2}}],["获取键值对",{"2":{"121":2}}],["获取通道实例",{"2":{"95":2,"96":2}}],["获取通道传递泛型类型",{"2":{"82":2}}],["获取配置",{"2":{"38":2,"39":2,"60":2,"61":2}}],["获取轻雪实例",{"2":{"37":2,"59":2}}],["返回true则执行回调函数",{"2":{"171":2}}],["返回",{"2":{"37":1,"38":1,"39":1,"59":1,"60":1,"61":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"82":1,"83":1,"87":1,"113":1,"121":1,"123":1,"125":1,"138":1,"171":1,"189":1,"241":1,"242":1,"246":1,"250":1,"275":1,"283":1,"286":1,"287":1}}],["为可选参数",{"2":{"310":1}}],["为必填参数",{"2":{"310":1}}],["为none则不过滤",{"2":{"87":2}}],["为子进程重启时调用",{"2":{"35":2,"57":2}}],["为子进程停止时调用",{"2":{"34":2,"56":2}}],["为什么我启动后机器人没有反应",{"2":{"6":1}}],["未实现",{"2":{"33":2,"36":2,"55":2,"58":2}}],["自定义选项title",{"2":{"242":2}}],["自动调用",{"2":{"28":2,"50":2}}],["自己整一个websocket客户端",{"2":{"8":1}}],["进程函数关键字参数",{"2":{"154":2}}],["进程函数参数",{"2":{"154":2}}],["进程函数",{"2":{"154":2}}],["进程名",{"2":{"154":2}}],["进程名称",{"2":{"27":2,"49":2}}],["进入轻雪目录",{"2":{"13":1}}],["join",{"0":{"155":1},"2":{"26":1,"48":1,"143":1,"155":2,"156":1,"240":1,"242":4,"243":1,"249":2,"286":2}}],["js",{"2":{"8":1}}],["json",{"0":{"140":1},"2":{"0":1,"140":5,"142":2,"144":1}}],["json和toml作为配置文件",{"2":{"0":1}}],["future",{"2":{"284":1}}],["func=none",{"2":{"171":1}}],["func=lambda",{"2":{"96":1,"97":2,"98":2,"99":1,"290":1}}],["function实现语法高亮",{"2":{"299":1}}],["functiondef",{"2":{"241":3}}],["functioninfo",{"0":{"213":1,"229":1,"234":1},"1":{"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1},"2":{"241":2}}],["function",{"0":{"208":2},"2":{"89":1,"241":3,"294":1,"296":1,"297":2,"311":3}}],["functions=",{"2":{"241":1}}],["functions",{"0":{"234":1},"2":{"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"241":1,"242":1}}],["funcs",{"0":{"66":2,"88":1,"116":1,"117":1,"126":1},"2":{"65":6,"66":5,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":2,"74":2,"75":2,"76":2,"77":2,"78":2,"87":1,"88":3,"89":1,"125":6,"126":2,"127":1}}],["func",{"0":{"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"66":2,"67":3,"68":3,"69":3,"70":3,"71":3,"72":3,"87":2,"107":1,"125":2,"154":1,"162":1,"163":1,"171":3,"287":1},"2":{"31":5,"32":5,"33":5,"34":5,"35":5,"36":5,"53":5,"54":5,"55":5,"56":5,"57":5,"58":5,"65":6,"66":6,"67":9,"68":9,"69":9,"70":9,"71":9,"72":9,"81":2,"87":20,"88":6,"89":1,"107":1,"116":1,"117":1,"125":8,"126":2,"154":1,"164":2,"171":7,"241":2,"242":9,"283":2,"287":5,"296":1}}],["failed",{"2":{"248":1}}],["false时例如docs",{"2":{"243":2}}],["false",{"0":{"142":1,"143":1,"144":1,"194":1,"195":1,"243":1},"2":{"2":4,"81":2,"83":4,"111":1,"119":2,"283":1}}],["first",{"2":{"241":2}}],["filter=lambda",{"2":{"303":1}}],["filter",{"0":{"87":2,"163":1,"171":2},"2":{"87":8,"96":1,"97":2,"98":2,"99":1,"171":6,"290":1}}],["filesystemeventhandler",{"0":{"165":1},"1":{"166":1,"167":1,"168":1,"169":1,"170":1}}],["filesystemevent",{"2":{"162":1,"163":1,"171":1,"303":2}}],["files",{"0":{"142":2,"239":1},"2":{"142":3,"143":1,"144":1,"239":1,"240":2,"243":1}}],["file",{"0":{"139":1,"140":1,"141":1,"171":1,"239":1,"240":1,"241":1},"2":{"63":1,"79":1,"101":1,"109":1,"139":5,"140":5,"141":5,"142":12,"143":3,"147":1,"171":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"239":4,"240":7,"241":9,"243":6,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1,"303":3}}],["flat",{"0":{"138":1},"2":{"138":2,"139":1,"140":1,"141":1}}],["flag",{"2":{"65":1}}],["friend",{"2":{"297":2}}],["front",{"0":{"242":1},"2":{"242":6,"243":3}}],["from",{"0":{"139":1,"140":1,"141":1,"142":1,"143":1},"2":{"85":1,"139":4,"140":4,"141":4,"142":4,"143":2,"144":2,"290":4,"302":1,"303":3}}],["frame",{"0":{"25":1,"47":1},"2":{"25":3,"47":3}}],["folder",{"0":{"240":1,"243":1},"2":{"240":2,"243":5,"244":1}}],["found",{"2":{"84":1,"93":1,"142":1,"143":1,"152":1,"156":1,"158":1}}],["format=get",{"2":{"180":1}}],["formats",{"2":{"143":1}}],["format",{"0":{"179":1,"250":1},"2":{"142":1,"179":3,"180":1,"248":2,"250":1}}],["for",{"2":{"27":1,"39":1,"49":1,"61":1,"66":1,"81":1,"83":3,"88":2,"89":2,"94":1,"126":1,"138":2,"142":1,"143":2,"153":3,"155":1,"157":1,"171":1,"190":1,"193":1,"195":1,"239":1,"240":2,"241":12,"242":9,"243":3,"249":2,"279":2,"281":2,"284":2,"302":1}}],["f",{"2":{"26":1,"27":2,"39":1,"48":1,"49":2,"61":1,"81":4,"84":1,"89":2,"93":2,"138":1,"139":1,"140":1,"141":1,"142":2,"143":1,"152":4,"156":2,"158":1,"239":2,"242":19,"243":1,"248":5,"249":9,"250":1,"284":1,"290":2,"303":1}}],["505468b及以后的lagrange",{"2":{"311":1}}],["59",{"2":{"247":1,"251":1}}],["55",{"2":{"196":1}}],["52",{"2":{"192":1}}],["51",{"2":{"186":1}}],["54",{"2":{"109":1}}],["5",{"2":{"24":1,"46":1,"137":1}}],["外部启动接口",{"2":{"23":2,"45":2}}],["kill",{"2":{"156":1}}],["k",{"2":{"83":4,"138":2,"242":2}}],["keyword",{"2":{"195":2}}],["keywords为城市名",{"2":{"317":2}}],["keywords",{"0":{"195":2},"2":{"195":5,"313":1,"317":2}}],["keyerror",{"2":{"122":1,"152":1}}],["keyvaluestore",{"0":{"118":1},"1":{"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1},"2":{"129":1}}],["keys",{"0":{"39":1,"61":1},"2":{"39":4,"61":4}}],["key",{"0":{"38":1,"39":1,"60":1,"61":1,"120":1,"121":1,"122":2},"2":{"38":4,"39":11,"60":4,"61":11,"120":7,"121":7,"122":13,"133":3,"134":3,"135":3,"138":2,"293":2,"311":4,"315":2,"317":1}}],["keyboardinterrupt",{"2":{"23":1,"24":1,"45":1,"46":1}}],["keep",{"0":{"24":1,"46":1},"2":{"22":1,"24":1,"44":1,"46":1}}],["kwargs=none",{"2":{"154":1}}],["kwargs=self",{"2":{"152":1}}],["kwargs",{"0":{"21":1,"28":1,"43":1,"50":1,"66":1,"108":1,"154":1},"2":{"21":4,"28":1,"43":4,"50":1,"66":3,"108":2,"154":5,"164":2,"287":2,"311":2}}],["echo",{"2":{"295":3}}],["emsp",{"2":{"242":4}}],["empty",{"0":{"194":1,"195":1,"203":1},"2":{"203":1,"248":1,"249":1}}],["email",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["enable",{"2":{"311":2,"312":1,"313":2,"314":2}}],["end",{"2":{"296":1}}],["endswith",{"2":{"142":3,"143":1,"240":1,"249":1,"303":1}}],["ensure",{"2":{"284":1}}],["enum",{"0":{"207":1,"253":1},"1":{"208":1,"209":1,"210":1,"211":1,"212":1,"254":1,"255":1,"256":1,"257":1,"258":1}}],["enumerate",{"2":{"193":1}}],["encoding=",{"2":{"139":1,"140":1,"141":1,"239":1,"241":1}}],["enforcing",{"2":{"81":1}}],["e",{"2":{"122":2,"248":1,"250":1,"284":2}}],["errors=true",{"2":{"243":1}}],["error",{"0":{"122":1},"2":{"122":4,"180":2,"284":1}}],["else",{"2":{"26":1,"27":1,"37":1,"48":1,"49":1,"59":1,"66":1,"81":1,"87":2,"88":1,"93":1,"95":1,"96":1,"120":1,"121":1,"122":1,"123":1,"125":2,"139":1,"140":1,"141":1,"152":1,"179":1,"180":5,"193":1,"241":9,"242":10,"243":2,"248":2,"284":1,"286":1}}],["elif",{"2":{"26":2,"48":2,"81":1,"83":3,"87":1,"142":4,"152":1,"241":5,"248":2,"249":1}}],["extensions",{"2":{"303":2}}],["extend",{"2":{"173":1}}],["extra",{"0":{"266":1}}],["exclude",{"2":{"303":2}}],["exc",{"2":{"190":1,"248":1}}],["exception模块包含了liteyuki运行中的所有错误",{"2":{"174":1}}],["exception",{"0":{"174":1},"1":{"175":1},"2":{"190":1,"248":1,"284":2}}],["except",{"2":{"23":1,"24":1,"45":1,"46":1,"122":1,"190":1,"248":1,"284":2}}],["executor",{"2":{"86":1}}],["executable",{"2":{"26":3,"48":3}}],["exist",{"2":{"249":1}}],["exists",{"2":{"81":2,"93":1,"142":1,"143":1,"239":1,"249":2}}],["exit",{"0":{"25":1,"47":1},"2":{"21":2,"25":2,"26":1,"43":2,"47":2,"48":1}}],["event装饰器监听文件系统事件",{"2":{"303":1}}],["events",{"2":{"303":1}}],["eventhandler",{"0":{"189":2},"2":{"188":1,"189":4}}],["event",{"0":{"101":1,"102":1,"166":1,"167":1,"168":1,"169":1,"170":2,"171":2,"181":1,"190":1,"202":1,"203":1,"204":1,"277":1},"1":{"102":1,"103":2,"182":1,"183":1,"184":1},"2":{"21":4,"24":1,"30":1,"43":4,"46":1,"52":1,"100":1,"101":1,"104":1,"166":1,"167":2,"168":2,"169":2,"170":3,"171":9,"181":1,"184":2,"190":5,"195":2,"200":3,"201":3,"202":2,"203":1,"204":2,"277":3,"284":2,"303":8}}],["信号处理",{"2":{"21":1,"25":2,"43":1,"47":2}}],["加载",{"2":{"314":1}}],["加载资源包",{"0":{"308":1},"2":{"313":1}}],["加载插件",{"0":{"304":1},"1":{"305":1,"306":1}}],["加载插件加载器",{"2":{"21":1,"43":1}}],["加载单个插件",{"2":{"248":2}}],["加入qq群775840726",{"2":{"7":1}}],["生成文档",{"2":{"243":2}}],["生成模块的markdown",{"2":{"242":2}}],["生命周期管理",{"2":{"21":1,"43":1}}],["生产环境中推荐反向websocket",{"2":{"3":1}}],["初始化通道",{"2":{"81":2,"111":2}}],["初始化轻雪",{"2":{"28":2,"50":2}}],["初始化轻雪实例",{"2":{"21":2,"43":2}}],["初始化",{"2":{"21":1,"43":1}}],["=none",{"2":{"27":1,"49":1,"81":1,"87":1,"121":1,"183":2}}],["==",{"2":{"26":3,"48":3,"89":1,"96":1,"97":2,"98":2,"99":1,"127":1,"132":1,"133":2,"134":2,"135":2,"136":1,"152":2,"179":1,"241":4,"242":2,"286":1}}],["=",{"0":{"26":1,"27":1,"38":1,"39":1,"48":1,"49":1,"60":1,"61":1,"81":1,"87":1,"121":1,"122":1,"130":1,"131":1,"142":1,"143":1,"144":1,"154":2,"171":2,"183":2,"194":3,"195":3,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"241":1,"242":2,"243":3,"249":1,"254":1,"255":1,"256":1,"257":1,"258":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"21":7,"26":6,"27":2,"43":7,"48":6,"49":2,"65":7,"66":2,"81":10,"83":1,"84":1,"85":1,"86":2,"87":1,"89":2,"93":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":2,"107":1,"111":4,"119":6,"120":2,"121":2,"122":1,"123":1,"125":2,"127":1,"129":1,"133":3,"134":2,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":5,"151":3,"152":4,"154":5,"156":1,"164":3,"171":2,"173":4,"180":1,"183":10,"184":1,"188":5,"194":1,"199":1,"240":1,"241":17,"242":16,"243":13,"248":12,"249":6,"250":5,"283":1,"284":2,"286":1,"287":1,"290":5,"293":1,"302":1,"303":2}}],[">=",{"2":{"188":1}}],[">",{"2":{"21":1,"37":1,"38":1,"39":1,"43":1,"59":1,"60":1,"61":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"85":1,"86":1,"87":3,"95":1,"96":1,"107":1,"108":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":2,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"158":1,"164":1,"171":2,"179":1,"189":2,"190":1,"194":1,"195":1,"200":2,"201":2,"202":1,"203":1,"204":1,"238":1,"241":1,"242":3,"243":1,"246":1,"248":1,"249":1,"250":3,"275":1,"283":1,"286":2,"287":1,"317":2}}],["在群聊启用",{"2":{"311":1}}],["在普通图片和markdown大图之间切换",{"2":{"311":1}}],["在b中定义了templates",{"2":{"308":1}}],["在配置文件中的liteyuki",{"2":{"305":1}}],["在设备上执行命令",{"2":{"296":1}}],["在发信器输出",{"2":{"295":1}}],["在任意进程中均可使用",{"2":{"293":1}}],["在子进程中",{"2":{"290":1}}],["在轻雪插件中",{"2":{"290":1}}],["在新线程中运行协程",{"2":{"285":2}}],["在语言加载完成后执行",{"2":{"180":2}}],["在主进程中运行",{"2":{"127":2}}],["在github上查看",{"2":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["在安全模式下你可以使用npm",{"2":{"6":1}}],["或插件路径",{"2":{"248":2}}],["或",{"2":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1,"319":2}}],["源代码",{"2":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":2,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1,"293":1}}],["参考\`liteyuki",{"2":{"173":1}}],["参考liteyuki",{"2":{"173":1}}],["参考值",{"2":{"3":1}}],["参数列表",{"2":{"311":2}}],["参数为调用set",{"2":{"290":1}}],["参数",{"2":{"21":1,"25":1,"27":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"38":1,"39":1,"43":1,"47":1,"49":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"60":1,"61":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":1,"83":1,"84":1,"87":1,"88":1,"93":1,"94":1,"95":1,"111":1,"112":1,"120":1,"121":1,"122":1,"124":1,"125":1,"126":1,"138":1,"152":1,"154":1,"156":1,"158":1,"171":1,"173":1,"184":1,"188":1,"190":1,"238":1,"239":1,"241":1,"242":1,"243":1,"248":2,"249":2,"250":1,"283":1,"284":1,"285":1,"286":1,"287":1,"310":1,"319":1}}],["31",{"2":{"276":1}}],["34m",{"2":{"40":1,"62":1}}],["3",{"2":{"18":1,"137":1,"177":1,"249":1,"290":1}}],["6",{"2":{"18":1,"177":1}}],["测试版本号",{"2":{"18":1,"177":1}}],["至少1gb空间",{"2":{"15":1}}],["至少1vcpu",{"2":{"15":1}}],["硬盘",{"2":{"15":1}}],["及",{"2":{"15":1}}],["内存共享是线程安全的",{"2":{"292":1}}],["内存共享使得代码编写更加简洁",{"2":{"292":1}}],["内存",{"2":{"15":1,"309":1}}],["不带key返回配置项列表",{"2":{"311":1}}],["不包含任何隐私信息",{"2":{"309":1}}],["不含隐私部分",{"2":{"309":1}}],["不含插件数据",{"2":{"309":1}}],["不同adapter",{"2":{"298":1}}],["不同的实现端给出的字段可能不同",{"2":{"3":1}}],["不递归",{"2":{"143":2}}],["不要出现过多的嵌套",{"2":{"137":1}}],["不是liteyukibot官方提供的功能",{"2":{"14":1}}],["该功能需要commit",{"2":{"311":1}}],["该功能由trss提供支持",{"2":{"14":1}}],["该模块封装通道实现",{"2":{"292":1}}],["该模块用于存放一些开发工具",{"2":{"159":1,"160":1}}],["该模块用于常用配置文件的加载",{"2":{"137":1}}],["该模块用于轻雪主进程和nonebot子进程之间的通信",{"2":{"100":1,"104":1}}],["该步骤为必要项",{"2":{"12":1}}],["weather",{"0":{"317":1},"1":{"318":1},"2":{"317":1,"318":1}}],["world",{"2":{"295":5}}],["w",{"2":{"239":1}}],["write",{"0":{"239":1},"2":{"239":2,"243":1}}],["wrapper",{"0":{"287":1},"2":{"66":1,"87":2,"125":4,"154":1,"164":2,"171":2,"287":4}}],["watchdog",{"2":{"303":1,"306":1}}],["watch",{"2":{"302":1,"303":1}}],["walk",{"2":{"240":1,"241":1}}],["wait",{"0":{"164":1},"2":{"164":2}}],["waring=no",{"2":{"144":1}}],["waring",{"0":{"143":1,"144":1},"2":{"143":3,"144":3}}],["warning=no",{"2":{"143":1,"144":1}}],["warning",{"0":{"142":1,"249":1},"2":{"15":2,"39":1,"61":1,"89":1,"142":5,"143":1,"152":1,"156":1,"158":1,"180":2,"248":1,"249":9,"299":1,"314":1}}],["will",{"2":{"39":1,"61":1}}],["with",{"0":{"39":1,"61":1,"243":1},"2":{"39":1,"61":1,"120":1,"121":1,"122":1,"129":1,"239":1,"241":1,"242":5,"243":4}}],["windows",{"2":{"15":1,"26":1,"48":1}}],["windows系统版本最低windows10+",{"2":{"15":1}}],["windows请使用项目绝对目录",{"2":{"13":1}}],["while",{"2":{"24":1,"46":1,"85":1,"89":1,"127":1,"152":1,"290":2}}],["ws",{"2":{"3":2}}],["$$$$",{"2":{"40":1,"62":1}}],["$$$$$",{"2":{"40":1,"62":1}}],["$$$$$$$$",{"2":{"40":4,"62":4}}],["$$$$$$",{"2":{"40":5,"62":5}}],["$$",{"2":{"40":54,"62":54}}],["$",{"2":{"13":2}}],["构建镜像",{"2":{"13":1}}],["克隆项目",{"2":{"13":1}}],["克隆项目到本地",{"2":{"12":1}}],["使用通用日期简写",{"2":{"319":2}}],["使用此项目代表你已经同意以上协议",{"2":{"309":1}}],["使用开发工具快速运行插件",{"2":{"306":1}}],["使用",{"2":{"297":1}}],["使用新的task执行命令",{"2":{"296":1}}],["使用watchdog监控文件变化并重启bot",{"2":{"161":1}}],["使用trss",{"0":{"14":1}}],["使用docker构建",{"0":{"13":1}}],["使用其他项目连接请先自行查阅文档",{"2":{"9":1}}],["b包也定义了一个index",{"2":{"308":1}}],["block",{"0":{"188":1,"194":1,"195":1},"2":{"188":5,"194":2,"195":2}}],["blue>",{"2":{"180":1}}],["bases",{"2":{"241":1}}],["base",{"0":{"238":1},"2":{"238":4,"241":2}}],["basemodel",{"0":{"213":1,"221":1,"226":1,"232":1,"259":1,"267":1},"1":{"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1}}],["baseexception",{"0":{"175":1}}],["bash",{"2":{"12":1}}],["break",{"2":{"152":1,"193":1}}],["b",{"2":{"138":3,"243":4,"286":4,"320":1}}],["body",{"2":{"241":1}}],["bool=false",{"2":{"142":1,"143":1,"144":1,"194":1,"195":1,"243":1}}],["bool=true",{"2":{"122":1,"171":1,"241":1,"249":1}}],["bool",{"0":{"81":1,"83":1,"122":1,"142":1,"143":1,"144":1,"158":1,"171":1,"188":1,"194":1,"195":1,"202":1,"203":1,"204":1,"220":1,"241":1,"243":1,"249":1,"283":1},"2":{"81":1,"83":3,"158":1,"163":1,"188":1,"197":1,"200":1,"201":1,"202":1,"203":1,"204":1,"283":3}}],["bot",{"0":{"19":1,"37":1,"41":1,"59":1,"63":1,"183":1},"1":{"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1},"2":{"21":2,"37":4,"38":1,"39":4,"43":2,"59":4,"60":1,"61":4,"173":2,"183":4,"184":2,"290":4,"295":1,"303":2,"311":1,"319":3,"320":1}}],["bot无其他插件会占用300~500mb",{"2":{"15":1}}],["be",{"2":{"39":1,"61":1,"84":1,"87":1,"93":1,"166":1}}],["before",{"0":{"31":1,"34":1,"35":1,"53":1,"56":1,"57":1,"67":1,"69":1,"71":1,"73":1,"75":1,"77":1},"2":{"22":1,"31":2,"34":2,"35":2,"44":1,"53":2,"56":2,"57":2,"65":3,"67":2,"69":2,"71":2,"73":3,"75":3,"77":3,"152":3}}],["build",{"2":{"13":1}}],["bind",{"2":{"318":1}}],["bin",{"2":{"12":1}}],["help",{"2":{"313":1,"314":1}}],["hello",{"2":{"295":5,"311":1}}],["html中用",{"2":{"308":1}}],["html",{"2":{"308":1}}],["html文件会被覆盖",{"2":{"308":1}}],["html文件",{"2":{"308":2}}],["https",{"2":{"12":1,"13":1}}],["homepage",{"0":{"265":1}}],["host",{"2":{"1":1}}],["hash",{"0":{"268":1},"2":{"268":2}}],["hasattr",{"2":{"82":1}}],["handlers",{"2":{"188":1,"189":1,"190":1}}],["handler",{"0":{"199":1},"2":{"171":3,"189":5,"190":2,"199":3,"200":4,"201":4,"202":2}}],["handle",{"0":{"25":1,"47":1,"189":1},"2":{"21":2,"25":1,"43":2,"47":1,"189":1,"276":1,"277":1}}],["hint",{"2":{"81":1,"241":1,"242":1}}],["环境",{"2":{"12":1}}],["和风天气的天气key",{"2":{"317":1}}],["和10是不一样的",{"2":{"311":1}}],["和config目录下的所有配置文件",{"2":{"144":2}}],["和",{"2":{"12":1,"311":1}}],["常规操作",{"2":{"21":1,"43":1}}],["常规部署",{"0":{"12":1}}],["常见问题",{"0":{"6":1}}],["安装插件",{"2":{"313":1}}],["安装的插件",{"2":{"248":2}}],["安装依赖",{"2":{"12":1}}],["安装",{"0":{"11":1},"1":{"12":1,"13":1,"14":1,"15":1,"16":1},"2":{"12":1,"13":1,"310":1,"314":1}}],["安全模式",{"2":{"2":1}}],["鸣谢",{"0":{"10":1}}],["然后运行python",{"2":{"306":1}}],["然后使用",{"2":{"12":1}}],["然后给轻雪传输数据",{"2":{"8":1}}],["然后用",{"2":{"6":1}}],["看着qq的消息",{"2":{"8":1}}],["人工实现的onebot协议",{"2":{"8":1}}],["需要在最后调用",{"2":{"296":1}}],["需要在对应进程都调度一次",{"2":{"89":2}}],["需要官方机器人权限",{"2":{"8":1}}],["需要安装ntqq",{"2":{"8":1}}],["g",{"2":{"250":1,"320":1}}],["group",{"2":{"183":2,"311":9,"312":1,"313":2,"319":3,"320":1}}],["green>",{"2":{"180":1}}],["gather",{"2":{"66":1,"284":1}}],["generate",{"0":{"242":1,"243":1},"2":{"242":1,"243":3}}],["generic",{"0":{"80":1,"82":1},"1":{"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1},"2":{"81":2,"82":1,"84":1}}],["gensokyo",{"2":{"8":1}}],["getattr",{"2":{"283":1}}],["get",{"0":{"37":1,"38":1,"39":1,"59":1,"60":1,"61":1,"82":1,"95":1,"96":1,"98":1,"99":1,"121":1,"123":1,"129":1,"133":1,"136":1,"179":1,"238":1,"240":1,"241":1,"246":1,"275":1},"2":{"27":2,"37":2,"38":3,"39":5,"49":2,"59":2,"60":3,"61":5,"66":1,"81":2,"82":2,"84":1,"86":1,"95":2,"96":2,"97":1,"98":4,"99":3,"120":1,"121":4,"122":1,"123":2,"129":1,"132":1,"133":3,"135":1,"136":3,"152":1,"153":1,"173":1,"179":1,"180":2,"238":1,"240":1,"241":5,"243":3,"244":1,"246":1,"248":3,"249":1,"275":1,"279":2,"281":2,"284":1,"290":8,"293":1,"303":2,"311":3,"312":1,"315":2}}],["globalkeyvaluestore",{"0":{"128":1},"1":{"129":1,"130":1,"131":1}}],["global",{"2":{"21":1,"43":1,"87":1,"313":2,"314":2}}],["gt",{"0":{"21":1,"37":1,"38":1,"39":1,"43":1,"59":1,"60":1,"61":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"85":1,"86":1,"87":1,"95":1,"96":1,"107":1,"108":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"158":1,"171":1,"179":1,"189":1,"190":1,"194":1,"195":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"241":1,"242":1,"246":1,"248":1,"249":1,"250":1,"275":1,"283":1,"286":1,"287":1},"2":{"100":3,"104":3,"138":1,"188":1,"286":1,"310":1,"311":7,"313":10,"315":2}}],["github",{"2":{"12":1,"13":1}}],["git",{"2":{"12":2,"13":1}}],["golang",{"2":{"8":1}}],["go语言实现的onebot11实现端",{"2":{"8":1}}],["go",{"2":{"8":1}}],["occurred",{"2":{"284":1}}],["output",{"0":{"243":1},"2":{"243":6}}],["outlook",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["other",{"0":{"200":1,"201":1},"2":{"183":1,"200":2,"201":2}}],["observer",{"0":{"161":1},"1":{"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1},"2":{"171":1,"303":2}}],["os",{"2":{"142":1,"143":3,"238":1,"239":4,"240":2,"241":1,"243":2,"249":9,"303":2}}],["of",{"2":{"84":1,"93":1,"248":1}}],["order",{"2":{"243":1}}],["or",{"0":{"200":1},"2":{"83":1,"200":2,"241":4}}],["orig",{"2":{"82":2}}],["only",{"2":{"87":1}}],["on",{"0":{"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"87":1,"88":1,"97":1,"98":1,"99":1,"107":2,"116":1,"117":1,"125":3,"133":1,"134":1,"135":1,"136":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"192":1,"194":1,"195":1},"1":{"193":1,"194":1,"195":1},"2":{"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":2,"87":4,"88":3,"89":3,"96":1,"97":3,"98":3,"99":2,"107":4,"108":1,"116":1,"117":1,"125":11,"126":1,"132":1,"133":3,"134":3,"135":3,"136":2,"166":2,"167":2,"168":2,"169":2,"170":2,"171":2,"192":1,"194":1,"195":4,"276":1,"277":1,"290":6,"303":1}}],["onebot",{"2":{"2":1,"3":1,"8":2,"298":1,"311":1}}],["option",{"2":{"310":1}}],["optional",{"0":{"27":1,"49":1,"81":1,"82":1,"87":1,"121":2,"183":2,"248":1,"273":1},"2":{"27":1,"49":1,"81":1,"82":3,"87":1,"119":2,"121":3,"183":2,"248":1}}],["opt",{"2":{"248":3}}],["open",{"2":{"26":1,"48":1,"139":1,"140":1,"141":1,"239":1,"241":1}}],["openshamrock",{"2":{"8":1}}],["基础插件",{"0":{"310":1},"1":{"311":1,"312":1,"313":1,"314":1,"315":1}}],["基础路径",{"2":{"238":2}}],["基础配置项",{"0":{"1":1}}],["基于ipc",{"2":{"105":1}}],["基于",{"2":{"8":1}}],["基于node",{"2":{"8":1}}],["基于ntqq的onebot实现",{"2":{"8":1}}],["基于lsposed的onebot11实现",{"2":{"8":1}}],["qq群号",{"2":{"319":1}}],["qq官方机器人api",{"2":{"8":1}}],["qq",{"0":{"8":1}}],["quot",{"2":{"3":2,"299":2,"311":2,"317":4}}],["推荐私聊使用",{"2":{"311":1}}],["推荐在编写html时同时更改对应js代码",{"2":{"307":1}}],["推荐ubuntu",{"2":{"15":1}}],["推荐使用arch",{"2":{"14":1}}],["推荐使用虚拟环境来运行轻雪",{"2":{"12":1}}],["推荐使用反向ws协议进行通信",{"2":{"3":1}}],["推荐方案",{"0":{"8":1,"9":1}}],["仍然出现问题",{"2":{"6":1}}],["将消息按照onebot标准处理好上报给轻雪",{"2":{"6":1}}],["提供",{"2":{"6":1}}],["登录功能由实现端",{"2":{"6":1}}],["本项目不会收集用户的任何隐私信息",{"2":{"309":1}}],["本项目不负责实现登录功能",{"2":{"6":1}}],["本项目遵循mit协议",{"2":{"309":1}}],["本模块用于实现rpc",{"2":{"105":1}}],["本模块定义了一个通用的通道类",{"2":{"79":1}}],["本机默认为127",{"2":{"3":1}}],["例如npm",{"2":{"310":1}}],["例如nonebot插件中",{"2":{"290":1}}],["例如你在a中定义了templates",{"2":{"308":1}}],["例如html",{"2":{"307":1}}],["例如main",{"2":{"306":1}}],["例如watchdog",{"2":{"302":1,"305":1}}],["例如",{"2":{"295":2,"308":1,"317":1}}],["例如test",{"2":{"295":1,"306":1}}],["例如子进程接收到用户信息需要重启机器人",{"2":{"289":1}}],["例如qq",{"2":{"6":1}}],["例如一个命令是help",{"2":{"6":1}}],["怎么登录聊天平台",{"2":{"6":1}}],["报错invalidgitrepositoryerror",{"2":{"6":1}}],["冲突",{"2":{"6":1}}],["确认插件必要配置项完好后",{"2":{"6":1}}],["确认命令头没有和nickname",{"2":{"6":1}}],["确认你有权限使用命令并按照正确的命令发送",{"2":{"6":1}}],["其中",{"2":{"6":1}}],["其他插件框架进程是伴随的子进程",{"2":{"289":1}}],["其他插件占用视具体插件而定",{"2":{"15":1}}],["其他插件自带的调试功能也将开启",{"2":{"2":1}}],["其他问题请移步至",{"0":{"16":1}}],["其他问题",{"0":{"7":1}}],["其他",{"0":{"4":1}}],["其他nonebot插件的配置项",{"2":{"2":1}}],["其他配置",{"0":{"2":1}}],["r>",{"2":{"248":2}}],["rv",{"2":{"243":2}}],["rk",{"2":{"243":2}}],["rmtree",{"2":{"243":1}}],["rpm",{"2":{"313":5,"314":1}}],["rp",{"2":{"239":4}}],["rpc",{"0":{"105":1,"106":1},"1":{"106":1,"107":2,"108":2},"2":{"100":1,"104":1}}],["rule=is",{"2":{"276":1,"277":1}}],["rule=empty",{"2":{"194":1,"195":1}}],["rulehandlerfunc",{"0":{"197":1,"199":1},"2":{"199":1}}],["rule",{"0":{"188":2,"194":3,"195":2,"196":1,"198":1,"200":2,"201":2,"203":1,"204":1},"1":{"197":1,"198":1,"199":2,"200":2,"201":2,"202":2,"203":1,"204":1},"2":{"188":6,"190":1,"194":3,"195":5,"196":1,"200":3,"201":3,"202":1,"203":3,"204":2,"276":1,"277":1}}],["running",{"2":{"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"86":1,"89":1,"119":2,"284":2}}],["runtimeerror",{"2":{"37":2,"59":2,"84":1,"85":1,"87":1,"125":1,"127":1,"284":1}}],["run",{"0":{"22":1,"23":1,"44":1,"45":1,"66":1,"88":1,"126":1,"152":1,"173":1,"190":1,"284":1,"285":1},"2":{"13":1,"22":1,"23":3,"44":1,"45":3,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"88":1,"89":1,"126":1,"127":1,"152":1,"153":1,"173":2,"190":1,"284":3,"285":1,"306":2}}],["raw",{"0":{"183":1},"2":{"183":4,"184":1,"195":1,"277":1}}],["raise",{"2":{"37":2,"59":2,"81":3,"84":2,"85":1,"87":1,"93":2,"122":1,"125":1,"127":1,"152":1,"166":1}}],["rights",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["root",{"2":{"13":1,"240":2}}],["readme",{"2":{"243":2}}],["read",{"2":{"241":1}}],["reload",{"2":{"311":1,"312":2,"313":1,"314":1}}],["reloading",{"2":{"303":1}}],["rel",{"2":{"243":4,"286":5}}],["relpath",{"2":{"238":1}}],["relative",{"0":{"238":1},"2":{"238":1,"243":1,"244":1,"286":1}}],["replace",{"2":{"241":3,"242":4,"243":8}}],["reply",{"0":{"184":1},"2":{"184":3,"277":1}}],["report设定为false",{"2":{"309":1}}],["report",{"2":{"1":1,"309":1}}],["red>",{"2":{"180":1}}],["remove",{"2":{"180":1}}],["ref",{"0":{"132":1}}],["required",{"2":{"81":1}}],["requirements",{"2":{"6":1,"12":1,"15":1}}],["recursive=recursive",{"2":{"171":1}}],["recursive",{"0":{"171":1},"2":{"171":3}}],["receive",{"0":{"85":1,"86":1,"87":1,"88":1,"89":1,"113":1,"116":1,"117":1,"125":3,"126":1,"127":1,"183":1},"2":{"81":3,"85":2,"86":2,"87":4,"88":3,"89":7,"95":1,"96":2,"97":2,"98":2,"99":1,"113":1,"116":1,"117":1,"119":2,"121":1,"123":1,"125":11,"126":2,"127":4,"132":1,"133":2,"134":2,"135":2,"136":1,"152":1,"153":2,"183":4,"184":3,"290":11}}],["received",{"2":{"25":1,"47":1,"152":1}}],["recv",{"2":{"81":2,"85":2,"95":5,"96":5,"98":3,"99":3,"111":1,"121":5,"123":5,"133":3,"136":3}}],["resources",{"2":{"307":1,"308":1,"312":1}}],["resolve",{"2":{"286":2}}],["reserved",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["restarting",{"2":{"26":1,"48":1,"152":1}}],["restart",{"0":{"26":1,"27":1,"35":1,"36":1,"48":1,"49":1,"57":1,"58":1,"71":1,"72":1,"77":1,"78":1},"2":{"21":1,"26":3,"27":1,"35":2,"36":2,"43":1,"48":3,"49":1,"57":2,"58":2,"65":2,"71":2,"72":2,"77":3,"78":3,"152":1,"303":2}}],["return",{"0":{"216":1},"2":{"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":3,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":3,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"82":2,"83":8,"85":1,"86":1,"87":6,"89":1,"95":2,"96":2,"108":1,"121":2,"123":2,"125":2,"129":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"156":1,"158":1,"164":3,"171":3,"179":2,"189":2,"190":1,"194":1,"195":2,"200":2,"201":2,"202":2,"203":1,"204":1,"238":1,"240":1,"241":3,"242":3,"246":1,"248":2,"249":1,"250":1,"268":1,"275":1,"283":3,"286":2,"287":2}}],["returns",{"2":{"24":1,"25":1,"26":1,"27":1,"28":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"46":1,"47":1,"48":1,"49":1,"50":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"87":1,"95":1,"96":1,"113":1,"121":1,"122":1,"123":1,"124":1,"125":1,"138":1,"152":1,"156":1,"158":1,"171":1,"180":1,"184":1,"189":1,"190":1,"241":5,"242":1,"246":1,"250":1,"275":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["registered",{"2":{"89":1}}],["register",{"2":{"21":1,"43":1}}],["r",{"2":{"6":1,"12":1,"15":1,"139":1,"140":1,"141":1,"241":1}}],["msg",{"2":{"311":1}}],["mcfunction",{"2":{"295":2}}],["mkdir",{"2":{"243":1}}],["mkdoc",{"0":{"206":1},"1":{"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1},"2":{"206":1}}],["md",{"2":{"243":15}}],["member",{"2":{"311":1}}],["memory",{"2":{"119":3,"132":1,"133":3,"134":3,"135":3,"136":2,"153":1,"154":1,"293":3}}],["meta",{"2":{"248":4,"302":1}}],["metadata",{"0":{"273":1},"2":{"248":13}}],["methods=",{"2":{"241":1}}],["methods",{"0":{"229":1},"2":{"241":1,"242":1}}],["method",{"0":{"209":2,"210":1,"211":1},"2":{"241":5,"242":13}}],["message=",{"2":{"184":1,"311":1}}],["message=message",{"2":{"184":1}}],["messageevent",{"0":{"182":1,"183":1,"190":1,"202":1,"203":1,"204":1,"277":1},"1":{"183":1,"184":1},"2":{"183":1,"184":1,"190":1,"195":1,"197":1,"200":1,"201":1,"202":1,"203":1,"204":1,"277":1}}],["message",{"0":{"181":1,"183":3,"184":1,"185":1,"186":1,"191":1,"192":1,"194":1,"196":1,"205":1},"1":{"182":1,"183":1,"184":1,"187":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1},"2":{"183":12,"184":6,"194":1,"195":2,"277":1,"319":1,"320":1}}],["moved",{"0":{"169":1},"2":{"169":1}}],["moduletype",{"0":{"271":1}}],["module=module",{"2":{"248":1}}],["moduleinfo",{"0":{"232":1,"241":1,"242":1},"1":{"233":1,"234":1,"235":1,"236":1,"237":1},"2":{"241":2,"242":1}}],["module",{"0":{"173":1,"233":1,"240":1,"241":1,"242":1,"243":1,"244":1,"248":1,"256":2,"271":1,"272":1,"286":1},"2":{"173":4,"240":2,"241":11,"242":6,"243":26,"244":1,"248":27,"249":9,"250":1,"268":1,"286":1}}],["modified",{"0":{"166":1},"2":{"166":2,"167":1,"168":1,"169":1,"170":1,"171":4}}],["model",{"0":{"252":1,"269":1},"1":{"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"252":1}}],["mode为true",{"2":{"161":1}}],["mode",{"2":{"2":2,"6":1,"311":2,"312":1}}],["must",{"2":{"84":1,"93":1,"166":1}}],["match",{"2":{"250":1}}],["matcher",{"0":{"186":1,"187":1,"193":3,"194":1,"195":1},"1":{"187":1,"188":2,"189":2,"190":2},"2":{"186":1,"193":9,"194":6,"195":1}}],["matter=none",{"2":{"242":1}}],["matter",{"0":{"242":1},"2":{"242":5,"243":3}}],["markdown",{"0":{"242":1},"2":{"242":3,"243":1}}],["makedirs",{"2":{"239":1}}],["manually",{"2":{"81":1}}],["manager",{"0":{"147":1,"251":1},"1":{"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1},"2":{"21":2,"22":1,"26":1,"27":1,"43":2,"44":1,"48":1,"49":1,"147":1,"251":1}}],["maplemono提供的字体",{"2":{"10":1}}],["mainprocess",{"2":{"289":1}}],["main",{"0":{"116":1},"2":{"6":1,"12":1,"37":1,"59":1,"81":4,"87":4,"88":2,"89":1,"93":1,"95":1,"96":1,"119":1,"120":1,"121":1,"122":1,"123":1,"125":5,"126":1,"127":1,"290":6,"306":1}}],["misans",{"2":{"10":1}}],["minecraftonebot",{"2":{"9":1}}],["minecraft",{"0":{"9":1}}],["m",{"2":{"6":1,"12":1,"15":1,"193":2,"250":1,"320":1}}],["答疑",{"0":{"5":1},"1":{"6":1,"7":1,"8":1,"9":1,"10":1}}],["要使用其他通信方式请访问onebot",{"2":{"3":1}}],["如果你接触过minecraft的资源包",{"2":{"307":1}}],["如果你想同时输出多行内容可以尝试换行符",{"2":{"295":1}}],["如果你没有安装git直接下载源代码运行",{"2":{"15":1}}],["如果你给轻雪配置了accesstoken",{"2":{"3":1}}],["如果装置上有多个环境",{"2":{"15":1}}],["如需自定义请手动添加",{"2":{"2":1}}],["version=",{"2":{"302":1}}],["version",{"0":{"18":1,"177":1},"2":{"308":1}}],["venv来创建虚拟环境",{"2":{"12":1}}],["venv",{"2":{"12":3}}],["validate",{"0":{"83":1},"2":{"83":4,"84":1}}],["value=ast",{"2":{"241":1}}],["values",{"2":{"153":1}}],["value",{"0":{"120":1,"224":1},"2":{"120":6,"134":3,"138":3,"241":6,"242":3,"293":2,"311":2,"315":1}}],["valueerror",{"2":{"81":2,"93":1}}],["value2",{"2":{"2":1}}],["value1",{"2":{"2":1}}],["var=value",{"2":{"296":1}}],["var2=value2",{"2":{"296":1}}],["var1=value1>",{"2":{"296":1}}],["var",{"0":{"18":1,"90":1,"91":1,"92":1,"116":1,"117":1,"132":1,"162":1,"163":1,"177":1,"197":1,"244":1},"2":{"242":2}}],["v",{"2":{"13":2,"138":2,"242":2}}],["v11协议api",{"2":{"311":2}}],["v11",{"2":{"3":1,"298":1}}],["地址取决于配置文件",{"2":{"3":1}}],["地址",{"2":{"3":1}}],["反向websocket",{"2":{"3":1}}],["协议端",{"2":{"6":1}}],["协议",{"2":{"3":1}}],["说明",{"2":{"3":1,"18":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"63":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"100":1,"101":1,"104":1,"105":1,"108":1,"109":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"132":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"147":1,"152":1,"153":1,"154":1,"156":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"171":1,"172":1,"173":1,"174":1,"177":1,"178":1,"180":1,"181":1,"183":1,"184":1,"185":1,"186":1,"188":1,"189":1,"190":1,"191":1,"192":1,"196":1,"197":1,"205":1,"206":1,"238":1,"239":1,"241":1,"242":1,"243":1,"244":1,"246":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"275":1,"276":1,"278":1,"279":1,"280":1,"281":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"311":1,"313":2,"315":1}}],["与nonebot对接的onebot实现端配置",{"0":{"3":1}}],["示例",{"0":{"3":1,"290":1,"293":1,"297":1}}],["监听目录们",{"2":{"171":2}}],["监听地址",{"2":{"1":1}}],["监视文件变化并自动重载",{"2":{"2":1}}],["开始",{"0":{"301":1},"1":{"302":1,"303":1,"304":1,"305":1,"306":1}}],["开始接收数据",{"2":{"89":2}}],["开发者模式",{"2":{"2":1}}],["开发者选项",{"2":{"2":1}}],["开启后自动监控进程",{"2":{"152":2}}],["开启后将会启动监视者",{"2":{"2":1}}],["开启后将不会加载任何第三方nonebot插件",{"2":{"2":1}}],["开启会自动重载bot或者资源",{"2":{"2":1}}],["2s戳两次",{"2":{"297":1}}],["22",{"2":{"276":1}}],["27",{"2":{"147":1,"178":1}}],["25",{"2":{"109":1}}],["21",{"2":{"79":1}}],["26",{"2":{"79":1,"101":1}}],["24",{"2":{"63":1,"252":1}}],["23",{"2":{"63":1,"206":1,"247":1,"251":1}}],["20代替空格",{"2":{"311":1}}],["20和end",{"2":{"297":1}}],["2024",{"2":{"63":2,"79":2,"101":2,"109":2,"147":2,"172":2,"178":2,"181":2,"185":2,"186":2,"191":2,"192":2,"196":2,"205":2,"206":2,"247":2,"251":2,"252":2,"276":2,"278":2,"280":2}}],["2020",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["20216中的20216替换为你的端口号",{"2":{"13":1}}],["20216",{"2":{"1":1,"3":2,"13":2}}],["20",{"2":{"15":1}}],["2019+",{"2":{"15":1}}],["2",{"2":{"2":1,"137":1,"152":1,"297":1,"308":1}}],["建议1gb以上",{"2":{"15":1}}],["建议开启",{"2":{"2":1}}],["建议迁移到liteyuki下",{"2":{"1":1}}],["默认普通图片",{"2":{"311":1}}],["默认开启",{"2":{"309":1}}],["默认插件加载器",{"2":{"279":2,"281":2}}],["默认执行扁平化选项",{"2":{"142":2,"143":2}}],["默认为none",{"2":{"27":2,"49":2}}],["默认为本机",{"2":{"1":1}}],["默认值",{"2":{"18":1,"38":2,"39":2,"60":2,"61":2,"90":1,"91":1,"92":1,"116":1,"117":1,"121":2,"132":1,"162":1,"163":1,"177":1,"197":1,"244":1}}],["默认false",{"2":{"2":1}}],["默认语言",{"2":{"2":1}}],["city",{"2":{"317":1,"318":1}}],["css相对路径引用b中的css",{"2":{"308":1}}],["css",{"2":{"307":1,"308":1}}],["cwd",{"2":{"286":1}}],["cfg",{"2":{"173":4}}],["current|bot",{"2":{"319":1}}],["current|group",{"2":{"319":1}}],["current",{"2":{"164":3,"319":2,"320":1}}],["custom",{"2":{"2":4}}],["created",{"0":{"167":1},"2":{"167":1}}],["create",{"2":{"88":2,"126":1,"153":3}}],["child",{"2":{"241":2}}],["check",{"0":{"81":1},"2":{"81":9,"84":1}}],["change",{"2":{"313":1,"314":1}}],["changed",{"2":{"303":1}}],["channel时的通道标识",{"2":{"290":1}}],["channel即可",{"2":{"290":1}}],["channel及passive",{"2":{"290":1}}],["channel函数获取通道对象",{"2":{"290":2}}],["channel=none",{"2":{"184":1}}],["channeldeliver",{"0":{"148":1},"1":{"149":1},"2":{"154":1}}],["channelv2",{"2":{"109":1}}],["channels",{"0":{"94":2,"96":1,"99":1},"2":{"94":5,"96":2,"98":1,"99":3,"153":1}}],["channel",{"0":{"79":1,"80":1,"90":1,"91":1,"92":2,"93":3,"94":1,"95":2,"96":1,"97":1,"98":1,"109":1,"124":1,"125":1,"126":1,"149":8,"183":2},"1":{"80":1,"81":2,"82":2,"83":2,"84":2,"85":2,"86":2,"87":2,"88":2,"89":2,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"110":1,"111":1,"112":1,"113":1,"114":1},"2":{"27":2,"49":2,"79":1,"81":7,"84":1,"85":1,"90":3,"91":3,"92":2,"93":19,"94":4,"95":8,"96":9,"97":11,"98":7,"99":2,"100":2,"104":2,"119":4,"121":1,"123":1,"124":5,"125":9,"126":4,"127":2,"149":12,"152":1,"154":12,"183":5,"184":2,"290":12}}],["chan",{"2":{"27":4,"49":4,"95":5,"96":5,"98":3,"99":3,"119":2,"120":1,"121":6,"122":1,"123":6,"124":1,"127":1,"132":1,"133":5,"134":2,"135":2,"136":4,"152":2,"153":2,"154":2}}],["c",{"2":{"63":1,"79":1,"101":1,"109":1,"138":3,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"250":1,"251":1,"252":1,"276":1,"278":1,"280":1,"284":4,"286":4,"320":1}}],["cmd",{"2":{"26":5,"48":5,"295":2,"296":1}}],["case",{"2":{"250":4}}],["category",{"2":{"242":2,"243":2}}],["cannot",{"2":{"84":1,"85":1,"125":1,"127":1}}],["can",{"2":{"37":1,"59":1,"87":1}}],["calling",{"0":{"107":2},"2":{"107":4,"108":1}}],["callback",{"0":{"162":1,"171":2},"2":{"87":1,"88":2,"171":4}}],["callable",{"0":{"87":3,"125":1,"171":1,"189":1,"283":2,"287":2},"2":{"66":1,"87":7,"125":2,"151":1,"162":1,"163":1,"171":1,"189":1,"197":1,"283":2,"287":6}}],["call",{"0":{"108":1,"202":1,"283":1},"2":{"21":1,"26":2,"43":1,"48":2,"108":1,"164":4,"202":1,"283":8}}],["cache",{"2":{"13":2}}],["cls",{"0":{"129":1},"2":{"129":6,"241":1,"242":11}}],["close",{"0":{"114":1},"2":{"114":1,"284":1}}],["closed",{"2":{"81":1,"84":2,"85":2,"89":1,"111":1}}],["clone",{"2":{"12":1,"13":1}}],["classdef",{"2":{"241":3}}],["classes=",{"2":{"241":1}}],["classes",{"0":{"235":1},"2":{"241":1,"242":1}}],["classinfo",{"0":{"226":1,"235":1},"1":{"227":1,"228":1,"229":1,"230":1,"231":1},"2":{"241":1}}],["classmethod",{"0":{"211":1},"2":{"128":1,"129":1,"241":1}}],["class",{"0":{"20":1,"42":1,"64":1,"80":1,"102":1,"106":1,"110":1,"118":1,"128":1,"148":1,"150":1,"165":1,"175":1,"182":1,"187":1,"198":1,"207":1,"211":1,"213":1,"221":1,"226":1,"232":1,"253":1,"259":1,"267":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"130":1,"131":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"166":1,"167":1,"168":1,"169":1,"170":1,"183":1,"184":1,"188":1,"189":1,"190":1,"199":1,"200":1,"201":1,"202":1,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"254":1,"255":1,"256":1,"257":1,"258":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"82":2,"241":24,"242":2}}],["cpu",{"2":{"15":1,"309":1}}],["centos",{"2":{"15":1}}],["cd",{"2":{"12":1,"13":1}}],["cqhttp",{"2":{"8":1}}],["color",{"2":{"250":7}}],["colors=true",{"2":{"248":3}}],["color=",{"2":{"180":5}}],["code插件liteyuki",{"2":{"299":1}}],["code=ast",{"2":{"241":2}}],["code",{"0":{"218":1},"2":{"171":3,"242":6,"243":2}}],["codemodifiedhandler",{"0":{"165":1},"1":{"166":1,"167":1,"168":1,"169":1,"170":1},"2":{"171":1}}],["coro",{"0":{"284":1,"285":1},"2":{"284":6,"285":3}}],["coroutine",{"0":{"283":1,"284":2,"285":2,"287":1},"2":{"66":1,"87":2,"125":1,"197":1,"283":1,"284":2,"285":3,"287":3}}],["core",{"0":{"145":1,"146":1,"147":1},"1":{"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1}}],["copy",{"2":{"138":1}}],["copyright",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["content",{"2":{"241":2,"242":17,"243":2}}],["continue",{"2":{"143":1,"152":1,"241":1,"243":1,"249":3}}],["conn",{"2":{"81":4,"84":1,"85":1,"111":2}}],["configs",{"0":{"143":1},"2":{"143":1,"144":1}}],["config=self",{"2":{"29":1,"51":1}}],["config",{"0":{"38":1,"39":1,"60":1,"61":1,"137":1,"138":2,"144":1,"180":1,"269":1},"1":{"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1},"2":{"2":2,"21":2,"29":1,"38":2,"39":6,"43":2,"51":1,"60":2,"61":6,"138":10,"139":7,"140":7,"141":7,"142":7,"143":4,"144":9,"173":1,"180":3,"279":2,"281":2,"311":4,"312":1}}],["count",{"0":{"132":1},"2":{"21":1,"26":2,"43":1,"48":2}}],["combined",{"2":{"200":2,"201":2}}],["comm",{"0":{"79":1,"100":1,"101":1,"104":1,"105":1,"109":1,"115":1},"1":{"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"102":1,"103":1,"106":1,"107":1,"108":1,"110":1,"111":1,"112":1,"113":1,"114":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1},"2":{"290":2,"293":2}}],["command>",{"2":{"296":2}}],["command",{"0":{"311":1},"1":{"312":1},"2":{"1":2}}],["complete",{"2":{"284":2}}],["completion",{"2":{"2":1}}],["compat",{"0":{"39":2,"61":2},"2":{"39":9,"61":9}}],["com",{"2":{"12":1,"13":1,"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["cn",{"0":{"242":1,"243":1},"2":{"2":1,"242":2,"243":1}}],["duration>",{"2":{"319":1}}],["duration",{"2":{"319":2,"320":1}}],["driver",{"2":{"290":4}}],["dog",{"2":{"302":1,"303":1}}],["does",{"2":{"249":1}}],["dot",{"2":{"241":1}}],["docs",{"0":{"243":1},"2":{"243":5,"311":1,"312":1}}],["docstring=method",{"2":{"241":1}}],["docstring=module",{"2":{"241":1}}],["docstring=class",{"2":{"241":1}}],["docstring=function",{"2":{"241":1}}],["docstring",{"0":{"217":1,"225":1,"228":1,"237":1},"2":{"241":16,"242":12}}],["docker",{"2":{"13":3}}],["d",{"2":{"83":4,"132":2,"133":4,"134":4,"135":4,"136":2,"286":4,"320":1}}],["daemon=true",{"2":{"152":1,"285":1}}],["data=",{"2":{"184":1}}],["data",{"0":{"83":1,"84":1,"88":1,"97":1,"98":1,"99":1,"103":1,"112":1,"124":1,"126":1,"133":1,"134":1,"135":1,"136":1,"183":1,"239":1},"2":{"83":12,"84":7,"85":2,"86":2,"87":5,"88":5,"89":2,"96":2,"97":7,"98":7,"99":4,"103":3,"112":3,"113":2,"124":5,"125":3,"126":4,"127":6,"133":4,"134":3,"135":2,"136":2,"152":4,"183":7,"239":6,"243":5,"290":7}}],["darwin",{"2":{"26":1,"48":1}}],["disable",{"2":{"311":1,"312":1,"313":2,"314":2}}],["display",{"0":{"250":2},"2":{"248":7,"250":5}}],["diagnose=false",{"2":{"180":1}}],["dir",{"0":{"243":1,"249":1},"2":{"243":6,"249":17,"279":2,"281":2}}],["dirname",{"2":{"239":2}}],["directory",{"2":{"143":6,"171":2,"249":1}}],["directories=",{"2":{"303":1}}],["directories",{"0":{"143":1,"171":1},"2":{"143":2,"171":4}}],["dirs",{"0":{"143":1},"2":{"1":1,"143":1,"144":1,"240":1,"279":1,"281":1}}],["dict",{"0":{"94":1,"96":1,"97":1,"98":1,"99":1,"103":1,"108":1,"123":1,"133":1,"134":1,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"180":1,"183":2,"184":1,"239":1,"246":1,"266":1,"275":1},"2":{"21":1,"43":1,"83":2,"91":1,"94":1,"96":2,"97":1,"98":1,"99":1,"103":1,"108":1,"116":1,"117":1,"119":2,"123":4,"133":1,"134":1,"135":1,"136":1,"138":3,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":3,"180":1,"183":3,"184":1,"239":1,"243":1,"246":3,"248":6,"275":3}}],["description=",{"2":{"302":1}}],["description",{"0":{"261":1},"2":{"308":1}}],["details>",{"2":{"242":4}}],["debounce",{"0":{"164":1},"2":{"164":1,"165":1,"166":1}}],["debug",{"2":{"2":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":2,"89":1,"139":1,"140":1,"141":1,"179":2,"180":2,"303":1}}],["deepcopy",{"2":{"138":1}}],["del",{"2":{"122":2}}],["deleted",{"0":{"168":1},"2":{"168":1}}],["delete",{"0":{"122":1,"135":1},"2":{"122":2,"134":1,"135":3}}],["delivery",{"2":{"154":1}}],["deliver",{"0":{"92":1,"149":2},"2":{"93":1,"95":1,"96":2,"97":2,"98":2,"99":1,"149":6,"154":6}}],["delay",{"0":{"26":1,"48":1},"2":{"26":2,"48":2}}],["decorator",{"2":{"87":2,"125":2,"164":2,"171":2,"189":2,"241":13}}],["deprecated",{"2":{"39":1,"61":1}}],["depth=1",{"2":{"12":1,"13":1}}],["deftype",{"0":{"207":1,"219":1},"1":{"208":1,"209":1,"210":1,"211":1,"212":1},"2":{"241":4,"242":1}}],["def",{"0":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1},"2":{"22":1,"24":1,"44":1,"46":1,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"87":2,"88":1,"89":1,"97":1,"98":1,"99":1,"125":2,"126":1,"127":1,"129":1,"133":1,"134":1,"135":1,"136":1,"152":2,"153":1,"164":2,"166":1,"171":2,"189":1,"190":1,"195":1,"200":1,"201":1,"202":1,"203":1,"204":1,"241":4,"242":2,"277":1,"287":1,"290":3,"303":1}}],["default",{"0":{"38":1,"39":1,"60":1,"61":1,"121":1,"144":1,"214":1,"215":1,"216":1,"217":1,"219":1,"220":1,"222":1,"223":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"260":1,"270":1,"271":1,"272":1,"279":1,"281":1},"2":{"2":1,"38":4,"39":4,"60":4,"61":4,"92":1,"121":6,"133":3,"144":1,"173":1,"179":1,"279":1,"281":1}}],["developer",{"2":{"302":1}}],["dev",{"0":{"159":1,"160":1,"161":1,"172":1},"1":{"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1},"2":{"2":1,"303":1,"306":1}}],["访问令牌",{"2":{"2":1}}],["a包中的index",{"2":{"308":1}}],["am",{"2":{"290":6}}],["arbitrary",{"0":{"269":1}}],["arg",{"2":{"241":13,"242":16}}],["argv",{"2":{"26":1,"48":1}}],["args=coro",{"2":{"285":1}}],["args=self",{"2":{"152":1}}],["args=",{"2":{"26":1,"48":1,"241":2}}],["args",{"0":{"21":1,"28":1,"43":1,"50":1,"66":1,"108":1,"154":1,"215":1},"2":{"21":4,"25":1,"26":2,"27":1,"28":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"38":1,"39":1,"43":4,"47":1,"48":2,"49":1,"50":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"60":1,"61":1,"66":4,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":1,"82":1,"83":1,"84":1,"85":1,"87":1,"88":1,"93":1,"94":1,"95":1,"108":2,"111":1,"112":1,"120":1,"121":1,"122":1,"124":1,"125":1,"126":1,"138":1,"152":1,"154":5,"156":1,"158":1,"164":2,"171":1,"173":1,"183":1,"184":1,"188":1,"190":1,"238":1,"239":1,"241":9,"242":9,"243":1,"250":1,"283":1,"284":1,"285":1,"286":1,"287":3,"311":4}}],["abs",{"2":{"243":4}}],["application",{"0":{"254":2},"2":{"250":1}}],["append",{"2":{"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"87":2,"125":2,"189":1,"193":1,"240":1,"241":5}}],["api格式为onebot",{"2":{"311":1}}],["api文档",{"2":{"298":1}}],["api也有差别",{"2":{"298":1}}],["api",{"0":{"298":1},"2":{"243":10,"296":3,"297":2,"311":3}}],["add",{"0":{"154":1,"193":1},"2":{"154":1,"180":1,"193":1,"194":1,"249":1}}],["adapter获取详细信息",{"2":{"3":1}}],["attributes=",{"2":{"241":2}}],["attributes",{"0":{"230":1,"236":1},"2":{"241":2,"242":2}}],["attributeinfo",{"0":{"221":1,"230":1,"236":1},"1":{"222":1,"223":1,"224":1,"225":1},"2":{"241":2}}],["attr",{"0":{"130":1,"131":1,"208":1,"209":1,"210":1,"211":1,"212":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"222":1,"223":1,"224":1,"225":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"254":1,"255":1,"256":1,"257":1,"258":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"269":1,"270":1,"271":1,"272":1,"273":1},"2":{"241":2,"242":14}}],["atexit",{"2":{"21":1,"43":1}}],["assign",{"2":{"241":2}}],["ast",{"2":{"241":29}}],["as",{"2":{"122":1,"239":1,"241":1,"248":1,"284":1}}],["asynchronous",{"2":{"287":2}}],["async=isinstance",{"2":{"241":2}}],["asyncfunctiondef",{"2":{"241":3}}],["async",{"0":{"22":1,"24":1,"44":1,"46":1,"66":2,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":2,"88":1,"89":1,"126":1,"127":1,"152":1,"153":1,"190":1,"202":1,"203":1,"204":1,"220":1,"277":1,"287":1},"2":{"66":3,"86":1,"87":1,"89":1,"116":1,"117":1,"125":1,"126":1,"127":1,"152":1,"195":1,"200":1,"201":1,"203":1,"204":1,"242":4,"277":1,"287":2,"290":2}}],["asyncio",{"2":{"21":2,"23":1,"43":2,"45":1,"66":2,"86":1,"88":2,"126":1,"153":3,"284":5,"290":2}}],["a",{"2":{"84":1,"85":1,"138":3,"243":4,"249":1,"286":2,"302":1}}],["annassign",{"2":{"241":1}}],["annotation",{"2":{"241":6}}],["an",{"2":{"84":1,"93":1}}],["and",{"0":{"201":1},"2":{"83":1,"84":1,"171":1,"201":2,"241":7,"242":1,"249":3,"303":2}}],["any=none",{"2":{"38":1,"39":1,"60":1,"61":1}}],["any",{"0":{"38":2,"39":2,"60":2,"61":2,"83":1,"87":2,"88":1,"97":1,"98":1,"99":1,"103":1,"108":1,"120":1,"121":2,"123":1,"124":1,"126":1,"133":1,"134":1,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":4,"170":1,"183":2,"184":1,"224":1,"266":1,"283":1,"287":1},"2":{"21":1,"38":3,"39":3,"43":1,"60":3,"61":3,"83":1,"87":5,"88":1,"91":1,"92":1,"95":1,"96":1,"97":1,"98":1,"99":1,"103":1,"108":1,"119":3,"120":1,"121":5,"123":4,"124":1,"125":1,"126":1,"133":1,"134":1,"135":1,"136":1,"138":2,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":4,"170":1,"183":3,"184":1,"195":1,"241":7,"243":1,"283":1,"287":1}}],["author",{"0":{"264":1},"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["auto",{"2":{"1":2,"2":1}}],["after",{"0":{"32":1,"33":1,"36":1,"54":1,"55":1,"58":1,"68":1,"70":1,"72":1,"74":1,"76":1,"78":1},"2":{"22":1,"32":2,"33":2,"36":2,"44":1,"54":2,"55":2,"58":2,"65":3,"68":2,"70":2,"72":2,"74":3,"76":3,"78":3,"290":1}}],["await",{"2":{"22":4,"44":4,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"87":2,"89":2,"125":1,"127":2,"152":4,"190":2,"200":2,"201":2,"202":1,"290":1,"296":1,"297":1,"299":1}}],["active和",{"2":{"290":1}}],["active和chan",{"2":{"154":2}}],["active=channel",{"2":{"154":1}}],["active=chan",{"2":{"154":1}}],["active",{"0":{"90":1,"92":1,"149":2},"2":{"27":6,"49":6,"90":1,"119":2,"124":1,"127":1,"149":6,"152":3,"154":4,"290":11}}],["activate激活",{"2":{"12":1}}],["activate来激活虚拟环境",{"2":{"12":1}}],["accesstoken",{"2":{"3":1}}],["access",{"2":{"2":1}}],["already",{"2":{"81":2,"93":1}}],["alive",{"0":{"24":1,"46":1,"158":1},"2":{"22":1,"24":1,"44":1,"46":1,"156":1,"158":2}}],["all",{"0":{"123":1,"136":1,"153":1,"155":1,"157":1},"2":{"21":1,"22":1,"25":1,"26":1,"43":1,"44":1,"47":1,"48":1,"63":1,"79":1,"83":3,"101":1,"109":1,"123":2,"135":1,"136":3,"147":1,"153":1,"155":1,"157":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["allowed",{"0":{"269":1}}],["allow",{"2":{"2":1}}],["alconna提供的命令解析功能",{"2":{"10":1}}],["alconna是否自动补全指令",{"2":{"2":1}}],["alconna",{"2":{"2":1}}],["高级nonebot配置",{"2":{"2":1}}],["以上内容仅用于项目的优化",{"2":{"309":1}}],["以避免出现无法预料的问题",{"2":{"307":1}}],["以避免依赖冲突",{"2":{"12":1}}],["以下我们会编写一个简单的插件",{"2":{"303":1}}],["以下为默认值",{"2":{"2":1}}],["以前的最外层配置项仍可为nonebot服务",{"2":{"1":1}}],["period\`",{"2":{"320":1}}],["period>",{"2":{"319":1}}],["period",{"2":{"319":2}}],["poke",{"2":{"297":4}}],["port",{"2":{"1":1}}],["page为页数",{"2":{"313":2}}],["page",{"2":{"313":2}}],["pacman",{"0":{"313":1},"1":{"314":1}}],["pack",{"2":{"308":2,"313":3}}],["param",{"2":{"310":1}}],["parts",{"2":{"286":2}}],["parent",{"2":{"241":4}}],["parse",{"2":{"241":1}}],["pass",{"2":{"112":1,"113":1,"114":1}}],["passive=channel",{"2":{"154":1}}],["passive=chan",{"2":{"154":1}}],["passive",{"0":{"149":2},"2":{"93":1,"95":1,"96":2,"97":2,"98":2,"99":1,"119":2,"120":1,"121":1,"122":1,"123":1,"132":1,"133":2,"134":2,"135":2,"136":1,"149":6,"154":6,"290":13}}],["pathlib",{"2":{"248":1}}],["paths=none",{"2":{"243":1}}],["paths",{"0":{"243":1},"2":{"243":5}}],["path=dot",{"2":{"241":1}}],["path",{"0":{"173":2,"233":1,"238":3,"241":1,"244":1,"248":2,"286":3},"2":{"6":3,"13":1,"15":1,"142":1,"143":2,"173":5,"238":10,"239":3,"240":1,"241":7,"243":22,"244":2,"248":19,"249":26,"286":12,"303":5}}],["publish=publish",{"2":{"154":1}}],["publish",{"0":{"91":1,"124":1,"149":1},"2":{"91":1,"119":2,"124":2,"127":2,"149":3}}],["profile",{"2":{"315":4}}],["property",{"0":{"212":2},"2":{"241":2}}],["processes",{"2":{"25":1,"27":1,"47":1,"49":1,"151":1,"152":1,"156":2,"158":1}}],["processmanager",{"0":{"150":1},"1":{"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1},"2":{"21":2,"43":2}}],["process",{"0":{"27":1,"34":1,"35":1,"49":1,"56":1,"57":1,"66":1,"69":1,"71":1,"75":1,"77":1,"152":1,"158":1},"2":{"21":2,"22":1,"26":1,"27":4,"34":2,"35":2,"37":2,"43":2,"44":1,"48":1,"49":4,"56":2,"57":2,"59":2,"65":2,"66":1,"69":2,"71":2,"75":2,"77":2,"81":4,"87":3,"88":1,"93":1,"95":1,"96":1,"120":1,"121":1,"122":1,"123":1,"125":3,"127":2,"151":1,"152":14,"153":1,"155":2,"156":7,"158":2,"290":8,"303":2}}],["priority",{"0":{"188":1,"194":1,"195":1},"2":{"188":5,"193":2,"194":2,"195":2}}],["private",{"0":{"241":1},"2":{"183":2,"241":6}}],["print",{"0":{"40":1,"62":1},"2":{"21":1,"40":2,"43":1,"62":2,"86":2,"190":1,"243":1,"248":1}}],["pwd",{"2":{"13":3}}],["p",{"2":{"13":1,"320":1}}],["platform",{"2":{"26":3,"48":3}}],["playwright安装失败",{"2":{"6":1}}],["plugintype",{"0":{"250":1,"253":1,"263":2},"1":{"254":1,"255":1,"256":1,"257":1,"258":1},"2":{"250":5,"302":1}}],["pluginmetadata",{"0":{"259":1,"273":1},"1":{"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1},"2":{"248":4,"302":2}}],["plugin\`",{"2":{"248":1}}],["plugin\`的函数签名",{"2":{"173":1}}],["plugin的函数签名",{"2":{"173":1}}],["plugin进行通信",{"2":{"8":1}}],["plugin",{"0":{"172":1,"245":1,"246":1,"247":1,"248":2,"249":2,"250":1,"251":1,"252":1,"267":1,"274":1,"275":1,"278":1,"280":1},"1":{"173":1,"246":1,"248":1,"249":1,"250":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":2,"269":2,"270":2,"271":2,"272":2,"273":2,"275":1,"279":1,"281":1},"2":{"1":1,"10":1,"21":2,"43":2,"172":1,"246":3,"248":15,"249":6,"250":5,"275":3,"279":6,"281":6,"302":4,"305":1,"306":2,"313":5}}],["plugins下创建一个文件",{"2":{"306":1}}],["plugins中添加你的插件路径",{"2":{"305":1}}],["plugins",{"0":{"173":1,"246":1,"249":1,"275":1,"276":1,"278":1,"279":1,"280":1,"281":1},"1":{"277":1,"279":1,"281":1},"2":{"1":1,"21":1,"43":1,"173":6,"246":2,"248":3,"249":9,"275":2,"279":4,"281":4,"303":1,"306":2}}],["py即可启动插件",{"2":{"306":1}}],["pyo",{"2":{"303":1}}],["pycache",{"2":{"303":1}}],["pyc",{"2":{"303":1}}],["pycharm",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["py文件",{"2":{"302":1}}],["py文件或一个包含",{"2":{"302":1}}],["py的文件夹即可被识别为插件",{"2":{"302":1}}],["pyfile",{"0":{"244":1},"2":{"243":8,"244":1}}],["pyi",{"2":{"240":1,"241":1}}],["py",{"2":{"12":1,"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":2,"186":1,"191":2,"192":1,"196":1,"205":1,"206":1,"240":1,"241":1,"243":1,"247":1,"249":3,"251":1,"252":1,"276":1,"278":2,"280":2,"293":1,"302":1,"303":1,"306":2,"308":1}}],["py来启动bot",{"2":{"6":1}}],["python格式",{"2":{"295":1}}],["pythonfrom",{"2":{"290":1,"293":1,"302":1,"306":1}}],["pythonimport",{"2":{"290":1,"303":1}}],["pythonasync",{"2":{"22":1,"24":1,"44":1,"46":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"86":1,"88":1,"89":1,"127":1,"152":1,"153":1,"190":1,"202":1}}],["pythondef",{"2":{"21":1,"23":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"43":1,"45":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"65":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"81":1,"82":1,"83":1,"84":1,"85":1,"87":1,"93":1,"94":1,"95":1,"96":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"149":1,"151":1,"154":1,"155":1,"156":1,"157":1,"158":1,"164":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"179":1,"180":1,"183":1,"184":1,"188":1,"189":1,"193":1,"194":1,"195":1,"199":1,"200":1,"201":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"246":1,"248":1,"249":1,"250":1,"268":1,"275":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1}}],["python为你的python可执行文件路径",{"2":{"15":1}}],["python3",{"2":{"12":1}}],["python是你要用来运行bot的可执行文件",{"2":{"6":1}}],["python",{"2":{"6":2,"12":1,"15":1,"66":1,"97":1,"98":1,"99":1,"126":1,"129":1,"133":1,"134":1,"135":1,"136":1,"166":1,"203":1,"204":1,"241":2,"277":1}}],["pipe",{"2":{"81":2}}],["pip",{"2":{"6":1,"12":1,"15":1,"248":1}}],["pip和python不对应怎么办",{"2":{"6":1}}],["utils",{"0":{"282":1},"1":{"283":1,"284":1,"285":1,"286":1,"287":1}}],["utf",{"2":{"139":1,"140":1,"141":1,"239":1,"241":1}}],["usage",{"0":{"262":1}}],["user",{"0":{"183":1,"315":1},"2":{"183":3,"184":2,"204":1,"297":3}}],["used",{"2":{"87":1}}],["use",{"2":{"1":1,"39":1,"61":1,"248":1}}],["unload",{"2":{"313":1,"314":1}}],["uninstall",{"2":{"313":1,"314":1}}],["uninstall卸载问题插件",{"2":{"6":1}}],["until",{"2":{"284":2}}],["unclassified",{"0":{"257":2,"263":1}}],["unparse",{"2":{"241":10}}],["unknown",{"2":{"152":1}}],["unsupported",{"2":{"142":1}}],["update",{"2":{"1":1,"2":1,"142":3,"143":1,"144":1,"311":1,"312":1,"313":1,"314":1}}],["某些控制台字体不可用",{"2":{"1":1}}],["the",{"2":{"248":1}}],["thread",{"0":{"285":1},"2":{"26":1,"48":1,"285":2}}],["threading",{"0":{"131":1},"2":{"21":1,"26":1,"43":1,"48":1,"285":1}}],["test",{"0":{"258":2},"2":{"250":1}}],["text",{"2":{"242":3}}],["terminated",{"2":{"156":1}}],["terminate",{"0":{"156":1,"157":1},"2":{"21":1,"26":1,"43":1,"48":1,"152":2,"156":2,"157":2}}],["types",{"0":{"269":1}}],["type=plugintype",{"2":{"302":1}}],["type=attr",{"2":{"241":1}}],["type=ast",{"2":{"241":3}}],["type=def",{"2":{"241":1}}],["type=deftype",{"2":{"241":1}}],["type=self",{"2":{"184":2}}],["typealias",{"2":{"162":1,"163":1,"197":1}}],["typeerror",{"2":{"81":1,"84":1,"93":1}}],["type",{"0":{"81":1,"82":2,"83":1,"183":2,"216":1,"219":1,"223":1,"250":1,"263":1},"2":{"81":12,"82":4,"83":2,"84":7,"93":1,"183":9,"184":2,"241":11,"242":13,"248":2,"250":5}}],["target",{"0":{"154":3,"238":1},"2":{"154":6,"238":4,"241":5}}],["target=run",{"2":{"285":1}}],["target=self",{"2":{"152":1}}],["target=os",{"2":{"26":1,"48":1}}],["targets",{"2":{"151":1,"152":4,"153":1,"154":1,"155":1,"157":1,"158":1,"241":2}}],["task",{"2":{"88":2,"126":1,"153":5}}],["tasks",{"2":{"66":2}}],["tuple=",{"2":{"154":1}}],["tuple",{"0":{"39":1,"61":1,"97":1,"98":1,"99":1,"108":1,"133":1,"134":1,"135":1,"136":1,"149":2,"154":1,"171":1,"215":1},"2":{"39":1,"61":1,"83":2,"91":1,"97":1,"98":1,"99":1,"108":1,"119":3,"133":1,"134":1,"135":1,"136":1,"149":2,"151":2,"171":1}}],["title",{"2":{"243":2}}],["time>",{"2":{"296":1}}],["timeout",{"2":{"156":1}}],["time",{"2":{"24":1,"26":1,"46":1,"48":1,"63":1,"79":1,"101":1,"109":1,"147":1,"164":9,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["tip",{"2":{"12":1,"13":1,"299":1,"308":1,"310":1}}],["t",{"0":{"80":1,"84":1,"85":1,"86":1,"87":2},"1":{"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1},"2":{"13":1,"37":1,"59":1,"84":1,"85":1,"86":1,"87":5}}],["txt",{"2":{"12":1}}],["txt来安装依赖",{"2":{"6":1,"15":1}}],["tree",{"2":{"241":3}}],["traceback",{"2":{"190":1,"248":1}}],["try",{"2":{"23":1,"24":1,"45":1,"46":1,"122":1,"190":1,"248":1,"284":1}}],["trss",{"2":{"8":1,"14":1}}],["true时例如docs",{"2":{"243":2}}],["true下启动轻雪",{"2":{"6":1}}],["true",{"0":{"122":1,"171":1,"241":1,"249":1,"269":1},"2":{"1":3,"2":1,"85":1,"89":1,"127":1,"152":1,"180":1,"202":1,"203":1,"243":1,"290":2}}],["tokyo",{"2":{"317":1}}],["token",{"2":{"2":1}}],["top",{"0":{"243":1},"2":{"243":4}}],["toml",{"0":{"141":1},"2":{"141":5,"142":2,"144":1}}],["toml和config目录下的所有配置文件",{"2":{"0":1}}],["to",{"0":{"239":1,"286":1},"2":{"6":3,"13":1,"15":2,"84":1,"239":1,"243":1,"248":7,"249":2,"286":2}}],["image",{"2":{"311":2,"312":1}}],["implemented",{"2":{"166":1}}],["import",{"2":{"132":1,"248":1,"290":5,"293":1,"302":2,"303":3,"306":1}}],["iter",{"2":{"241":2}}],["items",{"2":{"94":1,"138":2,"239":1,"242":1,"243":1}}],["i",{"2":{"193":2,"290":6}}],["ignored",{"0":{"243":1},"2":{"152":1,"243":8}}],["ignore",{"0":{"122":1,"241":1,"249":1},"2":{"122":4,"241":6,"243":1,"249":6}}],["id仅超级用户可用",{"2":{"311":1}}],["id=user",{"2":{"297":2}}],["id=1234567",{"2":{"311":2}}],["id=123456",{"2":{"297":1}}],["id=self",{"2":{"184":3}}],["id",{"0":{"183":3},"2":{"87":5,"88":4,"183":11,"184":3,"204":1,"241":6,"297":2,"311":2,"313":1,"319":4}}],["ids",{"2":{"81":2,"87":2,"88":2,"89":1}}],["if",{"2":{"26":2,"27":1,"37":2,"39":2,"48":2,"49":1,"59":2,"61":2,"66":1,"81":5,"82":1,"83":4,"84":3,"85":1,"87":6,"88":1,"89":1,"93":3,"95":1,"96":1,"120":1,"121":1,"122":3,"123":1,"125":5,"127":2,"129":2,"138":1,"139":1,"140":1,"141":1,"142":2,"143":3,"152":2,"154":1,"156":2,"158":1,"164":1,"171":1,"179":1,"180":5,"183":1,"184":1,"190":1,"193":1,"202":1,"239":1,"240":1,"241":20,"242":10,"243":4,"248":2,"249":9,"283":2,"284":1,"286":1}}],["isclass",{"2":{"283":1}}],["iscoroutinefunction",{"2":{"283":2}}],["isroutine",{"2":{"283":1}}],["isfile",{"2":{"249":1,"303":1}}],["isdir",{"2":{"249":2}}],["isinstance",{"2":{"83":8,"93":1,"138":1,"241":13,"248":1,"290":1}}],["is",{"0":{"158":1,"204":1,"220":1,"283":1},"2":{"21":1,"23":1,"24":2,"27":1,"37":2,"43":1,"45":1,"46":2,"49":1,"59":2,"66":1,"81":6,"84":1,"87":5,"88":1,"89":1,"93":1,"95":1,"96":1,"119":2,"120":1,"121":1,"122":1,"123":1,"125":3,"127":1,"129":2,"139":1,"140":1,"141":1,"154":1,"156":1,"158":2,"171":1,"183":1,"202":1,"204":1,"241":2,"242":2,"243":1,"248":1,"249":2,"283":1,"284":1}}],["index",{"2":{"242":2,"243":1,"308":1}}],["inherit=",{"2":{"241":1}}],["inherit",{"0":{"231":1},"2":{"242":5}}],["inspect",{"2":{"283":4,"287":1}}],["insert",{"2":{"193":1}}],["instead",{"2":{"39":1,"61":1}}],["instance",{"0":{"129":1,"130":1},"2":{"21":2,"37":4,"43":2,"59":4,"84":1,"93":1,"129":5}}],["install安装浏览器",{"2":{"6":1}}],["install",{"2":{"6":1,"12":1,"15":1,"310":1,"313":1,"314":1}}],["inner",{"2":{"81":2}}],["in",{"0":{"144":1,"285":1},"2":{"27":1,"37":1,"39":3,"49":1,"59":1,"61":3,"66":1,"81":5,"83":4,"86":1,"87":1,"88":2,"93":1,"94":1,"122":1,"125":3,"126":1,"127":1,"138":2,"142":1,"143":2,"144":1,"152":1,"153":3,"155":1,"156":1,"157":1,"158":1,"171":1,"173":1,"190":1,"193":1,"195":2,"204":1,"239":1,"240":2,"241":13,"242":9,"243":5,"249":2,"279":2,"281":2,"284":2,"285":1,"303":1}}],["int=0",{"2":{"26":1,"48":1,"194":1,"195":1}}],["int",{"0":{"26":1,"48":1,"188":1,"194":1,"195":1},"2":{"65":1,"81":2,"188":1}}],["initialized",{"2":{"37":1,"59":1,"81":2}}],["initializing",{"2":{"21":1,"43":1}}],["init",{"0":{"21":1,"28":1,"29":1,"43":1,"50":1,"51":1,"65":1,"81":1,"103":1,"107":1,"111":1,"119":1,"149":1,"151":1,"180":1,"183":1,"188":1,"199":1},"2":{"21":2,"28":2,"29":2,"43":2,"50":2,"51":2,"65":1,"81":1,"103":1,"107":1,"111":1,"119":1,"149":1,"151":1,"180":1,"183":1,"185":1,"188":1,"191":1,"199":1,"241":1,"243":2,"249":2,"278":1,"280":1,"286":1,"302":3}}],["info",{"0":{"241":1,"242":1},"2":{"1":1,"21":1,"23":1,"24":1,"25":1,"26":1,"43":1,"45":1,"46":1,"47":1,"48":1,"152":2,"180":3,"241":12,"242":6,"243":5,"290":2}}],["icon=f",{"2":{"180":5}}],["icon",{"2":{"1":1,"180":7,"242":2,"243":2}}],["日志等级",{"2":{"1":1}}],["lt",{"2":{"310":1,"311":7,"313":10,"315":2}}],["lyf结尾",{"2":{"295":1}}],["lyfunction语法",{"2":{"311":1}}],["lyfunction",{"2":{"295":1}}],["len",{"2":{"83":2,"89":1}}],["level=0",{"2":{"180":1}}],["level",{"0":{"179":1},"2":{"1":1,"179":2,"180":6}}],["locks",{"2":{"122":1}}],["lock",{"0":{"131":2},"2":{"120":3,"121":3,"122":3,"129":1}}],["loaded",{"0":{"246":1,"275":1},"2":{"246":1,"275":1}}],["loader",{"0":{"278":1,"279":1,"280":1,"281":1},"1":{"279":1,"281":1},"2":{"21":1,"43":1,"279":1,"281":1}}],["loading",{"2":{"139":1,"140":1,"141":1}}],["load",{"0":{"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"247":1,"248":1,"249":1},"1":{"248":1,"249":1,"250":1},"2":{"21":1,"43":1,"139":4,"140":4,"141":4,"142":4,"143":2,"144":3,"173":3,"247":1,"248":3,"249":2,"279":2,"281":2,"313":1,"314":1}}],["loop",{"0":{"89":1,"127":1},"2":{"21":4,"30":1,"43":4,"52":1,"66":2,"81":1,"86":3,"89":3,"119":2,"127":2,"153":2,"284":10}}],["log0000",{"2":{"290":1}}],["logger",{"0":{"29":1,"51":1},"2":{"21":1,"23":1,"24":1,"25":1,"26":1,"28":1,"29":1,"39":1,"43":1,"45":1,"46":1,"47":1,"48":1,"50":1,"51":1,"61":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":2,"89":2,"139":1,"140":1,"141":1,"142":2,"143":1,"152":3,"156":2,"158":1,"180":7,"248":3,"249":3,"284":1,"290":3,"303":2}}],["logo",{"0":{"40":1,"62":1},"2":{"21":1,"40":1,"43":1,"62":1}}],["log",{"0":{"178":1,"180":1},"1":{"179":1,"180":1},"2":{"1":2,"29":1,"51":1,"178":1,"180":3,"290":1}}],["liteecho",{"0":{"276":1,"277":1},"1":{"277":1},"2":{"276":2,"277":2,"311":1}}],["liteyukiexception",{"0":{"175":1}}],["liteyuki轻雪机器人管理脚本",{"2":{"14":1}}],["liteyukibot代替$",{"2":{"13":1}}],["liteyukibot",{"0":{"20":1,"37":1,"42":1,"59":1},"1":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1},"2":{"12":2,"13":5,"26":1,"37":3,"48":1,"59":3,"173":1}}],["liteyukistudio",{"2":{"12":1,"13":1,"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["liteyuki",{"0":{"17":1,"19":1,"41":1,"63":1,"79":1,"100":1,"101":1,"104":1,"105":1,"109":1,"115":1,"137":1,"145":1,"146":1,"147":1,"159":1,"160":1,"161":1,"172":1,"174":1,"176":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"245":1,"247":1,"251":1,"252":1,"274":1,"276":1,"278":1,"280":1,"282":1,"313":1},"1":{"18":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"102":1,"103":1,"106":1,"107":1,"108":1,"110":1,"111":1,"112":1,"113":1,"114":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"173":1,"175":1,"177":1,"179":1,"180":1,"182":1,"183":1,"184":1,"187":1,"188":1,"189":1,"190":1,"193":1,"194":1,"195":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"246":1,"248":1,"249":1,"250":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"275":1,"277":1,"279":1,"281":1,"283":1,"284":1,"285":1,"286":1,"287":1,"314":1},"2":{"1":2,"2":1,"21":2,"23":1,"24":1,"37":1,"43":2,"45":1,"46":1,"59":1,"173":2,"248":5,"279":3,"281":3,"290":12,"293":2,"294":1,"302":1,"303":4,"306":1,"307":1,"311":4,"312":3}}],["listdir",{"2":{"143":1,"249":2}}],["list",{"0":{"66":1,"183":1,"195":1,"215":1,"229":1,"230":1,"231":1,"234":1,"235":1,"236":1,"240":1},"2":{"65":6,"66":1,"81":2,"83":2,"116":1,"117":1,"183":1,"188":1,"193":3,"195":1,"240":4,"241":4,"243":3,"311":1,"313":2,"314":1}}],["life",{"2":{"65":1}}],["lifespan=self",{"2":{"21":1,"43":1}}],["lifespan",{"0":{"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"63":1,"64":1,"66":2,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"151":2},"1":{"64":1,"65":2,"66":2,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"73":2,"74":2,"75":2,"76":2,"77":2,"78":2},"2":{"21":3,"22":2,"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"43":3,"44":2,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"63":1,"65":6,"66":2,"67":4,"68":4,"69":4,"70":4,"71":4,"72":4,"151":4,"152":3}}],["linux系统要支持python3",{"2":{"15":1}}],["linux",{"2":{"14":1,"26":1,"48":1}}],["linux下使用source",{"2":{"12":1}}],["llonebot",{"2":{"8":1}}],["laptop",{"2":{"243":2}}],["lang",{"0":{"242":1,"243":1},"2":{"242":4,"243":3}}],["language",{"2":{"2":1}}],["last",{"2":{"164":4}}],["lambda",{"2":{"132":1,"133":2,"134":2,"135":2,"136":1}}],["lagrange",{"2":{"8":1}}],["写在外层的配置项将会被覆盖",{"2":{"1":1}}],["switch",{"2":{"311":2,"312":1}}],["simple",{"2":{"302":1}}],["signature",{"2":{"287":2}}],["signal",{"2":{"21":6,"25":1,"43":6,"47":1}}],["signum",{"0":{"25":1,"47":1},"2":{"25":3,"47":3}}],["sigterm",{"2":{"21":1,"43":1}}],["sigint",{"2":{"21":1,"43":1}}],["sync",{"2":{"287":2}}],["system",{"0":{"171":1},"2":{"26":4,"48":4,"171":1,"303":2}}],["sys",{"2":{"25":1,"26":3,"47":1,"48":3,"180":1}}],["src",{"2":{"279":1,"281":1,"303":5}}],["specified",{"2":{"248":1}}],["split",{"2":{"248":4}}],["schedule",{"2":{"171":1}}],["scripts部署",{"0":{"14":1}}],["scripts",{"2":{"12":1}}],["sm",{"2":{"153":2}}],["source",{"0":{"218":1},"2":{"241":2,"242":6}}],["sockschannel",{"0":{"110":1},"1":{"111":1,"112":1,"113":1,"114":1}}],["socks",{"0":{"109":1},"1":{"110":1,"111":1,"112":1,"113":1,"114":1}}],["software",{"2":{"63":1,"79":1,"101":1,"109":1,"147":1,"172":1,"178":1,"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1,"247":1,"251":1,"252":1,"276":1,"278":1,"280":1}}],["s",{"2":{"83":2}}],["shinjuku",{"2":{"317":1}}],["shellstatistic",{"2":{"319":1}}],["shellbind",{"2":{"317":1}}],["shellweather",{"2":{"317":1}}],["shellmain",{"2":{"308":1}}],["shellvar",{"2":{"296":1}}],["shellcmd",{"2":{"295":1}}],["shell",{"2":{"295":1,"297":1}}],["shutil",{"2":{"243":1}}],["shutdown",{"0":{"33":1,"34":1,"55":1,"56":1,"69":1,"70":1,"75":1,"76":1},"2":{"33":2,"34":2,"55":2,"56":2,"65":2,"69":2,"70":2,"75":3,"76":3,"152":2}}],["show",{"2":{"180":6}}],["should",{"2":{"81":1}}],["shared",{"2":{"119":3,"132":1,"133":3,"134":3,"135":3,"136":2,"153":1,"154":1,"293":3}}],["snowykami",{"2":{"63":2,"79":2,"101":2,"109":2,"147":2,"172":2,"178":2,"181":2,"185":2,"186":2,"191":2,"192":2,"196":2,"205":2,"206":2,"247":2,"251":2,"252":2,"276":2,"278":2,"280":2}}],["succeeded",{"2":{"248":1}}],["success",{"2":{"156":1,"180":2,"248":2}}],["summary>",{"2":{"242":3}}],["summary>源代码",{"2":{"242":1}}],["su",{"0":{"204":1},"2":{"204":1,"276":1,"277":1}}],["supported",{"2":{"143":1}}],["superusers",{"2":{"1":1,"204":1}}],["subscribe",{"2":{"125":1}}],["subscriber",{"0":{"116":1,"117":1,"125":1,"126":1},"2":{"125":7,"126":2,"127":1}}],["sub",{"0":{"117":1},"2":{"37":1,"59":1,"81":2,"87":1,"88":1,"119":1,"125":4,"127":1}}],["sleep",{"2":{"24":1,"26":1,"46":1,"48":1,"290":1,"296":1,"297":1}}],["style",{"2":{"308":2}}],["stem",{"2":{"286":2}}],["stdout",{"2":{"180":1}}],["store",{"2":{"119":1,"120":1,"121":1,"122":2,"123":1}}],["storage",{"0":{"115":1},"1":{"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1},"2":{"100":2,"104":2,"293":2}}],["stopping",{"2":{"23":1,"24":1,"25":1,"45":1,"46":1,"47":1,"152":1}}],["stop",{"0":{"30":1,"52":1},"2":{"21":1,"24":2,"25":1,"30":3,"43":1,"46":2,"47":1,"52":3}}],["stat",{"2":{"320":1}}],["statistic",{"2":{"320":1}}],["statistics",{"0":{"319":1},"1":{"320":1}}],["static",{"0":{"210":1},"2":{"241":1}}],["staticmethod",{"0":{"210":1},"2":{"65":1,"66":1,"125":1,"126":1,"241":1}}],["status",{"2":{"311":1,"312":1}}],["startup",{"2":{"290":2}}],["startswith",{"2":{"241":3,"276":1,"277":1}}],["starting",{"2":{"89":1}}],["start或superusers",{"2":{"6":1}}],["start保证alconna解析正常",{"2":{"1":1}}],["start",{"0":{"31":1,"32":1,"53":1,"54":1,"67":1,"68":1,"73":1,"74":1,"89":1,"127":1,"153":1},"2":{"1":1,"22":3,"26":2,"31":2,"32":2,"44":3,"48":2,"53":2,"54":2,"65":2,"67":2,"68":2,"73":3,"74":3,"89":1,"127":2,"152":4,"153":3,"285":1,"290":1}}],["strip",{"2":{"277":2}}],["str=",{"2":{"242":1,"243":1}}],["structure",{"0":{"83":2},"2":{"83":17,"84":1}}],["str",{"0":{"27":1,"38":1,"39":2,"49":1,"60":1,"61":2,"81":1,"93":1,"94":1,"95":1,"96":1,"97":2,"98":2,"99":2,"103":2,"111":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"133":2,"134":2,"135":2,"136":2,"138":2,"139":2,"140":2,"141":2,"142":2,"143":2,"144":1,"149":2,"152":1,"154":1,"156":1,"158":1,"171":1,"173":1,"179":2,"183":9,"184":2,"195":1,"214":1,"215":2,"216":1,"217":1,"218":1,"222":1,"223":1,"225":1,"227":1,"228":1,"231":1,"233":1,"237":1,"238":3,"239":2,"240":1,"241":1,"242":2,"243":3,"246":1,"248":1,"249":1,"250":2,"260":1,"261":1,"262":1,"264":1,"265":1,"266":1,"270":1,"272":1,"275":1,"286":1},"2":{"21":1,"27":1,"38":1,"39":2,"43":1,"49":1,"60":1,"61":2,"81":2,"91":2,"93":1,"94":1,"95":1,"96":2,"97":2,"98":2,"99":2,"103":2,"111":1,"116":1,"117":1,"119":5,"120":1,"121":1,"122":1,"123":4,"124":1,"125":1,"126":1,"133":2,"134":2,"135":2,"136":2,"138":2,"139":2,"140":2,"141":2,"142":2,"143":2,"144":1,"149":2,"151":2,"152":1,"154":1,"156":1,"158":1,"171":1,"173":1,"179":2,"183":11,"184":2,"195":1,"204":1,"238":3,"239":2,"240":1,"241":1,"242":1,"243":4,"246":3,"248":1,"249":1,"250":4,"275":3,"286":3,"290":1}}],["search",{"2":{"313":1,"314":1}}],["service",{"0":{"255":2},"2":{"250":1,"302":1}}],["server",{"2":{"15":1}}],["sep",{"2":{"241":3}}],["session",{"0":{"183":2,"205":1},"2":{"183":8,"184":5,"205":1}}],["send",{"0":{"84":1,"112":1},"2":{"27":2,"49":2,"81":2,"84":4,"93":1,"95":1,"96":1,"98":1,"99":1,"111":1,"112":1,"120":1,"121":1,"122":1,"123":1,"124":1,"127":1,"133":1,"136":1,"184":1,"290":3,"311":1}}],["set",{"0":{"93":1,"94":1,"97":1,"120":1,"134":1,"249":1},"2":{"21":1,"24":1,"30":1,"43":1,"46":1,"52":1,"81":1,"93":2,"94":2,"96":1,"97":3,"120":2,"133":1,"134":3,"249":2,"284":1,"293":1,"311":2,"312":1,"315":2}}],["self",{"0":{"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"65":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"103":1,"107":1,"108":1,"111":1,"112":1,"113":1,"114":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"127":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"166":1,"167":1,"168":1,"169":1,"170":1,"183":1,"184":1,"188":1,"189":1,"190":1,"199":1,"200":1,"201":1,"202":1,"268":1},"2":{"21":14,"22":5,"23":2,"24":3,"25":2,"26":4,"27":2,"28":2,"29":1,"30":3,"31":2,"32":2,"33":2,"34":2,"35":2,"36":2,"43":14,"44":5,"45":2,"46":3,"47":2,"48":4,"49":2,"50":2,"51":1,"52":3,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"65":8,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"73":3,"74":3,"75":3,"76":3,"77":3,"78":3,"81":14,"82":3,"83":4,"84":6,"85":3,"86":2,"87":3,"88":3,"89":8,"103":3,"107":2,"108":2,"111":5,"112":1,"113":1,"114":1,"119":7,"120":3,"121":3,"122":4,"123":3,"124":2,"125":1,"127":4,"149":6,"151":4,"152":8,"153":3,"154":2,"155":2,"156":3,"157":3,"158":3,"166":1,"167":2,"168":2,"169":2,"170":2,"183":10,"184":3,"188":5,"189":2,"190":3,"199":2,"200":2,"201":2,"202":3,"241":1,"242":1,"268":2}}],["safe",{"2":{"2":1,"139":1}}],["num为每页显示数量",{"2":{"313":2}}],["num",{"2":{"313":2}}],["npm",{"2":{"313":7,"314":1}}],["nliteyuki",{"2":{"295":1}}],["n\`\`\`",{"2":{"242":2}}],["n\`\`\`python",{"2":{"242":2}}],["n",{"2":{"40":10,"62":10,"242":52,"243":2}}],["name>",{"2":{"296":2}}],["name=module",{"2":{"248":3}}],["name=target",{"2":{"241":2}}],["name=class",{"2":{"241":1}}],["name=node",{"2":{"241":2}}],["name=f",{"2":{"154":2}}],["name=",{"2":{"90":1,"91":1,"119":3,"302":1}}],["name",{"0":{"27":1,"49":1,"81":1,"93":1,"95":1,"103":1,"111":1,"152":1,"154":1,"156":1,"158":1,"214":1,"222":1,"227":1,"244":1,"250":2,"260":1,"270":1,"272":1,"286":1},"2":{"27":7,"49":7,"81":12,"89":2,"93":8,"94":2,"95":6,"97":3,"98":3,"103":3,"111":5,"152":14,"153":2,"154":6,"155":1,"156":7,"157":2,"158":6,"241":11,"242":7,"243":2,"248":20,"249":9,"250":7,"268":1,"286":1,"290":2,"311":4,"313":8}}],["new",{"2":{"21":1,"43":1,"138":3,"284":1}}],["nodes",{"2":{"241":2}}],["node",{"2":{"241":42}}],["node等进程",{"2":{"15":1}}],["normal",{"0":{"241":1},"2":{"241":1,"243":1}}],["normal>",{"2":{"180":1}}],["nonlocal",{"2":{"164":1}}],["nonedog",{"2":{"302":1}}],["none",{"0":{"21":1,"27":1,"38":1,"39":1,"43":1,"49":1,"60":1,"61":1,"65":1,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":1,"87":1,"107":1,"120":1,"121":1,"122":1,"124":1,"130":1,"154":1,"171":1,"183":2,"190":1,"224":1,"242":1,"243":1,"273":1},"2":{"21":1,"27":1,"37":1,"43":1,"49":1,"59":1,"65":1,"66":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"81":3,"82":1,"84":1,"86":1,"87":1,"107":1,"111":2,"120":1,"122":1,"124":1,"129":2,"139":1,"140":1,"141":1,"154":1,"162":1,"164":1,"171":1,"183":1,"190":1,"197":2,"202":1,"241":3,"243":1,"248":4,"249":1,"283":1}}],["nonebot2提供的框架支持",{"2":{"10":1}}],["nonebot",{"2":{"2":1,"10":1,"282":1,"290":3,"302":1,"303":4,"306":1}}],["nonebot机器人的配置",{"2":{"1":1}}],["no",{"0":{"142":1,"143":1,"144":1,"214":1,"215":1,"216":1,"217":1,"219":1,"220":1,"222":1,"223":1,"227":1,"228":1,"229":1,"230":1,"231":1,"233":1,"234":1,"235":1,"236":1,"237":1,"244":1,"260":1,"270":1,"271":1,"272":1},"2":{"89":1,"92":1,"142":3,"143":3,"144":3,"241":3,"242":1,"243":2}}],["nohup",{"2":{"26":2,"48":2,"296":1,"297":1}}],["notimplementederror",{"2":{"166":1}}],["not",{"2":{"24":1,"27":1,"37":1,"46":1,"49":1,"59":1,"81":1,"83":3,"84":2,"87":4,"89":1,"93":1,"122":1,"125":3,"127":1,"139":1,"140":1,"141":1,"142":3,"143":3,"152":2,"156":2,"158":2,"171":2,"190":1,"239":1,"241":8,"248":1,"249":8,"303":2}}],["ntqq的onebot插件",{"2":{"8":1}}],["nickname",{"2":{"1":1}}],["若不存在则返回空",{"2":{"311":1}}],["若不存在则创建于config",{"2":{"311":1}}],["若存在则返回",{"2":{"311":1}}],["若存在则覆盖",{"2":{"311":1}}],["若存在则会覆盖",{"2":{"311":1}}],["若你不希望提供这些信息",{"2":{"309":1}}],["若你修改了端口号请将20216",{"2":{"13":1}}],["若要戳20s后停止",{"2":{"297":1}}],["若要接收外部请求请填写0",{"2":{"1":1}}],["若函数中启动了其他task",{"2":{"296":1}}],["若有子进程订阅则推送给子进程",{"2":{"127":2}}],["若有困难请联系对应开发者而不是liteyuki的开发者",{"2":{"9":1}}],["若为空",{"2":{"81":2}}],["若没有metadata",{"2":{"308":1}}],["若没有",{"2":{"1":1}}],["14s",{"2":{"319":2}}],["1h",{"2":{"319":2}}],["1d",{"2":{"319":2}}],["1145141919810",{"2":{"311":1}}],["11",{"2":{"278":1,"280":1}}],["19",{"2":{"181":1,"185":1,"186":1,"191":1,"192":1,"196":1,"205":1,"206":1}}],["1919810",{"2":{"1":1}}],["18",{"2":{"172":1}}],["12",{"2":{"147":1,"178":1}}],["127",{"2":{"1":1,"3":1}}],["10",{"2":{"18":1,"177":1,"311":1}}],["10+",{"2":{"12":1,"15":1}}],["1",{"2":{"1":1,"2":1,"3":2,"26":2,"27":2,"48":2,"49":2,"87":1,"97":2,"98":2,"99":1,"127":2,"133":3,"134":2,"135":1,"136":1,"137":1,"138":3,"152":2,"165":1,"166":1,"242":6,"243":1,"248":4,"286":2,"302":1,"308":2}}],["03",{"2":{"290":2}}],["0000",{"2":{"290":3}}],["00",{"2":{"290":18}}],["02",{"2":{"252":1,"278":1,"280":1}}],["04",{"2":{"172":1}}],["04+",{"2":{"15":1}}],["0m",{"2":{"40":1,"62":1}}],["0",{"0":{"26":1,"48":1,"194":1,"195":1},"2":{"1":5,"3":4,"21":1,"24":1,"25":1,"26":1,"43":1,"46":1,"47":1,"48":1,"65":1,"82":1,"83":1,"89":1,"96":1,"97":2,"98":2,"99":1,"127":1,"132":2,"133":2,"134":2,"135":2,"136":1,"152":2,"188":2,"241":1,"242":7,"297":1,"302":2,"308":2}}],["请阅读插件主页的说明",{"2":{"314":1}}],["请确保您所编写的html代码能被bot解析",{"2":{"307":1}}],["请注意",{"2":{"307":1}}],["请创建task",{"2":{"152":2}}],["请不要将需要动态加载的内容写入配置文件",{"2":{"137":1}}],["请联系插件作者或在安全模式safe",{"2":{"6":1}}],["请先查阅插件文档",{"2":{"6":1}}],["请正确安装git",{"2":{"6":1}}],["请检查配置文件的command",{"2":{"6":1}}],["请使用path",{"2":{"15":1}}],["请使用",{"2":{"6":1}}],["请在此填写相同的值",{"2":{"3":1}}],["请开启alconna",{"2":{"1":1}}],["请尽快迁移",{"2":{"1":1}}],["空命令头",{"2":{"1":1}}],["指令前缀",{"2":{"1":1}}],["轻雪天气liteyuki",{"0":{"317":1},"1":{"318":1}}],["轻雪文档",{"2":{"312":1}}],["轻雪命令liteyuki",{"0":{"311":1},"1":{"312":1}}],["轻雪会收集以下内容",{"2":{"309":1}}],["轻雪会自动合并这些配置文件",{"2":{"0":1}}],["轻雪原版资源包请查看liteyukibot",{"2":{"307":1}}],["轻雪主进程不涉及聊天部分",{"2":{"303":1}}],["轻雪函数",{"0":{"294":1},"1":{"295":1,"296":1,"297":1,"298":1,"299":1},"2":{"294":1}}],["轻雪框架提供了一个内存共享通信的接口",{"2":{"292":1}}],["轻雪提供了一个通道channel用于跨进程通信",{"2":{"289":1}}],["轻雪运行在主进程",{"2":{"289":1}}],["轻雪抽象消息事件",{"2":{"183":2}}],["轻雪生命周期管理",{"2":{"65":2}}],["轻雪的更新功能依赖git",{"2":{"15":1}}],["轻雪使用git进行版本管理",{"2":{"12":1}}],["轻雪不局限于onebot适配器",{"2":{"4":1}}],["轻雪调试",{"2":{"2":1}}],["轻雪插件是轻雪内置的一部分功能",{"2":{"300":1}}],["轻雪插件目录列表",{"2":{"1":1}}],["轻雪插件列表",{"2":{"1":1}}],["轻雪支持yaml",{"2":{"0":1}}],["y",{"2":{"250":1}}],["y>",{"2":{"250":1}}],["y>name",{"2":{"250":1}}],["your",{"2":{"248":4}}],["yellow>",{"2":{"180":1}}],["yunzai",{"2":{"8":1}}],["yamlweather",{"2":{"317":1}}],["yamlname",{"2":{"308":1}}],["yamlnonebot",{"2":{"1":1}}],["yaml",{"0":{"139":1},"2":{"0":1,"2":1,"139":5,"142":2,"144":1}}],["yml格式的所有合法内容",{"2":{"311":1}}],["yml文件",{"2":{"308":1}}],["yml中填写一些信息",{"2":{"308":1}}],["yml",{"2":{"0":1,"142":1,"144":1,"308":2,"311":1}}],["yml和config目录",{"2":{"0":1}}],["你在a包中定义了一个index",{"2":{"308":1}}],["你自己制作的资源包也应该遵循这个规则",{"2":{"308":1}}],["你也可以自己制作资源包",{"2":{"307":1}}],["你的插件代码",{"2":{"302":1}}],["你应该使用其他储存方式",{"2":{"137":1}}],["你将无法使用更新功能",{"2":{"15":1}}],["你需要使用onebot标准的实现端来连接到轻雪并将消息上报给轻雪",{"2":{"6":1}}],["你有这个问题说明你不是很了解这个项目",{"2":{"6":1}}],["你可以选择开启auto",{"2":{"309":1}}],["你可以自由使用",{"2":{"309":1}}],["你可以自定义一些信息",{"2":{"308":1}}],["你可以在多个线程中读写共享内存",{"2":{"292":1}}],["你可以通过storage模块实现内存共享通信",{"2":{"292":1}}],["你可以通过channel发送消息给其他进程",{"2":{"289":1}}],["你可以使用python",{"2":{"12":1}}],["你可以使用nonebot2支持的任何适配器或使用轻雪讯息传递插件",{"2":{"4":1}}],["你可在此自定义生成的markdown格式",{"2":{"242":2}}],["你可在config目录下创建多个配置文件",{"2":{"0":1}}],["你可修改配置项后重启轻雪",{"2":{"0":1}}],["你只需要修改superusers及nickname字段即可",{"2":{"0":1}}],["绝大多数情况下",{"2":{"0":1}}],["取决于你个人的喜好",{"2":{"0":1}}],["配置项",{"2":{"317":1}}],["配置项目",{"2":{"138":2}}],["配置了命令别名的命令可以使用别名代替原命令",{"2":{"310":1}}],["配置文件尽量扁平化",{"2":{"137":1}}],["配置值",{"2":{"38":2,"39":2,"60":2,"61":2}}],["配置键",{"2":{"38":2,"39":2,"60":2,"61":2}}],["配置",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1},"2":{"21":3,"43":3,"312":1}}]],"serializationVersion":2}`;export{e as default}; diff --git a/assets/chunks/VPLocalSearchBox.CLGH5rWG.js b/assets/chunks/VPLocalSearchBox.CLGH5rWG.js new file mode 100644 index 00000000..eb0efc17 --- /dev/null +++ b/assets/chunks/VPLocalSearchBox.CLGH5rWG.js @@ -0,0 +1,7 @@ +var Ot=Object.defineProperty;var Rt=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Ce=(a,e,t)=>Rt(a,typeof e!="symbol"?e+"":e,t);import{X as et,s as ne,h as ve,aj as tt,ak as Ct,al as Mt,v as je,am as At,d as Lt,G as ye,an as st,ao as Dt,ap as zt,x as Pt,aq as Vt,y as Me,R as de,Q as we,ar as jt,as as $t,Y as Bt,U as Wt,a1 as Kt,o as Q,b as Jt,j as x,a2 as Ut,k as D,at as qt,au as Gt,av as Qt,c as Z,n as nt,e as _e,E as it,F as rt,a as he,t as fe,aw as Ht,p as Yt,l as Zt,ax as at,ay as Xt,a8 as es,ae as ts,az as ss,_ as ns}from"./framework.C3o_UkTa.js";import{u as is,c as rs}from"./theme.rDkprPqD.js";const as={en:()=>et(()=>import("./@localSearchIndexen.CgaiBpBo.js"),[]),root:()=>et(()=>import("./@localSearchIndexroot.ButuspH0.js"),[])};/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var gt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ie=gt.join(","),bt=typeof Element>"u",re=bt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ne=!bt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},ke=function a(e,t){var s;t===void 0&&(t=!0);var n=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),r=n===""||n==="true",i=r||t&&e&&a(e.parentNode);return i},os=function(e){var t,s=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return s===""||s==="true"},yt=function(e,t,s){if(ke(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ie));return t&&re.call(e,Ie)&&n.unshift(e),n=n.filter(s),n},wt=function a(e,t,s){for(var n=[],r=Array.from(e);r.length;){var i=r.shift();if(!ke(i,!1))if(i.tagName==="SLOT"){var o=i.assignedElements(),c=o.length?o:i.children,l=a(c,!0,s);s.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{var h=re.call(i,Ie);h&&s.filter(i)&&(t||!e.includes(i))&&n.push(i);var v=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),f=!ke(v,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(v&&f){var b=a(v===!0?i.children:v.children,!0,s);s.flatten?n.push.apply(n,b):n.push({scopeParent:i,candidates:b})}else r.unshift.apply(r,i.children)}}return n},_t=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ie=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||os(e))&&!_t(e)?0:e.tabIndex},cs=function(e,t){var s=ie(e);return s<0&&t&&!_t(e)?0:s},ls=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},us=function(e){return xt(e)&&e.type==="hidden"},ds=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return t},hs=function(e,t){for(var s=0;ssummary:first-of-type"),i=r?e.parentElement:e;if(re.call(i,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof n=="function"){for(var o=e;e;){var c=e.parentElement,l=Ne(e);if(c&&!c.shadowRoot&&n(c)===!0)return ot(e);e.assignedSlot?e=e.assignedSlot:!c&&l!==e.ownerDocument?e=l.host:e=c}e=o}if(ms(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ot(e);return!1},bs=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var s=0;s=0)},ws=function a(e){var t=[],s=[];return e.forEach(function(n,r){var i=!!n.scopeParent,o=i?n.scopeParent:n,c=cs(o,i),l=i?a(n.candidates):o;c===0?i?t.push.apply(t,l):t.push(o):s.push({documentOrder:r,tabIndex:c,item:n,isScope:i,content:l})}),s.sort(ls).reduce(function(n,r){return r.isScope?n.push.apply(n,r.content):n.push(r.content),n},[]).concat(t)},_s=function(e,t){t=t||{};var s;return t.getShadowRoot?s=wt([e],t.includeContainer,{filter:$e.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ys}):s=yt(e,t.includeContainer,$e.bind(null,t)),ws(s)},xs=function(e,t){t=t||{};var s;return t.getShadowRoot?s=wt([e],t.includeContainer,{filter:Fe.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s=yt(e,t.includeContainer,Fe.bind(null,t)),s},ae=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return re.call(e,Ie)===!1?!1:$e(t,e)},Ss=gt.concat("iframe").join(","),Ae=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return re.call(e,Ss)===!1?!1:Fe(t,e)};/*! +* focus-trap 7.5.4 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function ct(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,s)}return t}function lt(a){for(var e=1;e0){var s=e[e.length-1];s!==t&&s.pause()}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var s=e.indexOf(t);s!==-1&&e.splice(s,1),e.length>0&&e[e.length-1].unpause()}},Ns=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ks=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},me=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Fs=function(e){return me(e)&&!e.shiftKey},Os=function(e){return me(e)&&e.shiftKey},dt=function(e){return setTimeout(e,0)},ht=function(e,t){var s=-1;return e.every(function(n,r){return t(n)?(s=r,!1):!0}),s},pe=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?m-1:0),E=1;E=0)u=s.activeElement;else{var d=i.tabbableGroups[0],m=d&&d.firstTabbableNode;u=m||h("fallbackFocus")}if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},f=function(){if(i.containerGroups=i.containers.map(function(u){var d=_s(u,r.tabbableOptions),m=xs(u,r.tabbableOptions),S=d.length>0?d[0]:void 0,E=d.length>0?d[d.length-1]:void 0,k=m.find(function(p){return ae(p)}),F=m.slice().reverse().find(function(p){return ae(p)}),M=!!d.find(function(p){return ie(p)>0});return{container:u,tabbableNodes:d,focusableNodes:m,posTabIndexesFound:M,firstTabbableNode:S,lastTabbableNode:E,firstDomTabbableNode:k,lastDomTabbableNode:F,nextTabbableNode:function(g){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=d.indexOf(g);return O<0?N?m.slice(m.indexOf(g)+1).find(function(P){return ae(P)}):m.slice(0,m.indexOf(g)).reverse().find(function(P){return ae(P)}):d[O+(N?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(u){return u.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function T(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?T(d.shadowRoot):d},y=function T(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){T(v());return}u.focus({preventScroll:!!r.preventScroll}),i.mostRecentlyFocusedNode=u,Ns(u)&&u.select()}},_=function(u){var d=h("setReturnFocus",u);return d||(d===!1?!1:u)},w=function(u){var d=u.target,m=u.event,S=u.isBackward,E=S===void 0?!1:S;d=d||xe(m),f();var k=null;if(i.tabbableGroups.length>0){var F=l(d,m),M=F>=0?i.containerGroups[F]:void 0;if(F<0)E?k=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:k=i.tabbableGroups[0].firstTabbableNode;else if(E){var p=ht(i.tabbableGroups,function(I){var L=I.firstTabbableNode;return d===L});if(p<0&&(M.container===d||Ae(d,r.tabbableOptions)&&!ae(d,r.tabbableOptions)&&!M.nextTabbableNode(d,!1))&&(p=F),p>=0){var g=p===0?i.tabbableGroups.length-1:p-1,N=i.tabbableGroups[g];k=ie(d)>=0?N.lastTabbableNode:N.lastDomTabbableNode}else me(m)||(k=M.nextTabbableNode(d,!1))}else{var O=ht(i.tabbableGroups,function(I){var L=I.lastTabbableNode;return d===L});if(O<0&&(M.container===d||Ae(d,r.tabbableOptions)&&!ae(d,r.tabbableOptions)&&!M.nextTabbableNode(d))&&(O=F),O>=0){var P=O===i.tabbableGroups.length-1?0:O+1,V=i.tabbableGroups[P];k=ie(d)>=0?V.firstTabbableNode:V.firstDomTabbableNode}else me(m)||(k=M.nextTabbableNode(d))}}else k=h("fallbackFocus");return k},R=function(u){var d=xe(u);if(!(l(d,u)>=0)){if(pe(r.clickOutsideDeactivates,u)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}pe(r.allowOutsideClick,u)||u.preventDefault()}},C=function(u){var d=xe(u),m=l(d,u)>=0;if(m||d instanceof Document)m&&(i.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var S,E=!0;if(i.mostRecentlyFocusedNode)if(ie(i.mostRecentlyFocusedNode)>0){var k=l(i.mostRecentlyFocusedNode),F=i.containerGroups[k].tabbableNodes;if(F.length>0){var M=F.findIndex(function(p){return p===i.mostRecentlyFocusedNode});M>=0&&(r.isKeyForward(i.recentNavEvent)?M+1=0&&(S=F[M-1],E=!1))}}else i.containerGroups.some(function(p){return p.tabbableNodes.some(function(g){return ie(g)>0})})||(E=!1);else E=!1;E&&(S=w({target:i.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(i.recentNavEvent)})),y(S||i.mostRecentlyFocusedNode||v())}i.recentNavEvent=void 0},J=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=u;var m=w({event:u,isBackward:d});m&&(me(u)&&u.preventDefault(),y(m))},H=function(u){if(ks(u)&&pe(r.escapeDeactivates,u)!==!1){u.preventDefault(),o.deactivate();return}(r.isKeyForward(u)||r.isKeyBackward(u))&&J(u,r.isKeyBackward(u))},W=function(u){var d=xe(u);l(d,u)>=0||pe(r.clickOutsideDeactivates,u)||pe(r.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},j=function(){if(i.active)return ut.activateTrap(n,o),i.delayInitialFocusTimer=r.delayInitialFocus?dt(function(){y(v())}):y(v()),s.addEventListener("focusin",C,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",W,{capture:!0,passive:!1}),s.addEventListener("keydown",H,{capture:!0,passive:!1}),o},$=function(){if(i.active)return s.removeEventListener("focusin",C,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",W,!0),s.removeEventListener("keydown",H,!0),o},Re=function(u){var d=u.some(function(m){var S=Array.from(m.removedNodes);return S.some(function(E){return E===i.mostRecentlyFocusedNode})});d&&y(v())},A=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Re):void 0,U=function(){A&&(A.disconnect(),i.active&&!i.paused&&i.containers.map(function(u){A.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return i.active},get paused(){return i.paused},activate:function(u){if(i.active)return this;var d=c(u,"onActivate"),m=c(u,"onPostActivate"),S=c(u,"checkCanFocusTrap");S||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=s.activeElement,d==null||d();var E=function(){S&&f(),j(),U(),m==null||m()};return S?(S(i.containers.concat()).then(E,E),this):(E(),this)},deactivate:function(u){if(!i.active)return this;var d=lt({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},u);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,$(),i.active=!1,i.paused=!1,U(),ut.deactivateTrap(n,o);var m=c(d,"onDeactivate"),S=c(d,"onPostDeactivate"),E=c(d,"checkCanReturnFocus"),k=c(d,"returnFocus","returnFocusOnDeactivate");m==null||m();var F=function(){dt(function(){k&&y(_(i.nodeFocusedBeforeActivation)),S==null||S()})};return k&&E?(E(_(i.nodeFocusedBeforeActivation)).then(F,F),this):(F(),this)},pause:function(u){if(i.paused||!i.active)return this;var d=c(u,"onPause"),m=c(u,"onPostPause");return i.paused=!0,d==null||d(),$(),U(),m==null||m(),this},unpause:function(u){if(!i.paused||!i.active)return this;var d=c(u,"onUnpause"),m=c(u,"onPostUnpause");return i.paused=!1,d==null||d(),f(),j(),U(),m==null||m(),this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return i.containers=d.map(function(m){return typeof m=="string"?s.querySelector(m):m}),i.active&&f(),U(),this}},o.updateContainerElements(e),o};function Ms(a,e={}){let t;const{immediate:s,...n}=e,r=ne(!1),i=ne(!1),o=f=>t&&t.activate(f),c=f=>t&&t.deactivate(f),l=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)},v=ve(()=>{const f=tt(a);return(Array.isArray(f)?f:[f]).map(b=>{const y=tt(b);return typeof y=="string"?y:Ct(y)}).filter(Mt)});return je(v,f=>{f.length&&(t=Cs(f,{...n,onActivate(){r.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){r.value=!1,e.onDeactivate&&e.onDeactivate()}}),s&&o())},{flush:"post"}),At(()=>c()),{hasFocus:r,isPaused:i,activate:o,deactivate:c,pause:l,unpause:h}}class ce{constructor(e,t=!0,s=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=s,this.iframesTimeout=n}static matches(e,t){const s=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let r=!1;return s.every(i=>n.call(e,i)?(r=!0,!1):!0),r}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(s=>{const n=t.filter(r=>r.contains(s)).length>0;t.indexOf(s)===-1&&!n&&t.push(s)}),t}getIframeContents(e,t,s=()=>{}){let n;try{const r=e.contentWindow;if(n=r.document,!r||!n)throw new Error("iframe inaccessible")}catch{s()}n&&t(n)}isIframeBlank(e){const t="about:blank",s=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&s!==t&&s}observeIframeLoad(e,t,s){let n=!1,r=null;const i=()=>{if(!n){n=!0,clearTimeout(r);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,s))}catch{s()}}};e.addEventListener("load",i),r=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,s){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,s):this.getIframeContents(e,t,s):this.observeIframeLoad(e,t,s)}catch{s()}}waitForIframes(e,t){let s=0;this.forEachIframe(e,()=>!0,n=>{s++,this.waitForIframes(n.querySelector("html"),()=>{--s||t()})},n=>{n||t()})}forEachIframe(e,t,s,n=()=>{}){let r=e.querySelectorAll("iframe"),i=r.length,o=0;r=Array.prototype.slice.call(r);const c=()=>{--i<=0&&n(o)};i||c(),r.forEach(l=>{ce.matches(l,this.exclude)?c():this.onIframeReady(l,h=>{t(l)&&(o++,s(h)),c()},c)})}createIterator(e,t,s){return document.createNodeIterator(e,t,s,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,s){const n=e.compareDocumentPosition(s),r=Node.DOCUMENT_POSITION_PRECEDING;if(n&r)if(t!==null){const i=t.compareDocumentPosition(s),o=Node.DOCUMENT_POSITION_FOLLOWING;if(i&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let s;return t===null?s=e.nextNode():s=e.nextNode()&&e.nextNode(),{prevNode:t,node:s}}checkIframeFilter(e,t,s,n){let r=!1,i=!1;return n.forEach((o,c)=>{o.val===s&&(r=c,i=o.handled)}),this.compareNodeIframe(e,t,s)?(r===!1&&!i?n.push({val:s,handled:!0}):r!==!1&&!i&&(n[r].handled=!0),!0):(r===!1&&n.push({val:s,handled:!1}),!1)}handleOpenIframes(e,t,s,n){e.forEach(r=>{r.handled||this.getIframeContents(r.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,s,n)})})}iterateThroughNodes(e,t,s,n,r){const i=this.createIterator(t,e,n);let o=[],c=[],l,h,v=()=>({prevNode:h,node:l}=this.getIteratorNode(i),l);for(;v();)this.iframes&&this.forEachIframe(t,f=>this.checkIframeFilter(l,h,f,o),f=>{this.createInstanceOnIframe(f).forEachNode(e,b=>c.push(b),n)}),c.push(l);c.forEach(f=>{s(f)}),this.iframes&&this.handleOpenIframes(o,e,s,n),r()}forEachNode(e,t,s,n=()=>{}){const r=this.getContexts();let i=r.length;i||n(),r.forEach(o=>{const c=()=>{this.iterateThroughNodes(e,o,t,s,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(o,c):c()})}}let As=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[t]=="function"&&s[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let r in t)if(t.hasOwnProperty(r)){const i=t[r],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),c=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);o!==""&&c!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(c)})`,`gm${s}`),n+`(${this.processSynomyms(o)}|${this.processSynomyms(c)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,s,n)=>{let r=n.charAt(s+1);return/[(|)\\]/.test(r)||r===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&t.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach(r=>{s.every(i=>{if(i.indexOf(r)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,n=typeof s=="string"?s:s.value,r=typeof s=="string"?[]:s.limiters,i="";switch(r.forEach(o=>{i+=`|${this.escapeStr(o)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):s.trim()&&t.indexOf(s)===-1&&t.push(s)}),{keywords:t.sort((s,n)=>n.length-s.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let s=0;return e.sort((n,r)=>n.start-r.start).forEach(n=>{let{start:r,end:i,valid:o}=this.callNoMatchOnInvalidRanges(n,s);o&&(n.start=r,n.length=i-r,t.push(n),s=i)}),t}callNoMatchOnInvalidRanges(e,t){let s,n,r=!1;return e&&typeof e.start<"u"?(s=parseInt(e.start,10),n=s+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-s>0?r=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:s,end:n,valid:r}}checkWhitespaceRanges(e,t,s){let n,r=!0,i=s.length,o=t-i,c=parseInt(e.start,10)-o;return c=c>i?i:c,n=c+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),c<0||n-c<0||c>i||n>i?(r=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):s.substring(c,n).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:c,end:n,valid:r}}getTextNodes(e){let t="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{s.push({start:t.length,end:(t+=n.textContent).length,node:n})},n=>this.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:s})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,s){const n=this.opt.element?this.opt.element:"mark",r=e.splitText(t),i=r.splitText(s-t);let o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=r.textContent,r.parentNode.replaceChild(o,r),i}wrapRangeInMappedTextNode(e,t,s,n,r){e.nodes.every((i,o)=>{const c=e.nodes[o+1];if(typeof c>"u"||c.start>t){if(!n(i.node))return!1;const l=t-i.start,h=(s>i.end?i.end:s)-i.start,v=e.value.substr(0,i.start),f=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,l,h),e.value=v+f,e.nodes.forEach((b,y)=>{y>=o&&(e.nodes[y].start>0&&y!==o&&(e.nodes[y].start-=h),e.nodes[y].end-=h)}),s-=h,r(i.node.previousSibling,i.start),s>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,s,n,r){const i=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(c=>{c=c.node;let l;for(;(l=e.exec(c.textContent))!==null&&l[i]!=="";){if(!s(l[i],c))continue;let h=l.index;if(i!==0)for(let v=1;v{let c;for(;(c=e.exec(o.value))!==null&&c[i]!=="";){let l=c.index;if(i!==0)for(let v=1;vs(c[i],v),(v,f)=>{e.lastIndex=f,n(v)})}r()})}wrapRangeFromIndex(e,t,s,n){this.getTextNodes(r=>{const i=r.value.length;e.forEach((o,c)=>{let{start:l,end:h,valid:v}=this.checkWhitespaceRanges(o,i,r.value);v&&this.wrapRangeInMappedTextNode(r,l,h,f=>t(f,o,r.value.substring(l,h),c),f=>{s(f,o)})}),n()})}unwrapMatches(e){const t=e.parentNode;let s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let s=0,n="wrapMatches";const r=i=>{s++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,o)=>this.opt.filter(o,i,s),r,()=>{s===0&&this.opt.noMatch(e),this.opt.done(s)})}mark(e,t){this.opt=t;let s=0,n="wrapMatches";const{keywords:r,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",c=l=>{let h=new RegExp(this.createRegExp(l),`gm${o}`),v=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(f,b)=>this.opt.filter(b,l,s,v),f=>{v++,s++,this.opt.each(f)},()=>{v===0&&this.opt.noMatch(l),r[i-1]===l?this.opt.done(s):c(r[r.indexOf(l)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(s):c(r[0])}markRanges(e,t){this.opt=t;let s=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(r,i,o,c)=>this.opt.filter(r,i,o,c),(r,i)=>{s++,this.opt.each(r,i)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const n=ce.matches(s,t),r=this.matchesExclude(s);return!n||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function Ls(a){const e=new As(a);return this.mark=(t,s)=>(e.mark(t,s),this),this.markRegExp=(t,s)=>(e.markRegExp(t,s),this),this.markRanges=(t,s)=>(e.markRanges(t,s),this),this.unmark=t=>(e.unmark(t),this),this}function Te(a,e,t,s){function n(r){return r instanceof t?r:new t(function(i){i(r)})}return new(t||(t=Promise))(function(r,i){function o(h){try{l(s.next(h))}catch(v){i(v)}}function c(h){try{l(s.throw(h))}catch(v){i(v)}}function l(h){h.done?r(h.value):n(h.value).then(o,c)}l((s=s.apply(a,[])).next())})}const Ds="ENTRIES",St="KEYS",Et="VALUES",z="";class Le{constructor(e,t){const s=e._tree,n=Array.from(s.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:s,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=oe(this._path);if(oe(t)===z)return{done:!1,value:this.result()};const s=e.get(oe(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=oe(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>oe(e)).filter(e=>e!==z).join("")}value(){return oe(this._path).node.get(z)}result(){switch(this._type){case Et:return this.value();case St:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const oe=a=>a[a.length-1],zs=(a,e,t)=>{const s=new Map;if(e===void 0)return s;const n=e.length+1,r=n+t,i=new Uint8Array(r*n).fill(t+1);for(let o=0;o{const c=r*i;e:for(const l of a.keys())if(l===z){const h=n[c-1];h<=t&&s.set(o,[a.get(l),h])}else{let h=r;for(let v=0;vt)continue e}Tt(a.get(l),e,t,s,n,h,i,o+l)}};class X{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,s]=Oe(this._tree,e.slice(this._prefix.length));if(t===void 0){const[n,r]=Je(s);for(const i of n.keys())if(i!==z&&i.startsWith(r)){const o=new Map;return o.set(i.slice(r.length),n.get(i)),new X(o,e)}}return new X(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Ps(this._tree,e)}entries(){return new Le(this,Ds)}forEach(e){for(const[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return zs(this._tree,e,t)}get(e){const t=Be(this._tree,e);return t!==void 0?t.get(z):void 0}has(e){const t=Be(this._tree,e);return t!==void 0&&t.has(z)}keys(){return new Le(this,St)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,De(this._tree,e).set(z,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=De(this._tree,e);return s.set(z,t(s.get(z))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=De(this._tree,e);let n=s.get(z);return n===void 0&&s.set(z,n=t()),n}values(){return new Le(this,Et)}[Symbol.iterator](){return this.entries()}static from(e){const t=new X;for(const[s,n]of e)t.set(s,n);return t}static fromObject(e){return X.from(Object.entries(e))}}const Oe=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const s of a.keys())if(s!==z&&e.startsWith(s))return t.push([a,s]),Oe(a.get(s),e.slice(s.length),t);return t.push([a,e]),Oe(void 0,"",t)},Be=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==z&&e.startsWith(t))return Be(a.get(t),e.slice(t.length))},De=(a,e)=>{const t=e.length;e:for(let s=0;a&&s{const[t,s]=Oe(a,e);if(t!==void 0){if(t.delete(z),t.size===0)It(s);else if(t.size===1){const[n,r]=t.entries().next().value;Nt(s,n,r)}}},It=a=>{if(a.length===0)return;const[e,t]=Je(a);if(e.delete(t),e.size===0)It(a.slice(0,-1));else if(e.size===1){const[s,n]=e.entries().next().value;s!==z&&Nt(a.slice(0,-1),s,n)}},Nt=(a,e,t)=>{if(a.length===0)return;const[s,n]=Je(a);s.set(n+e,t),s.delete(n)},Je=a=>a[a.length-1],Ue="or",kt="and",Vs="and_not";class le{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},Pe),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ft),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},Ks),e.autoSuggestOptions||{})}),this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ke,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:s,processTerm:n,fields:r,idField:i}=this._options,o=t(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(o))throw new Error(`MiniSearch: duplicate ID ${o}`);const c=this.addDocumentId(o);this.saveStoredFields(c,e);for(const l of r){const h=t(e,l);if(h==null)continue;const v=s(h.toString(),l),f=this._fieldIds[l],b=new Set(v).size;this.addFieldLength(c,f,this._documentCount-1,b);for(const y of v){const _=n(y,l);if(Array.isArray(_))for(const w of _)this.addTerm(f,c,w);else _&&this.addTerm(f,c,_)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:s=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:r,promise:i}=e.reduce(({chunk:o,promise:c},l,h)=>(o.push(l),(h+1)%s===0?{chunk:[],promise:c.then(()=>new Promise(v=>setTimeout(v,0))).then(()=>this.addAll(o))}:{chunk:o,promise:c}),n);return i.then(()=>this.addAll(r))}remove(e){const{tokenize:t,processTerm:s,extractField:n,fields:r,idField:i}=this._options,o=n(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const c=this._idToShortId.get(o);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${o}: it is not in the index`);for(const l of r){const h=n(e,l);if(h==null)continue;const v=t(h.toString(),l),f=this._fieldIds[l],b=new Set(v).size;this.removeFieldLength(c,f,this._documentCount,b);for(const y of v){const _=s(y,l);if(Array.isArray(_))for(const w of _)this.removeTerm(f,c,w);else _&&this.removeTerm(f,c,_)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(o),this._fieldLength.delete(c),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,n)=>{this.removeFieldLength(t,n,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:s}=this._options,n=s(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ke,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return Te(this,void 0,void 0,function*(){const s=this._dirtCount;if(this.vacuumConditionsMet(t)){const n=e.batchSize||We.batchSize,r=e.batchWait||We.batchWait;let i=1;for(const[o,c]of this._index){for(const[l,h]of c)for(const[v]of h)this._documentIds.has(v)||(h.size<=1?c.delete(l):h.delete(v));this._index.get(o).size===0&&this._index.delete(o),i%n===0&&(yield new Promise(l=>setTimeout(l,r))),i+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||Ve.minDirtCount,s=s||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const s=this.executeQuery(e,t),n=[];for(const[r,{score:i,terms:o,match:c}]of s){const l=o.length||1,h={id:this._documentIds.get(r),score:i*l,terms:Object.keys(c),queryTerms:o,match:c};Object.assign(h,this._storedFields.get(r)),(t.filter==null||t.filter(h))&&n.push(h)}return e===le.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||n.sort(vt),n}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);const s=new Map;for(const{score:r,terms:i}of this.search(e,t)){const o=i.join(" "),c=s.get(o);c!=null?(c.score+=r,c.count+=1):s.set(o,{score:r,terms:i,count:1})}const n=[];for(const[r,{score:i,terms:o,count:c}]of s)n.push({suggestion:r,terms:o,score:i/c});return n.sort(vt),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return Te(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(Pe.hasOwnProperty(e))return ze(Pe,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,t);c._documentIds=Se(n),c._fieldLength=Se(r),c._storedFields=Se(i);for(const[l,h]of c._documentIds)c._idToShortId.set(h,l);for(const[l,h]of s){const v=new Map;for(const f of Object.keys(h)){let b=h[f];o===1&&(b=b.ds),v.set(parseInt(f,10),Se(b))}c._index.set(l,v)}return c}static loadJSAsync(e,t){return Te(this,void 0,void 0,function*(){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,t);c._documentIds=yield Ee(n),c._fieldLength=yield Ee(r),c._storedFields=yield Ee(i);for(const[h,v]of c._documentIds)c._idToShortId.set(v,h);let l=0;for(const[h,v]of s){const f=new Map;for(const b of Object.keys(v)){let y=v[b];o===1&&(y=y.ds),f.set(parseInt(b,10),yield Ee(y))}++l%1e3===0&&(yield Ft(0)),c._index.set(h,f)}return c})}static instantiateMiniSearch(e,t){const{documentCount:s,nextId:n,fieldIds:r,averageFieldLength:i,dirtCount:o,serializationVersion:c}=e;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const l=new le(t);return l._documentCount=s,l._nextId=n,l._idToShortId=new Map,l._fieldIds=r,l._avgFieldLength=i,l._dirtCount=o||0,l._index=new X,l}executeQuery(e,t={}){if(e===le.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),b=e.queries.map(y=>this.executeQuery(y,f));return this.combineResults(b,f.combineWith)}const{tokenize:s,processTerm:n,searchOptions:r}=this._options,i=Object.assign(Object.assign({tokenize:s,processTerm:n},r),t),{tokenize:o,processTerm:c}=i,v=o(e).flatMap(f=>c(f)).filter(f=>!!f).map(Ws(i)).map(f=>this.executeQuerySpec(f,i));return this.combineResults(v,i.combineWith)}executeQuerySpec(e,t){const s=Object.assign(Object.assign({},this._options.searchOptions),t),n=(s.fields||this._options.fields).reduce((_,w)=>Object.assign(Object.assign({},_),{[w]:ze(s.boost,w)||1}),{}),{boostDocument:r,weights:i,maxFuzzy:o,bm25:c}=s,{fuzzy:l,prefix:h}=Object.assign(Object.assign({},ft.weights),i),v=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,v,n,r,c);let b,y;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const _=e.fuzzy===!0?.2:e.fuzzy,w=_<1?Math.min(o,Math.round(e.term.length*_)):_;w&&(y=this._index.fuzzyGet(e.term,w))}if(b)for(const[_,w]of b){const R=_.length-e.term.length;if(!R)continue;y==null||y.delete(_);const C=h*_.length/(_.length+.3*R);this.termResults(e.term,_,C,e.termBoost,w,n,r,c,f)}if(y)for(const _ of y.keys()){const[w,R]=y.get(_);if(!R)continue;const C=l*_.length/(_.length+R);this.termResults(e.term,_,C,e.termBoost,w,n,r,c,f)}return f}executeWildcardQuery(e){const t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(const[n,r]of this._documentIds){const i=s.boostDocument?s.boostDocument(r,"",this._storedFields.get(n)):1;t.set(n,{score:i,terms:[],match:{}})}return t}combineResults(e,t=Ue){if(e.length===0)return new Map;const s=t.toLowerCase(),n=js[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,s]of this._index){const n={};for(const[r,i]of s)n[r]=Object.fromEntries(i);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,n,r,i,o,c,l=new Map){if(r==null)return l;for(const h of Object.keys(i)){const v=i[h],f=this._fieldIds[h],b=r.get(f);if(b==null)continue;let y=b.size;const _=this._avgFieldLength[f];for(const w of b.keys()){if(!this._documentIds.has(w)){this.removeTerm(f,w,t),y-=1;continue}const R=o?o(this._documentIds.get(w),t,this._storedFields.get(w)):1;if(!R)continue;const C=b.get(w),J=this._fieldLength.get(w)[f],H=Bs(C,y,this._documentCount,J,_,c),W=s*n*v*R*H,j=l.get(w);if(j){j.score+=W,Js(j.terms,e);const $=ze(j.match,t);$?$.push(h):j.match[t]=[h]}else l.set(w,{score:W,terms:[e],match:{[t]:[h]}})}}return l}addTerm(e,t,s){const n=this._index.fetch(s,mt);let r=n.get(e);if(r==null)r=new Map,r.set(t,1),n.set(e,r);else{const i=r.get(t);r.set(t,(i||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}const n=this._index.fetch(s,mt),r=n.get(e);r==null||r.get(t)==null?this.warnDocumentChanged(t,e,s):r.get(t)<=1?r.size<=1?n.delete(e):r.delete(t):r.set(t,r.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${s}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;tObject.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,js={[Ue]:(a,e)=>{for(const t of e.keys()){const s=a.get(t);if(s==null)a.set(t,e.get(t));else{const{score:n,terms:r,match:i}=e.get(t);s.score=s.score+n,s.match=Object.assign(s.match,i),pt(s.terms,r)}}return a},[kt]:(a,e)=>{const t=new Map;for(const s of e.keys()){const n=a.get(s);if(n==null)continue;const{score:r,terms:i,match:o}=e.get(s);pt(n.terms,i),t.set(s,{score:n.score+r,terms:n.terms,match:Object.assign(n.match,o)})}return t},[Vs]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},$s={k:1.2,b:.7,d:.5},Bs=(a,e,t,s,n,r)=>{const{k:i,b:o,d:c}=r;return Math.log(1+(t-e+.5)/(e+.5))*(c+a*(i+1)/(a+i*(1-o+o*s/n)))},Ws=a=>(e,t,s)=>{const n=typeof a.fuzzy=="function"?a.fuzzy(e,t,s):a.fuzzy||!1,r=typeof a.prefix=="function"?a.prefix(e,t,s):a.prefix===!0,i=typeof a.boostTerm=="function"?a.boostTerm(e,t,s):1;return{term:e,fuzzy:n,prefix:r,termBoost:i}},Pe={idField:"id",extractField:(a,e)=>a[e],tokenize:a=>a.split(Us),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ft={combineWith:Ue,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:$s},Ks={combineWith:kt,prefix:(a,e,t)=>e===t.length-1},We={batchSize:1e3,batchWait:10},Ke={minDirtFactor:.1,minDirtCount:20},Ve=Object.assign(Object.assign({},We),Ke),Js=(a,e)=>{a.includes(e)||a.push(e)},pt=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},vt=({score:a},{score:e})=>e-a,mt=()=>new Map,Se=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ee=a=>Te(void 0,void 0,void 0,function*(){const e=new Map;let t=0;for(const s of Object.keys(a))e.set(parseInt(s,10),a[s]),++t%1e3===0&&(yield Ft(0));return e}),Ft=a=>new Promise(e=>setTimeout(e,a)),Us=/[\n\r\p{Z}\p{P}]+/u;class qs{constructor(e=10){Ce(this,"max");Ce(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const K=a=>(Yt("data-v-a5632211"),a=a(),Zt(),a),Gs=["aria-owns"],Qs={class:"shell"},Hs=["title"],Ys=K(()=>x("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)),Zs=[Ys],Xs={class:"search-actions before"},en=["title"],tn=K(()=>x("span",{class:"vpi-arrow-left local-search-icon"},null,-1)),sn=[tn],nn=["placeholder"],rn={class:"search-actions"},an=["title"],on=K(()=>x("span",{class:"vpi-layout-list local-search-icon"},null,-1)),cn=[on],ln=["disabled","title"],un=K(()=>x("span",{class:"vpi-delete local-search-icon"},null,-1)),dn=[un],hn=["id","role","aria-labelledby"],fn=["aria-selected"],pn=["href","aria-label","onMouseenter","onFocusin"],vn={class:"titles"},mn=K(()=>x("span",{class:"title-icon"},"#",-1)),gn=["innerHTML"],bn=K(()=>x("span",{class:"vpi-chevron-right local-search-icon"},null,-1)),yn={class:"title main"},wn=["innerHTML"],_n={key:0,class:"excerpt-wrapper"},xn={key:0,class:"excerpt",inert:""},Sn=["innerHTML"],En=K(()=>x("div",{class:"excerpt-gradient-bottom"},null,-1)),Tn=K(()=>x("div",{class:"excerpt-gradient-top"},null,-1)),In={key:0,class:"no-results"},Nn={class:"search-keyboard-shortcuts"},kn=["aria-label"],Fn=K(()=>x("span",{class:"vpi-arrow-up navigate-icon"},null,-1)),On=[Fn],Rn=["aria-label"],Cn=K(()=>x("span",{class:"vpi-arrow-down navigate-icon"},null,-1)),Mn=[Cn],An=["aria-label"],Ln=K(()=>x("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)),Dn=[Ln],zn=["aria-label"],Pn=Lt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var F,M;const t=e,s=ye(),n=ye(),r=ye(as),i=is(),{activate:o}=Ms(s,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:c,theme:l}=i,h=st(async()=>{var p,g,N,O,P,V,I,L,q;return at(le.loadJSON((N=await((g=(p=r.value)[c.value])==null?void 0:g.call(p)))==null?void 0:N.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((O=l.value.search)==null?void 0:O.provider)==="local"&&((V=(P=l.value.search.options)==null?void 0:P.miniSearch)==null?void 0:V.searchOptions)},...((I=l.value.search)==null?void 0:I.provider)==="local"&&((q=(L=l.value.search.options)==null?void 0:L.miniSearch)==null?void 0:q.options)}))}),f=ve(()=>{var p,g;return((p=l.value.search)==null?void 0:p.provider)==="local"&&((g=l.value.search.options)==null?void 0:g.disableQueryPersistence)===!0}).value?ne(""):Dt("vitepress:local-search-filter",""),b=zt("vitepress:local-search-detailed-list",((F=l.value.search)==null?void 0:F.provider)==="local"&&((M=l.value.search.options)==null?void 0:M.detailedView)===!0),y=ve(()=>{var p,g,N;return((p=l.value.search)==null?void 0:p.provider)==="local"&&(((g=l.value.search.options)==null?void 0:g.disableDetailedView)===!0||((N=l.value.search.options)==null?void 0:N.detailedView)===!1)}),_=ve(()=>{var g,N,O,P,V,I,L;const p=((g=l.value.search)==null?void 0:g.options)??l.value.algolia;return((V=(P=(O=(N=p==null?void 0:p.locales)==null?void 0:N[c.value])==null?void 0:O.translations)==null?void 0:P.button)==null?void 0:V.buttonText)||((L=(I=p==null?void 0:p.translations)==null?void 0:I.button)==null?void 0:L.buttonText)||"Search"});Pt(()=>{y.value&&(b.value=!1)});const w=ye([]),R=ne(!1);je(f,()=>{R.value=!1});const C=st(async()=>{if(n.value)return at(new Ls(n.value))},null),J=new qs(16);Vt(()=>[h.value,f.value,b.value],async([p,g,N],O,P)=>{var ge,qe,Ge,Qe;(O==null?void 0:O[0])!==p&&J.clear();let V=!1;if(P(()=>{V=!0}),!p)return;w.value=p.search(g).slice(0,16),R.value=!0;const I=N?await Promise.all(w.value.map(B=>H(B.id))):[];if(V)return;for(const{id:B,mod:ee}of I){const te=B.slice(0,B.indexOf("#"));let Y=J.get(te);if(Y)continue;Y=new Map,J.set(te,Y);const G=ee.default??ee;if(G!=null&&G.render||G!=null&&G.setup){const se=Xt(G);se.config.warnHandler=()=>{},se.provide(es,i),Object.defineProperties(se.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const He=document.createElement("div");se.mount(He),He.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(ue=>{var Xe;const be=(Xe=ue.querySelector("a"))==null?void 0:Xe.getAttribute("href"),Ye=(be==null?void 0:be.startsWith("#"))&&be.slice(1);if(!Ye)return;let Ze="";for(;(ue=ue.nextElementSibling)&&!/^h[1-6]$/i.test(ue.tagName);)Ze+=ue.outerHTML;Y.set(Ye,Ze)}),se.unmount()}if(V)return}const L=new Set;if(w.value=w.value.map(B=>{const[ee,te]=B.id.split("#"),Y=J.get(ee),G=(Y==null?void 0:Y.get(te))??"";for(const se in B.match)L.add(se);return{...B,text:G}}),await de(),V)return;await new Promise(B=>{var ee;(ee=C.value)==null||ee.unmark({done:()=>{var te;(te=C.value)==null||te.markRegExp(k(L),{done:B})}})});const q=((ge=s.value)==null?void 0:ge.querySelectorAll(".result .excerpt"))??[];for(const B of q)(qe=B.querySelector('mark[data-markjs="true"]'))==null||qe.scrollIntoView({block:"center"});(Qe=(Ge=n.value)==null?void 0:Ge.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function H(p){const g=ts(p.slice(0,p.indexOf("#")));try{if(!g)throw new Error(`Cannot find file for id: ${p}`);return{id:p,mod:await import(g)}}catch(N){return console.error(N),{id:p,mod:{}}}}const W=ne(),j=ve(()=>{var p;return((p=f.value)==null?void 0:p.length)<=0});function $(p=!0){var g,N;(g=W.value)==null||g.focus(),p&&((N=W.value)==null||N.select())}Me(()=>{$()});function Re(p){p.pointerType==="mouse"&&$()}const A=ne(-1),U=ne(!1);je(w,p=>{A.value=p.length?0:-1,T()});function T(){de(()=>{const p=document.querySelector(".result.selected");p==null||p.scrollIntoView({block:"nearest"})})}we("ArrowUp",p=>{p.preventDefault(),A.value--,A.value<0&&(A.value=w.value.length-1),U.value=!0,T()}),we("ArrowDown",p=>{p.preventDefault(),A.value++,A.value>=w.value.length&&(A.value=0),U.value=!0,T()});const u=jt();we("Enter",p=>{if(p.isComposing||p.target instanceof HTMLButtonElement&&p.target.type!=="submit")return;const g=w.value[A.value];if(p.target instanceof HTMLInputElement&&!g){p.preventDefault();return}g&&(u.go(g.id),t("close"))}),we("Escape",()=>{t("close")});const m=rs({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Me(()=>{window.history.pushState(null,"",null)}),$t("popstate",p=>{p.preventDefault(),t("close")});const S=Bt(Wt?document.body:null);Me(()=>{de(()=>{S.value=!0,de().then(()=>o())})}),Kt(()=>{S.value=!1});function E(){f.value="",de().then(()=>$(!1))}function k(p){return new RegExp([...p].sort((g,N)=>N.length-g.length).map(g=>`(${ss(g)})`).join("|"),"gi")}return(p,g)=>{var N,O,P,V;return Q(),Jt(Ht,{to:"body"},[x("div",{ref_key:"el",ref:s,role:"button","aria-owns":(N=w.value)!=null&&N.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[x("div",{class:"backdrop",onClick:g[0]||(g[0]=I=>p.$emit("close"))}),x("div",Qs,[x("form",{class:"search-bar",onPointerup:g[4]||(g[4]=I=>Re(I)),onSubmit:g[5]||(g[5]=Ut(()=>{},["prevent"]))},[x("label",{title:_.value,id:"localsearch-label",for:"localsearch-input"},Zs,8,Hs),x("div",Xs,[x("button",{class:"back-button",title:D(m)("modal.backButtonTitle"),onClick:g[1]||(g[1]=I=>p.$emit("close"))},sn,8,en)]),qt(x("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":g[2]||(g[2]=I=>Qt(f)?f.value=I:null),placeholder:_.value,id:"localsearch-input","aria-labelledby":"localsearch-label",class:"search-input"},null,8,nn),[[Gt,D(f)]]),x("div",rn,[y.value?_e("",!0):(Q(),Z("button",{key:0,class:nt(["toggle-layout-button",{"detailed-list":D(b)}]),type:"button",title:D(m)("modal.displayDetails"),onClick:g[3]||(g[3]=I=>A.value>-1&&(b.value=!D(b)))},cn,10,an)),x("button",{class:"clear-button",type:"reset",disabled:j.value,title:D(m)("modal.resetButtonTitle"),onClick:E},dn,8,ln)])],32),x("ul",{ref_key:"resultsEl",ref:n,id:(O=w.value)!=null&&O.length?"localsearch-list":void 0,role:(P=w.value)!=null&&P.length?"listbox":void 0,"aria-labelledby":(V=w.value)!=null&&V.length?"localsearch-label":void 0,class:"results",onMousemove:g[7]||(g[7]=I=>U.value=!1)},[(Q(!0),Z(rt,null,it(w.value,(I,L)=>(Q(),Z("li",{key:I.id,role:"option","aria-selected":A.value===L?"true":"false"},[x("a",{href:I.id,class:nt(["result",{selected:A.value===L}]),"aria-label":[...I.titles,I.title].join(" > "),onMouseenter:q=>!U.value&&(A.value=L),onFocusin:q=>A.value=L,onClick:g[6]||(g[6]=q=>p.$emit("close"))},[x("div",null,[x("div",vn,[mn,(Q(!0),Z(rt,null,it(I.titles,(q,ge)=>(Q(),Z("span",{key:ge,class:"title"},[x("span",{class:"text",innerHTML:q},null,8,gn),bn]))),128)),x("span",yn,[x("span",{class:"text",innerHTML:I.title},null,8,wn)])]),D(b)?(Q(),Z("div",_n,[I.text?(Q(),Z("div",xn,[x("div",{class:"vp-doc",innerHTML:I.text},null,8,Sn)])):_e("",!0),En,Tn])):_e("",!0)])],42,pn)],8,fn))),128)),D(f)&&!w.value.length&&R.value?(Q(),Z("li",In,[he(fe(D(m)("modal.noResultsText"))+' "',1),x("strong",null,fe(D(f)),1),he('" ')])):_e("",!0)],40,hn),x("div",Nn,[x("span",null,[x("kbd",{"aria-label":D(m)("modal.footer.navigateUpKeyAriaLabel")},On,8,kn),x("kbd",{"aria-label":D(m)("modal.footer.navigateDownKeyAriaLabel")},Mn,8,Rn),he(" "+fe(D(m)("modal.footer.navigateText")),1)]),x("span",null,[x("kbd",{"aria-label":D(m)("modal.footer.selectKeyAriaLabel")},Dn,8,An),he(" "+fe(D(m)("modal.footer.selectText")),1)]),x("span",null,[x("kbd",{"aria-label":D(m)("modal.footer.closeKeyAriaLabel")},"esc",8,zn),he(" "+fe(D(m)("modal.footer.closeText")),1)])])])],8,Gs)])}}}),Kn=ns(Pn,[["__scopeId","data-v-a5632211"]]);export{Kn as default}; diff --git a/assets/chunks/framework.C3o_UkTa.js b/assets/chunks/framework.C3o_UkTa.js new file mode 100644 index 00000000..9a869c33 --- /dev/null +++ b/assets/chunks/framework.C3o_UkTa.js @@ -0,0 +1,17 @@ +/** +* @vue/shared v3.4.38 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function wr(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const ne={},yt=[],Ae=()=>{},Mi=()=>!1,Kt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Er=e=>e.startsWith("onUpdate:"),fe=Object.assign,Cr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ii=Object.prototype.hasOwnProperty,z=(e,t)=>Ii.call(e,t),k=Array.isArray,_t=e=>Tn(e)==="[object Map]",Xs=e=>Tn(e)==="[object Set]",q=e=>typeof e=="function",ie=e=>typeof e=="string",Qe=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",Ys=e=>(Z(e)||q(e))&&q(e.then)&&q(e.catch),zs=Object.prototype.toString,Tn=e=>zs.call(e),Pi=e=>Tn(e).slice(8,-1),Js=e=>Tn(e)==="[object Object]",Sr=e=>ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bt=wr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ni=/-(\w)/g,Le=xn(e=>e.replace(Ni,(t,n)=>n?n.toUpperCase():"")),Fi=/\B([A-Z])/g,Ze=xn(e=>e.replace(Fi,"-$1").toLowerCase()),An=xn(e=>e.charAt(0).toUpperCase()+e.slice(1)),fn=xn(e=>e?`on${An(e)}`:""),ze=(e,t)=>!Object.is(e,t),dn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},cr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},$i=e=>{const t=ie(e)?Number(e):NaN;return isNaN(t)?e:t};let Qr;const Zs=()=>Qr||(Qr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Tr(e){if(k(e)){const t={};for(let n=0;n{if(n){const r=n.split(ji);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function xr(e){let t="";if(ie(e))t=e;else if(k(e))for(let n=0;n!!(e&&e.__v_isRef===!0),ki=e=>ie(e)?e:e==null?"":k(e)||Z(e)&&(e.toString===zs||!q(e.toString))?to(e)?ki(e.value):JSON.stringify(e,no,2):String(e),no=(e,t)=>to(t)?no(e,t.value):_t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[kn(r,o)+" =>"]=s,n),{})}:Xs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>kn(n))}:Qe(t)?kn(t):Z(t)&&!k(t)&&!Js(t)?String(t):t,kn=(e,t="")=>{var n;return Qe(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.4.38 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ee;class Ki{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ee,!t&&Ee&&(this.index=(Ee.scopes||(Ee.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Ee;try{return Ee=this,t()}finally{Ee=n}}}on(){Ee=this}off(){Ee=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),tt()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Xe,n=ct;try{return Xe=!0,ct=this,this._runnings++,Zr(this),this.fn()}finally{es(this),this._runnings--,ct=n,Xe=t}}stop(){this.active&&(Zr(this),es(this),this.onStop&&this.onStop(),this.active=!1)}}function Gi(e){return e.value}function Zr(e){e._trackId++,e._depsLength=0}function es(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},yn=new WeakMap,at=Symbol(""),fr=Symbol("");function ve(e,t,n){if(Xe&&ct){let r=yn.get(e);r||yn.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=co(()=>r.delete(n))),io(ct,s)}}function Ve(e,t,n,r,s,o){const i=yn.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&k(e)){const c=Number(r);i.forEach((u,f)=>{(f==="length"||!Qe(f)&&f>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(i.get(n)),t){case"add":k(e)?Sr(n)&&l.push(i.get("length")):(l.push(i.get(at)),_t(e)&&l.push(i.get(fr)));break;case"delete":k(e)||(l.push(i.get(at)),_t(e)&&l.push(i.get(fr)));break;case"set":_t(e)&&l.push(i.get(at));break}Rr();for(const c of l)c&&lo(c,4);Or()}function Xi(e,t){const n=yn.get(e);return n&&n.get(t)}const Yi=wr("__proto__,__v_isRef,__isVue"),ao=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Qe)),ts=zi();function zi(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=J(this);for(let o=0,i=this.length;o{e[t]=function(...n){et(),Rr();const r=J(this)[t].apply(this,n);return Or(),tt(),r}}),e}function Ji(e){Qe(e)||(e=String(e));const t=J(this);return ve(t,"has",e),t.hasOwnProperty(e)}class uo{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?ul:go:o?po:ho).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=k(t);if(!s){if(i&&z(ts,n))return Reflect.get(ts,n,r);if(n==="hasOwnProperty")return Ji}const l=Reflect.get(t,n,r);return(Qe(n)?ao.has(n):Yi(n))||(s||ve(t,"get",n),o)?l:he(l)?i&&Sr(n)?l:l.value:Z(l)?s?Ln(l):On(l):l}}class fo extends uo{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const c=dt(o);if(!Tt(r)&&!dt(r)&&(o=J(o),r=J(r)),!k(t)&&he(o)&&!he(r))return c?!1:(o.value=r,!0)}const i=k(t)&&Sr(n)?Number(n)e,Rn=e=>Reflect.getPrototypeOf(e);function Jt(e,t,n=!1,r=!1){e=e.__v_raw;const s=J(e),o=J(t);n||(ze(t,o)&&ve(s,"get",t),ve(s,"get",o));const{has:i}=Rn(s),l=r?Lr:n?Pr:jt;if(i.call(s,t))return l(e.get(t));if(i.call(s,o))return l(e.get(o));e!==s&&e.get(t)}function Qt(e,t=!1){const n=this.__v_raw,r=J(n),s=J(e);return t||(ze(e,s)&&ve(r,"has",e),ve(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function Zt(e,t=!1){return e=e.__v_raw,!t&&ve(J(e),"iterate",at),Reflect.get(e,"size",e)}function ns(e,t=!1){!t&&!Tt(e)&&!dt(e)&&(e=J(e));const n=J(this);return Rn(n).has.call(n,e)||(n.add(e),Ve(n,"add",e,e)),this}function rs(e,t,n=!1){!n&&!Tt(t)&&!dt(t)&&(t=J(t));const r=J(this),{has:s,get:o}=Rn(r);let i=s.call(r,e);i||(e=J(e),i=s.call(r,e));const l=o.call(r,e);return r.set(e,t),i?ze(t,l)&&Ve(r,"set",e,t):Ve(r,"add",e,t),this}function ss(e){const t=J(this),{has:n,get:r}=Rn(t);let s=n.call(t,e);s||(e=J(e),s=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return s&&Ve(t,"delete",e,void 0),o}function os(){const e=J(this),t=e.size!==0,n=e.clear();return t&&Ve(e,"clear",void 0,void 0),n}function en(e,t){return function(r,s){const o=this,i=o.__v_raw,l=J(i),c=t?Lr:e?Pr:jt;return!e&&ve(l,"iterate",at),i.forEach((u,f)=>r.call(s,c(u),c(f),o))}}function tn(e,t,n){return function(...r){const s=this.__v_raw,o=J(s),i=_t(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,u=s[e](...r),f=n?Lr:t?Pr:jt;return!t&&ve(o,"iterate",c?fr:at),{next(){const{value:h,done:m}=u.next();return m?{value:h,done:m}:{value:l?[f(h[0]),f(h[1])]:f(h),done:m}},[Symbol.iterator](){return this}}}}function Ue(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nl(){const e={get(o){return Jt(this,o)},get size(){return Zt(this)},has:Qt,add:ns,set:rs,delete:ss,clear:os,forEach:en(!1,!1)},t={get(o){return Jt(this,o,!1,!0)},get size(){return Zt(this)},has:Qt,add(o){return ns.call(this,o,!0)},set(o,i){return rs.call(this,o,i,!0)},delete:ss,clear:os,forEach:en(!1,!0)},n={get(o){return Jt(this,o,!0)},get size(){return Zt(this,!0)},has(o){return Qt.call(this,o,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:en(!0,!1)},r={get(o){return Jt(this,o,!0,!0)},get size(){return Zt(this,!0)},has(o){return Qt.call(this,o,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:en(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=tn(o,!1,!1),n[o]=tn(o,!0,!1),t[o]=tn(o,!1,!0),r[o]=tn(o,!0,!0)}),[e,n,t,r]}const[rl,sl,ol,il]=nl();function Mr(e,t){const n=t?e?il:ol:e?sl:rl;return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(z(n,s)&&s in r?n:r,s,o)}const ll={get:Mr(!1,!1)},cl={get:Mr(!1,!0)},al={get:Mr(!0,!1)};const ho=new WeakMap,po=new WeakMap,go=new WeakMap,ul=new WeakMap;function fl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dl(e){return e.__v_skip||!Object.isExtensible(e)?0:fl(Pi(e))}function On(e){return dt(e)?e:Ir(e,!1,Zi,ll,ho)}function hl(e){return Ir(e,!1,tl,cl,po)}function Ln(e){return Ir(e,!0,el,al,go)}function Ir(e,t,n,r,s){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=dl(e);if(i===0)return e;const l=new Proxy(e,i===2?r:n);return s.set(e,l),l}function vt(e){return dt(e)?vt(e.__v_raw):!!(e&&e.__v_isReactive)}function dt(e){return!!(e&&e.__v_isReadonly)}function Tt(e){return!!(e&&e.__v_isShallow)}function mo(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function hn(e){return Object.isExtensible(e)&&Qs(e,"__v_skip",!0),e}const jt=e=>Z(e)?On(e):e,Pr=e=>Z(e)?Ln(e):e;class yo{constructor(t,n,r,s){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ar(()=>t(this._value),()=>It(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=J(this);return(!t._cacheable||t.effect.dirty)&&ze(t._value,t._value=t.effect.run())&&It(t,4),Nr(t),t.effect._dirtyLevel>=2&&It(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function pl(e,t,n=!1){let r,s;const o=q(e);return o?(r=e,s=Ae):(r=e.get,s=e.set),new yo(r,s,o||!s,n)}function Nr(e){var t;Xe&&ct&&(e=J(e),io(ct,(t=e.dep)!=null?t:e.dep=co(()=>e.dep=void 0,e instanceof yo?e:void 0)))}function It(e,t=4,n,r){e=J(e);const s=e.dep;s&&lo(s,t)}function he(e){return!!(e&&e.__v_isRef===!0)}function oe(e){return _o(e,!1)}function Fr(e){return _o(e,!0)}function _o(e,t){return he(e)?e:new gl(e,t)}class gl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:J(t),this._value=n?t:jt(t)}get value(){return Nr(this),this._value}set value(t){const n=this.__v_isShallow||Tt(t)||dt(t);t=n?t:J(t),ze(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:jt(t),It(this,4))}}function bo(e){return he(e)?e.value:e}const ml={get:(e,t,n)=>bo(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return he(s)&&!he(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function vo(e){return vt(e)?e:new Proxy(e,ml)}class yl{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Nr(this),()=>It(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function _l(e){return new yl(e)}class bl{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Xi(J(this._object),this._key)}}class vl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function wl(e,t,n){return he(e)?e:q(e)?new vl(e):Z(e)&&arguments.length>1?El(e,t,n):oe(e)}function El(e,t,n){const r=e[t];return he(r)?r:new bl(e,t,n)}/** +* @vue/runtime-core v3.4.38 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Ye(e,t,n,r){try{return r?e(...r):e()}catch(s){Wt(s,t,n)}}function Re(e,t,n,r){if(q(e)){const s=Ye(e,t,n,r);return s&&Ys(s)&&s.catch(o=>{Wt(o,t,n)}),s}if(k(e)){const s=[];for(let o=0;o>>1,s=ge[r],o=Dt(s);oFe&&ge.splice(t,1)}function xl(e){k(e)?wt.push(...e):(!Ke||!Ke.includes(e,e.allowRecurse?it+1:it))&&wt.push(e),Eo()}function is(e,t,n=Vt?Fe+1:0){for(;nDt(n)-Dt(r));if(wt.length=0,Ke){Ke.push(...t);return}for(Ke=t,it=0;ite.id==null?1/0:e.id,Al=(e,t)=>{const n=Dt(e)-Dt(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Co(e){dr=!1,Vt=!0,ge.sort(Al);try{for(Fe=0;Fe{r._d&&bs(-1);const o=bn(t);let i;try{i=e(...s)}finally{bn(o),r._d&&bs(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function au(e,t){if(ue===null)return e;const n=Vn(ue),r=e.dirs||(e.dirs=[]);for(let s=0;s{e.isMounted=!0}),Oo(()=>{e.isUnmounting=!0}),e}const Se=[Function,Array],So={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Se,onEnter:Se,onAfterEnter:Se,onEnterCancelled:Se,onBeforeLeave:Se,onLeave:Se,onAfterLeave:Se,onLeaveCancelled:Se,onBeforeAppear:Se,onAppear:Se,onAfterAppear:Se,onAppearCancelled:Se},To=e=>{const t=e.subTree;return t.component?To(t.component):t},Ll={name:"BaseTransition",props:So,setup(e,{slots:t}){const n=jn(),r=Ol();return()=>{const s=t.default&&Ao(t.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const m of s)if(m.type!==ye){o=m;break}}const i=J(e),{mode:l}=i;if(r.isLeaving)return Kn(o);const c=ls(o);if(!c)return Kn(o);let u=hr(c,i,r,n,m=>u=m);vn(c,u);const f=n.subTree,h=f&&ls(f);if(h&&h.type!==ye&&!lt(c,h)&&To(n).type!==ye){const m=hr(h,i,r,n);if(vn(h,m),l==="out-in"&&c.type!==ye)return r.isLeaving=!0,m.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Kn(o);l==="in-out"&&c.type!==ye&&(m.delayLeave=(_,w,O)=>{const U=xo(r,h);U[String(h.key)]=h,_[We]=()=>{w(),_[We]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return o}}},Ml=Ll;function xo(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function hr(e,t,n,r,s){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:m,onLeave:_,onAfterLeave:w,onLeaveCancelled:O,onBeforeAppear:U,onAppear:W,onAfterAppear:H,onAppearCancelled:p}=t,y=String(e.key),I=xo(n,e),x=(M,b)=>{M&&Re(M,r,9,b)},F=(M,b)=>{const P=b[1];x(M,b),k(M)?M.every(S=>S.length<=1)&&P():M.length<=1&&P()},V={mode:i,persisted:l,beforeEnter(M){let b=c;if(!n.isMounted)if(o)b=U||c;else return;M[We]&&M[We](!0);const P=I[y];P&<(e,P)&&P.el[We]&&P.el[We](),x(b,[M])},enter(M){let b=u,P=f,S=h;if(!n.isMounted)if(o)b=W||u,P=H||f,S=p||h;else return;let K=!1;const ee=M[nn]=re=>{K||(K=!0,re?x(S,[M]):x(P,[M]),V.delayedLeave&&V.delayedLeave(),M[nn]=void 0)};b?F(b,[M,ee]):ee()},leave(M,b){const P=String(e.key);if(M[nn]&&M[nn](!0),n.isUnmounting)return b();x(m,[M]);let S=!1;const K=M[We]=ee=>{S||(S=!0,b(),ee?x(O,[M]):x(w,[M]),M[We]=void 0,I[P]===e&&delete I[P])};I[P]=e,_?F(_,[M,K]):K()},clone(M){const b=hr(M,t,n,r,s);return s&&s(b),b}};return V}function Kn(e){if(qt(e))return e=Je(e),e.children=null,e}function ls(e){if(!qt(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&q(n.default))return n.default()}}function vn(e,t){e.shapeFlag&6&&e.component?vn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ao(e,t=!1,n){let r=[],s=0;for(let o=0;o1)for(let o=0;o!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function uu(e){q(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,timeout:o,suspensible:i=!0,onError:l}=e;let c=null,u,f=0;const h=()=>(f++,c=null,m()),m=()=>{let _;return c||(_=c=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((O,U)=>{l(w,()=>O(h()),()=>U(w),f+1)});throw w}).then(w=>_!==c&&c?c:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return Hr({name:"AsyncComponentWrapper",__asyncLoader:m,get __asyncResolved(){return u},setup(){const _=ae;if(u)return()=>Wn(u,_);const w=H=>{c=null,Wt(H,_,13,!r)};if(i&&_.suspense||Xt)return m().then(H=>()=>Wn(H,_)).catch(H=>(w(H),()=>r?le(r,{error:H}):null));const O=oe(!1),U=oe(),W=oe(!!s);return s&&setTimeout(()=>{W.value=!1},s),o!=null&&setTimeout(()=>{if(!O.value&&!U.value){const H=new Error(`Async component timed out after ${o}ms.`);w(H),U.value=H}},o),m().then(()=>{O.value=!0,_.parent&&qt(_.parent.vnode)&&(_.parent.effect.dirty=!0,In(_.parent.update))}).catch(H=>{w(H),U.value=H}),()=>{if(O.value&&u)return Wn(u,_);if(U.value&&r)return le(r,{error:U.value});if(n&&!W.value)return le(n)}}})}function Wn(e,t){const{ref:n,props:r,children:s,ce:o}=t.vnode,i=le(e,r,s);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const qt=e=>e.type.__isKeepAlive;function Il(e,t){Ro(e,"a",t)}function Pl(e,t){Ro(e,"da",t)}function Ro(e,t,n=ae){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Nn(t,r,n),n){let s=n.parent;for(;s&&s.parent;)qt(s.parent.vnode)&&Nl(r,t,n,s),s=s.parent}}function Nl(e,t,n,r){const s=Nn(t,e,r,!0);Fn(()=>{Cr(r[t],s)},n)}function Nn(e,t,n=ae,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{et();const l=Gt(n),c=Re(t,n,e,i);return l(),tt(),c});return r?s.unshift(o):s.push(o),o}}const De=e=>(t,n=ae)=>{(!Xt||e==="sp")&&Nn(e,(...r)=>t(...r),n)},Fl=De("bm"),At=De("m"),$l=De("bu"),Hl=De("u"),Oo=De("bum"),Fn=De("um"),jl=De("sp"),Vl=De("rtg"),Dl=De("rtc");function Ul(e,t=ae){Nn("ec",e,t)}const jr="components";function fu(e,t){return Mo(jr,e,!0,t)||e}const Lo=Symbol.for("v-ndc");function du(e){return ie(e)?Mo(jr,e,!1)||e:e||Lo}function Mo(e,t,n=!0,r=!1){const s=ue||ae;if(s){const o=s.type;if(e===jr){const l=Pc(o,!1);if(l&&(l===t||l===Le(t)||l===An(Le(t))))return o}const i=cs(s[e]||o[e],t)||cs(s.appContext[e],t);return!i&&r?o:i}}function cs(e,t){return e&&(e[t]||e[Le(t)]||e[An(Le(t))])}function hu(e,t,n,r){let s;const o=n;if(k(e)||ie(e)){s=new Array(e.length);for(let i=0,l=e.length;it(i,l,void 0,o));else{const i=Object.keys(e);s=new Array(i.length);for(let l=0,c=i.length;lCn(t)?!(t.type===ye||t.type===be&&!Io(t.children)):!0)?e:null}function gu(e,t){const n={};for(const r in e)n[/[A-Z]/.test(r)?`on:${r}`:fn(r)]=e[r];return n}const pr=e=>e?oi(e)?Vn(e):pr(e.parent):null,Pt=fe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pr(e.parent),$root:e=>pr(e.root),$emit:e=>e.emit,$options:e=>Vr(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,In(e.update)}),$nextTick:e=>e.n||(e.n=Mn.bind(e.proxy)),$watch:e=>gc.bind(e)}),qn=(e,t)=>e!==ne&&!e.__isScriptSetup&&z(e,t),Bl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const _=i[t];if(_!==void 0)switch(_){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(qn(r,t))return i[t]=1,r[t];if(s!==ne&&z(s,t))return i[t]=2,s[t];if((u=e.propsOptions[0])&&z(u,t))return i[t]=3,o[t];if(n!==ne&&z(n,t))return i[t]=4,n[t];gr&&(i[t]=0)}}const f=Pt[t];let h,m;if(f)return t==="$attrs"&&ve(e.attrs,"get",""),f(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==ne&&z(n,t))return i[t]=4,n[t];if(m=c.config.globalProperties,z(m,t))return m[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return qn(s,t)?(s[t]=n,!0):r!==ne&&z(r,t)?(r[t]=n,!0):z(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let l;return!!n[i]||e!==ne&&z(e,i)||qn(t,i)||(l=o[0])&&z(l,i)||z(r,i)||z(Pt,i)||z(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:z(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function mu(){return kl().slots}function kl(){const e=jn();return e.setupContext||(e.setupContext=li(e))}function as(e){return k(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let gr=!0;function Kl(e){const t=Vr(e),n=e.proxy,r=e.ctx;gr=!1,t.beforeCreate&&us(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:l,provide:c,inject:u,created:f,beforeMount:h,mounted:m,beforeUpdate:_,updated:w,activated:O,deactivated:U,beforeDestroy:W,beforeUnmount:H,destroyed:p,unmounted:y,render:I,renderTracked:x,renderTriggered:F,errorCaptured:V,serverPrefetch:M,expose:b,inheritAttrs:P,components:S,directives:K,filters:ee}=t;if(u&&Wl(u,r,null),i)for(const Y in i){const B=i[Y];q(B)&&(r[Y]=B.bind(n))}if(s){const Y=s.call(n,n);Z(Y)&&(e.data=On(Y))}if(gr=!0,o)for(const Y in o){const B=o[Y],de=q(B)?B.bind(n,n):q(B.get)?B.get.bind(n,n):Ae,Yt=!q(B)&&q(B.set)?B.set.bind(n):Ae,nt=se({get:de,set:Yt});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>nt.value,set:Ie=>nt.value=Ie})}if(l)for(const Y in l)Po(l[Y],r,n,Y);if(c){const Y=q(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(B=>{Jl(B,Y[B])})}f&&us(f,e,"c");function D(Y,B){k(B)?B.forEach(de=>Y(de.bind(n))):B&&Y(B.bind(n))}if(D(Fl,h),D(At,m),D($l,_),D(Hl,w),D(Il,O),D(Pl,U),D(Ul,V),D(Dl,x),D(Vl,F),D(Oo,H),D(Fn,y),D(jl,M),k(b))if(b.length){const Y=e.exposed||(e.exposed={});b.forEach(B=>{Object.defineProperty(Y,B,{get:()=>n[B],set:de=>n[B]=de})})}else e.exposed||(e.exposed={});I&&e.render===Ae&&(e.render=I),P!=null&&(e.inheritAttrs=P),S&&(e.components=S),K&&(e.directives=K)}function Wl(e,t,n=Ae){k(e)&&(e=mr(e));for(const r in e){const s=e[r];let o;Z(s)?"default"in s?o=St(s.from||r,s.default,!0):o=St(s.from||r):o=St(s),he(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function us(e,t,n){Re(k(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Po(e,t,n,r){const s=r.includes(".")?zo(n,r):()=>n[r];if(ie(e)){const o=t[e];q(o)&&$e(s,o)}else if(q(e))$e(s,e.bind(n));else if(Z(e))if(k(e))e.forEach(o=>Po(o,t,n,r));else{const o=q(e.handler)?e.handler.bind(n):t[e.handler];q(o)&&$e(s,o,e)}}function Vr(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!s.length&&!n&&!r?c=t:(c={},s.length&&s.forEach(u=>wn(c,u,i,!0)),wn(c,t,i)),Z(t)&&o.set(t,c),c}function wn(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&wn(e,o,n,!0),s&&s.forEach(i=>wn(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const l=ql[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const ql={data:fs,props:ds,emits:ds,methods:Mt,computed:Mt,beforeCreate:me,created:me,beforeMount:me,mounted:me,beforeUpdate:me,updated:me,beforeDestroy:me,beforeUnmount:me,destroyed:me,unmounted:me,activated:me,deactivated:me,errorCaptured:me,serverPrefetch:me,components:Mt,directives:Mt,watch:Xl,provide:fs,inject:Gl};function fs(e,t){return t?e?function(){return fe(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function Gl(e,t){return Mt(mr(e),mr(t))}function mr(e){if(k(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(r&&r.proxy):t}}const Fo={},$o=()=>Object.create(Fo),Ho=e=>Object.getPrototypeOf(e)===Fo;function Ql(e,t,n,r=!1){const s={},o=$o();e.propsDefaults=Object.create(null),jo(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:hl(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function Zl(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,l=J(s),[c]=e.propsOptions;let u=!1;if((r||i>0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[m,_]=Vo(h,t,!0);fe(i,m),_&&l.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return Z(e)&&r.set(e,yt),yt;if(k(o))for(let f=0;fe[0]==="_"||e==="$stable",Dr=e=>k(e)?e.map(xe):[xe(e)],tc=(e,t,n)=>{if(t._n)return t;const r=Rl((...s)=>Dr(t(...s)),n);return r._c=!1,r},Uo=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Do(s))continue;const o=e[s];if(q(o))t[s]=tc(s,o,r);else if(o!=null){const i=Dr(o);t[s]=()=>i}}},Bo=(e,t)=>{const n=Dr(t);e.slots.default=()=>n},ko=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},nc=(e,t,n)=>{const r=e.slots=$o();if(e.vnode.shapeFlag&32){const s=t._;s?(ko(r,t,n),n&&Qs(r,"_",s,!0)):Uo(t,r)}else t&&Bo(e,t)},rc=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=ne;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:ko(s,t,n):(o=!t.$stable,Uo(t,s)),i=t}else t&&(Bo(e,t),i={default:1});if(o)for(const l in s)!Do(l)&&i[l]==null&&delete s[l]};function En(e,t,n,r,s=!1){if(k(e)){e.forEach((m,_)=>En(m,t&&(k(t)?t[_]:t),n,r,s));return}if(Et(r)&&!s)return;const o=r.shapeFlag&4?Vn(r.component):r.el,i=s?null:o,{i:l,r:c}=e,u=t&&t.r,f=l.refs===ne?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(ie(u)?(f[u]=null,z(h,u)&&(h[u]=null)):he(u)&&(u.value=null)),q(c))Ye(c,l,12,[i,f]);else{const m=ie(c),_=he(c);if(m||_){const w=()=>{if(e.f){const O=m?z(h,c)?h[c]:f[c]:c.value;s?k(O)&&Cr(O,o):k(O)?O.includes(o)||O.push(o):m?(f[c]=[o],z(h,c)&&(h[c]=f[c])):(c.value=[o],e.k&&(f[e.k]=c.value))}else m?(f[c]=i,z(h,c)&&(h[c]=i)):_&&(c.value=i,e.k&&(f[e.k]=i))};i?(w.id=-1,_e(w,n)):w()}}}const Ko=Symbol("_vte"),sc=e=>e.__isTeleport,Nt=e=>e&&(e.disabled||e.disabled===""),ps=e=>typeof SVGElement<"u"&&e instanceof SVGElement,gs=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_r=(e,t)=>{const n=e&&e.to;return ie(n)?t?t(n):null:n},oc={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,l,c,u){const{mc:f,pc:h,pbc:m,o:{insert:_,querySelector:w,createText:O,createComment:U}}=u,W=Nt(t.props);let{shapeFlag:H,children:p,dynamicChildren:y}=t;if(e==null){const I=t.el=O(""),x=t.anchor=O("");_(I,n,r),_(x,n,r);const F=t.target=_r(t.props,w),V=qo(F,t,O,_);F&&(i==="svg"||ps(F)?i="svg":(i==="mathml"||gs(F))&&(i="mathml"));const M=(b,P)=>{H&16&&f(p,b,P,s,o,i,l,c)};W?M(n,x):F&&M(F,V)}else{t.el=e.el,t.targetStart=e.targetStart;const I=t.anchor=e.anchor,x=t.target=e.target,F=t.targetAnchor=e.targetAnchor,V=Nt(e.props),M=V?n:x,b=V?I:F;if(i==="svg"||ps(x)?i="svg":(i==="mathml"||gs(x))&&(i="mathml"),y?(m(e.dynamicChildren,y,M,s,o,i,l),Ur(e,t,!0)):c||h(e,t,M,b,s,o,i,l,!1),W)V?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):rn(t,n,I,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=t.target=_r(t.props,w);P&&rn(t,P,null,u,0)}else V&&rn(t,x,F,u,1)}Wo(t)},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:u,targetAnchor:f,target:h,props:m}=e;if(h&&(s(u),s(f)),o&&s(c),i&16){const _=o||!Nt(m);for(let w=0;w{ms||(console.error("Hydration completed but contains mismatches."),ms=!0)},lc=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",cc=e=>e.namespaceURI.includes("MathML"),sn=e=>{if(lc(e))return"svg";if(cc(e))return"mathml"},on=e=>e.nodeType===8;function ac(e){const{mt:t,p:n,o:{patchProp:r,createText:s,nextSibling:o,parentNode:i,remove:l,insert:c,createComment:u}}=e,f=(p,y)=>{if(!y.hasChildNodes()){n(null,p,y),_n(),y._vnode=p;return}h(y.firstChild,p,null,null,null),_n(),y._vnode=p},h=(p,y,I,x,F,V=!1)=>{V=V||!!y.dynamicChildren;const M=on(p)&&p.data==="[",b=()=>O(p,y,I,x,F,M),{type:P,ref:S,shapeFlag:K,patchFlag:ee}=y;let re=p.nodeType;y.el=p,ee===-2&&(V=!1,y.dynamicChildren=null);let D=null;switch(P){case ut:re!==3?y.children===""?(c(y.el=s(""),i(p),p),D=p):D=b():(p.data!==y.children&&(gt(),p.data=y.children),D=o(p));break;case ye:H(p)?(D=o(p),W(y.el=p.content.firstChild,p,I)):re!==8||M?D=b():D=o(p);break;case Ft:if(M&&(p=o(p),re=p.nodeType),re===1||re===3){D=p;const Y=!y.children.length;for(let B=0;B{V=V||!!y.dynamicChildren;const{type:M,props:b,patchFlag:P,shapeFlag:S,dirs:K,transition:ee}=y,re=M==="input"||M==="option";if(re||P!==-1){K&&Ne(y,null,I,"created");let D=!1;if(H(p)){D=Xo(x,ee)&&I&&I.vnode.props&&I.vnode.props.appear;const B=p.content.firstChild;D&&ee.beforeEnter(B),W(B,p,I),y.el=p=B}if(S&16&&!(b&&(b.innerHTML||b.textContent))){let B=_(p.firstChild,y,p,I,x,F,V);for(;B;){gt();const de=B;B=B.nextSibling,l(de)}}else S&8&&p.textContent!==y.children&&(gt(),p.textContent=y.children);if(b){if(re||!V||P&48){const B=p.tagName.includes("-");for(const de in b)(re&&(de.endsWith("value")||de==="indeterminate")||Kt(de)&&!bt(de)||de[0]==="."||B)&&r(p,de,null,b[de],void 0,I)}else if(b.onClick)r(p,"onClick",null,b.onClick,void 0,I);else if(P&4&&vt(b.style))for(const B in b.style)b.style[B]}let Y;(Y=b&&b.onVnodeBeforeMount)&&Te(Y,I,y),K&&Ne(y,null,I,"beforeMount"),((Y=b&&b.onVnodeMounted)||K||D)&&Qo(()=>{Y&&Te(Y,I,y),D&&ee.enter(p),K&&Ne(y,null,I,"mounted")},x)}return p.nextSibling},_=(p,y,I,x,F,V,M)=>{M=M||!!y.dynamicChildren;const b=y.children,P=b.length;for(let S=0;S{const{slotScopeIds:M}=y;M&&(F=F?F.concat(M):M);const b=i(p),P=_(o(p),y,b,I,x,F,V);return P&&on(P)&&P.data==="]"?o(y.anchor=P):(gt(),c(y.anchor=u("]"),b,P),P)},O=(p,y,I,x,F,V)=>{if(gt(),y.el=null,V){const P=U(p);for(;;){const S=o(p);if(S&&S!==P)l(S);else break}}const M=o(p),b=i(p);return l(p),n(null,y,b,M,I,x,sn(b),F),M},U=(p,y="[",I="]")=>{let x=0;for(;p;)if(p=o(p),p&&on(p)&&(p.data===y&&x++,p.data===I)){if(x===0)return o(p);x--}return p},W=(p,y,I)=>{const x=y.parentNode;x&&x.replaceChild(p,y);let F=I;for(;F;)F.vnode.el===y&&(F.vnode.el=F.subTree.el=p),F=F.parent},H=p=>p.nodeType===1&&p.tagName.toLowerCase()==="template";return[f,h]}const _e=Qo;function uc(e){return Go(e)}function fc(e){return Go(e,ac)}function Go(e,t){const n=Zs();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:l,createComment:c,setText:u,setElementText:f,parentNode:h,nextSibling:m,setScopeId:_=Ae,insertStaticContent:w}=e,O=(a,d,g,C=null,v=null,T=null,L=void 0,A=null,R=!!d.dynamicChildren)=>{if(a===d)return;a&&!lt(a,d)&&(C=zt(a),Ie(a,v,T,!0),a=null),d.patchFlag===-2&&(R=!1,d.dynamicChildren=null);const{type:E,ref:N,shapeFlag:j}=d;switch(E){case ut:U(a,d,g,C);break;case ye:W(a,d,g,C);break;case Ft:a==null&&H(d,g,C,L);break;case be:S(a,d,g,C,v,T,L,A,R);break;default:j&1?I(a,d,g,C,v,T,L,A,R):j&6?K(a,d,g,C,v,T,L,A,R):(j&64||j&128)&&E.process(a,d,g,C,v,T,L,A,R,ht)}N!=null&&v&&En(N,a&&a.ref,T,d||a,!d)},U=(a,d,g,C)=>{if(a==null)r(d.el=l(d.children),g,C);else{const v=d.el=a.el;d.children!==a.children&&u(v,d.children)}},W=(a,d,g,C)=>{a==null?r(d.el=c(d.children||""),g,C):d.el=a.el},H=(a,d,g,C)=>{[a.el,a.anchor]=w(a.children,d,g,C,a.el,a.anchor)},p=({el:a,anchor:d},g,C)=>{let v;for(;a&&a!==d;)v=m(a),r(a,g,C),a=v;r(d,g,C)},y=({el:a,anchor:d})=>{let g;for(;a&&a!==d;)g=m(a),s(a),a=g;s(d)},I=(a,d,g,C,v,T,L,A,R)=>{d.type==="svg"?L="svg":d.type==="math"&&(L="mathml"),a==null?x(d,g,C,v,T,L,A,R):M(a,d,v,T,L,A,R)},x=(a,d,g,C,v,T,L,A)=>{let R,E;const{props:N,shapeFlag:j,transition:$,dirs:G}=a;if(R=a.el=i(a.type,T,N&&N.is,N),j&8?f(R,a.children):j&16&&V(a.children,R,null,C,v,Gn(a,T),L,A),G&&Ne(a,null,C,"created"),F(R,a,a.scopeId,L,C),N){for(const te in N)te!=="value"&&!bt(te)&&o(R,te,null,N[te],T,C);"value"in N&&o(R,"value",null,N.value,T),(E=N.onVnodeBeforeMount)&&Te(E,C,a)}G&&Ne(a,null,C,"beforeMount");const X=Xo(v,$);X&&$.beforeEnter(R),r(R,d,g),((E=N&&N.onVnodeMounted)||X||G)&&_e(()=>{E&&Te(E,C,a),X&&$.enter(R),G&&Ne(a,null,C,"mounted")},v)},F=(a,d,g,C,v)=>{if(g&&_(a,g),C)for(let T=0;T{for(let E=R;E{const A=d.el=a.el;let{patchFlag:R,dynamicChildren:E,dirs:N}=d;R|=a.patchFlag&16;const j=a.props||ne,$=d.props||ne;let G;if(g&&rt(g,!1),(G=$.onVnodeBeforeUpdate)&&Te(G,g,d,a),N&&Ne(d,a,g,"beforeUpdate"),g&&rt(g,!0),(j.innerHTML&&$.innerHTML==null||j.textContent&&$.textContent==null)&&f(A,""),E?b(a.dynamicChildren,E,A,g,C,Gn(d,v),T):L||B(a,d,A,null,g,C,Gn(d,v),T,!1),R>0){if(R&16)P(A,j,$,g,v);else if(R&2&&j.class!==$.class&&o(A,"class",null,$.class,v),R&4&&o(A,"style",j.style,$.style,v),R&8){const X=d.dynamicProps;for(let te=0;te{G&&Te(G,g,d,a),N&&Ne(d,a,g,"updated")},C)},b=(a,d,g,C,v,T,L)=>{for(let A=0;A{if(d!==g){if(d!==ne)for(const T in d)!bt(T)&&!(T in g)&&o(a,T,d[T],null,v,C);for(const T in g){if(bt(T))continue;const L=g[T],A=d[T];L!==A&&T!=="value"&&o(a,T,A,L,v,C)}"value"in g&&o(a,"value",d.value,g.value,v)}},S=(a,d,g,C,v,T,L,A,R)=>{const E=d.el=a?a.el:l(""),N=d.anchor=a?a.anchor:l("");let{patchFlag:j,dynamicChildren:$,slotScopeIds:G}=d;G&&(A=A?A.concat(G):G),a==null?(r(E,g,C),r(N,g,C),V(d.children||[],g,N,v,T,L,A,R)):j>0&&j&64&&$&&a.dynamicChildren?(b(a.dynamicChildren,$,g,v,T,L,A),(d.key!=null||v&&d===v.subTree)&&Ur(a,d,!0)):B(a,d,g,N,v,T,L,A,R)},K=(a,d,g,C,v,T,L,A,R)=>{d.slotScopeIds=A,a==null?d.shapeFlag&512?v.ctx.activate(d,g,C,L,R):ee(d,g,C,v,T,L,R):re(a,d,R)},ee=(a,d,g,C,v,T,L)=>{const A=a.component=Oc(a,C,v);if(qt(a)&&(A.ctx.renderer=ht),Lc(A,!1,L),A.asyncDep){if(v&&v.registerDep(A,D,L),!a.el){const R=A.subTree=le(ye);W(null,R,d,g)}}else D(A,a,d,g,v,T,L)},re=(a,d,g)=>{const C=d.component=a.component;if(vc(a,d,g))if(C.asyncDep&&!C.asyncResolved){Y(C,d,g);return}else C.next=d,Tl(C.update),C.effect.dirty=!0,C.update();else d.el=a.el,C.vnode=d},D=(a,d,g,C,v,T,L)=>{const A=()=>{if(a.isMounted){let{next:N,bu:j,u:$,parent:G,vnode:X}=a;{const pt=Yo(a);if(pt){N&&(N.el=X.el,Y(a,N,L)),pt.asyncDep.then(()=>{a.isUnmounted||A()});return}}let te=N,Q;rt(a,!1),N?(N.el=X.el,Y(a,N,L)):N=X,j&&dn(j),(Q=N.props&&N.props.onVnodeBeforeUpdate)&&Te(Q,G,N,X),rt(a,!0);const ce=Xn(a),Oe=a.subTree;a.subTree=ce,O(Oe,ce,h(Oe.el),zt(Oe),a,v,T),N.el=ce.el,te===null&&wc(a,ce.el),$&&_e($,v),(Q=N.props&&N.props.onVnodeUpdated)&&_e(()=>Te(Q,G,N,X),v)}else{let N;const{el:j,props:$}=d,{bm:G,m:X,parent:te}=a,Q=Et(d);if(rt(a,!1),G&&dn(G),!Q&&(N=$&&$.onVnodeBeforeMount)&&Te(N,te,d),rt(a,!0),j&&Bn){const ce=()=>{a.subTree=Xn(a),Bn(j,a.subTree,a,v,null)};Q?d.type.__asyncLoader().then(()=>!a.isUnmounted&&ce()):ce()}else{const ce=a.subTree=Xn(a);O(null,ce,g,C,a,v,T),d.el=ce.el}if(X&&_e(X,v),!Q&&(N=$&&$.onVnodeMounted)){const ce=d;_e(()=>Te(N,te,ce),v)}(d.shapeFlag&256||te&&Et(te.vnode)&&te.vnode.shapeFlag&256)&&a.a&&_e(a.a,v),a.isMounted=!0,d=g=C=null}},R=a.effect=new Ar(A,Ae,()=>In(E),a.scope),E=a.update=()=>{R.dirty&&R.run()};E.i=a,E.id=a.uid,rt(a,!0),E()},Y=(a,d,g)=>{d.component=a;const C=a.vnode.props;a.vnode=d,a.next=null,Zl(a,d.props,C,g),rc(a,d.children,g),et(),is(a),tt()},B=(a,d,g,C,v,T,L,A,R=!1)=>{const E=a&&a.children,N=a?a.shapeFlag:0,j=d.children,{patchFlag:$,shapeFlag:G}=d;if($>0){if($&128){Yt(E,j,g,C,v,T,L,A,R);return}else if($&256){de(E,j,g,C,v,T,L,A,R);return}}G&8?(N&16&&Rt(E,v,T),j!==E&&f(g,j)):N&16?G&16?Yt(E,j,g,C,v,T,L,A,R):Rt(E,v,T,!0):(N&8&&f(g,""),G&16&&V(j,g,C,v,T,L,A,R))},de=(a,d,g,C,v,T,L,A,R)=>{a=a||yt,d=d||yt;const E=a.length,N=d.length,j=Math.min(E,N);let $;for($=0;$N?Rt(a,v,T,!0,!1,j):V(d,g,C,v,T,L,A,R,j)},Yt=(a,d,g,C,v,T,L,A,R)=>{let E=0;const N=d.length;let j=a.length-1,$=N-1;for(;E<=j&&E<=$;){const G=a[E],X=d[E]=R?qe(d[E]):xe(d[E]);if(lt(G,X))O(G,X,g,null,v,T,L,A,R);else break;E++}for(;E<=j&&E<=$;){const G=a[j],X=d[$]=R?qe(d[$]):xe(d[$]);if(lt(G,X))O(G,X,g,null,v,T,L,A,R);else break;j--,$--}if(E>j){if(E<=$){const G=$+1,X=G$)for(;E<=j;)Ie(a[E],v,T,!0),E++;else{const G=E,X=E,te=new Map;for(E=X;E<=$;E++){const we=d[E]=R?qe(d[E]):xe(d[E]);we.key!=null&&te.set(we.key,E)}let Q,ce=0;const Oe=$-X+1;let pt=!1,Yr=0;const Ot=new Array(Oe);for(E=0;E=Oe){Ie(we,v,T,!0);continue}let Pe;if(we.key!=null)Pe=te.get(we.key);else for(Q=X;Q<=$;Q++)if(Ot[Q-X]===0&<(we,d[Q])){Pe=Q;break}Pe===void 0?Ie(we,v,T,!0):(Ot[Pe-X]=E+1,Pe>=Yr?Yr=Pe:pt=!0,O(we,d[Pe],g,null,v,T,L,A,R),ce++)}const zr=pt?dc(Ot):yt;for(Q=zr.length-1,E=Oe-1;E>=0;E--){const we=X+E,Pe=d[we],Jr=we+1{const{el:T,type:L,transition:A,children:R,shapeFlag:E}=a;if(E&6){nt(a.component.subTree,d,g,C);return}if(E&128){a.suspense.move(d,g,C);return}if(E&64){L.move(a,d,g,ht);return}if(L===be){r(T,d,g);for(let j=0;jA.enter(T),v);else{const{leave:j,delayLeave:$,afterLeave:G}=A,X=()=>r(T,d,g),te=()=>{j(T,()=>{X(),G&&G()})};$?$(T,X,te):te()}else r(T,d,g)},Ie=(a,d,g,C=!1,v=!1)=>{const{type:T,props:L,ref:A,children:R,dynamicChildren:E,shapeFlag:N,patchFlag:j,dirs:$,cacheIndex:G}=a;if(j===-2&&(v=!1),A!=null&&En(A,null,g,a,!0),G!=null&&(d.renderCache[G]=void 0),N&256){d.ctx.deactivate(a);return}const X=N&1&&$,te=!Et(a);let Q;if(te&&(Q=L&&L.onVnodeBeforeUnmount)&&Te(Q,d,a),N&6)Li(a.component,g,C);else{if(N&128){a.suspense.unmount(g,C);return}X&&Ne(a,null,d,"beforeUnmount"),N&64?a.type.remove(a,d,g,ht,C):E&&!E.hasOnce&&(T!==be||j>0&&j&64)?Rt(E,d,g,!1,!0):(T===be&&j&384||!v&&N&16)&&Rt(R,d,g),C&&Gr(a)}(te&&(Q=L&&L.onVnodeUnmounted)||X)&&_e(()=>{Q&&Te(Q,d,a),X&&Ne(a,null,d,"unmounted")},g)},Gr=a=>{const{type:d,el:g,anchor:C,transition:v}=a;if(d===be){Oi(g,C);return}if(d===Ft){y(a);return}const T=()=>{s(g),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(a.shapeFlag&1&&v&&!v.persisted){const{leave:L,delayLeave:A}=v,R=()=>L(g,T);A?A(a.el,T,R):R()}else T()},Oi=(a,d)=>{let g;for(;a!==d;)g=m(a),s(a),a=g;s(d)},Li=(a,d,g)=>{const{bum:C,scope:v,update:T,subTree:L,um:A,m:R,a:E}=a;ys(R),ys(E),C&&dn(C),v.stop(),T&&(T.active=!1,Ie(L,a,d,g)),A&&_e(A,d),_e(()=>{a.isUnmounted=!0},d),d&&d.pendingBranch&&!d.isUnmounted&&a.asyncDep&&!a.asyncResolved&&a.suspenseId===d.pendingId&&(d.deps--,d.deps===0&&d.resolve())},Rt=(a,d,g,C=!1,v=!1,T=0)=>{for(let L=T;L{if(a.shapeFlag&6)return zt(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const d=m(a.anchor||a.el),g=d&&d[Ko];return g?m(g):d};let Dn=!1;const Xr=(a,d,g)=>{a==null?d._vnode&&Ie(d._vnode,null,null,!0):O(d._vnode||null,a,d,null,null,null,g),d._vnode=a,Dn||(Dn=!0,is(),_n(),Dn=!1)},ht={p:O,um:Ie,m:nt,r:Gr,mt:ee,mc:V,pc:B,pbc:b,n:zt,o:e};let Un,Bn;return t&&([Un,Bn]=t(ht)),{render:Xr,hydrate:Un,createApp:zl(Xr,Un)}}function Gn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Xo(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ur(e,t,n=!1){const r=e.children,s=t.children;if(k(r)&&k(s))for(let o=0;o>1,e[n[l]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Yo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Yo(t)}function ys(e){if(e)for(let t=0;tSt(hc);function Br(e,t){return $n(e,null,t)}function _u(e,t){return $n(e,null,{flush:"post"})}const ln={};function $e(e,t,n){return $n(e,t,n)}function $n(e,t,{immediate:n,deep:r,flush:s,once:o,onTrack:i,onTrigger:l}=ne){if(t&&o){const x=t;t=(...F)=>{x(...F),I()}}const c=ae,u=x=>r===!0?x:Ge(x,r===!1?1:void 0);let f,h=!1,m=!1;if(he(e)?(f=()=>e.value,h=Tt(e)):vt(e)?(f=()=>u(e),h=!0):k(e)?(m=!0,h=e.some(x=>vt(x)||Tt(x)),f=()=>e.map(x=>{if(he(x))return x.value;if(vt(x))return u(x);if(q(x))return Ye(x,c,2)})):q(e)?t?f=()=>Ye(e,c,2):f=()=>(_&&_(),Re(e,c,3,[w])):f=Ae,t&&r){const x=f;f=()=>Ge(x())}let _,w=x=>{_=p.onStop=()=>{Ye(x,c,4),_=p.onStop=void 0}},O;if(Xt)if(w=Ae,t?n&&Re(t,c,3,[f(),m?[]:void 0,w]):f(),s==="sync"){const x=pc();O=x.__watcherHandles||(x.__watcherHandles=[])}else return Ae;let U=m?new Array(e.length).fill(ln):ln;const W=()=>{if(!(!p.active||!p.dirty))if(t){const x=p.run();(r||h||(m?x.some((F,V)=>ze(F,U[V])):ze(x,U)))&&(_&&_(),Re(t,c,3,[x,U===ln?void 0:m&&U[0]===ln?[]:U,w]),U=x)}else p.run()};W.allowRecurse=!!t;let H;s==="sync"?H=W:s==="post"?H=()=>_e(W,c&&c.suspense):(W.pre=!0,c&&(W.id=c.uid),H=()=>In(W));const p=new Ar(f,Ae,H),y=ro(),I=()=>{p.stop(),y&&Cr(y.effects,p)};return t?n?W():U=p.run():s==="post"?_e(p.run.bind(p),c&&c.suspense):p.run(),O&&O.push(I),I}function gc(e,t,n){const r=this.proxy,s=ie(e)?e.includes(".")?zo(r,e):()=>r[e]:e.bind(r,r);let o;q(t)?o=t:(o=t.handler,n=t);const i=Gt(this),l=$n(s,o.bind(r),n);return i(),l}function zo(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{Ge(r,t,n)});else if(Js(e)){for(const r in e)Ge(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ge(e[r],t,n)}return e}const mc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Le(t)}Modifiers`]||e[`${Ze(t)}Modifiers`];function yc(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ne;let s=n;const o=t.startsWith("update:"),i=o&&mc(r,t.slice(7));i&&(i.trim&&(s=n.map(f=>ie(f)?f.trim():f)),i.number&&(s=n.map(cr)));let l,c=r[l=fn(t)]||r[l=fn(Le(t))];!c&&o&&(c=r[l=fn(Ze(t))]),c&&Re(c,e,6,s);const u=r[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Re(u,e,6,s)}}function Jo(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},l=!1;if(!q(e)){const c=u=>{const f=Jo(u,t,!0);f&&(l=!0,fe(i,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(Z(e)&&r.set(e,null),null):(k(o)?o.forEach(c=>i[c]=null):fe(i,o),Z(e)&&r.set(e,i),i)}function Hn(e,t){return!e||!Kt(t)?!1:(t=t.slice(2).replace(/Once$/,""),z(e,t[0].toLowerCase()+t.slice(1))||z(e,Ze(t))||z(e,t))}function Xn(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:l,emit:c,render:u,renderCache:f,props:h,data:m,setupState:_,ctx:w,inheritAttrs:O}=e,U=bn(e);let W,H;try{if(n.shapeFlag&4){const y=s||r,I=y;W=xe(u.call(I,y,f,h,_,m,w)),H=l}else{const y=t;W=xe(y.length>1?y(h,{attrs:l,slots:i,emit:c}):y(h,null)),H=t.props?l:_c(l)}}catch(y){$t.length=0,Wt(y,e,1),W=le(ye)}let p=W;if(H&&O!==!1){const y=Object.keys(H),{shapeFlag:I}=p;y.length&&I&7&&(o&&y.some(Er)&&(H=bc(H,o)),p=Je(p,H,!1,!0))}return n.dirs&&(p=Je(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&(p.transition=n.transition),W=p,bn(U),W}const _c=e=>{let t;for(const n in e)(n==="class"||n==="style"||Kt(n))&&((t||(t={}))[n]=e[n]);return t},bc=(e,t)=>{const n={};for(const r in e)(!Er(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function vc(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:l,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?_s(r,i,u):!!i;if(c&8){const f=t.dynamicProps;for(let h=0;he.__isSuspense;function Qo(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):xl(e)}const be=Symbol.for("v-fgt"),ut=Symbol.for("v-txt"),ye=Symbol.for("v-cmt"),Ft=Symbol.for("v-stc"),$t=[];let Ce=null;function Zo(e=!1){$t.push(Ce=e?null:[])}function Cc(){$t.pop(),Ce=$t[$t.length-1]||null}let Ut=1;function bs(e){Ut+=e,e<0&&Ce&&(Ce.hasOnce=!0)}function ei(e){return e.dynamicChildren=Ut>0?Ce||yt:null,Cc(),Ut>0&&Ce&&Ce.push(e),e}function bu(e,t,n,r,s,o){return ei(ri(e,t,n,r,s,o,!0))}function ti(e,t,n,r,s){return ei(le(e,t,n,r,s,!0))}function Cn(e){return e?e.__v_isVNode===!0:!1}function lt(e,t){return e.type===t.type&&e.key===t.key}const ni=({key:e})=>e??null,pn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ie(e)||he(e)||q(e)?{i:ue,r:e,k:t,f:!!n}:e:null);function ri(e,t=null,n=null,r=0,s=null,o=e===be?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ni(t),ref:t&&pn(t),scopeId:Pn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ue};return l?(kr(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ie(n)?8:16),Ut>0&&!i&&Ce&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ce.push(c),c}const le=Sc;function Sc(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Lo)&&(e=ye),Cn(e)){const l=Je(e,t,!0);return n&&kr(l,n),Ut>0&&!o&&Ce&&(l.shapeFlag&6?Ce[Ce.indexOf(e)]=l:Ce.push(l)),l.patchFlag=-2,l}if(Nc(e)&&(e=e.__vccOpts),t){t=Tc(t);let{class:l,style:c}=t;l&&!ie(l)&&(t.class=xr(l)),Z(c)&&(mo(c)&&!k(c)&&(c=fe({},c)),t.style=Tr(c))}const i=ie(e)?1:Ec(e)?128:sc(e)?64:Z(e)?4:q(e)?2:0;return ri(e,t,n,r,s,i,o,!0)}function Tc(e){return e?mo(e)||Ho(e)?fe({},e):e:null}function Je(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:l,transition:c}=e,u=t?xc(s||{},t):s,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&ni(u),ref:t&&t.ref?n&&o?k(o)?o.concat(pn(t)):[o,pn(t)]:pn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==be?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Je(e.ssContent),ssFallback:e.ssFallback&&Je(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&vn(f,c.clone(f)),f}function si(e=" ",t=0){return le(ut,null,e,t)}function vu(e,t){const n=le(Ft,null,e);return n.staticCount=t,n}function wu(e="",t=!1){return t?(Zo(),ti(ye,null,e)):le(ye,null,e)}function xe(e){return e==null||typeof e=="boolean"?le(ye):k(e)?le(be,null,e.slice()):typeof e=="object"?qe(e):le(ut,null,String(e))}function qe(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Je(e)}function kr(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(k(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),kr(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Ho(t)?t._ctx=ue:s===3&&ue&&(ue.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:ue},n=32):(t=String(t),r&64?(n=16,t=[si(t)]):n=8);e.children=t,e.shapeFlag|=n}function xc(...e){const t={};for(let n=0;nae||ue;let Sn,br;{const e=Zs(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Sn=t("__VUE_INSTANCE_SETTERS__",n=>ae=n),br=t("__VUE_SSR_SETTERS__",n=>Xt=n)}const Gt=e=>{const t=ae;return Sn(e),e.scope.on(),()=>{e.scope.off(),Sn(t)}},vs=()=>{ae&&ae.scope.off(),Sn(null)};function oi(e){return e.vnode.shapeFlag&4}let Xt=!1;function Lc(e,t=!1,n=!1){t&&br(t);const{props:r,children:s}=e.vnode,o=oi(e);Ql(e,r,o,t),nc(e,s,n);const i=o?Mc(e,t):void 0;return t&&br(!1),i}function Mc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Bl);const{setup:r}=n;if(r){const s=e.setupContext=r.length>1?li(e):null,o=Gt(e);et();const i=Ye(r,e,0,[e.props,s]);if(tt(),o(),Ys(i)){if(i.then(vs,vs),t)return i.then(l=>{ws(e,l,t)}).catch(l=>{Wt(l,e,0)});e.asyncDep=i}else ws(e,i,t)}else ii(e,t)}function ws(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=vo(t)),ii(e,n)}let Es;function ii(e,t,n){const r=e.type;if(!e.render){if(!t&&Es&&!r.render){const s=r.template||Vr(e).template;if(s){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,u=fe(fe({isCustomElement:o,delimiters:l},i),c);r.render=Es(s,u)}}e.render=r.render||Ae}{const s=Gt(e);et();try{Kl(e)}finally{tt(),s()}}}const Ic={get(e,t){return ve(e,"get",""),e[t]}};function li(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ic),slots:e.slots,emit:e.emit,expose:t}}function Vn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vo(hn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Pt)return Pt[n](e)},has(t,n){return n in t||n in Pt}})):e.proxy}function Pc(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function Nc(e){return q(e)&&"__vccOpts"in e}const se=(e,t)=>pl(e,t,Xt);function vr(e,t,n){const r=arguments.length;return r===2?Z(t)&&!k(t)?Cn(t)?le(e,null,[t]):le(e,t):le(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Cn(n)&&(n=[n]),le(e,t,n))}const Fc="3.4.38";/** +* @vue/runtime-dom v3.4.38 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const $c="http://www.w3.org/2000/svg",Hc="http://www.w3.org/1998/Math/MathML",je=typeof document<"u"?document:null,Cs=je&&je.createElement("template"),jc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?je.createElementNS($c,e):t==="mathml"?je.createElementNS(Hc,e):n?je.createElement(e,{is:n}):je.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>je.createTextNode(e),createComment:e=>je.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>je.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{Cs.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const l=Cs.content;if(r==="svg"||r==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Be="transition",Lt="animation",Bt=Symbol("_vtc"),ci=(e,{slots:t})=>vr(Ml,Vc(e),t);ci.displayName="Transition";const ai={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};ci.props=fe({},So,ai);const st=(e,t=[])=>{k(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ss=e=>e?k(e)?e.some(t=>t.length>1):e.length>1:!1;function Vc(e){const t={};for(const S in e)S in ai||(t[S]=e[S]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:u=i,appearToClass:f=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:_=`${n}-leave-to`}=e,w=Dc(s),O=w&&w[0],U=w&&w[1],{onBeforeEnter:W,onEnter:H,onEnterCancelled:p,onLeave:y,onLeaveCancelled:I,onBeforeAppear:x=W,onAppear:F=H,onAppearCancelled:V=p}=t,M=(S,K,ee)=>{ot(S,K?f:l),ot(S,K?u:i),ee&&ee()},b=(S,K)=>{S._isLeaving=!1,ot(S,h),ot(S,_),ot(S,m),K&&K()},P=S=>(K,ee)=>{const re=S?F:H,D=()=>M(K,S,ee);st(re,[K,D]),Ts(()=>{ot(K,S?c:o),ke(K,S?f:l),Ss(re)||xs(K,r,O,D)})};return fe(t,{onBeforeEnter(S){st(W,[S]),ke(S,o),ke(S,i)},onBeforeAppear(S){st(x,[S]),ke(S,c),ke(S,u)},onEnter:P(!1),onAppear:P(!0),onLeave(S,K){S._isLeaving=!0;const ee=()=>b(S,K);ke(S,h),ke(S,m),kc(),Ts(()=>{S._isLeaving&&(ot(S,h),ke(S,_),Ss(y)||xs(S,r,U,ee))}),st(y,[S,ee])},onEnterCancelled(S){M(S,!1),st(p,[S])},onAppearCancelled(S){M(S,!0),st(V,[S])},onLeaveCancelled(S){b(S),st(I,[S])}})}function Dc(e){if(e==null)return null;if(Z(e))return[Yn(e.enter),Yn(e.leave)];{const t=Yn(e);return[t,t]}}function Yn(e){return $i(e)}function ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Bt]||(e[Bt]=new Set)).add(t)}function ot(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Bt];n&&(n.delete(t),n.size||(e[Bt]=void 0))}function Ts(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Uc=0;function xs(e,t,n,r){const s=e._endId=++Uc,o=()=>{s===e._endId&&r()};if(n)return setTimeout(o,n);const{type:i,timeout:l,propCount:c}=Bc(e,t);if(!i)return r();const u=i+"end";let f=0;const h=()=>{e.removeEventListener(u,m),o()},m=_=>{_.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[w]||"").split(", "),s=r(`${Be}Delay`),o=r(`${Be}Duration`),i=As(s,o),l=r(`${Lt}Delay`),c=r(`${Lt}Duration`),u=As(l,c);let f=null,h=0,m=0;t===Be?i>0&&(f=Be,h=i,m=o.length):t===Lt?u>0&&(f=Lt,h=u,m=c.length):(h=Math.max(i,u),f=h>0?i>u?Be:Lt:null,m=f?f===Be?o.length:c.length:0);const _=f===Be&&/\b(transform|all)(,|$)/.test(r(`${Be}Property`).toString());return{type:f,timeout:h,propCount:m,hasTransform:_}}function As(e,t){for(;e.lengthRs(n)+Rs(e[r])))}function Rs(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function kc(){return document.body.offsetHeight}function Kc(e,t,n){const r=e[Bt];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Os=Symbol("_vod"),Wc=Symbol("_vsh"),qc=Symbol(""),Gc=/(^|;)\s*display\s*:/;function Xc(e,t,n){const r=e.style,s=ie(n);let o=!1;if(n&&!s){if(t)if(ie(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&gn(r,l,"")}else for(const i in t)n[i]==null&&gn(r,i,"");for(const i in n)i==="display"&&(o=!0),gn(r,i,n[i])}else if(s){if(t!==n){const i=r[qc];i&&(n+=";"+i),r.cssText=n,o=Gc.test(n)}}else t&&e.removeAttribute("style");Os in e&&(e[Os]=o?r.display:"",e[Wc]&&(r.display="none"))}const Ls=/\s*!important$/;function gn(e,t,n){if(k(n))n.forEach(r=>gn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Yc(e,t);Ls.test(n)?e.setProperty(Ze(r),n.replace(Ls,""),"important"):e[r]=n}}const Ms=["Webkit","Moz","ms"],zn={};function Yc(e,t){const n=zn[t];if(n)return n;let r=Le(t);if(r!=="filter"&&r in e)return zn[t]=r;r=An(r);for(let s=0;sJn||(ea.then(()=>Jn=0),Jn=Date.now());function na(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Re(ra(r,n.value),t,5,[r])};return n.value=e,n.attached=ta(),n}function ra(e,t){if(k(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const $s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,sa=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Kc(e,r,i):t==="style"?Xc(e,n,r):Kt(t)?Er(t)||Qc(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):oa(e,t,r,i))?(zc(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ps(e,t,r,i,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ps(e,t,r,i))};function oa(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&$s(t)&&q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return $s(t)&&ie(n)?!1:t in e}const Hs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return k(t)?n=>dn(t,n):t};function ia(e){e.target.composing=!0}function js(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qn=Symbol("_assign"),Eu={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Qn]=Hs(s);const o=r||s.props&&s.props.type==="number";mt(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=cr(l)),e[Qn](l)}),n&&mt(e,"change",()=>{e.value=e.value.trim()}),t||(mt(e,"compositionstart",ia),mt(e,"compositionend",js),mt(e,"change",js))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[Qn]=Hs(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?cr(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===c)||(e.value=c))}},la=["ctrl","shift","alt","meta"],ca={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>la.some(n=>e[`${n}Key`]&&!t.includes(n))},Cu=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const o=Ze(s.key);if(t.some(i=>i===o||aa[i]===o))return e(s)})},ui=fe({patchProp:sa},jc);let Ht,Vs=!1;function ua(){return Ht||(Ht=uc(ui))}function fa(){return Ht=Vs?Ht:fc(ui),Vs=!0,Ht}const Tu=(...e)=>{const t=ua().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=di(r);if(!s)return;const o=t._component;!q(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.innerHTML="";const i=n(s,!1,fi(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t},xu=(...e)=>{const t=fa().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=di(r);if(s)return n(s,!0,fi(s))},t};function fi(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function di(e){return ie(e)?document.querySelector(e):e}const Au=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},da=window.__VP_SITE_DATA__;function Kr(e){return ro()?(qi(e),!0):!1}function He(e){return typeof e=="function"?e():bo(e)}const hi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ru=e=>e!=null,ha=Object.prototype.toString,pa=e=>ha.call(e)==="[object Object]",kt=()=>{},Ds=ga();function ga(){var e,t;return hi&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ma(e,t){function n(...r){return new Promise((s,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(o)})}return n}const pi=e=>e();function ya(e,t={}){let n,r,s=kt;const o=l=>{clearTimeout(l),s(),s=kt};return l=>{const c=He(e),u=He(t.maxWait);return n&&o(n),c<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((f,h)=>{s=t.rejectOnCancel?h:f,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,f(l())},u)),n=setTimeout(()=>{r&&o(r),r=null,f(l())},c)})}}function _a(e=pi){const t=oe(!0);function n(){t.value=!1}function r(){t.value=!0}const s=(...o)=>{t.value&&e(...o)};return{isActive:Ln(t),pause:n,resume:r,eventFilter:s}}function ba(e){return jn()}function gi(...e){if(e.length!==1)return wl(...e);const t=e[0];return typeof t=="function"?Ln(_l(()=>({get:t,set:kt}))):oe(t)}function mi(e,t,n={}){const{eventFilter:r=pi,...s}=n;return $e(e,ma(r,t),s)}function va(e,t,n={}){const{eventFilter:r,...s}=n,{eventFilter:o,pause:i,resume:l,isActive:c}=_a(r);return{stop:mi(e,t,{...s,eventFilter:o}),pause:i,resume:l,isActive:c}}function Wr(e,t=!0,n){ba()?At(e,n):t?e():Mn(e)}function Ou(e,t,n={}){const{debounce:r=0,maxWait:s=void 0,...o}=n;return mi(e,t,{...o,eventFilter:ya(r,{maxWait:s})})}function Lu(e,t,n){let r;he(n)?r={evaluating:n}:r={};const{lazy:s=!1,evaluating:o=void 0,shallow:i=!0,onError:l=kt}=r,c=oe(!s),u=i?Fr(t):oe(t);let f=0;return Br(async h=>{if(!c.value)return;f++;const m=f;let _=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{const w=await e(O=>{h(()=>{o&&(o.value=!1),_||O()})});m===f&&(u.value=w)}catch(w){l(w)}finally{o&&m===f&&(o.value=!1),_=!0}}),s?se(()=>(c.value=!0,u.value)):u}function yi(e){var t;const n=He(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Me=hi?window:void 0;function xt(...e){let t,n,r,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,s]=e,t=Me):[t,n,r,s]=e,!t)return kt;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],i=()=>{o.forEach(f=>f()),o.length=0},l=(f,h,m,_)=>(f.addEventListener(h,m,_),()=>f.removeEventListener(h,m,_)),c=$e(()=>[yi(t),He(s)],([f,h])=>{if(i(),!f)return;const m=pa(h)?{...h}:h;o.push(...n.flatMap(_=>r.map(w=>l(f,_,w,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),i()};return Kr(u),u}function wa(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Mu(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=Me,eventName:o="keydown",passive:i=!1,dedupe:l=!1}=r,c=wa(t);return xt(s,o,f=>{f.repeat&&He(l)||c(f)&&n(f)},i)}function Ea(){const e=oe(!1),t=jn();return t&&At(()=>{e.value=!0},t),e}function Ca(e){const t=Ea();return se(()=>(t.value,!!e()))}function _i(e,t={}){const{window:n=Me}=t,r=Ca(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const o=oe(!1),i=u=>{o.value=u.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",i):s.removeListener(i))},c=Br(()=>{r.value&&(l(),s=n.matchMedia(He(e)),"addEventListener"in s?s.addEventListener("change",i):s.addListener(i),o.value=s.matches)});return Kr(()=>{c(),l(),s=void 0}),o}const cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},an="__vueuse_ssr_handlers__",Sa=Ta();function Ta(){return an in cn||(cn[an]=cn[an]||{}),cn[an]}function bi(e,t){return Sa[e]||t}function xa(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Aa={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Us="vueuse-storage";function qr(e,t,n,r={}){var s;const{flush:o="pre",deep:i=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:f,window:h=Me,eventFilter:m,onError:_=b=>{console.error(b)},initOnMounted:w}=r,O=(f?Fr:oe)(typeof t=="function"?t():t);if(!n)try{n=bi("getDefaultStorage",()=>{var b;return(b=Me)==null?void 0:b.localStorage})()}catch(b){_(b)}if(!n)return O;const U=He(t),W=xa(U),H=(s=r.serializer)!=null?s:Aa[W],{pause:p,resume:y}=va(O,()=>x(O.value),{flush:o,deep:i,eventFilter:m});h&&l&&Wr(()=>{n instanceof Storage?xt(h,"storage",V):xt(h,Us,M),w&&V()}),w||V();function I(b,P){if(h){const S={key:e,oldValue:b,newValue:P,storageArea:n};h.dispatchEvent(n instanceof Storage?new StorageEvent("storage",S):new CustomEvent(Us,{detail:S}))}}function x(b){try{const P=n.getItem(e);if(b==null)I(P,null),n.removeItem(e);else{const S=H.write(b);P!==S&&(n.setItem(e,S),I(P,S))}}catch(P){_(P)}}function F(b){const P=b?b.newValue:n.getItem(e);if(P==null)return c&&U!=null&&n.setItem(e,H.write(U)),U;if(!b&&u){const S=H.read(P);return typeof u=="function"?u(S,U):W==="object"&&!Array.isArray(S)?{...U,...S}:S}else return typeof P!="string"?P:H.read(P)}function V(b){if(!(b&&b.storageArea!==n)){if(b&&b.key==null){O.value=U;return}if(!(b&&b.key!==e)){p();try{(b==null?void 0:b.newValue)!==H.write(O.value)&&(O.value=F(b))}catch(P){_(P)}finally{b?Mn(y):y()}}}}function M(b){V(b.detail)}return O}function vi(e){return _i("(prefers-color-scheme: dark)",e)}const Ra="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Oa(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:s=Me,storage:o,storageKey:i="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:u,disableTransition:f=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},m=vi({window:s}),_=se(()=>m.value?"dark":"light"),w=c||(i==null?gi(r):qr(i,r,o,{window:s,listenToStorageChanges:l})),O=se(()=>w.value==="auto"?_.value:w.value),U=bi("updateHTMLAttrs",(y,I,x)=>{const F=typeof y=="string"?s==null?void 0:s.document.querySelector(y):yi(y);if(!F)return;const V=new Set,M=new Set;let b=null;if(I==="class"){const S=x.split(/\s/g);Object.values(h).flatMap(K=>(K||"").split(/\s/g)).filter(Boolean).forEach(K=>{S.includes(K)?V.add(K):M.add(K)})}else b={key:I,value:x};if(V.size===0&&M.size===0&&b===null)return;let P;f&&(P=s.document.createElement("style"),P.appendChild(document.createTextNode(Ra)),s.document.head.appendChild(P));for(const S of V)F.classList.add(S);for(const S of M)F.classList.remove(S);b&&F.setAttribute(b.key,b.value),f&&(s.getComputedStyle(P).opacity,document.head.removeChild(P))});function W(y){var I;U(t,n,(I=h[y])!=null?I:y)}function H(y){e.onChanged?e.onChanged(y,W):W(y)}$e(O,H,{flush:"post",immediate:!0}),Wr(()=>H(O.value));const p=se({get(){return u?w.value:O.value},set(y){w.value=y}});try{return Object.assign(p,{store:w,system:_,state:O})}catch{return p}}function La(e={}){const{valueDark:t="dark",valueLight:n="",window:r=Me}=e,s=Oa({...e,onChanged:(l,c)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),o=se(()=>s.system?s.system.value:vi({window:r}).value?"dark":"light");return se({get(){return s.value==="dark"},set(l){const c=l?"dark":"light";o.value===c?s.value="auto":s.value=c}})}function Zn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Iu(e,t,n={}){const{window:r=Me}=n;return qr(e,t,r==null?void 0:r.localStorage,n)}function wi(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const er=new WeakMap;function Pu(e,t=!1){const n=oe(t);let r=null,s="";$e(gi(e),l=>{const c=Zn(He(l));if(c){const u=c;if(er.get(u)||er.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(s=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const o=()=>{const l=Zn(He(e));!l||n.value||(Ds&&(r=xt(l,"touchmove",c=>{Ma(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},i=()=>{const l=Zn(He(e));!l||!n.value||(Ds&&(r==null||r()),l.style.overflow=s,er.delete(l),n.value=!1)};return Kr(i),se({get(){return n.value},set(l){l?o():i()}})}function Nu(e,t,n={}){const{window:r=Me}=n;return qr(e,t,r==null?void 0:r.sessionStorage,n)}function Fu(e={}){const{window:t=Me,behavior:n="auto"}=e;if(!t)return{x:oe(0),y:oe(0)};const r=oe(t.scrollX),s=oe(t.scrollY),o=se({get(){return r.value},set(l){scrollTo({left:l,behavior:n})}}),i=se({get(){return s.value},set(l){scrollTo({top:l,behavior:n})}});return xt(t,"scroll",()=>{r.value=t.scrollX,s.value=t.scrollY},{capture:!1,passive:!0}),{x:o,y:i}}function $u(e={}){const{window:t=Me,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0,type:i="inner"}=e,l=oe(n),c=oe(r),u=()=>{t&&(i==="outer"?(l.value=t.outerWidth,c.value=t.outerHeight):o?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(u(),Wr(u),xt("resize",u,{passive:!0}),s){const f=_i("(orientation: portrait)");$e(f,()=>u())}return{width:l,height:c}}const tr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var nr={};const Ei=/^(?:[a-z]+:|\/\/)/i,Ia="vitepress-theme-appearance",Pa=/#.*$/,Na=/[?#].*$/,Fa=/(?:(^|\/)index)?\.(?:md|html)$/,pe=typeof document<"u",Ci={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function $a(e,t,n=!1){if(t===void 0)return!1;if(e=Bs(`/${e}`),n)return new RegExp(t).test(e);if(Bs(t)!==e)return!1;const r=t.match(Pa);return r?(pe?location.hash:"")===r[0]:!0}function Bs(e){return decodeURI(e).replace(Na,"").replace(Fa,"$1")}function Ha(e){return Ei.test(e)}function ja(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!Ha(n)&&$a(t,`/${n}/`,!0))||"root"}function Va(e,t){var r,s,o,i,l,c,u;const n=ja(e,t);return Object.assign({},e,{localeIndex:n,lang:((r=e.locales[n])==null?void 0:r.lang)??e.lang,dir:((s=e.locales[n])==null?void 0:s.dir)??e.dir,title:((o=e.locales[n])==null?void 0:o.title)??e.title,titleTemplate:((i=e.locales[n])==null?void 0:i.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:Ti(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(u=e.locales[n])==null?void 0:u.themeConfig}})}function Si(e,t){const n=t.title||e.title,r=t.titleTemplate??e.titleTemplate;if(typeof r=="string"&&r.includes(":title"))return r.replace(/:title/g,n);const s=Da(e.title,r);return n===s.slice(3)?n:`${n}${s}`}function Da(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Ua(e,t){const[n,r]=t;if(n!=="meta")return!1;const s=Object.entries(r)[0];return s==null?!1:e.some(([o,i])=>o===n&&i[s[0]]===s[1])}function Ti(e,t){return[...e.filter(n=>!Ua(t,n)),...t]}const Ba=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,ka=/^[a-z]:/i;function ks(e){const t=ka.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Ba,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const rr=new Set;function Ka(e){if(rr.size===0){const n=typeof process=="object"&&(nr==null?void 0:nr.VITE_EXTRA_EXTENSIONS)||(tr==null?void 0:tr.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(r=>rr.add(r))}const t=e.split(".").pop();return t==null||!rr.has(t.toLowerCase())}function Hu(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Wa=Symbol(),ft=Fr(da);function ju(e){const t=se(()=>Va(ft.value,e.data.relativePath)),n=t.value.appearance,r=n==="force-dark"?oe(!0):n?La({storageKey:Ia,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):oe(!1),s=oe(pe?location.hash:"");return pe&&window.addEventListener("hashchange",()=>{s.value=location.hash}),$e(()=>e.data,()=>{s.value=pe?location.hash:""}),{site:t,theme:se(()=>t.value.themeConfig),page:se(()=>e.data),frontmatter:se(()=>e.data.frontmatter),params:se(()=>e.data.params),lang:se(()=>t.value.lang),dir:se(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:se(()=>t.value.localeIndex||"root"),title:se(()=>Si(t.value,e.data)),description:se(()=>e.data.description||t.value.description),isDark:r,hash:se(()=>s.value)}}function qa(){const e=St(Wa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Ga(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Ks(e){return Ei.test(e)||!e.startsWith("/")?e:Ga(ft.value.base,e)}function Xa(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),pe){const n="/";t=ks(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let r=__VP_HASH_MAP__[t.toLowerCase()];if(r||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",r=__VP_HASH_MAP__[t.toLowerCase()]),!r)return null;t=`${n}assets/${t}.${r}.js`}else t=`./${ks(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let mn=[];function Vu(e){mn.push(e),Fn(()=>{mn=mn.filter(t=>t!==e)})}function Ya(){let e=ft.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Ws(e,n);else if(Array.isArray(e))for(const r of e){const s=Ws(r,n);if(s){t=s;break}}return t}function Ws(e,t){const n=document.querySelector(e);if(!n)return 0;const r=n.getBoundingClientRect().bottom;return r<0?0:r+t}const za=Symbol(),xi="http://a.com",Ja=()=>({path:"/",component:null,data:Ci});function Du(e,t){const n=On(Ja()),r={route:n,go:s};async function s(l=pe?location.href:"/"){var c,u;l=sr(l),await((c=r.onBeforeRouteChange)==null?void 0:c.call(r,l))!==!1&&(pe&&l!==sr(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await i(l),await((u=r.onAfterRouteChanged)==null?void 0:u.call(r,l)))}let o=null;async function i(l,c=0,u=!1){var m;if(await((m=r.onBeforePageLoad)==null?void 0:m.call(r,l))===!1)return;const f=new URL(l,xi),h=o=f.pathname;try{let _=await e(h);if(!_)throw new Error(`Page not found: ${h}`);if(o===h){o=null;const{default:w,__pageData:O}=_;if(!w)throw new Error(`Invalid route component: ${w}`);n.path=pe?h:Ks(h),n.component=hn(w),n.data=hn(O),pe&&Mn(()=>{let U=ft.value.base+O.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!ft.value.cleanUrls&&!U.endsWith("/")&&(U+=".html"),U!==f.pathname&&(f.pathname=U,l=U+f.search+f.hash,history.replaceState({},"",l)),f.hash&&!c){let W=null;try{W=document.getElementById(decodeURIComponent(f.hash).slice(1))}catch(H){console.warn(H)}if(W){qs(W,f.hash);return}}window.scrollTo(0,c)})}}catch(_){if(!/fetch|Page not found/.test(_.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(_),!u)try{const w=await fetch(ft.value.base+"hashmap.json");window.__VP_HASH_MAP__=await w.json(),await i(l,c,!0);return}catch{}if(o===h){o=null,n.path=pe?h:Ks(h),n.component=t?hn(t):null;const w=pe?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...Ci,relativePath:w}}}}return pe&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const u=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(u==null)return;const{href:f,origin:h,pathname:m,hash:_,search:w}=new URL(u,c.baseURI),O=new URL(location.href);h===O.origin&&Ka(m)&&(l.preventDefault(),m===O.pathname&&w===O.search?(_!==O.hash&&(history.pushState({},"",f),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:O.href,newURL:f}))),_?qs(c,_,c.classList.contains("header-anchor")):window.scrollTo(0,0)):s(f))},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await i(sr(location.href),l.state&&l.state.scrollPosition||0),(c=r.onAfterRouteChanged)==null||c.call(r,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),r}function Qa(){const e=St(za);if(!e)throw new Error("useRouter() is called without provider.");return e}function Ai(){return Qa().route}function qs(e,t,n=!1){let r=null;try{r=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(s){console.warn(s)}if(r){let s=function(){!n||Math.abs(i-window.scrollY)>window.innerHeight?window.scrollTo(0,i):window.scrollTo({left:0,top:i,behavior:"smooth"})};const o=parseInt(window.getComputedStyle(r).paddingTop,10),i=window.scrollY+r.getBoundingClientRect().top-Ya()+o;requestAnimationFrame(s)}}function sr(e){const t=new URL(e,xi);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),ft.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const or=()=>mn.forEach(e=>e()),Uu=Hr({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=Ai(),{site:n}=qa();return()=>vr(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?vr(t.component,{onVnodeMounted:or,onVnodeUpdated:or,onVnodeUnmounted:or}):"404 Page Not Found"])}}),Za="modulepreload",eu=function(e){return"/"+e},Gs={},Bu=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),i=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.all(n.map(l=>{if(l=eu(l),l in Gs)return;Gs[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":Za,c||(f.as="script",f.crossOrigin=""),f.href=l,i&&f.setAttribute("nonce",i),document.head.appendChild(f),c)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}return s.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},ku=Hr({setup(e,{slots:t}){const n=oe(!1);return At(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function Ku(){pe&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const r=(n=t.parentElement)==null?void 0:n.parentElement;if(!r)return;const s=Array.from(r.querySelectorAll("input")).indexOf(t);if(s<0)return;const o=r.querySelector(".blocks");if(!o)return;const i=Array.from(o.children).find(u=>u.classList.contains("active"));if(!i)return;const l=o.children[s];if(!l||i===l)return;i.classList.remove("active"),l.classList.add("active");const c=r==null?void 0:r.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function Wu(){if(pe){const e=new WeakMap;window.addEventListener("click",t=>{var r;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const s=n.parentElement,o=(r=n.nextElementSibling)==null?void 0:r.nextElementSibling;if(!s||!o)return;const i=/language-(shellscript|shell|bash|sh|zsh)/.test(s.className),l=[".vp-copy-ignore",".diff.remove"],c=o.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(f=>f.remove());let u=c.textContent||"";i&&(u=u.replace(/^ *(\$|>) /gm,"").trim()),tu(u).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const f=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,f)})}})}}async function tu(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const r=document.getSelection(),s=r?r.rangeCount>0&&r.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),s&&(r.removeAllRanges(),r.addRange(s)),n&&n.focus()}}function qu(e,t){let n=!0,r=[];const s=o=>{if(n){n=!1,o.forEach(l=>{const c=ir(l);for(const u of document.head.children)if(u.isEqualNode(c)){r.push(u);return}});return}const i=o.map(ir);r.forEach((l,c)=>{const u=i.findIndex(f=>f==null?void 0:f.isEqualNode(l??null));u!==-1?delete i[u]:(l==null||l.remove(),delete r[c])}),i.forEach(l=>l&&document.head.appendChild(l)),r=[...r,...i].filter(Boolean)};Br(()=>{const o=e.data,i=t.value,l=o&&o.description,c=o&&o.frontmatter.head||[],u=Si(i,o);u!==document.title&&(document.title=u);const f=l||i.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==f&&h.setAttribute("content",f):ir(["meta",{name:"description",content:f}]),s(Ti(i.head,ru(c)))})}function ir([e,t,n]){const r=document.createElement(e);for(const s in t)r.setAttribute(s,t[s]);return n&&(r.innerHTML=n),e==="script"&&!t.async&&(r.async=!1),r}function nu(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function ru(e){return e.filter(t=>!nu(t))}const lr=new Set,Ri=()=>document.createElement("link"),su=e=>{const t=Ri();t.rel="prefetch",t.href=e,document.head.appendChild(t)},ou=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let un;const iu=pe&&(un=Ri())&&un.relList&&un.relList.supports&&un.relList.supports("prefetch")?su:ou;function Gu(){if(!pe||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const r=()=>{n&&n.disconnect(),n=new IntersectionObserver(o=>{o.forEach(i=>{if(i.isIntersecting){const l=i.target;n.unobserve(l);const{pathname:c}=l;if(!lr.has(c)){lr.add(c);const u=Xa(c);u&&iu(u)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(o=>{const{hostname:i,pathname:l}=new URL(o.href instanceof SVGAnimatedString?o.href.animVal:o.href,o.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||o.target!=="_blank"&&i===location.hostname&&(l!==location.pathname?n.observe(o):lr.add(l))})})};At(r);const s=Ai();$e(()=>s.path,r),Fn(()=>{n&&n.disconnect()})}export{gu as $,_u as A,Hl as B,Ya as C,fu as D,hu as E,be as F,Fr as G,Vu as H,le as I,du as J,Ei as K,Ai as L,xc as M,St as N,$u as O,Tr as P,Mu as Q,Mn as R,Fu as S,ci as T,pe as U,Ln as V,uu as W,Bu as X,Pu as Y,Jl as Z,Au as _,si as a,Su as a0,Oo as a1,Cu as a2,mu as a3,vu as a4,qu as a5,za as a6,ju as a7,Wa as a8,Uu as a9,ku as aa,ft as ab,xu as ac,Du as ad,Xa as ae,Gu as af,Wu as ag,Ku as ah,vr as ai,He as aj,yi as ak,Ru as al,Kr as am,Lu as an,Nu as ao,Iu as ap,Ou as aq,Qa as ar,xt as as,au as at,Eu as au,he as av,yu as aw,hn as ax,Tu as ay,Hu as az,ti as b,bu as c,Hr as d,wu as e,Ka as f,Ks as g,se as h,Ha as i,ri as j,bo as k,cu as l,$a as m,xr as n,Zo as o,lu as p,_i as q,pu as r,oe as s,ki as t,qa as u,$e as v,Rl as w,Br as x,At as y,Fn as z}; diff --git a/assets/chunks/theme.rDkprPqD.js b/assets/chunks/theme.rDkprPqD.js new file mode 100644 index 00000000..474e1378 --- /dev/null +++ b/assets/chunks/theme.rDkprPqD.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.CLGH5rWG.js","assets/chunks/framework.C3o_UkTa.js"])))=>i.map(i=>d[i]); +import{d as _,o as a,c,r as l,n as N,a as O,t as I,b as k,w as d,e as f,T as ve,_ as $,u as Ge,i as Ue,f as je,g as pe,h as y,j as v,k as r,p as C,l as H,m as K,q as ie,s as w,v as G,x as Z,y as W,z as he,A as fe,B as ze,C as qe,D as R,F as M,E,G as Pe,H as x,I as m,J as F,K as Ve,L as ee,M as q,N as te,O as Ke,P as Le,Q as le,R as We,S as Se,U as oe,V as Re,W as Je,X as Xe,Y as Te,Z as Ie,$ as Ye,a0 as Qe,a1 as Ze,a2 as xe,a3 as et}from"./framework.C3o_UkTa.js";const tt=_({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(o){return(e,t)=>(a(),c("span",{class:N(["VPBadge",e.type])},[l(e.$slots,"default",{},()=>[O(I(e.text),1)])],2))}}),ot={key:0,class:"VPBackdrop"},nt=_({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(o){return(e,t)=>(a(),k(ve,{name:"fade"},{default:d(()=>[e.show?(a(),c("div",ot)):f("",!0)]),_:1}))}}),st=$(nt,[["__scopeId","data-v-2cfdfdcf"]]),P=Ge;function at(o,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(o,e):(o(),(s=!0)&&setTimeout(()=>s=!1,e))}}function ce(o){return/^\//.test(o)?o:`/${o}`}function _e(o){const{pathname:e,search:t,hash:s,protocol:n}=new URL(o,"http://a.com");if(Ue(o)||o.startsWith("#")||!n.startsWith("http")||!je(e))return o;const{site:i}=P(),u=e.endsWith("/")||e.endsWith(".html")?o:o.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${s}`);return pe(u)}function X({correspondingLink:o=!1}={}){const{site:e,localeIndex:t,page:s,theme:n,hash:i}=P(),u=y(()=>{var p,g;return{label:(p=e.value.locales[t.value])==null?void 0:p.label,link:((g=e.value.locales[t.value])==null?void 0:g.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:y(()=>Object.entries(e.value.locales).flatMap(([p,g])=>u.value.label===g.label?[]:{text:g.label,link:rt(g.link||(p==="root"?"/":`/${p}/`),n.value.i18nRouting!==!1&&o,s.value.relativePath.slice(u.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:u}}function rt(o,e,t,s){return e?o.replace(/\/$/,"")+ce(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):o}const it=o=>(C("data-v-868b40d9"),o=o(),H(),o),lt={class:"NotFound"},ct={class:"code"},ut={class:"title"},dt=it(()=>v("div",{class:"divider"},null,-1)),vt={class:"quote"},pt={class:"action"},ht=["href","aria-label"],ft=_({__name:"NotFound",setup(o){const{theme:e}=P(),{currentLang:t}=X();return(s,n)=>{var i,u,h,p,g;return a(),c("div",lt,[v("p",ct,I(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),v("h1",ut,I(((u=r(e).notFound)==null?void 0:u.title)??"PAGE NOT FOUND"),1),dt,v("blockquote",vt,I(((h=r(e).notFound)==null?void 0:h.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),v("div",pt,[v("a",{class:"link",href:r(pe)(r(t).link),"aria-label":((p=r(e).notFound)==null?void 0:p.linkLabel)??"go to home"},I(((g=r(e).notFound)==null?void 0:g.linkText)??"Take me home"),9,ht)])])}}}),_t=$(ft,[["__scopeId","data-v-868b40d9"]]);function we(o,e){if(Array.isArray(o))return Y(o);if(o==null)return[];e=ce(e);const t=Object.keys(o).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(ce(n))),s=t?o[t]:[];return Array.isArray(s)?Y(s):Y(s.items,s.base)}function mt(o){const e=[];let t=0;for(const s in o){const n=o[s];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function kt(o){const e=[];function t(s){for(const n of s)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(o),e}function ue(o,e){return Array.isArray(e)?e.some(t=>ue(o,t)):K(o,e.link)?!0:e.items?ue(o,e.items):!1}function Y(o,e){return[...o].map(t=>{const s={...t},n=s.base||e;return n&&s.link&&(s.link=n+s.link),s.items&&(s.items=Y(s.items,n)),s})}function U(){const{frontmatter:o,page:e,theme:t}=P(),s=ie("(min-width: 960px)"),n=w(!1),i=y(()=>{const B=t.value.sidebar,S=e.value.relativePath;return B?we(B,S):[]}),u=w(i.value);G(i,(B,S)=>{JSON.stringify(B)!==JSON.stringify(S)&&(u.value=i.value)});const h=y(()=>o.value.sidebar!==!1&&u.value.length>0&&o.value.layout!=="home"),p=y(()=>g?o.value.aside==null?t.value.aside==="left":o.value.aside==="left":!1),g=y(()=>o.value.layout==="home"?!1:o.value.aside!=null?!!o.value.aside:t.value.aside!==!1),L=y(()=>h.value&&s.value),b=y(()=>h.value?mt(u.value):[]);function V(){n.value=!0}function T(){n.value=!1}function A(){n.value?T():V()}return{isOpen:n,sidebar:u,sidebarGroups:b,hasSidebar:h,hasAside:g,leftAside:p,isSidebarEnabled:L,open:V,close:T,toggle:A}}function bt(o,e){let t;Z(()=>{t=o.value?document.activeElement:void 0}),W(()=>{window.addEventListener("keyup",s)}),he(()=>{window.removeEventListener("keyup",s)});function s(n){n.key==="Escape"&&o.value&&(e(),t==null||t.focus())}}function $t(o){const{page:e,hash:t}=P(),s=w(!1),n=y(()=>o.value.collapsed!=null),i=y(()=>!!o.value.link),u=w(!1),h=()=>{u.value=K(e.value.relativePath,o.value.link)};G([e,o,t],h),W(h);const p=y(()=>u.value?!0:o.value.items?ue(e.value.relativePath,o.value.items):!1),g=y(()=>!!(o.value.items&&o.value.items.length));Z(()=>{s.value=!!(n.value&&o.value.collapsed)}),fe(()=>{(u.value||p.value)&&(s.value=!1)});function L(){n.value&&(s.value=!s.value)}return{collapsed:s,collapsible:n,isLink:i,isActiveLink:u,hasActiveLink:p,hasChildren:g,toggle:L}}function gt(){const{hasSidebar:o}=U(),e=ie("(min-width: 960px)"),t=ie("(min-width: 1280px)");return{isAsideEnabled:y(()=>!t.value&&!e.value?!1:o.value?t.value:e.value)}}const de=[];function Ne(o){return typeof o.outline=="object"&&!Array.isArray(o.outline)&&o.outline.label||o.outlineTitle||"On this page"}function me(o){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:yt(t),link:"#"+t.id,level:s}});return Pt(e,o)}function yt(o){let e="";for(const t of o.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Pt(o,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;o=o.filter(u=>u.level>=s&&u.level<=n),de.length=0;for(const{element:u,link:h}of o)de.push({element:u,link:h});const i=[];e:for(let u=0;u=0;p--){const g=o[p];if(g.level{requestAnimationFrame(i),window.addEventListener("scroll",s)}),ze(()=>{u(location.hash)}),he(()=>{window.removeEventListener("scroll",s)});function i(){if(!t.value)return;const h=window.scrollY,p=window.innerHeight,g=document.body.offsetHeight,L=Math.abs(h+p-g)<1,b=de.map(({element:T,link:A})=>({link:A,top:Lt(T)})).filter(({top:T})=>!Number.isNaN(T)).sort((T,A)=>T.top-A.top);if(!b.length){u(null);return}if(h<1){u(null);return}if(L){u(b[b.length-1].link);return}let V=null;for(const{link:T,top:A}of b){if(A>h+qe()+4)break;V=T}u(V)}function u(h){n&&n.classList.remove("active"),h==null?n=null:n=o.value.querySelector(`a[href="${decodeURIComponent(h)}"]`);const p=n;p?(p.classList.add("active"),e.value.style.top=p.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Lt(o){let e=0;for(;o!==document.body;){if(o===null)return NaN;e+=o.offsetTop,o=o.offsetParent}return e}const St=["href","title"],Tt=_({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(o){function e({target:t}){const s=t.href.split("#")[1],n=document.getElementById(decodeURIComponent(s));n==null||n.focus({preventScroll:!0})}return(t,s)=>{const n=R("VPDocOutlineItem",!0);return a(),c("ul",{class:N(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),c(M,null,E(t.headers,({children:i,link:u,title:h})=>(a(),c("li",null,[v("a",{class:"outline-link",href:u,onClick:e,title:h},I(h),9,St),i!=null&&i.length?(a(),k(n,{key:0,headers:i},null,8,["headers"])):f("",!0)]))),256))],2)}}}),Me=$(Tt,[["__scopeId","data-v-75b86f7a"]]),It={class:"content"},wt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Nt=_({__name:"VPDocAsideOutline",setup(o){const{frontmatter:e,theme:t}=P(),s=Pe([]);x(()=>{s.value=me(e.value.outline??t.value.outline)});const n=w(),i=w();return Vt(n,i),(u,h)=>(a(),c("nav",{"aria-labelledby":"doc-outline-aria-label",class:N(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:n},[v("div",It,[v("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),v("div",wt,I(r(Ne)(r(t))),1),m(Me,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),Mt=$(Nt,[["__scopeId","data-v-be1126ba"]]),At={class:"VPDocAsideCarbonAds"},Bt=_({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(o){const e=()=>null;return(t,s)=>(a(),c("div",At,[m(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Ct=o=>(C("data-v-65ef6f81"),o=o(),H(),o),Ht={class:"VPDocAside"},Et=Ct(()=>v("div",{class:"spacer"},null,-1)),Ft=_({__name:"VPDocAside",setup(o){const{theme:e}=P();return(t,s)=>(a(),c("div",Ht,[l(t.$slots,"aside-top",{},void 0,!0),l(t.$slots,"aside-outline-before",{},void 0,!0),m(Mt),l(t.$slots,"aside-outline-after",{},void 0,!0),Et,l(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),k(Bt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):f("",!0),l(t.$slots,"aside-ads-after",{},void 0,!0),l(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Dt=$(Ft,[["__scopeId","data-v-65ef6f81"]]);function Ot(){const{theme:o,page:e}=P();return y(()=>{const{text:t="Edit this page",pattern:s=""}=o.value.editLink||{};let n;return typeof s=="function"?n=s(e.value):n=s.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function Gt(){const{page:o,theme:e,frontmatter:t}=P();return y(()=>{var g,L,b,V,T,A,B,S;const s=we(e.value.sidebar,o.value.relativePath),n=kt(s),i=Ut(n,j=>j.link.replace(/[?#].*$/,"")),u=i.findIndex(j=>K(o.value.relativePath,j.link)),h=((g=e.value.docFooter)==null?void 0:g.prev)===!1&&!t.value.prev||t.value.prev===!1,p=((L=e.value.docFooter)==null?void 0:L.next)===!1&&!t.value.next||t.value.next===!1;return{prev:h?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((b=i[u-1])==null?void 0:b.docFooterText)??((V=i[u-1])==null?void 0:V.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((T=i[u-1])==null?void 0:T.link)},next:p?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((A=i[u+1])==null?void 0:A.docFooterText)??((B=i[u+1])==null?void 0:B.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=i[u+1])==null?void 0:S.link)}}})}function Ut(o,e){const t=new Set;return o.filter(s=>{const n=e(s);return t.has(n)?!1:t.add(n)})}const D=_({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(o){const e=o,t=y(()=>e.tag??(e.href?"a":"span")),s=y(()=>e.href&&Ve.test(e.href)||e.target==="_blank");return(n,i)=>(a(),k(F(t.value),{class:N(["VPLink",{link:n.href,"vp-external-link-icon":s.value,"no-icon":n.noIcon}]),href:n.href?r(_e)(n.href):void 0,target:n.target??(s.value?"_blank":void 0),rel:n.rel??(s.value?"noreferrer":void 0)},{default:d(()=>[l(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),jt={class:"VPLastUpdated"},zt=["datetime"],qt=_({__name:"VPDocFooterLastUpdated",setup(o){const{theme:e,page:t,lang:s}=P(),n=y(()=>new Date(t.value.lastUpdated)),i=y(()=>n.value.toISOString()),u=w("");return W(()=>{Z(()=>{var h,p,g;u.value=new Intl.DateTimeFormat((p=(h=e.value.lastUpdated)==null?void 0:h.formatOptions)!=null&&p.forceLocale?s.value:void 0,((g=e.value.lastUpdated)==null?void 0:g.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(h,p)=>{var g;return a(),c("p",jt,[O(I(((g=r(e).lastUpdated)==null?void 0:g.text)||r(e).lastUpdatedText||"Last updated")+": ",1),v("time",{datetime:i.value},I(u.value),9,zt)])}}}),Kt=$(qt,[["__scopeId","data-v-243e2690"]]),Ae=o=>(C("data-v-e27a0cf7"),o=o(),H(),o),Wt={key:0,class:"VPDocFooter"},Rt={key:0,class:"edit-info"},Jt={key:0,class:"edit-link"},Xt=Ae(()=>v("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Yt={key:1,class:"last-updated"},Qt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Zt=Ae(()=>v("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),xt={class:"pager"},eo=["innerHTML"],to=["innerHTML"],oo={class:"pager"},no=["innerHTML"],so=["innerHTML"],ao=_({__name:"VPDocFooter",setup(o){const{theme:e,page:t,frontmatter:s}=P(),n=Ot(),i=Gt(),u=y(()=>e.value.editLink&&s.value.editLink!==!1),h=y(()=>t.value.lastUpdated),p=y(()=>u.value||h.value||i.value.prev||i.value.next);return(g,L)=>{var b,V,T,A;return p.value?(a(),c("footer",Wt,[l(g.$slots,"doc-footer-before",{},void 0,!0),u.value||h.value?(a(),c("div",Rt,[u.value?(a(),c("div",Jt,[m(D,{class:"edit-link-button",href:r(n).url,"no-icon":!0},{default:d(()=>[Xt,O(" "+I(r(n).text),1)]),_:1},8,["href"])])):f("",!0),h.value?(a(),c("div",Yt,[m(Kt)])):f("",!0)])):f("",!0),(b=r(i).prev)!=null&&b.link||(V=r(i).next)!=null&&V.link?(a(),c("nav",Qt,[Zt,v("div",xt,[(T=r(i).prev)!=null&&T.link?(a(),k(D,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:d(()=>{var B;return[v("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.prev)||"Previous page"},null,8,eo),v("span",{class:"title",innerHTML:r(i).prev.text},null,8,to)]}),_:1},8,["href"])):f("",!0)]),v("div",oo,[(A=r(i).next)!=null&&A.link?(a(),k(D,{key:0,class:"pager-link next",href:r(i).next.link},{default:d(()=>{var B;return[v("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.next)||"Next page"},null,8,no),v("span",{class:"title",innerHTML:r(i).next.text},null,8,so)]}),_:1},8,["href"])):f("",!0)])])):f("",!0)])):f("",!0)}}}),ro=$(ao,[["__scopeId","data-v-e27a0cf7"]]),io=o=>(C("data-v-4981c415"),o=o(),H(),o),lo={class:"container"},co=io(()=>v("div",{class:"aside-curtain"},null,-1)),uo={class:"aside-container"},vo={class:"aside-content"},po={class:"content"},ho={class:"content-container"},fo={class:"main"},_o=_({__name:"VPDoc",setup(o){const{theme:e}=P(),t=ee(),{hasSidebar:s,hasAside:n,leftAside:i}=U(),u=y(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(h,p)=>{const g=R("Content");return a(),c("div",{class:N(["VPDoc",{"has-sidebar":r(s),"has-aside":r(n)}])},[l(h.$slots,"doc-top",{},void 0,!0),v("div",lo,[r(n)?(a(),c("div",{key:0,class:N(["aside",{"left-aside":r(i)}])},[co,v("div",uo,[v("div",vo,[m(Dt,null,{"aside-top":d(()=>[l(h.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":d(()=>[l(h.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":d(()=>[l(h.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":d(()=>[l(h.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":d(()=>[l(h.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":d(()=>[l(h.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):f("",!0),v("div",po,[v("div",ho,[l(h.$slots,"doc-before",{},void 0,!0),v("main",fo,[m(g,{class:N(["vp-doc",[u.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),m(ro,null,{"doc-footer-before":d(()=>[l(h.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),l(h.$slots,"doc-after",{},void 0,!0)])])]),l(h.$slots,"doc-bottom",{},void 0,!0)],2)}}}),mo=$(_o,[["__scopeId","data-v-4981c415"]]),ko=_({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(o){const e=o,t=y(()=>e.href&&Ve.test(e.href)),s=y(()=>e.tag||e.href?"a":"button");return(n,i)=>(a(),k(F(s.value),{class:N(["VPButton",[n.size,n.theme]]),href:n.href?r(_e)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:d(()=>[O(I(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),bo=$(ko,[["__scopeId","data-v-5208c6a8"]]),$o=["src","alt"],go=_({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(o){return(e,t)=>{const s=R("VPImage",!0);return e.image?(a(),c(M,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),c("img",q({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(pe)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,$o)):(a(),c(M,{key:1},[m(s,q({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),m(s,q({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):f("",!0)}}}),Q=$(go,[["__scopeId","data-v-6e911b93"]]),yo=o=>(C("data-v-4963d475"),o=o(),H(),o),Po={class:"container"},Vo={class:"main"},Lo={key:0,class:"name"},So=["innerHTML"],To=["innerHTML"],Io=["innerHTML"],wo={key:0,class:"actions"},No={key:0,class:"image"},Mo={class:"image-container"},Ao=yo(()=>v("div",{class:"image-bg"},null,-1)),Bo=_({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(o){const e=te("hero-image-slot-exists");return(t,s)=>(a(),c("div",{class:N(["VPHero",{"has-image":t.image||r(e)}])},[v("div",Po,[v("div",Vo,[l(t.$slots,"home-hero-info-before",{},void 0,!0),l(t.$slots,"home-hero-info",{},()=>[t.name?(a(),c("h1",Lo,[v("span",{innerHTML:t.name,class:"clip"},null,8,So)])):f("",!0),t.text?(a(),c("p",{key:1,innerHTML:t.text,class:"text"},null,8,To)):f("",!0),t.tagline?(a(),c("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,Io)):f("",!0)],!0),l(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),c("div",wo,[(a(!0),c(M,null,E(t.actions,n=>(a(),c("div",{key:n.link,class:"action"},[m(bo,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):f("",!0),l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),c("div",No,[v("div",Mo,[Ao,l(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(Q,{key:0,class:"image-src",image:t.image},null,8,["image"])):f("",!0)],!0)])])):f("",!0)])],2))}}),Co=$(Bo,[["__scopeId","data-v-4963d475"]]),Ho=_({__name:"VPHomeHero",setup(o){const{frontmatter:e}=P();return(t,s)=>r(e).hero?(a(),k(Co,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":d(()=>[l(t.$slots,"home-hero-info-before")]),"home-hero-info":d(()=>[l(t.$slots,"home-hero-info")]),"home-hero-info-after":d(()=>[l(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":d(()=>[l(t.$slots,"home-hero-actions-after")]),"home-hero-image":d(()=>[l(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):f("",!0)}}),Eo=o=>(C("data-v-c6ed09d2"),o=o(),H(),o),Fo={class:"box"},Do={key:0,class:"icon"},Oo=["innerHTML"],Go=["innerHTML"],Uo=["innerHTML"],jo={key:4,class:"link-text"},zo={class:"link-text-value"},qo=Eo(()=>v("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),Ko=_({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(o){return(e,t)=>(a(),k(D,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:d(()=>[v("article",Fo,[typeof e.icon=="object"&&e.icon.wrap?(a(),c("div",Do,[m(Q,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(Q,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),c("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Oo)):f("",!0),v("h2",{class:"title",innerHTML:e.title},null,8,Go),e.details?(a(),c("p",{key:3,class:"details",innerHTML:e.details},null,8,Uo)):f("",!0),e.linkText?(a(),c("div",jo,[v("p",zo,[O(I(e.linkText)+" ",1),qo])])):f("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Wo=$(Ko,[["__scopeId","data-v-c6ed09d2"]]),Ro={key:0,class:"VPFeatures"},Jo={class:"container"},Xo={class:"items"},Yo=_({__name:"VPFeatures",props:{features:{}},setup(o){const e=o,t=y(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,n)=>s.features?(a(),c("div",Ro,[v("div",Jo,[v("div",Xo,[(a(!0),c(M,null,E(s.features,i=>(a(),c("div",{key:i.title,class:N(["item",[t.value]])},[m(Wo,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):f("",!0)}}),Qo=$(Yo,[["__scopeId","data-v-c56833f4"]]),Zo=_({__name:"VPHomeFeatures",setup(o){const{frontmatter:e}=P();return(t,s)=>r(e).features?(a(),k(Qo,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):f("",!0)}}),xo=_({__name:"VPHomeContent",setup(o){const{width:e}=Ke({initialWidth:0,includeScrollbar:!1});return(t,s)=>(a(),c("div",{class:"vp-doc container",style:Le(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[l(t.$slots,"default",{},void 0,!0)],4))}}),en=$(xo,[["__scopeId","data-v-2763ee34"]]),tn={class:"VPHome"},on=_({__name:"VPHome",setup(o){const{frontmatter:e}=P();return(t,s)=>{const n=R("Content");return a(),c("div",tn,[l(t.$slots,"home-hero-before",{},void 0,!0),m(Ho,null,{"home-hero-info-before":d(()=>[l(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":d(()=>[l(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":d(()=>[l(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":d(()=>[l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":d(()=>[l(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),l(t.$slots,"home-hero-after",{},void 0,!0),l(t.$slots,"home-features-before",{},void 0,!0),m(Zo),l(t.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),k(en,{key:0},{default:d(()=>[m(n)]),_:1})):(a(),k(n,{key:1}))])}}}),nn=$(on,[["__scopeId","data-v-ceddc1ed"]]),sn={},an={class:"VPPage"};function rn(o,e){const t=R("Content");return a(),c("div",an,[l(o.$slots,"page-top"),m(t),l(o.$slots,"page-bottom")])}const ln=$(sn,[["render",rn]]),cn=_({__name:"VPContent",setup(o){const{page:e,frontmatter:t}=P(),{hasSidebar:s}=U();return(n,i)=>(a(),c("div",{class:N(["VPContent",{"has-sidebar":r(s),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?l(n.$slots,"not-found",{key:0},()=>[m(_t)],!0):r(t).layout==="page"?(a(),k(ln,{key:1},{"page-top":d(()=>[l(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":d(()=>[l(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),k(nn,{key:2},{"home-hero-before":d(()=>[l(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":d(()=>[l(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":d(()=>[l(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":d(()=>[l(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":d(()=>[l(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":d(()=>[l(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":d(()=>[l(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":d(()=>[l(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":d(()=>[l(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),k(F(r(t).layout),{key:3})):(a(),k(mo,{key:4},{"doc-top":d(()=>[l(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":d(()=>[l(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":d(()=>[l(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":d(()=>[l(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":d(()=>[l(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":d(()=>[l(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":d(()=>[l(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":d(()=>[l(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":d(()=>[l(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":d(()=>[l(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":d(()=>[l(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),un=$(cn,[["__scopeId","data-v-4e31bbd2"]]),dn={class:"container"},vn=["innerHTML"],pn=["innerHTML"],hn=_({__name:"VPFooter",setup(o){const{theme:e,frontmatter:t}=P(),{hasSidebar:s}=U();return(n,i)=>r(e).footer&&r(t).footer!==!1?(a(),c("footer",{key:0,class:N(["VPFooter",{"has-sidebar":r(s)}])},[v("div",dn,[r(e).footer.message?(a(),c("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,vn)):f("",!0),r(e).footer.copyright?(a(),c("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,pn)):f("",!0)])],2)):f("",!0)}}),fn=$(hn,[["__scopeId","data-v-098a46ae"]]);function _n(){const{theme:o,frontmatter:e}=P(),t=Pe([]),s=y(()=>t.value.length>0);return x(()=>{t.value=me(e.value.outline??o.value.outline)}),{headers:t,hasLocalNav:s}}const mn=o=>(C("data-v-5e8cf508"),o=o(),H(),o),kn={class:"menu-text"},bn=mn(()=>v("span",{class:"vpi-chevron-right icon"},null,-1)),$n={class:"header"},gn={class:"outline"},yn=_({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(o){const e=o,{theme:t}=P(),s=w(!1),n=w(0),i=w(),u=w();function h(b){var V;(V=i.value)!=null&&V.contains(b.target)||(s.value=!1)}G(s,b=>{if(b){document.addEventListener("click",h);return}document.removeEventListener("click",h)}),le("Escape",()=>{s.value=!1}),x(()=>{s.value=!1});function p(){s.value=!s.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function g(b){b.target.classList.contains("outline-link")&&(u.value&&(u.value.style.transition="none"),We(()=>{s.value=!1}))}function L(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(b,V)=>(a(),c("div",{class:"VPLocalNavOutlineDropdown",style:Le({"--vp-vh":n.value+"px"}),ref_key:"main",ref:i},[b.headers.length>0?(a(),c("button",{key:0,onClick:p,class:N({open:s.value})},[v("span",kn,I(r(Ne)(r(t))),1),bn],2)):(a(),c("button",{key:1,onClick:L},I(r(t).returnToTopLabel||"Return to top"),1)),m(ve,{name:"flyout"},{default:d(()=>[s.value?(a(),c("div",{key:0,ref_key:"items",ref:u,class:"items",onClick:g},[v("div",$n,[v("a",{class:"top-link",href:"#",onClick:L},I(r(t).returnToTopLabel||"Return to top"),1)]),v("div",gn,[m(Me,{headers:b.headers},null,8,["headers"])])],512)):f("",!0)]),_:1})],4))}}),Pn=$(yn,[["__scopeId","data-v-5e8cf508"]]),Vn=o=>(C("data-v-b8036a12"),o=o(),H(),o),Ln={class:"container"},Sn=["aria-expanded"],Tn=Vn(()=>v("span",{class:"vpi-align-left menu-icon"},null,-1)),In={class:"menu-text"},wn=_({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(o){const{theme:e,frontmatter:t}=P(),{hasSidebar:s}=U(),{headers:n}=_n(),{y:i}=Se(),u=w(0);W(()=>{u.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),x(()=>{n.value=me(t.value.outline??e.value.outline)});const h=y(()=>n.value.length===0),p=y(()=>h.value&&!s.value),g=y(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:h.value,fixed:p.value}));return(L,b)=>r(t).layout!=="home"&&(!p.value||r(i)>=u.value)?(a(),c("div",{key:0,class:N(g.value)},[v("div",Ln,[r(s)?(a(),c("button",{key:0,class:"menu","aria-expanded":L.open,"aria-controls":"VPSidebarNav",onClick:b[0]||(b[0]=V=>L.$emit("open-menu"))},[Tn,v("span",In,I(r(e).sidebarMenuLabel||"Menu"),1)],8,Sn)):f("",!0),m(Pn,{headers:r(n),navHeight:u.value},null,8,["headers","navHeight"])])],2)):f("",!0)}}),Nn=$(wn,[["__scopeId","data-v-b8036a12"]]);function Mn(){const o=w(!1);function e(){o.value=!0,window.addEventListener("resize",n)}function t(){o.value=!1,window.removeEventListener("resize",n)}function s(){o.value?t():e()}function n(){window.outerWidth>=768&&t()}const i=ee();return G(()=>i.path,t),{isScreenOpen:o,openScreen:e,closeScreen:t,toggleScreen:s}}const An={},Bn={class:"VPSwitch",type:"button",role:"switch"},Cn={class:"check"},Hn={key:0,class:"icon"};function En(o,e){return a(),c("button",Bn,[v("span",Cn,[o.$slots.default?(a(),c("span",Hn,[l(o.$slots,"default",{},void 0,!0)])):f("",!0)])])}const Fn=$(An,[["render",En],["__scopeId","data-v-b19619af"]]),Be=o=>(C("data-v-0f382965"),o=o(),H(),o),Dn=Be(()=>v("span",{class:"vpi-sun sun"},null,-1)),On=Be(()=>v("span",{class:"vpi-moon moon"},null,-1)),Gn=_({__name:"VPSwitchAppearance",setup(o){const{isDark:e,theme:t}=P(),s=te("toggle-appearance",()=>{e.value=!e.value}),n=w("");return fe(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,u)=>(a(),k(Fn,{title:n.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(s)},{default:d(()=>[Dn,On]),_:1},8,["title","aria-checked","onClick"]))}}),ke=$(Gn,[["__scopeId","data-v-0f382965"]]),Un={key:0,class:"VPNavBarAppearance"},jn=_({__name:"VPNavBarAppearance",setup(o){const{site:e}=P();return(t,s)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",Un,[m(ke)])):f("",!0)}}),zn=$(jn,[["__scopeId","data-v-0a1958c9"]]),be=w();let Ce=!1,re=0;function qn(o){const e=w(!1);if(oe){!Ce&&Kn(),re++;const t=G(be,s=>{var n,i,u;s===o.el.value||(n=o.el.value)!=null&&n.contains(s)?(e.value=!0,(i=o.onFocus)==null||i.call(o)):(e.value=!1,(u=o.onBlur)==null||u.call(o))});he(()=>{t(),re--,re||Wn()})}return Re(e)}function Kn(){document.addEventListener("focusin",He),Ce=!0,be.value=document.activeElement}function Wn(){document.removeEventListener("focusin",He)}function He(){be.value=document.activeElement}const Rn={class:"VPMenuLink"},Jn=_({__name:"VPMenuLink",props:{item:{}},setup(o){const{page:e}=P();return(t,s)=>(a(),c("div",Rn,[m(D,{class:N({active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:d(()=>[O(I(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),ne=$(Jn,[["__scopeId","data-v-19363427"]]),Xn={class:"VPMenuGroup"},Yn={key:0,class:"title"},Qn=_({__name:"VPMenuGroup",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Xn,[e.text?(a(),c("p",Yn,I(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,s=>(a(),c(M,null,["link"in s?(a(),k(ne,{key:0,item:s},null,8,["item"])):f("",!0)],64))),256))]))}}),Zn=$(Qn,[["__scopeId","data-v-e815e7e2"]]),xn={class:"VPMenu"},es={key:0,class:"items"},ts=_({__name:"VPMenu",props:{items:{}},setup(o){return(e,t)=>(a(),c("div",xn,[e.items?(a(),c("div",es,[(a(!0),c(M,null,E(e.items,s=>(a(),c(M,{key:JSON.stringify(s)},["link"in s?(a(),k(ne,{key:0,item:s},null,8,["item"])):"component"in s?(a(),k(F(s.component),q({key:1,ref_for:!0},s.props),null,16)):(a(),k(Zn,{key:2,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):f("",!0),l(e.$slots,"default",{},void 0,!0)]))}}),os=$(ts,[["__scopeId","data-v-0e22c6c5"]]),ns=o=>(C("data-v-12ec5ee2"),o=o(),H(),o),ss=["aria-expanded","aria-label"],as={key:0,class:"text"},rs=["innerHTML"],is=ns(()=>v("span",{class:"vpi-chevron-down text-icon"},null,-1)),ls={key:1,class:"vpi-more-horizontal icon"},cs={class:"menu"},us=_({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(o){const e=w(!1),t=w();qn({el:t,onBlur:s});function s(){e.value=!1}return(n,i)=>(a(),c("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=u=>e.value=!0),onMouseleave:i[2]||(i[2]=u=>e.value=!1)},[v("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:i[0]||(i[0]=u=>e.value=!e.value)},[n.button||n.icon?(a(),c("span",as,[n.icon?(a(),c("span",{key:0,class:N([n.icon,"option-icon"])},null,2)):f("",!0),n.button?(a(),c("span",{key:1,innerHTML:n.button},null,8,rs)):f("",!0),is])):(a(),c("span",ls))],8,ss),v("div",cs,[m(os,{items:n.items},{default:d(()=>[l(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),$e=$(us,[["__scopeId","data-v-12ec5ee2"]]),ds=["href","aria-label","innerHTML"],vs=_({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(o){const e=o,t=y(()=>typeof e.icon=="object"?e.icon.svg:``);return(s,n)=>(a(),c("a",{class:"VPSocialLink no-icon",href:s.link,"aria-label":s.ariaLabel??(typeof s.icon=="string"?s.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,ds))}}),ps=$(vs,[["__scopeId","data-v-974e0aed"]]),hs={class:"VPSocialLinks"},fs=_({__name:"VPSocialLinks",props:{links:{}},setup(o){return(e,t)=>(a(),c("div",hs,[(a(!0),c(M,null,E(e.links,({link:s,icon:n,ariaLabel:i})=>(a(),k(ps,{key:s,icon:n,link:s,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),ge=$(fs,[["__scopeId","data-v-52782a78"]]),_s={key:0,class:"group translations"},ms={class:"trans-title"},ks={key:1,class:"group"},bs={class:"item appearance"},$s={class:"label"},gs={class:"appearance-action"},ys={key:2,class:"group"},Ps={class:"item social-links"},Vs=_({__name:"VPNavBarExtra",setup(o){const{site:e,theme:t}=P(),{localeLinks:s,currentLang:n}=X({correspondingLink:!0}),i=y(()=>s.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(u,h)=>i.value?(a(),k($e,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:d(()=>[r(s).length&&r(n).label?(a(),c("div",_s,[v("p",ms,I(r(n).label),1),(a(!0),c(M,null,E(r(s),p=>(a(),k(ne,{key:p.link,item:p},null,8,["item"]))),128))])):f("",!0),r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",ks,[v("div",bs,[v("p",$s,I(r(t).darkModeSwitchLabel||"Appearance"),1),v("div",gs,[m(ke)])])])):f("",!0),r(t).socialLinks?(a(),c("div",ys,[v("div",Ps,[m(ge,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):f("",!0)]),_:1})):f("",!0)}}),Ls=$(Vs,[["__scopeId","data-v-c34ef5aa"]]),Ss=o=>(C("data-v-6a2ed68b"),o=o(),H(),o),Ts=["aria-expanded"],Is=Ss(()=>v("span",{class:"container"},[v("span",{class:"top"}),v("span",{class:"middle"}),v("span",{class:"bottom"})],-1)),ws=[Is],Ns=_({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(o){return(e,t)=>(a(),c("button",{type:"button",class:N(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},ws,10,Ts))}}),Ms=$(Ns,[["__scopeId","data-v-6a2ed68b"]]),As=["innerHTML"],Bs=_({__name:"VPNavBarMenuLink",props:{item:{}},setup(o){const{page:e}=P();return(t,s)=>(a(),k(D,{class:N({VPNavBarMenuLink:!0,active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,noIcon:t.item.noIcon,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:d(()=>[v("span",{innerHTML:t.item.text},null,8,As)]),_:1},8,["class","href","noIcon","target","rel"]))}}),Cs=$(Bs,[["__scopeId","data-v-c423e9f4"]]),Hs=_({__name:"VPNavBarMenuGroup",props:{item:{}},setup(o){const e=o,{page:t}=P(),s=i=>"component"in i?!1:"link"in i?K(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(s),n=y(()=>s(e.item));return(i,u)=>(a(),k($e,{class:N({VPNavBarMenuGroup:!0,active:r(K)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||n.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),Es=o=>(C("data-v-71183eee"),o=o(),H(),o),Fs={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Ds=Es(()=>v("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),Os=_({__name:"VPNavBarMenu",setup(o){const{theme:e}=P();return(t,s)=>r(e).nav?(a(),c("nav",Fs,[Ds,(a(!0),c(M,null,E(r(e).nav,n=>(a(),c(M,{key:JSON.stringify(n)},["link"in n?(a(),k(Cs,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(F(n.component),q({key:1,ref_for:!0},n.props),null,16)):(a(),k(Hs,{key:2,item:n},null,8,["item"]))],64))),128))])):f("",!0)}}),Gs=$(Os,[["__scopeId","data-v-71183eee"]]);function Us(o){const{localeIndex:e,theme:t}=P();function s(n){var A,B,S;const i=n.split("."),u=(A=t.value.search)==null?void 0:A.options,h=u&&typeof u=="object",p=h&&((S=(B=u.locales)==null?void 0:B[e.value])==null?void 0:S.translations)||null,g=h&&u.translations||null;let L=p,b=g,V=o;const T=i.pop();for(const j of i){let z=null;const J=V==null?void 0:V[j];J&&(z=V=J);const se=b==null?void 0:b[j];se&&(z=b=se);const ae=L==null?void 0:L[j];ae&&(z=L=ae),J||(V=z),se||(b=z),ae||(L=z)}return(L==null?void 0:L[T])??(b==null?void 0:b[T])??(V==null?void 0:V[T])??""}return s}const js=["aria-label"],zs={class:"DocSearch-Button-Container"},qs=v("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1),Ks={class:"DocSearch-Button-Placeholder"},Ws=v("span",{class:"DocSearch-Button-Keys"},[v("kbd",{class:"DocSearch-Button-Key"}),v("kbd",{class:"DocSearch-Button-Key"},"K")],-1),ye=_({__name:"VPNavBarSearchButton",setup(o){const t=Us({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(s,n)=>(a(),c("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[v("span",zs,[qs,v("span",Ks,I(r(t)("button.buttonText")),1)]),Ws],8,js))}}),Rs={class:"VPNavBarSearch"},Js={id:"local-search"},Xs={key:1,id:"docsearch"},Ys=_({__name:"VPNavBarSearch",setup(o){const e=Je(()=>Xe(()=>import("./VPLocalSearchBox.CLGH5rWG.js"),__vite__mapDeps([0,1]))),t=()=>null,{theme:s}=P(),n=w(!1),i=w(!1);W(()=>{});function u(){n.value||(n.value=!0,setTimeout(h,16))}function h(){const b=new Event("keydown");b.key="k",b.metaKey=!0,window.dispatchEvent(b),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||h()},16)}function p(b){const V=b.target,T=V.tagName;return V.isContentEditable||T==="INPUT"||T==="SELECT"||T==="TEXTAREA"}const g=w(!1);le("k",b=>{(b.ctrlKey||b.metaKey)&&(b.preventDefault(),g.value=!0)}),le("/",b=>{p(b)||(b.preventDefault(),g.value=!0)});const L="local";return(b,V)=>{var T;return a(),c("div",Rs,[r(L)==="local"?(a(),c(M,{key:0},[g.value?(a(),k(r(e),{key:0,onClose:V[0]||(V[0]=A=>g.value=!1)})):f("",!0),v("div",Js,[m(ye,{onClick:V[1]||(V[1]=A=>g.value=!0)})])],64)):r(L)==="algolia"?(a(),c(M,{key:1},[n.value?(a(),k(r(t),{key:0,algolia:((T=r(s).search)==null?void 0:T.options)??r(s).algolia,onVnodeBeforeMount:V[2]||(V[2]=A=>i.value=!0)},null,8,["algolia"])):f("",!0),i.value?f("",!0):(a(),c("div",Xs,[m(ye,{onClick:u})]))],64)):f("",!0)])}}}),Qs=_({__name:"VPNavBarSocialLinks",setup(o){const{theme:e}=P();return(t,s)=>r(e).socialLinks?(a(),k(ge,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Zs=$(Qs,[["__scopeId","data-v-edaebeb1"]]),xs=["href","rel","target"],ea={key:1},ta={key:2},oa=_({__name:"VPNavBarTitle",setup(o){const{site:e,theme:t}=P(),{hasSidebar:s}=U(),{currentLang:n}=X(),i=y(()=>{var p;return typeof t.value.logoLink=="string"?t.value.logoLink:(p=t.value.logoLink)==null?void 0:p.link}),u=y(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.rel}),h=y(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.target});return(p,g)=>(a(),c("div",{class:N(["VPNavBarTitle",{"has-sidebar":r(s)}])},[v("a",{class:"title",href:i.value??r(_e)(r(n).link),rel:u.value,target:h.value},[l(p.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),k(Q,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):f("",!0),r(t).siteTitle?(a(),c("span",ea,I(r(t).siteTitle),1)):r(t).siteTitle===void 0?(a(),c("span",ta,I(r(e).title),1)):f("",!0),l(p.$slots,"nav-bar-title-after",{},void 0,!0)],8,xs)],2))}}),na=$(oa,[["__scopeId","data-v-de953605"]]),sa={class:"items"},aa={class:"title"},ra=_({__name:"VPNavBarTranslations",setup(o){const{theme:e}=P(),{localeLinks:t,currentLang:s}=X({correspondingLink:!0});return(n,i)=>r(t).length&&r(s).label?(a(),k($e,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:d(()=>[v("div",sa,[v("p",aa,I(r(s).label),1),(a(!0),c(M,null,E(r(t),u=>(a(),k(ne,{key:u.link,item:u},null,8,["item"]))),128))])]),_:1},8,["label"])):f("",!0)}}),ia=$(ra,[["__scopeId","data-v-d3047050"]]),la=o=>(C("data-v-37a6b570"),o=o(),H(),o),ca={class:"wrapper"},ua={class:"container"},da={class:"title"},va={class:"content"},pa={class:"content-body"},ha=la(()=>v("div",{class:"divider"},[v("div",{class:"divider-line"})],-1)),fa=_({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(o){const e=o,{y:t}=Se(),{hasSidebar:s}=U(),{frontmatter:n}=P(),i=w({});return fe(()=>{i.value={"has-sidebar":s.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(u,h)=>(a(),c("div",{class:N(["VPNavBar",i.value])},[v("div",ca,[v("div",ua,[v("div",da,[m(na,null,{"nav-bar-title-before":d(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":d(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),v("div",va,[v("div",pa,[l(u.$slots,"nav-bar-content-before",{},void 0,!0),m(Ys,{class:"search"}),m(Gs,{class:"menu"}),m(ia,{class:"translations"}),m(zn,{class:"appearance"}),m(Zs,{class:"social-links"}),m(Ls,{class:"extra"}),l(u.$slots,"nav-bar-content-after",{},void 0,!0),m(Ms,{class:"hamburger",active:u.isScreenOpen,onClick:h[0]||(h[0]=p=>u.$emit("toggle-screen"))},null,8,["active"])])])])]),ha],2))}}),_a=$(fa,[["__scopeId","data-v-37a6b570"]]),ma={key:0,class:"VPNavScreenAppearance"},ka={class:"text"},ba=_({__name:"VPNavScreenAppearance",setup(o){const{site:e,theme:t}=P();return(s,n)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",ma,[v("p",ka,I(r(t).darkModeSwitchLabel||"Appearance"),1),m(ke)])):f("",!0)}}),$a=$(ba,[["__scopeId","data-v-beb3f918"]]),ga=_({__name:"VPNavScreenMenuLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e),innerHTML:t.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),ya=$(ga,[["__scopeId","data-v-6f3d2ab5"]]),Pa=_({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e)},{default:d(()=>[O(I(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),Ee=$(Pa,[["__scopeId","data-v-eab7bfa1"]]),Va={class:"VPNavScreenMenuGroupSection"},La={key:0,class:"title"},Sa=_({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Va,[e.text?(a(),c("p",La,I(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,s=>(a(),k(Ee,{key:s.text,item:s},null,8,["item"]))),128))]))}}),Ta=$(Sa,[["__scopeId","data-v-60ca4288"]]),Ia=o=>(C("data-v-9b54e8b4"),o=o(),H(),o),wa=["aria-controls","aria-expanded"],Na=["innerHTML"],Ma=Ia(()=>v("span",{class:"vpi-plus button-icon"},null,-1)),Aa=["id"],Ba={key:0,class:"item"},Ca={key:1,class:"item"},Ha={key:2,class:"group"},Ea=_({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(o){const e=o,t=w(!1),s=y(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(i,u)=>(a(),c("div",{class:N(["VPNavScreenMenuGroup",{open:t.value}])},[v("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:n},[v("span",{class:"button-text",innerHTML:i.text},null,8,Na),Ma],8,wa),v("div",{id:s.value,class:"items"},[(a(!0),c(M,null,E(i.items,h=>(a(),c(M,{key:JSON.stringify(h)},["link"in h?(a(),c("div",Ba,[m(Ee,{item:h},null,8,["item"])])):"component"in h?(a(),c("div",Ca,[(a(),k(F(h.component),q({ref_for:!0},h.props,{"screen-menu":""}),null,16))])):(a(),c("div",Ha,[m(Ta,{text:h.text,items:h.items},null,8,["text","items"])]))],64))),128))],8,Aa)],2))}}),Fa=$(Ea,[["__scopeId","data-v-9b54e8b4"]]),Da={key:0,class:"VPNavScreenMenu"},Oa=_({__name:"VPNavScreenMenu",setup(o){const{theme:e}=P();return(t,s)=>r(e).nav?(a(),c("nav",Da,[(a(!0),c(M,null,E(r(e).nav,n=>(a(),c(M,{key:JSON.stringify(n)},["link"in n?(a(),k(ya,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(F(n.component),q({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(Fa,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):f("",!0)}}),Ga=_({__name:"VPNavScreenSocialLinks",setup(o){const{theme:e}=P();return(t,s)=>r(e).socialLinks?(a(),k(ge,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Fe=o=>(C("data-v-d9ff2423"),o=o(),H(),o),Ua=Fe(()=>v("span",{class:"vpi-languages icon lang"},null,-1)),ja=Fe(()=>v("span",{class:"vpi-chevron-down icon chevron"},null,-1)),za={class:"list"},qa=_({__name:"VPNavScreenTranslations",setup(o){const{localeLinks:e,currentLang:t}=X({correspondingLink:!0}),s=w(!1);function n(){s.value=!s.value}return(i,u)=>r(e).length&&r(t).label?(a(),c("div",{key:0,class:N(["VPNavScreenTranslations",{open:s.value}])},[v("button",{class:"title",onClick:n},[Ua,O(" "+I(r(t).label)+" ",1),ja]),v("ul",za,[(a(!0),c(M,null,E(r(e),h=>(a(),c("li",{key:h.link,class:"item"},[m(D,{class:"link",href:h.link},{default:d(()=>[O(I(h.text),1)]),_:2},1032,["href"])]))),128))])],2)):f("",!0)}}),Ka=$(qa,[["__scopeId","data-v-d9ff2423"]]),Wa={class:"container"},Ra=_({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(o){const e=w(null),t=Te(oe?document.body:null);return(s,n)=>(a(),k(ve,{name:"fade",onEnter:n[0]||(n[0]=i=>t.value=!0),onAfterLeave:n[1]||(n[1]=i=>t.value=!1)},{default:d(()=>[s.open?(a(),c("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[v("div",Wa,[l(s.$slots,"nav-screen-content-before",{},void 0,!0),m(Oa,{class:"menu"}),m(Ka,{class:"translations"}),m($a,{class:"appearance"}),m(Ga,{class:"social-links"}),l(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):f("",!0)]),_:3}))}}),Ja=$(Ra,[["__scopeId","data-v-c6c7bd45"]]),Xa={key:0,class:"VPNav"},Ya=_({__name:"VPNav",setup(o){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=Mn(),{frontmatter:n}=P(),i=y(()=>n.value.navbar!==!1);return Ie("close-screen",t),Z(()=>{oe&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(u,h)=>i.value?(a(),c("header",Xa,[m(_a,{"is-screen-open":r(e),onToggleScreen:r(s)},{"nav-bar-title-before":d(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":d(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":d(()=>[l(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":d(()=>[l(u.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),m(Ja,{open:r(e)},{"nav-screen-content-before":d(()=>[l(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":d(()=>[l(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):f("",!0)}}),Qa=$(Ya,[["__scopeId","data-v-d52d372b"]]),De=o=>(C("data-v-b74067ae"),o=o(),H(),o),Za=["role","tabindex"],xa=De(()=>v("div",{class:"indicator"},null,-1)),er=De(()=>v("span",{class:"vpi-chevron-right caret-icon"},null,-1)),tr=[er],or={key:1,class:"items"},nr=_({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(o){const e=o,{collapsed:t,collapsible:s,isLink:n,isActiveLink:i,hasActiveLink:u,hasChildren:h,toggle:p}=$t(y(()=>e.item)),g=y(()=>h.value?"section":"div"),L=y(()=>n.value?"a":"div"),b=y(()=>h.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),V=y(()=>n.value?void 0:"button"),T=y(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":n.value},{"is-active":i.value},{"has-active":u.value}]);function A(S){"key"in S&&S.key!=="Enter"||!e.item.link&&p()}function B(){e.item.link&&p()}return(S,j)=>{const z=R("VPSidebarItem",!0);return a(),k(F(g.value),{class:N(["VPSidebarItem",T.value])},{default:d(()=>[S.item.text?(a(),c("div",q({key:0,class:"item",role:V.value},Ye(S.item.items?{click:A,keydown:A}:{},!0),{tabindex:S.item.items&&0}),[xa,S.item.link?(a(),k(D,{key:0,tag:L.value,class:"link",href:S.item.link,rel:S.item.rel,target:S.item.target},{default:d(()=>[(a(),k(F(b.value),{class:"text",innerHTML:S.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(F(b.value),{key:1,class:"text",innerHTML:S.item.text},null,8,["innerHTML"])),S.item.collapsed!=null&&S.item.items&&S.item.items.length?(a(),c("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:B,onKeydown:Qe(B,["enter"]),tabindex:"0"},tr,32)):f("",!0)],16,Za)):f("",!0),S.item.items&&S.item.items.length?(a(),c("div",or,[S.depth<5?(a(!0),c(M,{key:0},E(S.item.items,J=>(a(),k(z,{key:J.text,item:J,depth:S.depth+1},null,8,["item","depth"]))),128)):f("",!0)])):f("",!0)]),_:1},8,["class"])}}}),sr=$(nr,[["__scopeId","data-v-b74067ae"]]),ar=_({__name:"VPSidebarGroup",props:{items:{}},setup(o){const e=w(!0);let t=null;return W(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),Ze(()=>{t!=null&&(clearTimeout(t),t=null)}),(s,n)=>(a(!0),c(M,null,E(s.items,i=>(a(),c("div",{key:i.text,class:N(["group",{"no-transition":e.value}])},[m(sr,{item:i,depth:0},null,8,["item"])],2))),128))}}),rr=$(ar,[["__scopeId","data-v-e3ecf1ec"]]),Oe=o=>(C("data-v-f2245985"),o=o(),H(),o),ir=Oe(()=>v("div",{class:"curtain"},null,-1)),lr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},cr=Oe(()=>v("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),ur=_({__name:"VPSidebar",props:{open:{type:Boolean}},setup(o){const{sidebarGroups:e,hasSidebar:t}=U(),s=o,n=w(null),i=Te(oe?document.body:null);G([s,n],()=>{var h;s.open?(i.value=!0,(h=n.value)==null||h.focus()):i.value=!1},{immediate:!0,flush:"post"});const u=w(0);return G(e,()=>{u.value+=1},{deep:!0}),(h,p)=>r(t)?(a(),c("aside",{key:0,class:N(["VPSidebar",{open:h.open}]),ref_key:"navEl",ref:n,onClick:p[0]||(p[0]=xe(()=>{},["stop"]))},[ir,v("nav",lr,[cr,l(h.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k(rr,{items:r(e),key:u.value},null,8,["items"])),l(h.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):f("",!0)}}),dr=$(ur,[["__scopeId","data-v-f2245985"]]),vr=_({__name:"VPSkipLink",setup(o){const e=ee(),t=w();G(()=>e.path,()=>t.value.focus());function s({target:n}){const i=document.getElementById(decodeURIComponent(n.hash).slice(1));if(i){const u=()=>{i.removeAttribute("tabindex"),i.removeEventListener("blur",u)};i.setAttribute("tabindex","-1"),i.addEventListener("blur",u),i.focus(),window.scrollTo(0,0)}}return(n,i)=>(a(),c(M,null,[v("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),v("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}}),pr=$(vr,[["__scopeId","data-v-a977b129"]]),hr=_({__name:"Layout",setup(o){const{isOpen:e,open:t,close:s}=U(),n=ee();G(()=>n.path,s),bt(e,s);const{frontmatter:i}=P(),u=et(),h=y(()=>!!u["home-hero-image"]);return Ie("hero-image-slot-exists",h),(p,g)=>{const L=R("Content");return r(i).layout!==!1?(a(),c("div",{key:0,class:N(["Layout",r(i).pageClass])},[l(p.$slots,"layout-top",{},void 0,!0),m(pr),m(st,{class:"backdrop",show:r(e),onClick:r(s)},null,8,["show","onClick"]),m(Qa,null,{"nav-bar-title-before":d(()=>[l(p.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":d(()=>[l(p.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":d(()=>[l(p.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":d(()=>[l(p.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":d(()=>[l(p.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":d(()=>[l(p.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),m(Nn,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),m(dr,{open:r(e)},{"sidebar-nav-before":d(()=>[l(p.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":d(()=>[l(p.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),m(un,null,{"page-top":d(()=>[l(p.$slots,"page-top",{},void 0,!0)]),"page-bottom":d(()=>[l(p.$slots,"page-bottom",{},void 0,!0)]),"not-found":d(()=>[l(p.$slots,"not-found",{},void 0,!0)]),"home-hero-before":d(()=>[l(p.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":d(()=>[l(p.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":d(()=>[l(p.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":d(()=>[l(p.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":d(()=>[l(p.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":d(()=>[l(p.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":d(()=>[l(p.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":d(()=>[l(p.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":d(()=>[l(p.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":d(()=>[l(p.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":d(()=>[l(p.$slots,"doc-before",{},void 0,!0)]),"doc-after":d(()=>[l(p.$slots,"doc-after",{},void 0,!0)]),"doc-top":d(()=>[l(p.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":d(()=>[l(p.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":d(()=>[l(p.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":d(()=>[l(p.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":d(()=>[l(p.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":d(()=>[l(p.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":d(()=>[l(p.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":d(()=>[l(p.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),m(fn),l(p.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(L,{key:1}))}}}),fr=$(hr,[["__scopeId","data-v-7e3343f7"]]),mr={Layout:fr,enhanceApp:({app:o})=>{o.component("Badge",tt)}};export{Us as c,mr as t,P as u}; diff --git a/assets/deploy_config.md.QRt04bcu.js b/assets/deploy_config.md.QRt04bcu.js new file mode 100644 index 00000000..c7ec7a7a --- /dev/null +++ b/assets/deploy_config.md.QRt04bcu.js @@ -0,0 +1,31 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{"title":"配置","order":2},"headers":[],"relativePath":"deploy/config.md","filePath":"zh/deploy/config.md","lastUpdated":1725101868000}'),t={name:"deploy/config.md"},l=n(`

配置

轻雪支持yamljsontoml作为配置文件,取决于你个人的喜好

首次运行后生成config.ymlconfig目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusersnickname字段即可

启动时会加载项目目录下config.yml/yaml/json/tomlconfig目录下的所有配置文件,你可在config目录下创建多个配置文件,轻雪会自动合并这些配置文件

基础配置项

yaml
nonebot:
+  # Nonebot机器人的配置,以前的最外层配置项仍可为Nonebot服务,但是部分内容会被覆盖,请尽快迁移
+  command_start: [ "/", "" ] # 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常
+  host: 127.0.0.1 # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0
+  port: 20216 # 绑定端口
+  nickname: [ "liteyuki" ]  # 机器人昵称列表
+  superusers: [ "1919810" ]  # 超级用户列表
+liteyuki:
+  # 写在外层的配置项将会被覆盖,建议迁移到liteyuki下
+  log_level: "INFO" # 日志等级
+  log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
+  auto_report: true # 是否自动上报问题给轻雪服务器
+  auto_update: true # 是否自动更新轻雪,每天4点检查更新
+  plugins: [ ] # 轻雪插件列表
+  plugin_dirs: [ ] # 轻雪插件目录列表

其他配置

以下为默认值,如需自定义请手动添加

yaml
# 高级NoneBot配置
+nonebot:
+  onebot_access_token: "" # 访问令牌,对公开放时建议设置
+  default_language: "zh-CN" # 默认语言
+  alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启
+  safe_mode: false # 安全模式,开启后将不会加载任何第三方NoneBot插件
+  # 其他Nonebot插件的配置项
+  custom_config_1: "custom_value1"
+  custom_config_2: "custom_value2"
+
+# 开发者选项
+liteyuki:
+  allow_update: true # 是否允许更新
+  debug: false  # 轻雪调试,开启会自动重载Bot或者资源,其他插件自带的调试功能也将开启
+  dev_mode: false # 开发者模式,开启后将会启动监视者,监视文件变化并自动重载
+
+...

示例:与NoneBot对接的OneBot实现端配置

生产环境中推荐反向WebSocket 不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值

字段参考值说明
协议反向WebSocket推荐使用反向ws协议进行通信,即轻雪作为服务端
地址ws://127.0.0.1:20216/onebot/v11/ws地址取决于配置文件,本机默认为127.0.0.1:20216
AccessToken""如果你给轻雪配置了AccessToken,请在此填写相同的值

其他

  • 轻雪不局限于OneBot适配器,你可以使用NoneBot2支持的任何适配器或使用轻雪讯息传递插件
`,15),h=[l];function e(k,p,d,o,r,E){return a(),i("div",null,h)}const y=s(t,[["render",e]]);export{g as __pageData,y as default}; diff --git a/assets/deploy_config.md.QRt04bcu.lean.js b/assets/deploy_config.md.QRt04bcu.lean.js new file mode 100644 index 00000000..6aa65ef0 --- /dev/null +++ b/assets/deploy_config.md.QRt04bcu.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{"title":"配置","order":2},"headers":[],"relativePath":"deploy/config.md","filePath":"zh/deploy/config.md","lastUpdated":1725101868000}'),t={name:"deploy/config.md"},l=n("",15),h=[l];function e(k,p,d,o,r,E){return a(),i("div",null,h)}const y=s(t,[["render",e]]);export{g as __pageData,y as default}; diff --git a/assets/deploy_fandq.md.BC91M77d.js b/assets/deploy_fandq.md.BC91M77d.js new file mode 100644 index 00000000..2188f79d --- /dev/null +++ b/assets/deploy_fandq.md.BC91M77d.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"答疑","description":"","frontmatter":{"title":"答疑","order":3},"headers":[],"relativePath":"deploy/fandq.md","filePath":"zh/deploy/fandq.md","lastUpdated":1725101868000}'),r={name:"deploy/fandq.md"},n=a('

答疑

常见问题

  • 设备上Python环境太乱了,pip和python不对应怎么办?

    • 请使用/path/to/python -m pip install -r requirements.txt来安装依赖, 然后用/path/to/python main.py来启动Bot, 其中/path/to/python是你要用来运行Bot的可执行文件
  • 为什么我启动后机器人没有反应?

    • 请检查配置文件的command_startsuperusers,确认你有权限使用命令并按照正确的命令发送
    • 确认命令头没有和nickname{}冲突,例如一个命令是help,但是Bot昵称有一个help,那么将会被解析为nickname而不是命令
  • 更新轻雪失败,报错InvalidGitRepositoryError

    • 请正确安装Git,并使用克隆而非直接下载的方式部署轻雪
  • 怎么登录聊天平台,例如QQ?

    • 你有这个问题说明你不是很了解这个项目,本项目不负责实现登录功能,只负责处理和回应消息,登录功能由实现端(协议端)提供, 实现端本身不负责处理响应逻辑,将消息按照OneBot标准处理好上报给轻雪 你需要使用Onebot标准的实现端来连接到轻雪并将消息上报给轻雪,下面已经列出一些推荐的实现端
  • Playwright安装失败

    • 输入playwright install安装浏览器
  • 有的插件安装后报错无法启动

    • 请先查阅插件文档,确认插件必要配置项完好后,仍然出现问题,请联系插件作者或在安全模式safe_mode: true下启动轻雪,在安全模式下你可以使用npm uninstall卸载问题插件
  • 其他问题

    加入QQ群775840726

推荐方案(QQ)

  1. Lagrange.OneBot,基于NTQQ的OneBot实现,目前Markdown消息支持Lagrange
  2. LLOneBot,NTQQ的OneBot插件,需要安装NTQQ
  3. OpenShamrock,基于Lsposed的OneBot11实现
  4. TRSS-Yunzai,基于node.js,可使用ws-plugin进行通信
  5. go-cqhttpgo语言实现的OneBot11实现端,目前可用性较低
  6. Gensokyo,基于 OneBot QQ官方机器人Api Golang 原生实现,需要官方机器人权限
  7. 人工实现的Onebot协议,自己整一个WebSocket客户端,看着QQ的消息,然后给轻雪传输数据

推荐方案(Minecraft)

  1. MinecraftOneBot,我们专门为Minecraft开发的服务器Bot,支持OneBotV11标准

使用其他项目连接请先自行查阅文档,若有困难请联系对应开发者而不是Liteyuki的开发者

鸣谢

',10),l=[n];function i(c,h,d,p,s,u){return t(),o("div",null,l)}const g=e(r,[["render",i]]);export{m as __pageData,g as default}; diff --git a/assets/deploy_fandq.md.BC91M77d.lean.js b/assets/deploy_fandq.md.BC91M77d.lean.js new file mode 100644 index 00000000..a562a899 --- /dev/null +++ b/assets/deploy_fandq.md.BC91M77d.lean.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"答疑","description":"","frontmatter":{"title":"答疑","order":3},"headers":[],"relativePath":"deploy/fandq.md","filePath":"zh/deploy/fandq.md","lastUpdated":1725101868000}'),r={name:"deploy/fandq.md"},n=a("",10),l=[n];function i(c,h,d,p,s,u){return t(),o("div",null,l)}const g=e(r,[["render",i]]);export{m as __pageData,g as default}; diff --git a/assets/deploy_install.md.DaqD6Ylg.js b/assets/deploy_install.md.DaqD6Ylg.js new file mode 100644 index 00000000..89582db0 --- /dev/null +++ b/assets/deploy_install.md.DaqD6Ylg.js @@ -0,0 +1,8 @@ +import{_ as i,c as e,o as t,a4 as s}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{"title":"安装","order":1},"headers":[],"relativePath":"deploy/install.md","filePath":"zh/deploy/install.md","lastUpdated":1725102337000}'),a={name:"deploy/install.md"},o=s(`

安装

常规部署

  1. 安装 GitPython3.10+ 环境
bash
# 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项
+git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
+# 切换到Bot目录下
+cd LiteyukiBot
+# 安装依赖
+pip install -r requirements.txt
+# 启动Bot
+python main.py

TIP

推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用python -m venv .venv来创建虚拟环境,然后使用.venv\\Scripts\\activate来激活虚拟环境(Linux下使用source .venv/bin/activate激活)

使用Docker构建

  1. 安装 Docker
  2. 克隆项目 git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
  3. 进入轻雪目录 cd LiteyukiBot
  4. 构建镜像 docker build -t liteyukibot .
  5. 启动容器 docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot

TIP

Windows请使用项目绝对目录/path/to/LiteyukiBot代替$(pwd)
若你修改了端口号请将20216:20216中的20216替换为你的端口号

使用TRSS Scripts部署

TRSS_Liteyuki轻雪机器人管理脚本,该功能由TRSS提供支持,不是LiteyukiBot官方提供的功能,推荐使用Arch Linux

装置要求

  • Windows系统版本最低Windows10+/Windows Server 2019+
  • Linux系统要支持Python3.10+,推荐Ubuntu 20.04+(别用你那b CentOS)
  • CPU: 至少1vCPU
  • 内存: Bot无其他插件会占用300~500MB,包括chromiumnode等进程,其他插件占用视具体插件而定,建议1GB以上
  • 硬盘: 至少1GB空间

WARNING

如果装置上有多个环境,请使用path/to/python -m pip install -r requirements.txt来安装依赖,path/to/python为你的Python可执行文件路径

WARNING

轻雪的更新功能依赖Git,如果你没有安装Git直接下载源代码运行,你将无法使用更新功能

其他问题请移步至答疑

`,15),l=[o];function n(c,d,r,h,p,k){return t(),e("div",null,l)}const b=i(a,[["render",n]]);export{g as __pageData,b as default}; diff --git a/assets/deploy_install.md.DaqD6Ylg.lean.js b/assets/deploy_install.md.DaqD6Ylg.lean.js new file mode 100644 index 00000000..a906e68a --- /dev/null +++ b/assets/deploy_install.md.DaqD6Ylg.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as t,a4 as s}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{"title":"安装","order":1},"headers":[],"relativePath":"deploy/install.md","filePath":"zh/deploy/install.md","lastUpdated":1725102337000}'),a={name:"deploy/install.md"},o=s("",15),l=[o];function n(c,d,r,h,p,k){return t(),e("div",null,l)}const b=i(a,[["render",n]]);export{g as __pageData,b as default}; diff --git a/assets/dev_api_api.md.BjidfGYh.js b/assets/dev_api_api.md.BjidfGYh.js new file mode 100644 index 00000000..48fc044b --- /dev/null +++ b/assets/dev_api_api.md.BjidfGYh.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/api.md","filePath":"zh/dev/api/api.md","lastUpdated":null}'),o={name:"dev/api/api.md"},r=i('

liteyuki

var __version__

  • 说明: 测试版本号

  • 默认值: '6.3.10'

',3),l=[r];function s(_,n,d,c,p,u){return t(),a("div",null,l)}const m=e(o,[["render",s]]);export{v as __pageData,m as default}; diff --git a/assets/dev_api_api.md.BjidfGYh.lean.js b/assets/dev_api_api.md.BjidfGYh.lean.js new file mode 100644 index 00000000..14cc681a --- /dev/null +++ b/assets/dev_api_api.md.BjidfGYh.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/api.md","filePath":"zh/dev/api/api.md","lastUpdated":null}'),o={name:"dev/api/api.md"},r=i("",3),l=[r];function s(_,n,d,c,p,u){return t(),a("div",null,l)}const m=e(o,[["render",s]]);export{v as __pageData,m as default}; diff --git a/assets/dev_api_bot_bot.md.CmVyYr_O.js b/assets/dev_api_bot_bot.md.CmVyYr_O.js new file mode 100644 index 00000000..10bd7e8c --- /dev/null +++ b/assets/dev_api_bot_bot.md.CmVyYr_O.js @@ -0,0 +1,211 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/bot.md","filePath":"zh/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"dev/api/bot/bot.md"},l=n(`

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

说明: 初始化轻雪实例

参数:

  • *args:
  • **kwargs: 配置
源代码在GitHub上查看
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

说明: 启动逻辑

源代码在GitHub上查看
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

说明: 外部启动接口

源代码在GitHub上查看
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

说明: 保持轻雪运行

源代码在GitHub上查看
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

说明: 信号处理

参数:

  • signum:
  • frame:
源代码在GitHub上查看
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

说明: 重启轻雪本体

源代码在GitHub上查看
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

说明: 停止轻雪

参数:

  • name: 进程名称, 默认为None, 所有进程
源代码在GitHub上查看
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

说明: 初始化轻雪, 自动调用

源代码在GitHub上查看
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

源代码在GitHub上查看
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

说明: 停止轻雪

源代码在GitHub上查看
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

说明: 注册启动前的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

说明: 注册启动后的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册停止后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册进程停止前的函数,为子进程停止时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

说明: 注册进程重启前的函数,为子进程重启时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

说明: 注册重启后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

说明: 获取轻雪实例

返回: LiteyukiBot: 当前的轻雪实例

源代码在GitHub上查看
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

说明: 获取配置

参数:

  • key: 配置键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

说明: 获取配置,兼容旧版本

参数:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
源代码在GitHub上查看
python
def print_logo():
+    print('\\x1b[34m' + '\\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \\n    /  |      /      |/        |/        |/  \\\\    /  |/  |  /  |/  |  /  |/      |\\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\\\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \\n    $$ |        $$ |     $$ |   $$ |__     $$  \\\\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \\n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \\n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\\\    $$ |  \\n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\\\__$$ |$$ |$$  \\\\  _$$ |_ \\n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \\n                ' + '\\x1b[0m')
`,85),e=[l];function h(p,k,r,d,g,o){return a(),i("div",null,e)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/dev_api_bot_bot.md.CmVyYr_O.lean.js b/assets/dev_api_bot_bot.md.CmVyYr_O.lean.js new file mode 100644 index 00000000..379d36c7 --- /dev/null +++ b/assets/dev_api_bot_bot.md.CmVyYr_O.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/bot.md","filePath":"zh/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"dev/api/bot/bot.md"},l=n("",85),e=[l];function h(p,k,r,d,g,o){return a(),i("div",null,e)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/dev_api_bot_index.md.DudPhKae.js b/assets/dev_api_bot_index.md.DudPhKae.js new file mode 100644 index 00000000..e8aaceca --- /dev/null +++ b/assets/dev_api_bot_index.md.DudPhKae.js @@ -0,0 +1,211 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/index.md","filePath":"zh/dev/api/bot/index.md","lastUpdated":null}'),t={name:"dev/api/bot/index.md"},l=n(`

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

说明: 初始化轻雪实例

参数:

  • *args:
  • **kwargs: 配置
源代码在GitHub上查看
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

说明: 启动逻辑

源代码在GitHub上查看
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

说明: 外部启动接口

源代码在GitHub上查看
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

说明: 保持轻雪运行

源代码在GitHub上查看
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

说明: 信号处理

参数:

  • signum:
  • frame:
源代码在GitHub上查看
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

说明: 重启轻雪本体

源代码在GitHub上查看
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

说明: 停止轻雪

参数:

  • name: 进程名称, 默认为None, 所有进程
源代码在GitHub上查看
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

说明: 初始化轻雪, 自动调用

源代码在GitHub上查看
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

源代码在GitHub上查看
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

说明: 停止轻雪

源代码在GitHub上查看
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

说明: 注册启动前的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

说明: 注册启动后的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册停止后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册进程停止前的函数,为子进程停止时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

说明: 注册进程重启前的函数,为子进程重启时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

说明: 注册重启后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

说明: 获取轻雪实例

返回: LiteyukiBot: 当前的轻雪实例

源代码在GitHub上查看
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

说明: 获取配置

参数:

  • key: 配置键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

说明: 获取配置,兼容旧版本

参数:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
源代码在GitHub上查看
python
def print_logo():
+    print('\\x1b[34m' + '\\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \\n    /  |      /      |/        |/        |/  \\\\    /  |/  |  /  |/  |  /  |/      |\\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\\\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \\n    $$ |        $$ |     $$ |   $$ |__     $$  \\\\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \\n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \\n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\\\    $$ |  \\n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\\\__$$ |$$ |$$  \\\\  _$$ |_ \\n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \\n                ' + '\\x1b[0m')
`,85),e=[l];function h(p,k,r,d,g,o){return a(),i("div",null,e)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/dev_api_bot_index.md.DudPhKae.lean.js b/assets/dev_api_bot_index.md.DudPhKae.lean.js new file mode 100644 index 00000000..f5927c92 --- /dev/null +++ b/assets/dev_api_bot_index.md.DudPhKae.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/index.md","filePath":"zh/dev/api/bot/index.md","lastUpdated":null}'),t={name:"dev/api/bot/index.md"},l=n("",85),e=[l];function h(p,k,r,d,g,o){return a(),i("div",null,e)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/dev_api_bot_lifespan.md.B4hpMOqt.js b/assets/dev_api_bot_lifespan.md.B4hpMOqt.js new file mode 100644 index 00000000..70578a4c --- /dev/null +++ b/assets/dev_api_bot_lifespan.md.B4hpMOqt.js @@ -0,0 +1,114 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"dev/api/bot/lifespan.md","filePath":"zh/dev/api/bot/lifespan.md","lastUpdated":null}'),t={name:"dev/api/bot/lifespan.md"},e=n(`

liteyuki.bot.lifespan

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午8:24 @Author : snowykami @Email : snowykami@outlook.com @File : lifespan.py @Software: PyCharm

class Lifespan

def __init__(self) -> None

说明: 轻雪生命周期管理,启动、停止、重启

源代码在GitHub上查看
python
def __init__(self) -> None:
+    """
+        轻雪生命周期管理,启动、停止、重启
+        """
+    self.life_flag: int = 0
+    self._before_start_funcs: list[LIFESPAN_FUNC] = []
+    self._after_start_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._after_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_restart_funcs: list[LIFESPAN_FUNC] = []
+    self._after_restart_funcs: list[LIFESPAN_FUNC] = []

@staticmethod

async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None

说明: 并发运行异步函数

参数:

  • funcs:
源代码在GitHub上查看
python
@staticmethod
+async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None:
+    """
+        并发运行异步函数
+        Args:
+            funcs:
+        Returns:
+        """
+    loop = asyncio.get_running_loop()
+    tasks = [func(*args, **kwargs) if is_coroutine_callable(func) else async_wrapper(func)(*args, **kwargs) for func in funcs]
+    await asyncio.gather(*tasks)

def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册启动时的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_start_funcs.append(func)
+    return func

def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册启动时的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_start_funcs.append(func)
+    return func

def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册停止前的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止前的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_shutdown_funcs.append(func)
+    return func

def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册停止后的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止后的函数
+        Args:
+            func:
+
+        Returns:
+            LIFESPAN_FUNC:
+
+        """
+    self._after_shutdown_funcs.append(func)
+    return func

def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册重启时的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_restart_funcs.append(func)
+    return func

def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册重启后的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启后的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_restart_funcs.append(func)
+    return func

async def before_start(self) -> None

说明: 启动前

源代码在GitHub上查看
python
async def before_start(self) -> None:
+    """
+        启动前
+        Returns:
+        """
+    logger.debug('Running before_start functions')
+    await self.run_funcs(self._before_start_funcs)

async def after_start(self) -> None

说明: 启动后

源代码在GitHub上查看
python
async def after_start(self) -> None:
+    """
+        启动后
+        Returns:
+        """
+    logger.debug('Running after_start functions')
+    await self.run_funcs(self._after_start_funcs)

async def before_process_shutdown(self) -> None

说明: 停止前

源代码在GitHub上查看
python
async def before_process_shutdown(self) -> None:
+    """
+        停止前
+        Returns:
+        """
+    logger.debug('Running before_shutdown functions')
+    await self.run_funcs(self._before_process_shutdown_funcs)

async def after_shutdown(self) -> None

说明: 停止后

源代码在GitHub上查看
python
async def after_shutdown(self) -> None:
+    """
+        停止后
+        Returns:
+        """
+    logger.debug('Running after_shutdown functions')
+    await self.run_funcs(self._after_shutdown_funcs)

async def before_process_restart(self) -> None

说明: 重启前

源代码在GitHub上查看
python
async def before_process_restart(self) -> None:
+    """
+        重启前
+        Returns:
+        """
+    logger.debug('Running before_restart functions')
+    await self.run_funcs(self._before_process_restart_funcs)

async def after_restart(self) -> None

说明: 重启后

源代码在GitHub上查看
python
async def after_restart(self) -> None:
+    """
+        重启后
+        Returns:
+
+        """
+    logger.debug('Running after_restart functions')
+    await self.run_funcs(self._after_restart_funcs)
`,67),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{F as __pageData,c as default}; diff --git a/assets/dev_api_bot_lifespan.md.B4hpMOqt.lean.js b/assets/dev_api_bot_lifespan.md.B4hpMOqt.lean.js new file mode 100644 index 00000000..a4bc1b67 --- /dev/null +++ b/assets/dev_api_bot_lifespan.md.B4hpMOqt.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"dev/api/bot/lifespan.md","filePath":"zh/dev/api/bot/lifespan.md","lastUpdated":null}'),t={name:"dev/api/bot/lifespan.md"},e=n("",67),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{F as __pageData,c as default}; diff --git a/assets/dev_api_comm_channel.md.CNJvRyvp.js b/assets/dev_api_comm_channel.md.CNJvRyvp.js new file mode 100644 index 00000000..258b4b00 --- /dev/null +++ b/assets/dev_api_comm_channel.md.CNJvRyvp.js @@ -0,0 +1,196 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.comm.channel","description":"","frontmatter":{"title":"liteyuki.comm.channel"},"headers":[],"relativePath":"dev/api/comm/channel.md","filePath":"zh/dev/api/comm/channel.md","lastUpdated":null}'),t={name:"dev/api/comm/channel.md"},l=n(`

liteyuki.comm.channel

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午11:21 @Author : snowykami @Email : snowykami@outlook.com @File : channel_.py @Software: PyCharm

本模块定义了一个通用的通道类,用于进程间通信

class Channel(Generic[T])

def __init__(self, name: str, type_check: Optional[bool] = None)

说明: 初始化通道

参数:

  • name: 通道ID
  • type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
源代码在GitHub上查看
python
def __init__(self, name: str, type_check: Optional[bool]=None):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+            type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
+        """
+    self.conn_send, self.conn_recv = Pipe()
+    self._conn_send_inner, self._conn_recv_inner = Pipe()
+    self._closed = False
+    self._on_main_receive_func_ids: list[int] = []
+    self._on_sub_receive_func_ids: list[int] = []
+    self.name: str = name
+    self.is_receive_loop_running = False
+    if type_check is None:
+        type_check = self._get_generic_type() is not None
+    elif type_check:
+        if self._get_generic_type() is None:
+            raise TypeError('Type hint is required for enforcing type check.')
+    self.type_check = type_check
+    if name in _channel:
+        raise ValueError(f'Channel {name} already exists')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = self
+        logger.debug(f'Channel {name} initialized in main process')
+    else:
+        logger.debug(f'Channel {name} initialized in sub process, should manually set in main process')

def _get_generic_type(self) -> Optional[type]

说明: 获取通道传递泛型类型

返回: Optional[type]: 泛型类型

源代码在GitHub上查看
python
def _get_generic_type(self) -> Optional[type]:
+    """
+        获取通道传递泛型类型
+
+        Returns:
+            Optional[type]: 泛型类型
+        """
+    if hasattr(self, '__orig_class__'):
+        return get_args(self.__orig_class__)[0]
+    return None

def _validate_structure(self, data: Any, structure: type) -> bool

说明: 验证数据结构

参数:

  • data: 数据
  • structure: 结构

返回: bool: 是否通过验证

源代码在GitHub上查看
python
def _validate_structure(self, data: Any, structure: type) -> bool:
+    """
+        验证数据结构
+        Args:
+            data: 数据
+            structure: 结构
+
+        Returns:
+            bool: 是否通过验证
+        """
+    if isinstance(structure, type):
+        return isinstance(data, structure)
+    elif isinstance(structure, tuple):
+        if not isinstance(data, tuple) or len(data) != len(structure):
+            return False
+        return all((self._validate_structure(d, s) for d, s in zip(data, structure)))
+    elif isinstance(structure, list):
+        if not isinstance(data, list):
+            return False
+        return all((self._validate_structure(d, structure[0]) for d in data))
+    elif isinstance(structure, dict):
+        if not isinstance(data, dict):
+            return False
+        return all((k in data and self._validate_structure(data[k], structure[k]) for k in structure))
+    return False

def send(self, data: T)

说明: 发送数据,发送函数为同步函数,没有异步的必要

参数:

  • data: 数据
源代码在GitHub上查看
python
def send(self, data: T):
+    """
+        发送数据,发送函数为同步函数,没有异步的必要
+        Args:
+            data: 数据
+        """
+    if self.type_check:
+        _type = self._get_generic_type()
+        if _type is not None and (not self._validate_structure(data, _type)):
+            raise TypeError(f'Data must be an instance of {_type}, {type(data)} found')
+    if self._closed:
+        raise RuntimeError('Cannot send to a closed channel_')
+    self.conn_send.send(data)

def receive(self) -> T

说明: 同步接收数据,会阻塞线程

源代码在GitHub上查看
python
def receive(self) -> T:
+    """
+        同步接收数据,会阻塞线程
+        Args:
+        """
+    if self._closed:
+        raise RuntimeError('Cannot receive from a closed channel_')
+    while True:
+        data = self.conn_recv.recv()
+        return data

async def async_receive(self) -> T

说明: 异步接收数据,会挂起等待

源代码在GitHub上查看
python
async def async_receive(self) -> T:
+    """
+        异步接收数据,会挂起等待
+        """
+    print('等待接收数据')
+    loop = asyncio.get_running_loop()
+    data = await loop.run_in_executor(None, self.receive)
+    print('接收到数据')
+    return data

def on_receive(self, filter_func: Optional[FILTER_FUNC] = None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]

说明: 接收数据并执行函数

参数:

  • filter_func: 过滤函数,为None则不过滤

返回: 装饰器,装饰一个函数在接收到数据后执行

源代码在GitHub上查看
python
def on_receive(self, filter_func: Optional[FILTER_FUNC]=None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]:
+    """
+        接收数据并执行函数
+        Args:
+            filter_func: 过滤函数,为None则不过滤
+        Returns:
+            装饰器,装饰一个函数在接收到数据后执行
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('on_receive can only be used in main process')
+
+    def decorator(func: Callable[[T], Any]) -> Callable[[T], Any]:
+        global _func_id
+
+        async def wrapper(data: T) -> Any:
+            if filter_func is not None:
+                if is_coroutine_callable(filter_func):
+                    if not await filter_func(data):
+                        return
+                elif not filter_func(data):
+                    return
+            if is_coroutine_callable(func):
+                return await func(data)
+            else:
+                return func(data)
+        _callback_funcs[_func_id] = wrapper
+        if IS_MAIN_PROCESS:
+            self._on_main_receive_func_ids.append(_func_id)
+        else:
+            self._on_sub_receive_func_ids.append(_func_id)
+        _func_id += 1
+        return func
+    return decorator

async def _run_on_receive_funcs(self, data: Any)

说明: 运行接收函数

参数:

  • data: 数据
源代码在GitHub上查看
python
async def _run_on_receive_funcs(self, data: Any):
+    """
+        运行接收函数
+        Args:
+            data: 数据
+        """
+    if IS_MAIN_PROCESS:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_main_receive_func_ids]
+    else:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_sub_receive_func_ids]

async def start_receive_loop(self)

说明: 开始接收数据 会自动判断主进程和子进程,需要在对应进程都调度一次

源代码在GitHub上查看
python
async def start_receive_loop(self):
+    """
+        开始接收数据
+        会自动判断主进程和子进程,需要在对应进程都调度一次
+        """
+    if len(self._on_main_receive_func_ids) == 0:
+        logger.warning(f'No on_receive function registered for {self.name}')
+        return
+    self.is_receive_loop_running = True
+    logger.debug(f'Starting receive loop for {self.name}')
+    while not self._closed:
+        data = await self.async_receive()
+        await self._run_on_receive_funcs(data)

var active_channel

  • 说明: 子进程可用的主动和被动通道

  • 类型: Channel

  • 默认值: Channel(name='active_channel')

var publish_channel

  • 说明: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • 类型: Channel[tuple[str, dict[str, Any]]]

  • 默认值: Channel(name='publish_channel')

var channel_deliver_active_channel

  • 说明: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • 类型: Channel[Channel[Any]]

  • 默认值: NO_DEFAULT

def set_channel(name: str, channel: Channel)

说明: 设置通道实例

参数:

  • name: 通道名称
  • channel: 通道实例
源代码在GitHub上查看
python
def set_channel(name: str, channel: 'Channel'):
+    """
+    设置通道实例
+    Args:
+        name: 通道名称
+        channel: 通道实例
+    """
+    if not isinstance(channel, Channel):
+        raise TypeError(f'channel_ must be an instance of Channel, {type(channel)} found')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = channel
+    else:
+        channel_deliver_passive_channel.send(('set_channel', {'name': name, 'channel_': channel}))

def set_channels(channels: dict[str, Channel])

说明: 设置通道实例

参数:

  • channels: 通道名称
源代码在GitHub上查看
python
def set_channels(channels: dict[str, 'Channel']):
+    """
+    设置通道实例
+    Args:
+        channels: 通道名称
+    """
+    for name, channel in channels.items():
+        set_channel(name, channel)

def get_channel(name: str) -> Channel

说明: 获取通道实例

参数:

  • name: 通道名称
源代码在GitHub上查看
python
def get_channel(name: str) -> 'Channel':
+    """
+    获取通道实例
+    Args:
+        name: 通道名称
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel[name]
+    else:
+        recv_chan = Channel[Channel[Any]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channel', {'name': name, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def get_channels() -> dict[str, Channel]

说明: 获取通道实例

源代码在GitHub上查看
python
def get_channels() -> dict[str, 'Channel']:
+    """
+    获取通道实例
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel
+    else:
+        recv_chan = Channel[dict[str, Channel[Any]]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channels', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')

def on_set_channel(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')
+def on_set_channel(data: tuple[str, dict[str, Any]]):
+    name, channel = (data[1]['name'], data[1]['channel_'])
+    set_channel(name, channel)

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')

def on_get_channel(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')
+def on_get_channel(data: tuple[str, dict[str, Any]]):
+    name, recv_chan = (data[1]['name'], data[1]['recv_chan'])
+    recv_chan.send(get_channel(name))

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')

def on_get_channels(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')
+def on_get_channels(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(get_channels())
`,78),h=[l];function e(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(t,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/dev_api_comm_channel.md.CNJvRyvp.lean.js b/assets/dev_api_comm_channel.md.CNJvRyvp.lean.js new file mode 100644 index 00000000..a3bbd77e --- /dev/null +++ b/assets/dev_api_comm_channel.md.CNJvRyvp.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.comm.channel","description":"","frontmatter":{"title":"liteyuki.comm.channel"},"headers":[],"relativePath":"dev/api/comm/channel.md","filePath":"zh/dev/api/comm/channel.md","lastUpdated":null}'),t={name:"dev/api/comm/channel.md"},l=n("",78),h=[l];function e(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(t,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/dev_api_comm_comm.md.UNalIkKO.js b/assets/dev_api_comm_comm.md.UNalIkKO.js new file mode 100644 index 00000000..b8763d6e --- /dev/null +++ b/assets/dev_api_comm_comm.md.UNalIkKO.js @@ -0,0 +1 @@ +import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/comm.md","filePath":"zh/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"dev/api/comm/comm.md"},i=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),n=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[i,n];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default}; diff --git a/assets/dev_api_comm_comm.md.UNalIkKO.lean.js b/assets/dev_api_comm_comm.md.UNalIkKO.lean.js new file mode 100644 index 00000000..b8763d6e --- /dev/null +++ b/assets/dev_api_comm_comm.md.UNalIkKO.lean.js @@ -0,0 +1 @@ +import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/comm.md","filePath":"zh/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"dev/api/comm/comm.md"},i=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),n=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[i,n];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default}; diff --git a/assets/dev_api_comm_event.md.C9P63b1v.js b/assets/dev_api_comm_event.md.C9P63b1v.js new file mode 100644 index 00000000..b6bd9132 --- /dev/null +++ b/assets/dev_api_comm_event.md.C9P63b1v.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"dev/api/comm/event.md","filePath":"zh/dev/api/comm/event.md","lastUpdated":null}'),s={name:"dev/api/comm/event.md"},n=i('

liteyuki.comm.event

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class Event

def __init__(self, name: str, data: dict[str, Any])

源代码在GitHub上查看
python
def __init__(self, name: str, data: dict[str, Any]):\n    self.name = name\n    self.data = data
',6),l=[n];function r(h,o,d,k,p,c){return e(),t("div",null,l)}const _=a(s,[["render",r]]);export{y as __pageData,_ as default}; diff --git a/assets/dev_api_comm_event.md.C9P63b1v.lean.js b/assets/dev_api_comm_event.md.C9P63b1v.lean.js new file mode 100644 index 00000000..01c19a4c --- /dev/null +++ b/assets/dev_api_comm_event.md.C9P63b1v.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"dev/api/comm/event.md","filePath":"zh/dev/api/comm/event.md","lastUpdated":null}'),s={name:"dev/api/comm/event.md"},n=i("",6),l=[n];function r(h,o,d,k,p,c){return e(),t("div",null,l)}const _=a(s,[["render",r]]);export{y as __pageData,_ as default}; diff --git a/assets/dev_api_comm_index.md.Bztx56-h.js b/assets/dev_api_comm_index.md.Bztx56-h.js new file mode 100644 index 00000000..d450b16e --- /dev/null +++ b/assets/dev_api_comm_index.md.Bztx56-h.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/index.md","filePath":"zh/dev/api/comm/index.md","lastUpdated":null}'),n={name:"dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),s=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return i(),o("div",null,l)}const x=a(n,[["render",r]]);export{k as __pageData,x as default}; diff --git a/assets/dev_api_comm_index.md.Bztx56-h.lean.js b/assets/dev_api_comm_index.md.Bztx56-h.lean.js new file mode 100644 index 00000000..d450b16e --- /dev/null +++ b/assets/dev_api_comm_index.md.Bztx56-h.lean.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/index.md","filePath":"zh/dev/api/comm/index.md","lastUpdated":null}'),n={name:"dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),s=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return i(),o("div",null,l)}const x=a(n,[["render",r]]);export{k as __pageData,x as default}; diff --git a/assets/dev_api_comm_rpc.md.Ctatb5Fy.js b/assets/dev_api_comm_rpc.md.Ctatb5Fy.js new file mode 100644 index 00000000..bec5b865 --- /dev/null +++ b/assets/dev_api_comm_rpc.md.Ctatb5Fy.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"dev/api/comm/rpc.md"},n=t('

liteyuki.comm.rpc

说明: 本模块用于实现RPC(基于IPC)通信

class RPC

def __init__(self, on_calling: ON_CALLING_FUNC) -> None

源代码在GitHub上查看
python
def __init__(self, on_calling: ON_CALLING_FUNC) -> None:\n    self.on_calling = on_calling

def call(self, args: tuple, kwargs: dict) -> Any

说明: 调用

源代码在GitHub上查看
python
def call(self, args: tuple, kwargs: dict) -> Any:\n    """\n        调用\n        """\n    return self.on_calling(args, kwargs)
',8),l=[n];function p(h,r,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default}; diff --git a/assets/dev_api_comm_rpc.md.Ctatb5Fy.lean.js b/assets/dev_api_comm_rpc.md.Ctatb5Fy.lean.js new file mode 100644 index 00000000..20e1b452 --- /dev/null +++ b/assets/dev_api_comm_rpc.md.Ctatb5Fy.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"dev/api/comm/rpc.md"},n=t("",8),l=[n];function p(h,r,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default}; diff --git a/assets/dev_api_comm_socks_channel.md.i5OohqUe.js b/assets/dev_api_comm_socks_channel.md.i5OohqUe.js new file mode 100644 index 00000000..4c61f886 --- /dev/null +++ b/assets/dev_api_comm_socks_channel.md.i5OohqUe.js @@ -0,0 +1,26 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),n={name:"dev/api/comm/socks_channel.md"},t=e(`

liteyuki.comm.socks_channel

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/25 下午3:54 @Author : snowykami @Email : snowykami@outlook.com @File : channelv2.py @Software: PyCharm

class SocksChannel

def __init__(self, name: str)

说明: 初始化通道

参数:

  • name: 通道ID
源代码在GitHub上查看
python
def __init__(self, name: str):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+        """
+    self._name = name
+    self._conn_send = None
+    self._conn_recv = None
+    self._closed = False

def send(self, data)

说明: 发送数据

参数:

  • data: 数据
源代码在GitHub上查看
python
def send(self, data):
+    """
+        发送数据
+        Args:
+            data: 数据
+        """
+    pass

def receive(self)

说明: 接收数据

返回: data: 数据

源代码在GitHub上查看
python
def receive(self):
+    """
+        接收数据
+        Returns:
+            data: 数据
+        """
+    pass

def close(self)

说明: 关闭通道

源代码在GitHub上查看
python
def close(self):
+    """
+        关闭通道
+        """
+    pass
`,21),l=[t];function h(p,k,o,r,d,c){return i(),a("div",null,l)}const y=s(n,[["render",h]]);export{u as __pageData,y as default}; diff --git a/assets/dev_api_comm_socks_channel.md.i5OohqUe.lean.js b/assets/dev_api_comm_socks_channel.md.i5OohqUe.lean.js new file mode 100644 index 00000000..53c26e10 --- /dev/null +++ b/assets/dev_api_comm_socks_channel.md.i5OohqUe.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),n={name:"dev/api/comm/socks_channel.md"},t=e("",21),l=[t];function h(p,k,o,r,d,c){return i(),a("div",null,l)}const y=s(n,[["render",h]]);export{u as __pageData,y as default}; diff --git a/assets/dev_api_comm_storage.md.CquSLWbc.js b/assets/dev_api_comm_storage.md.CquSLWbc.js new file mode 100644 index 00000000..b48ff03d --- /dev/null +++ b/assets/dev_api_comm_storage.md.CquSLWbc.js @@ -0,0 +1,144 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"dev/api/comm/storage.md","filePath":"zh/dev/api/comm/storage.md","lastUpdated":null}'),t={name:"dev/api/comm/storage.md"},e=n(`

liteyuki.comm.storage

说明: 共享内存模块。类似于redis,但是更加轻量级并且线程安全

var _on_main_subscriber_receive_funcs

  • 说明: 主进程订阅者接收函数

  • 类型: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • 默认值: {}

var _on_sub_subscriber_receive_funcs

  • 说明: 子进程订阅者接收函数

  • 类型: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • 默认值: {}

class KeyValueStore

def __init__(self)

源代码在GitHub上查看
python
def __init__(self):
+    self._store = {}
+    self.active_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-active')
+    self.passive_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-passive')
+    self.publish_channel = Channel[tuple[str, Any]](name='shared_memory-publish')
+    self.is_main_receive_loop_running = False
+    self.is_sub_receive_loop_running = False

def set(self, key: str, value: Any) -> None

说明: 设置键值对

参数:

  • key: 键
  • value: 值
源代码在GitHub上查看
python
def set(self, key: str, value: Any) -> None:
+    """
+        设置键值对
+        Args:
+            key: 键
+            value: 值
+
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            self._store[key] = value
+    else:
+        self.passive_chan.send(('set', {'key': key, 'value': value}))

def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]

说明: 获取键值对

参数:

  • key: 键
  • default: 默认值

返回: Any: 值

源代码在GitHub上查看
python
def get(self, key: str, default: Optional[Any]=None) -> Optional[Any]:
+    """
+        获取键值对
+        Args:
+            key: 键
+            default: 默认值
+
+        Returns:
+            Any: 值
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            return self._store.get(key, default)
+    else:
+        recv_chan = Channel[Optional[Any]]('recv_chan')
+        self.passive_chan.send(('get', {'key': key, 'default': default, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def delete(self, key: str, ignore_key_error: bool = True) -> None

说明: 删除键值对

参数:

  • key: 键
  • ignore_key_error: 是否忽略键不存在的错误
源代码在GitHub上查看
python
def delete(self, key: str, ignore_key_error: bool=True) -> None:
+    """
+        删除键值对
+        Args:
+            key: 键
+            ignore_key_error: 是否忽略键不存在的错误
+
+        Returns:
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            if key in self._store:
+                try:
+                    del self._store[key]
+                    del _locks[key]
+                except KeyError as e:
+                    if not ignore_key_error:
+                        raise e
+    else:
+        self.passive_chan.send(('delete', {'key': key}))

def get_all(self) -> dict[str, Any]

说明: 获取所有键值对

返回: dict[str, Any]: 键值对

源代码在GitHub上查看
python
def get_all(self) -> dict[str, Any]:
+    """
+        获取所有键值对
+        Returns:
+            dict[str, Any]: 键值对
+        """
+    if IS_MAIN_PROCESS:
+        return self._store
+    else:
+        recv_chan = Channel[dict[str, Any]]('recv_chan')
+        self.passive_chan.send(('get_all', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

def publish(self, channel_: str, data: Any) -> None

说明: 发布消息

参数:

  • channel_: 频道
  • data: 数据
源代码在GitHub上查看
python
def publish(self, channel_: str, data: Any) -> None:
+    """
+        发布消息
+        Args:
+            channel_: 频道
+            data: 数据
+
+        Returns:
+        """
+    self.active_chan.send(('publish', {'channel': channel_, 'data': data}))

def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]

说明: 订阅者接收消息时的回调

参数:

  • channel_: 频道

返回: 装饰器

源代码在GitHub上查看
python
def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]:
+    """
+        订阅者接收消息时的回调
+        Args:
+            channel_: 频道
+
+        Returns:
+            装饰器
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot subscribe in sub process.')
+
+    def decorator(func: ON_RECEIVE_FUNC) -> ON_RECEIVE_FUNC:
+
+        async def wrapper(data: Any):
+            if is_coroutine_callable(func):
+                await func(data)
+            else:
+                func(data)
+        if IS_MAIN_PROCESS:
+            if channel_ not in _on_main_subscriber_receive_funcs:
+                _on_main_subscriber_receive_funcs[channel_] = []
+            _on_main_subscriber_receive_funcs[channel_].append(wrapper)
+        else:
+            if channel_ not in _on_sub_subscriber_receive_funcs:
+                _on_sub_subscriber_receive_funcs[channel_] = []
+            _on_sub_subscriber_receive_funcs[channel_].append(wrapper)
+        return wrapper
+    return decorator

@staticmethod

async def run_subscriber_receive_funcs(channel_: str, data: Any)

说明: 运行订阅者接收函数

参数:

  • channel_: 频道
  • data: 数据
源代码在GitHub上查看
python
@staticmethod
+async def run_subscriber_receive_funcs(channel_: str, data: Any):
+    """
+        运行订阅者接收函数
+        Args:
+            channel_: 频道
+            data: 数据
+        """
+    [asyncio.create_task(func(data)) for func in _on_main_subscriber_receive_funcs[channel_]]

async def start_receive_loop(self)

说明: 启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程

源代码在GitHub上查看
python
async def start_receive_loop(self):
+    """
+        启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot start receive loop in sub process.')
+    while True:
+        data = await self.active_chan.async_receive()
+        if data[0] == 'publish':
+            await self.run_subscriber_receive_funcs(data[1]['channel'], data[1]['data'])
+            self.publish_channel.send(data)

class GlobalKeyValueStore

@classmethod

def get_instance(cls)

源代码在GitHub上查看
python
@classmethod
+def get_instance(cls):
+    if cls._instance is None:
+        with cls._lock:
+            if cls._instance is None:
+                cls._instance = KeyValueStore()
+    return cls._instance

attr _instance = None

attr _lock = threading.Lock()

var _ref_count

  • 说明: import 引用计数, 防止获取空指针

  • 默认值: 0

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')

def on_get(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')
+def on_get(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    default = data[1]['default']
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get(key, default))

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')

def on_set(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')
+def on_set(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    value = data[1]['value']
+    shared_memory.set(key, value)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')

def on_delete(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')
+def on_delete(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    shared_memory.delete(key)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')

def on_get_all(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')
+def on_get_all(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get_all())
`,69),l=[e];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/dev_api_comm_storage.md.CquSLWbc.lean.js b/assets/dev_api_comm_storage.md.CquSLWbc.lean.js new file mode 100644 index 00000000..0b52e792 --- /dev/null +++ b/assets/dev_api_comm_storage.md.CquSLWbc.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"dev/api/comm/storage.md","filePath":"zh/dev/api/comm/storage.md","lastUpdated":null}'),t={name:"dev/api/comm/storage.md"},e=n("",69),l=[e];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/dev_api_config.md.5YZEeFsT.js b/assets/dev_api_config.md.5YZEeFsT.js new file mode 100644 index 00000000..9b3c1b1b --- /dev/null +++ b/assets/dev_api_config.md.5YZEeFsT.js @@ -0,0 +1,77 @@ +import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"dev/api/config.md","filePath":"zh/dev/api/config.md","lastUpdated":null}'),l={name:"dev/api/config.md"},h=s('

liteyuki.config

说明: 该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式

def flat_config(config: dict[str, Any]) -> dict[str, Any]

说明: 扁平化配置文件

',4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s(`

参数:

  • config: 配置项目

返回: 扁平化后的配置文件,但也包含原有的键值对

源代码在GitHub上查看
python
def flat_config(config: dict[str, Any]) -> dict[str, Any]:
+    """
+    扁平化配置文件
+
+    {a:{b:{c:1}}} -> {"a.b.c": 1}
+    Args:
+        config: 配置项目
+
+    Returns:
+        扁平化后的配置文件,但也包含原有的键值对
+    """
+    new_config = copy.deepcopy(config)
+    for key, value in config.items():
+        if isinstance(value, dict):
+            for k, v in flat_config(value).items():
+                new_config[f'{key}.{k}'] = v
+    return new_config

def load_from_yaml(file_: str) -> dict[str, Any]

说明: Load config from yaml file

源代码在GitHub上查看
python
def load_from_yaml(file_: str) -> dict[str, Any]:
+    """
+    Load config from yaml file
+
+    """
+    logger.debug(f'Loading YAML config from {file_}')
+    config = yaml.safe_load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_json(file_: str) -> dict[str, Any]

说明: Load config from json file

源代码在GitHub上查看
python
def load_from_json(file_: str) -> dict[str, Any]:
+    """
+    Load config from json file
+    """
+    logger.debug(f'Loading JSON config from {file_}')
+    config = json.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_toml(file_: str) -> dict[str, Any]

说明: Load config from toml file

源代码在GitHub上查看
python
def load_from_toml(file_: str) -> dict[str, Any]:
+    """
+    Load config from toml file
+    """
+    logger.debug(f'Loading TOML config from {file_}')
+    config = toml.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]

说明: 从指定文件加载配置项,会自动识别文件格式 默认执行扁平化选项

源代码在GitHub上查看
python
def load_from_files(*files: str, no_warning: bool=False) -> dict[str, Any]:
+    """
+    从指定文件加载配置项,会自动识别文件格式
+    默认执行扁平化选项
+    """
+    config = {}
+    for file in files:
+        if os.path.exists(file):
+            if file.endswith(('.yaml', 'yml')):
+                config.update(load_from_yaml(file))
+            elif file.endswith('.json'):
+                config.update(load_from_json(file))
+            elif file.endswith('.toml'):
+                config.update(load_from_toml(file))
+            elif not no_warning:
+                logger.warning(f'Unsupported config file format: {file}')
+        elif not no_warning:
+            logger.warning(f'Config file not found: {file}')
+    return config

def load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]

说明: 从目录下加载配置文件,不递归 按照读取文件的优先级反向覆盖 默认执行扁平化选项

源代码在GitHub上查看
python
def load_configs_from_dirs(*directories: str, no_waring: bool=False) -> dict[str, Any]:
+    """
+    从目录下加载配置文件,不递归
+    按照读取文件的优先级反向覆盖
+    默认执行扁平化选项
+    """
+    config = {}
+    for directory in directories:
+        if not os.path.exists(directory):
+            if not no_waring:
+                logger.warning(f'Directory not found: {directory}')
+            continue
+        for file in os.listdir(directory):
+            if file.endswith(_SUPPORTED_CONFIG_FORMATS):
+                config.update(load_from_files(os.path.join(directory, file), no_warning=no_waring))
+    return config

def load_config_in_default(no_waring: bool = False) -> dict[str, Any]

说明: 从一个标准的轻雪项目加载配置文件 项目目录下的config.*和config目录下的所有配置文件 项目目录下的配置文件优先

源代码在GitHub上查看
python
def load_config_in_default(no_waring: bool=False) -> dict[str, Any]:
+    """
+    从一个标准的轻雪项目加载配置文件
+    项目目录下的config.*和config目录下的所有配置文件
+    项目目录下的配置文件优先
+    """
+    config = load_configs_from_dirs('config', no_waring=no_waring)
+    config.update(load_from_files('config.yaml', 'config.toml', 'config.json', 'config.yml', no_warning=no_waring))
+    return config
`,22),e=[h,k,p];function r(d,g,E,o,y,F){return n(),a("div",null,e)}const u=i(l,[["render",r]]);export{f as __pageData,u as default}; diff --git a/assets/dev_api_config.md.5YZEeFsT.lean.js b/assets/dev_api_config.md.5YZEeFsT.lean.js new file mode 100644 index 00000000..7e4c16ea --- /dev/null +++ b/assets/dev_api_config.md.5YZEeFsT.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"dev/api/config.md","filePath":"zh/dev/api/config.md","lastUpdated":null}'),l={name:"dev/api/config.md"},h=s("",4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s("",22),e=[h,k,p];function r(d,g,E,o,y,F){return n(),a("div",null,e)}const u=i(l,[["render",r]]);export{f as __pageData,u as default}; diff --git a/assets/dev_api_core_core.md.D46kyvua.js b/assets/dev_api_core_core.md.D46kyvua.js new file mode 100644 index 00000000..b8787b64 --- /dev/null +++ b/assets/dev_api_core_core.md.D46kyvua.js @@ -0,0 +1 @@ +import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/core.md","filePath":"zh/dev/api/core/core.md","lastUpdated":null}'),c={name:"dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),s=[i];function l(d,n,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_core_core.md.D46kyvua.lean.js b/assets/dev_api_core_core.md.D46kyvua.lean.js new file mode 100644 index 00000000..b8787b64 --- /dev/null +++ b/assets/dev_api_core_core.md.D46kyvua.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/core.md","filePath":"zh/dev/api/core/core.md","lastUpdated":null}'),c={name:"dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),s=[i];function l(d,n,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_core_index.md.BN6y5dmE.js b/assets/dev_api_core_index.md.BN6y5dmE.js new file mode 100644 index 00000000..1f8469ab --- /dev/null +++ b/assets/dev_api_core_index.md.BN6y5dmE.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/index.md","filePath":"zh/dev/api/core/index.md","lastUpdated":null}'),r={name:"dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),d=[c];function s(n,l,p,_,u,h){return i(),a("div",null,d)}const k=t(r,[["render",s]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_core_index.md.BN6y5dmE.lean.js b/assets/dev_api_core_index.md.BN6y5dmE.lean.js new file mode 100644 index 00000000..1f8469ab --- /dev/null +++ b/assets/dev_api_core_index.md.BN6y5dmE.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/index.md","filePath":"zh/dev/api/core/index.md","lastUpdated":null}'),r={name:"dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),d=[c];function s(n,l,p,_,u,h){return i(),a("div",null,d)}const k=t(r,[["render",s]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_core_manager.md.DiZst2H3.js b/assets/dev_api_core_manager.md.DiZst2H3.js new file mode 100644 index 00000000..ae13bae2 --- /dev/null +++ b/assets/dev_api_core_manager.md.DiZst2H3.js @@ -0,0 +1,92 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"dev/api/core/manager.md","filePath":"zh/dev/api/core/manager.md","lastUpdated":null}'),e={name:"dev/api/core/manager.md"},l=n(`

liteyuki.core.manager

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午11:12 @Author : snowykami @Email : snowykami@outlook.com @File : manager.py @Software: PyCharm

class ChannelDeliver

def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])

源代码在GitHub上查看
python
def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]]):
+    self.active = active
+    self.passive = passive
+    self.channel_deliver_active = channel_deliver_active
+    self.channel_deliver_passive = channel_deliver_passive
+    self.publish = publish

class ProcessManager

def __init__(self, lifespan: Lifespan)

源代码在GitHub上查看
python
def __init__(self, lifespan: 'Lifespan'):
+    self.lifespan = lifespan
+    self.targets: dict[str, tuple[Callable, tuple, dict]] = {}
+    self.processes: dict[str, Process] = {}

async def _run_process(self, name: str)

说明: 开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task

参数:

  • name:
源代码在GitHub上查看
python
async def _run_process(self, name: str):
+    """
+        开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task
+        Args:
+            name:
+        Returns:
+        """
+    if name not in self.targets:
+        raise KeyError(f'Process {name} not found.')
+    chan_active = get_channel(f'{name}-active')
+
+    def _start_process():
+        process = Process(target=self.targets[name][0], args=self.targets[name][1], kwargs=self.targets[name][2], daemon=True)
+        self.processes[name] = process
+        process.start()
+    _start_process()
+    while True:
+        data = await chan_active.async_receive()
+        if data == 0:
+            logger.info(f'Stopping process {name}')
+            await self.lifespan.before_process_shutdown()
+            self.terminate(name)
+            break
+        elif data == 1:
+            logger.info(f'Restarting process {name}')
+            await self.lifespan.before_process_shutdown()
+            await self.lifespan.before_process_restart()
+            self.terminate(name)
+            _start_process()
+            continue
+        else:
+            logger.warning('Unknown data received, ignored.')

async def start_all(self)

说明: 对外启动方法,启动所有进程,创建asyncio task

源代码在GitHub上查看
python
async def start_all(self):
+    """
+        对外启动方法,启动所有进程,创建asyncio task
+        """
+    [asyncio.create_task(chan.start_receive_loop()) for chan in get_channels().values()]
+    [asyncio.create_task(sm.start_receive_loop()) for sm in [shared_memory]]
+    [asyncio.create_task(self._run_process(name)) for name in self.targets]

def add_target(self, name: str, target: TARGET_FUNC, args: tuple = (), kwargs = None)

说明: 添加进程

参数:

  • name: 进程名,用于获取和唯一标识
  • target: 进程函数
  • args: 进程函数参数
  • kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
源代码在GitHub上查看
python
def add_target(self, name: str, target: TARGET_FUNC, args: tuple=(), kwargs=None):
+    """
+        添加进程
+        Args:
+            name: 进程名,用于获取和唯一标识
+            target: 进程函数
+            args: 进程函数参数
+            kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
+        """
+    if kwargs is None:
+        kwargs = {}
+    chan_active: Channel = Channel(name=f'{name}-active')
+    chan_passive: Channel = Channel(name=f'{name}-passive')
+    channel_deliver = ChannelDeliver(active=chan_active, passive=chan_passive, channel_deliver_active=channel_deliver_active_channel, channel_deliver_passive=channel_deliver_passive_channel, publish=publish_channel)
+    self.targets[name] = (_delivery_channel_wrapper, (target, channel_deliver, shared_memory, *args), kwargs)

def join_all(self)

源代码在GitHub上查看
python
def join_all(self):
+    for name, process in self.targets:
+        process.join()

def terminate(self, name: str)

说明: 终止进程并从进程字典中删除

参数:

  • name:
源代码在GitHub上查看
python
def terminate(self, name: str):
+    """
+        终止进程并从进程字典中删除
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.processes:
+        logger.warning(f'Process {name} not found.')
+        return
+    process = self.processes[name]
+    process.terminate()
+    process.join(TIMEOUT)
+    if process.is_alive():
+        process.kill()
+    logger.success(f'Process {name} terminated.')

def terminate_all(self)

源代码在GitHub上查看
python
def terminate_all(self):
+    for name in self.targets:
+        self.terminate(name)

def is_process_alive(self, name: str) -> bool

说明: 检查进程是否存活

参数:

  • name:
源代码在GitHub上查看
python
def is_process_alive(self, name: str) -> bool:
+    """
+        检查进程是否存活
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.targets:
+        logger.warning(f'Process {name} not found.')
+    return self.processes[name].is_alive()
`,36),t=[l];function h(k,p,r,d,E,g){return a(),i("div",null,t)}const c=s(e,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/dev_api_core_manager.md.DiZst2H3.lean.js b/assets/dev_api_core_manager.md.DiZst2H3.lean.js new file mode 100644 index 00000000..19d57784 --- /dev/null +++ b/assets/dev_api_core_manager.md.DiZst2H3.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"dev/api/core/manager.md","filePath":"zh/dev/api/core/manager.md","lastUpdated":null}'),e={name:"dev/api/core/manager.md"},l=n("",36),t=[l];function h(k,p,r,d,E,g){return a(),i("div",null,t)}const c=s(e,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/dev_api_dev_dev.md.CnxR9aZA.js b/assets/dev_api_dev_dev.md.CnxR9aZA.js new file mode 100644 index 00000000..5a6c53e9 --- /dev/null +++ b/assets/dev_api_dev_dev.md.CnxR9aZA.js @@ -0,0 +1 @@ +import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/dev.md","filePath":"zh/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"dev/api/dev/dev.md"},l=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),o=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),r=[l,o];function n(c,v,p,_,u,h){return i(),d("div",null,r)}const k=a(s,[["render",n]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_dev_dev.md.CnxR9aZA.lean.js b/assets/dev_api_dev_dev.md.CnxR9aZA.lean.js new file mode 100644 index 00000000..5a6c53e9 --- /dev/null +++ b/assets/dev_api_dev_dev.md.CnxR9aZA.lean.js @@ -0,0 +1 @@ +import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/dev.md","filePath":"zh/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"dev/api/dev/dev.md"},l=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),o=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),r=[l,o];function n(c,v,p,_,u,h){return i(),d("div",null,r)}const k=a(s,[["render",n]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_dev_index.md.CbQNGO4N.js b/assets/dev_api_dev_index.md.CbQNGO4N.js new file mode 100644 index 00000000..92b1d6de --- /dev/null +++ b/assets/dev_api_dev_index.md.CbQNGO4N.js @@ -0,0 +1 @@ +import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/index.md","filePath":"zh/dev/api/dev/index.md","lastUpdated":null}'),n={name:"dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),o=[s,l];function r(c,p,_,u,v,h){return i(),d("div",null,o)}const k=a(n,[["render",r]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_dev_index.md.CbQNGO4N.lean.js b/assets/dev_api_dev_index.md.CbQNGO4N.lean.js new file mode 100644 index 00000000..92b1d6de --- /dev/null +++ b/assets/dev_api_dev_index.md.CbQNGO4N.lean.js @@ -0,0 +1 @@ +import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/index.md","filePath":"zh/dev/api/dev/index.md","lastUpdated":null}'),n={name:"dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),o=[s,l];function r(c,p,_,u,v,h){return i(),d("div",null,o)}const k=a(n,[["render",r]]);export{f as __pageData,k as default}; diff --git a/assets/dev_api_dev_observer.md.rNRTx952.js b/assets/dev_api_dev_observer.md.rNRTx952.js new file mode 100644 index 00000000..9ce86d69 --- /dev/null +++ b/assets/dev_api_dev_observer.md.rNRTx952.js @@ -0,0 +1,44 @@ +import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"dev/api/dev/observer.md","filePath":"zh/dev/api/dev/observer.md","lastUpdated":null}'),n={name:"dev/api/dev/observer.md"},t=a(`

liteyuki.dev.observer

说明: 此模块用于注册观察者函数,使用watchdog监控文件变化并重启bot 启用该模块需要在配置文件中设置dev_mode为True

var CALLBACK_FUNC

  • 说明: 位置1为FileSystemEvent

  • 类型: TypeAlias

  • 默认值: Callable[[FileSystemEvent], None]

var FILTER_FUNC

  • 说明: 位置1为FileSystemEvent

  • 类型: TypeAlias

  • 默认值: Callable[[FileSystemEvent], bool]

def debounce(wait)

说明: 防抖函数

源代码在GitHub上查看
python
def debounce(wait):
+    """
+    防抖函数
+    """
+
+    def decorator(func):
+
+        def wrapper(*args, **kwargs):
+            nonlocal last_call_time
+            current_time = time.time()
+            if current_time - last_call_time > wait:
+                last_call_time = current_time
+                return func(*args, **kwargs)
+        last_call_time = None
+        return wrapper
+    return decorator

class CodeModifiedHandler(FileSystemEventHandler)

@debounce(1)

def on_modified(self, event)

源代码在GitHub上查看
python
@debounce(1)
+def on_modified(self, event):
+    raise NotImplementedError('on_modified must be implemented')

def on_created(self, event)

源代码在GitHub上查看
python
def on_created(self, event):
+    self.on_modified(event)

def on_deleted(self, event)

源代码在GitHub上查看
python
def on_deleted(self, event):
+    self.on_modified(event)

def on_moved(self, event)

源代码在GitHub上查看
python
def on_moved(self, event):
+    self.on_modified(event)

def on_any_event(self, event)

源代码在GitHub上查看
python
def on_any_event(self, event):
+    self.on_modified(event)

def on_file_system_event(directories: tuple[str], recursive: bool = True, event_filter: FILTER_FUNC = None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]

说明: 注册文件系统变化监听器

参数:

  • directories: 监听目录们
  • recursive: 是否递归监听子目录
  • event_filter: 事件过滤器, 返回True则执行回调函数

返回: 装饰器,装饰一个函数在接收到数据后执行

源代码在GitHub上查看
python
def on_file_system_event(directories: tuple[str], recursive: bool=True, event_filter: FILTER_FUNC=None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]:
+    """
+    注册文件系统变化监听器
+    Args:
+        directories: 监听目录们
+        recursive: 是否递归监听子目录
+        event_filter: 事件过滤器, 返回True则执行回调函数
+    Returns:
+        装饰器,装饰一个函数在接收到数据后执行
+    """
+
+    def decorator(func: CALLBACK_FUNC) -> CALLBACK_FUNC:
+
+        def wrapper(event: FileSystemEvent):
+            if event_filter is not None and (not event_filter(event)):
+                return
+            func(event)
+        code_modified_handler = CodeModifiedHandler()
+        code_modified_handler.on_modified = wrapper
+        for directory in directories:
+            observer.schedule(code_modified_handler, directory, recursive=recursive)
+        return func
+    return decorator
`,27),l=[t];function h(p,k,r,d,o,c){return e(),i("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/dev_api_dev_observer.md.rNRTx952.lean.js b/assets/dev_api_dev_observer.md.rNRTx952.lean.js new file mode 100644 index 00000000..7a5c0ece --- /dev/null +++ b/assets/dev_api_dev_observer.md.rNRTx952.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"dev/api/dev/observer.md","filePath":"zh/dev/api/dev/observer.md","lastUpdated":null}'),n={name:"dev/api/dev/observer.md"},t=a("",27),l=[t];function h(p,k,r,d,o,c){return e(),i("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/dev_api_dev_plugin.md.B8-Pj2Gj.js b/assets/dev_api_dev_plugin.md.B8-Pj2Gj.js new file mode 100644 index 00000000..21dced2a --- /dev/null +++ b/assets/dev_api_dev_plugin.md.B8-Pj2Gj.js @@ -0,0 +1,12 @@ +import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const E=JSON.parse('{"title":"liteyuki.dev.plugin","description":"","frontmatter":{"title":"liteyuki.dev.plugin"},"headers":[],"relativePath":"dev/api/dev/plugin.md","filePath":"zh/dev/api/dev/plugin.md","lastUpdated":null}'),n={name:"dev/api/dev/plugin.md"},l=t(`

liteyuki.dev.plugin

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : snowykami@outlook.com @File : plugin.py @Software: PyCharm

def run_plugins(*module_path: str | Path)

说明: 运行插件,无需手动初始化bot

参数:

  • module_path: 插件路径,参考liteyuki.load_plugin的函数签名
源代码在GitHub上查看
python
def run_plugins(*module_path: str | Path):
+    """
+    运行插件,无需手动初始化bot
+    Args:
+        module_path: 插件路径,参考\`liteyuki.load_plugin\`的函数签名
+    """
+    cfg = load_config_in_default()
+    plugins = cfg.get('liteyuki.plugins', [])
+    plugins.extend(module_path)
+    cfg['liteyuki.plugins'] = plugins
+    bot = LiteyukiBot(**cfg)
+    bot.run()
`,8),e=[l];function p(h,k,d,r,o,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/dev_api_dev_plugin.md.B8-Pj2Gj.lean.js b/assets/dev_api_dev_plugin.md.B8-Pj2Gj.lean.js new file mode 100644 index 00000000..ac640c39 --- /dev/null +++ b/assets/dev_api_dev_plugin.md.B8-Pj2Gj.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const E=JSON.parse('{"title":"liteyuki.dev.plugin","description":"","frontmatter":{"title":"liteyuki.dev.plugin"},"headers":[],"relativePath":"dev/api/dev/plugin.md","filePath":"zh/dev/api/dev/plugin.md","lastUpdated":null}'),n={name:"dev/api/dev/plugin.md"},l=t("",8),e=[l];function p(h,k,d,r,o,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/dev_api_exception.md.BdaZK_3x.js b/assets/dev_api_exception.md.BdaZK_3x.js new file mode 100644 index 00000000..6c3550a8 --- /dev/null +++ b/assets/dev_api_exception.md.BdaZK_3x.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"dev/api/exception.md","filePath":"zh/dev/api/exception.md","lastUpdated":null}'),o={name:"dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"​")],-1),s=e("p",null,[e("strong",null,"说明"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"​")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_exception.md.BdaZK_3x.lean.js b/assets/dev_api_exception.md.BdaZK_3x.lean.js new file mode 100644 index 00000000..6c3550a8 --- /dev/null +++ b/assets/dev_api_exception.md.BdaZK_3x.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"dev/api/exception.md","filePath":"zh/dev/api/exception.md","lastUpdated":null}'),o={name:"dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"​")],-1),s=e("p",null,[e("strong",null,"说明"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"​")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_index.md.Bj6EsNxq.js b/assets/dev_api_index.md.Bj6EsNxq.js new file mode 100644 index 00000000..14bafa91 --- /dev/null +++ b/assets/dev_api_index.md.Bj6EsNxq.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/index.md","filePath":"zh/dev/api/index.md","lastUpdated":null}'),o={name:"dev/api/index.md"},r=i('

liteyuki

var __version__

  • 说明: 测试版本号

  • 默认值: '6.3.10'

',3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const m=e(o,[["render",l]]);export{v as __pageData,m as default}; diff --git a/assets/dev_api_index.md.Bj6EsNxq.lean.js b/assets/dev_api_index.md.Bj6EsNxq.lean.js new file mode 100644 index 00000000..8ff180e5 --- /dev/null +++ b/assets/dev_api_index.md.Bj6EsNxq.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/index.md","filePath":"zh/dev/api/index.md","lastUpdated":null}'),o={name:"dev/api/index.md"},r=i("",3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const m=e(o,[["render",l]]);export{v as __pageData,m as default}; diff --git a/assets/dev_api_log.md.C1VDikdj.js b/assets/dev_api_log.md.C1VDikdj.js new file mode 100644 index 00000000..cbfc75df --- /dev/null +++ b/assets/dev_api_log.md.C1VDikdj.js @@ -0,0 +1,18 @@ +import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"dev/api/log.md","filePath":"zh/dev/api/log.md","lastUpdated":null}'),t={name:"dev/api/log.md"},k=h(`

liteyuki.log

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py @Software: PyCharm

def get_format(level: str) -> str

源代码在GitHub上查看
python
def get_format(level: str) -> str:
+    if level == 'DEBUG':
+        return debug_format
+    else:
+        return default_format

def init_log(config: dict)

说明: 在语言加载完成后执行

源代码在GitHub上查看
python
def init_log(config: dict):
+    """
+    在语言加载完成后执行
+    Returns:
+
+    """
+    logger.remove()
+    logger.add(sys.stdout, level=0, diagnose=False, format=get_format(config.get('log_level', 'INFO')))
+    show_icon = config.get('log_icon', True)
+    logger.level('DEBUG', color='<blue>', icon=f"{('🐛' if show_icon else '')}DEBUG")
+    logger.level('INFO', color='<normal>', icon=f"{('ℹ️' if show_icon else '')}INFO")
+    logger.level('SUCCESS', color='<green>', icon=f"{('✅' if show_icon else '')}SUCCESS")
+    logger.level('WARNING', color='<yellow>', icon=f"{('⚠️' if show_icon else '')}WARNING")
+    logger.level('ERROR', color='<red>', icon=f"{('⭕' if show_icon else '')}ERROR")
`,8),l=[k];function n(p,e,E,r,g,d){return a(),i("div",null,l)}const o=s(t,[["render",n]]);export{y as __pageData,o as default}; diff --git a/assets/dev_api_log.md.C1VDikdj.lean.js b/assets/dev_api_log.md.C1VDikdj.lean.js new file mode 100644 index 00000000..319d6e52 --- /dev/null +++ b/assets/dev_api_log.md.C1VDikdj.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"dev/api/log.md","filePath":"zh/dev/api/log.md","lastUpdated":null}'),t={name:"dev/api/log.md"},k=h("",8),l=[k];function n(p,e,E,r,g,d){return a(),i("div",null,l)}const o=s(t,[["render",n]]);export{y as __pageData,o as default}; diff --git a/assets/dev_api_message_event.md.AxntDJi3.js b/assets/dev_api_message_event.md.AxntDJi3.js new file mode 100644 index 00000000..30b497f1 --- /dev/null +++ b/assets/dev_api_message_event.md.AxntDJi3.js @@ -0,0 +1,36 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"dev/api/message/event.md","filePath":"zh/dev/api/message/event.md","lastUpdated":null}'),n={name:"dev/api/message/event.md"},t=e(`

liteyuki.message.event

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class MessageEvent

def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)

说明: 轻雪抽象消息事件

源代码在GitHub上查看
python
def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel['MessageEvent']]=None, data: Optional[dict[str, Any]]=None):
+    """
+        轻雪抽象消息事件
+        Args:
+
+            bot_id: 机器人ID
+            message: 消息,消息段数组[{type: str, data: dict[str, Any]}]
+            raw_message: 原始消息(通常为纯文本的格式)
+            message_type: 消息类型(private, group, other)
+
+            session_id: 会话ID(私聊通常为用户ID,群聊通常为群ID)
+            session_type: 会话类型(private, group)
+            receive_channel: 接收频道(用于回复消息)
+
+            data: 附加数据
+        """
+    if data is None:
+        data = {}
+    self.message_type = message_type
+    self.data = data
+    self.bot_id = bot_id
+    self.message = message
+    self.raw_message = raw_message
+    self.session_id = session_id
+    self.session_type = session_type
+    self.user_id = user_id
+    self.receive_channel = receive_channel

def reply(self, message: str | dict[str, Any])

说明: 回复消息

参数:

  • message:
源代码在GitHub上查看
python
def reply(self, message: str | dict[str, Any]):
+    """
+        回复消息
+        Args:
+            message:
+        Returns:
+        """
+    reply_event = MessageEvent(message_type=self.session_type, message=message, raw_message='', data={'message': message}, bot_id=self.bot_id, session_id=self.session_id, user_id=self.user_id, session_type=self.session_type, receive_channel=None)
+    if self.receive_channel:
+        self.receive_channel.send(reply_event)
`,12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(n,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/dev_api_message_event.md.AxntDJi3.lean.js b/assets/dev_api_message_event.md.AxntDJi3.lean.js new file mode 100644 index 00000000..ba320c11 --- /dev/null +++ b/assets/dev_api_message_event.md.AxntDJi3.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"dev/api/message/event.md","filePath":"zh/dev/api/message/event.md","lastUpdated":null}'),n={name:"dev/api/message/event.md"},t=e("",12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(n,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/dev_api_message_index.md.B1MCWTHF.js b/assets/dev_api_message_index.md.B1MCWTHF.js new file mode 100644 index 00000000..8820aa4d --- /dev/null +++ b/assets/dev_api_message_index.md.B1MCWTHF.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/index.md","filePath":"zh/dev/api/message/index.md","lastUpdated":null}'),o={name:"dev/api/message/index.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[l,n,r];function m(c,u,p,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_message_index.md.B1MCWTHF.lean.js b/assets/dev_api_message_index.md.B1MCWTHF.lean.js new file mode 100644 index 00000000..8820aa4d --- /dev/null +++ b/assets/dev_api_message_index.md.B1MCWTHF.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/index.md","filePath":"zh/dev/api/message/index.md","lastUpdated":null}'),o={name:"dev/api/message/index.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[l,n,r];function m(c,u,p,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_message_matcher.md.CrqC3-lV.js b/assets/dev_api_message_matcher.md.CrqC3-lV.js new file mode 100644 index 00000000..41017bb9 --- /dev/null +++ b/assets/dev_api_message_matcher.md.CrqC3-lV.js @@ -0,0 +1,35 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),n={name:"dev/api/message/matcher.md"},t=e(`

liteyuki.message.matcher

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:51 @Author : snowykami @Email : snowykami@outlook.com @File : matcher.py @Software: PyCharm

class Matcher

def __init__(self, rule: Rule, priority: int, block: bool)

说明: 匹配器

参数:

  • rule: 规则
  • priority: 优先级 >= 0
  • block: 是否阻断后续优先级更低的匹配器
源代码在GitHub上查看
python
def __init__(self, rule: Rule, priority: int, block: bool):
+    """
+        匹配器
+        Args:
+            rule: 规则
+            priority: 优先级 >= 0
+            block: 是否阻断后续优先级更低的匹配器
+        """
+    self.rule = rule
+    self.priority = priority
+    self.block = block
+    self.handlers: list[EventHandler] = []

def handle(self) -> Callable[[EventHandler], EventHandler]

说明: 添加处理函数,装饰器

返回: 装饰器 handler

源代码在GitHub上查看
python
def handle(self) -> Callable[[EventHandler], EventHandler]:
+    """
+        添加处理函数,装饰器
+        Returns:
+            装饰器 handler
+        """
+
+    def decorator(handler: EventHandler) -> EventHandler:
+        self.handlers.append(handler)
+        return handler
+    return decorator

async def run(self, event: MessageEvent) -> None

说明: 运行处理函数

参数:

  • event:
源代码在GitHub上查看
python
async def run(self, event: MessageEvent) -> None:
+    """
+        运行处理函数
+        Args:
+            event:
+        Returns:
+        """
+    if not await self.rule(event):
+        return
+    for handler in self.handlers:
+        try:
+            await handler(event)
+        except Exception:
+            traceback.print_exc()
`,18),l=[t];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const E=s(n,[["render",h]]);export{y as __pageData,E as default}; diff --git a/assets/dev_api_message_matcher.md.CrqC3-lV.lean.js b/assets/dev_api_message_matcher.md.CrqC3-lV.lean.js new file mode 100644 index 00000000..b56a6ef1 --- /dev/null +++ b/assets/dev_api_message_matcher.md.CrqC3-lV.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),n={name:"dev/api/message/matcher.md"},t=e("",18),l=[t];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const E=s(n,[["render",h]]);export{y as __pageData,E as default}; diff --git a/assets/dev_api_message_message.md.Cp-oF0Sy.js b/assets/dev_api_message_message.md.Cp-oF0Sy.js new file mode 100644 index 00000000..ed2f7b41 --- /dev/null +++ b/assets/dev_api_message_message.md.Cp-oF0Sy.js @@ -0,0 +1 @@ +import{_ as s,c as t,o,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/message.md","filePath":"zh/dev/api/message/message.md","lastUpdated":null}'),i={name:"dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[a("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),r=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[a("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : "),e("strong",null,"init"),a(".py.py @Software: PyCharm")],-1),m=[l,r,n];function d(c,u,p,_,g,h){return o(),t("div",null,m)}const f=s(i,[["render",d]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_message_message.md.Cp-oF0Sy.lean.js b/assets/dev_api_message_message.md.Cp-oF0Sy.lean.js new file mode 100644 index 00000000..ed2f7b41 --- /dev/null +++ b/assets/dev_api_message_message.md.Cp-oF0Sy.lean.js @@ -0,0 +1 @@ +import{_ as s,c as t,o,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/message.md","filePath":"zh/dev/api/message/message.md","lastUpdated":null}'),i={name:"dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[a("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),r=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[a("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : "),e("strong",null,"init"),a(".py.py @Software: PyCharm")],-1),m=[l,r,n];function d(c,u,p,_,g,h){return o(),t("div",null,m)}const f=s(i,[["render",d]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_message_on.md.BdoE0DiT.js b/assets/dev_api_message_on.md.BdoE0DiT.js new file mode 100644 index 00000000..8b3ebe16 --- /dev/null +++ b/assets/dev_api_message_on.md.BdoE0DiT.js @@ -0,0 +1,15 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"dev/api/message/on.md","filePath":"zh/dev/api/message/on.md","lastUpdated":null}'),t={name:"dev/api/message/on.md"},n=e(`

liteyuki.message.on

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:52 @Author : snowykami @Email : snowykami@outlook.com @File : on.py @Software: PyCharm

def add_matcher(matcher: Matcher)

源代码在GitHub上查看
python
def add_matcher(matcher: Matcher):
+    for i, m in enumerate(_matcher_list):
+        if m.priority < matcher.priority:
+            _matcher_list.insert(i, matcher)
+            break
+    else:
+        _matcher_list.append(matcher)

def on_message(rule: Rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

源代码在GitHub上查看
python
def on_message(rule: Rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+    matcher = Matcher(rule, priority, block)
+    add_matcher(matcher)
+    return matcher

def on_keywords(keywords: list[str], rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

源代码在GitHub上查看
python
def on_keywords(keywords: list[str], rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+
+    @Rule
+    async def on_keywords_rule(event: MessageEvent):
+        return any((keyword in event.raw_message for keyword in keywords))
+    return on_message(on_keywords_rule & rule, priority, block)
`,9),l=[n];function h(k,r,p,o,d,y){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{c as __pageData,E as default}; diff --git a/assets/dev_api_message_on.md.BdoE0DiT.lean.js b/assets/dev_api_message_on.md.BdoE0DiT.lean.js new file mode 100644 index 00000000..9f091c2b --- /dev/null +++ b/assets/dev_api_message_on.md.BdoE0DiT.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"dev/api/message/on.md","filePath":"zh/dev/api/message/on.md","lastUpdated":null}'),t={name:"dev/api/message/on.md"},n=e("",9),l=[n];function h(k,r,p,o,d,y){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{c as __pageData,E as default}; diff --git a/assets/dev_api_message_rule.md.UByA3TJk.js b/assets/dev_api_message_rule.md.UByA3TJk.js new file mode 100644 index 00000000..448d8a68 --- /dev/null +++ b/assets/dev_api_message_rule.md.UByA3TJk.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.rule","description":"","frontmatter":{"title":"liteyuki.message.rule"},"headers":[],"relativePath":"dev/api/message/rule.md","filePath":"zh/dev/api/message/rule.md","lastUpdated":null}'),t={name:"dev/api/message/rule.md"},n=a('

liteyuki.message.rule

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:55 @Author : snowykami @Email : snowykami@outlook.com @File : rule.py @Software: PyCharm

var RuleHandlerFunc

  • 说明: 规则函数签名

  • 类型: TypeAlias

  • 默认值: Callable[[MessageEvent], Coroutine[None, None, bool]]

class Rule

def __init__(self, handler: RuleHandlerFunc)

源代码在GitHub上查看
python
def __init__(self, handler: RuleHandlerFunc):\n    self.handler = handler

def __or__(self, other: Rule) -> Rule

源代码在GitHub上查看
python
def __or__(self, other: 'Rule') -> 'Rule':\n\n    async def combined_handler(event: MessageEvent) -> bool:\n        return await self.handler(event) or await other.handler(event)\n    return Rule(combined_handler)

def __and__(self, other: Rule) -> Rule

源代码在GitHub上查看
python
def __and__(self, other: 'Rule') -> 'Rule':\n\n    async def combined_handler(event: MessageEvent) -> bool:\n        return await self.handler(event) and await other.handler(event)\n    return Rule(combined_handler)

async def __call__(self, event: MessageEvent) -> bool

源代码在GitHub上查看
python
async def __call__(self, event: MessageEvent) -> bool:\n    if self.handler is None:\n        return True\n    return await self.handler(event)

@Rule

async def empty_rule(event: MessageEvent) -> bool

源代码在GitHub上查看
python
@Rule\nasync def empty_rule(event: MessageEvent) -> bool:\n    return True

@Rule

async def is_su_rule(event: MessageEvent) -> bool

源代码在GitHub上查看
python
@Rule\nasync def is_su_rule(event: MessageEvent) -> bool:\n    return str(event.user_id) in _superusers
',20),l=[n];function h(r,p,k,d,o,g){return e(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default}; diff --git a/assets/dev_api_message_rule.md.UByA3TJk.lean.js b/assets/dev_api_message_rule.md.UByA3TJk.lean.js new file mode 100644 index 00000000..6c42cfdb --- /dev/null +++ b/assets/dev_api_message_rule.md.UByA3TJk.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.rule","description":"","frontmatter":{"title":"liteyuki.message.rule"},"headers":[],"relativePath":"dev/api/message/rule.md","filePath":"zh/dev/api/message/rule.md","lastUpdated":null}'),t={name:"dev/api/message/rule.md"},n=a("",20),l=[n];function h(r,p,k,d,o,g){return e(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default}; diff --git a/assets/dev_api_message_session.md.ZRjlTcix.js b/assets/dev_api_message_session.md.ZRjlTcix.js new file mode 100644 index 00000000..fbc33cd3 --- /dev/null +++ b/assets/dev_api_message_session.md.ZRjlTcix.js @@ -0,0 +1 @@ +import{_ as t,c as a,o,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"dev/api/message/session.md","filePath":"zh/dev/api/message/session.md","lastUpdated":null}'),i={name:"dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,l,r];function d(c,u,_,p,h,k){return o(),a("div",null,m)}const f=t(i,[["render",d]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_message_session.md.ZRjlTcix.lean.js b/assets/dev_api_message_session.md.ZRjlTcix.lean.js new file mode 100644 index 00000000..fbc33cd3 --- /dev/null +++ b/assets/dev_api_message_session.md.ZRjlTcix.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"dev/api/message/session.md","filePath":"zh/dev/api/message/session.md","lastUpdated":null}'),i={name:"dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,l,r];function d(c,u,_,p,h,k){return o(),a("div",null,m)}const f=t(i,[["render",d]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_mkdoc.md.BPGO1Znu.js b/assets/dev_api_mkdoc.md.BPGO1Znu.js new file mode 100644 index 00000000..fb3c086d --- /dev/null +++ b/assets/dev_api_mkdoc.md.BPGO1Znu.js @@ -0,0 +1,161 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.mkdoc","description":"","frontmatter":{"title":"liteyuki.mkdoc"},"headers":[],"relativePath":"dev/api/mkdoc.md","filePath":"zh/dev/api/mkdoc.md","lastUpdated":null}'),n={name:"dev/api/mkdoc.md"},h=t(`

liteyuki.mkdoc

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 上午6:23 @Author : snowykami @Email : snowykami@outlook.com @File : mkdoc.py @Software: PyCharm

class DefType(Enum)

attr FUNCTION = 'function'

attr METHOD = 'method'

attr STATIC_METHOD = 'staticmethod'

attr CLASS_METHOD = 'classmethod'

attr PROPERTY = 'property'

class FunctionInfo(BaseModel)

attr name: str = NO_DEFAULT

attr args: list[tuple[str, str]] = NO_DEFAULT

attr return_type: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr source_code: str = ''

attr type: DefType = NO_DEFAULT

attr is_async: bool = NO_DEFAULT

class AttributeInfo(BaseModel)

attr name: str = NO_DEFAULT

attr type: str = NO_DEFAULT

attr value: Any = None

attr docstring: str = ''

class ClassInfo(BaseModel)

attr name: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr methods: list[FunctionInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr inherit: list[str] = NO_DEFAULT

class ModuleInfo(BaseModel)

attr module_path: str = NO_DEFAULT

attr functions: list[FunctionInfo] = NO_DEFAULT

attr classes: list[ClassInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr docstring: str = NO_DEFAULT

def get_relative_path(base_path: str, target_path: str) -> str

说明: 获取相对路径

参数:

  • base_path: 基础路径
  • target_path: 目标路径
源代码在GitHub上查看
python
def get_relative_path(base_path: str, target_path: str) -> str:
+    """
+    获取相对路径
+    Args:
+        base_path: 基础路径
+        target_path: 目标路径
+    """
+    return os.path.relpath(target_path, base_path)

def write_to_files(file_data: dict[str, str])

说明: 输出文件

参数:

  • file_data: 文件数据 相对路径
源代码在GitHub上查看
python
def write_to_files(file_data: dict[str, str]):
+    """
+    输出文件
+    Args:
+        file_data: 文件数据 相对路径
+    """
+    for rp, data in file_data.items():
+        if not os.path.exists(os.path.dirname(rp)):
+            os.makedirs(os.path.dirname(rp))
+        with open(rp, 'w', encoding='utf-8') as f:
+            f.write(data)

def get_file_list(module_folder: str)

源代码在GitHub上查看
python
def get_file_list(module_folder: str):
+    file_list = []
+    for root, dirs, files in os.walk(module_folder):
+        for file in files:
+            if file.endswith(('.py', '.pyi')):
+                file_list.append(os.path.join(root, file))
+    return file_list

def get_module_info_normal(file_path: str, ignore_private: bool = True) -> ModuleInfo

说明: 获取函数和类

参数:

  • file_path: Python 文件路径
  • ignore_private: 忽略私有函数和类

返回: 模块信息

源代码在GitHub上查看
python
def get_module_info_normal(file_path: str, ignore_private: bool=True) -> ModuleInfo:
+    """
+    获取函数和类
+    Args:
+        file_path: Python 文件路径
+        ignore_private: 忽略私有函数和类
+    Returns:
+        模块信息
+    """
+    with open(file_path, 'r', encoding='utf-8') as file:
+        file_content = file.read()
+        tree = ast.parse(file_content)
+    dot_sep_module_path = file_path.replace(os.sep, '.').replace('.py', '').replace('.pyi', '')
+    module_docstring = ast.get_docstring(tree)
+    module_info = ModuleInfo(module_path=dot_sep_module_path, functions=[], classes=[], attributes=[], docstring=module_docstring if module_docstring else '')
+    for node in ast.walk(tree):
+        if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
+            if not any((isinstance(parent, ast.ClassDef) for parent in ast.iter_child_nodes(node))) and (not ignore_private or not node.name.startswith('_')):
+                if node.args.args:
+                    first_arg = node.args.args[0]
+                    if first_arg.arg in ('self', 'cls'):
+                        continue
+                function_docstring = ast.get_docstring(node)
+                func_info = FunctionInfo(name=node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in node.args.args], return_type=ast.unparse(node.returns) if node.returns else 'None', docstring=function_docstring if function_docstring else '', type=DefType.FUNCTION, is_async=isinstance(node, ast.AsyncFunctionDef), source_code=ast.unparse(node))
+                module_info.functions.append(func_info)
+        elif isinstance(node, ast.ClassDef):
+            class_docstring = ast.get_docstring(node)
+            class_info = ClassInfo(name=node.name, docstring=class_docstring if class_docstring else '', methods=[], attributes=[], inherit=[ast.unparse(base) for base in node.bases])
+            for class_node in node.body:
+                if isinstance(class_node, ast.FunctionDef) and (not ignore_private or not class_node.name.startswith('_') or class_node.name == '__init__'):
+                    method_docstring = ast.get_docstring(class_node)
+                    def_type = DefType.METHOD
+                    if class_node.decorator_list:
+                        if any((isinstance(decorator, ast.Name) and decorator.id == 'staticmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.STATIC_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'classmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.CLASS_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'property' for decorator in class_node.decorator_list)):
+                            def_type = DefType.PROPERTY
+                    class_info.methods.append(FunctionInfo(name=class_node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in class_node.args.args], return_type=ast.unparse(class_node.returns) if class_node.returns else 'None', docstring=method_docstring if method_docstring else '', type=def_type, is_async=isinstance(class_node, ast.AsyncFunctionDef), source_code=ast.unparse(class_node)))
+                elif isinstance(class_node, ast.Assign):
+                    for target in class_node.targets:
+                        if isinstance(target, ast.Name):
+                            class_info.attributes.append(AttributeInfo(name=target.id, type=ast.unparse(class_node.value)))
+            module_info.classes.append(class_info)
+        elif isinstance(node, ast.Assign):
+            if not any((isinstance(parent, (ast.ClassDef, ast.FunctionDef)) for parent in ast.iter_child_nodes(node))):
+                for target in node.targets:
+                    if isinstance(target, ast.Name) and (not ignore_private or not target.id.startswith('_')):
+                        attr_type = NO_TYPE_HINT
+                        if isinstance(node.value, ast.AnnAssign) and node.value.annotation:
+                            attr_type = ast.unparse(node.value.annotation)
+                        module_info.attributes.append(AttributeInfo(name=target.id, type=attr_type, value=ast.unparse(node.value) if node.value else None))
+    return module_info

def generate_markdown(module_info: ModuleInfo, front_matter = None, lang: str = 'zh-CN') -> str

说明: 生成模块的Markdown 你可在此自定义生成的Markdown格式

参数:

  • module_info: 模块信息
  • front_matter: 自定义选项title, index, icon, category
  • lang: 语言

返回: Markdown 字符串

源代码在GitHub上查看
python
def generate_markdown(module_info: ModuleInfo, front_matter=None, lang: str='zh-CN') -> str:
+    """
+    生成模块的Markdown
+    你可在此自定义生成的Markdown格式
+    Args:
+        module_info: 模块信息
+        front_matter: 自定义选项title, index, icon, category
+        lang: 语言
+    Returns:
+        Markdown 字符串
+    """
+    content = ''
+    front_matter = '---\\n' + '\\n'.join([f'{k}: {v}' for k, v in front_matter.items()]) + '\\n---\\n\\n'
+    content += front_matter
+    for func in module_info.functions:
+        args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in func.args]
+        content += f"### ***{('async ' if func.is_async else '')}def*** \`{func.name}({', '.join(args_with_type)}) -> {func.return_type}\`\\n\\n"
+        func.docstring = func.docstring.replace('\\n', '\\n\\n')
+        content += f'{func.docstring}\\n\\n'
+        content += f'<details>\\n<summary>源代码</summary>\\n\\n\`\`\`python\\n{func.source_code}\\n\`\`\`\\n</details>\\n\\n'
+    for cls in module_info.classes:
+        if cls.inherit:
+            inherit = f"({', '.join(cls.inherit)})" if cls.inherit else ''
+            content += f'### ***class*** \`{cls.name}{inherit}\`\\n\\n'
+        else:
+            content += f'### ***class*** \`{cls.name}\`\\n\\n'
+        cls.docstring = cls.docstring.replace('\\n', '\\n\\n')
+        content += f'{cls.docstring}\\n\\n'
+        for method in cls.methods:
+            if method.type != DefType.METHOD:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in method.args]
+                content += f'### &emsp; ***@{method.type.value}***\\n'
+            else:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] and arg[0] != 'self' else arg[0] for arg in method.args]
+            content += f"### &emsp; ***{('async ' if method.is_async else '')}def*** \`{method.name}({', '.join(args_with_type)}) -> {method.return_type}\`\\n\\n"
+            method.docstring = method.docstring.replace('\\n', '\\n\\n')
+            content += f'&emsp;{method.docstring}\\n\\n'
+            if lang == 'zh-CN':
+                TEXT_SOURCE_CODE = '源代码'
+            else:
+                TEXT_SOURCE_CODE = 'Source Code'
+            content += f'<details>\\n<summary>{TEXT_SOURCE_CODE}</summary>\\n\\n\`\`\`python\\n{method.source_code}\\n\`\`\`\\n</details>\\n\\n'
+        for attr in cls.attributes:
+            content += f'### &emsp; ***attr*** \`{attr.name}: {attr.type}\`\\n\\n'
+    for attr in module_info.attributes:
+        if attr.type == NO_TYPE_HINT:
+            content += f'### ***var*** \`{attr.name} = {attr.value}\`\\n\\n'
+        else:
+            content += f'### ***var*** \`{attr.name}: {attr.type} = {attr.value}\`\\n\\n'
+        attr.docstring = attr.docstring.replace('\\n', '\\n\\n')
+        content += f'{attr.docstring}\\n\\n'
+    return content

def generate_docs(module_folder: str, output_dir: str, with_top: bool = False, lang: str = 'zh-CN', ignored_paths = None)

说明: 生成文档

参数:

  • module_folder: 模块文件夹
  • output_dir: 输出文件夹
  • with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
  • ignored_paths: 忽略的路径
  • lang: 语言
源代码在GitHub上查看
python
def generate_docs(module_folder: str, output_dir: str, with_top: bool=False, lang: str='zh-CN', ignored_paths=None):
+    """
+    生成文档
+    Args:
+        module_folder: 模块文件夹
+        output_dir: 输出文件夹
+        with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
+        ignored_paths: 忽略的路径
+        lang: 语言
+    """
+    if ignored_paths is None:
+        ignored_paths = []
+    file_data: dict[str, str] = {}
+    file_list = get_file_list(module_folder)
+    shutil.rmtree(output_dir, ignore_errors=True)
+    os.mkdir(output_dir)
+    replace_data = {'__init__': 'README', '.py': '.md'}
+    for pyfile_path in file_list:
+        if any((ignored_path.replace('\\\\', '/') in pyfile_path.replace('\\\\', '/') for ignored_path in ignored_paths)):
+            continue
+        no_module_name_pyfile_path = get_relative_path(module_folder, pyfile_path)
+        rel_md_path = pyfile_path if with_top else no_module_name_pyfile_path
+        for rk, rv in replace_data.items():
+            rel_md_path = rel_md_path.replace(rk, rv)
+        abs_md_path = os.path.join(output_dir, rel_md_path)
+        module_info = get_module_info_normal(pyfile_path)
+        if 'README' in abs_md_path:
+            front_matter = {'title': module_info.module_path.replace('.__init__', '').replace('_', '\\\\n'), 'index': 'true', 'icon': 'laptop-code', 'category': 'API'}
+        else:
+            front_matter = {'title': module_info.module_path.replace('_', '\\\\n'), 'order': '1', 'icon': 'laptop-code', 'category': 'API'}
+        md_content = generate_markdown(module_info, front_matter)
+        print(f'Generate {pyfile_path} -> {abs_md_path}')
+        file_data[abs_md_path] = md_content
+    write_to_files(file_data)

var no_module_name_pyfile_path

  • 说明: 去头路径

  • 默认值: get_relative_path(module_folder, pyfile_path)

`,65),k=[h];function l(p,e,r,E,d,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{y as __pageData,o as default}; diff --git a/assets/dev_api_mkdoc.md.BPGO1Znu.lean.js b/assets/dev_api_mkdoc.md.BPGO1Znu.lean.js new file mode 100644 index 00000000..4fdbc177 --- /dev/null +++ b/assets/dev_api_mkdoc.md.BPGO1Znu.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.mkdoc","description":"","frontmatter":{"title":"liteyuki.mkdoc"},"headers":[],"relativePath":"dev/api/mkdoc.md","filePath":"zh/dev/api/mkdoc.md","lastUpdated":null}'),n={name:"dev/api/mkdoc.md"},h=t("",65),k=[h];function l(p,e,r,E,d,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{y as __pageData,o as default}; diff --git a/assets/dev_api_plugin_index.md.3yEbVRtX.js b/assets/dev_api_plugin_index.md.3yEbVRtX.js new file mode 100644 index 00000000..19b266db --- /dev/null +++ b/assets/dev_api_plugin_index.md.3yEbVRtX.js @@ -0,0 +1,7 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/index.md","filePath":"zh/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"dev/api/plugin/index.md"},n=a(`

liteyuki.plugin

def get_loaded_plugins() -> dict[str, Plugin]

说明: 获取已加载的插件

返回: dict[str, Plugin]: 插件字典

源代码在GitHub上查看
python
def get_loaded_plugins() -> dict[str, Plugin]:
+    """
+    获取已加载的插件
+    Returns:
+        dict[str, Plugin]: 插件字典
+    """
+    return _plugins
`,5),l=[n];function p(d,r,h,o,u,g){return t(),s("div",null,l)}const _=i(e,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/dev_api_plugin_index.md.3yEbVRtX.lean.js b/assets/dev_api_plugin_index.md.3yEbVRtX.lean.js new file mode 100644 index 00000000..3d82d5a8 --- /dev/null +++ b/assets/dev_api_plugin_index.md.3yEbVRtX.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/index.md","filePath":"zh/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"dev/api/plugin/index.md"},n=a("",5),l=[n];function p(d,r,h,o,u,g){return t(),s("div",null,l)}const _=i(e,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/dev_api_plugin_load.md.Bb_Kxjiz.js b/assets/dev_api_plugin_load.md.Bb_Kxjiz.js new file mode 100644 index 00000000..68363d79 --- /dev/null +++ b/assets/dev_api_plugin_load.md.Bb_Kxjiz.js @@ -0,0 +1,83 @@ +import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.C3o_UkTa.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"dev/api/plugin/load.md","filePath":"zh/dev/api/plugin/load.md","lastUpdated":null}'),E={name:"dev/api/plugin/load.md"},d=a(`

liteyuki.plugin.load

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : snowykami@outlook.com @File : load.py @Software: PyCharm

def load_plugin(module_path: str | Path) -> Optional[Plugin]

说明: 加载单个插件,可以是本地插件或是通过 pip 安装的插件。

参数:

  • module_path: 插件名称 path.to.your.plugin
  • 或插件路径 pathlib.Path(path/to/your/plugin):
源代码在GitHub上查看
python
def load_plugin(module_path: str | Path) -> Optional[Plugin]:
+    """加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。
+
+    参数:
+        module_path: 插件名称 \`path.to.your.plugin\`
+        或插件路径 \`pathlib.Path(path/to/your/plugin)\`
+    """
+    module_path = path_to_module_name(Path(module_path)) if isinstance(module_path, Path) else module_path
+    try:
+        module = import_module(module_path)
+        _plugins[module.__name__] = Plugin(name=module.__name__, module=module, module_name=module_path)
+        if module.__dict__.get('__plugin_metadata__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_metadata__']
+            display_name = module.__name__.split('.')[-1]
+        elif module.__dict__.get('__liteyuki_plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__liteyuki_plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        elif module.__dict__.get('__plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        else:
+            logger.opt(colors=True).warning(f'The metadata of Liteyuki plugin "{module.__name__}" is not specified, use empty.')
+            metadata = PluginMetadata(name=module.__name__)
+            display_name = module.__name__.split('.')[-1]
+        _plugins[module.__name__].metadata = metadata
+        logger.opt(colors=True).success(f'Succeeded to load liteyuki plugin "{display_name}"')
+        return _plugins[module.__name__]
+    except Exception as e:
+        logger.opt(colors=True).success(f'Failed to load liteyuki plugin "<r>{module_path}</r>"')
+        traceback.print_exc()
+        return None

def load_plugins(*plugin_dir: str, *, ignore_warning: bool = True) -> set[Plugin]

说明: 导入文件夹下多个插件

参数:

  • plugin_dir: 文件夹路径
  • ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
源代码在GitHub上查看
python
def load_plugins(*plugin_dir: str, ignore_warning: bool=True) -> set[Plugin]:
+    """导入文件夹下多个插件
+
+    参数:
+        plugin_dir: 文件夹路径
+        ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
+    """
+    plugins = set()
+    for dir_path in plugin_dir:
+        if not os.path.exists(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' does not exist.")
+            continue
+        if not os.listdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is empty.")
+            continue
+        if not os.path.isdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is not a directory.")
+            continue
+        for f in os.listdir(dir_path):
+            path = Path(os.path.join(dir_path, f))
+            module_name = None
+            if os.path.isfile(path) and f.endswith('.py') and (f != '__init__.py'):
+                module_name = f'{path_to_module_name(Path(dir_path))}.{f[:-3]}'
+            elif os.path.isdir(path) and os.path.exists(os.path.join(path, '__init__.py')):
+                module_name = path_to_module_name(path)
+            if module_name:
+                load_plugin(module_name)
+                if _plugins.get(module_name):
+                    plugins.add(_plugins[module_name])
+    return plugins

def format_display_name(display_name: str, plugin_type: PluginType) -> str

说明: 设置插件名称颜色,根据不同类型插件设置颜色

参数:

  • display_name: 插件名称
  • plugin_type: 插件类型
`,17),r=i("strong",null,"返回",-1),g=a(`
源代码在GitHub上查看
python
def format_display_name(display_name: str, plugin_type: PluginType) -> str:
+    """
+    设置插件名称颜色,根据不同类型插件设置颜色
+    Args:
+        display_name: 插件名称
+        plugin_type: 插件类型
+
+    Returns:
+        str: 设置后的插件名称 <y>name</y>
+    """
+    color = 'y'
+    match plugin_type:
+        case PluginType.APPLICATION:
+            color = 'm'
+        case PluginType.TEST:
+            color = 'g'
+        case PluginType.MODULE:
+            color = 'e'
+        case PluginType.SERVICE:
+            color = 'c'
+    return f'<{color}>{display_name} [{plugin_type.name}]</{color}>'
`,1);function y(F,o,u,_,C,c){const n=l("y");return e(),t("div",null,[d,i("p",null,[r,s(": str: 设置后的插件名称 "),k(n,null,{default:p(()=>[s("name")]),_:1})]),g])}const A=h(E,[["render",y]]);export{B as __pageData,A as default}; diff --git a/assets/dev_api_plugin_load.md.Bb_Kxjiz.lean.js b/assets/dev_api_plugin_load.md.Bb_Kxjiz.lean.js new file mode 100644 index 00000000..d931572e --- /dev/null +++ b/assets/dev_api_plugin_load.md.Bb_Kxjiz.lean.js @@ -0,0 +1 @@ +import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.C3o_UkTa.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"dev/api/plugin/load.md","filePath":"zh/dev/api/plugin/load.md","lastUpdated":null}'),E={name:"dev/api/plugin/load.md"},d=a("",17),r=i("strong",null,"返回",-1),g=a("",1);function y(F,o,u,_,C,c){const n=l("y");return e(),t("div",null,[d,i("p",null,[r,s(": str: 设置后的插件名称 "),k(n,null,{default:p(()=>[s("name")]),_:1})]),g])}const A=h(E,[["render",y]]);export{B as __pageData,A as default}; diff --git a/assets/dev_api_plugin_manager.md.wxoQsnAr.js b/assets/dev_api_plugin_manager.md.wxoQsnAr.js new file mode 100644 index 00000000..b12f6a14 --- /dev/null +++ b/assets/dev_api_plugin_manager.md.wxoQsnAr.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"dev/api/plugin/manager.md","filePath":"zh/dev/api/plugin/manager.md","lastUpdated":null}'),r={name:"dev/api/plugin/manager.md"},l=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"​")],-1),o=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[l,o,s];function u(p,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",u]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_plugin_manager.md.wxoQsnAr.lean.js b/assets/dev_api_plugin_manager.md.wxoQsnAr.lean.js new file mode 100644 index 00000000..b12f6a14 --- /dev/null +++ b/assets/dev_api_plugin_manager.md.wxoQsnAr.lean.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"dev/api/plugin/manager.md","filePath":"zh/dev/api/plugin/manager.md","lastUpdated":null}'),r={name:"dev/api/plugin/manager.md"},l=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"​")],-1),o=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[l,o,s];function u(p,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",u]]);export{y as __pageData,f as default}; diff --git a/assets/dev_api_plugin_model.md.CXJI2586.js b/assets/dev_api_plugin_model.md.CXJI2586.js new file mode 100644 index 00000000..3277fda7 --- /dev/null +++ b/assets/dev_api_plugin_model.md.CXJI2586.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as r}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"dev/api/plugin/model.md","filePath":"zh/dev/api/plugin/model.md","lastUpdated":null}'),o={name:"dev/api/plugin/model.md"},s=r('

liteyuki.plugin.model

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/24 上午12:02 @Author : snowykami @Email : snowykami@outlook.com @File : model.py @Software: PyCharm

class PluginType(Enum)

attr APPLICATION = 'application'

attr SERVICE = 'service'

attr MODULE = 'module'

attr UNCLASSIFIED = 'unclassified'

attr TEST = 'test'

class PluginMetadata(BaseModel)

attr name: str = NO_DEFAULT

attr description: str = ''

attr usage: str = ''

attr type: PluginType = PluginType.UNCLASSIFIED

attr author: str = ''

attr homepage: str = ''

attr extra: dict[str, Any] = {}

class Plugin(BaseModel)

def __hash__(self)

源代码在GitHub上查看
python
def __hash__(self):\n    return hash(self.module_name)

attr model_config = {'arbitrary_types_allowed': True}

attr name: str = NO_DEFAULT

attr module: ModuleType = NO_DEFAULT

attr module_name: str = NO_DEFAULT

attr metadata: Optional[PluginMetadata] = None

',25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default}; diff --git a/assets/dev_api_plugin_model.md.CXJI2586.lean.js b/assets/dev_api_plugin_model.md.CXJI2586.lean.js new file mode 100644 index 00000000..720d096d --- /dev/null +++ b/assets/dev_api_plugin_model.md.CXJI2586.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as r}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"dev/api/plugin/model.md","filePath":"zh/dev/api/plugin/model.md","lastUpdated":null}'),o={name:"dev/api/plugin/model.md"},s=r("",25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default}; diff --git a/assets/dev_api_plugin_plugin.md.CSWk8lsR.js b/assets/dev_api_plugin_plugin.md.CSWk8lsR.js new file mode 100644 index 00000000..a9a207f1 --- /dev/null +++ b/assets/dev_api_plugin_plugin.md.CSWk8lsR.js @@ -0,0 +1,7 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/plugin.md","filePath":"zh/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"dev/api/plugin/plugin.md"},e=a(`

liteyuki.plugin

def get_loaded_plugins() -> dict[str, Plugin]

说明: 获取已加载的插件

返回: dict[str, Plugin]: 插件字典

源代码在GitHub上查看
python
def get_loaded_plugins() -> dict[str, Plugin]:
+    """
+    获取已加载的插件
+    Returns:
+        dict[str, Plugin]: 插件字典
+    """
+    return _plugins
`,5),l=[e];function p(d,r,h,u,o,g){return t(),s("div",null,l)}const _=i(n,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/dev_api_plugin_plugin.md.CSWk8lsR.lean.js b/assets/dev_api_plugin_plugin.md.CSWk8lsR.lean.js new file mode 100644 index 00000000..298b85a0 --- /dev/null +++ b/assets/dev_api_plugin_plugin.md.CSWk8lsR.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/plugin.md","filePath":"zh/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"dev/api/plugin/plugin.md"},e=a("",5),l=[e];function p(d,r,h,u,o,g){return t(),s("div",null,l)}const _=i(n,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/dev_api_plugins_liteecho.md.CPFGVTjw.js b/assets/dev_api_plugins_liteecho.md.CPFGVTjw.js new file mode 100644 index 00000000..bfc526a3 --- /dev/null +++ b/assets/dev_api_plugins_liteecho.md.CPFGVTjw.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"dev/api/plugins/liteecho.md","filePath":"zh/dev/api/plugins/liteecho.md","lastUpdated":null}'),a={name:"dev/api/plugins/liteecho.md"},l=t('

liteyuki.plugins.liteecho

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/22 下午12:31 @Author : snowykami @Email : snowykami@outlook.com @File : liteecho.py @Software: PyCharm

@on_startswith(['liteecho'], rule=is_su_rule).handle()

async def liteecho(event: MessageEvent)

源代码在GitHub上查看
python
@on_startswith(['liteecho'], rule=is_su_rule).handle()\nasync def liteecho(event: MessageEvent):\n    event.reply(event.raw_message.strip()[8:].strip())
',6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/dev_api_plugins_liteecho.md.CPFGVTjw.lean.js b/assets/dev_api_plugins_liteecho.md.CPFGVTjw.lean.js new file mode 100644 index 00000000..b26d7d24 --- /dev/null +++ b/assets/dev_api_plugins_liteecho.md.CPFGVTjw.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"dev/api/plugins/liteecho.md","filePath":"zh/dev/api/plugins/liteecho.md","lastUpdated":null}'),a={name:"dev/api/plugins/liteecho.md"},l=t("",6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/dev_api_plugins_plugin_loader_index.md.BKOtyJlM.js b/assets/dev_api_plugins_plugin_loader_index.md.BKOtyJlM.js new file mode 100644 index 00000000..4a03e860 --- /dev/null +++ b/assets/dev_api_plugins_plugin_loader_index.md.BKOtyJlM.js @@ -0,0 +1,8 @@ +import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/index.md","filePath":"zh/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/index.md"},t=l(`

liteyuki.plugins.plugin_loader

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

说明: 默认插件加载器,应在初始化时调用

源代码在GitHub上查看
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)
`,6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default}; diff --git a/assets/dev_api_plugins_plugin_loader_index.md.BKOtyJlM.lean.js b/assets/dev_api_plugins_plugin_loader_index.md.BKOtyJlM.lean.js new file mode 100644 index 00000000..ceb14766 --- /dev/null +++ b/assets/dev_api_plugins_plugin_loader_index.md.BKOtyJlM.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/index.md","filePath":"zh/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/index.md"},t=l("",6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default}; diff --git a/assets/dev_api_plugins_plugin_loader_plugin_loader.md.Bfz2lNbM.js b/assets/dev_api_plugins_plugin_loader_plugin_loader.md.Bfz2lNbM.js new file mode 100644 index 00000000..5d1ee82f --- /dev/null +++ b/assets/dev_api_plugins_plugin_loader_plugin_loader.md.Bfz2lNbM.js @@ -0,0 +1,8 @@ +import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"zh/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/plugin_loader.md"},t=l(`

liteyuki.plugins.plugin_loader

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

说明: 默认插件加载器,应在初始化时调用

源代码在GitHub上查看
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)
`,6),e=[t];function p(r,o,h,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default}; diff --git a/assets/dev_api_plugins_plugin_loader_plugin_loader.md.Bfz2lNbM.lean.js b/assets/dev_api_plugins_plugin_loader_plugin_loader.md.Bfz2lNbM.lean.js new file mode 100644 index 00000000..595ebc12 --- /dev/null +++ b/assets/dev_api_plugins_plugin_loader_plugin_loader.md.Bfz2lNbM.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"zh/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/plugin_loader.md"},t=l("",6),e=[t];function p(r,o,h,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default}; diff --git a/assets/dev_api_utils.md.BfOyfADO.js b/assets/dev_api_utils.md.BfOyfADO.js new file mode 100644 index 00000000..6dac9d07 --- /dev/null +++ b/assets/dev_api_utils.md.BfOyfADO.js @@ -0,0 +1,70 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"dev/api/utils.md","filePath":"zh/dev/api/utils.md","lastUpdated":null}'),t={name:"dev/api/utils.md"},l=n(`

liteyuki.utils

说明: 一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改

def is_coroutine_callable(call: Callable[..., Any]) -> bool

说明: 判断是否为协程可调用对象

参数:

  • call: 可调用对象

返回: bool: 是否为协程可调用对象

源代码在GitHub上查看
python
def is_coroutine_callable(call: Callable[..., Any]) -> bool:
+    """
+    判断是否为协程可调用对象
+    Args:
+        call: 可调用对象
+    Returns:
+        bool: 是否为协程可调用对象
+    """
+    if inspect.isroutine(call):
+        return inspect.iscoroutinefunction(call)
+    if inspect.isclass(call):
+        return False
+    func_ = getattr(call, '__call__', None)
+    return inspect.iscoroutinefunction(func_)

def run_coroutine(*coro: Coroutine)

说明: 运行协程

参数:

  • coro:
源代码在GitHub上查看
python
def run_coroutine(*coro: Coroutine):
+    """
+    运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    try:
+        loop = asyncio.get_running_loop()
+        if loop.is_running():
+            for c in coro:
+                asyncio.ensure_future(c)
+        else:
+            for c in coro:
+                loop.run_until_complete(c)
+    except RuntimeError:
+        loop = asyncio.new_event_loop()
+        asyncio.set_event_loop(loop)
+        loop.run_until_complete(asyncio.gather(*coro))
+        loop.close()
+    except Exception as e:
+        logger.error(f'Exception occurred: {e}')

def run_coroutine_in_thread(*coro: Coroutine)

说明: 在新线程中运行协程

参数:

  • coro:
源代码在GitHub上查看
python
def run_coroutine_in_thread(*coro: Coroutine):
+    """
+    在新线程中运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    threading.Thread(target=run_coroutine, args=coro, daemon=True).start()

def path_to_module_name(path: Path) -> str

说明: 转换路径为模块名

参数:

  • path: 路径a/b/c/d -> a.b.c.d

返回: str: 模块名

源代码在GitHub上查看
python
def path_to_module_name(path: Path) -> str:
+    """
+    转换路径为模块名
+    Args:
+        path: 路径a/b/c/d -> a.b.c.d
+    Returns:
+        str: 模块名
+    """
+    rel_path = path.resolve().relative_to(Path.cwd().resolve())
+    if rel_path.stem == '__init__':
+        return '.'.join(rel_path.parts[:-1])
+    else:
+        return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]

说明: 异步包装器

参数:

  • func: Sync Callable

返回: Coroutine: Asynchronous Callable

源代码在GitHub上查看
python
def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]:
+    """
+    异步包装器
+    Args:
+        func: Sync Callable
+    Returns:
+        Coroutine: Asynchronous Callable
+    """
+
+    async def wrapper(*args, **kwargs):
+        return func(*args, **kwargs)
+    wrapper.__signature__ = inspect.signature(func)
+    return wrapper
`,30),p=[l];function h(e,k,r,o,d,E){return a(),i("div",null,p)}const y=s(t,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/dev_api_utils.md.BfOyfADO.lean.js b/assets/dev_api_utils.md.BfOyfADO.lean.js new file mode 100644 index 00000000..05db92ed --- /dev/null +++ b/assets/dev_api_utils.md.BfOyfADO.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"dev/api/utils.md","filePath":"zh/dev/api/utils.md","lastUpdated":null}'),t={name:"dev/api/utils.md"},l=n("",30),p=[l];function h(e,k,r,o,d,E){return a(),i("div",null,p)}const y=s(t,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/dev_comm.md.BaLcrxQn.js b/assets/dev_comm.md.BaLcrxQn.js new file mode 100644 index 00000000..845d9cff --- /dev/null +++ b/assets/dev_comm.md.BaLcrxQn.js @@ -0,0 +1,43 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"dev/comm.md","filePath":"zh/dev/comm.md","lastUpdated":1725102337000}'),e={name:"dev/comm.md"},h=n(`

通道通信

简介

轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信, 轻雪提供了一个通道Channel用于跨进程通信, 你可以通过Channel发送消息给其他进程,也可以监听其他进程的消息。

例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。

示例

通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由chan.on_receive()装饰回调函数实现,主动模式需调用chan.receive()实现

  • 创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为{process_name}-active{process_name}-passive
  • 主进程中通过get_channel函数获取通道对象
  • 子进程中导入单例active_channelpassive_channel即可

在轻雪插件中(主进程中)

python
import asyncio
+
+from liteyuki.comm import get_channel, Channel
+from liteyuki import get_bot
+
+# get_channel函数获取通道对象,参数为调用set_channel时的通道标识
+channel_passive = get_channel("nonebot-passive")  # 获取被动通道
+channel_active = get_channel("nonebot-active")  # 获取主动通道
+liteyuki_bot = get_bot()
+
+
+# 注册一个函数在轻雪启动后运行
+@liteyuki_bot.on_after_start
+async def send_data():
+    while True:
+        channel_passive.send("I am liteyuki main process passive")
+        channel_active.send("I am liteyuki main process active")
+        await asyncio.sleep(3)  # 每3秒发送一次消息

在子进程中(例如NoneBot插件中)

python
from nonebot import get_driver
+from liteyuki.comm import active_channel, passive_channel  # 子进程中获取通道直接导入进程全局单例即可
+from liteyuki.log import logger
+
+driver = get_driver()
+
+
+# 被动模式,通过装饰器注册一个函数在接收到消息时运行,每次接收到字符串数据时都会运行
+@passive_channel.on_receive(filter_func=lambda data: isinstance(data, str))
+async def on_passive_receive(data):
+    logger.info(f"Passive receive: {data}")
+
+
+# 注册一个函数在NoneBot启动后运行
+@driver.on_startup
+def on_startup():
+    while True:
+        data = active_channel.receive()
+        logger.info(f"Active receive: {data}")

启动后控制台输出

log
0000-00-00 00:00:00 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:00 [ℹ️信息] Active receive: I am liteyuki main process active
+0000-00-00 00:00:03 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:03 [ℹ️信息] Active receive: I am liteyuki main process active
+...

共享内存通信

简介

  • 相比于普通进程通信,内存共享使得代码编写更加简洁,轻雪框架提供了一个内存共享通信的接口,你可以通过storage模块实现内存共享通信,该模块封装通道实现
  • 内存共享是线程安全的,你可以在多个线程中读写共享内存,线程锁会自动保护共享内存的读写操作

示例

在任意进程中均可使用

python
from liteyuki.comm.storage import shared_memory
+
+shared_memory.set("key", "value")  # 设置共享内存
+value = shared_memory.get("key")  # 获取共享内存

源代码:liteyuki/comm/storage.py

`,20),l=[h];function t(p,k,r,d,E,o){return a(),i("div",null,l)}const y=s(e,[["render",t]]);export{g as __pageData,y as default}; diff --git a/assets/dev_comm.md.BaLcrxQn.lean.js b/assets/dev_comm.md.BaLcrxQn.lean.js new file mode 100644 index 00000000..106f26d4 --- /dev/null +++ b/assets/dev_comm.md.BaLcrxQn.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"dev/comm.md","filePath":"zh/dev/comm.md","lastUpdated":1725102337000}'),e={name:"dev/comm.md"},h=n("",20),l=[h];function t(p,k,r,d,E,o){return a(),i("div",null,l)}const y=s(e,[["render",t]]);export{g as __pageData,y as default}; diff --git a/assets/dev_lyfunc.md.DGSAE6Uz.js b/assets/dev_lyfunc.md.DGSAE6Uz.js new file mode 100644 index 00000000..9359c45a --- /dev/null +++ b/assets/dev_lyfunc.md.DGSAE6Uz.js @@ -0,0 +1,20 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"dev/lyfunc.md","filePath":"zh/dev/lyfunc.md","lastUpdated":1725101868000}'),t={name:"dev/lyfunc.md"},l=n(`

轻雪函数

轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.

函数文件

函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.mcfunction,文件内容为一系列的命令,每行一个命令,支持单行注释#(编辑时的语法高亮可采取shell格式),例如:

shell
# 在发信器输出"hello world"
+cmd echo hello world
+
+# 如果你想同时输出多行内容可以尝试换行符(Python格式)
+cmd echo hello world\\nLiteyuki bot

也支持句末注释,例如:

shell
cmd echo hello world # 输出"hello world"

命令文档

shell
var <var1=value1> [var2=value2] ...  # 定义变量
+cmd <command>  # 在设备上执行命令
+api <api_name> [var=value...]  # 调用Bot API
+function <func_name> # 调用函数,可递归
+sleep <time>  # 异步等待,单位s
+nohup <command>  # 使用新的task执行命令,即不等待
+end # 结束函数关键字,包括子task
+await # 等待所有异步任务结束,若函数中启动了其他task,需要在最后调用,否则task对象会被销毁

示例

shell
# 疯狂戳好友
+# 使用 /function poke user_id=123456 执行
+# 每隔0.2s戳两次,无限戳,会触发最大递归深度限制
+# 若要戳20s后停止,则需要删除await,添加sleep 20和end
+api friend_poke user_id=user_id
+api friend_poke user_id=user_id
+sleep 0.2
+nohup function poke
+await

API

理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.

Onebot v11 API文档

结束关键字

由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.

await 异步任务结束关键字,用于结束当前已完成function的执行

WARNING

但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁

TIP

编写轻雪函数推荐你使用VS Code插件Liteyuki Function实现语法高亮

`,19),e=[l];function h(p,k,d,r,o,c){return a(),i("div",null,e)}const y=s(t,[["render",h]]);export{F as __pageData,y as default}; diff --git a/assets/dev_lyfunc.md.DGSAE6Uz.lean.js b/assets/dev_lyfunc.md.DGSAE6Uz.lean.js new file mode 100644 index 00000000..b82a4077 --- /dev/null +++ b/assets/dev_lyfunc.md.DGSAE6Uz.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"dev/lyfunc.md","filePath":"zh/dev/lyfunc.md","lastUpdated":1725101868000}'),t={name:"dev/lyfunc.md"},l=n("",19),e=[l];function h(p,k,d,r,o,c){return a(),i("div",null,e)}const y=s(t,[["render",h]]);export{F as __pageData,y as default}; diff --git a/assets/dev_plugin.md.7WyHaDzB.js b/assets/dev_plugin.md.7WyHaDzB.js new file mode 100644 index 00000000..8413211a --- /dev/null +++ b/assets/dev_plugin.md.7WyHaDzB.js @@ -0,0 +1,32 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"轻雪插件开发","description":"","frontmatter":{"title":"轻雪插件开发","order":3},"headers":[],"relativePath":"dev/plugin.md","filePath":"zh/dev/plugin.md","lastUpdated":1725101868000}'),t={name:"dev/plugin.md"},h=n(`

简介

轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能

开始

创建插件

一个.py文件或一个包含__init__.py的文件夹即可被识别为插件

首先创建一个文件夹,例如watchdog_plugin,并在其中创建一个__init__.py文件,即可创建一个插件

__init__.py

python
from liteyuki.plugin import PluginMetadata, PluginType
+from .watch_dog import *    # 导入逻辑部分
+
+# 定义插件元数据
+__plugin_meta__ = PluginMetadata(
+    name="NoneDog",  # 插件名称
+    version="1.0.0",  # 插件版本
+    description="A simple plugin for nonebot developer",  # 插件描述
+    type=PluginType.SERVICE  # 插件类型
+)
+
+# 你的插件代码
+...

编写逻辑部分

轻雪主进程不涉及聊天部分,因此插件主要是一些后台任务或者与聊天机器人的通信 以下我们会编写一个简单的插件,用于开发NoneBot时进行文件系统变更重载 watch_dog.py

python
import os
+from liteyuki.dev import observer  # 导入文件系统观察器
+from liteyuki import get_bot, logger  # 导入轻雪Bot和日志
+from watchdog.events import FileSystemEvent  # 导入文件系统事件
+
+liteyuki = get_bot()  # 获取唯一的轻雪Bot实例
+
+exclude_extensions = (".pyc", ".pyo")  # 排除的文件扩展名
+
+
+# 用observer的on_file_system_event装饰器监听文件系统事件
+@observer.on_file_system_event(
+    directories=("src/nonebot_plugins",),
+    event_filter=lambda event: not event.src_path.endswith(exclude_extensions) and ("__pycache__" not in event.src_path) and os.path.isfile(event.src_path)
+)
+def restart_nonebot_process(event: FileSystemEvent):
+    logger.debug(f"File {event.src_path} changed, reloading nonebot...")
+    liteyuki.restart_process("nonebot")  # 调用重启进程方法

加载插件

方法1

  • 在配置文件中的liteyuki.plugins中添加你的插件路径,例如watchdog_plugin,重启轻雪即可加载插件。

方法2

  • 使用开发工具快速运行插件,无需手动创建实例
  • 创建入口文件,例如main.py,并在其中写入以下代码
python
from liteyuki.dev.plugin import run_plugins
+
+run_plugins("watchdog_plugin")

然后运行python main.py即可启动插件

启用插件后,我们在src/nonebot_plugins下创建一个文件,例如test.py,并在其中写入一些代码,保存后轻雪会自动重载NoneBot进程

`,19),l=[h];function p(e,k,d,r,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/dev_plugin.md.7WyHaDzB.lean.js b/assets/dev_plugin.md.7WyHaDzB.lean.js new file mode 100644 index 00000000..7247ade3 --- /dev/null +++ b/assets/dev_plugin.md.7WyHaDzB.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"轻雪插件开发","description":"","frontmatter":{"title":"轻雪插件开发","order":3},"headers":[],"relativePath":"dev/plugin.md","filePath":"zh/dev/plugin.md","lastUpdated":1725101868000}'),t={name:"dev/plugin.md"},h=n("",19),l=[h];function p(e,k,d,r,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/dev_resource.md.DU3Q8OBq.js b/assets/dev_resource.md.DU3Q8OBq.js new file mode 100644 index 00000000..5956b2ca --- /dev/null +++ b/assets/dev_resource.md.DU3Q8OBq.js @@ -0,0 +1,13 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"资源包开发","description":"","frontmatter":{"title":"资源包开发","order":1},"headers":[],"relativePath":"dev/resource.md","filePath":"zh/dev/resource.md","lastUpdated":1725102337000}'),l={name:"dev/resource.md"},t=e(`

简介

资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码

  • 资源/主题商店提供了一些资源包供你选择,你也可以自己制作资源包
  • 资源包的制作很简单,如果你接触过Minecraft的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
  • 部分内容制作需要一点点前端基础,例如htmlcss
  • 轻雪原版资源包请查看LiteyukiBot/liteyuki/resources,可以在此基础上进行修改
  • 欢迎各位投稿资源包到轻雪资源商店

请注意,主题包中的html渲染使用Js来规定数据的渲染位置,请确保您所编写的html代码能被Bot解析,否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码,以避免出现无法预料的问题。


加载资源包

  • 资源包通常是以.zip格式压缩的,只需要将其解压到根目录resources目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
shell
main.py
+resources
+└─resource_pack_1
+    ├─metadata.yml
+    ├─templates
+    └───...
+└─resource_pack_2
+    ├─metadata.yml
+    └─...
  • 你自己制作的资源包也应该遵循这个规则,并且应该在metadata.yml中填写一些信息
  • 若没有metadata.yml文件,则该文件夹不会被识别为资源包
yaml
name: "资源包名称"
+version: "1.0.0"
+description: "资源包描述"
+# 你可以自定义一些信息,但请保证以上三个字段
+...
  • 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个index.html文件,B包也定义了一个index.html文件,那么加载B包后,A包中的index.html文件会被覆盖
  • 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了templates/index.html,在B中定义了templates/style.css,可以在A的index.html中用./style.css相对路径引用B中的css

TIP

资源包的结构会随着轻雪的更新而有变动,第三方资源包开发者需要注意版本兼容性,同时用户也应该自行选择可用的资源包

`,12),n=[t];function p(c,h,d,o,r,k){return i(),a("div",null,n)}const y=s(l,[["render",p]]);export{m as __pageData,y as default}; diff --git a/assets/dev_resource.md.DU3Q8OBq.lean.js b/assets/dev_resource.md.DU3Q8OBq.lean.js new file mode 100644 index 00000000..5733c363 --- /dev/null +++ b/assets/dev_resource.md.DU3Q8OBq.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"资源包开发","description":"","frontmatter":{"title":"资源包开发","order":1},"headers":[],"relativePath":"dev/resource.md","filePath":"zh/dev/resource.md","lastUpdated":1725102337000}'),l={name:"dev/resource.md"},t=e("",12),n=[t];function p(c,h,d,o,r,k){return i(),a("div",null,n)}const y=s(l,[["render",p]]);export{m as __pageData,y as default}; diff --git a/assets/en_deploy_config.md.CB-Epa0p.js b/assets/en_deploy_config.md.CB-Epa0p.js new file mode 100644 index 00000000..76c01eed --- /dev/null +++ b/assets/en_deploy_config.md.CB-Epa0p.js @@ -0,0 +1,29 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"Configurations","description":"","frontmatter":{"title":"Configurations","order":2},"headers":[],"relativePath":"en/deploy/config.md","filePath":"en/deploy/config.md","lastUpdated":1725101868000}'),e={name:"en/deploy/config.md"},n=t(`

Configurations

LiteyukiBot supports yaml, json, and toml as configuration files, depending on your personal preference.

When you first run LiteyukiBot, it will generate config.yml and the config directory. You can modify the configuration items and restart LiteyukiBot. In most cases, you only need to modify the superusers and nickname fields.

When starting, LiteyukiBot will load all configuration files in the project directory config.yml/yaml/json/toml and the config directory. You can create multiple configuration files in the config directory, and LiteyukiBot will automatically merge these configuration files.

Basic Configuration

yaml
# NoneBot configuration
+nonebot:
+  command_start: [ "/", "" ] # Command prefix, if there is no "" empty command header, please enable alconna_use_command_start to ensure alconna parsing is normal
+  host: 127.0.0.1 # Listening address, default is local, if you want to receive external requests, please fill in
+  port: 20216 # Binding port
+  nickname: [ "liteyuki" ]  # Bot nickname list
+  superusers: [ "1919810" ]  # Superuser list
+liteyuki:
+  log_level: "INFO" # Log level
+  log_icon: true # Whether to display the log level icon (some console fonts are not available)
+  auto_report: true # Whether to automatically report problems to Liteyuki server
+  auto_update: true # Whether to automatically update Liteyuki, check for updates at 4 am every day
+  plugins: [ ] # Liteyuki plugin list
+  plugin_dirs: [ ] # Liteyuki plugin directory list

Other configurations

The following is the default value. If you need to customize it, please add it manually

yaml
# Advanced configuration
+nonebot:
+  onebot_access_token: "" # OneBot access token
+  default_language: "zh-CN" # Default language
+  alconna_auto_completion: false # alconna auto completion
+  safe_mode: false # Safe mode, if true, the bot will not load any plugins
+  # other nonebot configurations
+  custom_config_1: "custom_value1"
+  custom_config_2: "custom_value2"
+
+# development configuration
+liteyuki:
+  allow_update: true # Whether to allow Liteyuki to update
+  debug: false  # Debug mode, if true, Liteyuki will output more detailed logs
+  dev_mode: false # development mode, if true, Liteyuki will load all plugins in the development directory
+...
yaml

Example: Configuration of OneBot implementation side connected to NoneBot

In production environments, it is recommended to use reverse WebSocket The fields provided by different implementation sides may be different, but basically the same. Here is a reference value

FieldsValueDescription
protocolReverse WebSocketLiteyuki-NoneBot as server
addressws://127.0.0.1:20216/onebot/v11/wsThe address depends on the configuration file, the default is \`
AccessToken""If you have configured AccessToken for Liteyuki, please fill in the same value here
  • To use other communication methods, please visit OneBot Adapter for detailed information

Other

  • Liteyuki is not limited to the OneBot adapter and NoneBot2. You can use any adapter supported by NoneBot2 or use the Liteyuki message delivery plugin
`,16),l=[n];function o(h,p,k,r,d,c){return a(),i("div",null,l)}const y=s(e,[["render",o]]);export{u as __pageData,y as default}; diff --git a/assets/en_deploy_config.md.CB-Epa0p.lean.js b/assets/en_deploy_config.md.CB-Epa0p.lean.js new file mode 100644 index 00000000..9aabda2e --- /dev/null +++ b/assets/en_deploy_config.md.CB-Epa0p.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"Configurations","description":"","frontmatter":{"title":"Configurations","order":2},"headers":[],"relativePath":"en/deploy/config.md","filePath":"en/deploy/config.md","lastUpdated":1725101868000}'),e={name:"en/deploy/config.md"},n=t("",16),l=[n];function o(h,p,k,r,d,c){return a(),i("div",null,l)}const y=s(e,[["render",o]]);export{u as __pageData,y as default}; diff --git a/assets/en_deploy_fandq.md.lp1l61Jw.js b/assets/en_deploy_fandq.md.lp1l61Jw.js new file mode 100644 index 00000000..57a031fa --- /dev/null +++ b/assets/en_deploy_fandq.md.lp1l61Jw.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as n}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"title":"FAQ","order":3},"headers":[],"relativePath":"en/deploy/fandq.md","filePath":"en/deploy/fandq.md","lastUpdated":1725101868000}'),a={name:"en/deploy/fandq.md"},r=n('

FAQ

Frequently Asked Questions

  • There are too many python interpreters on my computer, how do I know which one to use?

    • You can specify which python interpreter to use by using the full path to the python executable, for example, /path/to/python main.py
    • Use virtual environments to avoid conflicts between different python interpreters
  • Why does the bot not respond after I start it?

    • Please check the configuration file command_start or superusers, make sure you have permission to use the command and send it correctly
    • Make sure the command header does not conflict with nickname{}, for example, a command is help, but the Bot nickname has a help, then it will be parsed as a nickname instead of a command
  • Update Liteyuki failed, error InvalidGitRepositoryError

    • Please install Git correctly and deploy Liteyuki using cloning instead of direct download
  • How to log in to chat platforms such as Telegram?

    • If you have this question, it means you don't know much about this project. This project does not implement the login function, only the message processing and response. The login function is provided by the implementation side (protocol side). The implementation side itself does not handle response logic. It processes and reports messages to Liteyuki according to the OneBot standard. You need to use an implementation side that complies with the OneBot standard to connect to Liteyuki and report messages to Liteyuki. Some recommended implementation sides have been listed below
  • Playwright installation failed

    • Enter playwright install to install the browser
  • Some plugins report errors after installation and cannot be started

    • Please refer to the plugin documentation first, confirm that the necessary configuration items of the plugin are intact, and if the problem persists, please contact the plugin author or start Liteyuki in safe mode safe_mode: true. In safe mode, you can use npm uninstall to uninstall problematic plugins

Other questions

  1. Lagrange.OneBot, based on Lagrange.Core, a Linux QQ implementation, supports OneBotv11 protocol
  2. LLOneBot, a plugin for Liteloader NTQQ, supports OneBotv11 protocol
  3. OpenShamrock, based on Lsposed, supports kritor protocol
  4. TRSS-Yunzai, based on Node.js, supports OneBotv11 protocol
  5. go-cqhttp,A QQ Client based on go, supports OneBotv11 protocol
  6. Gensokyo, use QQ protocol
  1. MinecraftOneBot, We develop a Minecraft server chat bot

Other project encountered issues, please prioritize the documentation and issues of the project itself, don't ask LiteyukiBot developers

Acknowledgements

',12),i=[r];function l(s,d,c,h,p,u){return t(),o("div",null,i)}const g=e(a,[["render",l]]);export{f as __pageData,g as default}; diff --git a/assets/en_deploy_fandq.md.lp1l61Jw.lean.js b/assets/en_deploy_fandq.md.lp1l61Jw.lean.js new file mode 100644 index 00000000..42f2b007 --- /dev/null +++ b/assets/en_deploy_fandq.md.lp1l61Jw.lean.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as n}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"title":"FAQ","order":3},"headers":[],"relativePath":"en/deploy/fandq.md","filePath":"en/deploy/fandq.md","lastUpdated":1725101868000}'),a={name:"en/deploy/fandq.md"},r=n("",12),i=[r];function l(s,d,c,h,p,u){return t(),o("div",null,i)}const g=e(a,[["render",l]]);export{f as __pageData,g as default}; diff --git a/assets/en_deploy_install.md.BnEnd6Nu.js b/assets/en_deploy_install.md.BnEnd6Nu.js new file mode 100644 index 00000000..67e29946 --- /dev/null +++ b/assets/en_deploy_install.md.BnEnd6Nu.js @@ -0,0 +1,8 @@ +import{_ as e,c as t,o as i,a4 as a}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"Install","description":"","frontmatter":{"title":"Install","order":1},"headers":[],"relativePath":"en/deploy/install.md","filePath":"en/deploy/install.md","lastUpdated":1725102337000}'),s={name:"en/deploy/install.md"},o=a(`

Install

Normal Installation

  1. Install Git and Python3.10+ Environment.
bash
# Clone the project
+git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
+# change directory
+cd LiteyukiBot
+# install dependencies
+pip install -r requirements.txt
+# start the bot!
+python main.py

TIP

It is recommended to use a virtual environment to run Liteyuki to avoid dependency conflicts. You can use python -m venv .venv to create a virtual environment, and then use .venv\\Scripts\\activate to activate the virtual environment (use source .venv/bin/activate to activate on Linux).

Run with Docker

  1. Install Docker
  2. Clone Repo git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
  3. Change directory cd LiteyukiBot
  4. Build docker image docker build -t liteyukibot .
  5. Run container docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot

TIP

If you are using Windows, please use the absolute project directory /path/to/LiteyukiBot instead of $&#40;pwd&#41;
If you have modified the port number, please replace 20216:20216 with your port number

Use TRSS Script

TRSS_Liteyuki Management Script, which provides a more convenient way to manage LiteyukiBot, recommended to use Arch Linux

Device Requirements

  • Windows system version minimum Windows10+/Windows Server 2019+
  • Linux system requires Python3.10+, recommended Ubuntu 20.04+
  • CPU: at least 1vCPU
  • Memory: Bot without other plugins will occupy 300~500MB, including chromium and node processes, other plugins depend on specific plugins, recommended 1GB or more
  • Disk: at least 1GB of space

WARNING

If there are multiple environments on the device, please use path/to/python -m pip install -r requirements.txt to install dependencies, path/to/python is the path to your Python executable

WARNING

Liteyuki's update function depends on Git. If you do not have Git installed and run the source code directly, you will not be able to use the update function

For other questions, please refer to FAQ

`,15),n=[o];function l(r,c,d,h,p,u){return i(),t("div",null,n)}const y=e(s,[["render",l]]);export{m as __pageData,y as default}; diff --git a/assets/en_deploy_install.md.BnEnd6Nu.lean.js b/assets/en_deploy_install.md.BnEnd6Nu.lean.js new file mode 100644 index 00000000..f412935a --- /dev/null +++ b/assets/en_deploy_install.md.BnEnd6Nu.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as i,a4 as a}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"Install","description":"","frontmatter":{"title":"Install","order":1},"headers":[],"relativePath":"en/deploy/install.md","filePath":"en/deploy/install.md","lastUpdated":1725102337000}'),s={name:"en/deploy/install.md"},o=a("",15),n=[o];function l(r,c,d,h,p,u){return i(),t("div",null,n)}const y=e(s,[["render",l]]);export{m as __pageData,y as default}; diff --git a/assets/en_dev_api_api.md.D-5_3fUd.js b/assets/en_dev_api_api.md.D-5_3fUd.js new file mode 100644 index 00000000..13d486e0 --- /dev/null +++ b/assets/en_dev_api_api.md.D-5_3fUd.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"en/dev/api/api.md","filePath":"en/dev/api/api.md","lastUpdated":null}'),o={name:"en/dev/api/api.md"},r=i('

liteyuki

var __version__

  • Description: 测试版本号

  • Default: '6.3.10'

',3),n=[r];function l(s,_,c,d,p,u){return t(),a("div",null,n)}const f=e(o,[["render",l]]);export{v as __pageData,f as default}; diff --git a/assets/en_dev_api_api.md.D-5_3fUd.lean.js b/assets/en_dev_api_api.md.D-5_3fUd.lean.js new file mode 100644 index 00000000..9a013d86 --- /dev/null +++ b/assets/en_dev_api_api.md.D-5_3fUd.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"en/dev/api/api.md","filePath":"en/dev/api/api.md","lastUpdated":null}'),o={name:"en/dev/api/api.md"},r=i("",3),n=[r];function l(s,_,c,d,p,u){return t(),a("div",null,n)}const f=e(o,[["render",l]]);export{v as __pageData,f as default}; diff --git a/assets/en_dev_api_bot_bot.md.D0tmeTXy.js b/assets/en_dev_api_bot_bot.md.D0tmeTXy.js new file mode 100644 index 00000000..1a468851 --- /dev/null +++ b/assets/en_dev_api_bot_bot.md.D0tmeTXy.js @@ -0,0 +1,211 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"en/dev/api/bot/bot.md","filePath":"en/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"en/dev/api/bot/bot.md"},e=n(`

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

Description: 初始化轻雪实例

Arguments:

  • *args:
  • **kwargs: 配置
Source code or View on GitHub
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

Description: 启动逻辑

Source code or View on GitHub
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

Description: 外部启动接口

Source code or View on GitHub
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

Description: 保持轻雪运行

Source code or View on GitHub
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

Description: 信号处理

Arguments:

  • signum:
  • frame:
Source code or View on GitHub
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

Description: 重启轻雪本体

Source code or View on GitHub
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

Description: 停止轻雪

Arguments:

  • name: 进程名称, 默认为None, 所有进程
Source code or View on GitHub
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

Description: 初始化轻雪, 自动调用

Source code or View on GitHub
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

Source code or View on GitHub
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

Description: 停止轻雪

Source code or View on GitHub
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

Description: 注册启动前的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

Description: 注册启动后的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册停止后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册进程停止前的函数,为子进程停止时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

Description: 注册进程重启前的函数,为子进程重启时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

Description: 注册重启后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

Description: 获取轻雪实例

Return: LiteyukiBot: 当前的轻雪实例

Source code or View on GitHub
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

Description: 获取配置

Arguments:

  • key: 配置键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

Description: 获取配置,兼容旧版本

Arguments:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
Source code or View on GitHub
python
def print_logo():
+    print('\\x1b[34m' + '\\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \\n    /  |      /      |/        |/        |/  \\\\    /  |/  |  /  |/  |  /  |/      |\\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\\\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \\n    $$ |        $$ |     $$ |   $$ |__     $$  \\\\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \\n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \\n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\\\    $$ |  \\n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\\\__$$ |$$ |$$  \\\\  _$$ |_ \\n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \\n                ' + '\\x1b[0m')
`,85),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/en_dev_api_bot_bot.md.D0tmeTXy.lean.js b/assets/en_dev_api_bot_bot.md.D0tmeTXy.lean.js new file mode 100644 index 00000000..582bfaa1 --- /dev/null +++ b/assets/en_dev_api_bot_bot.md.D0tmeTXy.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"en/dev/api/bot/bot.md","filePath":"en/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"en/dev/api/bot/bot.md"},e=n("",85),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/en_dev_api_bot_index.md.LrWFTh2D.js b/assets/en_dev_api_bot_index.md.LrWFTh2D.js new file mode 100644 index 00000000..27bf00de --- /dev/null +++ b/assets/en_dev_api_bot_index.md.LrWFTh2D.js @@ -0,0 +1,211 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"en/dev/api/bot/index.md","filePath":"en/dev/api/bot/index.md","lastUpdated":null}'),t={name:"en/dev/api/bot/index.md"},e=n(`

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

Description: 初始化轻雪实例

Arguments:

  • *args:
  • **kwargs: 配置
Source code or View on GitHub
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

Description: 启动逻辑

Source code or View on GitHub
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

Description: 外部启动接口

Source code or View on GitHub
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

Description: 保持轻雪运行

Source code or View on GitHub
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

Description: 信号处理

Arguments:

  • signum:
  • frame:
Source code or View on GitHub
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

Description: 重启轻雪本体

Source code or View on GitHub
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

Description: 停止轻雪

Arguments:

  • name: 进程名称, 默认为None, 所有进程
Source code or View on GitHub
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

Description: 初始化轻雪, 自动调用

Source code or View on GitHub
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

Source code or View on GitHub
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

Description: 停止轻雪

Source code or View on GitHub
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

Description: 注册启动前的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

Description: 注册启动后的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册停止后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册进程停止前的函数,为子进程停止时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

Description: 注册进程重启前的函数,为子进程重启时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

Description: 注册重启后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

Description: 获取轻雪实例

Return: LiteyukiBot: 当前的轻雪实例

Source code or View on GitHub
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

Description: 获取配置

Arguments:

  • key: 配置键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

Description: 获取配置,兼容旧版本

Arguments:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
Source code or View on GitHub
python
def print_logo():
+    print('\\x1b[34m' + '\\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \\n    /  |      /      |/        |/        |/  \\\\    /  |/  |  /  |/  |  /  |/      |\\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\\\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \\n    $$ |        $$ |     $$ |   $$ |__     $$  \\\\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \\n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \\n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\\\    $$ |  \\n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\\\__$$ |$$ |$$  \\\\  _$$ |_ \\n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \\n                ' + '\\x1b[0m')
`,85),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/en_dev_api_bot_index.md.LrWFTh2D.lean.js b/assets/en_dev_api_bot_index.md.LrWFTh2D.lean.js new file mode 100644 index 00000000..59d1aab4 --- /dev/null +++ b/assets/en_dev_api_bot_index.md.LrWFTh2D.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"en/dev/api/bot/index.md","filePath":"en/dev/api/bot/index.md","lastUpdated":null}'),t={name:"en/dev/api/bot/index.md"},e=n("",85),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{y as __pageData,F as default}; diff --git a/assets/en_dev_api_bot_lifespan.md.EgH0pEuD.js b/assets/en_dev_api_bot_lifespan.md.EgH0pEuD.js new file mode 100644 index 00000000..cd82bb55 --- /dev/null +++ b/assets/en_dev_api_bot_lifespan.md.EgH0pEuD.js @@ -0,0 +1,114 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"en/dev/api/bot/lifespan.md","filePath":"en/dev/api/bot/lifespan.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/bot/lifespan.md"},e=n(`

liteyuki.bot.lifespan

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午8:24 @Author : snowykami @Email : snowykami@outlook.com @File : lifespan.py @Software: PyCharm

class Lifespan

def __init__(self) -> None

Description: 轻雪生命周期管理,启动、停止、重启

Source code or View on GitHub
python
def __init__(self) -> None:
+    """
+        轻雪生命周期管理,启动、停止、重启
+        """
+    self.life_flag: int = 0
+    self._before_start_funcs: list[LIFESPAN_FUNC] = []
+    self._after_start_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._after_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_restart_funcs: list[LIFESPAN_FUNC] = []
+    self._after_restart_funcs: list[LIFESPAN_FUNC] = []

@staticmethod

async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None

Description: 并发运行异步函数

Arguments:

  • funcs:
Source code or View on GitHub
python
@staticmethod
+async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None:
+    """
+        并发运行异步函数
+        Args:
+            funcs:
+        Returns:
+        """
+    loop = asyncio.get_running_loop()
+    tasks = [func(*args, **kwargs) if is_coroutine_callable(func) else async_wrapper(func)(*args, **kwargs) for func in funcs]
+    await asyncio.gather(*tasks)

def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册启动时的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_start_funcs.append(func)
+    return func

def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册启动时的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_start_funcs.append(func)
+    return func

def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册停止前的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止前的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_shutdown_funcs.append(func)
+    return func

def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册停止后的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止后的函数
+        Args:
+            func:
+
+        Returns:
+            LIFESPAN_FUNC:
+
+        """
+    self._after_shutdown_funcs.append(func)
+    return func

def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册重启时的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_restart_funcs.append(func)
+    return func

def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册重启后的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启后的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_restart_funcs.append(func)
+    return func

async def before_start(self) -> None

Description: 启动前

Source code or View on GitHub
python
async def before_start(self) -> None:
+    """
+        启动前
+        Returns:
+        """
+    logger.debug('Running before_start functions')
+    await self.run_funcs(self._before_start_funcs)

async def after_start(self) -> None

Description: 启动后

Source code or View on GitHub
python
async def after_start(self) -> None:
+    """
+        启动后
+        Returns:
+        """
+    logger.debug('Running after_start functions')
+    await self.run_funcs(self._after_start_funcs)

async def before_process_shutdown(self) -> None

Description: 停止前

Source code or View on GitHub
python
async def before_process_shutdown(self) -> None:
+    """
+        停止前
+        Returns:
+        """
+    logger.debug('Running before_shutdown functions')
+    await self.run_funcs(self._before_process_shutdown_funcs)

async def after_shutdown(self) -> None

Description: 停止后

Source code or View on GitHub
python
async def after_shutdown(self) -> None:
+    """
+        停止后
+        Returns:
+        """
+    logger.debug('Running after_shutdown functions')
+    await self.run_funcs(self._after_shutdown_funcs)

async def before_process_restart(self) -> None

Description: 重启前

Source code or View on GitHub
python
async def before_process_restart(self) -> None:
+    """
+        重启前
+        Returns:
+        """
+    logger.debug('Running before_restart functions')
+    await self.run_funcs(self._before_process_restart_funcs)

async def after_restart(self) -> None

Description: 重启后

Source code or View on GitHub
python
async def after_restart(self) -> None:
+    """
+        重启后
+        Returns:
+
+        """
+    logger.debug('Running after_restart functions')
+    await self.run_funcs(self._after_restart_funcs)
`,67),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const E=s(t,[["render",p]]);export{u as __pageData,E as default}; diff --git a/assets/en_dev_api_bot_lifespan.md.EgH0pEuD.lean.js b/assets/en_dev_api_bot_lifespan.md.EgH0pEuD.lean.js new file mode 100644 index 00000000..188301be --- /dev/null +++ b/assets/en_dev_api_bot_lifespan.md.EgH0pEuD.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"en/dev/api/bot/lifespan.md","filePath":"en/dev/api/bot/lifespan.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/bot/lifespan.md"},e=n("",67),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const E=s(t,[["render",p]]);export{u as __pageData,E as default}; diff --git a/assets/en_dev_api_comm_channel.md.BLjPtV1B.js b/assets/en_dev_api_comm_channel.md.BLjPtV1B.js new file mode 100644 index 00000000..4354d4b0 --- /dev/null +++ b/assets/en_dev_api_comm_channel.md.BLjPtV1B.js @@ -0,0 +1,196 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.channel","description":"","frontmatter":{"title":"liteyuki.comm.channel"},"headers":[],"relativePath":"en/dev/api/comm/channel.md","filePath":"en/dev/api/comm/channel.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/comm/channel.md"},l=n(`

liteyuki.comm.channel

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午11:21 @Author : snowykami @Email : snowykami@outlook.com @File : channel_.py @Software: PyCharm

本模块定义了一个通用的通道类,用于进程间通信

class Channel(Generic[T])

def __init__(self, name: str, type_check: Optional[bool] = None)

Description: 初始化通道

Arguments:

  • name: 通道ID
  • type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
Source code or View on GitHub
python
def __init__(self, name: str, type_check: Optional[bool]=None):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+            type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
+        """
+    self.conn_send, self.conn_recv = Pipe()
+    self._conn_send_inner, self._conn_recv_inner = Pipe()
+    self._closed = False
+    self._on_main_receive_func_ids: list[int] = []
+    self._on_sub_receive_func_ids: list[int] = []
+    self.name: str = name
+    self.is_receive_loop_running = False
+    if type_check is None:
+        type_check = self._get_generic_type() is not None
+    elif type_check:
+        if self._get_generic_type() is None:
+            raise TypeError('Type hint is required for enforcing type check.')
+    self.type_check = type_check
+    if name in _channel:
+        raise ValueError(f'Channel {name} already exists')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = self
+        logger.debug(f'Channel {name} initialized in main process')
+    else:
+        logger.debug(f'Channel {name} initialized in sub process, should manually set in main process')

def _get_generic_type(self) -> Optional[type]

Description: 获取通道传递泛型类型

Return: Optional[type]: 泛型类型

Source code or View on GitHub
python
def _get_generic_type(self) -> Optional[type]:
+    """
+        获取通道传递泛型类型
+
+        Returns:
+            Optional[type]: 泛型类型
+        """
+    if hasattr(self, '__orig_class__'):
+        return get_args(self.__orig_class__)[0]
+    return None

def _validate_structure(self, data: Any, structure: type) -> bool

Description: 验证数据结构

Arguments:

  • data: 数据
  • structure: 结构

Return: bool: 是否通过验证

Source code or View on GitHub
python
def _validate_structure(self, data: Any, structure: type) -> bool:
+    """
+        验证数据结构
+        Args:
+            data: 数据
+            structure: 结构
+
+        Returns:
+            bool: 是否通过验证
+        """
+    if isinstance(structure, type):
+        return isinstance(data, structure)
+    elif isinstance(structure, tuple):
+        if not isinstance(data, tuple) or len(data) != len(structure):
+            return False
+        return all((self._validate_structure(d, s) for d, s in zip(data, structure)))
+    elif isinstance(structure, list):
+        if not isinstance(data, list):
+            return False
+        return all((self._validate_structure(d, structure[0]) for d in data))
+    elif isinstance(structure, dict):
+        if not isinstance(data, dict):
+            return False
+        return all((k in data and self._validate_structure(data[k], structure[k]) for k in structure))
+    return False

def send(self, data: T)

Description: 发送数据,发送函数为同步函数,没有异步的必要

Arguments:

  • data: 数据
Source code or View on GitHub
python
def send(self, data: T):
+    """
+        发送数据,发送函数为同步函数,没有异步的必要
+        Args:
+            data: 数据
+        """
+    if self.type_check:
+        _type = self._get_generic_type()
+        if _type is not None and (not self._validate_structure(data, _type)):
+            raise TypeError(f'Data must be an instance of {_type}, {type(data)} found')
+    if self._closed:
+        raise RuntimeError('Cannot send to a closed channel_')
+    self.conn_send.send(data)

def receive(self) -> T

Description: 同步接收数据,会阻塞线程

Source code or View on GitHub
python
def receive(self) -> T:
+    """
+        同步接收数据,会阻塞线程
+        Args:
+        """
+    if self._closed:
+        raise RuntimeError('Cannot receive from a closed channel_')
+    while True:
+        data = self.conn_recv.recv()
+        return data

async def async_receive(self) -> T

Description: 异步接收数据,会挂起等待

Source code or View on GitHub
python
async def async_receive(self) -> T:
+    """
+        异步接收数据,会挂起等待
+        """
+    print('等待接收数据')
+    loop = asyncio.get_running_loop()
+    data = await loop.run_in_executor(None, self.receive)
+    print('接收到数据')
+    return data

def on_receive(self, filter_func: Optional[FILTER_FUNC] = None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]

Description: 接收数据并执行函数

Arguments:

  • filter_func: 过滤函数,为None则不过滤

Return: 装饰器,装饰一个函数在接收到数据后执行

Source code or View on GitHub
python
def on_receive(self, filter_func: Optional[FILTER_FUNC]=None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]:
+    """
+        接收数据并执行函数
+        Args:
+            filter_func: 过滤函数,为None则不过滤
+        Returns:
+            装饰器,装饰一个函数在接收到数据后执行
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('on_receive can only be used in main process')
+
+    def decorator(func: Callable[[T], Any]) -> Callable[[T], Any]:
+        global _func_id
+
+        async def wrapper(data: T) -> Any:
+            if filter_func is not None:
+                if is_coroutine_callable(filter_func):
+                    if not await filter_func(data):
+                        return
+                elif not filter_func(data):
+                    return
+            if is_coroutine_callable(func):
+                return await func(data)
+            else:
+                return func(data)
+        _callback_funcs[_func_id] = wrapper
+        if IS_MAIN_PROCESS:
+            self._on_main_receive_func_ids.append(_func_id)
+        else:
+            self._on_sub_receive_func_ids.append(_func_id)
+        _func_id += 1
+        return func
+    return decorator

async def _run_on_receive_funcs(self, data: Any)

Description: 运行接收函数

Arguments:

  • data: 数据
Source code or View on GitHub
python
async def _run_on_receive_funcs(self, data: Any):
+    """
+        运行接收函数
+        Args:
+            data: 数据
+        """
+    if IS_MAIN_PROCESS:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_main_receive_func_ids]
+    else:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_sub_receive_func_ids]

async def start_receive_loop(self)

Description: 开始接收数据 会自动判断主进程和子进程,需要在对应进程都调度一次

Source code or View on GitHub
python
async def start_receive_loop(self):
+    """
+        开始接收数据
+        会自动判断主进程和子进程,需要在对应进程都调度一次
+        """
+    if len(self._on_main_receive_func_ids) == 0:
+        logger.warning(f'No on_receive function registered for {self.name}')
+        return
+    self.is_receive_loop_running = True
+    logger.debug(f'Starting receive loop for {self.name}')
+    while not self._closed:
+        data = await self.async_receive()
+        await self._run_on_receive_funcs(data)

var active_channel

  • Description: 子进程可用的主动和被动通道

  • Type: Channel

  • Default: Channel(name='active_channel')

var publish_channel

  • Description: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • Type: Channel[tuple[str, dict[str, Any]]]

  • Default: Channel(name='publish_channel')

var channel_deliver_active_channel

  • Description: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • Type: Channel[Channel[Any]]

  • Default: NO_DEFAULT

def set_channel(name: str, channel: Channel)

Description: 设置通道实例

Arguments:

  • name: 通道名称
  • channel: 通道实例
Source code or View on GitHub
python
def set_channel(name: str, channel: 'Channel'):
+    """
+    设置通道实例
+    Args:
+        name: 通道名称
+        channel: 通道实例
+    """
+    if not isinstance(channel, Channel):
+        raise TypeError(f'channel_ must be an instance of Channel, {type(channel)} found')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = channel
+    else:
+        channel_deliver_passive_channel.send(('set_channel', {'name': name, 'channel_': channel}))

def set_channels(channels: dict[str, Channel])

Description: 设置通道实例

Arguments:

  • channels: 通道名称
Source code or View on GitHub
python
def set_channels(channels: dict[str, 'Channel']):
+    """
+    设置通道实例
+    Args:
+        channels: 通道名称
+    """
+    for name, channel in channels.items():
+        set_channel(name, channel)

def get_channel(name: str) -> Channel

Description: 获取通道实例

Arguments:

  • name: 通道名称
Source code or View on GitHub
python
def get_channel(name: str) -> 'Channel':
+    """
+    获取通道实例
+    Args:
+        name: 通道名称
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel[name]
+    else:
+        recv_chan = Channel[Channel[Any]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channel', {'name': name, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def get_channels() -> dict[str, Channel]

Description: 获取通道实例

Source code or View on GitHub
python
def get_channels() -> dict[str, 'Channel']:
+    """
+    获取通道实例
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel
+    else:
+        recv_chan = Channel[dict[str, Channel[Any]]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channels', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')

def on_set_channel(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')
+def on_set_channel(data: tuple[str, dict[str, Any]]):
+    name, channel = (data[1]['name'], data[1]['channel_'])
+    set_channel(name, channel)

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')

def on_get_channel(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')
+def on_get_channel(data: tuple[str, dict[str, Any]]):
+    name, recv_chan = (data[1]['name'], data[1]['recv_chan'])
+    recv_chan.send(get_channel(name))

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')

def on_get_channels(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')
+def on_get_channels(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(get_channels())
`,78),h=[l];function e(k,p,r,d,E,g){return a(),i("div",null,h)}const o=s(t,[["render",e]]);export{y as __pageData,o as default}; diff --git a/assets/en_dev_api_comm_channel.md.BLjPtV1B.lean.js b/assets/en_dev_api_comm_channel.md.BLjPtV1B.lean.js new file mode 100644 index 00000000..90218063 --- /dev/null +++ b/assets/en_dev_api_comm_channel.md.BLjPtV1B.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.channel","description":"","frontmatter":{"title":"liteyuki.comm.channel"},"headers":[],"relativePath":"en/dev/api/comm/channel.md","filePath":"en/dev/api/comm/channel.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/comm/channel.md"},l=n("",78),h=[l];function e(k,p,r,d,E,g){return a(),i("div",null,h)}const o=s(t,[["render",e]]);export{y as __pageData,o as default}; diff --git a/assets/en_dev_api_comm_comm.md.nImwmKaA.js b/assets/en_dev_api_comm_comm.md.nImwmKaA.js new file mode 100644 index 00000000..2a250ce4 --- /dev/null +++ b/assets/en_dev_api_comm_comm.md.nImwmKaA.js @@ -0,0 +1 @@ +import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"en/dev/api/comm/comm.md","filePath":"en/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"en/dev/api/comm/comm.md"},n=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),i=e("p",null,[e("strong",null,"Description"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[n,i];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default}; diff --git a/assets/en_dev_api_comm_comm.md.nImwmKaA.lean.js b/assets/en_dev_api_comm_comm.md.nImwmKaA.lean.js new file mode 100644 index 00000000..2a250ce4 --- /dev/null +++ b/assets/en_dev_api_comm_comm.md.nImwmKaA.lean.js @@ -0,0 +1 @@ +import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"en/dev/api/comm/comm.md","filePath":"en/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"en/dev/api/comm/comm.md"},n=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),i=e("p",null,[e("strong",null,"Description"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[n,i];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default}; diff --git a/assets/en_dev_api_comm_event.md.B8tSNpPu.js b/assets/en_dev_api_comm_event.md.B8tSNpPu.js new file mode 100644 index 00000000..4676b31c --- /dev/null +++ b/assets/en_dev_api_comm_event.md.B8tSNpPu.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"en/dev/api/comm/event.md","filePath":"en/dev/api/comm/event.md","lastUpdated":1725101868000}'),s={name:"en/dev/api/comm/event.md"},n=i('

liteyuki.comm.event

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class Event

def __init__(self, name: str, data: dict[str, Any])

Source code or View on GitHub
python
def __init__(self, name: str, data: dict[str, Any]):\n    self.name = name\n    self.data = data
',6),l=[n];function o(r,h,d,p,k,c){return a(),t("div",null,l)}const _=e(s,[["render",o]]);export{y as __pageData,_ as default}; diff --git a/assets/en_dev_api_comm_event.md.B8tSNpPu.lean.js b/assets/en_dev_api_comm_event.md.B8tSNpPu.lean.js new file mode 100644 index 00000000..1d958823 --- /dev/null +++ b/assets/en_dev_api_comm_event.md.B8tSNpPu.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"en/dev/api/comm/event.md","filePath":"en/dev/api/comm/event.md","lastUpdated":1725101868000}'),s={name:"en/dev/api/comm/event.md"},n=i("",6),l=[n];function o(r,h,d,p,k,c){return a(),t("div",null,l)}const _=e(s,[["render",o]]);export{y as __pageData,_ as default}; diff --git a/assets/en_dev_api_comm_index.md.DXB5jsIP.js b/assets/en_dev_api_comm_index.md.DXB5jsIP.js new file mode 100644 index 00000000..0cedc518 --- /dev/null +++ b/assets/en_dev_api_comm_index.md.DXB5jsIP.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"en/dev/api/comm/index.md","filePath":"en/dev/api/comm/index.md","lastUpdated":null}'),i={name:"en/dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),s=e("p",null,[e("strong",null,"Description"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return n(),o("div",null,l)}const x=a(i,[["render",r]]);export{k as __pageData,x as default}; diff --git a/assets/en_dev_api_comm_index.md.DXB5jsIP.lean.js b/assets/en_dev_api_comm_index.md.DXB5jsIP.lean.js new file mode 100644 index 00000000..0cedc518 --- /dev/null +++ b/assets/en_dev_api_comm_index.md.DXB5jsIP.lean.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"en/dev/api/comm/index.md","filePath":"en/dev/api/comm/index.md","lastUpdated":null}'),i={name:"en/dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"​")],-1),s=e("p",null,[e("strong",null,"Description"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return n(),o("div",null,l)}const x=a(i,[["render",r]]);export{k as __pageData,x as default}; diff --git a/assets/en_dev_api_comm_rpc.md.Db5NdJbe.js b/assets/en_dev_api_comm_rpc.md.Db5NdJbe.js new file mode 100644 index 00000000..206b511e --- /dev/null +++ b/assets/en_dev_api_comm_rpc.md.Db5NdJbe.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"en/dev/api/comm/rpc.md","filePath":"en/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"en/dev/api/comm/rpc.md"},n=t('

liteyuki.comm.rpc

Description: 本模块用于实现RPC(基于IPC)通信

class RPC

def __init__(self, on_calling: ON_CALLING_FUNC) -> None

Source code or View on GitHub
python
def __init__(self, on_calling: ON_CALLING_FUNC) -> None:\n    self.on_calling = on_calling

def call(self, args: tuple, kwargs: dict) -> Any

Description: 调用

Source code or View on GitHub
python
def call(self, args: tuple, kwargs: dict) -> Any:\n    """\n        调用\n        """\n    return self.on_calling(args, kwargs)
',8),l=[n];function p(r,h,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default}; diff --git a/assets/en_dev_api_comm_rpc.md.Db5NdJbe.lean.js b/assets/en_dev_api_comm_rpc.md.Db5NdJbe.lean.js new file mode 100644 index 00000000..cb032b57 --- /dev/null +++ b/assets/en_dev_api_comm_rpc.md.Db5NdJbe.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"en/dev/api/comm/rpc.md","filePath":"en/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"en/dev/api/comm/rpc.md"},n=t("",8),l=[n];function p(r,h,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default}; diff --git a/assets/en_dev_api_comm_socks_channel.md.kerI5Mmv.js b/assets/en_dev_api_comm_socks_channel.md.kerI5Mmv.js new file mode 100644 index 00000000..21b1634c --- /dev/null +++ b/assets/en_dev_api_comm_socks_channel.md.kerI5Mmv.js @@ -0,0 +1,26 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"en/dev/api/comm/socks_channel.md","filePath":"en/dev/api/comm/socks_channel.md","lastUpdated":null}'),n={name:"en/dev/api/comm/socks_channel.md"},t=e(`

liteyuki.comm.socks_channel

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/25 下午3:54 @Author : snowykami @Email : snowykami@outlook.com @File : channelv2.py @Software: PyCharm

class SocksChannel

def __init__(self, name: str)

Description: 初始化通道

Arguments:

  • name: 通道ID
Source code or View on GitHub
python
def __init__(self, name: str):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+        """
+    self._name = name
+    self._conn_send = None
+    self._conn_recv = None
+    self._closed = False

def send(self, data)

Description: 发送数据

Arguments:

  • data: 数据
Source code or View on GitHub
python
def send(self, data):
+    """
+        发送数据
+        Args:
+            data: 数据
+        """
+    pass

def receive(self)

Description: 接收数据

Return: data: 数据

Source code or View on GitHub
python
def receive(self):
+    """
+        接收数据
+        Returns:
+            data: 数据
+        """
+    pass

def close(self)

Description: 关闭通道

Source code or View on GitHub
python
def close(self):
+    """
+        关闭通道
+        """
+    pass
`,21),l=[t];function h(p,o,k,r,c,d){return i(),a("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_api_comm_socks_channel.md.kerI5Mmv.lean.js b/assets/en_dev_api_comm_socks_channel.md.kerI5Mmv.lean.js new file mode 100644 index 00000000..c0f66f79 --- /dev/null +++ b/assets/en_dev_api_comm_socks_channel.md.kerI5Mmv.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"en/dev/api/comm/socks_channel.md","filePath":"en/dev/api/comm/socks_channel.md","lastUpdated":null}'),n={name:"en/dev/api/comm/socks_channel.md"},t=e("",21),l=[t];function h(p,o,k,r,c,d){return i(),a("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_api_comm_storage.md.CyNGUlpk.js b/assets/en_dev_api_comm_storage.md.CyNGUlpk.js new file mode 100644 index 00000000..b42e0ade --- /dev/null +++ b/assets/en_dev_api_comm_storage.md.CyNGUlpk.js @@ -0,0 +1,144 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"en/dev/api/comm/storage.md","filePath":"en/dev/api/comm/storage.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/comm/storage.md"},e=n(`

liteyuki.comm.storage

Description: 共享内存模块。类似于redis,但是更加轻量级并且线程安全

var _on_main_subscriber_receive_funcs

  • Description: 主进程订阅者接收函数

  • Type: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • Default: {}

var _on_sub_subscriber_receive_funcs

  • Description: 子进程订阅者接收函数

  • Type: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • Default: {}

class KeyValueStore

def __init__(self)

Source code or View on GitHub
python
def __init__(self):
+    self._store = {}
+    self.active_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-active')
+    self.passive_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-passive')
+    self.publish_channel = Channel[tuple[str, Any]](name='shared_memory-publish')
+    self.is_main_receive_loop_running = False
+    self.is_sub_receive_loop_running = False

def set(self, key: str, value: Any) -> None

Description: 设置键值对

Arguments:

  • key: 键
  • value: 值
Source code or View on GitHub
python
def set(self, key: str, value: Any) -> None:
+    """
+        设置键值对
+        Args:
+            key: 键
+            value: 值
+
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            self._store[key] = value
+    else:
+        self.passive_chan.send(('set', {'key': key, 'value': value}))

def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]

Description: 获取键值对

Arguments:

  • key: 键
  • default: 默认值

Return: Any: 值

Source code or View on GitHub
python
def get(self, key: str, default: Optional[Any]=None) -> Optional[Any]:
+    """
+        获取键值对
+        Args:
+            key: 键
+            default: 默认值
+
+        Returns:
+            Any: 值
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            return self._store.get(key, default)
+    else:
+        recv_chan = Channel[Optional[Any]]('recv_chan')
+        self.passive_chan.send(('get', {'key': key, 'default': default, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def delete(self, key: str, ignore_key_error: bool = True) -> None

Description: 删除键值对

Arguments:

  • key: 键
  • ignore_key_error: 是否忽略键不存在的错误
Source code or View on GitHub
python
def delete(self, key: str, ignore_key_error: bool=True) -> None:
+    """
+        删除键值对
+        Args:
+            key: 键
+            ignore_key_error: 是否忽略键不存在的错误
+
+        Returns:
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            if key in self._store:
+                try:
+                    del self._store[key]
+                    del _locks[key]
+                except KeyError as e:
+                    if not ignore_key_error:
+                        raise e
+    else:
+        self.passive_chan.send(('delete', {'key': key}))

def get_all(self) -> dict[str, Any]

Description: 获取所有键值对

Return: dict[str, Any]: 键值对

Source code or View on GitHub
python
def get_all(self) -> dict[str, Any]:
+    """
+        获取所有键值对
+        Returns:
+            dict[str, Any]: 键值对
+        """
+    if IS_MAIN_PROCESS:
+        return self._store
+    else:
+        recv_chan = Channel[dict[str, Any]]('recv_chan')
+        self.passive_chan.send(('get_all', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

def publish(self, channel_: str, data: Any) -> None

Description: 发布消息

Arguments:

  • channel_: 频道
  • data: 数据
Source code or View on GitHub
python
def publish(self, channel_: str, data: Any) -> None:
+    """
+        发布消息
+        Args:
+            channel_: 频道
+            data: 数据
+
+        Returns:
+        """
+    self.active_chan.send(('publish', {'channel': channel_, 'data': data}))

def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]

Description: 订阅者接收消息时的回调

Arguments:

  • channel_: 频道

Return: 装饰器

Source code or View on GitHub
python
def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]:
+    """
+        订阅者接收消息时的回调
+        Args:
+            channel_: 频道
+
+        Returns:
+            装饰器
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot subscribe in sub process.')
+
+    def decorator(func: ON_RECEIVE_FUNC) -> ON_RECEIVE_FUNC:
+
+        async def wrapper(data: Any):
+            if is_coroutine_callable(func):
+                await func(data)
+            else:
+                func(data)
+        if IS_MAIN_PROCESS:
+            if channel_ not in _on_main_subscriber_receive_funcs:
+                _on_main_subscriber_receive_funcs[channel_] = []
+            _on_main_subscriber_receive_funcs[channel_].append(wrapper)
+        else:
+            if channel_ not in _on_sub_subscriber_receive_funcs:
+                _on_sub_subscriber_receive_funcs[channel_] = []
+            _on_sub_subscriber_receive_funcs[channel_].append(wrapper)
+        return wrapper
+    return decorator

@staticmethod

async def run_subscriber_receive_funcs(channel_: str, data: Any)

Description: 运行订阅者接收函数

Arguments:

  • channel_: 频道
  • data: 数据
Source code or View on GitHub
python
@staticmethod
+async def run_subscriber_receive_funcs(channel_: str, data: Any):
+    """
+        运行订阅者接收函数
+        Args:
+            channel_: 频道
+            data: 数据
+        """
+    [asyncio.create_task(func(data)) for func in _on_main_subscriber_receive_funcs[channel_]]

async def start_receive_loop(self)

Description: 启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程

Source code or View on GitHub
python
async def start_receive_loop(self):
+    """
+        启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot start receive loop in sub process.')
+    while True:
+        data = await self.active_chan.async_receive()
+        if data[0] == 'publish':
+            await self.run_subscriber_receive_funcs(data[1]['channel'], data[1]['data'])
+            self.publish_channel.send(data)

class GlobalKeyValueStore

@classmethod

def get_instance(cls)

Source code or View on GitHub
python
@classmethod
+def get_instance(cls):
+    if cls._instance is None:
+        with cls._lock:
+            if cls._instance is None:
+                cls._instance = KeyValueStore()
+    return cls._instance

attr _instance = None

attr _lock = threading.Lock()

var _ref_count

  • Description: import 引用计数, 防止获取空指针

  • Default: 0

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')

def on_get(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')
+def on_get(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    default = data[1]['default']
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get(key, default))

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')

def on_set(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')
+def on_set(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    value = data[1]['value']
+    shared_memory.set(key, value)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')

def on_delete(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')
+def on_delete(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    shared_memory.delete(key)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')

def on_get_all(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')
+def on_get_all(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get_all())
`,69),l=[e];function h(k,p,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default}; diff --git a/assets/en_dev_api_comm_storage.md.CyNGUlpk.lean.js b/assets/en_dev_api_comm_storage.md.CyNGUlpk.lean.js new file mode 100644 index 00000000..5dd4febd --- /dev/null +++ b/assets/en_dev_api_comm_storage.md.CyNGUlpk.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"en/dev/api/comm/storage.md","filePath":"en/dev/api/comm/storage.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/comm/storage.md"},e=n("",69),l=[e];function h(k,p,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default}; diff --git a/assets/en_dev_api_config.md.paJM3SZQ.js b/assets/en_dev_api_config.md.paJM3SZQ.js new file mode 100644 index 00000000..3ceea153 --- /dev/null +++ b/assets/en_dev_api_config.md.paJM3SZQ.js @@ -0,0 +1,77 @@ +import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"en/dev/api/config.md","filePath":"en/dev/api/config.md","lastUpdated":1725101868000}'),l={name:"en/dev/api/config.md"},h=s('

liteyuki.config

Description: 该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式

def flat_config(config: dict[str, Any]) -> dict[str, Any]

Description: 扁平化配置文件

',4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s(`

Arguments:

  • config: 配置项目

Return: 扁平化后的配置文件,但也包含原有的键值对

Source code or View on GitHub
python
def flat_config(config: dict[str, Any]) -> dict[str, Any]:
+    """
+    扁平化配置文件
+
+    {a:{b:{c:1}}} -> {"a.b.c": 1}
+    Args:
+        config: 配置项目
+
+    Returns:
+        扁平化后的配置文件,但也包含原有的键值对
+    """
+    new_config = copy.deepcopy(config)
+    for key, value in config.items():
+        if isinstance(value, dict):
+            for k, v in flat_config(value).items():
+                new_config[f'{key}.{k}'] = v
+    return new_config

def load_from_yaml(file_: str) -> dict[str, Any]

Description: Load config from yaml file

Source code or View on GitHub
python
def load_from_yaml(file_: str) -> dict[str, Any]:
+    """
+    Load config from yaml file
+
+    """
+    logger.debug(f'Loading YAML config from {file_}')
+    config = yaml.safe_load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_json(file_: str) -> dict[str, Any]

Description: Load config from json file

Source code or View on GitHub
python
def load_from_json(file_: str) -> dict[str, Any]:
+    """
+    Load config from json file
+    """
+    logger.debug(f'Loading JSON config from {file_}')
+    config = json.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_toml(file_: str) -> dict[str, Any]

Description: Load config from toml file

Source code or View on GitHub
python
def load_from_toml(file_: str) -> dict[str, Any]:
+    """
+    Load config from toml file
+    """
+    logger.debug(f'Loading TOML config from {file_}')
+    config = toml.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]

Description: 从指定文件加载配置项,会自动识别文件格式 默认执行扁平化选项

Source code or View on GitHub
python
def load_from_files(*files: str, no_warning: bool=False) -> dict[str, Any]:
+    """
+    从指定文件加载配置项,会自动识别文件格式
+    默认执行扁平化选项
+    """
+    config = {}
+    for file in files:
+        if os.path.exists(file):
+            if file.endswith(('.yaml', 'yml')):
+                config.update(load_from_yaml(file))
+            elif file.endswith('.json'):
+                config.update(load_from_json(file))
+            elif file.endswith('.toml'):
+                config.update(load_from_toml(file))
+            elif not no_warning:
+                logger.warning(f'Unsupported config file format: {file}')
+        elif not no_warning:
+            logger.warning(f'Config file not found: {file}')
+    return config

def load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]

Description: 从目录下加载配置文件,不递归 按照读取文件的优先级反向覆盖 默认执行扁平化选项

Source code or View on GitHub
python
def load_configs_from_dirs(*directories: str, no_waring: bool=False) -> dict[str, Any]:
+    """
+    从目录下加载配置文件,不递归
+    按照读取文件的优先级反向覆盖
+    默认执行扁平化选项
+    """
+    config = {}
+    for directory in directories:
+        if not os.path.exists(directory):
+            if not no_waring:
+                logger.warning(f'Directory not found: {directory}')
+            continue
+        for file in os.listdir(directory):
+            if file.endswith(_SUPPORTED_CONFIG_FORMATS):
+                config.update(load_from_files(os.path.join(directory, file), no_warning=no_waring))
+    return config

def load_config_in_default(no_waring: bool = False) -> dict[str, Any]

Description: 从一个标准的轻雪项目加载配置文件 项目目录下的config.*和config目录下的所有配置文件 项目目录下的配置文件优先

Source code or View on GitHub
python
def load_config_in_default(no_waring: bool=False) -> dict[str, Any]:
+    """
+    从一个标准的轻雪项目加载配置文件
+    项目目录下的config.*和config目录下的所有配置文件
+    项目目录下的配置文件优先
+    """
+    config = load_configs_from_dirs('config', no_waring=no_waring)
+    config.update(load_from_files('config.yaml', 'config.toml', 'config.json', 'config.yml', no_warning=no_waring))
+    return config
`,22),e=[h,k,p];function r(d,o,g,E,y,F){return n(),a("div",null,e)}const u=i(l,[["render",r]]);export{f as __pageData,u as default}; diff --git a/assets/en_dev_api_config.md.paJM3SZQ.lean.js b/assets/en_dev_api_config.md.paJM3SZQ.lean.js new file mode 100644 index 00000000..0848354b --- /dev/null +++ b/assets/en_dev_api_config.md.paJM3SZQ.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"en/dev/api/config.md","filePath":"en/dev/api/config.md","lastUpdated":1725101868000}'),l={name:"en/dev/api/config.md"},h=s("",4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s("",22),e=[h,k,p];function r(d,o,g,E,y,F){return n(),a("div",null,e)}const u=i(l,[["render",r]]);export{f as __pageData,u as default}; diff --git a/assets/en_dev_api_core_core.md.DspKdKLc.js b/assets/en_dev_api_core_core.md.DspKdKLc.js new file mode 100644 index 00000000..3e686739 --- /dev/null +++ b/assets/en_dev_api_core_core.md.DspKdKLc.js @@ -0,0 +1 @@ +import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"en/dev/api/core/core.md","filePath":"en/dev/api/core/core.md","lastUpdated":null}'),c={name:"en/dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),s=[i];function l(n,d,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_core_core.md.DspKdKLc.lean.js b/assets/en_dev_api_core_core.md.DspKdKLc.lean.js new file mode 100644 index 00000000..3e686739 --- /dev/null +++ b/assets/en_dev_api_core_core.md.DspKdKLc.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"en/dev/api/core/core.md","filePath":"en/dev/api/core/core.md","lastUpdated":null}'),c={name:"en/dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),s=[i];function l(n,d,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_core_index.md.Cu0gmuqG.js b/assets/en_dev_api_core_index.md.Cu0gmuqG.js new file mode 100644 index 00000000..b2698a5c --- /dev/null +++ b/assets/en_dev_api_core_index.md.Cu0gmuqG.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"en/dev/api/core/index.md","filePath":"en/dev/api/core/index.md","lastUpdated":null}'),r={name:"en/dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),n=[c];function d(s,l,p,_,u,h){return i(),a("div",null,n)}const k=t(r,[["render",d]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_core_index.md.Cu0gmuqG.lean.js b/assets/en_dev_api_core_index.md.Cu0gmuqG.lean.js new file mode 100644 index 00000000..b2698a5c --- /dev/null +++ b/assets/en_dev_api_core_index.md.Cu0gmuqG.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"en/dev/api/core/index.md","filePath":"en/dev/api/core/index.md","lastUpdated":null}'),r={name:"en/dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"​")],-1),n=[c];function d(s,l,p,_,u,h){return i(),a("div",null,n)}const k=t(r,[["render",d]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_core_manager.md.Bs82V5ER.js b/assets/en_dev_api_core_manager.md.Bs82V5ER.js new file mode 100644 index 00000000..31a32f16 --- /dev/null +++ b/assets/en_dev_api_core_manager.md.Bs82V5ER.js @@ -0,0 +1,92 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"en/dev/api/core/manager.md","filePath":"en/dev/api/core/manager.md","lastUpdated":1725101868000}'),e={name:"en/dev/api/core/manager.md"},t=n(`

liteyuki.core.manager

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午11:12 @Author : snowykami @Email : snowykami@outlook.com @File : manager.py @Software: PyCharm

class ChannelDeliver

def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])

Source code or View on GitHub
python
def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]]):
+    self.active = active
+    self.passive = passive
+    self.channel_deliver_active = channel_deliver_active
+    self.channel_deliver_passive = channel_deliver_passive
+    self.publish = publish

class ProcessManager

def __init__(self, lifespan: Lifespan)

Source code or View on GitHub
python
def __init__(self, lifespan: 'Lifespan'):
+    self.lifespan = lifespan
+    self.targets: dict[str, tuple[Callable, tuple, dict]] = {}
+    self.processes: dict[str, Process] = {}

async def _run_process(self, name: str)

Description: 开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task

Arguments:

  • name:
Source code or View on GitHub
python
async def _run_process(self, name: str):
+    """
+        开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task
+        Args:
+            name:
+        Returns:
+        """
+    if name not in self.targets:
+        raise KeyError(f'Process {name} not found.')
+    chan_active = get_channel(f'{name}-active')
+
+    def _start_process():
+        process = Process(target=self.targets[name][0], args=self.targets[name][1], kwargs=self.targets[name][2], daemon=True)
+        self.processes[name] = process
+        process.start()
+    _start_process()
+    while True:
+        data = await chan_active.async_receive()
+        if data == 0:
+            logger.info(f'Stopping process {name}')
+            await self.lifespan.before_process_shutdown()
+            self.terminate(name)
+            break
+        elif data == 1:
+            logger.info(f'Restarting process {name}')
+            await self.lifespan.before_process_shutdown()
+            await self.lifespan.before_process_restart()
+            self.terminate(name)
+            _start_process()
+            continue
+        else:
+            logger.warning('Unknown data received, ignored.')

async def start_all(self)

Description: 对外启动方法,启动所有进程,创建asyncio task

Source code or View on GitHub
python
async def start_all(self):
+    """
+        对外启动方法,启动所有进程,创建asyncio task
+        """
+    [asyncio.create_task(chan.start_receive_loop()) for chan in get_channels().values()]
+    [asyncio.create_task(sm.start_receive_loop()) for sm in [shared_memory]]
+    [asyncio.create_task(self._run_process(name)) for name in self.targets]

def add_target(self, name: str, target: TARGET_FUNC, args: tuple = (), kwargs = None)

Description: 添加进程

Arguments:

  • name: 进程名,用于获取和唯一标识
  • target: 进程函数
  • args: 进程函数参数
  • kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
Source code or View on GitHub
python
def add_target(self, name: str, target: TARGET_FUNC, args: tuple=(), kwargs=None):
+    """
+        添加进程
+        Args:
+            name: 进程名,用于获取和唯一标识
+            target: 进程函数
+            args: 进程函数参数
+            kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
+        """
+    if kwargs is None:
+        kwargs = {}
+    chan_active: Channel = Channel(name=f'{name}-active')
+    chan_passive: Channel = Channel(name=f'{name}-passive')
+    channel_deliver = ChannelDeliver(active=chan_active, passive=chan_passive, channel_deliver_active=channel_deliver_active_channel, channel_deliver_passive=channel_deliver_passive_channel, publish=publish_channel)
+    self.targets[name] = (_delivery_channel_wrapper, (target, channel_deliver, shared_memory, *args), kwargs)

def join_all(self)

Source code or View on GitHub
python
def join_all(self):
+    for name, process in self.targets:
+        process.join()

def terminate(self, name: str)

Description: 终止进程并从进程字典中删除

Arguments:

  • name:
Source code or View on GitHub
python
def terminate(self, name: str):
+    """
+        终止进程并从进程字典中删除
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.processes:
+        logger.warning(f'Process {name} not found.')
+        return
+    process = self.processes[name]
+    process.terminate()
+    process.join(TIMEOUT)
+    if process.is_alive():
+        process.kill()
+    logger.success(f'Process {name} terminated.')

def terminate_all(self)

Source code or View on GitHub
python
def terminate_all(self):
+    for name in self.targets:
+        self.terminate(name)

def is_process_alive(self, name: str) -> bool

Description: 检查进程是否存活

Arguments:

  • name:
Source code or View on GitHub
python
def is_process_alive(self, name: str) -> bool:
+    """
+        检查进程是否存活
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.targets:
+        logger.warning(f'Process {name} not found.')
+    return self.processes[name].is_alive()
`,36),l=[t];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(e,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/en_dev_api_core_manager.md.Bs82V5ER.lean.js b/assets/en_dev_api_core_manager.md.Bs82V5ER.lean.js new file mode 100644 index 00000000..ef9e36c4 --- /dev/null +++ b/assets/en_dev_api_core_manager.md.Bs82V5ER.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"en/dev/api/core/manager.md","filePath":"en/dev/api/core/manager.md","lastUpdated":1725101868000}'),e={name:"en/dev/api/core/manager.md"},t=n("",36),l=[t];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(e,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/en_dev_api_dev_dev.md.C7bp0nFK.js b/assets/en_dev_api_dev_dev.md.C7bp0nFK.js new file mode 100644 index 00000000..04e9f053 --- /dev/null +++ b/assets/en_dev_api_dev_dev.md.C7bp0nFK.js @@ -0,0 +1 @@ +import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"en/dev/api/dev/dev.md","filePath":"en/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"en/dev/api/dev/dev.md"},n=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),o=e("p",null,[e("strong",null,"Description"),t(": 该模块用于存放一些开发工具")],-1),l=[n,o];function r(c,p,v,_,u,h){return i(),d("div",null,l)}const k=a(s,[["render",r]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_dev_dev.md.C7bp0nFK.lean.js b/assets/en_dev_api_dev_dev.md.C7bp0nFK.lean.js new file mode 100644 index 00000000..04e9f053 --- /dev/null +++ b/assets/en_dev_api_dev_dev.md.C7bp0nFK.lean.js @@ -0,0 +1 @@ +import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"en/dev/api/dev/dev.md","filePath":"en/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"en/dev/api/dev/dev.md"},n=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),o=e("p",null,[e("strong",null,"Description"),t(": 该模块用于存放一些开发工具")],-1),l=[n,o];function r(c,p,v,_,u,h){return i(),d("div",null,l)}const k=a(s,[["render",r]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_dev_index.md.B_Clatcv.js b/assets/en_dev_api_dev_index.md.B_Clatcv.js new file mode 100644 index 00000000..bbe1ae4a --- /dev/null +++ b/assets/en_dev_api_dev_index.md.B_Clatcv.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as d,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"en/dev/api/dev/index.md","filePath":"en/dev/api/dev/index.md","lastUpdated":null}'),n={name:"en/dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),o=e("p",null,[e("strong",null,"Description"),t(": 该模块用于存放一些开发工具")],-1),l=[s,o];function r(c,p,_,u,v,h){return d(),i("div",null,l)}const k=a(n,[["render",r]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_dev_index.md.B_Clatcv.lean.js b/assets/en_dev_api_dev_index.md.B_Clatcv.lean.js new file mode 100644 index 00000000..bbe1ae4a --- /dev/null +++ b/assets/en_dev_api_dev_index.md.B_Clatcv.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as d,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"en/dev/api/dev/index.md","filePath":"en/dev/api/dev/index.md","lastUpdated":null}'),n={name:"en/dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"​")],-1),o=e("p",null,[e("strong",null,"Description"),t(": 该模块用于存放一些开发工具")],-1),l=[s,o];function r(c,p,_,u,v,h){return d(),i("div",null,l)}const k=a(n,[["render",r]]);export{f as __pageData,k as default}; diff --git a/assets/en_dev_api_dev_observer.md.DfB9VffK.js b/assets/en_dev_api_dev_observer.md.DfB9VffK.js new file mode 100644 index 00000000..0bd0c411 --- /dev/null +++ b/assets/en_dev_api_dev_observer.md.DfB9VffK.js @@ -0,0 +1,44 @@ +import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"en/dev/api/dev/observer.md","filePath":"en/dev/api/dev/observer.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/dev/observer.md"},t=a(`

liteyuki.dev.observer

Description: 此模块用于注册观察者函数,使用watchdog监控文件变化并重启bot 启用该模块需要在配置文件中设置dev_mode为True

var CALLBACK_FUNC

  • Description: 位置1为FileSystemEvent

  • Type: TypeAlias

  • Default: Callable[[FileSystemEvent], None]

var FILTER_FUNC

  • Description: 位置1为FileSystemEvent

  • Type: TypeAlias

  • Default: Callable[[FileSystemEvent], bool]

def debounce(wait)

Description: 防抖函数

Source code or View on GitHub
python
def debounce(wait):
+    """
+    防抖函数
+    """
+
+    def decorator(func):
+
+        def wrapper(*args, **kwargs):
+            nonlocal last_call_time
+            current_time = time.time()
+            if current_time - last_call_time > wait:
+                last_call_time = current_time
+                return func(*args, **kwargs)
+        last_call_time = None
+        return wrapper
+    return decorator

class CodeModifiedHandler(FileSystemEventHandler)

@debounce(1)

def on_modified(self, event)

Source code or View on GitHub
python
@debounce(1)
+def on_modified(self, event):
+    raise NotImplementedError('on_modified must be implemented')

def on_created(self, event)

Source code or View on GitHub
python
def on_created(self, event):
+    self.on_modified(event)

def on_deleted(self, event)

Source code or View on GitHub
python
def on_deleted(self, event):
+    self.on_modified(event)

def on_moved(self, event)

Source code or View on GitHub
python
def on_moved(self, event):
+    self.on_modified(event)

def on_any_event(self, event)

Source code or View on GitHub
python
def on_any_event(self, event):
+    self.on_modified(event)

def on_file_system_event(directories: tuple[str], recursive: bool = True, event_filter: FILTER_FUNC = None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]

Description: 注册文件系统变化监听器

Arguments:

  • directories: 监听目录们
  • recursive: 是否递归监听子目录
  • event_filter: 事件过滤器, 返回True则执行回调函数

Return: 装饰器,装饰一个函数在接收到数据后执行

Source code or View on GitHub
python
def on_file_system_event(directories: tuple[str], recursive: bool=True, event_filter: FILTER_FUNC=None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]:
+    """
+    注册文件系统变化监听器
+    Args:
+        directories: 监听目录们
+        recursive: 是否递归监听子目录
+        event_filter: 事件过滤器, 返回True则执行回调函数
+    Returns:
+        装饰器,装饰一个函数在接收到数据后执行
+    """
+
+    def decorator(func: CALLBACK_FUNC) -> CALLBACK_FUNC:
+
+        def wrapper(event: FileSystemEvent):
+            if event_filter is not None and (not event_filter(event)):
+                return
+            func(event)
+        code_modified_handler = CodeModifiedHandler()
+        code_modified_handler.on_modified = wrapper
+        for directory in directories:
+            observer.schedule(code_modified_handler, directory, recursive=recursive)
+        return func
+    return decorator
`,27),l=[t];function h(p,r,k,d,o,c){return e(),i("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_api_dev_observer.md.DfB9VffK.lean.js b/assets/en_dev_api_dev_observer.md.DfB9VffK.lean.js new file mode 100644 index 00000000..d67111ee --- /dev/null +++ b/assets/en_dev_api_dev_observer.md.DfB9VffK.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"en/dev/api/dev/observer.md","filePath":"en/dev/api/dev/observer.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/dev/observer.md"},t=a("",27),l=[t];function h(p,r,k,d,o,c){return e(),i("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_api_dev_plugin.md.dVSn90qu.js b/assets/en_dev_api_dev_plugin.md.dVSn90qu.js new file mode 100644 index 00000000..9f778026 --- /dev/null +++ b/assets/en_dev_api_dev_plugin.md.dVSn90qu.js @@ -0,0 +1,12 @@ +import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const E=JSON.parse('{"title":"liteyuki.dev.plugin","description":"","frontmatter":{"title":"liteyuki.dev.plugin"},"headers":[],"relativePath":"en/dev/api/dev/plugin.md","filePath":"en/dev/api/dev/plugin.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/dev/plugin.md"},e=t(`

liteyuki.dev.plugin

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : snowykami@outlook.com @File : plugin.py @Software: PyCharm

def run_plugins(*module_path: str | Path)

Description: 运行插件,无需手动初始化bot

Arguments:

  • module_path: 插件路径,参考liteyuki.load_plugin的函数签名
Source code or View on GitHub
python
def run_plugins(*module_path: str | Path):
+    """
+    运行插件,无需手动初始化bot
+    Args:
+        module_path: 插件路径,参考\`liteyuki.load_plugin\`的函数签名
+    """
+    cfg = load_config_in_default()
+    plugins = cfg.get('liteyuki.plugins', [])
+    plugins.extend(module_path)
+    cfg['liteyuki.plugins'] = plugins
+    bot = LiteyukiBot(**cfg)
+    bot.run()
`,8),l=[e];function p(h,k,r,o,d,u){return a(),s("div",null,l)}const c=i(n,[["render",p]]);export{E as __pageData,c as default}; diff --git a/assets/en_dev_api_dev_plugin.md.dVSn90qu.lean.js b/assets/en_dev_api_dev_plugin.md.dVSn90qu.lean.js new file mode 100644 index 00000000..3363425d --- /dev/null +++ b/assets/en_dev_api_dev_plugin.md.dVSn90qu.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const E=JSON.parse('{"title":"liteyuki.dev.plugin","description":"","frontmatter":{"title":"liteyuki.dev.plugin"},"headers":[],"relativePath":"en/dev/api/dev/plugin.md","filePath":"en/dev/api/dev/plugin.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/dev/plugin.md"},e=t("",8),l=[e];function p(h,k,r,o,d,u){return a(),s("div",null,l)}const c=i(n,[["render",p]]);export{E as __pageData,c as default}; diff --git a/assets/en_dev_api_exception.md.DTnDyb4J.js b/assets/en_dev_api_exception.md.DTnDyb4J.js new file mode 100644 index 00000000..e8855ad9 --- /dev/null +++ b/assets/en_dev_api_exception.md.DTnDyb4J.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"en/dev/api/exception.md","filePath":"en/dev/api/exception.md","lastUpdated":1725101868000}'),o={name:"en/dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"​")],-1),s=e("p",null,[e("strong",null,"Description"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"​")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_exception.md.DTnDyb4J.lean.js b/assets/en_dev_api_exception.md.DTnDyb4J.lean.js new file mode 100644 index 00000000..e8855ad9 --- /dev/null +++ b/assets/en_dev_api_exception.md.DTnDyb4J.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"en/dev/api/exception.md","filePath":"en/dev/api/exception.md","lastUpdated":1725101868000}'),o={name:"en/dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"​")],-1),s=e("p",null,[e("strong",null,"Description"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"​")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_index.md.Da9OtAtQ.js b/assets/en_dev_api_index.md.Da9OtAtQ.js new file mode 100644 index 00000000..725ad5dd --- /dev/null +++ b/assets/en_dev_api_index.md.Da9OtAtQ.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"en/dev/api/index.md","filePath":"en/dev/api/index.md","lastUpdated":null}'),o={name:"en/dev/api/index.md"},r=i('

liteyuki

var __version__

  • Description: 测试版本号

  • Default: '6.3.10'

',3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const f=e(o,[["render",l]]);export{v as __pageData,f as default}; diff --git a/assets/en_dev_api_index.md.Da9OtAtQ.lean.js b/assets/en_dev_api_index.md.Da9OtAtQ.lean.js new file mode 100644 index 00000000..99dfe05f --- /dev/null +++ b/assets/en_dev_api_index.md.Da9OtAtQ.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"en/dev/api/index.md","filePath":"en/dev/api/index.md","lastUpdated":null}'),o={name:"en/dev/api/index.md"},r=i("",3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const f=e(o,[["render",l]]);export{v as __pageData,f as default}; diff --git a/assets/en_dev_api_log.md.BD04gPQH.js b/assets/en_dev_api_log.md.BD04gPQH.js new file mode 100644 index 00000000..783078bf --- /dev/null +++ b/assets/en_dev_api_log.md.BD04gPQH.js @@ -0,0 +1,18 @@ +import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"en/dev/api/log.md","filePath":"en/dev/api/log.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/log.md"},k=h(`

liteyuki.log

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py @Software: PyCharm

def get_format(level: str) -> str

Source code or View on GitHub
python
def get_format(level: str) -> str:
+    if level == 'DEBUG':
+        return debug_format
+    else:
+        return default_format

def init_log(config: dict)

Description: 在语言加载完成后执行

Source code or View on GitHub
python
def init_log(config: dict):
+    """
+    在语言加载完成后执行
+    Returns:
+
+    """
+    logger.remove()
+    logger.add(sys.stdout, level=0, diagnose=False, format=get_format(config.get('log_level', 'INFO')))
+    show_icon = config.get('log_icon', True)
+    logger.level('DEBUG', color='<blue>', icon=f"{('🐛' if show_icon else '')}DEBUG")
+    logger.level('INFO', color='<normal>', icon=f"{('ℹ️' if show_icon else '')}INFO")
+    logger.level('SUCCESS', color='<green>', icon=f"{('✅' if show_icon else '')}SUCCESS")
+    logger.level('WARNING', color='<yellow>', icon=f"{('⚠️' if show_icon else '')}WARNING")
+    logger.level('ERROR', color='<red>', icon=f"{('⭕' if show_icon else '')}ERROR")
`,8),l=[k];function n(p,e,E,r,g,d){return a(),i("div",null,l)}const o=s(t,[["render",n]]);export{y as __pageData,o as default}; diff --git a/assets/en_dev_api_log.md.BD04gPQH.lean.js b/assets/en_dev_api_log.md.BD04gPQH.lean.js new file mode 100644 index 00000000..bdda093e --- /dev/null +++ b/assets/en_dev_api_log.md.BD04gPQH.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"en/dev/api/log.md","filePath":"en/dev/api/log.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/log.md"},k=h("",8),l=[k];function n(p,e,E,r,g,d){return a(),i("div",null,l)}const o=s(t,[["render",n]]);export{y as __pageData,o as default}; diff --git a/assets/en_dev_api_message_event.md.DkU7HnIc.js b/assets/en_dev_api_message_event.md.DkU7HnIc.js new file mode 100644 index 00000000..bab7101d --- /dev/null +++ b/assets/en_dev_api_message_event.md.DkU7HnIc.js @@ -0,0 +1,36 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"en/dev/api/message/event.md","filePath":"en/dev/api/message/event.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/message/event.md"},t=e(`

liteyuki.message.event

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class MessageEvent

def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)

Description: 轻雪抽象消息事件

Source code or View on GitHub
python
def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel['MessageEvent']]=None, data: Optional[dict[str, Any]]=None):
+    """
+        轻雪抽象消息事件
+        Args:
+
+            bot_id: 机器人ID
+            message: 消息,消息段数组[{type: str, data: dict[str, Any]}]
+            raw_message: 原始消息(通常为纯文本的格式)
+            message_type: 消息类型(private, group, other)
+
+            session_id: 会话ID(私聊通常为用户ID,群聊通常为群ID)
+            session_type: 会话类型(private, group)
+            receive_channel: 接收频道(用于回复消息)
+
+            data: 附加数据
+        """
+    if data is None:
+        data = {}
+    self.message_type = message_type
+    self.data = data
+    self.bot_id = bot_id
+    self.message = message
+    self.raw_message = raw_message
+    self.session_id = session_id
+    self.session_type = session_type
+    self.user_id = user_id
+    self.receive_channel = receive_channel

def reply(self, message: str | dict[str, Any])

Description: 回复消息

Arguments:

  • message:
Source code or View on GitHub
python
def reply(self, message: str | dict[str, Any]):
+    """
+        回复消息
+        Args:
+            message:
+        Returns:
+        """
+    reply_event = MessageEvent(message_type=self.session_type, message=message, raw_message='', data={'message': message}, bot_id=self.bot_id, session_id=self.session_id, user_id=self.user_id, session_type=self.session_type, receive_channel=None)
+    if self.receive_channel:
+        self.receive_channel.send(reply_event)
`,12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(n,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/en_dev_api_message_event.md.DkU7HnIc.lean.js b/assets/en_dev_api_message_event.md.DkU7HnIc.lean.js new file mode 100644 index 00000000..c887faad --- /dev/null +++ b/assets/en_dev_api_message_event.md.DkU7HnIc.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"en/dev/api/message/event.md","filePath":"en/dev/api/message/event.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/message/event.md"},t=e("",12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(n,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/en_dev_api_message_index.md.DEGPA3Qg.js b/assets/en_dev_api_message_index.md.DEGPA3Qg.js new file mode 100644 index 00000000..474679ba --- /dev/null +++ b/assets/en_dev_api_message_index.md.DEGPA3Qg.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"en/dev/api/message/index.md","filePath":"en/dev/api/message/index.md","lastUpdated":null}'),o={name:"en/dev/api/message/index.md"},n=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),l=e("p",null,[e("strong",null,"Description"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[n,l,r];function m(c,p,u,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_message_index.md.DEGPA3Qg.lean.js b/assets/en_dev_api_message_index.md.DEGPA3Qg.lean.js new file mode 100644 index 00000000..474679ba --- /dev/null +++ b/assets/en_dev_api_message_index.md.DEGPA3Qg.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"en/dev/api/message/index.md","filePath":"en/dev/api/message/index.md","lastUpdated":null}'),o={name:"en/dev/api/message/index.md"},n=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),l=e("p",null,[e("strong",null,"Description"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[n,l,r];function m(c,p,u,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_message_matcher.md.fjcL64M7.js b/assets/en_dev_api_message_matcher.md.fjcL64M7.js new file mode 100644 index 00000000..fcc29cc1 --- /dev/null +++ b/assets/en_dev_api_message_matcher.md.fjcL64M7.js @@ -0,0 +1,35 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"en/dev/api/message/matcher.md","filePath":"en/dev/api/message/matcher.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/message/matcher.md"},t=e(`

liteyuki.message.matcher

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:51 @Author : snowykami @Email : snowykami@outlook.com @File : matcher.py @Software: PyCharm

class Matcher

def __init__(self, rule: Rule, priority: int, block: bool)

Description: 匹配器

Arguments:

  • rule: 规则
  • priority: 优先级 >= 0
  • block: 是否阻断后续优先级更低的匹配器
Source code or View on GitHub
python
def __init__(self, rule: Rule, priority: int, block: bool):
+    """
+        匹配器
+        Args:
+            rule: 规则
+            priority: 优先级 >= 0
+            block: 是否阻断后续优先级更低的匹配器
+        """
+    self.rule = rule
+    self.priority = priority
+    self.block = block
+    self.handlers: list[EventHandler] = []

def handle(self) -> Callable[[EventHandler], EventHandler]

Description: 添加处理函数,装饰器

Return: 装饰器 handler

Source code or View on GitHub
python
def handle(self) -> Callable[[EventHandler], EventHandler]:
+    """
+        添加处理函数,装饰器
+        Returns:
+            装饰器 handler
+        """
+
+    def decorator(handler: EventHandler) -> EventHandler:
+        self.handlers.append(handler)
+        return handler
+    return decorator

async def run(self, event: MessageEvent) -> None

Description: 运行处理函数

Arguments:

  • event:
Source code or View on GitHub
python
async def run(self, event: MessageEvent) -> None:
+    """
+        运行处理函数
+        Args:
+            event:
+        Returns:
+        """
+    if not await self.rule(event):
+        return
+    for handler in self.handlers:
+        try:
+            await handler(event)
+        except Exception:
+            traceback.print_exc()
`,18),l=[t];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const E=s(n,[["render",h]]);export{y as __pageData,E as default}; diff --git a/assets/en_dev_api_message_matcher.md.fjcL64M7.lean.js b/assets/en_dev_api_message_matcher.md.fjcL64M7.lean.js new file mode 100644 index 00000000..4b297d31 --- /dev/null +++ b/assets/en_dev_api_message_matcher.md.fjcL64M7.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"en/dev/api/message/matcher.md","filePath":"en/dev/api/message/matcher.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/message/matcher.md"},t=e("",18),l=[t];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const E=s(n,[["render",h]]);export{y as __pageData,E as default}; diff --git a/assets/en_dev_api_message_message.md.D0iZgCWF.js b/assets/en_dev_api_message_message.md.D0iZgCWF.js new file mode 100644 index 00000000..e489c195 --- /dev/null +++ b/assets/en_dev_api_message_message.md.D0iZgCWF.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as i,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"en/dev/api/message/message.md","filePath":"en/dev/api/message/message.md","lastUpdated":null}'),o={name:"en/dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[s("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),r=e("p",null,[e("strong",null,"Description"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[s("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : "),e("strong",null,"init"),s(".py.py @Software: PyCharm")],-1),m=[l,r,n];function c(d,p,u,_,g,h){return i(),t("div",null,m)}const f=a(o,[["render",c]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_message_message.md.D0iZgCWF.lean.js b/assets/en_dev_api_message_message.md.D0iZgCWF.lean.js new file mode 100644 index 00000000..e489c195 --- /dev/null +++ b/assets/en_dev_api_message_message.md.D0iZgCWF.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as i,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"en/dev/api/message/message.md","filePath":"en/dev/api/message/message.md","lastUpdated":null}'),o={name:"en/dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[s("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"​")],-1),r=e("p",null,[e("strong",null,"Description"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[s("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : "),e("strong",null,"init"),s(".py.py @Software: PyCharm")],-1),m=[l,r,n];function c(d,p,u,_,g,h){return i(),t("div",null,m)}const f=a(o,[["render",c]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_message_on.md.Bpf1nKZ0.js b/assets/en_dev_api_message_on.md.Bpf1nKZ0.js new file mode 100644 index 00000000..32e5e60c --- /dev/null +++ b/assets/en_dev_api_message_on.md.Bpf1nKZ0.js @@ -0,0 +1,15 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"en/dev/api/message/on.md","filePath":"en/dev/api/message/on.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/message/on.md"},n=e(`

liteyuki.message.on

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:52 @Author : snowykami @Email : snowykami@outlook.com @File : on.py @Software: PyCharm

def add_matcher(matcher: Matcher)

Source code or View on GitHub
python
def add_matcher(matcher: Matcher):
+    for i, m in enumerate(_matcher_list):
+        if m.priority < matcher.priority:
+            _matcher_list.insert(i, matcher)
+            break
+    else:
+        _matcher_list.append(matcher)

def on_message(rule: Rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

Source code or View on GitHub
python
def on_message(rule: Rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+    matcher = Matcher(rule, priority, block)
+    add_matcher(matcher)
+    return matcher

def on_keywords(keywords: list[str], rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

Source code or View on GitHub
python
def on_keywords(keywords: list[str], rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+
+    @Rule
+    async def on_keywords_rule(event: MessageEvent):
+        return any((keyword in event.raw_message for keyword in keywords))
+    return on_message(on_keywords_rule & rule, priority, block)
`,9),l=[n];function h(r,k,p,o,d,y){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{g as __pageData,E as default}; diff --git a/assets/en_dev_api_message_on.md.Bpf1nKZ0.lean.js b/assets/en_dev_api_message_on.md.Bpf1nKZ0.lean.js new file mode 100644 index 00000000..515fe3aa --- /dev/null +++ b/assets/en_dev_api_message_on.md.Bpf1nKZ0.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"en/dev/api/message/on.md","filePath":"en/dev/api/message/on.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/message/on.md"},n=e("",9),l=[n];function h(r,k,p,o,d,y){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{g as __pageData,E as default}; diff --git a/assets/en_dev_api_message_rule.md.L6rc-HBj.js b/assets/en_dev_api_message_rule.md.L6rc-HBj.js new file mode 100644 index 00000000..a7dea55f --- /dev/null +++ b/assets/en_dev_api_message_rule.md.L6rc-HBj.js @@ -0,0 +1 @@ +import{_ as s,c as e,o as i,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.message.rule","description":"","frontmatter":{"title":"liteyuki.message.rule"},"headers":[],"relativePath":"en/dev/api/message/rule.md","filePath":"en/dev/api/message/rule.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/message/rule.md"},n=a('

liteyuki.message.rule

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:55 @Author : snowykami @Email : snowykami@outlook.com @File : rule.py @Software: PyCharm

var RuleHandlerFunc

  • Description: 规则函数签名

  • Type: TypeAlias

  • Default: Callable[[MessageEvent], Coroutine[None, None, bool]]

class Rule

def __init__(self, handler: RuleHandlerFunc)

Source code or View on GitHub
python
def __init__(self, handler: RuleHandlerFunc):\n    self.handler = handler

def __or__(self, other: Rule) -> Rule

Source code or View on GitHub
python
def __or__(self, other: 'Rule') -> 'Rule':\n\n    async def combined_handler(event: MessageEvent) -> bool:\n        return await self.handler(event) or await other.handler(event)\n    return Rule(combined_handler)

def __and__(self, other: Rule) -> Rule

Source code or View on GitHub
python
def __and__(self, other: 'Rule') -> 'Rule':\n\n    async def combined_handler(event: MessageEvent) -> bool:\n        return await self.handler(event) and await other.handler(event)\n    return Rule(combined_handler)

async def __call__(self, event: MessageEvent) -> bool

Source code or View on GitHub
python
async def __call__(self, event: MessageEvent) -> bool:\n    if self.handler is None:\n        return True\n    return await self.handler(event)

@Rule

async def empty_rule(event: MessageEvent) -> bool

Source code or View on GitHub
python
@Rule\nasync def empty_rule(event: MessageEvent) -> bool:\n    return True

@Rule

async def is_su_rule(event: MessageEvent) -> bool

Source code or View on GitHub
python
@Rule\nasync def is_su_rule(event: MessageEvent) -> bool:\n    return str(event.user_id) in _superusers
',20),l=[n];function h(r,p,k,d,o,u){return i(),e("div",null,l)}const y=s(t,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/en_dev_api_message_rule.md.L6rc-HBj.lean.js b/assets/en_dev_api_message_rule.md.L6rc-HBj.lean.js new file mode 100644 index 00000000..91baa0c5 --- /dev/null +++ b/assets/en_dev_api_message_rule.md.L6rc-HBj.lean.js @@ -0,0 +1 @@ +import{_ as s,c as e,o as i,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.message.rule","description":"","frontmatter":{"title":"liteyuki.message.rule"},"headers":[],"relativePath":"en/dev/api/message/rule.md","filePath":"en/dev/api/message/rule.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/message/rule.md"},n=a("",20),l=[n];function h(r,p,k,d,o,u){return i(),e("div",null,l)}const y=s(t,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/en_dev_api_message_session.md.DMwGauxy.js b/assets/en_dev_api_message_session.md.DMwGauxy.js new file mode 100644 index 00000000..c61961a8 --- /dev/null +++ b/assets/en_dev_api_message_session.md.DMwGauxy.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"en/dev/api/message/session.md","filePath":"en/dev/api/message/session.md","lastUpdated":1725101868000}'),o={name:"en/dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"​")],-1),r=e("p",null,[e("strong",null,"Description"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),l=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,r,l];function c(d,p,_,u,h,k){return i(),a("div",null,m)}const f=t(o,[["render",c]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_message_session.md.DMwGauxy.lean.js b/assets/en_dev_api_message_session.md.DMwGauxy.lean.js new file mode 100644 index 00000000..c61961a8 --- /dev/null +++ b/assets/en_dev_api_message_session.md.DMwGauxy.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"en/dev/api/message/session.md","filePath":"en/dev/api/message/session.md","lastUpdated":1725101868000}'),o={name:"en/dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"​")],-1),r=e("p",null,[e("strong",null,"Description"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),l=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,r,l];function c(d,p,_,u,h,k){return i(),a("div",null,m)}const f=t(o,[["render",c]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_mkdoc.md.EVvNGPKX.js b/assets/en_dev_api_mkdoc.md.EVvNGPKX.js new file mode 100644 index 00000000..d63245c7 --- /dev/null +++ b/assets/en_dev_api_mkdoc.md.EVvNGPKX.js @@ -0,0 +1,161 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.mkdoc","description":"","frontmatter":{"title":"liteyuki.mkdoc"},"headers":[],"relativePath":"en/dev/api/mkdoc.md","filePath":"en/dev/api/mkdoc.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/mkdoc.md"},h=t(`

liteyuki.mkdoc

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 上午6:23 @Author : snowykami @Email : snowykami@outlook.com @File : mkdoc.py @Software: PyCharm

class DefType(Enum)

attr FUNCTION = 'function'

attr METHOD = 'method'

attr STATIC_METHOD = 'staticmethod'

attr CLASS_METHOD = 'classmethod'

attr PROPERTY = 'property'

class FunctionInfo(BaseModel)

attr name: str = NO_DEFAULT

attr args: list[tuple[str, str]] = NO_DEFAULT

attr return_type: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr source_code: str = ''

attr type: DefType = NO_DEFAULT

attr is_async: bool = NO_DEFAULT

class AttributeInfo(BaseModel)

attr name: str = NO_DEFAULT

attr type: str = NO_DEFAULT

attr value: Any = None

attr docstring: str = ''

class ClassInfo(BaseModel)

attr name: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr methods: list[FunctionInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr inherit: list[str] = NO_DEFAULT

class ModuleInfo(BaseModel)

attr module_path: str = NO_DEFAULT

attr functions: list[FunctionInfo] = NO_DEFAULT

attr classes: list[ClassInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr docstring: str = NO_DEFAULT

def get_relative_path(base_path: str, target_path: str) -> str

Description: 获取相对路径

Arguments:

  • base_path: 基础路径
  • target_path: 目标路径
Source code or View on GitHub
python
def get_relative_path(base_path: str, target_path: str) -> str:
+    """
+    获取相对路径
+    Args:
+        base_path: 基础路径
+        target_path: 目标路径
+    """
+    return os.path.relpath(target_path, base_path)

def write_to_files(file_data: dict[str, str])

Description: 输出文件

Arguments:

  • file_data: 文件数据 相对路径
Source code or View on GitHub
python
def write_to_files(file_data: dict[str, str]):
+    """
+    输出文件
+    Args:
+        file_data: 文件数据 相对路径
+    """
+    for rp, data in file_data.items():
+        if not os.path.exists(os.path.dirname(rp)):
+            os.makedirs(os.path.dirname(rp))
+        with open(rp, 'w', encoding='utf-8') as f:
+            f.write(data)

def get_file_list(module_folder: str)

Source code or View on GitHub
python
def get_file_list(module_folder: str):
+    file_list = []
+    for root, dirs, files in os.walk(module_folder):
+        for file in files:
+            if file.endswith(('.py', '.pyi')):
+                file_list.append(os.path.join(root, file))
+    return file_list

def get_module_info_normal(file_path: str, ignore_private: bool = True) -> ModuleInfo

Description: 获取函数和类

Arguments:

  • file_path: Python 文件路径
  • ignore_private: 忽略私有函数和类

Return: 模块信息

Source code or View on GitHub
python
def get_module_info_normal(file_path: str, ignore_private: bool=True) -> ModuleInfo:
+    """
+    获取函数和类
+    Args:
+        file_path: Python 文件路径
+        ignore_private: 忽略私有函数和类
+    Returns:
+        模块信息
+    """
+    with open(file_path, 'r', encoding='utf-8') as file:
+        file_content = file.read()
+        tree = ast.parse(file_content)
+    dot_sep_module_path = file_path.replace(os.sep, '.').replace('.py', '').replace('.pyi', '')
+    module_docstring = ast.get_docstring(tree)
+    module_info = ModuleInfo(module_path=dot_sep_module_path, functions=[], classes=[], attributes=[], docstring=module_docstring if module_docstring else '')
+    for node in ast.walk(tree):
+        if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
+            if not any((isinstance(parent, ast.ClassDef) for parent in ast.iter_child_nodes(node))) and (not ignore_private or not node.name.startswith('_')):
+                if node.args.args:
+                    first_arg = node.args.args[0]
+                    if first_arg.arg in ('self', 'cls'):
+                        continue
+                function_docstring = ast.get_docstring(node)
+                func_info = FunctionInfo(name=node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in node.args.args], return_type=ast.unparse(node.returns) if node.returns else 'None', docstring=function_docstring if function_docstring else '', type=DefType.FUNCTION, is_async=isinstance(node, ast.AsyncFunctionDef), source_code=ast.unparse(node))
+                module_info.functions.append(func_info)
+        elif isinstance(node, ast.ClassDef):
+            class_docstring = ast.get_docstring(node)
+            class_info = ClassInfo(name=node.name, docstring=class_docstring if class_docstring else '', methods=[], attributes=[], inherit=[ast.unparse(base) for base in node.bases])
+            for class_node in node.body:
+                if isinstance(class_node, ast.FunctionDef) and (not ignore_private or not class_node.name.startswith('_') or class_node.name == '__init__'):
+                    method_docstring = ast.get_docstring(class_node)
+                    def_type = DefType.METHOD
+                    if class_node.decorator_list:
+                        if any((isinstance(decorator, ast.Name) and decorator.id == 'staticmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.STATIC_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'classmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.CLASS_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'property' for decorator in class_node.decorator_list)):
+                            def_type = DefType.PROPERTY
+                    class_info.methods.append(FunctionInfo(name=class_node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in class_node.args.args], return_type=ast.unparse(class_node.returns) if class_node.returns else 'None', docstring=method_docstring if method_docstring else '', type=def_type, is_async=isinstance(class_node, ast.AsyncFunctionDef), source_code=ast.unparse(class_node)))
+                elif isinstance(class_node, ast.Assign):
+                    for target in class_node.targets:
+                        if isinstance(target, ast.Name):
+                            class_info.attributes.append(AttributeInfo(name=target.id, type=ast.unparse(class_node.value)))
+            module_info.classes.append(class_info)
+        elif isinstance(node, ast.Assign):
+            if not any((isinstance(parent, (ast.ClassDef, ast.FunctionDef)) for parent in ast.iter_child_nodes(node))):
+                for target in node.targets:
+                    if isinstance(target, ast.Name) and (not ignore_private or not target.id.startswith('_')):
+                        attr_type = NO_TYPE_HINT
+                        if isinstance(node.value, ast.AnnAssign) and node.value.annotation:
+                            attr_type = ast.unparse(node.value.annotation)
+                        module_info.attributes.append(AttributeInfo(name=target.id, type=attr_type, value=ast.unparse(node.value) if node.value else None))
+    return module_info

def generate_markdown(module_info: ModuleInfo, front_matter = None, lang: str = 'zh-CN') -> str

Description: 生成模块的Markdown 你可在此自定义生成的Markdown格式

Arguments:

  • module_info: 模块信息
  • front_matter: 自定义选项title, index, icon, category
  • lang: 语言

Return: Markdown 字符串

Source code or View on GitHub
python
def generate_markdown(module_info: ModuleInfo, front_matter=None, lang: str='zh-CN') -> str:
+    """
+    生成模块的Markdown
+    你可在此自定义生成的Markdown格式
+    Args:
+        module_info: 模块信息
+        front_matter: 自定义选项title, index, icon, category
+        lang: 语言
+    Returns:
+        Markdown 字符串
+    """
+    content = ''
+    front_matter = '---\\n' + '\\n'.join([f'{k}: {v}' for k, v in front_matter.items()]) + '\\n---\\n\\n'
+    content += front_matter
+    for func in module_info.functions:
+        args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in func.args]
+        content += f"### ***{('async ' if func.is_async else '')}def*** \`{func.name}({', '.join(args_with_type)}) -> {func.return_type}\`\\n\\n"
+        func.docstring = func.docstring.replace('\\n', '\\n\\n')
+        content += f'{func.docstring}\\n\\n'
+        content += f'<details>\\n<summary>源代码</summary>\\n\\n\`\`\`python\\n{func.source_code}\\n\`\`\`\\n</details>\\n\\n'
+    for cls in module_info.classes:
+        if cls.inherit:
+            inherit = f"({', '.join(cls.inherit)})" if cls.inherit else ''
+            content += f'### ***class*** \`{cls.name}{inherit}\`\\n\\n'
+        else:
+            content += f'### ***class*** \`{cls.name}\`\\n\\n'
+        cls.docstring = cls.docstring.replace('\\n', '\\n\\n')
+        content += f'{cls.docstring}\\n\\n'
+        for method in cls.methods:
+            if method.type != DefType.METHOD:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in method.args]
+                content += f'### &emsp; ***@{method.type.value}***\\n'
+            else:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] and arg[0] != 'self' else arg[0] for arg in method.args]
+            content += f"### &emsp; ***{('async ' if method.is_async else '')}def*** \`{method.name}({', '.join(args_with_type)}) -> {method.return_type}\`\\n\\n"
+            method.docstring = method.docstring.replace('\\n', '\\n\\n')
+            content += f'&emsp;{method.docstring}\\n\\n'
+            if lang == 'zh-CN':
+                TEXT_SOURCE_CODE = '源代码'
+            else:
+                TEXT_SOURCE_CODE = 'Source Code'
+            content += f'<details>\\n<summary>{TEXT_SOURCE_CODE}</summary>\\n\\n\`\`\`python\\n{method.source_code}\\n\`\`\`\\n</details>\\n\\n'
+        for attr in cls.attributes:
+            content += f'### &emsp; ***attr*** \`{attr.name}: {attr.type}\`\\n\\n'
+    for attr in module_info.attributes:
+        if attr.type == NO_TYPE_HINT:
+            content += f'### ***var*** \`{attr.name} = {attr.value}\`\\n\\n'
+        else:
+            content += f'### ***var*** \`{attr.name}: {attr.type} = {attr.value}\`\\n\\n'
+        attr.docstring = attr.docstring.replace('\\n', '\\n\\n')
+        content += f'{attr.docstring}\\n\\n'
+    return content

def generate_docs(module_folder: str, output_dir: str, with_top: bool = False, lang: str = 'zh-CN', ignored_paths = None)

Description: 生成文档

Arguments:

  • module_folder: 模块文件夹
  • output_dir: 输出文件夹
  • with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
  • ignored_paths: 忽略的路径
  • lang: 语言
Source code or View on GitHub
python
def generate_docs(module_folder: str, output_dir: str, with_top: bool=False, lang: str='zh-CN', ignored_paths=None):
+    """
+    生成文档
+    Args:
+        module_folder: 模块文件夹
+        output_dir: 输出文件夹
+        with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
+        ignored_paths: 忽略的路径
+        lang: 语言
+    """
+    if ignored_paths is None:
+        ignored_paths = []
+    file_data: dict[str, str] = {}
+    file_list = get_file_list(module_folder)
+    shutil.rmtree(output_dir, ignore_errors=True)
+    os.mkdir(output_dir)
+    replace_data = {'__init__': 'README', '.py': '.md'}
+    for pyfile_path in file_list:
+        if any((ignored_path.replace('\\\\', '/') in pyfile_path.replace('\\\\', '/') for ignored_path in ignored_paths)):
+            continue
+        no_module_name_pyfile_path = get_relative_path(module_folder, pyfile_path)
+        rel_md_path = pyfile_path if with_top else no_module_name_pyfile_path
+        for rk, rv in replace_data.items():
+            rel_md_path = rel_md_path.replace(rk, rv)
+        abs_md_path = os.path.join(output_dir, rel_md_path)
+        module_info = get_module_info_normal(pyfile_path)
+        if 'README' in abs_md_path:
+            front_matter = {'title': module_info.module_path.replace('.__init__', '').replace('_', '\\\\n'), 'index': 'true', 'icon': 'laptop-code', 'category': 'API'}
+        else:
+            front_matter = {'title': module_info.module_path.replace('_', '\\\\n'), 'order': '1', 'icon': 'laptop-code', 'category': 'API'}
+        md_content = generate_markdown(module_info, front_matter)
+        print(f'Generate {pyfile_path} -> {abs_md_path}')
+        file_data[abs_md_path] = md_content
+    write_to_files(file_data)

var no_module_name_pyfile_path

  • Description: 去头路径

  • Default: get_relative_path(module_folder, pyfile_path)

`,65),k=[h];function l(p,e,r,E,d,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{y as __pageData,o as default}; diff --git a/assets/en_dev_api_mkdoc.md.EVvNGPKX.lean.js b/assets/en_dev_api_mkdoc.md.EVvNGPKX.lean.js new file mode 100644 index 00000000..ac1e661a --- /dev/null +++ b/assets/en_dev_api_mkdoc.md.EVvNGPKX.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.mkdoc","description":"","frontmatter":{"title":"liteyuki.mkdoc"},"headers":[],"relativePath":"en/dev/api/mkdoc.md","filePath":"en/dev/api/mkdoc.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/mkdoc.md"},h=t("",65),k=[h];function l(p,e,r,E,d,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{y as __pageData,o as default}; diff --git a/assets/en_dev_api_plugin_index.md.7EqtiaFh.js b/assets/en_dev_api_plugin_index.md.7EqtiaFh.js new file mode 100644 index 00000000..962f85ec --- /dev/null +++ b/assets/en_dev_api_plugin_index.md.7EqtiaFh.js @@ -0,0 +1,7 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugin/index.md","filePath":"en/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"en/dev/api/plugin/index.md"},n=a(`

liteyuki.plugin

def get_loaded_plugins() -> dict[str, Plugin]

Description: 获取已加载的插件

Return: dict[str, Plugin]: 插件字典

Source code or View on GitHub
python
def get_loaded_plugins() -> dict[str, Plugin]:
+    """
+    获取已加载的插件
+    Returns:
+        dict[str, Plugin]: 插件字典
+    """
+    return _plugins
`,5),l=[n];function p(d,r,o,h,u,g){return t(),s("div",null,l)}const _=i(e,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/en_dev_api_plugin_index.md.7EqtiaFh.lean.js b/assets/en_dev_api_plugin_index.md.7EqtiaFh.lean.js new file mode 100644 index 00000000..2ffc2b54 --- /dev/null +++ b/assets/en_dev_api_plugin_index.md.7EqtiaFh.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugin/index.md","filePath":"en/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"en/dev/api/plugin/index.md"},n=a("",5),l=[n];function p(d,r,o,h,u,g){return t(),s("div",null,l)}const _=i(e,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/en_dev_api_plugin_load.md.BWXzuii9.js b/assets/en_dev_api_plugin_load.md.BWXzuii9.js new file mode 100644 index 00000000..9e1b054d --- /dev/null +++ b/assets/en_dev_api_plugin_load.md.BWXzuii9.js @@ -0,0 +1,83 @@ +import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.C3o_UkTa.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"en/dev/api/plugin/load.md","filePath":"en/dev/api/plugin/load.md","lastUpdated":1725101868000}'),E={name:"en/dev/api/plugin/load.md"},d=a(`

liteyuki.plugin.load

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : snowykami@outlook.com @File : load.py @Software: PyCharm

def load_plugin(module_path: str | Path) -> Optional[Plugin]

Description: 加载单个插件,可以是本地插件或是通过 pip 安装的插件。

Arguments:

  • module_path: 插件名称 path.to.your.plugin
  • 或插件路径 pathlib.Path(path/to/your/plugin):
Source code or View on GitHub
python
def load_plugin(module_path: str | Path) -> Optional[Plugin]:
+    """加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。
+
+    参数:
+        module_path: 插件名称 \`path.to.your.plugin\`
+        或插件路径 \`pathlib.Path(path/to/your/plugin)\`
+    """
+    module_path = path_to_module_name(Path(module_path)) if isinstance(module_path, Path) else module_path
+    try:
+        module = import_module(module_path)
+        _plugins[module.__name__] = Plugin(name=module.__name__, module=module, module_name=module_path)
+        if module.__dict__.get('__plugin_metadata__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_metadata__']
+            display_name = module.__name__.split('.')[-1]
+        elif module.__dict__.get('__liteyuki_plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__liteyuki_plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        elif module.__dict__.get('__plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        else:
+            logger.opt(colors=True).warning(f'The metadata of Liteyuki plugin "{module.__name__}" is not specified, use empty.')
+            metadata = PluginMetadata(name=module.__name__)
+            display_name = module.__name__.split('.')[-1]
+        _plugins[module.__name__].metadata = metadata
+        logger.opt(colors=True).success(f'Succeeded to load liteyuki plugin "{display_name}"')
+        return _plugins[module.__name__]
+    except Exception as e:
+        logger.opt(colors=True).success(f'Failed to load liteyuki plugin "<r>{module_path}</r>"')
+        traceback.print_exc()
+        return None

def load_plugins(*plugin_dir: str, *, ignore_warning: bool = True) -> set[Plugin]

Description: 导入文件夹下多个插件

Arguments:

  • plugin_dir: 文件夹路径
  • ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
Source code or View on GitHub
python
def load_plugins(*plugin_dir: str, ignore_warning: bool=True) -> set[Plugin]:
+    """导入文件夹下多个插件
+
+    参数:
+        plugin_dir: 文件夹路径
+        ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
+    """
+    plugins = set()
+    for dir_path in plugin_dir:
+        if not os.path.exists(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' does not exist.")
+            continue
+        if not os.listdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is empty.")
+            continue
+        if not os.path.isdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is not a directory.")
+            continue
+        for f in os.listdir(dir_path):
+            path = Path(os.path.join(dir_path, f))
+            module_name = None
+            if os.path.isfile(path) and f.endswith('.py') and (f != '__init__.py'):
+                module_name = f'{path_to_module_name(Path(dir_path))}.{f[:-3]}'
+            elif os.path.isdir(path) and os.path.exists(os.path.join(path, '__init__.py')):
+                module_name = path_to_module_name(path)
+            if module_name:
+                load_plugin(module_name)
+                if _plugins.get(module_name):
+                    plugins.add(_plugins[module_name])
+    return plugins

def format_display_name(display_name: str, plugin_type: PluginType) -> str

Description: 设置插件名称颜色,根据不同类型插件设置颜色

Arguments:

  • display_name: 插件名称
  • plugin_type: 插件类型
`,17),r=i("strong",null,"Return",-1),g=a(`
Source code or View on GitHub
python
def format_display_name(display_name: str, plugin_type: PluginType) -> str:
+    """
+    设置插件名称颜色,根据不同类型插件设置颜色
+    Args:
+        display_name: 插件名称
+        plugin_type: 插件类型
+
+    Returns:
+        str: 设置后的插件名称 <y>name</y>
+    """
+    color = 'y'
+    match plugin_type:
+        case PluginType.APPLICATION:
+            color = 'm'
+        case PluginType.TEST:
+            color = 'g'
+        case PluginType.MODULE:
+            color = 'e'
+        case PluginType.SERVICE:
+            color = 'c'
+    return f'<{color}>{display_name} [{plugin_type.name}]</{color}>'
`,1);function y(F,o,u,_,C,c){const n=l("y");return e(),t("div",null,[d,i("p",null,[r,s(": str: 设置后的插件名称 "),k(n,null,{default:p(()=>[s("name")]),_:1})]),g])}const A=h(E,[["render",y]]);export{B as __pageData,A as default}; diff --git a/assets/en_dev_api_plugin_load.md.BWXzuii9.lean.js b/assets/en_dev_api_plugin_load.md.BWXzuii9.lean.js new file mode 100644 index 00000000..68423a1d --- /dev/null +++ b/assets/en_dev_api_plugin_load.md.BWXzuii9.lean.js @@ -0,0 +1 @@ +import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.C3o_UkTa.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"en/dev/api/plugin/load.md","filePath":"en/dev/api/plugin/load.md","lastUpdated":1725101868000}'),E={name:"en/dev/api/plugin/load.md"},d=a("",17),r=i("strong",null,"Return",-1),g=a("",1);function y(F,o,u,_,C,c){const n=l("y");return e(),t("div",null,[d,i("p",null,[r,s(": str: 设置后的插件名称 "),k(n,null,{default:p(()=>[s("name")]),_:1})]),g])}const A=h(E,[["render",y]]);export{B as __pageData,A as default}; diff --git a/assets/en_dev_api_plugin_manager.md.Cq1g681t.js b/assets/en_dev_api_plugin_manager.md.Cq1g681t.js new file mode 100644 index 00000000..562e8dc4 --- /dev/null +++ b/assets/en_dev_api_plugin_manager.md.Cq1g681t.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"en/dev/api/plugin/manager.md","filePath":"en/dev/api/plugin/manager.md","lastUpdated":1725101868000}'),r={name:"en/dev/api/plugin/manager.md"},o=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"​")],-1),l=e("p",null,[e("strong",null,"Description"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[o,l,s];function p(u,c,d,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",p]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_plugin_manager.md.Cq1g681t.lean.js b/assets/en_dev_api_plugin_manager.md.Cq1g681t.lean.js new file mode 100644 index 00000000..562e8dc4 --- /dev/null +++ b/assets/en_dev_api_plugin_manager.md.Cq1g681t.lean.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"en/dev/api/plugin/manager.md","filePath":"en/dev/api/plugin/manager.md","lastUpdated":1725101868000}'),r={name:"en/dev/api/plugin/manager.md"},o=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"​")],-1),l=e("p",null,[e("strong",null,"Description"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[o,l,s];function p(u,c,d,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",p]]);export{y as __pageData,f as default}; diff --git a/assets/en_dev_api_plugin_model.md.CeWxdiF_.js b/assets/en_dev_api_plugin_model.md.CeWxdiF_.js new file mode 100644 index 00000000..54bb43fd --- /dev/null +++ b/assets/en_dev_api_plugin_model.md.CeWxdiF_.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as r}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"en/dev/api/plugin/model.md","filePath":"en/dev/api/plugin/model.md","lastUpdated":1725101868000}'),o={name:"en/dev/api/plugin/model.md"},s=r('

liteyuki.plugin.model

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/24 上午12:02 @Author : snowykami @Email : snowykami@outlook.com @File : model.py @Software: PyCharm

class PluginType(Enum)

attr APPLICATION = 'application'

attr SERVICE = 'service'

attr MODULE = 'module'

attr UNCLASSIFIED = 'unclassified'

attr TEST = 'test'

class PluginMetadata(BaseModel)

attr name: str = NO_DEFAULT

attr description: str = ''

attr usage: str = ''

attr type: PluginType = PluginType.UNCLASSIFIED

attr author: str = ''

attr homepage: str = ''

attr extra: dict[str, Any] = {}

class Plugin(BaseModel)

def __hash__(self)

Source code or View on GitHub
python
def __hash__(self):\n    return hash(self.module_name)

attr model_config = {'arbitrary_types_allowed': True}

attr name: str = NO_DEFAULT

attr module: ModuleType = NO_DEFAULT

attr module_name: str = NO_DEFAULT

attr metadata: Optional[PluginMetadata] = None

',25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default}; diff --git a/assets/en_dev_api_plugin_model.md.CeWxdiF_.lean.js b/assets/en_dev_api_plugin_model.md.CeWxdiF_.lean.js new file mode 100644 index 00000000..42db6f7c --- /dev/null +++ b/assets/en_dev_api_plugin_model.md.CeWxdiF_.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as r}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"en/dev/api/plugin/model.md","filePath":"en/dev/api/plugin/model.md","lastUpdated":1725101868000}'),o={name:"en/dev/api/plugin/model.md"},s=r("",25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default}; diff --git a/assets/en_dev_api_plugin_plugin.md.C9viahSZ.js b/assets/en_dev_api_plugin_plugin.md.C9viahSZ.js new file mode 100644 index 00000000..a7325ad1 --- /dev/null +++ b/assets/en_dev_api_plugin_plugin.md.C9viahSZ.js @@ -0,0 +1,7 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugin/plugin.md","filePath":"en/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"en/dev/api/plugin/plugin.md"},e=a(`

liteyuki.plugin

def get_loaded_plugins() -> dict[str, Plugin]

Description: 获取已加载的插件

Return: dict[str, Plugin]: 插件字典

Source code or View on GitHub
python
def get_loaded_plugins() -> dict[str, Plugin]:
+    """
+    获取已加载的插件
+    Returns:
+        dict[str, Plugin]: 插件字典
+    """
+    return _plugins
`,5),l=[e];function p(d,r,o,u,h,g){return t(),s("div",null,l)}const _=i(n,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/en_dev_api_plugin_plugin.md.C9viahSZ.lean.js b/assets/en_dev_api_plugin_plugin.md.C9viahSZ.lean.js new file mode 100644 index 00000000..f23f1b5f --- /dev/null +++ b/assets/en_dev_api_plugin_plugin.md.C9viahSZ.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugin/plugin.md","filePath":"en/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"en/dev/api/plugin/plugin.md"},e=a("",5),l=[e];function p(d,r,o,u,h,g){return t(),s("div",null,l)}const _=i(n,[["render",p]]);export{c as __pageData,_ as default}; diff --git a/assets/en_dev_api_plugins_liteecho.md.w4kQQyNd.js b/assets/en_dev_api_plugins_liteecho.md.w4kQQyNd.js new file mode 100644 index 00000000..7570c6e9 --- /dev/null +++ b/assets/en_dev_api_plugins_liteecho.md.w4kQQyNd.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"en/dev/api/plugins/liteecho.md","filePath":"en/dev/api/plugins/liteecho.md","lastUpdated":1725101868000}'),a={name:"en/dev/api/plugins/liteecho.md"},l=t('

liteyuki.plugins.liteecho

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/22 下午12:31 @Author : snowykami @Email : snowykami@outlook.com @File : liteecho.py @Software: PyCharm

@on_startswith(['liteecho'], rule=is_su_rule).handle()

async def liteecho(event: MessageEvent)

Source code or View on GitHub
python
@on_startswith(['liteecho'], rule=is_su_rule).handle()\nasync def liteecho(event: MessageEvent):\n    event.reply(event.raw_message.strip()[8:].strip())
',6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_api_plugins_liteecho.md.w4kQQyNd.lean.js b/assets/en_dev_api_plugins_liteecho.md.w4kQQyNd.lean.js new file mode 100644 index 00000000..365a5465 --- /dev/null +++ b/assets/en_dev_api_plugins_liteecho.md.w4kQQyNd.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"en/dev/api/plugins/liteecho.md","filePath":"en/dev/api/plugins/liteecho.md","lastUpdated":1725101868000}'),a={name:"en/dev/api/plugins/liteecho.md"},l=t("",6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_api_plugins_plugin_loader_index.md.DYxIyTd3.js b/assets/en_dev_api_plugins_plugin_loader_index.md.DYxIyTd3.js new file mode 100644 index 00000000..7dd7c030 --- /dev/null +++ b/assets/en_dev_api_plugins_plugin_loader_index.md.DYxIyTd3.js @@ -0,0 +1,8 @@ +import{_ as i,c as s,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/plugin_loader/index.md","filePath":"en/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),l={name:"en/dev/api/plugins/plugin_loader/index.md"},e=n(`

liteyuki.plugins.plugin_loader

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

Description: 默认插件加载器,应在初始化时调用

Source code or View on GitHub
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)
`,6),t=[e];function p(r,o,h,d,k,u){return a(),s("div",null,t)}const c=i(l,[["render",p]]);export{_ as __pageData,c as default}; diff --git a/assets/en_dev_api_plugins_plugin_loader_index.md.DYxIyTd3.lean.js b/assets/en_dev_api_plugins_plugin_loader_index.md.DYxIyTd3.lean.js new file mode 100644 index 00000000..a9752570 --- /dev/null +++ b/assets/en_dev_api_plugins_plugin_loader_index.md.DYxIyTd3.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/plugin_loader/index.md","filePath":"en/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),l={name:"en/dev/api/plugins/plugin_loader/index.md"},e=n("",6),t=[e];function p(r,o,h,d,k,u){return a(),s("div",null,t)}const c=i(l,[["render",p]]);export{_ as __pageData,c as default}; diff --git a/assets/en_dev_api_plugins_plugin_loader_plugin_loader.md.CX7_cGXK.js b/assets/en_dev_api_plugins_plugin_loader_plugin_loader.md.CX7_cGXK.js new file mode 100644 index 00000000..de8c2875 --- /dev/null +++ b/assets/en_dev_api_plugins_plugin_loader_plugin_loader.md.CX7_cGXK.js @@ -0,0 +1,8 @@ +import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"en/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"en/dev/api/plugins/plugin_loader/plugin_loader.md"},e=l(`

liteyuki.plugins.plugin_loader

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

Description: 默认插件加载器,应在初始化时调用

Source code or View on GitHub
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)
`,6),t=[e];function p(r,o,h,d,k,u){return a(),s("div",null,t)}const c=i(n,[["render",p]]);export{_ as __pageData,c as default}; diff --git a/assets/en_dev_api_plugins_plugin_loader_plugin_loader.md.CX7_cGXK.lean.js b/assets/en_dev_api_plugins_plugin_loader_plugin_loader.md.CX7_cGXK.lean.js new file mode 100644 index 00000000..a0b60bc5 --- /dev/null +++ b/assets/en_dev_api_plugins_plugin_loader_plugin_loader.md.CX7_cGXK.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"en/dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"en/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"en/dev/api/plugins/plugin_loader/plugin_loader.md"},e=l("",6),t=[e];function p(r,o,h,d,k,u){return a(),s("div",null,t)}const c=i(n,[["render",p]]);export{_ as __pageData,c as default}; diff --git a/assets/en_dev_api_utils.md.D2AasRls.js b/assets/en_dev_api_utils.md.D2AasRls.js new file mode 100644 index 00000000..7f5ba236 --- /dev/null +++ b/assets/en_dev_api_utils.md.D2AasRls.js @@ -0,0 +1,70 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"en/dev/api/utils.md","filePath":"en/dev/api/utils.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/utils.md"},l=n(`

liteyuki.utils

Description: 一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改

def is_coroutine_callable(call: Callable[..., Any]) -> bool

Description: 判断是否为协程可调用对象

Arguments:

  • call: 可调用对象

Return: bool: 是否为协程可调用对象

Source code or View on GitHub
python
def is_coroutine_callable(call: Callable[..., Any]) -> bool:
+    """
+    判断是否为协程可调用对象
+    Args:
+        call: 可调用对象
+    Returns:
+        bool: 是否为协程可调用对象
+    """
+    if inspect.isroutine(call):
+        return inspect.iscoroutinefunction(call)
+    if inspect.isclass(call):
+        return False
+    func_ = getattr(call, '__call__', None)
+    return inspect.iscoroutinefunction(func_)

def run_coroutine(*coro: Coroutine)

Description: 运行协程

Arguments:

  • coro:
Source code or View on GitHub
python
def run_coroutine(*coro: Coroutine):
+    """
+    运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    try:
+        loop = asyncio.get_running_loop()
+        if loop.is_running():
+            for c in coro:
+                asyncio.ensure_future(c)
+        else:
+            for c in coro:
+                loop.run_until_complete(c)
+    except RuntimeError:
+        loop = asyncio.new_event_loop()
+        asyncio.set_event_loop(loop)
+        loop.run_until_complete(asyncio.gather(*coro))
+        loop.close()
+    except Exception as e:
+        logger.error(f'Exception occurred: {e}')

def run_coroutine_in_thread(*coro: Coroutine)

Description: 在新线程中运行协程

Arguments:

  • coro:
Source code or View on GitHub
python
def run_coroutine_in_thread(*coro: Coroutine):
+    """
+    在新线程中运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    threading.Thread(target=run_coroutine, args=coro, daemon=True).start()

def path_to_module_name(path: Path) -> str

Description: 转换路径为模块名

Arguments:

  • path: 路径a/b/c/d -> a.b.c.d

Return: str: 模块名

Source code or View on GitHub
python
def path_to_module_name(path: Path) -> str:
+    """
+    转换路径为模块名
+    Args:
+        path: 路径a/b/c/d -> a.b.c.d
+    Returns:
+        str: 模块名
+    """
+    rel_path = path.resolve().relative_to(Path.cwd().resolve())
+    if rel_path.stem == '__init__':
+        return '.'.join(rel_path.parts[:-1])
+    else:
+        return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]

Description: 异步包装器

Arguments:

  • func: Sync Callable

Return: Coroutine: Asynchronous Callable

Source code or View on GitHub
python
def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]:
+    """
+    异步包装器
+    Args:
+        func: Sync Callable
+    Returns:
+        Coroutine: Asynchronous Callable
+    """
+
+    async def wrapper(*args, **kwargs):
+        return func(*args, **kwargs)
+    wrapper.__signature__ = inspect.signature(func)
+    return wrapper
`,30),e=[l];function p(h,k,r,o,d,E){return a(),i("div",null,e)}const u=s(t,[["render",p]]);export{g as __pageData,u as default}; diff --git a/assets/en_dev_api_utils.md.D2AasRls.lean.js b/assets/en_dev_api_utils.md.D2AasRls.lean.js new file mode 100644 index 00000000..942c1642 --- /dev/null +++ b/assets/en_dev_api_utils.md.D2AasRls.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"en/dev/api/utils.md","filePath":"en/dev/api/utils.md","lastUpdated":1725101868000}'),t={name:"en/dev/api/utils.md"},l=n("",30),e=[l];function p(h,k,r,o,d,E){return a(),i("div",null,e)}const u=s(t,[["render",p]]);export{g as __pageData,u as default}; diff --git a/assets/en_dev_comm.md.Cn-onW1y.js b/assets/en_dev_comm.md.Cn-onW1y.js new file mode 100644 index 00000000..33d74bb0 --- /dev/null +++ b/assets/en_dev_comm.md.Cn-onW1y.js @@ -0,0 +1,43 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"en/dev/comm.md","filePath":"en/dev/comm.md","lastUpdated":1725102337000}'),e={name:"en/dev/comm.md"},t=n(`

Channel Communication

Introduction

LiteyukiBot is running in the main process MainProcess, and other plugin framework processes are child processes that come with it. Therefore, it is impossible to communicate through shared memory and direct object transfer. Liteyuki provides a channel Channel for inter-process communication like go. You can send messages to other processes through Channel and listen to messages from other processes.

Example

The channel is full-duplex, with two receiving modes, but only one mode can be used for a channel, that is, passive mode and active mode, passive mode is implemented by the chan.on_receive() decorator callback function, and active mode needs to call chan.receive() to implement

  • 创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为{process_name}-active{process_name}-passive
  • 主进程中通过get_channel函数获取通道对象
  • 子进程中导入单例active_channelpassive_channel即可

在轻雪插件中(主进程中)

python
import asyncio
+
+from liteyuki.comm import get_channel, Channel
+from liteyuki import get_bot
+
+# get_channel函数获取通道对象,参数为调用set_channel时的通道标识
+channel_passive = get_channel("nonebot-passive")  # 获取被动通道
+channel_active = get_channel("nonebot-active")  # 获取主动通道
+liteyuki_bot = get_bot()
+
+
+# 注册一个函数在轻雪启动后运行
+@liteyuki_bot.on_after_start
+async def send_data():
+    while True:
+        channel_passive.send("I am liteyuki main process passive")
+        channel_active.send("I am liteyuki main process active")
+        await asyncio.sleep(3)  # 每3秒发送一次消息

在子进程中(例如NoneBot插件中)

python
from nonebot import get_driver
+from liteyuki.comm import active_channel, passive_channel  # 子进程中获取通道直接导入进程全局单例即可
+from liteyuki.log import logger
+
+driver = get_driver()
+
+
+# 被动模式,通过装饰器注册一个函数在接收到消息时运行,每次接收到字符串数据时都会运行
+@passive_channel.on_receive(filter_func=lambda data: isinstance(data, str))
+async def on_passive_receive(data):
+    logger.info(f"Passive receive: {data}")
+
+
+# 注册一个函数在NoneBot启动后运行
+@driver.on_startup
+def on_startup():
+    while True:
+        data = active_channel.receive()
+        logger.info(f"Active receive: {data}")

启动后控制台输出

log
0000-00-00 00:00:00 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:00 [ℹ️信息] Active receive: I am liteyuki main process active
+0000-00-00 00:00:03 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:03 [ℹ️信息] Active receive: I am liteyuki main process active
+...

共享内存通信

简介

  • 相比于普通进程通信,内存共享使得代码编写更加简洁,轻雪框架提供了一个内存共享通信的接口,你可以通过storage模块实现内存共享通信,该模块封装通道实现
  • 内存共享是线程安全的,你可以在多个线程中读写共享内存,线程锁会自动保护共享内存的读写操作

示例

在任意进程中均可使用

python
from liteyuki.comm.storage import shared_memory
+
+shared_memory.set("key", "value")  # 设置共享内存
+value = shared_memory.get("key")  # 获取共享内存

源代码:liteyuki/comm/storage.py

`,19),l=[t];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const y=s(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_comm.md.Cn-onW1y.lean.js b/assets/en_dev_comm.md.Cn-onW1y.lean.js new file mode 100644 index 00000000..386a376d --- /dev/null +++ b/assets/en_dev_comm.md.Cn-onW1y.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"en/dev/comm.md","filePath":"en/dev/comm.md","lastUpdated":1725102337000}'),e={name:"en/dev/comm.md"},t=n("",19),l=[t];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const y=s(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/en_dev_lyfunc.md.C5K1_qgM.js b/assets/en_dev_lyfunc.md.C5K1_qgM.js new file mode 100644 index 00000000..58098ca6 --- /dev/null +++ b/assets/en_dev_lyfunc.md.C5K1_qgM.js @@ -0,0 +1,20 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"en/dev/lyfunc.md","filePath":"en/dev/lyfunc.md","lastUpdated":1725102337000}'),t={name:"en/dev/lyfunc.md"},l=n(`

轻雪函数

轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.

函数文件

函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.mcfunction,文件内容为一系列的命令,每行一个命令,支持单行注释#(编辑时的语法高亮可采取shell格式),例如:

shell
# 在发信器输出"hello world"
+cmd echo hello world
+
+# 如果你想同时输出多行内容可以尝试换行符(Python格式)
+cmd echo hello world\\nLiteyuki bot

也支持句末注释,例如:

shell
cmd echo hello world # 输出"hello world"

命令文档

shell
var <var1=value1> [var2=value2] ...  # 定义变量
+cmd <command>  # 在设备上执行命令
+api <api_name> [var=value...]  # 调用Bot API
+function <func_name> # 调用函数,可递归
+sleep <time>  # 异步等待,单位s
+nohup <command>  # 使用新的task执行命令,即不等待
+end # 结束函数关键字,包括子task
+await # 等待所有异步任务结束,若函数中启动了其他task,需要在最后调用,否则task对象会被销毁

示例

shell
# 疯狂戳好友
+# 使用 /function poke user_id=123456 执行
+# 每隔0.2s戳两次,无限戳,会触发最大递归深度限制
+# 若要戳20s后停止,则需要删除await,添加sleep 20和end
+api friend_poke user_id=user_id
+api friend_poke user_id=user_id
+sleep 0.2
+nohup function poke
+await

API

理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.

Onebot v11 API文档

结束关键字

由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.

await 异步任务结束关键字,用于结束当前已完成function的执行

WARNING

但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁

TIP

编写轻雪函数推荐你使用VS Code插件Liteyuki Function实现语法高亮

`,19),e=[l];function h(p,k,d,r,o,c){return a(),i("div",null,e)}const y=s(t,[["render",h]]);export{F as __pageData,y as default}; diff --git a/assets/en_dev_lyfunc.md.C5K1_qgM.lean.js b/assets/en_dev_lyfunc.md.C5K1_qgM.lean.js new file mode 100644 index 00000000..96d6f6e0 --- /dev/null +++ b/assets/en_dev_lyfunc.md.C5K1_qgM.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"en/dev/lyfunc.md","filePath":"en/dev/lyfunc.md","lastUpdated":1725102337000}'),t={name:"en/dev/lyfunc.md"},l=n("",19),e=[l];function h(p,k,d,r,o,c){return a(),i("div",null,e)}const y=s(t,[["render",h]]);export{F as __pageData,y as default}; diff --git a/assets/en_dev_plugin.md.Xb7vUDpJ.js b/assets/en_dev_plugin.md.Xb7vUDpJ.js new file mode 100644 index 00000000..d95d0591 --- /dev/null +++ b/assets/en_dev_plugin.md.Xb7vUDpJ.js @@ -0,0 +1,32 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"轻雪插件开发","description":"","frontmatter":{"title":"轻雪插件开发","order":3},"headers":[],"relativePath":"en/dev/plugin.md","filePath":"en/dev/plugin.md","lastUpdated":1725102337000}'),t={name:"en/dev/plugin.md"},h=n(`

简介

轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能

开始

创建插件

一个.py文件或一个包含__init__.py的文件夹即可被识别为插件

首先创建一个文件夹,例如watchdog_plugin,并在其中创建一个__init__.py文件,即可创建一个插件

__init__.py

python
from liteyuki.plugin import PluginMetadata, PluginType
+from .watch_dog import *    # 导入逻辑部分
+
+# 定义插件元数据
+__plugin_meta__ = PluginMetadata(
+    name="NoneDog",  # 插件名称
+    version="1.0.0",  # 插件版本
+    description="A simple plugin for nonebot developer",  # 插件描述
+    type=PluginType.SERVICE  # 插件类型
+)
+
+# 你的插件代码
+...

编写逻辑部分

轻雪主进程不涉及聊天部分,因此插件主要是一些后台任务或者与聊天机器人的通信 以下我们会编写一个简单的插件,用于开发NoneBot时进行文件系统变更重载 watch_dog.py

python
import os
+from liteyuki.dev import observer  # 导入文件系统观察器
+from liteyuki import get_bot, logger  # 导入轻雪Bot和日志
+from watchdog.events import FileSystemEvent  # 导入文件系统事件
+
+liteyuki = get_bot()  # 获取唯一的轻雪Bot实例
+
+exclude_extensions = (".pyc", ".pyo")  # 排除的文件扩展名
+
+
+# 用observer的on_file_system_event装饰器监听文件系统事件
+@observer.on_file_system_event(
+    directories=("src/nonebot_plugins",),
+    event_filter=lambda event: not event.src_path.endswith(exclude_extensions) and ("__pycache__" not in event.src_path) and os.path.isfile(event.src_path)
+)
+def restart_nonebot_process(event: FileSystemEvent):
+    logger.debug(f"File {event.src_path} changed, reloading nonebot...")
+    liteyuki.restart_process("nonebot")  # 调用重启进程方法

加载插件

方法1

  • 在配置文件中的liteyuki.plugins中添加你的插件路径,例如watchdog_plugin,重启轻雪即可加载插件。

方法2

  • 使用开发工具快速运行插件,无需手动创建实例
  • 创建入口文件,例如main.py,并在其中写入以下代码
python
from liteyuki.dev.plugin import run_plugins
+
+run_plugins("watchdog_plugin")

然后运行python main.py即可启动插件

启用插件后,我们在src/nonebot_plugins下创建一个文件,例如test.py,并在其中写入一些代码,保存后轻雪会自动重载NoneBot进程

`,19),l=[h];function p(e,k,d,r,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/en_dev_plugin.md.Xb7vUDpJ.lean.js b/assets/en_dev_plugin.md.Xb7vUDpJ.lean.js new file mode 100644 index 00000000..bc639f53 --- /dev/null +++ b/assets/en_dev_plugin.md.Xb7vUDpJ.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"轻雪插件开发","description":"","frontmatter":{"title":"轻雪插件开发","order":3},"headers":[],"relativePath":"en/dev/plugin.md","filePath":"en/dev/plugin.md","lastUpdated":1725102337000}'),t={name:"en/dev/plugin.md"},h=n("",19),l=[h];function p(e,k,d,r,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/en_dev_resource.md.CYdCh9wj.js b/assets/en_dev_resource.md.CYdCh9wj.js new file mode 100644 index 00000000..7077fb6d --- /dev/null +++ b/assets/en_dev_resource.md.CYdCh9wj.js @@ -0,0 +1,13 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"资源包开发","description":"","frontmatter":{"title":"资源包开发","order":1},"headers":[],"relativePath":"en/dev/resource.md","filePath":"en/dev/resource.md","lastUpdated":1725102337000}'),l={name:"en/dev/resource.md"},t=e(`

简介

资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码

  • 资源/主题商店提供了一些资源包供你选择,你也可以自己制作资源包
  • 资源包的制作很简单,如果你接触过Minecraft的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
  • 部分内容制作需要一点点前端基础,例如htmlcss
  • 轻雪原版资源包请查看LiteyukiBot/liteyuki/resources,可以在此基础上进行修改
  • 欢迎各位投稿资源包到轻雪资源商店

请注意,主题包中的html渲染使用Js来规定数据的渲染位置,请确保您所编写的html代码能被Bot解析,否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码,以避免出现无法预料的问题。


加载资源包

  • 资源包通常是以.zip格式压缩的,只需要将其解压到根目录resources目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
shell
main.py
+resources
+└─resource_pack_1
+    ├─metadata.yml
+    ├─templates
+    └───...
+└─resource_pack_2
+    ├─metadata.yml
+    └─...
  • 你自己制作的资源包也应该遵循这个规则,并且应该在metadata.yml中填写一些信息
  • 若没有metadata.yml文件,则该文件夹不会被识别为资源包
yaml
name: "资源包名称"
+version: "1.0.0"
+description: "资源包描述"
+# 你可以自定义一些信息,但请保证以上三个字段
+...
  • 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个index.html文件,B包也定义了一个index.html文件,那么加载B包后,A包中的index.html文件会被覆盖
  • 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了templates/index.html,在B中定义了templates/style.css,可以在A的index.html中用./style.css相对路径引用B中的css

TIP

资源包的结构会随着轻雪的更新而有变动,第三方资源包开发者需要注意版本兼容性,同时用户也应该自行选择可用的资源包

`,12),n=[t];function p(c,d,h,o,r,k){return i(),a("div",null,n)}const y=s(l,[["render",p]]);export{m as __pageData,y as default}; diff --git a/assets/en_dev_resource.md.CYdCh9wj.lean.js b/assets/en_dev_resource.md.CYdCh9wj.lean.js new file mode 100644 index 00000000..64bd48b0 --- /dev/null +++ b/assets/en_dev_resource.md.CYdCh9wj.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"资源包开发","description":"","frontmatter":{"title":"资源包开发","order":1},"headers":[],"relativePath":"en/dev/resource.md","filePath":"en/dev/resource.md","lastUpdated":1725102337000}'),l={name:"en/dev/resource.md"},t=e("",12),n=[t];function p(c,d,h,o,r,k){return i(),a("div",null,n)}const y=s(l,[["render",p]]);export{m as __pageData,y as default}; diff --git a/assets/en_index.md.DVQGNFEI.js b/assets/en_index.md.DVQGNFEI.js new file mode 100644 index 00000000..b1245a9d --- /dev/null +++ b/assets/en_index.md.DVQGNFEI.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as i}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"LiteyukiBot","text":"Litedoc","tagline":"An integrated chat bot application and management framework","actions":[{"theme":"brand","text":"Get Started","link":"./deploy/install"},{"theme":"alt","text":"Manual","link":"./usage/basic_command"},{"theme":"alt","text":"Extensions","link":"./store/"}],"image":{"src":"/liteyuki.svg","alt":"Liteyuki Logo"}},"features":[{"title":"Supports Multiple Frameworks","icon":"🛠️","details":"Based on the liteyuki framework, compatible with nonebot, melobot, etc., with good ecological support","link":"./dev/api/api"},{"title":"Plugin Management","icon":"🧩","details":"Use package manager for convenient management of plugins and resource packs","link":"./store/plugin"},{"title":"Theme Support","icon":"🎨","details":"Fully customize the appearance using resource packs","link":"./store/resource"},{"title":"Internationalization","icon":"🌐","details":"Support for multiple languages through resource packs","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"Easy to Use","icon":"⚙️","details":"No complicated pre-process, ready to use out of the box","link":"./deploy/config"},{"title":"Ultra-high Performance","icon":"🏎️","details":"500 plugins, starts within 2 seconds"},{"title":"Rolling Updates","icon":"☁️","details":"Keep your robot up to date with the latest commits"},{"title":"Open Source Project","icon":"💻","details":"The project follows the MIT LICENSE and is open to contributions","link":"https://github.com/LiteyukiStudio/LiteyukiBot"}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1725101868000}'),o={name:"en/index.md"};function a(n,s,l,r,c,p){return i(),t("div")}const m=e(o,[["render",a]]);export{u as __pageData,m as default}; diff --git a/assets/en_index.md.DVQGNFEI.lean.js b/assets/en_index.md.DVQGNFEI.lean.js new file mode 100644 index 00000000..b1245a9d --- /dev/null +++ b/assets/en_index.md.DVQGNFEI.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as i}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"LiteyukiBot","text":"Litedoc","tagline":"An integrated chat bot application and management framework","actions":[{"theme":"brand","text":"Get Started","link":"./deploy/install"},{"theme":"alt","text":"Manual","link":"./usage/basic_command"},{"theme":"alt","text":"Extensions","link":"./store/"}],"image":{"src":"/liteyuki.svg","alt":"Liteyuki Logo"}},"features":[{"title":"Supports Multiple Frameworks","icon":"🛠️","details":"Based on the liteyuki framework, compatible with nonebot, melobot, etc., with good ecological support","link":"./dev/api/api"},{"title":"Plugin Management","icon":"🧩","details":"Use package manager for convenient management of plugins and resource packs","link":"./store/plugin"},{"title":"Theme Support","icon":"🎨","details":"Fully customize the appearance using resource packs","link":"./store/resource"},{"title":"Internationalization","icon":"🌐","details":"Support for multiple languages through resource packs","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"Easy to Use","icon":"⚙️","details":"No complicated pre-process, ready to use out of the box","link":"./deploy/config"},{"title":"Ultra-high Performance","icon":"🏎️","details":"500 plugins, starts within 2 seconds"},{"title":"Rolling Updates","icon":"☁️","details":"Keep your robot up to date with the latest commits"},{"title":"Open Source Project","icon":"💻","details":"The project follows the MIT LICENSE and is open to contributions","link":"https://github.com/LiteyukiStudio/LiteyukiBot"}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1725101868000}'),o={name:"en/index.md"};function a(n,s,l,r,c,p){return i(),t("div")}const m=e(o,[["render",a]]);export{u as __pageData,m as default}; diff --git a/assets/en_store_plugin.md.DceXsbsh.js b/assets/en_store_plugin.md.DceXsbsh.js new file mode 100644 index 00000000..3d1ff77f --- /dev/null +++ b/assets/en_store_plugin.md.DceXsbsh.js @@ -0,0 +1 @@ +import{_ as t,D as o,c as n,I as r,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"插件商店","description":"","frontmatter":{"title":"插件商店","order":2},"headers":[],"relativePath":"en/store/plugin.md","filePath":"en/store/plugin.md","lastUpdated":1725101868000}'),s={name:"en/store/plugin.md"};function p(c,l,i,d,m,_){const e=o("pluginStoreComp");return a(),n("div",null,[r(e)])}const g=t(s,[["render",p]]);export{f as __pageData,g as default}; diff --git a/assets/en_store_plugin.md.DceXsbsh.lean.js b/assets/en_store_plugin.md.DceXsbsh.lean.js new file mode 100644 index 00000000..3d1ff77f --- /dev/null +++ b/assets/en_store_plugin.md.DceXsbsh.lean.js @@ -0,0 +1 @@ +import{_ as t,D as o,c as n,I as r,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"插件商店","description":"","frontmatter":{"title":"插件商店","order":2},"headers":[],"relativePath":"en/store/plugin.md","filePath":"en/store/plugin.md","lastUpdated":1725101868000}'),s={name:"en/store/plugin.md"};function p(c,l,i,d,m,_){const e=o("pluginStoreComp");return a(),n("div",null,[r(e)])}const g=t(s,[["render",p]]);export{f as __pageData,g as default}; diff --git a/assets/en_store_resource.md.DwD3Poel.js b/assets/en_store_resource.md.DwD3Poel.js new file mode 100644 index 00000000..065eca32 --- /dev/null +++ b/assets/en_store_resource.md.DwD3Poel.js @@ -0,0 +1 @@ +import{_ as r,D as o,c as t,I as s,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"资源商店","description":"","frontmatter":{"title":"资源商店","order":1},"headers":[],"relativePath":"en/store/resource.md","filePath":"en/store/resource.md","lastUpdated":1725101868000}'),c={name:"en/store/resource.md"};function n(p,d,m,_,l,i){const e=o("resourceStoreComp");return a(),t("div",null,[s(e)])}const h=r(c,[["render",n]]);export{f as __pageData,h as default}; diff --git a/assets/en_store_resource.md.DwD3Poel.lean.js b/assets/en_store_resource.md.DwD3Poel.lean.js new file mode 100644 index 00000000..065eca32 --- /dev/null +++ b/assets/en_store_resource.md.DwD3Poel.lean.js @@ -0,0 +1 @@ +import{_ as r,D as o,c as t,I as s,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"资源商店","description":"","frontmatter":{"title":"资源商店","order":1},"headers":[],"relativePath":"en/store/resource.md","filePath":"en/store/resource.md","lastUpdated":1725101868000}'),c={name:"en/store/resource.md"};function n(p,d,m,_,l,i){const e=o("resourceStoreComp");return a(),t("div",null,[s(e)])}const h=r(c,[["render",n]]);export{f as __pageData,h as default}; diff --git a/assets/en_usage_agreement.md.DzIdKK2Q.js b/assets/en_usage_agreement.md.DzIdKK2Q.js new file mode 100644 index 00000000..8eff5a72 --- /dev/null +++ b/assets/en_usage_agreement.md.DzIdKK2Q.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.C3o_UkTa.js";const h=JSON.parse('{"title":"用户协议","description":"","frontmatter":{"title":"用户协议","order":3},"headers":[],"relativePath":"en/usage/agreement.md","filePath":"en/usage/agreement.md","lastUpdated":1725101868000}'),l={name:"en/usage/agreement.md"},i=o('

用户协议

  1. 本项目遵循MIT协议,你可以自由使用,修改,分发,但是请保留原作者信息
  2. 你可以选择开启auto_report(默认开启),轻雪会收集以下内容
    • 运行环境的设备信息:CPU,内存,系统信息及Python信息
    • 插件信息(不含插件数据)
    • 部分异常信息,
    • 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把auto_report设定为false
  3. 本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性
  4. 使用此项目代表你已经同意以上协议
',2),r=[i];function c(n,_,s,d,m,p){return a(),t("div",null,r)}const f=e(l,[["render",c]]);export{h as __pageData,f as default}; diff --git a/assets/en_usage_agreement.md.DzIdKK2Q.lean.js b/assets/en_usage_agreement.md.DzIdKK2Q.lean.js new file mode 100644 index 00000000..fe46c48e --- /dev/null +++ b/assets/en_usage_agreement.md.DzIdKK2Q.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.C3o_UkTa.js";const h=JSON.parse('{"title":"用户协议","description":"","frontmatter":{"title":"用户协议","order":3},"headers":[],"relativePath":"en/usage/agreement.md","filePath":"en/usage/agreement.md","lastUpdated":1725101868000}'),l={name:"en/usage/agreement.md"},i=o("",2),r=[i];function c(n,_,s,d,m,p){return a(),t("div",null,r)}const f=e(l,[["render",c]]);export{h as __pageData,f as default}; diff --git a/assets/en_usage_basic.md.CxkJTStx.js b/assets/en_usage_basic.md.CxkJTStx.js new file mode 100644 index 00000000..e18ebff2 --- /dev/null +++ b/assets/en_usage_basic.md.CxkJTStx.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as d,a4 as l}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"基础插件","description":"","frontmatter":{"title":"基础插件","order":1},"headers":[],"relativePath":"en/usage/basic.md","filePath":"en/usage/basic.md","lastUpdated":1725101868000}'),n={name:"en/usage/basic.md"},r=l('

基础插件


TIP

参数<param>为必填参数,[option]为可选参数。

命令别名:配置了命令别名的命令可以使用别名代替原命令,例如npm install ~可以使用插件 安装 ~代替。

轻雪命令liteyuki_command

命令说明权限举例可用参数
reload-liteyuki重载轻雪超级用户
update-liteyuki更新轻雪超级用户
liteecho查看当前bot 版本超级用户
status查看统计信息和状态超级用户
config set <key> value添加配置项,若存在则会覆盖,输入值会被执行以转换为正确的类型,"10"和10是不一样的超级用户config set name 'liteyuki-bot'<key>: 若存在则覆盖, 若不存在则创建于config.yml ; value: yml格式的所有合法内容
config get [key] 查询配置项,不带key返回配置项列表,推荐私聊使用超级用户config get name<key>: 若存在则返回, 若不存在则返回空
switch-image-mode 在普通图片和Markdown大图之间切换,该功能需要commit:505468b及以后的Lagrange.OneBot,默认普通图片超级用户switch-image-mode
/api api_name [args] 调用机器人API超级用户/api get_group_member_list group_id=1234567<args>: 参数列表, 格式为onebot v11协议api, 可用%20代替空格
/function function_name [args] [kwargs] 调用机器人函数(.lyfunction语法)超级用户/function send_group_msg group_id=1234567 message='hello'<args><kwargs>: 参数列表, api格式为onebot v11协议api
group enable/disable [group_id]在群聊启用/停用机器人,group_id仅超级用户可用超级用户,群聊仅群主、管理员、超级用户可用group enable 1145141919810<group_id>: 群号
liteyuki-docs查看轻雪文档所有人

命令别名

命令别名
status状态
reload-liteyuki重启轻雪
update-liteyuki更新轻雪
reload-resources重载资源
config配置, set 设置 / get 查询
switch-image-mode切换图片模式
liteyuki-docs轻雪文档
group群聊, enable 启用 / disable 停用

插件/包管理器 liteyuki_pacman

  • 插件管理
命令说明权限
npm update更新插件商店索引超级用户
npm install <plugin_name>安装插件超级用户
npm uninstall <plugin_name>卸载插件超级用户
npm search <keywords...>通过关键词搜索插件超级用户
npm enable-global/disable-global <plugin_name>全局启用/停用插件超级用户
npm enable/disable <plugin_name> [--group <group_id>]当前会话启用/停用插件群聊仅群主、管理员、超级用户可用,私聊所有人可用
npm list [page] [num]列出所有插件 page为页数,num为每页显示数量群聊仅群主、管理员、超级用户可用,私聊所有人可用
help <plugin_name>查看插件帮助所有人
  • 资源包管理
命令说明权限
rpm list [page] [num]列出所有资源包 page为页数,num为每页显示数量超级用户
rpm load <pack_name>加载资源包超级用户
rpm unload <pack_name>卸载资源包超级用户
rpm change <pack_name>修改优先级超级用户
rpm reload重载所有资源包超级用户

命令别名

命令别名
npm插件管理
update更新
install安装
uninstall卸载
search搜索
enable启用
disable停用
enable-global全局启用
disable-global全局停用
rpm资源包
load加载
unload卸载
change更改
reload重载
list列表
help帮助

WARNING

受限于NoneBot2钩子函数的依赖注入参数,插件停用只能阻断传入响应,对于主动推送的插件不生效,请阅读插件主页的说明。


用户管理liteyuki_user

命令说明权限
profile查看用户信息菜单所有人
profile set <key> [value]设置用户信息或打开属性设置菜单所有人
profile get <key>获取用户信息所有人

###命令别名

命令别名
profile个人信息
set设置
get查询
',22),a=[r];function c(i,s,o,g,y,x){return d(),e("div",null,a)}const p=t(n,[["render",c]]);export{u as __pageData,p as default}; diff --git a/assets/en_usage_basic.md.CxkJTStx.lean.js b/assets/en_usage_basic.md.CxkJTStx.lean.js new file mode 100644 index 00000000..6d46861b --- /dev/null +++ b/assets/en_usage_basic.md.CxkJTStx.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as d,a4 as l}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"基础插件","description":"","frontmatter":{"title":"基础插件","order":1},"headers":[],"relativePath":"en/usage/basic.md","filePath":"en/usage/basic.md","lastUpdated":1725101868000}'),n={name:"en/usage/basic.md"},r=l("",22),a=[r];function c(i,s,o,g,y,x){return d(),e("div",null,a)}const p=t(n,[["render",c]]);export{u as __pageData,p as default}; diff --git a/assets/en_usage_extra.md.CHJ4PN4s.js b/assets/en_usage_extra.md.CHJ4PN4s.js new file mode 100644 index 00000000..dde36965 --- /dev/null +++ b/assets/en_usage_extra.md.CHJ4PN4s.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as s,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"功能命令","description":"","frontmatter":{"title":"功能命令","order":2},"headers":[],"relativePath":"en/usage/extra.md","filePath":"en/usage/extra.md","lastUpdated":1725101868000}'),a={name:"en/usage/extra.md"},l=i('

功能插件命令

轻雪天气liteyuki_weather

查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。

配置项

yaml
weather_key: "" # 和风天气的天气key,会自动判断key版本

命令

shell
weather <keywords...> # Keywords为城市名,支持中英文

查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"

shell
bind-city <keywords...> # Keywords为城市名,支持中英文

绑定查询城市,个人全局生效

命令别名

命令别名
weather天气
bind-city绑定城市

统计信息liteyuki_statistics

统计信息 命令

shell
statistic message --duration <duration> --period <period> --group [current|group_id] --bot [current|bot_id]

功能: 用于统计Bot接收到的消息, 统计周期为period, 统计时间范围为duration

参数格式
duration使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
period使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
groupcurrent (当前群聊) 或 group_id (QQ群号)
botcurrent (当前Bot) 或 bot_id

命令别名

命令别名
statisticstat
messagem
--duration-d
--period`-p
--group-g
--bot-b
currentc
',20),d=[l];function n(h,r,o,p,c,k){return s(),e("div",null,d)}const u=t(a,[["render",n]]);export{y as __pageData,u as default}; diff --git a/assets/en_usage_extra.md.CHJ4PN4s.lean.js b/assets/en_usage_extra.md.CHJ4PN4s.lean.js new file mode 100644 index 00000000..a07d1120 --- /dev/null +++ b/assets/en_usage_extra.md.CHJ4PN4s.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as s,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"功能命令","description":"","frontmatter":{"title":"功能命令","order":2},"headers":[],"relativePath":"en/usage/extra.md","filePath":"en/usage/extra.md","lastUpdated":1725101868000}'),a={name:"en/usage/extra.md"},l=i("",20),d=[l];function n(h,r,o,p,c,k){return s(),e("div",null,d)}const u=t(a,[["render",n]]);export{y as __pageData,u as default}; diff --git a/assets/index.md.CQL2AFxv.js b/assets/index.md.CQL2AFxv.js new file mode 100644 index 00000000..0fdad09d --- /dev/null +++ b/assets/index.md.CQL2AFxv.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as i}from"./chunks/framework.C3o_UkTa.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"轻雪机器人","text":"文档","tagline":"一个综合性的机器人应用及管理框架","actions":[{"theme":"brand","text":"快速开始","link":"./deploy/install"},{"theme":"alt","text":"使用手册","link":"./usage/basic_command"},{"theme":"alt","text":"扩展","link":"./store/resource"}],"image":{"src":"./liteyuki.svg","alt":"Liteyuki Logo"}},"features":[{"title":"支持多种框架","icon":"🛠️","details":"基于轻雪框架,兼容nonebot,melobot等,拥有良好的生态支持","link":"./dev/api/api"},{"title":"插件管理","icon":"🧩","details":"使用包管理器,便捷管理插件及资源包","link":"./store/plugin"},{"title":"主题支持","icon":"🎨","details":"使用资源包对外观进行完全自定义","link":"./store/resource"},{"title":"国际化","icon":"🌐","details":"通过资源包支持多种语言","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"简易使用","icon":"⚙️","details":"无需繁琐前期过程,开箱即用","link":"./deploy/config"},{"title":"超高性能","icon":"🏎️","details":"500个插件,2s内启动"},{"title":"滚动更新","icon":"☁️","details":"让你的机器人保持最新提交"},{"title":"开源项目","icon":"💻","details":"项目遵循MIT LICENCE开源,欢迎各位的贡献","link":"https://github.com/LiteyukiStudio/LiteyukiBot"}]},"headers":[],"relativePath":"index.md","filePath":"zh/index.md","lastUpdated":1725101868000}'),a={name:"index.md"};function o(n,l,s,c,d,r){return i(),e("div")}const u=t(a,[["render",o]]);export{p as __pageData,u as default}; diff --git a/assets/index.md.CQL2AFxv.lean.js b/assets/index.md.CQL2AFxv.lean.js new file mode 100644 index 00000000..0fdad09d --- /dev/null +++ b/assets/index.md.CQL2AFxv.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as i}from"./chunks/framework.C3o_UkTa.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"轻雪机器人","text":"文档","tagline":"一个综合性的机器人应用及管理框架","actions":[{"theme":"brand","text":"快速开始","link":"./deploy/install"},{"theme":"alt","text":"使用手册","link":"./usage/basic_command"},{"theme":"alt","text":"扩展","link":"./store/resource"}],"image":{"src":"./liteyuki.svg","alt":"Liteyuki Logo"}},"features":[{"title":"支持多种框架","icon":"🛠️","details":"基于轻雪框架,兼容nonebot,melobot等,拥有良好的生态支持","link":"./dev/api/api"},{"title":"插件管理","icon":"🧩","details":"使用包管理器,便捷管理插件及资源包","link":"./store/plugin"},{"title":"主题支持","icon":"🎨","details":"使用资源包对外观进行完全自定义","link":"./store/resource"},{"title":"国际化","icon":"🌐","details":"通过资源包支持多种语言","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"简易使用","icon":"⚙️","details":"无需繁琐前期过程,开箱即用","link":"./deploy/config"},{"title":"超高性能","icon":"🏎️","details":"500个插件,2s内启动"},{"title":"滚动更新","icon":"☁️","details":"让你的机器人保持最新提交"},{"title":"开源项目","icon":"💻","details":"项目遵循MIT LICENCE开源,欢迎各位的贡献","link":"https://github.com/LiteyukiStudio/LiteyukiBot"}]},"headers":[],"relativePath":"index.md","filePath":"zh/index.md","lastUpdated":1725101868000}'),a={name:"index.md"};function o(n,l,s,c,d,r){return i(),e("div")}const u=t(a,[["render",o]]);export{p as __pageData,u as default}; diff --git a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 new file mode 100644 index 00000000..b6b603d5 Binary files /dev/null and b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ diff --git a/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/assets/inter-italic-cyrillic.By2_1cv3.woff2 new file mode 100644 index 00000000..def40a4f Binary files /dev/null and b/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ diff --git a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 new file mode 100644 index 00000000..e070c3d3 Binary files /dev/null and b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ diff --git a/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/assets/inter-italic-greek.DJ8dCoTZ.woff2 new file mode 100644 index 00000000..a3c16ca4 Binary files /dev/null and b/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ diff --git a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 new file mode 100644 index 00000000..2210a899 Binary files /dev/null and b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ diff --git a/assets/inter-italic-latin.C2AdPX0b.woff2 b/assets/inter-italic-latin.C2AdPX0b.woff2 new file mode 100644 index 00000000..790d62dc Binary files /dev/null and b/assets/inter-italic-latin.C2AdPX0b.woff2 differ diff --git a/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/assets/inter-italic-vietnamese.BSbpV94h.woff2 new file mode 100644 index 00000000..1eec0775 Binary files /dev/null and b/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ diff --git a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 new file mode 100644 index 00000000..2cfe6153 Binary files /dev/null and b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ diff --git a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 new file mode 100644 index 00000000..e3886dd1 Binary files /dev/null and b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ diff --git a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 new file mode 100644 index 00000000..36d67487 Binary files /dev/null and b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ diff --git a/assets/inter-roman-greek.BBVDIX6e.woff2 b/assets/inter-roman-greek.BBVDIX6e.woff2 new file mode 100644 index 00000000..2bed1e85 Binary files /dev/null and b/assets/inter-roman-greek.BBVDIX6e.woff2 differ diff --git a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 new file mode 100644 index 00000000..9a8d1e2b Binary files /dev/null and b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ diff --git a/assets/inter-roman-latin.Di8DUHzh.woff2 b/assets/inter-roman-latin.Di8DUHzh.woff2 new file mode 100644 index 00000000..07d3c53a Binary files /dev/null and b/assets/inter-roman-latin.Di8DUHzh.woff2 differ diff --git a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 new file mode 100644 index 00000000..57bdc22a Binary files /dev/null and b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ diff --git a/assets/store_plugin.md.BMBIhTm1.js b/assets/store_plugin.md.BMBIhTm1.js new file mode 100644 index 00000000..4486f4e9 --- /dev/null +++ b/assets/store_plugin.md.BMBIhTm1.js @@ -0,0 +1 @@ +import{_ as t,D as o,c as n,I as r,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"插件商店","description":"","frontmatter":{"title":"插件商店","order":2},"headers":[],"relativePath":"store/plugin.md","filePath":"zh/store/plugin.md","lastUpdated":1725101868000}'),s={name:"store/plugin.md"};function p(c,l,i,d,m,_){const e=o("pluginStoreComp");return a(),n("div",null,[r(e)])}const g=t(s,[["render",p]]);export{f as __pageData,g as default}; diff --git a/assets/store_plugin.md.BMBIhTm1.lean.js b/assets/store_plugin.md.BMBIhTm1.lean.js new file mode 100644 index 00000000..4486f4e9 --- /dev/null +++ b/assets/store_plugin.md.BMBIhTm1.lean.js @@ -0,0 +1 @@ +import{_ as t,D as o,c as n,I as r,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"插件商店","description":"","frontmatter":{"title":"插件商店","order":2},"headers":[],"relativePath":"store/plugin.md","filePath":"zh/store/plugin.md","lastUpdated":1725101868000}'),s={name:"store/plugin.md"};function p(c,l,i,d,m,_){const e=o("pluginStoreComp");return a(),n("div",null,[r(e)])}const g=t(s,[["render",p]]);export{f as __pageData,g as default}; diff --git a/assets/store_resource.md.CfhqcpPi.js b/assets/store_resource.md.CfhqcpPi.js new file mode 100644 index 00000000..c635cde6 --- /dev/null +++ b/assets/store_resource.md.CfhqcpPi.js @@ -0,0 +1 @@ +import{_ as r,D as o,c as t,I as s,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"资源商店","description":"","frontmatter":{"title":"资源商店","order":1},"headers":[],"relativePath":"store/resource.md","filePath":"zh/store/resource.md","lastUpdated":1725101868000}'),c={name:"store/resource.md"};function n(p,d,m,_,l,i){const e=o("resourceStoreComp");return a(),t("div",null,[s(e)])}const h=r(c,[["render",n]]);export{f as __pageData,h as default}; diff --git a/assets/store_resource.md.CfhqcpPi.lean.js b/assets/store_resource.md.CfhqcpPi.lean.js new file mode 100644 index 00000000..c635cde6 --- /dev/null +++ b/assets/store_resource.md.CfhqcpPi.lean.js @@ -0,0 +1 @@ +import{_ as r,D as o,c as t,I as s,o as a}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"资源商店","description":"","frontmatter":{"title":"资源商店","order":1},"headers":[],"relativePath":"store/resource.md","filePath":"zh/store/resource.md","lastUpdated":1725101868000}'),c={name:"store/resource.md"};function n(p,d,m,_,l,i){const e=o("resourceStoreComp");return a(),t("div",null,[s(e)])}const h=r(c,[["render",n]]);export{f as __pageData,h as default}; diff --git a/assets/style.BNCNLzKP.css b/assets/style.BNCNLzKP.css new file mode 100644 index 00000000..6ba0902f --- /dev/null +++ b/assets/style.BNCNLzKP.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-2cfdfdcf]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-2cfdfdcf],.VPBackdrop.fade-leave-to[data-v-2cfdfdcf]{opacity:0}.VPBackdrop.fade-leave-active[data-v-2cfdfdcf]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-2cfdfdcf]{display:none}}.NotFound[data-v-868b40d9]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-868b40d9]{padding:96px 32px 168px}}.code[data-v-868b40d9]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-868b40d9]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-868b40d9]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-868b40d9]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-868b40d9]{padding-top:20px}.link[data-v-868b40d9]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-868b40d9]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-75b86f7a]{position:relative;z-index:1}.nested[data-v-75b86f7a]{padding-right:16px;padding-left:16px}.outline-link[data-v-75b86f7a]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-75b86f7a]:hover,.outline-link.active[data-v-75b86f7a]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-75b86f7a]{padding-left:13px}.VPDocAsideOutline[data-v-be1126ba]{display:none}.VPDocAsideOutline.has-outline[data-v-be1126ba]{display:block}.content[data-v-be1126ba]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-be1126ba]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-be1126ba]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-65ef6f81]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-65ef6f81]{flex-grow:1}.VPDocAside[data-v-65ef6f81] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-65ef6f81] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-65ef6f81] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-243e2690]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-243e2690]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-e27a0cf7]{margin-top:64px}.edit-info[data-v-e27a0cf7]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-e27a0cf7]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-e27a0cf7]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-e27a0cf7]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-e27a0cf7]{margin-right:8px}.prev-next[data-v-e27a0cf7]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-e27a0cf7]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-e27a0cf7]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-e27a0cf7]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-e27a0cf7]{margin-left:auto;text-align:right}.desc[data-v-e27a0cf7]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-e27a0cf7]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-4981c415]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-4981c415]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-4981c415]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-4981c415]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-4981c415]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-4981c415]{display:flex;justify-content:center}.VPDoc .aside[data-v-4981c415]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-4981c415]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-4981c415]{max-width:1104px}}.container[data-v-4981c415]{margin:0 auto;width:100%}.aside[data-v-4981c415]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-4981c415]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-4981c415]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-4981c415]::-webkit-scrollbar{display:none}.aside-curtain[data-v-4981c415]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-4981c415]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-4981c415]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-4981c415]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-4981c415]{order:1;margin:0;min-width:640px}}.content-container[data-v-4981c415]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-4981c415]{max-width:688px}.VPButton[data-v-5208c6a8]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-5208c6a8]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-5208c6a8]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-5208c6a8]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-5208c6a8]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-5208c6a8]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-5208c6a8]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-5208c6a8]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-5208c6a8]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-5208c6a8]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-5208c6a8]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-5208c6a8]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-5208c6a8]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-6e911b93]{display:none}.dark .VPImage.light[data-v-6e911b93]{display:none}.VPHero[data-v-4963d475]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-4963d475]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-4963d475]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-4963d475]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-4963d475]{flex-direction:row}}.main[data-v-4963d475]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-4963d475]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-4963d475]{text-align:left}}@media (min-width: 960px){.main[data-v-4963d475]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-4963d475]{max-width:592px}}.name[data-v-4963d475],.text[data-v-4963d475]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-4963d475],.VPHero.has-image .text[data-v-4963d475]{margin:0 auto}.name[data-v-4963d475]{color:var(--vp-home-hero-name-color)}.clip[data-v-4963d475]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-4963d475],.text[data-v-4963d475]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-4963d475],.text[data-v-4963d475]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-4963d475],.VPHero.has-image .text[data-v-4963d475]{margin:0}}.tagline[data-v-4963d475]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-4963d475]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-4963d475]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-4963d475]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-4963d475]{margin:0}}.actions[data-v-4963d475]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-4963d475]{justify-content:center}@media (min-width: 640px){.actions[data-v-4963d475]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-4963d475]{justify-content:flex-start}}.action[data-v-4963d475]{flex-shrink:0;padding:6px}.image[data-v-4963d475]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-4963d475]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-4963d475]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-4963d475]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-4963d475]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-4963d475]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-4963d475]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-4963d475]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-4963d475]{width:320px;height:320px}}[data-v-4963d475] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-4963d475] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-4963d475] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-c6ed09d2]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-c6ed09d2]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-c6ed09d2]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-c6ed09d2]>.VPImage{margin-bottom:20px}.icon[data-v-c6ed09d2]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-c6ed09d2]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-c6ed09d2]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-c6ed09d2]{padding-top:8px}.link-text-value[data-v-c6ed09d2]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-c6ed09d2]{margin-left:6px}.VPFeatures[data-v-c56833f4]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-c56833f4]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-c56833f4]{padding:0 64px}}.container[data-v-c56833f4]{margin:0 auto;max-width:1152px}.items[data-v-c56833f4]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-c56833f4]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-c56833f4],.item.grid-4[data-v-c56833f4],.item.grid-6[data-v-c56833f4]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-c56833f4],.item.grid-4[data-v-c56833f4]{width:50%}.item.grid-3[data-v-c56833f4],.item.grid-6[data-v-c56833f4]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-c56833f4]{width:25%}}.container[data-v-2763ee34]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-2763ee34]{padding:0 48px}}@media (min-width: 960px){.container[data-v-2763ee34]{width:100%;padding:0 64px}}.vp-doc[data-v-2763ee34] .VPHomeSponsors,.vp-doc[data-v-2763ee34] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-2763ee34] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-2763ee34] .VPHomeSponsors a,.vp-doc[data-v-2763ee34] .VPTeamPage a{text-decoration:none}.VPHome[data-v-ceddc1ed]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-ceddc1ed]{margin-bottom:128px}}.VPContent[data-v-4e31bbd2]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-4e31bbd2]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-4e31bbd2]{margin:0}@media (min-width: 960px){.VPContent[data-v-4e31bbd2]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-4e31bbd2]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-4e31bbd2]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-098a46ae]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-098a46ae]{display:none}.VPFooter[data-v-098a46ae] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-098a46ae] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-098a46ae]{padding:32px}}.container[data-v-098a46ae]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-098a46ae],.copyright[data-v-098a46ae]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-5e8cf508]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-5e8cf508]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-5e8cf508]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-5e8cf508]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-5e8cf508]{color:var(--vp-c-text-1)}.icon[data-v-5e8cf508]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-5e8cf508]{font-size:14px}.icon[data-v-5e8cf508]{font-size:16px}}.open>.icon[data-v-5e8cf508]{transform:rotate(90deg)}.items[data-v-5e8cf508]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-5e8cf508]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-5e8cf508]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-5e8cf508]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-5e8cf508]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-5e8cf508]{transition:all .2s ease-out}.flyout-leave-active[data-v-5e8cf508]{transition:all .15s ease-in}.flyout-enter-from[data-v-5e8cf508],.flyout-leave-to[data-v-5e8cf508]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-b8036a12]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-b8036a12]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-b8036a12]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-b8036a12]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-b8036a12]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-b8036a12]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-b8036a12]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-b8036a12]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-b8036a12]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-b8036a12]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-b8036a12]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-b8036a12]{display:none}}.menu-icon[data-v-b8036a12]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-b8036a12]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-b8036a12]{padding:12px 32px 11px}}.VPSwitch[data-v-b19619af]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-b19619af]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-b19619af]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-b19619af]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-b19619af] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-b19619af] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-0f382965]{opacity:1}.moon[data-v-0f382965],.dark .sun[data-v-0f382965]{opacity:0}.dark .moon[data-v-0f382965]{opacity:1}.dark .VPSwitchAppearance[data-v-0f382965] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-0a1958c9]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-0a1958c9]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-19363427]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-19363427]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-19363427]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-19363427]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-e815e7e2]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-e815e7e2]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-e815e7e2]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-e815e7e2]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-0e22c6c5]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-0e22c6c5] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-0e22c6c5] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-0e22c6c5] .group:last-child{padding-bottom:0}.VPMenu[data-v-0e22c6c5] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-0e22c6c5] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-0e22c6c5] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-0e22c6c5] .action{padding-left:24px}.VPFlyout[data-v-12ec5ee2]{position:relative}.VPFlyout[data-v-12ec5ee2]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-12ec5ee2]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-12ec5ee2]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-12ec5ee2]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-12ec5ee2]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-12ec5ee2],.button[aria-expanded=true]+.menu[data-v-12ec5ee2]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-12ec5ee2]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-12ec5ee2]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-12ec5ee2]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-12ec5ee2]{margin-right:0;font-size:16px}.text-icon[data-v-12ec5ee2]{margin-left:4px;font-size:14px}.icon[data-v-12ec5ee2]{font-size:20px;transition:fill .25s}.menu[data-v-12ec5ee2]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-974e0aed]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-974e0aed]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-974e0aed]>svg,.VPSocialLink[data-v-974e0aed]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-52782a78]{display:flex;justify-content:center}.VPNavBarExtra[data-v-c34ef5aa]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-c34ef5aa]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-c34ef5aa]{display:none}}.trans-title[data-v-c34ef5aa]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-c34ef5aa],.item.social-links[data-v-c34ef5aa]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-c34ef5aa]{min-width:176px}.appearance-action[data-v-c34ef5aa]{margin-right:-2px}.social-links-list[data-v-c34ef5aa]{margin:-4px -8px}.VPNavBarHamburger[data-v-6a2ed68b]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-6a2ed68b]{display:none}}.container[data-v-6a2ed68b]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-6a2ed68b]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-6a2ed68b]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-6a2ed68b]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-6a2ed68b]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-6a2ed68b]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-6a2ed68b]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-6a2ed68b],.VPNavBarHamburger.active:hover .middle[data-v-6a2ed68b],.VPNavBarHamburger.active:hover .bottom[data-v-6a2ed68b]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-6a2ed68b],.middle[data-v-6a2ed68b],.bottom[data-v-6a2ed68b]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-6a2ed68b]{top:0;left:0;transform:translate(0)}.middle[data-v-6a2ed68b]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-6a2ed68b]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-c423e9f4]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-c423e9f4],.VPNavBarMenuLink[data-v-c423e9f4]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-71183eee]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-71183eee]{display:flex}}/*! @docsearch/css 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-edaebeb1]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-edaebeb1]{display:flex;align-items:center}}.title[data-v-de953605]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-de953605]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-de953605]{border-bottom-color:var(--vp-c-divider)}}[data-v-de953605] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-d3047050]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-d3047050]{display:flex;align-items:center}}.title[data-v-d3047050]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-37a6b570]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-37a6b570]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-37a6b570]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-37a6b570]:not(.home){background-color:transparent}.VPNavBar[data-v-37a6b570]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-37a6b570]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-37a6b570]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-37a6b570]{padding:0}}.container[data-v-37a6b570]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-37a6b570],.container>.content[data-v-37a6b570]{pointer-events:none}.container[data-v-37a6b570] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-37a6b570]{max-width:100%}}.title[data-v-37a6b570]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-37a6b570]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-37a6b570]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-37a6b570]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-37a6b570]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-37a6b570]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-37a6b570]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-37a6b570]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-37a6b570]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-37a6b570]{column-gap:.5rem}}.menu+.translations[data-v-37a6b570]:before,.menu+.appearance[data-v-37a6b570]:before,.menu+.social-links[data-v-37a6b570]:before,.translations+.appearance[data-v-37a6b570]:before,.appearance+.social-links[data-v-37a6b570]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-37a6b570]:before,.translations+.appearance[data-v-37a6b570]:before{margin-right:16px}.appearance+.social-links[data-v-37a6b570]:before{margin-left:16px}.social-links[data-v-37a6b570]{margin-right:-8px}.divider[data-v-37a6b570]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-37a6b570]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-37a6b570]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-37a6b570]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-37a6b570]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-37a6b570]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-37a6b570]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-beb3f918]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-beb3f918]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-6f3d2ab5]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-6f3d2ab5]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-eab7bfa1]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-eab7bfa1]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-60ca4288]{display:block}.title[data-v-60ca4288]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-9b54e8b4]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-9b54e8b4]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-9b54e8b4]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-9b54e8b4]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-9b54e8b4]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-9b54e8b4]{transform:rotate(45deg)}.button[data-v-9b54e8b4]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-9b54e8b4]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-9b54e8b4]{transition:transform .25s}.group[data-v-9b54e8b4]:first-child{padding-top:0}.group+.group[data-v-9b54e8b4],.group+.item[data-v-9b54e8b4]{padding-top:4px}.VPNavScreenTranslations[data-v-d9ff2423]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-d9ff2423]{height:auto}.title[data-v-d9ff2423]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-d9ff2423]{font-size:16px}.icon.lang[data-v-d9ff2423]{margin-right:8px}.icon.chevron[data-v-d9ff2423]{margin-left:4px}.list[data-v-d9ff2423]{padding:4px 0 0 24px}.link[data-v-d9ff2423]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-c6c7bd45]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-c6c7bd45],.VPNavScreen.fade-leave-active[data-v-c6c7bd45]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-c6c7bd45],.VPNavScreen.fade-leave-active .container[data-v-c6c7bd45]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-c6c7bd45],.VPNavScreen.fade-leave-to[data-v-c6c7bd45]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-c6c7bd45],.VPNavScreen.fade-leave-to .container[data-v-c6c7bd45]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-c6c7bd45]{display:none}}.container[data-v-c6c7bd45]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-c6c7bd45],.menu+.appearance[data-v-c6c7bd45],.translations+.appearance[data-v-c6c7bd45]{margin-top:24px}.menu+.social-links[data-v-c6c7bd45]{margin-top:16px}.appearance+.social-links[data-v-c6c7bd45]{margin-top:16px}.VPNav[data-v-d52d372b]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-d52d372b]{position:fixed}}.VPSidebarItem.level-0[data-v-b74067ae]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-b74067ae]{padding-bottom:10px}.item[data-v-b74067ae]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-b74067ae]{cursor:pointer}.indicator[data-v-b74067ae]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-b74067ae],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-b74067ae],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-b74067ae],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-b74067ae]{background-color:var(--vp-c-brand-1)}.link[data-v-b74067ae]{display:flex;align-items:center;flex-grow:1}.text[data-v-b74067ae]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-b74067ae]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-b74067ae],.VPSidebarItem.level-2 .text[data-v-b74067ae],.VPSidebarItem.level-3 .text[data-v-b74067ae],.VPSidebarItem.level-4 .text[data-v-b74067ae],.VPSidebarItem.level-5 .text[data-v-b74067ae]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-b74067ae],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-b74067ae],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-b74067ae],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-b74067ae],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-b74067ae],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-b74067ae]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-b74067ae],.VPSidebarItem.level-1.has-active>.item>.text[data-v-b74067ae],.VPSidebarItem.level-2.has-active>.item>.text[data-v-b74067ae],.VPSidebarItem.level-3.has-active>.item>.text[data-v-b74067ae],.VPSidebarItem.level-4.has-active>.item>.text[data-v-b74067ae],.VPSidebarItem.level-5.has-active>.item>.text[data-v-b74067ae],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-b74067ae],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-b74067ae],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-b74067ae],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-b74067ae],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-b74067ae],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-b74067ae]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-b74067ae],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-b74067ae],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-b74067ae],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-b74067ae],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-b74067ae],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-b74067ae]{color:var(--vp-c-brand-1)}.caret[data-v-b74067ae]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-b74067ae]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-b74067ae]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-b74067ae]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-b74067ae]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-b74067ae],.VPSidebarItem.level-2 .items[data-v-b74067ae],.VPSidebarItem.level-3 .items[data-v-b74067ae],.VPSidebarItem.level-4 .items[data-v-b74067ae],.VPSidebarItem.level-5 .items[data-v-b74067ae]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-b74067ae]{display:none}.no-transition[data-v-e3ecf1ec] .caret-icon{transition:none}.group+.group[data-v-e3ecf1ec]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-e3ecf1ec]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-f2245985]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-f2245985]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-f2245985]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-f2245985]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-f2245985]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-f2245985]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-f2245985]{outline:0}.VPSkipLink[data-v-a977b129]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-a977b129]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-a977b129]{top:14px;left:16px}}.Layout[data-v-7e3343f7]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-308016a3]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-308016a3]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-308016a3]{margin:128px 0}}.VPHomeSponsors[data-v-308016a3]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-308016a3]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-308016a3]{padding:0 64px}}.container[data-v-308016a3]{margin:0 auto;max-width:1152px}.love[data-v-308016a3]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-308016a3]{display:inline-block}.message[data-v-308016a3]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-308016a3]{padding-top:32px}.action[data-v-308016a3]{padding-top:40px;text-align:center}.VPTeamPage[data-v-2771c96e]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-2771c96e]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-2771c96e-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-2771c96e-s],.VPTeamMembers+.VPTeamPageSection[data-v-2771c96e-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-2771c96e-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-2771c96e-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-2771c96e-s],.VPTeamMembers+.VPTeamPageSection[data-v-2771c96e-s]{margin-top:96px}}.VPTeamMembers[data-v-2771c96e-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-2771c96e-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-2771c96e-s]{padding:0 64px}}.VPTeamPageTitle[data-v-b7285b4e]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-b7285b4e]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-b7285b4e]{padding:80px 64px 48px}}.title[data-v-b7285b4e]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-b7285b4e]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-b7285b4e]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-b7285b4e]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-1745a870]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-1745a870]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-1745a870]{padding:0 64px}}.title[data-v-1745a870]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-1745a870]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-1745a870]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-1745a870]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-1745a870]{padding-top:40px}.VPTeamMembersItem[data-v-3c3727f9]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-3c3727f9]{padding:32px}.VPTeamMembersItem.small .data[data-v-3c3727f9]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-3c3727f9]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-3c3727f9]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-3c3727f9]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-3c3727f9]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-3c3727f9]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-3c3727f9]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-3c3727f9]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-3c3727f9]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-3c3727f9]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-3c3727f9]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-3c3727f9]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-3c3727f9]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-3c3727f9]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-3c3727f9]{text-align:center}.avatar[data-v-3c3727f9]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-3c3727f9]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-3c3727f9]{margin:0;font-weight:600}.affiliation[data-v-3c3727f9]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-3c3727f9]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-3c3727f9]:hover{color:var(--vp-c-brand-1)}.desc[data-v-3c3727f9]{margin:0 auto}.desc[data-v-3c3727f9] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-3c3727f9]{display:flex;justify-content:center;height:56px}.sp-link[data-v-3c3727f9]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-3c3727f9]:hover,.sp .sp-link.link[data-v-3c3727f9]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-3c3727f9]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-2607a016]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-2607a016]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-2607a016]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-2607a016]{max-width:876px}.VPTeamMembers.medium .container[data-v-2607a016]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-2607a016]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-2607a016]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-2607a016]{max-width:760px}.container[data-v-2607a016]{display:grid;gap:24px;margin:0 auto;max-width:1152px}:root{--vp-c-brand-1: #149ef8;--vp-c-brand-2: #0434ad;--vp-home-hero-name-color: transparent;--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #34a3fe 30%, #8d44ff);--vp-home-hero-image-background-image: linear-gradient(-45deg, #d0e9ff 50%, #a2d8f4 50%);--vp-home-hero-image-filter: blur(44px)}.VPLocalSearchBox[data-v-a5632211]{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;display:flex}.backdrop[data-v-a5632211]{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-backdrop-bg-color);transition:opacity .5s}.shell[data-v-a5632211]{position:relative;padding:12px;margin:64px auto;display:flex;flex-direction:column;gap:16px;background:var(--vp-local-search-bg);width:min(100vw - 60px,900px);height:min-content;max-height:min(100vh - 128px,900px);border-radius:6px}@media (max-width: 767px){.shell[data-v-a5632211]{margin:0;width:100vw;height:100vh;max-height:none;border-radius:0}}.search-bar[data-v-a5632211]{border:1px solid var(--vp-c-divider);border-radius:4px;display:flex;align-items:center;padding:0 12px;cursor:text}@media (max-width: 767px){.search-bar[data-v-a5632211]{padding:0 8px}}.search-bar[data-v-a5632211]:focus-within{border-color:var(--vp-c-brand-1)}.local-search-icon[data-v-a5632211]{display:block;font-size:18px}.navigate-icon[data-v-a5632211]{display:block;font-size:14px}.search-icon[data-v-a5632211]{margin:8px}@media (max-width: 767px){.search-icon[data-v-a5632211]{display:none}}.search-input[data-v-a5632211]{padding:6px 12px;font-size:inherit;width:100%}@media (max-width: 767px){.search-input[data-v-a5632211]{padding:6px 4px}}.search-actions[data-v-a5632211]{display:flex;gap:4px}@media (any-pointer: coarse){.search-actions[data-v-a5632211]{gap:8px}}@media (min-width: 769px){.search-actions.before[data-v-a5632211]{display:none}}.search-actions button[data-v-a5632211]{padding:8px}.search-actions button[data-v-a5632211]:not([disabled]):hover,.toggle-layout-button.detailed-list[data-v-a5632211]{color:var(--vp-c-brand-1)}.search-actions button.clear-button[data-v-a5632211]:disabled{opacity:.37}.search-keyboard-shortcuts[data-v-a5632211]{font-size:.8rem;opacity:75%;display:flex;flex-wrap:wrap;gap:16px;line-height:14px}.search-keyboard-shortcuts span[data-v-a5632211]{display:flex;align-items:center;gap:4px}@media (max-width: 767px){.search-keyboard-shortcuts[data-v-a5632211]{display:none}}.search-keyboard-shortcuts kbd[data-v-a5632211]{background:#8080801a;border-radius:4px;padding:3px 6px;min-width:24px;display:inline-block;text-align:center;vertical-align:middle;border:1px solid rgba(128,128,128,.15);box-shadow:0 2px 2px #0000001a}.results[data-v-a5632211]{display:flex;flex-direction:column;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.result[data-v-a5632211]{display:flex;align-items:center;gap:8px;border-radius:4px;transition:none;line-height:1rem;border:solid 2px var(--vp-local-search-result-border);outline:none}.result>div[data-v-a5632211]{margin:12px;width:100%;overflow:hidden}@media (max-width: 767px){.result>div[data-v-a5632211]{margin:8px}}.titles[data-v-a5632211]{display:flex;flex-wrap:wrap;gap:4px;position:relative;z-index:1001;padding:2px 0}.title[data-v-a5632211]{display:flex;align-items:center;gap:4px}.title.main[data-v-a5632211]{font-weight:500}.title-icon[data-v-a5632211]{opacity:.5;font-weight:500;color:var(--vp-c-brand-1)}.title svg[data-v-a5632211]{opacity:.5}.result.selected[data-v-a5632211]{--vp-local-search-result-bg: var(--vp-local-search-result-selected-bg);border-color:var(--vp-local-search-result-selected-border)}.excerpt-wrapper[data-v-a5632211]{position:relative}.excerpt[data-v-a5632211]{opacity:50%;pointer-events:none;max-height:140px;overflow:hidden;position:relative;margin-top:4px}.result.selected .excerpt[data-v-a5632211]{opacity:1}.excerpt[data-v-a5632211] *{font-size:.8rem!important;line-height:130%!important}.titles[data-v-a5632211] mark,.excerpt[data-v-a5632211] mark{background-color:var(--vp-local-search-highlight-bg);color:var(--vp-local-search-highlight-text);border-radius:2px;padding:0 2px}.excerpt[data-v-a5632211] .vp-code-group .tabs{display:none}.excerpt[data-v-a5632211] .vp-code-group div[class*=language-]{border-radius:8px!important}.excerpt-gradient-bottom[data-v-a5632211]{position:absolute;bottom:-1px;left:0;width:100%;height:8px;background:linear-gradient(transparent,var(--vp-local-search-result-bg));z-index:1000}.excerpt-gradient-top[data-v-a5632211]{position:absolute;top:-1px;left:0;width:100%;height:8px;background:linear-gradient(var(--vp-local-search-result-bg),transparent);z-index:1000}.result.selected .titles[data-v-a5632211],.result.selected .title-icon[data-v-a5632211]{color:var(--vp-c-brand-1)!important}.no-results[data-v-a5632211]{font-size:.9rem;text-align:center;padding:12px}svg[data-v-a5632211]{flex:none} diff --git a/assets/usage_agreement.md.DBBkunJ_.js b/assets/usage_agreement.md.DBBkunJ_.js new file mode 100644 index 00000000..849d5d24 --- /dev/null +++ b/assets/usage_agreement.md.DBBkunJ_.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.C3o_UkTa.js";const h=JSON.parse('{"title":"用户协议","description":"","frontmatter":{"title":"用户协议","order":3},"headers":[],"relativePath":"usage/agreement.md","filePath":"zh/usage/agreement.md","lastUpdated":1725101868000}'),l={name:"usage/agreement.md"},i=o('

用户协议

  1. 本项目遵循MIT协议,你可以自由使用,修改,分发,但是请保留原作者信息
  2. 你可以选择开启auto_report(默认开启),轻雪会收集以下内容
    • 运行环境的设备信息:CPU,内存,系统信息及Python信息
    • 插件信息(不含插件数据)
    • 部分异常信息,
    • 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把auto_report设定为false
  3. 本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性
  4. 使用此项目代表你已经同意以上协议
',2),r=[i];function c(_,s,d,n,m,p){return a(),t("div",null,r)}const f=e(l,[["render",c]]);export{h as __pageData,f as default}; diff --git a/assets/usage_agreement.md.DBBkunJ_.lean.js b/assets/usage_agreement.md.DBBkunJ_.lean.js new file mode 100644 index 00000000..ccf4b29b --- /dev/null +++ b/assets/usage_agreement.md.DBBkunJ_.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.C3o_UkTa.js";const h=JSON.parse('{"title":"用户协议","description":"","frontmatter":{"title":"用户协议","order":3},"headers":[],"relativePath":"usage/agreement.md","filePath":"zh/usage/agreement.md","lastUpdated":1725101868000}'),l={name:"usage/agreement.md"},i=o("",2),r=[i];function c(_,s,d,n,m,p){return a(),t("div",null,r)}const f=e(l,[["render",c]]);export{h as __pageData,f as default}; diff --git a/assets/usage_basic.md.DJoTZ022.js b/assets/usage_basic.md.DJoTZ022.js new file mode 100644 index 00000000..7d9b5f21 --- /dev/null +++ b/assets/usage_basic.md.DJoTZ022.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as d,a4 as l}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"基础插件","description":"","frontmatter":{"title":"基础插件","order":1},"headers":[],"relativePath":"usage/basic.md","filePath":"zh/usage/basic.md","lastUpdated":1725101868000}'),n={name:"usage/basic.md"},r=l('

基础插件


TIP

参数<param>为必填参数,[option]为可选参数。

命令别名:配置了命令别名的命令可以使用别名代替原命令,例如npm install ~可以使用插件 安装 ~代替。

轻雪命令liteyuki_command

命令说明权限举例可用参数
reload-liteyuki重载轻雪超级用户
update-liteyuki更新轻雪超级用户
liteecho查看当前bot 版本超级用户
status查看统计信息和状态超级用户
config set <key> value添加配置项,若存在则会覆盖,输入值会被执行以转换为正确的类型,"10"和10是不一样的超级用户config set name 'liteyuki-bot'<key>: 若存在则覆盖, 若不存在则创建于config.yml ; value: yml格式的所有合法内容
config get [key] 查询配置项,不带key返回配置项列表,推荐私聊使用超级用户config get name<key>: 若存在则返回, 若不存在则返回空
switch-image-mode 在普通图片和Markdown大图之间切换,该功能需要commit:505468b及以后的Lagrange.OneBot,默认普通图片超级用户switch-image-mode
/api api_name [args] 调用机器人API超级用户/api get_group_member_list group_id=1234567<args>: 参数列表, 格式为onebot v11协议api, 可用%20代替空格
/function function_name [args] [kwargs] 调用机器人函数(.lyfunction语法)超级用户/function send_group_msg group_id=1234567 message='hello'<args><kwargs>: 参数列表, api格式为onebot v11协议api
group enable/disable [group_id]在群聊启用/停用机器人,group_id仅超级用户可用超级用户,群聊仅群主、管理员、超级用户可用group enable 1145141919810<group_id>: 群号
liteyuki-docs查看轻雪文档所有人

命令别名

命令别名
status状态
reload-liteyuki重启轻雪
update-liteyuki更新轻雪
reload-resources重载资源
config配置, set 设置 / get 查询
switch-image-mode切换图片模式
liteyuki-docs轻雪文档
group群聊, enable 启用 / disable 停用

插件/包管理器 liteyuki_pacman

  • 插件管理
命令说明权限
npm update更新插件商店索引超级用户
npm install <plugin_name>安装插件超级用户
npm uninstall <plugin_name>卸载插件超级用户
npm search <keywords...>通过关键词搜索插件超级用户
npm enable-global/disable-global <plugin_name>全局启用/停用插件超级用户
npm enable/disable <plugin_name> [--group <group_id>]当前会话启用/停用插件群聊仅群主、管理员、超级用户可用,私聊所有人可用
npm list [page] [num]列出所有插件 page为页数,num为每页显示数量群聊仅群主、管理员、超级用户可用,私聊所有人可用
help <plugin_name>查看插件帮助所有人
  • 资源包管理
命令说明权限
rpm list [page] [num]列出所有资源包 page为页数,num为每页显示数量超级用户
rpm load <pack_name>加载资源包超级用户
rpm unload <pack_name>卸载资源包超级用户
rpm change <pack_name>修改优先级超级用户
rpm reload重载所有资源包超级用户

命令别名

命令别名
npm插件管理
update更新
install安装
uninstall卸载
search搜索
enable启用
disable停用
enable-global全局启用
disable-global全局停用
rpm资源包
load加载
unload卸载
change更改
reload重载
list列表
help帮助

WARNING

受限于NoneBot2钩子函数的依赖注入参数,插件停用只能阻断传入响应,对于主动推送的插件不生效,请阅读插件主页的说明。


用户管理liteyuki_user

命令说明权限
profile查看用户信息菜单所有人
profile set <key> [value]设置用户信息或打开属性设置菜单所有人
profile get <key>获取用户信息所有人

###命令别名

命令别名
profile个人信息
set设置
get查询
',22),a=[r];function c(i,s,o,g,y,x){return d(),e("div",null,a)}const p=t(n,[["render",c]]);export{u as __pageData,p as default}; diff --git a/assets/usage_basic.md.DJoTZ022.lean.js b/assets/usage_basic.md.DJoTZ022.lean.js new file mode 100644 index 00000000..c55ad60d --- /dev/null +++ b/assets/usage_basic.md.DJoTZ022.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as d,a4 as l}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"基础插件","description":"","frontmatter":{"title":"基础插件","order":1},"headers":[],"relativePath":"usage/basic.md","filePath":"zh/usage/basic.md","lastUpdated":1725101868000}'),n={name:"usage/basic.md"},r=l("",22),a=[r];function c(i,s,o,g,y,x){return d(),e("div",null,a)}const p=t(n,[["render",c]]);export{u as __pageData,p as default}; diff --git a/assets/usage_extra.md.AJu--2F9.js b/assets/usage_extra.md.AJu--2F9.js new file mode 100644 index 00000000..abaac9c9 --- /dev/null +++ b/assets/usage_extra.md.AJu--2F9.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as s,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"功能命令","description":"","frontmatter":{"title":"功能命令","order":2},"headers":[],"relativePath":"usage/extra.md","filePath":"zh/usage/extra.md","lastUpdated":1725101868000}'),a={name:"usage/extra.md"},l=i('

功能插件命令

轻雪天气liteyuki_weather

查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。

配置项

yaml
weather_key: "" # 和风天气的天气key,会自动判断key版本

命令

shell
weather <keywords...> # Keywords为城市名,支持中英文

查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"

shell
bind-city <keywords...> # Keywords为城市名,支持中英文

绑定查询城市,个人全局生效

命令别名

命令别名
weather天气
bind-city绑定城市

统计信息liteyuki_statistics

统计信息 命令

shell
statistic message --duration <duration> --period <period> --group [current|group_id] --bot [current|bot_id]

功能: 用于统计Bot接收到的消息, 统计周期为period, 统计时间范围为duration

参数格式
duration使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
period使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
groupcurrent (当前群聊) 或 group_id (QQ群号)
botcurrent (当前Bot) 或 bot_id

命令别名

命令别名
statisticstat
messagem
--duration-d
--period`-p
--group-g
--bot-b
currentc
',20),d=[l];function n(h,r,o,p,c,k){return s(),e("div",null,d)}const u=t(a,[["render",n]]);export{y as __pageData,u as default}; diff --git a/assets/usage_extra.md.AJu--2F9.lean.js b/assets/usage_extra.md.AJu--2F9.lean.js new file mode 100644 index 00000000..6ea1ed04 --- /dev/null +++ b/assets/usage_extra.md.AJu--2F9.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as s,a4 as i}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"功能命令","description":"","frontmatter":{"title":"功能命令","order":2},"headers":[],"relativePath":"usage/extra.md","filePath":"zh/usage/extra.md","lastUpdated":1725101868000}'),a={name:"usage/extra.md"},l=i("",20),d=[l];function n(h,r,o,p,c,k){return s(),e("div",null,d)}const u=t(a,[["render",n]]);export{y as __pageData,u as default}; diff --git a/deploy/config.html b/deploy/config.html new file mode 100644 index 00000000..d0bef215 --- /dev/null +++ b/deploy/config.html @@ -0,0 +1,56 @@ + + + + + + 配置 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

配置

轻雪支持yamljsontoml作为配置文件,取决于你个人的喜好

首次运行后生成config.ymlconfig目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusersnickname字段即可

启动时会加载项目目录下config.yml/yaml/json/tomlconfig目录下的所有配置文件,你可在config目录下创建多个配置文件,轻雪会自动合并这些配置文件

基础配置项

yaml
nonebot:
+  # Nonebot机器人的配置,以前的最外层配置项仍可为Nonebot服务,但是部分内容会被覆盖,请尽快迁移
+  command_start: [ "/", "" ] # 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常
+  host: 127.0.0.1 # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0
+  port: 20216 # 绑定端口
+  nickname: [ "liteyuki" ]  # 机器人昵称列表
+  superusers: [ "1919810" ]  # 超级用户列表
+liteyuki:
+  # 写在外层的配置项将会被覆盖,建议迁移到liteyuki下
+  log_level: "INFO" # 日志等级
+  log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
+  auto_report: true # 是否自动上报问题给轻雪服务器
+  auto_update: true # 是否自动更新轻雪,每天4点检查更新
+  plugins: [ ] # 轻雪插件列表
+  plugin_dirs: [ ] # 轻雪插件目录列表

其他配置

以下为默认值,如需自定义请手动添加

yaml
# 高级NoneBot配置
+nonebot:
+  onebot_access_token: "" # 访问令牌,对公开放时建议设置
+  default_language: "zh-CN" # 默认语言
+  alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启
+  safe_mode: false # 安全模式,开启后将不会加载任何第三方NoneBot插件
+  # 其他Nonebot插件的配置项
+  custom_config_1: "custom_value1"
+  custom_config_2: "custom_value2"
+
+# 开发者选项
+liteyuki:
+  allow_update: true # 是否允许更新
+  debug: false  # 轻雪调试,开启会自动重载Bot或者资源,其他插件自带的调试功能也将开启
+  dev_mode: false # 开发者模式,开启后将会启动监视者,监视文件变化并自动重载
+
+...

示例:与NoneBot对接的OneBot实现端配置

生产环境中推荐反向WebSocket 不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值

字段参考值说明
协议反向WebSocket推荐使用反向ws协议进行通信,即轻雪作为服务端
地址ws://127.0.0.1:20216/onebot/v11/ws地址取决于配置文件,本机默认为127.0.0.1:20216
AccessToken""如果你给轻雪配置了AccessToken,请在此填写相同的值

其他

  • 轻雪不局限于OneBot适配器,你可以使用NoneBot2支持的任何适配器或使用轻雪讯息传递插件

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/deploy/fandq.html b/deploy/fandq.html new file mode 100644 index 00000000..7d1bfbd7 --- /dev/null +++ b/deploy/fandq.html @@ -0,0 +1,26 @@ + + + + + + 答疑 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

答疑

常见问题

  • 设备上Python环境太乱了,pip和python不对应怎么办?

    • 请使用/path/to/python -m pip install -r requirements.txt来安装依赖, 然后用/path/to/python main.py来启动Bot, 其中/path/to/python是你要用来运行Bot的可执行文件
  • 为什么我启动后机器人没有反应?

    • 请检查配置文件的command_startsuperusers,确认你有权限使用命令并按照正确的命令发送
    • 确认命令头没有和nickname{}冲突,例如一个命令是help,但是Bot昵称有一个help,那么将会被解析为nickname而不是命令
  • 更新轻雪失败,报错InvalidGitRepositoryError

    • 请正确安装Git,并使用克隆而非直接下载的方式部署轻雪
  • 怎么登录聊天平台,例如QQ?

    • 你有这个问题说明你不是很了解这个项目,本项目不负责实现登录功能,只负责处理和回应消息,登录功能由实现端(协议端)提供, 实现端本身不负责处理响应逻辑,将消息按照OneBot标准处理好上报给轻雪 你需要使用Onebot标准的实现端来连接到轻雪并将消息上报给轻雪,下面已经列出一些推荐的实现端
  • Playwright安装失败

    • 输入playwright install安装浏览器
  • 有的插件安装后报错无法启动

    • 请先查阅插件文档,确认插件必要配置项完好后,仍然出现问题,请联系插件作者或在安全模式safe_mode: true下启动轻雪,在安全模式下你可以使用npm uninstall卸载问题插件
  • 其他问题

    加入QQ群775840726

推荐方案(QQ)

  1. Lagrange.OneBot,基于NTQQ的OneBot实现,目前Markdown消息支持Lagrange
  2. LLOneBot,NTQQ的OneBot插件,需要安装NTQQ
  3. OpenShamrock,基于Lsposed的OneBot11实现
  4. TRSS-Yunzai,基于node.js,可使用ws-plugin进行通信
  5. go-cqhttpgo语言实现的OneBot11实现端,目前可用性较低
  6. Gensokyo,基于 OneBot QQ官方机器人Api Golang 原生实现,需要官方机器人权限
  7. 人工实现的Onebot协议,自己整一个WebSocket客户端,看着QQ的消息,然后给轻雪传输数据

推荐方案(Minecraft)

  1. MinecraftOneBot,我们专门为Minecraft开发的服务器Bot,支持OneBotV11标准

使用其他项目连接请先自行查阅文档,若有困难请联系对应开发者而不是Liteyuki的开发者

鸣谢

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/deploy/install.html b/deploy/install.html new file mode 100644 index 00000000..d67d66f5 --- /dev/null +++ b/deploy/install.html @@ -0,0 +1,33 @@ + + + + + + 安装 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

安装

常规部署

  1. 安装 GitPython3.10+ 环境
bash
# 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项
+git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
+# 切换到Bot目录下
+cd LiteyukiBot
+# 安装依赖
+pip install -r requirements.txt
+# 启动Bot
+python main.py

TIP

推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用python -m venv .venv来创建虚拟环境,然后使用.venv\Scripts\activate来激活虚拟环境(Linux下使用source .venv/bin/activate激活)

使用Docker构建

  1. 安装 Docker
  2. 克隆项目 git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
  3. 进入轻雪目录 cd LiteyukiBot
  4. 构建镜像 docker build -t liteyukibot .
  5. 启动容器 docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot

TIP

Windows请使用项目绝对目录/path/to/LiteyukiBot代替$(pwd)
若你修改了端口号请将20216:20216中的20216替换为你的端口号

使用TRSS Scripts部署

TRSS_Liteyuki轻雪机器人管理脚本,该功能由TRSS提供支持,不是LiteyukiBot官方提供的功能,推荐使用Arch Linux

装置要求

  • Windows系统版本最低Windows10+/Windows Server 2019+
  • Linux系统要支持Python3.10+,推荐Ubuntu 20.04+(别用你那b CentOS)
  • CPU: 至少1vCPU
  • 内存: Bot无其他插件会占用300~500MB,包括chromiumnode等进程,其他插件占用视具体插件而定,建议1GB以上
  • 硬盘: 至少1GB空间

WARNING

如果装置上有多个环境,请使用path/to/python -m pip install -r requirements.txt来安装依赖,path/to/python为你的Python可执行文件路径

WARNING

轻雪的更新功能依赖Git,如果你没有安装Git直接下载源代码运行,你将无法使用更新功能

其他问题请移步至答疑

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/api.html b/dev/api/api.html new file mode 100644 index 00000000..89aea284 --- /dev/null +++ b/dev/api/api.html @@ -0,0 +1,26 @@ + + + + + + liteyuki | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/bot/bot.html b/dev/api/bot/bot.html new file mode 100644 index 00000000..8709e060 --- /dev/null +++ b/dev/api/bot/bot.html @@ -0,0 +1,236 @@ + + + + + + liteyuki.bot | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

说明: 初始化轻雪实例

参数:

  • *args:
  • **kwargs: 配置
源代码在GitHub上查看
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

说明: 启动逻辑

源代码在GitHub上查看
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

说明: 外部启动接口

源代码在GitHub上查看
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

说明: 保持轻雪运行

源代码在GitHub上查看
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

说明: 信号处理

参数:

  • signum:
  • frame:
源代码在GitHub上查看
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

说明: 重启轻雪本体

源代码在GitHub上查看
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

说明: 停止轻雪

参数:

  • name: 进程名称, 默认为None, 所有进程
源代码在GitHub上查看
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

说明: 初始化轻雪, 自动调用

源代码在GitHub上查看
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

源代码在GitHub上查看
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

说明: 停止轻雪

源代码在GitHub上查看
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

说明: 注册启动前的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

说明: 注册启动后的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册停止后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册进程停止前的函数,为子进程停止时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

说明: 注册进程重启前的函数,为子进程重启时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

说明: 注册重启后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

说明: 获取轻雪实例

返回: LiteyukiBot: 当前的轻雪实例

源代码在GitHub上查看
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

说明: 获取配置

参数:

  • key: 配置键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

说明: 获取配置,兼容旧版本

参数:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
源代码在GitHub上查看
python
def print_logo():
+    print('\x1b[34m' + '\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \n    /  |      /      |/        |/        |/  \\    /  |/  |  /  |/  |  /  |/      |\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \n    $$ |        $$ |     $$ |   $$ |__     $$  \\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\    $$ |  \n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\__$$ |$$ |$$  \\  _$$ |_ \n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \n                ' + '\x1b[0m')

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/bot/index.html b/dev/api/bot/index.html new file mode 100644 index 00000000..cf80c6cf --- /dev/null +++ b/dev/api/bot/index.html @@ -0,0 +1,236 @@ + + + + + + liteyuki.bot | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

说明: 初始化轻雪实例

参数:

  • *args:
  • **kwargs: 配置
源代码在GitHub上查看
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

说明: 启动逻辑

源代码在GitHub上查看
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

说明: 外部启动接口

源代码在GitHub上查看
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

说明: 保持轻雪运行

源代码在GitHub上查看
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

说明: 信号处理

参数:

  • signum:
  • frame:
源代码在GitHub上查看
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

说明: 重启轻雪本体

源代码在GitHub上查看
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

说明: 停止轻雪

参数:

  • name: 进程名称, 默认为None, 所有进程
源代码在GitHub上查看
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

说明: 初始化轻雪, 自动调用

源代码在GitHub上查看
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

源代码在GitHub上查看
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

说明: 停止轻雪

源代码在GitHub上查看
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

说明: 注册启动前的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

说明: 注册启动后的函数

参数:

  • func:
源代码在GitHub上查看
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册停止后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

说明: 注册进程停止前的函数,为子进程停止时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

说明: 注册进程重启前的函数,为子进程重启时调用

参数:

  • func:
源代码在GitHub上查看
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

说明: 注册重启后的函数:未实现

参数:

  • func:
源代码在GitHub上查看
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

说明: 获取轻雪实例

返回: LiteyukiBot: 当前的轻雪实例

源代码在GitHub上查看
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

说明: 获取配置

参数:

  • key: 配置键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

说明: 获取配置,兼容旧版本

参数:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

返回: Any: 配置值

源代码在GitHub上查看
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
源代码在GitHub上查看
python
def print_logo():
+    print('\x1b[34m' + '\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \n    /  |      /      |/        |/        |/  \\    /  |/  |  /  |/  |  /  |/      |\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \n    $$ |        $$ |     $$ |   $$ |__     $$  \\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\    $$ |  \n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\__$$ |$$ |$$  \\  _$$ |_ \n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \n                ' + '\x1b[0m')

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/bot/lifespan.html b/dev/api/bot/lifespan.html new file mode 100644 index 00000000..12bdfc2e --- /dev/null +++ b/dev/api/bot/lifespan.html @@ -0,0 +1,139 @@ + + + + + + liteyuki.bot.lifespan | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.bot.lifespan

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午8:24 @Author : snowykami @Email : snowykami@outlook.com @File : lifespan.py @Software: PyCharm

class Lifespan

def __init__(self) -> None

说明: 轻雪生命周期管理,启动、停止、重启

源代码在GitHub上查看
python
def __init__(self) -> None:
+    """
+        轻雪生命周期管理,启动、停止、重启
+        """
+    self.life_flag: int = 0
+    self._before_start_funcs: list[LIFESPAN_FUNC] = []
+    self._after_start_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._after_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_restart_funcs: list[LIFESPAN_FUNC] = []
+    self._after_restart_funcs: list[LIFESPAN_FUNC] = []

@staticmethod

async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None

说明: 并发运行异步函数

参数:

  • funcs:
源代码在GitHub上查看
python
@staticmethod
+async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None:
+    """
+        并发运行异步函数
+        Args:
+            funcs:
+        Returns:
+        """
+    loop = asyncio.get_running_loop()
+    tasks = [func(*args, **kwargs) if is_coroutine_callable(func) else async_wrapper(func)(*args, **kwargs) for func in funcs]
+    await asyncio.gather(*tasks)

def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册启动时的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_start_funcs.append(func)
+    return func

def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册启动时的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_start_funcs.append(func)
+    return func

def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册停止前的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止前的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_shutdown_funcs.append(func)
+    return func

def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册停止后的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止后的函数
+        Args:
+            func:
+
+        Returns:
+            LIFESPAN_FUNC:
+
+        """
+    self._after_shutdown_funcs.append(func)
+    return func

def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册重启时的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_restart_funcs.append(func)
+    return func

def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

说明: 注册重启后的函数

参数:

  • func:

返回: LIFESPAN_FUNC:

源代码在GitHub上查看
python
def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启后的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_restart_funcs.append(func)
+    return func

async def before_start(self) -> None

说明: 启动前

源代码在GitHub上查看
python
async def before_start(self) -> None:
+    """
+        启动前
+        Returns:
+        """
+    logger.debug('Running before_start functions')
+    await self.run_funcs(self._before_start_funcs)

async def after_start(self) -> None

说明: 启动后

源代码在GitHub上查看
python
async def after_start(self) -> None:
+    """
+        启动后
+        Returns:
+        """
+    logger.debug('Running after_start functions')
+    await self.run_funcs(self._after_start_funcs)

async def before_process_shutdown(self) -> None

说明: 停止前

源代码在GitHub上查看
python
async def before_process_shutdown(self) -> None:
+    """
+        停止前
+        Returns:
+        """
+    logger.debug('Running before_shutdown functions')
+    await self.run_funcs(self._before_process_shutdown_funcs)

async def after_shutdown(self) -> None

说明: 停止后

源代码在GitHub上查看
python
async def after_shutdown(self) -> None:
+    """
+        停止后
+        Returns:
+        """
+    logger.debug('Running after_shutdown functions')
+    await self.run_funcs(self._after_shutdown_funcs)

async def before_process_restart(self) -> None

说明: 重启前

源代码在GitHub上查看
python
async def before_process_restart(self) -> None:
+    """
+        重启前
+        Returns:
+        """
+    logger.debug('Running before_restart functions')
+    await self.run_funcs(self._before_process_restart_funcs)

async def after_restart(self) -> None

说明: 重启后

源代码在GitHub上查看
python
async def after_restart(self) -> None:
+    """
+        重启后
+        Returns:
+
+        """
+    logger.debug('Running after_restart functions')
+    await self.run_funcs(self._after_restart_funcs)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/comm/channel.html b/dev/api/comm/channel.html new file mode 100644 index 00000000..6811fe8b --- /dev/null +++ b/dev/api/comm/channel.html @@ -0,0 +1,221 @@ + + + + + + liteyuki.comm.channel | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.channel

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午11:21 @Author : snowykami @Email : snowykami@outlook.com @File : channel_.py @Software: PyCharm

本模块定义了一个通用的通道类,用于进程间通信

class Channel(Generic[T])

def __init__(self, name: str, type_check: Optional[bool] = None)

说明: 初始化通道

参数:

  • name: 通道ID
  • type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
源代码在GitHub上查看
python
def __init__(self, name: str, type_check: Optional[bool]=None):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+            type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
+        """
+    self.conn_send, self.conn_recv = Pipe()
+    self._conn_send_inner, self._conn_recv_inner = Pipe()
+    self._closed = False
+    self._on_main_receive_func_ids: list[int] = []
+    self._on_sub_receive_func_ids: list[int] = []
+    self.name: str = name
+    self.is_receive_loop_running = False
+    if type_check is None:
+        type_check = self._get_generic_type() is not None
+    elif type_check:
+        if self._get_generic_type() is None:
+            raise TypeError('Type hint is required for enforcing type check.')
+    self.type_check = type_check
+    if name in _channel:
+        raise ValueError(f'Channel {name} already exists')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = self
+        logger.debug(f'Channel {name} initialized in main process')
+    else:
+        logger.debug(f'Channel {name} initialized in sub process, should manually set in main process')

def _get_generic_type(self) -> Optional[type]

说明: 获取通道传递泛型类型

返回: Optional[type]: 泛型类型

源代码在GitHub上查看
python
def _get_generic_type(self) -> Optional[type]:
+    """
+        获取通道传递泛型类型
+
+        Returns:
+            Optional[type]: 泛型类型
+        """
+    if hasattr(self, '__orig_class__'):
+        return get_args(self.__orig_class__)[0]
+    return None

def _validate_structure(self, data: Any, structure: type) -> bool

说明: 验证数据结构

参数:

  • data: 数据
  • structure: 结构

返回: bool: 是否通过验证

源代码在GitHub上查看
python
def _validate_structure(self, data: Any, structure: type) -> bool:
+    """
+        验证数据结构
+        Args:
+            data: 数据
+            structure: 结构
+
+        Returns:
+            bool: 是否通过验证
+        """
+    if isinstance(structure, type):
+        return isinstance(data, structure)
+    elif isinstance(structure, tuple):
+        if not isinstance(data, tuple) or len(data) != len(structure):
+            return False
+        return all((self._validate_structure(d, s) for d, s in zip(data, structure)))
+    elif isinstance(structure, list):
+        if not isinstance(data, list):
+            return False
+        return all((self._validate_structure(d, structure[0]) for d in data))
+    elif isinstance(structure, dict):
+        if not isinstance(data, dict):
+            return False
+        return all((k in data and self._validate_structure(data[k], structure[k]) for k in structure))
+    return False

def send(self, data: T)

说明: 发送数据,发送函数为同步函数,没有异步的必要

参数:

  • data: 数据
源代码在GitHub上查看
python
def send(self, data: T):
+    """
+        发送数据,发送函数为同步函数,没有异步的必要
+        Args:
+            data: 数据
+        """
+    if self.type_check:
+        _type = self._get_generic_type()
+        if _type is not None and (not self._validate_structure(data, _type)):
+            raise TypeError(f'Data must be an instance of {_type}, {type(data)} found')
+    if self._closed:
+        raise RuntimeError('Cannot send to a closed channel_')
+    self.conn_send.send(data)

def receive(self) -> T

说明: 同步接收数据,会阻塞线程

源代码在GitHub上查看
python
def receive(self) -> T:
+    """
+        同步接收数据,会阻塞线程
+        Args:
+        """
+    if self._closed:
+        raise RuntimeError('Cannot receive from a closed channel_')
+    while True:
+        data = self.conn_recv.recv()
+        return data

async def async_receive(self) -> T

说明: 异步接收数据,会挂起等待

源代码在GitHub上查看
python
async def async_receive(self) -> T:
+    """
+        异步接收数据,会挂起等待
+        """
+    print('等待接收数据')
+    loop = asyncio.get_running_loop()
+    data = await loop.run_in_executor(None, self.receive)
+    print('接收到数据')
+    return data

def on_receive(self, filter_func: Optional[FILTER_FUNC] = None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]

说明: 接收数据并执行函数

参数:

  • filter_func: 过滤函数,为None则不过滤

返回: 装饰器,装饰一个函数在接收到数据后执行

源代码在GitHub上查看
python
def on_receive(self, filter_func: Optional[FILTER_FUNC]=None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]:
+    """
+        接收数据并执行函数
+        Args:
+            filter_func: 过滤函数,为None则不过滤
+        Returns:
+            装饰器,装饰一个函数在接收到数据后执行
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('on_receive can only be used in main process')
+
+    def decorator(func: Callable[[T], Any]) -> Callable[[T], Any]:
+        global _func_id
+
+        async def wrapper(data: T) -> Any:
+            if filter_func is not None:
+                if is_coroutine_callable(filter_func):
+                    if not await filter_func(data):
+                        return
+                elif not filter_func(data):
+                    return
+            if is_coroutine_callable(func):
+                return await func(data)
+            else:
+                return func(data)
+        _callback_funcs[_func_id] = wrapper
+        if IS_MAIN_PROCESS:
+            self._on_main_receive_func_ids.append(_func_id)
+        else:
+            self._on_sub_receive_func_ids.append(_func_id)
+        _func_id += 1
+        return func
+    return decorator

async def _run_on_receive_funcs(self, data: Any)

说明: 运行接收函数

参数:

  • data: 数据
源代码在GitHub上查看
python
async def _run_on_receive_funcs(self, data: Any):
+    """
+        运行接收函数
+        Args:
+            data: 数据
+        """
+    if IS_MAIN_PROCESS:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_main_receive_func_ids]
+    else:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_sub_receive_func_ids]

async def start_receive_loop(self)

说明: 开始接收数据 会自动判断主进程和子进程,需要在对应进程都调度一次

源代码在GitHub上查看
python
async def start_receive_loop(self):
+    """
+        开始接收数据
+        会自动判断主进程和子进程,需要在对应进程都调度一次
+        """
+    if len(self._on_main_receive_func_ids) == 0:
+        logger.warning(f'No on_receive function registered for {self.name}')
+        return
+    self.is_receive_loop_running = True
+    logger.debug(f'Starting receive loop for {self.name}')
+    while not self._closed:
+        data = await self.async_receive()
+        await self._run_on_receive_funcs(data)

var active_channel

  • 说明: 子进程可用的主动和被动通道

  • 类型: Channel

  • 默认值: Channel(name='active_channel')

var publish_channel

  • 说明: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • 类型: Channel[tuple[str, dict[str, Any]]]

  • 默认值: Channel(name='publish_channel')

var channel_deliver_active_channel

  • 说明: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • 类型: Channel[Channel[Any]]

  • 默认值: NO_DEFAULT

def set_channel(name: str, channel: Channel)

说明: 设置通道实例

参数:

  • name: 通道名称
  • channel: 通道实例
源代码在GitHub上查看
python
def set_channel(name: str, channel: 'Channel'):
+    """
+    设置通道实例
+    Args:
+        name: 通道名称
+        channel: 通道实例
+    """
+    if not isinstance(channel, Channel):
+        raise TypeError(f'channel_ must be an instance of Channel, {type(channel)} found')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = channel
+    else:
+        channel_deliver_passive_channel.send(('set_channel', {'name': name, 'channel_': channel}))

def set_channels(channels: dict[str, Channel])

说明: 设置通道实例

参数:

  • channels: 通道名称
源代码在GitHub上查看
python
def set_channels(channels: dict[str, 'Channel']):
+    """
+    设置通道实例
+    Args:
+        channels: 通道名称
+    """
+    for name, channel in channels.items():
+        set_channel(name, channel)

def get_channel(name: str) -> Channel

说明: 获取通道实例

参数:

  • name: 通道名称
源代码在GitHub上查看
python
def get_channel(name: str) -> 'Channel':
+    """
+    获取通道实例
+    Args:
+        name: 通道名称
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel[name]
+    else:
+        recv_chan = Channel[Channel[Any]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channel', {'name': name, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def get_channels() -> dict[str, Channel]

说明: 获取通道实例

源代码在GitHub上查看
python
def get_channels() -> dict[str, 'Channel']:
+    """
+    获取通道实例
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel
+    else:
+        recv_chan = Channel[dict[str, Channel[Any]]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channels', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')

def on_set_channel(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')
+def on_set_channel(data: tuple[str, dict[str, Any]]):
+    name, channel = (data[1]['name'], data[1]['channel_'])
+    set_channel(name, channel)

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')

def on_get_channel(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')
+def on_get_channel(data: tuple[str, dict[str, Any]]):
+    name, recv_chan = (data[1]['name'], data[1]['recv_chan'])
+    recv_chan.send(get_channel(name))

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')

def on_get_channels(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')
+def on_get_channels(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(get_channels())

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/comm/comm.html b/dev/api/comm/comm.html new file mode 100644 index 00000000..16fb80da --- /dev/null +++ b/dev/api/comm/comm.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.comm | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/comm/event.html b/dev/api/comm/event.html new file mode 100644 index 00000000..9fcc2fc8 --- /dev/null +++ b/dev/api/comm/event.html @@ -0,0 +1,28 @@ + + + + + + liteyuki.comm.event | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.event

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class Event

def __init__(self, name: str, data: dict[str, Any])

源代码在GitHub上查看
python
def __init__(self, name: str, data: dict[str, Any]):
+    self.name = name
+    self.data = data

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/comm/index.html b/dev/api/comm/index.html new file mode 100644 index 00000000..7bd2d63b --- /dev/null +++ b/dev/api/comm/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.comm | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/comm/rpc.html b/dev/api/comm/rpc.html new file mode 100644 index 00000000..c1a156a7 --- /dev/null +++ b/dev/api/comm/rpc.html @@ -0,0 +1,31 @@ + + + + + + liteyuki.comm.rpc | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.rpc

说明: 本模块用于实现RPC(基于IPC)通信

class RPC

def __init__(self, on_calling: ON_CALLING_FUNC) -> None

源代码在GitHub上查看
python
def __init__(self, on_calling: ON_CALLING_FUNC) -> None:
+    self.on_calling = on_calling

def call(self, args: tuple, kwargs: dict) -> Any

说明: 调用

源代码在GitHub上查看
python
def call(self, args: tuple, kwargs: dict) -> Any:
+    """
+        调用
+        """
+    return self.on_calling(args, kwargs)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/comm/socks_channel.html b/dev/api/comm/socks_channel.html new file mode 100644 index 00000000..4b2cee8e --- /dev/null +++ b/dev/api/comm/socks_channel.html @@ -0,0 +1,51 @@ + + + + + + liteyuki.comm.socks_channel | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.socks_channel

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/25 下午3:54 @Author : snowykami @Email : snowykami@outlook.com @File : channelv2.py @Software: PyCharm

class SocksChannel

def __init__(self, name: str)

说明: 初始化通道

参数:

  • name: 通道ID
源代码在GitHub上查看
python
def __init__(self, name: str):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+        """
+    self._name = name
+    self._conn_send = None
+    self._conn_recv = None
+    self._closed = False

def send(self, data)

说明: 发送数据

参数:

  • data: 数据
源代码在GitHub上查看
python
def send(self, data):
+    """
+        发送数据
+        Args:
+            data: 数据
+        """
+    pass

def receive(self)

说明: 接收数据

返回: data: 数据

源代码在GitHub上查看
python
def receive(self):
+    """
+        接收数据
+        Returns:
+            data: 数据
+        """
+    pass

def close(self)

说明: 关闭通道

源代码在GitHub上查看
python
def close(self):
+    """
+        关闭通道
+        """
+    pass

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/comm/storage.html b/dev/api/comm/storage.html new file mode 100644 index 00000000..2596763e --- /dev/null +++ b/dev/api/comm/storage.html @@ -0,0 +1,169 @@ + + + + + + liteyuki.comm.storage | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.storage

说明: 共享内存模块。类似于redis,但是更加轻量级并且线程安全

var _on_main_subscriber_receive_funcs

  • 说明: 主进程订阅者接收函数

  • 类型: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • 默认值: {}

var _on_sub_subscriber_receive_funcs

  • 说明: 子进程订阅者接收函数

  • 类型: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • 默认值: {}

class KeyValueStore

def __init__(self)

源代码在GitHub上查看
python
def __init__(self):
+    self._store = {}
+    self.active_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-active')
+    self.passive_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-passive')
+    self.publish_channel = Channel[tuple[str, Any]](name='shared_memory-publish')
+    self.is_main_receive_loop_running = False
+    self.is_sub_receive_loop_running = False

def set(self, key: str, value: Any) -> None

说明: 设置键值对

参数:

  • key: 键
  • value: 值
源代码在GitHub上查看
python
def set(self, key: str, value: Any) -> None:
+    """
+        设置键值对
+        Args:
+            key: 键
+            value: 值
+
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            self._store[key] = value
+    else:
+        self.passive_chan.send(('set', {'key': key, 'value': value}))

def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]

说明: 获取键值对

参数:

  • key: 键
  • default: 默认值

返回: Any: 值

源代码在GitHub上查看
python
def get(self, key: str, default: Optional[Any]=None) -> Optional[Any]:
+    """
+        获取键值对
+        Args:
+            key: 键
+            default: 默认值
+
+        Returns:
+            Any: 值
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            return self._store.get(key, default)
+    else:
+        recv_chan = Channel[Optional[Any]]('recv_chan')
+        self.passive_chan.send(('get', {'key': key, 'default': default, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def delete(self, key: str, ignore_key_error: bool = True) -> None

说明: 删除键值对

参数:

  • key: 键
  • ignore_key_error: 是否忽略键不存在的错误
源代码在GitHub上查看
python
def delete(self, key: str, ignore_key_error: bool=True) -> None:
+    """
+        删除键值对
+        Args:
+            key: 键
+            ignore_key_error: 是否忽略键不存在的错误
+
+        Returns:
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            if key in self._store:
+                try:
+                    del self._store[key]
+                    del _locks[key]
+                except KeyError as e:
+                    if not ignore_key_error:
+                        raise e
+    else:
+        self.passive_chan.send(('delete', {'key': key}))

def get_all(self) -> dict[str, Any]

说明: 获取所有键值对

返回: dict[str, Any]: 键值对

源代码在GitHub上查看
python
def get_all(self) -> dict[str, Any]:
+    """
+        获取所有键值对
+        Returns:
+            dict[str, Any]: 键值对
+        """
+    if IS_MAIN_PROCESS:
+        return self._store
+    else:
+        recv_chan = Channel[dict[str, Any]]('recv_chan')
+        self.passive_chan.send(('get_all', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

def publish(self, channel_: str, data: Any) -> None

说明: 发布消息

参数:

  • channel_: 频道
  • data: 数据
源代码在GitHub上查看
python
def publish(self, channel_: str, data: Any) -> None:
+    """
+        发布消息
+        Args:
+            channel_: 频道
+            data: 数据
+
+        Returns:
+        """
+    self.active_chan.send(('publish', {'channel': channel_, 'data': data}))

def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]

说明: 订阅者接收消息时的回调

参数:

  • channel_: 频道

返回: 装饰器

源代码在GitHub上查看
python
def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]:
+    """
+        订阅者接收消息时的回调
+        Args:
+            channel_: 频道
+
+        Returns:
+            装饰器
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot subscribe in sub process.')
+
+    def decorator(func: ON_RECEIVE_FUNC) -> ON_RECEIVE_FUNC:
+
+        async def wrapper(data: Any):
+            if is_coroutine_callable(func):
+                await func(data)
+            else:
+                func(data)
+        if IS_MAIN_PROCESS:
+            if channel_ not in _on_main_subscriber_receive_funcs:
+                _on_main_subscriber_receive_funcs[channel_] = []
+            _on_main_subscriber_receive_funcs[channel_].append(wrapper)
+        else:
+            if channel_ not in _on_sub_subscriber_receive_funcs:
+                _on_sub_subscriber_receive_funcs[channel_] = []
+            _on_sub_subscriber_receive_funcs[channel_].append(wrapper)
+        return wrapper
+    return decorator

@staticmethod

async def run_subscriber_receive_funcs(channel_: str, data: Any)

说明: 运行订阅者接收函数

参数:

  • channel_: 频道
  • data: 数据
源代码在GitHub上查看
python
@staticmethod
+async def run_subscriber_receive_funcs(channel_: str, data: Any):
+    """
+        运行订阅者接收函数
+        Args:
+            channel_: 频道
+            data: 数据
+        """
+    [asyncio.create_task(func(data)) for func in _on_main_subscriber_receive_funcs[channel_]]

async def start_receive_loop(self)

说明: 启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程

源代码在GitHub上查看
python
async def start_receive_loop(self):
+    """
+        启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot start receive loop in sub process.')
+    while True:
+        data = await self.active_chan.async_receive()
+        if data[0] == 'publish':
+            await self.run_subscriber_receive_funcs(data[1]['channel'], data[1]['data'])
+            self.publish_channel.send(data)

class GlobalKeyValueStore

@classmethod

def get_instance(cls)

源代码在GitHub上查看
python
@classmethod
+def get_instance(cls):
+    if cls._instance is None:
+        with cls._lock:
+            if cls._instance is None:
+                cls._instance = KeyValueStore()
+    return cls._instance

attr _instance = None

attr _lock = threading.Lock()

var _ref_count

  • 说明: import 引用计数, 防止获取空指针

  • 默认值: 0

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')

def on_get(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')
+def on_get(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    default = data[1]['default']
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get(key, default))

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')

def on_set(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')
+def on_set(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    value = data[1]['value']
+    shared_memory.set(key, value)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')

def on_delete(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')
+def on_delete(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    shared_memory.delete(key)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')

def on_get_all(data: tuple[str, dict[str, Any]])

源代码在GitHub上查看
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')
+def on_get_all(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get_all())

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/config.html b/dev/api/config.html new file mode 100644 index 00000000..51135e45 --- /dev/null +++ b/dev/api/config.html @@ -0,0 +1,102 @@ + + + + + + liteyuki.config | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.config

说明: 该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式

def flat_config(config: dict[str, Any]) -> dict[str, Any]

说明: 扁平化配置文件

{a:{b:{c:1}}} ->

参数:

  • config: 配置项目

返回: 扁平化后的配置文件,但也包含原有的键值对

源代码在GitHub上查看
python
def flat_config(config: dict[str, Any]) -> dict[str, Any]:
+    """
+    扁平化配置文件
+
+    {a:{b:{c:1}}} -> {"a.b.c": 1}
+    Args:
+        config: 配置项目
+
+    Returns:
+        扁平化后的配置文件,但也包含原有的键值对
+    """
+    new_config = copy.deepcopy(config)
+    for key, value in config.items():
+        if isinstance(value, dict):
+            for k, v in flat_config(value).items():
+                new_config[f'{key}.{k}'] = v
+    return new_config

def load_from_yaml(file_: str) -> dict[str, Any]

说明: Load config from yaml file

源代码在GitHub上查看
python
def load_from_yaml(file_: str) -> dict[str, Any]:
+    """
+    Load config from yaml file
+
+    """
+    logger.debug(f'Loading YAML config from {file_}')
+    config = yaml.safe_load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_json(file_: str) -> dict[str, Any]

说明: Load config from json file

源代码在GitHub上查看
python
def load_from_json(file_: str) -> dict[str, Any]:
+    """
+    Load config from json file
+    """
+    logger.debug(f'Loading JSON config from {file_}')
+    config = json.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_toml(file_: str) -> dict[str, Any]

说明: Load config from toml file

源代码在GitHub上查看
python
def load_from_toml(file_: str) -> dict[str, Any]:
+    """
+    Load config from toml file
+    """
+    logger.debug(f'Loading TOML config from {file_}')
+    config = toml.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]

说明: 从指定文件加载配置项,会自动识别文件格式 默认执行扁平化选项

源代码在GitHub上查看
python
def load_from_files(*files: str, no_warning: bool=False) -> dict[str, Any]:
+    """
+    从指定文件加载配置项,会自动识别文件格式
+    默认执行扁平化选项
+    """
+    config = {}
+    for file in files:
+        if os.path.exists(file):
+            if file.endswith(('.yaml', 'yml')):
+                config.update(load_from_yaml(file))
+            elif file.endswith('.json'):
+                config.update(load_from_json(file))
+            elif file.endswith('.toml'):
+                config.update(load_from_toml(file))
+            elif not no_warning:
+                logger.warning(f'Unsupported config file format: {file}')
+        elif not no_warning:
+            logger.warning(f'Config file not found: {file}')
+    return config

def load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]

说明: 从目录下加载配置文件,不递归 按照读取文件的优先级反向覆盖 默认执行扁平化选项

源代码在GitHub上查看
python
def load_configs_from_dirs(*directories: str, no_waring: bool=False) -> dict[str, Any]:
+    """
+    从目录下加载配置文件,不递归
+    按照读取文件的优先级反向覆盖
+    默认执行扁平化选项
+    """
+    config = {}
+    for directory in directories:
+        if not os.path.exists(directory):
+            if not no_waring:
+                logger.warning(f'Directory not found: {directory}')
+            continue
+        for file in os.listdir(directory):
+            if file.endswith(_SUPPORTED_CONFIG_FORMATS):
+                config.update(load_from_files(os.path.join(directory, file), no_warning=no_waring))
+    return config

def load_config_in_default(no_waring: bool = False) -> dict[str, Any]

说明: 从一个标准的轻雪项目加载配置文件 项目目录下的config.*和config目录下的所有配置文件 项目目录下的配置文件优先

源代码在GitHub上查看
python
def load_config_in_default(no_waring: bool=False) -> dict[str, Any]:
+    """
+    从一个标准的轻雪项目加载配置文件
+    项目目录下的config.*和config目录下的所有配置文件
+    项目目录下的配置文件优先
+    """
+    config = load_configs_from_dirs('config', no_waring=no_waring)
+    config.update(load_from_files('config.yaml', 'config.toml', 'config.json', 'config.yml', no_warning=no_waring))
+    return config

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/core/core.html b/dev/api/core/core.html new file mode 100644 index 00000000..580d28e3 --- /dev/null +++ b/dev/api/core/core.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.core | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/core/index.html b/dev/api/core/index.html new file mode 100644 index 00000000..63668e35 --- /dev/null +++ b/dev/api/core/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.core | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/core/manager.html b/dev/api/core/manager.html new file mode 100644 index 00000000..5b816da6 --- /dev/null +++ b/dev/api/core/manager.html @@ -0,0 +1,117 @@ + + + + + + liteyuki.core.manager | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.core.manager

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午11:12 @Author : snowykami @Email : snowykami@outlook.com @File : manager.py @Software: PyCharm

class ChannelDeliver

def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])

源代码在GitHub上查看
python
def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]]):
+    self.active = active
+    self.passive = passive
+    self.channel_deliver_active = channel_deliver_active
+    self.channel_deliver_passive = channel_deliver_passive
+    self.publish = publish

class ProcessManager

def __init__(self, lifespan: Lifespan)

源代码在GitHub上查看
python
def __init__(self, lifespan: 'Lifespan'):
+    self.lifespan = lifespan
+    self.targets: dict[str, tuple[Callable, tuple, dict]] = {}
+    self.processes: dict[str, Process] = {}

async def _run_process(self, name: str)

说明: 开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task

参数:

  • name:
源代码在GitHub上查看
python
async def _run_process(self, name: str):
+    """
+        开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task
+        Args:
+            name:
+        Returns:
+        """
+    if name not in self.targets:
+        raise KeyError(f'Process {name} not found.')
+    chan_active = get_channel(f'{name}-active')
+
+    def _start_process():
+        process = Process(target=self.targets[name][0], args=self.targets[name][1], kwargs=self.targets[name][2], daemon=True)
+        self.processes[name] = process
+        process.start()
+    _start_process()
+    while True:
+        data = await chan_active.async_receive()
+        if data == 0:
+            logger.info(f'Stopping process {name}')
+            await self.lifespan.before_process_shutdown()
+            self.terminate(name)
+            break
+        elif data == 1:
+            logger.info(f'Restarting process {name}')
+            await self.lifespan.before_process_shutdown()
+            await self.lifespan.before_process_restart()
+            self.terminate(name)
+            _start_process()
+            continue
+        else:
+            logger.warning('Unknown data received, ignored.')

async def start_all(self)

说明: 对外启动方法,启动所有进程,创建asyncio task

源代码在GitHub上查看
python
async def start_all(self):
+    """
+        对外启动方法,启动所有进程,创建asyncio task
+        """
+    [asyncio.create_task(chan.start_receive_loop()) for chan in get_channels().values()]
+    [asyncio.create_task(sm.start_receive_loop()) for sm in [shared_memory]]
+    [asyncio.create_task(self._run_process(name)) for name in self.targets]

def add_target(self, name: str, target: TARGET_FUNC, args: tuple = (), kwargs = None)

说明: 添加进程

参数:

  • name: 进程名,用于获取和唯一标识
  • target: 进程函数
  • args: 进程函数参数
  • kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
源代码在GitHub上查看
python
def add_target(self, name: str, target: TARGET_FUNC, args: tuple=(), kwargs=None):
+    """
+        添加进程
+        Args:
+            name: 进程名,用于获取和唯一标识
+            target: 进程函数
+            args: 进程函数参数
+            kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
+        """
+    if kwargs is None:
+        kwargs = {}
+    chan_active: Channel = Channel(name=f'{name}-active')
+    chan_passive: Channel = Channel(name=f'{name}-passive')
+    channel_deliver = ChannelDeliver(active=chan_active, passive=chan_passive, channel_deliver_active=channel_deliver_active_channel, channel_deliver_passive=channel_deliver_passive_channel, publish=publish_channel)
+    self.targets[name] = (_delivery_channel_wrapper, (target, channel_deliver, shared_memory, *args), kwargs)

def join_all(self)

源代码在GitHub上查看
python
def join_all(self):
+    for name, process in self.targets:
+        process.join()

def terminate(self, name: str)

说明: 终止进程并从进程字典中删除

参数:

  • name:
源代码在GitHub上查看
python
def terminate(self, name: str):
+    """
+        终止进程并从进程字典中删除
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.processes:
+        logger.warning(f'Process {name} not found.')
+        return
+    process = self.processes[name]
+    process.terminate()
+    process.join(TIMEOUT)
+    if process.is_alive():
+        process.kill()
+    logger.success(f'Process {name} terminated.')

def terminate_all(self)

源代码在GitHub上查看
python
def terminate_all(self):
+    for name in self.targets:
+        self.terminate(name)

def is_process_alive(self, name: str) -> bool

说明: 检查进程是否存活

参数:

  • name:
源代码在GitHub上查看
python
def is_process_alive(self, name: str) -> bool:
+    """
+        检查进程是否存活
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.targets:
+        logger.warning(f'Process {name} not found.')
+    return self.processes[name].is_alive()

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/dev/dev.html b/dev/api/dev/dev.html new file mode 100644 index 00000000..bd4811ee --- /dev/null +++ b/dev/api/dev/dev.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.dev | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/dev/index.html b/dev/api/dev/index.html new file mode 100644 index 00000000..d16039c3 --- /dev/null +++ b/dev/api/dev/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.dev | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/dev/observer.html b/dev/api/dev/observer.html new file mode 100644 index 00000000..028b1d6a --- /dev/null +++ b/dev/api/dev/observer.html @@ -0,0 +1,69 @@ + + + + + + liteyuki.dev.observer | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.dev.observer

说明: 此模块用于注册观察者函数,使用watchdog监控文件变化并重启bot 启用该模块需要在配置文件中设置dev_mode为True

var CALLBACK_FUNC

  • 说明: 位置1为FileSystemEvent

  • 类型: TypeAlias

  • 默认值: Callable[[FileSystemEvent], None]

var FILTER_FUNC

  • 说明: 位置1为FileSystemEvent

  • 类型: TypeAlias

  • 默认值: Callable[[FileSystemEvent], bool]

def debounce(wait)

说明: 防抖函数

源代码在GitHub上查看
python
def debounce(wait):
+    """
+    防抖函数
+    """
+
+    def decorator(func):
+
+        def wrapper(*args, **kwargs):
+            nonlocal last_call_time
+            current_time = time.time()
+            if current_time - last_call_time > wait:
+                last_call_time = current_time
+                return func(*args, **kwargs)
+        last_call_time = None
+        return wrapper
+    return decorator

class CodeModifiedHandler(FileSystemEventHandler)

@debounce(1)

def on_modified(self, event)

源代码在GitHub上查看
python
@debounce(1)
+def on_modified(self, event):
+    raise NotImplementedError('on_modified must be implemented')

def on_created(self, event)

源代码在GitHub上查看
python
def on_created(self, event):
+    self.on_modified(event)

def on_deleted(self, event)

源代码在GitHub上查看
python
def on_deleted(self, event):
+    self.on_modified(event)

def on_moved(self, event)

源代码在GitHub上查看
python
def on_moved(self, event):
+    self.on_modified(event)

def on_any_event(self, event)

源代码在GitHub上查看
python
def on_any_event(self, event):
+    self.on_modified(event)

def on_file_system_event(directories: tuple[str], recursive: bool = True, event_filter: FILTER_FUNC = None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]

说明: 注册文件系统变化监听器

参数:

  • directories: 监听目录们
  • recursive: 是否递归监听子目录
  • event_filter: 事件过滤器, 返回True则执行回调函数

返回: 装饰器,装饰一个函数在接收到数据后执行

源代码在GitHub上查看
python
def on_file_system_event(directories: tuple[str], recursive: bool=True, event_filter: FILTER_FUNC=None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]:
+    """
+    注册文件系统变化监听器
+    Args:
+        directories: 监听目录们
+        recursive: 是否递归监听子目录
+        event_filter: 事件过滤器, 返回True则执行回调函数
+    Returns:
+        装饰器,装饰一个函数在接收到数据后执行
+    """
+
+    def decorator(func: CALLBACK_FUNC) -> CALLBACK_FUNC:
+
+        def wrapper(event: FileSystemEvent):
+            if event_filter is not None and (not event_filter(event)):
+                return
+            func(event)
+        code_modified_handler = CodeModifiedHandler()
+        code_modified_handler.on_modified = wrapper
+        for directory in directories:
+            observer.schedule(code_modified_handler, directory, recursive=recursive)
+        return func
+    return decorator

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/dev/plugin.html b/dev/api/dev/plugin.html new file mode 100644 index 00000000..e552909a --- /dev/null +++ b/dev/api/dev/plugin.html @@ -0,0 +1,37 @@ + + + + + + liteyuki.dev.plugin | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.dev.plugin

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : snowykami@outlook.com @File : plugin.py @Software: PyCharm

def run_plugins(*module_path: str | Path)

说明: 运行插件,无需手动初始化bot

参数:

  • module_path: 插件路径,参考liteyuki.load_plugin的函数签名
源代码在GitHub上查看
python
def run_plugins(*module_path: str | Path):
+    """
+    运行插件,无需手动初始化bot
+    Args:
+        module_path: 插件路径,参考`liteyuki.load_plugin`的函数签名
+    """
+    cfg = load_config_in_default()
+    plugins = cfg.get('liteyuki.plugins', [])
+    plugins.extend(module_path)
+    cfg['liteyuki.plugins'] = plugins
+    bot = LiteyukiBot(**cfg)
+    bot.run()

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/exception.html b/dev/api/exception.html new file mode 100644 index 00000000..8a3ca24d --- /dev/null +++ b/dev/api/exception.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.exception | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html new file mode 100644 index 00000000..fd78ff0d --- /dev/null +++ b/dev/api/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/log.html b/dev/api/log.html new file mode 100644 index 00000000..5a4457b6 --- /dev/null +++ b/dev/api/log.html @@ -0,0 +1,43 @@ + + + + + + liteyuki.log | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.log

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py @Software: PyCharm

def get_format(level: str) -> str

源代码在GitHub上查看
python
def get_format(level: str) -> str:
+    if level == 'DEBUG':
+        return debug_format
+    else:
+        return default_format

def init_log(config: dict)

说明: 在语言加载完成后执行

源代码在GitHub上查看
python
def init_log(config: dict):
+    """
+    在语言加载完成后执行
+    Returns:
+
+    """
+    logger.remove()
+    logger.add(sys.stdout, level=0, diagnose=False, format=get_format(config.get('log_level', 'INFO')))
+    show_icon = config.get('log_icon', True)
+    logger.level('DEBUG', color='<blue>', icon=f"{('🐛' if show_icon else '')}DEBUG")
+    logger.level('INFO', color='<normal>', icon=f"{('ℹ️' if show_icon else '')}INFO")
+    logger.level('SUCCESS', color='<green>', icon=f"{('✅' if show_icon else '')}SUCCESS")
+    logger.level('WARNING', color='<yellow>', icon=f"{('⚠️' if show_icon else '')}WARNING")
+    logger.level('ERROR', color='<red>', icon=f"{('⭕' if show_icon else '')}ERROR")

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/message/event.html b/dev/api/message/event.html new file mode 100644 index 00000000..0db283d5 --- /dev/null +++ b/dev/api/message/event.html @@ -0,0 +1,61 @@ + + + + + + liteyuki.message.event | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.event

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class MessageEvent

def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)

说明: 轻雪抽象消息事件

源代码在GitHub上查看
python
def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel['MessageEvent']]=None, data: Optional[dict[str, Any]]=None):
+    """
+        轻雪抽象消息事件
+        Args:
+
+            bot_id: 机器人ID
+            message: 消息,消息段数组[{type: str, data: dict[str, Any]}]
+            raw_message: 原始消息(通常为纯文本的格式)
+            message_type: 消息类型(private, group, other)
+
+            session_id: 会话ID(私聊通常为用户ID,群聊通常为群ID)
+            session_type: 会话类型(private, group)
+            receive_channel: 接收频道(用于回复消息)
+
+            data: 附加数据
+        """
+    if data is None:
+        data = {}
+    self.message_type = message_type
+    self.data = data
+    self.bot_id = bot_id
+    self.message = message
+    self.raw_message = raw_message
+    self.session_id = session_id
+    self.session_type = session_type
+    self.user_id = user_id
+    self.receive_channel = receive_channel

def reply(self, message: str | dict[str, Any])

说明: 回复消息

参数:

  • message:
源代码在GitHub上查看
python
def reply(self, message: str | dict[str, Any]):
+    """
+        回复消息
+        Args:
+            message:
+        Returns:
+        """
+    reply_event = MessageEvent(message_type=self.session_type, message=message, raw_message='', data={'message': message}, bot_id=self.bot_id, session_id=self.session_id, user_id=self.user_id, session_type=self.session_type, receive_channel=None)
+    if self.receive_channel:
+        self.receive_channel.send(reply_event)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/message/index.html b/dev/api/message/index.html new file mode 100644 index 00000000..e82fe7d8 --- /dev/null +++ b/dev/api/message/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.message | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/message/matcher.html b/dev/api/message/matcher.html new file mode 100644 index 00000000..35ed2a6c --- /dev/null +++ b/dev/api/message/matcher.html @@ -0,0 +1,60 @@ + + + + + + liteyuki.message.matcher | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.matcher

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:51 @Author : snowykami @Email : snowykami@outlook.com @File : matcher.py @Software: PyCharm

class Matcher

def __init__(self, rule: Rule, priority: int, block: bool)

说明: 匹配器

参数:

  • rule: 规则
  • priority: 优先级 >= 0
  • block: 是否阻断后续优先级更低的匹配器
源代码在GitHub上查看
python
def __init__(self, rule: Rule, priority: int, block: bool):
+    """
+        匹配器
+        Args:
+            rule: 规则
+            priority: 优先级 >= 0
+            block: 是否阻断后续优先级更低的匹配器
+        """
+    self.rule = rule
+    self.priority = priority
+    self.block = block
+    self.handlers: list[EventHandler] = []

def handle(self) -> Callable[[EventHandler], EventHandler]

说明: 添加处理函数,装饰器

返回: 装饰器 handler

源代码在GitHub上查看
python
def handle(self) -> Callable[[EventHandler], EventHandler]:
+    """
+        添加处理函数,装饰器
+        Returns:
+            装饰器 handler
+        """
+
+    def decorator(handler: EventHandler) -> EventHandler:
+        self.handlers.append(handler)
+        return handler
+    return decorator

async def run(self, event: MessageEvent) -> None

说明: 运行处理函数

参数:

  • event:
源代码在GitHub上查看
python
async def run(self, event: MessageEvent) -> None:
+    """
+        运行处理函数
+        Args:
+            event:
+        Returns:
+        """
+    if not await self.rule(event):
+        return
+    for handler in self.handlers:
+        try:
+            await handler(event)
+        except Exception:
+            traceback.print_exc()

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/message/message.html b/dev/api/message/message.html new file mode 100644 index 00000000..afd8bb3c --- /dev/null +++ b/dev/api/message/message.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.message | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/message/on.html b/dev/api/message/on.html new file mode 100644 index 00000000..20eae514 --- /dev/null +++ b/dev/api/message/on.html @@ -0,0 +1,40 @@ + + + + + + liteyuki.message.on | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.on

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:52 @Author : snowykami @Email : snowykami@outlook.com @File : on.py @Software: PyCharm

def add_matcher(matcher: Matcher)

源代码在GitHub上查看
python
def add_matcher(matcher: Matcher):
+    for i, m in enumerate(_matcher_list):
+        if m.priority < matcher.priority:
+            _matcher_list.insert(i, matcher)
+            break
+    else:
+        _matcher_list.append(matcher)

def on_message(rule: Rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

源代码在GitHub上查看
python
def on_message(rule: Rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+    matcher = Matcher(rule, priority, block)
+    add_matcher(matcher)
+    return matcher

def on_keywords(keywords: list[str], rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

源代码在GitHub上查看
python
def on_keywords(keywords: list[str], rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+
+    @Rule
+    async def on_keywords_rule(event: MessageEvent):
+        return any((keyword in event.raw_message for keyword in keywords))
+    return on_message(on_keywords_rule & rule, priority, block)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/message/rule.html b/dev/api/message/rule.html new file mode 100644 index 00000000..ae49ac7e --- /dev/null +++ b/dev/api/message/rule.html @@ -0,0 +1,42 @@ + + + + + + liteyuki.message.rule | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.rule

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:55 @Author : snowykami @Email : snowykami@outlook.com @File : rule.py @Software: PyCharm

var RuleHandlerFunc

  • 说明: 规则函数签名

  • 类型: TypeAlias

  • 默认值: Callable[[MessageEvent], Coroutine[None, None, bool]]

class Rule

def __init__(self, handler: RuleHandlerFunc)

源代码在GitHub上查看
python
def __init__(self, handler: RuleHandlerFunc):
+    self.handler = handler

def __or__(self, other: Rule) -> Rule

源代码在GitHub上查看
python
def __or__(self, other: 'Rule') -> 'Rule':
+
+    async def combined_handler(event: MessageEvent) -> bool:
+        return await self.handler(event) or await other.handler(event)
+    return Rule(combined_handler)

def __and__(self, other: Rule) -> Rule

源代码在GitHub上查看
python
def __and__(self, other: 'Rule') -> 'Rule':
+
+    async def combined_handler(event: MessageEvent) -> bool:
+        return await self.handler(event) and await other.handler(event)
+    return Rule(combined_handler)

async def __call__(self, event: MessageEvent) -> bool

源代码在GitHub上查看
python
async def __call__(self, event: MessageEvent) -> bool:
+    if self.handler is None:
+        return True
+    return await self.handler(event)

@Rule

async def empty_rule(event: MessageEvent) -> bool

源代码在GitHub上查看
python
@Rule
+async def empty_rule(event: MessageEvent) -> bool:
+    return True

@Rule

async def is_su_rule(event: MessageEvent) -> bool

源代码在GitHub上查看
python
@Rule
+async def is_su_rule(event: MessageEvent) -> bool:
+    return str(event.user_id) in _superusers

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/message/session.html b/dev/api/message/session.html new file mode 100644 index 00000000..20cfef0d --- /dev/null +++ b/dev/api/message/session.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.message.session | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/mkdoc.html b/dev/api/mkdoc.html new file mode 100644 index 00000000..f9676497 --- /dev/null +++ b/dev/api/mkdoc.html @@ -0,0 +1,186 @@ + + + + + + liteyuki.mkdoc | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.mkdoc

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 上午6:23 @Author : snowykami @Email : snowykami@outlook.com @File : mkdoc.py @Software: PyCharm

class DefType(Enum)

attr FUNCTION = 'function'

attr METHOD = 'method'

attr STATIC_METHOD = 'staticmethod'

attr CLASS_METHOD = 'classmethod'

attr PROPERTY = 'property'

class FunctionInfo(BaseModel)

attr name: str = NO_DEFAULT

attr args: list[tuple[str, str]] = NO_DEFAULT

attr return_type: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr source_code: str = ''

attr type: DefType = NO_DEFAULT

attr is_async: bool = NO_DEFAULT

class AttributeInfo(BaseModel)

attr name: str = NO_DEFAULT

attr type: str = NO_DEFAULT

attr value: Any = None

attr docstring: str = ''

class ClassInfo(BaseModel)

attr name: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr methods: list[FunctionInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr inherit: list[str] = NO_DEFAULT

class ModuleInfo(BaseModel)

attr module_path: str = NO_DEFAULT

attr functions: list[FunctionInfo] = NO_DEFAULT

attr classes: list[ClassInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr docstring: str = NO_DEFAULT

def get_relative_path(base_path: str, target_path: str) -> str

说明: 获取相对路径

参数:

  • base_path: 基础路径
  • target_path: 目标路径
源代码在GitHub上查看
python
def get_relative_path(base_path: str, target_path: str) -> str:
+    """
+    获取相对路径
+    Args:
+        base_path: 基础路径
+        target_path: 目标路径
+    """
+    return os.path.relpath(target_path, base_path)

def write_to_files(file_data: dict[str, str])

说明: 输出文件

参数:

  • file_data: 文件数据 相对路径
源代码在GitHub上查看
python
def write_to_files(file_data: dict[str, str]):
+    """
+    输出文件
+    Args:
+        file_data: 文件数据 相对路径
+    """
+    for rp, data in file_data.items():
+        if not os.path.exists(os.path.dirname(rp)):
+            os.makedirs(os.path.dirname(rp))
+        with open(rp, 'w', encoding='utf-8') as f:
+            f.write(data)

def get_file_list(module_folder: str)

源代码在GitHub上查看
python
def get_file_list(module_folder: str):
+    file_list = []
+    for root, dirs, files in os.walk(module_folder):
+        for file in files:
+            if file.endswith(('.py', '.pyi')):
+                file_list.append(os.path.join(root, file))
+    return file_list

def get_module_info_normal(file_path: str, ignore_private: bool = True) -> ModuleInfo

说明: 获取函数和类

参数:

  • file_path: Python 文件路径
  • ignore_private: 忽略私有函数和类

返回: 模块信息

源代码在GitHub上查看
python
def get_module_info_normal(file_path: str, ignore_private: bool=True) -> ModuleInfo:
+    """
+    获取函数和类
+    Args:
+        file_path: Python 文件路径
+        ignore_private: 忽略私有函数和类
+    Returns:
+        模块信息
+    """
+    with open(file_path, 'r', encoding='utf-8') as file:
+        file_content = file.read()
+        tree = ast.parse(file_content)
+    dot_sep_module_path = file_path.replace(os.sep, '.').replace('.py', '').replace('.pyi', '')
+    module_docstring = ast.get_docstring(tree)
+    module_info = ModuleInfo(module_path=dot_sep_module_path, functions=[], classes=[], attributes=[], docstring=module_docstring if module_docstring else '')
+    for node in ast.walk(tree):
+        if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
+            if not any((isinstance(parent, ast.ClassDef) for parent in ast.iter_child_nodes(node))) and (not ignore_private or not node.name.startswith('_')):
+                if node.args.args:
+                    first_arg = node.args.args[0]
+                    if first_arg.arg in ('self', 'cls'):
+                        continue
+                function_docstring = ast.get_docstring(node)
+                func_info = FunctionInfo(name=node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in node.args.args], return_type=ast.unparse(node.returns) if node.returns else 'None', docstring=function_docstring if function_docstring else '', type=DefType.FUNCTION, is_async=isinstance(node, ast.AsyncFunctionDef), source_code=ast.unparse(node))
+                module_info.functions.append(func_info)
+        elif isinstance(node, ast.ClassDef):
+            class_docstring = ast.get_docstring(node)
+            class_info = ClassInfo(name=node.name, docstring=class_docstring if class_docstring else '', methods=[], attributes=[], inherit=[ast.unparse(base) for base in node.bases])
+            for class_node in node.body:
+                if isinstance(class_node, ast.FunctionDef) and (not ignore_private or not class_node.name.startswith('_') or class_node.name == '__init__'):
+                    method_docstring = ast.get_docstring(class_node)
+                    def_type = DefType.METHOD
+                    if class_node.decorator_list:
+                        if any((isinstance(decorator, ast.Name) and decorator.id == 'staticmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.STATIC_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'classmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.CLASS_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'property' for decorator in class_node.decorator_list)):
+                            def_type = DefType.PROPERTY
+                    class_info.methods.append(FunctionInfo(name=class_node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in class_node.args.args], return_type=ast.unparse(class_node.returns) if class_node.returns else 'None', docstring=method_docstring if method_docstring else '', type=def_type, is_async=isinstance(class_node, ast.AsyncFunctionDef), source_code=ast.unparse(class_node)))
+                elif isinstance(class_node, ast.Assign):
+                    for target in class_node.targets:
+                        if isinstance(target, ast.Name):
+                            class_info.attributes.append(AttributeInfo(name=target.id, type=ast.unparse(class_node.value)))
+            module_info.classes.append(class_info)
+        elif isinstance(node, ast.Assign):
+            if not any((isinstance(parent, (ast.ClassDef, ast.FunctionDef)) for parent in ast.iter_child_nodes(node))):
+                for target in node.targets:
+                    if isinstance(target, ast.Name) and (not ignore_private or not target.id.startswith('_')):
+                        attr_type = NO_TYPE_HINT
+                        if isinstance(node.value, ast.AnnAssign) and node.value.annotation:
+                            attr_type = ast.unparse(node.value.annotation)
+                        module_info.attributes.append(AttributeInfo(name=target.id, type=attr_type, value=ast.unparse(node.value) if node.value else None))
+    return module_info

def generate_markdown(module_info: ModuleInfo, front_matter = None, lang: str = 'zh-CN') -> str

说明: 生成模块的Markdown 你可在此自定义生成的Markdown格式

参数:

  • module_info: 模块信息
  • front_matter: 自定义选项title, index, icon, category
  • lang: 语言

返回: Markdown 字符串

源代码在GitHub上查看
python
def generate_markdown(module_info: ModuleInfo, front_matter=None, lang: str='zh-CN') -> str:
+    """
+    生成模块的Markdown
+    你可在此自定义生成的Markdown格式
+    Args:
+        module_info: 模块信息
+        front_matter: 自定义选项title, index, icon, category
+        lang: 语言
+    Returns:
+        Markdown 字符串
+    """
+    content = ''
+    front_matter = '---\n' + '\n'.join([f'{k}: {v}' for k, v in front_matter.items()]) + '\n---\n\n'
+    content += front_matter
+    for func in module_info.functions:
+        args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in func.args]
+        content += f"### ***{('async ' if func.is_async else '')}def*** `{func.name}({', '.join(args_with_type)}) -> {func.return_type}`\n\n"
+        func.docstring = func.docstring.replace('\n', '\n\n')
+        content += f'{func.docstring}\n\n'
+        content += f'<details>\n<summary>源代码</summary>\n\n```python\n{func.source_code}\n```\n</details>\n\n'
+    for cls in module_info.classes:
+        if cls.inherit:
+            inherit = f"({', '.join(cls.inherit)})" if cls.inherit else ''
+            content += f'### ***class*** `{cls.name}{inherit}`\n\n'
+        else:
+            content += f'### ***class*** `{cls.name}`\n\n'
+        cls.docstring = cls.docstring.replace('\n', '\n\n')
+        content += f'{cls.docstring}\n\n'
+        for method in cls.methods:
+            if method.type != DefType.METHOD:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in method.args]
+                content += f'### &emsp; ***@{method.type.value}***\n'
+            else:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] and arg[0] != 'self' else arg[0] for arg in method.args]
+            content += f"### &emsp; ***{('async ' if method.is_async else '')}def*** `{method.name}({', '.join(args_with_type)}) -> {method.return_type}`\n\n"
+            method.docstring = method.docstring.replace('\n', '\n\n')
+            content += f'&emsp;{method.docstring}\n\n'
+            if lang == 'zh-CN':
+                TEXT_SOURCE_CODE = '源代码'
+            else:
+                TEXT_SOURCE_CODE = 'Source Code'
+            content += f'<details>\n<summary>{TEXT_SOURCE_CODE}</summary>\n\n```python\n{method.source_code}\n```\n</details>\n\n'
+        for attr in cls.attributes:
+            content += f'### &emsp; ***attr*** `{attr.name}: {attr.type}`\n\n'
+    for attr in module_info.attributes:
+        if attr.type == NO_TYPE_HINT:
+            content += f'### ***var*** `{attr.name} = {attr.value}`\n\n'
+        else:
+            content += f'### ***var*** `{attr.name}: {attr.type} = {attr.value}`\n\n'
+        attr.docstring = attr.docstring.replace('\n', '\n\n')
+        content += f'{attr.docstring}\n\n'
+    return content

def generate_docs(module_folder: str, output_dir: str, with_top: bool = False, lang: str = 'zh-CN', ignored_paths = None)

说明: 生成文档

参数:

  • module_folder: 模块文件夹
  • output_dir: 输出文件夹
  • with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
  • ignored_paths: 忽略的路径
  • lang: 语言
源代码在GitHub上查看
python
def generate_docs(module_folder: str, output_dir: str, with_top: bool=False, lang: str='zh-CN', ignored_paths=None):
+    """
+    生成文档
+    Args:
+        module_folder: 模块文件夹
+        output_dir: 输出文件夹
+        with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
+        ignored_paths: 忽略的路径
+        lang: 语言
+    """
+    if ignored_paths is None:
+        ignored_paths = []
+    file_data: dict[str, str] = {}
+    file_list = get_file_list(module_folder)
+    shutil.rmtree(output_dir, ignore_errors=True)
+    os.mkdir(output_dir)
+    replace_data = {'__init__': 'README', '.py': '.md'}
+    for pyfile_path in file_list:
+        if any((ignored_path.replace('\\', '/') in pyfile_path.replace('\\', '/') for ignored_path in ignored_paths)):
+            continue
+        no_module_name_pyfile_path = get_relative_path(module_folder, pyfile_path)
+        rel_md_path = pyfile_path if with_top else no_module_name_pyfile_path
+        for rk, rv in replace_data.items():
+            rel_md_path = rel_md_path.replace(rk, rv)
+        abs_md_path = os.path.join(output_dir, rel_md_path)
+        module_info = get_module_info_normal(pyfile_path)
+        if 'README' in abs_md_path:
+            front_matter = {'title': module_info.module_path.replace('.__init__', '').replace('_', '\\n'), 'index': 'true', 'icon': 'laptop-code', 'category': 'API'}
+        else:
+            front_matter = {'title': module_info.module_path.replace('_', '\\n'), 'order': '1', 'icon': 'laptop-code', 'category': 'API'}
+        md_content = generate_markdown(module_info, front_matter)
+        print(f'Generate {pyfile_path} -> {abs_md_path}')
+        file_data[abs_md_path] = md_content
+    write_to_files(file_data)

var no_module_name_pyfile_path

  • 说明: 去头路径

  • 默认值: get_relative_path(module_folder, pyfile_path)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/plugin/index.html b/dev/api/plugin/index.html new file mode 100644 index 00000000..4f946b66 --- /dev/null +++ b/dev/api/plugin/index.html @@ -0,0 +1,32 @@ + + + + + + liteyuki.plugin | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/plugin/load.html b/dev/api/plugin/load.html new file mode 100644 index 00000000..3b74d8a5 --- /dev/null +++ b/dev/api/plugin/load.html @@ -0,0 +1,108 @@ + + + + + + liteyuki.plugin.load | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugin.load

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : snowykami@outlook.com @File : load.py @Software: PyCharm

def load_plugin(module_path: str | Path) -> Optional[Plugin]

说明: 加载单个插件,可以是本地插件或是通过 pip 安装的插件。

参数:

  • module_path: 插件名称 path.to.your.plugin
  • 或插件路径 pathlib.Path(path/to/your/plugin):
源代码在GitHub上查看
python
def load_plugin(module_path: str | Path) -> Optional[Plugin]:
+    """加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
+
+    参数:
+        module_path: 插件名称 `path.to.your.plugin`
+        或插件路径 `pathlib.Path(path/to/your/plugin)`
+    """
+    module_path = path_to_module_name(Path(module_path)) if isinstance(module_path, Path) else module_path
+    try:
+        module = import_module(module_path)
+        _plugins[module.__name__] = Plugin(name=module.__name__, module=module, module_name=module_path)
+        if module.__dict__.get('__plugin_metadata__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_metadata__']
+            display_name = module.__name__.split('.')[-1]
+        elif module.__dict__.get('__liteyuki_plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__liteyuki_plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        elif module.__dict__.get('__plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        else:
+            logger.opt(colors=True).warning(f'The metadata of Liteyuki plugin "{module.__name__}" is not specified, use empty.')
+            metadata = PluginMetadata(name=module.__name__)
+            display_name = module.__name__.split('.')[-1]
+        _plugins[module.__name__].metadata = metadata
+        logger.opt(colors=True).success(f'Succeeded to load liteyuki plugin "{display_name}"')
+        return _plugins[module.__name__]
+    except Exception as e:
+        logger.opt(colors=True).success(f'Failed to load liteyuki plugin "<r>{module_path}</r>"')
+        traceback.print_exc()
+        return None

def load_plugins(*plugin_dir: str, *, ignore_warning: bool = True) -> set[Plugin]

说明: 导入文件夹下多个插件

参数:

  • plugin_dir: 文件夹路径
  • ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
源代码在GitHub上查看
python
def load_plugins(*plugin_dir: str, ignore_warning: bool=True) -> set[Plugin]:
+    """导入文件夹下多个插件
+
+    参数:
+        plugin_dir: 文件夹路径
+        ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
+    """
+    plugins = set()
+    for dir_path in plugin_dir:
+        if not os.path.exists(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' does not exist.")
+            continue
+        if not os.listdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is empty.")
+            continue
+        if not os.path.isdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is not a directory.")
+            continue
+        for f in os.listdir(dir_path):
+            path = Path(os.path.join(dir_path, f))
+            module_name = None
+            if os.path.isfile(path) and f.endswith('.py') and (f != '__init__.py'):
+                module_name = f'{path_to_module_name(Path(dir_path))}.{f[:-3]}'
+            elif os.path.isdir(path) and os.path.exists(os.path.join(path, '__init__.py')):
+                module_name = path_to_module_name(path)
+            if module_name:
+                load_plugin(module_name)
+                if _plugins.get(module_name):
+                    plugins.add(_plugins[module_name])
+    return plugins

def format_display_name(display_name: str, plugin_type: PluginType) -> str

说明: 设置插件名称颜色,根据不同类型插件设置颜色

参数:

  • display_name: 插件名称
  • plugin_type: 插件类型

返回: str: 设置后的插件名称

源代码在GitHub上查看
python
def format_display_name(display_name: str, plugin_type: PluginType) -> str:
+    """
+    设置插件名称颜色,根据不同类型插件设置颜色
+    Args:
+        display_name: 插件名称
+        plugin_type: 插件类型
+
+    Returns:
+        str: 设置后的插件名称 <y>name</y>
+    """
+    color = 'y'
+    match plugin_type:
+        case PluginType.APPLICATION:
+            color = 'm'
+        case PluginType.TEST:
+            color = 'g'
+        case PluginType.MODULE:
+            color = 'e'
+        case PluginType.SERVICE:
+            color = 'c'
+    return f'<{color}>{display_name} [{plugin_type.name}]</{color}>'

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/plugin/manager.html b/dev/api/plugin/manager.html new file mode 100644 index 00000000..d9dd381a --- /dev/null +++ b/dev/api/plugin/manager.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.plugin.manager | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/plugin/model.html b/dev/api/plugin/model.html new file mode 100644 index 00000000..6c3d82b9 --- /dev/null +++ b/dev/api/plugin/model.html @@ -0,0 +1,27 @@ + + + + + + liteyuki.plugin.model | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugin.model

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/24 上午12:02 @Author : snowykami @Email : snowykami@outlook.com @File : model.py @Software: PyCharm

class PluginType(Enum)

attr APPLICATION = 'application'

attr SERVICE = 'service'

attr MODULE = 'module'

attr UNCLASSIFIED = 'unclassified'

attr TEST = 'test'

class PluginMetadata(BaseModel)

attr name: str = NO_DEFAULT

attr description: str = ''

attr usage: str = ''

attr type: PluginType = PluginType.UNCLASSIFIED

attr author: str = ''

attr homepage: str = ''

attr extra: dict[str, Any] = {}

class Plugin(BaseModel)

def __hash__(self)

源代码在GitHub上查看
python
def __hash__(self):
+    return hash(self.module_name)

attr model_config = {'arbitrary_types_allowed': True}

attr name: str = NO_DEFAULT

attr module: ModuleType = NO_DEFAULT

attr module_name: str = NO_DEFAULT

attr metadata: Optional[PluginMetadata] = None

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/plugin/plugin.html b/dev/api/plugin/plugin.html new file mode 100644 index 00000000..8bce9bfe --- /dev/null +++ b/dev/api/plugin/plugin.html @@ -0,0 +1,32 @@ + + + + + + liteyuki.plugin | 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/api/plugins/liteecho.html b/dev/api/plugins/liteecho.html new file mode 100644 index 00000000..9cee7359 --- /dev/null +++ b/dev/api/plugins/liteecho.html @@ -0,0 +1,28 @@ + + + + + + liteyuki.plugins.liteecho | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugins.liteecho

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/22 下午12:31 @Author : snowykami @Email : snowykami@outlook.com @File : liteecho.py @Software: PyCharm

@on_startswith(['liteecho'], rule=is_su_rule).handle()

async def liteecho(event: MessageEvent)

源代码在GitHub上查看
python
@on_startswith(['liteecho'], rule=is_su_rule).handle()
+async def liteecho(event: MessageEvent):
+    event.reply(event.raw_message.strip()[8:].strip())

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/plugins/plugin_loader/index.html b/dev/api/plugins/plugin_loader/index.html new file mode 100644 index 00000000..fd53f157 --- /dev/null +++ b/dev/api/plugins/plugin_loader/index.html @@ -0,0 +1,33 @@ + + + + + + liteyuki.plugins.plugin_loader | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugins.plugin_loader

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

说明: 默认插件加载器,应在初始化时调用

源代码在GitHub上查看
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/plugins/plugin_loader/plugin_loader.html b/dev/api/plugins/plugin_loader/plugin_loader.html new file mode 100644 index 00000000..2629a37c --- /dev/null +++ b/dev/api/plugins/plugin_loader/plugin_loader.html @@ -0,0 +1,33 @@ + + + + + + liteyuki.plugins.plugin_loader | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugins.plugin_loader

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

说明: 默认插件加载器,应在初始化时调用

源代码在GitHub上查看
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/api/utils.html b/dev/api/utils.html new file mode 100644 index 00000000..4c1563c7 --- /dev/null +++ b/dev/api/utils.html @@ -0,0 +1,95 @@ + + + + + + liteyuki.utils | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

liteyuki.utils

说明: 一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改

def is_coroutine_callable(call: Callable[..., Any]) -> bool

说明: 判断是否为协程可调用对象

参数:

  • call: 可调用对象

返回: bool: 是否为协程可调用对象

源代码在GitHub上查看
python
def is_coroutine_callable(call: Callable[..., Any]) -> bool:
+    """
+    判断是否为协程可调用对象
+    Args:
+        call: 可调用对象
+    Returns:
+        bool: 是否为协程可调用对象
+    """
+    if inspect.isroutine(call):
+        return inspect.iscoroutinefunction(call)
+    if inspect.isclass(call):
+        return False
+    func_ = getattr(call, '__call__', None)
+    return inspect.iscoroutinefunction(func_)

def run_coroutine(*coro: Coroutine)

说明: 运行协程

参数:

  • coro:
源代码在GitHub上查看
python
def run_coroutine(*coro: Coroutine):
+    """
+    运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    try:
+        loop = asyncio.get_running_loop()
+        if loop.is_running():
+            for c in coro:
+                asyncio.ensure_future(c)
+        else:
+            for c in coro:
+                loop.run_until_complete(c)
+    except RuntimeError:
+        loop = asyncio.new_event_loop()
+        asyncio.set_event_loop(loop)
+        loop.run_until_complete(asyncio.gather(*coro))
+        loop.close()
+    except Exception as e:
+        logger.error(f'Exception occurred: {e}')

def run_coroutine_in_thread(*coro: Coroutine)

说明: 在新线程中运行协程

参数:

  • coro:
源代码在GitHub上查看
python
def run_coroutine_in_thread(*coro: Coroutine):
+    """
+    在新线程中运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    threading.Thread(target=run_coroutine, args=coro, daemon=True).start()

def path_to_module_name(path: Path) -> str

说明: 转换路径为模块名

参数:

  • path: 路径a/b/c/d -> a.b.c.d

返回: str: 模块名

源代码在GitHub上查看
python
def path_to_module_name(path: Path) -> str:
+    """
+    转换路径为模块名
+    Args:
+        path: 路径a/b/c/d -> a.b.c.d
+    Returns:
+        str: 模块名
+    """
+    rel_path = path.resolve().relative_to(Path.cwd().resolve())
+    if rel_path.stem == '__init__':
+        return '.'.join(rel_path.parts[:-1])
+    else:
+        return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]

说明: 异步包装器

参数:

  • func: Sync Callable

返回: Coroutine: Asynchronous Callable

源代码在GitHub上查看
python
def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]:
+    """
+    异步包装器
+    Args:
+        func: Sync Callable
+    Returns:
+        Coroutine: Asynchronous Callable
+    """
+
+    async def wrapper(*args, **kwargs):
+        return func(*args, **kwargs)
+    wrapper.__signature__ = inspect.signature(func)
+    return wrapper

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/comm.html b/dev/comm.html new file mode 100644 index 00000000..a737a41b --- /dev/null +++ b/dev/comm.html @@ -0,0 +1,68 @@ + + + + + + 进程通信 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

通道通信

简介

轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信, 轻雪提供了一个通道Channel用于跨进程通信, 你可以通过Channel发送消息给其他进程,也可以监听其他进程的消息。

例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。

示例

通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由chan.on_receive()装饰回调函数实现,主动模式需调用chan.receive()实现

  • 创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为{process_name}-active{process_name}-passive
  • 主进程中通过get_channel函数获取通道对象
  • 子进程中导入单例active_channelpassive_channel即可

在轻雪插件中(主进程中)

python
import asyncio
+
+from liteyuki.comm import get_channel, Channel
+from liteyuki import get_bot
+
+# get_channel函数获取通道对象,参数为调用set_channel时的通道标识
+channel_passive = get_channel("nonebot-passive")  # 获取被动通道
+channel_active = get_channel("nonebot-active")  # 获取主动通道
+liteyuki_bot = get_bot()
+
+
+# 注册一个函数在轻雪启动后运行
+@liteyuki_bot.on_after_start
+async def send_data():
+    while True:
+        channel_passive.send("I am liteyuki main process passive")
+        channel_active.send("I am liteyuki main process active")
+        await asyncio.sleep(3)  # 每3秒发送一次消息

在子进程中(例如NoneBot插件中)

python
from nonebot import get_driver
+from liteyuki.comm import active_channel, passive_channel  # 子进程中获取通道直接导入进程全局单例即可
+from liteyuki.log import logger
+
+driver = get_driver()
+
+
+# 被动模式,通过装饰器注册一个函数在接收到消息时运行,每次接收到字符串数据时都会运行
+@passive_channel.on_receive(filter_func=lambda data: isinstance(data, str))
+async def on_passive_receive(data):
+    logger.info(f"Passive receive: {data}")
+
+
+# 注册一个函数在NoneBot启动后运行
+@driver.on_startup
+def on_startup():
+    while True:
+        data = active_channel.receive()
+        logger.info(f"Active receive: {data}")

启动后控制台输出

log
0000-00-00 00:00:00 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:00 [ℹ️信息] Active receive: I am liteyuki main process active
+0000-00-00 00:00:03 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:03 [ℹ️信息] Active receive: I am liteyuki main process active
+...

共享内存通信

简介

  • 相比于普通进程通信,内存共享使得代码编写更加简洁,轻雪框架提供了一个内存共享通信的接口,你可以通过storage模块实现内存共享通信,该模块封装通道实现
  • 内存共享是线程安全的,你可以在多个线程中读写共享内存,线程锁会自动保护共享内存的读写操作

示例

在任意进程中均可使用

python
from liteyuki.comm.storage import shared_memory
+
+shared_memory.set("key", "value")  # 设置共享内存
+value = shared_memory.get("key")  # 获取共享内存

源代码:liteyuki/comm/storage.py

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/lyfunc.html b/dev/lyfunc.html new file mode 100644 index 00000000..6c292321 --- /dev/null +++ b/dev/lyfunc.html @@ -0,0 +1,45 @@ + + + + + + 轻雪函数 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

轻雪函数

轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.

函数文件

函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.mcfunction,文件内容为一系列的命令,每行一个命令,支持单行注释#(编辑时的语法高亮可采取shell格式),例如:

shell
# 在发信器输出"hello world"
+cmd echo hello world
+
+# 如果你想同时输出多行内容可以尝试换行符(Python格式)
+cmd echo hello world\nLiteyuki bot

也支持句末注释,例如:

shell
cmd echo hello world # 输出"hello world"

命令文档

shell
var <var1=value1> [var2=value2] ...  # 定义变量
+cmd <command>  # 在设备上执行命令
+api <api_name> [var=value...]  # 调用Bot API
+function <func_name> # 调用函数,可递归
+sleep <time>  # 异步等待,单位s
+nohup <command>  # 使用新的task执行命令,即不等待
+end # 结束函数关键字,包括子task
+await # 等待所有异步任务结束,若函数中启动了其他task,需要在最后调用,否则task对象会被销毁

示例

shell
# 疯狂戳好友
+# 使用 /function poke user_id=123456 执行
+# 每隔0.2s戳两次,无限戳,会触发最大递归深度限制
+# 若要戳20s后停止,则需要删除await,添加sleep 20和end
+api friend_poke user_id=user_id
+api friend_poke user_id=user_id
+sleep 0.2
+nohup function poke
+await

API

理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.

Onebot v11 API文档

结束关键字

由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.

await 异步任务结束关键字,用于结束当前已完成function的执行

WARNING

但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁

TIP

编写轻雪函数推荐你使用VS Code插件Liteyuki Function实现语法高亮

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/plugin.html b/dev/plugin.html new file mode 100644 index 00000000..87b45f61 --- /dev/null +++ b/dev/plugin.html @@ -0,0 +1,57 @@ + + + + + + 轻雪插件开发 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

简介

轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能

开始

创建插件

一个.py文件或一个包含__init__.py的文件夹即可被识别为插件

首先创建一个文件夹,例如watchdog_plugin,并在其中创建一个__init__.py文件,即可创建一个插件

__init__.py

python
from liteyuki.plugin import PluginMetadata, PluginType
+from .watch_dog import *    # 导入逻辑部分
+
+# 定义插件元数据
+__plugin_meta__ = PluginMetadata(
+    name="NoneDog",  # 插件名称
+    version="1.0.0",  # 插件版本
+    description="A simple plugin for nonebot developer",  # 插件描述
+    type=PluginType.SERVICE  # 插件类型
+)
+
+# 你的插件代码
+...

编写逻辑部分

轻雪主进程不涉及聊天部分,因此插件主要是一些后台任务或者与聊天机器人的通信 以下我们会编写一个简单的插件,用于开发NoneBot时进行文件系统变更重载 watch_dog.py

python
import os
+from liteyuki.dev import observer  # 导入文件系统观察器
+from liteyuki import get_bot, logger  # 导入轻雪Bot和日志
+from watchdog.events import FileSystemEvent  # 导入文件系统事件
+
+liteyuki = get_bot()  # 获取唯一的轻雪Bot实例
+
+exclude_extensions = (".pyc", ".pyo")  # 排除的文件扩展名
+
+
+# 用observer的on_file_system_event装饰器监听文件系统事件
+@observer.on_file_system_event(
+    directories=("src/nonebot_plugins",),
+    event_filter=lambda event: not event.src_path.endswith(exclude_extensions) and ("__pycache__" not in event.src_path) and os.path.isfile(event.src_path)
+)
+def restart_nonebot_process(event: FileSystemEvent):
+    logger.debug(f"File {event.src_path} changed, reloading nonebot...")
+    liteyuki.restart_process("nonebot")  # 调用重启进程方法

加载插件

方法1

  • 在配置文件中的liteyuki.plugins中添加你的插件路径,例如watchdog_plugin,重启轻雪即可加载插件。

方法2

  • 使用开发工具快速运行插件,无需手动创建实例
  • 创建入口文件,例如main.py,并在其中写入以下代码
python
from liteyuki.dev.plugin import run_plugins
+
+run_plugins("watchdog_plugin")

然后运行python main.py即可启动插件

启用插件后,我们在src/nonebot_plugins下创建一个文件,例如test.py,并在其中写入一些代码,保存后轻雪会自动重载NoneBot进程

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/dev/resource.html b/dev/resource.html new file mode 100644 index 00000000..6a4dfc04 --- /dev/null +++ b/dev/resource.html @@ -0,0 +1,38 @@ + + + + + + 资源包开发 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

简介

资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码

  • 资源/主题商店提供了一些资源包供你选择,你也可以自己制作资源包
  • 资源包的制作很简单,如果你接触过Minecraft的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
  • 部分内容制作需要一点点前端基础,例如htmlcss
  • 轻雪原版资源包请查看LiteyukiBot/liteyuki/resources,可以在此基础上进行修改
  • 欢迎各位投稿资源包到轻雪资源商店

请注意,主题包中的html渲染使用Js来规定数据的渲染位置,请确保您所编写的html代码能被Bot解析,否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码,以避免出现无法预料的问题。


加载资源包

  • 资源包通常是以.zip格式压缩的,只需要将其解压到根目录resources目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
shell
main.py
+resources
+└─resource_pack_1
+    ├─metadata.yml
+    ├─templates
+    └───...
+└─resource_pack_2
+    ├─metadata.yml
+    └─...
  • 你自己制作的资源包也应该遵循这个规则,并且应该在metadata.yml中填写一些信息
  • 若没有metadata.yml文件,则该文件夹不会被识别为资源包
yaml
name: "资源包名称"
+version: "1.0.0"
+description: "资源包描述"
+# 你可以自定义一些信息,但请保证以上三个字段
+...
  • 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个index.html文件,B包也定义了一个index.html文件,那么加载B包后,A包中的index.html文件会被覆盖
  • 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了templates/index.html,在B中定义了templates/style.css,可以在A的index.html中用./style.css相对路径引用B中的css

TIP

资源包的结构会随着轻雪的更新而有变动,第三方资源包开发者需要注意版本兼容性,同时用户也应该自行选择可用的资源包

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/en/deploy/config.html b/en/deploy/config.html new file mode 100644 index 00000000..7c465fcc --- /dev/null +++ b/en/deploy/config.html @@ -0,0 +1,54 @@ + + + + + + Configurations | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

Configurations

LiteyukiBot supports yaml, json, and toml as configuration files, depending on your personal preference.

When you first run LiteyukiBot, it will generate config.yml and the config directory. You can modify the configuration items and restart LiteyukiBot. In most cases, you only need to modify the superusers and nickname fields.

When starting, LiteyukiBot will load all configuration files in the project directory config.yml/yaml/json/toml and the config directory. You can create multiple configuration files in the config directory, and LiteyukiBot will automatically merge these configuration files.

Basic Configuration

yaml
# NoneBot configuration
+nonebot:
+  command_start: [ "/", "" ] # Command prefix, if there is no "" empty command header, please enable alconna_use_command_start to ensure alconna parsing is normal
+  host: 127.0.0.1 # Listening address, default is local, if you want to receive external requests, please fill in
+  port: 20216 # Binding port
+  nickname: [ "liteyuki" ]  # Bot nickname list
+  superusers: [ "1919810" ]  # Superuser list
+liteyuki:
+  log_level: "INFO" # Log level
+  log_icon: true # Whether to display the log level icon (some console fonts are not available)
+  auto_report: true # Whether to automatically report problems to Liteyuki server
+  auto_update: true # Whether to automatically update Liteyuki, check for updates at 4 am every day
+  plugins: [ ] # Liteyuki plugin list
+  plugin_dirs: [ ] # Liteyuki plugin directory list

Other configurations

The following is the default value. If you need to customize it, please add it manually

yaml
# Advanced configuration
+nonebot:
+  onebot_access_token: "" # OneBot access token
+  default_language: "zh-CN" # Default language
+  alconna_auto_completion: false # alconna auto completion
+  safe_mode: false # Safe mode, if true, the bot will not load any plugins
+  # other nonebot configurations
+  custom_config_1: "custom_value1"
+  custom_config_2: "custom_value2"
+
+# development configuration
+liteyuki:
+  allow_update: true # Whether to allow Liteyuki to update
+  debug: false  # Debug mode, if true, Liteyuki will output more detailed logs
+  dev_mode: false # development mode, if true, Liteyuki will load all plugins in the development directory
+...
yaml

Example: Configuration of OneBot implementation side connected to NoneBot

In production environments, it is recommended to use reverse WebSocket The fields provided by different implementation sides may be different, but basically the same. Here is a reference value

FieldsValueDescription
protocolReverse WebSocketLiteyuki-NoneBot as server
addressws://127.0.0.1:20216/onebot/v11/wsThe address depends on the configuration file, the default is `
AccessToken""If you have configured AccessToken for Liteyuki, please fill in the same value here
  • To use other communication methods, please visit OneBot Adapter for detailed information

Other

  • Liteyuki is not limited to the OneBot adapter and NoneBot2. You can use any adapter supported by NoneBot2 or use the Liteyuki message delivery plugin

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/deploy/fandq.html b/en/deploy/fandq.html new file mode 100644 index 00000000..f7a92ff6 --- /dev/null +++ b/en/deploy/fandq.html @@ -0,0 +1,26 @@ + + + + + + FAQ | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

FAQ

Frequently Asked Questions

  • There are too many python interpreters on my computer, how do I know which one to use?

    • You can specify which python interpreter to use by using the full path to the python executable, for example, /path/to/python main.py
    • Use virtual environments to avoid conflicts between different python interpreters
  • Why does the bot not respond after I start it?

    • Please check the configuration file command_start or superusers, make sure you have permission to use the command and send it correctly
    • Make sure the command header does not conflict with nickname{}, for example, a command is help, but the Bot nickname has a help, then it will be parsed as a nickname instead of a command
  • Update Liteyuki failed, error InvalidGitRepositoryError

    • Please install Git correctly and deploy Liteyuki using cloning instead of direct download
  • How to log in to chat platforms such as Telegram?

    • If you have this question, it means you don't know much about this project. This project does not implement the login function, only the message processing and response. The login function is provided by the implementation side (protocol side). The implementation side itself does not handle response logic. It processes and reports messages to Liteyuki according to the OneBot standard. You need to use an implementation side that complies with the OneBot standard to connect to Liteyuki and report messages to Liteyuki. Some recommended implementation sides have been listed below
  • Playwright installation failed

    • Enter playwright install to install the browser
  • Some plugins report errors after installation and cannot be started

    • Please refer to the plugin documentation first, confirm that the necessary configuration items of the plugin are intact, and if the problem persists, please contact the plugin author or start Liteyuki in safe mode safe_mode: true. In safe mode, you can use npm uninstall to uninstall problematic plugins

Other questions

  1. Lagrange.OneBot, based on Lagrange.Core, a Linux QQ implementation, supports OneBotv11 protocol
  2. LLOneBot, a plugin for Liteloader NTQQ, supports OneBotv11 protocol
  3. OpenShamrock, based on Lsposed, supports kritor protocol
  4. TRSS-Yunzai, based on Node.js, supports OneBotv11 protocol
  5. go-cqhttp,A QQ Client based on go, supports OneBotv11 protocol
  6. Gensokyo, use QQ protocol
  1. MinecraftOneBot, We develop a Minecraft server chat bot

Other project encountered issues, please prioritize the documentation and issues of the project itself, don't ask LiteyukiBot developers

Acknowledgements

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/deploy/install.html b/en/deploy/install.html new file mode 100644 index 00000000..3ad9efad --- /dev/null +++ b/en/deploy/install.html @@ -0,0 +1,33 @@ + + + + + + Install | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

Install

Normal Installation

  1. Install Git and Python3.10+ Environment.
bash
# Clone the project
+git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
+# change directory
+cd LiteyukiBot
+# install dependencies
+pip install -r requirements.txt
+# start the bot!
+python main.py

TIP

It is recommended to use a virtual environment to run Liteyuki to avoid dependency conflicts. You can use python -m venv .venv to create a virtual environment, and then use .venv\Scripts\activate to activate the virtual environment (use source .venv/bin/activate to activate on Linux).

Run with Docker

  1. Install Docker
  2. Clone Repo git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
  3. Change directory cd LiteyukiBot
  4. Build docker image docker build -t liteyukibot .
  5. Run container docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot

TIP

If you are using Windows, please use the absolute project directory /path/to/LiteyukiBot instead of $&#40;pwd&#41;
If you have modified the port number, please replace 20216:20216 with your port number

Use TRSS Script

TRSS_Liteyuki Management Script, which provides a more convenient way to manage LiteyukiBot, recommended to use Arch Linux

Device Requirements

  • Windows system version minimum Windows10+/Windows Server 2019+
  • Linux system requires Python3.10+, recommended Ubuntu 20.04+
  • CPU: at least 1vCPU
  • Memory: Bot without other plugins will occupy 300~500MB, including chromium and node processes, other plugins depend on specific plugins, recommended 1GB or more
  • Disk: at least 1GB of space

WARNING

If there are multiple environments on the device, please use path/to/python -m pip install -r requirements.txt to install dependencies, path/to/python is the path to your Python executable

WARNING

Liteyuki's update function depends on Git. If you do not have Git installed and run the source code directly, you will not be able to use the update function

For other questions, please refer to FAQ

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/api.html b/en/dev/api/api.html new file mode 100644 index 00000000..7f6198f9 --- /dev/null +++ b/en/dev/api/api.html @@ -0,0 +1,26 @@ + + + + + + liteyuki | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/bot/bot.html b/en/dev/api/bot/bot.html new file mode 100644 index 00000000..ce2c0169 --- /dev/null +++ b/en/dev/api/bot/bot.html @@ -0,0 +1,236 @@ + + + + + + liteyuki.bot | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

Description: 初始化轻雪实例

Arguments:

  • *args:
  • **kwargs: 配置
Source code or View on GitHub
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

Description: 启动逻辑

Source code or View on GitHub
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

Description: 外部启动接口

Source code or View on GitHub
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

Description: 保持轻雪运行

Source code or View on GitHub
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

Description: 信号处理

Arguments:

  • signum:
  • frame:
Source code or View on GitHub
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

Description: 重启轻雪本体

Source code or View on GitHub
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

Description: 停止轻雪

Arguments:

  • name: 进程名称, 默认为None, 所有进程
Source code or View on GitHub
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

Description: 初始化轻雪, 自动调用

Source code or View on GitHub
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

Source code or View on GitHub
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

Description: 停止轻雪

Source code or View on GitHub
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

Description: 注册启动前的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

Description: 注册启动后的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册停止后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册进程停止前的函数,为子进程停止时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

Description: 注册进程重启前的函数,为子进程重启时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

Description: 注册重启后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

Description: 获取轻雪实例

Return: LiteyukiBot: 当前的轻雪实例

Source code or View on GitHub
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

Description: 获取配置

Arguments:

  • key: 配置键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

Description: 获取配置,兼容旧版本

Arguments:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
Source code or View on GitHub
python
def print_logo():
+    print('\x1b[34m' + '\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \n    /  |      /      |/        |/        |/  \\    /  |/  |  /  |/  |  /  |/      |\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \n    $$ |        $$ |     $$ |   $$ |__     $$  \\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\    $$ |  \n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\__$$ |$$ |$$  \\  _$$ |_ \n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \n                ' + '\x1b[0m')

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/bot/index.html b/en/dev/api/bot/index.html new file mode 100644 index 00000000..f691567a --- /dev/null +++ b/en/dev/api/bot/index.html @@ -0,0 +1,236 @@ + + + + + + liteyuki.bot | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.bot

class LiteyukiBot

def __init__(self, *args, **kwargs) -> None

Description: 初始化轻雪实例

Arguments:

  • *args:
  • **kwargs: 配置
Source code or View on GitHub
python
def __init__(self, *args, **kwargs) -> None:
+    """
+        初始化轻雪实例
+        Args:
+            *args:
+            **kwargs: 配置
+
+        """
+    '常规操作'
+    print_logo()
+    global _BOT_INSTANCE
+    _BOT_INSTANCE = self
+    '配置'
+    self.config: dict[str, Any] = kwargs
+    '初始化'
+    self.init(**self.config)
+    logger.info('Liteyuki is initializing...')
+    '生命周期管理'
+    self.lifespan = Lifespan()
+    self.process_manager: ProcessManager = ProcessManager(lifespan=self.lifespan)
+    '事件循环'
+    self.loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(self.loop)
+    self.stop_event = threading.Event()
+    self.call_restart_count = 0
+    '加载插件加载器'
+    load_plugin('liteyuki.plugins.plugin_loader')
+    '信号处理'
+    signal.signal(signal.SIGINT, self._handle_exit)
+    signal.signal(signal.SIGTERM, self._handle_exit)
+    atexit.register(self.process_manager.terminate_all)

async def _run(self)

Description: 启动逻辑

Source code or View on GitHub
python
async def _run(self):
+    """
+        启动逻辑
+        """
+    await self.lifespan.before_start()
+    await self.process_manager.start_all()
+    await self.lifespan.after_start()
+    await self.keep_alive()

def run(self)

Description: 外部启动接口

Source code or View on GitHub
python
def run(self):
+    """
+        外部启动接口
+        """
+    try:
+        asyncio.run(self._run())
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')

async def keep_alive(self)

Description: 保持轻雪运行

Source code or View on GitHub
python
async def keep_alive(self):
+    """
+        保持轻雪运行
+        Returns:
+
+        """
+    try:
+        while not self.stop_event.is_set():
+            time.sleep(0.5)
+    except KeyboardInterrupt:
+        logger.info('Liteyuki is stopping...')
+        self.stop()

def _handle_exit(self, signum, frame)

Description: 信号处理

Arguments:

  • signum:
  • frame:
Source code or View on GitHub
python
def _handle_exit(self, signum, frame):
+    """
+        信号处理
+        Args:
+            signum:
+            frame:
+
+        Returns:
+
+        """
+    logger.info('Received signal, stopping all processes.')
+    self.stop()
+    sys.exit(0)

def restart(self, delay: int = 0)

Description: 重启轻雪本体

Source code or View on GitHub
python
def restart(self, delay: int=0):
+    """
+        重启轻雪本体
+        Returns:
+
+        """
+    if self.call_restart_count < 1:
+        executable = sys.executable
+        args = sys.argv
+        logger.info('Restarting LiteyukiBot...')
+        time.sleep(delay)
+        if platform.system() == 'Windows':
+            cmd = 'start'
+        elif platform.system() == 'Linux':
+            cmd = 'nohup'
+        elif platform.system() == 'Darwin':
+            cmd = 'open'
+        else:
+            cmd = 'nohup'
+        self.process_manager.terminate_all()
+        threading.Thread(target=os.system, args=(f"{cmd} {executable} {' '.join(args)}",)).start()
+        sys.exit(0)
+    self.call_restart_count += 1

def restart_process(self, name: Optional[str] = None)

Description: 停止轻雪

Arguments:

  • name: 进程名称, 默认为None, 所有进程
Source code or View on GitHub
python
def restart_process(self, name: Optional[str]=None):
+    """
+        停止轻雪
+        Args:
+            name: 进程名称, 默认为None, 所有进程
+        Returns:
+        """
+    if name is not None:
+        chan_active = get_channel(f'{name}-active')
+        chan_active.send(1)
+    else:
+        for process_name in self.process_manager.processes:
+            chan_active = get_channel(f'{process_name}-active')
+            chan_active.send(1)

def init(self, *args, **kwargs)

Description: 初始化轻雪, 自动调用

Source code or View on GitHub
python
def init(self, *args, **kwargs):
+    """
+        初始化轻雪, 自动调用
+        Returns:
+
+        """
+    self.init_logger()

def init_logger(self)

Source code or View on GitHub
python
def init_logger(self):
+    init_log(config=self.config)

def stop(self)

Description: 停止轻雪

Source code or View on GitHub
python
def stop(self):
+    """
+        停止轻雪
+        Returns:
+
+        """
+    self.stop_event.set()
+    self.loop.stop()

def on_before_start(self, func: LIFESPAN_FUNC)

Description: 注册启动前的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动前的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_start(func)

def on_after_start(self, func: LIFESPAN_FUNC)

Description: 注册启动后的函数

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_start(self, func: LIFESPAN_FUNC):
+    """
+        注册启动后的函数
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_start(func)

def on_after_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册停止后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册停止后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_shutdown(func)

def on_before_process_shutdown(self, func: LIFESPAN_FUNC)

Description: 注册进程停止前的函数,为子进程停止时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC):
+    """
+        注册进程停止前的函数,为子进程停止时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_shutdown(func)

def on_before_process_restart(self, func: LIFESPAN_FUNC)

Description: 注册进程重启前的函数,为子进程重启时调用

Arguments:

  • func:
Source code or View on GitHub
python
def on_before_process_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册进程重启前的函数,为子进程重启时调用
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_before_process_restart(func)

def on_after_restart(self, func: LIFESPAN_FUNC)

Description: 注册重启后的函数:未实现

Arguments:

  • func:
Source code or View on GitHub
python
def on_after_restart(self, func: LIFESPAN_FUNC):
+    """
+        注册重启后的函数:未实现
+        Args:
+            func:
+
+        Returns:
+
+        """
+    return self.lifespan.on_after_restart(func)

def get_bot() -> LiteyukiBot

Description: 获取轻雪实例

Return: LiteyukiBot: 当前的轻雪实例

Source code or View on GitHub
python
def get_bot() -> LiteyukiBot:
+    """
+    获取轻雪实例
+
+    Returns:
+        LiteyukiBot: 当前的轻雪实例
+    """
+    if IS_MAIN_PROCESS:
+        if _BOT_INSTANCE is None:
+            raise RuntimeError('Liteyuki instance not initialized.')
+        return _BOT_INSTANCE
+    else:
+        raise RuntimeError("Can't get bot instance in sub process.")

def get_config(key: str, default: Any = None) -> Any

Description: 获取配置

Arguments:

  • key: 配置键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config(key: str, default: Any=None) -> Any:
+    """
+    获取配置
+    Args:
+        key: 配置键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    return get_bot().config.get(key, default)

def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any = None) -> Any

Description: 获取配置,兼容旧版本

Arguments:

  • key: 配置键
  • compat_keys: 兼容键
  • default: 默认值

Return: Any: 配置值

Source code or View on GitHub
python
def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any=None) -> Any:
+    """
+    获取配置,兼容旧版本
+    Args:
+        key: 配置键
+        compat_keys: 兼容键
+        default: 默认值
+
+    Returns:
+        Any: 配置值
+    """
+    if key in get_bot().config:
+        return get_bot().config[key]
+    for compat_key in compat_keys:
+        if compat_key in get_bot().config:
+            logger.warning(f'Config key "{compat_key}" will be deprecated, use "{key}" instead.')
+            return get_bot().config[compat_key]
+    return default
Source code or View on GitHub
python
def print_logo():
+    print('\x1b[34m' + '\n     __        ______  ________  ________  __      __  __    __  __    __  ______ \n    /  |      /      |/        |/        |/  \\    /  |/  |  /  |/  |  /  |/      |\n    $$ |      $$$$$$/ $$$$$$$$/ $$$$$$$$/ $$  \\  /$$/ $$ |  $$ |$$ | /$$/ $$$$$$/ \n    $$ |        $$ |     $$ |   $$ |__     $$  \\/$$/  $$ |  $$ |$$ |/$$/    $$ |  \n    $$ |        $$ |     $$ |   $$    |     $$  $$/   $$ |  $$ |$$  $$<     $$ |  \n    $$ |        $$ |     $$ |   $$$$$/       $$$$/    $$ |  $$ |$$$$$  \\    $$ |  \n    $$ |_____  _$$ |_    $$ |   $$ |_____     $$ |    $$ \\__$$ |$$ |$$  \\  _$$ |_ \n    $$       |/ $$   |   $$ |   $$       |    $$ |    $$    $$/ $$ | $$  |/ $$   |\n    $$$$$$$$/ $$$$$$/    $$/    $$$$$$$$/     $$/      $$$$$$/  $$/   $$/ $$$$$$/ \n                ' + '\x1b[0m')

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/bot/lifespan.html b/en/dev/api/bot/lifespan.html new file mode 100644 index 00000000..8534f2c2 --- /dev/null +++ b/en/dev/api/bot/lifespan.html @@ -0,0 +1,139 @@ + + + + + + liteyuki.bot.lifespan | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.bot.lifespan

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午8:24 @Author : snowykami @Email : snowykami@outlook.com @File : lifespan.py @Software: PyCharm

class Lifespan

def __init__(self) -> None

Description: 轻雪生命周期管理,启动、停止、重启

Source code or View on GitHub
python
def __init__(self) -> None:
+    """
+        轻雪生命周期管理,启动、停止、重启
+        """
+    self.life_flag: int = 0
+    self._before_start_funcs: list[LIFESPAN_FUNC] = []
+    self._after_start_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._after_shutdown_funcs: list[LIFESPAN_FUNC] = []
+    self._before_process_restart_funcs: list[LIFESPAN_FUNC] = []
+    self._after_restart_funcs: list[LIFESPAN_FUNC] = []

@staticmethod

async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None

Description: 并发运行异步函数

Arguments:

  • funcs:
Source code or View on GitHub
python
@staticmethod
+async def run_funcs(funcs: list[ASYNC_LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC], *args, **kwargs) -> None:
+    """
+        并发运行异步函数
+        Args:
+            funcs:
+        Returns:
+        """
+    loop = asyncio.get_running_loop()
+    tasks = [func(*args, **kwargs) if is_coroutine_callable(func) else async_wrapper(func)(*args, **kwargs) for func in funcs]
+    await asyncio.gather(*tasks)

def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册启动时的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_start_funcs.append(func)
+    return func

def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册启动时的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册启动时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_start_funcs.append(func)
+    return func

def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册停止前的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止前的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_shutdown_funcs.append(func)
+    return func

def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册停止后的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册停止后的函数
+        Args:
+            func:
+
+        Returns:
+            LIFESPAN_FUNC:
+
+        """
+    self._after_shutdown_funcs.append(func)
+    return func

def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册重启时的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启时的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._before_process_restart_funcs.append(func)
+    return func

def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC

Description: 注册重启后的函数

Arguments:

  • func:

Return: LIFESPAN_FUNC:

Source code or View on GitHub
python
def on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC:
+    """
+        注册重启后的函数
+        Args:
+            func:
+        Returns:
+            LIFESPAN_FUNC:
+        """
+    self._after_restart_funcs.append(func)
+    return func

async def before_start(self) -> None

Description: 启动前

Source code or View on GitHub
python
async def before_start(self) -> None:
+    """
+        启动前
+        Returns:
+        """
+    logger.debug('Running before_start functions')
+    await self.run_funcs(self._before_start_funcs)

async def after_start(self) -> None

Description: 启动后

Source code or View on GitHub
python
async def after_start(self) -> None:
+    """
+        启动后
+        Returns:
+        """
+    logger.debug('Running after_start functions')
+    await self.run_funcs(self._after_start_funcs)

async def before_process_shutdown(self) -> None

Description: 停止前

Source code or View on GitHub
python
async def before_process_shutdown(self) -> None:
+    """
+        停止前
+        Returns:
+        """
+    logger.debug('Running before_shutdown functions')
+    await self.run_funcs(self._before_process_shutdown_funcs)

async def after_shutdown(self) -> None

Description: 停止后

Source code or View on GitHub
python
async def after_shutdown(self) -> None:
+    """
+        停止后
+        Returns:
+        """
+    logger.debug('Running after_shutdown functions')
+    await self.run_funcs(self._after_shutdown_funcs)

async def before_process_restart(self) -> None

Description: 重启前

Source code or View on GitHub
python
async def before_process_restart(self) -> None:
+    """
+        重启前
+        Returns:
+        """
+    logger.debug('Running before_restart functions')
+    await self.run_funcs(self._before_process_restart_funcs)

async def after_restart(self) -> None

Description: 重启后

Source code or View on GitHub
python
async def after_restart(self) -> None:
+    """
+        重启后
+        Returns:
+
+        """
+    logger.debug('Running after_restart functions')
+    await self.run_funcs(self._after_restart_funcs)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/comm/channel.html b/en/dev/api/comm/channel.html new file mode 100644 index 00000000..881b9d4a --- /dev/null +++ b/en/dev/api/comm/channel.html @@ -0,0 +1,221 @@ + + + + + + liteyuki.comm.channel | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.channel

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午11:21 @Author : snowykami @Email : snowykami@outlook.com @File : channel_.py @Software: PyCharm

本模块定义了一个通用的通道类,用于进程间通信

class Channel(Generic[T])

def __init__(self, name: str, type_check: Optional[bool] = None)

Description: 初始化通道

Arguments:

  • name: 通道ID
  • type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
Source code or View on GitHub
python
def __init__(self, name: str, type_check: Optional[bool]=None):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+            type_check: 是否开启类型检查, 若为空,则传入泛型默认开启,否则默认关闭
+        """
+    self.conn_send, self.conn_recv = Pipe()
+    self._conn_send_inner, self._conn_recv_inner = Pipe()
+    self._closed = False
+    self._on_main_receive_func_ids: list[int] = []
+    self._on_sub_receive_func_ids: list[int] = []
+    self.name: str = name
+    self.is_receive_loop_running = False
+    if type_check is None:
+        type_check = self._get_generic_type() is not None
+    elif type_check:
+        if self._get_generic_type() is None:
+            raise TypeError('Type hint is required for enforcing type check.')
+    self.type_check = type_check
+    if name in _channel:
+        raise ValueError(f'Channel {name} already exists')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = self
+        logger.debug(f'Channel {name} initialized in main process')
+    else:
+        logger.debug(f'Channel {name} initialized in sub process, should manually set in main process')

def _get_generic_type(self) -> Optional[type]

Description: 获取通道传递泛型类型

Return: Optional[type]: 泛型类型

Source code or View on GitHub
python
def _get_generic_type(self) -> Optional[type]:
+    """
+        获取通道传递泛型类型
+
+        Returns:
+            Optional[type]: 泛型类型
+        """
+    if hasattr(self, '__orig_class__'):
+        return get_args(self.__orig_class__)[0]
+    return None

def _validate_structure(self, data: Any, structure: type) -> bool

Description: 验证数据结构

Arguments:

  • data: 数据
  • structure: 结构

Return: bool: 是否通过验证

Source code or View on GitHub
python
def _validate_structure(self, data: Any, structure: type) -> bool:
+    """
+        验证数据结构
+        Args:
+            data: 数据
+            structure: 结构
+
+        Returns:
+            bool: 是否通过验证
+        """
+    if isinstance(structure, type):
+        return isinstance(data, structure)
+    elif isinstance(structure, tuple):
+        if not isinstance(data, tuple) or len(data) != len(structure):
+            return False
+        return all((self._validate_structure(d, s) for d, s in zip(data, structure)))
+    elif isinstance(structure, list):
+        if not isinstance(data, list):
+            return False
+        return all((self._validate_structure(d, structure[0]) for d in data))
+    elif isinstance(structure, dict):
+        if not isinstance(data, dict):
+            return False
+        return all((k in data and self._validate_structure(data[k], structure[k]) for k in structure))
+    return False

def send(self, data: T)

Description: 发送数据,发送函数为同步函数,没有异步的必要

Arguments:

  • data: 数据
Source code or View on GitHub
python
def send(self, data: T):
+    """
+        发送数据,发送函数为同步函数,没有异步的必要
+        Args:
+            data: 数据
+        """
+    if self.type_check:
+        _type = self._get_generic_type()
+        if _type is not None and (not self._validate_structure(data, _type)):
+            raise TypeError(f'Data must be an instance of {_type}, {type(data)} found')
+    if self._closed:
+        raise RuntimeError('Cannot send to a closed channel_')
+    self.conn_send.send(data)

def receive(self) -> T

Description: 同步接收数据,会阻塞线程

Source code or View on GitHub
python
def receive(self) -> T:
+    """
+        同步接收数据,会阻塞线程
+        Args:
+        """
+    if self._closed:
+        raise RuntimeError('Cannot receive from a closed channel_')
+    while True:
+        data = self.conn_recv.recv()
+        return data

async def async_receive(self) -> T

Description: 异步接收数据,会挂起等待

Source code or View on GitHub
python
async def async_receive(self) -> T:
+    """
+        异步接收数据,会挂起等待
+        """
+    print('等待接收数据')
+    loop = asyncio.get_running_loop()
+    data = await loop.run_in_executor(None, self.receive)
+    print('接收到数据')
+    return data

def on_receive(self, filter_func: Optional[FILTER_FUNC] = None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]

Description: 接收数据并执行函数

Arguments:

  • filter_func: 过滤函数,为None则不过滤

Return: 装饰器,装饰一个函数在接收到数据后执行

Source code or View on GitHub
python
def on_receive(self, filter_func: Optional[FILTER_FUNC]=None) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]:
+    """
+        接收数据并执行函数
+        Args:
+            filter_func: 过滤函数,为None则不过滤
+        Returns:
+            装饰器,装饰一个函数在接收到数据后执行
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('on_receive can only be used in main process')
+
+    def decorator(func: Callable[[T], Any]) -> Callable[[T], Any]:
+        global _func_id
+
+        async def wrapper(data: T) -> Any:
+            if filter_func is not None:
+                if is_coroutine_callable(filter_func):
+                    if not await filter_func(data):
+                        return
+                elif not filter_func(data):
+                    return
+            if is_coroutine_callable(func):
+                return await func(data)
+            else:
+                return func(data)
+        _callback_funcs[_func_id] = wrapper
+        if IS_MAIN_PROCESS:
+            self._on_main_receive_func_ids.append(_func_id)
+        else:
+            self._on_sub_receive_func_ids.append(_func_id)
+        _func_id += 1
+        return func
+    return decorator

async def _run_on_receive_funcs(self, data: Any)

Description: 运行接收函数

Arguments:

  • data: 数据
Source code or View on GitHub
python
async def _run_on_receive_funcs(self, data: Any):
+    """
+        运行接收函数
+        Args:
+            data: 数据
+        """
+    if IS_MAIN_PROCESS:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_main_receive_func_ids]
+    else:
+        [asyncio.create_task(_callback_funcs[func_id](data)) for func_id in self._on_sub_receive_func_ids]

async def start_receive_loop(self)

Description: 开始接收数据 会自动判断主进程和子进程,需要在对应进程都调度一次

Source code or View on GitHub
python
async def start_receive_loop(self):
+    """
+        开始接收数据
+        会自动判断主进程和子进程,需要在对应进程都调度一次
+        """
+    if len(self._on_main_receive_func_ids) == 0:
+        logger.warning(f'No on_receive function registered for {self.name}')
+        return
+    self.is_receive_loop_running = True
+    logger.debug(f'Starting receive loop for {self.name}')
+    while not self._closed:
+        data = await self.async_receive()
+        await self._run_on_receive_funcs(data)

var active_channel

  • Description: 子进程可用的主动和被动通道

  • Type: Channel

  • Default: Channel(name='active_channel')

var publish_channel

  • Description: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • Type: Channel[tuple[str, dict[str, Any]]]

  • Default: Channel(name='publish_channel')

var channel_deliver_active_channel

  • Description: 通道传递通道,主进程创建单例,子进程初始化时实例化

  • Type: Channel[Channel[Any]]

  • Default: NO_DEFAULT

def set_channel(name: str, channel: Channel)

Description: 设置通道实例

Arguments:

  • name: 通道名称
  • channel: 通道实例
Source code or View on GitHub
python
def set_channel(name: str, channel: 'Channel'):
+    """
+    设置通道实例
+    Args:
+        name: 通道名称
+        channel: 通道实例
+    """
+    if not isinstance(channel, Channel):
+        raise TypeError(f'channel_ must be an instance of Channel, {type(channel)} found')
+    if IS_MAIN_PROCESS:
+        if name in _channel:
+            raise ValueError(f'Channel {name} already exists')
+        _channel[name] = channel
+    else:
+        channel_deliver_passive_channel.send(('set_channel', {'name': name, 'channel_': channel}))

def set_channels(channels: dict[str, Channel])

Description: 设置通道实例

Arguments:

  • channels: 通道名称
Source code or View on GitHub
python
def set_channels(channels: dict[str, 'Channel']):
+    """
+    设置通道实例
+    Args:
+        channels: 通道名称
+    """
+    for name, channel in channels.items():
+        set_channel(name, channel)

def get_channel(name: str) -> Channel

Description: 获取通道实例

Arguments:

  • name: 通道名称
Source code or View on GitHub
python
def get_channel(name: str) -> 'Channel':
+    """
+    获取通道实例
+    Args:
+        name: 通道名称
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel[name]
+    else:
+        recv_chan = Channel[Channel[Any]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channel', {'name': name, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def get_channels() -> dict[str, Channel]

Description: 获取通道实例

Source code or View on GitHub
python
def get_channels() -> dict[str, 'Channel']:
+    """
+    获取通道实例
+    Returns:
+    """
+    if IS_MAIN_PROCESS:
+        return _channel
+    else:
+        recv_chan = Channel[dict[str, Channel[Any]]]('recv_chan')
+        channel_deliver_passive_channel.send(('get_channels', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')

def on_set_channel(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'set_channel')
+def on_set_channel(data: tuple[str, dict[str, Any]]):
+    name, channel = (data[1]['name'], data[1]['channel_'])
+    set_channel(name, channel)

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')

def on_get_channel(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channel')
+def on_get_channel(data: tuple[str, dict[str, Any]]):
+    name, recv_chan = (data[1]['name'], data[1]['recv_chan'])
+    recv_chan.send(get_channel(name))

@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')

def on_get_channels(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@channel_deliver_passive_channel.on_receive(filter_func=lambda data: data[0] == 'get_channels')
+def on_get_channels(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(get_channels())

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/comm/comm.html b/en/dev/api/comm/comm.html new file mode 100644 index 00000000..5e4fdbae --- /dev/null +++ b/en/dev/api/comm/comm.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.comm | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/comm/event.html b/en/dev/api/comm/event.html new file mode 100644 index 00000000..6760ad11 --- /dev/null +++ b/en/dev/api/comm/event.html @@ -0,0 +1,28 @@ + + + + + + liteyuki.comm.event | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.event

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/26 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class Event

def __init__(self, name: str, data: dict[str, Any])

Source code or View on GitHub
python
def __init__(self, name: str, data: dict[str, Any]):
+    self.name = name
+    self.data = data

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/comm/index.html b/en/dev/api/comm/index.html new file mode 100644 index 00000000..3043af5b --- /dev/null +++ b/en/dev/api/comm/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.comm | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/comm/rpc.html b/en/dev/api/comm/rpc.html new file mode 100644 index 00000000..b030c8c7 --- /dev/null +++ b/en/dev/api/comm/rpc.html @@ -0,0 +1,31 @@ + + + + + + liteyuki.comm.rpc | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.rpc

Description: 本模块用于实现RPC(基于IPC)通信

class RPC

def __init__(self, on_calling: ON_CALLING_FUNC) -> None

Source code or View on GitHub
python
def __init__(self, on_calling: ON_CALLING_FUNC) -> None:
+    self.on_calling = on_calling

def call(self, args: tuple, kwargs: dict) -> Any

Description: 调用

Source code or View on GitHub
python
def call(self, args: tuple, kwargs: dict) -> Any:
+    """
+        调用
+        """
+    return self.on_calling(args, kwargs)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/comm/socks_channel.html b/en/dev/api/comm/socks_channel.html new file mode 100644 index 00000000..c8cfdf76 --- /dev/null +++ b/en/dev/api/comm/socks_channel.html @@ -0,0 +1,51 @@ + + + + + + liteyuki.comm.socks_channel | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.socks_channel

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/25 下午3:54 @Author : snowykami @Email : snowykami@outlook.com @File : channelv2.py @Software: PyCharm

class SocksChannel

def __init__(self, name: str)

Description: 初始化通道

Arguments:

  • name: 通道ID
Source code or View on GitHub
python
def __init__(self, name: str):
+    """
+        初始化通道
+        Args:
+            name: 通道ID
+        """
+    self._name = name
+    self._conn_send = None
+    self._conn_recv = None
+    self._closed = False

def send(self, data)

Description: 发送数据

Arguments:

  • data: 数据
Source code or View on GitHub
python
def send(self, data):
+    """
+        发送数据
+        Args:
+            data: 数据
+        """
+    pass

def receive(self)

Description: 接收数据

Return: data: 数据

Source code or View on GitHub
python
def receive(self):
+    """
+        接收数据
+        Returns:
+            data: 数据
+        """
+    pass

def close(self)

Description: 关闭通道

Source code or View on GitHub
python
def close(self):
+    """
+        关闭通道
+        """
+    pass

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/comm/storage.html b/en/dev/api/comm/storage.html new file mode 100644 index 00000000..924e9615 --- /dev/null +++ b/en/dev/api/comm/storage.html @@ -0,0 +1,169 @@ + + + + + + liteyuki.comm.storage | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.comm.storage

Description: 共享内存模块。类似于redis,但是更加轻量级并且线程安全

var _on_main_subscriber_receive_funcs

  • Description: 主进程订阅者接收函数

  • Type: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • Default: {}

var _on_sub_subscriber_receive_funcs

  • Description: 子进程订阅者接收函数

  • Type: dict[str, list[ASYNC_ON_RECEIVE_FUNC]]

  • Default: {}

class KeyValueStore

def __init__(self)

Source code or View on GitHub
python
def __init__(self):
+    self._store = {}
+    self.active_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-active')
+    self.passive_chan = Channel[tuple[str, Optional[dict[str, Any]]]](name='shared_memory-passive')
+    self.publish_channel = Channel[tuple[str, Any]](name='shared_memory-publish')
+    self.is_main_receive_loop_running = False
+    self.is_sub_receive_loop_running = False

def set(self, key: str, value: Any) -> None

Description: 设置键值对

Arguments:

  • key: 键
  • value: 值
Source code or View on GitHub
python
def set(self, key: str, value: Any) -> None:
+    """
+        设置键值对
+        Args:
+            key: 键
+            value: 值
+
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            self._store[key] = value
+    else:
+        self.passive_chan.send(('set', {'key': key, 'value': value}))

def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]

Description: 获取键值对

Arguments:

  • key: 键
  • default: 默认值

Return: Any: 值

Source code or View on GitHub
python
def get(self, key: str, default: Optional[Any]=None) -> Optional[Any]:
+    """
+        获取键值对
+        Args:
+            key: 键
+            default: 默认值
+
+        Returns:
+            Any: 值
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            return self._store.get(key, default)
+    else:
+        recv_chan = Channel[Optional[Any]]('recv_chan')
+        self.passive_chan.send(('get', {'key': key, 'default': default, 'recv_chan': recv_chan}))
+        return recv_chan.receive()

def delete(self, key: str, ignore_key_error: bool = True) -> None

Description: 删除键值对

Arguments:

  • key: 键
  • ignore_key_error: 是否忽略键不存在的错误
Source code or View on GitHub
python
def delete(self, key: str, ignore_key_error: bool=True) -> None:
+    """
+        删除键值对
+        Args:
+            key: 键
+            ignore_key_error: 是否忽略键不存在的错误
+
+        Returns:
+        """
+    if IS_MAIN_PROCESS:
+        lock = _get_lock(key)
+        with lock:
+            if key in self._store:
+                try:
+                    del self._store[key]
+                    del _locks[key]
+                except KeyError as e:
+                    if not ignore_key_error:
+                        raise e
+    else:
+        self.passive_chan.send(('delete', {'key': key}))

def get_all(self) -> dict[str, Any]

Description: 获取所有键值对

Return: dict[str, Any]: 键值对

Source code or View on GitHub
python
def get_all(self) -> dict[str, Any]:
+    """
+        获取所有键值对
+        Returns:
+            dict[str, Any]: 键值对
+        """
+    if IS_MAIN_PROCESS:
+        return self._store
+    else:
+        recv_chan = Channel[dict[str, Any]]('recv_chan')
+        self.passive_chan.send(('get_all', {'recv_chan': recv_chan}))
+        return recv_chan.receive()

def publish(self, channel_: str, data: Any) -> None

Description: 发布消息

Arguments:

  • channel_: 频道
  • data: 数据
Source code or View on GitHub
python
def publish(self, channel_: str, data: Any) -> None:
+    """
+        发布消息
+        Args:
+            channel_: 频道
+            data: 数据
+
+        Returns:
+        """
+    self.active_chan.send(('publish', {'channel': channel_, 'data': data}))

def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]

Description: 订阅者接收消息时的回调

Arguments:

  • channel_: 频道

Return: 装饰器

Source code or View on GitHub
python
def on_subscriber_receive(self, channel_: str) -> Callable[[ON_RECEIVE_FUNC], ON_RECEIVE_FUNC]:
+    """
+        订阅者接收消息时的回调
+        Args:
+            channel_: 频道
+
+        Returns:
+            装饰器
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot subscribe in sub process.')
+
+    def decorator(func: ON_RECEIVE_FUNC) -> ON_RECEIVE_FUNC:
+
+        async def wrapper(data: Any):
+            if is_coroutine_callable(func):
+                await func(data)
+            else:
+                func(data)
+        if IS_MAIN_PROCESS:
+            if channel_ not in _on_main_subscriber_receive_funcs:
+                _on_main_subscriber_receive_funcs[channel_] = []
+            _on_main_subscriber_receive_funcs[channel_].append(wrapper)
+        else:
+            if channel_ not in _on_sub_subscriber_receive_funcs:
+                _on_sub_subscriber_receive_funcs[channel_] = []
+            _on_sub_subscriber_receive_funcs[channel_].append(wrapper)
+        return wrapper
+    return decorator

@staticmethod

async def run_subscriber_receive_funcs(channel_: str, data: Any)

Description: 运行订阅者接收函数

Arguments:

  • channel_: 频道
  • data: 数据
Source code or View on GitHub
python
@staticmethod
+async def run_subscriber_receive_funcs(channel_: str, data: Any):
+    """
+        运行订阅者接收函数
+        Args:
+            channel_: 频道
+            data: 数据
+        """
+    [asyncio.create_task(func(data)) for func in _on_main_subscriber_receive_funcs[channel_]]

async def start_receive_loop(self)

Description: 启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程

Source code or View on GitHub
python
async def start_receive_loop(self):
+    """
+        启动发布订阅接收器循环,在主进程中运行,若有子进程订阅则推送给子进程
+        """
+    if not IS_MAIN_PROCESS:
+        raise RuntimeError('Cannot start receive loop in sub process.')
+    while True:
+        data = await self.active_chan.async_receive()
+        if data[0] == 'publish':
+            await self.run_subscriber_receive_funcs(data[1]['channel'], data[1]['data'])
+            self.publish_channel.send(data)

class GlobalKeyValueStore

@classmethod

def get_instance(cls)

Source code or View on GitHub
python
@classmethod
+def get_instance(cls):
+    if cls._instance is None:
+        with cls._lock:
+            if cls._instance is None:
+                cls._instance = KeyValueStore()
+    return cls._instance

attr _instance = None

attr _lock = threading.Lock()

var _ref_count

  • Description: import 引用计数, 防止获取空指针

  • Default: 0

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')

def on_get(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get')
+def on_get(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    default = data[1]['default']
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get(key, default))

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')

def on_set(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'set')
+def on_set(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    value = data[1]['value']
+    shared_memory.set(key, value)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')

def on_delete(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'delete')
+def on_delete(data: tuple[str, dict[str, Any]]):
+    key = data[1]['key']
+    shared_memory.delete(key)

@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')

def on_get_all(data: tuple[str, dict[str, Any]])

Source code or View on GitHub
python
@shared_memory.passive_chan.on_receive(lambda d: d[0] == 'get_all')
+def on_get_all(data: tuple[str, dict[str, Any]]):
+    recv_chan = data[1]['recv_chan']
+    recv_chan.send(shared_memory.get_all())

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/config.html b/en/dev/api/config.html new file mode 100644 index 00000000..81ef4e09 --- /dev/null +++ b/en/dev/api/config.html @@ -0,0 +1,102 @@ + + + + + + liteyuki.config | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.config

Description: 该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式

def flat_config(config: dict[str, Any]) -> dict[str, Any]

Description: 扁平化配置文件

{a:{b:{c:1}}} ->

Arguments:

  • config: 配置项目

Return: 扁平化后的配置文件,但也包含原有的键值对

Source code or View on GitHub
python
def flat_config(config: dict[str, Any]) -> dict[str, Any]:
+    """
+    扁平化配置文件
+
+    {a:{b:{c:1}}} -> {"a.b.c": 1}
+    Args:
+        config: 配置项目
+
+    Returns:
+        扁平化后的配置文件,但也包含原有的键值对
+    """
+    new_config = copy.deepcopy(config)
+    for key, value in config.items():
+        if isinstance(value, dict):
+            for k, v in flat_config(value).items():
+                new_config[f'{key}.{k}'] = v
+    return new_config

def load_from_yaml(file_: str) -> dict[str, Any]

Description: Load config from yaml file

Source code or View on GitHub
python
def load_from_yaml(file_: str) -> dict[str, Any]:
+    """
+    Load config from yaml file
+
+    """
+    logger.debug(f'Loading YAML config from {file_}')
+    config = yaml.safe_load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_json(file_: str) -> dict[str, Any]

Description: Load config from json file

Source code or View on GitHub
python
def load_from_json(file_: str) -> dict[str, Any]:
+    """
+    Load config from json file
+    """
+    logger.debug(f'Loading JSON config from {file_}')
+    config = json.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_toml(file_: str) -> dict[str, Any]

Description: Load config from toml file

Source code or View on GitHub
python
def load_from_toml(file_: str) -> dict[str, Any]:
+    """
+    Load config from toml file
+    """
+    logger.debug(f'Loading TOML config from {file_}')
+    config = toml.load(open(file_, 'r', encoding='utf-8'))
+    return flat_config(config if config is not None else {})

def load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]

Description: 从指定文件加载配置项,会自动识别文件格式 默认执行扁平化选项

Source code or View on GitHub
python
def load_from_files(*files: str, no_warning: bool=False) -> dict[str, Any]:
+    """
+    从指定文件加载配置项,会自动识别文件格式
+    默认执行扁平化选项
+    """
+    config = {}
+    for file in files:
+        if os.path.exists(file):
+            if file.endswith(('.yaml', 'yml')):
+                config.update(load_from_yaml(file))
+            elif file.endswith('.json'):
+                config.update(load_from_json(file))
+            elif file.endswith('.toml'):
+                config.update(load_from_toml(file))
+            elif not no_warning:
+                logger.warning(f'Unsupported config file format: {file}')
+        elif not no_warning:
+            logger.warning(f'Config file not found: {file}')
+    return config

def load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]

Description: 从目录下加载配置文件,不递归 按照读取文件的优先级反向覆盖 默认执行扁平化选项

Source code or View on GitHub
python
def load_configs_from_dirs(*directories: str, no_waring: bool=False) -> dict[str, Any]:
+    """
+    从目录下加载配置文件,不递归
+    按照读取文件的优先级反向覆盖
+    默认执行扁平化选项
+    """
+    config = {}
+    for directory in directories:
+        if not os.path.exists(directory):
+            if not no_waring:
+                logger.warning(f'Directory not found: {directory}')
+            continue
+        for file in os.listdir(directory):
+            if file.endswith(_SUPPORTED_CONFIG_FORMATS):
+                config.update(load_from_files(os.path.join(directory, file), no_warning=no_waring))
+    return config

def load_config_in_default(no_waring: bool = False) -> dict[str, Any]

Description: 从一个标准的轻雪项目加载配置文件 项目目录下的config.*和config目录下的所有配置文件 项目目录下的配置文件优先

Source code or View on GitHub
python
def load_config_in_default(no_waring: bool=False) -> dict[str, Any]:
+    """
+    从一个标准的轻雪项目加载配置文件
+    项目目录下的config.*和config目录下的所有配置文件
+    项目目录下的配置文件优先
+    """
+    config = load_configs_from_dirs('config', no_waring=no_waring)
+    config.update(load_from_files('config.yaml', 'config.toml', 'config.json', 'config.yml', no_warning=no_waring))
+    return config

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/core/core.html b/en/dev/api/core/core.html new file mode 100644 index 00000000..80df9f48 --- /dev/null +++ b/en/dev/api/core/core.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.core | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/core/index.html b/en/dev/api/core/index.html new file mode 100644 index 00000000..e4e590fd --- /dev/null +++ b/en/dev/api/core/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.core | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/core/manager.html b/en/dev/api/core/manager.html new file mode 100644 index 00000000..847f5838 --- /dev/null +++ b/en/dev/api/core/manager.html @@ -0,0 +1,117 @@ + + + + + + liteyuki.core.manager | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.core.manager

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午11:12 @Author : snowykami @Email : snowykami@outlook.com @File : manager.py @Software: PyCharm

class ChannelDeliver

def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])

Source code or View on GitHub
python
def __init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]]):
+    self.active = active
+    self.passive = passive
+    self.channel_deliver_active = channel_deliver_active
+    self.channel_deliver_passive = channel_deliver_passive
+    self.publish = publish

class ProcessManager

def __init__(self, lifespan: Lifespan)

Source code or View on GitHub
python
def __init__(self, lifespan: 'Lifespan'):
+    self.lifespan = lifespan
+    self.targets: dict[str, tuple[Callable, tuple, dict]] = {}
+    self.processes: dict[str, Process] = {}

async def _run_process(self, name: str)

Description: 开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task

Arguments:

  • name:
Source code or View on GitHub
python
async def _run_process(self, name: str):
+    """
+        开启后自动监控进程,并添加到进程字典中,会阻塞,请创建task
+        Args:
+            name:
+        Returns:
+        """
+    if name not in self.targets:
+        raise KeyError(f'Process {name} not found.')
+    chan_active = get_channel(f'{name}-active')
+
+    def _start_process():
+        process = Process(target=self.targets[name][0], args=self.targets[name][1], kwargs=self.targets[name][2], daemon=True)
+        self.processes[name] = process
+        process.start()
+    _start_process()
+    while True:
+        data = await chan_active.async_receive()
+        if data == 0:
+            logger.info(f'Stopping process {name}')
+            await self.lifespan.before_process_shutdown()
+            self.terminate(name)
+            break
+        elif data == 1:
+            logger.info(f'Restarting process {name}')
+            await self.lifespan.before_process_shutdown()
+            await self.lifespan.before_process_restart()
+            self.terminate(name)
+            _start_process()
+            continue
+        else:
+            logger.warning('Unknown data received, ignored.')

async def start_all(self)

Description: 对外启动方法,启动所有进程,创建asyncio task

Source code or View on GitHub
python
async def start_all(self):
+    """
+        对外启动方法,启动所有进程,创建asyncio task
+        """
+    [asyncio.create_task(chan.start_receive_loop()) for chan in get_channels().values()]
+    [asyncio.create_task(sm.start_receive_loop()) for sm in [shared_memory]]
+    [asyncio.create_task(self._run_process(name)) for name in self.targets]

def add_target(self, name: str, target: TARGET_FUNC, args: tuple = (), kwargs = None)

Description: 添加进程

Arguments:

  • name: 进程名,用于获取和唯一标识
  • target: 进程函数
  • args: 进程函数参数
  • kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
Source code or View on GitHub
python
def add_target(self, name: str, target: TARGET_FUNC, args: tuple=(), kwargs=None):
+    """
+        添加进程
+        Args:
+            name: 进程名,用于获取和唯一标识
+            target: 进程函数
+            args: 进程函数参数
+            kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
+        """
+    if kwargs is None:
+        kwargs = {}
+    chan_active: Channel = Channel(name=f'{name}-active')
+    chan_passive: Channel = Channel(name=f'{name}-passive')
+    channel_deliver = ChannelDeliver(active=chan_active, passive=chan_passive, channel_deliver_active=channel_deliver_active_channel, channel_deliver_passive=channel_deliver_passive_channel, publish=publish_channel)
+    self.targets[name] = (_delivery_channel_wrapper, (target, channel_deliver, shared_memory, *args), kwargs)

def join_all(self)

Source code or View on GitHub
python
def join_all(self):
+    for name, process in self.targets:
+        process.join()

def terminate(self, name: str)

Description: 终止进程并从进程字典中删除

Arguments:

  • name:
Source code or View on GitHub
python
def terminate(self, name: str):
+    """
+        终止进程并从进程字典中删除
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.processes:
+        logger.warning(f'Process {name} not found.')
+        return
+    process = self.processes[name]
+    process.terminate()
+    process.join(TIMEOUT)
+    if process.is_alive():
+        process.kill()
+    logger.success(f'Process {name} terminated.')

def terminate_all(self)

Source code or View on GitHub
python
def terminate_all(self):
+    for name in self.targets:
+        self.terminate(name)

def is_process_alive(self, name: str) -> bool

Description: 检查进程是否存活

Arguments:

  • name:
Source code or View on GitHub
python
def is_process_alive(self, name: str) -> bool:
+    """
+        检查进程是否存活
+        Args:
+            name:
+
+        Returns:
+
+        """
+    if name not in self.targets:
+        logger.warning(f'Process {name} not found.')
+    return self.processes[name].is_alive()

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/dev/dev.html b/en/dev/api/dev/dev.html new file mode 100644 index 00000000..78fdc246 --- /dev/null +++ b/en/dev/api/dev/dev.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.dev | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/dev/index.html b/en/dev/api/dev/index.html new file mode 100644 index 00000000..d2eaf766 --- /dev/null +++ b/en/dev/api/dev/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.dev | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/dev/observer.html b/en/dev/api/dev/observer.html new file mode 100644 index 00000000..67b7e5aa --- /dev/null +++ b/en/dev/api/dev/observer.html @@ -0,0 +1,69 @@ + + + + + + liteyuki.dev.observer | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.dev.observer

Description: 此模块用于注册观察者函数,使用watchdog监控文件变化并重启bot 启用该模块需要在配置文件中设置dev_mode为True

var CALLBACK_FUNC

  • Description: 位置1为FileSystemEvent

  • Type: TypeAlias

  • Default: Callable[[FileSystemEvent], None]

var FILTER_FUNC

  • Description: 位置1为FileSystemEvent

  • Type: TypeAlias

  • Default: Callable[[FileSystemEvent], bool]

def debounce(wait)

Description: 防抖函数

Source code or View on GitHub
python
def debounce(wait):
+    """
+    防抖函数
+    """
+
+    def decorator(func):
+
+        def wrapper(*args, **kwargs):
+            nonlocal last_call_time
+            current_time = time.time()
+            if current_time - last_call_time > wait:
+                last_call_time = current_time
+                return func(*args, **kwargs)
+        last_call_time = None
+        return wrapper
+    return decorator

class CodeModifiedHandler(FileSystemEventHandler)

@debounce(1)

def on_modified(self, event)

Source code or View on GitHub
python
@debounce(1)
+def on_modified(self, event):
+    raise NotImplementedError('on_modified must be implemented')

def on_created(self, event)

Source code or View on GitHub
python
def on_created(self, event):
+    self.on_modified(event)

def on_deleted(self, event)

Source code or View on GitHub
python
def on_deleted(self, event):
+    self.on_modified(event)

def on_moved(self, event)

Source code or View on GitHub
python
def on_moved(self, event):
+    self.on_modified(event)

def on_any_event(self, event)

Source code or View on GitHub
python
def on_any_event(self, event):
+    self.on_modified(event)

def on_file_system_event(directories: tuple[str], recursive: bool = True, event_filter: FILTER_FUNC = None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]

Description: 注册文件系统变化监听器

Arguments:

  • directories: 监听目录们
  • recursive: 是否递归监听子目录
  • event_filter: 事件过滤器, 返回True则执行回调函数

Return: 装饰器,装饰一个函数在接收到数据后执行

Source code or View on GitHub
python
def on_file_system_event(directories: tuple[str], recursive: bool=True, event_filter: FILTER_FUNC=None) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]:
+    """
+    注册文件系统变化监听器
+    Args:
+        directories: 监听目录们
+        recursive: 是否递归监听子目录
+        event_filter: 事件过滤器, 返回True则执行回调函数
+    Returns:
+        装饰器,装饰一个函数在接收到数据后执行
+    """
+
+    def decorator(func: CALLBACK_FUNC) -> CALLBACK_FUNC:
+
+        def wrapper(event: FileSystemEvent):
+            if event_filter is not None and (not event_filter(event)):
+                return
+            func(event)
+        code_modified_handler = CodeModifiedHandler()
+        code_modified_handler.on_modified = wrapper
+        for directory in directories:
+            observer.schedule(code_modified_handler, directory, recursive=recursive)
+        return func
+    return decorator

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/dev/plugin.html b/en/dev/api/dev/plugin.html new file mode 100644 index 00000000..d6b12c0e --- /dev/null +++ b/en/dev/api/dev/plugin.html @@ -0,0 +1,37 @@ + + + + + + liteyuki.dev.plugin | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.dev.plugin

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : snowykami@outlook.com @File : plugin.py @Software: PyCharm

def run_plugins(*module_path: str | Path)

Description: 运行插件,无需手动初始化bot

Arguments:

  • module_path: 插件路径,参考liteyuki.load_plugin的函数签名
Source code or View on GitHub
python
def run_plugins(*module_path: str | Path):
+    """
+    运行插件,无需手动初始化bot
+    Args:
+        module_path: 插件路径,参考`liteyuki.load_plugin`的函数签名
+    """
+    cfg = load_config_in_default()
+    plugins = cfg.get('liteyuki.plugins', [])
+    plugins.extend(module_path)
+    cfg['liteyuki.plugins'] = plugins
+    bot = LiteyukiBot(**cfg)
+    bot.run()

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/exception.html b/en/dev/api/exception.html new file mode 100644 index 00000000..4686a9da --- /dev/null +++ b/en/dev/api/exception.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.exception | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/index.html b/en/dev/api/index.html new file mode 100644 index 00000000..0e4566b3 --- /dev/null +++ b/en/dev/api/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/log.html b/en/dev/api/log.html new file mode 100644 index 00000000..56bf7507 --- /dev/null +++ b/en/dev/api/log.html @@ -0,0 +1,43 @@ + + + + + + liteyuki.log | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.log

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : log.py @Software: PyCharm

def get_format(level: str) -> str

Source code or View on GitHub
python
def get_format(level: str) -> str:
+    if level == 'DEBUG':
+        return debug_format
+    else:
+        return default_format

def init_log(config: dict)

Description: 在语言加载完成后执行

Source code or View on GitHub
python
def init_log(config: dict):
+    """
+    在语言加载完成后执行
+    Returns:
+
+    """
+    logger.remove()
+    logger.add(sys.stdout, level=0, diagnose=False, format=get_format(config.get('log_level', 'INFO')))
+    show_icon = config.get('log_icon', True)
+    logger.level('DEBUG', color='<blue>', icon=f"{('🐛' if show_icon else '')}DEBUG")
+    logger.level('INFO', color='<normal>', icon=f"{('ℹ️' if show_icon else '')}INFO")
+    logger.level('SUCCESS', color='<green>', icon=f"{('✅' if show_icon else '')}SUCCESS")
+    logger.level('WARNING', color='<yellow>', icon=f"{('⚠️' if show_icon else '')}WARNING")
+    logger.level('ERROR', color='<red>', icon=f"{('⭕' if show_icon else '')}ERROR")

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/message/event.html b/en/dev/api/message/event.html new file mode 100644 index 00000000..11b23d97 --- /dev/null +++ b/en/dev/api/message/event.html @@ -0,0 +1,61 @@ + + + + + + liteyuki.message.event | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.event

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : snowykami@outlook.com @File : event.py @Software: PyCharm

class MessageEvent

def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)

Description: 轻雪抽象消息事件

Source code or View on GitHub
python
def __init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel['MessageEvent']]=None, data: Optional[dict[str, Any]]=None):
+    """
+        轻雪抽象消息事件
+        Args:
+
+            bot_id: 机器人ID
+            message: 消息,消息段数组[{type: str, data: dict[str, Any]}]
+            raw_message: 原始消息(通常为纯文本的格式)
+            message_type: 消息类型(private, group, other)
+
+            session_id: 会话ID(私聊通常为用户ID,群聊通常为群ID)
+            session_type: 会话类型(private, group)
+            receive_channel: 接收频道(用于回复消息)
+
+            data: 附加数据
+        """
+    if data is None:
+        data = {}
+    self.message_type = message_type
+    self.data = data
+    self.bot_id = bot_id
+    self.message = message
+    self.raw_message = raw_message
+    self.session_id = session_id
+    self.session_type = session_type
+    self.user_id = user_id
+    self.receive_channel = receive_channel

def reply(self, message: str | dict[str, Any])

Description: 回复消息

Arguments:

  • message:
Source code or View on GitHub
python
def reply(self, message: str | dict[str, Any]):
+    """
+        回复消息
+        Args:
+            message:
+        Returns:
+        """
+    reply_event = MessageEvent(message_type=self.session_type, message=message, raw_message='', data={'message': message}, bot_id=self.bot_id, session_id=self.session_id, user_id=self.user_id, session_type=self.session_type, receive_channel=None)
+    if self.receive_channel:
+        self.receive_channel.send(reply_event)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/message/index.html b/en/dev/api/message/index.html new file mode 100644 index 00000000..de0894ea --- /dev/null +++ b/en/dev/api/message/index.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.message | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/message/matcher.html b/en/dev/api/message/matcher.html new file mode 100644 index 00000000..dbc230d2 --- /dev/null +++ b/en/dev/api/message/matcher.html @@ -0,0 +1,60 @@ + + + + + + liteyuki.message.matcher | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.matcher

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:51 @Author : snowykami @Email : snowykami@outlook.com @File : matcher.py @Software: PyCharm

class Matcher

def __init__(self, rule: Rule, priority: int, block: bool)

Description: 匹配器

Arguments:

  • rule: 规则
  • priority: 优先级 >= 0
  • block: 是否阻断后续优先级更低的匹配器
Source code or View on GitHub
python
def __init__(self, rule: Rule, priority: int, block: bool):
+    """
+        匹配器
+        Args:
+            rule: 规则
+            priority: 优先级 >= 0
+            block: 是否阻断后续优先级更低的匹配器
+        """
+    self.rule = rule
+    self.priority = priority
+    self.block = block
+    self.handlers: list[EventHandler] = []

def handle(self) -> Callable[[EventHandler], EventHandler]

Description: 添加处理函数,装饰器

Return: 装饰器 handler

Source code or View on GitHub
python
def handle(self) -> Callable[[EventHandler], EventHandler]:
+    """
+        添加处理函数,装饰器
+        Returns:
+            装饰器 handler
+        """
+
+    def decorator(handler: EventHandler) -> EventHandler:
+        self.handlers.append(handler)
+        return handler
+    return decorator

async def run(self, event: MessageEvent) -> None

Description: 运行处理函数

Arguments:

  • event:
Source code or View on GitHub
python
async def run(self, event: MessageEvent) -> None:
+    """
+        运行处理函数
+        Args:
+            event:
+        Returns:
+        """
+    if not await self.rule(event):
+        return
+    for handler in self.handlers:
+        try:
+            await handler(event)
+        except Exception:
+            traceback.print_exc()

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/message/message.html b/en/dev/api/message/message.html new file mode 100644 index 00000000..761ce02b --- /dev/null +++ b/en/dev/api/message/message.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.message | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/message/on.html b/en/dev/api/message/on.html new file mode 100644 index 00000000..51c9b1f6 --- /dev/null +++ b/en/dev/api/message/on.html @@ -0,0 +1,40 @@ + + + + + + liteyuki.message.on | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.on

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:52 @Author : snowykami @Email : snowykami@outlook.com @File : on.py @Software: PyCharm

def add_matcher(matcher: Matcher)

Source code or View on GitHub
python
def add_matcher(matcher: Matcher):
+    for i, m in enumerate(_matcher_list):
+        if m.priority < matcher.priority:
+            _matcher_list.insert(i, matcher)
+            break
+    else:
+        _matcher_list.append(matcher)

def on_message(rule: Rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

Source code or View on GitHub
python
def on_message(rule: Rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+    matcher = Matcher(rule, priority, block)
+    add_matcher(matcher)
+    return matcher

def on_keywords(keywords: list[str], rule = empty_rule, priority: int = 0, block: bool = False) -> Matcher

Source code or View on GitHub
python
def on_keywords(keywords: list[str], rule=empty_rule, priority: int=0, block: bool=False) -> Matcher:
+
+    @Rule
+    async def on_keywords_rule(event: MessageEvent):
+        return any((keyword in event.raw_message for keyword in keywords))
+    return on_message(on_keywords_rule & rule, priority, block)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/message/rule.html b/en/dev/api/message/rule.html new file mode 100644 index 00000000..de9f142f --- /dev/null +++ b/en/dev/api/message/rule.html @@ -0,0 +1,42 @@ + + + + + + liteyuki.message.rule | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.message.rule

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 下午10:55 @Author : snowykami @Email : snowykami@outlook.com @File : rule.py @Software: PyCharm

var RuleHandlerFunc

  • Description: 规则函数签名

  • Type: TypeAlias

  • Default: Callable[[MessageEvent], Coroutine[None, None, bool]]

class Rule

def __init__(self, handler: RuleHandlerFunc)

Source code or View on GitHub
python
def __init__(self, handler: RuleHandlerFunc):
+    self.handler = handler

def __or__(self, other: Rule) -> Rule

Source code or View on GitHub
python
def __or__(self, other: 'Rule') -> 'Rule':
+
+    async def combined_handler(event: MessageEvent) -> bool:
+        return await self.handler(event) or await other.handler(event)
+    return Rule(combined_handler)

def __and__(self, other: Rule) -> Rule

Source code or View on GitHub
python
def __and__(self, other: 'Rule') -> 'Rule':
+
+    async def combined_handler(event: MessageEvent) -> bool:
+        return await self.handler(event) and await other.handler(event)
+    return Rule(combined_handler)

async def __call__(self, event: MessageEvent) -> bool

Source code or View on GitHub
python
async def __call__(self, event: MessageEvent) -> bool:
+    if self.handler is None:
+        return True
+    return await self.handler(event)

@Rule

async def empty_rule(event: MessageEvent) -> bool

Source code or View on GitHub
python
@Rule
+async def empty_rule(event: MessageEvent) -> bool:
+    return True

@Rule

async def is_su_rule(event: MessageEvent) -> bool

Source code or View on GitHub
python
@Rule
+async def is_su_rule(event: MessageEvent) -> bool:
+    return str(event.user_id) in _superusers

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/message/session.html b/en/dev/api/message/session.html new file mode 100644 index 00000000..f5f6c8e8 --- /dev/null +++ b/en/dev/api/message/session.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.message.session | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/mkdoc.html b/en/dev/api/mkdoc.html new file mode 100644 index 00000000..db609011 --- /dev/null +++ b/en/dev/api/mkdoc.html @@ -0,0 +1,186 @@ + + + + + + liteyuki.mkdoc | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.mkdoc

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/19 上午6:23 @Author : snowykami @Email : snowykami@outlook.com @File : mkdoc.py @Software: PyCharm

class DefType(Enum)

attr FUNCTION = 'function'

attr METHOD = 'method'

attr STATIC_METHOD = 'staticmethod'

attr CLASS_METHOD = 'classmethod'

attr PROPERTY = 'property'

class FunctionInfo(BaseModel)

attr name: str = NO_DEFAULT

attr args: list[tuple[str, str]] = NO_DEFAULT

attr return_type: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr source_code: str = ''

attr type: DefType = NO_DEFAULT

attr is_async: bool = NO_DEFAULT

class AttributeInfo(BaseModel)

attr name: str = NO_DEFAULT

attr type: str = NO_DEFAULT

attr value: Any = None

attr docstring: str = ''

class ClassInfo(BaseModel)

attr name: str = NO_DEFAULT

attr docstring: str = NO_DEFAULT

attr methods: list[FunctionInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr inherit: list[str] = NO_DEFAULT

class ModuleInfo(BaseModel)

attr module_path: str = NO_DEFAULT

attr functions: list[FunctionInfo] = NO_DEFAULT

attr classes: list[ClassInfo] = NO_DEFAULT

attr attributes: list[AttributeInfo] = NO_DEFAULT

attr docstring: str = NO_DEFAULT

def get_relative_path(base_path: str, target_path: str) -> str

Description: 获取相对路径

Arguments:

  • base_path: 基础路径
  • target_path: 目标路径
Source code or View on GitHub
python
def get_relative_path(base_path: str, target_path: str) -> str:
+    """
+    获取相对路径
+    Args:
+        base_path: 基础路径
+        target_path: 目标路径
+    """
+    return os.path.relpath(target_path, base_path)

def write_to_files(file_data: dict[str, str])

Description: 输出文件

Arguments:

  • file_data: 文件数据 相对路径
Source code or View on GitHub
python
def write_to_files(file_data: dict[str, str]):
+    """
+    输出文件
+    Args:
+        file_data: 文件数据 相对路径
+    """
+    for rp, data in file_data.items():
+        if not os.path.exists(os.path.dirname(rp)):
+            os.makedirs(os.path.dirname(rp))
+        with open(rp, 'w', encoding='utf-8') as f:
+            f.write(data)

def get_file_list(module_folder: str)

Source code or View on GitHub
python
def get_file_list(module_folder: str):
+    file_list = []
+    for root, dirs, files in os.walk(module_folder):
+        for file in files:
+            if file.endswith(('.py', '.pyi')):
+                file_list.append(os.path.join(root, file))
+    return file_list

def get_module_info_normal(file_path: str, ignore_private: bool = True) -> ModuleInfo

Description: 获取函数和类

Arguments:

  • file_path: Python 文件路径
  • ignore_private: 忽略私有函数和类

Return: 模块信息

Source code or View on GitHub
python
def get_module_info_normal(file_path: str, ignore_private: bool=True) -> ModuleInfo:
+    """
+    获取函数和类
+    Args:
+        file_path: Python 文件路径
+        ignore_private: 忽略私有函数和类
+    Returns:
+        模块信息
+    """
+    with open(file_path, 'r', encoding='utf-8') as file:
+        file_content = file.read()
+        tree = ast.parse(file_content)
+    dot_sep_module_path = file_path.replace(os.sep, '.').replace('.py', '').replace('.pyi', '')
+    module_docstring = ast.get_docstring(tree)
+    module_info = ModuleInfo(module_path=dot_sep_module_path, functions=[], classes=[], attributes=[], docstring=module_docstring if module_docstring else '')
+    for node in ast.walk(tree):
+        if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
+            if not any((isinstance(parent, ast.ClassDef) for parent in ast.iter_child_nodes(node))) and (not ignore_private or not node.name.startswith('_')):
+                if node.args.args:
+                    first_arg = node.args.args[0]
+                    if first_arg.arg in ('self', 'cls'):
+                        continue
+                function_docstring = ast.get_docstring(node)
+                func_info = FunctionInfo(name=node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in node.args.args], return_type=ast.unparse(node.returns) if node.returns else 'None', docstring=function_docstring if function_docstring else '', type=DefType.FUNCTION, is_async=isinstance(node, ast.AsyncFunctionDef), source_code=ast.unparse(node))
+                module_info.functions.append(func_info)
+        elif isinstance(node, ast.ClassDef):
+            class_docstring = ast.get_docstring(node)
+            class_info = ClassInfo(name=node.name, docstring=class_docstring if class_docstring else '', methods=[], attributes=[], inherit=[ast.unparse(base) for base in node.bases])
+            for class_node in node.body:
+                if isinstance(class_node, ast.FunctionDef) and (not ignore_private or not class_node.name.startswith('_') or class_node.name == '__init__'):
+                    method_docstring = ast.get_docstring(class_node)
+                    def_type = DefType.METHOD
+                    if class_node.decorator_list:
+                        if any((isinstance(decorator, ast.Name) and decorator.id == 'staticmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.STATIC_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'classmethod' for decorator in class_node.decorator_list)):
+                            def_type = DefType.CLASS_METHOD
+                        elif any((isinstance(decorator, ast.Name) and decorator.id == 'property' for decorator in class_node.decorator_list)):
+                            def_type = DefType.PROPERTY
+                    class_info.methods.append(FunctionInfo(name=class_node.name, args=[(arg.arg, ast.unparse(arg.annotation) if arg.annotation else NO_TYPE_ANY) for arg in class_node.args.args], return_type=ast.unparse(class_node.returns) if class_node.returns else 'None', docstring=method_docstring if method_docstring else '', type=def_type, is_async=isinstance(class_node, ast.AsyncFunctionDef), source_code=ast.unparse(class_node)))
+                elif isinstance(class_node, ast.Assign):
+                    for target in class_node.targets:
+                        if isinstance(target, ast.Name):
+                            class_info.attributes.append(AttributeInfo(name=target.id, type=ast.unparse(class_node.value)))
+            module_info.classes.append(class_info)
+        elif isinstance(node, ast.Assign):
+            if not any((isinstance(parent, (ast.ClassDef, ast.FunctionDef)) for parent in ast.iter_child_nodes(node))):
+                for target in node.targets:
+                    if isinstance(target, ast.Name) and (not ignore_private or not target.id.startswith('_')):
+                        attr_type = NO_TYPE_HINT
+                        if isinstance(node.value, ast.AnnAssign) and node.value.annotation:
+                            attr_type = ast.unparse(node.value.annotation)
+                        module_info.attributes.append(AttributeInfo(name=target.id, type=attr_type, value=ast.unparse(node.value) if node.value else None))
+    return module_info

def generate_markdown(module_info: ModuleInfo, front_matter = None, lang: str = 'zh-CN') -> str

Description: 生成模块的Markdown 你可在此自定义生成的Markdown格式

Arguments:

  • module_info: 模块信息
  • front_matter: 自定义选项title, index, icon, category
  • lang: 语言

Return: Markdown 字符串

Source code or View on GitHub
python
def generate_markdown(module_info: ModuleInfo, front_matter=None, lang: str='zh-CN') -> str:
+    """
+    生成模块的Markdown
+    你可在此自定义生成的Markdown格式
+    Args:
+        module_info: 模块信息
+        front_matter: 自定义选项title, index, icon, category
+        lang: 语言
+    Returns:
+        Markdown 字符串
+    """
+    content = ''
+    front_matter = '---\n' + '\n'.join([f'{k}: {v}' for k, v in front_matter.items()]) + '\n---\n\n'
+    content += front_matter
+    for func in module_info.functions:
+        args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in func.args]
+        content += f"### ***{('async ' if func.is_async else '')}def*** `{func.name}({', '.join(args_with_type)}) -> {func.return_type}`\n\n"
+        func.docstring = func.docstring.replace('\n', '\n\n')
+        content += f'{func.docstring}\n\n'
+        content += f'<details>\n<summary>源代码</summary>\n\n```python\n{func.source_code}\n```\n</details>\n\n'
+    for cls in module_info.classes:
+        if cls.inherit:
+            inherit = f"({', '.join(cls.inherit)})" if cls.inherit else ''
+            content += f'### ***class*** `{cls.name}{inherit}`\n\n'
+        else:
+            content += f'### ***class*** `{cls.name}`\n\n'
+        cls.docstring = cls.docstring.replace('\n', '\n\n')
+        content += f'{cls.docstring}\n\n'
+        for method in cls.methods:
+            if method.type != DefType.METHOD:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] else arg[0] for arg in method.args]
+                content += f'### &emsp; ***@{method.type.value}***\n'
+            else:
+                args_with_type = [f'{arg[0]}: {arg[1]}' if arg[1] and arg[0] != 'self' else arg[0] for arg in method.args]
+            content += f"### &emsp; ***{('async ' if method.is_async else '')}def*** `{method.name}({', '.join(args_with_type)}) -> {method.return_type}`\n\n"
+            method.docstring = method.docstring.replace('\n', '\n\n')
+            content += f'&emsp;{method.docstring}\n\n'
+            if lang == 'zh-CN':
+                TEXT_SOURCE_CODE = '源代码'
+            else:
+                TEXT_SOURCE_CODE = 'Source Code'
+            content += f'<details>\n<summary>{TEXT_SOURCE_CODE}</summary>\n\n```python\n{method.source_code}\n```\n</details>\n\n'
+        for attr in cls.attributes:
+            content += f'### &emsp; ***attr*** `{attr.name}: {attr.type}`\n\n'
+    for attr in module_info.attributes:
+        if attr.type == NO_TYPE_HINT:
+            content += f'### ***var*** `{attr.name} = {attr.value}`\n\n'
+        else:
+            content += f'### ***var*** `{attr.name}: {attr.type} = {attr.value}`\n\n'
+        attr.docstring = attr.docstring.replace('\n', '\n\n')
+        content += f'{attr.docstring}\n\n'
+    return content

def generate_docs(module_folder: str, output_dir: str, with_top: bool = False, lang: str = 'zh-CN', ignored_paths = None)

Description: 生成文档

Arguments:

  • module_folder: 模块文件夹
  • output_dir: 输出文件夹
  • with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
  • ignored_paths: 忽略的路径
  • lang: 语言
Source code or View on GitHub
python
def generate_docs(module_folder: str, output_dir: str, with_top: bool=False, lang: str='zh-CN', ignored_paths=None):
+    """
+    生成文档
+    Args:
+        module_folder: 模块文件夹
+        output_dir: 输出文件夹
+        with_top: 是否包含顶层文件夹 False时例如docs/api/module_a, docs/api/module_b, True时例如docs/api/module/module_a.md, docs/api/module/module_b.md
+        ignored_paths: 忽略的路径
+        lang: 语言
+    """
+    if ignored_paths is None:
+        ignored_paths = []
+    file_data: dict[str, str] = {}
+    file_list = get_file_list(module_folder)
+    shutil.rmtree(output_dir, ignore_errors=True)
+    os.mkdir(output_dir)
+    replace_data = {'__init__': 'README', '.py': '.md'}
+    for pyfile_path in file_list:
+        if any((ignored_path.replace('\\', '/') in pyfile_path.replace('\\', '/') for ignored_path in ignored_paths)):
+            continue
+        no_module_name_pyfile_path = get_relative_path(module_folder, pyfile_path)
+        rel_md_path = pyfile_path if with_top else no_module_name_pyfile_path
+        for rk, rv in replace_data.items():
+            rel_md_path = rel_md_path.replace(rk, rv)
+        abs_md_path = os.path.join(output_dir, rel_md_path)
+        module_info = get_module_info_normal(pyfile_path)
+        if 'README' in abs_md_path:
+            front_matter = {'title': module_info.module_path.replace('.__init__', '').replace('_', '\\n'), 'index': 'true', 'icon': 'laptop-code', 'category': 'API'}
+        else:
+            front_matter = {'title': module_info.module_path.replace('_', '\\n'), 'order': '1', 'icon': 'laptop-code', 'category': 'API'}
+        md_content = generate_markdown(module_info, front_matter)
+        print(f'Generate {pyfile_path} -> {abs_md_path}')
+        file_data[abs_md_path] = md_content
+    write_to_files(file_data)

var no_module_name_pyfile_path

  • Description: 去头路径

  • Default: get_relative_path(module_folder, pyfile_path)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/plugin/index.html b/en/dev/api/plugin/index.html new file mode 100644 index 00000000..11c39b7e --- /dev/null +++ b/en/dev/api/plugin/index.html @@ -0,0 +1,32 @@ + + + + + + liteyuki.plugin | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/plugin/load.html b/en/dev/api/plugin/load.html new file mode 100644 index 00000000..8c0590d5 --- /dev/null +++ b/en/dev/api/plugin/load.html @@ -0,0 +1,108 @@ + + + + + + liteyuki.plugin.load | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugin.load

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : snowykami@outlook.com @File : load.py @Software: PyCharm

def load_plugin(module_path: str | Path) -> Optional[Plugin]

Description: 加载单个插件,可以是本地插件或是通过 pip 安装的插件。

Arguments:

  • module_path: 插件名称 path.to.your.plugin
  • 或插件路径 pathlib.Path(path/to/your/plugin):
Source code or View on GitHub
python
def load_plugin(module_path: str | Path) -> Optional[Plugin]:
+    """加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
+
+    参数:
+        module_path: 插件名称 `path.to.your.plugin`
+        或插件路径 `pathlib.Path(path/to/your/plugin)`
+    """
+    module_path = path_to_module_name(Path(module_path)) if isinstance(module_path, Path) else module_path
+    try:
+        module = import_module(module_path)
+        _plugins[module.__name__] = Plugin(name=module.__name__, module=module, module_name=module_path)
+        if module.__dict__.get('__plugin_metadata__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_metadata__']
+            display_name = module.__name__.split('.')[-1]
+        elif module.__dict__.get('__liteyuki_plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__liteyuki_plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        elif module.__dict__.get('__plugin_meta__', None):
+            metadata: 'PluginMetadata' = module.__dict__['__plugin_meta__']
+            display_name = format_display_name(f"{metadata.name}({module.__name__.split('.')[-1]})", metadata.type)
+        else:
+            logger.opt(colors=True).warning(f'The metadata of Liteyuki plugin "{module.__name__}" is not specified, use empty.')
+            metadata = PluginMetadata(name=module.__name__)
+            display_name = module.__name__.split('.')[-1]
+        _plugins[module.__name__].metadata = metadata
+        logger.opt(colors=True).success(f'Succeeded to load liteyuki plugin "{display_name}"')
+        return _plugins[module.__name__]
+    except Exception as e:
+        logger.opt(colors=True).success(f'Failed to load liteyuki plugin "<r>{module_path}</r>"')
+        traceback.print_exc()
+        return None

def load_plugins(*plugin_dir: str, *, ignore_warning: bool = True) -> set[Plugin]

Description: 导入文件夹下多个插件

Arguments:

  • plugin_dir: 文件夹路径
  • ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
Source code or View on GitHub
python
def load_plugins(*plugin_dir: str, ignore_warning: bool=True) -> set[Plugin]:
+    """导入文件夹下多个插件
+
+    参数:
+        plugin_dir: 文件夹路径
+        ignore_warning: 是否忽略警告,通常是目录不存在或目录为空
+    """
+    plugins = set()
+    for dir_path in plugin_dir:
+        if not os.path.exists(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' does not exist.")
+            continue
+        if not os.listdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is empty.")
+            continue
+        if not os.path.isdir(dir_path):
+            if not ignore_warning:
+                logger.warning(f"Plugins dir '{dir_path}' is not a directory.")
+            continue
+        for f in os.listdir(dir_path):
+            path = Path(os.path.join(dir_path, f))
+            module_name = None
+            if os.path.isfile(path) and f.endswith('.py') and (f != '__init__.py'):
+                module_name = f'{path_to_module_name(Path(dir_path))}.{f[:-3]}'
+            elif os.path.isdir(path) and os.path.exists(os.path.join(path, '__init__.py')):
+                module_name = path_to_module_name(path)
+            if module_name:
+                load_plugin(module_name)
+                if _plugins.get(module_name):
+                    plugins.add(_plugins[module_name])
+    return plugins

def format_display_name(display_name: str, plugin_type: PluginType) -> str

Description: 设置插件名称颜色,根据不同类型插件设置颜色

Arguments:

  • display_name: 插件名称
  • plugin_type: 插件类型

Return: str: 设置后的插件名称

Source code or View on GitHub
python
def format_display_name(display_name: str, plugin_type: PluginType) -> str:
+    """
+    设置插件名称颜色,根据不同类型插件设置颜色
+    Args:
+        display_name: 插件名称
+        plugin_type: 插件类型
+
+    Returns:
+        str: 设置后的插件名称 <y>name</y>
+    """
+    color = 'y'
+    match plugin_type:
+        case PluginType.APPLICATION:
+            color = 'm'
+        case PluginType.TEST:
+            color = 'g'
+        case PluginType.MODULE:
+            color = 'e'
+        case PluginType.SERVICE:
+            color = 'c'
+    return f'<{color}>{display_name} [{plugin_type.name}]</{color}>'

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/plugin/manager.html b/en/dev/api/plugin/manager.html new file mode 100644 index 00000000..6e77c5d1 --- /dev/null +++ b/en/dev/api/plugin/manager.html @@ -0,0 +1,26 @@ + + + + + + liteyuki.plugin.manager | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/plugin/model.html b/en/dev/api/plugin/model.html new file mode 100644 index 00000000..4c1d3e8e --- /dev/null +++ b/en/dev/api/plugin/model.html @@ -0,0 +1,27 @@ + + + + + + liteyuki.plugin.model | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugin.model

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/7/24 上午12:02 @Author : snowykami @Email : snowykami@outlook.com @File : model.py @Software: PyCharm

class PluginType(Enum)

attr APPLICATION = 'application'

attr SERVICE = 'service'

attr MODULE = 'module'

attr UNCLASSIFIED = 'unclassified'

attr TEST = 'test'

class PluginMetadata(BaseModel)

attr name: str = NO_DEFAULT

attr description: str = ''

attr usage: str = ''

attr type: PluginType = PluginType.UNCLASSIFIED

attr author: str = ''

attr homepage: str = ''

attr extra: dict[str, Any] = {}

class Plugin(BaseModel)

def __hash__(self)

Source code or View on GitHub
python
def __hash__(self):
+    return hash(self.module_name)

attr model_config = {'arbitrary_types_allowed': True}

attr name: str = NO_DEFAULT

attr module: ModuleType = NO_DEFAULT

attr module_name: str = NO_DEFAULT

attr metadata: Optional[PluginMetadata] = None

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/plugin/plugin.html b/en/dev/api/plugin/plugin.html new file mode 100644 index 00000000..802cee99 --- /dev/null +++ b/en/dev/api/plugin/plugin.html @@ -0,0 +1,32 @@ + + + + + + liteyuki.plugin | LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/dev/api/plugins/liteecho.html b/en/dev/api/plugins/liteecho.html new file mode 100644 index 00000000..365d7b52 --- /dev/null +++ b/en/dev/api/plugins/liteecho.html @@ -0,0 +1,28 @@ + + + + + + liteyuki.plugins.liteecho | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugins.liteecho

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/22 下午12:31 @Author : snowykami @Email : snowykami@outlook.com @File : liteecho.py @Software: PyCharm

@on_startswith(['liteecho'], rule=is_su_rule).handle()

async def liteecho(event: MessageEvent)

Source code or View on GitHub
python
@on_startswith(['liteecho'], rule=is_su_rule).handle()
+async def liteecho(event: MessageEvent):
+    event.reply(event.raw_message.strip()[8:].strip())

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/plugins/plugin_loader/index.html b/en/dev/api/plugins/plugin_loader/index.html new file mode 100644 index 00000000..ba4785a1 --- /dev/null +++ b/en/dev/api/plugins/plugin_loader/index.html @@ -0,0 +1,33 @@ + + + + + + liteyuki.plugins.plugin_loader | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugins.plugin_loader

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

Description: 默认插件加载器,应在初始化时调用

Source code or View on GitHub
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/plugins/plugin_loader/plugin_loader.html b/en/dev/api/plugins/plugin_loader/plugin_loader.html new file mode 100644 index 00000000..69b9f7fb --- /dev/null +++ b/en/dev/api/plugins/plugin_loader/plugin_loader.html @@ -0,0 +1,33 @@ + + + + + + liteyuki.plugins.plugin_loader | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.plugins.plugin_loader

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : init.py.py @Software: PyCharm

def default_plugins_loader()

Description: 默认插件加载器,应在初始化时调用

Source code or View on GitHub
python
def default_plugins_loader():
+    """
+    默认插件加载器,应在初始化时调用
+    """
+    for plugin in get_config('liteyuki.plugins', []):
+        load_plugin(plugin)
+    for plugin_dir in get_config('liteyuki.plugin_dirs', ['src/liteyuki_plugins']):
+        load_plugins(plugin_dir)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/api/utils.html b/en/dev/api/utils.html new file mode 100644 index 00000000..21c8ebe3 --- /dev/null +++ b/en/dev/api/utils.html @@ -0,0 +1,95 @@ + + + + + + liteyuki.utils | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

liteyuki.utils

Description: 一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改

def is_coroutine_callable(call: Callable[..., Any]) -> bool

Description: 判断是否为协程可调用对象

Arguments:

  • call: 可调用对象

Return: bool: 是否为协程可调用对象

Source code or View on GitHub
python
def is_coroutine_callable(call: Callable[..., Any]) -> bool:
+    """
+    判断是否为协程可调用对象
+    Args:
+        call: 可调用对象
+    Returns:
+        bool: 是否为协程可调用对象
+    """
+    if inspect.isroutine(call):
+        return inspect.iscoroutinefunction(call)
+    if inspect.isclass(call):
+        return False
+    func_ = getattr(call, '__call__', None)
+    return inspect.iscoroutinefunction(func_)

def run_coroutine(*coro: Coroutine)

Description: 运行协程

Arguments:

  • coro:
Source code or View on GitHub
python
def run_coroutine(*coro: Coroutine):
+    """
+    运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    try:
+        loop = asyncio.get_running_loop()
+        if loop.is_running():
+            for c in coro:
+                asyncio.ensure_future(c)
+        else:
+            for c in coro:
+                loop.run_until_complete(c)
+    except RuntimeError:
+        loop = asyncio.new_event_loop()
+        asyncio.set_event_loop(loop)
+        loop.run_until_complete(asyncio.gather(*coro))
+        loop.close()
+    except Exception as e:
+        logger.error(f'Exception occurred: {e}')

def run_coroutine_in_thread(*coro: Coroutine)

Description: 在新线程中运行协程

Arguments:

  • coro:
Source code or View on GitHub
python
def run_coroutine_in_thread(*coro: Coroutine):
+    """
+    在新线程中运行协程
+    Args:
+        coro:
+
+    Returns:
+
+    """
+    threading.Thread(target=run_coroutine, args=coro, daemon=True).start()

def path_to_module_name(path: Path) -> str

Description: 转换路径为模块名

Arguments:

  • path: 路径a/b/c/d -> a.b.c.d

Return: str: 模块名

Source code or View on GitHub
python
def path_to_module_name(path: Path) -> str:
+    """
+    转换路径为模块名
+    Args:
+        path: 路径a/b/c/d -> a.b.c.d
+    Returns:
+        str: 模块名
+    """
+    rel_path = path.resolve().relative_to(Path.cwd().resolve())
+    if rel_path.stem == '__init__':
+        return '.'.join(rel_path.parts[:-1])
+    else:
+        return '.'.join(rel_path.parts[:-1] + (rel_path.stem,))

def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]

Description: 异步包装器

Arguments:

  • func: Sync Callable

Return: Coroutine: Asynchronous Callable

Source code or View on GitHub
python
def async_wrapper(func: Callable[..., Any]) -> Callable[..., Coroutine]:
+    """
+    异步包装器
+    Args:
+        func: Sync Callable
+    Returns:
+        Coroutine: Asynchronous Callable
+    """
+
+    async def wrapper(*args, **kwargs):
+        return func(*args, **kwargs)
+    wrapper.__signature__ = inspect.signature(func)
+    return wrapper

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/comm.html b/en/dev/comm.html new file mode 100644 index 00000000..2510bd0a --- /dev/null +++ b/en/dev/comm.html @@ -0,0 +1,68 @@ + + + + + + 进程通信 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

Channel Communication

Introduction

LiteyukiBot is running in the main process MainProcess, and other plugin framework processes are child processes that come with it. Therefore, it is impossible to communicate through shared memory and direct object transfer. Liteyuki provides a channel Channel for inter-process communication like go. You can send messages to other processes through Channel and listen to messages from other processes.

Example

The channel is full-duplex, with two receiving modes, but only one mode can be used for a channel, that is, passive mode and active mode, passive mode is implemented by the chan.on_receive() decorator callback function, and active mode needs to call chan.receive() to implement

  • 创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为{process_name}-active{process_name}-passive
  • 主进程中通过get_channel函数获取通道对象
  • 子进程中导入单例active_channelpassive_channel即可

在轻雪插件中(主进程中)

python
import asyncio
+
+from liteyuki.comm import get_channel, Channel
+from liteyuki import get_bot
+
+# get_channel函数获取通道对象,参数为调用set_channel时的通道标识
+channel_passive = get_channel("nonebot-passive")  # 获取被动通道
+channel_active = get_channel("nonebot-active")  # 获取主动通道
+liteyuki_bot = get_bot()
+
+
+# 注册一个函数在轻雪启动后运行
+@liteyuki_bot.on_after_start
+async def send_data():
+    while True:
+        channel_passive.send("I am liteyuki main process passive")
+        channel_active.send("I am liteyuki main process active")
+        await asyncio.sleep(3)  # 每3秒发送一次消息

在子进程中(例如NoneBot插件中)

python
from nonebot import get_driver
+from liteyuki.comm import active_channel, passive_channel  # 子进程中获取通道直接导入进程全局单例即可
+from liteyuki.log import logger
+
+driver = get_driver()
+
+
+# 被动模式,通过装饰器注册一个函数在接收到消息时运行,每次接收到字符串数据时都会运行
+@passive_channel.on_receive(filter_func=lambda data: isinstance(data, str))
+async def on_passive_receive(data):
+    logger.info(f"Passive receive: {data}")
+
+
+# 注册一个函数在NoneBot启动后运行
+@driver.on_startup
+def on_startup():
+    while True:
+        data = active_channel.receive()
+        logger.info(f"Active receive: {data}")

启动后控制台输出

log
0000-00-00 00:00:00 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:00 [ℹ️信息] Active receive: I am liteyuki main process active
+0000-00-00 00:00:03 [ℹ️信息] Passive receive: I am liteyuki main process passive
+0000-00-00 00:00:03 [ℹ️信息] Active receive: I am liteyuki main process active
+...

共享内存通信

简介

  • 相比于普通进程通信,内存共享使得代码编写更加简洁,轻雪框架提供了一个内存共享通信的接口,你可以通过storage模块实现内存共享通信,该模块封装通道实现
  • 内存共享是线程安全的,你可以在多个线程中读写共享内存,线程锁会自动保护共享内存的读写操作

示例

在任意进程中均可使用

python
from liteyuki.comm.storage import shared_memory
+
+shared_memory.set("key", "value")  # 设置共享内存
+value = shared_memory.get("key")  # 获取共享内存

源代码:liteyuki/comm/storage.py

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/lyfunc.html b/en/dev/lyfunc.html new file mode 100644 index 00000000..a8de959a --- /dev/null +++ b/en/dev/lyfunc.html @@ -0,0 +1,45 @@ + + + + + + 轻雪函数 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

轻雪函数

轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.

函数文件

函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.mcfunction,文件内容为一系列的命令,每行一个命令,支持单行注释#(编辑时的语法高亮可采取shell格式),例如:

shell
# 在发信器输出"hello world"
+cmd echo hello world
+
+# 如果你想同时输出多行内容可以尝试换行符(Python格式)
+cmd echo hello world\nLiteyuki bot

也支持句末注释,例如:

shell
cmd echo hello world # 输出"hello world"

命令文档

shell
var <var1=value1> [var2=value2] ...  # 定义变量
+cmd <command>  # 在设备上执行命令
+api <api_name> [var=value...]  # 调用Bot API
+function <func_name> # 调用函数,可递归
+sleep <time>  # 异步等待,单位s
+nohup <command>  # 使用新的task执行命令,即不等待
+end # 结束函数关键字,包括子task
+await # 等待所有异步任务结束,若函数中启动了其他task,需要在最后调用,否则task对象会被销毁

示例

shell
# 疯狂戳好友
+# 使用 /function poke user_id=123456 执行
+# 每隔0.2s戳两次,无限戳,会触发最大递归深度限制
+# 若要戳20s后停止,则需要删除await,添加sleep 20和end
+api friend_poke user_id=user_id
+api friend_poke user_id=user_id
+sleep 0.2
+nohup function poke
+await

API

理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.

Onebot v11 API文档

结束关键字

由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.

await 异步任务结束关键字,用于结束当前已完成function的执行

WARNING

但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁

TIP

编写轻雪函数推荐你使用VS Code插件Liteyuki Function实现语法高亮

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/plugin.html b/en/dev/plugin.html new file mode 100644 index 00000000..3c44256e --- /dev/null +++ b/en/dev/plugin.html @@ -0,0 +1,57 @@ + + + + + + 轻雪插件开发 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

简介

轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能

开始

创建插件

一个.py文件或一个包含__init__.py的文件夹即可被识别为插件

首先创建一个文件夹,例如watchdog_plugin,并在其中创建一个__init__.py文件,即可创建一个插件

__init__.py

python
from liteyuki.plugin import PluginMetadata, PluginType
+from .watch_dog import *    # 导入逻辑部分
+
+# 定义插件元数据
+__plugin_meta__ = PluginMetadata(
+    name="NoneDog",  # 插件名称
+    version="1.0.0",  # 插件版本
+    description="A simple plugin for nonebot developer",  # 插件描述
+    type=PluginType.SERVICE  # 插件类型
+)
+
+# 你的插件代码
+...

编写逻辑部分

轻雪主进程不涉及聊天部分,因此插件主要是一些后台任务或者与聊天机器人的通信 以下我们会编写一个简单的插件,用于开发NoneBot时进行文件系统变更重载 watch_dog.py

python
import os
+from liteyuki.dev import observer  # 导入文件系统观察器
+from liteyuki import get_bot, logger  # 导入轻雪Bot和日志
+from watchdog.events import FileSystemEvent  # 导入文件系统事件
+
+liteyuki = get_bot()  # 获取唯一的轻雪Bot实例
+
+exclude_extensions = (".pyc", ".pyo")  # 排除的文件扩展名
+
+
+# 用observer的on_file_system_event装饰器监听文件系统事件
+@observer.on_file_system_event(
+    directories=("src/nonebot_plugins",),
+    event_filter=lambda event: not event.src_path.endswith(exclude_extensions) and ("__pycache__" not in event.src_path) and os.path.isfile(event.src_path)
+)
+def restart_nonebot_process(event: FileSystemEvent):
+    logger.debug(f"File {event.src_path} changed, reloading nonebot...")
+    liteyuki.restart_process("nonebot")  # 调用重启进程方法

加载插件

方法1

  • 在配置文件中的liteyuki.plugins中添加你的插件路径,例如watchdog_plugin,重启轻雪即可加载插件。

方法2

  • 使用开发工具快速运行插件,无需手动创建实例
  • 创建入口文件,例如main.py,并在其中写入以下代码
python
from liteyuki.dev.plugin import run_plugins
+
+run_plugins("watchdog_plugin")

然后运行python main.py即可启动插件

启用插件后,我们在src/nonebot_plugins下创建一个文件,例如test.py,并在其中写入一些代码,保存后轻雪会自动重载NoneBot进程

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/dev/resource.html b/en/dev/resource.html new file mode 100644 index 00000000..e7ed0ec2 --- /dev/null +++ b/en/dev/resource.html @@ -0,0 +1,38 @@ + + + + + + 资源包开发 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

简介

资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码

  • 资源/主题商店提供了一些资源包供你选择,你也可以自己制作资源包
  • 资源包的制作很简单,如果你接触过Minecraft的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。
  • 部分内容制作需要一点点前端基础,例如htmlcss
  • 轻雪原版资源包请查看LiteyukiBot/liteyuki/resources,可以在此基础上进行修改
  • 欢迎各位投稿资源包到轻雪资源商店

请注意,主题包中的html渲染使用Js来规定数据的渲染位置,请确保您所编写的html代码能被Bot解析,否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码,以避免出现无法预料的问题。


加载资源包

  • 资源包通常是以.zip格式压缩的,只需要将其解压到根目录resources目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
shell
main.py
+resources
+└─resource_pack_1
+    ├─metadata.yml
+    ├─templates
+    └───...
+└─resource_pack_2
+    ├─metadata.yml
+    └─...
  • 你自己制作的资源包也应该遵循这个规则,并且应该在metadata.yml中填写一些信息
  • 若没有metadata.yml文件,则该文件夹不会被识别为资源包
yaml
name: "资源包名称"
+version: "1.0.0"
+description: "资源包描述"
+# 你可以自定义一些信息,但请保证以上三个字段
+...
  • 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,例如,你在A包中定义了一个index.html文件,B包也定义了一个index.html文件,那么加载B包后,A包中的index.html文件会被覆盖
  • 对于不同资源包的不同文件,是可以相对引用的,例如你在A中定义了templates/index.html,在B中定义了templates/style.css,可以在A的index.html中用./style.css相对路径引用B中的css

TIP

资源包的结构会随着轻雪的更新而有变动,第三方资源包开发者需要注意版本兼容性,同时用户也应该自行选择可用的资源包

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/index.html b/en/index.html new file mode 100644 index 00000000..031c2be0 --- /dev/null +++ b/en/index.html @@ -0,0 +1,26 @@ + + + + + + LiteyukiBot + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/store/plugin.html b/en/store/plugin.html new file mode 100644 index 00000000..8b5393a1 --- /dev/null +++ b/en/store/plugin.html @@ -0,0 +1,26 @@ + + + + + + 插件商店 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/store/resource.html b/en/store/resource.html new file mode 100644 index 00000000..264a4298 --- /dev/null +++ b/en/store/resource.html @@ -0,0 +1,26 @@ + + + + + + 资源商店 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/usage/agreement.html b/en/usage/agreement.html new file mode 100644 index 00000000..6cf6ab88 --- /dev/null +++ b/en/usage/agreement.html @@ -0,0 +1,26 @@ + + + + + + 用户协议 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

用户协议

  1. 本项目遵循MIT协议,你可以自由使用,修改,分发,但是请保留原作者信息
  2. 你可以选择开启auto_report(默认开启),轻雪会收集以下内容
    • 运行环境的设备信息:CPU,内存,系统信息及Python信息
    • 插件信息(不含插件数据)
    • 部分异常信息,
    • 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把auto_report设定为false
  3. 本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性
  4. 使用此项目代表你已经同意以上协议

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/usage/basic.html b/en/usage/basic.html new file mode 100644 index 00000000..ae3e0357 --- /dev/null +++ b/en/usage/basic.html @@ -0,0 +1,26 @@ + + + + + + 基础插件 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

基础插件


TIP

参数<param>为必填参数,[option]为可选参数。

命令别名:配置了命令别名的命令可以使用别名代替原命令,例如npm install ~可以使用插件 安装 ~代替。

轻雪命令liteyuki_command

命令说明权限举例可用参数
reload-liteyuki重载轻雪超级用户
update-liteyuki更新轻雪超级用户
liteecho查看当前bot 版本超级用户
status查看统计信息和状态超级用户
config set <key> value添加配置项,若存在则会覆盖,输入值会被执行以转换为正确的类型,"10"和10是不一样的超级用户config set name 'liteyuki-bot'<key>: 若存在则覆盖, 若不存在则创建于config.yml ; value: yml格式的所有合法内容
config get [key] 查询配置项,不带key返回配置项列表,推荐私聊使用超级用户config get name<key>: 若存在则返回, 若不存在则返回空
switch-image-mode 在普通图片和Markdown大图之间切换,该功能需要commit:505468b及以后的Lagrange.OneBot,默认普通图片超级用户switch-image-mode
/api api_name [args] 调用机器人API超级用户/api get_group_member_list group_id=1234567<args>: 参数列表, 格式为onebot v11协议api, 可用%20代替空格
/function function_name [args] [kwargs] 调用机器人函数(.lyfunction语法)超级用户/function send_group_msg group_id=1234567 message='hello'<args><kwargs>: 参数列表, api格式为onebot v11协议api
group enable/disable [group_id]在群聊启用/停用机器人,group_id仅超级用户可用超级用户,群聊仅群主、管理员、超级用户可用group enable 1145141919810<group_id>: 群号
liteyuki-docs查看轻雪文档所有人

命令别名

命令别名
status状态
reload-liteyuki重启轻雪
update-liteyuki更新轻雪
reload-resources重载资源
config配置, set 设置 / get 查询
switch-image-mode切换图片模式
liteyuki-docs轻雪文档
group群聊, enable 启用 / disable 停用

插件/包管理器 liteyuki_pacman

  • 插件管理
命令说明权限
npm update更新插件商店索引超级用户
npm install <plugin_name>安装插件超级用户
npm uninstall <plugin_name>卸载插件超级用户
npm search <keywords...>通过关键词搜索插件超级用户
npm enable-global/disable-global <plugin_name>全局启用/停用插件超级用户
npm enable/disable <plugin_name> [--group <group_id>]当前会话启用/停用插件群聊仅群主、管理员、超级用户可用,私聊所有人可用
npm list [page] [num]列出所有插件 page为页数,num为每页显示数量群聊仅群主、管理员、超级用户可用,私聊所有人可用
help <plugin_name>查看插件帮助所有人
  • 资源包管理
命令说明权限
rpm list [page] [num]列出所有资源包 page为页数,num为每页显示数量超级用户
rpm load <pack_name>加载资源包超级用户
rpm unload <pack_name>卸载资源包超级用户
rpm change <pack_name>修改优先级超级用户
rpm reload重载所有资源包超级用户

命令别名

命令别名
npm插件管理
update更新
install安装
uninstall卸载
search搜索
enable启用
disable停用
enable-global全局启用
disable-global全局停用
rpm资源包
load加载
unload卸载
change更改
reload重载
list列表
help帮助

WARNING

受限于NoneBot2钩子函数的依赖注入参数,插件停用只能阻断传入响应,对于主动推送的插件不生效,请阅读插件主页的说明。


用户管理liteyuki_user

命令说明权限
profile查看用户信息菜单所有人
profile set <key> [value]设置用户信息或打开属性设置菜单所有人
profile get <key>获取用户信息所有人

###命令别名

命令别名
profile个人信息
set设置
get查询

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/usage/extra.html b/en/usage/extra.html new file mode 100644 index 00000000..1d928d9d --- /dev/null +++ b/en/usage/extra.html @@ -0,0 +1,26 @@ + + + + + + 功能命令 | LiteyukiBot + + + + + + + + + + + + + + + +
Skip to content

功能插件命令

轻雪天气liteyuki_weather

查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。

配置项

yaml
weather_key: "" # 和风天气的天气key,会自动判断key版本

命令

shell
weather <keywords...> # Keywords为城市名,支持中英文

查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"

shell
bind-city <keywords...> # Keywords为城市名,支持中英文

绑定查询城市,个人全局生效

命令别名

命令别名
weather天气
bind-city绑定城市

统计信息liteyuki_statistics

统计信息 命令

shell
statistic message --duration <duration> --period <period> --group [current|group_id] --bot [current|bot_id]

功能: 用于统计Bot接收到的消息, 统计周期为period, 统计时间范围为duration

参数格式
duration使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
period使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
groupcurrent (当前群聊) 或 group_id (QQ群号)
botcurrent (当前Bot) 或 bot_id

命令别名

命令别名
statisticstat
messagem
--duration-d
--period`-p
--group-g
--bot-b
currentc

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 00000000..73e9e36e Binary files /dev/null and b/favicon.ico differ diff --git a/hashmap.json b/hashmap.json new file mode 100644 index 00000000..6e6fe822 --- /dev/null +++ b/hashmap.json @@ -0,0 +1 @@ +{"deploy_config.md":"QRt04bcu","deploy_fandq.md":"BC91M77d","deploy_install.md":"DaqD6Ylg","dev_api_api.md":"BjidfGYh","dev_api_bot_bot.md":"CmVyYr_O","dev_api_bot_index.md":"DudPhKae","dev_api_bot_lifespan.md":"B4hpMOqt","dev_api_comm_channel.md":"CNJvRyvp","dev_api_comm_comm.md":"UNalIkKO","dev_api_comm_event.md":"C9P63b1v","dev_api_comm_index.md":"Bztx56-h","dev_api_comm_rpc.md":"Ctatb5Fy","dev_api_comm_socks_channel.md":"i5OohqUe","dev_api_comm_storage.md":"CquSLWbc","dev_api_config.md":"5YZEeFsT","dev_api_core_core.md":"D46kyvua","dev_api_core_index.md":"BN6y5dmE","dev_api_core_manager.md":"DiZst2H3","dev_api_dev_dev.md":"CnxR9aZA","dev_api_dev_index.md":"CbQNGO4N","dev_api_dev_observer.md":"rNRTx952","dev_api_dev_plugin.md":"B8-Pj2Gj","dev_api_exception.md":"BdaZK_3x","dev_api_index.md":"Bj6EsNxq","dev_api_log.md":"C1VDikdj","dev_api_message_event.md":"AxntDJi3","dev_api_message_index.md":"B1MCWTHF","dev_api_message_matcher.md":"CrqC3-lV","dev_api_message_message.md":"Cp-oF0Sy","dev_api_message_on.md":"BdoE0DiT","dev_api_message_rule.md":"UByA3TJk","dev_api_message_session.md":"ZRjlTcix","dev_api_mkdoc.md":"BPGO1Znu","dev_api_plugin_index.md":"3yEbVRtX","dev_api_plugin_load.md":"Bb_Kxjiz","dev_api_plugin_manager.md":"wxoQsnAr","dev_api_plugin_model.md":"CXJI2586","dev_api_plugin_plugin.md":"CSWk8lsR","dev_api_plugins_liteecho.md":"CPFGVTjw","dev_api_plugins_plugin_loader_index.md":"BKOtyJlM","dev_api_plugins_plugin_loader_plugin_loader.md":"Bfz2lNbM","dev_api_utils.md":"BfOyfADO","dev_comm.md":"BaLcrxQn","dev_lyfunc.md":"DGSAE6Uz","dev_plugin.md":"7WyHaDzB","dev_resource.md":"DU3Q8OBq","en_deploy_config.md":"CB-Epa0p","en_deploy_fandq.md":"lp1l61Jw","en_deploy_install.md":"BnEnd6Nu","en_dev_api_api.md":"D-5_3fUd","en_dev_api_bot_bot.md":"D0tmeTXy","en_dev_api_bot_index.md":"LrWFTh2D","en_dev_api_bot_lifespan.md":"EgH0pEuD","en_dev_api_comm_channel.md":"BLjPtV1B","en_dev_api_comm_comm.md":"nImwmKaA","en_dev_api_comm_event.md":"B8tSNpPu","en_dev_api_comm_index.md":"DXB5jsIP","en_dev_api_comm_rpc.md":"Db5NdJbe","en_dev_api_comm_socks_channel.md":"kerI5Mmv","en_dev_api_comm_storage.md":"CyNGUlpk","en_dev_api_config.md":"paJM3SZQ","en_dev_api_core_core.md":"DspKdKLc","en_dev_api_core_index.md":"Cu0gmuqG","en_dev_api_core_manager.md":"Bs82V5ER","en_dev_api_dev_dev.md":"C7bp0nFK","en_dev_api_dev_index.md":"B_Clatcv","en_dev_api_dev_observer.md":"DfB9VffK","en_dev_api_dev_plugin.md":"dVSn90qu","en_dev_api_exception.md":"DTnDyb4J","en_dev_api_index.md":"Da9OtAtQ","en_dev_api_log.md":"BD04gPQH","en_dev_api_message_event.md":"DkU7HnIc","en_dev_api_message_index.md":"DEGPA3Qg","en_dev_api_message_matcher.md":"fjcL64M7","en_dev_api_message_message.md":"D0iZgCWF","en_dev_api_message_on.md":"Bpf1nKZ0","en_dev_api_message_rule.md":"L6rc-HBj","en_dev_api_message_session.md":"DMwGauxy","en_dev_api_mkdoc.md":"EVvNGPKX","en_dev_api_plugin_index.md":"7EqtiaFh","en_dev_api_plugin_load.md":"BWXzuii9","en_dev_api_plugin_manager.md":"Cq1g681t","en_dev_api_plugin_model.md":"CeWxdiF_","en_dev_api_plugin_plugin.md":"C9viahSZ","en_dev_api_plugins_liteecho.md":"w4kQQyNd","en_dev_api_plugins_plugin_loader_index.md":"DYxIyTd3","en_dev_api_plugins_plugin_loader_plugin_loader.md":"CX7_cGXK","en_dev_api_utils.md":"D2AasRls","en_dev_comm.md":"Cn-onW1y","en_dev_lyfunc.md":"C5K1_qgM","en_dev_plugin.md":"Xb7vUDpJ","en_dev_resource.md":"CYdCh9wj","en_index.md":"DVQGNFEI","en_store_plugin.md":"DceXsbsh","en_store_resource.md":"DwD3Poel","en_usage_agreement.md":"DzIdKK2Q","en_usage_basic.md":"CxkJTStx","en_usage_extra.md":"CHJ4PN4s","index.md":"CQL2AFxv","store_plugin.md":"BMBIhTm1","store_resource.md":"CfhqcpPi","usage_agreement.md":"DBBkunJ_","usage_basic.md":"DJoTZ022","usage_extra.md":"AJu--2F9"} diff --git a/index.html b/index.html new file mode 100644 index 00000000..fdab4605 --- /dev/null +++ b/index.html @@ -0,0 +1,26 @@ + + + + + + 轻雪机器人 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liteyuki.svg b/liteyuki.svg new file mode 100644 index 00000000..cb20885f --- /dev/null +++ b/liteyuki.svg @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..f427901e --- /dev/null +++ b/sitemap.xml @@ -0,0 +1 @@ +https://bot.liteyuki.icu/en/deploy/config.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/deploy/config.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/deploy/fandq.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/deploy/fandq.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/deploy/install.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/deploy/install.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/en/dev/api/api.htmlhttps://bot.liteyuki.icu/dev/api/api.htmlhttps://bot.liteyuki.icu/en/dev/api/bot/bot.htmlhttps://bot.liteyuki.icu/dev/api/bot/bot.htmlhttps://bot.liteyuki.icu/en/dev/api/bot/https://bot.liteyuki.icu/dev/api/bot/https://bot.liteyuki.icu/en/dev/api/bot/lifespan.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/bot/lifespan.htmlhttps://bot.liteyuki.icu/en/dev/api/comm/channel.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/comm/channel.htmlhttps://bot.liteyuki.icu/en/dev/api/comm/comm.htmlhttps://bot.liteyuki.icu/dev/api/comm/comm.htmlhttps://bot.liteyuki.icu/en/dev/api/comm/event.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/comm/event.htmlhttps://bot.liteyuki.icu/en/dev/api/comm/https://bot.liteyuki.icu/dev/api/comm/https://bot.liteyuki.icu/en/dev/api/comm/rpc.htmlhttps://bot.liteyuki.icu/dev/api/comm/rpc.htmlhttps://bot.liteyuki.icu/en/dev/api/comm/socks_channel.htmlhttps://bot.liteyuki.icu/dev/api/comm/socks_channel.htmlhttps://bot.liteyuki.icu/en/dev/api/comm/storage.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/comm/storage.htmlhttps://bot.liteyuki.icu/en/dev/api/config.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/config.htmlhttps://bot.liteyuki.icu/en/dev/api/core/core.htmlhttps://bot.liteyuki.icu/dev/api/core/core.htmlhttps://bot.liteyuki.icu/en/dev/api/core/https://bot.liteyuki.icu/dev/api/core/https://bot.liteyuki.icu/en/dev/api/core/manager.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/core/manager.htmlhttps://bot.liteyuki.icu/en/dev/api/dev/dev.htmlhttps://bot.liteyuki.icu/dev/api/dev/dev.htmlhttps://bot.liteyuki.icu/en/dev/api/dev/https://bot.liteyuki.icu/dev/api/dev/https://bot.liteyuki.icu/en/dev/api/dev/observer.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/dev/observer.htmlhttps://bot.liteyuki.icu/en/dev/api/dev/plugin.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/dev/plugin.htmlhttps://bot.liteyuki.icu/en/dev/api/exception.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/exception.htmlhttps://bot.liteyuki.icu/en/dev/api/https://bot.liteyuki.icu/dev/api/https://bot.liteyuki.icu/en/dev/api/log.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/log.htmlhttps://bot.liteyuki.icu/en/dev/api/message/event.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/message/event.htmlhttps://bot.liteyuki.icu/en/dev/api/message/https://bot.liteyuki.icu/dev/api/message/https://bot.liteyuki.icu/en/dev/api/message/matcher.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/message/matcher.htmlhttps://bot.liteyuki.icu/en/dev/api/message/message.htmlhttps://bot.liteyuki.icu/dev/api/message/message.htmlhttps://bot.liteyuki.icu/en/dev/api/message/on.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/message/on.htmlhttps://bot.liteyuki.icu/en/dev/api/message/rule.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/message/rule.htmlhttps://bot.liteyuki.icu/en/dev/api/message/session.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/message/session.htmlhttps://bot.liteyuki.icu/en/dev/api/mkdoc.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/mkdoc.htmlhttps://bot.liteyuki.icu/en/dev/api/plugin/https://bot.liteyuki.icu/dev/api/plugin/https://bot.liteyuki.icu/en/dev/api/plugin/load.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/plugin/load.htmlhttps://bot.liteyuki.icu/en/dev/api/plugin/manager.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/plugin/manager.htmlhttps://bot.liteyuki.icu/en/dev/api/plugin/model.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/plugin/model.htmlhttps://bot.liteyuki.icu/en/dev/api/plugin/plugin.htmlhttps://bot.liteyuki.icu/dev/api/plugin/plugin.htmlhttps://bot.liteyuki.icu/en/dev/api/plugins/liteecho.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/plugins/liteecho.htmlhttps://bot.liteyuki.icu/en/dev/api/plugins/plugin_loader/https://bot.liteyuki.icu/dev/api/plugins/plugin_loader/https://bot.liteyuki.icu/en/dev/api/plugins/plugin_loader/plugin_loader.htmlhttps://bot.liteyuki.icu/dev/api/plugins/plugin_loader/plugin_loader.htmlhttps://bot.liteyuki.icu/en/dev/api/utils.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/dev/api/utils.htmlhttps://bot.liteyuki.icu/en/dev/comm.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/dev/comm.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/en/dev/lyfunc.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/dev/lyfunc.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/dev/plugin.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/dev/plugin.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/dev/resource.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/dev/resource.html2024-08-31T11:05:37.000Zhttps://bot.liteyuki.icu/en/2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/store/plugin.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/store/plugin.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/store/resource.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/store/resource.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/usage/agreement.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/usage/agreement.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/usage/basic.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/usage/basic.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/en/usage/extra.html2024-08-31T10:57:48.000Zhttps://bot.liteyuki.icu/usage/extra.html2024-08-31T10:57:48.000Z \ No newline at end of file diff --git a/store/plugin.html b/store/plugin.html new file mode 100644 index 00000000..c4144d9c --- /dev/null +++ b/store/plugin.html @@ -0,0 +1,26 @@ + + + + + + 插件商店 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/store/resource.html b/store/resource.html new file mode 100644 index 00000000..f8c414a4 --- /dev/null +++ b/store/resource.html @@ -0,0 +1,26 @@ + + + + + + 资源商店 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/usage/agreement.html b/usage/agreement.html new file mode 100644 index 00000000..6c34044a --- /dev/null +++ b/usage/agreement.html @@ -0,0 +1,26 @@ + + + + + + 用户协议 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

用户协议

  1. 本项目遵循MIT协议,你可以自由使用,修改,分发,但是请保留原作者信息
  2. 你可以选择开启auto_report(默认开启),轻雪会收集以下内容
    • 运行环境的设备信息:CPU,内存,系统信息及Python信息
    • 插件信息(不含插件数据)
    • 部分异常信息,
    • 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把auto_report设定为false
  3. 本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性
  4. 使用此项目代表你已经同意以上协议

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/usage/basic.html b/usage/basic.html new file mode 100644 index 00000000..77823cf4 --- /dev/null +++ b/usage/basic.html @@ -0,0 +1,26 @@ + + + + + + 基础插件 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

基础插件


TIP

参数<param>为必填参数,[option]为可选参数。

命令别名:配置了命令别名的命令可以使用别名代替原命令,例如npm install ~可以使用插件 安装 ~代替。

轻雪命令liteyuki_command

命令说明权限举例可用参数
reload-liteyuki重载轻雪超级用户
update-liteyuki更新轻雪超级用户
liteecho查看当前bot 版本超级用户
status查看统计信息和状态超级用户
config set <key> value添加配置项,若存在则会覆盖,输入值会被执行以转换为正确的类型,"10"和10是不一样的超级用户config set name 'liteyuki-bot'<key>: 若存在则覆盖, 若不存在则创建于config.yml ; value: yml格式的所有合法内容
config get [key] 查询配置项,不带key返回配置项列表,推荐私聊使用超级用户config get name<key>: 若存在则返回, 若不存在则返回空
switch-image-mode 在普通图片和Markdown大图之间切换,该功能需要commit:505468b及以后的Lagrange.OneBot,默认普通图片超级用户switch-image-mode
/api api_name [args] 调用机器人API超级用户/api get_group_member_list group_id=1234567<args>: 参数列表, 格式为onebot v11协议api, 可用%20代替空格
/function function_name [args] [kwargs] 调用机器人函数(.lyfunction语法)超级用户/function send_group_msg group_id=1234567 message='hello'<args><kwargs>: 参数列表, api格式为onebot v11协议api
group enable/disable [group_id]在群聊启用/停用机器人,group_id仅超级用户可用超级用户,群聊仅群主、管理员、超级用户可用group enable 1145141919810<group_id>: 群号
liteyuki-docs查看轻雪文档所有人

命令别名

命令别名
status状态
reload-liteyuki重启轻雪
update-liteyuki更新轻雪
reload-resources重载资源
config配置, set 设置 / get 查询
switch-image-mode切换图片模式
liteyuki-docs轻雪文档
group群聊, enable 启用 / disable 停用

插件/包管理器 liteyuki_pacman

  • 插件管理
命令说明权限
npm update更新插件商店索引超级用户
npm install <plugin_name>安装插件超级用户
npm uninstall <plugin_name>卸载插件超级用户
npm search <keywords...>通过关键词搜索插件超级用户
npm enable-global/disable-global <plugin_name>全局启用/停用插件超级用户
npm enable/disable <plugin_name> [--group <group_id>]当前会话启用/停用插件群聊仅群主、管理员、超级用户可用,私聊所有人可用
npm list [page] [num]列出所有插件 page为页数,num为每页显示数量群聊仅群主、管理员、超级用户可用,私聊所有人可用
help <plugin_name>查看插件帮助所有人
  • 资源包管理
命令说明权限
rpm list [page] [num]列出所有资源包 page为页数,num为每页显示数量超级用户
rpm load <pack_name>加载资源包超级用户
rpm unload <pack_name>卸载资源包超级用户
rpm change <pack_name>修改优先级超级用户
rpm reload重载所有资源包超级用户

命令别名

命令别名
npm插件管理
update更新
install安装
uninstall卸载
search搜索
enable启用
disable停用
enable-global全局启用
disable-global全局停用
rpm资源包
load加载
unload卸载
change更改
reload重载
list列表
help帮助

WARNING

受限于NoneBot2钩子函数的依赖注入参数,插件停用只能阻断传入响应,对于主动推送的插件不生效,请阅读插件主页的说明。


用户管理liteyuki_user

命令说明权限
profile查看用户信息菜单所有人
profile set <key> [value]设置用户信息或打开属性设置菜单所有人
profile get <key>获取用户信息所有人

###命令别名

命令别名
profile个人信息
set设置
get查询

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/usage/extra.html b/usage/extra.html new file mode 100644 index 00000000..83958174 --- /dev/null +++ b/usage/extra.html @@ -0,0 +1,26 @@ + + + + + + 功能命令 | 轻雪机器人 + + + + + + + + + + + + + + + +
Skip to content

功能插件命令

轻雪天气liteyuki_weather

查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。

配置项

yaml
weather_key: "" # 和风天气的天气key,会自动判断key版本

命令

shell
weather <keywords...> # Keywords为城市名,支持中英文

查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"

shell
bind-city <keywords...> # Keywords为城市名,支持中英文

绑定查询城市,个人全局生效

命令别名

命令别名
weather天气
bind-city绑定城市

统计信息liteyuki_statistics

统计信息 命令

shell
statistic message --duration <duration> --period <period> --group [current|group_id] --bot [current|bot_id]

功能: 用于统计Bot接收到的消息, 统计周期为period, 统计时间范围为duration

参数格式
duration使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
period使用通用日期简写: 1d(天), 1h(小时), 45m(分钟), 14s(秒)
groupcurrent (当前群聊) 或 group_id (QQ群号)
botcurrent (当前Bot) 或 bot_id

命令别名

命令别名
statisticstat
messagem
--duration-d
--period`-p
--group-g
--bot-b
currentc

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file