Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nextjs-themes

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextjs-themes - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

esm/chunk-2AD7BW2X.js

6

CHANGELOG.md
# nextjs-themes
## 3.1.2
### Patch Changes
- Fix FOUC
## 3.1.1

@@ -4,0 +10,0 @@

2

client/color-switch/color-switch.d.ts

@@ -21,3 +21,3 @@ export interface ColorSwitchProps {

*/
export declare function ColorSwitch({ size, skipSystem }: ColorSwitchProps): import("react/jsx-runtime").JSX.Element;
export declare const ColorSwitch: ({ size, skipSystem }: ColorSwitchProps) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=color-switch.d.ts.map

@@ -1,1 +0,1 @@

"use strict";var y=Object.create;var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var a=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var x=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},d=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of v(o))!P.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(m=k(o,h))||m.enumerable});return e};var b=(e,o,r)=>(r=e!=null?y(a(e)):{},d(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),F=e=>d(l({},"__esModule",{value:!0}),e);var E={};x(E,{ColorSwitch:()=>A});module.exports=F(E);var g=b(require("r18gs"));var S="nth",s={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function f(e,o){let r=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,m=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,h=(m===void 0?e==null?void 0:e.colorSchemePref:m)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",i=t?"dark":"light",c=r===void 0?(e==null?void 0:e.theme)||"":r;if(r===void 0)switch(h){case"system":c=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let C=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:c,resolvedColorScheme:i,resolvedColorSchemePref:h,th:C}}var T=require("react"),D=200,n={};function w(e){return o=>{if(n[o]===void 0)return n[o]=1,r=>setTimeout(()=>e(m=>({...m,[o]:r})),D);if(n[o]===1){let r=m=>e(h=>({...h,[o]:m}));n[o]=r}return n[o]}}function u(e){let[o,r]=(0,g.default)(e!=null?e:S,s),{resolvedColorScheme:m,resolvedTheme:h}=f(o),t=(0,T.useMemo)(()=>w(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:t("theme"),setDarkTheme:t("darkTheme"),setLightTheme:t("lightTheme"),setThemeSet:(0,T.useCallback)(i=>r(c=>({...c,...i})),[]),setColorSchemePref:t("colorSchemePref"),setForcedTheme:t("forcedTheme"),setForcedColorScheme:t("forcedColorScheme")}}var p=require("react/jsx-runtime");function A({size:e=25,skipSystem:o}){let{colorSchemePref:r,setColorSchemePref:m}=u();return(0,p.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(r){case"":case"system":m("dark");break;case"dark":m("light");break;case"light":m(o?"dark":"system")}},type:"button",style:{"--size":`${e}px`}})}0&&(module.exports={ColorSwitch});
"use strict";var D=Object.create;var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var L=(e,o)=>{for(var r in o)n(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of A(o))!w.call(e,h)&&h!==r&&n(e,h,{get:()=>o[h],enumerable:!(m=b(o,h))||m.enumerable});return e};var g=(e,o,r)=>(r=e!=null?D(R(e)):{},y(o||!e||!e.__esModule?n(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>y(n({},"__esModule",{value:!0}),e);var U={};L(U,{ColorSwitch:()=>G});module.exports=E(U);var k=g(require("r18gs"));var s="nth-1",i="light",c="dark",l="system",p={theme:"",darkTheme:c,lightTheme:"",colorSchemePref:l,systemColorScheme:i};var M=g(require("r18gs"));var C=(e,o)=>{var d,f;let r=(d=o==null?void 0:o.forcedTheme)!=null?d:e==null?void 0:e.forcedTheme,m=(f=o==null?void 0:o.forcedColorScheme)!=null?f:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",t=(e==null?void 0:e.systemColorScheme)===c,S=t?c:i,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case l:T=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case c:[T,S]=[(e==null?void 0:e.darkTheme)||"",c];break;case i:[T,S]=[(e==null?void 0:e.lightTheme)||"",i];break}let P=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:S,resolvedColorSchemePref:h,th:P}};var u=require("react"),F=e=>o=>r=>e(m=>({...m,[o]:r})),x=e=>{let[o,r]=(0,k.default)(e!=null?e:s,p),{resolvedColorScheme:m,resolvedTheme:h}=C(o),t=(0,u.useMemo)(()=>F(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:t("theme"),setDarkTheme:t("darkTheme"),setLightTheme:t("lightTheme"),setThemeSet:S=>r(T=>({...T,...S})),setColorSchemePref:t("colorSchemePref"),setForcedTheme:t("forcedTheme"),setForcedColorScheme:t("forcedColorScheme")}};var v=require("react/jsx-runtime"),G=({size:e=25,skipSystem:o})=>{let{colorSchemePref:r,setColorSchemePref:m}=x();return(0,v.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(r){case"":case l:m(c);break;case c:m(i);break;case i:m(o?c:l)}},type:"button",style:{"--size":`${e}px`}})};0&&(module.exports={ColorSwitch});
"use client";
"use strict";var y=Object.create;var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var a=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var x=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},d=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of v(o))!P.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(m=k(o,h))||m.enumerable});return e};var b=(e,o,r)=>(r=e!=null?y(a(e)):{},d(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),F=e=>d(l({},"__esModule",{value:!0}),e);var E={};x(E,{ColorSwitch:()=>A});module.exports=F(E);var g=b(require("r18gs"));var S="nth",s={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function f(e,o){let r=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,m=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,h=(m===void 0?e==null?void 0:e.colorSchemePref:m)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",i=t?"dark":"light",c=r===void 0?(e==null?void 0:e.theme)||"":r;if(r===void 0)switch(h){case"system":c=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let C=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:c,resolvedColorScheme:i,resolvedColorSchemePref:h,th:C}}var T=require("react"),D=200,n={};function w(e){return o=>{if(n[o]===void 0)return n[o]=1,r=>setTimeout(()=>e(m=>({...m,[o]:r})),D);if(n[o]===1){let r=m=>e(h=>({...h,[o]:m}));n[o]=r}return n[o]}}function u(e){let[o,r]=(0,g.default)(e!=null?e:S,s),{resolvedColorScheme:m,resolvedTheme:h}=f(o),t=(0,T.useMemo)(()=>w(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:t("theme"),setDarkTheme:t("darkTheme"),setLightTheme:t("lightTheme"),setThemeSet:(0,T.useCallback)(i=>r(c=>({...c,...i})),[]),setColorSchemePref:t("colorSchemePref"),setForcedTheme:t("forcedTheme"),setForcedColorScheme:t("forcedColorScheme")}}var p=require("react/jsx-runtime");function A({size:e=25,skipSystem:o}){let{colorSchemePref:r,setColorSchemePref:m}=u();return(0,p.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(r){case"":case"system":m("dark");break;case"dark":m("light");break;case"light":m(o?"dark":"system")}},type:"button",style:{"--size":`${e}px`}})}0&&(module.exports={ColorSwitch});
"use strict";var D=Object.create;var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var L=(e,o)=>{for(var r in o)n(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of A(o))!w.call(e,h)&&h!==r&&n(e,h,{get:()=>o[h],enumerable:!(m=b(o,h))||m.enumerable});return e};var g=(e,o,r)=>(r=e!=null?D(R(e)):{},y(o||!e||!e.__esModule?n(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>y(n({},"__esModule",{value:!0}),e);var U={};L(U,{ColorSwitch:()=>G});module.exports=E(U);var k=g(require("r18gs"));var s="nth-1",i="light",c="dark",l="system",p={theme:"",darkTheme:c,lightTheme:"",colorSchemePref:l,systemColorScheme:i};var M=g(require("r18gs"));var C=(e,o)=>{var d,f;let r=(d=o==null?void 0:o.forcedTheme)!=null?d:e==null?void 0:e.forcedTheme,m=(f=o==null?void 0:o.forcedColorScheme)!=null?f:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",t=(e==null?void 0:e.systemColorScheme)===c,S=t?c:i,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case l:T=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case c:[T,S]=[(e==null?void 0:e.darkTheme)||"",c];break;case i:[T,S]=[(e==null?void 0:e.lightTheme)||"",i];break}let P=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:S,resolvedColorSchemePref:h,th:P}};var u=require("react"),F=e=>o=>r=>e(m=>({...m,[o]:r})),x=e=>{let[o,r]=(0,k.default)(e!=null?e:s,p),{resolvedColorScheme:m,resolvedTheme:h}=C(o),t=(0,u.useMemo)(()=>F(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:t("theme"),setDarkTheme:t("darkTheme"),setLightTheme:t("lightTheme"),setThemeSet:S=>r(T=>({...T,...S})),setColorSchemePref:t("colorSchemePref"),setForcedTheme:t("forcedTheme"),setForcedColorScheme:t("forcedColorScheme")}};var v=require("react/jsx-runtime"),G=({size:e=25,skipSystem:o})=>{let{colorSchemePref:r,setColorSchemePref:m}=x();return(0,v.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(r){case"":case l:m(c);break;case c:m(i);break;case i:m(o?c:l)}},type:"button",style:{"--size":`${e}px`}})};0&&(module.exports={ColorSwitch});
import type { ColorSchemeType } from "../../constants";
export declare function ForceColorScheme(props: {
/** Force color scheme on a page */
export declare const ForceColorScheme: (props: {
colorScheme: ColorSchemeType;
}): null;
}) => null;
//# sourceMappingURL=force-color-scheme.d.ts.map
"use client";
"use strict";var y=Object.create;var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var x=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},d=(e,o,r,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of v(o))!F.call(e,m)&&m!==r&&l(e,m,{get:()=>o[m],enumerable:!(h=k(o,m))||h.enumerable});return e};var D=(e,o,r)=>(r=e!=null?y(P(e)):{},d(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),A=e=>d(l({},"__esModule",{value:!0}),e);var L={};x(L,{ForceColorScheme:()=>E});module.exports=A(L);var p=require("react");var u=D(require("r18gs"));var S="nth",f={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function s(e,o){let r=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,h=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",i=c?"dark":"light",t=r===void 0?(e==null?void 0:e.theme)||"":r;if(r===void 0)switch(m){case"system":t=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[t,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[t,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let C=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:t,resolvedColorScheme:i,resolvedColorSchemePref:m,th:C}}var T=require("react"),b=200,n={};function a(e){return o=>{if(n[o]===void 0)return n[o]=1,r=>setTimeout(()=>e(h=>({...h,[o]:r})),b);if(n[o]===1){let r=h=>e(m=>({...m,[o]:h}));n[o]=r}return n[o]}}function g(e){let[o,r]=(0,u.default)(e!=null?e:S,f),{resolvedColorScheme:h,resolvedTheme:m}=s(o),c=(0,T.useMemo)(()=>a(r),[]);return{...o,resolvedColorScheme:h,resolvedTheme:m,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:(0,T.useCallback)(i=>r(t=>({...t,...i})),[]),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}}function E(e){let{setForcedColorScheme:o}=g();return(0,p.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null}0&&(module.exports={ForceColorScheme});
"use strict";var P=Object.create;var l=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of E(o))!L.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(m=A(o,h))||m.enumerable});return e};var C=(e,o,r)=>(r=e!=null?P(F(e)):{},y(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),M=e=>y(l({},"__esModule",{value:!0}),e);var w={};R(w,{ForceColorScheme:()=>b});module.exports=M(w);var x=require("react");var u=C(require("r18gs"));var t="nth-1",S="light",i="dark",s="system",d={theme:"",darkTheme:i,lightTheme:"",colorSchemePref:s,systemColorScheme:S};var U=C(require("r18gs"));var g=(e,o)=>{var f,p;let r=(f=o==null?void 0:o.forcedTheme)!=null?f:e==null?void 0:e.forcedTheme,m=(p=o==null?void 0:o.forcedColorScheme)!=null?p:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===i,n=c?i:S,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case s:T=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case i:[T,n]=[(e==null?void 0:e.darkTheme)||"",i];break;case S:[T,n]=[(e==null?void 0:e.lightTheme)||"",S];break}let D=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:n,resolvedColorSchemePref:h,th:D}};var k=require("react"),G=e=>o=>r=>e(m=>({...m,[o]:r})),v=e=>{let[o,r]=(0,u.default)(e!=null?e:t,d),{resolvedColorScheme:m,resolvedTheme:h}=g(o),c=(0,k.useMemo)(()=>G(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:n=>r(T=>({...T,...n})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};var b=e=>{let{setForcedColorScheme:o}=v();return(0,x.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null};0&&(module.exports={ForceColorScheme});
"use client";
"use strict";var y=Object.create;var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var F=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},d=(e,o,r,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of v(o))!x.call(e,m)&&m!==r&&l(e,m,{get:()=>o[m],enumerable:!(h=k(o,m))||h.enumerable});return e};var D=(e,o,r)=>(r=e!=null?y(P(e)):{},d(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),A=e=>d(l({},"__esModule",{value:!0}),e);var L={};F(L,{ForceColorScheme:()=>E});module.exports=A(L);var p=require("react");var u=D(require("r18gs"));var S="nth",f={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function s(e,o){let r=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,h=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",i=c?"dark":"light",t=r===void 0?(e==null?void 0:e.theme)||"":r;if(r===void 0)switch(m){case"system":t=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[t,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[t,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let C=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:t,resolvedColorScheme:i,resolvedColorSchemePref:m,th:C}}var T=require("react"),b=200,n={};function a(e){return o=>{if(n[o]===void 0)return n[o]=1,r=>setTimeout(()=>e(h=>({...h,[o]:r})),b);if(n[o]===1){let r=h=>e(m=>({...m,[o]:h}));n[o]=r}return n[o]}}function g(e){let[o,r]=(0,u.default)(e!=null?e:S,f),{resolvedColorScheme:h,resolvedTheme:m}=s(o),c=(0,T.useMemo)(()=>a(r),[]);return{...o,resolvedColorScheme:h,resolvedTheme:m,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:(0,T.useCallback)(i=>r(t=>({...t,...i})),[]),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}}function E(e){let{setForcedColorScheme:o}=g();return(0,p.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null}0&&(module.exports={ForceColorScheme});
"use strict";var P=Object.create;var S=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var r in o)S(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of E(o))!L.call(e,h)&&h!==r&&S(e,h,{get:()=>o[h],enumerable:!(m=A(o,h))||m.enumerable});return e};var C=(e,o,r)=>(r=e!=null?P(F(e)):{},y(o||!e||!e.__esModule?S(r,"default",{value:e,enumerable:!0}):r,e)),M=e=>y(S({},"__esModule",{value:!0}),e);var w={};R(w,{ForceColorScheme:()=>b});module.exports=M(w);var x=require("react");var u=C(require("r18gs"));var t="nth-1",l="light",i="dark",s="system",d={theme:"",darkTheme:i,lightTheme:"",colorSchemePref:s,systemColorScheme:l};var U=C(require("r18gs"));var g=(e,o)=>{var f,p;let r=(f=o==null?void 0:o.forcedTheme)!=null?f:e==null?void 0:e.forcedTheme,m=(p=o==null?void 0:o.forcedColorScheme)!=null?p:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===i,n=c?i:l,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case s:T=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case i:[T,n]=[(e==null?void 0:e.darkTheme)||"",i];break;case l:[T,n]=[(e==null?void 0:e.lightTheme)||"",l];break}let D=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:n,resolvedColorSchemePref:h,th:D}};var k=require("react"),G=e=>o=>r=>e(m=>({...m,[o]:r})),v=e=>{let[o,r]=(0,u.default)(e!=null?e:t,d),{resolvedColorScheme:m,resolvedTheme:h}=g(o),c=(0,k.useMemo)(()=>G(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:n=>r(T=>({...T,...n})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};var b=e=>{let{setForcedColorScheme:o}=v();return(0,x.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null};0&&(module.exports={ForceColorScheme});

@@ -1,4 +0,5 @@

export declare function ForceTheme(props: {
/** Force theme on a page */
export declare const ForceTheme: (props: {
theme: string;
}): null;
}) => null;
//# sourceMappingURL=force-theme.d.ts.map
"use client";
"use strict";var y=Object.create;var T=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var x=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},d=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of v(r))!F.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=k(r,m))||h.enumerable});return e};var D=(e,r,o)=>(o=e!=null?y(P(e)):{},d(r||!e||!e.__esModule?T(o,"default",{value:e,enumerable:!0}):o,e)),A=e=>d(T({},"__esModule",{value:!0}),e);var L={};x(L,{ForceTheme:()=>a});module.exports=A(L);var p=require("react");var u=D(require("r18gs"));var S="nth",f={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function s(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",c=t?"dark":"light",i=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":i=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,c]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,c]=[(e==null?void 0:e.lightTheme)||"","light"];break}let C=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:i,resolvedColorScheme:c,resolvedColorSchemePref:m,th:C}}var l=require("react"),b=200,n={};function E(e){return r=>{if(n[r]===void 0)return n[r]=1,o=>setTimeout(()=>e(h=>({...h,[r]:o})),b);if(n[r]===1){let o=h=>e(m=>({...m,[r]:h}));n[r]=o}return n[r]}}function g(e){let[r,o]=(0,u.default)(e!=null?e:S,f),{resolvedColorScheme:h,resolvedTheme:m}=s(r),t=(0,l.useMemo)(()=>E(o),[]);return{...r,resolvedColorScheme:h,resolvedTheme:m,setTheme:t("theme"),setDarkTheme:t("darkTheme"),setLightTheme:t("lightTheme"),setThemeSet:(0,l.useCallback)(c=>o(i=>({...i,...c})),[]),setColorSchemePref:t("colorSchemePref"),setForcedTheme:t("forcedTheme"),setForcedColorScheme:t("forcedColorScheme")}}function a(e){let{setForcedTheme:r}=g();return(0,p.useEffect)(()=>(r(e.theme),()=>{r(void 0)}),[e.theme]),null}0&&(module.exports={ForceTheme});
"use strict";var P=Object.create;var S=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var r in o)S(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of E(o))!L.call(e,h)&&h!==r&&S(e,h,{get:()=>o[h],enumerable:!(m=A(o,h))||m.enumerable});return e};var g=(e,o,r)=>(r=e!=null?P(F(e)):{},y(o||!e||!e.__esModule?S(r,"default",{value:e,enumerable:!0}):r,e)),M=e=>y(S({},"__esModule",{value:!0}),e);var w={};R(w,{ForceTheme:()=>b});module.exports=M(w);var x=require("react");var u=g(require("r18gs"));var l="nth-1",t="light",i="dark",d="system",s={theme:"",darkTheme:i,lightTheme:"",colorSchemePref:d,systemColorScheme:t};var U=g(require("r18gs"));var C=(e,o)=>{var f,p;let r=(f=o==null?void 0:o.forcedTheme)!=null?f:e==null?void 0:e.forcedTheme,m=(p=o==null?void 0:o.forcedColorScheme)!=null?p:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===i,n=c?i:t,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case d:T=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case i:[T,n]=[(e==null?void 0:e.darkTheme)||"",i];break;case t:[T,n]=[(e==null?void 0:e.lightTheme)||"",t];break}let D=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:n,resolvedColorSchemePref:h,th:D}};var k=require("react"),G=e=>o=>r=>e(m=>({...m,[o]:r})),v=e=>{let[o,r]=(0,u.default)(e!=null?e:l,s),{resolvedColorScheme:m,resolvedTheme:h}=C(o),c=(0,k.useMemo)(()=>G(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:n=>r(T=>({...T,...n})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};var b=e=>{let{setForcedTheme:o}=v();return(0,x.useEffect)(()=>(o(e.theme),()=>{o(void 0)}),[e.theme]),null};0&&(module.exports={ForceTheme});
"use client";
"use strict";var y=Object.create;var T=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var F=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},d=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of v(r))!x.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=k(r,m))||h.enumerable});return e};var D=(e,r,o)=>(o=e!=null?y(P(e)):{},d(r||!e||!e.__esModule?T(o,"default",{value:e,enumerable:!0}):o,e)),A=e=>d(T({},"__esModule",{value:!0}),e);var L={};F(L,{ForceTheme:()=>a});module.exports=A(L);var p=require("react");var u=D(require("r18gs"));var S="nth",f={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function s(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",c=t?"dark":"light",i=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":i=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,c]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,c]=[(e==null?void 0:e.lightTheme)||"","light"];break}let C=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:i,resolvedColorScheme:c,resolvedColorSchemePref:m,th:C}}var l=require("react"),b=200,n={};function E(e){return r=>{if(n[r]===void 0)return n[r]=1,o=>setTimeout(()=>e(h=>({...h,[r]:o})),b);if(n[r]===1){let o=h=>e(m=>({...m,[r]:h}));n[r]=o}return n[r]}}function g(e){let[r,o]=(0,u.default)(e!=null?e:S,f),{resolvedColorScheme:h,resolvedTheme:m}=s(r),t=(0,l.useMemo)(()=>E(o),[]);return{...r,resolvedColorScheme:h,resolvedTheme:m,setTheme:t("theme"),setDarkTheme:t("darkTheme"),setLightTheme:t("lightTheme"),setThemeSet:(0,l.useCallback)(c=>o(i=>({...i,...c})),[]),setColorSchemePref:t("colorSchemePref"),setForcedTheme:t("forcedTheme"),setForcedColorScheme:t("forcedColorScheme")}}function a(e){let{setForcedTheme:r}=g();return(0,p.useEffect)(()=>(r(e.theme),()=>{r(void 0)}),[e.theme]),null}0&&(module.exports={ForceTheme});
"use strict";var P=Object.create;var l=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of E(o))!L.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(m=A(o,h))||m.enumerable});return e};var g=(e,o,r)=>(r=e!=null?P(F(e)):{},y(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),M=e=>y(l({},"__esModule",{value:!0}),e);var w={};R(w,{ForceTheme:()=>b});module.exports=M(w);var x=require("react");var u=g(require("r18gs"));var S="nth-1",t="light",i="dark",s="system",d={theme:"",darkTheme:i,lightTheme:"",colorSchemePref:s,systemColorScheme:t};var U=g(require("r18gs"));var C=(e,o)=>{var f,p;let r=(f=o==null?void 0:o.forcedTheme)!=null?f:e==null?void 0:e.forcedTheme,m=(p=o==null?void 0:o.forcedColorScheme)!=null?p:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===i,n=c?i:t,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case s:T=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case i:[T,n]=[(e==null?void 0:e.darkTheme)||"",i];break;case t:[T,n]=[(e==null?void 0:e.lightTheme)||"",t];break}let D=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:n,resolvedColorSchemePref:h,th:D}};var k=require("react"),G=e=>o=>r=>e(m=>({...m,[o]:r})),v=e=>{let[o,r]=(0,u.default)(e!=null?e:S,d),{resolvedColorScheme:m,resolvedTheme:h}=C(o),c=(0,k.useMemo)(()=>G(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:n=>r(T=>({...T,...n})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};var b=e=>{let{setForcedTheme:o}=v();return(0,x.useEffect)(()=>(o(e.theme),()=>{o(void 0)}),[e.theme]),null};0&&(module.exports={ForceTheme});

@@ -1,1 +0,1 @@

"use strict";var $=Object.create;var u=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var N=(e,o)=>{for(var t in o)u(e,t,{get:o[t],enumerable:!0})},k=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of R(o))!M.call(e,m)&&m!==t&&u(e,m,{get:()=>o[m],enumerable:!(r=L(o,m))||r.enumerable});return e};var p=(e,o,t)=>(t=e!=null?$(U(e)):{},k(o||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e)),z=e=>k(u({},"__esModule",{value:!0}),e);var B={};N(B,{ColorSwitch:()=>G,ForceColorScheme:()=>I,ForceTheme:()=>W,ThemeSwitcher:()=>Y,useThemeSwitcher:()=>F});module.exports=z(B);var x=p(require("r18gs"));var l="nth",d={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function f(e,o){let t=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,r=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,m=(r===void 0?e==null?void 0:e.colorSchemePref:r)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",h=c?"dark":"light",i=t===void 0?(e==null?void 0:e.theme)||"":t;if(t===void 0)switch(m){case"system":i=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,h]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,h]=[(e==null?void 0:e.lightTheme)||"","light"];break}let s=t===void 0?(e==null?void 0:e.theme)||"":t;return{resolvedTheme:i,resolvedColorScheme:h,resolvedColorSchemePref:m,th:s}}function v(e){let{colorSchemePref:o,systemColorScheme:t,darkTheme:r,lightTheme:m,theme:c}=e;return[o,t,r,m,c].join(",")}function y(e){if(!e)return d;let[o,t,r,m,c]=e.split(",");return{colorSchemePref:o,systemColorScheme:t,darkTheme:r,lightTheme:m,theme:c}}var a=require("react"),_=200,T={};function j(e){return o=>{if(T[o]===void 0)return T[o]=1,t=>setTimeout(()=>e(r=>({...r,[o]:t})),_);if(T[o]===1){let t=r=>e(m=>({...m,[o]:r}));T[o]=t}return T[o]}}function S(e){let[o,t]=(0,x.default)(e!=null?e:l,d),{resolvedColorScheme:r,resolvedTheme:m}=f(o),c=(0,a.useMemo)(()=>j(t),[]);return{...o,resolvedColorScheme:r,resolvedTheme:m,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:(0,a.useCallback)(h=>t(i=>({...i,...h})),[]),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}}var P=require("react/jsx-runtime");function G({size:e=25,skipSystem:o}){let{colorSchemePref:t,setColorSchemePref:r}=S();return(0,P.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(t){case"":case"system":r("dark");break;case"dark":r("light");break;case"light":r(o?"dark":"system")}},type:"button",style:{"--size":`${e}px`}})}var w=require("react");function I(e){let{setForcedColorScheme:o}=S();return(0,w.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null}var b=require("react");function W(e){let{setForcedTheme:o}=S();return(0,b.useEffect)(()=>(o(e.theme),()=>{o(void 0)}),[e.theme]),null}var C=p(require("react")),E=require("react");var A=p(require("r18gs"));function q(e){C.useEffect(()=>{let o=matchMedia("(prefers-color-scheme: dark)"),t=()=>{e(r=>({...r,systemColorScheme:o.matches?"dark":"light"}))};return t(),o.addEventListener("change",t),()=>{o.removeEventListener("change",t)}},[e])}var D=0;function O(e,o){C.useEffect(()=>{D=Date.now();let t=o!=null?o:l,r=y(localStorage.getItem(t));delete r.systemColorScheme,e(c=>({...c,...r}));let m=c=>{c.key===t&&e(h=>({...h,...y(c.newValue)}))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[o])}var Q=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:t,th:r},m)=>{let{targetSelector:c,styles:h}=m,i=document.querySelector(c||`#${l}`),s=[o,`theme-${e}`,`th-${r}`,`csp-${t}`];return h&&(s=s.map(n=>{var g;return(g=h[n])!=null?g:n})),[i,c&&i?null:document.documentElement].forEach(n=>{n&&(n.className=s.join(" ")),n==null||n.setAttribute("data-th",r),n==null||n.setAttribute("data-theme",e),n==null||n.setAttribute("data-color-scheme",o),n==null||n.setAttribute("data-csp",t)}),(i==null?void 0:i.getAttribute("data-nth"))==="next"},V=(e="none")=>{let o=document.createElement("style"),t=`transition: ${e.split(";")[0]} !important;`;return o.appendChild(document.createTextNode(`*{-webkit-${t}-moz-${t}-o-${t}-ms-${t}${t}}`)),document.head.appendChild(o),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(o)},1)}};function F(e){var r;let[o,t]=(0,A.default)((r=e.targetSelector)!=null?r:l,d);q(t),O(t,e.targetSelector),(0,E.useEffect)(()=>{let m=V(e.themeTransition),c=f(o,e),h=Q(c,e);if(D<Date.now()-300){let i=v(o),s=e.targetSelector||l;localStorage.setItem(s,i),h&&(document.cookie=`${s}=${i}; max-age=31536000; SameSite=Strict;`)}m()},[e,o])}function Y(e){return F(e),null}0&&(module.exports={ColorSwitch,ForceColorScheme,ForceTheme,ThemeSwitcher,useThemeSwitcher});
"use strict";var F=Object.create;var f=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var N=(e,o)=>{for(var r in o)f(e,r,{get:o[r],enumerable:!0})},k=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of U(o))!G.call(e,h)&&h!==r&&f(e,h,{get:()=>o[h],enumerable:!(t=M(o,h))||t.enumerable});return e};var v=(e,o,r)=>(r=e!=null?F($(e)):{},k(o||!e||!e.__esModule?f(r,"default",{value:e,enumerable:!0}):r,e)),H=e=>k(f({},"__esModule",{value:!0}),e);var q={};N(q,{ColorSwitch:()=>O,ForceColorScheme:()=>_,ForceTheme:()=>J,ThemeSwitcher:()=>j,useThemeSwitcher:()=>L});module.exports=H(q);var A=v(require("r18gs"));var S="nth-1",l="light",s="dark",T="system",u={theme:"",darkTheme:s,lightTheme:"",colorSchemePref:T,systemColorScheme:l};var P=v(require("r18gs"));var C=(e,o)=>{var y,m;let r=(y=o==null?void 0:o.forcedTheme)!=null?y:e==null?void 0:e.forcedTheme,t=(m=o==null?void 0:o.forcedColorScheme)!=null?m:e==null?void 0:e.forcedColorScheme,h=(t!=null?t:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===s,i=c?s:l,n=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case T:n=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case s:[n,i]=[(e==null?void 0:e.darkTheme)||"",s];break;case l:[n,i]=[(e==null?void 0:e.lightTheme)||"",l];break}let p=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:n,resolvedColorScheme:i,resolvedColorSchemePref:h,th:p}},I=typeof localStorage=="undefined",a="(prefers-color-scheme: dark)",D=e=>{let o=e!=null?e:S;return(0,P.default)(o,()=>{let r=I?null:localStorage.getItem(o);return r?{...JSON.parse(r),systemColorScheme:matchMedia(a).matches?s:l}:u})};var b=require("react"),K=e=>o=>r=>e(t=>({...t,[o]:r})),d=e=>{let[o,r]=(0,A.default)(e!=null?e:S,u),{resolvedColorScheme:t,resolvedTheme:h}=C(o),c=(0,b.useMemo)(()=>K(r),[]);return{...o,resolvedColorScheme:t,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:i=>r(n=>({...n,...i})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};var E=require("react/jsx-runtime"),O=({size:e=25,skipSystem:o})=>{let{colorSchemePref:r,setColorSchemePref:t}=d();return(0,E.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(r){case"":case T:t(s);break;case s:t(l);break;case l:t(o?s:T)}},type:"button",style:{"--size":`${e}px`}})};var w=require("react");var _=e=>{let{setForcedColorScheme:o}=d();return(0,w.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null};var R=require("react");var J=e=>{let{setForcedTheme:o}=d();return(0,R.useEffect)(()=>(o(e.theme),()=>{o(void 0)}),[e.theme]),null};var g=require("react");var Y=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:r,th:t},h)=>{let{targetSelector:c,styles:i}=h,n=document.querySelector(c||`#${S}`),p=[o,`theme-${e}`,`th-${t}`,`csp-${r}`];return i&&(p=p.map(m=>{var x;return(x=i[m])!=null?x:m})),[n,c&&n?null:document.documentElement].forEach(m=>{m&&(m.className=p.join(" ")),m==null||m.setAttribute("data-th",t),m==null||m.setAttribute("data-theme",e),m==null||m.setAttribute("data-color-scheme",o),m==null||m.setAttribute("data-csp",r)}),(n==null?void 0:n.getAttribute("data-nth"))==="next"},z=(e="none")=>{let o=document.createElement("style");return o.textContent=`transition: ${e.split(";")[0]} !important;`,document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},L=e=>{let[o,r]=D(e.targetSelector),t=e.targetSelector||S;(0,g.useEffect)(()=>{let h=matchMedia(a);h.addEventListener("change",()=>r(c=>({...c,systemColorScheme:h.matches?s:l}))),addEventListener("storage",c=>{c.key===t&&r(i=>({...i,...JSON.parse(c.newValue||"{}")}))})},[]),(0,g.useEffect)(()=>{let h=z(e.themeTransition),c=C(o,e),i=Y(c,e),n=JSON.stringify(o);localStorage.setItem(t,n),i&&(document.cookie=`${t}=${n};max-age=31536000;SameSite=Strict;`),h()},[e,o])},j=e=>(L(e),null);0&&(module.exports={ColorSwitch,ForceColorScheme,ForceTheme,ThemeSwitcher,useThemeSwitcher});
"use client";
"use strict";var x=Object.create;var s=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var $=(e,o)=>{for(var r in o)s(e,r,{get:o[r],enumerable:!0})},f=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of E(o))!b.call(e,m)&&m!==r&&s(e,m,{get:()=>o[m],enumerable:!(t=P(o,m))||t.enumerable});return e};var p=(e,o,r)=>(r=e!=null?x(A(e)):{},f(o||!e||!e.__esModule?s(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>f(s({},"__esModule",{value:!0}),e);var M={};$(M,{ThemeSwitcher:()=>I,useThemeSwitcher:()=>w});module.exports=D(M);var u=p(require("react")),g=require("react");var l="nth",S={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function y(e,o){let r=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,t=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,m=(t===void 0?e==null?void 0:e.colorSchemePref:t)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",h=c?"dark":"light",i=r===void 0?(e==null?void 0:e.theme)||"":r;if(r===void 0)switch(m){case"system":i=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,h]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,h]=[(e==null?void 0:e.lightTheme)||"","light"];break}let d=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:i,resolvedColorScheme:h,resolvedColorSchemePref:m,th:d}}function C(e){let{colorSchemePref:o,systemColorScheme:r,darkTheme:t,lightTheme:m,theme:c}=e;return[o,r,t,m,c].join(",")}function T(e){if(!e)return S;let[o,r,t,m,c]=e.split(",");return{colorSchemePref:o,systemColorScheme:r,darkTheme:t,lightTheme:m,theme:c}}var k=p(require("r18gs"));function L(e){u.useEffect(()=>{let o=matchMedia("(prefers-color-scheme: dark)"),r=()=>{e(t=>({...t,systemColorScheme:o.matches?"dark":"light"}))};return r(),o.addEventListener("change",r),()=>{o.removeEventListener("change",r)}},[e])}var v=0;function R(e,o){u.useEffect(()=>{v=Date.now();let r=o!=null?o:l,t=T(localStorage.getItem(r));delete t.systemColorScheme,e(c=>({...c,...t}));let m=c=>{c.key===r&&e(h=>({...h,...T(c.newValue)}))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[o])}var F=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:r,th:t},m)=>{let{targetSelector:c,styles:h}=m,i=document.querySelector(c||`#${l}`),d=[o,`theme-${e}`,`th-${t}`,`csp-${r}`];return h&&(d=d.map(n=>{var a;return(a=h[n])!=null?a:n})),[i,c&&i?null:document.documentElement].forEach(n=>{n&&(n.className=d.join(" ")),n==null||n.setAttribute("data-th",t),n==null||n.setAttribute("data-theme",e),n==null||n.setAttribute("data-color-scheme",o),n==null||n.setAttribute("data-csp",r)}),(i==null?void 0:i.getAttribute("data-nth"))==="next"},U=(e="none")=>{let o=document.createElement("style"),r=`transition: ${e.split(";")[0]} !important;`;return o.appendChild(document.createTextNode(`*{-webkit-${r}-moz-${r}-o-${r}-ms-${r}${r}}`)),document.head.appendChild(o),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(o)},1)}};function w(e){var t;let[o,r]=(0,k.default)((t=e.targetSelector)!=null?t:l,S);L(r),R(r,e.targetSelector),(0,g.useEffect)(()=>{let m=U(e.themeTransition),c=y(o,e),h=F(c,e);if(v<Date.now()-300){let i=C(o),d=e.targetSelector||l;localStorage.setItem(d,i),h&&(document.cookie=`${d}=${i}; max-age=31536000; SameSite=Strict;`)}m()},[e,o])}function I(e){return w(e),null}0&&(module.exports={ThemeSwitcher,useThemeSwitcher});
"use strict";var D=Object.create;var T=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(e,o)=>{for(var r in o)T(e,r,{get:o[r],enumerable:!0})},a=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of E(o))!b.call(e,m)&&m!==r&&T(e,m,{get:()=>o[m],enumerable:!(t=A(o,m))||t.enumerable});return e};var L=(e,o,r)=>(r=e!=null?D(R(e)):{},a(o||!e||!e.__esModule?T(r,"default",{value:e,enumerable:!0}):r,e)),M=e=>a(T({},"__esModule",{value:!0}),e);var G={};w(G,{ThemeSwitcher:()=>N,useThemeSwitcher:()=>P});module.exports=M(G);var u=require("react");var v=L(require("r18gs"));var S="nth-1",s="light",l="dark",y="system",k={theme:"",darkTheme:l,lightTheme:"",colorSchemePref:y,systemColorScheme:s};var x=(e,o)=>{var p,c;let r=(p=o==null?void 0:o.forcedTheme)!=null?p:e==null?void 0:e.forcedTheme,t=(c=o==null?void 0:o.forcedColorScheme)!=null?c:e==null?void 0:e.forcedColorScheme,m=(t!=null?t:e==null?void 0:e.colorSchemePref)||"",n=(e==null?void 0:e.systemColorScheme)===l,i=n?l:s,h=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(m){case y:h=(n?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case l:[h,i]=[(e==null?void 0:e.darkTheme)||"",l];break;case s:[h,i]=[(e==null?void 0:e.lightTheme)||"",s];break}let d=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:h,resolvedColorScheme:i,resolvedColorSchemePref:m,th:d}},U=typeof localStorage=="undefined",f="(prefers-color-scheme: dark)",g=e=>{let o=e!=null?e:S;return(0,v.default)(o,()=>{let r=U?null:localStorage.getItem(o);return r?{...JSON.parse(r),systemColorScheme:matchMedia(f).matches?l:s}:k})};var $=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:r,th:t},m)=>{let{targetSelector:n,styles:i}=m,h=document.querySelector(n||`#${S}`),d=[o,`theme-${e}`,`th-${t}`,`csp-${r}`];return i&&(d=d.map(c=>{var C;return(C=i[c])!=null?C:c})),[h,n&&h?null:document.documentElement].forEach(c=>{c&&(c.className=d.join(" ")),c==null||c.setAttribute("data-th",t),c==null||c.setAttribute("data-theme",e),c==null||c.setAttribute("data-color-scheme",o),c==null||c.setAttribute("data-csp",r)}),(h==null?void 0:h.getAttribute("data-nth"))==="next"},I=(e="none")=>{let o=document.createElement("style");return o.textContent=`transition: ${e.split(";")[0]} !important;`,document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},P=e=>{let[o,r]=g(e.targetSelector),t=e.targetSelector||S;(0,u.useEffect)(()=>{let m=matchMedia(f);m.addEventListener("change",()=>r(n=>({...n,systemColorScheme:m.matches?l:s}))),addEventListener("storage",n=>{n.key===t&&r(i=>({...i,...JSON.parse(n.newValue||"{}")}))})},[]),(0,u.useEffect)(()=>{let m=I(e.themeTransition),n=x(o,e),i=$(n,e),h=JSON.stringify(o);localStorage.setItem(t,h),i&&(document.cookie=`${t}=${h};max-age=31536000;SameSite=Strict;`),m()},[e,o])},N=e=>(P(e),null);0&&(module.exports={ThemeSwitcher,useThemeSwitcher});

@@ -1,3 +0,2 @@

import { ColorSchemeType } from "../../constants";
/** todo - set persistance and cookies */
import { ColorSchemeType, ResolvedColorSchemeType } from "../../constants";
export interface ThemeSwitcherProps {

@@ -15,8 +14,9 @@ forcedTheme?: string;

"data-theme"?: string;
"data-color-scheme"?: "dark" | "light";
"data-csp"?: ColorSchemeType /** color-scheme-preference */;
"data-color-scheme"?: ResolvedColorSchemeType;
/** color-scheme-preference */
"data-csp"?: ColorSchemeType;
}
export interface UpdateProps {
resolvedTheme: string;
resolvedColorScheme: "dark" | "light";
resolvedColorScheme: ResolvedColorSchemeType;
resolvedColorSchemePref: ColorSchemeType;

@@ -29,3 +29,3 @@ th: string;

*/
export declare function useThemeSwitcher(props: ThemeSwitcherProps): void;
export declare const useThemeSwitcher: (props: ThemeSwitcherProps) => void;
/**

@@ -35,3 +35,3 @@ * Use this component in your layout - `app/layout.tsx` or your custom layout or in `_app.tsx` file.

*/
export declare function ThemeSwitcher(props: ThemeSwitcherProps): null;
export declare const ThemeSwitcher: (props: ThemeSwitcherProps) => null;
//# sourceMappingURL=theme-switcher.d.ts.map

@@ -1,1 +0,1 @@

"use strict";var P=Object.create;var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var $=(e,o)=>{for(var r in o)s(e,r,{get:o[r],enumerable:!0})},f=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of E(o))!b.call(e,m)&&m!==r&&s(e,m,{get:()=>o[m],enumerable:!(t=x(o,m))||t.enumerable});return e};var y=(e,o,r)=>(r=e!=null?P(A(e)):{},f(o||!e||!e.__esModule?s(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>f(s({},"__esModule",{value:!0}),e);var M={};$(M,{ThemeSwitcher:()=>I,useThemeSwitcher:()=>w});module.exports=D(M);var u=y(require("react")),g=require("react");var l="nth",S={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function p(e,o){let r=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,t=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,m=(t===void 0?e==null?void 0:e.colorSchemePref:t)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",h=c?"dark":"light",i=r===void 0?(e==null?void 0:e.theme)||"":r;if(r===void 0)switch(m){case"system":i=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,h]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,h]=[(e==null?void 0:e.lightTheme)||"","light"];break}let d=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:i,resolvedColorScheme:h,resolvedColorSchemePref:m,th:d}}function C(e){let{colorSchemePref:o,systemColorScheme:r,darkTheme:t,lightTheme:m,theme:c}=e;return[o,r,t,m,c].join(",")}function T(e){if(!e)return S;let[o,r,t,m,c]=e.split(",");return{colorSchemePref:o,systemColorScheme:r,darkTheme:t,lightTheme:m,theme:c}}var k=y(require("r18gs"));function L(e){u.useEffect(()=>{let o=matchMedia("(prefers-color-scheme: dark)"),r=()=>{e(t=>({...t,systemColorScheme:o.matches?"dark":"light"}))};return r(),o.addEventListener("change",r),()=>{o.removeEventListener("change",r)}},[e])}var v=0;function R(e,o){u.useEffect(()=>{v=Date.now();let r=o!=null?o:l,t=T(localStorage.getItem(r));delete t.systemColorScheme,e(c=>({...c,...t}));let m=c=>{c.key===r&&e(h=>({...h,...T(c.newValue)}))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[o])}var F=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:r,th:t},m)=>{let{targetSelector:c,styles:h}=m,i=document.querySelector(c||`#${l}`),d=[o,`theme-${e}`,`th-${t}`,`csp-${r}`];return h&&(d=d.map(n=>{var a;return(a=h[n])!=null?a:n})),[i,c&&i?null:document.documentElement].forEach(n=>{n&&(n.className=d.join(" ")),n==null||n.setAttribute("data-th",t),n==null||n.setAttribute("data-theme",e),n==null||n.setAttribute("data-color-scheme",o),n==null||n.setAttribute("data-csp",r)}),(i==null?void 0:i.getAttribute("data-nth"))==="next"},U=(e="none")=>{let o=document.createElement("style"),r=`transition: ${e.split(";")[0]} !important;`;return o.appendChild(document.createTextNode(`*{-webkit-${r}-moz-${r}-o-${r}-ms-${r}${r}}`)),document.head.appendChild(o),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(o)},1)}};function w(e){var t;let[o,r]=(0,k.default)((t=e.targetSelector)!=null?t:l,S);L(r),R(r,e.targetSelector),(0,g.useEffect)(()=>{let m=U(e.themeTransition),c=p(o,e),h=F(c,e);if(v<Date.now()-300){let i=C(o),d=e.targetSelector||l;localStorage.setItem(d,i),h&&(document.cookie=`${d}=${i}; max-age=31536000; SameSite=Strict;`)}m()},[e,o])}function I(e){return w(e),null}0&&(module.exports={ThemeSwitcher,useThemeSwitcher});
"use strict";var D=Object.create;var T=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(e,o)=>{for(var r in o)T(e,r,{get:o[r],enumerable:!0})},a=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of E(o))!b.call(e,m)&&m!==r&&T(e,m,{get:()=>o[m],enumerable:!(t=A(o,m))||t.enumerable});return e};var L=(e,o,r)=>(r=e!=null?D(R(e)):{},a(o||!e||!e.__esModule?T(r,"default",{value:e,enumerable:!0}):r,e)),M=e=>a(T({},"__esModule",{value:!0}),e);var G={};w(G,{ThemeSwitcher:()=>N,useThemeSwitcher:()=>P});module.exports=M(G);var u=require("react");var v=L(require("r18gs"));var S="nth-1",s="light",l="dark",y="system",k={theme:"",darkTheme:l,lightTheme:"",colorSchemePref:y,systemColorScheme:s};var g=(e,o)=>{var p,c;let r=(p=o==null?void 0:o.forcedTheme)!=null?p:e==null?void 0:e.forcedTheme,t=(c=o==null?void 0:o.forcedColorScheme)!=null?c:e==null?void 0:e.forcedColorScheme,m=(t!=null?t:e==null?void 0:e.colorSchemePref)||"",n=(e==null?void 0:e.systemColorScheme)===l,i=n?l:s,h=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(m){case y:h=(n?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case l:[h,i]=[(e==null?void 0:e.darkTheme)||"",l];break;case s:[h,i]=[(e==null?void 0:e.lightTheme)||"",s];break}let d=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:h,resolvedColorScheme:i,resolvedColorSchemePref:m,th:d}},U=typeof localStorage=="undefined",f="(prefers-color-scheme: dark)",x=e=>{let o=e!=null?e:S;return(0,v.default)(o,()=>{let r=U?null:localStorage.getItem(o);return r?{...JSON.parse(r),systemColorScheme:matchMedia(f).matches?l:s}:k})};var $=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:r,th:t},m)=>{let{targetSelector:n,styles:i}=m,h=document.querySelector(n||`#${S}`),d=[o,`theme-${e}`,`th-${t}`,`csp-${r}`];return i&&(d=d.map(c=>{var C;return(C=i[c])!=null?C:c})),[h,n&&h?null:document.documentElement].forEach(c=>{c&&(c.className=d.join(" ")),c==null||c.setAttribute("data-th",t),c==null||c.setAttribute("data-theme",e),c==null||c.setAttribute("data-color-scheme",o),c==null||c.setAttribute("data-csp",r)}),(h==null?void 0:h.getAttribute("data-nth"))==="next"},I=(e="none")=>{let o=document.createElement("style");return o.textContent=`transition: ${e.split(";")[0]} !important;`,document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},P=e=>{let[o,r]=x(e.targetSelector),t=e.targetSelector||S;(0,u.useEffect)(()=>{let m=matchMedia(f);m.addEventListener("change",()=>r(n=>({...n,systemColorScheme:m.matches?l:s}))),addEventListener("storage",n=>{n.key===t&&r(i=>({...i,...JSON.parse(n.newValue||"{}")}))})},[]),(0,u.useEffect)(()=>{let m=I(e.themeTransition),n=g(o,e),i=$(n,e),h=JSON.stringify(o);localStorage.setItem(t,h),i&&(document.cookie=`${t}=${h};max-age=31536000;SameSite=Strict;`),m()},[e,o])},N=e=>(P(e),null);0&&(module.exports={ThemeSwitcher,useThemeSwitcher});
/** shared constants -- keep in separate files for better tree-shaking and dependency injection */
export declare const DEFAULT_ID = "nth";
export declare const DEFAULT_ID = "nth-1";
export declare const LIGHT = "light";
export declare const DARK = "dark";
export declare const SYSTEM = "system";
export type ColorSchemeType = "" | "system" | "dark" | "light";
export type ResolvedColorSchemeType = "dark" | "light";
export interface ThemeStoreType {

@@ -5,0 +9,0 @@ theme: string;

@@ -1,1 +0,1 @@

"use strict";var h=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var r in e)h(t,r,{get:e[r],enumerable:!0})},l=(t,e,r,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of s(e))!c.call(t,o)&&o!==r&&h(t,o,{get:()=>e[o],enumerable:!(m=i(e,o))||m.enumerable});return t};var d=t=>l(h({},"__esModule",{value:!0}),t);var n={};T(n,{DEFAULT_ID:()=>S,initialState:()=>g});module.exports=d(n);var S="nth",g={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};0&&(module.exports={DEFAULT_ID,initialState});
"use strict";var h=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var r in e)h(o,r,{get:e[r],enumerable:!0})},p=(o,e,r,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!S.call(o,t)&&t!==r&&h(o,t,{get:()=>e[t],enumerable:!(m=T(e,t))||m.enumerable});return o};var g=o=>p(h({},"__esModule",{value:!0}),o);var a={};d(a,{DARK:()=>c,DEFAULT_ID:()=>n,LIGHT:()=>s,SYSTEM:()=>i,initialState:()=>y});module.exports=g(a);var n="nth-1",s="light",c="dark",i="system",y={theme:"",darkTheme:c,lightTheme:"",colorSchemePref:i,systemColorScheme:s};0&&(module.exports={DARK,DEFAULT_ID,LIGHT,SYSTEM,initialState});

