1var e,t,r,s,a,n,o,l,i,m,c,d,u,h,f,p,y,g,v;import{o as b}from"./C_JJxWoe.js";import{Dr as T,Vr as S}from"./CGcjPoY7.js";import{n as E,t as w}from"./DnYBU0uZ2.js";import{t as C}from"./wQ8mtGbE2.js";function k({title:e,icon:t}){return(0,y.jsxs)("div",{className:p,children:[t&&(0,y.jsx)("span",{className:f,children:t}),(0,y.jsx)(C,{size:"small",weight:"medium",style:{fontFamily:"var(--font-regular)"},children:e})]})}function A({type:e=0,title:t="",icon:r=null}){E.custom(()=>(0,y.jsx)(k,{type:e,title:t,icon:r}))}e=b(S(),1),t=(e,t,r,s,a,n,o,l)=>{let i=document.documentElement,m=["light","dark"];function c(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,s=r&&n?a.map(e=>n[e]||e):a;r?(i.classList.remove(...s),i.classList.add(n&&n[t]?n[t]:t)):i.setAttribute(e,t)}),function(e){l&&m.includes(e)&&(i.style.colorScheme=e)}(t)}if(s)c(s);else try{let e=localStorage.getItem(t)||r;c(o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e)}catch(d){}},r=["light","dark"],s="(prefers-color-scheme: dark)",a=e.createContext(void 0),n={setTheme:e=>{},themes:[]},o=()=>{var t;return null!=(t=e.useContext(a))?t:n},l=t=>e.useContext(a)?e.createElement(e.Fragment,null,t.children):e.createElement(m,{...t}),i=["light","dark"],m=({forcedTheme:t,disableTransitionOnChange:n=!1,enableSystem:o=!0,enableColorScheme:l=!0,storageKey:m="theme",themes:f=i,defaultTheme:p=(o?"system":"light"),attribute:y="data-theme",value:g,children:v,nonce:b,scriptProps:T})=>{let[S,E]=e.useState(()=>d(m,p)),[w,C]=e.useState(()=>"system"===S?h():S),k=g?Object.values(g):f,A=e.useCallback(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=h());let s=g?g[t]:t,a=n?u(b):null,i=document.documentElement,m=e=>{"class"===e?(i.classList.remove(...k),s&&i.classList.add(s)):e.startsWith("data-")&&(s?i.setAttribute(e,s):i.removeAttribute(e))};if(Array.isArray(y)?y.forEach(m):m(y),l){let e=r.includes(p)?p:null,s=r.includes(t)?t:e;i.style.colorScheme=s}a?.()},[b]),x=e.useCallback(e=>{let t="function"==typeof e?e(S):e;E(t);try{localStorage.setItem(m,t)}catch(r){}},[S]),j=e.useCallback(e=>{let r=h(e);C(r),"system"===S&&o&&!t&&A("system")},[S,t]);e.useEffect(()=>{let e=window.matchMedia(s);return e.addListener(j),j(e),()=>e.removeListener(j)},[j]),e.useEffect(()=>{let e=e=>{e.key===m&&(e.newValue?E(e.newValue):x(p))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[x]),e.useEffect(()=>{A(null!=t?t:S)},[t,S]);let L=e.useMemo(()=>({theme:S,setTheme:x,forcedTheme:t,resolvedTheme:"system"===S?w:S,themes:o?[...f,"system"]:f,systemTheme:o?w:void 0}),[S,x,t,w,o,f]);return e.createElement(a.Provider,{value:L},e.createElement(c,{forcedTheme:t,storageKey:m,attribute:y,enableSystem:o,enableColorScheme:l,defaultTheme:p,value:g,themes:f,nonce:b,scriptProps:T}),v)},c=e.memo(({forcedTheme:r,storageKey:s,attribute:a,enableSystem:n,enableColorScheme:o,defaultTheme:l,value:i,themes:m,nonce:c,scriptProps:d})=>{let u=JSON.stringify([a,s,l,r,m,i,n,o]).slice(1,-1);return e.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"",dangerouslySetInnerHTML:{__html:`(${t.toString()})(${u})`}})}),d=(e,t)=>{let r;try{r=localStorage.getItem(e)||void 0}catch(s){}return r||t},u=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},h=e=>(e||(e=window.matchMedia(s)),e.matches?"dark":"light"),f="TBAOqq_iconWrapper",p="TBAOqq_toast",y=T(),g=function(e){return e[e.Info=0]="Info",e[e.Success=1]="Success",e[e.Error=2]="Error",e}({}),v=()=>{const{resolvedTheme:e}=o();return(0,y.jsx)(w,{expand:!0,toastOptions:{style:{right:8,margin:0}},visibleToasts:3,duration:5e3,className:"TBAOqq_toastWrapper",mobileOffset:16,theme:e||"dark"})};export{o as a,l as i,v as n,A as r,g 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.