Files
ai-shiliu/frontend/dist/assets/window-B1zSvOyk.js
figmar 81115dc23d 初始提交:识流 AI 助手项目
微信自动回复机器人,基于截图+OCR识别消息,支持关键词规则和 AI(OpenAI/DeepSeek/Dify)自动回复。
技术栈:PySide6 + Flask + Vue3 + RapidOCR + SQLite

注:OCR大模型文件(.onnx / .pdiparams)不纳入版本控制,需单独下载。

🤖 Generated with [Qoder][https://qoder.com]
2026-05-30 15:09:40 +08:00

2 lines
15 KiB
JavaScript

import{SERIALIZE_TO_IPC_FN as o,invoke as t,transformCallback as x,Resource as I}from"./core-DhEqZVGG.js";class O{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new h(this.width*e,this.height*e)}[o](){return{width:this.width,height:this.height}}toJSON(){return this[o]()}}class h{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new O(this.width/e,this.height/e)}[o](){return{width:this.width,height:this.height}}toJSON(){return this[o]()}}class c{constructor(e){this.size=e}toLogical(e){return this.size instanceof O?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof h?this.size:this.size.toPhysical(e)}[o](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[o]()}}class A{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new u(this.x*e,this.y*e)}[o](){return{x:this.x,y:this.y}}toJSON(){return this[o]()}}class u{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new A(this.x/e,this.y/e)}[o](){return{x:this.x,y:this.y}}toJSON(){return this[o]()}}class w{constructor(e){this.position=e}toLogical(e){return this.position instanceof A?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof u?this.position:this.position.toPhysical(e)}[o](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[o]()}}var a;(function(i){i.WINDOW_RESIZED="tauri://resize",i.WINDOW_MOVED="tauri://move",i.WINDOW_CLOSE_REQUESTED="tauri://close-requested",i.WINDOW_DESTROYED="tauri://destroyed",i.WINDOW_FOCUS="tauri://focus",i.WINDOW_BLUR="tauri://blur",i.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",i.WINDOW_THEME_CHANGED="tauri://theme-changed",i.WINDOW_CREATED="tauri://window-created",i.WINDOW_SUSPENDED="tauri://suspended",i.WINDOW_RESUMED="tauri://resumed",i.WEBVIEW_CREATED="tauri://webview-created",i.DRAG_ENTER="tauri://drag-enter",i.DRAG_OVER="tauri://drag-over",i.DRAG_DROP="tauri://drag-drop",i.DRAG_LEAVE="tauri://drag-leave"})(a||(a={}));async function N(i,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(i,e),await t("plugin:event|unlisten",{event:i,eventId:e})}async function S(i,e,n){var l;const s=typeof n?.target=="string"?{kind:"AnyLabel",label:n.target}:(l=n?.target)!==null&&l!==void 0?l:{kind:"Any"};return t("plugin:event|listen",{event:i,target:s,handler:x(e)}).then(p=>async()=>N(i,p))}async function L(i,e,n){return S(i,l=>{N(i,l.id),e(l)},n)}async function R(i,e){await t("plugin:event|emit",{event:i,payload:e})}async function P(i,e,n){await t("plugin:event|emit_to",{target:typeof i=="string"?{kind:"AnyLabel",label:i}:i,event:e,payload:n})}class d extends I{constructor(e){super(e)}static async new(e,n,l){return t("plugin:image|new",{rgba:b(e),width:n,height:l}).then(s=>new d(s))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:b(e)}).then(n=>new d(n))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then(n=>new d(n))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return t("plugin:image|size",{rid:this.rid})}}function b(i){return i==null?null:typeof i=="string"?i:i instanceof d?i.rid:i}var m;(function(i){i[i.Critical=1]="Critical",i[i.Informational=2]="Informational"})(m||(m={}));class k{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var v;(function(i){i.None="none",i.Normal="normal",i.Indeterminate="indeterminate",i.Paused="paused",i.Error="error"})(v||(v={}));function E(){return new C(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function g(){return t("plugin:window|get_all_windows").then(i=>i.map(e=>new C(e,{skip:!0})))}const _=["tauri://created","tauri://error"];class C{constructor(e,n={}){var l;this.label=e,this.listeners=Object.create(null),n?.skip||t("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(l=n.parent)===null||l===void 0?void 0:l.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async s=>this.emit("tauri://error",s))}static async getByLabel(e){var n;return(n=(await g()).find(l=>l.label===e))!==null&&n!==void 0?n:null}static getCurrent(){return E()}static async getAll(){return g()}static async getFocusedWindow(){for(const e of await g())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}:S(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}:L(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(_.includes(e)){for(const l of this.listeners[e]||[])l({event:e,id:-1,payload:n});return}return R(e,n)}async emitTo(e,n,l){if(_.includes(n)){for(const s of this.listeners[n]||[])s({event:n,id:-1,payload:l});return}return P(e,n,l)}_handleTauriEvent(e,n){return _.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return t("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return t("plugin:window|inner_position",{label:this.label}).then(e=>new u(e))}async outerPosition(){return t("plugin:window|outer_position",{label:this.label}).then(e=>new u(e))}async innerSize(){return t("plugin:window|inner_size",{label:this.label}).then(e=>new h(e))}async outerSize(){return t("plugin:window|outer_size",{label:this.label}).then(e=>new h(e))}async isFullscreen(){return t("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return t("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return t("plugin:window|is_maximized",{label:this.label})}async isFocused(){return t("plugin:window|is_focused",{label:this.label})}async isDecorated(){return t("plugin:window|is_decorated",{label:this.label})}async isResizable(){return t("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return t("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return t("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return t("plugin:window|is_closable",{label:this.label})}async isVisible(){return t("plugin:window|is_visible",{label:this.label})}async title(){return t("plugin:window|title",{label:this.label})}async theme(){return t("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return t("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return t("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return t("plugin:window|scene_identifier",{label:this.label})}async center(){return t("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===m.Critical?n={type:"Critical"}:n={type:"Informational"}),t("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return t("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return t("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return t("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return t("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return t("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return t("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return t("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return t("plugin:window|maximize",{label:this.label})}async unmaximize(){return t("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return t("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return t("plugin:window|minimize",{label:this.label})}async unminimize(){return t("plugin:window|unminimize",{label:this.label})}async show(){return t("plugin:window|show",{label:this.label})}async hide(){return t("plugin:window|hide",{label:this.label})}async close(){return t("plugin:window|close",{label:this.label})}async destroy(){return t("plugin:window|destroy",{label:this.label})}async setDecorations(e){return t("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return t("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return t("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return t("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return t("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return t("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return t("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return t("plugin:window|set_size",{label:this.label,value:e instanceof c?e:new c(e)})}async setMinSize(e){return t("plugin:window|set_min_size",{label:this.label,value:e instanceof c?e:e?new c(e):null})}async setMaxSize(e){return t("plugin:window|set_max_size",{label:this.label,value:e instanceof c?e:e?new c(e):null})}async setSizeConstraints(e){function n(l){return l?{Logical:l}:null}return t("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(e?.minWidth),minHeight:n(e?.minHeight),maxWidth:n(e?.maxWidth),maxHeight:n(e?.maxHeight)}})}async setPosition(e){return t("plugin:window|set_position",{label:this.label,value:e instanceof w?e:new w(e)})}async setFullscreen(e){return t("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return t("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return t("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return t("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return t("plugin:window|set_icon",{label:this.label,value:b(e)})}async setSkipTaskbar(e){return t("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return t("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return t("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return t("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return t("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return t("plugin:window|set_cursor_position",{label:this.label,value:e instanceof w?e:new w(e)})}async setIgnoreCursorEvents(e){return t("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return t("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return t("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return t("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return t("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return t("plugin:window|set_overlay_icon",{label:this.label,value:e?b(e):void 0})}async setProgressBar(e){return t("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return t("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return t("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return t("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(a.WINDOW_RESIZED,n=>{n.payload=new h(n.payload),e(n)})}async onMoved(e){return this.listen(a.WINDOW_MOVED,n=>{n.payload=new u(n.payload),e(n)})}async onCloseRequested(e){return this.listen(a.WINDOW_CLOSE_REQUESTED,async n=>{const l=new k(n);await e(l),l.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const n=await this.listen(a.DRAG_ENTER,r=>{e({...r,payload:{type:"enter",paths:r.payload.paths,position:new u(r.payload.position)}})}),l=await this.listen(a.DRAG_OVER,r=>{e({...r,payload:{type:"over",position:new u(r.payload.position)}})}),s=await this.listen(a.DRAG_DROP,r=>{e({...r,payload:{type:"drop",paths:r.payload.paths,position:new u(r.payload.position)}})}),p=await this.listen(a.DRAG_LEAVE,r=>{e({...r,payload:{type:"leave"}})});return()=>{n(),s(),l(),p()}}async onFocusChanged(e){const n=await this.listen(a.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),l=await this.listen(a.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{n(),l()}}async onScaleChanged(e){return this.listen(a.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(a.WINDOW_THEME_CHANGED,e)}}var D;(function(i){i.Disabled="disabled",i.Throttle="throttle",i.Suspend="suspend"})(D||(D={}));var f;(function(i){i.Default="default",i.FluentOverlay="fluentOverlay"})(f||(f={}));var W;(function(i){i.AppearanceBased="appearanceBased",i.Light="light",i.Dark="dark",i.MediumLight="mediumLight",i.UltraDark="ultraDark",i.Titlebar="titlebar",i.Selection="selection",i.Menu="menu",i.Popover="popover",i.Sidebar="sidebar",i.HeaderView="headerView",i.Sheet="sheet",i.WindowBackground="windowBackground",i.HudWindow="hudWindow",i.FullScreenUI="fullScreenUI",i.Tooltip="tooltip",i.ContentBackground="contentBackground",i.UnderWindowBackground="underWindowBackground",i.UnderPageBackground="underPageBackground",i.Mica="mica",i.Blur="blur",i.Acrylic="acrylic",i.Tabbed="tabbed",i.TabbedDark="tabbedDark",i.TabbedLight="tabbedLight"})(W||(W={}));var z;(function(i){i.FollowsWindowActiveState="followsWindowActiveState",i.Active="active",i.Inactive="inactive"})(z||(z={}));function y(i){return i===null?null:{name:i.name,scaleFactor:i.scaleFactor,position:new u(i.position),size:new h(i.size),workArea:{position:new u(i.workArea.position),size:new h(i.workArea.size)}}}async function T(){return t("plugin:window|current_monitor").then(y)}async function B(){return t("plugin:window|primary_monitor").then(y)}async function F(i,e){return t("plugin:window|monitor_from_point",{x:i,y:e}).then(y)}async function U(){return t("plugin:window|available_monitors").then(i=>i.map(y))}async function G(){return t("plugin:window|cursor_position").then(i=>new u(i))}export{k as CloseRequestedEvent,W as Effect,z as EffectState,A as LogicalPosition,O as LogicalSize,u as PhysicalPosition,h as PhysicalSize,v as ProgressBarStatus,m as UserAttentionType,C as Window,U as availableMonitors,T as currentMonitor,G as cursorPosition,g as getAllWindows,E as getCurrentWindow,F as monitorFromPoint,B as primaryMonitor};