@@ -1,1 +0,1 @@

import{a}from"../../chunk-Y3OCA6SS.js";import"../../chunk-7M2VOCYN.js";import"../../chunk-43VIEHHP.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as ColorSwitch};
import{a}from"../../chunk-KJL6TY5U.js";import"../../chunk-JNEYODOT.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as ColorSwitch};
"use client";
"use strict";import"../../chunk-4ICCQOPU.js";import{a}from"../../chunk-Y3OCA6SS.js";import"../../chunk-7M2VOCYN.js";import"../../chunk-43VIEHHP.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as ColorSwitch};
"use strict";import{a}from"../../chunk-KJL6TY5U.js";import"../../chunk-JNEYODOT.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as ColorSwitch};
"use client";
"use strict";import{a}from"../../chunk-C7WGZO3Q.js";import"../../chunk-7M2VOCYN.js";import"../../chunk-43VIEHHP.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as ForceColorScheme};
"use strict";import{a}from"../../chunk-AFPWJIIW.js";import"../../chunk-JNEYODOT.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as ForceColorScheme};
"use client";
"use strict";import"../../chunk-SDMJSSW7.js";import{a}from"../../chunk-C7WGZO3Q.js";import"../../chunk-7M2VOCYN.js";import"../../chunk-43VIEHHP.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as ForceColorScheme};
"use strict";import{a}from"../../chunk-AFPWJIIW.js";import"../../chunk-JNEYODOT.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as ForceColorScheme};
"use client";
"use strict";import{a}from"../../chunk-HVY2RYDJ.js";import"../../chunk-7M2VOCYN.js";import"../../chunk-43VIEHHP.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as ForceTheme};
"use strict";import{a}from"../../chunk-2AD7BW2X.js";import"../../chunk-JNEYODOT.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as ForceTheme};
"use client";
"use strict";import"../../chunk-6UZHWUTK.js";import{a}from"../../chunk-HVY2RYDJ.js";import"../../chunk-7M2VOCYN.js";import"../../chunk-43VIEHHP.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as ForceTheme};
"use strict";import{a}from"../../chunk-2AD7BW2X.js";import"../../chunk-JNEYODOT.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as ForceTheme};

