@gearbox-protocol/ui-kit 3.14.0-next.32 → 3.14.0-next.33

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),ge=require("lightweight-charts"),f=require("react"),Oe=require("../../hooks/use-media-query.cjs"),he=require("../../utils/cn.cjs"),z=require("../../utils/colors.cjs"),ee=require("./default-config.cjs"),Y=require("./formatters.cjs"),ze=require("./graph-current-value.cjs"),Ae=require("./graph-tooltip.cjs"),qe=require("./plugins/vertical-line.cjs");function $e(e){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const N=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(b,s,N.get?N:{enumerable:!0,get:()=>e[s]})}}return b.default=e,Object.freeze(b)}const de=$e(f);function Me(e,b,s){const N=e.labelText??"",m=e.value,w=m===void 0?"":typeof m=="number"?b==="$"?`$${Y.formatExactValue(m,void 0,s)}`:b==="%"?`${Y.formatExactValue(m,void 0,s)}%`:Y.formatExactValue(m,b!=="none"&&b!=="%"&&b!=="$"?b:void 0,s):String(m);return{labelText:N,valueStr:w}}function Pe(e,b){for(let s=e.length-1;s>=0;s--)if(Number(e[s].time)<=b)return e[s].value;return 0}const te=[{line:"#02c39a",top:"rgba(2, 195, 154, 0.56)",bottom:"rgba(2, 195, 154, 0.04)"},{line:"#3b82f6",top:"rgba(59, 130, 246, 0.56)",bottom:"rgba(59, 130, 246, 0.04)"},{line:"#ef4444",top:"rgba(239, 68, 68, 0.56)",bottom:"rgba(239, 68, 68, 0.04)"},{line:"#f59e0b",top:"rgba(245, 158, 11, 0.56)",bottom:"rgba(245, 158, 11, 0.04)"},{line:"#8b5cf6",top:"rgba(139, 92, 246, 0.56)",bottom:"rgba(139, 92, 246, 0.04)"},{line:"#ec4899",top:"rgba(236, 72, 153, 0.56)",bottom:"rgba(236, 72, 153, 0.04)"},{line:"#06b6d4",top:"rgba(6, 182, 212, 0.56)",bottom:"rgba(6, 182, 212, 0.04)"},{line:"#ea580c",top:"rgba(234, 88, 12, 0.56)",bottom:"rgba(234, 88, 12, 0.04)"},{line:"#84cc16",top:"rgba(132, 204, 22, 0.56)",bottom:"rgba(132, 204, 22, 0.04)"},{line:"#d946ef",top:"rgba(217, 70, 239, 0.56)",bottom:"rgba(217, 70, 239, 0.04)"},{line:"#0ea5e9",top:"rgba(14, 165, 233, 0.56)",bottom:"rgba(14, 165, 233, 0.04)"},{line:"#14b8a6",top:"rgba(20, 184, 166, 0.56)",bottom:"rgba(20, 184, 166, 0.04)"},{line:"#eab308",top:"rgba(234, 179, 8, 0.56)",bottom:"rgba(234, 179, 8, 0.04)"},{line:"#f43f5e",top:"rgba(244, 63, 94, 0.56)",bottom:"rgba(244, 63, 94, 0.04)"},{line:"#6366f1",top:"rgba(99, 102, 241, 0.56)",bottom:"rgba(99, 102, 241, 0.04)"},{line:"#10b981",top:"rgba(16, 185, 129, 0.56)",bottom:"rgba(16, 185, 129, 0.04)"},{line:"#78716c",top:"rgba(120, 113, 108, 0.56)",bottom:"rgba(120, 113, 108, 0.04)"},{line:"#64748b",top:"rgba(100, 116, 139, 0.56)",bottom:"rgba(100, 116, 139, 0.04)"},{line:"#475569",top:"rgba(71, 85, 105, 0.56)",bottom:"rgba(71, 85, 105, 0.04)"}],We=137.5;function be(e){if(e<te.length)return te[e];const s=(e-te.length)*We%360,N=z.hslToHex(s,70,50),{topColor:m,bottomColor:w}=z.generateColorsFromBase(N);return{line:N,top:m,bottom:w}}function Be({series:e,className:b,showLegend:s=!1,onUnselectSeries:N,xMeasureUnit:m="time",yMeasureUnit:w="token",optionsOverrides:H,verticalLineOptions:S,currentValueDecimals:oe,useSharedPriceScale:j=!1,showCurrentValue:je=!0,graphTitle:re,yScaleMin:me,yScaleMinMultiple:pe,visibleTimeFrom:I,disableZoom:Q=!1}){const V=f.useRef(null),y=f.useRef(new Map),ne=f.useRef(!1),Ce=f.useRef(!0),ae=f.useRef(null),Te=f.useRef(null),O=f.useRef(null),le=f.useRef(null),J=f.useRef(null),k=Oe.useIsMobile(),D=de.useMemo(()=>e.flatMap(t=>t.data),[e]),Le=de.useMemo(()=>{if(e.length>0){const t=e[e.length-1];if(t.data.length>0)return t.data[t.data.length-1]}},[e]),[ve,se]=f.useState(()=>{if(!Le)return;const t=new Map;for(const a of e)a.data.length>0&&t.set(a.label,a.data[a.data.length-1]);return t}),[xe,E]=f.useState(null),[Se,Re]=f.useState([]);f.useEffect(()=>{const t=()=>{try{if(V.current&&O.current){const l=O.current.clientWidth,c=O.current.clientHeight;V.current.resize(l,c)}}catch{}},a=O.current,r=a?new ResizeObserver(t):null;return J.current=r,a&&r?.observe(a),()=>{a&&r?.unobserve(a),r?.disconnect(),J.current=null}},[]),f.useEffect(()=>{if(!le.current||ne.current)return;const t=ee.getDefaultOptions(),a=z.resolveCSSColor("hsl(var(--foreground))","rgb(0, 0, 0)"),r=Q?{handleScale:{mouseWheel:!1,pinch:!1,axisPressedMouseMove:!1,axisDoubleClickReset:!1},handleScroll:{mouseWheel:!1,pressedMouseMove:!1,horzTouchDrag:!1,vertTouchDrag:!1}}:{},l=ge.createChart(le.current,{...t,rightPriceScale:{...t.rightPriceScale||{},visible:!k,textColor:a},...k&&{crosshair:{...t.crosshair,mode:ge.CrosshairMode.Magnet}},...r,...H});return V.current=l,ne.current=!0,()=>{J.current?.disconnect(),J.current=null,l.remove(),V.current=null,ne.current=!1,y.current.clear()}},[k,H,Q]),f.useEffect(()=>{const t=V.current;t&&t.applyOptions(Q?{handleScale:{mouseWheel:!1,pinch:!1,axisPressedMouseMove:!1,axisDoubleClickReset:!1},handleScroll:{mouseWheel:!1,pressedMouseMove:!1,horzTouchDrag:!1,vertTouchDrag:!1}}:{handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!0,axisDoubleClickReset:!0},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}})},[Q]),f.useEffect(()=>{const t=V.current;if(!t||e.length===0)return;const r=e.filter(o=>o.data.length>0).length<=1?me:pe,l=m==="time"?Y.getXFormatters(m,D):Y.getXFormatters(m),c=D.map(o=>o.value),{formatter:u,tickmarksFormatter:d,updateVisibleRange:T,updateLastValues:p}=Y.createAdaptiveYAxisFormatter(c,w,{yScaleMin:r});ae.current=T,Te.current=p;const L=e.filter(o=>o.data.length>0).map(o=>o.data[o.data.length-1].value);p(L);const M=ee.getDefaultOptions();t.applyOptions({localization:{...M.localization||{},timeFormatter:o=>l.timeFormatter(parseFloat(o),void 0)},timeScale:{...M.timeScale||{},tickMarkFormatter:l.tickMarkFormatter,minBarSpacing:0}});const h=(D.length>0?Math.min(...D.map(o=>o.value)):0)<0,R=D.some(o=>o.value===0),C=!h&&R,x=e.length>1&&!j,v=e.length>1&&!j||k,F=z.resolveCSSColor("hsl(var(--foreground))","rgb(0, 0, 0)");t.applyOptions({rightPriceScale:{...M.rightPriceScale||{},visible:!v,textColor:F,...C&&{scaleMargins:{top:.3,bottom:0}}}});const X=new Set(y.current.keys()),ie=new Set(e.map(o=>o.label));for(const o of X)if(!ie.has(o)){const n=y.current.get(o);n&&(t.removeSeries(n),y.current.delete(o))}const De=ee.getDefaultSeries(),ce=[];let U=0;for(let o=0;o<e.length;o++){const n=e[o],K=be(o),A=n.lineColor??n.color??K.line;let _,q;if(n.lineColor??n.color)if(n.topColor&&n.bottomColor)_=n.topColor,q=n.bottomColor;else if(n.topColor){const i=z.generateColorsFromBase(A);_=n.topColor,q=i.bottomColor}else if(n.bottomColor)_=z.generateColorsFromBase(A).topColor,q=n.bottomColor;else{const i=z.generateColorsFromBase(A);_=i.topColor,q=i.bottomColor}else _=n.topColor||K.top,q=n.bottomColor||K.bottom;if(n.data.length===0){const i=y.current.get(n.label);i&&(t.removeSeries(i),y.current.delete(n.label));continue}const Ee=(n.data.length>0?Math.min(...n.data.map(i=>i.value)):0)<0,Fe=n.data.some(i=>i.value===0),_e=!Ee&&Fe,we=j||!x||U===0?"right":`scale-${U}`;x&&ce.push({priceScaleId:we||"right",shouldPreventNegativeAxis:_e,seriesIndex:U});const ye=(j||!x)&&r!==void 0&&typeof r=="number",Ve={lineColor:A,topColor:_,bottomColor:q,priceScaleId:we,priceFormat:{type:"custom",minMove:.01,formatter:ye&&typeof r=="number"?i=>u(i<r?r:i):u,tickmarksFormatter:d},autoscaleInfoProvider:i=>{if(!ye)return i();const B=i();if(B?.priceRange){const G=r;B.priceRange.minValue=G}return B}};let $=y.current.get(n.label);const W=n.data.map(i=>({...i,time:i.time}));if(I!==void 0&&W.length>0&&Number(W[0].time)>I){const i=Number(W[0].time),B=i-I,G=86400,Ie=B>180*G?7*G:B>30*G?G:6*3600,ke=[];for(let fe=I;fe<i;fe+=Ie)ke.push({time:fe});W.unshift(...ke)}$?($.applyOptions(Ve),$.setData(W)):($=t.addSeries(ge.AreaSeries,{...De,...Ve}),$.setData(W),y.current.set(n.label,$)),U++}if(x&&ce.length>0)for(const o of ce)try{const n=t.priceScale(o.priceScaleId);n&&n.applyOptions({visible:!1,autoScale:!0,scaleMargins:{top:.1,bottom:.1,...o.shouldPreventNegativeAxis&&{top:.3,bottom:0}},alignLabels:!0,borderVisible:!0,borderColor:"rgba(224, 227, 235, 0.1)",entireTextOnly:!1,textColor:F})}catch(n){console.warn(`Failed to configure price scale ${o.priceScaleId} for series ${o.seriesIndex}:`,n)}else if(!x)try{const o=t.priceScale("right");o&&o.applyOptions({visible:!k,autoScale:!0,scaleMargins:{top:.1,bottom:r!==void 0||C?0:.1,...C&&{top:.3}},alignLabels:!0,borderVisible:!0,borderColor:"rgba(224, 227, 235, 0.1)",entireTextOnly:!1,textColor:F})}catch{}if(r!==void 0&&!k&&(j||!x)&&t.applyOptions({handleScroll:{vertTouchDrag:!1}}),D.length>0){const o=D.map(_=>Number(_.time)),n=Math.min(...o),K=I!==void 0?Math.min(I,n):n,A=Math.max(...o);t.timeScale().setVisibleRange({from:K,to:A})}Ce.current&&(Ce.current=!1);const ue=new Map;for(const o of e)o.data.length>0&&ue.set(o.label,o.data[o.data.length-1]);se(ue.size>0?ue:void 0)},[e,D,m,w,k,j,me,pe,I]),f.useEffect(()=>{const t=V.current;if(!t||e.length===0)return;const a=e.length===1;let r;for(const c of e)if(c.data.length>0){r=c.data[c.data.length-1].time;break}if(!r)return;const l=c=>{const{time:u=r,seriesData:d,point:T}=c||{},p=Array.from(y.current.values());if(!T||!u){const P=new Map;for(const h of e)h.data.length>0&&P.set(h.label,h.data[h.data.length-1]);if(se(P.size>0?P:void 0),a||j)E(null);else if(p[0]&&r){const R=t.timeScale().timeToCoordinate(r),C=e[0];if(C.data.length>0){const x=C.data[C.data.length-1].value,v=p[0].priceToCoordinate(x);R!==null&&v!==null&&E({x:R,y:v})}}return}const L=new Map;let M;for(let P=0;P<e.length;P++){const h=e[P],R=p[P];if(!R)continue;const C=d?.get(R),x=C&&"value"in C?C.value:void 0;let v;if(x!==void 0)v=x;else if(a){const F=Number(u),X=h.data.length>0?Number(h.data[0].time):Number.POSITIVE_INFINITY;F<X?v=Number.NaN:v=h.data[h.data.length-1]?.value??0}else v=Pe(h.data,Number(u));Number.isNaN(v)||(M===void 0&&(M=v),L.set(h.label,{value:v,time:u}))}if(se(L),M!==void 0&&p[0]){const h=t.timeScale().timeToCoordinate(u),R=p[0].priceToCoordinate(M);if(h!==null&&R!==null){const C=O.current;if(C){const x=C.querySelector(".LightweightChart");if(x){const v=x.getBoundingClientRect(),F=C.getBoundingClientRect(),X=h+(v.left-F.left),ie=R+(v.top-F.top);E({x:X,y:ie})}else E({x:h,y:R})}else E({x:h,y:R})}else E(null)}else E(null)};return t.subscribeCrosshairMove(l),k&&t.subscribeClick(l),!a&&!j&&requestAnimationFrame(()=>{const c=Array.from(y.current.values());if(c[0]&&r&&e[0]?.data.length>0){const d=t.timeScale().timeToCoordinate(r),T=e[0].data[e[0].data.length-1].value,p=c[0].priceToCoordinate(T);d!==null&&p!==null&&E({x:d,y:p})}}),()=>{t.unsubscribeCrosshairMove(l),k&&t.unsubscribeClick(l)}},[e,j,k]),f.useEffect(()=>{const t=V.current;if(!t||e.length===0)return;const a=t.timeScale(),r=()=>{if(!ae.current)return;const l=a.getVisibleRange();if(!l)return;const c=Number(l.from),u=Number(l.to),d=[];for(const T of e)for(const p of T.data){const L=Number(p.time);L>=c&&L<=u&&d.push(p.value)}d.length>0&&ae.current(d)};return a.subscribeVisibleLogicalRangeChange(r),()=>{a.unsubscribeVisibleLogicalRangeChange(r)}},[e]),f.useEffect(()=>{const t=V.current,a=Array.from(y.current.values()),r=[];if(t&&a.length>0&&S){const l=ee.getDefaultVerticalLine(),c=a[0];for(const u of S){const d=new qe.VertLine(t,c,u.xCoordinate,{...l,...u.options||{}});c.attachPrimitive(d),r.push(d)}}return()=>{if(a.length>0){const l=a[0];for(const c of r)l.detachPrimitive(c)}}},[S,e]),f.useEffect(()=>{const t=V.current;if(!t||!S?.length){Re([]);return}const a=()=>{const c=t.timeScale(),u=S.map(d=>c.timeToCoordinate(d.xCoordinate)??null);Re(u)};a();const r=t.timeScale(),l=()=>{a()};return r.subscribeVisibleLogicalRangeChange(l),()=>{r.unsubscribeVisibleLogicalRangeChange(l)}},[S,e]);const Z=e.length===1,Ne=de.useMemo(()=>{if(Z&&e.length>0){const t=e[0];if(t.data.length>0)return t.data[t.data.length-1]}},[Z,e]);return g.jsxs("div",{ref:O,className:he.cn("relative z-[1] w-full h-full overflow-hidden p-0",b),children:[re!=null&&re!==!1&&Z?g.jsx("div",{className:"absolute top-2 left-2 right-2 z-[100] pointer-events-none",children:g.jsx("div",{className:"text-xl sm:text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis",children:re})}):je&&Z&&Ne&&g.jsx(ze.GraphCurrentValue,{point:Ne,xMeasureUnit:m,yMeasureUnit:w,decimals:oe}),ve&&xe&&g.jsx(Ae.GraphTooltip,{points:ve,xMeasureUnit:m,yMeasureUnit:w,series:e,position:xe,containerRef:O,decimals:oe}),s&&g.jsx(Ge,{series:e,onUnselect:N}),S&&S.length>0&&Se.length===S.length&&g.jsx("div",{className:"absolute inset-0 z-[5] pointer-events-none","aria-hidden":!0,children:S.map((t,a)=>{const r=Se[a],l=t.options??{},c=l.showLabel!==!1;if(r===null||!c)return null;const{labelText:u,valueStr:d}=Me(l,w,oe);if(!(u||d))return null;const p=l.labelBackgroundColor??l.color??"hsl(var(--background))",L=l.labelTextColor??"hsl(var(--foreground))",M=`${String(t.xCoordinate)}-${u}`;return g.jsxs("div",{className:"absolute top-2 px-2 py-1 rounded text-xs font-medium whitespace-nowrap shadow-sm border border-border",style:{left:r,transform:"translateX(-50%)",backgroundColor:p,color:L},children:[u&&g.jsx("span",{className:"block",children:u}),d&&g.jsx("span",{className:he.cn("block",u&&"mt-0.5"),children:d})]},M)})}),g.jsx("div",{ref:le,className:"LightweightChart w-full h-full overflow-hidden"})]})}function Ge({series:e,onUnselect:b}){return g.jsx("div",{className:"absolute top-0 left-2 z-[10] flex flex-wrap gap-2",children:e.map((s,N)=>{const m=be(N),w=(s.lineColor??s.color)||m.line,H=s.data.length===0;return g.jsxs("div",{className:he.cn("flex items-center gap-1.5 px-2 py-1 bg-background/80 backdrop-blur-sm rounded border border-border",H&&"opacity-50"),children:[g.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:w}}),g.jsxs("span",{className:"text-[10px] sm:text-xs font-medium text-foreground",children:[s.label,H&&" (no data)"]}),b&&g.jsx("button",{type:"button",onClick:S=>{S.stopPropagation(),b(s.label)},className:"ml-1 flex items-center justify-center w-4 h-4 rounded-sm hover:bg-muted transition-colors cursor-pointer","aria-label":`Remove ${s.label}`,children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground hover:text-foreground","aria-hidden":"true",children:[g.jsx("title",{children:"Close"}),g.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},s.label)})})}exports.DEFAULT_SERIES_COLORS=te;exports.Graph=Be;exports.getSeriesColorPalette=be;exports.getStepForwardValue=Pe;exports.getVerticalLineTooltipContent=Me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),re=require("lightweight-charts"),g=require("react"),$e=require("../../hooks/use-media-query.cjs"),pe=require("../../utils/cn.cjs"),j=require("../../utils/colors.cjs"),ne=require("./default-config.cjs"),K=require("./formatters.cjs"),Ge=require("./graph-current-value.cjs"),Ye=require("./graph-tooltip.cjs"),Oe=require("./plugins/vertical-line.cjs");function He(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const p=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(c,s,p.get?p:{enumerable:!0,get:()=>e[s]})}}return c.default=e,Object.freeze(c)}const be=He(g);class Xe{_yTop;_yBottom;_color;constructor(c,s,p){this._yTop=c,this._yBottom=s,this._color=p}draw(c){c.useBitmapCoordinateSpace(s=>{const p=s.context,h=s.verticalPixelRatio,R=this._yTop===null?0:this._yTop*h,A=this._yBottom===null?s.bitmapSize.height:this._yBottom*h,C=Math.min(R,A),N=Math.max(R,A);p.fillStyle=this._color,p.fillRect(0,C,s.bitmapSize.width,N-C)})}}class Ze{_source;_yTop=null;_yBottom=null;constructor(c){this._source=c}update(){const c=this._source.series;this._yTop=this._source.priceTop===void 0?null:c.priceToCoordinate(this._source.priceTop),this._yBottom=this._source.priceBottom===void 0?null:c.priceToCoordinate(this._source.priceBottom)}zOrder(){return"bottom"}renderer(){return new Xe(this._yTop,this._yBottom,this._source.color)}}class Ke{series;priceTop;priceBottom;color;_paneViews;constructor(c,s,p,h){this.series=c,this.priceTop=s,this.priceBottom=p,this.color=h,this._paneViews=[new Ze(this)]}updateAllViews(){for(const c of this._paneViews)c.update()}paneViews(){return this._paneViews}}function Le(e,c,s){const p=e.labelText??"",h=e.value,R=h===void 0?"":typeof h=="number"?c==="$"?`$${K.formatExactValue(h,void 0,s)}`:c==="%"?`${K.formatExactValue(h,void 0,s)}%`:K.formatExactValue(h,c!=="none"&&c!=="%"&&c!=="$"?c:void 0,s):String(h);return{labelText:p,valueStr:R}}function je(e,c){for(let s=e.length-1;s>=0;s--)if(Number(e[s].time)<=c)return e[s].value;return 0}const ae=[{line:"#02c39a",top:"rgba(2, 195, 154, 0.56)",bottom:"rgba(2, 195, 154, 0.04)"},{line:"#3b82f6",top:"rgba(59, 130, 246, 0.56)",bottom:"rgba(59, 130, 246, 0.04)"},{line:"#ef4444",top:"rgba(239, 68, 68, 0.56)",bottom:"rgba(239, 68, 68, 0.04)"},{line:"#f59e0b",top:"rgba(245, 158, 11, 0.56)",bottom:"rgba(245, 158, 11, 0.04)"},{line:"#8b5cf6",top:"rgba(139, 92, 246, 0.56)",bottom:"rgba(139, 92, 246, 0.04)"},{line:"#ec4899",top:"rgba(236, 72, 153, 0.56)",bottom:"rgba(236, 72, 153, 0.04)"},{line:"#06b6d4",top:"rgba(6, 182, 212, 0.56)",bottom:"rgba(6, 182, 212, 0.04)"},{line:"#ea580c",top:"rgba(234, 88, 12, 0.56)",bottom:"rgba(234, 88, 12, 0.04)"},{line:"#84cc16",top:"rgba(132, 204, 22, 0.56)",bottom:"rgba(132, 204, 22, 0.04)"},{line:"#d946ef",top:"rgba(217, 70, 239, 0.56)",bottom:"rgba(217, 70, 239, 0.04)"},{line:"#0ea5e9",top:"rgba(14, 165, 233, 0.56)",bottom:"rgba(14, 165, 233, 0.04)"},{line:"#14b8a6",top:"rgba(20, 184, 166, 0.56)",bottom:"rgba(20, 184, 166, 0.04)"},{line:"#eab308",top:"rgba(234, 179, 8, 0.56)",bottom:"rgba(234, 179, 8, 0.04)"},{line:"#f43f5e",top:"rgba(244, 63, 94, 0.56)",bottom:"rgba(244, 63, 94, 0.04)"},{line:"#6366f1",top:"rgba(99, 102, 241, 0.56)",bottom:"rgba(99, 102, 241, 0.04)"},{line:"#10b981",top:"rgba(16, 185, 129, 0.56)",bottom:"rgba(16, 185, 129, 0.04)"},{line:"#78716c",top:"rgba(120, 113, 108, 0.56)",bottom:"rgba(120, 113, 108, 0.04)"},{line:"#64748b",top:"rgba(100, 116, 139, 0.56)",bottom:"rgba(100, 116, 139, 0.04)"},{line:"#475569",top:"rgba(71, 85, 105, 0.56)",bottom:"rgba(71, 85, 105, 0.04)"}],Qe=137.5;function ve(e){if(e<ae.length)return ae[e];const s=(e-ae.length)*Qe%360,p=j.hslToHex(s,70,50),{topColor:h,bottomColor:R}=j.generateColorsFromBase(p);return{line:p,top:h,bottom:R}}function Je({series:e,className:c,showLegend:s=!1,onUnselectSeries:p,xMeasureUnit:h="time",yMeasureUnit:R="token",optionsOverrides:A,verticalLineOptions:C,priceLineOptions:N,zoneOptions:I,currentValueDecimals:le,useSharedPriceScale:D=!1,showCurrentValue:De=!0,graphTitle:se,yScaleMin:Ce,yScaleMinMultiple:xe,visibleTimeFrom:G,disableZoom:U=!1}){const T=g.useRef(null),x=g.useRef(new Map),ie=g.useRef(!1),Se=g.useRef(!0),ce=g.useRef(null),Fe=g.useRef(null),Y=g.useRef(null),ue=g.useRef(null),ee=g.useRef(null),P=$e.useIsMobile(),z=be.useMemo(()=>e.flatMap(t=>t.data),[e]),Be=be.useMemo(()=>{if(e.length>0){const t=e[e.length-1];if(t.data.length>0)return t.data[t.data.length-1]}},[e]),[ye,fe]=g.useState(()=>{if(!Be)return;const t=new Map;for(const l of e)l.data.length>0&&t.set(l.label,l.data[l.data.length-1]);return t}),[Re,q]=g.useState(null),[we,Ve]=g.useState([]);g.useEffect(()=>{const t=()=>{try{if(T.current&&Y.current){const r=Y.current.clientWidth,i=Y.current.clientHeight;T.current.resize(r,i)}}catch{}},l=Y.current,n=l?new ResizeObserver(t):null;return ee.current=n,l&&n?.observe(l),()=>{l&&n?.unobserve(l),n?.disconnect(),ee.current=null}},[]),g.useEffect(()=>{if(!ue.current||ie.current)return;const t=ne.getDefaultOptions(),l=j.resolveCSSColor("hsl(var(--foreground))","rgb(0, 0, 0)"),n=U?{handleScale:{mouseWheel:!1,pinch:!1,axisPressedMouseMove:!1,axisDoubleClickReset:!1},handleScroll:{mouseWheel:!1,pressedMouseMove:!1,horzTouchDrag:!1,vertTouchDrag:!1}}:{},r=re.createChart(ue.current,{...t,rightPriceScale:{...t.rightPriceScale||{},visible:!P,textColor:l},...P&&{crosshair:{...t.crosshair,mode:re.CrosshairMode.Magnet}},...n,...A});return T.current=r,ie.current=!0,()=>{ee.current?.disconnect(),ee.current=null,r.remove(),T.current=null,ie.current=!1,x.current.clear()}},[P,A,U]),g.useEffect(()=>{const t=T.current;t&&t.applyOptions(U?{handleScale:{mouseWheel:!1,pinch:!1,axisPressedMouseMove:!1,axisDoubleClickReset:!1},handleScroll:{mouseWheel:!1,pressedMouseMove:!1,horzTouchDrag:!1,vertTouchDrag:!1}}:{handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!0,axisDoubleClickReset:!0},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}})},[U]),g.useEffect(()=>{const t=T.current;if(!t||e.length===0)return;const n=e.filter(o=>o.data.length>0).length<=1?Ce:xe,r=h==="time"?K.getXFormatters(h,z):K.getXFormatters(h),i=z.map(o=>o.value),{formatter:u,tickmarksFormatter:d,updateVisibleRange:F,updateLastValues:v}=K.createAdaptiveYAxisFormatter(i,R,{yScaleMin:n});ce.current=F,Fe.current=v;const B=e.filter(o=>o.data.length>0).map(o=>o.data[o.data.length-1].value);v(B);const M=ne.getDefaultOptions();t.applyOptions({localization:{...M.localization||{},timeFormatter:o=>r.timeFormatter(parseFloat(o),void 0)},timeScale:{...M.timeScale||{},tickMarkFormatter:r.tickMarkFormatter,minBarSpacing:0}});const b=(z.length>0?Math.min(...z.map(o=>o.value)):0)<0,V=z.some(o=>o.value===0),S=!b&&V,w=e.length>1&&!D,y=e.length>1&&!D||P,W=j.resolveCSSColor("hsl(var(--foreground))","rgb(0, 0, 0)");t.applyOptions({rightPriceScale:{...M.rightPriceScale||{},visible:!y,textColor:W,...S&&{scaleMargins:{top:.3,bottom:0}}}});const Q=new Set(x.current.keys()),ge=new Set(e.map(o=>o.label));for(const o of Q)if(!ge.has(o)){const a=x.current.get(o);a&&(t.removeSeries(a),x.current.delete(o))}const Ee=ne.getDefaultSeries(),he=[];let oe=0;const Ne=e.find(o=>o.data.length>0),J=new Map;if(N&&N.length>0)for(const o of N){if(!Number.isFinite(o.price))continue;const a=o.seriesLabel??Ne?.label;if(!a)continue;const _=J.get(a)??[];_.push(o.price),J.set(a,_)}if(I&&I.length>0)for(const o of I){const a=o.seriesLabel??Ne?.label;if(!a)continue;const _=J.get(a)??[];Number.isFinite(o.priceTop)&&_.push(o.priceTop),Number.isFinite(o.priceBottom)&&_.push(o.priceBottom),J.set(a,_)}for(let o=0;o<e.length;o++){const a=e[o],_=ve(o),O=a.lineColor??a.color??_.line;let $,H;if(a.lineColor??a.color)if(a.topColor&&a.bottomColor)$=a.topColor,H=a.bottomColor;else if(a.topColor){const f=j.generateColorsFromBase(O);$=a.topColor,H=f.bottomColor}else if(a.bottomColor)$=j.generateColorsFromBase(O).topColor,H=a.bottomColor;else{const f=j.generateColorsFromBase(O);$=f.topColor,H=f.bottomColor}else $=a.topColor||_.top,H=a.bottomColor||_.bottom;if(a.data.length===0){const f=x.current.get(a.label);f&&(t.removeSeries(f),x.current.delete(a.label));continue}const Ae=(a.data.length>0?Math.min(...a.data.map(f=>f.value)):0)<0,Ie=a.data.some(f=>f.value===0),ze=!Ae&&Ie,Te=D||!w||oe===0?"right":`scale-${oe}`;w&&he.push({priceScaleId:Te||"right",shouldPreventNegativeAxis:ze,seriesIndex:oe});const Pe=(D||!w)&&n!==void 0&&typeof n=="number",qe=J.get(a.label)??[],Me={lineColor:O,topColor:$,bottomColor:H,priceScaleId:Te,priceFormat:{type:"custom",minMove:.01,formatter:Pe&&typeof n=="number"?f=>u(f<n?n:f):u,tickmarksFormatter:d},autoscaleInfoProvider:f=>{const L=f();if(L?.priceRange){Pe&&(L.priceRange.minValue=n);for(const E of qe)E<L.priceRange.minValue&&(L.priceRange.minValue=E),E>L.priceRange.maxValue&&(L.priceRange.maxValue=E)}return L}};let X=x.current.get(a.label);const Z=a.data.map(f=>({...f,time:f.time}));if(G!==void 0&&Z.length>0&&Number(Z[0].time)>G){const f=Number(Z[0].time),L=f-G,E=86400,We=L>180*E?7*E:L>30*E?E:6*3600,ke=[];for(let me=G;me<f;me+=We)ke.push({time:me});Z.unshift(...ke)}X?(X.applyOptions(Me),X.setData(Z)):(X=t.addSeries(re.AreaSeries,{...Ee,...Me}),X.setData(Z),x.current.set(a.label,X)),oe++}if(w&&he.length>0)for(const o of he)try{const a=t.priceScale(o.priceScaleId);a&&a.applyOptions({visible:!1,autoScale:!0,scaleMargins:{top:.1,bottom:.1,...o.shouldPreventNegativeAxis&&{top:.3,bottom:0}},alignLabels:!0,borderVisible:!0,borderColor:"rgba(224, 227, 235, 0.1)",entireTextOnly:!1,textColor:W})}catch(a){console.warn(`Failed to configure price scale ${o.priceScaleId} for series ${o.seriesIndex}:`,a)}else if(!w)try{const o=t.priceScale("right");o&&o.applyOptions({visible:!P,autoScale:!0,scaleMargins:{top:.1,bottom:n!==void 0||S?0:.1,...S&&{top:.3}},alignLabels:!0,borderVisible:!0,borderColor:"rgba(224, 227, 235, 0.1)",entireTextOnly:!1,textColor:W})}catch{}if(n!==void 0&&!P&&(D||!w)&&t.applyOptions({handleScroll:{vertTouchDrag:!1}}),z.length>0){const o=z.map($=>Number($.time)),a=Math.min(...o),_=G!==void 0?Math.min(G,a):a,O=Math.max(...o);t.timeScale().setVisibleRange({from:_,to:O})}Se.current&&(Se.current=!1);const de=new Map;for(const o of e)o.data.length>0&&de.set(o.label,o.data[o.data.length-1]);fe(de.size>0?de:void 0)},[e,z,h,R,P,D,Ce,xe,G,N,I]),g.useEffect(()=>{const t=T.current;if(!t||e.length===0)return;const l=e.length===1;let n;for(const i of e)if(i.data.length>0){n=i.data[i.data.length-1].time;break}if(!n)return;const r=i=>{const{time:u=n,seriesData:d,point:F}=i||{},v=Array.from(x.current.values());if(!F||!u){const k=new Map;for(const b of e)b.data.length>0&&k.set(b.label,b.data[b.data.length-1]);if(fe(k.size>0?k:void 0),l||D)q(null);else if(v[0]&&n){const V=t.timeScale().timeToCoordinate(n),S=e[0];if(S.data.length>0){const w=S.data[S.data.length-1].value,y=v[0].priceToCoordinate(w);V!==null&&y!==null&&q({x:V,y})}}return}const B=new Map;let M;for(let k=0;k<e.length;k++){const b=e[k],V=v[k];if(!V)continue;const S=d?.get(V),w=S&&"value"in S?S.value:void 0;let y;if(w!==void 0)y=w;else if(l){const W=Number(u),Q=b.data.length>0?Number(b.data[0].time):Number.POSITIVE_INFINITY;W<Q?y=Number.NaN:y=b.data[b.data.length-1]?.value??0}else y=je(b.data,Number(u));Number.isNaN(y)||(M===void 0&&(M=y),B.set(b.label,{value:y,time:u}))}if(fe(B),M!==void 0&&v[0]){const b=t.timeScale().timeToCoordinate(u),V=v[0].priceToCoordinate(M);if(b!==null&&V!==null){const S=Y.current;if(S){const w=S.querySelector(".LightweightChart");if(w){const y=w.getBoundingClientRect(),W=S.getBoundingClientRect(),Q=b+(y.left-W.left),ge=V+(y.top-W.top);q({x:Q,y:ge})}else q({x:b,y:V})}else q({x:b,y:V})}else q(null)}else q(null)};return t.subscribeCrosshairMove(r),P&&t.subscribeClick(r),!l&&!D&&requestAnimationFrame(()=>{const i=Array.from(x.current.values());if(i[0]&&n&&e[0]?.data.length>0){const d=t.timeScale().timeToCoordinate(n),F=e[0].data[e[0].data.length-1].value,v=i[0].priceToCoordinate(F);d!==null&&v!==null&&q({x:d,y:v})}}),()=>{t.unsubscribeCrosshairMove(r),P&&t.unsubscribeClick(r)}},[e,D,P]),g.useEffect(()=>{const t=T.current;if(!t||e.length===0)return;const l=t.timeScale(),n=()=>{if(!ce.current)return;const r=l.getVisibleRange();if(!r)return;const i=Number(r.from),u=Number(r.to),d=[];for(const F of e)for(const v of F.data){const B=Number(v.time);B>=i&&B<=u&&d.push(v.value)}d.length>0&&ce.current(d)};return l.subscribeVisibleLogicalRangeChange(n),()=>{l.unsubscribeVisibleLogicalRangeChange(n)}},[e]),g.useEffect(()=>{const t=T.current,l=Array.from(x.current.values()),n=[];if(t&&l.length>0&&C){const r=ne.getDefaultVerticalLine(),i=l[0];for(const u of C){const d=new Oe.VertLine(t,i,u.xCoordinate,{...r,...u.options||{}});i.attachPrimitive(d),n.push(d)}}return()=>{if(l.length>0){const r=l[0];for(const i of n)r.detachPrimitive(i)}}},[C,e]),g.useEffect(()=>{const t=[];if(N&&N.length>0){const l=Array.from(x.current.values())[0],n=j.resolveCSSColor("hsl(var(--destructive))","rgb(239, 68, 68)");for(const r of N){if(!Number.isFinite(r.price))continue;const i=r.seriesLabel?x.current.get(r.seriesLabel):l;if(!i)continue;const u=i.createPriceLine({price:r.price,color:r.color?j.resolveCSSColor(r.color,r.color):n,lineWidth:r.lineWidth??1,lineStyle:r.lineStyle??re.LineStyle.Dashed,axisLabelVisible:r.axisLabelVisible??!0,title:r.title??""});t.push({series:i,line:u})}}return()=>{for(const{series:l,line:n}of t)try{l.removePriceLine(n)}catch{}}},[N,e]),g.useEffect(()=>{const t=[];if(I&&I.length>0){const l=Array.from(x.current.values())[0],n="rgba(239, 68, 68, 0.12)";for(const r of I){const i=r.seriesLabel?x.current.get(r.seriesLabel):l;if(!i)continue;const u=r.color?j.resolveCSSColor(r.color,n):n,d=new Ke(i,r.priceTop,r.priceBottom,u);i.attachPrimitive(d),t.push({series:i,zone:d})}}return()=>{for(const{series:l,zone:n}of t)try{l.detachPrimitive(n)}catch{}}},[I,e]),g.useEffect(()=>{const t=T.current;if(!t||!C?.length){Ve([]);return}const l=()=>{const i=t.timeScale(),u=C.map(d=>i.timeToCoordinate(d.xCoordinate)??null);Ve(u)};l();const n=t.timeScale(),r=()=>{l()};return n.subscribeVisibleLogicalRangeChange(r),()=>{n.unsubscribeVisibleLogicalRangeChange(r)}},[C,e]);const te=e.length===1,_e=be.useMemo(()=>{if(te&&e.length>0){const t=e[0];if(t.data.length>0)return t.data[t.data.length-1]}},[te,e]);return m.jsxs("div",{ref:Y,className:pe.cn("relative z-[1] w-full h-full overflow-hidden p-0",c),children:[se!=null&&se!==!1&&te?m.jsx("div",{className:"absolute top-2 left-2 right-2 z-[100] pointer-events-none",children:m.jsx("div",{className:"text-xl sm:text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis",children:se})}):De&&te&&_e&&m.jsx(Ge.GraphCurrentValue,{point:_e,xMeasureUnit:h,yMeasureUnit:R,decimals:le}),ye&&Re&&m.jsx(Ye.GraphTooltip,{points:ye,xMeasureUnit:h,yMeasureUnit:R,series:e,position:Re,containerRef:Y,decimals:le}),s&&m.jsx(Ue,{series:e,onUnselect:p}),C&&C.length>0&&we.length===C.length&&m.jsx("div",{className:"absolute inset-0 z-[5] pointer-events-none","aria-hidden":!0,children:C.map((t,l)=>{const n=we[l],r=t.options??{},i=r.showLabel!==!1;if(n===null||!i)return null;const{labelText:u,valueStr:d}=Le(r,R,le);if(!(u||d))return null;const v=r.labelBackgroundColor??r.color??"hsl(var(--background))",B=r.labelTextColor??"hsl(var(--foreground))",M=`${String(t.xCoordinate)}-${u}`;return m.jsxs("div",{className:"absolute top-2 px-2 py-1 rounded text-xs font-medium whitespace-nowrap shadow-sm border border-border",style:{left:n,transform:"translateX(-50%)",backgroundColor:v,color:B},children:[u&&m.jsx("span",{className:"block",children:u}),d&&m.jsx("span",{className:pe.cn("block",u&&"mt-0.5"),children:d})]},M)})}),m.jsx("div",{ref:ue,className:"LightweightChart w-full h-full overflow-hidden"})]})}function Ue({series:e,onUnselect:c}){return m.jsx("div",{className:"absolute top-0 left-2 z-[10] flex flex-wrap gap-2",children:e.map((s,p)=>{const h=ve(p),R=(s.lineColor??s.color)||h.line,A=s.data.length===0;return m.jsxs("div",{className:pe.cn("flex items-center gap-1.5 px-2 py-1 bg-background/80 backdrop-blur-sm rounded border border-border",A&&"opacity-50"),children:[m.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:R}}),m.jsxs("span",{className:"text-[10px] sm:text-xs font-medium text-foreground",children:[s.label,A&&" (no data)"]}),c&&m.jsx("button",{type:"button",onClick:C=>{C.stopPropagation(),c(s.label)},className:"ml-1 flex items-center justify-center w-4 h-4 rounded-sm hover:bg-muted transition-colors cursor-pointer","aria-label":`Remove ${s.label}`,children:m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground hover:text-foreground","aria-hidden":"true",children:[m.jsx("title",{children:"Close"}),m.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},s.label)})})}exports.DEFAULT_SERIES_COLORS=ae;exports.Graph=Je;exports.getSeriesColorPalette=ve;exports.getStepForwardValue=je;exports.getVerticalLineTooltipContent=Le;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../_virtual/index.cjs"),e=require("tailwindcss-animate"),r={darkMode:"class",safelist:["z-[400]","z-[600]","z-[650]","z-[700]","z-[800]","z-[9000]","z-[10000]",{pattern:/^grid-cols-(1|2|3|4|5|6|7|8|9|10|11|12)$/},{pattern:/^(xs|sm|md|lg|xl):grid-cols-(1|2|3|4|5|6|7|8|9|10|11|12)$/},{pattern:/^col-span-(1|2|3|4|5|6|7|8|9|10|11|12|full|auto)$/},{pattern:/^(xs|sm|md|lg|xl):col-span-(1|2|3|4|5|6|7|8|9|10|11|12|full|auto)$/},{pattern:/^col-start-(1|2|3|4|5|6|7|8|9|10|11|12|13|auto)$/},{pattern:/^order-(1|2|3|4|5|6|7|8|9|10|11|12|first|last|none)$/},{pattern:/^gap-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/},{pattern:/^gap-(x|y)-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/},{pattern:/^space-(x|y)-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/},{pattern:/^(xs|sm|md|lg|xl):space-(x|y)-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/}],theme:{extend:{screens:{xs:"500px"},colors:{background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",card:{DEFAULT:"hsl(var(--card))",foreground:"hsl(var(--card-foreground))"},popover:{DEFAULT:"hsl(var(--popover))",foreground:"hsl(var(--popover-foreground))"},primary:{DEFAULT:"hsl(var(--primary))",foreground:"hsl(var(--primary-foreground))"},secondary:{DEFAULT:"hsl(var(--secondary))",foreground:"hsl(var(--secondary-foreground))"},muted:{DEFAULT:"hsl(var(--muted))",foreground:"hsl(var(--muted-foreground))"},accent:{DEFAULT:"hsl(var(--accent))",foreground:"hsl(var(--accent-foreground))"},destructive:{DEFAULT:"hsl(var(--destructive))",foreground:"hsl(var(--destructive-foreground))"},success:"hsl(var(--success))","success-foreground":"hsl(var(--success-foreground))","success-hover":"hsl(var(--success-hover))",warning:"hsl(var(--warning))",liquidation:"hsl(var(--liquidation))",border:"hsl(var(--border))",input:"hsl(var(--input))",ring:"hsl(var(--ring))","text-secondary":"hsl(var(--text-secondary))","dropdown-dark-button":"hsl(var(--dropdown-dark-button))",white:"hsl(var(--white))",black:"hsl(var(--black))",gray:{10:"hsl(var(--gray-10))",20:"hsl(var(--gray-20))",30:"hsl(var(--gray-30))",40:"hsl(var(--gray-40))",50:"hsl(var(--gray-50))",60:"hsl(var(--gray-60))",70:"hsl(var(--gray-70))",80:"hsl(var(--gray-80))",90:"hsl(var(--gray-90))",100:"hsl(var(--gray-100))",110:"hsl(var(--gray-110))"},chart:{1:"hsl(var(--chart-1))",2:"hsl(var(--chart-2))",3:"hsl(var(--chart-3))",4:"hsl(var(--chart-4))",5:"hsl(var(--chart-5))"}},fontFamily:{sans:["Rubik","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","sans-serif"]},borderRadius:{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"}}},plugins:[e,a({nocompatible:!0})]};exports.default=r;exports.preset=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../_virtual/index.cjs"),e=require("tailwindcss-animate"),r={darkMode:"class",safelist:["z-[400]","z-[600]","z-[650]","z-[700]","z-[800]","z-[9000]","z-[10000]",{pattern:/^grid-cols-(1|2|3|4|5|6|7|8|9|10|11|12)$/},{pattern:/^(xs|sm|md|lg|xl):grid-cols-(1|2|3|4|5|6|7|8|9|10|11|12)$/},{pattern:/^col-span-(1|2|3|4|5|6|7|8|9|10|11|12|full|auto)$/},{pattern:/^(xs|sm|md|lg|xl):col-span-(1|2|3|4|5|6|7|8|9|10|11|12|full|auto)$/},{pattern:/^col-start-(1|2|3|4|5|6|7|8|9|10|11|12|13|auto)$/},{pattern:/^order-(1|2|3|4|5|6|7|8|9|10|11|12|first|last|none)$/},{pattern:/^gap-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/},{pattern:/^gap-(x|y)-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/},{pattern:/^space-(x|y)-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/},{pattern:/^(xs|sm|md|lg|xl):space-(x|y)-(0|1|2|3|4|5|6|7|8|9|10|12|16|20|24)$/}],theme:{extend:{screens:{xs:"500px"},colors:{background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",card:{DEFAULT:"hsl(var(--card))",foreground:"hsl(var(--card-foreground))"},popover:{DEFAULT:"hsl(var(--popover))",foreground:"hsl(var(--popover-foreground))"},primary:{DEFAULT:"hsl(var(--primary))",foreground:"hsl(var(--primary-foreground))"},secondary:{DEFAULT:"hsl(var(--secondary))",foreground:"hsl(var(--secondary-foreground))"},muted:{DEFAULT:"hsl(var(--muted))",foreground:"hsl(var(--muted-foreground))"},accent:{DEFAULT:"hsl(var(--accent))",foreground:"hsl(var(--accent-foreground))"},destructive:{DEFAULT:"hsl(var(--destructive))",foreground:"hsl(var(--destructive-foreground))"},success:"hsl(var(--success))","success-foreground":"hsl(var(--success-foreground))","success-hover":"hsl(var(--success-hover))",warning:"hsl(var(--warning))",liquidation:"hsl(var(--liquidation))","liquidation-line":"hsl(var(--liquidation-line))",border:"hsl(var(--border))",input:"hsl(var(--input))",ring:"hsl(var(--ring))","text-secondary":"hsl(var(--text-secondary))","dropdown-dark-button":"hsl(var(--dropdown-dark-button))",white:"hsl(var(--white))",black:"hsl(var(--black))",gray:{10:"hsl(var(--gray-10))",20:"hsl(var(--gray-20))",30:"hsl(var(--gray-30))",40:"hsl(var(--gray-40))",50:"hsl(var(--gray-50))",60:"hsl(var(--gray-60))",70:"hsl(var(--gray-70))",80:"hsl(var(--gray-80))",90:"hsl(var(--gray-90))",100:"hsl(var(--gray-100))",110:"hsl(var(--gray-110))"},chart:{1:"hsl(var(--chart-1))",2:"hsl(var(--chart-2))",3:"hsl(var(--chart-3))",4:"hsl(var(--chart-4))",5:"hsl(var(--chart-5))"}},fontFamily:{sans:["Rubik","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","sans-serif"]},borderRadius:{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"}}},plugins:[e,a({nocompatible:!0})]};exports.default=r;exports.preset=r;