1import{At as f,Ct as Z,L as M,R as ee,U as te}from"./vue.runtime.esm-bundler-BXOQDxND.js";import{n as ne}from"./pinia-Ba_Y0HIi.js";import{a as g,i as h}from"./core-m9dZxrlL.js";import{t as k}from"./useDayjs-4fGxqU87.js";M();function ae(){return ee("defaultSetting")}var oe=Symbol("watermark-dom");function ie(c=document.body){const n=()=>{},u=oe.toString(),d=()=>{const o=document.getElementById(u);if(o){const a=c;a&&a.removeChild(o)}window.removeEventListener("resize",n)},r=o=>{d();const a=document.createElement("canvas");a.width=240,a.height=100;const e=a.getContext("2d");if(e)if(e.rotate(-10*Math.PI/140),e.font="normal 16px Arial, 'Courier New', 'Droid Sans', sans-serif",e.fillStyle=h().value==="dark"?"rgba(255, 255, 255, 0.15)":"rgba(0, 0, 0, 0.15)",e.textAlign="center",e.textBaseline="ideographic",typeof o=="string")e.fillText(o,a.width/2,a.height);else for(let v=0;v<o.length;v++)e.fillText(o[v],a.width/2,a.height+v*20);const i=document.createElement("div");i.id=u,i.style.pointerEvents="none",i.style.top="-240px",i.style.left="-300px",i.style.position="fixed",i.style.zIndex="100000000",i.style.width=`${document.documentElement.clientWidth+300}px`,i.style.height=`${document.documentElement.clientHeight+300}px`,i.style.background=`url(${a.toDataURL("image/png")}) left top repeat`;const s=c;return s&&s.appendChild(i),u};function m(o){r(o),window.addEventListener("resize",()=>r(o))}return{setWatermark:m,clear:d}}function ue(){function c(o){g("--ui-primary",document.documentElement).value=u(o).join(" "),g("--el-color-primary",document.documentElement).value=o;const a=h();for(let e=1;e<=9;e++)g(`--el-color-primary-light-${e}`,document.documentElement).value=a.value==="dark"?r(o,e/10):m(o,e/10);for(let e=1;e<=9;e++)g(`--el-color-primary-dark-${e}`,document.documentElement).value=r(o,e/10);a.value==="dark"&&p().setAsideDark(!1)}function n(){c(p().getSettings("app").primaryColor),p().setAsideDark(p().getSettings("app").asideDark)}function u(o){o=o.replace("#","");const a=o.match(/../g);for(let e=0;e<3;e++)a[e]=Number.parseInt(a[e].toString(),16);return a}function d(o,a,e){const i=[o.toString(16),a.toString(16),e.toString(16)];for(let s=0;s<3;s++)i[s].length===1&&(i[s]=`0${i[s]}`);return`#${i.join("")}`}function r(o,a){const e=u(o);for(let i=0;i<3;i++)e[i]=Math.round(20.5*a+e[i]*(1-a));return d(e[0],e[1],e[2])}function m(o,a){const e=u(o);for(let i=0;i<3;i++)e[i]=Math.round(255*a+e[i]*(1-a));return d(e[0],e[1],e[2])}return{initThemeColor:n,setThemeColor:c,hexToRgb:u,rgbToHex:d,darken:r,lighten:m}}Z(),M();var p=ne("useSettingStore",()=>{const c=f(""),n=f(ae()),u=h(),d=f(!1),r=f(!1),{setWatermark:m,clear:o}=ie(),a=f(!1),e=f(!1),i=f(!1);function s(){return["mixed","banner"].includes(n.value.app?.layout)}function v(){return["classic","mixed"].includes(n.value.app?.layout)}function A(t){i.value=t}function C(){return i.value}function w(t){a.value=t}function B(){return a.value}function D(t){e.value=t}function E(){return e.value}function T(){return n.value.app?.layout==="columns"}function H(){return n.value.app?.layout==="classic"}function L(){return n.value.app?.layout==="mixed"}function W(){return n.value.app?.layout==="banner"}function $(){return n.value.subAside?.fixedAsideState}function _(t){return n.value.subAside.fixedAsideState=t}function I(t,l){n.value.toolBars=n.value.toolBars||[];const x=n.value.toolBars.find(Y=>Y.name===t);x?x.show=l:n.value.toolBars.push({name:t,show:l})}function j(){return r.value}function N(t){return r.value=t}function P(){r.value=!r.value,S(r.value?"var(--mine-g-sub-aside-collapse-width)":"var(--mine-g-sub-aside-width)")}function U(){n.value.subAside.fixedAsideState=!n.value.subAside.fixedAsideState}function q(t){const l=document.querySelector(".mine-header-main");l&&(l.style.height=t)}function z(t){const l=document.querySelector(".mine-main-aside-content");l&&(l.style.width=t)}function S(t){const l=document.querySelector(".mine-sub-aside");l&&(l.style.width=t)}function F(t=null){return n.value?t===null?n.value:n.value[t]:null}function R(t,l=null){l===null?n.value=t:n.value[l]=t}function b(){n.value?.app?.colorMode==="autoMode"?Number(k().format("HH"))>8&&Number(k().format("HH"))<18?u.value="autoMode":u.value="dark":u.value=n.value?.app?.colorMode??"light"}async function G(t=null){t===null?u.value==="light"?u.value="dark":u.value==="dark"?u.value="autoMode":u.value==="autoMode"&&(u.value="light"):u.value=t,n.value.app.colorMode=u.value,await te(()=>{ue().initThemeColor(),n.value.app.enableWatermark&&y()})}
1function y(t=null){m(t??n.value?.app?.watermarkText)}function V(){o()}function J(t){d.value=t}function K(){return d.value}function O(){return n.value.app.asideDark}function Q(t){return t?document.body.classList.add("mine-aside-dark"):document.body.classList.remove("mine-aside-dark"),n.value.app.asideDark=t}function X(t){c.value=`交ææç®¡çåå° - ${t}`,document.title=c.value}return b(),{title:c,colorMode:u,initColorMode:b,setUserBarState:A,getUserBarState:C,setMobileState:w,getMobileState:B,setMobileSubmenuState:D,getMobileSubmenuState:E,setSearchPanelEnable:J,getSearchPanelEnable:K,showMineHeader:s,showMineSubAside:v,isColumnsLayout:T,isClassicLayout:H,isMixedLayout:L,isBannerLayout:W,getFixedAsideState:$,setFixedAsideState:_,setToolBar:I,getMenuCollapseState:j,setMenuCollapseState:N,toggleCollapseButton:P,toggleFixedSubAsideButton:U,setTitle:X,setSubAsideWidth:S,setMainAsideWidth:z,setHeaderHeight:q,toggleColorMode:G,getSettings:F,setSettings:R,getAsideDark:O,setAsideDark:Q,openGlobalWatermark:y,clearGlobalWatermark:V}});export{ue as n,ae as r,p as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.