@@ -1,1 +0,1 @@

import"../chunk-FCW477AH.js";import"../chunk-6UZHWUTK.js";import"../chunk-GHI3WT47.js";import{a as d,b as e}from"../chunk-UAMKPF43.js";import"../chunk-4ICCQOPU.js";import{a}from"../chunk-Y3OCA6SS.js";import"../chunk-SDMJSSW7.js";import{a as b}from"../chunk-C7WGZO3Q.js";import{a as c}from"../chunk-HVY2RYDJ.js";import"../chunk-7M2VOCYN.js";import"../chunk-43VIEHHP.js";import"../chunk-TSPFGVSD.js";import"../chunk-XJ2PZYE7.js";export{a as ColorSwitch,b as ForceColorScheme,c as ForceTheme,e as ThemeSwitcher,d as useThemeSwitcher};
import{a as c}from"../chunk-2AD7BW2X.js";import{a as d,b as e}from"../chunk-JLIJU3JL.js";import{a}from"../chunk-KJL6TY5U.js";import{a as b}from"../chunk-AFPWJIIW.js";import"../chunk-JNEYODOT.js";import"../chunk-3VDLVKFR.js";import"../chunk-DV73ZV6G.js";export{a as ColorSwitch,b as ForceColorScheme,c as ForceTheme,e as ThemeSwitcher,d as useThemeSwitcher};
"use client";
"use strict";import"../../chunk-GHI3WT47.js";import{a,b}from"../../chunk-UAMKPF43.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{b as ThemeSwitcher,a as useThemeSwitcher};
"use strict";import{a,b}from"../../chunk-JLIJU3JL.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{b as ThemeSwitcher,a as useThemeSwitcher};

