@bluepic/embed 0.4.0-next.115 → 0.4.0-next.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bluepic-embed.iife.js +59 -59
- package/dist/bluepic-embed.umd.js +78 -78
- package/dist/embed/embed.d.ts +26 -0
- package/dist/main.cjs +54 -54
- package/dist/main.mjs +6408 -6373
- package/dist/style.css +1 -1
- package/dist/theme/tokens.d.ts +5 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +69 -66
- package/package.json +1 -1
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -68,6 +68,11 @@ export type ThemeInput = {
|
|
|
68
68
|
* applied LAST. Prefer `overrides`.
|
|
69
69
|
*/
|
|
70
70
|
customStyle?: Record<string, string>;
|
|
71
|
+
/**
|
|
72
|
+
* Link to a user-saved preset (Studio `ThemePreset.id`) this theme was saved as / loaded from.
|
|
73
|
+
* Informational only — the resolver ignores it.
|
|
74
|
+
*/
|
|
75
|
+
presetId?: string;
|
|
71
76
|
};
|
|
72
77
|
/**
|
|
73
78
|
* Semantic token names (without the `--bx-` prefix). Grouped by role. Every one of these is
|
package/dist/theme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=["color-scheme","surface","surface-rgb","surface-1","surface-1-rgb","surface-2","surface-2-rgb","surface-3","surface-inverse","scrim","ink","ink-rgb","text","text-muted","text-faint","text-inverse","text-on-surface-rgb","text-on-inverse-rgb","border","border-strong","divider","border-rgb","fill","fill-hover","fill-active","field","field-hover","field-focus","hover","pressed","primary","primary-rgb","primary-hover","primary-active","on-primary","primary-text","primary-border","primary-soft","primary-soft-hover","focus-ring","focus-ring-width","focus-ring-offset","primary-dark","primary-dark-rgb","primary-light","primary-light-rgb","primary-bright","primary-bright-rgb","success","success-rgb","on-success","success-text","success-soft","success-border","success-dark-rgb","success-light-rgb","success-darker-rgb","warning","warning-rgb","on-warning","warning-text","warning-soft","warning-border","warning-dark-rgb","warning-light-rgb","warning-darker-rgb","error","error-rgb","on-error","error-text","error-soft","error-border","error-dark-rgb","error-light-rgb","error-darker-rgb","info","info-rgb","on-info","info-text","info-soft","info-border","info-dark-rgb","info-light-rgb","info-bright-rgb","shadow-1","shadow-2","shadow-3","radius-sm","radius-md","radius-lg","radius-full","font-family","font-family-heading","font-size","root-font-size","canvas","canvas-image","canvas-control","canvas-control-hover","on-canvas-control","disabled-opacity"],X="--bx-",so=[{label:"Surfaces",tokens:["surface","surface-1","surface-2","surface-3","surface-inverse","scrim"]},{label:"Text",tokens:["text","text-muted","text-faint","text-inverse"]},{label:"Borders",tokens:["border","border-strong","divider"]},{label:"Neutral fills",tokens:["fill","fill-hover","fill-active","field","field-hover","field-focus","hover","pressed"]},{label:"Primary",tokens:["primary","primary-hover","primary-active","on-primary","primary-text","primary-border","primary-soft","primary-soft-hover","focus-ring"]},{label:"Success",tokens:["success","on-success","success-text","success-soft","success-border"]},{label:"Warning",tokens:["warning","on-warning","warning-text","warning-soft","warning-border"]},{label:"Error",tokens:["error","on-error","error-text","error-soft","error-border"]},{label:"Info",tokens:["info","on-info","info-text","info-soft","info-border"]},{label:"Shape & type",tokens:["radius-sm","radius-md","radius-lg","radius-full","font-family","font-family-heading","font-size"]},{label:"Canvas",tokens:["canvas","canvas-control","on-canvas-control"]}],Or={dark:{surface:"#27262e",primary:"#4472c7"},light:{surface:"#f2f2f2",primary:"#124bba"}},io=[{key:"light",label:"Light",description:"Neutral light surfaces, Bluepic blue.",input:{version:2,preset:"light"}},{key:"dark",label:"Dark",description:"Neutral dark surfaces, Bluepic blue.",input:{version:2,preset:"dark"}},{key:"midnight",label:"Midnight",description:"Near-black with cool, slightly tinted surfaces.",input:{version:2,surface:"#0f1117",primary:"#7da8f7",tint:.35}},{key:"paper",label:"Paper",description:"Warm off-white, ink-black actions, crisp corners.",input:{version:2,surface:"#fbf8f1",primary:"#1f1f1f",radius:"sm"}},{key:"slate",label:"Slate",description:"Blue-grey dark surfaces with a teal accent.",input:{version:2,surface:"#1e2530",primary:"#4fd1c5",tint:.4}},{key:"sand",label:"Sand",description:"Soft sand surfaces with a terracotta accent, rounded.",input:{version:2,surface:"#f3ede3",primary:"#b5562c",radius:"lg"}},{key:"forest",label:"Forest",description:"Deep green surfaces with a mint accent.",input:{version:2,surface:"#0e1f17",primary:"#7ad39a",tint:.5}},{key:"ocean",label:"Ocean",description:"Cool light surfaces with a deep blue accent, pill shapes.",input:{version:2,surface:"#eef4fb",primary:"#0b5cad",tint:.3,radius:"full"}}],Br={success:"#28a552",warning:"#d9a400",error:"#dc2f2f",info:"#3b82f6"},I=Object.freeze({r:255,g:255,b:255,a:1}),Z=Object.freeze({r:0,g:0,b:0,a:1}),Pr=[I,Object.freeze({r:17,g:17,b:17,a:1})],dr=(o,e,t)=>o<e?e:o>t?t:o,w=o=>dr(o,0,1),m=(o,e=0)=>Number.isFinite(o)?o:e,k=(o,e,t,a=1)=>({r:o,g:e,b:t,a}),O=o=>Math.round(dr(m(o),0,255)),ir=o=>O(o).toString(16).padStart(2,"0"),lo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Fr=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/,uo=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(deg|turn|rad|grad)?$/,bo=/^(rgba?|hsla?)\(\s*(.*?)\s*\)$/;function mr(o){if(o==="none")return{value:0,percent:!1};const e=o.endsWith("%"),t=e?o.slice(0,-1):o;if(!Fr.test(t))return null;const a=Number(t);return Number.isFinite(a)?{value:a,percent:e}:null}function gr(o){const e=mr(o);return e?dr(e.percent?e.value*255/100:e.value,0,255):null}function go(o){const e=mr(o);return e?w(e.percent?e.value/100:e.value):null}function Dr(o){const e=mr(o);return e?w(e.value/100):null}function fo(o){if(o==="none")return 0;const e=uo.exec(o);if(!e)return null;let t=Number(e[1]);if(!Number.isFinite(t))return null;switch(e[2]){case"turn":t*=360;break;case"rad":t*=180/Math.PI;break;case"grad":t*=.9;break}return t%=360,t<0&&(t+=360),t}function po(o){if(o.includes(",")){if(o.includes("/"))return null;const n=o.split(",").map(c=>c.trim());return n.length!==3&&n.length!==4||n.some(c=>c===""||/\s/.test(c))?null:{ch:[n[0],n[1],n[2]],alpha:n[3]}}const e=o.split("/");if(e.length>2)return null;const t=e[0].trim().split(/\s+/);if(t.length!==3)return null;let a;return e.length===2&&(a=e[1].trim(),a===""||/\s/.test(a))?null:{ch:[t[0],t[1],t[2]],alpha:a}}function ho(o,e,t){const a=n=>{const c=(n+o/30)%12,s=e*Math.min(t,1-t);return t-s*Math.max(-1,Math.min(c-3,9-c,1))};return[a(0)*255,a(8)*255,a(4)*255]}function H(o){if(typeof o!="string")return null;const e=o.trim().toLowerCase();if(!e)return null;if(e==="transparent")return k(0,0,0,0);const t=lo[e];if(t!==void 0)return k(t>>16,t>>8&255,t&255,1);if(e[0]==="#"){const n=e.slice(1);if(!/^[0-9a-f]+$/.test(n))return null;const c=i=>parseInt(n[i],16),s=i=>parseInt(n.slice(i,i+2),16);switch(n.length){case 3:return k(c(0)*17,c(1)*17,c(2)*17,1);case 4:return k(c(0)*17,c(1)*17,c(2)*17,c(3)*17/255);case 6:return k(s(0),s(2),s(4),1);case 8:return k(s(0),s(2),s(4),s(6)/255);default:return null}}const a=bo.exec(e);if(a){const n=po(a[2]);if(!n)return null;const c=n.alpha===void 0?1:go(n.alpha);if(c===null)return null;if(a[1]==="rgb"||a[1]==="rgba"){const v=gr(n.ch[0]),D=gr(n.ch[1]),p=gr(n.ch[2]);return v===null||D===null||p===null?null:k(v,D,p,c)}const s=fo(n.ch[0]),i=Dr(n.ch[1]),d=Dr(n.ch[2]);if(s===null||i===null||d===null)return null;const[b,N,g]=ho(s,i,d);return k(b,N,g,c)}if(e.includes(",")){const n=e.split(",").map(d=>d.trim());if(n.length!==3||!n.every(d=>Fr.test(d)))return null;const[c,s,i]=n.map(d=>dr(Number(d),0,255));return k(c,s,i,1)}return null}function q(o){const e=w(o);return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fr(o){const e=w(o);return e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055}function mo(o,e,t){const a=.4122214708*o+.5363325363*e+.0514459929*t,n=.2119034982*o+.6806995451*e+.1073969566*t,c=.0883024619*o+.2817188376*e+.6299787005*t,s=Math.cbrt(a),i=Math.cbrt(n),d=Math.cbrt(c);return{L:.2104542553*s+.793617785*i-.0040720468*d,a:1.9779984951*s-2.428592205*i+.4505937099*d,b:.0259040371*s+.7827717662*i-.808675766*d}}function pr(o,e,t){const a=o+.3963377774*e+.2158037573*t,n=o-.1055613458*e-.0638541728*t,c=o-.0894841775*e-1.291485548*t,s=a*a*a,i=n*n*n,d=c*c*c;return[4.0767416621*s-3.3077115913*i+.2309699292*d,-1.2684380046*s+2.6097574011*i-.3413193965*d,-.0041960863*s-.7034186147*i+1.707614701*d]}function lr(o){return mo(q(o.r/255),q(o.g/255),q(o.b/255))}const vo=1e-6;function Gr(o){const e=Math.hypot(o.a,o.b);let t=e<vo?0:Math.atan2(o.b,o.a)*180/Math.PI;return t<0&&(t+=360),t>=360&&(t-=360),{l:o.L,c:e,h:t}}function hr(o,e,t){const a=t*Math.PI/180;return{L:o,a:e*Math.cos(a),b:e*Math.sin(a)}}const G=1e-6,Rr=o=>o[0]>=-G&&o[0]<=1+G&&o[1]>=-G&&o[1]<=1+G&&o[2]>=-G&&o[2]<=1+G;function er(o,e,t,a){const n=w(m(o));let c=Math.max(0,m(e));const s=m(t);let i=hr(n,c,s),d=pr(i.L,i.a,i.b);if(!Rr(d)){let b=0,N=c;for(let g=0;g<24;g++){const v=(b+N)/2,D=hr(n,v,s);Rr(pr(D.L,D.a,D.b))?b=v:N=v}c=b,i=hr(n,c,s),d=pr(i.L,i.a,i.b)}return k(fr(d[0])*255,fr(d[1])*255,fr(d[2])*255,w(m(a,1)))}function J(o){const e=Gr(lr(o));return{l:e.l,c:e.c,h:e.h,a:w(m(o.a,1))}}function ur(o){return er(o.l,o.c,o.h,o.a)}function yo(o){const e=w(m(o.a,1)),t=`#${ir(o.r)}${ir(o.g)}${ir(o.b)}`;return e<1?`${t}${ir(e*255)}`:t}function vr(o){const e=w(m(o.a,1)),t=O(o.r),a=O(o.g),n=O(o.b);return e>=1?`rgb(${t}, ${a}, ${n})`:`rgba(${t}, ${a}, ${n}, ${Number(e.toFixed(3))})`}function Wr(o){return`${O(o.r)}, ${O(o.g)}, ${O(o.b)}`}function rr(o){return .2126*q(m(o.r)/255)+.7152*q(m(o.g)/255)+.0722*q(m(o.b)/255)}function y(o,e){const t=e.a>=1?e:k(e.r,e.g,e.b,1),a=o.a<1?br(o,t):o,n=rr(a),c=rr(t),s=Math.max(n,c),i=Math.min(n,c);return(s+.05)/(i+.05)}function br(o,e){const t=w(m(o.a,1)),a=w(m(e.a,1)),n=t+a*(1-t);if(n<=0)return k(0,0,0,0);const c=a*(1-t)/n,s=t/n;return k(o.r*s+e.r*c,o.g*s+e.g*c,o.b*s+e.b*c,n)}function or(o,e,t){const a=w(m(t));if(a<=0)return k(o.r,o.g,o.b,w(m(o.a,1)));if(a>=1)return k(e.r,e.g,e.b,w(m(e.a,1)));const n=w(m(o.a,1)),c=w(m(e.a,1)),s=lr(o),i=lr(e),d=n+(c-n)*a,b=d>0?n*(1-a)/d:1-a,N=d>0?c*a/d:a,g={L:s.L*b+i.L*N,a:s.a*b+i.a*N,b:s.b*b+i.b*N},v=Gr(g);return er(v.l,v.c,v.h,d)}function P(o,e){return k(o.r,o.g,o.b,w(m(e,1)))}function xo(o){return lr(o).L}function C(o,e){const t=J(o);return er(w(t.l+m(e)),t.c,t.h,t.a)}function ko(o,e){const t=J(o);return er(w(m(e)),t.c,t.h,t.a)}const wo=[1,.75,.5,.25,0],Io=24;function z(o,e,t,a="auto"){const n=m(t,1);if(y(o,e)>=n)return o;const c=J(o),s=k(e.r,e.g,e.b,1),i=rr(s),d=(f,$)=>er(f,$,c.h,c.a),b=f=>y(f,s),N=f=>rr(f.a<1?br(f,s):f),g=f=>k(Math.round(f.r),Math.round(f.g),Math.round(f.b),f.a),v=f=>{const $=f==="lighter"?1:0,R=_=>f==="lighter"?N(_)>=i:N(_)<=i,L=_=>R(_)&&b(_)>=n,K=_=>L(_)&&L(g(_));let U=null;for(const _ of wo){const j=c.c*_,Y=d($,j),tr=b(Y);if((!U||tr>U.ratio)&&(U={color:Y,ratio:tr}),!K(Y))continue;let nr=c.l,V=$;for(let cr=0;cr<Io;cr++){const B=(nr+V)/2;K(d(B,j))?V=B:nr=B}const ar=d(V,j);return{color:ar,ratio:b(ar)}}return U};if(a==="lighter"||a==="darker")return v(a).color;const D=b(d(1,0)),p=b(d(0,0));return v(D>=p?"lighter":"darker").color}function zr(o){return y(I,o)>=y(Z,o)}function Zr(o,e=Pr){const t=e.length?e:Pr;let a=t[0],n=-1;for(const c of t){const s=y(c,o);s>n&&(n=s,a=c)}return k(a.r,a.g,a.b,a.a)}const So=Object.freeze(Object.defineProperty({__proto__:null,BLACK:Z,WHITE:I,adjustL:C,bestOn:Zr,composite:br,contrastRatio:y,ensureContrast:z,formatHex:yo,formatRgb:vr,formatTriplet:Wr,fromOklch:ur,isDarkSurface:zr,lightness:xo,mix:or,parseColor:H,relativeLuminance:rr,setL:ko,toOklch:J,withAlpha:P},Symbol.toStringTag,{value:"Module"})),Mo={none:["0px","0px","0px","0px"],sm:["3px","4px","6px","9999px"],md:["4px","6px","10px","9999px"],lg:["6px","10px","16px","9999px"],full:["10px","16px","24px","9999px"]},To="url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMik7IiAvPgogIDxyZWN0IHg9IjUwJSIgeT0iMCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwKTsiIC8+CiAgPHJlY3QgeD0iNTAlIiB5PSI1MCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjIpOyIgLz4KICA8cmVjdCB4PSIwJSIgeT0iNTAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMCk7IiAvPgo8L3N2Zz4=')",$o="url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDAsIDAsIDAsIDAuMSk7IiAvPgogIDxyZWN0IHg9IjUwJSIgeT0iNTAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMCwgMCwgMCwgMC4xKTsiIC8+Cjwvc3ZnPg==')";function Ao(o,e){const t=o==="dark",a=e?.06:0;return{text:e?1:t?.92:.88,textMuted:e?.85:t?.66:.62,textFaint:e?.68:t?.46:.42,border:(t?.12:.1)+(e?.18:0),borderStrong:(t?.28:.22)+(e?.25:0),divider:(t?.1:.08)+(e?.15:0),fill:(t?.09:.06)+a,fillHover:(t?.14:.1)+a,fillActive:(t?.2:.15)+a,field:(t?.07:.04)+a,fieldHover:(t?.1:.06)+a,fieldFocus:(t?.1:.05)+a,hover:(t?.07:.05)+a,pressed:(t?.12:.09)+a,soft:(t?.18:.12)+(e?.08:0),softHover:(t?.26:.2)+(e?.08:0),elevationMin:e?1.3:t?1.18:1.06}}const h=o=>vr(o),S=o=>Wr(o),T=(o,e)=>vr(P(o,e)),Ur=o=>({r:Math.round(o.r),g:Math.round(o.g),b:Math.round(o.b),a:o.a});function W(o,e,t,a,n=c=>c){let c=t,s=Ur(n(or(o,e,c))),i=0;for(;y(s,o)<a&&c<1&&i++<40;)c=Math.min(1,c+.02),s=Ur(n(or(o,e,c)));return P(s,1)}function jr(o,e,t){if(t<=0)return o;const a=J(o),n=J(e);return ur({l:a.l,c:Math.min(.03,.03*t)+a.c*(1-t),h:n.h,a:a.a})}function Eo(o){var Tr,$r,Ar,Er,Nr,Cr,_r;const e={version:2,...o??{}},t=Or[e.preset??"dark"],a=[];let n=H(e.surface)??null;n||(e.surface&&a.push({token:"surface",reason:`unparsable surface "${e.surface}", using preset`}),n=H(t.surface)),n=P(n,1);let c=H(e.primary)??null;c||(e.primary&&a.push({token:"primary",reason:`unparsable primary "${e.primary}", using preset`}),c=H(t.primary)),c=P(c,1);const s=zr(n)?"dark":"light",i=s==="dark",d=e.contrast==="high",b=Ao(s,d),N=Math.max(0,Math.min(1,e.tint??0)),g=d?7:4.5,v=d?4.5:3,p=jr(i?I:{r:17,g:17,b:17,a:1},c,N);let f,$,R;const L=l=>jr(l,c,N);if(i){const l=y(I,n)>=6?I:Z;f=W(n,l,.07,b.elevationMin,L),$=W(f,l,.05,1.12,L),R=W($,l,.05,1.12,L)}else{const l=y(I,n);if(l>=b.elevationMin*1.01){const u=l>=1.149995?1.1:b.elevationMin;f=W(n,I,.5,u,L),$=y(I,f)>=1.03?W(f,I,.6,1.03,L):P(I,1),R=L(or($,Z,.035))}(!f||y(f,n)<b.elevationMin)&&(f=W(n,Z,.03,b.elevationMin,L),$=P(I,1),R=L(or($,Z,.05)))}if(!f||!$||!R)throw new Error("theme: elevation ladder not resolved");const K=ur(i?{l:.94,c:0,h:0,a:1}:{l:.28,c:0,h:0,a:1}),U=Zr(K),_=l=>[n,f,$,R].reduce((u,E)=>y(l,E)<y(l,u)?E:u,n),j=(l,u,E)=>{let M=l,F=0;for(;y(P(p,M),_(P(p,M)))<u&&M<1&&F++<25;)M=Math.min(1,M+.04);return M!==l&&a.push({token:E,reason:`raised opacity ${l}→${M.toFixed(2)} to reach ${u}:1 on surfaces`}),M},Y=j(b.text,g,"text"),tr=j(b.textMuted,g,"text-muted"),nr=j(b.textFaint,v,"text-faint"),V=(()=>{const l=y(I,c),u=y({r:17,g:17,b:17,a:1},c);if(l>=g)return I;const E=u>l?{r:17,g:17,b:17,a:1}:I;return Math.max(l,u)<g&&a.push({token:"on-primary",reason:`neither white nor black reaches ${g}:1 on primary (best ${Math.max(l,u).toFixed(2)}:1)`}),E})(),ar=C(c,i?.06:-.06),cr=C(c,i?.1:-.1),B=z(c,n,g,"auto");y(B,n)>y(c,n)+.01&&a.push({token:"primary-text",reason:`primary lightened/darkened to reach ${g}:1 as text on surface`});const Jr=z(c,n,v,"auto"),Kr=z(c,n,v,"auto"),sr=l=>{const u=H(Br[l]),E=y(I,u),M=y({r:17,g:17,b:17,a:1},u),F=E>=g?I:M>E?{r:17,g:17,b:17,a:1}:I;return{base:u,on:F,text:z(u,n,g,"auto"),soft:P(u,b.soft),border:z(u,n,v,"auto"),dark:C(u,-.1),light:C(u,.12),darker:C(u,-.18),bright:C(u,.22)}},Yr=sr("success"),Vr=sr("warning"),Qr=sr("error"),Xr=sr("info"),[ro,oo,eo,to]=Mo[e.radius??"md"],xr="'Inter', sans-serif",kr=l=>{var u;return(u=l==null?void 0:l.name)!=null&&u.trim()?`'${l.name.trim().replace(/'/g,"\\'")}', ${xr}`:xr},wr=kr((Tr=e.fonts)==null?void 0:Tr.ui),no=($r=e.fonts)!=null&&$r.heading?kr(e.fonts.heading):wr,ao=Array.from(new Set([(Er=(Ar=e.fonts)==null?void 0:Ar.ui)==null?void 0:Er.src,(Cr=(Nr=e.fonts)==null?void 0:Nr.heading)==null?void 0:Cr.src].filter(l=>!!l&&/^https?:\/\//.test(l)))),Ir=(_r=e.font)!=null&&_r.size&&e.font.size>0?e.font.size:14,A={"color-scheme":s,surface:h(n),"surface-rgb":S(n),"surface-1":h(f),"surface-1-rgb":S(f),"surface-2":h($),"surface-2-rgb":S($),"surface-3":h(R),"surface-inverse":h(K),scrim:"rgba(0, 0, 0, 0.5)",ink:h(p),"ink-rgb":S(p),text:T(p,Y),"text-muted":T(p,tr),"text-faint":T(p,nr),"text-inverse":h(U),"text-on-surface-rgb":S(p),"text-on-inverse-rgb":S(U),border:T(p,b.border),"border-strong":T(p,b.borderStrong),divider:T(p,b.divider),"border-rgb":S(p),fill:T(p,b.fill),"fill-hover":T(p,b.fillHover),"fill-active":T(p,b.fillActive),field:T(p,b.field),"field-hover":T(p,b.fieldHover),"field-focus":T(p,b.fieldFocus),hover:T(p,b.hover),pressed:T(p,b.pressed),primary:h(c),"primary-rgb":S(c),"primary-hover":h(ar),"primary-active":h(cr),"on-primary":h(V),"primary-text":h(B),"primary-border":h(Jr),"primary-soft":T(c,b.soft),"primary-soft-hover":T(c,b.softHover),"focus-ring":h(Kr),"focus-ring-width":d?"3px":"2px","focus-ring-offset":"2px","primary-dark":h(C(c,-.1)),"primary-dark-rgb":S(C(c,-.1)),"primary-light":h(C(c,.1)),"primary-light-rgb":S(C(c,.1)),"primary-bright":h(C(c,.2)),"primary-bright-rgb":S(C(c,.2)),"shadow-1":i?"0 1px 2px rgba(0, 0, 0, 0.4)":"0 1px 2px rgba(0, 0, 0, 0.08)","shadow-2":i?"0 6px 20px rgba(0, 0, 0, 0.45)":"0 6px 20px rgba(0, 0, 0, 0.12)","shadow-3":i?"0 12px 40px rgba(0, 0, 0, 0.5)":"0 12px 40px rgba(0, 0, 0, 0.16)","radius-sm":ro,"radius-md":oo,"radius-lg":eo,"radius-full":to,"font-family":wr,"font-family-heading":no,"font-size":`${Ir}px`,"root-font-size":String(Ir),canvas:i?"rgba(0, 0, 0, 0.25)":"rgba(0, 0, 0, 0.04)","canvas-image":i?To:$o,"canvas-control":"rgba(0, 0, 0, 0.45)","canvas-control-hover":"rgba(0, 0, 0, 0.6)","on-canvas-control":"#ffffff","disabled-opacity":"0.55"};for(const[l,u]of[["success",Yr],["warning",Vr],["error",Qr],["info",Xr]])A[l]=h(u.base),A[`${l}-rgb`]=S(u.base),A[`on-${l}`]=h(u.on),A[`${l}-text`]=h(u.text),A[`${l}-soft`]=h(u.soft),A[`${l}-border`]=h(u.border),A[`${l}-dark-rgb`]=S(u.dark),A[`${l}-light-rgb`]=S(u.light),l==="info"?A["info-bright-rgb"]=S(u.bright):A[`${l}-darker-rgb`]=S(u.darker);if(e.overrides)for(const[l,u]of Object.entries(e.overrides)){if(!u||!Q.includes(l))continue;A[l]=u;const E=`${l}-rgb`;if(Q.includes(E)){const M=H(u);M&&(A[E]=S(M))}}for(const l of Q)A[l]===void 0&&(A[l]="");const Sr=A,Mr=l=>H(Sr[l]),x=(l,u,E,M)=>{const F=Mr(u),Lr=Mr(E),Hr=F&&Lr?y(F,br(Lr,n)):0;return{label:l,fg:u,bg:E,ratio:Math.round(Hr*100)/100,min:M,pass:Hr>=M}},co=[x("Text on surface","text","surface",g),x("Muted text on surface","text-muted","surface",g),x("Faint text on surface","text-faint","surface",v),x("Text on cards (surface-1)","text","surface-1",g),x("Text on popovers (surface-2)","text","surface-2",g),x("Cards distinguishable from surface","surface-1","surface",b.elevationMin),x("Popovers distinguishable from cards","surface-2","surface-1",i?1.12:1),x("Strong border on surface","border-strong","surface",d?3:1.5),x("Text on primary","on-primary","primary",g),x("Primary as text on surface","primary-text","surface",g),x("Primary border on surface","primary-border","surface",v),x("Focus ring on surface","focus-ring","surface",v),x("Success text on surface","success-text","surface",g),x("Warning text on surface","warning-text","surface",g),x("Error text on surface","error-text","surface",g),x("Info text on surface","info-text","surface",g),x("Text on success","on-success","success",g),x("Text on warning","on-warning","warning",g),x("Text on error","on-error","error",g),x("Text on tooltip","text-inverse","surface-inverse",g)];return{input:e,mode:s,tokens:Sr,report:{mode:s,checks:co,adjustments:a},fontUrls:ao}}const r=o=>`var(${X}${o})`,yr={"root-font-size":r("root-font-size"),"font-family":r("font-family"),"bx-focus-ring-color":r("focus-ring"),"bx-focus-ring-width":r("focus-ring-width"),"bx-focus-ring-offset":r("focus-ring-offset"),"app-background-color":r("surface"),"app-background-color-rgb":r("surface-rgb"),"app-divider-color":r("divider"),"secondary-color-rgb":r("surface-2-rgb"),"editor-view-background-color":r("surface"),"fields-view-background-color":"transparent","live-view-background-color":"transparent","popup-background-color":r("surface-1"),"bluepic-embed-editor-border":`1px solid ${r("border")}`,"bluepic-embed-editor-border-radius":r("radius-lg"),"primary-color-base":r("primary-rgb"),"primary-color-dark":r("primary-dark-rgb"),"primary-color-light":r("primary-light-rgb"),"primary-color-bright":r("primary-bright-rgb"),"info-color-base":r("info-rgb"),"info-color-dark":r("info-dark-rgb"),"info-color-light":r("info-light-rgb"),"info-color-bright":r("info-bright-rgb"),"success-color-base":r("success-rgb"),"success-color-light":r("success-light-rgb"),"success-color-dark":r("success-dark-rgb"),"success-color-darker":r("success-darker-rgb"),"error-color-base":r("error-rgb"),"error-color-light":r("error-light-rgb"),"error-color-dark":r("error-dark-rgb"),"error-color-darker":r("error-darker-rgb"),"warning-color-base":r("warning-rgb"),"warning-color-light":r("warning-light-rgb"),"warning-color-dark":r("warning-dark-rgb"),"warning-color-darker":r("warning-darker-rgb"),"text-color-base":r("text-on-surface-rgb"),"text-color-alt":r("text-on-inverse-rgb"),"border-color-base":r("border-rgb"),"background-color-base":r("surface-rgb"),"priinfomary-color-base":r("info-rgb"),"primainfory-color-bright":r("primary-bright-rgb"),"primary-color":r("primary"),"info-color":r("info"),"bx-primary-color":r("primary"),"bx-text-color":r("text"),"bx-modal-color":r("surface-1"),"bx-card-color":r("surface-1"),"upload-background-color":r("field"),"upload-text-color-title":r("text"),"upload-text-color-description":r("text-muted"),"input-background-color":r("field"),"input-background-color-hover":r("field-hover"),"input-background-color-focus":r("field-focus"),"input-border-color":"transparent","input-border-color-hover":"transparent","input-border-color-focus":r("primary-border"),"input-shadow-focus-color":r("focus-ring"),"input-bordered-border-color":r("border-strong"),"input-bordered-border-color-hover":r("border-strong"),"input-bordered-border-color-focus":r("primary-border"),"input-outline-color-focus":r("focus-ring"),"input-border-color-disabled":r("border"),"input-opacity-disabled":r("disabled-opacity"),"input-ghost-border-color-hover":r("border"),"input-ghost-border-color-focus":r("primary-border"),"input-number-ctrl-separator-color":r("divider"),"input-number-ctrl-color":r("text-muted"),"input-number-ctrl-color-hover":r("text"),"input-number-ctrl-background-color-hover":r("hover"),"input-state-active-background-color":r("primary-soft"),"input-state-active-background-color-hover":r("primary-soft"),"input-state-active-background-color-focus":r("primary-soft"),"input-state-active-border-color":r("primary-border"),"input-state-active-border-color-hover":r("primary-border"),"input-state-active-border-color-focus":r("primary-border"),"input-state-success-background-color":r("success-soft"),"input-state-success-background-color-hover":r("success-soft"),"input-state-success-background-color-focus":r("success-soft"),"input-state-success-border-color":r("success-border"),"input-state-success-border-color-hover":r("success-border"),"input-state-success-border-color-focus":r("success-border"),"input-state-error-background-color":r("error-soft"),"input-state-error-background-color-hover":r("error-soft"),"input-state-error-background-color-focus":r("error-soft"),"input-state-error-border-color":r("error-border"),"input-state-error-border-color-hover":r("error-border"),"input-state-error-border-color-focus":r("error-border"),"input-state-warning-background-color":r("warning-soft"),"input-state-warning-background-color-hover":r("warning-soft"),"input-state-warning-background-color-focus":r("warning-soft"),"input-state-warning-border-color":r("warning-border"),"input-state-warning-border-color-hover":r("warning-border"),"input-state-warning-border-color-focus":r("warning-border"),"card-background-color":r("surface-1"),"card-background-color-hover":r("surface-2"),"card-border-color":r("border"),"card-header-divider-color":r("divider"),"card-footer-divider-color":r("divider"),"card-footer-background-color":r("hover"),"select-background-color":r("field"),"select-background-color-hover":r("field-hover"),"select-background-color-focus":r("field-focus"),"select-border":"1px solid transparent","select-border-hover":"1px solid transparent","select-border-focus":`1px solid ${r("primary-border")}`,"select-color":r("text"),"select-color-hover":r("text"),"select-color-focus":r("text"),"select-button-background-color":r("fill"),"select-button-background-color-hover":r("fill-hover"),"select-item-border":`2px solid ${r("primary-border")}`,"checkbox-background-color":r("field"),"checkbox-border-color":r("border-strong"),"checkbox-border-color-hover":r("primary-border"),"checkbox-outline-color-focus":r("focus-ring"),"checkbox-border-color-focus":r("primary-border"),"checkbox-background-color-checked":r("primary"),"checkbox-border-color-checked":"transparent","checkbox-background-color-checked-hover":r("primary-hover"),"checkbox-border-color-checked-hover":"transparent","checkbox-symbol-color":r("text-faint"),"checkbox-symbol-color-checked":r("on-primary"),"checkbox-secondary-background-color":r("fill"),"checkbox-secondary-background-color-hover":r("fill-hover"),"checkbox-secondary-background-color-checked":r("fill-active"),"checkbox-secondary-border":`1px solid ${r("border")}`,"checkbox-secondary-border-hover":`1px solid ${r("border-strong")}`,"checkbox-secondary-border-checked":`1px solid ${r("border-strong")}`,"checkbox-secondary-symbol-color":r("text-muted"),"checkbox-secondary-symbol-color-checked":r("primary-text"),"popover-background-color":r("surface-2"),"popover-border-color":r("border"),"popover-border":`1px solid ${r("border")}`,"popover-arrow-border-color":r("border"),"popover-without-darkened-bg-background-color":r("surface-2-rgb"),"popover-without-darkened-bg-box-shadow":r("shadow-2"),"tooltip-background-color":r("surface-inverse"),"tooltip-text-color":r("text-inverse"),"tooltip-border-color":"transparent","menu-item-color":r("text"),"menu-item-color-active":r("primary-text"),"menu-item-background-color":"transparent","menu-item-background-color-active":r("primary-soft"),"menu-item-background-color-hover":r("hover"),"menu-item-background-color-active-hover":r("primary-soft-hover"),"menu-divider":`1px solid ${r("divider")}`,"labeled-text-color":r("text-muted"),"label-background-color":r("fill"),"list-divider":`1px solid ${r("divider")}`,"list-item-background-color-hover":r("hover"),"empty-text-color":r("text-faint"),"tag-background-color":r("fill"),"tag-color":r("text"),"tag-border-color":r("border"),"tag-error-background-color":r("error-soft"),"tag-error-color":r("error-text"),"tag-error-border-color":r("error-border"),"tag-success-background-color":r("success-soft"),"tag-success-color":r("success-text"),"tag-success-border-color":r("success-border"),"tag-warning-background-color":r("warning-soft"),"tag-warning-color":r("warning-text"),"tag-warning-border-color":r("warning-border"),"tag-info-background-color":r("info-soft"),"tag-info-color":r("info-text"),"tag-info-border-color":r("info-border"),"alert-background-color":r("fill"),"alert-color":r("text"),"alert-border-color":r("border"),"alert-icon-color":r("text-muted"),"alert-info-background-color":r("info-soft"),"alert-info-color":r("info-text"),"alert-info-icon-color":r("info-text"),"alert-info-border-color":r("info-border"),"alert-success-background-color":r("success-soft"),"alert-success-color":r("success-text"),"alert-success-icon-color":r("success-text"),"alert-success-border-color":r("success-border"),"alert-warning-background-color":r("warning-soft"),"alert-warning-color":r("warning-text"),"alert-warning-icon-color":r("warning-text"),"alert-warning-border-color":r("warning-border"),"alert-error-background-color":r("error-soft"),"alert-error-color":r("error-text"),"alert-error-icon-color":r("error-text"),"alert-error-border-color":r("error-border"),"slider-body-background-color":r("fill-active"),"slider-body-background-color-hover":r("fill-active"),"slider-body-background-color-focus":r("fill-active"),"slider-thumb-background-color":r("primary"),"slider-thumb-background-color-hover":r("primary-hover"),"slider-thumb-background-color-focus":r("primary-hover"),"slider-thumb-box-shadow":r("shadow-1"),"slider-value-background-color":r("primary"),"slider-value-background-color-hover":r("primary"),"slider-value-background-color-focus":r("primary"),"progress-background-color":r("fill"),"progress-value-color":r("primary"),"tab-color":r("text-muted"),"tab-color-active":r("primary-text"),"tab-segment-background-color":r("fill"),"tab-segment-background-color-active":r("surface-2"),"tab-segment-color":r("text-muted"),"tab-segment-color-active":r("text"),"tab-inline-item-background-color-hover":r("hover"),"tab-item-active-box-shadow":r("shadow-1"),"switch-background-color":r("fill-active"),"switch-border":"none","switch-thumb-background-color":r("surface-3"),"switch-thumb-border":"none","switch-thumb-shadow":r("shadow-1"),"switch-border-hover":"none","switch-background-color-hover":r("fill-active"),"switch-thumb-background-color-hover":r("surface-3"),"switch-thumb-border-hover":"none","switch-active-background-color":r("primary"),"switch-active-border":"none","switch-active-thumb-background-color":r("on-primary"),"switch-active-thumb-border":"none","switch-active-thumb-shadow":r("shadow-1"),"switch-active-background-color-hover":r("primary-hover"),"switch-active-border-hover":"none","switch-active-thumb-background-color-hover":r("on-primary"),"switch-active-thumb-border-hover":"none","radio-background-color":"transparent","radio-background-color-active":r("primary"),"radio-background-color-hover":"transparent","radio-border":`1px solid ${r("border-strong")}`,"radio-border-active":`1px solid ${r("primary")}`,"radio-border-color-hover":r("primary-border"),"radio-symbol-color":r("on-primary"),"radio-label-color":r("text"),"radio-label-color-active":r("text"),"button-background-color":"transparent","button-background-color-hover":r("hover"),"button-background-color-focus":r("hover"),"button-border":"none","button-border-hover":"none","button-border-focus":"none","button-text-color":r("text"),"button-text-color-hover":r("text"),"button-text-color-focus":r("text"),"button-box-shadow":"none","button-box-shadow-hover":"none","button-border-radius":r("radius-md"),"button-active-background-color":r("primary"),"button-active-text-color":r("on-primary"),"button-active-border":"none","button-active-box-shadow":"none","button-active-background-color-hover":r("primary-hover"),"button-active-text-color-hover":r("on-primary"),"button-active-border-hover":"none","button-active-box-shadow-hover":"none","button-secondary-background-color":r("fill"),"button-secondary-background-color-hover":r("fill-hover"),"button-secondary-background-color-focus":r("fill-hover"),"button-secondary-border":"1px solid transparent","button-secondary-border-hover":"1px solid transparent","button-secondary-border-focus":"1px solid transparent","button-secondary-text-color":r("text"),"button-secondary-text-color-hover":r("text"),"button-secondary-text-color-focus":r("text"),"button-secondary-box-shadow":"none","button-secondary-box-shadow-hover":"none","button-secondary-active-background-color":r("fill-active"),"button-secondary-active-background-color-hover":r("fill-active"),"button-secondary-active-background-color-focus":r("fill-active"),"button-secondary-active-border":"1px solid transparent","button-secondary-active-border-hover":"1px solid transparent","button-secondary-active-border-focus":"1px solid transparent","button-secondary-active-text-color":r("text"),"button-secondary-active-text-color-hover":r("text"),"button-secondary-active-text-color-focus":r("text"),"button-secondary-active-box-shadow":"none","button-secondary-active-box-shadow-hover":"none","button-tertiary-background-color":"transparent","button-tertiary-background-color-hover":r("hover"),"button-tertiary-background-color-focus":r("hover"),"button-tertiary-border":`1px solid ${r("border-strong")}`,"button-tertiary-border-hover":`1px solid ${r("border-strong")}`,"button-tertiary-border-focus":`1px solid ${r("border-strong")}`,"button-tertiary-text-color":r("text"),"button-tertiary-text-color-hover":r("text"),"button-tertiary-text-color-focus":r("text"),"button-tertiary-box-shadow":"none","button-tertiary-box-shadow-hover":"none","button-tertiary-box-shadow-focus":"none","button-tertiary-active-background-color":r("primary"),"button-tertiary-active-background-color-hover":r("primary-hover"),"button-tertiary-active-background-color-focus":r("primary-hover"),"button-tertiary-active-border":`1px solid ${r("primary")}`,"button-tertiary-active-border-hover":`1px solid ${r("primary")}`,"button-tertiary-active-border-focus":`1px solid ${r("primary")}`,"button-tertiary-active-text-color":r("on-primary"),"button-tertiary-active-text-color-hover":r("on-primary"),"button-tertiary-active-text-color-focus":r("on-primary"),"button-tertiary-active-box-shadow":"none","button-tertiary-active-box-shadow-hover":"none","button-tertiary-active-box-shadow-focus":"none","button-quaternary-background-color":"transparent","button-quaternary-background-color-hover":"transparent","button-quaternary-text-color":r("text-muted"),"button-quaternary-text-color-hover":r("text"),"button-quaternary-active-background-color":"transparent","button-quaternary-active-background-color-hover":"transparent","button-quaternary-active-text-color":r("text"),"button-quaternary-active-text-color-hover":r("text"),"button-state-active-background-color":r("primary-soft"),"button-state-active-background-color-hover":r("primary-soft-hover"),"button-state-active-background-color-active":r("primary-soft"),"button-state-active-background-color-active-hover":r("primary-soft-hover"),"button-state-active-background-color-solid":r("primary"),"button-state-active-background-color-solid-hover":r("primary-hover"),"button-state-active-border-color":r("primary-border"),"button-state-active-border-color-hover":r("primary-border"),"button-state-active-text-color":r("primary-text"),"button-state-active-text-color-tertiary":r("primary-text"),"button-state-success-background-color":r("success-soft"),"button-state-success-background-color-hover":r("success-soft"),"button-state-success-background-color-active":r("success-soft"),"button-state-success-background-color-active-hover":r("success-soft"),"button-state-success-background-color-solid":r("success"),"button-state-success-background-color-solid-hover":r("success"),"button-state-success-border-color":r("success-border"),"button-state-success-border-color-hover":r("success-border"),"button-state-success-text-color":r("success-text"),"button-state-success-text-color-tertiary":r("success-text"),"button-state-error-background-color":r("error-soft"),"button-state-error-background-color-hover":r("error-soft"),"button-state-error-background-color-active":r("error-soft"),"button-state-error-background-color-active-hover":r("error-soft"),"button-state-error-background-color-solid":r("error"),"button-state-error-background-color-solid-hover":r("error"),"button-state-error-border-color":r("error-border"),"button-state-error-border-color-hover":r("error-border"),"button-state-error-text-color":r("error-text"),"button-state-error-text-color-tertiary":r("error-text"),"button-state-warning-background-color":r("warning-soft"),"button-state-warning-background-color-hover":r("warning-soft"),"button-state-warning-background-color-active":r("warning-soft"),"button-state-warning-background-color-active-hover":r("warning-soft"),"button-state-warning-background-color-solid":r("warning"),"button-state-warning-background-color-solid-hover":r("warning"),"button-state-warning-border-color":r("warning-border"),"button-state-warning-border-color-hover":r("warning-border"),"button-state-warning-text-color":r("warning-text"),"button-state-warning-text-color-tertiary":r("warning-text"),"message-body-background-color":r("surface-2"),"message-body-text-color":r("text"),"message-body-border":`1px solid ${r("border")}`,"canvas-background-color":r("canvas"),"canvas-background-image":r("canvas-image"),"canvas-btn-background-color":r("canvas-control"),"canvas-btn-background-color-hover":r("canvas-control-hover"),"canvas-btn-color":r("on-canvas-control"),"btn-color":r("on-canvas-control"),"gallery-card-background-color":r("surface-1"),"gallery-card-background-color-hover":r("surface-2"),"gallery-card-border":`1px solid ${r("border")}`,"gallery-action-btn-background-color":r("scrim"),"gallery-action-btn-color":"#ffffff","gallery-card-name-text-color":r("text"),"gallery-card-description-text-color":r("text-muted"),"spinner-color":r("text")},No=new Set(Object.keys(yr).filter(o=>`--${o}`.startsWith(X)&&Q.includes(`--${o}`.slice(X.length)))),Co=Object.entries(yr).filter(([o])=>!No.has(o));function qr(o){const e={};for(const[t,a]of Object.entries(o.tokens))a!==""&&(e[`${X}${t}`]=a);for(const[t,a]of Co)e[`--${t}`]=a;if(o.input.customStyle)for(const[t,a]of Object.entries(o.input.customStyle))t==="key"||a==null||a===""||(e[t.startsWith("--")?t:`--${t}`]=String(a));return e}function _o(o,e){const t=Array.isArray(e)?e.join(", "):e,a=qr(o),n=Object.entries(a).map(([c,s])=>`${c}: ${s};`).join(" ");return`${t} { color-scheme: ${o.mode}; ${n} }`}function Lo(o){return!!o&&typeof o=="object"&&o.version===2}function Ho(o){const e=o??{},t=e["editor-view-background-color"]||(e["app-background-color-rgb"]?`rgb(${e["app-background-color-rgb"]})`:void 0)||e["popup-background-color"],a=e["primary-color-base"]?`rgb(${e["primary-color-base"]})`:void 0,n=H(t)?t:void 0,c=H(a)?a:void 0,s=typeof e.key=="string"&&e.key.endsWith("-wcag"),i={version:2};return n&&(i.surface=n),c&&(i.primary=c),s&&(i.contrast="high"),typeof e.key=="string"&&(i.preset=e.key.startsWith("light")?"light":"dark"),i}exports.LEGACY_BRIDGE=yr;exports.SEMANTIC_PREFIX=X;exports.SEMANTIC_TOKEN_GROUPS=so;exports.SEMANTIC_TOKEN_NAMES=Q;exports.STATUS_BASES=Br;exports.THEME_HOUSE_PRESETS=io;exports.THEME_PRESETS=Or;exports.looksLikeThemeInput=Lo;exports.resolveTheme=Eo;exports.themeColor=So;exports.themeInputFromLegacyCustomStyle=Ho;exports.themeToCssText=_o;exports.themeToCssVars=qr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=["color-scheme","surface","surface-rgb","surface-1","surface-1-rgb","surface-2","surface-2-rgb","surface-3","surface-inverse","scrim","ink","ink-rgb","text","text-muted","text-faint","text-inverse","text-on-surface-rgb","text-on-inverse-rgb","border","border-strong","divider","border-rgb","fill","fill-hover","fill-active","field","field-hover","field-focus","hover","pressed","primary","primary-rgb","primary-hover","primary-active","on-primary","primary-text","primary-border","primary-soft","primary-soft-hover","focus-ring","focus-ring-width","focus-ring-offset","primary-dark","primary-dark-rgb","primary-light","primary-light-rgb","primary-bright","primary-bright-rgb","success","success-rgb","on-success","success-text","success-soft","success-border","success-dark-rgb","success-light-rgb","success-darker-rgb","warning","warning-rgb","on-warning","warning-text","warning-soft","warning-border","warning-dark-rgb","warning-light-rgb","warning-darker-rgb","error","error-rgb","on-error","error-text","error-soft","error-border","error-dark-rgb","error-light-rgb","error-darker-rgb","info","info-rgb","on-info","info-text","info-soft","info-border","info-dark-rgb","info-light-rgb","info-bright-rgb","shadow-1","shadow-2","shadow-3","radius-sm","radius-md","radius-lg","radius-full","font-family","font-family-heading","font-size","root-font-size","canvas","canvas-image","canvas-control","canvas-control-hover","on-canvas-control","disabled-opacity"],X="--bx-",so=[{label:"Surfaces",tokens:["surface","surface-1","surface-2","surface-3","surface-inverse","scrim"]},{label:"Text",tokens:["text","text-muted","text-faint","text-inverse"]},{label:"Borders",tokens:["border","border-strong","divider"]},{label:"Neutral fills",tokens:["fill","fill-hover","fill-active","field","field-hover","field-focus","hover","pressed"]},{label:"Primary",tokens:["primary","primary-hover","primary-active","on-primary","primary-text","primary-border","primary-soft","primary-soft-hover","focus-ring"]},{label:"Success",tokens:["success","on-success","success-text","success-soft","success-border"]},{label:"Warning",tokens:["warning","on-warning","warning-text","warning-soft","warning-border"]},{label:"Error",tokens:["error","on-error","error-text","error-soft","error-border"]},{label:"Info",tokens:["info","on-info","info-text","info-soft","info-border"]},{label:"Shape & type",tokens:["radius-sm","radius-md","radius-lg","radius-full","font-family","font-family-heading","font-size"]},{label:"Canvas",tokens:["canvas","canvas-control","on-canvas-control"]}],Or={dark:{surface:"#27262e",primary:"#4472c7"},light:{surface:"#f2f2f2",primary:"#124bba"}},io=[{key:"light",label:"Light",description:"Neutral light surfaces, Bluepic blue.",input:{version:2,preset:"light"}},{key:"dark",label:"Dark",description:"Neutral dark surfaces, Bluepic blue.",input:{version:2,preset:"dark"}},{key:"midnight",label:"Midnight",description:"Near-black with cool, slightly tinted surfaces.",input:{version:2,surface:"#0f1117",primary:"#7da8f7",tint:.35}},{key:"paper",label:"Paper",description:"Warm off-white, ink-black actions, crisp corners.",input:{version:2,surface:"#fbf8f1",primary:"#1f1f1f",radius:"sm"}},{key:"slate",label:"Slate",description:"Blue-grey dark surfaces with a teal accent.",input:{version:2,surface:"#1e2530",primary:"#4fd1c5",tint:.4}},{key:"sand",label:"Sand",description:"Soft sand surfaces with a terracotta accent, rounded.",input:{version:2,surface:"#f3ede3",primary:"#b5562c",radius:"lg"}},{key:"forest",label:"Forest",description:"Deep green surfaces with a mint accent.",input:{version:2,surface:"#0e1f17",primary:"#7ad39a",tint:.5}},{key:"ocean",label:"Ocean",description:"Cool light surfaces with a deep blue accent, pill shapes.",input:{version:2,surface:"#eef4fb",primary:"#0b5cad",tint:.3,radius:"full"}},{key:"graphite",label:"Graphite",description:"Pure black, high contrast, sharp corners — signage and dark brands.",input:{version:2,surface:"#000000",primary:"#ffffff",radius:"none",contrast:"high"}},{key:"plum",label:"Plum",description:"Deep aubergine surfaces with a warm coral accent.",input:{version:2,surface:"#1f1423",primary:"#ff7a59",tint:.45,radius:"lg"}},{key:"linen",label:"Linen",description:"Soft white linen with a muted navy accent, rounded.",input:{version:2,surface:"#f7f7f4",primary:"#2f3e5c",tint:.15,radius:"lg"}}],Br={success:"#28a552",warning:"#d9a400",error:"#dc2f2f",info:"#3b82f6"},I=Object.freeze({r:255,g:255,b:255,a:1}),Z=Object.freeze({r:0,g:0,b:0,a:1}),Pr=[I,Object.freeze({r:17,g:17,b:17,a:1})],dr=(o,e,t)=>o<e?e:o>t?t:o,w=o=>dr(o,0,1),m=(o,e=0)=>Number.isFinite(o)?o:e,x=(o,e,t,a=1)=>({r:o,g:e,b:t,a}),O=o=>Math.round(dr(m(o),0,255)),ir=o=>O(o).toString(16).padStart(2,"0"),lo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Fr=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/,uo=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(deg|turn|rad|grad)?$/,bo=/^(rgba?|hsla?)\(\s*(.*?)\s*\)$/;function mr(o){if(o==="none")return{value:0,percent:!1};const e=o.endsWith("%"),t=e?o.slice(0,-1):o;if(!Fr.test(t))return null;const a=Number(t);return Number.isFinite(a)?{value:a,percent:e}:null}function gr(o){const e=mr(o);return e?dr(e.percent?e.value*255/100:e.value,0,255):null}function go(o){const e=mr(o);return e?w(e.percent?e.value/100:e.value):null}function Dr(o){const e=mr(o);return e?w(e.value/100):null}function fo(o){if(o==="none")return 0;const e=uo.exec(o);if(!e)return null;let t=Number(e[1]);if(!Number.isFinite(t))return null;switch(e[2]){case"turn":t*=360;break;case"rad":t*=180/Math.PI;break;case"grad":t*=.9;break}return t%=360,t<0&&(t+=360),t}function po(o){if(o.includes(",")){if(o.includes("/"))return null;const n=o.split(",").map(c=>c.trim());return n.length!==3&&n.length!==4||n.some(c=>c===""||/\s/.test(c))?null:{ch:[n[0],n[1],n[2]],alpha:n[3]}}const e=o.split("/");if(e.length>2)return null;const t=e[0].trim().split(/\s+/);if(t.length!==3)return null;let a;return e.length===2&&(a=e[1].trim(),a===""||/\s/.test(a))?null:{ch:[t[0],t[1],t[2]],alpha:a}}function ho(o,e,t){const a=n=>{const c=(n+o/30)%12,s=e*Math.min(t,1-t);return t-s*Math.max(-1,Math.min(c-3,9-c,1))};return[a(0)*255,a(8)*255,a(4)*255]}function H(o){if(typeof o!="string")return null;const e=o.trim().toLowerCase();if(!e)return null;if(e==="transparent")return x(0,0,0,0);const t=lo[e];if(t!==void 0)return x(t>>16,t>>8&255,t&255,1);if(e[0]==="#"){const n=e.slice(1);if(!/^[0-9a-f]+$/.test(n))return null;const c=i=>parseInt(n[i],16),s=i=>parseInt(n.slice(i,i+2),16);switch(n.length){case 3:return x(c(0)*17,c(1)*17,c(2)*17,1);case 4:return x(c(0)*17,c(1)*17,c(2)*17,c(3)*17/255);case 6:return x(s(0),s(2),s(4),1);case 8:return x(s(0),s(2),s(4),s(6)/255);default:return null}}const a=bo.exec(e);if(a){const n=po(a[2]);if(!n)return null;const c=n.alpha===void 0?1:go(n.alpha);if(c===null)return null;if(a[1]==="rgb"||a[1]==="rgba"){const v=gr(n.ch[0]),D=gr(n.ch[1]),p=gr(n.ch[2]);return v===null||D===null||p===null?null:x(v,D,p,c)}const s=fo(n.ch[0]),i=Dr(n.ch[1]),d=Dr(n.ch[2]);if(s===null||i===null||d===null)return null;const[b,N,g]=ho(s,i,d);return x(b,N,g,c)}if(e.includes(",")){const n=e.split(",").map(d=>d.trim());if(n.length!==3||!n.every(d=>Fr.test(d)))return null;const[c,s,i]=n.map(d=>dr(Number(d),0,255));return x(c,s,i,1)}return null}function q(o){const e=w(o);return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fr(o){const e=w(o);return e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055}function mo(o,e,t){const a=.4122214708*o+.5363325363*e+.0514459929*t,n=.2119034982*o+.6806995451*e+.1073969566*t,c=.0883024619*o+.2817188376*e+.6299787005*t,s=Math.cbrt(a),i=Math.cbrt(n),d=Math.cbrt(c);return{L:.2104542553*s+.793617785*i-.0040720468*d,a:1.9779984951*s-2.428592205*i+.4505937099*d,b:.0259040371*s+.7827717662*i-.808675766*d}}function pr(o,e,t){const a=o+.3963377774*e+.2158037573*t,n=o-.1055613458*e-.0638541728*t,c=o-.0894841775*e-1.291485548*t,s=a*a*a,i=n*n*n,d=c*c*c;return[4.0767416621*s-3.3077115913*i+.2309699292*d,-1.2684380046*s+2.6097574011*i-.3413193965*d,-.0041960863*s-.7034186147*i+1.707614701*d]}function lr(o){return mo(q(o.r/255),q(o.g/255),q(o.b/255))}const vo=1e-6;function Gr(o){const e=Math.hypot(o.a,o.b);let t=e<vo?0:Math.atan2(o.b,o.a)*180/Math.PI;return t<0&&(t+=360),t>=360&&(t-=360),{l:o.L,c:e,h:t}}function hr(o,e,t){const a=t*Math.PI/180;return{L:o,a:e*Math.cos(a),b:e*Math.sin(a)}}const G=1e-6,Rr=o=>o[0]>=-G&&o[0]<=1+G&&o[1]>=-G&&o[1]<=1+G&&o[2]>=-G&&o[2]<=1+G;function er(o,e,t,a){const n=w(m(o));let c=Math.max(0,m(e));const s=m(t);let i=hr(n,c,s),d=pr(i.L,i.a,i.b);if(!Rr(d)){let b=0,N=c;for(let g=0;g<24;g++){const v=(b+N)/2,D=hr(n,v,s);Rr(pr(D.L,D.a,D.b))?b=v:N=v}c=b,i=hr(n,c,s),d=pr(i.L,i.a,i.b)}return x(fr(d[0])*255,fr(d[1])*255,fr(d[2])*255,w(m(a,1)))}function J(o){const e=Gr(lr(o));return{l:e.l,c:e.c,h:e.h,a:w(m(o.a,1))}}function ur(o){return er(o.l,o.c,o.h,o.a)}function yo(o){const e=w(m(o.a,1)),t=`#${ir(o.r)}${ir(o.g)}${ir(o.b)}`;return e<1?`${t}${ir(e*255)}`:t}function vr(o){const e=w(m(o.a,1)),t=O(o.r),a=O(o.g),n=O(o.b);return e>=1?`rgb(${t}, ${a}, ${n})`:`rgba(${t}, ${a}, ${n}, ${Number(e.toFixed(3))})`}function Wr(o){return`${O(o.r)}, ${O(o.g)}, ${O(o.b)}`}function rr(o){return .2126*q(m(o.r)/255)+.7152*q(m(o.g)/255)+.0722*q(m(o.b)/255)}function y(o,e){const t=e.a>=1?e:x(e.r,e.g,e.b,1),a=o.a<1?br(o,t):o,n=rr(a),c=rr(t),s=Math.max(n,c),i=Math.min(n,c);return(s+.05)/(i+.05)}function br(o,e){const t=w(m(o.a,1)),a=w(m(e.a,1)),n=t+a*(1-t);if(n<=0)return x(0,0,0,0);const c=a*(1-t)/n,s=t/n;return x(o.r*s+e.r*c,o.g*s+e.g*c,o.b*s+e.b*c,n)}function or(o,e,t){const a=w(m(t));if(a<=0)return x(o.r,o.g,o.b,w(m(o.a,1)));if(a>=1)return x(e.r,e.g,e.b,w(m(e.a,1)));const n=w(m(o.a,1)),c=w(m(e.a,1)),s=lr(o),i=lr(e),d=n+(c-n)*a,b=d>0?n*(1-a)/d:1-a,N=d>0?c*a/d:a,g={L:s.L*b+i.L*N,a:s.a*b+i.a*N,b:s.b*b+i.b*N},v=Gr(g);return er(v.l,v.c,v.h,d)}function P(o,e){return x(o.r,o.g,o.b,w(m(e,1)))}function ko(o){return lr(o).L}function C(o,e){const t=J(o);return er(w(t.l+m(e)),t.c,t.h,t.a)}function xo(o,e){const t=J(o);return er(w(m(e)),t.c,t.h,t.a)}const wo=[1,.75,.5,.25,0],Io=24;function z(o,e,t,a="auto"){const n=m(t,1);if(y(o,e)>=n)return o;const c=J(o),s=x(e.r,e.g,e.b,1),i=rr(s),d=(f,$)=>er(f,$,c.h,c.a),b=f=>y(f,s),N=f=>rr(f.a<1?br(f,s):f),g=f=>x(Math.round(f.r),Math.round(f.g),Math.round(f.b),f.a),v=f=>{const $=f==="lighter"?1:0,R=_=>f==="lighter"?N(_)>=i:N(_)<=i,L=_=>R(_)&&b(_)>=n,K=_=>L(_)&&L(g(_));let U=null;for(const _ of wo){const j=c.c*_,Y=d($,j),tr=b(Y);if((!U||tr>U.ratio)&&(U={color:Y,ratio:tr}),!K(Y))continue;let nr=c.l,V=$;for(let cr=0;cr<Io;cr++){const B=(nr+V)/2;K(d(B,j))?V=B:nr=B}const ar=d(V,j);return{color:ar,ratio:b(ar)}}return U};if(a==="lighter"||a==="darker")return v(a).color;const D=b(d(1,0)),p=b(d(0,0));return v(D>=p?"lighter":"darker").color}function zr(o){return y(I,o)>=y(Z,o)}function Zr(o,e=Pr){const t=e.length?e:Pr;let a=t[0],n=-1;for(const c of t){const s=y(c,o);s>n&&(n=s,a=c)}return x(a.r,a.g,a.b,a.a)}const So=Object.freeze(Object.defineProperty({__proto__:null,BLACK:Z,WHITE:I,adjustL:C,bestOn:Zr,composite:br,contrastRatio:y,ensureContrast:z,formatHex:yo,formatRgb:vr,formatTriplet:Wr,fromOklch:ur,isDarkSurface:zr,lightness:ko,mix:or,parseColor:H,relativeLuminance:rr,setL:xo,toOklch:J,withAlpha:P},Symbol.toStringTag,{value:"Module"})),Mo={none:["0px","0px","0px","0px"],sm:["3px","4px","6px","9999px"],md:["4px","6px","10px","9999px"],lg:["6px","10px","16px","9999px"],full:["10px","16px","24px","9999px"]},To="url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMik7IiAvPgogIDxyZWN0IHg9IjUwJSIgeT0iMCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwKTsiIC8+CiAgPHJlY3QgeD0iNTAlIiB5PSI1MCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjIpOyIgLz4KICA8cmVjdCB4PSIwJSIgeT0iNTAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMCk7IiAvPgo8L3N2Zz4=')",$o="url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDAsIDAsIDAsIDAuMSk7IiAvPgogIDxyZWN0IHg9IjUwJSIgeT0iNTAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMCwgMCwgMCwgMC4xKTsiIC8+Cjwvc3ZnPg==')";function Ao(o,e){const t=o==="dark",a=e?.06:0;return{text:e?1:t?.92:.88,textMuted:e?.85:t?.66:.62,textFaint:e?.68:t?.46:.42,border:(t?.12:.1)+(e?.18:0),borderStrong:(t?.28:.22)+(e?.25:0),divider:(t?.1:.08)+(e?.15:0),fill:(t?.09:.06)+a,fillHover:(t?.14:.1)+a,fillActive:(t?.2:.15)+a,field:(t?.07:.04)+a,fieldHover:(t?.1:.06)+a,fieldFocus:(t?.1:.05)+a,hover:(t?.07:.05)+a,pressed:(t?.12:.09)+a,soft:(t?.18:.12)+(e?.08:0),softHover:(t?.26:.2)+(e?.08:0),elevationMin:e?1.3:t?1.18:1.06}}const h=o=>vr(o),S=o=>Wr(o),T=(o,e)=>vr(P(o,e)),Ur=o=>({r:Math.round(o.r),g:Math.round(o.g),b:Math.round(o.b),a:o.a});function W(o,e,t,a,n=c=>c){let c=t,s=Ur(n(or(o,e,c))),i=0;for(;y(s,o)<a&&c<1&&i++<40;)c=Math.min(1,c+.02),s=Ur(n(or(o,e,c)));return P(s,1)}function jr(o,e,t){if(t<=0)return o;const a=J(o),n=J(e);return ur({l:a.l,c:Math.min(.03,.03*t)+a.c*(1-t),h:n.h,a:a.a})}function Eo(o){var Tr,$r,Ar,Er,Nr,Cr,_r;const e={version:2,...o??{}},t=Or[e.preset??"dark"],a=[];let n=H(e.surface)??null;n||(e.surface&&a.push({token:"surface",reason:`unparsable surface "${e.surface}", using preset`}),n=H(t.surface)),n=P(n,1);let c=H(e.primary)??null;c||(e.primary&&a.push({token:"primary",reason:`unparsable primary "${e.primary}", using preset`}),c=H(t.primary)),c=P(c,1);const s=zr(n)?"dark":"light",i=s==="dark",d=e.contrast==="high",b=Ao(s,d),N=Math.max(0,Math.min(1,e.tint??0)),g=d?7:4.5,v=d?4.5:3,p=jr(i?I:{r:17,g:17,b:17,a:1},c,N);let f,$,R;const L=l=>jr(l,c,N);if(i){const l=y(I,n)>=6?I:Z;f=W(n,l,.07,b.elevationMin,L),$=W(f,l,.05,1.12,L),R=W($,l,.05,1.12,L)}else{const l=y(I,n);if(l>=b.elevationMin*1.01){const u=l>=1.149995?1.1:b.elevationMin;f=W(n,I,.5,u,L),$=y(I,f)>=1.03?W(f,I,.6,1.03,L):P(I,1),R=L(or($,Z,.035))}(!f||y(f,n)<b.elevationMin)&&(f=W(n,Z,.03,b.elevationMin,L),$=P(I,1),R=L(or($,Z,.05)))}if(!f||!$||!R)throw new Error("theme: elevation ladder not resolved");const K=ur(i?{l:.94,c:0,h:0,a:1}:{l:.28,c:0,h:0,a:1}),U=Zr(K),_=l=>[n,f,$,R].reduce((u,E)=>y(l,E)<y(l,u)?E:u,n),j=(l,u,E)=>{let M=l,F=0;for(;y(P(p,M),_(P(p,M)))<u&&M<1&&F++<25;)M=Math.min(1,M+.04);return M!==l&&a.push({token:E,reason:`raised opacity ${l}→${M.toFixed(2)} to reach ${u}:1 on surfaces`}),M},Y=j(b.text,g,"text"),tr=j(b.textMuted,g,"text-muted"),nr=j(b.textFaint,v,"text-faint"),V=(()=>{const l=y(I,c),u=y({r:17,g:17,b:17,a:1},c);if(l>=g)return I;const E=u>l?{r:17,g:17,b:17,a:1}:I;return Math.max(l,u)<g&&a.push({token:"on-primary",reason:`neither white nor black reaches ${g}:1 on primary (best ${Math.max(l,u).toFixed(2)}:1)`}),E})(),ar=C(c,i?.06:-.06),cr=C(c,i?.1:-.1),B=z(c,n,g,"auto");y(B,n)>y(c,n)+.01&&a.push({token:"primary-text",reason:`primary lightened/darkened to reach ${g}:1 as text on surface`});const Jr=z(c,n,v,"auto"),Kr=z(c,n,v,"auto"),sr=l=>{const u=H(Br[l]),E=y(I,u),M=y({r:17,g:17,b:17,a:1},u),F=E>=g?I:M>E?{r:17,g:17,b:17,a:1}:I;return{base:u,on:F,text:z(u,n,g,"auto"),soft:P(u,b.soft),border:z(u,n,v,"auto"),dark:C(u,-.1),light:C(u,.12),darker:C(u,-.18),bright:C(u,.22)}},Yr=sr("success"),Vr=sr("warning"),Qr=sr("error"),Xr=sr("info"),[ro,oo,eo,to]=Mo[e.radius??"md"],kr="'Inter', sans-serif",xr=l=>{var u;return(u=l==null?void 0:l.name)!=null&&u.trim()?`'${l.name.trim().replace(/'/g,"\\'")}', ${kr}`:kr},wr=xr((Tr=e.fonts)==null?void 0:Tr.ui),no=($r=e.fonts)!=null&&$r.heading?xr(e.fonts.heading):wr,ao=Array.from(new Set([(Er=(Ar=e.fonts)==null?void 0:Ar.ui)==null?void 0:Er.src,(Cr=(Nr=e.fonts)==null?void 0:Nr.heading)==null?void 0:Cr.src].filter(l=>!!l&&/^https?:\/\//.test(l)))),Ir=(_r=e.font)!=null&&_r.size&&e.font.size>0?e.font.size:14,A={"color-scheme":s,surface:h(n),"surface-rgb":S(n),"surface-1":h(f),"surface-1-rgb":S(f),"surface-2":h($),"surface-2-rgb":S($),"surface-3":h(R),"surface-inverse":h(K),scrim:"rgba(0, 0, 0, 0.5)",ink:h(p),"ink-rgb":S(p),text:T(p,Y),"text-muted":T(p,tr),"text-faint":T(p,nr),"text-inverse":h(U),"text-on-surface-rgb":S(p),"text-on-inverse-rgb":S(U),border:T(p,b.border),"border-strong":T(p,b.borderStrong),divider:T(p,b.divider),"border-rgb":S(p),fill:T(p,b.fill),"fill-hover":T(p,b.fillHover),"fill-active":T(p,b.fillActive),field:T(p,b.field),"field-hover":T(p,b.fieldHover),"field-focus":T(p,b.fieldFocus),hover:T(p,b.hover),pressed:T(p,b.pressed),primary:h(c),"primary-rgb":S(c),"primary-hover":h(ar),"primary-active":h(cr),"on-primary":h(V),"primary-text":h(B),"primary-border":h(Jr),"primary-soft":T(c,b.soft),"primary-soft-hover":T(c,b.softHover),"focus-ring":h(Kr),"focus-ring-width":d?"3px":"2px","focus-ring-offset":"2px","primary-dark":h(C(c,-.1)),"primary-dark-rgb":S(C(c,-.1)),"primary-light":h(C(c,.1)),"primary-light-rgb":S(C(c,.1)),"primary-bright":h(C(c,.2)),"primary-bright-rgb":S(C(c,.2)),"shadow-1":i?"0 1px 2px rgba(0, 0, 0, 0.4)":"0 1px 2px rgba(0, 0, 0, 0.08)","shadow-2":i?"0 6px 20px rgba(0, 0, 0, 0.45)":"0 6px 20px rgba(0, 0, 0, 0.12)","shadow-3":i?"0 12px 40px rgba(0, 0, 0, 0.5)":"0 12px 40px rgba(0, 0, 0, 0.16)","radius-sm":ro,"radius-md":oo,"radius-lg":eo,"radius-full":to,"font-family":wr,"font-family-heading":no,"font-size":`${Ir}px`,"root-font-size":String(Ir),canvas:i?"rgba(0, 0, 0, 0.25)":"rgba(0, 0, 0, 0.04)","canvas-image":i?To:$o,"canvas-control":"rgba(0, 0, 0, 0.45)","canvas-control-hover":"rgba(0, 0, 0, 0.6)","on-canvas-control":"#ffffff","disabled-opacity":"0.55"};for(const[l,u]of[["success",Yr],["warning",Vr],["error",Qr],["info",Xr]])A[l]=h(u.base),A[`${l}-rgb`]=S(u.base),A[`on-${l}`]=h(u.on),A[`${l}-text`]=h(u.text),A[`${l}-soft`]=h(u.soft),A[`${l}-border`]=h(u.border),A[`${l}-dark-rgb`]=S(u.dark),A[`${l}-light-rgb`]=S(u.light),l==="info"?A["info-bright-rgb"]=S(u.bright):A[`${l}-darker-rgb`]=S(u.darker);if(e.overrides)for(const[l,u]of Object.entries(e.overrides)){if(!u||!Q.includes(l))continue;A[l]=u;const E=`${l}-rgb`;if(Q.includes(E)){const M=H(u);M&&(A[E]=S(M))}}for(const l of Q)A[l]===void 0&&(A[l]="");const Sr=A,Mr=l=>H(Sr[l]),k=(l,u,E,M)=>{const F=Mr(u),Lr=Mr(E),Hr=F&&Lr?y(F,br(Lr,n)):0;return{label:l,fg:u,bg:E,ratio:Math.round(Hr*100)/100,min:M,pass:Hr>=M}},co=[k("Text on surface","text","surface",g),k("Muted text on surface","text-muted","surface",g),k("Faint text on surface","text-faint","surface",v),k("Text on cards (surface-1)","text","surface-1",g),k("Text on popovers (surface-2)","text","surface-2",g),k("Cards distinguishable from surface","surface-1","surface",b.elevationMin),k("Popovers distinguishable from cards","surface-2","surface-1",i?1.12:1),k("Strong border on surface","border-strong","surface",d?3:1.5),k("Text on primary","on-primary","primary",g),k("Primary as text on surface","primary-text","surface",g),k("Primary border on surface","primary-border","surface",v),k("Focus ring on surface","focus-ring","surface",v),k("Success text on surface","success-text","surface",g),k("Warning text on surface","warning-text","surface",g),k("Error text on surface","error-text","surface",g),k("Info text on surface","info-text","surface",g),k("Text on success","on-success","success",g),k("Text on warning","on-warning","warning",g),k("Text on error","on-error","error",g),k("Text on tooltip","text-inverse","surface-inverse",g)];return{input:e,mode:s,tokens:Sr,report:{mode:s,checks:co,adjustments:a},fontUrls:ao}}const r=o=>`var(${X}${o})`,yr={"root-font-size":r("root-font-size"),"font-family":r("font-family"),"bx-focus-ring-color":r("focus-ring"),"bx-focus-ring-width":r("focus-ring-width"),"bx-focus-ring-offset":r("focus-ring-offset"),"app-background-color":r("surface"),"app-background-color-rgb":r("surface-rgb"),"app-divider-color":r("divider"),"secondary-color-rgb":r("surface-2-rgb"),"editor-view-background-color":r("surface"),"fields-view-background-color":"transparent","live-view-background-color":"transparent","popup-background-color":r("surface-1"),"bluepic-embed-editor-border":`1px solid ${r("border")}`,"bluepic-embed-editor-border-radius":r("radius-lg"),"primary-color-base":r("primary-rgb"),"primary-color-dark":r("primary-dark-rgb"),"primary-color-light":r("primary-light-rgb"),"primary-color-bright":r("primary-bright-rgb"),"info-color-base":r("info-rgb"),"info-color-dark":r("info-dark-rgb"),"info-color-light":r("info-light-rgb"),"info-color-bright":r("info-bright-rgb"),"success-color-base":r("success-rgb"),"success-color-light":r("success-light-rgb"),"success-color-dark":r("success-dark-rgb"),"success-color-darker":r("success-darker-rgb"),"error-color-base":r("error-rgb"),"error-color-light":r("error-light-rgb"),"error-color-dark":r("error-dark-rgb"),"error-color-darker":r("error-darker-rgb"),"warning-color-base":r("warning-rgb"),"warning-color-light":r("warning-light-rgb"),"warning-color-dark":r("warning-dark-rgb"),"warning-color-darker":r("warning-darker-rgb"),"text-color-base":r("text-on-surface-rgb"),"text-color-alt":r("text-on-inverse-rgb"),"border-color-base":r("border-rgb"),"background-color-base":r("surface-rgb"),"priinfomary-color-base":r("info-rgb"),"primainfory-color-bright":r("primary-bright-rgb"),"primary-color":r("primary"),"info-color":r("info"),"bx-primary-color":r("primary"),"bx-text-color":r("text"),"bx-modal-color":r("surface-1"),"bx-card-color":r("surface-1"),"upload-background-color":r("field"),"upload-text-color-title":r("text"),"upload-text-color-description":r("text-muted"),"input-background-color":r("field"),"input-background-color-hover":r("field-hover"),"input-background-color-focus":r("field-focus"),"input-border-color":"transparent","input-border-color-hover":"transparent","input-border-color-focus":r("primary-border"),"input-shadow-focus-color":r("focus-ring"),"input-bordered-border-color":r("border-strong"),"input-bordered-border-color-hover":r("border-strong"),"input-bordered-border-color-focus":r("primary-border"),"input-outline-color-focus":r("focus-ring"),"input-border-color-disabled":r("border"),"input-opacity-disabled":r("disabled-opacity"),"input-ghost-border-color-hover":r("border"),"input-ghost-border-color-focus":r("primary-border"),"input-number-ctrl-separator-color":r("divider"),"input-number-ctrl-color":r("text-muted"),"input-number-ctrl-color-hover":r("text"),"input-number-ctrl-background-color-hover":r("hover"),"input-state-active-background-color":r("primary-soft"),"input-state-active-background-color-hover":r("primary-soft"),"input-state-active-background-color-focus":r("primary-soft"),"input-state-active-border-color":r("primary-border"),"input-state-active-border-color-hover":r("primary-border"),"input-state-active-border-color-focus":r("primary-border"),"input-state-success-background-color":r("success-soft"),"input-state-success-background-color-hover":r("success-soft"),"input-state-success-background-color-focus":r("success-soft"),"input-state-success-border-color":r("success-border"),"input-state-success-border-color-hover":r("success-border"),"input-state-success-border-color-focus":r("success-border"),"input-state-error-background-color":r("error-soft"),"input-state-error-background-color-hover":r("error-soft"),"input-state-error-background-color-focus":r("error-soft"),"input-state-error-border-color":r("error-border"),"input-state-error-border-color-hover":r("error-border"),"input-state-error-border-color-focus":r("error-border"),"input-state-warning-background-color":r("warning-soft"),"input-state-warning-background-color-hover":r("warning-soft"),"input-state-warning-background-color-focus":r("warning-soft"),"input-state-warning-border-color":r("warning-border"),"input-state-warning-border-color-hover":r("warning-border"),"input-state-warning-border-color-focus":r("warning-border"),"card-background-color":r("surface-1"),"card-background-color-hover":r("surface-2"),"card-border-color":r("border"),"card-header-divider-color":r("divider"),"card-footer-divider-color":r("divider"),"card-footer-background-color":r("hover"),"select-background-color":r("field"),"select-background-color-hover":r("field-hover"),"select-background-color-focus":r("field-focus"),"select-border":"1px solid transparent","select-border-hover":"1px solid transparent","select-border-focus":`1px solid ${r("primary-border")}`,"select-color":r("text"),"select-color-hover":r("text"),"select-color-focus":r("text"),"select-button-background-color":r("fill"),"select-button-background-color-hover":r("fill-hover"),"select-item-border":`2px solid ${r("primary-border")}`,"checkbox-background-color":r("field"),"checkbox-border-color":r("border-strong"),"checkbox-border-color-hover":r("primary-border"),"checkbox-outline-color-focus":r("focus-ring"),"checkbox-border-color-focus":r("primary-border"),"checkbox-background-color-checked":r("primary"),"checkbox-border-color-checked":"transparent","checkbox-background-color-checked-hover":r("primary-hover"),"checkbox-border-color-checked-hover":"transparent","checkbox-symbol-color":r("text-faint"),"checkbox-symbol-color-checked":r("on-primary"),"checkbox-secondary-background-color":r("fill"),"checkbox-secondary-background-color-hover":r("fill-hover"),"checkbox-secondary-background-color-checked":r("fill-active"),"checkbox-secondary-border":`1px solid ${r("border")}`,"checkbox-secondary-border-hover":`1px solid ${r("border-strong")}`,"checkbox-secondary-border-checked":`1px solid ${r("border-strong")}`,"checkbox-secondary-symbol-color":r("text-muted"),"checkbox-secondary-symbol-color-checked":r("primary-text"),"popover-background-color":r("surface-2"),"popover-border-color":r("border"),"popover-border":`1px solid ${r("border")}`,"popover-arrow-border-color":r("border"),"popover-without-darkened-bg-background-color":r("surface-2-rgb"),"popover-without-darkened-bg-box-shadow":r("shadow-2"),"tooltip-background-color":r("surface-inverse"),"tooltip-text-color":r("text-inverse"),"tooltip-border-color":"transparent","menu-item-color":r("text"),"menu-item-color-active":r("primary-text"),"menu-item-background-color":"transparent","menu-item-background-color-active":r("primary-soft"),"menu-item-background-color-hover":r("hover"),"menu-item-background-color-active-hover":r("primary-soft-hover"),"menu-divider":`1px solid ${r("divider")}`,"labeled-text-color":r("text-muted"),"label-background-color":r("fill"),"list-divider":`1px solid ${r("divider")}`,"list-item-background-color-hover":r("hover"),"empty-text-color":r("text-faint"),"tag-background-color":r("fill"),"tag-color":r("text"),"tag-border-color":r("border"),"tag-error-background-color":r("error-soft"),"tag-error-color":r("error-text"),"tag-error-border-color":r("error-border"),"tag-success-background-color":r("success-soft"),"tag-success-color":r("success-text"),"tag-success-border-color":r("success-border"),"tag-warning-background-color":r("warning-soft"),"tag-warning-color":r("warning-text"),"tag-warning-border-color":r("warning-border"),"tag-info-background-color":r("info-soft"),"tag-info-color":r("info-text"),"tag-info-border-color":r("info-border"),"alert-background-color":r("fill"),"alert-color":r("text"),"alert-border-color":r("border"),"alert-icon-color":r("text-muted"),"alert-info-background-color":r("info-soft"),"alert-info-color":r("info-text"),"alert-info-icon-color":r("info-text"),"alert-info-border-color":r("info-border"),"alert-success-background-color":r("success-soft"),"alert-success-color":r("success-text"),"alert-success-icon-color":r("success-text"),"alert-success-border-color":r("success-border"),"alert-warning-background-color":r("warning-soft"),"alert-warning-color":r("warning-text"),"alert-warning-icon-color":r("warning-text"),"alert-warning-border-color":r("warning-border"),"alert-error-background-color":r("error-soft"),"alert-error-color":r("error-text"),"alert-error-icon-color":r("error-text"),"alert-error-border-color":r("error-border"),"slider-body-background-color":r("fill-active"),"slider-body-background-color-hover":r("fill-active"),"slider-body-background-color-focus":r("fill-active"),"slider-thumb-background-color":r("primary"),"slider-thumb-background-color-hover":r("primary-hover"),"slider-thumb-background-color-focus":r("primary-hover"),"slider-thumb-box-shadow":r("shadow-1"),"slider-value-background-color":r("primary"),"slider-value-background-color-hover":r("primary"),"slider-value-background-color-focus":r("primary"),"progress-background-color":r("fill"),"progress-value-color":r("primary"),"tab-color":r("text-muted"),"tab-color-active":r("primary-text"),"tab-segment-background-color":r("fill"),"tab-segment-background-color-active":r("surface-2"),"tab-segment-color":r("text-muted"),"tab-segment-color-active":r("text"),"tab-inline-item-background-color-hover":r("hover"),"tab-item-active-box-shadow":r("shadow-1"),"switch-background-color":r("fill-active"),"switch-border":"none","switch-thumb-background-color":r("surface-3"),"switch-thumb-border":"none","switch-thumb-shadow":r("shadow-1"),"switch-border-hover":"none","switch-background-color-hover":r("fill-active"),"switch-thumb-background-color-hover":r("surface-3"),"switch-thumb-border-hover":"none","switch-active-background-color":r("primary"),"switch-active-border":"none","switch-active-thumb-background-color":r("on-primary"),"switch-active-thumb-border":"none","switch-active-thumb-shadow":r("shadow-1"),"switch-active-background-color-hover":r("primary-hover"),"switch-active-border-hover":"none","switch-active-thumb-background-color-hover":r("on-primary"),"switch-active-thumb-border-hover":"none","radio-background-color":"transparent","radio-background-color-active":r("primary"),"radio-background-color-hover":"transparent","radio-border":`1px solid ${r("border-strong")}`,"radio-border-active":`1px solid ${r("primary")}`,"radio-border-color-hover":r("primary-border"),"radio-symbol-color":r("on-primary"),"radio-label-color":r("text"),"radio-label-color-active":r("text"),"button-background-color":"transparent","button-background-color-hover":r("hover"),"button-background-color-focus":r("hover"),"button-border":"none","button-border-hover":"none","button-border-focus":"none","button-text-color":r("text"),"button-text-color-hover":r("text"),"button-text-color-focus":r("text"),"button-box-shadow":"none","button-box-shadow-hover":"none","button-border-radius":r("radius-md"),"button-active-background-color":r("primary"),"button-active-text-color":r("on-primary"),"button-active-border":"none","button-active-box-shadow":"none","button-active-background-color-hover":r("primary-hover"),"button-active-text-color-hover":r("on-primary"),"button-active-border-hover":"none","button-active-box-shadow-hover":"none","button-secondary-background-color":r("fill"),"button-secondary-background-color-hover":r("fill-hover"),"button-secondary-background-color-focus":r("fill-hover"),"button-secondary-border":"1px solid transparent","button-secondary-border-hover":"1px solid transparent","button-secondary-border-focus":"1px solid transparent","button-secondary-text-color":r("text"),"button-secondary-text-color-hover":r("text"),"button-secondary-text-color-focus":r("text"),"button-secondary-box-shadow":"none","button-secondary-box-shadow-hover":"none","button-secondary-active-background-color":r("fill-active"),"button-secondary-active-background-color-hover":r("fill-active"),"button-secondary-active-background-color-focus":r("fill-active"),"button-secondary-active-border":"1px solid transparent","button-secondary-active-border-hover":"1px solid transparent","button-secondary-active-border-focus":"1px solid transparent","button-secondary-active-text-color":r("text"),"button-secondary-active-text-color-hover":r("text"),"button-secondary-active-text-color-focus":r("text"),"button-secondary-active-box-shadow":"none","button-secondary-active-box-shadow-hover":"none","button-tertiary-background-color":"transparent","button-tertiary-background-color-hover":r("hover"),"button-tertiary-background-color-focus":r("hover"),"button-tertiary-border":`1px solid ${r("border-strong")}`,"button-tertiary-border-hover":`1px solid ${r("border-strong")}`,"button-tertiary-border-focus":`1px solid ${r("border-strong")}`,"button-tertiary-text-color":r("text"),"button-tertiary-text-color-hover":r("text"),"button-tertiary-text-color-focus":r("text"),"button-tertiary-box-shadow":"none","button-tertiary-box-shadow-hover":"none","button-tertiary-box-shadow-focus":"none","button-tertiary-active-background-color":r("primary"),"button-tertiary-active-background-color-hover":r("primary-hover"),"button-tertiary-active-background-color-focus":r("primary-hover"),"button-tertiary-active-border":`1px solid ${r("primary")}`,"button-tertiary-active-border-hover":`1px solid ${r("primary")}`,"button-tertiary-active-border-focus":`1px solid ${r("primary")}`,"button-tertiary-active-text-color":r("on-primary"),"button-tertiary-active-text-color-hover":r("on-primary"),"button-tertiary-active-text-color-focus":r("on-primary"),"button-tertiary-active-box-shadow":"none","button-tertiary-active-box-shadow-hover":"none","button-tertiary-active-box-shadow-focus":"none","button-quaternary-background-color":"transparent","button-quaternary-background-color-hover":"transparent","button-quaternary-text-color":r("text-muted"),"button-quaternary-text-color-hover":r("text"),"button-quaternary-active-background-color":"transparent","button-quaternary-active-background-color-hover":"transparent","button-quaternary-active-text-color":r("text"),"button-quaternary-active-text-color-hover":r("text"),"button-state-active-background-color":r("primary-soft"),"button-state-active-background-color-hover":r("primary-soft-hover"),"button-state-active-background-color-active":r("primary-soft"),"button-state-active-background-color-active-hover":r("primary-soft-hover"),"button-state-active-background-color-solid":r("primary"),"button-state-active-background-color-solid-hover":r("primary-hover"),"button-state-active-border-color":r("primary-border"),"button-state-active-border-color-hover":r("primary-border"),"button-state-active-text-color":r("primary-text"),"button-state-active-text-color-tertiary":r("primary-text"),"button-state-success-background-color":r("success-soft"),"button-state-success-background-color-hover":r("success-soft"),"button-state-success-background-color-active":r("success-soft"),"button-state-success-background-color-active-hover":r("success-soft"),"button-state-success-background-color-solid":r("success"),"button-state-success-background-color-solid-hover":r("success"),"button-state-success-border-color":r("success-border"),"button-state-success-border-color-hover":r("success-border"),"button-state-success-text-color":r("success-text"),"button-state-success-text-color-tertiary":r("success-text"),"button-state-error-background-color":r("error-soft"),"button-state-error-background-color-hover":r("error-soft"),"button-state-error-background-color-active":r("error-soft"),"button-state-error-background-color-active-hover":r("error-soft"),"button-state-error-background-color-solid":r("error"),"button-state-error-background-color-solid-hover":r("error"),"button-state-error-border-color":r("error-border"),"button-state-error-border-color-hover":r("error-border"),"button-state-error-text-color":r("error-text"),"button-state-error-text-color-tertiary":r("error-text"),"button-state-warning-background-color":r("warning-soft"),"button-state-warning-background-color-hover":r("warning-soft"),"button-state-warning-background-color-active":r("warning-soft"),"button-state-warning-background-color-active-hover":r("warning-soft"),"button-state-warning-background-color-solid":r("warning"),"button-state-warning-background-color-solid-hover":r("warning"),"button-state-warning-border-color":r("warning-border"),"button-state-warning-border-color-hover":r("warning-border"),"button-state-warning-text-color":r("warning-text"),"button-state-warning-text-color-tertiary":r("warning-text"),"message-body-background-color":r("surface-2"),"message-body-text-color":r("text"),"message-body-border":`1px solid ${r("border")}`,"canvas-background-color":r("canvas"),"canvas-background-image":r("canvas-image"),"canvas-btn-background-color":r("canvas-control"),"canvas-btn-background-color-hover":r("canvas-control-hover"),"canvas-btn-color":r("on-canvas-control"),"btn-color":r("on-canvas-control"),"gallery-card-background-color":r("surface-1"),"gallery-card-background-color-hover":r("surface-2"),"gallery-card-border":`1px solid ${r("border")}`,"gallery-action-btn-background-color":r("scrim"),"gallery-action-btn-color":"#ffffff","gallery-card-name-text-color":r("text"),"gallery-card-description-text-color":r("text-muted"),"spinner-color":r("text")},No=new Set(Object.keys(yr).filter(o=>`--${o}`.startsWith(X)&&Q.includes(`--${o}`.slice(X.length)))),Co=Object.entries(yr).filter(([o])=>!No.has(o));function qr(o){const e={};for(const[t,a]of Object.entries(o.tokens))a!==""&&(e[`${X}${t}`]=a);for(const[t,a]of Co)e[`--${t}`]=a;if(o.input.customStyle)for(const[t,a]of Object.entries(o.input.customStyle))t==="key"||a==null||a===""||(e[t.startsWith("--")?t:`--${t}`]=String(a));return e}function _o(o,e){const t=Array.isArray(e)?e.join(", "):e,a=qr(o),n=Object.entries(a).map(([c,s])=>`${c}: ${s};`).join(" ");return`${t} { color-scheme: ${o.mode}; ${n} }`}function Lo(o){return!!o&&typeof o=="object"&&o.version===2}function Ho(o){const e=o??{},t=e["editor-view-background-color"]||(e["app-background-color-rgb"]?`rgb(${e["app-background-color-rgb"]})`:void 0)||e["popup-background-color"],a=e["primary-color-base"]?`rgb(${e["primary-color-base"]})`:void 0,n=H(t)?t:void 0,c=H(a)?a:void 0,s=typeof e.key=="string"&&e.key.endsWith("-wcag"),i={version:2};return n&&(i.surface=n),c&&(i.primary=c),s&&(i.contrast="high"),typeof e.key=="string"&&(i.preset=e.key.startsWith("light")?"light":"dark"),i}exports.LEGACY_BRIDGE=yr;exports.SEMANTIC_PREFIX=X;exports.SEMANTIC_TOKEN_GROUPS=so;exports.SEMANTIC_TOKEN_NAMES=Q;exports.STATUS_BASES=Br;exports.THEME_HOUSE_PRESETS=io;exports.THEME_PRESETS=Or;exports.looksLikeThemeInput=Lo;exports.resolveTheme=Eo;exports.themeColor=So;exports.themeInputFromLegacyCustomStyle=Ho;exports.themeToCssText=_o;exports.themeToCssVars=qr;
|
package/dist/theme.mjs
CHANGED
|
@@ -164,13 +164,16 @@ const sr = [
|
|
|
164
164
|
{ key: "slate", label: "Slate", description: "Blue-grey dark surfaces with a teal accent.", input: { version: 2, surface: "#1e2530", primary: "#4fd1c5", tint: 0.4 } },
|
|
165
165
|
{ key: "sand", label: "Sand", description: "Soft sand surfaces with a terracotta accent, rounded.", input: { version: 2, surface: "#f3ede3", primary: "#b5562c", radius: "lg" } },
|
|
166
166
|
{ key: "forest", label: "Forest", description: "Deep green surfaces with a mint accent.", input: { version: 2, surface: "#0e1f17", primary: "#7ad39a", tint: 0.5 } },
|
|
167
|
-
{ key: "ocean", label: "Ocean", description: "Cool light surfaces with a deep blue accent, pill shapes.", input: { version: 2, surface: "#eef4fb", primary: "#0b5cad", tint: 0.3, radius: "full" } }
|
|
167
|
+
{ key: "ocean", label: "Ocean", description: "Cool light surfaces with a deep blue accent, pill shapes.", input: { version: 2, surface: "#eef4fb", primary: "#0b5cad", tint: 0.3, radius: "full" } },
|
|
168
|
+
{ key: "graphite", label: "Graphite", description: "Pure black, high contrast, sharp corners — signage and dark brands.", input: { version: 2, surface: "#000000", primary: "#ffffff", radius: "none", contrast: "high" } },
|
|
169
|
+
{ key: "plum", label: "Plum", description: "Deep aubergine surfaces with a warm coral accent.", input: { version: 2, surface: "#1f1423", primary: "#ff7a59", tint: 0.45, radius: "lg" } },
|
|
170
|
+
{ key: "linen", label: "Linen", description: "Soft white linen with a muted navy accent, rounded.", input: { version: 2, surface: "#f7f7f4", primary: "#2f3e5c", tint: 0.15, radius: "lg" } }
|
|
168
171
|
], ao = {
|
|
169
172
|
success: "#28a552",
|
|
170
173
|
warning: "#d9a400",
|
|
171
174
|
error: "#dc2f2f",
|
|
172
175
|
info: "#3b82f6"
|
|
173
|
-
}, I = Object.freeze({ r: 255, g: 255, b: 255, a: 1 }), Z = Object.freeze({ r: 0, g: 0, b: 0, a: 1 }), _r = [I, Object.freeze({ r: 17, g: 17, b: 17, a: 1 })], dr = (o, e, t) => o < e ? e : o > t ? t : o, w = (o) => dr(o, 0, 1), m = (o, e = 0) => Number.isFinite(o) ? o : e,
|
|
176
|
+
}, I = Object.freeze({ r: 255, g: 255, b: 255, a: 1 }), Z = Object.freeze({ r: 0, g: 0, b: 0, a: 1 }), _r = [I, Object.freeze({ r: 17, g: 17, b: 17, a: 1 })], dr = (o, e, t) => o < e ? e : o > t ? t : o, w = (o) => dr(o, 0, 1), m = (o, e = 0) => Number.isFinite(o) ? o : e, x = (o, e, t, a = 1) => ({ r: o, g: e, b: t, a }), O = (o) => Math.round(dr(m(o), 0, 255)), cr = (o) => O(o).toString(16).padStart(2, "0"), co = {
|
|
174
177
|
aliceblue: 15792383,
|
|
175
178
|
antiquewhite: 16444375,
|
|
176
179
|
aqua: 65535,
|
|
@@ -335,7 +338,7 @@ function lo(o) {
|
|
|
335
338
|
const e = mr(o);
|
|
336
339
|
return e ? w(e.percent ? e.value / 100 : e.value) : null;
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function Pr(o) {
|
|
339
342
|
const e = mr(o);
|
|
340
343
|
return e ? w(e.value / 100) : null;
|
|
341
344
|
}
|
|
@@ -382,22 +385,22 @@ function _(o) {
|
|
|
382
385
|
if (typeof o != "string") return null;
|
|
383
386
|
const e = o.trim().toLowerCase();
|
|
384
387
|
if (!e) return null;
|
|
385
|
-
if (e === "transparent") return
|
|
388
|
+
if (e === "transparent") return x(0, 0, 0, 0);
|
|
386
389
|
const t = co[e];
|
|
387
|
-
if (t !== void 0) return
|
|
390
|
+
if (t !== void 0) return x(t >> 16, t >> 8 & 255, t & 255, 1);
|
|
388
391
|
if (e[0] === "#") {
|
|
389
392
|
const n = e.slice(1);
|
|
390
393
|
if (!/^[0-9a-f]+$/.test(n)) return null;
|
|
391
394
|
const c = (i) => parseInt(n[i], 16), s = (i) => parseInt(n.slice(i, i + 2), 16);
|
|
392
395
|
switch (n.length) {
|
|
393
396
|
case 3:
|
|
394
|
-
return
|
|
397
|
+
return x(c(0) * 17, c(1) * 17, c(2) * 17, 1);
|
|
395
398
|
case 4:
|
|
396
|
-
return
|
|
399
|
+
return x(c(0) * 17, c(1) * 17, c(2) * 17, c(3) * 17 / 255);
|
|
397
400
|
case 6:
|
|
398
|
-
return
|
|
401
|
+
return x(s(0), s(2), s(4), 1);
|
|
399
402
|
case 8:
|
|
400
|
-
return
|
|
403
|
+
return x(s(0), s(2), s(4), s(6) / 255);
|
|
401
404
|
default:
|
|
402
405
|
return null;
|
|
403
406
|
}
|
|
@@ -409,19 +412,19 @@ function _(o) {
|
|
|
409
412
|
const c = n.alpha === void 0 ? 1 : lo(n.alpha);
|
|
410
413
|
if (c === null) return null;
|
|
411
414
|
if (a[1] === "rgb" || a[1] === "rgba") {
|
|
412
|
-
const v = gr(n.ch[0]),
|
|
413
|
-
return v === null ||
|
|
415
|
+
const v = gr(n.ch[0]), D = gr(n.ch[1]), p = gr(n.ch[2]);
|
|
416
|
+
return v === null || D === null || p === null ? null : x(v, D, p, c);
|
|
414
417
|
}
|
|
415
|
-
const s = uo(n.ch[0]), i =
|
|
418
|
+
const s = uo(n.ch[0]), i = Pr(n.ch[1]), d = Pr(n.ch[2]);
|
|
416
419
|
if (s === null || i === null || d === null) return null;
|
|
417
420
|
const [b, C, g] = go(s, i, d);
|
|
418
|
-
return
|
|
421
|
+
return x(b, C, g, c);
|
|
419
422
|
}
|
|
420
423
|
if (e.includes(",")) {
|
|
421
424
|
const n = e.split(",").map((d) => d.trim());
|
|
422
425
|
if (n.length !== 3 || !n.every((d) => Ur.test(d))) return null;
|
|
423
426
|
const [c, s, i] = n.map((d) => dr(Number(d), 0, 255));
|
|
424
|
-
return
|
|
427
|
+
return x(c, s, i, 1);
|
|
425
428
|
}
|
|
426
429
|
return null;
|
|
427
430
|
}
|
|
@@ -462,21 +465,21 @@ function hr(o, e, t) {
|
|
|
462
465
|
const a = t * Math.PI / 180;
|
|
463
466
|
return { L: o, a: e * Math.cos(a), b: e * Math.sin(a) };
|
|
464
467
|
}
|
|
465
|
-
const W = 1e-6,
|
|
468
|
+
const W = 1e-6, Dr = (o) => o[0] >= -W && o[0] <= 1 + W && o[1] >= -W && o[1] <= 1 + W && o[2] >= -W && o[2] <= 1 + W;
|
|
466
469
|
function rr(o, e, t, a) {
|
|
467
470
|
const n = w(m(o));
|
|
468
471
|
let c = Math.max(0, m(e));
|
|
469
472
|
const s = m(t);
|
|
470
473
|
let i = hr(n, c, s), d = pr(i.L, i.a, i.b);
|
|
471
|
-
if (!
|
|
474
|
+
if (!Dr(d)) {
|
|
472
475
|
let b = 0, C = c;
|
|
473
476
|
for (let g = 0; g < 24; g++) {
|
|
474
|
-
const v = (b + C) / 2,
|
|
475
|
-
|
|
477
|
+
const v = (b + C) / 2, D = hr(n, v, s);
|
|
478
|
+
Dr(pr(D.L, D.a, D.b)) ? b = v : C = v;
|
|
476
479
|
}
|
|
477
480
|
c = b, i = hr(n, c, s), d = pr(i.L, i.a, i.b);
|
|
478
481
|
}
|
|
479
|
-
return
|
|
482
|
+
return x(fr(d[0]) * 255, fr(d[1]) * 255, fr(d[2]) * 255, w(m(a, 1)));
|
|
480
483
|
}
|
|
481
484
|
function J(o) {
|
|
482
485
|
const e = Or(lr(o));
|
|
@@ -500,24 +503,24 @@ function Q(o) {
|
|
|
500
503
|
return 0.2126 * q(m(o.r) / 255) + 0.7152 * q(m(o.g) / 255) + 0.0722 * q(m(o.b) / 255);
|
|
501
504
|
}
|
|
502
505
|
function y(o, e) {
|
|
503
|
-
const t = e.a >= 1 ? e :
|
|
506
|
+
const t = e.a >= 1 ? e : x(e.r, e.g, e.b, 1), a = o.a < 1 ? br(o, t) : o, n = Q(a), c = Q(t), s = Math.max(n, c), i = Math.min(n, c);
|
|
504
507
|
return (s + 0.05) / (i + 0.05);
|
|
505
508
|
}
|
|
506
509
|
function br(o, e) {
|
|
507
510
|
const t = w(m(o.a, 1)), a = w(m(e.a, 1)), n = t + a * (1 - t);
|
|
508
|
-
if (n <= 0) return
|
|
511
|
+
if (n <= 0) return x(0, 0, 0, 0);
|
|
509
512
|
const c = a * (1 - t) / n, s = t / n;
|
|
510
|
-
return
|
|
513
|
+
return x(o.r * s + e.r * c, o.g * s + e.g * c, o.b * s + e.b * c, n);
|
|
511
514
|
}
|
|
512
515
|
function X(o, e, t) {
|
|
513
516
|
const a = w(m(t));
|
|
514
|
-
if (a <= 0) return
|
|
515
|
-
if (a >= 1) return
|
|
517
|
+
if (a <= 0) return x(o.r, o.g, o.b, w(m(o.a, 1)));
|
|
518
|
+
if (a >= 1) return x(e.r, e.g, e.b, w(m(e.a, 1)));
|
|
516
519
|
const n = w(m(o.a, 1)), c = w(m(e.a, 1)), s = lr(o), i = lr(e), d = n + (c - n) * a, b = d > 0 ? n * (1 - a) / d : 1 - a, C = d > 0 ? c * a / d : a, g = { L: s.L * b + i.L * C, a: s.a * b + i.a * C, b: s.b * b + i.b * C }, v = Or(g);
|
|
517
520
|
return rr(v.l, v.c, v.h, d);
|
|
518
521
|
}
|
|
519
|
-
function
|
|
520
|
-
return
|
|
522
|
+
function P(o, e) {
|
|
523
|
+
return x(o.r, o.g, o.b, w(m(e, 1)));
|
|
521
524
|
}
|
|
522
525
|
function mo(o) {
|
|
523
526
|
return lr(o).L;
|
|
@@ -530,18 +533,18 @@ function vo(o, e) {
|
|
|
530
533
|
const t = J(o);
|
|
531
534
|
return rr(w(m(e)), t.c, t.h, t.a);
|
|
532
535
|
}
|
|
533
|
-
const yo = [1, 0.75, 0.5, 0.25, 0],
|
|
536
|
+
const yo = [1, 0.75, 0.5, 0.25, 0], ko = 24;
|
|
534
537
|
function G(o, e, t, a = "auto") {
|
|
535
538
|
const n = m(t, 1);
|
|
536
539
|
if (y(o, e) >= n) return o;
|
|
537
|
-
const c = J(o), s =
|
|
540
|
+
const c = J(o), s = x(e.r, e.g, e.b, 1), i = Q(s), d = (f, T) => rr(f, T, c.h, c.a), b = (f) => y(f, s), C = (f) => Q(f.a < 1 ? br(f, s) : f), g = (f) => x(Math.round(f.r), Math.round(f.g), Math.round(f.b), f.a), v = (f) => {
|
|
538
541
|
const T = f === "lighter" ? 1 : 0, j = (L) => f === "lighter" ? C(L) >= i : C(L) <= i, H = (L) => j(L) && b(L) >= n, Y = (L) => H(L) && H(g(L));
|
|
539
542
|
let R = null;
|
|
540
543
|
for (const L of yo) {
|
|
541
544
|
const U = c.c * L, K = d(T, U), or = b(K);
|
|
542
545
|
if ((!R || or > R.ratio) && (R = { color: K, ratio: or }), !Y(K)) continue;
|
|
543
546
|
let er = c.l, V = T;
|
|
544
|
-
for (let nr = 0; nr <
|
|
547
|
+
for (let nr = 0; nr < ko; nr++) {
|
|
545
548
|
const B = (er + V) / 2;
|
|
546
549
|
Y(d(B, U)) ? V = B : er = B;
|
|
547
550
|
}
|
|
@@ -551,8 +554,8 @@ function G(o, e, t, a = "auto") {
|
|
|
551
554
|
return R;
|
|
552
555
|
};
|
|
553
556
|
if (a === "lighter" || a === "darker") return v(a).color;
|
|
554
|
-
const
|
|
555
|
-
return v(
|
|
557
|
+
const D = b(d(1, 0)), p = b(d(0, 0));
|
|
558
|
+
return v(D >= p ? "lighter" : "darker").color;
|
|
556
559
|
}
|
|
557
560
|
function Fr(o) {
|
|
558
561
|
return y(I, o) >= y(Z, o);
|
|
@@ -564,7 +567,7 @@ function Wr(o, e = _r) {
|
|
|
564
567
|
const s = y(c, o);
|
|
565
568
|
s > n && (n = s, a = c);
|
|
566
569
|
}
|
|
567
|
-
return
|
|
570
|
+
return x(a.r, a.g, a.b, a.a);
|
|
568
571
|
}
|
|
569
572
|
const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
570
573
|
__proto__: null,
|
|
@@ -586,8 +589,8 @@ const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
586
589
|
relativeLuminance: Q,
|
|
587
590
|
setL: vo,
|
|
588
591
|
toOklch: J,
|
|
589
|
-
withAlpha:
|
|
590
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
592
|
+
withAlpha: P
|
|
593
|
+
}, Symbol.toStringTag, { value: "Module" })), xo = {
|
|
591
594
|
none: ["0px", "0px", "0px", "0px"],
|
|
592
595
|
sm: ["3px", "4px", "6px", "9999px"],
|
|
593
596
|
md: ["4px", "6px", "10px", "9999px"],
|
|
@@ -616,12 +619,12 @@ function Mo(o, e) {
|
|
|
616
619
|
elevationMin: e ? 1.3 : t ? 1.18 : 1.06
|
|
617
620
|
};
|
|
618
621
|
}
|
|
619
|
-
const h = (o) => vr(o), M = (o) => Br(o), $ = (o, e) => vr(
|
|
622
|
+
const h = (o) => vr(o), M = (o) => Br(o), $ = (o, e) => vr(P(o, e)), jr = (o) => ({ r: Math.round(o.r), g: Math.round(o.g), b: Math.round(o.b), a: o.a });
|
|
620
623
|
function z(o, e, t, a, n = (c) => c) {
|
|
621
624
|
let c = t, s = jr(n(X(o, e, c))), i = 0;
|
|
622
625
|
for (; y(s, o) < a && c < 1 && i++ < 40; )
|
|
623
626
|
c = Math.min(1, c + 0.02), s = jr(n(X(o, e, c)));
|
|
624
|
-
return
|
|
627
|
+
return P(s, 1);
|
|
625
628
|
}
|
|
626
629
|
function Rr(o, e, t) {
|
|
627
630
|
if (t <= 0) return o;
|
|
@@ -632,9 +635,9 @@ function Eo(o) {
|
|
|
632
635
|
var Sr, $r, Tr, Ar, Nr, Cr, Er;
|
|
633
636
|
const e = { version: 2, ...o ?? {} }, t = no[e.preset ?? "dark"], a = [];
|
|
634
637
|
let n = _(e.surface) ?? null;
|
|
635
|
-
n || (e.surface && a.push({ token: "surface", reason: `unparsable surface "${e.surface}", using preset` }), n = _(t.surface)), n =
|
|
638
|
+
n || (e.surface && a.push({ token: "surface", reason: `unparsable surface "${e.surface}", using preset` }), n = _(t.surface)), n = P(n, 1);
|
|
636
639
|
let c = _(e.primary) ?? null;
|
|
637
|
-
c || (e.primary && a.push({ token: "primary", reason: `unparsable primary "${e.primary}", using preset` }), c = _(t.primary)), c =
|
|
640
|
+
c || (e.primary && a.push({ token: "primary", reason: `unparsable primary "${e.primary}", using preset` }), c = _(t.primary)), c = P(c, 1);
|
|
638
641
|
const s = Fr(n) ? "dark" : "light", i = s === "dark", d = e.contrast === "high", b = Mo(s, d), C = Math.max(0, Math.min(1, e.tint ?? 0)), g = d ? 7 : 4.5, v = d ? 4.5 : 3, p = Rr(i ? I : { r: 17, g: 17, b: 17, a: 1 }, c, C);
|
|
639
642
|
let f, T, j;
|
|
640
643
|
const H = (l) => Rr(l, c, C);
|
|
@@ -645,14 +648,14 @@ function Eo(o) {
|
|
|
645
648
|
const l = y(I, n);
|
|
646
649
|
if (l >= b.elevationMin * 1.01) {
|
|
647
650
|
const u = l >= 1.149995 ? 1.1 : b.elevationMin;
|
|
648
|
-
f = z(n, I, 0.5, u, H), T = y(I, f) >= 1.03 ? z(f, I, 0.6, 1.03, H) :
|
|
651
|
+
f = z(n, I, 0.5, u, H), T = y(I, f) >= 1.03 ? z(f, I, 0.6, 1.03, H) : P(I, 1), j = H(X(T, Z, 0.035));
|
|
649
652
|
}
|
|
650
|
-
(!f || y(f, n) < b.elevationMin) && (f = z(n, Z, 0.03, b.elevationMin, H), T =
|
|
653
|
+
(!f || y(f, n) < b.elevationMin) && (f = z(n, Z, 0.03, b.elevationMin, H), T = P(I, 1), j = H(X(T, Z, 0.05)));
|
|
651
654
|
}
|
|
652
655
|
if (!f || !T || !j) throw new Error("theme: elevation ladder not resolved");
|
|
653
656
|
const Y = ur(i ? { l: 0.94, c: 0, h: 0, a: 1 } : { l: 0.28, c: 0, h: 0, a: 1 }), R = Wr(Y), L = (l) => [n, f, T, j].reduce((u, N) => y(l, N) < y(l, u) ? N : u, n), U = (l, u, N) => {
|
|
654
657
|
let S = l, F = 0;
|
|
655
|
-
for (; y(
|
|
658
|
+
for (; y(P(p, S), L(P(p, S))) < u && S < 1 && F++ < 25; ) S = Math.min(1, S + 0.04);
|
|
656
659
|
return S !== l && a.push({ token: N, reason: `raised opacity ${l}→${S.toFixed(2)} to reach ${u}:1 on surfaces` }), S;
|
|
657
660
|
}, K = U(b.text, g, "text"), or = U(b.textMuted, g, "text-muted"), er = U(b.textFaint, v, "text-faint"), V = (() => {
|
|
658
661
|
const l = y(I, c), u = y({ r: 17, g: 17, b: 17, a: 1 }, c);
|
|
@@ -667,17 +670,17 @@ function Eo(o) {
|
|
|
667
670
|
base: u,
|
|
668
671
|
on: F,
|
|
669
672
|
text: G(u, n, g, "auto"),
|
|
670
|
-
soft:
|
|
673
|
+
soft: P(u, b.soft),
|
|
671
674
|
border: G(u, n, v, "auto"),
|
|
672
675
|
dark: E(u, -0.1),
|
|
673
676
|
light: E(u, 0.12),
|
|
674
677
|
darker: E(u, -0.18),
|
|
675
678
|
bright: E(u, 0.22)
|
|
676
679
|
};
|
|
677
|
-
}, qr = ar("success"), Jr = ar("warning"), Yr = ar("error"), Kr = ar("info"), [Vr, Qr, Xr, ro] =
|
|
680
|
+
}, qr = ar("success"), Jr = ar("warning"), Yr = ar("error"), Kr = ar("info"), [Vr, Qr, Xr, ro] = xo[e.radius ?? "md"], yr = "'Inter', sans-serif", kr = (l) => {
|
|
678
681
|
var u;
|
|
679
682
|
return (u = l == null ? void 0 : l.name) != null && u.trim() ? `'${l.name.trim().replace(/'/g, "\\'")}', ${yr}` : yr;
|
|
680
|
-
},
|
|
683
|
+
}, xr = kr((Sr = e.fonts) == null ? void 0 : Sr.ui), oo = ($r = e.fonts) != null && $r.heading ? kr(e.fonts.heading) : xr, eo = Array.from(new Set([(Ar = (Tr = e.fonts) == null ? void 0 : Tr.ui) == null ? void 0 : Ar.src, (Cr = (Nr = e.fonts) == null ? void 0 : Nr.heading) == null ? void 0 : Cr.src].filter((l) => !!l && /^https?:\/\//.test(l)))), wr = (Er = e.font) != null && Er.size && e.font.size > 0 ? e.font.size : 14, A = {
|
|
681
684
|
"color-scheme": s,
|
|
682
685
|
surface: h(n),
|
|
683
686
|
"surface-rgb": M(n),
|
|
@@ -733,7 +736,7 @@ function Eo(o) {
|
|
|
733
736
|
"radius-md": Qr,
|
|
734
737
|
"radius-lg": Xr,
|
|
735
738
|
"radius-full": ro,
|
|
736
|
-
"font-family":
|
|
739
|
+
"font-family": xr,
|
|
737
740
|
"font-family-heading": oo,
|
|
738
741
|
"font-size": `${wr}px`,
|
|
739
742
|
"root-font-size": String(wr),
|
|
@@ -763,30 +766,30 @@ function Eo(o) {
|
|
|
763
766
|
}
|
|
764
767
|
}
|
|
765
768
|
for (const l of sr) A[l] === void 0 && (A[l] = "");
|
|
766
|
-
const Ir = A, Mr = (l) => _(Ir[l]),
|
|
769
|
+
const Ir = A, Mr = (l) => _(Ir[l]), k = (l, u, N, S) => {
|
|
767
770
|
const F = Mr(u), Lr = Mr(N), Hr = F && Lr ? y(F, br(Lr, n)) : 0;
|
|
768
771
|
return { label: l, fg: u, bg: N, ratio: Math.round(Hr * 100) / 100, min: S, pass: Hr >= S };
|
|
769
772
|
}, to = [
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
773
|
+
k("Text on surface", "text", "surface", g),
|
|
774
|
+
k("Muted text on surface", "text-muted", "surface", g),
|
|
775
|
+
k("Faint text on surface", "text-faint", "surface", v),
|
|
776
|
+
k("Text on cards (surface-1)", "text", "surface-1", g),
|
|
777
|
+
k("Text on popovers (surface-2)", "text", "surface-2", g),
|
|
778
|
+
k("Cards distinguishable from surface", "surface-1", "surface", b.elevationMin),
|
|
779
|
+
k("Popovers distinguishable from cards", "surface-2", "surface-1", i ? 1.12 : 1),
|
|
780
|
+
k("Strong border on surface", "border-strong", "surface", d ? 3 : 1.5),
|
|
781
|
+
k("Text on primary", "on-primary", "primary", g),
|
|
782
|
+
k("Primary as text on surface", "primary-text", "surface", g),
|
|
783
|
+
k("Primary border on surface", "primary-border", "surface", v),
|
|
784
|
+
k("Focus ring on surface", "focus-ring", "surface", v),
|
|
785
|
+
k("Success text on surface", "success-text", "surface", g),
|
|
786
|
+
k("Warning text on surface", "warning-text", "surface", g),
|
|
787
|
+
k("Error text on surface", "error-text", "surface", g),
|
|
788
|
+
k("Info text on surface", "info-text", "surface", g),
|
|
789
|
+
k("Text on success", "on-success", "success", g),
|
|
790
|
+
k("Text on warning", "on-warning", "warning", g),
|
|
791
|
+
k("Text on error", "on-error", "error", g),
|
|
792
|
+
k("Text on tooltip", "text-inverse", "surface-inverse", g)
|
|
790
793
|
];
|
|
791
794
|
return { input: e, mode: s, tokens: Ir, report: { mode: s, checks: to, adjustments: a }, fontUrls: eo };
|
|
792
795
|
}
|