easy_ml 0.2.0.pre.rc49 → 0.2.0.pre.rc51
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.
- checksums.yaml +4 -4
- data/app/frontend/components/dataset/ColumnFilters.tsx +1 -1
- data/app/jobs/easy_ml/training_job.rb +1 -0
- data/app/models/easy_ml/column.rb +0 -4
- data/app/models/easy_ml/retraining_job.rb +1 -0
- data/lib/easy_ml/version.rb +1 -1
- data/public/easy_ml/assets/.vite/manifest.json +1 -1
- data/public/easy_ml/assets/assets/entrypoints/{Application.tsx-u6L4jkNy.js → Application.tsx-D08fSV1N.js} +2 -2
- data/public/easy_ml/assets/assets/entrypoints/{Application.tsx-u6L4jkNy.js.map → Application.tsx-D08fSV1N.js.map} +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85c308aa34a6b29c804fc0e4c5eb44533ed046574f57563cbb0498148d159f2e
|
4
|
+
data.tar.gz: 16e352d22d97647027727a2b1964439f04e8b8e892472aa3ed4c900eba49e669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fa1d47922112250c8d090105f37cab786742dd7e28872ba55565e08b9a1e6c67da8ac250254408874972adbca3e91c175edaa142effe9aaaaadd6620d9609a8
|
7
|
+
data.tar.gz: 737911077cc895c1b92f159e94f0cc8b565803c75e110b3ac4ffb70993427163e0fb7c52ec79b309f99a729dd00c5d9c60232ab1afc7addff264c641f9b6ee72
|
@@ -54,7 +54,7 @@ export function ColumnFilters({
|
|
54
54
|
};
|
55
55
|
|
56
56
|
const columnsWithNulls = columns
|
57
|
-
.filter(col => col.statistics?.processed
|
57
|
+
.filter(col => col.statistics?.processed?.null_count && col.statistics?.processed?.null_count > 0)
|
58
58
|
.sort((a, b) => calculateNullPercentage(b) - calculateNullPercentage(a));
|
59
59
|
|
60
60
|
const [currentPage, setCurrentPage] = useState(1);
|
data/lib/easy_ml/version.rb
CHANGED
@@ -404,7 +404,7 @@ __p += '`),$e&&(X+=`' +
|
|
404
404
|
function print() { __p += __j.call(arguments, '') }
|
405
405
|
`:`;
|
406
406
|
`)+X+`return __p
|
407
|
-
}`;var Ae=Xy(function(){return ze(j,me+"return "+X).apply(n,P)});if(Ae.source=X,hp(Ae))throw Ae;return Ae}function gk(s){return Ue(s).toLowerCase()}function yk(s){return Ue(s).toUpperCase()}function xk(s,o,c){if(s=Ue(s),s&&(c||o===n))return i0(s);if(!s||!(o=An(o)))return s;var p=lr(s),v=lr(o),j=o0(p,v),P=a0(p,v)+1;return ks(p,j,P).join("")}function vk(s,o,c){if(s=Ue(s),s&&(c||o===n))return s.slice(0,u0(s)+1);if(!s||!(o=An(o)))return s;var p=lr(s),v=a0(p,lr(o))+1;return ks(p,0,v).join("")}function bk(s,o,c){if(s=Ue(s),s&&(c||o===n))return s.replace(ya,"");if(!s||!(o=An(o)))return s;var p=lr(s),v=o0(p,lr(o));return ks(p,v).join("")}function wk(s,o){var c=H,p=fe;if(lt(o)){var v="separator"in o?o.separator:v;c="length"in o?Ee(o.length):c,p="omission"in o?An(o.omission):p}s=Ue(s);var j=s.length;if(no(s)){var P=lr(s);j=P.length}if(c>=j)return s;var T=c-ro(p);if(T<1)return p;var M=P?ks(P,0,T).join(""):s.slice(0,T);if(v===n)return M+p;if(P&&(T+=M.length-T),gp(v)){if(s.slice(T).search(v)){var V,G=M;for(v.global||(v=Of(v.source,Ue(Bn.exec(v))+"g")),v.lastIndex=0;V=v.exec(G);)var X=V.index;M=M.slice(0,X===n?T:X)}}else if(s.indexOf(An(v),T)!=T){var re=M.lastIndexOf(v);re>-1&&(M=M.slice(0,re))}return M+p}function _k(s){return s=Ue(s),s&&pa.test(s)?s.replace(Xl,YS):s}var Sk=co(function(s,o,c){return s+(c?" ":"")+o.toUpperCase()}),vp=Y0("toUpperCase");function Qy(s,o,c){return s=Ue(s),o=c?n:o,o===n?qS(s)?ej(s):FS(s):s.match(o)||[]}var Xy=Te(function(s,o){try{return Mt(s,n,o)}catch(c){return hp(c)?c:new Se(c)}}),jk=es(function(s,o){return Hn(o,function(c){c=Pr(c),Jr(s,c,pp(s[c],s))}),s});function Nk(s){var o=s==null?0:s.length,c=ye();return s=o?it(s,function(p){if(typeof p[1]!="function")throw new Vn(u);return[c(p[0]),p[1]]}):[],Te(function(p){for(var v=-1;++v<o;){var j=s[v];if(Mt(j[0],this,p))return Mt(j[1],this,p)}})}function Ck(s){return Yj(Gn(s,g))}function bp(s){return function(){return s}}function Ek(s,o){return s==null||s!==s?o:s}var kk=Z0(),Ak=Z0(!0);function mn(s){return s}function wp(s){return A0(typeof s=="function"?s:Gn(s,g))}function Pk(s){return T0(Gn(s,g))}function Tk(s,o){return O0(s,Gn(o,g))}var Ok=Te(function(s,o){return function(c){return Ta(c,s,o)}}),Rk=Te(function(s,o){return function(c){return Ta(s,c,o)}});function _p(s,o,c){var p=Ft(o),v=Fu(o,p);c==null&&!(lt(o)&&(v.length||!p.length))&&(c=o,o=s,s=this,v=Fu(o,Ft(o)));var j=!(lt(c)&&"chain"in c)||!!c.chain,P=ns(s);return Hn(v,function(T){var M=o[T];s[T]=M,P&&(s.prototype[T]=function(){var V=this.__chain__;if(j||V){var G=s(this.__wrapped__),X=G.__actions__=dn(this.__actions__);return X.push({func:M,args:arguments,thisArg:s}),G.__chain__=V,G}return M.apply(s,_s([this.value()],arguments))})}),s}function Ik(){return Fe._===this&&(Fe._=oj),this}function Sp(){}function Lk(s){return s=Ee(s),Te(function(o){return R0(o,s)})}var Mk=ep(it),Fk=ep(e0),$k=ep(Nf);function Yy(s){return ap(s)?Cf(Pr(s)):mN(s)}function Dk(s){return function(o){return s==null?n:xi(s,o)}}var zk=ty(),Uk=ty(!0);function jp(){return[]}function Np(){return!1}function Bk(){return{}}function Wk(){return""}function Hk(){return!0}function Vk(s,o){if(s=Ee(s),s<1||s>Q)return[];var c=he,p=Gt(s,he);o=ye(o),s-=he;for(var v=Af(p,o);++c<s;)o(c);return v}function qk(s){return Ne(s)?it(s,Pr):Pn(s)?[s]:dn(yy(Ue(s)))}function Gk(s){var o=++sj;return Ue(s)+o}var Kk=Wu(function(s,o){return s+o},0),Qk=tp("ceil"),Xk=Wu(function(s,o){return s/o},1),Yk=tp("floor");function Jk(s){return s&&s.length?Mu(s,mn,zf):n}function Zk(s,o){return s&&s.length?Mu(s,ye(o,2),zf):n}function e4(s){return r0(s,mn)}function t4(s,o){return r0(s,ye(o,2))}function n4(s){return s&&s.length?Mu(s,mn,Hf):n}function r4(s,o){return s&&s.length?Mu(s,ye(o,2),Hf):n}var s4=Wu(function(s,o){return s*o},1),i4=tp("round"),o4=Wu(function(s,o){return s-o},0);function a4(s){return s&&s.length?kf(s,mn):0}function l4(s,o){return s&&s.length?kf(s,ye(o,2)):0}return _.after=PC,_.ary=ky,_.assign=yE,_.assignIn=By,_.assignInWith=nc,_.assignWith=xE,_.at=vE,_.before=Ay,_.bind=pp,_.bindAll=jk,_.bindKey=Py,_.castArray=BC,_.chain=Ny,_.chunk=YN,_.compact=JN,_.concat=ZN,_.cond=Nk,_.conforms=Ck,_.constant=bp,_.countBy=aC,_.create=bE,_.curry=Ty,_.curryRight=Oy,_.debounce=Ry,_.defaults=wE,_.defaultsDeep=_E,_.defer=TC,_.delay=OC,_.difference=e2,_.differenceBy=t2,_.differenceWith=n2,_.drop=r2,_.dropRight=s2,_.dropRightWhile=i2,_.dropWhile=o2,_.fill=a2,_.filter=uC,_.flatMap=fC,_.flatMapDeep=pC,_.flatMapDepth=mC,_.flatten=wy,_.flattenDeep=l2,_.flattenDepth=u2,_.flip=RC,_.flow=kk,_.flowRight=Ak,_.fromPairs=c2,_.functions=AE,_.functionsIn=PE,_.groupBy=hC,_.initial=f2,_.intersection=p2,_.intersectionBy=m2,_.intersectionWith=h2,_.invert=OE,_.invertBy=RE,_.invokeMap=yC,_.iteratee=wp,_.keyBy=xC,_.keys=Ft,_.keysIn=pn,_.map=Xu,_.mapKeys=LE,_.mapValues=ME,_.matches=Pk,_.matchesProperty=Tk,_.memoize=Ju,_.merge=FE,_.mergeWith=Wy,_.method=Ok,_.methodOf=Rk,_.mixin=_p,_.negate=Zu,_.nthArg=Lk,_.omit=$E,_.omitBy=DE,_.once=IC,_.orderBy=vC,_.over=Mk,_.overArgs=LC,_.overEvery=Fk,_.overSome=$k,_.partial=mp,_.partialRight=Iy,_.partition=bC,_.pick=zE,_.pickBy=Hy,_.property=Yy,_.propertyOf=Dk,_.pull=v2,_.pullAll=Sy,_.pullAllBy=b2,_.pullAllWith=w2,_.pullAt=_2,_.range=zk,_.rangeRight=Uk,_.rearg=MC,_.reject=SC,_.remove=S2,_.rest=FC,_.reverse=dp,_.sampleSize=NC,_.set=BE,_.setWith=WE,_.shuffle=CC,_.slice=j2,_.sortBy=AC,_.sortedUniq=T2,_.sortedUniqBy=O2,_.split=fk,_.spread=$C,_.tail=R2,_.take=I2,_.takeRight=L2,_.takeRightWhile=M2,_.takeWhile=F2,_.tap=J2,_.throttle=DC,_.thru=Qu,_.toArray=Dy,_.toPairs=Vy,_.toPairsIn=qy,_.toPath=qk,_.toPlainObject=Uy,_.transform=HE,_.unary=zC,_.union=$2,_.unionBy=D2,_.unionWith=z2,_.uniq=U2,_.uniqBy=B2,_.uniqWith=W2,_.unset=VE,_.unzip=fp,_.unzipWith=jy,_.update=qE,_.updateWith=GE,_.values=mo,_.valuesIn=KE,_.without=H2,_.words=Qy,_.wrap=UC,_.xor=V2,_.xorBy=q2,_.xorWith=G2,_.zip=K2,_.zipObject=Q2,_.zipObjectDeep=X2,_.zipWith=Y2,_.entries=Vy,_.entriesIn=qy,_.extend=By,_.extendWith=nc,_p(_,_),_.add=Kk,_.attempt=Xy,_.camelCase=JE,_.capitalize=Gy,_.ceil=Qk,_.clamp=QE,_.clone=WC,_.cloneDeep=VC,_.cloneDeepWith=qC,_.cloneWith=HC,_.conformsTo=GC,_.deburr=Ky,_.defaultTo=Ek,_.divide=Xk,_.endsWith=ZE,_.eq=cr,_.escape=ek,_.escapeRegExp=tk,_.every=lC,_.find=cC,_.findIndex=vy,_.findKey=SE,_.findLast=dC,_.findLastIndex=by,_.findLastKey=jE,_.floor=Yk,_.forEach=Cy,_.forEachRight=Ey,_.forIn=NE,_.forInRight=CE,_.forOwn=EE,_.forOwnRight=kE,_.get=yp,_.gt=KC,_.gte=QC,_.has=TE,_.hasIn=xp,_.head=_y,_.identity=mn,_.includes=gC,_.indexOf=d2,_.inRange=XE,_.invoke=IE,_.isArguments=wi,_.isArray=Ne,_.isArrayBuffer=XC,_.isArrayLike=fn,_.isArrayLikeObject=bt,_.isBoolean=YC,_.isBuffer=As,_.isDate=JC,_.isElement=ZC,_.isEmpty=eE,_.isEqual=tE,_.isEqualWith=nE,_.isError=hp,_.isFinite=rE,_.isFunction=ns,_.isInteger=Ly,_.isLength=ec,_.isMap=My,_.isMatch=sE,_.isMatchWith=iE,_.isNaN=oE,_.isNative=aE,_.isNil=uE,_.isNull=lE,_.isNumber=Fy,_.isObject=lt,_.isObjectLike=mt,_.isPlainObject=Fa,_.isRegExp=gp,_.isSafeInteger=cE,_.isSet=$y,_.isString=tc,_.isSymbol=Pn,_.isTypedArray=po,_.isUndefined=dE,_.isWeakMap=fE,_.isWeakSet=pE,_.join=g2,_.kebabCase=nk,_.last=Qn,_.lastIndexOf=y2,_.lowerCase=rk,_.lowerFirst=sk,_.lt=mE,_.lte=hE,_.max=Jk,_.maxBy=Zk,_.mean=e4,_.meanBy=t4,_.min=n4,_.minBy=r4,_.stubArray=jp,_.stubFalse=Np,_.stubObject=Bk,_.stubString=Wk,_.stubTrue=Hk,_.multiply=s4,_.nth=x2,_.noConflict=Ik,_.noop=Sp,_.now=Yu,_.pad=ik,_.padEnd=ok,_.padStart=ak,_.parseInt=lk,_.random=YE,_.reduce=wC,_.reduceRight=_C,_.repeat=uk,_.replace=ck,_.result=UE,_.round=i4,_.runInContext=R,_.sample=jC,_.size=EC,_.snakeCase=dk,_.some=kC,_.sortedIndex=N2,_.sortedIndexBy=C2,_.sortedIndexOf=E2,_.sortedLastIndex=k2,_.sortedLastIndexBy=A2,_.sortedLastIndexOf=P2,_.startCase=pk,_.startsWith=mk,_.subtract=o4,_.sum=a4,_.sumBy=l4,_.template=hk,_.times=Vk,_.toFinite=rs,_.toInteger=Ee,_.toLength=zy,_.toLower=gk,_.toNumber=Xn,_.toSafeInteger=gE,_.toString=Ue,_.toUpper=yk,_.trim=xk,_.trimEnd=vk,_.trimStart=bk,_.truncate=wk,_.unescape=_k,_.uniqueId=Gk,_.upperCase=Sk,_.upperFirst=vp,_.each=Cy,_.eachRight=Ey,_.first=_y,_p(_,function(){var s={};return kr(_,function(o,c){Be.call(_.prototype,c)||(s[c]=o)}),s}(),{chain:!1}),_.VERSION=r,Hn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){_[s].placeholder=_}),Hn(["drop","take"],function(s,o){Le.prototype[s]=function(c){c=c===n?1:Tt(Ee(c),0);var p=this.__filtered__&&!o?new Le(this):this.clone();return p.__filtered__?p.__takeCount__=Gt(c,p.__takeCount__):p.__views__.push({size:Gt(c,he),type:s+(p.__dir__<0?"Right":"")}),p},Le.prototype[s+"Right"]=function(c){return this.reverse()[s](c).reverse()}}),Hn(["filter","map","takeWhile"],function(s,o){var c=o+1,p=c==se||c==pe;Le.prototype[s]=function(v){var j=this.clone();return j.__iteratees__.push({iteratee:ye(v,3),type:c}),j.__filtered__=j.__filtered__||p,j}}),Hn(["head","last"],function(s,o){var c="take"+(o?"Right":"");Le.prototype[s]=function(){return this[c](1).value()[0]}}),Hn(["initial","tail"],function(s,o){var c="drop"+(o?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[c](1)}}),Le.prototype.compact=function(){return this.filter(mn)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=Te(function(s,o){return typeof s=="function"?new Le(this):this.map(function(c){return Ta(c,s,o)})}),Le.prototype.reject=function(s){return this.filter(Zu(ye(s)))},Le.prototype.slice=function(s,o){s=Ee(s);var c=this;return c.__filtered__&&(s>0||o<0)?new Le(c):(s<0?c=c.takeRight(-s):s&&(c=c.drop(s)),o!==n&&(o=Ee(o),c=o<0?c.dropRight(-o):c.take(o-s)),c)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(he)},kr(Le.prototype,function(s,o){var c=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),v=_[p?"take"+(o=="last"?"Right":""):o],j=p||/^find/.test(o);v&&(_.prototype[o]=function(){var P=this.__wrapped__,T=p?[1]:arguments,M=P instanceof Le,V=T[0],G=M||Ne(P),X=function(Oe){var $e=v.apply(_,_s([Oe],T));return p&&re?$e[0]:$e};G&&c&&typeof V=="function"&&V.length!=1&&(M=G=!1);var re=this.__chain__,me=!!this.__actions__.length,xe=j&&!re,Ae=M&&!me;if(!j&&G){P=Ae?P:new Le(this);var ve=s.apply(P,T);return ve.__actions__.push({func:Qu,args:[X],thisArg:n}),new qn(ve,re)}return xe&&Ae?s.apply(this,T):(ve=this.thru(X),xe?p?ve.value()[0]:ve.value():ve)})}),Hn(["pop","push","shift","sort","splice","unshift"],function(s){var o=wu[s],c=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",p=/^(?:pop|shift)$/.test(s);_.prototype[s]=function(){var v=arguments;if(p&&!this.__chain__){var j=this.value();return o.apply(Ne(j)?j:[],v)}return this[c](function(P){return o.apply(Ne(P)?P:[],v)})}}),kr(Le.prototype,function(s,o){var c=_[o];if(c){var p=c.name+"";Be.call(ao,p)||(ao[p]=[]),ao[p].push({name:o,func:c})}}),ao[Bu(n,w).name]=[{name:"wrapper",func:n}],Le.prototype.clone=_j,Le.prototype.reverse=Sj,Le.prototype.value=jj,_.prototype.at=Z2,_.prototype.chain=eC,_.prototype.commit=tC,_.prototype.next=nC,_.prototype.plant=sC,_.prototype.reverse=iC,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=oC,_.prototype.first=_.prototype.head,ja&&(_.prototype[ja]=rC),_},so=tj();vt?((vt.exports=so)._=so,Ge._=so):Fe._=so}).call(Jt)})(Qc,Qc.exports);var Rt=Qc.exports;const Ba=6;function PT({dataset:e}){const[t,n]=A.useState(!1),[r,i]=A.useState(1),l=e.sample_data[0]?Object.keys(e.sample_data[0]):[],u=Math.ceil(e.columns.length/Ba),d=e.columns.slice((r-1)*Ba,r*Ba);return a.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Mn,{className:"w-5 h-5 text-blue-600"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:e.name})]}),a.jsx("p",{className:"text-gray-600 mt-1",children:e.description}),a.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[e.num_rows.toLocaleString()," rows • ",a.jsx("span",{className:"font-medium",children:"Raw:"})," ",e.columns.length," columns • ",a.jsx("span",{className:"font-medium",children:"Processed:"})," ",l.length," columns • Last synced"," ",new Date(e.updated_at).toLocaleDateString()]})]}),a.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800",children:[a.jsx(pT,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium",children:t?"Hide Statistics":"Show Statistics"}),t?a.jsx(Bl,{className:"w-4 h-4"}):a.jsx(aa,{className:"w-4 h-4"})]})]}),a.jsxs("div",{className:"space-y-6",children:[t&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(f=>a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-medium text-gray-900",children:f.name}),a.jsx("span",{className:"text-xs font-medium text-gray-500 px-2 py-1 bg-gray-200 rounded-full",children:f.datatype})]}),a.jsx("p",{className:"text-sm text-gray-600 mb-3",children:f.description}),f.statistics&&a.jsx("div",{className:"space-y-1",children:Object.entries(f.statistics.raw).map(([m,h])=>m==="counts"?null:a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsxs("span",{className:"text-gray-500",children:[m.charAt(0).toUpperCase()+m.slice(1),":"]}),a.jsx("span",{className:"font-medium text-gray-900",children:typeof h=="number"?h.toLocaleString(void 0,{maximumFractionDigits:2}):h})]},m))})]},f.name))}),u>1&&a.jsxs("div",{className:"flex items-center justify-between border-t pt-4",children:[a.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(r-1)*Ba+1," to ",Math.min(r*Ba,e.columns.length)," of ",e.columns.length," columns"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>i(f=>Math.max(1,f-1)),disabled:r===1,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:a.jsx(Pd,{className:"w-5 h-5"})}),a.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",r," of ",u]}),a.jsx("button",{onClick:()=>i(f=>Math.min(u,f+1)),disabled:r===u,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:a.jsx(Go,{className:"w-5 h-5"})})]})]})]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsx("div",{className:"inline-block min-w-full align-middle",children:a.jsx("div",{className:"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5 rounded-lg",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-300",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsx("tr",{children:l.map(f=>a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900",children:f},f))})}),a.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.sample_data.map((f,m)=>a.jsx("tr",{children:l.map(h=>{var g;return a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:(g=f[h])==null?void 0:g.toString()},f[h])})},m))})]})})})})]})]})}function zb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=zb(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function TT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zb(e))&&(r&&(r+=" "),r+=t);return r}const Gx=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Kx=TT,OT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Kx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:l}=t,u=Object.keys(i).map(m=>{const h=n==null?void 0:n[m],g=l==null?void 0:l[m];if(h===null)return null;const y=Gx(h)||Gx(g);return i[m][y]}),d=n&&Object.entries(n).reduce((m,h)=>{let[g,y]=h;return y===void 0||(m[g]=y),m},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((m,h)=>{let{class:g,className:y,...N}=h;return Object.entries(N).every(x=>{let[b,E]=x;return Array.isArray(E)?E.includes({...l,...d}[b]):{...l,...d}[b]===E})?[...m,g,y]:m},[]);return Kx(e,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};function Ub(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ub(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function RT(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ub(e))&&(r&&(r+=" "),r+=t);return r}const Zh="-",IT=e=>{const t=MT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{const d=u.split(Zh);return d[0]===""&&d.length!==1&&d.shift(),Bb(d,t)||LT(u)},getConflictingClassGroupIds:(u,d)=>{const f=n[u]||[];return d&&r[u]?[...f,...r[u]]:f}}},Bb=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Bb(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(Zh);return(u=t.validators.find(({validator:d})=>d(l)))==null?void 0:u.classGroupId},Qx=/^\[(.+)\]$/,LT=e=>{if(Qx.test(e)){const t=Qx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},MT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $T(Object.entries(e.classGroups),n).forEach(([l,u])=>{zm(u,r,l,t)}),r},zm=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:Xx(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(FT(i)){zm(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,u])=>{zm(u,Xx(t,l),n,r)})})},Xx=(e,t)=>{let n=e;return t.split(Zh).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},FT=e=>e.isThemeGetter,$T=(e,t)=>t?e.map(([n,r])=>{const i=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([u,d])=>[t+u,d])):l);return[n,i]}):e,DT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(l,u)=>{n.set(l,u),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let u=n.get(l);if(u!==void 0)return u;if((u=r.get(l))!==void 0)return i(l,u),u},set(l,u){n.has(l)?n.set(l,u):i(l,u)}}},Wb="!",zT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],l=t.length,u=d=>{const f=[];let m=0,h=0,g;for(let E=0;E<d.length;E++){let w=d[E];if(m===0){if(w===i&&(r||d.slice(E,E+l)===t)){f.push(d.slice(h,E)),h=E+l;continue}if(w==="/"){g=E;continue}}w==="["?m++:w==="]"&&m--}const y=f.length===0?d:d.substring(h),N=y.startsWith(Wb),x=N?y.substring(1):y,b=g&&g>h?g-h:void 0;return{modifiers:f,hasImportantModifier:N,baseClassName:x,maybePostfixModifierPosition:b}};return n?d=>n({className:d,parseClassName:u}):u},UT=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},BT=e=>({cache:DT(e.cacheSize),parseClassName:zT(e),...IT(e)}),WT=/\s+/,HT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,l=[],u=e.trim().split(WT);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{modifiers:h,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:N}=n(m);let x=!!N,b=r(x?y.substring(0,N):y);if(!b){if(!x){d=m+(d.length>0?" "+d:d);continue}if(b=r(y),!b){d=m+(d.length>0?" "+d:d);continue}x=!1}const E=UT(h).join(":"),w=g?E+Wb:E,S=w+b;if(l.includes(S))continue;l.push(S);const C=i(b,x);for(let I=0;I<C.length;++I){const O=C[I];l.push(w+O)}d=m+(d.length>0?" "+d:d)}return d};function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Hb(t))&&(r&&(r+=" "),r+=n);return r}const Hb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Hb(e[r]))&&(n&&(n+=" "),n+=t);return n};function qT(e,...t){let n,r,i,l=u;function u(f){const m=t.reduce((h,g)=>g(h),e());return n=BT(m),r=n.cache.get,i=n.cache.set,l=d,d(f)}function d(f){const m=r(f);if(m)return m;const h=HT(f,n);return i(f,h),h}return function(){return l(VT.apply(null,arguments))}}const et=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vb=/^\[(?:([a-z-]+):)?(.+)\]$/i,GT=/^\d+\/\d+$/,KT=new Set(["px","full","screen"]),QT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,os=e=>Lo(e)||KT.has(e)||GT.test(e),Ts=e=>ua(e,"length",aO),Lo=e=>!!e&&!Number.isNaN(Number(e)),Wp=e=>ua(e,"number",Lo),Wa=e=>!!e&&Number.isInteger(Number(e)),eO=e=>e.endsWith("%")&&Lo(e.slice(0,-1)),ke=e=>Vb.test(e),Os=e=>QT.test(e),tO=new Set(["length","size","percentage"]),nO=e=>ua(e,tO,qb),rO=e=>ua(e,"position",qb),sO=new Set(["image","url"]),iO=e=>ua(e,sO,uO),oO=e=>ua(e,"",lO),Ha=()=>!0,ua=(e,t,n)=>{const r=Vb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},aO=e=>XT.test(e)&&!YT.test(e),qb=()=>!1,lO=e=>JT.test(e),uO=e=>ZT.test(e),cO=()=>{const e=et("colors"),t=et("spacing"),n=et("blur"),r=et("brightness"),i=et("borderColor"),l=et("borderRadius"),u=et("borderSpacing"),d=et("borderWidth"),f=et("contrast"),m=et("grayscale"),h=et("hueRotate"),g=et("invert"),y=et("gap"),N=et("gradientColorStops"),x=et("gradientColorStopPositions"),b=et("inset"),E=et("margin"),w=et("opacity"),S=et("padding"),C=et("saturate"),I=et("scale"),O=et("sepia"),F=et("skew"),D=et("space"),z=et("translate"),B=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",ke,t],ce=()=>[ke,t],be=()=>["",os,Ts],se=()=>["auto",Lo,ke],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",ke],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>[Lo,ke];return{cacheSize:500,separator:":",theme:{colors:[Ha],spacing:[os,Ts],blur:["none","",Os,ke],brightness:he(),borderColor:[e],borderRadius:["none","","full",Os,ke],borderSpacing:ce(),borderWidth:be(),contrast:he(),grayscale:ie(),hueRotate:he(),invert:ie(),gap:ce(),gradientColorStops:[e],gradientColorStopPositions:[eO,Ts],inset:fe(),margin:fe(),opacity:he(),padding:ce(),saturate:he(),scale:he(),sepia:ie(),skew:he(),space:ce(),translate:ce()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[Os]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),ke]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wa,ke]}],basis:[{basis:fe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",Wa,ke]}],"grid-cols":[{"grid-cols":[Ha]}],"col-start-end":[{col:["auto",{span:["full",Wa,ke]},ke]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Ha]}],"row-start-end":[{row:["auto",{span:[Wa,ke]},ke]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[Os]},Os]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Os,Ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wp]}],"font-family":[{font:[Ha]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",Lo,Wp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",os,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",os,Ts]}],"underline-offset":[{"underline-offset":["auto",os,ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ce()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),rO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},iO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:pe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[os,ke]}],"outline-w":[{outline:[os,Ts]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[os,Ts]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Os,oO]}],"shadow-color":[{shadow:[Ha]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Os,ke]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:he()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:he()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Wa,ke]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ce()}],"scroll-mx":[{"scroll-mx":ce()}],"scroll-my":[{"scroll-my":ce()}],"scroll-ms":[{"scroll-ms":ce()}],"scroll-me":[{"scroll-me":ce()}],"scroll-mt":[{"scroll-mt":ce()}],"scroll-mr":[{"scroll-mr":ce()}],"scroll-mb":[{"scroll-mb":ce()}],"scroll-ml":[{"scroll-ml":ce()}],"scroll-p":[{"scroll-p":ce()}],"scroll-px":[{"scroll-px":ce()}],"scroll-py":[{"scroll-py":ce()}],"scroll-ps":[{"scroll-ps":ce()}],"scroll-pe":[{"scroll-pe":ce()}],"scroll-pt":[{"scroll-pt":ce()}],"scroll-pr":[{"scroll-pr":ce()}],"scroll-pb":[{"scroll-pb":ce()}],"scroll-pl":[{"scroll-pl":ce()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[os,Ts,Wp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dO=qT(cO);function gr(...e){return dO(RT(e))}const fO=OT("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",information:"border-transparent bg-blue-100 text-blue-800 hover:bg-blue-600",important:"border-transparent bg-red-100 text-red-800 hover:bg-red-600",warning:"border-transparent bg-yellow-100 text-yellow-800 hover:bg-yellow-600",success:"border-transparent bg-green-100 text-green-800 hover:bg-green-600"}},defaultVariants:{variant:"default"}});function el({className:e,variant:t,...n}){return a.jsx("div",{className:gr(fO({variant:t}),e),...n})}const Yx=e=>e==="float"||e==="integer",ac=e=>{var t,n,r,i,l;return{method:(e==null?void 0:e.method)||"none",params:{constant:(t=e==null?void 0:e.params)==null?void 0:t.constant,categorical_min:((n=e==null?void 0:e.params)==null?void 0:n.categorical_min)??100,one_hot:((r=e==null?void 0:e.params)==null?void 0:r.one_hot)??!0,ordinal_encoding:((i=e==null?void 0:e.params)==null?void 0:i.ordinal_encoding)??!1,clip:(l=e==null?void 0:e.params)==null?void 0:l.clip}}};function pO({column:e,dataset:t,setColumnType:n,setDataset:r,constants:i,onUpdate:l}){var se,Z,pe,oe,Q,ie,te,he,Ie,ft,yt,Y,q,ee,ne,Pe,xt,Ye,Sn,Un,jt,qt,At,Ut,Sr,Ur,jn,Nt,jr,Br,Vi,Nr,qi,Nn,Cn;const[u,d]=A.useState(!!((Z=(se=e.preprocessing_steps)==null?void 0:se.inference)!=null&&Z.method&&e.preprocessing_steps.inference.method!=="none")),f=e.datatype,[m,h]=A.useState(()=>{var ae;return ac((ae=e.preprocessing_steps)==null?void 0:ae.training)}),[g,y]=A.useState(()=>{var ae;return ac((ae=e.preprocessing_steps)==null?void 0:ae.inference)});A.useEffect(()=>{var ae,we;h(ac((ae=e.preprocessing_steps)==null?void 0:ae.training)),y(ac((we=e.preprocessing_steps)==null?void 0:we.inference))},[e.id]);const N=(ae,we)=>{let _e={};f==="categorical"&&(we==="categorical"?_e={..._e,categorical_min:100,one_hot:!0}:we!="none"&&(_e={..._e,one_hot:!0})),e.is_target&&(_e={..._e,ordinal_encoding:!0});const at={method:we,params:_e};ae==="training"?(h(at),l(at,u?g:void 0,u)):(y(at),l(m,at,u))},x=(ae,we)=>{const _e=m,at=h,pt={..._e,params:{categorical_min:_e.params.categorical_min,one_hot:_e.params.one_hot,ordinal_encoding:_e.params.ordinal_encoding,...we}};at(pt),l(pt,u?g:void 0,u)},b=(ae,we)=>{const _e=m,at=h,pt={..._e,params:{..._e.params,clip:{..._e.params.clip,...we}}};at(pt),l(pt,u?g:void 0,u)},E=(ae,we)=>{const _e=ae==="training"?m:g,at=ae==="training"?h:y,pt={..._e,params:{..._e.params,constant:we}};at(pt),ae==="training"?l(pt,u?g:void 0,u):l(m,pt,u)},w=ae=>{var _e,at;const we=ae==="training"?m:g;return we.method!=="constant"?null:a.jsxs("div",{className:"mt-4",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Constant Value"}),Yx(f)?a.jsx("input",{type:"number",value:((_e=we.params)==null?void 0:_e.constant)??"",onChange:pt=>E(ae,pt.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a number..."}):a.jsx("input",{type:"text",value:((at=we.params)==null?void 0:at.constant)??"",onChange:pt=>E(ae,pt.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a value..."})]})},[S,C]=A.useState(!1),I=ae=>{const we=t.columns.map(_e=>({..._e,drop_if_null:_e.name===e.name?ae.target.checked:_e.drop_if_null}));r({...t,columns:we})},O=ae=>{const we=t.columns.map(_e=>({..._e,description:_e.name===e.name?ae.target.value:_e.description}));r({...t,columns:we})},F=()=>{C(!1)},D=ae=>{ae.key==="Enter"?(ae.preventDefault(),C(!1)):ae.key==="Escape"&&C(!1)},z=()=>{C(!0)};let B=((pe=e.statistics)==null?void 0:pe.processed.null_count)||((oe=e.statistics)==null?void 0:oe.raw.null_count)||0;const H=B&&((Q=e.statistics)!=null&&Q.raw.num_rows)?B/e.statistics.raw.num_rows*100:0,fe=(te=(ie=e.statistics)==null?void 0:ie.processed)!=null&&te.null_count&&((he=e.statistics)!=null&&he.raw.num_rows)?e.statistics.processed.null_count/e.statistics.raw.num_rows*100:0,ce=((Ie=e.statistics)==null?void 0:Ie.raw.num_rows)??0,be=ae=>{var at,pt,Wr,ir,Hr,Vr;const we=m;let _e;if(we.method==="most_frequent"&&((at=e.statistics)!=null&&at.raw.most_frequent_value))_e=`Most Frequent Value: ${e.statistics.raw.most_frequent_value}`;else if(we.method==="ffill"){const oi=(pt=e.statistics)==null?void 0:pt.raw.last_value;oi!=null?_e=`Forward Fill using Last Value: ${oi}`:_e="Set date column & apply preprocessing to see last value"}else if(we.method==="median"&&((ir=(Wr=e.statistics)==null?void 0:Wr.raw)!=null&&ir.median))_e=`Median: ${e.statistics.raw.median}`;else if(we.method==="mean"&&((Vr=(Hr=e.statistics)==null?void 0:Hr.raw)!=null&&Vr.mean))_e=`Mean: ${e.statistics.raw.mean}`;else return null;return a.jsx("div",{className:"mt-4 bg-yellow-50 rounded-lg p-4",children:a.jsx("span",{className:"text-sm font-medium text-yellow-700",children:_e})})};return a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex-1 max-w-[70%]",children:[a.jsx("h2",{className:"text-2xl font-semibold text-gray-900",children:e.name}),a.jsx("div",{className:"mt-1 flex items-start gap-1",children:S?a.jsxs("div",{className:"flex-1",children:[a.jsx("textarea",{value:e.description||"",onChange:O,onBlur:F,onKeyDown:D,className:"w-full px-2 py-1 text-sm text-gray-900 border border-blue-500 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:2,autoFocus:!0,placeholder:"Enter column description..."}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Press Enter to save, Escape to cancel"})]}):a.jsxs("div",{className:"flex-3/4 flex items-start gap-1",children:[a.jsx("p",{className:"text-sm text-gray-500 cursor-pointer flex-grow truncate",onClick:z,children:e.description||"No description provided"}),a.jsx("button",{onClick:z,className:"p-1 text-gray-400 hover:text-gray-600 rounded-md hover:bg-gray-100 flex-shrink-0",children:a.jsx(NT,{className:"w-4 h-4"})})]})})]}),a.jsx("div",{className:"flex items-center gap-4 flex-shrink-0",children:e.is_target?a.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-purple-100 text-purple-800",children:"Target Column"}):a.jsx("div",{className:"flex items-center gap-2",children:a.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[a.jsx("input",{type:"checkbox",checked:e.drop_if_null,onChange:I,className:"rounded border-gray-300 text-red-600 focus:ring-red-500"}),a.jsxs("span",{className:"flex items-center gap-1 text-gray-700",children:[a.jsx(la,{className:"w-4 h-4 text-gray-400"}),"Drop if null"]})]})})})]}),a.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-6",children:[a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Mn,{className:"w-4 h-4 text-gray-500"}),a.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Raw Data Statistics"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Values:"}),a.jsx("span",{className:"font-medium text-gray-900",children:(yt=(ft=e.statistics)==null?void 0:ft.raw)==null?void 0:yt.null_count.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),a.jsx("span",{className:"font-medium text-gray-900",children:ce.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),a.jsxs("span",{className:"font-medium text-gray-900",children:[H.toFixed(2),"%"]})]}),a.jsx("div",{className:"mt-2",children:a.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${H}%`}})})})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Dm,{className:"w-4 h-4 text-gray-500"}),a.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Processed Data Statistics"})]}),(Y=t==null?void 0:t.preprocessing_steps)!=null&&Y.training?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Values:"}),a.jsx("span",{className:"font-medium text-gray-900",children:(ne=(ee=(q=e.statistics)==null?void 0:q.processed)==null?void 0:ee.null_count)==null?void 0:ne.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),a.jsx("span",{className:"font-medium text-gray-900",children:(Ye=(xt=(Pe=e.statistics)==null?void 0:Pe.processed)==null?void 0:xt.num_rows)==null?void 0:Ye.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),a.jsxs("span",{className:"font-medium text-gray-900",children:[fe.toFixed(2),"%"]})]}),a.jsx("div",{className:"mt-2",children:a.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${fe}%`}})})})]}):a.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No preprocessing configured"})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("span",{className:"text-sm text-gray-500",children:"Type"}),a.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:e.datatype})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("span",{className:"text-sm text-gray-500",children:"Unique Values"}),a.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((jt=(Un=(Sn=e.statistics)==null?void 0:Sn.processed)==null?void 0:Un.unique_count)==null?void 0:jt.toLocaleString())??"N/A"})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("span",{className:"text-sm text-gray-500",children:"Null Values"}),a.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((Ut=(At=(qt=e.statistics)==null?void 0:qt.processed)==null?void 0:At.null_count)==null?void 0:Ut.toLocaleString())??"0"})]})]}),(Sr=e.statistics)!=null&&Sr.processed.null_count?a.jsxs("div",{className:"mt-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Null Distribution"}),a.jsxs("span",{className:"text-sm text-gray-500",children:[H,"% of values are null"]})]}),a.jsx("div",{className:"relative h-2 bg-gray-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"absolute top-0 left-0 h-full bg-yellow-400 rounded-full",style:{width:`${H}%`}})})]}):a.jsx("div",{className:"mt-6 bg-green-50 rounded-lg p-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"}),a.jsx("span",{className:"text-sm text-green-700",children:"This column has no null values"})]})}),((jn=(Ur=e.statistics)==null?void 0:Ur.raw)==null?void 0:jn.sample_data)&&a.jsxs("div",{className:"mt-6",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Sample Values"}),a.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:a.jsx("div",{className:"flex flex-wrap gap-2",children:((jr=(Nt=e.statistics)==null?void 0:Nt.raw)==null?void 0:jr.sample_data)&&e.statistics.raw.sample_data.map((ae,we)=>a.jsx("span",{className:"px-2 py-1 bg-gray-100 rounded text-sm text-gray-700",children:String(ae)},we))})})]})]}),a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[a.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[a.jsx(Bi,{className:"w-5 h-5 text-gray-500"}),"Data Type"]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Column Type"}),a.jsx("select",{value:f,disabled:!0,className:"w-full rounded-md border-gray-300 bg-gray-50 shadow-sm text-gray-700 cursor-not-allowed",children:i.column_types.map(ae=>a.jsx("option",{value:ae.value,children:ae.label},ae.value))}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Column type cannot be changed after creation"})]}),a.jsxs("div",{className:"bg-gray-50 rounded-md p-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Sample Data"}),a.jsx("div",{className:"space-y-2",children:Array.isArray(e.sample_values)?e.sample_values.slice(0,3).map((ae,we)=>a.jsx("span",{className:"m-1 flex-items items-center",children:a.jsx(el,{children:String(ae)})},we)):[]})]})]})]}),a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[a.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[a.jsx(Dm,{className:"w-5 h-5 text-gray-500"}),"Preprocessing Strategy"]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Training Strategy"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"checkbox",id:"useDistinctInference",checked:u,onChange:ae=>{d(ae.target.checked),l(m,ae.target.checked?g:void 0,ae.target.checked)},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("label",{htmlFor:"useDistinctInference",className:"text-sm text-gray-700",children:"Use different strategy for inference"})]})]}),a.jsxs("div",{className:u?"grid grid-cols-2 gap-6":"",children:[a.jsxs("div",{children:[a.jsxs("select",{value:m.method,onChange:ae=>N("training",ae.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[a.jsx("option",{value:"none",children:"No preprocessing"}),(Br=i.preprocessing_strategies[f])==null?void 0:Br.map(ae=>a.jsx("option",{value:ae.value,children:ae.label},ae.value))]}),be(),w("training"),e.datatype==="categorical"&&m.method==="categorical"&&a.jsx("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Minimum Category Instances"}),a.jsx("input",{type:"number",min:"1",value:m.params.categorical_min,onChange:ae=>x("training",{categorical_min:parseInt(ae.target.value)}),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:'Categories with fewer instances will be grouped as "OTHER"'})]})}),e.datatype==="categorical"&&m.method!=="none"&&a.jsxs("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Encoding"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"radio",id:"oneHotEncode",name:"encoding",checked:m.params.one_hot,onChange:()=>x("training",{one_hot:!0,ordinal_encoding:!1}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("label",{htmlFor:"oneHotEncode",className:"text-sm text-gray-700",children:"One-hot encode categories"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"radio",id:"ordinalEncode",name:"encoding",checked:m.params.ordinal_encoding,onChange:()=>x("training",{one_hot:!1,ordinal_encoding:!0}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("label",{htmlFor:"ordinalEncode",className:"text-sm text-gray-700",children:"Ordinal encode categories"})]})]})]}),u&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(dT,{className:"w-4 h-4 text-gray-400"}),a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Inference Strategy"})]}),a.jsxs("select",{value:g.method,onChange:ae=>N("inference",ae.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[a.jsx("option",{value:"none",children:"No preprocessing"}),(Vi=i.preprocessing_strategies[f])==null?void 0:Vi.map(ae=>a.jsx("option",{value:ae.value,children:ae.label},ae.value))]}),w("inference")]})]})]}),Yx(f)&&m.method!=="none"&&a.jsxs("div",{className:"border-t pt-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Clip Values"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Min Value"}),a.jsx("input",{type:"number",value:((qi=(Nr=m.params)==null?void 0:Nr.clip)==null?void 0:qi.min)??"",onChange:ae=>{b("training",{min:ae.target.value?Number(ae.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No minimum"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Max Value"}),a.jsx("input",{type:"number",value:((Cn=(Nn=m.params)==null?void 0:Nn.clip)==null?void 0:Cn.max)??"",onChange:ae=>{b("training",{max:ae.target.value?Number(ae.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No maximum"})]})]})]})]})]})]})}function mO({columns:e,selectedColumn:t,onColumnSelect:n,onToggleHidden:r}){return _r().props,a.jsx("div",{className:"space-y-2 pb-2",children:e.map(i=>{var l,u,d;return a.jsxs("div",{className:`p-3 rounded-lg border ${t===i.name?"border-blue-500 bg-blue-50":i.is_target?"border-purple-500 bg-purple-50":i.hidden?"border-gray-200 bg-gray-50":"border-gray-200 hover:border-gray-300"} transition-colors duration-150`,children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[i.is_target&&a.jsx($b,{className:"w-4 h-4 text-purple-500"}),a.jsx("span",{className:`font-medium ${i.hidden?"text-gray-500":"text-gray-900"}`,children:i.name}),a.jsx("span",{className:"text-xs px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full",children:i.datatype})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[!i.is_target&&a.jsx("button",{onClick:()=>r(i.name),className:`p-1 rounded hover:bg-gray-100 ${i.hidden?"text-gray-500":"text-gray-400 hover:text-gray-600"}`,title:i.hidden?"Show column":"Hide column",children:i.hidden?a.jsx($m,{className:"w-4 h-4"}):a.jsx(Rb,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>n(i.name),className:"p-1 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-100",title:"Configure preprocessing",children:a.jsx(Bi,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{className:"text-sm text-gray-500",children:[i.description&&a.jsx("p",{className:`mb-1 line-clamp-1 ${i.drop_if_null?"text-gray-400":""}`,children:i.description}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[i.preprocessing_steps&&((l=i.preprocessing_steps)==null?void 0:l.training)&&((d=(u=i.preprocessing_steps)==null?void 0:u.training)==null?void 0:d.method)!=="none"&&a.jsxs("div",{className:"flex items-center gap-1 text-blue-600",children:[a.jsx(vn,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Preprocessing configured"})]}),i.hidden&&a.jsxs("div",{className:"flex items-center gap-1 text-gray-400",children:[a.jsx($m,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Hidden from training"})]})]})]})]},i.name)})})}const Hp=5;function hO({types:e,activeFilters:t,onFilterChange:n,columnStats:r,colHasPreprocessingSteps:i,columns:l}){const u=x=>{switch(x){case"training":return`${r.training} columns`;case"hidden":return`${r.hidden} columns`;case"preprocessed":return`${r.withPreprocessing} columns`;case"nulls":return`${r.withNulls} columns`;default:return`${r.total} columns`}},d=x=>{var b,E,w,S;return!((E=(b=x.statistics)==null?void 0:b.processed)!=null&&E.null_count)||!((S=(w=x.statistics)==null?void 0:w.processed)!=null&&S.num_rows)?0:x.statistics.processed.null_count/x.statistics.processed.num_rows*100},f=l.filter(x=>{var b;return((b=x.statistics)==null?void 0:b.processed.null_count)&&x.statistics.processed.null_count>0}).sort((x,b)=>d(b)-d(x)),[m,h]=A.useState(1),g=Math.ceil(f.length/Hp),y=f.slice((m-1)*Hp,m*Hp),N=x=>{n({...t,types:t.types.includes(x)?t.types.filter(b=>b!==x):[...t.types,x]})};return a.jsxs("div",{className:"p-4 border-b space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[a.jsx(wT,{className:"w-4 h-4"}),"Column Views"]}),a.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",r.filtered," of ",r.total," columns"]})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("button",{onClick:()=>n({...t,view:"all"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="all"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Mn,{className:"w-4 h-4"}),"All",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("all"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"training"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="training"?"bg-green-100 text-green-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Rb,{className:"w-4 h-4"}),"Training",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("training"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"hidden"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="hidden"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx($m,{className:"w-4 h-4"}),"Hidden",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("hidden"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"preprocessed"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="preprocessed"?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Dm,{className:"w-4 h-4"}),"Preprocessed",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("preprocessed"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"nulls"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="nulls"?"bg-yellow-100 text-yellow-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Db,{className:"w-4 h-4"}),"Has Nulls",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("nulls"),")"]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs font-medium text-gray-700 mb-2 block",children:"Column Types"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(x=>a.jsx("button",{onClick:()=>N(x),className:`px-2 py-1 rounded-md text-xs font-medium ${t.types.includes(x)?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:x},x))})]}),t.view==="preprocessed"&&r.withPreprocessing>0&&a.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[a.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Preprocessing Overview"}),a.jsx("div",{className:"space-y-2",children:l.filter(i).map(x=>{var b;return a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-blue-800",children:x.name}),a.jsx("span",{className:"text-blue-600",children:(b=x.preprocessing_steps)==null?void 0:b.training.method})]},x.name)})})]}),t.view==="nulls"&&f.length>0&&a.jsxs("div",{className:"bg-yellow-50 rounded-lg p-3",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("h4",{className:"text-sm font-medium text-yellow-900",children:"Null Value Distribution"}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-yellow-700",children:[a.jsx("button",{onClick:()=>h(x=>Math.max(1,x-1)),disabled:m===1,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:a.jsx(Pd,{className:"w-4 h-4"})}),a.jsxs("span",{children:["Page ",m," of ",g]}),a.jsx("button",{onClick:()=>h(x=>Math.min(g,x+1)),disabled:m===g,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:a.jsx(Go,{className:"w-4 h-4"})})]})]}),a.jsx("div",{className:"space-y-2",children:y.map(x=>{var b,E,w,S;return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-yellow-800 text-sm min-w-[120px]",children:x.name}),a.jsx("div",{className:"flex-1 h-2 bg-yellow-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-yellow-400 rounded-full",style:{width:`${d(x)}%`}})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-yellow-800 text-xs",children:[d(x).toFixed(1),"% null"]}),a.jsxs("span",{className:"text-yellow-600 text-xs",children:["(",(E=(b=x.statistics)==null?void 0:b.nullCount)==null?void 0:E.toLocaleString()," / ",(S=(w=x.statistics)==null?void 0:w.rowCount)==null?void 0:S.toLocaleString(),")"]})]})]},x.name)})}),a.jsxs("div",{className:"mt-3 text-sm text-yellow-700",children:[f.length," columns contain null values"]})]})]})]})}function gO({saving:e,saved:t,error:n}){return n?a.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[a.jsx(vn,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium",children:n})]}):e?a.jsxs("div",{className:"flex items-center gap-2 text-blue-600",children:[a.jsx(Mi,{className:"w-4 h-4 animate-spin"}),a.jsx("span",{className:"text-sm font-medium",children:"Saving changes..."})]}):t?a.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[a.jsx(Fb,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium",children:"Changes saved"})]}):null}const nt=A.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Search...",renderOption:i},l)=>{const[u,d]=A.useState(!1),[f,m]=A.useState(""),h=A.useRef(null),g=A.useRef(null),y=e.find(x=>x.value===t),N=e.filter(x=>{var b;return x.label.toLowerCase().includes(f.toLowerCase())||((b=x.description)==null?void 0:b.toLowerCase().includes(f.toLowerCase()))});return A.useEffect(()=>{function x(b){h.current&&!h.current.contains(b.target)&&d(!1)}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),A.useEffect(()=>{u&&g.current&&g.current.focus()},[u]),a.jsxs("div",{className:"relative",ref:h,children:[a.jsx("button",{type:"button",onClick:()=>d(!u),className:"w-full bg-white relative border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",ref:l,children:y?a.jsx("span",{className:"block truncate",children:y.label}):a.jsx("span",{className:"block truncate text-gray-500",children:r})}),u&&a.jsxs("div",{className:"absolute z-10 mt-1 w-full bg-white shadow-lg max-h-96 rounded-md overflow-hidden",children:[a.jsx("div",{className:"p-2 border-b",children:a.jsxs("div",{className:"relative",children:[a.jsx(Jh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),a.jsx("input",{ref:g,type:"text",className:"w-full pl-9 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",placeholder:"Search...",value:f,onChange:x=>m(x.target.value),onClick:x=>x.stopPropagation()})]})}),a.jsx("div",{className:"max-h-60 overflow-y-auto",children:N.length===0?a.jsx("div",{className:"text-center py-4 text-sm text-gray-500",children:"No results found"}):a.jsx("ul",{className:"py-1",children:N.map(x=>a.jsx("li",{children:a.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 hover:bg-gray-100 ${x.value===t?"bg-blue-50":""}`,onClick:()=>{n(x.value),d(!1),m("")},children:i?i(x):a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("div",{className:"font-medium",children:x.label}),x.description&&a.jsx("div",{className:"text-sm text-gray-500",children:x.description})]}),x.value===t&&a.jsx(hT,{className:"w-4 h-4 text-blue-600"})]})})},x.value))})})]})]})});nt.displayName="SearchableSelect";function yO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gb=yO,xO=typeof Jt=="object"&&Jt&&Jt.Object===Object&&Jt,vO=xO,bO=vO,wO=typeof self=="object"&&self&&self.Object===Object&&self,_O=bO||wO||Function("return this")(),Kb=_O,SO=Kb,jO=function(){return SO.Date.now()},NO=jO,CO=/\s/;function EO(e){for(var t=e.length;t--&&CO.test(e.charAt(t)););return t}var kO=EO,AO=kO,PO=/^\s+/;function TO(e){return e&&e.slice(0,AO(e)+1).replace(PO,"")}var OO=TO,RO=Kb,IO=RO.Symbol,Qb=IO,Jx=Qb,Xb=Object.prototype,LO=Xb.hasOwnProperty,MO=Xb.toString,Va=Jx?Jx.toStringTag:void 0;function FO(e){var t=LO.call(e,Va),n=e[Va];try{e[Va]=void 0;var r=!0}catch{}var i=MO.call(e);return r&&(t?e[Va]=n:delete e[Va]),i}var $O=FO,DO=Object.prototype,zO=DO.toString;function UO(e){return zO.call(e)}var BO=UO,Zx=Qb,WO=$O,HO=BO,VO="[object Null]",qO="[object Undefined]",ev=Zx?Zx.toStringTag:void 0;function GO(e){return e==null?e===void 0?qO:VO:ev&&ev in Object(e)?WO(e):HO(e)}var KO=GO;function QO(e){return e!=null&&typeof e=="object"}var XO=QO,YO=KO,JO=XO,ZO="[object Symbol]";function eR(e){return typeof e=="symbol"||JO(e)&&YO(e)==ZO}var tR=eR,nR=OO,tv=Gb,rR=tR,nv=NaN,sR=/^[-+]0x[0-9a-f]+$/i,iR=/^0b[01]+$/i,oR=/^0o[0-7]+$/i,aR=parseInt;function lR(e){if(typeof e=="number")return e;if(rR(e))return nv;if(tv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=tv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nR(e);var n=iR.test(e);return n||oR.test(e)?aR(e.slice(2),n?2:8):sR.test(e)?nv:+e}var uR=lR,cR=Gb,Vp=NO,rv=uR,dR="Expected a function",fR=Math.max,pR=Math.min;function mR(e,t,n){var r,i,l,u,d,f,m=0,h=!1,g=!1,y=!0;if(typeof e!="function")throw new TypeError(dR);t=rv(t)||0,cR(n)&&(h=!!n.leading,g="maxWait"in n,l=g?fR(rv(n.maxWait)||0,t):l,y="trailing"in n?!!n.trailing:y);function N(F){var D=r,z=i;return r=i=void 0,m=F,u=e.apply(z,D),u}function x(F){return m=F,d=setTimeout(w,t),h?N(F):u}function b(F){var D=F-f,z=F-m,B=t-D;return g?pR(B,l-z):B}function E(F){var D=F-f,z=F-m;return f===void 0||D>=t||D<0||g&&z>=l}function w(){var F=Vp();if(E(F))return S(F);d=setTimeout(w,b(F))}function S(F){return d=void 0,y&&r?N(F):(r=i=void 0,u)}function C(){d!==void 0&&clearTimeout(d),m=0,r=f=i=d=void 0}function I(){return d===void 0?u:S(Vp())}function O(){var F=Vp(),D=E(F);if(r=arguments,i=this,f=F,D){if(d===void 0)return x(f);if(g)return clearTimeout(d),d=setTimeout(w,t),N(f)}return d===void 0&&(d=setTimeout(w,t)),u}return O.cancel=C,O.flush=I,O}var hR=mR;const gR=_d(hR);function yR(e,t,n=1e3){const[r,i]=A.useState({saving:!1,saved:!1,error:null}),l=A.useRef(JSON.stringify(e)),u=A.useCallback(gR(async d=>{i(f=>({...f,saving:!0,error:null}));try{await t(d),l.current=JSON.stringify(d),i({saving:!1,saved:!0,error:null}),setTimeout(()=>{i(f=>({...f,saved:!1}))},4e3)}catch(f){i({saving:!1,saved:!1,error:f instanceof Error?f.message:"Failed to save changes"})}},n),[t,n]);return A.useEffect(()=>(JSON.stringify(e)!==l.current&&u(e),()=>{u.cancel()}),[e,u]),r}function xR({trigger:e,children:t,className:n=""}){const[r,i]=A.useState(!1),l=A.useRef(null),u=A.useRef(null);return A.useEffect(()=>{const d=f=>{var m;l.current&&!l.current.contains(f.target)&&!((m=u.current)!=null&&m.contains(f.target))&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),a.jsxs("div",{className:"relative",children:[a.jsx("div",{ref:u,onClick:()=>i(!r),children:e}),r&&a.jsxs("div",{ref:l,className:`absolute z-50 right-0 mt-2 bg-white rounded-lg shadow-lg border border-gray-200 ${n}`,children:[a.jsxs("div",{className:"flex justify-between items-center p-3 border-b border-gray-200",children:[a.jsx("h3",{className:"font-medium",children:"Feature Configuration"}),a.jsx("button",{onClick:()=>i(!1),className:"text-gray-400 hover:text-gray-600",children:a.jsx(Hl,{className:"w-4 h-4"})})]}),a.jsx("div",{className:"p-4",children:t})]})]})}function vR(){return a.jsx(xR,{trigger:a.jsx("button",{type:"button",className:"p-2 text-gray-400 hover:text-gray-600",title:"Configure features",children:a.jsx(Bi,{className:"w-5 h-5"})}),className:"w-96",children:a.jsxs("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-600",children:"Feature options can be configured in the codebase, and loaded in initializers:"}),a.jsx("div",{className:"bg-gray-50 p-3 rounded-md",children:a.jsx("code",{className:"text-sm text-gray-800",children:"config/initializers/features.rb"})}),a.jsx("p",{className:"text-sm text-gray-600",children:"Example feature implementation:"}),a.jsx("pre",{className:"bg-gray-50 p-3 rounded-md overflow-x-auto",children:a.jsx("code",{className:"text-xs text-gray-800",children:`# lib/features/did_convert.rb
|
407
|
+
}`;var Ae=Xy(function(){return ze(j,me+"return "+X).apply(n,P)});if(Ae.source=X,hp(Ae))throw Ae;return Ae}function gk(s){return Ue(s).toLowerCase()}function yk(s){return Ue(s).toUpperCase()}function xk(s,o,c){if(s=Ue(s),s&&(c||o===n))return i0(s);if(!s||!(o=An(o)))return s;var p=lr(s),v=lr(o),j=o0(p,v),P=a0(p,v)+1;return ks(p,j,P).join("")}function vk(s,o,c){if(s=Ue(s),s&&(c||o===n))return s.slice(0,u0(s)+1);if(!s||!(o=An(o)))return s;var p=lr(s),v=a0(p,lr(o))+1;return ks(p,0,v).join("")}function bk(s,o,c){if(s=Ue(s),s&&(c||o===n))return s.replace(ya,"");if(!s||!(o=An(o)))return s;var p=lr(s),v=o0(p,lr(o));return ks(p,v).join("")}function wk(s,o){var c=H,p=fe;if(lt(o)){var v="separator"in o?o.separator:v;c="length"in o?Ee(o.length):c,p="omission"in o?An(o.omission):p}s=Ue(s);var j=s.length;if(no(s)){var P=lr(s);j=P.length}if(c>=j)return s;var T=c-ro(p);if(T<1)return p;var M=P?ks(P,0,T).join(""):s.slice(0,T);if(v===n)return M+p;if(P&&(T+=M.length-T),gp(v)){if(s.slice(T).search(v)){var V,G=M;for(v.global||(v=Of(v.source,Ue(Bn.exec(v))+"g")),v.lastIndex=0;V=v.exec(G);)var X=V.index;M=M.slice(0,X===n?T:X)}}else if(s.indexOf(An(v),T)!=T){var re=M.lastIndexOf(v);re>-1&&(M=M.slice(0,re))}return M+p}function _k(s){return s=Ue(s),s&&pa.test(s)?s.replace(Xl,YS):s}var Sk=co(function(s,o,c){return s+(c?" ":"")+o.toUpperCase()}),vp=Y0("toUpperCase");function Qy(s,o,c){return s=Ue(s),o=c?n:o,o===n?qS(s)?ej(s):FS(s):s.match(o)||[]}var Xy=Te(function(s,o){try{return Mt(s,n,o)}catch(c){return hp(c)?c:new Se(c)}}),jk=es(function(s,o){return Hn(o,function(c){c=Pr(c),Jr(s,c,pp(s[c],s))}),s});function Nk(s){var o=s==null?0:s.length,c=ye();return s=o?it(s,function(p){if(typeof p[1]!="function")throw new Vn(u);return[c(p[0]),p[1]]}):[],Te(function(p){for(var v=-1;++v<o;){var j=s[v];if(Mt(j[0],this,p))return Mt(j[1],this,p)}})}function Ck(s){return Yj(Gn(s,g))}function bp(s){return function(){return s}}function Ek(s,o){return s==null||s!==s?o:s}var kk=Z0(),Ak=Z0(!0);function mn(s){return s}function wp(s){return A0(typeof s=="function"?s:Gn(s,g))}function Pk(s){return T0(Gn(s,g))}function Tk(s,o){return O0(s,Gn(o,g))}var Ok=Te(function(s,o){return function(c){return Ta(c,s,o)}}),Rk=Te(function(s,o){return function(c){return Ta(s,c,o)}});function _p(s,o,c){var p=Ft(o),v=Fu(o,p);c==null&&!(lt(o)&&(v.length||!p.length))&&(c=o,o=s,s=this,v=Fu(o,Ft(o)));var j=!(lt(c)&&"chain"in c)||!!c.chain,P=ns(s);return Hn(v,function(T){var M=o[T];s[T]=M,P&&(s.prototype[T]=function(){var V=this.__chain__;if(j||V){var G=s(this.__wrapped__),X=G.__actions__=dn(this.__actions__);return X.push({func:M,args:arguments,thisArg:s}),G.__chain__=V,G}return M.apply(s,_s([this.value()],arguments))})}),s}function Ik(){return Fe._===this&&(Fe._=oj),this}function Sp(){}function Lk(s){return s=Ee(s),Te(function(o){return R0(o,s)})}var Mk=ep(it),Fk=ep(e0),$k=ep(Nf);function Yy(s){return ap(s)?Cf(Pr(s)):mN(s)}function Dk(s){return function(o){return s==null?n:xi(s,o)}}var zk=ty(),Uk=ty(!0);function jp(){return[]}function Np(){return!1}function Bk(){return{}}function Wk(){return""}function Hk(){return!0}function Vk(s,o){if(s=Ee(s),s<1||s>Q)return[];var c=he,p=Gt(s,he);o=ye(o),s-=he;for(var v=Af(p,o);++c<s;)o(c);return v}function qk(s){return Ne(s)?it(s,Pr):Pn(s)?[s]:dn(yy(Ue(s)))}function Gk(s){var o=++sj;return Ue(s)+o}var Kk=Wu(function(s,o){return s+o},0),Qk=tp("ceil"),Xk=Wu(function(s,o){return s/o},1),Yk=tp("floor");function Jk(s){return s&&s.length?Mu(s,mn,zf):n}function Zk(s,o){return s&&s.length?Mu(s,ye(o,2),zf):n}function e4(s){return r0(s,mn)}function t4(s,o){return r0(s,ye(o,2))}function n4(s){return s&&s.length?Mu(s,mn,Hf):n}function r4(s,o){return s&&s.length?Mu(s,ye(o,2),Hf):n}var s4=Wu(function(s,o){return s*o},1),i4=tp("round"),o4=Wu(function(s,o){return s-o},0);function a4(s){return s&&s.length?kf(s,mn):0}function l4(s,o){return s&&s.length?kf(s,ye(o,2)):0}return _.after=PC,_.ary=ky,_.assign=yE,_.assignIn=By,_.assignInWith=nc,_.assignWith=xE,_.at=vE,_.before=Ay,_.bind=pp,_.bindAll=jk,_.bindKey=Py,_.castArray=BC,_.chain=Ny,_.chunk=YN,_.compact=JN,_.concat=ZN,_.cond=Nk,_.conforms=Ck,_.constant=bp,_.countBy=aC,_.create=bE,_.curry=Ty,_.curryRight=Oy,_.debounce=Ry,_.defaults=wE,_.defaultsDeep=_E,_.defer=TC,_.delay=OC,_.difference=e2,_.differenceBy=t2,_.differenceWith=n2,_.drop=r2,_.dropRight=s2,_.dropRightWhile=i2,_.dropWhile=o2,_.fill=a2,_.filter=uC,_.flatMap=fC,_.flatMapDeep=pC,_.flatMapDepth=mC,_.flatten=wy,_.flattenDeep=l2,_.flattenDepth=u2,_.flip=RC,_.flow=kk,_.flowRight=Ak,_.fromPairs=c2,_.functions=AE,_.functionsIn=PE,_.groupBy=hC,_.initial=f2,_.intersection=p2,_.intersectionBy=m2,_.intersectionWith=h2,_.invert=OE,_.invertBy=RE,_.invokeMap=yC,_.iteratee=wp,_.keyBy=xC,_.keys=Ft,_.keysIn=pn,_.map=Xu,_.mapKeys=LE,_.mapValues=ME,_.matches=Pk,_.matchesProperty=Tk,_.memoize=Ju,_.merge=FE,_.mergeWith=Wy,_.method=Ok,_.methodOf=Rk,_.mixin=_p,_.negate=Zu,_.nthArg=Lk,_.omit=$E,_.omitBy=DE,_.once=IC,_.orderBy=vC,_.over=Mk,_.overArgs=LC,_.overEvery=Fk,_.overSome=$k,_.partial=mp,_.partialRight=Iy,_.partition=bC,_.pick=zE,_.pickBy=Hy,_.property=Yy,_.propertyOf=Dk,_.pull=v2,_.pullAll=Sy,_.pullAllBy=b2,_.pullAllWith=w2,_.pullAt=_2,_.range=zk,_.rangeRight=Uk,_.rearg=MC,_.reject=SC,_.remove=S2,_.rest=FC,_.reverse=dp,_.sampleSize=NC,_.set=BE,_.setWith=WE,_.shuffle=CC,_.slice=j2,_.sortBy=AC,_.sortedUniq=T2,_.sortedUniqBy=O2,_.split=fk,_.spread=$C,_.tail=R2,_.take=I2,_.takeRight=L2,_.takeRightWhile=M2,_.takeWhile=F2,_.tap=J2,_.throttle=DC,_.thru=Qu,_.toArray=Dy,_.toPairs=Vy,_.toPairsIn=qy,_.toPath=qk,_.toPlainObject=Uy,_.transform=HE,_.unary=zC,_.union=$2,_.unionBy=D2,_.unionWith=z2,_.uniq=U2,_.uniqBy=B2,_.uniqWith=W2,_.unset=VE,_.unzip=fp,_.unzipWith=jy,_.update=qE,_.updateWith=GE,_.values=mo,_.valuesIn=KE,_.without=H2,_.words=Qy,_.wrap=UC,_.xor=V2,_.xorBy=q2,_.xorWith=G2,_.zip=K2,_.zipObject=Q2,_.zipObjectDeep=X2,_.zipWith=Y2,_.entries=Vy,_.entriesIn=qy,_.extend=By,_.extendWith=nc,_p(_,_),_.add=Kk,_.attempt=Xy,_.camelCase=JE,_.capitalize=Gy,_.ceil=Qk,_.clamp=QE,_.clone=WC,_.cloneDeep=VC,_.cloneDeepWith=qC,_.cloneWith=HC,_.conformsTo=GC,_.deburr=Ky,_.defaultTo=Ek,_.divide=Xk,_.endsWith=ZE,_.eq=cr,_.escape=ek,_.escapeRegExp=tk,_.every=lC,_.find=cC,_.findIndex=vy,_.findKey=SE,_.findLast=dC,_.findLastIndex=by,_.findLastKey=jE,_.floor=Yk,_.forEach=Cy,_.forEachRight=Ey,_.forIn=NE,_.forInRight=CE,_.forOwn=EE,_.forOwnRight=kE,_.get=yp,_.gt=KC,_.gte=QC,_.has=TE,_.hasIn=xp,_.head=_y,_.identity=mn,_.includes=gC,_.indexOf=d2,_.inRange=XE,_.invoke=IE,_.isArguments=wi,_.isArray=Ne,_.isArrayBuffer=XC,_.isArrayLike=fn,_.isArrayLikeObject=bt,_.isBoolean=YC,_.isBuffer=As,_.isDate=JC,_.isElement=ZC,_.isEmpty=eE,_.isEqual=tE,_.isEqualWith=nE,_.isError=hp,_.isFinite=rE,_.isFunction=ns,_.isInteger=Ly,_.isLength=ec,_.isMap=My,_.isMatch=sE,_.isMatchWith=iE,_.isNaN=oE,_.isNative=aE,_.isNil=uE,_.isNull=lE,_.isNumber=Fy,_.isObject=lt,_.isObjectLike=mt,_.isPlainObject=Fa,_.isRegExp=gp,_.isSafeInteger=cE,_.isSet=$y,_.isString=tc,_.isSymbol=Pn,_.isTypedArray=po,_.isUndefined=dE,_.isWeakMap=fE,_.isWeakSet=pE,_.join=g2,_.kebabCase=nk,_.last=Qn,_.lastIndexOf=y2,_.lowerCase=rk,_.lowerFirst=sk,_.lt=mE,_.lte=hE,_.max=Jk,_.maxBy=Zk,_.mean=e4,_.meanBy=t4,_.min=n4,_.minBy=r4,_.stubArray=jp,_.stubFalse=Np,_.stubObject=Bk,_.stubString=Wk,_.stubTrue=Hk,_.multiply=s4,_.nth=x2,_.noConflict=Ik,_.noop=Sp,_.now=Yu,_.pad=ik,_.padEnd=ok,_.padStart=ak,_.parseInt=lk,_.random=YE,_.reduce=wC,_.reduceRight=_C,_.repeat=uk,_.replace=ck,_.result=UE,_.round=i4,_.runInContext=R,_.sample=jC,_.size=EC,_.snakeCase=dk,_.some=kC,_.sortedIndex=N2,_.sortedIndexBy=C2,_.sortedIndexOf=E2,_.sortedLastIndex=k2,_.sortedLastIndexBy=A2,_.sortedLastIndexOf=P2,_.startCase=pk,_.startsWith=mk,_.subtract=o4,_.sum=a4,_.sumBy=l4,_.template=hk,_.times=Vk,_.toFinite=rs,_.toInteger=Ee,_.toLength=zy,_.toLower=gk,_.toNumber=Xn,_.toSafeInteger=gE,_.toString=Ue,_.toUpper=yk,_.trim=xk,_.trimEnd=vk,_.trimStart=bk,_.truncate=wk,_.unescape=_k,_.uniqueId=Gk,_.upperCase=Sk,_.upperFirst=vp,_.each=Cy,_.eachRight=Ey,_.first=_y,_p(_,function(){var s={};return kr(_,function(o,c){Be.call(_.prototype,c)||(s[c]=o)}),s}(),{chain:!1}),_.VERSION=r,Hn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){_[s].placeholder=_}),Hn(["drop","take"],function(s,o){Le.prototype[s]=function(c){c=c===n?1:Tt(Ee(c),0);var p=this.__filtered__&&!o?new Le(this):this.clone();return p.__filtered__?p.__takeCount__=Gt(c,p.__takeCount__):p.__views__.push({size:Gt(c,he),type:s+(p.__dir__<0?"Right":"")}),p},Le.prototype[s+"Right"]=function(c){return this.reverse()[s](c).reverse()}}),Hn(["filter","map","takeWhile"],function(s,o){var c=o+1,p=c==se||c==pe;Le.prototype[s]=function(v){var j=this.clone();return j.__iteratees__.push({iteratee:ye(v,3),type:c}),j.__filtered__=j.__filtered__||p,j}}),Hn(["head","last"],function(s,o){var c="take"+(o?"Right":"");Le.prototype[s]=function(){return this[c](1).value()[0]}}),Hn(["initial","tail"],function(s,o){var c="drop"+(o?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[c](1)}}),Le.prototype.compact=function(){return this.filter(mn)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=Te(function(s,o){return typeof s=="function"?new Le(this):this.map(function(c){return Ta(c,s,o)})}),Le.prototype.reject=function(s){return this.filter(Zu(ye(s)))},Le.prototype.slice=function(s,o){s=Ee(s);var c=this;return c.__filtered__&&(s>0||o<0)?new Le(c):(s<0?c=c.takeRight(-s):s&&(c=c.drop(s)),o!==n&&(o=Ee(o),c=o<0?c.dropRight(-o):c.take(o-s)),c)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(he)},kr(Le.prototype,function(s,o){var c=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),v=_[p?"take"+(o=="last"?"Right":""):o],j=p||/^find/.test(o);v&&(_.prototype[o]=function(){var P=this.__wrapped__,T=p?[1]:arguments,M=P instanceof Le,V=T[0],G=M||Ne(P),X=function(Oe){var $e=v.apply(_,_s([Oe],T));return p&&re?$e[0]:$e};G&&c&&typeof V=="function"&&V.length!=1&&(M=G=!1);var re=this.__chain__,me=!!this.__actions__.length,xe=j&&!re,Ae=M&&!me;if(!j&&G){P=Ae?P:new Le(this);var ve=s.apply(P,T);return ve.__actions__.push({func:Qu,args:[X],thisArg:n}),new qn(ve,re)}return xe&&Ae?s.apply(this,T):(ve=this.thru(X),xe?p?ve.value()[0]:ve.value():ve)})}),Hn(["pop","push","shift","sort","splice","unshift"],function(s){var o=wu[s],c=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",p=/^(?:pop|shift)$/.test(s);_.prototype[s]=function(){var v=arguments;if(p&&!this.__chain__){var j=this.value();return o.apply(Ne(j)?j:[],v)}return this[c](function(P){return o.apply(Ne(P)?P:[],v)})}}),kr(Le.prototype,function(s,o){var c=_[o];if(c){var p=c.name+"";Be.call(ao,p)||(ao[p]=[]),ao[p].push({name:o,func:c})}}),ao[Bu(n,w).name]=[{name:"wrapper",func:n}],Le.prototype.clone=_j,Le.prototype.reverse=Sj,Le.prototype.value=jj,_.prototype.at=Z2,_.prototype.chain=eC,_.prototype.commit=tC,_.prototype.next=nC,_.prototype.plant=sC,_.prototype.reverse=iC,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=oC,_.prototype.first=_.prototype.head,ja&&(_.prototype[ja]=rC),_},so=tj();vt?((vt.exports=so)._=so,Ge._=so):Fe._=so}).call(Jt)})(Qc,Qc.exports);var Rt=Qc.exports;const Ba=6;function PT({dataset:e}){const[t,n]=A.useState(!1),[r,i]=A.useState(1),l=e.sample_data[0]?Object.keys(e.sample_data[0]):[],u=Math.ceil(e.columns.length/Ba),d=e.columns.slice((r-1)*Ba,r*Ba);return a.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Mn,{className:"w-5 h-5 text-blue-600"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:e.name})]}),a.jsx("p",{className:"text-gray-600 mt-1",children:e.description}),a.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[e.num_rows.toLocaleString()," rows • ",a.jsx("span",{className:"font-medium",children:"Raw:"})," ",e.columns.length," columns • ",a.jsx("span",{className:"font-medium",children:"Processed:"})," ",l.length," columns • Last synced"," ",new Date(e.updated_at).toLocaleDateString()]})]}),a.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800",children:[a.jsx(pT,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium",children:t?"Hide Statistics":"Show Statistics"}),t?a.jsx(Bl,{className:"w-4 h-4"}):a.jsx(aa,{className:"w-4 h-4"})]})]}),a.jsxs("div",{className:"space-y-6",children:[t&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(f=>a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-medium text-gray-900",children:f.name}),a.jsx("span",{className:"text-xs font-medium text-gray-500 px-2 py-1 bg-gray-200 rounded-full",children:f.datatype})]}),a.jsx("p",{className:"text-sm text-gray-600 mb-3",children:f.description}),f.statistics&&a.jsx("div",{className:"space-y-1",children:Object.entries(f.statistics.raw).map(([m,h])=>m==="counts"?null:a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsxs("span",{className:"text-gray-500",children:[m.charAt(0).toUpperCase()+m.slice(1),":"]}),a.jsx("span",{className:"font-medium text-gray-900",children:typeof h=="number"?h.toLocaleString(void 0,{maximumFractionDigits:2}):h})]},m))})]},f.name))}),u>1&&a.jsxs("div",{className:"flex items-center justify-between border-t pt-4",children:[a.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(r-1)*Ba+1," to ",Math.min(r*Ba,e.columns.length)," of ",e.columns.length," columns"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>i(f=>Math.max(1,f-1)),disabled:r===1,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:a.jsx(Pd,{className:"w-5 h-5"})}),a.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",r," of ",u]}),a.jsx("button",{onClick:()=>i(f=>Math.min(u,f+1)),disabled:r===u,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:a.jsx(Go,{className:"w-5 h-5"})})]})]})]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsx("div",{className:"inline-block min-w-full align-middle",children:a.jsx("div",{className:"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5 rounded-lg",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-300",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsx("tr",{children:l.map(f=>a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900",children:f},f))})}),a.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.sample_data.map((f,m)=>a.jsx("tr",{children:l.map(h=>{var g;return a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:(g=f[h])==null?void 0:g.toString()},f[h])})},m))})]})})})})]})]})}function zb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=zb(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function TT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zb(e))&&(r&&(r+=" "),r+=t);return r}const Gx=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Kx=TT,OT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Kx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:l}=t,u=Object.keys(i).map(m=>{const h=n==null?void 0:n[m],g=l==null?void 0:l[m];if(h===null)return null;const y=Gx(h)||Gx(g);return i[m][y]}),d=n&&Object.entries(n).reduce((m,h)=>{let[g,y]=h;return y===void 0||(m[g]=y),m},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((m,h)=>{let{class:g,className:y,...N}=h;return Object.entries(N).every(x=>{let[b,E]=x;return Array.isArray(E)?E.includes({...l,...d}[b]):{...l,...d}[b]===E})?[...m,g,y]:m},[]);return Kx(e,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};function Ub(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ub(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function RT(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ub(e))&&(r&&(r+=" "),r+=t);return r}const Zh="-",IT=e=>{const t=MT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{const d=u.split(Zh);return d[0]===""&&d.length!==1&&d.shift(),Bb(d,t)||LT(u)},getConflictingClassGroupIds:(u,d)=>{const f=n[u]||[];return d&&r[u]?[...f,...r[u]]:f}}},Bb=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Bb(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(Zh);return(u=t.validators.find(({validator:d})=>d(l)))==null?void 0:u.classGroupId},Qx=/^\[(.+)\]$/,LT=e=>{if(Qx.test(e)){const t=Qx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},MT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $T(Object.entries(e.classGroups),n).forEach(([l,u])=>{zm(u,r,l,t)}),r},zm=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:Xx(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(FT(i)){zm(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,u])=>{zm(u,Xx(t,l),n,r)})})},Xx=(e,t)=>{let n=e;return t.split(Zh).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},FT=e=>e.isThemeGetter,$T=(e,t)=>t?e.map(([n,r])=>{const i=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([u,d])=>[t+u,d])):l);return[n,i]}):e,DT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(l,u)=>{n.set(l,u),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let u=n.get(l);if(u!==void 0)return u;if((u=r.get(l))!==void 0)return i(l,u),u},set(l,u){n.has(l)?n.set(l,u):i(l,u)}}},Wb="!",zT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],l=t.length,u=d=>{const f=[];let m=0,h=0,g;for(let E=0;E<d.length;E++){let w=d[E];if(m===0){if(w===i&&(r||d.slice(E,E+l)===t)){f.push(d.slice(h,E)),h=E+l;continue}if(w==="/"){g=E;continue}}w==="["?m++:w==="]"&&m--}const y=f.length===0?d:d.substring(h),N=y.startsWith(Wb),x=N?y.substring(1):y,b=g&&g>h?g-h:void 0;return{modifiers:f,hasImportantModifier:N,baseClassName:x,maybePostfixModifierPosition:b}};return n?d=>n({className:d,parseClassName:u}):u},UT=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},BT=e=>({cache:DT(e.cacheSize),parseClassName:zT(e),...IT(e)}),WT=/\s+/,HT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,l=[],u=e.trim().split(WT);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{modifiers:h,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:N}=n(m);let x=!!N,b=r(x?y.substring(0,N):y);if(!b){if(!x){d=m+(d.length>0?" "+d:d);continue}if(b=r(y),!b){d=m+(d.length>0?" "+d:d);continue}x=!1}const E=UT(h).join(":"),w=g?E+Wb:E,S=w+b;if(l.includes(S))continue;l.push(S);const C=i(b,x);for(let I=0;I<C.length;++I){const O=C[I];l.push(w+O)}d=m+(d.length>0?" "+d:d)}return d};function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Hb(t))&&(r&&(r+=" "),r+=n);return r}const Hb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Hb(e[r]))&&(n&&(n+=" "),n+=t);return n};function qT(e,...t){let n,r,i,l=u;function u(f){const m=t.reduce((h,g)=>g(h),e());return n=BT(m),r=n.cache.get,i=n.cache.set,l=d,d(f)}function d(f){const m=r(f);if(m)return m;const h=HT(f,n);return i(f,h),h}return function(){return l(VT.apply(null,arguments))}}const et=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vb=/^\[(?:([a-z-]+):)?(.+)\]$/i,GT=/^\d+\/\d+$/,KT=new Set(["px","full","screen"]),QT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,os=e=>Lo(e)||KT.has(e)||GT.test(e),Ts=e=>ua(e,"length",aO),Lo=e=>!!e&&!Number.isNaN(Number(e)),Wp=e=>ua(e,"number",Lo),Wa=e=>!!e&&Number.isInteger(Number(e)),eO=e=>e.endsWith("%")&&Lo(e.slice(0,-1)),ke=e=>Vb.test(e),Os=e=>QT.test(e),tO=new Set(["length","size","percentage"]),nO=e=>ua(e,tO,qb),rO=e=>ua(e,"position",qb),sO=new Set(["image","url"]),iO=e=>ua(e,sO,uO),oO=e=>ua(e,"",lO),Ha=()=>!0,ua=(e,t,n)=>{const r=Vb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},aO=e=>XT.test(e)&&!YT.test(e),qb=()=>!1,lO=e=>JT.test(e),uO=e=>ZT.test(e),cO=()=>{const e=et("colors"),t=et("spacing"),n=et("blur"),r=et("brightness"),i=et("borderColor"),l=et("borderRadius"),u=et("borderSpacing"),d=et("borderWidth"),f=et("contrast"),m=et("grayscale"),h=et("hueRotate"),g=et("invert"),y=et("gap"),N=et("gradientColorStops"),x=et("gradientColorStopPositions"),b=et("inset"),E=et("margin"),w=et("opacity"),S=et("padding"),C=et("saturate"),I=et("scale"),O=et("sepia"),F=et("skew"),D=et("space"),z=et("translate"),B=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",ke,t],ce=()=>[ke,t],be=()=>["",os,Ts],se=()=>["auto",Lo,ke],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",ke],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>[Lo,ke];return{cacheSize:500,separator:":",theme:{colors:[Ha],spacing:[os,Ts],blur:["none","",Os,ke],brightness:he(),borderColor:[e],borderRadius:["none","","full",Os,ke],borderSpacing:ce(),borderWidth:be(),contrast:he(),grayscale:ie(),hueRotate:he(),invert:ie(),gap:ce(),gradientColorStops:[e],gradientColorStopPositions:[eO,Ts],inset:fe(),margin:fe(),opacity:he(),padding:ce(),saturate:he(),scale:he(),sepia:ie(),skew:he(),space:ce(),translate:ce()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[Os]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),ke]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wa,ke]}],basis:[{basis:fe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",Wa,ke]}],"grid-cols":[{"grid-cols":[Ha]}],"col-start-end":[{col:["auto",{span:["full",Wa,ke]},ke]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Ha]}],"row-start-end":[{row:["auto",{span:[Wa,ke]},ke]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[Os]},Os]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Os,Ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wp]}],"font-family":[{font:[Ha]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",Lo,Wp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",os,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",os,Ts]}],"underline-offset":[{"underline-offset":["auto",os,ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ce()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),rO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},iO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:pe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[os,ke]}],"outline-w":[{outline:[os,Ts]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[os,Ts]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Os,oO]}],"shadow-color":[{shadow:[Ha]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Os,ke]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:he()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:he()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Wa,ke]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ce()}],"scroll-mx":[{"scroll-mx":ce()}],"scroll-my":[{"scroll-my":ce()}],"scroll-ms":[{"scroll-ms":ce()}],"scroll-me":[{"scroll-me":ce()}],"scroll-mt":[{"scroll-mt":ce()}],"scroll-mr":[{"scroll-mr":ce()}],"scroll-mb":[{"scroll-mb":ce()}],"scroll-ml":[{"scroll-ml":ce()}],"scroll-p":[{"scroll-p":ce()}],"scroll-px":[{"scroll-px":ce()}],"scroll-py":[{"scroll-py":ce()}],"scroll-ps":[{"scroll-ps":ce()}],"scroll-pe":[{"scroll-pe":ce()}],"scroll-pt":[{"scroll-pt":ce()}],"scroll-pr":[{"scroll-pr":ce()}],"scroll-pb":[{"scroll-pb":ce()}],"scroll-pl":[{"scroll-pl":ce()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[os,Ts,Wp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dO=qT(cO);function gr(...e){return dO(RT(e))}const fO=OT("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",information:"border-transparent bg-blue-100 text-blue-800 hover:bg-blue-600",important:"border-transparent bg-red-100 text-red-800 hover:bg-red-600",warning:"border-transparent bg-yellow-100 text-yellow-800 hover:bg-yellow-600",success:"border-transparent bg-green-100 text-green-800 hover:bg-green-600"}},defaultVariants:{variant:"default"}});function el({className:e,variant:t,...n}){return a.jsx("div",{className:gr(fO({variant:t}),e),...n})}const Yx=e=>e==="float"||e==="integer",ac=e=>{var t,n,r,i,l;return{method:(e==null?void 0:e.method)||"none",params:{constant:(t=e==null?void 0:e.params)==null?void 0:t.constant,categorical_min:((n=e==null?void 0:e.params)==null?void 0:n.categorical_min)??100,one_hot:((r=e==null?void 0:e.params)==null?void 0:r.one_hot)??!0,ordinal_encoding:((i=e==null?void 0:e.params)==null?void 0:i.ordinal_encoding)??!1,clip:(l=e==null?void 0:e.params)==null?void 0:l.clip}}};function pO({column:e,dataset:t,setColumnType:n,setDataset:r,constants:i,onUpdate:l}){var se,Z,pe,oe,Q,ie,te,he,Ie,ft,yt,Y,q,ee,ne,Pe,xt,Ye,Sn,Un,jt,qt,At,Ut,Sr,Ur,jn,Nt,jr,Br,Vi,Nr,qi,Nn,Cn;const[u,d]=A.useState(!!((Z=(se=e.preprocessing_steps)==null?void 0:se.inference)!=null&&Z.method&&e.preprocessing_steps.inference.method!=="none")),f=e.datatype,[m,h]=A.useState(()=>{var ae;return ac((ae=e.preprocessing_steps)==null?void 0:ae.training)}),[g,y]=A.useState(()=>{var ae;return ac((ae=e.preprocessing_steps)==null?void 0:ae.inference)});A.useEffect(()=>{var ae,we;h(ac((ae=e.preprocessing_steps)==null?void 0:ae.training)),y(ac((we=e.preprocessing_steps)==null?void 0:we.inference))},[e.id]);const N=(ae,we)=>{let _e={};f==="categorical"&&(we==="categorical"?_e={..._e,categorical_min:100,one_hot:!0}:we!="none"&&(_e={..._e,one_hot:!0})),e.is_target&&(_e={..._e,ordinal_encoding:!0});const at={method:we,params:_e};ae==="training"?(h(at),l(at,u?g:void 0,u)):(y(at),l(m,at,u))},x=(ae,we)=>{const _e=m,at=h,pt={..._e,params:{categorical_min:_e.params.categorical_min,one_hot:_e.params.one_hot,ordinal_encoding:_e.params.ordinal_encoding,...we}};at(pt),l(pt,u?g:void 0,u)},b=(ae,we)=>{const _e=m,at=h,pt={..._e,params:{..._e.params,clip:{..._e.params.clip,...we}}};at(pt),l(pt,u?g:void 0,u)},E=(ae,we)=>{const _e=ae==="training"?m:g,at=ae==="training"?h:y,pt={..._e,params:{..._e.params,constant:we}};at(pt),ae==="training"?l(pt,u?g:void 0,u):l(m,pt,u)},w=ae=>{var _e,at;const we=ae==="training"?m:g;return we.method!=="constant"?null:a.jsxs("div",{className:"mt-4",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Constant Value"}),Yx(f)?a.jsx("input",{type:"number",value:((_e=we.params)==null?void 0:_e.constant)??"",onChange:pt=>E(ae,pt.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a number..."}):a.jsx("input",{type:"text",value:((at=we.params)==null?void 0:at.constant)??"",onChange:pt=>E(ae,pt.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a value..."})]})},[S,C]=A.useState(!1),I=ae=>{const we=t.columns.map(_e=>({..._e,drop_if_null:_e.name===e.name?ae.target.checked:_e.drop_if_null}));r({...t,columns:we})},O=ae=>{const we=t.columns.map(_e=>({..._e,description:_e.name===e.name?ae.target.value:_e.description}));r({...t,columns:we})},F=()=>{C(!1)},D=ae=>{ae.key==="Enter"?(ae.preventDefault(),C(!1)):ae.key==="Escape"&&C(!1)},z=()=>{C(!0)};let B=((pe=e.statistics)==null?void 0:pe.processed.null_count)||((oe=e.statistics)==null?void 0:oe.raw.null_count)||0;const H=B&&((Q=e.statistics)!=null&&Q.raw.num_rows)?B/e.statistics.raw.num_rows*100:0,fe=(te=(ie=e.statistics)==null?void 0:ie.processed)!=null&&te.null_count&&((he=e.statistics)!=null&&he.raw.num_rows)?e.statistics.processed.null_count/e.statistics.raw.num_rows*100:0,ce=((Ie=e.statistics)==null?void 0:Ie.raw.num_rows)??0,be=ae=>{var at,pt,Wr,ir,Hr,Vr;const we=m;let _e;if(we.method==="most_frequent"&&((at=e.statistics)!=null&&at.raw.most_frequent_value))_e=`Most Frequent Value: ${e.statistics.raw.most_frequent_value}`;else if(we.method==="ffill"){const oi=(pt=e.statistics)==null?void 0:pt.raw.last_value;oi!=null?_e=`Forward Fill using Last Value: ${oi}`:_e="Set date column & apply preprocessing to see last value"}else if(we.method==="median"&&((ir=(Wr=e.statistics)==null?void 0:Wr.raw)!=null&&ir.median))_e=`Median: ${e.statistics.raw.median}`;else if(we.method==="mean"&&((Vr=(Hr=e.statistics)==null?void 0:Hr.raw)!=null&&Vr.mean))_e=`Mean: ${e.statistics.raw.mean}`;else return null;return a.jsx("div",{className:"mt-4 bg-yellow-50 rounded-lg p-4",children:a.jsx("span",{className:"text-sm font-medium text-yellow-700",children:_e})})};return a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex-1 max-w-[70%]",children:[a.jsx("h2",{className:"text-2xl font-semibold text-gray-900",children:e.name}),a.jsx("div",{className:"mt-1 flex items-start gap-1",children:S?a.jsxs("div",{className:"flex-1",children:[a.jsx("textarea",{value:e.description||"",onChange:O,onBlur:F,onKeyDown:D,className:"w-full px-2 py-1 text-sm text-gray-900 border border-blue-500 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:2,autoFocus:!0,placeholder:"Enter column description..."}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Press Enter to save, Escape to cancel"})]}):a.jsxs("div",{className:"flex-3/4 flex items-start gap-1",children:[a.jsx("p",{className:"text-sm text-gray-500 cursor-pointer flex-grow truncate",onClick:z,children:e.description||"No description provided"}),a.jsx("button",{onClick:z,className:"p-1 text-gray-400 hover:text-gray-600 rounded-md hover:bg-gray-100 flex-shrink-0",children:a.jsx(NT,{className:"w-4 h-4"})})]})})]}),a.jsx("div",{className:"flex items-center gap-4 flex-shrink-0",children:e.is_target?a.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-purple-100 text-purple-800",children:"Target Column"}):a.jsx("div",{className:"flex items-center gap-2",children:a.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[a.jsx("input",{type:"checkbox",checked:e.drop_if_null,onChange:I,className:"rounded border-gray-300 text-red-600 focus:ring-red-500"}),a.jsxs("span",{className:"flex items-center gap-1 text-gray-700",children:[a.jsx(la,{className:"w-4 h-4 text-gray-400"}),"Drop if null"]})]})})})]}),a.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-6",children:[a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Mn,{className:"w-4 h-4 text-gray-500"}),a.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Raw Data Statistics"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Values:"}),a.jsx("span",{className:"font-medium text-gray-900",children:(yt=(ft=e.statistics)==null?void 0:ft.raw)==null?void 0:yt.null_count.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),a.jsx("span",{className:"font-medium text-gray-900",children:ce.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),a.jsxs("span",{className:"font-medium text-gray-900",children:[H.toFixed(2),"%"]})]}),a.jsx("div",{className:"mt-2",children:a.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${H}%`}})})})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Dm,{className:"w-4 h-4 text-gray-500"}),a.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Processed Data Statistics"})]}),(Y=t==null?void 0:t.preprocessing_steps)!=null&&Y.training?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Values:"}),a.jsx("span",{className:"font-medium text-gray-900",children:(ne=(ee=(q=e.statistics)==null?void 0:q.processed)==null?void 0:ee.null_count)==null?void 0:ne.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),a.jsx("span",{className:"font-medium text-gray-900",children:(Ye=(xt=(Pe=e.statistics)==null?void 0:Pe.processed)==null?void 0:xt.num_rows)==null?void 0:Ye.toLocaleString()})]}),a.jsxs("div",{className:"flex justify-between text-sm",children:[a.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),a.jsxs("span",{className:"font-medium text-gray-900",children:[fe.toFixed(2),"%"]})]}),a.jsx("div",{className:"mt-2",children:a.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${fe}%`}})})})]}):a.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No preprocessing configured"})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("span",{className:"text-sm text-gray-500",children:"Type"}),a.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:e.datatype})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("span",{className:"text-sm text-gray-500",children:"Unique Values"}),a.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((jt=(Un=(Sn=e.statistics)==null?void 0:Sn.processed)==null?void 0:Un.unique_count)==null?void 0:jt.toLocaleString())??"N/A"})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("span",{className:"text-sm text-gray-500",children:"Null Values"}),a.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((Ut=(At=(qt=e.statistics)==null?void 0:qt.processed)==null?void 0:At.null_count)==null?void 0:Ut.toLocaleString())??"0"})]})]}),(Sr=e.statistics)!=null&&Sr.processed.null_count?a.jsxs("div",{className:"mt-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Null Distribution"}),a.jsxs("span",{className:"text-sm text-gray-500",children:[H,"% of values are null"]})]}),a.jsx("div",{className:"relative h-2 bg-gray-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"absolute top-0 left-0 h-full bg-yellow-400 rounded-full",style:{width:`${H}%`}})})]}):a.jsx("div",{className:"mt-6 bg-green-50 rounded-lg p-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"}),a.jsx("span",{className:"text-sm text-green-700",children:"This column has no null values"})]})}),((jn=(Ur=e.statistics)==null?void 0:Ur.raw)==null?void 0:jn.sample_data)&&a.jsxs("div",{className:"mt-6",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Sample Values"}),a.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:a.jsx("div",{className:"flex flex-wrap gap-2",children:((jr=(Nt=e.statistics)==null?void 0:Nt.raw)==null?void 0:jr.sample_data)&&e.statistics.raw.sample_data.map((ae,we)=>a.jsx("span",{className:"px-2 py-1 bg-gray-100 rounded text-sm text-gray-700",children:String(ae)},we))})})]})]}),a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[a.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[a.jsx(Bi,{className:"w-5 h-5 text-gray-500"}),"Data Type"]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Column Type"}),a.jsx("select",{value:f,disabled:!0,className:"w-full rounded-md border-gray-300 bg-gray-50 shadow-sm text-gray-700 cursor-not-allowed",children:i.column_types.map(ae=>a.jsx("option",{value:ae.value,children:ae.label},ae.value))}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Column type cannot be changed after creation"})]}),a.jsxs("div",{className:"bg-gray-50 rounded-md p-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Sample Data"}),a.jsx("div",{className:"space-y-2",children:Array.isArray(e.sample_values)?e.sample_values.slice(0,3).map((ae,we)=>a.jsx("span",{className:"m-1 flex-items items-center",children:a.jsx(el,{children:String(ae)})},we)):[]})]})]})]}),a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[a.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[a.jsx(Dm,{className:"w-5 h-5 text-gray-500"}),"Preprocessing Strategy"]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Training Strategy"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"checkbox",id:"useDistinctInference",checked:u,onChange:ae=>{d(ae.target.checked),l(m,ae.target.checked?g:void 0,ae.target.checked)},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("label",{htmlFor:"useDistinctInference",className:"text-sm text-gray-700",children:"Use different strategy for inference"})]})]}),a.jsxs("div",{className:u?"grid grid-cols-2 gap-6":"",children:[a.jsxs("div",{children:[a.jsxs("select",{value:m.method,onChange:ae=>N("training",ae.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[a.jsx("option",{value:"none",children:"No preprocessing"}),(Br=i.preprocessing_strategies[f])==null?void 0:Br.map(ae=>a.jsx("option",{value:ae.value,children:ae.label},ae.value))]}),be(),w("training"),e.datatype==="categorical"&&m.method==="categorical"&&a.jsx("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Minimum Category Instances"}),a.jsx("input",{type:"number",min:"1",value:m.params.categorical_min,onChange:ae=>x("training",{categorical_min:parseInt(ae.target.value)}),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:'Categories with fewer instances will be grouped as "OTHER"'})]})}),e.datatype==="categorical"&&m.method!=="none"&&a.jsxs("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Encoding"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"radio",id:"oneHotEncode",name:"encoding",checked:m.params.one_hot,onChange:()=>x("training",{one_hot:!0,ordinal_encoding:!1}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("label",{htmlFor:"oneHotEncode",className:"text-sm text-gray-700",children:"One-hot encode categories"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"radio",id:"ordinalEncode",name:"encoding",checked:m.params.ordinal_encoding,onChange:()=>x("training",{one_hot:!1,ordinal_encoding:!0}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("label",{htmlFor:"ordinalEncode",className:"text-sm text-gray-700",children:"Ordinal encode categories"})]})]})]}),u&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(dT,{className:"w-4 h-4 text-gray-400"}),a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Inference Strategy"})]}),a.jsxs("select",{value:g.method,onChange:ae=>N("inference",ae.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[a.jsx("option",{value:"none",children:"No preprocessing"}),(Vi=i.preprocessing_strategies[f])==null?void 0:Vi.map(ae=>a.jsx("option",{value:ae.value,children:ae.label},ae.value))]}),w("inference")]})]})]}),Yx(f)&&m.method!=="none"&&a.jsxs("div",{className:"border-t pt-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Clip Values"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Min Value"}),a.jsx("input",{type:"number",value:((qi=(Nr=m.params)==null?void 0:Nr.clip)==null?void 0:qi.min)??"",onChange:ae=>{b("training",{min:ae.target.value?Number(ae.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No minimum"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Max Value"}),a.jsx("input",{type:"number",value:((Cn=(Nn=m.params)==null?void 0:Nn.clip)==null?void 0:Cn.max)??"",onChange:ae=>{b("training",{max:ae.target.value?Number(ae.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No maximum"})]})]})]})]})]})]})}function mO({columns:e,selectedColumn:t,onColumnSelect:n,onToggleHidden:r}){return _r().props,a.jsx("div",{className:"space-y-2 pb-2",children:e.map(i=>{var l,u,d;return a.jsxs("div",{className:`p-3 rounded-lg border ${t===i.name?"border-blue-500 bg-blue-50":i.is_target?"border-purple-500 bg-purple-50":i.hidden?"border-gray-200 bg-gray-50":"border-gray-200 hover:border-gray-300"} transition-colors duration-150`,children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[i.is_target&&a.jsx($b,{className:"w-4 h-4 text-purple-500"}),a.jsx("span",{className:`font-medium ${i.hidden?"text-gray-500":"text-gray-900"}`,children:i.name}),a.jsx("span",{className:"text-xs px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full",children:i.datatype})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[!i.is_target&&a.jsx("button",{onClick:()=>r(i.name),className:`p-1 rounded hover:bg-gray-100 ${i.hidden?"text-gray-500":"text-gray-400 hover:text-gray-600"}`,title:i.hidden?"Show column":"Hide column",children:i.hidden?a.jsx($m,{className:"w-4 h-4"}):a.jsx(Rb,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>n(i.name),className:"p-1 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-100",title:"Configure preprocessing",children:a.jsx(Bi,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{className:"text-sm text-gray-500",children:[i.description&&a.jsx("p",{className:`mb-1 line-clamp-1 ${i.drop_if_null?"text-gray-400":""}`,children:i.description}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[i.preprocessing_steps&&((l=i.preprocessing_steps)==null?void 0:l.training)&&((d=(u=i.preprocessing_steps)==null?void 0:u.training)==null?void 0:d.method)!=="none"&&a.jsxs("div",{className:"flex items-center gap-1 text-blue-600",children:[a.jsx(vn,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Preprocessing configured"})]}),i.hidden&&a.jsxs("div",{className:"flex items-center gap-1 text-gray-400",children:[a.jsx($m,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Hidden from training"})]})]})]})]},i.name)})})}const Hp=5;function hO({types:e,activeFilters:t,onFilterChange:n,columnStats:r,colHasPreprocessingSteps:i,columns:l}){const u=x=>{switch(x){case"training":return`${r.training} columns`;case"hidden":return`${r.hidden} columns`;case"preprocessed":return`${r.withPreprocessing} columns`;case"nulls":return`${r.withNulls} columns`;default:return`${r.total} columns`}},d=x=>{var b,E,w,S;return!((E=(b=x.statistics)==null?void 0:b.processed)!=null&&E.null_count)||!((S=(w=x.statistics)==null?void 0:w.processed)!=null&&S.num_rows)?0:x.statistics.processed.null_count/x.statistics.processed.num_rows*100},f=l.filter(x=>{var b,E,w,S;return((E=(b=x.statistics)==null?void 0:b.processed)==null?void 0:E.null_count)&&((S=(w=x.statistics)==null?void 0:w.processed)==null?void 0:S.null_count)>0}).sort((x,b)=>d(b)-d(x)),[m,h]=A.useState(1),g=Math.ceil(f.length/Hp),y=f.slice((m-1)*Hp,m*Hp),N=x=>{n({...t,types:t.types.includes(x)?t.types.filter(b=>b!==x):[...t.types,x]})};return a.jsxs("div",{className:"p-4 border-b space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[a.jsx(wT,{className:"w-4 h-4"}),"Column Views"]}),a.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",r.filtered," of ",r.total," columns"]})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("button",{onClick:()=>n({...t,view:"all"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="all"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Mn,{className:"w-4 h-4"}),"All",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("all"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"training"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="training"?"bg-green-100 text-green-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Rb,{className:"w-4 h-4"}),"Training",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("training"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"hidden"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="hidden"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx($m,{className:"w-4 h-4"}),"Hidden",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("hidden"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"preprocessed"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="preprocessed"?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Dm,{className:"w-4 h-4"}),"Preprocessed",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("preprocessed"),")"]})]}),a.jsxs("button",{onClick:()=>n({...t,view:"nulls"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="nulls"?"bg-yellow-100 text-yellow-900":"text-gray-600 hover:bg-gray-50"}`,children:[a.jsx(Db,{className:"w-4 h-4"}),"Has Nulls",a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",u("nulls"),")"]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs font-medium text-gray-700 mb-2 block",children:"Column Types"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(x=>a.jsx("button",{onClick:()=>N(x),className:`px-2 py-1 rounded-md text-xs font-medium ${t.types.includes(x)?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:x},x))})]}),t.view==="preprocessed"&&r.withPreprocessing>0&&a.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[a.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Preprocessing Overview"}),a.jsx("div",{className:"space-y-2",children:l.filter(i).map(x=>{var b;return a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-blue-800",children:x.name}),a.jsx("span",{className:"text-blue-600",children:(b=x.preprocessing_steps)==null?void 0:b.training.method})]},x.name)})})]}),t.view==="nulls"&&f.length>0&&a.jsxs("div",{className:"bg-yellow-50 rounded-lg p-3",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("h4",{className:"text-sm font-medium text-yellow-900",children:"Null Value Distribution"}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-yellow-700",children:[a.jsx("button",{onClick:()=>h(x=>Math.max(1,x-1)),disabled:m===1,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:a.jsx(Pd,{className:"w-4 h-4"})}),a.jsxs("span",{children:["Page ",m," of ",g]}),a.jsx("button",{onClick:()=>h(x=>Math.min(g,x+1)),disabled:m===g,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:a.jsx(Go,{className:"w-4 h-4"})})]})]}),a.jsx("div",{className:"space-y-2",children:y.map(x=>{var b,E,w,S;return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-yellow-800 text-sm min-w-[120px]",children:x.name}),a.jsx("div",{className:"flex-1 h-2 bg-yellow-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-yellow-400 rounded-full",style:{width:`${d(x)}%`}})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-yellow-800 text-xs",children:[d(x).toFixed(1),"% null"]}),a.jsxs("span",{className:"text-yellow-600 text-xs",children:["(",(E=(b=x.statistics)==null?void 0:b.nullCount)==null?void 0:E.toLocaleString()," / ",(S=(w=x.statistics)==null?void 0:w.rowCount)==null?void 0:S.toLocaleString(),")"]})]})]},x.name)})}),a.jsxs("div",{className:"mt-3 text-sm text-yellow-700",children:[f.length," columns contain null values"]})]})]})]})}function gO({saving:e,saved:t,error:n}){return n?a.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[a.jsx(vn,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium",children:n})]}):e?a.jsxs("div",{className:"flex items-center gap-2 text-blue-600",children:[a.jsx(Mi,{className:"w-4 h-4 animate-spin"}),a.jsx("span",{className:"text-sm font-medium",children:"Saving changes..."})]}):t?a.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[a.jsx(Fb,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium",children:"Changes saved"})]}):null}const nt=A.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Search...",renderOption:i},l)=>{const[u,d]=A.useState(!1),[f,m]=A.useState(""),h=A.useRef(null),g=A.useRef(null),y=e.find(x=>x.value===t),N=e.filter(x=>{var b;return x.label.toLowerCase().includes(f.toLowerCase())||((b=x.description)==null?void 0:b.toLowerCase().includes(f.toLowerCase()))});return A.useEffect(()=>{function x(b){h.current&&!h.current.contains(b.target)&&d(!1)}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),A.useEffect(()=>{u&&g.current&&g.current.focus()},[u]),a.jsxs("div",{className:"relative",ref:h,children:[a.jsx("button",{type:"button",onClick:()=>d(!u),className:"w-full bg-white relative border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",ref:l,children:y?a.jsx("span",{className:"block truncate",children:y.label}):a.jsx("span",{className:"block truncate text-gray-500",children:r})}),u&&a.jsxs("div",{className:"absolute z-10 mt-1 w-full bg-white shadow-lg max-h-96 rounded-md overflow-hidden",children:[a.jsx("div",{className:"p-2 border-b",children:a.jsxs("div",{className:"relative",children:[a.jsx(Jh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),a.jsx("input",{ref:g,type:"text",className:"w-full pl-9 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",placeholder:"Search...",value:f,onChange:x=>m(x.target.value),onClick:x=>x.stopPropagation()})]})}),a.jsx("div",{className:"max-h-60 overflow-y-auto",children:N.length===0?a.jsx("div",{className:"text-center py-4 text-sm text-gray-500",children:"No results found"}):a.jsx("ul",{className:"py-1",children:N.map(x=>a.jsx("li",{children:a.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 hover:bg-gray-100 ${x.value===t?"bg-blue-50":""}`,onClick:()=>{n(x.value),d(!1),m("")},children:i?i(x):a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("div",{className:"font-medium",children:x.label}),x.description&&a.jsx("div",{className:"text-sm text-gray-500",children:x.description})]}),x.value===t&&a.jsx(hT,{className:"w-4 h-4 text-blue-600"})]})})},x.value))})})]})]})});nt.displayName="SearchableSelect";function yO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gb=yO,xO=typeof Jt=="object"&&Jt&&Jt.Object===Object&&Jt,vO=xO,bO=vO,wO=typeof self=="object"&&self&&self.Object===Object&&self,_O=bO||wO||Function("return this")(),Kb=_O,SO=Kb,jO=function(){return SO.Date.now()},NO=jO,CO=/\s/;function EO(e){for(var t=e.length;t--&&CO.test(e.charAt(t)););return t}var kO=EO,AO=kO,PO=/^\s+/;function TO(e){return e&&e.slice(0,AO(e)+1).replace(PO,"")}var OO=TO,RO=Kb,IO=RO.Symbol,Qb=IO,Jx=Qb,Xb=Object.prototype,LO=Xb.hasOwnProperty,MO=Xb.toString,Va=Jx?Jx.toStringTag:void 0;function FO(e){var t=LO.call(e,Va),n=e[Va];try{e[Va]=void 0;var r=!0}catch{}var i=MO.call(e);return r&&(t?e[Va]=n:delete e[Va]),i}var $O=FO,DO=Object.prototype,zO=DO.toString;function UO(e){return zO.call(e)}var BO=UO,Zx=Qb,WO=$O,HO=BO,VO="[object Null]",qO="[object Undefined]",ev=Zx?Zx.toStringTag:void 0;function GO(e){return e==null?e===void 0?qO:VO:ev&&ev in Object(e)?WO(e):HO(e)}var KO=GO;function QO(e){return e!=null&&typeof e=="object"}var XO=QO,YO=KO,JO=XO,ZO="[object Symbol]";function eR(e){return typeof e=="symbol"||JO(e)&&YO(e)==ZO}var tR=eR,nR=OO,tv=Gb,rR=tR,nv=NaN,sR=/^[-+]0x[0-9a-f]+$/i,iR=/^0b[01]+$/i,oR=/^0o[0-7]+$/i,aR=parseInt;function lR(e){if(typeof e=="number")return e;if(rR(e))return nv;if(tv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=tv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nR(e);var n=iR.test(e);return n||oR.test(e)?aR(e.slice(2),n?2:8):sR.test(e)?nv:+e}var uR=lR,cR=Gb,Vp=NO,rv=uR,dR="Expected a function",fR=Math.max,pR=Math.min;function mR(e,t,n){var r,i,l,u,d,f,m=0,h=!1,g=!1,y=!0;if(typeof e!="function")throw new TypeError(dR);t=rv(t)||0,cR(n)&&(h=!!n.leading,g="maxWait"in n,l=g?fR(rv(n.maxWait)||0,t):l,y="trailing"in n?!!n.trailing:y);function N(F){var D=r,z=i;return r=i=void 0,m=F,u=e.apply(z,D),u}function x(F){return m=F,d=setTimeout(w,t),h?N(F):u}function b(F){var D=F-f,z=F-m,B=t-D;return g?pR(B,l-z):B}function E(F){var D=F-f,z=F-m;return f===void 0||D>=t||D<0||g&&z>=l}function w(){var F=Vp();if(E(F))return S(F);d=setTimeout(w,b(F))}function S(F){return d=void 0,y&&r?N(F):(r=i=void 0,u)}function C(){d!==void 0&&clearTimeout(d),m=0,r=f=i=d=void 0}function I(){return d===void 0?u:S(Vp())}function O(){var F=Vp(),D=E(F);if(r=arguments,i=this,f=F,D){if(d===void 0)return x(f);if(g)return clearTimeout(d),d=setTimeout(w,t),N(f)}return d===void 0&&(d=setTimeout(w,t)),u}return O.cancel=C,O.flush=I,O}var hR=mR;const gR=_d(hR);function yR(e,t,n=1e3){const[r,i]=A.useState({saving:!1,saved:!1,error:null}),l=A.useRef(JSON.stringify(e)),u=A.useCallback(gR(async d=>{i(f=>({...f,saving:!0,error:null}));try{await t(d),l.current=JSON.stringify(d),i({saving:!1,saved:!0,error:null}),setTimeout(()=>{i(f=>({...f,saved:!1}))},4e3)}catch(f){i({saving:!1,saved:!1,error:f instanceof Error?f.message:"Failed to save changes"})}},n),[t,n]);return A.useEffect(()=>(JSON.stringify(e)!==l.current&&u(e),()=>{u.cancel()}),[e,u]),r}function xR({trigger:e,children:t,className:n=""}){const[r,i]=A.useState(!1),l=A.useRef(null),u=A.useRef(null);return A.useEffect(()=>{const d=f=>{var m;l.current&&!l.current.contains(f.target)&&!((m=u.current)!=null&&m.contains(f.target))&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),a.jsxs("div",{className:"relative",children:[a.jsx("div",{ref:u,onClick:()=>i(!r),children:e}),r&&a.jsxs("div",{ref:l,className:`absolute z-50 right-0 mt-2 bg-white rounded-lg shadow-lg border border-gray-200 ${n}`,children:[a.jsxs("div",{className:"flex justify-between items-center p-3 border-b border-gray-200",children:[a.jsx("h3",{className:"font-medium",children:"Feature Configuration"}),a.jsx("button",{onClick:()=>i(!1),className:"text-gray-400 hover:text-gray-600",children:a.jsx(Hl,{className:"w-4 h-4"})})]}),a.jsx("div",{className:"p-4",children:t})]})]})}function vR(){return a.jsx(xR,{trigger:a.jsx("button",{type:"button",className:"p-2 text-gray-400 hover:text-gray-600",title:"Configure features",children:a.jsx(Bi,{className:"w-5 h-5"})}),className:"w-96",children:a.jsxs("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-600",children:"Feature options can be configured in the codebase, and loaded in initializers:"}),a.jsx("div",{className:"bg-gray-50 p-3 rounded-md",children:a.jsx("code",{className:"text-sm text-gray-800",children:"config/initializers/features.rb"})}),a.jsx("p",{className:"text-sm text-gray-600",children:"Example feature implementation:"}),a.jsx("pre",{className:"bg-gray-50 p-3 rounded-md overflow-x-auto",children:a.jsx("code",{className:"text-xs text-gray-800",children:`# lib/features/did_convert.rb
|
408
408
|
module Features
|
409
409
|
class DidConvert
|
410
410
|
include EasyML::Features
|
@@ -471,4 +471,4 @@ Error generating stack: `+l.message+`
|
|
471
471
|
flex-grow: 1;
|
472
472
|
}
|
473
473
|
`},nonce:l}),a.jsx(vs.div,{"data-radix-scroll-area-viewport":"",...u,asChild:i,ref:m,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...e.style},children:JL({asChild:i,children:r},h=>a.jsx("div",{"data-radix-scroll-area-content":"",ref:d.onContentChange,style:{minWidth:d.scrollbarXEnabled?"fit-content":void 0},children:h}))})]})});pS.displayName=fS;var zr="ScrollAreaScrollbar",Gg=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=sr(zr,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:u}=i,d=e.orientation==="horizontal";return A.useEffect(()=>(d?l(!0):u(!0),()=>{d?l(!1):u(!1)}),[d,l,u]),i.type==="hover"?a.jsx(WL,{...r,ref:t,forceMount:n}):i.type==="scroll"?a.jsx(HL,{...r,ref:t,forceMount:n}):i.type==="auto"?a.jsx(mS,{...r,ref:t,forceMount:n}):i.type==="always"?a.jsx(Kg,{...r,ref:t}):null});Gg.displayName=zr;var WL=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=sr(zr,e.__scopeScrollArea),[l,u]=A.useState(!1);return A.useEffect(()=>{const d=i.scrollArea;let f=0;if(d){const m=()=>{window.clearTimeout(f),u(!0)},h=()=>{f=window.setTimeout(()=>u(!1),i.scrollHideDelay)};return d.addEventListener("pointerenter",m),d.addEventListener("pointerleave",h),()=>{window.clearTimeout(f),d.removeEventListener("pointerenter",m),d.removeEventListener("pointerleave",h)}}},[i.scrollArea,i.scrollHideDelay]),a.jsx(fa,{present:n||l,children:a.jsx(mS,{"data-state":l?"visible":"hidden",...r,ref:t})})}),HL=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=sr(zr,e.__scopeScrollArea),l=e.orientation==="horizontal",u=Qd(()=>f("SCROLL_END"),100),[d,f]=UL("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return A.useEffect(()=>{if(d==="idle"){const m=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(m)}},[d,i.scrollHideDelay,f]),A.useEffect(()=>{const m=i.viewport,h=l?"scrollLeft":"scrollTop";if(m){let g=m[h];const y=()=>{const N=m[h];g!==N&&(f("SCROLL"),u()),g=N};return m.addEventListener("scroll",y),()=>m.removeEventListener("scroll",y)}},[i.viewport,l,f,u]),a.jsx(fa,{present:n||d!=="hidden",children:a.jsx(Kg,{"data-state":d==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ys(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Ys(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),mS=A.forwardRef((e,t)=>{const n=sr(zr,e.__scopeScrollArea),{forceMount:r,...i}=e,[l,u]=A.useState(!1),d=e.orientation==="horizontal",f=Qd(()=>{if(n.viewport){const m=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;u(d?m:h)}},10);return ta(n.viewport,f),ta(n.content,f),a.jsx(fa,{present:r||l,children:a.jsx(Kg,{"data-state":l?"visible":"hidden",...i,ref:t})})}),Kg=A.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=sr(zr,e.__scopeScrollArea),l=A.useRef(null),u=A.useRef(0),[d,f]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=vS(d.viewport,d.content),h={...r,sizes:d,onSizesChange:f,hasThumb:m>0&&m<1,onThumbChange:y=>l.current=y,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:y=>u.current=y};function g(y,N){return XL(y,u.current,d,N)}return n==="horizontal"?a.jsx(VL,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&l.current){const y=i.viewport.scrollLeft,N=p1(y,d,i.dir);l.current.style.transform=`translate3d(${N}px, 0, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollLeft=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollLeft=g(y,i.dir))}}):n==="vertical"?a.jsx(qL,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&l.current){const y=i.viewport.scrollTop,N=p1(y,d);l.current.style.transform=`translate3d(0, ${N}px, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollTop=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollTop=g(y))}}):null}),VL=A.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,l=sr(zr,e.__scopeScrollArea),[u,d]=A.useState(),f=A.useRef(null),m=ii(t,f,l.onScrollbarXChange);return A.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),a.jsx(gS,{"data-orientation":"horizontal",...i,ref:m,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Kd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,g)=>{if(l.viewport){const y=l.viewport.scrollLeft+h.deltaX;e.onWheelScroll(y),wS(y,g)&&h.preventDefault()}},onResize:()=>{f.current&&l.viewport&&u&&r({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:wd(u.paddingLeft),paddingEnd:wd(u.paddingRight)}})}})}),qL=A.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,l=sr(zr,e.__scopeScrollArea),[u,d]=A.useState(),f=A.useRef(null),m=ii(t,f,l.onScrollbarYChange);return A.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),a.jsx(gS,{"data-orientation":"vertical",...i,ref:m,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Kd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,g)=>{if(l.viewport){const y=l.viewport.scrollTop+h.deltaY;e.onWheelScroll(y),wS(y,g)&&h.preventDefault()}},onResize:()=>{f.current&&l.viewport&&u&&r({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:wd(u.paddingTop),paddingEnd:wd(u.paddingBottom)}})}})}),[GL,hS]=cS(zr),gS=A.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:l,onThumbPointerUp:u,onThumbPointerDown:d,onThumbPositionChange:f,onDragScroll:m,onWheelScroll:h,onResize:g,...y}=e,N=sr(zr,n),[x,b]=A.useState(null),E=ii(t,B=>b(B)),w=A.useRef(null),S=A.useRef(""),C=N.viewport,I=r.content-r.viewport,O=us(h),F=us(f),D=Qd(g,10);function z(B){if(w.current){const H=B.clientX-w.current.left,fe=B.clientY-w.current.top;m({x:H,y:fe})}}return A.useEffect(()=>{const B=H=>{const fe=H.target;(x==null?void 0:x.contains(fe))&&O(H,I)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[C,x,I,O]),A.useEffect(F,[r,F]),ta(x,D),ta(N.content,D),a.jsx(GL,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:us(l),onThumbPointerUp:us(u),onThumbPositionChange:F,onThumbPointerDown:us(d),children:a.jsx(vs.div,{...y,ref:E,style:{position:"absolute",...y.style},onPointerDown:Ys(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),w.current=x.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N.viewport&&(N.viewport.style.scrollBehavior="auto"),z(B))}),onPointerMove:Ys(e.onPointerMove,z),onPointerUp:Ys(e.onPointerUp,B=>{const H=B.target;H.hasPointerCapture(B.pointerId)&&H.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=S.current,N.viewport&&(N.viewport.style.scrollBehavior=""),w.current=null})})})}),bd="ScrollAreaThumb",yS=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hS(bd,e.__scopeScrollArea);return a.jsx(fa,{present:n||i.hasThumb,children:a.jsx(KL,{ref:t,...r})})}),KL=A.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,l=sr(bd,n),u=hS(bd,n),{onThumbPositionChange:d}=u,f=ii(t,g=>u.onThumbChange(g)),m=A.useRef(),h=Qd(()=>{m.current&&(m.current(),m.current=void 0)},100);return A.useEffect(()=>{const g=l.viewport;if(g){const y=()=>{if(h(),!m.current){const N=YL(g,d);m.current=N,d()}};return d(),g.addEventListener("scroll",y),()=>g.removeEventListener("scroll",y)}},[l.viewport,h,d]),a.jsx(vs.div,{"data-state":u.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ys(e.onPointerDownCapture,g=>{const N=g.target.getBoundingClientRect(),x=g.clientX-N.left,b=g.clientY-N.top;u.onThumbPointerDown({x,y:b})}),onPointerUp:Ys(e.onPointerUp,u.onThumbPointerUp)})});yS.displayName=bd;var Qg="ScrollAreaCorner",xS=A.forwardRef((e,t)=>{const n=sr(Qg,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(QL,{...e,ref:t}):null});xS.displayName=Qg;var QL=A.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=sr(Qg,n),[l,u]=A.useState(0),[d,f]=A.useState(0),m=!!(l&&d);return ta(i.scrollbarX,()=>{var g;const h=((g=i.scrollbarX)==null?void 0:g.offsetHeight)||0;i.onCornerHeightChange(h),f(h)}),ta(i.scrollbarY,()=>{var g;const h=((g=i.scrollbarY)==null?void 0:g.offsetWidth)||0;i.onCornerWidthChange(h),u(h)}),m?a.jsx(vs.div,{...r,ref:t,style:{width:l,height:d,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function wd(e){return e?parseInt(e,10):0}function vS(e,t){const n=e/t;return isNaN(n)?0:n}function Kd(e){const t=vS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function XL(e,t,n,r="ltr"){const i=Kd(n),l=i/2,u=t||l,d=i-u,f=n.scrollbar.paddingStart+u,m=n.scrollbar.size-n.scrollbar.paddingEnd-d,h=n.content-n.viewport,g=r==="ltr"?[0,h]:[h*-1,0];return bS([f,m],g)(e)}function p1(e,t,n="ltr"){const r=Kd(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-i,u=t.content-t.viewport,d=l-r,f=n==="ltr"?[0,u]:[u*-1,0],m=zL(e,f);return bS([0,u],[0,d])(m)}function bS(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function wS(e,t){return e>0&&e<t}var YL=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const l={left:e.scrollLeft,top:e.scrollTop},u=n.left!==l.left,d=n.top!==l.top;(u||d)&&t(),n=l,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Qd(e,t){const n=us(e),r=A.useRef(0);return A.useEffect(()=>()=>window.clearTimeout(r.current),[]),A.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ta(e,t){const n=us(t);Ml(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}function JL(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const i=A.Children.only(r);return A.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}var _S=dS,ZL=pS,eM=xS;const SS=A.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(_S,{ref:r,className:gr("relative overflow-hidden",e),...n,children:[a.jsx(ZL,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(jS,{}),a.jsx(eM,{})]}));SS.displayName=_S.displayName;const jS=A.forwardRef(({className:e,orientation:t="vertical",...n},r)=>a.jsx(Gg,{ref:r,orientation:t,className:gr("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:a.jsx(yS,{className:"relative flex-1 rounded-full bg-border"})}));jS.displayName=Gg.displayName;var tM="Separator",m1="horizontal",nM=["horizontal","vertical"],NS=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=m1,...i}=e,l=rM(r)?r:m1,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return a.jsx(vs.div,{"data-orientation":l,...d,...i,ref:t})});NS.displayName=tM;function rM(e){return nM.includes(e)}var CS=NS;const ES=A.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>a.jsx(CS,{ref:i,decorative:n,orientation:t,className:gr("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ES.displayName=CS.displayName;function sM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=iM({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:r,d=us(n),f=A.useCallback(m=>{if(l){const g=typeof m=="function"?m(e):m;g!==e&&d(g)}else i(m)},[l,e,i,d]);return[u,f]}function iM({defaultProp:e,onChange:t}){const n=A.useState(e),[r]=n,i=A.useRef(r),l=us(t);return A.useEffect(()=>{i.current!==r&&(l(r),i.current=r)},[r,i,l]),n}var oM=C4.useId||(()=>{}),aM=0;function lM(e){const[t,n]=A.useState(oM());return Ml(()=>{e||n(r=>r??String(aM++))},[e]),e||(t?`radix-${t}`:"")}var Xg="Collapsible",[uM,NM]=uS(Xg),[cM,Yg]=uM(Xg),kS=A.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:l,onOpenChange:u,...d}=e,[f=!1,m]=sM({prop:r,defaultProp:i,onChange:u});return a.jsx(cM,{scope:n,disabled:l,contentId:lM(),open:f,onOpenToggle:A.useCallback(()=>m(h=>!h),[m]),children:a.jsx(vs.div,{"data-state":Zg(f),"data-disabled":l?"":void 0,...d,ref:t})})});kS.displayName=Xg;var AS="CollapsibleTrigger",PS=A.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Yg(AS,n);return a.jsx(vs.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Zg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ys(e.onClick,i.onOpenToggle)})});PS.displayName=AS;var Jg="CollapsibleContent",TS=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Yg(Jg,e.__scopeCollapsible);return a.jsx(fa,{present:n||i.open,children:({present:l})=>a.jsx(dM,{...r,ref:t,present:l})})});TS.displayName=Jg;var dM=A.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...l}=e,u=Yg(Jg,n),[d,f]=A.useState(r),m=A.useRef(null),h=ii(t,m),g=A.useRef(0),y=g.current,N=A.useRef(0),x=N.current,b=u.open||d,E=A.useRef(b),w=A.useRef();return A.useEffect(()=>{const S=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(S)},[]),Ml(()=>{const S=m.current;if(S){w.current=w.current||{transitionDuration:S.style.transitionDuration,animationName:S.style.animationName},S.style.transitionDuration="0s",S.style.animationName="none";const C=S.getBoundingClientRect();g.current=C.height,N.current=C.width,E.current||(S.style.transitionDuration=w.current.transitionDuration,S.style.animationName=w.current.animationName),f(r)}},[u.open,r]),a.jsx(vs.div,{"data-state":Zg(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!b,...l,ref:h,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:b&&i})});function Zg(e){return e?"open":"closed"}var fM=kS;const pM=fM,mM=PS,hM=TS;function h1({href:e,className:t=l=>"",activeClassName:n="active",children:r,...i}){const{rootPath:l,url:u}=_r().props,d=u===e;let f=t(d);return a.jsx(yr,{href:`${l}${e}`,className:gr(f,d&&n),...i,children:r})}const gM=[{title:"Models",icon:Bs,href:"/",children:[{title:"All Models",icon:Bs,href:"/models"},{title:"New Model",icon:Bs,href:"/models/new"}]},{title:"Datasources",icon:Io,href:"/datasources",children:[{title:"All Datasources",icon:Io,href:"/datasources"},{title:"New Datasource",icon:Io,href:"/datasources/new"}]},{title:"Datasets",icon:Mn,href:"/datasets",children:[{title:"All Datasets",icon:Mn,href:"/datasets"},{title:"New Dataset",icon:Mn,href:"/datasets/new"}]}];function yM(e){const{rootPath:t}=_r().props,n=e.split("/").filter(Boolean),r=[];let i=t;if(n.length===0)return[];let l,u;switch(["datasources","datasets","models","settings"].includes(n[0])?(l=n[0],u=0):(l=n[1],u=1),l){case"models":r.push({title:"Models",href:`${t}/models`});break;case"datasources":r.push({title:"Datasources",href:`${t}/datasources`});break;case"datasets":r.push({title:"Datasets",href:`${t}/datasets`});break;case"settings":r.push({title:"Settings",href:`${t}/settings`});break;default:r.push({title:"Models",href:`${t}/models`})}for(let d=u+1;d<n.length;d++){const f=n[d];if(i+=`/${n[d]}`,n[d-1]==="datasets"&&f!=="new")r.push({title:"Details",href:i});else if(n[d-1]==="models"&&f!=="new")r.push({title:"Details",href:i});else{const m=f==="new"?"New":f==="edit"?"Edit":f.charAt(0).toUpperCase()+f.slice(1);r.push({title:m,href:i})}}return r}function xM({children:e}){const[t,n]=A.useState(!0),[r,i]=A.useState(["Models"]),l=yM(location.pathname),u=d=>{i(f=>f.includes(d)?f.filter(m=>m!==d):[...f,d])};return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsxs("div",{className:gr("fixed left-0 top-0 z-40 h-screen bg-white border-r transition-all duration-300",t?"w-64":"w-16"),children:[a.jsxs("div",{className:"flex h-16 items-center border-b px-4",children:[t?a.jsxs(a.Fragment,{children:[a.jsx(Bs,{className:"w-8 h-8 text-blue-600"}),a.jsx("h1",{className:"text-xl font-bold text-gray-900 ml-2",children:"EasyML"})]}):a.jsx(Bs,{className:"w-8 h-8 text-blue-600"}),a.jsx("button",{onClick:()=>n(!t),className:"ml-auto p-2 hover:bg-gray-100 rounded-md",children:a.jsx(jT,{className:"w-4 h-4"})})]}),a.jsx(SS,{className:"h-[calc(100vh-4rem)] px-3",children:a.jsxs("div",{className:"space-y-2 py-4",children:[gM.map(d=>{var f;return a.jsxs(pM,{open:r.includes(d.title),onOpenChange:()=>u(d.title),children:[a.jsxs(mM,{className:"flex items-center w-full p-2 hover:bg-gray-100 rounded-md",children:[a.jsx(d.icon,{className:"w-4 h-4"}),t&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"ml-2 text-sm font-medium flex-1 text-left",children:d.title}),r.includes(d.title)?a.jsx(aa,{className:"w-4 h-4"}):a.jsx(Go,{className:"w-4 h-4"})]})]}),a.jsx(hM,{children:t&&((f=d.children)==null?void 0:f.map(m=>a.jsxs(h1,{href:m.href,className:({isActive:h})=>gr("flex items-center pl-8 pr-2 py-2 text-sm rounded-md",h?"bg-blue-50 text-blue-600":"text-gray-600 hover:bg-gray-50"),children:[a.jsx(m.icon,{className:"w-4 h-4"}),a.jsx("span",{className:"ml-2",children:m.title})]},m.href)))})]},d.title)}),a.jsx(ES,{className:"my-4"}),a.jsxs(h1,{href:"/settings",className:({isActive:d})=>gr("flex items-center w-full p-2 rounded-md",d?"bg-blue-50 text-blue-600":"text-gray-600 hover:bg-gray-50"),children:[a.jsx(Bi,{className:"w-4 h-4"}),t&&a.jsx("span",{className:"ml-2 text-sm font-medium",children:"Settings"})]})]})})]}),a.jsxs("div",{className:gr("transition-all duration-300",t?"ml-64":"ml-16"),children:[a.jsx(EL,{}),a.jsx("div",{className:"h-16 border-b bg-white flex items-center px-4",children:a.jsx("nav",{className:"flex","aria-label":"Breadcrumb",children:a.jsx("ol",{className:"flex items-center space-x-2",children:l.map((d,f)=>a.jsxs(tr.Fragment,{children:[f>0&&a.jsx(Go,{className:"w-4 h-4 text-gray-400"}),a.jsx("li",{children:a.jsx(yr,{href:d.href,className:gr("text-sm",f===l.length-1?"text-blue-600 font-medium":"text-gray-500 hover:text-gray-700"),children:d.title})})]},d.href))})})}),a.jsx("main",{className:"min-h-[calc(100vh-4rem)]",children:e})]})]})}function vM({children:e}){const{showAlert:t}=oS(),{flash:n}=_r().props;return A.useEffect(()=>{n&&n.forEach(({type:r,message:i})=>{t(r,i)})},[n,t]),a.jsx(a.Fragment,{children:e})}function bM({children:e}){return a.jsx(CL,{children:a.jsx(vM,{children:a.jsx(xM,{children:e})})})}document.addEventListener("DOMContentLoaded",()=>{iT({resolve:e=>{let n=Object.assign({"../pages/DatasetDetailsPage.tsx":SR,"../pages/DatasetsPage.tsx":NR,"../pages/DatasourceFormPage.tsx":PR,"../pages/DatasourcesPage.tsx":OR,"../pages/EditModelPage.tsx":LR,"../pages/EditTransformationPage.tsx":zR,"../pages/ModelsPage.tsx":WR,"../pages/NewDatasetPage.tsx":o6,"../pages/NewModelPage.tsx":l6,"../pages/NewTransformationPage.tsx":c6,"../pages/SettingsPage.tsx":p6,"../pages/ShowModelPage.tsx":g6,"../pages/TransformationsPage.tsx":b6})[`../${e}.tsx`];if(!n.default){alert(`The page ${e} could not be found, you probably forgot to export default.`);return}return n.default.layout=n.default.layout||(r=>a.jsx(bM,{children:r})),n},setup({el:e,App:t,props:n}){sS(e).render(a.jsx(t,{...n}))}})});
|
474
|
-
//# sourceMappingURL=Application.tsx-
|
474
|
+
//# sourceMappingURL=Application.tsx-D08fSV1N.js.map
|