@@ -1,1 +0,1 @@

import{a,b}from"../../chunk-UAMKPF43.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{b as ThemeSwitcher,a as useThemeSwitcher};
import{a,b}from"../../chunk-JLIJU3JL.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{b as ThemeSwitcher,a as useThemeSwitcher};

@@ -1,1 +0,1 @@

import{a,b}from"./chunk-XJ2PZYE7.js";export{a as DEFAULT_ID,b as initialState};
import{a,b,c,d,e}from"./chunk-DV73ZV6G.js";export{c as DARK,a as DEFAULT_ID,b as LIGHT,d as SYSTEM,e as initialState};

@@ -1,1 +0,1 @@

import"../chunk-7M2VOCYN.js";import{a}from"../chunk-43VIEHHP.js";import"../chunk-TSPFGVSD.js";import"../chunk-XJ2PZYE7.js";export{a as useTheme};
import{a}from"../chunk-JNEYODOT.js";import"../chunk-3VDLVKFR.js";import"../chunk-DV73ZV6G.js";export{a as useTheme};

@@ -1,1 +0,1 @@

import{a}from"../chunk-43VIEHHP.js";import"../chunk-TSPFGVSD.js";import"../chunk-XJ2PZYE7.js";export{a as useTheme};
import{a}from"../chunk-JNEYODOT.js";import"../chunk-3VDLVKFR.js";import"../chunk-DV73ZV6G.js";export{a as useTheme};
"use client";
"use strict";import"./chunk-FCW477AH.js";import"./chunk-6UZHWUTK.js";import"./chunk-GHI3WT47.js";import{a as p,b as x}from"./chunk-UAMKPF43.js";import"./chunk-4ICCQOPU.js";import{a as t}from"./chunk-Y3OCA6SS.js";import"./chunk-SDMJSSW7.js";import{a as f}from"./chunk-C7WGZO3Q.js";import{a as m}from"./chunk-HVY2RYDJ.js";import"./chunk-7M2VOCYN.js";import{a as e}from"./chunk-43VIEHHP.js";import"./chunk-TSPFGVSD.js";import{a as o,b as r}from"./chunk-XJ2PZYE7.js";export{t as ColorSwitch,o as DEFAULT_ID,f as ForceColorScheme,m as ForceTheme,x as ThemeSwitcher,r as initialState,e as useTheme,p as useThemeSwitcher};
"use strict";import{a as c}from"./chunk-2AD7BW2X.js";import{a as i,b as l}from"./chunk-JLIJU3JL.js";import{a as p}from"./chunk-KJL6TY5U.js";import{a as x}from"./chunk-AFPWJIIW.js";import{a as m}from"./chunk-JNEYODOT.js";import"./chunk-3VDLVKFR.js";import{a as o,b as r,c as e,d as t,e as f}from"./chunk-DV73ZV6G.js";export{p as ColorSwitch,e as DARK,o as DEFAULT_ID,x as ForceColorScheme,c as ForceTheme,r as LIGHT,t as SYSTEM,l as ThemeSwitcher,f as initialState,m as useTheme,i as useThemeSwitcher};

@@ -1,1 +0,1 @@

import"../chunk-AUK6I42H.js";import"../chunk-HRRYOWTH.js";import{a as o,b as r}from"../chunk-TOMIFZ5B.js";import"../chunk-TSPFGVSD.js";import"../chunk-XJ2PZYE7.js";export{o as NextJsSSGThemeSwitcher,o as NextJsServerTarget,r as ServerSideWrapper};
import{a as o,b as r}from"../chunk-5FU2GOKJ.js";import"../chunk-3VDLVKFR.js";import"../chunk-DV73ZV6G.js";export{o as NextJsSSGThemeSwitcher,o as NextJsServerTarget,r as ServerSideWrapper};

@@ -1,1 +0,1 @@

import"../../chunk-AUK6I42H.js";import"../../chunk-HRRYOWTH.js";import{a,b}from"../../chunk-TOMIFZ5B.js";import"../../chunk-TSPFGVSD.js";import"../../chunk-XJ2PZYE7.js";export{a as NextJsSSGThemeSwitcher,a as NextJsServerTarget,b as ServerSideWrapper};
import{a,b}from"../../chunk-5FU2GOKJ.js";import"../../chunk-3VDLVKFR.js";import"../../chunk-DV73ZV6G.js";export{a as NextJsSSGThemeSwitcher,a as NextJsServerTarget,b as ServerSideWrapper};

@@ -1,1 +0,1 @@

import"../../../chunk-HRRYOWTH.js";import{a,b}from"../../../chunk-TOMIFZ5B.js";import"../../../chunk-TSPFGVSD.js";import"../../../chunk-XJ2PZYE7.js";export{a as NextJsSSGThemeSwitcher,a as NextJsServerTarget,b as ServerSideWrapper};
import{a,b}from"../../../chunk-5FU2GOKJ.js";import"../../../chunk-3VDLVKFR.js";import"../../../chunk-DV73ZV6G.js";export{a as NextJsSSGThemeSwitcher,a as NextJsServerTarget,b as ServerSideWrapper};

@@ -1,1 +0,1 @@

import{a,b}from"../../../chunk-TOMIFZ5B.js";import"../../../chunk-TSPFGVSD.js";import"../../../chunk-XJ2PZYE7.js";export{a as NextJsSSGThemeSwitcher,a as NextJsServerTarget,b as ServerSideWrapper};
import{a,b}from"../../../chunk-5FU2GOKJ.js";import"../../../chunk-3VDLVKFR.js";import"../../../chunk-DV73ZV6G.js";export{a as NextJsSSGThemeSwitcher,a as NextJsServerTarget,b as ServerSideWrapper};

@@ -1,1 +0,1 @@

import{a,b,c,d,e}from"./chunk-TSPFGVSD.js";import"./chunk-XJ2PZYE7.js";export{d as encodeState,c as getResolvedColorScheme,b as getResolvedTheme,e as parseState,a as resolveTheme};
import{a,b,c}from"./chunk-3VDLVKFR.js";import"./chunk-DV73ZV6G.js";export{b as MEDIA,a as resolveTheme,c as useStore};

@@ -1,1 +0,1 @@

"use strict";var p=Object.create;var T=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},d=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of y(r))!v.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=C(r,m))||h.enumerable});return e};var x=(e,r,o)=>(o=e!=null?p(k(e)):{},d(r||!e||!e.__esModule?T(o,"default",{value:e,enumerable:!0}):o,e)),F=e=>d(T({},"__esModule",{value:!0}),e);var E={};P(E,{useTheme:()=>b});module.exports=F(E);var s=x(require("r18gs"));var S="nth",f={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function g(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",i=(e==null?void 0:e.systemColorScheme)==="dark",t=i?"dark":"light",c=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":c=(i?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,t]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,t]=[(e==null?void 0:e.lightTheme)||"","light"];break}let u=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:c,resolvedColorScheme:t,resolvedColorSchemePref:m,th:u}}var l=require("react"),D=200,n={};function A(e){return r=>{if(n[r]===void 0)return n[r]=1,o=>setTimeout(()=>e(h=>({...h,[r]:o})),D);if(n[r]===1){let o=h=>e(m=>({...m,[r]:h}));n[r]=o}return n[r]}}function b(e){let[r,o]=(0,s.default)(e!=null?e:S,f),{resolvedColorScheme:h,resolvedTheme:m}=g(r),i=(0,l.useMemo)(()=>A(o),[]);return{...r,resolvedColorScheme:h,resolvedTheme:m,setTheme:i("theme"),setDarkTheme:i("darkTheme"),setLightTheme:i("lightTheme"),setThemeSet:(0,l.useCallback)(t=>o(c=>({...c,...t})),[]),setColorSchemePref:i("colorSchemePref"),setForcedTheme:i("forcedTheme"),setForcedColorScheme:i("forcedColorScheme")}}0&&(module.exports={useTheme});
"use strict";var x=Object.create;var l=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of P(o))!L.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(m=D(o,h))||m.enumerable});return e};var g=(e,o,r)=>(r=e!=null?x(A(e)):{},y(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>y(l({},"__esModule",{value:!0}),e);var G={};R(G,{useTheme:()=>U});module.exports=E(G);var k=g(require("r18gs"));var t="nth-1",n="light",i="dark",d="system",s={theme:"",darkTheme:i,lightTheme:"",colorSchemePref:d,systemColorScheme:n};var F=g(require("r18gs"));var C=(e,o)=>{var f,p;let r=(f=o==null?void 0:o.forcedTheme)!=null?f:e==null?void 0:e.forcedTheme,m=(p=o==null?void 0:o.forcedColorScheme)!=null?p:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===i,S=c?i:n,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case d:T=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case i:[T,S]=[(e==null?void 0:e.darkTheme)||"",i];break;case n:[T,S]=[(e==null?void 0:e.lightTheme)||"",n];break}let v=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:S,resolvedColorSchemePref:h,th:v}};var u=require("react"),M=e=>o=>r=>e(m=>({...m,[o]:r})),U=e=>{let[o,r]=(0,k.default)(e!=null?e:t,s),{resolvedColorScheme:m,resolvedTheme:h}=C(o),c=(0,u.useMemo)(()=>M(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:S=>r(T=>({...T,...S})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};0&&(module.exports={useTheme});
import { ColorSchemeType } from "../constants";
export declare function useTheme(targetId?: string): {
resolvedColorScheme: "dark" | "light";
/** useTheme hook */
export declare const useTheme: (targetId?: string) => {
resolvedColorScheme: import("../constants").ResolvedColorSchemeType;
resolvedTheme: string;

@@ -19,3 +20,3 @@ setTheme: (arg: string) => void;

colorSchemePref: ColorSchemeType;
systemColorScheme: "dark" | "light";
systemColorScheme: "light" | "dark";
forcedTheme?: string | undefined;

@@ -22,0 +23,0 @@ forcedColorScheme?: ColorSchemeType | undefined;

@@ -1,1 +0,1 @@

"use strict";var p=Object.create;var T=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},d=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of y(r))!v.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=C(r,m))||h.enumerable});return e};var x=(e,r,o)=>(o=e!=null?p(k(e)):{},d(r||!e||!e.__esModule?T(o,"default",{value:e,enumerable:!0}):o,e)),F=e=>d(T({},"__esModule",{value:!0}),e);var E={};P(E,{useTheme:()=>b});module.exports=F(E);var s=x(require("r18gs"));var S="nth",f={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function g(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",i=(e==null?void 0:e.systemColorScheme)==="dark",t=i?"dark":"light",c=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":c=(i?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,t]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,t]=[(e==null?void 0:e.lightTheme)||"","light"];break}let u=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:c,resolvedColorScheme:t,resolvedColorSchemePref:m,th:u}}var l=require("react"),D=200,n={};function A(e){return r=>{if(n[r]===void 0)return n[r]=1,o=>setTimeout(()=>e(h=>({...h,[r]:o})),D);if(n[r]===1){let o=h=>e(m=>({...m,[r]:h}));n[r]=o}return n[r]}}function b(e){let[r,o]=(0,s.default)(e!=null?e:S,f),{resolvedColorScheme:h,resolvedTheme:m}=g(r),i=(0,l.useMemo)(()=>A(o),[]);return{...r,resolvedColorScheme:h,resolvedTheme:m,setTheme:i("theme"),setDarkTheme:i("darkTheme"),setLightTheme:i("lightTheme"),setThemeSet:(0,l.useCallback)(t=>o(c=>({...c,...t})),[]),setColorSchemePref:i("colorSchemePref"),setForcedTheme:i("forcedTheme"),setForcedColorScheme:i("forcedColorScheme")}}0&&(module.exports={useTheme});
"use strict";var x=Object.create;var l=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},y=(e,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of P(o))!L.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(m=D(o,h))||m.enumerable});return e};var g=(e,o,r)=>(r=e!=null?x(A(e)):{},y(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>y(l({},"__esModule",{value:!0}),e);var G={};R(G,{useTheme:()=>U});module.exports=E(G);var k=g(require("r18gs"));var t="nth-1",n="light",i="dark",d="system",s={theme:"",darkTheme:i,lightTheme:"",colorSchemePref:d,systemColorScheme:n};var F=g(require("r18gs"));var C=(e,o)=>{var f,p;let r=(f=o==null?void 0:o.forcedTheme)!=null?f:e==null?void 0:e.forcedTheme,m=(p=o==null?void 0:o.forcedColorScheme)!=null?p:e==null?void 0:e.forcedColorScheme,h=(m!=null?m:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===i,S=c?i:n,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case d:T=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case i:[T,S]=[(e==null?void 0:e.darkTheme)||"",i];break;case n:[T,S]=[(e==null?void 0:e.lightTheme)||"",n];break}let v=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:S,resolvedColorSchemePref:h,th:v}};var u=require("react"),M=e=>o=>r=>e(m=>({...m,[o]:r})),U=e=>{let[o,r]=(0,k.default)(e!=null?e:t,s),{resolvedColorScheme:m,resolvedTheme:h}=C(o),c=(0,u.useMemo)(()=>M(r),[]);return{...o,resolvedColorScheme:m,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:S=>r(T=>({...T,...S})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};0&&(module.exports={useTheme});
"use client";
"use strict";var $=Object.create;var u=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var N=(e,o)=>{for(var t in o)u(e,t,{get:o[t],enumerable:!0})},k=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of R(o))!M.call(e,m)&&m!==t&&u(e,m,{get:()=>o[m],enumerable:!(r=L(o,m))||r.enumerable});return e};var p=(e,o,t)=>(t=e!=null?$(U(e)):{},k(o||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e)),z=e=>k(u({},"__esModule",{value:!0}),e);var B={};N(B,{ColorSwitch:()=>G,DEFAULT_ID:()=>l,ForceColorScheme:()=>I,ForceTheme:()=>W,ThemeSwitcher:()=>Y,initialState:()=>d,useTheme:()=>S,useThemeSwitcher:()=>F});module.exports=z(B);var x=p(require("r18gs"));var l="nth",d={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function f(e,o){let t=(o==null?void 0:o.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:o.forcedTheme,r=(o==null?void 0:o.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:o.forcedColorScheme,m=(r===void 0?e==null?void 0:e.colorSchemePref:r)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",h=c?"dark":"light",i=t===void 0?(e==null?void 0:e.theme)||"":t;if(t===void 0)switch(m){case"system":i=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,h]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,h]=[(e==null?void 0:e.lightTheme)||"","light"];break}let s=t===void 0?(e==null?void 0:e.theme)||"":t;return{resolvedTheme:i,resolvedColorScheme:h,resolvedColorSchemePref:m,th:s}}function v(e){let{colorSchemePref:o,systemColorScheme:t,darkTheme:r,lightTheme:m,theme:c}=e;return[o,t,r,m,c].join(",")}function y(e){if(!e)return d;let[o,t,r,m,c]=e.split(",");return{colorSchemePref:o,systemColorScheme:t,darkTheme:r,lightTheme:m,theme:c}}var a=require("react"),_=200,T={};function j(e){return o=>{if(T[o]===void 0)return T[o]=1,t=>setTimeout(()=>e(r=>({...r,[o]:t})),_);if(T[o]===1){let t=r=>e(m=>({...m,[o]:r}));T[o]=t}return T[o]}}function S(e){let[o,t]=(0,x.default)(e!=null?e:l,d),{resolvedColorScheme:r,resolvedTheme:m}=f(o),c=(0,a.useMemo)(()=>j(t),[]);return{...o,resolvedColorScheme:r,resolvedTheme:m,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:(0,a.useCallback)(h=>t(i=>({...i,...h})),[]),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}}var P=require("react/jsx-runtime");function G({size:e=25,skipSystem:o}){let{colorSchemePref:t,setColorSchemePref:r}=S();return(0,P.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(t){case"":case"system":r("dark");break;case"dark":r("light");break;case"light":r(o?"dark":"system")}},type:"button",style:{"--size":`${e}px`}})}var w=require("react");function I(e){let{setForcedColorScheme:o}=S();return(0,w.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null}var b=require("react");function W(e){let{setForcedTheme:o}=S();return(0,b.useEffect)(()=>(o(e.theme),()=>{o(void 0)}),[e.theme]),null}var C=p(require("react")),E=require("react");var A=p(require("r18gs"));function q(e){C.useEffect(()=>{let o=matchMedia("(prefers-color-scheme: dark)"),t=()=>{e(r=>({...r,systemColorScheme:o.matches?"dark":"light"}))};return t(),o.addEventListener("change",t),()=>{o.removeEventListener("change",t)}},[e])}var D=0;function O(e,o){C.useEffect(()=>{D=Date.now();let t=o!=null?o:l,r=y(localStorage.getItem(t));delete r.systemColorScheme,e(c=>({...c,...r}));let m=c=>{c.key===t&&e(h=>({...h,...y(c.newValue)}))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[o])}var Q=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:t,th:r},m)=>{let{targetSelector:c,styles:h}=m,i=document.querySelector(c||`#${l}`),s=[o,`theme-${e}`,`th-${r}`,`csp-${t}`];return h&&(s=s.map(n=>{var g;return(g=h[n])!=null?g:n})),[i,c&&i?null:document.documentElement].forEach(n=>{n&&(n.className=s.join(" ")),n==null||n.setAttribute("data-th",r),n==null||n.setAttribute("data-theme",e),n==null||n.setAttribute("data-color-scheme",o),n==null||n.setAttribute("data-csp",t)}),(i==null?void 0:i.getAttribute("data-nth"))==="next"},V=(e="none")=>{let o=document.createElement("style"),t=`transition: ${e.split(";")[0]} !important;`;return o.appendChild(document.createTextNode(`*{-webkit-${t}-moz-${t}-o-${t}-ms-${t}${t}}`)),document.head.appendChild(o),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(o)},1)}};function F(e){var r;let[o,t]=(0,A.default)((r=e.targetSelector)!=null?r:l,d);q(t),O(t,e.targetSelector),(0,E.useEffect)(()=>{let m=V(e.themeTransition),c=f(o,e),h=Q(c,e);if(D<Date.now()-300){let i=v(o),s=e.targetSelector||l;localStorage.setItem(s,i),h&&(document.cookie=`${s}=${i}; max-age=31536000; SameSite=Strict;`)}m()},[e,o])}function Y(e){return F(e),null}0&&(module.exports={ColorSwitch,DEFAULT_ID,ForceColorScheme,ForceTheme,ThemeSwitcher,initialState,useTheme,useThemeSwitcher});
"use strict";var F=Object.create;var u=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var N=(e,o)=>{for(var r in o)u(e,r,{get:o[r],enumerable:!0})},x=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of U(o))!G.call(e,h)&&h!==r&&u(e,h,{get:()=>o[h],enumerable:!(t=M(o,h))||t.enumerable});return e};var v=(e,o,r)=>(r=e!=null?F($(e)):{},x(o||!e||!e.__esModule?u(r,"default",{value:e,enumerable:!0}):r,e)),H=e=>x(u({},"__esModule",{value:!0}),e);var q={};N(q,{ColorSwitch:()=>O,DARK:()=>s,DEFAULT_ID:()=>S,ForceColorScheme:()=>_,ForceTheme:()=>J,LIGHT:()=>l,SYSTEM:()=>T,ThemeSwitcher:()=>j,initialState:()=>f,useTheme:()=>d,useThemeSwitcher:()=>L});module.exports=H(q);var A=v(require("r18gs"));var S="nth-1",l="light",s="dark",T="system",f={theme:"",darkTheme:s,lightTheme:"",colorSchemePref:T,systemColorScheme:l};var P=v(require("r18gs"));var C=(e,o)=>{var y,m;let r=(y=o==null?void 0:o.forcedTheme)!=null?y:e==null?void 0:e.forcedTheme,t=(m=o==null?void 0:o.forcedColorScheme)!=null?m:e==null?void 0:e.forcedColorScheme,h=(t!=null?t:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===s,i=c?s:l,n=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case T:n=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case s:[n,i]=[(e==null?void 0:e.darkTheme)||"",s];break;case l:[n,i]=[(e==null?void 0:e.lightTheme)||"",l];break}let p=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:n,resolvedColorScheme:i,resolvedColorSchemePref:h,th:p}},I=typeof localStorage=="undefined",a="(prefers-color-scheme: dark)",D=e=>{let o=e!=null?e:S;return(0,P.default)(o,()=>{let r=I?null:localStorage.getItem(o);return r?{...JSON.parse(r),systemColorScheme:matchMedia(a).matches?s:l}:f})};var b=require("react"),K=e=>o=>r=>e(t=>({...t,[o]:r})),d=e=>{let[o,r]=(0,A.default)(e!=null?e:S,f),{resolvedColorScheme:t,resolvedTheme:h}=C(o),c=(0,b.useMemo)(()=>K(r),[]);return{...o,resolvedColorScheme:t,resolvedTheme:h,setTheme:c("theme"),setDarkTheme:c("darkTheme"),setLightTheme:c("lightTheme"),setThemeSet:i=>r(n=>({...n,...i})),setColorSchemePref:c("colorSchemePref"),setForcedTheme:c("forcedTheme"),setForcedColorScheme:c("forcedColorScheme")}};var E=require("react/jsx-runtime"),O=({size:e=25,skipSystem:o})=>{let{colorSchemePref:r,setColorSchemePref:t}=d();return(0,E.jsx)("button",{className:"nextjs-themes--color-switch",onClick:()=>{switch(r){case"":case T:t(s);break;case s:t(l);break;case l:t(o?s:T)}},type:"button",style:{"--size":`${e}px`}})};var w=require("react");var _=e=>{let{setForcedColorScheme:o}=d();return(0,w.useEffect)(()=>(o(e.colorScheme),()=>{o(void 0)}),[e.colorScheme]),null};var R=require("react");var J=e=>{let{setForcedTheme:o}=d();return(0,R.useEffect)(()=>(o(e.theme),()=>{o(void 0)}),[e.theme]),null};var g=require("react");var Y=({resolvedTheme:e,resolvedColorScheme:o,resolvedColorSchemePref:r,th:t},h)=>{let{targetSelector:c,styles:i}=h,n=document.querySelector(c||`#${S}`),p=[o,`theme-${e}`,`th-${t}`,`csp-${r}`];return i&&(p=p.map(m=>{var k;return(k=i[m])!=null?k:m})),[n,c&&n?null:document.documentElement].forEach(m=>{m&&(m.className=p.join(" ")),m==null||m.setAttribute("data-th",t),m==null||m.setAttribute("data-theme",e),m==null||m.setAttribute("data-color-scheme",o),m==null||m.setAttribute("data-csp",r)}),(n==null?void 0:n.getAttribute("data-nth"))==="next"},z=(e="none")=>{let o=document.createElement("style");return o.textContent=`transition: ${e.split(";")[0]} !important;`,document.head.appendChild(o),()=>{getComputedStyle(document.body),setTimeout(()=>document.head.removeChild(o),1)}},L=e=>{let[o,r]=D(e.targetSelector),t=e.targetSelector||S;(0,g.useEffect)(()=>{let h=matchMedia(a);h.addEventListener("change",()=>r(c=>({...c,systemColorScheme:h.matches?s:l}))),addEventListener("storage",c=>{c.key===t&&r(i=>({...i,...JSON.parse(c.newValue||"{}")}))})},[]),(0,g.useEffect)(()=>{let h=z(e.themeTransition),c=C(o,e),i=Y(c,e),n=JSON.stringify(o);localStorage.setItem(t,n),i&&(document.cookie=`${t}=${n};max-age=31536000;SameSite=Strict;`),h()},[e,o])},j=e=>(L(e),null);0&&(module.exports={ColorSwitch,DARK,DEFAULT_ID,ForceColorScheme,ForceTheme,LIGHT,SYSTEM,ThemeSwitcher,initialState,useTheme,useThemeSwitcher});

@@ -5,3 +5,3 @@ {

"private": false,
"version": "3.1.1",
"version": "3.1.2",
"description": "Unleash the Power of React Server Components! Use multiple themes on your site with confidence, without losing any advantages of React Server Components.",

@@ -21,24 +21,24 @@ "main": "index.js",

"devDependencies": {
"@testing-library/react": "^15.0.2",
"@turbo/gen": "^1.13.2",
"@types/node": "^20.12.7",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.5.0",
"esbuild-plugin-react18": "^0.1.0",
"@testing-library/react": "^16.0.0",
"@turbo/gen": "^2.0.3",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^1.6.0",
"esbuild-plugin-react18": "^0.2.4",
"eslint-config-custom": "workspace:*",
"jsdom": "^24.0.0",
"next": "^14.2.2",
"octokit": "^3.2.0",
"react": "^18.2.0",
"jsdom": "^24.1.0",
"next": "^14.2.4",
"octokit": "^4.0.2",
"react": "^18.3.1",
"tsconfig": "workspace:*",
"tsup": "^8.0.2",
"tsup": "^8.1.0",
"typedoc": "^0.25.13",
"typescript": "5.4.5",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.5.0"
"vitest": "^1.6.0"
},
"dependencies": {
"r18gs": "^0.1.3"
"r18gs": "^1.1.0"
},

@@ -62,2 +62,3 @@ "peerDependencies": {

"nextjs13",
"nextjs14",
"nextjs-themes",

@@ -64,0 +65,0 @@ "nextjs13-themes",

@@ -1,1 +0,1 @@

"use strict";var T=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var w=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},F=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of A(r))!J.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=E(r,m))||h.enumerable});return e};var L=e=>F(T({},"__esModule",{value:!0}),e);var $={};w($,{NextJsSSGThemeSwitcher:()=>U,NextJsServerTarget:()=>U,ServerSideWrapper:()=>b});module.exports=L($);var d=require("next/headers");var s="nth",C={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function a(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",i=t?"dark":"light",c=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":c=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let S=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:c,resolvedColorScheme:i,resolvedColorSchemePref:m,th:S}}function P(e){if(!e)return C;let[r,o,h,m,t]=e.split(",");return{colorSchemePref:r,systemColorScheme:o,darkTheme:h,lightTheme:m,theme:t}}var x=require("react/jsx-runtime");function M(e,r){let o={className:""},h=[];return e.resolvedColorScheme!==void 0&&(o["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(o["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(o["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(o["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),r&&(h=h.map(m=>{var t;return(t=r[m])!=null?t:m})),o.className=h.join(" "),o}function k({children:e,tag:r,forcedPages:o,targetId:h,styles:m,...t},i){var u,y;let c=r||i,S=h?`#${h}`:s,f=(u=(0,d.cookies)().get(S))==null?void 0:u.value,l=(0,d.headers)().get("referer"),n=o==null?void 0:o.find(p=>l==null?void 0:l.match(Array.isArray(p)?p[0]:p.pathMatcher)),v=Array.isArray(n)?{forcedTheme:n[1].theme,forcedColorScheme:n[1].colorScheme}:n==null?void 0:n.props,R=f?P(f):void 0,N=a(R,v),g=M(N,m);return h&&(g.className+=(y=m==null?void 0:m[" nth-scoped"])!=null?y:" nth-scoped"),(0,x.jsx)(c,{id:h||s,...g,...t,"data-nth":"next",children:e})}function U(e){return k(e,"div")}function b(e){return k(e,"html")}0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});
"use strict";var J=Object.create;var T=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var F=(e,o)=>{for(var r in o)T(e,r,{get:o[r],enumerable:!0})},k=(e,o,r,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of L(o))!U.call(e,m)&&m!==r&&T(e,m,{get:()=>o[m],enumerable:!(h=M(o,m))||h.enumerable});return e};var H=(e,o,r)=>(r=e!=null?J(w(e)):{},k(o||!e||!e.__esModule?T(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>k(T({},"__esModule",{value:!0}),e);var W={};F(W,{NextJsSSGThemeSwitcher:()=>$,NextJsServerTarget:()=>$,ServerSideWrapper:()=>b});module.exports=D(W);var f=require("next/headers");var l="nth-1",d="light",s="dark",u="system";var G=H(require("r18gs"));var v=(e,o)=>{var p,n;let r=(p=o==null?void 0:o.forcedTheme)!=null?p:e==null?void 0:e.forcedTheme,h=(n=o==null?void 0:o.forcedColorScheme)!=null?n:e==null?void 0:e.forcedColorScheme,m=(h!=null?h:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===s,S=c?s:d,t=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(m){case u:t=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case s:[t,S]=[(e==null?void 0:e.darkTheme)||"",s];break;case d:[t,S]=[(e==null?void 0:e.lightTheme)||"",d];break}let y=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:t,resolvedColorScheme:S,resolvedColorSchemePref:m,th:y}};var R=require("react/jsx-runtime"),I=(e,o)=>{let r={className:""},h=[];return e.resolvedColorScheme!==void 0&&(r["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(r["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(r["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(r["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),o&&(h=h.map(m=>{var c;return(c=o[m])!=null?c:m})),r.className=h.join(" "),r},a=({children:e,tag:o,forcedPages:r,targetId:h,styles:m,...c},S)=>{var x,P;let t=o||S,y=h?`#${h}`:l,p=(x=(0,f.cookies)().get(y))==null?void 0:x.value,n=(0,f.headers)().get("referer"),i=r==null?void 0:r.find(g=>n==null?void 0:n.match(Array.isArray(g)?g[0]:g.pathMatcher)),N=Array.isArray(i)?{forcedTheme:i[1].theme,forcedColorScheme:i[1].colorScheme}:i==null?void 0:i.props,E=p?JSON.parse(p):void 0,A=v(E,N),C=I(A,m);return h&&(C.className+=(P=m==null?void 0:m[" nth-scoped"])!=null?P:" nth-scoped"),(0,R.jsx)(t,{id:h||l,...C,...c,"data-nth":"next",children:e})},$=e=>a(e,"div");var b=e=>a(e,"html");0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});

@@ -1,1 +0,1 @@

"use strict";var T=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var w=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},F=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of A(r))!J.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=E(r,m))||h.enumerable});return e};var L=e=>F(T({},"__esModule",{value:!0}),e);var $={};w($,{NextJsSSGThemeSwitcher:()=>U,NextJsServerTarget:()=>U,ServerSideWrapper:()=>b});module.exports=L($);var d=require("next/headers");var s="nth",C={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function a(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",i=t?"dark":"light",c=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":c=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let S=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:c,resolvedColorScheme:i,resolvedColorSchemePref:m,th:S}}function P(e){if(!e)return C;let[r,o,h,m,t]=e.split(",");return{colorSchemePref:r,systemColorScheme:o,darkTheme:h,lightTheme:m,theme:t}}var x=require("react/jsx-runtime");function M(e,r){let o={className:""},h=[];return e.resolvedColorScheme!==void 0&&(o["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(o["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(o["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(o["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),r&&(h=h.map(m=>{var t;return(t=r[m])!=null?t:m})),o.className=h.join(" "),o}function k({children:e,tag:r,forcedPages:o,targetId:h,styles:m,...t},i){var u,y;let c=r||i,S=h?`#${h}`:s,f=(u=(0,d.cookies)().get(S))==null?void 0:u.value,l=(0,d.headers)().get("referer"),n=o==null?void 0:o.find(p=>l==null?void 0:l.match(Array.isArray(p)?p[0]:p.pathMatcher)),v=Array.isArray(n)?{forcedTheme:n[1].theme,forcedColorScheme:n[1].colorScheme}:n==null?void 0:n.props,R=f?P(f):void 0,N=a(R,v),g=M(N,m);return h&&(g.className+=(y=m==null?void 0:m[" nth-scoped"])!=null?y:" nth-scoped"),(0,x.jsx)(c,{id:h||s,...g,...t,"data-nth":"next",children:e})}function U(e){return k(e,"div")}function b(e){return k(e,"html")}0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});
"use strict";var J=Object.create;var T=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var F=(e,o)=>{for(var r in o)T(e,r,{get:o[r],enumerable:!0})},k=(e,o,r,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of L(o))!U.call(e,m)&&m!==r&&T(e,m,{get:()=>o[m],enumerable:!(h=M(o,m))||h.enumerable});return e};var H=(e,o,r)=>(r=e!=null?J(w(e)):{},k(o||!e||!e.__esModule?T(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>k(T({},"__esModule",{value:!0}),e);var W={};F(W,{NextJsSSGThemeSwitcher:()=>$,NextJsServerTarget:()=>$,ServerSideWrapper:()=>b});module.exports=D(W);var f=require("next/headers");var l="nth-1",d="light",s="dark",u="system";var G=H(require("r18gs"));var v=(e,o)=>{var p,n;let r=(p=o==null?void 0:o.forcedTheme)!=null?p:e==null?void 0:e.forcedTheme,h=(n=o==null?void 0:o.forcedColorScheme)!=null?n:e==null?void 0:e.forcedColorScheme,m=(h!=null?h:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===s,S=c?s:d,t=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(m){case u:t=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case s:[t,S]=[(e==null?void 0:e.darkTheme)||"",s];break;case d:[t,S]=[(e==null?void 0:e.lightTheme)||"",d];break}let y=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:t,resolvedColorScheme:S,resolvedColorSchemePref:m,th:y}};var R=require("react/jsx-runtime"),I=(e,o)=>{let r={className:""},h=[];return e.resolvedColorScheme!==void 0&&(r["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(r["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(r["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(r["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),o&&(h=h.map(m=>{var c;return(c=o[m])!=null?c:m})),r.className=h.join(" "),r},a=({children:e,tag:o,forcedPages:r,targetId:h,styles:m,...c},S)=>{var x,P;let t=o||S,y=h?`#${h}`:l,p=(x=(0,f.cookies)().get(y))==null?void 0:x.value,n=(0,f.headers)().get("referer"),i=r==null?void 0:r.find(g=>n==null?void 0:n.match(Array.isArray(g)?g[0]:g.pathMatcher)),N=Array.isArray(i)?{forcedTheme:i[1].theme,forcedColorScheme:i[1].colorScheme}:i==null?void 0:i.props,E=p?JSON.parse(p):void 0,A=v(E,N),C=I(A,m);return h&&(C.className+=(P=m==null?void 0:m[" nth-scoped"])!=null?P:" nth-scoped"),(0,R.jsx)(t,{id:h||l,...C,...c,"data-nth":"next",children:e})},$=e=>a(e,"div");var b=e=>a(e,"html");0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});

@@ -1,1 +0,1 @@

"use strict";var T=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var w=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},F=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of A(r))!J.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=E(r,m))||h.enumerable});return e};var L=e=>F(T({},"__esModule",{value:!0}),e);var $={};w($,{NextJsSSGThemeSwitcher:()=>U,NextJsServerTarget:()=>U,ServerSideWrapper:()=>b});module.exports=L($);var d=require("next/headers");var s="nth",C={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function a(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",i=t?"dark":"light",c=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":c=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let S=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:c,resolvedColorScheme:i,resolvedColorSchemePref:m,th:S}}function P(e){if(!e)return C;let[r,o,h,m,t]=e.split(",");return{colorSchemePref:r,systemColorScheme:o,darkTheme:h,lightTheme:m,theme:t}}var x=require("react/jsx-runtime");function M(e,r){let o={className:""},h=[];return e.resolvedColorScheme!==void 0&&(o["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(o["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(o["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(o["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),r&&(h=h.map(m=>{var t;return(t=r[m])!=null?t:m})),o.className=h.join(" "),o}function k({children:e,tag:r,forcedPages:o,targetId:h,styles:m,...t},i){var u,y;let c=r||i,S=h?`#${h}`:s,f=(u=(0,d.cookies)().get(S))==null?void 0:u.value,l=(0,d.headers)().get("referer"),n=o==null?void 0:o.find(p=>l==null?void 0:l.match(Array.isArray(p)?p[0]:p.pathMatcher)),v=Array.isArray(n)?{forcedTheme:n[1].theme,forcedColorScheme:n[1].colorScheme}:n==null?void 0:n.props,R=f?P(f):void 0,N=a(R,v),g=M(N,m);return h&&(g.className+=(y=m==null?void 0:m[" nth-scoped"])!=null?y:" nth-scoped"),(0,x.jsx)(c,{id:h||s,...g,...t,"data-nth":"next",children:e})}function U(e){return k(e,"div")}function b(e){return k(e,"html")}0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});
"use strict";var J=Object.create;var T=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var F=(e,o)=>{for(var r in o)T(e,r,{get:o[r],enumerable:!0})},k=(e,o,r,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of L(o))!U.call(e,m)&&m!==r&&T(e,m,{get:()=>o[m],enumerable:!(h=M(o,m))||h.enumerable});return e};var H=(e,o,r)=>(r=e!=null?J(w(e)):{},k(o||!e||!e.__esModule?T(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>k(T({},"__esModule",{value:!0}),e);var W={};F(W,{NextJsSSGThemeSwitcher:()=>$,NextJsServerTarget:()=>$,ServerSideWrapper:()=>b});module.exports=D(W);var f=require("next/headers");var l="nth-1",d="light",s="dark",u="system";var G=H(require("r18gs"));var v=(e,o)=>{var p,n;let r=(p=o==null?void 0:o.forcedTheme)!=null?p:e==null?void 0:e.forcedTheme,h=(n=o==null?void 0:o.forcedColorScheme)!=null?n:e==null?void 0:e.forcedColorScheme,m=(h!=null?h:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===s,S=c?s:d,t=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(m){case u:t=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case s:[t,S]=[(e==null?void 0:e.darkTheme)||"",s];break;case d:[t,S]=[(e==null?void 0:e.lightTheme)||"",d];break}let y=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:t,resolvedColorScheme:S,resolvedColorSchemePref:m,th:y}};var R=require("react/jsx-runtime"),I=(e,o)=>{let r={className:""},h=[];return e.resolvedColorScheme!==void 0&&(r["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(r["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(r["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(r["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),o&&(h=h.map(m=>{var c;return(c=o[m])!=null?c:m})),r.className=h.join(" "),r},a=({children:e,tag:o,forcedPages:r,targetId:h,styles:m,...c},S)=>{var x,P;let t=o||S,y=h?`#${h}`:l,p=(x=(0,f.cookies)().get(y))==null?void 0:x.value,n=(0,f.headers)().get("referer"),i=r==null?void 0:r.find(g=>n==null?void 0:n.match(Array.isArray(g)?g[0]:g.pathMatcher)),N=Array.isArray(i)?{forcedTheme:i[1].theme,forcedColorScheme:i[1].colorScheme}:i==null?void 0:i.props,E=p?JSON.parse(p):void 0,A=v(E,N),C=I(A,m);return h&&(C.className+=(P=m==null?void 0:m[" nth-scoped"])!=null?P:" nth-scoped"),(0,R.jsx)(t,{id:h||l,...C,...c,"data-nth":"next",children:e})},$=e=>a(e,"div");var b=e=>a(e,"html");0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});

@@ -29,3 +29,3 @@ import type { HTMLProps, ReactNode } from "react";

*/
export declare function NextJsSSGThemeSwitcher(props: NextJsSSRThemeSwitcherProps): import("react/jsx-runtime").JSX.Element;
export declare const NextJsSSGThemeSwitcher: (props: NextJsSSRThemeSwitcherProps) => import("react/jsx-runtime").JSX.Element;
/** For naming consistancy, clarity, and minimizing API updates */

@@ -49,3 +49,3 @@ export { NextJsSSGThemeSwitcher as NextJsServerTarget };

*/
export declare function ServerSideWrapper(props: ServerSideWrapperProps): import("react/jsx-runtime").JSX.Element;
export declare const ServerSideWrapper: (props: ServerSideWrapperProps) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=server-side-wrapper.d.ts.map

@@ -1,1 +0,1 @@

"use strict";var T=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var w=(e,r)=>{for(var o in r)T(e,o,{get:r[o],enumerable:!0})},F=(e,r,o,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of A(r))!J.call(e,m)&&m!==o&&T(e,m,{get:()=>r[m],enumerable:!(h=E(r,m))||h.enumerable});return e};var L=e=>F(T({},"__esModule",{value:!0}),e);var $={};w($,{NextJsSSGThemeSwitcher:()=>U,NextJsServerTarget:()=>U,ServerSideWrapper:()=>b});module.exports=L($);var d=require("next/headers");var s="nth",C={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function a(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,h=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,m=(h===void 0?e==null?void 0:e.colorSchemePref:h)||"",t=(e==null?void 0:e.systemColorScheme)==="dark",i=t?"dark":"light",c=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(m){case"system":c=(t?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[c,i]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[c,i]=[(e==null?void 0:e.lightTheme)||"","light"];break}let S=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:c,resolvedColorScheme:i,resolvedColorSchemePref:m,th:S}}function P(e){if(!e)return C;let[r,o,h,m,t]=e.split(",");return{colorSchemePref:r,systemColorScheme:o,darkTheme:h,lightTheme:m,theme:t}}var x=require("react/jsx-runtime");function M(e,r){let o={className:""},h=[];return e.resolvedColorScheme!==void 0&&(o["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(o["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(o["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(o["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),r&&(h=h.map(m=>{var t;return(t=r[m])!=null?t:m})),o.className=h.join(" "),o}function k({children:e,tag:r,forcedPages:o,targetId:h,styles:m,...t},i){var u,y;let c=r||i,S=h?`#${h}`:s,f=(u=(0,d.cookies)().get(S))==null?void 0:u.value,l=(0,d.headers)().get("referer"),n=o==null?void 0:o.find(p=>l==null?void 0:l.match(Array.isArray(p)?p[0]:p.pathMatcher)),v=Array.isArray(n)?{forcedTheme:n[1].theme,forcedColorScheme:n[1].colorScheme}:n==null?void 0:n.props,R=f?P(f):void 0,N=a(R,v),g=M(N,m);return h&&(g.className+=(y=m==null?void 0:m[" nth-scoped"])!=null?y:" nth-scoped"),(0,x.jsx)(c,{id:h||s,...g,...t,"data-nth":"next",children:e})}function U(e){return k(e,"div")}function b(e){return k(e,"html")}0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});
"use strict";var J=Object.create;var T=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var F=(e,o)=>{for(var r in o)T(e,r,{get:o[r],enumerable:!0})},k=(e,o,r,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of L(o))!U.call(e,m)&&m!==r&&T(e,m,{get:()=>o[m],enumerable:!(h=M(o,m))||h.enumerable});return e};var H=(e,o,r)=>(r=e!=null?J(w(e)):{},k(o||!e||!e.__esModule?T(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>k(T({},"__esModule",{value:!0}),e);var W={};F(W,{NextJsSSGThemeSwitcher:()=>$,NextJsServerTarget:()=>$,ServerSideWrapper:()=>b});module.exports=D(W);var f=require("next/headers");var l="nth-1",d="light",s="dark",u="system";var G=H(require("r18gs"));var v=(e,o)=>{var p,n;let r=(p=o==null?void 0:o.forcedTheme)!=null?p:e==null?void 0:e.forcedTheme,h=(n=o==null?void 0:o.forcedColorScheme)!=null?n:e==null?void 0:e.forcedColorScheme,m=(h!=null?h:e==null?void 0:e.colorSchemePref)||"",c=(e==null?void 0:e.systemColorScheme)===s,S=c?s:d,t=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(m){case u:t=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case s:[t,S]=[(e==null?void 0:e.darkTheme)||"",s];break;case d:[t,S]=[(e==null?void 0:e.lightTheme)||"",d];break}let y=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:t,resolvedColorScheme:S,resolvedColorSchemePref:m,th:y}};var R=require("react/jsx-runtime"),I=(e,o)=>{let r={className:""},h=[];return e.resolvedColorScheme!==void 0&&(r["data-color-scheme"]=e.resolvedColorScheme,h.push(e.resolvedColorScheme)),e.resolvedTheme!==void 0&&(r["data-theme"]=e.resolvedTheme,h.push(`theme-${e.resolvedTheme}`)),e.th&&(r["data-th"]=e.th,h.push(`th-${e.th}`)),e.resolvedColorSchemePref!==void 0&&(r["data-csp"]=e.resolvedColorSchemePref,h.push(`csp-${e.resolvedColorSchemePref}`)),o&&(h=h.map(m=>{var c;return(c=o[m])!=null?c:m})),r.className=h.join(" "),r},a=({children:e,tag:o,forcedPages:r,targetId:h,styles:m,...c},S)=>{var x,P;let t=o||S,y=h?`#${h}`:l,p=(x=(0,f.cookies)().get(y))==null?void 0:x.value,n=(0,f.headers)().get("referer"),i=r==null?void 0:r.find(g=>n==null?void 0:n.match(Array.isArray(g)?g[0]:g.pathMatcher)),N=Array.isArray(i)?{forcedTheme:i[1].theme,forcedColorScheme:i[1].colorScheme}:i==null?void 0:i.props,E=p?JSON.parse(p):void 0,A=v(E,N),C=I(A,m);return h&&(C.className+=(P=m==null?void 0:m[" nth-scoped"])!=null?P:" nth-scoped"),(0,R.jsx)(t,{id:h||l,...C,...c,"data-nth":"next",children:e})},$=e=>a(e,"div");var b=e=>a(e,"html");0&&(module.exports={NextJsSSGThemeSwitcher,NextJsServerTarget,ServerSideWrapper});
import { ThemeSwitcherProps, UpdateProps } from "./client";
import { ThemeStoreType } from "./constants";
export declare function resolveTheme(state?: ThemeStoreType, props?: ThemeSwitcherProps): UpdateProps;
export declare function getResolvedTheme(): string | null;
export declare function getResolvedColorScheme(): string | null;
export declare function encodeState(themeState: ThemeStoreType): string;
export declare function parseState(str?: string | null): ThemeStoreType;
/** resolve props and state to a final attributes that should be applied to the DOM */
export declare const resolveTheme: (state?: ThemeStoreType, props?: ThemeSwitcherProps) => UpdateProps;
export declare const MEDIA = "(prefers-color-scheme: dark)";
/** internal store API */
export declare const useStore: (targetId?: string) => [ThemeStoreType, import("r18gs").SetStateAction<ThemeStoreType>];
//# sourceMappingURL=utils.d.ts.map

@@ -1,1 +0,1 @@

"use strict";var l=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},y=(e,r,o,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let h of t(r))!g.call(e,h)&&h!==o&&l(e,h,{get:()=>r[h],enumerable:!(m=S(r,h))||m.enumerable});return e};var u=e=>y(l({},"__esModule",{value:!0}),e);var x={};f(x,{encodeState:()=>v,getResolvedColorScheme:()=>p,getResolvedTheme:()=>k,parseState:()=>P,resolveTheme:()=>C});module.exports=u(x);var n={theme:"",darkTheme:"dark",lightTheme:"",colorSchemePref:"system",systemColorScheme:"light"};function C(e,r){let o=(r==null?void 0:r.forcedTheme)===void 0?e==null?void 0:e.forcedTheme:r.forcedTheme,m=(r==null?void 0:r.forcedColorScheme)===void 0?e==null?void 0:e.forcedColorScheme:r.forcedColorScheme,h=(m===void 0?e==null?void 0:e.colorSchemePref:m)||"",c=(e==null?void 0:e.systemColorScheme)==="dark",d=c?"dark":"light",i=o===void 0?(e==null?void 0:e.theme)||"":o;if(o===void 0)switch(h){case"system":i=(c?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case"dark":[i,d]=[(e==null?void 0:e.darkTheme)||"","dark"];break;case"light":[i,d]=[(e==null?void 0:e.lightTheme)||"","light"];break}let T=o===void 0?(e==null?void 0:e.theme)||"":o;return{resolvedTheme:i,resolvedColorScheme:d,resolvedColorSchemePref:h,th:T}}function k(){return document.documentElement.getAttribute("data-theme")}function p(){return document.documentElement.getAttribute("data-color-scheme")}function v(e){let{colorSchemePref:r,systemColorScheme:o,darkTheme:m,lightTheme:h,theme:c}=e;return[r,o,m,h,c].join(",")}function P(e){if(!e)return n;let[r,o,m,h,c]=e.split(",");return{colorSchemePref:r,systemColorScheme:o,darkTheme:m,lightTheme:h,theme:c}}0&&(module.exports={encodeState,getResolvedColorScheme,getResolvedTheme,parseState,resolveTheme});
"use strict";var x=Object.create;var l=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,t=Object.prototype.hasOwnProperty;var A=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},p=(e,o,r,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let h of u(o))!t.call(e,h)&&h!==r&&l(e,h,{get:()=>o[h],enumerable:!(c=P(o,h))||c.enumerable});return e};var R=(e,o,r)=>(r=e!=null?x(D(e)):{},p(o||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>p(l({},"__esModule",{value:!0}),e);var b={};A(b,{MEDIA:()=>v,resolveTheme:()=>L,useStore:()=>U});module.exports=E(b);var k=R(require("r18gs"));var g="nth-1",i="light",m="dark",n="system",C={theme:"",darkTheme:m,lightTheme:"",colorSchemePref:n,systemColorScheme:i};var L=(e,o)=>{var y,f;let r=(y=o==null?void 0:o.forcedTheme)!=null?y:e==null?void 0:e.forcedTheme,c=(f=o==null?void 0:o.forcedColorScheme)!=null?f:e==null?void 0:e.forcedColorScheme,h=(c!=null?c:e==null?void 0:e.colorSchemePref)||"",d=(e==null?void 0:e.systemColorScheme)===m,S=d?m:i,T=(r!=null?r:e==null?void 0:e.theme)||"";if(r===void 0)switch(h){case n:T=(d?e==null?void 0:e.darkTheme:e==null?void 0:e.lightTheme)||"";break;case m:[T,S]=[(e==null?void 0:e.darkTheme)||"",m];break;case i:[T,S]=[(e==null?void 0:e.lightTheme)||"",i];break}let s=r===void 0?(e==null?void 0:e.theme)||"":r;return{resolvedTheme:T,resolvedColorScheme:S,resolvedColorSchemePref:h,th:s}},M=typeof localStorage=="undefined",v="(prefers-color-scheme: dark)",U=e=>{let o=e!=null?e:g;return(0,k.default)(o,()=>{let r=M?null:localStorage.getItem(o);return r?{...JSON.parse(r),systemColorScheme:matchMedia(v).matches?m:i}:C})};0&&(module.exports={MEDIA,resolveTheme,useStore});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc