cecomponent 1.0.96 → 1.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ce-component-lib.js +1 -1
- package/dist/ce-component-lib.mjs +2 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/ce-component-lib.js
CHANGED
|
@@ -338,4 +338,4 @@ n.goToAndStop(p-n.firstFrame-1,!0)}m.type==="loop"&&(u===null||u!==m.frames||n.i
|
|
|
338
338
|
`),c.push(` </office:body>
|
|
339
339
|
`),l.bookType=="fods"?c.push("</office:document>"):c.push("</office:document-content>"),c.join("")}}();function write_ods(e,t){if(t.bookType=="fods")return write_content_ods(e,t);var i=zip_new(),n="",s=[],a=[];return n="mimetype",zip_add_file(i,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",zip_add_file(i,n,write_content_ods(e,t)),s.push([n,"text/xml"]),a.push([n,"ContentFile"]),n="styles.xml",zip_add_file(i,n,write_styles_ods(e,t)),s.push([n,"text/xml"]),a.push([n,"StylesFile"]),n="meta.xml",zip_add_file(i,n,XML_HEADER+write_meta_ods()),s.push([n,"text/xml"]),a.push([n,"MetadataFile"]),n="manifest.rdf",zip_add_file(i,n,write_rdf(a)),s.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",zip_add_file(i,n,write_manifest(s)),i}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function u8_to_dataview(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function stru8(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):s2a(utf8write(e))}function u8contains(e,t){e:for(var i=0;i<=e.length-t.length;++i){for(var n=0;n<t.length;++n)if(e[i+n]!=t[n])continue e;return!0}return!1}function u8concat(e){var t=e.reduce(function(s,a){return s+a.length},0),i=new Uint8Array(t),n=0;return e.forEach(function(s){i.set(s,n),n+=s.length}),i}function writeDecimal128LE(e,t,i){var n=Math.floor(i==0?0:Math.LOG10E*Math.log(Math.abs(i)))+6176-20,s=i/Math.pow(10,n-6176);e[t+15]|=n>>7,e[t+14]|=(n&127)<<1;for(var a=0;s>=1;++a,s/=256)e[t+a]=s&255;e[t+15]|=i>=0?0:128}function parse_varint49(e,t){var i=t?t[0]:0,n=e[i]&127;e:if(e[i++]>=128&&(n|=(e[i]&127)<<7,e[i++]<128||(n|=(e[i]&127)<<14,e[i++]<128)||(n|=(e[i]&127)<<21,e[i++]<128)||(n+=(e[i]&127)*Math.pow(2,28),++i,e[i++]<128)||(n+=(e[i]&127)*Math.pow(2,35),++i,e[i++]<128)||(n+=(e[i]&127)*Math.pow(2,42),++i,e[i++]<128)))break e;return t&&(t[0]=i),n}function write_varint49(e){var t=new Uint8Array(7);t[0]=e&127;var i=1;e:if(e>127){if(t[i-1]|=128,t[i]=e>>7&127,++i,e<=16383||(t[i-1]|=128,t[i]=e>>14&127,++i,e<=2097151)||(t[i-1]|=128,t[i]=e>>21&127,++i,e<=268435455)||(t[i-1]|=128,t[i]=e/256>>>21&127,++i,e<=34359738367)||(t[i-1]|=128,t[i]=e/65536>>>21&127,++i,e<=4398046511103))break e;t[i-1]|=128,t[i]=e/16777216>>>21&127,++i}return t.slice(0,i)}function varint_to_i32(e){var t=0,i=e[t]&127;e:if(e[t++]>=128){if(i|=(e[t]&127)<<7,e[t++]<128||(i|=(e[t]&127)<<14,e[t++]<128)||(i|=(e[t]&127)<<21,e[t++]<128))break e;i|=(e[t]&127)<<28}return i}function parse_shallow(e){for(var t=[],i=[0];i[0]<e.length;){var n=i[0],s=parse_varint49(e,i),a=s&7;s=Math.floor(s/8);var o=0,l;if(s==0)break;switch(a){case 0:{for(var c=i[0];e[i[0]++]>=128;);l=e.slice(c,i[0])}break;case 5:o=4,l=e.slice(i[0],i[0]+o),i[0]+=o;break;case 1:o=8,l=e.slice(i[0],i[0]+o),i[0]+=o;break;case 2:o=parse_varint49(e,i),l=e.slice(i[0],i[0]+o),i[0]+=o;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(s," at offset ").concat(n))}var f={data:l,type:a};t[s]==null?t[s]=[f]:t[s].push(f)}return t}function write_shallow(e){var t=[];return e.forEach(function(i,n){i.forEach(function(s){s.data&&(t.push(write_varint49(n*8+s.type)),s.type==2&&t.push(write_varint49(s.data.length)),t.push(s.data))})}),u8concat(t)}function parse_iwa_file(e){for(var t,i=[],n=[0];n[0]<e.length;){var s=parse_varint49(e,n),a=parse_shallow(e.slice(n[0],n[0]+s));n[0]+=s;var o={id:varint_to_i32(a[1][0].data),messages:[]};a[2].forEach(function(l){var c=parse_shallow(l.data),f=varint_to_i32(c[3][0].data);o.messages.push({meta:c,data:e.slice(n[0],n[0]+f)}),n[0]+=f}),(t=a[3])!=null&&t[0]&&(o.merge=varint_to_i32(a[3][0].data)>>>0>0),i.push(o)}return i}function write_iwa_file(e){var t=[];return e.forEach(function(i){var n=[];n[1]=[{data:write_varint49(i.id),type:0}],n[2]=[],i.merge!=null&&(n[3]=[{data:write_varint49(+!!i.merge),type:0}]);var s=[];i.messages.forEach(function(o){s.push(o.data),o.meta[3]=[{type:0,data:write_varint49(o.data.length)}],n[2].push({data:write_shallow(o.meta),type:2})});var a=write_shallow(n);t.push(write_varint49(a.length)),t.push(a),s.forEach(function(o){return t.push(o)})}),u8concat(t)}function parse_snappy_chunk(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var i=[0],n=parse_varint49(t,i),s=[];i[0]<t.length;){var a=t[i[0]]&3;if(a==0){var o=t[i[0]++]>>2;if(o<60)++o;else{var l=o-59;o=t[i[0]],l>1&&(o|=t[i[0]+1]<<8),l>2&&(o|=t[i[0]+2]<<16),l>3&&(o|=t[i[0]+3]<<24),o>>>=0,o++,i[0]+=l}s.push(t.slice(i[0],i[0]+o)),i[0]+=o;continue}else{var c=0,f=0;if(a==1?(f=(t[i[0]]>>2&7)+4,c=(t[i[0]++]&224)<<3,c|=t[i[0]++]):(f=(t[i[0]++]>>2)+1,a==2?(c=t[i[0]]|t[i[0]+1]<<8,i[0]+=2):(c=(t[i[0]]|t[i[0]+1]<<8|t[i[0]+2]<<16|t[i[0]+3]<<24)>>>0,i[0]+=4)),s=[u8concat(s)],c==0)throw new Error("Invalid offset 0");if(c>s[0].length)throw new Error("Invalid offset beyond length");if(f>=c)for(s.push(s[0].slice(-c)),f-=c;f>=s[s.length-1].length;)s.push(s[s.length-1]),f-=s[s.length-1].length;s.push(s[0].slice(-c,-c+f))}}var u=u8concat(s);if(u.length!=n)throw new Error("Unexpected length: ".concat(u.length," != ").concat(n));return u}function decompress_iwa_file(e){for(var t=[],i=0;i<e.length;){var n=e[i++],s=e[i]|e[i+1]<<8|e[i+2]<<16;i+=3,t.push(parse_snappy_chunk(n,e.slice(i,i+s))),i+=s}if(i!==e.length)throw new Error("data is not a valid framed stream!");return u8concat(t)}function compress_iwa_file(e){for(var t=[],i=0;i<e.length;){var n=Math.min(e.length-i,268435455),s=new Uint8Array(4);t.push(s);var a=write_varint49(n),o=a.length;t.push(a),n<=60?(o++,t.push(new Uint8Array([n-1<<2]))):n<=256?(o+=2,t.push(new Uint8Array([240,n-1&255]))):n<=65536?(o+=3,t.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(o+=4,t.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,t.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),t.push(e.slice(i,i+n)),o+=n,s[0]=0,s[1]=o&255,s[2]=o>>8&255,s[3]=o>>16&255,i+=n}return u8concat(t)}function write_new_storage(e,t){var i=new Uint8Array(32),n=u8_to_dataview(i),s=12,a=0;switch(i[0]=5,e.t){case"n":i[1]=2,writeDecimal128LE(i,s,e.v),a|=1,s+=16;break;case"b":i[1]=6,n.setFloat64(s,e.v?1:0,!0),a|=2,s+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));i[1]=3,n.setUint32(s,t.indexOf(e.v),!0),a|=8,s+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(8,a,!0),i.slice(0,s)}function write_old_storage(e,t){var i=new Uint8Array(32),n=u8_to_dataview(i),s=12,a=0;switch(i[0]=3,e.t){case"n":i[2]=2,n.setFloat64(s,e.v,!0),a|=32,s+=8;break;case"b":i[2]=6,n.setFloat64(s,e.v?1:0,!0),a|=32,s+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));i[2]=3,n.setUint32(s,t.indexOf(e.v),!0),a|=16,s+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(4,a,!0),i.slice(0,s)}function parse_TSP_Reference(e){var t=parse_shallow(e);return parse_varint49(t[1][0].data)}function write_tile_row(e,t,i){var n,s,a,o;if(!((n=e[6])!=null&&n[0])||!((s=e[7])!=null&&s[0]))throw"Mutation only works on post-BNC storages!";var l=((o=(a=e[8])==null?void 0:a[0])==null?void 0:o.data)&&varint_to_i32(e[8][0].data)>0||!1;if(l)throw"Math only works with normal offsets";for(var c=0,f=u8_to_dataview(e[7][0].data),u=0,x=[],d=u8_to_dataview(e[4][0].data),y=0,m=[],p=0;p<t.length;++p){if(t[p]==null){f.setUint16(p*2,65535,!0),d.setUint16(p*2,65535);continue}f.setUint16(p*2,u,!0),d.setUint16(p*2,y,!0);var E,g;switch(typeof t[p]){case"string":E=write_new_storage({t:"s",v:t[p]},i),g=write_old_storage({t:"s",v:t[p]},i);break;case"number":E=write_new_storage({t:"n",v:t[p]},i),g=write_old_storage({t:"n",v:t[p]},i);break;case"boolean":E=write_new_storage({t:"b",v:t[p]},i),g=write_old_storage({t:"b",v:t[p]},i);break;default:throw new Error("Unsupported value "+t[p])}x.push(E),u+=E.length,m.push(g),y+=g.length,++c}for(e[2][0].data=write_varint49(c);p<e[7][0].data.length/2;++p)f.setUint16(p*2,65535,!0),d.setUint16(p*2,65535,!0);return e[6][0].data=u8concat(x),e[3][0].data=u8concat(m),c}function write_numbers_iwa(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var i=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=decode_range(i["!ref"]);n.s.r=n.s.c=0;var s=!1;n.e.c>9&&(s=!0,n.e.c=9),n.e.r>49&&(s=!0,n.e.r=49),s&&console.error("The Numbers writer is currently limited to ".concat(encode_range(n)));var a=sheet_to_json(i,{range:n,header:1}),o=["~Sh33tJ5~"];a.forEach(function(z){return z.forEach(function(U){typeof U=="string"&&o.push(U)})});var l={},c=[],f=CFB.read(t.numbers,{type:"base64"});f.FileIndex.map(function(z,U){return[z,f.FullPaths[U]]}).forEach(function(z){var U=z[0],W=z[1];if(U.type==2&&U.name.match(/\.iwa/)){var Z=U.content,se=decompress_iwa_file(Z),ce=parse_iwa_file(se);ce.forEach(function(ue){c.push(ue.id),l[ue.id]={deps:[],location:W,type:varint_to_i32(ue.messages[0].meta[1][0].data)}})}}),c.sort(function(z,U){return z-U});var u=c.filter(function(z){return z>1}).map(function(z){return[z,write_varint49(z)]});f.FileIndex.map(function(z,U){return[z,f.FullPaths[U]]}).forEach(function(z){var U=z[0];if(z[1],!!U.name.match(/\.iwa/)){var W=parse_iwa_file(decompress_iwa_file(U.content));W.forEach(function(Z){Z.messages.forEach(function(se){u.forEach(function(ce){Z.messages.some(function(ue){return varint_to_i32(ue.meta[1][0].data)!=11006&&u8contains(ue.data,ce[1])})&&l[ce[0]].deps.push(Z.id)})})})}});for(var x=CFB.find(f,l[1].location),d=parse_iwa_file(decompress_iwa_file(x.content)),y,m=0;m<d.length;++m){var p=d[m];p.id==1&&(y=p)}var E=parse_TSP_Reference(parse_shallow(y.messages[0].data)[1][0].data);for(x=CFB.find(f,l[E].location),d=parse_iwa_file(decompress_iwa_file(x.content)),m=0;m<d.length;++m)p=d[m],p.id==E&&(y=p);for(E=parse_TSP_Reference(parse_shallow(y.messages[0].data)[2][0].data),x=CFB.find(f,l[E].location),d=parse_iwa_file(decompress_iwa_file(x.content)),m=0;m<d.length;++m)p=d[m],p.id==E&&(y=p);for(E=parse_TSP_Reference(parse_shallow(y.messages[0].data)[2][0].data),x=CFB.find(f,l[E].location),d=parse_iwa_file(decompress_iwa_file(x.content)),m=0;m<d.length;++m)p=d[m],p.id==E&&(y=p);var g=parse_shallow(y.messages[0].data);{g[6][0].data=write_varint49(n.e.r+1),g[7][0].data=write_varint49(n.e.c+1);var S=parse_TSP_Reference(g[46][0].data),_=CFB.find(f,l[S].location),T=parse_iwa_file(decompress_iwa_file(_.content));{for(var b=0;b<T.length&&T[b].id!=S;++b);if(T[b].id!=S)throw"Bad ColumnRowUIDMapArchive";var C=parse_shallow(T[b].messages[0].data);C[1]=[],C[2]=[],C[3]=[];for(var R=0;R<=n.e.c;++R){var F=[];F[1]=F[2]=[{type:0,data:write_varint49(R+420690)}],C[1].push({type:2,data:write_shallow(F)}),C[2].push({type:0,data:write_varint49(R)}),C[3].push({type:0,data:write_varint49(R)})}C[4]=[],C[5]=[],C[6]=[];for(var L=0;L<=n.e.r;++L)F=[],F[1]=F[2]=[{type:0,data:write_varint49(L+726270)}],C[4].push({type:2,data:write_shallow(F)}),C[5].push({type:0,data:write_varint49(L)}),C[6].push({type:0,data:write_varint49(L)});T[b].messages[0].data=write_shallow(C)}_.content=compress_iwa_file(write_iwa_file(T)),_.size=_.content.length,delete g[46];var P=parse_shallow(g[4][0].data);{P[7][0].data=write_varint49(n.e.r+1);var j=parse_shallow(P[1][0].data),B=parse_TSP_Reference(j[2][0].data);_=CFB.find(f,l[B].location),T=parse_iwa_file(decompress_iwa_file(_.content));{if(T[0].id!=B)throw"Bad HeaderStorageBucket";var K=parse_shallow(T[0].messages[0].data);for(L=0;L<a.length;++L){var ee=parse_shallow(K[2][0].data);ee[1][0].data=write_varint49(L),ee[4][0].data=write_varint49(a[L].length),K[2][L]={type:K[2][0].type,data:write_shallow(ee)}}T[0].messages[0].data=write_shallow(K)}_.content=compress_iwa_file(write_iwa_file(T)),_.size=_.content.length;var X=parse_TSP_Reference(P[2][0].data);_=CFB.find(f,l[X].location),T=parse_iwa_file(decompress_iwa_file(_.content));{if(T[0].id!=X)throw"Bad HeaderStorageBucket";for(K=parse_shallow(T[0].messages[0].data),R=0;R<=n.e.c;++R)ee=parse_shallow(K[2][0].data),ee[1][0].data=write_varint49(R),ee[4][0].data=write_varint49(n.e.r+1),K[2][R]={type:K[2][0].type,data:write_shallow(ee)};T[0].messages[0].data=write_shallow(K)}_.content=compress_iwa_file(write_iwa_file(T)),_.size=_.content.length;var M=parse_TSP_Reference(P[4][0].data);(function(){for(var z=CFB.find(f,l[M].location),U=parse_iwa_file(decompress_iwa_file(z.content)),W,Z=0;Z<U.length;++Z){var se=U[Z];se.id==M&&(W=se)}var ce=parse_shallow(W.messages[0].data);{ce[3]=[];var ue=[];o.forEach(function(Q,Te){ue[1]=[{type:0,data:write_varint49(Te)}],ue[2]=[{type:0,data:write_varint49(1)}],ue[3]=[{type:2,data:stru8(Q)}],ce[3].push({type:2,data:write_shallow(ue)})})}W.messages[0].data=write_shallow(ce);var le=write_iwa_file(U),ve=compress_iwa_file(le);z.content=ve,z.size=z.content.length})();var V=parse_shallow(P[3][0].data);{var A=V[1][0];delete V[2];var k=parse_shallow(A.data);{var I=parse_TSP_Reference(k[2][0].data);(function(){for(var z=CFB.find(f,l[I].location),U=parse_iwa_file(decompress_iwa_file(z.content)),W,Z=0;Z<U.length;++Z){var se=U[Z];se.id==I&&(W=se)}var ce=parse_shallow(W.messages[0].data);{delete ce[6],delete V[7];var ue=new Uint8Array(ce[5][0].data);ce[5]=[];for(var le=0,ve=0;ve<=n.e.r;++ve){var Q=parse_shallow(ue);le+=write_tile_row(Q,a[ve],o),Q[1][0].data=write_varint49(ve),ce[5].push({data:write_shallow(Q),type:2})}ce[1]=[{type:0,data:write_varint49(n.e.c+1)}],ce[2]=[{type:0,data:write_varint49(n.e.r+1)}],ce[3]=[{type:0,data:write_varint49(le)}],ce[4]=[{type:0,data:write_varint49(n.e.r+1)}]}W.messages[0].data=write_shallow(ce);var Te=write_iwa_file(U),he=compress_iwa_file(Te);z.content=he,z.size=z.content.length})()}A.data=write_shallow(k)}P[3][0].data=write_shallow(V)}g[4][0].data=write_shallow(P)}y.messages[0].data=write_shallow(g);var D=write_iwa_file(d),O=compress_iwa_file(D);return x.content=O,x.size=x.content.length,f}function fix_opts_func(e){return function(i){for(var n=0;n!=e.length;++n){var s=e[n];i[s[0]]===void 0&&(i[s[0]]=s[1]),s[2]==="n"&&(i[s[0]]=Number(i[s[0]]))}}}function fix_write_opts(e){fix_opts_func([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function write_zip(e,t){return t.bookType=="ods"?write_ods(e,t):t.bookType=="numbers"?write_numbers_iwa(e,t):t.bookType=="xlsb"?write_zip_xlsxb(e,t):write_zip_xlsx(e,t)}function write_zip_xlsxb(e,t){_shapeid=1024,e&&!e.SSF&&(e.SSF=dup(table_fmt)),e&&e.SSF&&(make_ssf(),SSF_load_table(e.SSF),t.revssf=evert_num(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,browser_has_Map?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var i=t.bookType=="xlsb"?"bin":"xml",n=VBAFMTS.indexOf(t.bookType)>-1,s=new_ct();fix_write_opts(t=t||{});var a=zip_new(),o="",l=0;if(t.cellXfs=[],get_cell_style(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),o="docProps/core.xml",zip_add_file(a,o,write_core_props(e.Props,t)),s.coreprops.push(o),add_rels(t.rels,2,o,RELS.CORE_PROPS),o="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],f=0;f<e.SheetNames.length;++f)(e.Workbook.Sheets[f]||{}).Hidden!=2&&c.push(e.SheetNames[f]);e.Props.SheetNames=c}for(e.Props.Worksheets=e.Props.SheetNames.length,zip_add_file(a,o,write_ext_props(e.Props)),s.extprops.push(o),add_rels(t.rels,3,o,RELS.EXT_PROPS),e.Custprops!==e.Props&&keys(e.Custprops||{}).length>0&&(o="docProps/custom.xml",zip_add_file(a,o,write_cust_props(e.Custprops)),s.custprops.push(o),add_rels(t.rels,4,o,RELS.CUST_PROPS)),l=1;l<=e.SheetNames.length;++l){var u={"!id":{}},x=e.Sheets[e.SheetNames[l-1]],d=(x||{})["!type"]||"sheet";switch(d){case"chart":default:o="xl/worksheets/sheet"+l+"."+i,zip_add_file(a,o,write_ws(l-1,o,t,e,u)),s.sheets.push(o),add_rels(t.wbrels,-1,"worksheets/sheet"+l+"."+i,RELS.WS[0])}if(x){var y=x["!comments"],m=!1,p="";y&&y.length>0&&(p="xl/comments"+l+"."+i,zip_add_file(a,p,write_cmnt(y,p)),s.comments.push(p),add_rels(u,-1,"../comments"+l+"."+i,RELS.CMNT),m=!0),x["!legacy"]&&m&&zip_add_file(a,"xl/drawings/vmlDrawing"+l+".vml",write_comments_vml(l,x["!comments"])),delete x["!comments"],delete x["!legacy"]}u["!id"].rId1&&zip_add_file(a,get_rels_path(o),write_rels(u))}return t.Strings!=null&&t.Strings.length>0&&(o="xl/sharedStrings."+i,zip_add_file(a,o,write_sst(t.Strings,o,t)),s.strs.push(o),add_rels(t.wbrels,-1,"sharedStrings."+i,RELS.SST)),o="xl/workbook."+i,zip_add_file(a,o,write_wb(e,o)),s.workbooks.push(o),add_rels(t.rels,1,o,RELS.WB),o="xl/theme/theme1.xml",zip_add_file(a,o,write_theme(e.Themes,t)),s.themes.push(o),add_rels(t.wbrels,-1,"theme/theme1.xml",RELS.THEME),o="xl/styles."+i,zip_add_file(a,o,write_sty(e,o,t)),s.styles.push(o),add_rels(t.wbrels,-1,"styles."+i,RELS.STY),e.vbaraw&&n&&(o="xl/vbaProject.bin",zip_add_file(a,o,e.vbaraw),s.vba.push(o),add_rels(t.wbrels,-1,"vbaProject.bin",RELS.VBA)),o="xl/metadata."+i,zip_add_file(a,o,write_xlmeta(o)),s.metadata.push(o),add_rels(t.wbrels,-1,"metadata."+i,RELS.XLMETA),zip_add_file(a,"[Content_Types].xml",write_ct(s,t)),zip_add_file(a,"_rels/.rels",write_rels(t.rels)),zip_add_file(a,"xl/_rels/workbook."+i+".rels",write_rels(t.wbrels)),delete t.revssf,delete t.ssf,a}function write_zip_xlsx(e,t){_shapeid=1024,e&&!e.SSF&&(e.SSF=dup(table_fmt)),e&&e.SSF&&(make_ssf(),SSF_load_table(e.SSF),t.revssf=evert_num(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,browser_has_Map?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var i="xml",n=VBAFMTS.indexOf(t.bookType)>-1,s=new_ct();fix_write_opts(t=t||{});var a=zip_new(),o="",l=0;if(t.cellXfs=[],get_cell_style(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),o="docProps/core.xml",zip_add_file(a,o,write_core_props(e.Props,t)),s.coreprops.push(o),add_rels(t.rels,2,o,RELS.CORE_PROPS),o="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],f=0;f<e.SheetNames.length;++f)(e.Workbook.Sheets[f]||{}).Hidden!=2&&c.push(e.SheetNames[f]);e.Props.SheetNames=c}e.Props.Worksheets=e.Props.SheetNames.length,zip_add_file(a,o,write_ext_props(e.Props)),s.extprops.push(o),add_rels(t.rels,3,o,RELS.EXT_PROPS),e.Custprops!==e.Props&&keys(e.Custprops||{}).length>0&&(o="docProps/custom.xml",zip_add_file(a,o,write_cust_props(e.Custprops)),s.custprops.push(o),add_rels(t.rels,4,o,RELS.CUST_PROPS));var u=["SheetJ5"];for(t.tcid=0,l=1;l<=e.SheetNames.length;++l){var x={"!id":{}},d=e.Sheets[e.SheetNames[l-1]],y=(d||{})["!type"]||"sheet";switch(y){case"chart":default:o="xl/worksheets/sheet"+l+"."+i,zip_add_file(a,o,write_ws_xml(l-1,t,e,x)),s.sheets.push(o),add_rels(t.wbrels,-1,"worksheets/sheet"+l+"."+i,RELS.WS[0])}if(d){var m=d["!comments"],p=!1,E="";if(m&&m.length>0){var g=!1;m.forEach(function(S){S[1].forEach(function(_){_.T==!0&&(g=!0)})}),g&&(E="xl/threadedComments/threadedComment"+l+"."+i,zip_add_file(a,E,write_tcmnt_xml(m,u,t)),s.threadedcomments.push(E),add_rels(x,-1,"../threadedComments/threadedComment"+l+"."+i,RELS.TCMNT)),E="xl/comments"+l+"."+i,zip_add_file(a,E,write_comments_xml(m)),s.comments.push(E),add_rels(x,-1,"../comments"+l+"."+i,RELS.CMNT),p=!0}d["!legacy"]&&p&&zip_add_file(a,"xl/drawings/vmlDrawing"+l+".vml",write_comments_vml(l,d["!comments"])),delete d["!comments"],delete d["!legacy"]}x["!id"].rId1&&zip_add_file(a,get_rels_path(o),write_rels(x))}return t.Strings!=null&&t.Strings.length>0&&(o="xl/sharedStrings."+i,zip_add_file(a,o,write_sst_xml(t.Strings,t)),s.strs.push(o),add_rels(t.wbrels,-1,"sharedStrings."+i,RELS.SST)),o="xl/workbook."+i,zip_add_file(a,o,write_wb_xml(e)),s.workbooks.push(o),add_rels(t.rels,1,o,RELS.WB),o="xl/theme/theme1.xml",zip_add_file(a,o,write_theme(e.Themes,t)),s.themes.push(o),add_rels(t.wbrels,-1,"theme/theme1.xml",RELS.THEME),o="xl/styles."+i,zip_add_file(a,o,write_sty_xml(e,t)),s.styles.push(o),add_rels(t.wbrels,-1,"styles."+i,RELS.STY),e.vbaraw&&n&&(o="xl/vbaProject.bin",zip_add_file(a,o,e.vbaraw),s.vba.push(o),add_rels(t.wbrels,-1,"vbaProject.bin",RELS.VBA)),o="xl/metadata."+i,zip_add_file(a,o,write_xlmeta_xml()),s.metadata.push(o),add_rels(t.wbrels,-1,"metadata."+i,RELS.XLMETA),u.length>1&&(o="xl/persons/person.xml",zip_add_file(a,o,write_people_xml(u)),s.people.push(o),add_rels(t.wbrels,-1,"persons/person.xml",RELS.PEOPLE)),zip_add_file(a,"[Content_Types].xml",write_ct(s,t)),zip_add_file(a,"_rels/.rels",write_rels(t.rels)),zip_add_file(a,"xl/_rels/workbook."+i+".rels",write_rels(t.wbrels)),delete t.revssf,delete t.ssf,a}function firstbyte(e,t){var i="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":i=Base64_decode(e.slice(0,12));break;case"binary":i=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3),i.charCodeAt(4),i.charCodeAt(5),i.charCodeAt(6),i.charCodeAt(7)]}function write_cfb_ctr(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return write_dl(t.file,CFB.write(e,{type:has_buf?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return CFB.write(e,t)}function write_zip_type(e,t){var i=dup(t||{}),n=write_zip(e,i);return write_zip_denouement(n,i)}function write_zip_denouement(e,t){var i={},n=has_buf?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(i.compression="DEFLATE"),t.password)i.type=n;else switch(t.type){case"base64":i.type="base64";break;case"binary":i.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":i.type=n;break;default:throw new Error("Unrecognized type "+t.type)}var s=e.FullPaths?CFB.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[i.type]||i.type,compression:!!t.compression}):e.generate(i);if(typeof Deno<"u"&&typeof s=="string"){if(t.type=="binary"||t.type=="base64")return s;s=new Uint8Array(s2ab(s))}return t.password&&typeof encrypt_agile<"u"?write_cfb_ctr(encrypt_agile(s,t.password),t):t.type==="file"?write_dl(t.file,s):t.type=="string"?utf8read(s):s}function write_cfb_type(e,t){var i=t||{},n=write_xlscfb(e,i);return write_cfb_ctr(n,i)}function write_string_type(e,t,i){i||(i="");var n=i+e;switch(t.type){case"base64":return Base64_encode(utf8write(n));case"binary":return utf8write(n);case"string":return e;case"file":return write_dl(t.file,n,"utf8");case"buffer":return has_buf?Buffer_from(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):write_string_type(n,{type:"binary"}).split("").map(function(s){return s.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function write_stxt_type(e,t){switch(t.type){case"base64":return Base64_encode(e);case"binary":return e;case"string":return e;case"file":return write_dl(t.file,e,"binary");case"buffer":return has_buf?Buffer_from(e,"binary"):e.split("").map(function(i){return i.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function write_binary_type(e,t){switch(t.type){case"string":case"base64":case"binary":for(var i="",n=0;n<e.length;++n)i+=String.fromCharCode(e[n]);return t.type=="base64"?Base64_encode(i):t.type=="string"?utf8read(i):i;case"file":return write_dl(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function writeSync(e,t){reset_cp(),check_wb(e);var i=dup(t||{});if(i.cellStyles&&(i.cellNF=!0,i.sheetStubs=!0),i.type=="array"){i.type="binary";var n=writeSync(e,i);return i.type="array",s2ab(n)}var s=0;if(i.sheet&&(typeof i.sheet=="number"?s=i.sheet:s=e.SheetNames.indexOf(i.sheet),!e.SheetNames[s]))throw new Error("Sheet not found: "+i.sheet+" : "+typeof i.sheet);switch(i.bookType||"xlsb"){case"xml":case"xlml":return write_string_type(write_xlml(e,i),i);case"slk":case"sylk":return write_string_type(SYLK.from_sheet(e.Sheets[e.SheetNames[s]],i),i);case"htm":case"html":return write_string_type(sheet_to_html(e.Sheets[e.SheetNames[s]],i),i);case"txt":return write_stxt_type(sheet_to_txt(e.Sheets[e.SheetNames[s]],i),i);case"csv":return write_string_type(sheet_to_csv(e.Sheets[e.SheetNames[s]],i),i,"\uFEFF");case"dif":return write_string_type(DIF.from_sheet(e.Sheets[e.SheetNames[s]],i),i);case"dbf":return write_binary_type(DBF.from_sheet(e.Sheets[e.SheetNames[s]],i),i);case"prn":return write_string_type(PRN.from_sheet(e.Sheets[e.SheetNames[s]],i),i);case"rtf":return write_string_type(RTF.from_sheet(e.Sheets[e.SheetNames[s]],i),i);case"eth":return write_string_type(ETH.from_sheet(e.Sheets[e.SheetNames[s]],i),i);case"fods":return write_string_type(write_ods(e,i),i);case"wk1":return write_binary_type(WK_.sheet_to_wk1(e.Sheets[e.SheetNames[s]],i),i);case"wk3":return write_binary_type(WK_.book_to_wk3(e,i),i);case"biff2":i.biff||(i.biff=2);case"biff3":i.biff||(i.biff=3);case"biff4":return i.biff||(i.biff=4),write_binary_type(write_biff_buf(e,i),i);case"biff5":i.biff||(i.biff=5);case"biff8":case"xla":case"xls":return i.biff||(i.biff=8),write_cfb_type(e,i);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return write_zip_type(e,i);default:throw new Error("Unrecognized bookType |"+i.bookType+"|")}}function resolve_book_type(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},i=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();i.match(/^\.[a-z]+$/)&&(e.bookType=i.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function writeFileSync(e,t,i){var n=i||{};return n.type="file",n.file=t,resolve_book_type(n),writeSync(e,n)}function make_json_row(e,t,i,n,s,a,o,l){var c=encode_row(i),f=l.defval,u=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),x=!0,d=s===1?[]:{};if(s!==1)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:i,enumerable:!1})}catch{d.__rowNum__=i}else d.__rowNum__=i;if(!o||e[i])for(var y=t.s.c;y<=t.e.c;++y){var m=o?e[i][y]:e[n[y]+c];if(m===void 0||m.t===void 0){if(f===void 0)continue;a[y]!=null&&(d[a[y]]=f);continue}var p=m.v;switch(m.t){case"z":if(p==null)break;continue;case"e":p=p==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+m.t)}if(a[y]!=null){if(p==null)if(m.t=="e"&&p===null)d[a[y]]=null;else if(f!==void 0)d[a[y]]=f;else if(u&&p===null)d[a[y]]=null;else continue;else d[a[y]]=u&&(m.t!=="n"||m.t==="n"&&l.rawNumbers!==!1)?p:format_cell(m,p,l);p!=null&&(x=!1)}}return{row:d,isempty:x}}function sheet_to_json(e,t){if(e==null||e["!ref"]==null)return[];var i={t:"n",v:0},n=0,s=1,a=[],o=0,l="",c={s:{r:0,c:0},e:{r:0,c:0}},f=t||{},u=f.range!=null?f.range:e["!ref"];switch(f.header===1?n=1:f.header==="A"?n=2:Array.isArray(f.header)?n=3:f.header==null&&(n=0),typeof u){case"string":c=safe_decode_range(u);break;case"number":c=safe_decode_range(e["!ref"]),c.s.r=u;break;default:c=u}n>0&&(s=0);var x=encode_row(c.s.r),d=[],y=[],m=0,p=0,E=Array.isArray(e),g=c.s.r,S=0,_={};E&&!e[g]&&(e[g]=[]);var T=f.skipHidden&&e["!cols"]||[],b=f.skipHidden&&e["!rows"]||[];for(S=c.s.c;S<=c.e.c;++S)if(!(T[S]||{}).hidden)switch(d[S]=encode_col(S),i=E?e[g][S]:e[d[S]+x],n){case 1:a[S]=S-c.s.c;break;case 2:a[S]=d[S];break;case 3:a[S]=f.header[S-c.s.c];break;default:if(i==null&&(i={w:"__EMPTY",t:"s"}),l=o=format_cell(i,null,f),p=_[o]||0,!p)_[o]=1;else{do l=o+"_"+p++;while(_[l]);_[o]=p,_[l]=1}a[S]=l}for(g=c.s.r+s;g<=c.e.r;++g)if(!(b[g]||{}).hidden){var C=make_json_row(e,c,g,d,n,a,E,f);(C.isempty===!1||(n===1?f.blankrows!==!1:f.blankrows))&&(y[m++]=C.row)}return y.length=m,y}var qreg=/"/g;function make_csv_row(e,t,i,n,s,a,o,l){for(var c=!0,f=[],u="",x=encode_row(i),d=t.s.c;d<=t.e.c;++d)if(n[d]){var y=l.dense?(e[i]||[])[d]:e[n[d]+x];if(y==null)u="";else if(y.v!=null){c=!1,u=""+(l.rawNumbers&&y.t=="n"?y.v:format_cell(y,null,l));for(var m=0,p=0;m!==u.length;++m)if((p=u.charCodeAt(m))===s||p===a||p===34||l.forceQuotes){u='"'+u.replace(qreg,'""')+'"';break}u=="ID"&&(u='"ID"')}else y.f!=null&&!y.F?(c=!1,u="="+y.f,u.indexOf(",")>=0&&(u='"'+u.replace(qreg,'""')+'"')):u="";f.push(u)}return l.blankrows===!1&&c?null:f.join(o)}function sheet_to_csv(e,t){var i=[],n=t??{};if(e==null||e["!ref"]==null)return"";var s=safe_decode_range(e["!ref"]),a=n.FS!==void 0?n.FS:",",o=a.charCodeAt(0),l=n.RS!==void 0?n.RS:`
|
|
340
340
|
`,c=l.charCodeAt(0),f=new RegExp((a=="|"?"\\|":a)+"+$"),u="",x=[];n.dense=Array.isArray(e);for(var d=n.skipHidden&&e["!cols"]||[],y=n.skipHidden&&e["!rows"]||[],m=s.s.c;m<=s.e.c;++m)(d[m]||{}).hidden||(x[m]=encode_col(m));for(var p=0,E=s.s.r;E<=s.e.r;++E)(y[E]||{}).hidden||(u=make_csv_row(e,s,E,x,o,c,a,n),u!=null&&(n.strip&&(u=u.replace(f,"")),(u||n.blankrows!==!1)&&i.push((p++?l:"")+u)));return delete n.dense,i.join("")}function sheet_to_txt(e,t){t||(t={}),t.FS=" ",t.RS=`
|
|
341
|
-
`;var i=sheet_to_csv(e,t);return i}function sheet_to_formulae(e){var t="",i,n="";if(e==null||e["!ref"]==null)return[];var s=safe_decode_range(e["!ref"]),a="",o=[],l,c=[],f=Array.isArray(e);for(l=s.s.c;l<=s.e.c;++l)o[l]=encode_col(l);for(var u=s.s.r;u<=s.e.r;++u)for(a=encode_row(u),l=s.s.c;l<=s.e.c;++l)if(t=o[l]+a,i=f?(e[u]||[])[l]:e[t],n="",i!==void 0){if(i.F!=null){if(t=i.F,!i.f)continue;n=i.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(i.f!=null)n=i.f;else{if(i.t=="z")continue;if(i.t=="n"&&i.v!=null)n=""+i.v;else if(i.t=="b")n=i.v?"TRUE":"FALSE";else if(i.w!==void 0)n="'"+i.w;else{if(i.v===void 0)continue;i.t=="s"?n="'"+i.v:n=""+i.v}}c[c.length]=t+"="+n}return c}function sheet_add_json(e,t,i){var n=i||{},s=+!n.skipHeader,a=e||{},o=0,l=0;if(a&&n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var c=typeof n.origin=="string"?decode_cell(n.origin):n.origin;o=c.r,l=c.c}var f,u={s:{c:0,r:0},e:{c:l,r:o+t.length-1+s}};if(a["!ref"]){var x=safe_decode_range(a["!ref"]);u.e.c=Math.max(u.e.c,x.e.c),u.e.r=Math.max(u.e.r,x.e.r),o==-1&&(o=x.e.r+1,u.e.r=o+t.length-1+s)}else o==-1&&(o=0,u.e.r=t.length-1+s);var d=n.header||[],y=0;t.forEach(function(p,E){keys(p).forEach(function(g){(y=d.indexOf(g))==-1&&(d[y=d.length]=g);var S=p[g],_="z",T="",b=encode_cell({c:l+y,r:o+E+s});f=ws_get_cell_stub(a,b),S&&typeof S=="object"&&!(S instanceof Date)?a[b]=S:(typeof S=="number"?_="n":typeof S=="boolean"?_="b":typeof S=="string"?_="s":S instanceof Date?(_="d",n.cellDates||(_="n",S=datenum(S)),T=n.dateNF||table_fmt[14]):S===null&&n.nullError&&(_="e",S=0),f?(f.t=_,f.v=S,delete f.w,delete f.R,T&&(f.z=T)):a[b]=f={t:_,v:S},T&&(f.z=T))})}),u.e.c=Math.max(u.e.c,l+d.length-1);var m=encode_row(o);if(s)for(y=0;y<d.length;++y)a[encode_col(y+l)+m]={t:"s",v:d[y]};return a["!ref"]=encode_range(u),a}function json_to_sheet(e,t){return sheet_add_json(null,e,t)}function ws_get_cell_stub(e,t,i){if(typeof t=="string"){if(Array.isArray(e)){var n=decode_cell(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?ws_get_cell_stub(e,encode_cell(t)):ws_get_cell_stub(e,encode_cell({r:t,c:i||0}))}function wb_sheet_idx(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var i=e.SheetNames.indexOf(t);if(i>-1)return i;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function book_new(){return{SheetNames:[],Sheets:{}}}function book_append_sheet(e,t,i,n){var s=1;if(!i)for(;s<=65535&&e.SheetNames.indexOf(i="Sheet"+s)!=-1;++s,i=void 0);if(!i||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(i)>=0){var a=i.match(/(^.*?)(\d+)$/);s=a&&+a[2]||0;var o=a&&a[1]||i;for(++s;s<=65535&&e.SheetNames.indexOf(i=o+s)!=-1;++s);}if(check_ws_name(i),e.SheetNames.indexOf(i)>=0)throw new Error("Worksheet with name |"+i+"| already exists!");return e.SheetNames.push(i),e.Sheets[i]=t,i}function book_set_sheet_visibility(e,t,i){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=wb_sheet_idx(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),i){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+i)}e.Workbook.Sheets[n].Hidden=i}function cell_set_number_format(e,t){return e.z=t,e}function cell_set_hyperlink(e,t,i){return t?(e.l={Target:t},i&&(e.l.Tooltip=i)):delete e.l,e}function cell_set_internal_link(e,t,i){return cell_set_hyperlink(e,"#"+t,i)}function cell_add_comment(e,t,i){e.c||(e.c=[]),e.c.push({t,a:i||"SheetJS"})}function sheet_set_array_formula(e,t,i,n){for(var s=typeof t!="string"?t:safe_decode_range(t),a=typeof t=="string"?t:encode_range(t),o=s.s.r;o<=s.e.r;++o)for(var l=s.s.c;l<=s.e.c;++l){var c=ws_get_cell_stub(e,o,l);c.t="n",c.F=a,delete c.v,o==s.s.r&&l==s.s.c&&(c.f=i,n&&(c.D=!0))}return e}var utils={encode_col,encode_row,encode_cell,encode_range,decode_col,decode_row,split_cell,decode_cell,decode_range,format_cell,sheet_add_aoa,sheet_add_json,sheet_add_dom,aoa_to_sheet,json_to_sheet,table_to_sheet:parse_dom_table,table_to_book,sheet_to_csv,sheet_to_txt,sheet_to_json,sheet_to_html,sheet_to_formulae,sheet_to_row_object_array:sheet_to_json,sheet_get_cell:ws_get_cell_stub,book_new,book_append_sheet,book_set_sheet_visibility,cell_set_number_format,cell_set_hyperlink,cell_set_internal_link,cell_add_comment,sheet_set_array_formula,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const ExportIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.59%209.5H15V4.5C15%203.95%2014.55%203.5%2014%203.5H10C9.45%203.5%209%203.95%209%204.5V9.5H7.41C6.52%209.5%206.07%2010.58%206.7%2011.21L11.29%2015.8C11.68%2016.19%2012.31%2016.19%2012.7%2015.8L17.29%2011.21C17.92%2010.58%2017.48%209.5%2016.59%209.5ZM5%2019.5C5%2020.05%205.45%2020.5%206%2020.5H18C18.55%2020.5%2019%2020.05%2019%2019.5C19%2018.95%2018.55%2018.5%2018%2018.5H6C5.45%2018.5%205%2018.95%205%2019.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FileOpenRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202.5H10.83C10.3%202.5%209.79%202.71%209.41%203.09L4.59%207.91C4.21%208.29%204%208.8%204%209.33V20.5C4%2021.6%204.9%2022.5%206%2022.5H18C19.1%2022.5%2020%2021.6%2020%2020.5V4.5C20%203.4%2019.1%202.5%2018%202.5ZM11.65%2017.15L8.86%2014.36C8.54%2014.04%208.76%2013.5%209.21%2013.5H11V10.51C11%209.96%2011.44%209.52%2011.99%209.51C12.55%209.5%2013%209.95%2013%2010.51V13.5H14.79C15.24%2013.5%2015.46%2014.04%2015.14%2014.35L12.35%2017.14C12.16%2017.34%2011.84%2017.34%2011.65%2017.15Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ReloadIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.6498%206.84999C16.0198%205.21999%2013.7098%204.27999%2011.1698%204.53999C7.49978%204.90999%204.47978%207.88999%204.06978%2011.56C3.51978%2016.41%207.26978%2020.5%2011.9998%2020.5C15.1898%2020.5%2017.9298%2018.63%2019.2098%2015.94C19.5298%2015.27%2019.0498%2014.5%2018.3098%2014.5C17.9398%2014.5%2017.5898%2014.7%2017.4298%2015.03C16.2998%2017.46%2013.5898%2019%2010.6298%2018.34C8.40978%2017.85%206.61978%2016.04%206.14978%2013.82C5.30978%209.93999%208.25978%206.49999%2011.9998%206.49999C13.6598%206.49999%2015.1398%207.18999%2016.2198%208.27999L14.7098%209.78999C14.0798%2010.42%2014.5198%2011.5%2015.4098%2011.5H18.9998C19.5498%2011.5%2019.9998%2011.05%2019.9998%2010.5V6.90999C19.9998%206.01999%2018.9198%205.56999%2018.2898%206.19999L17.6498%206.84999Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FilterAltOffRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.7901%206.11003C20.3001%205.45003%2019.8301%204.50003%2019.0001%204.50003H6.83008L14.8001%2012.47L19.7901%206.11003Z'%20fill='black'%20fill-opacity='0.54'/%3e%3cpath%20d='M20.4901%2020.99L3.51012%204.01003C3.12012%203.62003%202.49012%203.62003%202.10012%204.01003C1.71012%204.40003%201.71012%205.03003%202.10012%205.42003L10.0001%2013.5V18.5C10.0001%2019.6%2010.9001%2020.5%2012.0001%2020.5C13.1001%2020.5%2014.0001%2019.6%2014.0001%2018.5V17.33L19.0701%2022.4C19.4601%2022.79%2020.0901%2022.79%2020.4801%2022.4C20.8701%2022.01%2020.8801%2021.38%2020.4901%2020.99Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",CESkeletonTable=({columns:e,rows:t})=>jsxRuntimeExports.jsx("div",{className:"skeleton-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((i,n)=>jsxRuntimeExports.jsx("th",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-header"})},n))})}),jsxRuntimeExports.jsx("tbody",{children:Array.from({length:t}).map((i,n)=>jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((s,a)=>jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-cell"})},a))},n))})]})}),CERadioButton=({label:e,value:t,checked:i,onChange:n})=>jsxRuntimeExports.jsxs("label",{className:"radio-button",style:{margin:"0.5rem 0"},children:[jsxRuntimeExports.jsx("input",{type:"radio",value:t,checked:i,onChange:()=>n(t),style:{marginRight:e?"0.5rem":0}}),e&&jsxRuntimeExports.jsx("span",{children:e})]}),getColumnValue=e=>{if(e==null)return"";if(React.isValidElement(e)){const t=e;return t.props["data-value"]||t.props["data-sort"]||""}return typeof e=="string"||typeof e=="number"?e:String(e)},stripReactElements=e=>{if(Array.isArray(e))return e.map(stripReactElements);if(e&&typeof e=="object"&&!React.isValidElement(e)){const t={};for(const i in e)React.isValidElement(e[i])||(t[i]=stripReactElements(e[i]));return t}return e},PaginationControls=({currentPage:e,totalPages:t,setCurrentPage:i})=>{const a=Math.floor(e/5)*5,o=Math.min(a+5,t),l=()=>{i(Math.max(0,a-1))},c=()=>{i(Math.min(t-1,o))},f=[];for(let u=a;u<o;u++)f.push(jsxRuntimeExports.jsx("button",{className:`pagination-page${e===u?" active":""}`,onClick:()=>i(u),disabled:e===u,children:u+1},u));return jsxRuntimeExports.jsxs("div",{className:"pagination-controls",children:[jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(0),disabled:e===0,children:"First"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(e-1),disabled:e===0,children:"Previous"}),a>0&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:l,children:"..."}),f,o<t&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:c,children:"..."}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(e+1),disabled:e===t-1,children:"Next"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(t-1),disabled:e===t-1,children:"Last"})]})},RowsPerPageSelector=({rowsPerPage:e,setRowsPerPage:t,setCurrentPage:i,pageSizeOptions:n})=>jsxRuntimeExports.jsxs("div",{className:"rows-per-page-container",children:[jsxRuntimeExports.jsx("label",{htmlFor:"rows-per-page-select",children:"Rows per page:"}),jsxRuntimeExports.jsx("select",{id:"rows-per-page-select",value:e,onChange:s=>{t(Number(s.target.value)),i(0)},style:{marginLeft:"8px"},children:n.map(s=>jsxRuntimeExports.jsx("option",{value:s,children:s},s))})]}),EntriesInfo=({dataLength:e,currentPage:t,rowsPerPage:i})=>jsxRuntimeExports.jsx("div",{className:"entries-info",children:e>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Showing ",e===0?0:t*i+1," to"," ",Math.min((t+1)*i,e)," of ",e," ","entries"]})}),CEDataGridDynamicTable=({title:e,jsonData:t,columnList:i,ischeckBoxInGrid:n,isRadioButtonInGrid:s,onRadioChange:a,getSelectedRadioValue:o,renderRadioInColumnId:l,isSearchBoxInGrid:c,isAddButtonRequired:f,isEditButtonRequired:u,isDeleteButtonRequired:x,isApproveButtonRequired:d,isReassignButtonRequired:y,isCancelButtonRequired:m,isExportToExcelRequired:p,isExportAllToExcel:E,handleEditClick:g,handleAddClick:S,handleDeleteClick:_,handleApproveClick:T,handleReassignClick:b,handleCancelClick:C,noOfPagesPerPage:R,clickableColumns:F,conditionalClickableColumns:L,handleCellClick:P,onReload:j,showDownloadIcon:B=!0,showRefreshIcon:K=!0,showFullViewIcon:ee=!0,showSearchIcon:X=!0,showColumnVisibilityIcon:M=!0,showSortIcon:V=!0,showFilterIcon:A=!0,defaultSortConfig:k,onDataUpdate:I,isOverrideCSS:D,showPagination:O=!0,shouldResetSearchOnDataChange:z,pageSizeOptions:U=[10,20,50,100]})=>{const[W,Z]=React.useState({}),[se,ce]=React.useState(!1),[ue,le]=React.useState([]),[ve,Q]=React.useState([]),[Te,he]=React.useState([]),[Me,ke]=React.useState(!1),[xe,Ie]=React.useState(new Set),[De,Fe]=React.useState(null),[Ne,Ce]=React.useState(!1),[Ye,Le]=React.useState(""),[We,Ge]=React.useState("contains"),[Ke,Ue]=React.useState(""),[Be,Xe]=React.useState({}),[Ze,qe]=React.useState(0),[et,nt]=React.useState(R??10),[pt,vt]=React.useState(new Set),[st,at]=React.useState(""),[ht,dt]=React.useState(!1),[Je,mt]=React.useState(new Set),[ot,wt]=React.useState([]),[ut,St]=React.useState(null),Pe=React.useRef(null),it=React.useRef(null),xt=React.useRef(null),[_t,Rt]=React.useState(new Set),[Qe,Pt]=React.useState([]),[At,kt]=React.useState(!1),[N,q]=React.useState(null),H=React.useRef([]),[G,Y]=React.useState(!1),J=()=>Y(!0),ie=()=>Y(!1),[pe,re]=React.useState(!0);React.useEffect(()=>{if(t&&Array.isArray(t)){const te=stripReactElements(H.current),oe=stripReactElements(t),de=JSON.stringify(te)!==JSON.stringify(oe);if(t&&Array.isArray(t)&&de){let fe=[...t];if(k){const{column:ye,direction:be}=k;fe.sort((Se,Re)=>{const je=Se[ye],$e=Re[ye],Oe=new Date(je),He=new Date($e),rt=!isNaN(Oe.getTime()),gt=!isNaN(He.getTime());if(rt&>)return be==="asc"?Oe.getTime()-He.getTime():He.getTime()-Oe.getTime();const It=String(je||"").toLowerCase(),$t=String($e||"").toLowerCase();return It.localeCompare($t)}),be==="desc"&&fe.reverse(),q(k)}if(le(fe),Q(fe),re(!1),z?(at(""),Xe({})):Ee(),l){const ye={},be=Array.isArray(l)?l:[l];fe.forEach((Se,Re)=>{const je=Se.id??`__row_${Re}`;for(const $e of be)if(Se[$e]===!0){ye[je]={columnId:$e,rowData:Se};break}}),ae(ye)}H.current=t}}else re(!0)},[t,k,l]),React.useEffect(()=>{if(ue.length>0){const te=(i??[]).map(fe=>({id:fe.id,label:fe.label??fe.id,tooltip:fe.tooltip,shouldDisplay:fe.shouldDisplay??!0,shouldVisible:fe.shouldVisible??!0})),oe=Object.keys(ue[0]||{}).map(fe=>({id:fe,label:fe.charAt(0).toUpperCase()+fe.slice(1),shouldDisplay:!0,shouldVisible:!0})),de=te.length>0?te:oe;if(Pt(de),!At){const fe=de.filter(be=>be.shouldDisplay!==!1).map(be=>be.id),ye=de.filter(be=>be.shouldVisible!==!1).map(be=>be.id);mt(new Set(fe)),wt(ye),kt(!0)}}},[ue,i]);const[ne,ae]=React.useState({}),me=({rowIndex:te,columnId:oe,rowData:de})=>{const fe=Array.isArray(l)?l:[l],ye={...de,...Object.fromEntries(fe.map(Re=>[Re,Re===oe]))},be=de.id??`__row_${te}`;ae(Re=>({...Re,[be]:{columnId:oe,rowData:ye}}));const Se=ue.map((Re,je)=>(Re.id??`__row_${je}`)===be?{...Re,...Object.fromEntries(fe.map(Oe=>[Oe,Oe===oe]))}:Re);le(Se),Q(Se),I&&I({fullData:Se,updatedRow:ye})},_e=te=>{var fe;const oe=ue.findIndex(ye=>ye===te),de=te.id??`__row_${oe}`;return((fe=ne[de])==null?void 0:fe.columnId)||""},we=React.useMemo(()=>{const te=Ze*et,oe=te+et;return ue.slice(te,oe)},[ue,Ze,et]),ge=()=>{at(""),Ee()},Ee=()=>{let te=[...ve];st.trim()&&(te=te.filter(oe=>Object.entries(oe).some(([de,fe])=>Je.has(de)?String(fe).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(Be).forEach(([oe,de])=>{const{value:fe,operator:ye}=de;te=te.filter(be=>{const Se=String(be[oe]||"").toLowerCase(),Re=fe.toLowerCase();switch(ye){case"contains":return Se.includes(Re);case"equals":return Se===Re;case"startsWith":return Se.startsWith(Re);case"endsWith":return Se.endsWith(Re);case"does not contain":return!Se.includes(Re);case"does not equal":return Se!==Re;case"is any of":return fe.split(",").map(je=>je.trim().toLowerCase()).includes(Se);default:return!0}})}),le(te),qe(0)},Ae=te=>{const oe=new Set(Je);oe.has(te)?oe.size>1&&oe.delete(te):oe.add(te),mt(oe)},Ve=(te,oe=null)=>{const de=oe?`${te}-${oe}`:`${te}`,fe=new Set(pt);fe.has(de)?fe.delete(de):(Array.from(fe).forEach(ye=>{ye.startsWith(`${te}`)&&fe.delete(ye)}),fe.add(de)),vt(fe)},ze=te=>{Fe(De===te?null:te)};React.useEffect(()=>{const te=oe=>{if(De&&!oe.target)return;const de=oe.target;!de.closest(".dropdown-menu")&&!de.closest(".dropdown-trigger")&&Fe(null)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[De]);const tt=te=>{if(ve.length===0)return;let oe="asc";N&&N.column===te&&(oe=N.direction==="asc"?"desc":"asc");const de=[...ve].sort((ye,be)=>{const Se=getColumnValue(ye[te]),Re=getColumnValue(be[te]);if(Se==null)return 1;if(Re==null)return-1;const je=String(Se).toLowerCase(),$e=String(Re).toLowerCase();return!isNaN(Number(Se))&&!isNaN(Number(Re))?oe==="asc"?Number(Se)-Number(Re):Number(Re)-Number(Se):oe==="asc"?je.localeCompare($e):$e.localeCompare(je)});q({column:te,direction:oe}),Q(de);let fe=[...de];Object.entries(Be).forEach(([ye,be])=>{const{value:Se,operator:Re}=be,je=Se.toLowerCase();fe=fe.filter($e=>{const Oe=String($e[ye]||"").toLowerCase();switch(Re){case"contains":return Oe.includes(je);case"equals":return Oe===je;case"startsWith":return Oe.startsWith(je);case"endsWith":return Oe.endsWith(je);default:return!0}})}),st.trim()&&(fe=fe.filter(ye=>Object.entries(ye).some(([be,Se])=>Je.has(be)?String(Se).toLowerCase().includes(st.toLowerCase()):!1))),le(fe),qe(0)},yt=()=>{Ye&&Ke.trim()!==""&&ft(Ye,Ke,We),Ce(!1),Ue(""),Le(""),qe(0)},ft=(te,oe,de)=>{if(te){const fe={...Be};if(oe===""&&(de==="contains"||de==="equals")){Le(te),Ge(de||We),Ue(""),Ce(!0);return}else oe&&oe.trim()!==""?fe[te]={value:oe,operator:de||We}:delete fe[te];Xe(fe);let ye=[...ve];Object.entries(fe).forEach(([be,Se])=>{const{value:Re,operator:je}=Se;ye=ye.filter($e=>{const Oe=String($e[be]||"").toLowerCase(),He=Re.toLowerCase();switch(je){case"contains":return Oe.includes(He);case"equals":return Oe===He;case"startsWith":return Oe.startsWith(He);case"endsWith":return Oe.endsWith(He);case"does not contain":return!Oe.includes(He);case"does not equal":return Oe!==He;case"is any of":return Re.split(",").map(rt=>rt.trim().toLowerCase()).includes(Oe);default:return!0}})}),le(ye),he(ye),qe(0),Ce(!1)}},Et=te=>{te.key==="Enter"&&ft()};useEscapeKey(()=>{Fe(null),Ce(!1)});const lt=(te,oe="")=>{const de=fe=>{const ye=new Set(_t);ye.has(fe)?ye.delete(fe):ye.add(fe),Rt(ye)};if(Array.isArray(te)){const fe=Array.from(new Set(te.reduce((ye,be)=>typeof be=="object"&&be!==null?[...ye,...Object.keys(be)]:ye,[])));return jsxRuntimeExports.jsx("div",{className:"expanded-section",children:jsxRuntimeExports.jsx("div",{className:"nested-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:fe.map(ye=>jsxRuntimeExports.jsx("th",{children:ye.charAt(0).toUpperCase()+ye.slice(1)},ye))})}),jsxRuntimeExports.jsx("tbody",{children:te.map((ye,be)=>jsxRuntimeExports.jsx("tr",{children:fe.map(Se=>jsxRuntimeExports.jsx("td",{children:typeof ye[Se]=="object"&&ye[Se]!==null?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>de(`${oe}-${be}-${Se}`),children:_t.has(`${oe}-${be}-${Se}`)?"▼":"▶"}),_t.has(`${oe}-${be}-${Se}`)&<(ye[Se],`${oe}-${be}-${Se}`)]}):String(ye[Se]||"")},`${oe}-${be}-${Se}`))},`${oe}-${be}`))})]})})})}else if(typeof te=="object"&&te!==null)return jsxRuntimeExports.jsx("div",{className:"nested-object",children:jsxRuntimeExports.jsxs("table",{className:"custom-table nested",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Property"}),jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Value"})]})}),jsxRuntimeExports.jsx("tbody",{children:Object.entries(te).map(([fe,ye])=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:"table-cell",children:jsxRuntimeExports.jsx("strong",{children:fe})}),jsxRuntimeExports.jsx("td",{className:"table-cell",children:typeof ye=="object"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>de(`${oe}-${fe}`),children:_t.has(`${oe}-${fe}`)?"▼":"▶"}),_t.has(`${oe}-${fe}`)&<(ye,`${oe}-${fe}`)]}):String(ye)})]},`${oe}-${fe}`))})]})});return jsxRuntimeExports.jsx("span",{children:String(te)})},Tt=te=>{var oe;if(te){const de=(oe=te.parentElement)==null?void 0:oe.querySelector(".dropdown-trigger");if(!de)return;const fe=de.getBoundingClientRect(),ye=window.innerHeight,be=window.innerWidth,Se=te.offsetHeight,Re=te.offsetWidth,je=fe.bottom+Se>ye,$e=fe.left+Re>be,Oe=fe.left-Re<0;let He,rt;je?(He=fe.top-Se,te.classList.add("adjust-top")):(He=fe.bottom,te.classList.remove("adjust-top")),$e?(rt=fe.right-Re,te.classList.add("adjust-left"),te.classList.remove("adjust-right")):Oe?(rt=fe.left,te.classList.add("adjust-right"),te.classList.remove("adjust-left")):(rt=fe.left,te.classList.remove("adjust-left"),te.classList.remove("adjust-right")),te.style.top=`${He}px`,te.style.left=`${rt}px`,te.classList.add("dropdown-fixed-position")}};React.useEffect(()=>{const te=oe=>{Ne&&Pe.current&&!Pe.current.contains(oe.target)&&Ce(!1)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[Ne]),React.useEffect(()=>{const te=oe=>{De&&it.current&&!it.current.contains(oe.target)&&Fe(null)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[De]),React.useEffect(()=>{const te=oe=>{ht&&xt.current&&!xt.current.contains(oe.target)&&dt(!1)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[ht]);const ct=(te,oe)=>{te.preventDefault();const de=te.pageX,fe=W[oe]||150,ye=Se=>{const Re=Math.max(100,fe+(Se.pageX-de));Z(je=>({...je,[oe]:Re}))},be=()=>{document.removeEventListener("mousemove",ye),document.removeEventListener("mouseup",be)};document.addEventListener("mousemove",ye),document.addEventListener("mouseup",be)},Ft=(te,oe)=>{var fe;const de=String(oe);return F!=null&&F.includes(te)?L!=null&&L[te]?L[te].includes(de):!0:!!((fe=L==null?void 0:L._global_)!=null&&fe.includes(de))},Mt=(te,oe)=>{Ft(oe,te[oe])&&P&&P(te,oe)},Ct=we.some(te=>Array.from(Je).some(oe=>Array.isArray(te[oe])&&te[oe].length>0&&te[oe].some(de=>typeof de=="object"&&de!==null))),Lt=()=>{const te=Qe.filter(ye=>Je.has(ye.id)),oe=ve.map(ye=>te.reduce((be,Se)=>(be[Se.label||Se.id]=getColumnValue(ye[Se.id]),be),{})),de=utils.json_to_sheet(oe),fe=utils.book_new();utils.book_append_sheet(fe,de,"Data"),writeFileSync(fe,"alldata-grid-export.xlsx")},Dt=()=>jsxRuntimeExports.jsxs("div",{className:D?"esign-table-container":"table-container",children:[jsxRuntimeExports.jsx("div",{className:"table-scroll-container",children:Je.size===0?jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"200px",display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:"1.2em",background:"#fafafa",border:"1px solid #eee",borderRadius:"8px"},children:"Please select at least one column to show data"}):jsxRuntimeExports.jsxs("table",{className:"custom-table",style:{tableLayout:"fixed",width:"100%"},children:[jsxRuntimeExports.jsxs("thead",{children:[jsxRuntimeExports.jsxs("tr",{children:[Ct&&jsxRuntimeExports.jsx("th",{className:"expand-column"}),n&&jsxRuntimeExports.jsx("th",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:xe.size===ue.length&&ue.length>0,onChange:te=>{if(te){const oe=new Set(ue.map((de,fe)=>fe));Ie(oe)}else Ie(new Set)}})}),ot.filter(te=>Qe.find(de=>de.id===te)&&Je.has(te)).map(te=>{const oe=Qe.find(de=>de.id===te);return oe?jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:W[oe.id]?`${W[oe.id]}px`:"150px",minWidth:"80px",maxWidth:"600px"},children:jsxRuntimeExports.jsxs("div",{className:"column-header",children:[jsxRuntimeExports.jsxs("span",{className:"column-label-with-info",children:[oe.label,oe.tooltip&&jsxRuntimeExports.jsx("img",{src:InfoIcon,alt:"info",title:oe.tooltip,width:14,height:14,className:"info-icon"})]}),jsxRuntimeExports.jsxs("div",{className:"column-actions",children:[V&&jsxRuntimeExports.jsx("img",{src:SortIcon,alt:"Sort",title:"Sort",width:14,height:14,onClick:()=>tt(oe.id),style:{cursor:"pointer",transition:"transform 0.2s ease-in-out",transform:(N==null?void 0:N.column)===oe.id?N.direction==="asc"?"rotate(0deg)":"rotate(180deg)":"none",filter:(N==null?void 0:N.column)===oe.id?"brightness(0.6)":"none"}}),A&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:oe.id===De?it:null,children:[jsxRuntimeExports.jsx("span",{className:`dropdown-trigger ${Be[oe.id]?"filter-active":""}`,onClick:de=>{de.stopPropagation(),ze(oe.id)},title:Be[oe.id]?`Filter: ${Be[oe.id].operator} "${Be[oe.id].value}"`:"Filter options",children:"⋮"}),De===oe.id&&jsxRuntimeExports.jsxs("div",{className:"dropdown-menu",ref:de=>{de&&setTimeout(()=>Tt(de),0)},children:[jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Le(oe.id),Ce(!0),Fe(null)},children:"Filter"}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{ft(oe.id,"","contains"),Fe(null)},children:"Contains..."}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{ft(oe.id,"","equals"),Fe(null)},children:"Equals..."}),Be[oe.id]&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{const de={...Be};delete de[oe.id],Xe(de),Ue(""),Le("");let fe=[...ve];st.trim()&&(fe=fe.filter(ye=>Object.entries(ye).some(([be,Se])=>Je.has(be)?String(Se).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(de).forEach(([ye,be])=>{const{value:Se,operator:Re}=be;fe=fe.filter(je=>{const $e=String(je[ye]||"").toLowerCase(),Oe=Se.toLowerCase();switch(Re){case"contains":return $e.includes(Oe);case"equals":return $e===Oe;case"startsWith":return $e.startsWith(Oe);case"endsWith":return $e.endsWith(Oe);case"does not contain":return!$e.includes(Oe);case"does not equal":return $e!==Oe;case"is any of":return Se.split(",").map(He=>He.trim().toLowerCase()).includes($e);default:return!0}})}),le(fe),qe(0),Fe(null)},children:"Clear Filter"}),Object.keys(Be).length>0&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Xe({}),le(ve),qe(0),Fe(null)},children:"Clear All Filters"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"column-resizer",onMouseDown:de=>ct(de,oe.id)})]})},oe.id):null}),(u||y||m||d||x||f)&&jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:"150px",textAlign:"center"},children:"Action"})]}),Me&&jsxRuntimeExports.jsxs("tr",{className:"filter-row",children:[Ct&&jsxRuntimeExports.jsx("td",{}),n&&jsxRuntimeExports.jsx("td",{}),ot.filter(te=>Qe.find(de=>de.id===te)&&Je.has(te)).map(te=>{var de;const oe=Qe.find(fe=>fe.id===te);return oe?jsxRuntimeExports.jsxs("td",{style:{position:"relative"},children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:`Search ${oe.label}`,value:((de=Be[oe.id])==null?void 0:de.value)||"",onChange:fe=>{const ye=fe.target.value;Ue(ye),Le(oe.id);const be={...Be};ye===""?delete be[oe.id]:be[oe.id]={value:ye,operator:"contains"},Xe(be);let Se=[...ve];st.trim()&&(Se=Se.filter(Re=>Object.entries(Re).some(([je,$e])=>Je.has(je)?String($e).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(be).forEach(([Re,je])=>{const{value:$e,operator:Oe}=je;Se=Se.filter(He=>{const rt=String(getColumnValue(He[Re])||"").toLowerCase(),gt=$e.toLowerCase();switch(Oe){case"contains":return rt.includes(gt);case"equals":return rt===gt;case"startsWith":return rt.startsWith(gt);case"endsWith":return rt.endsWith(gt);case"does not contain":return!rt.includes(gt);case"does not equal":return rt!==gt;case"is any of":return $e.split(",").map(It=>It.trim().toLowerCase()).includes(rt);default:return!0}})}),le(Se),qe(0)},className:"filter-input-with-clear",style:{paddingRight:"28px"}}),Be[oe.id]&&jsxRuntimeExports.jsx("span",{className:"filter-clear-icon-inside",onClick:()=>{const fe={...Be};delete fe[oe.id],Xe(fe),Ue(""),Le("");let ye=[...ve];st.trim()&&(ye=ye.filter(be=>Object.entries(be).some(([Se,Re])=>Je.has(Se)?String(Re).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(fe).forEach(([be,Se])=>{const{value:Re,operator:je}=Se;ye=ye.filter($e=>{const Oe=String($e[be]||"").toLowerCase(),He=Re.toLowerCase();switch(je){case"contains":return Oe.includes(He);case"equals":return Oe===He;case"startsWith":return Oe.startsWith(He);case"endsWith":return Oe.endsWith(He);case"does not contain":return!Oe.includes(He);case"does not equal":return Oe!==He;case"is any of":return Re.split(",").map(rt=>rt.trim().toLowerCase()).includes(Oe);default:return!0}})}),le(ye),qe(0)},title:"Clear",children:"×"})]},`filter-${oe.id}`):null}),(u||y||m||d||x||f)&&jsxRuntimeExports.jsx("td",{})]})]}),jsxRuntimeExports.jsx("tbody",{children:we.length===0?jsxRuntimeExports.jsx("tr",{className:"no-records-row",children:jsxRuntimeExports.jsx("td",{colSpan:(Ct?1:0)+(n?1:0)+Array.from(Je).length+(u||y||m||d||x||f?1:0),className:"no-records-cell",children:st.trim()||Object.keys(Be).length>0?"No records found for the search criteria":"No Data found"})}):we.map((te,oe)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsxs("tr",{className:oe%2===0?"table-row-even":"table-row-odd",children:[Ct&&jsxRuntimeExports.jsx("td",{className:"expand-column",children:Array.from(Je).some(de=>Array.isArray(te[de])&&te[de].length>0&&te[de].some(fe=>typeof fe=="object"&&fe!==null))&&jsxRuntimeExports.jsx("button",{className:"expand-button",onClick:()=>Ve(oe),children:Array.from(pt).some(de=>de.startsWith(`${oe}`))?"▼":"▶"})}),n&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:xe.has(oe),onChange:de=>{const fe=new Set(xe);de?fe.add(oe):fe.delete(oe),Ie(fe)}})}),s&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:"selected",checked:(o==null?void 0:o(oe))==="selected",onChange:()=>a==null?void 0:a({rowIndex:oe,columnId:"selected",rowData:te})})})}),ot.filter(de=>Qe.find(ye=>ye.id===de)&&Je.has(de)).map(de=>{const fe=Qe.find(ye=>ye.id===de);return fe?jsxRuntimeExports.jsx("td",{style:{width:W[fe.id]?`${W[fe.id]}px`:"150px",minWidth:"80px",maxWidth:"600px"},className:`table-cell ${Ft(fe.id,te[fe.id])?"ce-clickable-cell":""}`,onClick:()=>{Ft(fe.id,te[fe.id])?Mt(te,fe.id):Array.isArray(te[fe.id])&&te[fe.id].length>0&&Ve(oe,fe.id)},children:React.isValidElement(te[fe.id])?te[fe.id]:(Array.isArray(l)?l.includes(fe.id):l===fe.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:fe.id,checked:_e(te)===fe.id,onChange:()=>me({rowIndex:oe,columnId:fe.id,rowData:te})})}):Array.isArray(te[fe.id])?`${te[fe.id].length}`:typeof te[fe.id]=="object"&&te[fe.id]!==null?Object.entries(te[fe.id]).map(([ye,be])=>`${ye}: ${be}`).join(", "):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(te[fe.id]??"")})},fe.id):null}),(u||y||m||d||x||f)&&jsxRuntimeExports.jsx("td",{className:"table-cell",style:{textAlign:"center"},children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"8px",flexWrap:"wrap"},children:[u&&jsxRuntimeExports.jsx("img",{src:Edit,alt:"Edit",title:"Edit",width:20,height:20,style:{cursor:"pointer"},onClick:g}),y&&jsxRuntimeExports.jsx("img",{src:Reassign,alt:"Reassign",width:20,height:20,style:{cursor:"pointer"},onClick:b}),m&&jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:C}),d&&jsxRuntimeExports.jsx("img",{src:Approve,alt:"Approve",width:20,height:20,style:{cursor:"pointer"},onClick:T}),x&&jsxRuntimeExports.jsx("img",{src:Delete,alt:"Delete",width:20,height:20,style:{cursor:"pointer"},onClick:_}),f&&jsxRuntimeExports.jsx("img",{src:Add,alt:"Add",width:20,height:20,style:{cursor:"pointer"},onClick:S})]})})]}),Array.from(pt).map(de=>{const[fe,ye]=de.split("-");if(Number(fe)===oe){const be=ye?{[ye]:te[ye]}:Object.keys(te).filter(Se=>Array.isArray(te[Se])||typeof te[Se]=="object").reduce((Se,Re)=>({...Se,[Re]:te[Re]}),{});return jsxRuntimeExports.jsx("tr",{className:"expanded-row",children:jsxRuntimeExports.jsx("td",{colSpan:Je.size+2,className:"expanded-cell",children:Object.entries(be).map(([Se,Re],je)=>jsxRuntimeExports.jsxs("div",{className:`expanded-section ${je%2===0?"expanded-section-even":"expanded-section-odd"}`,style:{backgroundColor:je%2===0?"#e8f5e9":"#e3f2fd",padding:"10px",marginBottom:"10px",borderRadius:"5px"},children:[jsxRuntimeExports.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:Se.charAt(0).toUpperCase()+Se.slice(1)}),lt(Re)]},Se))})},`expanded-${de}`)}return null})]},oe))})]})}),O&&jsxRuntimeExports.jsxs("div",{className:"pagination-container",children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"40px"},children:[jsxRuntimeExports.jsx(EntriesInfo,{dataLength:ue.length,currentPage:Ze,rowsPerPage:et}),jsxRuntimeExports.jsx(RowsPerPageSelector,{rowsPerPage:et,setRowsPerPage:nt,setCurrentPage:qe,pageSizeOptions:U})]}),jsxRuntimeExports.jsx(PaginationControls,{currentPage:Ze,totalPages:Math.ceil(ue.length/et),setCurrentPage:qe})]}),Ne&&jsxRuntimeExports.jsx("div",{className:"filter-modal",children:jsxRuntimeExports.jsxs("div",{className:"filter-modal-content",ref:Pe,onKeyDown:Et,tabIndex:0,children:[jsxRuntimeExports.jsxs("div",{className:"filter-modal-header",children:[jsxRuntimeExports.jsx("h3",{children:"Filter Data"}),jsxRuntimeExports.jsx(CEButton,{className:"close-button-close",onClick:()=>Ce(!1),children:"×"})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-body",children:[jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Column:"}),jsxRuntimeExports.jsx("select",{value:Ye,onChange:te=>Le(te.target.value),className:"filter-select","aria-label":"Filter column",title:"Select column to filter",children:Qe.map(te=>jsxRuntimeExports.jsx("option",{value:te.id,children:te.label},te.id))})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Operator:"}),jsxRuntimeExports.jsxs("select",{value:We,onChange:te=>Ge(te.target.value),className:"filter-select","aria-label":"Filter operator",title:"Select filter operator",children:[jsxRuntimeExports.jsx("option",{value:"contains",children:"contains"}),jsxRuntimeExports.jsx("option",{value:"equals",children:"equals"}),jsxRuntimeExports.jsx("option",{value:"startsWith",children:"starts with"}),jsxRuntimeExports.jsx("option",{value:"endsWith",children:"ends with"}),jsxRuntimeExports.jsx("option",{value:"does not contain",children:"does not contain"}),jsxRuntimeExports.jsx("option",{value:"does not equal",children:"does not equal"}),jsxRuntimeExports.jsx("option",{value:"is any of",children:"is any of"})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Value:"}),jsxRuntimeExports.jsx("input",{type:"text",value:Ke,onChange:te=>Ue(te.target.value),placeholder:"Enter filter value",title:"Filter value",className:"filter-input",autoFocus:!0,onKeyDown:te=>{te.key==="Enter"&&yt(),te.key==="Escape"&&Ce(!1)}})]}),Object.keys(Be).length>0&&jsxRuntimeExports.jsxs("div",{className:"active-filters-summary",children:[jsxRuntimeExports.jsx("div",{className:"active-filters-header",children:"Active Filters:"}),Object.entries(Be).map(([te,oe])=>{const de=Qe.find(fe=>fe.id===te);return jsxRuntimeExports.jsxs("div",{className:"active-filter-item",children:[jsxRuntimeExports.jsxs("span",{children:[(de==null?void 0:de.label)||te,": "]}),jsxRuntimeExports.jsx("span",{className:"filter-operator",children:oe.operator}),jsxRuntimeExports.jsxs("span",{className:"filter-value",children:['"',oe.value,'"']})]},te)})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-footer",children:[jsxRuntimeExports.jsx(CEButton,{onClick:()=>{Xe({}),le(ve),qe(0),Ce(!1)},className:"clear-filters-button",variant:"outlined",children:"Clear All"}),jsxRuntimeExports.jsx(CEButton,{onClick:yt,className:"apply-filter-button",variant:"primary",children:"Apply Filter"})]})]})})]}),Nt=()=>{const te=Qe.filter(ye=>Je.has(ye.id)),oe=we.map(ye=>Object.fromEntries(te.map(be=>[be.label||be.id,getColumnValue(ye[be.id])]))),de=utils.json_to_sheet(oe),fe=utils.book_new();utils.book_append_sheet(fe,de,"Data"),writeFileSync(fe,"data-grid-export.xlsx",{bookType:"xlsx"})},jt=()=>{j?(re(!0),Promise.resolve(j()).finally(()=>{Xe({}),re(!1)})):(re(!0),setTimeout(()=>{le(t),Q(t),qe(0),at(""),Ue(""),Le(""),Xe({}),q(null),re(!1)},300))},Bt=Qe.filter(te=>te.shouldVisible!==!1).every(te=>Je.has(te.id));return jsxRuntimeExports.jsxs("div",{className:`datatable-wrapper${G?" ce-grid-fullscreen":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"grid-header",children:[e&&jsxRuntimeExports.jsx("span",{className:"header-title",children:e}),jsxRuntimeExports.jsxs("div",{className:"search-container",children:[c&&jsxRuntimeExports.jsxs("div",{className:"search-wrapper",children:[jsxRuntimeExports.jsx("img",{src:SearchRounded,alt:"Show Filter",title:"Show/Hide Filter",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>{const te=!Me;ke(te),te||(Xe({}),le(ve),qe(0),at(""))}}),st&&jsxRuntimeExports.jsx("button",{className:"search-cancel-button",onClick:()=>{at(""),ge()},children:"×"})]}),M&&jsxRuntimeExports.jsx("img",{src:ShowOrHideColumn,alt:"Columns",title:"Show/Hide Columns",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>dt(!0)}),Object.keys(Be).length>0&&jsxRuntimeExports.jsx("img",{src:FilterAltOffRounded,alt:"Clear Filters",title:"Clear All Filters",width:20,height:20,style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:()=>{Xe({}),le(ve),qe(0)}}),B&&jsxRuntimeExports.jsx("img",{src:ExportIcon,alt:"Export",title:"Export to XLS",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:Nt}),E&&jsxRuntimeExports.jsx("img",{src:FileOpenRounded,alt:"Export",title:"Export All to Excel",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:Lt}),K&&jsxRuntimeExports.jsx("img",{src:ReloadIcon,alt:"Reload",title:"Reload Data",width:20,height:20,className:"ce-reload-icon",style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:jt}),ee&&jsxRuntimeExports.jsx("button",{className:"fullscreen-button",onClick:G?ie:J,title:G?"Exit Full Screen":"Full Screen",children:G?"⤫":"⤢"})]})]}),ht&&jsxRuntimeExports.jsx("div",{className:"column-modal",children:jsxRuntimeExports.jsxs("div",{className:"column-modal-content",ref:xt,children:[jsxRuntimeExports.jsx("div",{className:"column-modal-header",children:jsxRuntimeExports.jsx("button",{className:"modal-close-button",onClick:()=>dt(!1),children:"×"})}),jsxRuntimeExports.jsx("h3",{className:"column-modal-title",children:"Column Visibility and Order"}),jsxRuntimeExports.jsx("p",{className:"column-modal-description",children:"Drag and drop columns to change their order. Check or uncheck to show or hide columns."}),jsxRuntimeExports.jsx("div",{className:"column-modal-actions",children:jsxRuntimeExports.jsx("div",{className:"select-all-action",children:jsxRuntimeExports.jsx(CECheckBox,{label:"Select All",checked:Bt,onChange:te=>{mt(te?new Set(Qe.filter(oe=>oe.shouldVisible!==!1).map(oe=>oe.id)):new Set)}})})}),jsxRuntimeExports.jsx("div",{className:"column-list-container",children:ot.filter(te=>Qe.find(oe=>oe.id===te&&oe.shouldVisible!==!1)).map(te=>{const oe=Qe.find(de=>de.id===te);return oe?jsxRuntimeExports.jsxs("div",{className:`column-item ${ut===oe.id?"dragging":""}`,draggable:!0,onDragStart:de=>{St(oe.id),de.dataTransfer.effectAllowed="move",de.dataTransfer.setData("text/plain",oe.id)},onDragEnd:()=>St(null),onDragOver:de=>{de.preventDefault(),de.dataTransfer.dropEffect="move"},onDragEnter:de=>{de.preventDefault(),de.currentTarget.classList.add("drag-over")},onDragLeave:de=>{de.currentTarget.classList.remove("drag-over")},onDrop:de=>{if(de.preventDefault(),de.currentTarget.classList.remove("drag-over"),ut&&ut!==oe.id){const fe=[...ot],ye=fe.indexOf(ut),be=fe.indexOf(oe.id);ye!==-1&&be!==-1&&(fe.splice(ye,1),fe.splice(be,0,ut),wt(fe))}},children:[jsxRuntimeExports.jsx("div",{className:"column-drag-handle",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:jsxRuntimeExports.jsx("path",{d:"M4 4h2v2H4V4zm0 6h2v2H4v-2zm0-3h2v2H4V7zm8 3h-6v2h6v-2zm0-3h-6v2h6V7zm0-3h-6v2h6V4z"})})}),jsxRuntimeExports.jsx(CECheckBox,{label:oe.label??oe.id,checked:Je.has(oe.id),onChange:()=>Ae(oe.id)})]},oe.id):null})})]})}),pe?jsxRuntimeExports.jsx(CESkeletonTable,{columns:Qe.length||5,rows:et||10}):Dt()]})},DateInputPart=({value:e,onChange:t,max:i,min:n,length:s,placeholder:a})=>{const o=React.useRef(null),l=u=>{const x=u.target.value.replace(/\D/g,"");if(x.length<=s){if(x.length===1){const d=parseInt(x);if(i===12&&d>1){t(`0${d}`);return}if(i===31&&d>3){t(`0${d}`);return}}if(x.length===2){const d=parseInt(x);d>=n&&d<=i&&t(x);return}t(x)}},c=()=>{var u;(u=o.current)==null||u.select()},f=()=>{e.length===1&&t(e.padStart(2,"0"))};return jsxRuntimeExports.jsx("input",{ref:o,type:"text",value:e,onChange:l,onFocus:c,onBlur:f,maxLength:s,className:"date-input-part",placeholder:a})},DateRangeIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%204.5H18V3.5C18%202.95%2017.55%202.5%2017%202.5C16.45%202.5%2016%202.95%2016%203.5V4.5H8V3.5C8%202.95%207.55%202.5%207%202.5C6.45%202.5%206%202.95%206%203.5V4.5H5C3.89%204.5%203.01%205.4%203.01%206.5L3%2020.5C3%2021.6%203.89%2022.5%205%2022.5H19C20.1%2022.5%2021%2021.6%2021%2020.5V6.5C21%205.4%2020.1%204.5%2019%204.5ZM19%2019.5C19%2020.05%2018.55%2020.5%2018%2020.5H6C5.45%2020.5%205%2020.05%205%2019.5V9.5H19V19.5ZM7%2011.5H9V13.5H7V11.5ZM11%2011.5H13V13.5H11V11.5ZM15%2011.5H17V13.5H15V11.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",WEEKDAYS=["Su","Mo","Tu","We","Th","Fr","Sa"],CEDatePicker=({onChange:e,label:t="Calendar"})=>{const[i,n]=React.useState(!1),[s,a]=React.useState(null),[o,l]=React.useState(new Date),[c,f]=React.useState(!1),[u,x]=React.useState({start:2020,end:2031}),[d,y]=React.useState("left"),[m,p]=React.useState(0),E=React.useRef(null),[g,S]=React.useState(!1),[_,T]=React.useState(""),[b,C]=React.useState(""),[R,F]=React.useState(""),[L,P]=React.useState(!0),j=()=>{n(!1),!_&&!b&&!R&&S(!1)};useEscapeKey(j);const B=()=>{n(I=>{if(!I){const D=s||new Date;l(D),_||T(String(D.getMonth()+1).padStart(2,"0")),b||C(String(D.getDate()).padStart(2,"0")),R||F(String(D.getFullYear()))}return!I})};React.useEffect(()=>{const I=D=>{E.current&&!E.current.contains(D.target)&&j()};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[_,b,R]);const K=I=>{const D=new Date(o.getFullYear(),o.getMonth(),I);a(D),l(D);const O=String(D.getMonth()+1).padStart(2,"0"),z=String(D.getDate()).padStart(2,"0"),U=String(D.getFullYear());T(O),C(z),F(U),P(!0),e(`${O}/${z}/${U}`),n(!1)},ee=I=>{y(I>0?"left":"right"),l(D=>{const O=new Date(D.getFullYear(),D.getMonth()+I,1);return s&&T(String(O.getMonth()+1).padStart(2,"0")),p(z=>z+1),O})},X=()=>{f(I=>!I)},M=I=>{x(D=>({start:D.start+I*10,end:D.end+I*10}))},V=I=>{const D=new Date(I,o.getMonth(),1);l(D),F(String(I)),f(!1)},A=()=>{const I=new Date(o.getFullYear(),o.getMonth(),1),D=new Date(o.getFullYear(),o.getMonth()+1,0),O=I.getDay(),z=D.getDate(),U=new Date,W=se=>!s&&U.getDate()===se&&U.getMonth()===o.getMonth()&&U.getFullYear()===o.getFullYear(),Z=[];for(let se=0;se<O;se++)Z.push(jsxRuntimeExports.jsx("div",{className:"dp-day empty"},`empty-${se}`));for(let se=1;se<=z;se++){const ce=(s==null?void 0:s.getDate())===se&&(s==null?void 0:s.getMonth())===o.getMonth()&&(s==null?void 0:s.getFullYear())===o.getFullYear();Z.push(jsxRuntimeExports.jsx("div",{className:`dp-day ${ce?"selected":""} ${W(se)?"today":""}`,onClick:()=>K(se),children:se},se))}return Z},k=(I,D,O)=>{if(!I||!D||!O){P(!1),l(new Date),a(null);return}const z=`${O}-${I}-${D}`,U=new Date(z);if(U.getFullYear()===parseInt(O)&&U.getMonth()+1===parseInt(I)&&U.getDate()===parseInt(D))a(U),l(U),P(!0),e(`${I}/${D}/${O}`);else{const W=new Date;P(!1),a(null),l(W),T(I),C(D),F(O)}};return jsxRuntimeExports.jsxs("div",{className:"dp-wrapper",ref:E,children:[jsxRuntimeExports.jsxs("div",{className:`dp-input-container ${g||i?"focused":""} ${L?"":"invalid"}`,children:[jsxRuntimeExports.jsx("div",{className:`dp-label ${g||i||s||_||b||R?"floating":""} ${L?"":"invalid"}`,children:t}),jsxRuntimeExports.jsxs("div",{className:"dp-input-wrapper",onClick:()=>{S(!0)},children:[jsxRuntimeExports.jsx(DateInputPart,{value:_,onChange:I=>{T(I),k(I,b,R)},max:12,min:1,length:2,placeholder:"MM",onClick:B}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx(DateInputPart,{value:b,onChange:I=>{C(I),k(_,I,R)},placeholder:"DD",max:31,min:1,length:2,onClick:B}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("input",{type:"text",value:R,onChange:I=>{const D=I.target.value.replace(/\D/g,"");D.length<=4&&(F(D),D.length===4&&k(_,b,D))},onFocus:I=>I.target.select(),onBlur:()=>{R.length===4&&k(_,b,R)},className:"date-input-part",maxLength:4,placeholder:"YYYY"}),jsxRuntimeExports.jsx("span",{className:"dp-icon",onClick:B,children:jsxRuntimeExports.jsx("img",{src:DateRangeIcon,alt:"Calendar Icon"})})]})]}),i&&jsxRuntimeExports.jsxs("div",{className:"dp-calendar",children:[jsxRuntimeExports.jsxs("div",{className:"dp-header",children:[jsxRuntimeExports.jsxs("div",{className:"dp-title",onClick:X,children:[c?`${u.start} - ${u.end}`:`${o.toLocaleString("default",{month:"long"})} ${o.getFullYear()}`,jsxRuntimeExports.jsx("button",{className:"dp-toggle-icon",children:"▾"})]}),jsxRuntimeExports.jsxs("div",{className:"dp-controls",children:[jsxRuntimeExports.jsx("button",{onClick:()=>c?M(-1):ee(-1),children:"‹"}),jsxRuntimeExports.jsx("button",{onClick:()=>c?M(1):ee(1),children:"›"})]})]}),!c&&jsxRuntimeExports.jsx("div",{className:"dp-weekdays",children:WEEKDAYS.map(I=>jsxRuntimeExports.jsx("div",{className:"dp-weekday",children:I},I))}),c?jsxRuntimeExports.jsx("div",{className:"dp-years-grid",children:Array.from({length:u.end-u.start+1},(I,D)=>{const O=u.start+D;return jsxRuntimeExports.jsx("div",{className:"dp-year-item",onClick:()=>V(O),children:O},O)})}):jsxRuntimeExports.jsx("div",{className:`dp-days dp-slide-${d}`,children:A()},m)]})]})},CEDateRangePicker=({label:e="Submitted Date",onChange:t,size:i="medium",style:n,inputGroupStyle:s})=>{const[a,o]=React.useState(""),[l,c]=React.useState(""),[f,u]=React.useState(!1),[x,d]=React.useState(""),y=g=>{!g.currentTarget.value&&!a&&!l&&u(!1)},m=(g,S)=>{g&&S&&new Date(S)<new Date(g)?d("End date must be after or equal to start date"):(d(""),t==null||t({startDate:g,endDate:S}))},p=g=>{const S=g.target.value;o(S),m(S,l)},E=g=>{const S=g.target.value;c(S),m(a,S)};return jsxRuntimeExports.jsxs("div",{className:"date-range-picker",style:n,children:[jsxRuntimeExports.jsxs("div",{className:"date-range-field-group",style:s,children:[jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:a,onChange:p,onFocus:()=>u(!0),onBlur:g=>y(g)}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"From"})]}),jsxRuntimeExports.jsx("span",{className:"range-separator centered",children:"to"}),jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:l,onChange:E,onFocus:()=>u(!0),onBlur:g=>y(g)}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"To"})]})]}),x&&jsxRuntimeExports.jsx("div",{className:"error-text",children:x})]})},FieldsInput=({label:e,name:t,placeholder:i="",value:n="",onChange:s,size:a="medium"})=>{const[o,l]=React.useState(!1),[c,f]=React.useState(!1),u=getSizeStyle$1(a);React.useEffect(()=>{n&&n.trim().length>0&&f(!0)},[n]);const x=()=>{l(!0),f(!0)},d=m=>{l(!1),m.target.value.trim()||f(!1)},y=o||!!n;return jsxRuntimeExports.jsxs("div",{className:`floating-input-wrapper${c?" focused":""}`,style:u,children:[jsxRuntimeExports.jsx("label",{htmlFor:t,className:"floating-label",children:e}),jsxRuntimeExports.jsx("input",{id:t,name:t,className:"floating-input",placeholder:y?i:"",value:n,onChange:s,onFocus:x,onBlur:d})]})},CEFooter=()=>jsxRuntimeExports.jsx("footer",{style:{zIndex:1100,backgroundColor:"var(--grey-color)",width:"100%",height:"36px",position:"fixed",bottom:"0",left:"0",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"auto"},children:jsxRuntimeExports.jsx("p",{style:{color:"var(--white-color)",fontSize:"0.8rem",margin:"0"},children:"© All rights reserved by Clean Earth."})}),CEGridLayout=({children:e,columns:t=12,gap:i="1rem",alignItems:n="stretch",justifyItems:s="stretch",gridTemplateColumns:a})=>jsxRuntimeExports.jsx("div",{className:"grid-container",style:{display:"grid",gridTemplateColumns:a||`repeat(${t}, 1fr)`,gap:i,alignItems:n,justifyItems:s,backgroundColor:"transparent"},children:e}),CELogo=({src:e,alt:t="Logo",style:i})=>jsxRuntimeExports.jsx("img",{src:e,alt:t,style:{height:25,...i}}),CESearchBar=({onFocus:e,onBlur:t,quickActions:i=[],recentSearches:n=[]})=>{const[s,a]=React.useState(!1),[o,l]=React.useState(""),[c,f]=React.useState(i),[u,x]=React.useState(n),d=(m,p)=>{m==="quickActions"?f(E=>E.filter((g,S)=>S!==p)):x(E=>E.filter((g,S)=>S!==p))},y=()=>{o.trim()!==""&&(x(m=>[o,...m]),l(""))};return jsxRuntimeExports.jsxs("div",{className:"ceui-search-bar",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",className:"ceui-search-input",value:o,onChange:m=>l(m.target.value),onFocus:()=>{a(!0),e&&e()},onBlur:()=>{setTimeout(()=>a(!1),200),t&&t()},onKeyDown:m=>{m.key==="Enter"&&y()}}),s&&jsxRuntimeExports.jsxs("div",{className:"ceui-search-suggestions",children:[c.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Quick actions"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:c.map((m,p)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[m,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>d("quickActions",p),children:"✕"})]},p))})]}),u.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Recent search"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:u.map((m,p)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[m,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>d("recentSearches",p),children:"✕"})]},p))})]})]})]})},CESearchButton=({showSuggestions:e=!1,quickActions:t=[],recentSearches:i=[]})=>{const[n,s]=React.useState(!1),[a,o]=React.useState(!1),l=React.useRef(null),c=u=>{l.current&&!l.current.contains(u.target)&&(s(!1),o(!1))},f=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5001 14.5H14.7101L14.4301 14.23C15.6301 12.83 16.2501 10.92 15.9101 8.89002C15.4401 6.11002 13.1201 3.89002 10.3201 3.55002C6.09014 3.03002 2.53014 6.59001 3.05014 10.82C3.39014 13.62 5.61014 15.94 8.39014 16.41C10.4201 16.75 12.3301 16.13 13.7301 14.93L14.0001 15.21V16L18.2501 20.25C18.6601 20.66 19.3301 20.66 19.7401 20.25C20.1501 19.84 20.1501 19.17 19.7401 18.76L15.5001 14.5ZM9.50014 14.5C7.01014 14.5 5.00014 12.49 5.00014 10C5.00014 7.51002 7.01014 5.50002 9.50014 5.50002C11.9901 5.50002 14.0001 7.51002 14.0001 10C14.0001 12.49 11.9901 14.5 9.50014 14.5Z",fill:"black",fillOpacity:"0.54"})});return React.useEffect(()=>(n?document.addEventListener("mousedown",c):document.removeEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}),[n]),console.log("isSearchOpen:",n),console.log("showDropdown:",a),console.log("showSuggestions:",e),jsxRuntimeExports.jsxs("div",{ref:l,className:`ceui-animated-search-wrapper ${n?"expanded":"collapsed"}`,children:[jsxRuntimeExports.jsx("button",{className:"ceui-search-button","aria-label":"Open search",onClick:()=>s(!0),children:jsxRuntimeExports.jsx(f,{})}),n&&jsxRuntimeExports.jsx(CESearchBar,{showSuggestions:n&&(e||a),onFocus:()=>o(!0),onBlur:()=>{setTimeout(()=>o(!1),200)},quickActions:t,recentSearches:i})]})},CEHelpButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Help",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2.5C6.48 2.5 2 6.98 2 12.5C2 18.02 6.48 22.5 12 22.5C17.52 22.5 22 18.02 22 12.5C22 6.98 17.52 2.5 12 2.5ZM13 19.5H11V17.5H13V19.5ZM15.07 11.75L14.17 12.67C13.67 13.18 13.31 13.64 13.13 14.36C13.05 14.68 13 15.04 13 15.5H11V15C11 14.54 11.08 14.1 11.22 13.69C11.42 13.11 11.75 12.59 12.17 12.17L13.41 10.91C13.87 10.47 14.09 9.81 13.96 9.11C13.83 8.39 13.27 7.78 12.57 7.58C11.46 7.27 10.43 7.9 10.1 8.85C9.98 9.22 9.67 9.5 9.28 9.5H8.98C8.4 9.5 8 8.94 8.16 8.38C8.59 6.91 9.84 5.79 11.39 5.55C12.91 5.31 14.36 6.1 15.26 7.35C16.44 8.98 16.09 10.73 15.07 11.75Z",fill:"black",fillOpacity:"0.54"})})}),CENotificationButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Notifications",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.4775 22.2632C12.0837 22.2632 12.6651 21.9999 13.0938 21.531C13.5224 21.0622 13.7633 20.4264 13.7633 19.7634H9.19183C9.19183 20.4264 9.43264 21.0622 9.8613 21.531C10.2899 21.9999 10.8713 22.2632 11.4775 22.2632ZM12.6147 3.63801C12.6306 3.46421 12.6131 3.28869 12.5632 3.12276C12.5133 2.95683 12.4322 2.80417 12.3251 2.67464C12.2179 2.54511 12.0871 2.44157 11.9412 2.37071C11.7952 2.29985 11.6372 2.26324 11.4775 2.26324C11.3178 2.26324 11.1599 2.29985 11.0139 2.37071C10.8679 2.44157 10.7372 2.54511 10.63 2.67464C10.5229 2.80417 10.4417 2.95683 10.3919 3.12276C10.342 3.28869 10.3244 3.46421 10.3404 3.63801C9.04845 3.92494 7.88695 4.6916 7.05275 5.80806C6.21856 6.92452 5.76299 8.3221 5.76325 9.76393C5.76325 11.1364 5.19182 17.2635 3.47754 18.5134H19.4775C17.7633 17.2635 17.1918 11.1364 17.1918 9.76393C17.1918 6.73909 15.2261 4.21423 12.6147 3.63801Z",fill:"#757575"})})}),CEAvatarMenu=()=>{const[e,t]=React.useState(!1),i=React.useRef(null),n=()=>t(!e),s=a=>{i.current&&!i.current.contains(a.target)&&t(!1)};return React.useEffect(()=>(e?document.addEventListener("mousedown",s):document.removeEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}),[e]),jsxRuntimeExports.jsxs("div",{style:{position:"relative",zIndex:1e3},children:[jsxRuntimeExports.jsx("img",{src:"src/assets/profile_pic.png",alt:"Profile",style:{width:40,height:40,borderRadius:"50%",cursor:"pointer"},onClick:n}),e&&jsxRuntimeExports.jsxs("div",{ref:i,style:{position:"absolute",right:0,top:"100%",background:"white",border:"1px solid #ccc",boxShadow:"0 2px 10px rgba(0,0,0,0.1)",zIndex:9999,minWidth:120},children:[jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"My Account"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Settings"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Logout"})]})]})},menuItemStyle={padding:"10px 15px",cursor:"pointer",fontSize:14,borderBottom:"1px solid #eee"},CEUserInfo=({name:e,role:t})=>jsxRuntimeExports.jsxs("div",{className:"ceui-user-info",children:[jsxRuntimeExports.jsx("span",{className:"ceui-user-name",children:e}),jsxRuntimeExports.jsx("span",{className:"ceui-user-role",children:t})]}),CEHeader=({headerColor:e="white",logoSrc:t,logoHeight:i,logoWidth:n,showSearchButton:s=!1,quickActions:a=[],recentSearches:o=[],showHelpButton:l=!1,showNotificationButton:c=!1,showAvatarMenu:f=!1,showUserInfo:u=!1,showHamburgerButton:x=!1,showDrawer:d=!1,userInfoProps:y,onMenuClick:m,drawerJsonUrl:p="",isDrawerOpen:E=!1,onDrawerClose:g})=>{const S=()=>jsxRuntimeExports.jsxs("svg",{width:"120",height:"35",viewBox:"0 0 245 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_1572_8855)",children:[jsxRuntimeExports.jsx("path",{d:"M0 1.49012e-05H245V60H0V1.49012e-05Z",fill:"#F4F5F7"}),jsxRuntimeExports.jsx("path",{d:"M53.3741 31.7566C53.3741 39.7826 47.1908 46.1485 39.2275 46.1485C31.2641 46.1485 25.0809 39.7826 25.0809 31.7566C25.0809 23.7306 31.2641 17.3646 39.2275 17.3646C47.1908 17.3646 53.3741 23.7306 53.3741 31.7566Z",fill:"#007ACC"}),jsxRuntimeExports.jsx("path",{d:"M91.5 25H76V35H91.5V30H81.5V29H91.5V25Z",fill:"#000"}),jsxRuntimeExports.jsx("path",{d:"M65 35H69V25H65V35Z",fill:"#000"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_1572_8855",children:jsxRuntimeExports.jsx("rect",{width:"245",height:"60",fill:"white"})})})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("header",{className:"ceui-header",style:{backgroundColor:e},children:[jsxRuntimeExports.jsx("div",{className:"ceui-header-left",children:t?jsxRuntimeExports.jsx(CELogo,{src:t,alt:"Core Logo",style:{height:i||35,width:n||"auto",maxWidth:120}}):jsxRuntimeExports.jsx(S,{})}),jsxRuntimeExports.jsxs("div",{className:"ceui-header-right",children:[s&&jsxRuntimeExports.jsx(CESearchButton,{showSuggestions:!0,quickActions:a,recentSearches:o,value:"",onChange:()=>{},onClear:()=>{}}),l&&jsxRuntimeExports.jsx(CEHelpButton,{}),c&&jsxRuntimeExports.jsx(CENotificationButton,{}),f&&jsxRuntimeExports.jsx(CEAvatarMenu,{}),u&&y&&jsxRuntimeExports.jsx(CEUserInfo,{name:y.name,role:y.role})]})]}),d&&x&&jsxRuntimeExports.jsx(CEDrawer,{jsonUrl:p,isOpen:E,onClose:g||(()=>{})})]})},CEGridMenuButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},children:jsxRuntimeExports.jsx("img",{src:"src/assets/Grid_4x4Rounded.svg",alt:""})}),CEHamburgerButton=({onClick:e,style:t})=>jsxRuntimeExports.jsx("button",{onClick:e,style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none",...t},children:jsxRuntimeExports.jsx("img",{src:"src/assets/MenuRounded.svg",alt:"Menu"})}),CEInputBox=({value:e,onChange:t,placeholder:i="",type:n="text",maxLength:s,minLength:a,required:o=!1,customValidator:l,errorMessage:c="Invalid input",showError:f=!0,label:u,labelSuffix:x,disabled:d=!1,style:y={},size:m="medium",onFocus:p,onBlur:E,autoFocus:g=!1,alwaysShowLabel:S})=>{const[_,T]=React.useState(!1),b=j=>{T(!0),p==null||p(j)},C=j=>{T(!1),E==null||E(j)},R=j=>{const B=j.target.value;n==="number"&&!/^\d*$/.test(B)||n==="alphanumeric"&&!/^[a-zA-Z0-9]*$/.test(B)||t(B)},F=getSizeStyle$1(m||"medium"),L=f&&o&&!e,P={fontSize:F.fontSize,padding:F.padding,...y};return jsxRuntimeExports.jsxs("div",{className:`validated-input-wrapper ${_?"focused":""} ${L?"error":""}`,children:[u&&jsxRuntimeExports.jsxs("label",{className:`validated-input-label ${S||e||_?"shrink":""}`,children:[u,x&&jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:x})]}),n==="textarea"?jsxRuntimeExports.jsx("textarea",{value:e,onChange:R,onFocus:b,onBlur:C,placeholder:i||" ",className:`validated-input-field ${L?"input-error":""}`,disabled:d,style:P}):jsxRuntimeExports.jsx("input",{type:n,value:e,onChange:R,onFocus:b,onBlur:C,placeholder:i||" ",className:`validated-input-field ${L?"input-error":""}`,disabled:d,style:P,autoFocus:g}),f&&!e&&jsxRuntimeExports.jsx("div",{className:"validated-input-error",children:c})]})},InputDropDown=({options:e,selected:t,onChange:i,multiple:n=!1,placeholder:s="Select...",size:a="medium",style:o={},allowClear:l=!0,showInputPills:c=!0})=>{const[f,u]=React.useState(!1),[x,d]=React.useState(!1),y=React.useRef(null),p={...getSizeStyle$1(a),...o},E=T=>{if(n){const b=t.includes(T)?t.filter(C=>C!==T):[...t,T];i(b)}else i([T]),u(!1)},g=()=>i([]),S=e.filter(T=>t.includes(T.value)).map(T=>T.label);React.useEffect(()=>{const T=b=>{var C;(C=y.current)!=null&&C.contains(b.target)||u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const _=T=>{const b=t.filter(C=>C!==T);i(b)};return jsxRuntimeExports.jsx("div",{className:`dropdown-container ${f||t.length>0?"float":""}`,ref:y,style:p,children:jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${f?"open":""}`,onClick:()=>u(T=>!T),onFocus:()=>d(!0),onBlur:()=>d(!1),tabIndex:0,children:[jsxRuntimeExports.jsx("label",{className:"floating-placeholder",children:s}),jsxRuntimeExports.jsx("div",{className:"selected-display",children:t.length===0?"":n?c?S.map((T,b)=>jsxRuntimeExports.jsxs("span",{className:"chip",children:[T,jsxRuntimeExports.jsx("span",{className:"close-icon",onClick:C=>{var R;C.stopPropagation(),_(((R=e.find(F=>F.label===T))==null?void 0:R.value)||"")},children:"×"})]},b)):jsxRuntimeExports.jsx("div",{className:"selected-display-label",children:S.join(",")}):jsxRuntimeExports.jsx("span",{children:S[0]})}),l&&t.length>0&&jsxRuntimeExports.jsx("button",{className:"clear-button",onClick:T=>{T.stopPropagation(),g()},children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-icon-img ${f?"rotate-icon":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"black",fillOpacity:"0.54"})})}),f&&jsxRuntimeExports.jsx("ul",{className:"dropdown-options",children:e.map(T=>jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${t.includes(T.value)?"selected":""}`,onClick:b=>{b.stopPropagation(),E(T.value)},children:[n&&jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:t.includes(T.value)}),T.label]},T.value))})]})})},CELinearProgressBar=({duration:e,color:t="#4caf50",backgroundColor:i="#e0e0e0",height:n="10px",isActive:s=!1})=>{const a=React.useRef(null);return React.useEffect(()=>{const o=a.current;if(!(!o||!s))return o.style.width="0%",o.style.transition="none",o.offsetWidth,requestAnimationFrame(()=>{o&&(o.style.transition=`width ${e}ms linear`,o.style.width="100%")}),()=>{o&&(o.style.width="0%",o.style.transition="none")}},[e,s]),jsxRuntimeExports.jsx("div",{className:"snackbar__progress-container",style:{height:n},children:jsxRuntimeExports.jsx("div",{ref:a,className:"snackbar__progress-bar"})})},CEMenuBar=({menuData:e})=>{const[t,i]=React.useState({}),n=(c,f)=>{i(u=>({...u,[c]:f}))};useEscapeKey(()=>{i({})});const a=c=>c.children&&c.children.length>0,o=c=>c.some(f=>a(f)),l=(c,f="")=>!c||c.length===0?null:jsxRuntimeExports.jsx("ul",{className:f?"ce-submenu":"ce-dropdown",children:c.map(u=>{const x=f?`${f}-${u.name}`:u.name,d=a(u);return jsxRuntimeExports.jsxs("li",{className:`ce-dropdown-item ${d?"has-submenu":""}`,onMouseEnter:()=>d&&n(x,!0),onMouseLeave:()=>d&&n(x,!1),onClick:()=>console.log(`Clicked: ${u.name}`),children:[u.name,d&&jsxRuntimeExports.jsx("span",{className:"ce-icon right",children:"▶"}),d&&t[x]&&l(u.children,x)]},x)})});return jsxRuntimeExports.jsx("div",{className:"ce-menu-bar",children:jsxRuntimeExports.jsx("div",{className:"ce-menu-container",children:e.map(c=>{const f=o(c.items);return jsxRuntimeExports.jsxs("div",{className:"ce-menu-item",onMouseEnter:()=>f&&n(c.title,!0),onMouseLeave:()=>f&&n(c.title,!1),children:[jsxRuntimeExports.jsxs("button",{className:"ce-menu-button",children:[c.title,f&&jsxRuntimeExports.jsx("span",{className:"ce-icon",children:"▼"})]}),f&&t[c.title]&&l(c.items,c.title)]},c.title)})})})},CEPagination=({currentPage:e,totalPages:t,onPageChange:i})=>{const n=()=>{const c=[];if(t<=8)for(let f=0;f<t;f++)c.push(f);else if(e<7){for(let f=0;f<8;f++)c.push(f);c.push("..."),c.push(t-1)}else if(e>=t-8+1){c.push(0),c.push("...");for(let f=t-8;f<t;f++)c.push(f)}else{c.push(0),c.push("...");for(let f=e-3;f<=e+3;f++)c.push(f);c.push("..."),c.push(t-1)}return c},s=l=>{typeof l=="number"&&i(l)},a=()=>{e>0&&i(e-1)},o=()=>{e<t-1&&i(e+1)};return jsxRuntimeExports.jsxs("div",{className:"pagination",children:[jsxRuntimeExports.jsx("button",{onClick:a,disabled:e===0,className:"pagination-button",children:"Previous"}),n().map((l,c)=>typeof l=="number"?jsxRuntimeExports.jsx("button",{onClick:()=>s(l),className:`pagination-button page-number ${e===l?"active":""}`,children:l+1},c):jsxRuntimeExports.jsx("span",{className:"pagination-ellipsis",children:l},c)),jsxRuntimeExports.jsx("button",{onClick:o,disabled:e===t-1,className:"pagination-button",children:"Next"})]})},CERadioButtonGroup=({options:e,name:t,defaultValue:i,onChange:n,direction:s="horizontal"})=>{const[a,o]=React.useState(i||""),l=c=>{o(c),n(c)};return jsxRuntimeExports.jsx("div",{className:`radio-button-group ${s}`,role:"radiogroup","aria-labelledby":t,children:e.map(c=>jsxRuntimeExports.jsx("div",{className:"radio-button",children:jsxRuntimeExports.jsx(CERadioButton,{label:c.label,value:c.value,checked:a===c.value,onChange:l})},c.value))})},saveSelection=()=>{const e=window.getSelection();return e!=null&&e.rangeCount?e.getRangeAt(0):null},restoreSelection=e=>{if(e){const t=window.getSelection();t==null||t.removeAllRanges(),t==null||t.addRange(e)}},CERichTextEditor=({initialValue:e="",onChange:t,width:i="100%",height:n="auto",minHeight:s="200px",maxHeight:a="none",className:o="",style:l={},editorStyle:c={}})=>{const f=React.useRef(null),[u,x]=React.useState("3"),[d,y]=React.useState("Arial"),[m,p]=React.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1,subscript:!1,superscript:!1,justifyLeft:!0,justifyCenter:!1,justifyRight:!1,justifyFull:!1});React.useEffect(()=>{f.current&&e&&(f.current.innerHTML=e)},[e]);const E=React.useCallback(C=>{try{return document.queryCommandState(C)}catch{return!1}},[]),g=React.useCallback(()=>{p({bold:E("bold"),italic:E("italic"),underline:E("underline"),strikeThrough:E("strikethrough"),subscript:E("subscript"),superscript:E("superscript"),justifyLeft:E("justifyLeft"),justifyCenter:E("justifyCenter"),justifyRight:E("justifyRight"),justifyFull:E("justifyFull")})},[E]),S=React.useCallback((C,R="")=>{var P,j;const F=saveSelection(),L=document.getSelection();if(C==="createLink"){const B=prompt("Enter URL:");if(B){restoreSelection(F),document.execCommand("createLink",!1,B);const K=(P=L==null?void 0:L.anchorNode)==null?void 0:P.parentElement;K instanceof HTMLAnchorElement&&(K.target="_blank",K.rel="noopener noreferrer")}}else if(C==="insertImage"){const B=prompt("Enter image URL:");if(B){restoreSelection(F);const K=`<img src="${B}" alt="image" style="max-width: 100%; height: auto;"/>`;document.execCommand("insertHTML",!1,K)}}else C==="fontSize"||C==="fontName"?(restoreSelection(F),document.execCommand(C,!0,R),C==="fontSize"?x(R):y(R)):(restoreSelection(F),document.execCommand(C,!1,R));f.current&&(t==null||t(f.current.innerHTML)),(j=f.current)==null||j.focus(),g()},[t,g]),_=C=>{if(C.key==="Tab"&&(C.preventDefault(),document.execCommand("insertHTML",!1," ")),C.ctrlKey||C.metaKey)switch(C.key.toLowerCase()){case"z":C.preventDefault(),C.shiftKey?S("redo"):S("undo");break;case"y":C.preventDefault(),S("redo");break}},T=[{value:"1",label:"2"},{value:"2",label:"4"},{value:"3",label:"6"},{value:"4",label:"8"},{value:"5",label:"10"},{value:"6",label:"12"},{value:"7",label:"14"}],b=["Arial","Times New Roman","Courier New","Georgia","Verdana","Helvetica","Serif Fonts","Algerian"];return jsxRuntimeExports.jsxs("div",{className:`rich-text-editor ${o}`,style:{width:i,height:n,...l},children:[jsxRuntimeExports.jsxs("div",{className:"toolbar",children:[jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("bold"),className:`toolbar-button ${m.bold?"active":""}`,title:"Bold",children:jsxRuntimeExports.jsx("strong",{children:"B"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("italic"),className:`toolbar-button ${m.italic?"active":""}`,title:"Italic",children:jsxRuntimeExports.jsx("em",{children:"I"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("underline"),className:`toolbar-button ${m.underline?"active":""}`,title:"Underline",children:jsxRuntimeExports.jsx("u",{children:"U"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("strikeThrough"),className:`toolbar-button ${m.strikeThrough?"active":""}`,title:"Strike Through",children:jsxRuntimeExports.jsx("s",{children:"S"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("subscript"),className:`toolbar-button ${m.subscript?"active":""}`,title:"Subscript",children:"X₂"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("superscript"),className:`toolbar-button ${m.superscript?"active":""}`,title:"Superscript",children:"X²"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyLeft"),className:`toolbar-button ${m.justifyLeft?"active":""}`,title:"Align Left",children:"⇤"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyCenter"),className:`toolbar-button ${m.justifyCenter?"active":""}`,title:"Center",children:"⇔"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyRight"),className:`toolbar-button ${m.justifyRight?"active":""}`,title:"Align Right",children:"⇥"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyFull"),className:`toolbar-button ${m.justifyFull?"active":""}`,title:"Justify",children:"≡"})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>S("insertUnorderedList"),className:"toolbar-button",title:"Bullet List",children:"●"}),jsxRuntimeExports.jsx("button",{onClick:()=>S("insertOrderedList"),className:"toolbar-button",title:"Numbered List",children:"1. 2. 3."})]}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:u,onChange:C=>S("fontSize",C.target.value),className:"toolbar-select",title:"Font Size",children:T.map(C=>jsxRuntimeExports.jsx("option",{value:C.value,children:C.label},C.value))})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:d,onChange:C=>S("fontName",C.target.value),className:"toolbar-select",title:"Font Family",children:b.map(C=>jsxRuntimeExports.jsx("option",{value:C,children:C},C))})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>S("createLink"),className:"toolbar-button",title:"Insert Link",children:"🔗"}),jsxRuntimeExports.jsx("button",{onClick:()=>S("insertImage"),className:"toolbar-button",title:"Insert Image",children:"📷"})]}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>S("undo"),className:"toolbar-button",title:"Undo (Ctrl+Z)",children:"↩"}),jsxRuntimeExports.jsx("button",{onClick:()=>S("redo"),className:"toolbar-button",title:"Redo (Ctrl+Y)",children:"↪"})]})]}),jsxRuntimeExports.jsx("div",{ref:f,className:"editor-content",contentEditable:!0,style:{minHeight:s,maxHeight:a,height:n==="auto"?"auto":"100%",...c},onKeyDown:_,onKeyUp:g,onMouseUp:g,onInput:()=>{f.current&&(t==null||t(f.current.innerHTML)),g()}})]})},CETabView=({tabs:e,renderContent:t})=>{const[i,n]=React.useState(e[0]);return jsxRuntimeExports.jsxs("div",{className:"tabview-container",children:[jsxRuntimeExports.jsx("div",{className:"tabview-sidebar",children:e.map(s=>jsxRuntimeExports.jsx("div",{className:`tabview-tab ${i===s?"tabview-tab-active":""}`,onClick:()=>n(s),children:s},s))}),jsxRuntimeExports.jsx("div",{className:"tabview-content",children:t(i)})]})},CETemplate=({children:e,headerProps:t,showHeader:i=!0,showFooter:n=!0,containerClassName:s="",containerStyle:a={}})=>jsxRuntimeExports.jsxs("div",{className:`ce-wrapper ${s}`,style:a,children:[i&&jsxRuntimeExports.jsx(CEHeader,{...t}),jsxRuntimeExports.jsx("main",{className:"main-content",children:e}),n&&jsxRuntimeExports.jsx(CEFooter,{})]}),CETimePicker=({label:e="Select Time",onChange:t,initialTime:i="",className:n=""})=>{const[s,a]=React.useState(!1),[o,l]=React.useState(i),[c,f]=React.useState("12"),[u,x]=React.useState("00"),[d,y]=React.useState("AM"),[m,p]=React.useState(!1),[E,g]=React.useState(""),[S,_]=React.useState(""),T=React.useRef(null),b=Array.from({length:12},(X,M)=>String(M+1).padStart(2,"0")),C=Array.from({length:60},(X,M)=>String(M).padStart(2,"0")),R=(X,M)=>{if(!X)return"";const V=parseInt(X);return M==="hours"?V>12?"12":V===0?"01":X.padStart(2,"0"):V>59?"59":X.padStart(2,"0")},F=X=>{const M=X.target.value,V=X.target.selectionStart||0;let A=c,k=u,I=d,D=o;if(V<=2){const O=M.substring(0,2).replace(/[^0-9]/g,"");if(O){if(O.length===1){const z=parseInt(O);z>=2&&z<=9?(A=O.padStart(2,"0"),setTimeout(()=>{T.current&&T.current.setSelectionRange(3,5)},10)):(A=O,setTimeout(()=>{T.current&&T.current.setSelectionRange(1,1)},10))}else if(O.length===2){const z=parseInt(O);z>=1&&z<=12?(A=O,setTimeout(()=>{T.current&&T.current.setSelectionRange(3,5)},10)):(A=O[0],setTimeout(()=>{T.current&&T.current.setSelectionRange(1,1)},10))}D=`${A}:${u} ${d}`}}else if(V>=3&&V<=5){const O=M.indexOf(":")+1,z=M.substring(O,O+2).replace(/[^0-9]/g,"");if(z){if(z.length===1)k=z,D=`${c}:${k} ${d}`,setTimeout(()=>{T.current&&T.current.setSelectionRange(4,4)},10);else if(z.length===2){const U=parseInt(z);U>=0&&U<=59?(k=z,setTimeout(()=>{T.current&&T.current.setSelectionRange(6,8)},10)):(k=z[0],setTimeout(()=>{T.current&&T.current.setSelectionRange(4,4)},10))}D=`${c}:${k} ${d}`}}else if(V>=6){const z=M.substring(M.lastIndexOf(" ")+1).toUpperCase();z.startsWith("A")?(I="AM",D=`${c}:${u} AM`):z.startsWith("P")&&(I="PM",D=`${c}:${u} PM`)}f(A),x(k),y(I),l(D),a(!1),t==null||t(D)},L=X=>{if(!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","0","1","2","3","4","5","6","7","8","9",":","A","P","M"," ","a","p","m"].includes(X.key)){X.preventDefault();return}if(X.key==="Enter"||X.key===":"){X.preventDefault();const V=X.currentTarget.selectionStart||0;if(V<=2){if(E){const A=R(E,"hours");f(A),g(""),l(`${A}:${u} ${d}`)}X.currentTarget.setSelectionRange(3,5)}else if(V>=3&&V<=5){if(S){const A=R(S,"minutes");x(A),_(""),l(`${c}:${A} ${d}`)}X.currentTarget.setSelectionRange(6,8)}}},P=X=>{const M=X.currentTarget.selectionStart||0,V=T.current;V&&(M<=1?V.setSelectionRange(0,2):M>=3&&M<=4?V.setSelectionRange(3,5):M>=6&&V.setSelectionRange(6,8))},j=()=>{a(!0),p(!0)},B=(X,M)=>{const V=X==="hours"?M:c,A=X==="minutes"?M:u,k=X==="period"?M:d;f(V),x(A),y(k);const I=`${V}:${A} ${k}`;l(I),t==null||t(I)},K=()=>{const X=`${c}:${u} ${d}`;l(X),a(!1),t==null||t(X)},ee=()=>{l(""),f("12"),x("00"),y("AM"),a(!1),p(!1)};return jsxRuntimeExports.jsxs("div",{className:`time-picker-container ${n}`,children:[jsxRuntimeExports.jsxs("div",{className:`time-picker-input ${s||m?"active":""}`,children:[jsxRuntimeExports.jsx("input",{ref:T,type:"text",value:o,onChange:F,onKeyDown:L,onClick:X=>{o||j(),P(X)},onFocus:()=>p(!0),onBlur:()=>!s&&p(!1),placeholder:m||o?"hh:mm AM":"",className:"time-input",maxLength:8}),jsxRuntimeExports.jsx("label",{className:`floating-label ${s||m||o?"active":""}`,children:e}),jsxRuntimeExports.jsx("span",{className:"clock-icon",onClick:X=>{X.stopPropagation(),j()},children:jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("path",{d:"M12 6v6l4 2"})]})})]}),jsxRuntimeExports.jsxs("div",{className:`time-picker-popup ${s?"open":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"time-picker-sections",children:[jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Hours"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:b.map(X=>jsxRuntimeExports.jsx("div",{className:`time-item ${X===c?"selected":""}`,onClick:()=>B("hours",X),children:X},X))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Minutes"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:C.map(X=>jsxRuntimeExports.jsx("div",{className:`time-item ${X===u?"selected":""}`,onClick:()=>B("minutes",X),children:X},X))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section period",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Period"}),jsxRuntimeExports.jsx("div",{className:"period-list",children:["AM","PM"].map(X=>jsxRuntimeExports.jsx("div",{className:`period-item ${X===d?"selected":""}`,onClick:()=>B("period",X),children:X},X))})]})]}),jsxRuntimeExports.jsxs("div",{className:"time-picker-actions",children:[jsxRuntimeExports.jsx("button",{className:"time-picker-button cancel",onClick:ee,children:"Cancel"}),jsxRuntimeExports.jsx("button",{className:"time-picker-button ok",onClick:K,children:"OK"})]})]})]})},TransferItem=({label:e,checked:t,onChange:i,disabled:n})=>jsxRuntimeExports.jsx(CECheckBox,{label:e,checked:t,onChange:i,disabled:n}),CETransferButton=({label:e,onClick:t,disabled:i=!1,className:n=""})=>jsxRuntimeExports.jsx("button",{onClick:t,disabled:i,className:`transfer-button ${n}`,children:e}),TransferList=({dataUrl:e,onTransfer:t,containerClass:i="",boxClass:n="",buttonClass:s=""})=>{const[a,o]=React.useState([]),[l,c]=React.useState([]),[f,u]=React.useState(!0),[x,d]=React.useState(null),[y,m]=React.useState(new Set),[p,E]=React.useState(new Set);React.useEffect(()=>{(async()=>{var C,R;try{u(!0),d(null);const L=(await axios.get(e)).data.items||[];o(L.slice(0,Math.ceil(L.length/2))),c(L.slice(Math.ceil(L.length/2)))}catch(F){d(axios.isAxiosError(F)?((R=(C=F.response)==null?void 0:C.data)==null?void 0:R.message)||F.message:"An error occurred")}finally{u(!1)}})()},[]);const g=b=>{if(b==="available"){const C=a.filter(F=>y.has(F.id)).sort((F,L)=>{const P=parseInt(F.id.replace(/\D/g,"")),j=parseInt(L.id.replace(/\D/g,""));return P-j}),R=a.filter(F=>!y.has(F.id));o(R),c(F=>[...F,...C].sort((P,j)=>{const B=parseInt(P.id.replace(/\D/g,"")),K=parseInt(j.id.replace(/\D/g,""));return B-K})),m(new Set)}else{const C=l.filter(F=>p.has(F.id)).sort((F,L)=>{const P=parseInt(F.id.replace(/\D/g,"")),j=parseInt(L.id.replace(/\D/g,""));return P-j}),R=l.filter(F=>!p.has(F.id));c(R),o(F=>[...F,...C].sort((P,j)=>{const B=parseInt(P.id.replace(/\D/g,"")),K=parseInt(j.id.replace(/\D/g,""));return B-K})),E(new Set)}t(l,a)},S=(b,C,R)=>{R(F=>{const L=new Set(F);return L.has(b)?L.delete(b):L.add(b),L})},_=(b,C,R)=>F=>{const L=new Set(C),P=b.filter(j=>!j.disabled);F?P.forEach(j=>L.add(j.id)):P.forEach(j=>L.delete(j.id)),R(L)},T=(b,C,R,F)=>{const L=b.filter(ee=>!ee.disabled),P=L.length>0&&L.every(ee=>C.has(ee.id)),j=C.size,B=b.length,K=b.length===0;return jsxRuntimeExports.jsxs("div",{className:`transfer-box ${n}`,children:[jsxRuntimeExports.jsx("div",{className:"transfer-box-header",children:jsxRuntimeExports.jsxs("div",{className:"header-content",children:[jsxRuntimeExports.jsx("div",{className:"checkbox-wrapper",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:P,onChange:_(b,C,R),disabled:K})}),jsxRuntimeExports.jsxs("div",{className:"title-section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:F}),jsxRuntimeExports.jsxs("div",{className:"count-text",children:[j,"/",B," selected"]})]})]})}),jsxRuntimeExports.jsx("div",{className:"transfer-items",children:b.map(ee=>jsxRuntimeExports.jsx(TransferItem,{label:ee.label,checked:C.has(ee.id),disabled:ee.disabled,onChange:()=>S(ee.id,C,R)},ee.id))})]})};return f?jsxRuntimeExports.jsx("div",{children:"Loading..."}):x?jsxRuntimeExports.jsxs("div",{children:["Error: ",x]}):jsxRuntimeExports.jsxs("div",{className:`transfer-list-container ${i}`,children:[T(a,y,m,"Choices"),jsxRuntimeExports.jsxs("div",{className:"transfer-buttons",children:[jsxRuntimeExports.jsx(CETransferButton,{label:">>",onClick:()=>g("available"),disabled:y.size===0,className:s}),jsxRuntimeExports.jsx(CETransferButton,{label:"<<",onClick:()=>g("chosen"),disabled:p.size===0,className:s})]}),T(l,p,E,"Chosen")]})},CEBadge=({label:e,backgroundColor:t="#e0e0e0",textColor:i="#000",style:n})=>jsxRuntimeExports.jsx("span",{style:{backgroundColor:t,color:i,padding:"4px 10px",borderRadius:"12px",fontSize:"12px",display:"inline-block",whiteSpace:"nowrap",...n},children:e}),chatIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%202.5H4C2.9%202.5%202.01%203.4%202.01%204.5L2%2022.5L6%2018.5H20C21.1%2018.5%2022%2017.6%2022%2016.5V4.5C22%203.4%2021.1%202.5%2020%202.5ZM7%209.5H17C17.55%209.5%2018%209.95%2018%2010.5C18%2011.05%2017.55%2011.5%2017%2011.5H7C6.45%2011.5%206%2011.05%206%2010.5C6%209.95%206.45%209.5%207%209.5ZM13%2014.5H7C6.45%2014.5%206%2014.05%206%2013.5C6%2012.95%206.45%2012.5%207%2012.5H13C13.55%2012.5%2014%2012.95%2014%2013.5C14%2014.05%2013.55%2014.5%2013%2014.5ZM17%208.5H7C6.45%208.5%206%208.05%206%207.5C6%206.95%206.45%206.5%207%206.5H17C17.55%206.5%2018%206.95%2018%207.5C18%208.05%2017.55%208.5%2017%208.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",CEChatbox=({notes:e,onAddNote:t,buttonLabel:i,buttonIcon:n})=>{const[s,a]=React.useState(""),o=()=>{t(s),a("")},l=c=>{c.key==="Enter"&&o()};return jsxRuntimeExports.jsxs("div",{className:"notes-container",children:[jsxRuntimeExports.jsxs("div",{className:"notes-header",children:[jsxRuntimeExports.jsx("img",{src:chatIcon,alt:"Chat Icon",className:"notes-icon"}),jsxRuntimeExports.jsx("span",{className:"notes-title",children:"Notes"})]}),jsxRuntimeExports.jsxs("div",{className:"add-note-section",children:[jsxRuntimeExports.jsx("textarea",{value:s,onChange:c=>a(c.target.value),onKeyPress:l,placeholder:"Add a note...",className:"add-note-input",rows:3}),jsxRuntimeExports.jsx(CEButton,{label:i,icon:n,variant:"outlinedGreen",onClick:o,sx:{width:"100%",marginTop:"10px"},children:void 0})]}),jsxRuntimeExports.jsx("div",{className:"notes-list",children:e.map(c=>jsxRuntimeExports.jsxs("div",{className:"note-item",children:[jsxRuntimeExports.jsx("div",{className:"note-avatar",children:c.initials}),jsxRuntimeExports.jsxs("div",{className:"note-content",children:[jsxRuntimeExports.jsxs("div",{className:"note-header",children:[jsxRuntimeExports.jsx("span",{className:"note-author",children:c.author}),jsxRuntimeExports.jsx("span",{className:"note-timestamp",children:c.timestamp})]}),jsxRuntimeExports.jsx("div",{className:"note-text",children:c.content})]})]},c.id))})]})},CEStatusDropdown=({options:e,selected:t,onChange:i,placeholder:n="Select status...",size:s="medium",disabled:a=!1,ariaLabel:o="Status selection dropdown"})=>{const[l,c]=React.useState(!1),f=React.useRef(null),u=e.find(p=>p.value===t),x=p=>{i(p),c(!1)};React.useEffect(()=>{const p=E=>{var g;(g=f.current)!=null&&g.contains(E.target)||c(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const d=p=>{a||(p.key==="Enter"||p.key===" "?(p.preventDefault(),c(!l)):p.key==="Escape"&&c(!1))},y=p=>{if(p!=null&&p.statusType)switch(p.statusType){case"in-progress":return"in-progress";case"declined":return"declined";case"withdrawn":return"withdrawn";default:return""}return""},m=()=>{if(u){const p={};return u.backgroundColor&&(p.backgroundColor=u.backgroundColor),u.textColor&&(p.color=u.textColor),p}return{}};return jsxRuntimeExports.jsxs("div",{className:`status-dropdown-container ${a?"disabled":""} size-${s}`,ref:f,children:[jsxRuntimeExports.jsxs("div",{className:`status-dropdown-trigger ${l?"open":""} ${u?`has-selection ${y(u)}`:""}`,onClick:()=>!a&&c(!l),onKeyDown:d,tabIndex:a?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":l?"true":"false","aria-label":o,style:m(),children:[jsxRuntimeExports.jsx("span",{className:"status-text",children:u?u.label:n}),jsxRuntimeExports.jsx("span",{className:"status-dropdown-icon",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-arrow ${l?"rotate":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"currentColor",fillOpacity:"0.7"})})})]}),l&&!a&&jsxRuntimeExports.jsx("ul",{className:"status-dropdown-options",role:"listbox","aria-label":"Status options",children:e.map(p=>{const E={};return p.backgroundColor&&(E.backgroundColor=p.backgroundColor),p.textColor&&(E.color=p.textColor),jsxRuntimeExports.jsxs("li",{className:`status-dropdown-option ${t===p.value?"selected":""} ${y(p)}`,onClick:()=>x(p.value),role:"option","aria-selected":t===p.value?"true":"false",style:E,children:[jsxRuntimeExports.jsx("span",{className:"option-indicator",children:p.icon?p.icon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[p.statusType==="declined"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ff4757"}),jsxRuntimeExports.jsx("path",{d:"M15 9l-6 6m0-6l6 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),p.statusType==="withdrawn"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ffa502"}),jsxRuntimeExports.jsx("path",{d:"M12 8v4M12 16h.01",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),p.statusType==="in-progress"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#5f27cd"}),jsxRuntimeExports.jsx("path",{d:"M8 12l2 2 4-4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}),p.label]},p.value)})})]})};exports.CEAutoSuggestInput=CEAutoSuggestInput;exports.CEAvatarMenu=CEAvatarMenu;exports.CEBadge=CEBadge;exports.CEBreadcrumbs=Breadcrumbs;exports.CEButton=CEButton;exports.CEChatbox=CEChatbox;exports.CECheckbox=CECheckBox;exports.CEChipInput=CEChipInput;exports.CEDataGridDynamicTable=CEDataGridDynamicTable;exports.CEDatePicker=CEDatePicker;exports.CEDateRangePicker=CEDateRangePicker;exports.CEDialogBox=CEDialogBox;exports.CEDrawer=CEDrawer;exports.CEDynamicSearchField=CEDynamicSearchField;exports.CEDynamicSelectField=CEDynamicSelectField;exports.CEDynamicTextField=CEDynamicTextField;exports.CEFieldsInput=FieldsInput;exports.CEFileUpload=CEFileUpload;exports.CEFileUploadDocument=CEFileUploadDocument;exports.CEFooter=CEFooter;exports.CEGridLayout=CEGridLayout;exports.CEGridMenuButton=CEGridMenuButton;exports.CEHamburgerButton=CEHamburgerButton;exports.CEHeader=CEHeader;exports.CEInputBox=CEInputBox;exports.CEInputDropDown=InputDropDown;exports.CELinearProgressBar=CELinearProgressBar;exports.CELogo=CELogo;exports.CEMenuBar=CEMenuBar;exports.CEMessageModal=CEMessageModal;exports.CEModalPopUp=CECustomModal;exports.CENotificationButton=CENotificationButton;exports.CEPagination=CEPagination;exports.CERadioButton=CERadioButton;exports.CERadioGroup=CERadioButtonGroup;exports.CERichTextEditor=CERichTextEditor;exports.CESearchBar=CESearchBar;exports.CESearchButton=CESearchButton;exports.CESkeletonTable=CESkeletonTable;exports.CESnackBar=CESnackBar;exports.CEStatusDropdown=CEStatusDropdown;exports.CEStepper=CEStepper;exports.CETabView=CETabView;exports.CETemplate=CETemplate;exports.CETimePicker=CETimePicker;exports.CETransferButton=CETransferButton;exports.CETruncatedTextWithTooltip=CETruncatedTextWithTooltip;exports.CEUploadModalWrapper=CEUploadModalWrapper;exports.CEUserInfo=CEUserInfo;exports.CeBox=CeBox;exports.TransferList=TransferList;
|
|
341
|
+
`;var i=sheet_to_csv(e,t);return i}function sheet_to_formulae(e){var t="",i,n="";if(e==null||e["!ref"]==null)return[];var s=safe_decode_range(e["!ref"]),a="",o=[],l,c=[],f=Array.isArray(e);for(l=s.s.c;l<=s.e.c;++l)o[l]=encode_col(l);for(var u=s.s.r;u<=s.e.r;++u)for(a=encode_row(u),l=s.s.c;l<=s.e.c;++l)if(t=o[l]+a,i=f?(e[u]||[])[l]:e[t],n="",i!==void 0){if(i.F!=null){if(t=i.F,!i.f)continue;n=i.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(i.f!=null)n=i.f;else{if(i.t=="z")continue;if(i.t=="n"&&i.v!=null)n=""+i.v;else if(i.t=="b")n=i.v?"TRUE":"FALSE";else if(i.w!==void 0)n="'"+i.w;else{if(i.v===void 0)continue;i.t=="s"?n="'"+i.v:n=""+i.v}}c[c.length]=t+"="+n}return c}function sheet_add_json(e,t,i){var n=i||{},s=+!n.skipHeader,a=e||{},o=0,l=0;if(a&&n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var c=typeof n.origin=="string"?decode_cell(n.origin):n.origin;o=c.r,l=c.c}var f,u={s:{c:0,r:0},e:{c:l,r:o+t.length-1+s}};if(a["!ref"]){var x=safe_decode_range(a["!ref"]);u.e.c=Math.max(u.e.c,x.e.c),u.e.r=Math.max(u.e.r,x.e.r),o==-1&&(o=x.e.r+1,u.e.r=o+t.length-1+s)}else o==-1&&(o=0,u.e.r=t.length-1+s);var d=n.header||[],y=0;t.forEach(function(p,E){keys(p).forEach(function(g){(y=d.indexOf(g))==-1&&(d[y=d.length]=g);var S=p[g],_="z",T="",b=encode_cell({c:l+y,r:o+E+s});f=ws_get_cell_stub(a,b),S&&typeof S=="object"&&!(S instanceof Date)?a[b]=S:(typeof S=="number"?_="n":typeof S=="boolean"?_="b":typeof S=="string"?_="s":S instanceof Date?(_="d",n.cellDates||(_="n",S=datenum(S)),T=n.dateNF||table_fmt[14]):S===null&&n.nullError&&(_="e",S=0),f?(f.t=_,f.v=S,delete f.w,delete f.R,T&&(f.z=T)):a[b]=f={t:_,v:S},T&&(f.z=T))})}),u.e.c=Math.max(u.e.c,l+d.length-1);var m=encode_row(o);if(s)for(y=0;y<d.length;++y)a[encode_col(y+l)+m]={t:"s",v:d[y]};return a["!ref"]=encode_range(u),a}function json_to_sheet(e,t){return sheet_add_json(null,e,t)}function ws_get_cell_stub(e,t,i){if(typeof t=="string"){if(Array.isArray(e)){var n=decode_cell(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?ws_get_cell_stub(e,encode_cell(t)):ws_get_cell_stub(e,encode_cell({r:t,c:i||0}))}function wb_sheet_idx(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var i=e.SheetNames.indexOf(t);if(i>-1)return i;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function book_new(){return{SheetNames:[],Sheets:{}}}function book_append_sheet(e,t,i,n){var s=1;if(!i)for(;s<=65535&&e.SheetNames.indexOf(i="Sheet"+s)!=-1;++s,i=void 0);if(!i||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(i)>=0){var a=i.match(/(^.*?)(\d+)$/);s=a&&+a[2]||0;var o=a&&a[1]||i;for(++s;s<=65535&&e.SheetNames.indexOf(i=o+s)!=-1;++s);}if(check_ws_name(i),e.SheetNames.indexOf(i)>=0)throw new Error("Worksheet with name |"+i+"| already exists!");return e.SheetNames.push(i),e.Sheets[i]=t,i}function book_set_sheet_visibility(e,t,i){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=wb_sheet_idx(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),i){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+i)}e.Workbook.Sheets[n].Hidden=i}function cell_set_number_format(e,t){return e.z=t,e}function cell_set_hyperlink(e,t,i){return t?(e.l={Target:t},i&&(e.l.Tooltip=i)):delete e.l,e}function cell_set_internal_link(e,t,i){return cell_set_hyperlink(e,"#"+t,i)}function cell_add_comment(e,t,i){e.c||(e.c=[]),e.c.push({t,a:i||"SheetJS"})}function sheet_set_array_formula(e,t,i,n){for(var s=typeof t!="string"?t:safe_decode_range(t),a=typeof t=="string"?t:encode_range(t),o=s.s.r;o<=s.e.r;++o)for(var l=s.s.c;l<=s.e.c;++l){var c=ws_get_cell_stub(e,o,l);c.t="n",c.F=a,delete c.v,o==s.s.r&&l==s.s.c&&(c.f=i,n&&(c.D=!0))}return e}var utils={encode_col,encode_row,encode_cell,encode_range,decode_col,decode_row,split_cell,decode_cell,decode_range,format_cell,sheet_add_aoa,sheet_add_json,sheet_add_dom,aoa_to_sheet,json_to_sheet,table_to_sheet:parse_dom_table,table_to_book,sheet_to_csv,sheet_to_txt,sheet_to_json,sheet_to_html,sheet_to_formulae,sheet_to_row_object_array:sheet_to_json,sheet_get_cell:ws_get_cell_stub,book_new,book_append_sheet,book_set_sheet_visibility,cell_set_number_format,cell_set_hyperlink,cell_set_internal_link,cell_add_comment,sheet_set_array_formula,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const ExportIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.59%209.5H15V4.5C15%203.95%2014.55%203.5%2014%203.5H10C9.45%203.5%209%203.95%209%204.5V9.5H7.41C6.52%209.5%206.07%2010.58%206.7%2011.21L11.29%2015.8C11.68%2016.19%2012.31%2016.19%2012.7%2015.8L17.29%2011.21C17.92%2010.58%2017.48%209.5%2016.59%209.5ZM5%2019.5C5%2020.05%205.45%2020.5%206%2020.5H18C18.55%2020.5%2019%2020.05%2019%2019.5C19%2018.95%2018.55%2018.5%2018%2018.5H6C5.45%2018.5%205%2018.95%205%2019.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FileOpenRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202.5H10.83C10.3%202.5%209.79%202.71%209.41%203.09L4.59%207.91C4.21%208.29%204%208.8%204%209.33V20.5C4%2021.6%204.9%2022.5%206%2022.5H18C19.1%2022.5%2020%2021.6%2020%2020.5V4.5C20%203.4%2019.1%202.5%2018%202.5ZM11.65%2017.15L8.86%2014.36C8.54%2014.04%208.76%2013.5%209.21%2013.5H11V10.51C11%209.96%2011.44%209.52%2011.99%209.51C12.55%209.5%2013%209.95%2013%2010.51V13.5H14.79C15.24%2013.5%2015.46%2014.04%2015.14%2014.35L12.35%2017.14C12.16%2017.34%2011.84%2017.34%2011.65%2017.15Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ReloadIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.6498%206.84999C16.0198%205.21999%2013.7098%204.27999%2011.1698%204.53999C7.49978%204.90999%204.47978%207.88999%204.06978%2011.56C3.51978%2016.41%207.26978%2020.5%2011.9998%2020.5C15.1898%2020.5%2017.9298%2018.63%2019.2098%2015.94C19.5298%2015.27%2019.0498%2014.5%2018.3098%2014.5C17.9398%2014.5%2017.5898%2014.7%2017.4298%2015.03C16.2998%2017.46%2013.5898%2019%2010.6298%2018.34C8.40978%2017.85%206.61978%2016.04%206.14978%2013.82C5.30978%209.93999%208.25978%206.49999%2011.9998%206.49999C13.6598%206.49999%2015.1398%207.18999%2016.2198%208.27999L14.7098%209.78999C14.0798%2010.42%2014.5198%2011.5%2015.4098%2011.5H18.9998C19.5498%2011.5%2019.9998%2011.05%2019.9998%2010.5V6.90999C19.9998%206.01999%2018.9198%205.56999%2018.2898%206.19999L17.6498%206.84999Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FilterAltOffRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.7901%206.11003C20.3001%205.45003%2019.8301%204.50003%2019.0001%204.50003H6.83008L14.8001%2012.47L19.7901%206.11003Z'%20fill='black'%20fill-opacity='0.54'/%3e%3cpath%20d='M20.4901%2020.99L3.51012%204.01003C3.12012%203.62003%202.49012%203.62003%202.10012%204.01003C1.71012%204.40003%201.71012%205.03003%202.10012%205.42003L10.0001%2013.5V18.5C10.0001%2019.6%2010.9001%2020.5%2012.0001%2020.5C13.1001%2020.5%2014.0001%2019.6%2014.0001%2018.5V17.33L19.0701%2022.4C19.4601%2022.79%2020.0901%2022.79%2020.4801%2022.4C20.8701%2022.01%2020.8801%2021.38%2020.4901%2020.99Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",CESkeletonTable=({columns:e,rows:t})=>jsxRuntimeExports.jsx("div",{className:"skeleton-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((i,n)=>jsxRuntimeExports.jsx("th",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-header"})},n))})}),jsxRuntimeExports.jsx("tbody",{children:Array.from({length:t}).map((i,n)=>jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((s,a)=>jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-cell"})},a))},n))})]})}),CERadioButton=({label:e,value:t,checked:i,onChange:n})=>jsxRuntimeExports.jsxs("label",{className:"radio-button",style:{margin:"0.5rem 0"},children:[jsxRuntimeExports.jsx("input",{type:"radio",value:t,checked:i,onChange:()=>n(t),style:{marginRight:e?"0.5rem":0}}),e&&jsxRuntimeExports.jsx("span",{children:e})]}),getColumnValue=e=>{if(e==null)return"";if(React.isValidElement(e)){const t=e;return t.props["data-value"]||t.props["data-sort"]||""}return typeof e=="string"||typeof e=="number"?e:String(e)},stripReactElements=e=>{if(Array.isArray(e))return e.map(stripReactElements);if(e&&typeof e=="object"&&!React.isValidElement(e)){const t={};for(const i in e)React.isValidElement(e[i])||(t[i]=stripReactElements(e[i]));return t}return e},PaginationControls=({currentPage:e,totalPages:t,setCurrentPage:i})=>{const a=Math.floor(e/5)*5,o=Math.min(a+5,t),l=()=>{i(Math.max(0,a-1))},c=()=>{i(Math.min(t-1,o))},f=[];for(let u=a;u<o;u++)f.push(jsxRuntimeExports.jsx("button",{className:`pagination-page${e===u?" active":""}`,onClick:()=>i(u),disabled:e===u,children:u+1},u));return jsxRuntimeExports.jsxs("div",{className:"pagination-controls",children:[jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(0),disabled:e===0,children:"First"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(e-1),disabled:e===0,children:"Previous"}),a>0&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:l,children:"..."}),f,o<t&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:c,children:"..."}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(e+1),disabled:e===t-1,children:"Next"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>i(t-1),disabled:e===t-1,children:"Last"})]})},RowsPerPageSelector=({rowsPerPage:e,setRowsPerPage:t,setCurrentPage:i,pageSizeOptions:n})=>jsxRuntimeExports.jsxs("div",{className:"rows-per-page-container",children:[jsxRuntimeExports.jsx("label",{htmlFor:"rows-per-page-select",children:"Rows per page:"}),jsxRuntimeExports.jsx("select",{id:"rows-per-page-select",value:e,onChange:s=>{t(Number(s.target.value)),i(0)},style:{marginLeft:"8px"},children:n.map(s=>jsxRuntimeExports.jsx("option",{value:s,children:s},s))})]}),EntriesInfo=({dataLength:e,currentPage:t,rowsPerPage:i})=>jsxRuntimeExports.jsx("div",{className:"entries-info",children:e>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Showing ",e===0?0:t*i+1," to"," ",Math.min((t+1)*i,e)," of ",e," ","entries"]})}),CEDataGridDynamicTable=({title:e,jsonData:t,columnList:i,ischeckBoxInGrid:n,isRadioButtonInGrid:s,onRadioChange:a,getSelectedRadioValue:o,renderRadioInColumnId:l,isSearchBoxInGrid:c,isAddButtonRequired:f,isEditButtonRequired:u,isDeleteButtonRequired:x,isApproveButtonRequired:d,isReassignButtonRequired:y,isCancelButtonRequired:m,isExportToExcelRequired:p,isExportAllToExcel:E,handleEditClick:g,handleAddClick:S,handleDeleteClick:_,handleApproveClick:T,handleReassignClick:b,handleCancelClick:C,noOfPagesPerPage:R,clickableColumns:F,conditionalClickableColumns:L,handleCellClick:P,onReload:j,showDownloadIcon:B=!0,showRefreshIcon:K=!0,showFullViewIcon:ee=!0,showSearchIcon:X=!0,showColumnVisibilityIcon:M=!0,showSortIcon:V=!0,showFilterIcon:A=!0,defaultSortConfig:k,onDataUpdate:I,isOverrideCSS:D,showPagination:O=!0,shouldResetSearchOnDataChange:z,pageSizeOptions:U=[10,20,50,100]})=>{const[W,Z]=React.useState({}),[se,ce]=React.useState(!1),[ue,le]=React.useState([]),[ve,Q]=React.useState([]),[Te,he]=React.useState([]),[Me,ke]=React.useState(!1),[xe,Ie]=React.useState(new Set),[De,Fe]=React.useState(null),[Ne,Ce]=React.useState(!1),[Ye,Le]=React.useState(""),[We,Ge]=React.useState("contains"),[Ke,Ue]=React.useState(""),[Be,Xe]=React.useState({}),[Ze,qe]=React.useState(0),[et,nt]=React.useState(R??10),[pt,vt]=React.useState(new Set),[st,at]=React.useState(""),[ht,dt]=React.useState(!1),[Je,mt]=React.useState(new Set),[ot,wt]=React.useState([]),[ut,St]=React.useState(null),Pe=React.useRef(null),it=React.useRef(null),xt=React.useRef(null),[_t,Rt]=React.useState(new Set),[Qe,Pt]=React.useState([]),[At,kt]=React.useState(!1),[N,q]=React.useState(null),H=React.useRef([]),[G,Y]=React.useState(!1),J=()=>Y(!0),ie=()=>Y(!1),[pe,re]=React.useState(!0);React.useEffect(()=>{if(t&&Array.isArray(t)){const te=stripReactElements(H.current),oe=stripReactElements(t),de=JSON.stringify(te)!==JSON.stringify(oe);if(t&&Array.isArray(t)&&de){let fe=[...t];if(k){const{column:ye,direction:be}=k;fe.sort((Se,Re)=>{const je=Se[ye],$e=Re[ye],Oe=new Date(je),He=new Date($e),rt=!isNaN(Oe.getTime()),gt=!isNaN(He.getTime());if(rt&>)return be==="asc"?Oe.getTime()-He.getTime():He.getTime()-Oe.getTime();const It=String(je||"").toLowerCase(),$t=String($e||"").toLowerCase();return It.localeCompare($t)}),be==="desc"&&fe.reverse(),q(k)}if(le(fe),Q(fe),re(!1),z?(at(""),Xe({})):Ee(),l){const ye={},be=Array.isArray(l)?l:[l];fe.forEach((Se,Re)=>{const je=Se.id??`__row_${Re}`;for(const $e of be)if(Se[$e]===!0){ye[je]={columnId:$e,rowData:Se};break}}),ae(ye)}H.current=t}}else re(!0)},[t,k,l]),React.useEffect(()=>{if(ue.length>0){const te=(i??[]).map(fe=>({id:fe.id,label:fe.label??fe.id,tooltip:fe.tooltip,shouldDisplay:fe.shouldDisplay??!0,shouldVisible:fe.shouldVisible??!0})),oe=Object.keys(ue[0]||{}).map(fe=>({id:fe,label:fe.charAt(0).toUpperCase()+fe.slice(1),shouldDisplay:!0,shouldVisible:!0})),de=te.length>0?te:oe;if(Pt(de),!At){const fe=de.filter(be=>be.shouldDisplay!==!1).map(be=>be.id),ye=de.filter(be=>be.shouldVisible!==!1).map(be=>be.id);mt(new Set(fe)),wt(ye),kt(!0)}}},[ue,i]);const[ne,ae]=React.useState({}),me=({rowIndex:te,columnId:oe,rowData:de})=>{const fe=Array.isArray(l)?l:[l],ye={...de,...Object.fromEntries(fe.map(Re=>[Re,Re===oe]))},be=de.id??`__row_${te}`;ae(Re=>({...Re,[be]:{columnId:oe,rowData:ye}}));const Se=ue.map((Re,je)=>(Re.id??`__row_${je}`)===be?{...Re,...Object.fromEntries(fe.map(Oe=>[Oe,Oe===oe]))}:Re);le(Se),Q(Se),I&&I({fullData:Se,updatedRow:ye})},_e=te=>{var fe;const oe=ue.findIndex(ye=>ye===te),de=te.id??`__row_${oe}`;return((fe=ne[de])==null?void 0:fe.columnId)||""},we=React.useMemo(()=>{const te=Ze*et,oe=te+et;return ue.slice(te,oe)},[ue,Ze,et]),ge=()=>{at(""),Ee()},Ee=()=>{let te=[...ve];st.trim()&&(te=te.filter(oe=>Object.entries(oe).some(([de,fe])=>Je.has(de)?String(fe).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(Be).forEach(([oe,de])=>{const{value:fe,operator:ye}=de;te=te.filter(be=>{const Se=String(be[oe]||"").toLowerCase(),Re=fe.toLowerCase();switch(ye){case"contains":return Se.includes(Re);case"equals":return Se===Re;case"startsWith":return Se.startsWith(Re);case"endsWith":return Se.endsWith(Re);case"does not contain":return!Se.includes(Re);case"does not equal":return Se!==Re;case"is any of":return fe.split(",").map(je=>je.trim().toLowerCase()).includes(Se);default:return!0}})}),le(te),qe(0)},Ae=te=>{const oe=new Set(Je);oe.has(te)?oe.size>1&&oe.delete(te):oe.add(te),mt(oe)},Ve=(te,oe=null)=>{const de=oe?`${te}-${oe}`:`${te}`,fe=new Set(pt);fe.has(de)?fe.delete(de):(Array.from(fe).forEach(ye=>{ye.startsWith(`${te}`)&&fe.delete(ye)}),fe.add(de)),vt(fe)},ze=te=>{Fe(De===te?null:te)};React.useEffect(()=>{const te=oe=>{if(De&&!oe.target)return;const de=oe.target;!de.closest(".dropdown-menu")&&!de.closest(".dropdown-trigger")&&Fe(null)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[De]);const tt=te=>{if(ve.length===0)return;let oe="asc";N&&N.column===te&&(oe=N.direction==="asc"?"desc":"asc");const de=[...ve].sort((ye,be)=>{const Se=getColumnValue(ye[te]),Re=getColumnValue(be[te]);if(Se==null)return 1;if(Re==null)return-1;const je=String(Se).toLowerCase(),$e=String(Re).toLowerCase();return!isNaN(Number(Se))&&!isNaN(Number(Re))?oe==="asc"?Number(Se)-Number(Re):Number(Re)-Number(Se):oe==="asc"?je.localeCompare($e):$e.localeCompare(je)});q({column:te,direction:oe}),Q(de);let fe=[...de];Object.entries(Be).forEach(([ye,be])=>{const{value:Se,operator:Re}=be,je=Se.toLowerCase();fe=fe.filter($e=>{const Oe=String($e[ye]||"").toLowerCase();switch(Re){case"contains":return Oe.includes(je);case"equals":return Oe===je;case"startsWith":return Oe.startsWith(je);case"endsWith":return Oe.endsWith(je);default:return!0}})}),st.trim()&&(fe=fe.filter(ye=>Object.entries(ye).some(([be,Se])=>Je.has(be)?String(Se).toLowerCase().includes(st.toLowerCase()):!1))),le(fe),qe(0)},yt=()=>{Ye&&Ke.trim()!==""&&ft(Ye,Ke,We),Ce(!1),Ue(""),Le(""),qe(0)},ft=(te,oe,de)=>{if(te){const fe={...Be};if(oe===""&&(de==="contains"||de==="equals")){Le(te),Ge(de||We),Ue(""),Ce(!0);return}else oe&&oe.trim()!==""?fe[te]={value:oe,operator:de||We}:delete fe[te];Xe(fe);let ye=[...ve];Object.entries(fe).forEach(([be,Se])=>{const{value:Re,operator:je}=Se;ye=ye.filter($e=>{const Oe=String($e[be]||"").toLowerCase(),He=Re.toLowerCase();switch(je){case"contains":return Oe.includes(He);case"equals":return Oe===He;case"startsWith":return Oe.startsWith(He);case"endsWith":return Oe.endsWith(He);case"does not contain":return!Oe.includes(He);case"does not equal":return Oe!==He;case"is any of":return Re.split(",").map(rt=>rt.trim().toLowerCase()).includes(Oe);default:return!0}})}),le(ye),he(ye),qe(0),Ce(!1)}},Et=te=>{te.key==="Enter"&&ft()};useEscapeKey(()=>{Fe(null),Ce(!1)});const lt=(te,oe="")=>{const de=fe=>{const ye=new Set(_t);ye.has(fe)?ye.delete(fe):ye.add(fe),Rt(ye)};if(Array.isArray(te)){const fe=Array.from(new Set(te.reduce((ye,be)=>typeof be=="object"&&be!==null?[...ye,...Object.keys(be)]:ye,[])));return jsxRuntimeExports.jsx("div",{className:"expanded-section",children:jsxRuntimeExports.jsx("div",{className:"nested-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:fe.map(ye=>jsxRuntimeExports.jsx("th",{children:ye.charAt(0).toUpperCase()+ye.slice(1)},ye))})}),jsxRuntimeExports.jsx("tbody",{children:te.map((ye,be)=>jsxRuntimeExports.jsx("tr",{children:fe.map(Se=>jsxRuntimeExports.jsx("td",{children:typeof ye[Se]=="object"&&ye[Se]!==null?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>de(`${oe}-${be}-${Se}`),children:_t.has(`${oe}-${be}-${Se}`)?"▼":"▶"}),_t.has(`${oe}-${be}-${Se}`)&<(ye[Se],`${oe}-${be}-${Se}`)]}):String(ye[Se]||"")},`${oe}-${be}-${Se}`))},`${oe}-${be}`))})]})})})}else if(typeof te=="object"&&te!==null)return jsxRuntimeExports.jsx("div",{className:"nested-object",children:jsxRuntimeExports.jsxs("table",{className:"custom-table nested",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Property"}),jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Value"})]})}),jsxRuntimeExports.jsx("tbody",{children:Object.entries(te).map(([fe,ye])=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:"table-cell",children:jsxRuntimeExports.jsx("strong",{children:fe})}),jsxRuntimeExports.jsx("td",{className:"table-cell",children:typeof ye=="object"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>de(`${oe}-${fe}`),children:_t.has(`${oe}-${fe}`)?"▼":"▶"}),_t.has(`${oe}-${fe}`)&<(ye,`${oe}-${fe}`)]}):String(ye)})]},`${oe}-${fe}`))})]})});return jsxRuntimeExports.jsx("span",{children:String(te)})},Tt=te=>{var oe;if(te){const de=(oe=te.parentElement)==null?void 0:oe.querySelector(".dropdown-trigger");if(!de)return;const fe=de.getBoundingClientRect(),ye=window.innerHeight,be=window.innerWidth,Se=te.offsetHeight,Re=te.offsetWidth,je=fe.bottom+Se>ye,$e=fe.left+Re>be,Oe=fe.left-Re<0;let He,rt;je?(He=fe.top-Se,te.classList.add("adjust-top")):(He=fe.bottom,te.classList.remove("adjust-top")),$e?(rt=fe.right-Re,te.classList.add("adjust-left"),te.classList.remove("adjust-right")):Oe?(rt=fe.left,te.classList.add("adjust-right"),te.classList.remove("adjust-left")):(rt=fe.left,te.classList.remove("adjust-left"),te.classList.remove("adjust-right")),te.style.top=`${He}px`,te.style.left=`${rt}px`,te.classList.add("dropdown-fixed-position")}};React.useEffect(()=>{const te=oe=>{Ne&&Pe.current&&!Pe.current.contains(oe.target)&&Ce(!1)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[Ne]),React.useEffect(()=>{const te=oe=>{De&&it.current&&!it.current.contains(oe.target)&&Fe(null)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[De]),React.useEffect(()=>{const te=oe=>{ht&&xt.current&&!xt.current.contains(oe.target)&&dt(!1)};return document.addEventListener("mousedown",te),()=>{document.removeEventListener("mousedown",te)}},[ht]);const ct=(te,oe)=>{te.preventDefault();const de=te.pageX,fe=W[oe]||150,ye=Se=>{const Re=Math.max(100,fe+(Se.pageX-de));Z(je=>({...je,[oe]:Re}))},be=()=>{document.removeEventListener("mousemove",ye),document.removeEventListener("mouseup",be)};document.addEventListener("mousemove",ye),document.addEventListener("mouseup",be)},Ft=(te,oe)=>{var fe;const de=String(oe);return F!=null&&F.includes(te)?L!=null&&L[te]?L[te].includes(de):!0:!!((fe=L==null?void 0:L._global_)!=null&&fe.includes(de))},Mt=(te,oe)=>{Ft(oe,te[oe])&&P&&P(te,oe)},Ct=we.some(te=>Array.from(Je).some(oe=>Array.isArray(te[oe])&&te[oe].length>0&&te[oe].some(de=>typeof de=="object"&&de!==null))),Lt=()=>{const te=Qe.filter(ye=>Je.has(ye.id)),oe=ve.map(ye=>te.reduce((be,Se)=>(be[Se.label||Se.id]=getColumnValue(ye[Se.id]),be),{})),de=utils.json_to_sheet(oe),fe=utils.book_new();utils.book_append_sheet(fe,de,"Data"),writeFileSync(fe,"alldata-grid-export.xlsx")},Dt=()=>jsxRuntimeExports.jsxs("div",{className:D?"esign-table-container":"table-container",children:[jsxRuntimeExports.jsx("div",{className:"table-scroll-container",children:Je.size===0?jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"200px",display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:"1.2em",background:"#fafafa",border:"1px solid #eee",borderRadius:"8px"},children:"Please select at least one column to show data"}):jsxRuntimeExports.jsxs("table",{className:"custom-table",style:{tableLayout:"fixed",width:"100%"},children:[jsxRuntimeExports.jsxs("thead",{children:[jsxRuntimeExports.jsxs("tr",{children:[Ct&&jsxRuntimeExports.jsx("th",{className:"expand-column"}),n&&jsxRuntimeExports.jsx("th",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:xe.size===ue.length&&ue.length>0,onChange:te=>{if(te){const oe=new Set(ue.map((de,fe)=>fe));Ie(oe)}else Ie(new Set)}})}),ot.filter(te=>Qe.find(de=>de.id===te)&&Je.has(te)).map(te=>{const oe=Qe.find(de=>de.id===te);return oe?jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:W[oe.id]?`${W[oe.id]}px`:"150px",minWidth:"80px",maxWidth:"600px"},children:jsxRuntimeExports.jsxs("div",{className:"column-header",children:[jsxRuntimeExports.jsxs("span",{className:"column-label-with-info",children:[oe.label,oe.tooltip&&jsxRuntimeExports.jsx("img",{src:InfoIcon,alt:"info",title:oe.tooltip,width:14,height:14,className:"info-icon"})]}),jsxRuntimeExports.jsxs("div",{className:"column-actions",children:[V&&jsxRuntimeExports.jsx("img",{src:SortIcon,alt:"Sort",title:"Sort",width:14,height:14,onClick:()=>tt(oe.id),style:{cursor:"pointer",transition:"transform 0.2s ease-in-out",transform:(N==null?void 0:N.column)===oe.id?N.direction==="asc"?"rotate(0deg)":"rotate(180deg)":"none",filter:(N==null?void 0:N.column)===oe.id?"brightness(0.6)":"none"}}),A&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:oe.id===De?it:null,children:[jsxRuntimeExports.jsx("span",{className:`dropdown-trigger ${Be[oe.id]?"filter-active":""}`,onClick:de=>{de.stopPropagation(),ze(oe.id)},title:Be[oe.id]?`Filter: ${Be[oe.id].operator} "${Be[oe.id].value}"`:"Filter options",children:"⋮"}),De===oe.id&&jsxRuntimeExports.jsxs("div",{className:"dropdown-menu",ref:de=>{de&&setTimeout(()=>Tt(de),0)},children:[jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Le(oe.id),Ce(!0),Fe(null)},children:"Filter"}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{ft(oe.id,"","contains"),Fe(null)},children:"Contains..."}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{ft(oe.id,"","equals"),Fe(null)},children:"Equals..."}),Be[oe.id]&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{const de={...Be};delete de[oe.id],Xe(de),Ue(""),Le("");let fe=[...ve];st.trim()&&(fe=fe.filter(ye=>Object.entries(ye).some(([be,Se])=>Je.has(be)?String(Se).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(de).forEach(([ye,be])=>{const{value:Se,operator:Re}=be;fe=fe.filter(je=>{const $e=String(je[ye]||"").toLowerCase(),Oe=Se.toLowerCase();switch(Re){case"contains":return $e.includes(Oe);case"equals":return $e===Oe;case"startsWith":return $e.startsWith(Oe);case"endsWith":return $e.endsWith(Oe);case"does not contain":return!$e.includes(Oe);case"does not equal":return $e!==Oe;case"is any of":return Se.split(",").map(He=>He.trim().toLowerCase()).includes($e);default:return!0}})}),le(fe),qe(0),Fe(null)},children:"Clear Filter"}),Object.keys(Be).length>0&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Xe({}),le(ve),qe(0),Fe(null)},children:"Clear All Filters"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"column-resizer",onMouseDown:de=>ct(de,oe.id)})]})},oe.id):null}),(u||y||m||d||x||f)&&jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:"150px",textAlign:"center"},children:"Action"})]}),Me&&jsxRuntimeExports.jsxs("tr",{className:"filter-row",children:[Ct&&jsxRuntimeExports.jsx("td",{}),n&&jsxRuntimeExports.jsx("td",{}),ot.filter(te=>Qe.find(de=>de.id===te)&&Je.has(te)).map(te=>{var de;const oe=Qe.find(fe=>fe.id===te);return oe?jsxRuntimeExports.jsxs("td",{style:{position:"relative"},children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:`Search ${oe.label}`,value:((de=Be[oe.id])==null?void 0:de.value)||"",onChange:fe=>{const ye=fe.target.value;Ue(ye),Le(oe.id);const be={...Be};ye===""?delete be[oe.id]:be[oe.id]={value:ye,operator:"contains"},Xe(be);let Se=[...ve];st.trim()&&(Se=Se.filter(Re=>Object.entries(Re).some(([je,$e])=>Je.has(je)?String($e).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(be).forEach(([Re,je])=>{const{value:$e,operator:Oe}=je;Se=Se.filter(He=>{const rt=String(getColumnValue(He[Re])||"").toLowerCase(),gt=$e.toLowerCase();switch(Oe){case"contains":return rt.includes(gt);case"equals":return rt===gt;case"startsWith":return rt.startsWith(gt);case"endsWith":return rt.endsWith(gt);case"does not contain":return!rt.includes(gt);case"does not equal":return rt!==gt;case"is any of":return $e.split(",").map(It=>It.trim().toLowerCase()).includes(rt);default:return!0}})}),le(Se),qe(0)},className:"filter-input-with-clear",style:{paddingRight:"28px"}}),Be[oe.id]&&jsxRuntimeExports.jsx("span",{className:"filter-clear-icon-inside",onClick:()=>{const fe={...Be};delete fe[oe.id],Xe(fe),Ue(""),Le("");let ye=[...ve];st.trim()&&(ye=ye.filter(be=>Object.entries(be).some(([Se,Re])=>Je.has(Se)?String(Re).toLowerCase().includes(st.toLowerCase()):!1))),Object.entries(fe).forEach(([be,Se])=>{const{value:Re,operator:je}=Se;ye=ye.filter($e=>{const Oe=String($e[be]||"").toLowerCase(),He=Re.toLowerCase();switch(je){case"contains":return Oe.includes(He);case"equals":return Oe===He;case"startsWith":return Oe.startsWith(He);case"endsWith":return Oe.endsWith(He);case"does not contain":return!Oe.includes(He);case"does not equal":return Oe!==He;case"is any of":return Re.split(",").map(rt=>rt.trim().toLowerCase()).includes(Oe);default:return!0}})}),le(ye),qe(0)},title:"Clear",children:"×"})]},`filter-${oe.id}`):null}),(u||y||m||d||x||f)&&jsxRuntimeExports.jsx("td",{})]})]}),jsxRuntimeExports.jsx("tbody",{children:we.length===0?jsxRuntimeExports.jsx("tr",{className:"no-records-row",children:jsxRuntimeExports.jsx("td",{colSpan:(Ct?1:0)+(n?1:0)+Array.from(Je).length+(u||y||m||d||x||f?1:0),className:"no-records-cell",children:st.trim()||Object.keys(Be).length>0?"No records found for the search criteria":"No Data found"})}):we.map((te,oe)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsxs("tr",{className:oe%2===0?"table-row-even":"table-row-odd",children:[Ct&&jsxRuntimeExports.jsx("td",{className:"expand-column",children:Array.from(Je).some(de=>Array.isArray(te[de])&&te[de].length>0&&te[de].some(fe=>typeof fe=="object"&&fe!==null))&&jsxRuntimeExports.jsx("button",{className:"expand-button",onClick:()=>Ve(oe),children:Array.from(pt).some(de=>de.startsWith(`${oe}`))?"▼":"▶"})}),n&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:xe.has(oe),onChange:de=>{const fe=new Set(xe);de?fe.add(oe):fe.delete(oe),Ie(fe)}})}),s&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:"selected",checked:(o==null?void 0:o(oe))==="selected",onChange:()=>a==null?void 0:a({rowIndex:oe,columnId:"selected",rowData:te})})})}),ot.filter(de=>Qe.find(ye=>ye.id===de)&&Je.has(de)).map(de=>{const fe=Qe.find(ye=>ye.id===de);return fe?jsxRuntimeExports.jsx("td",{style:{width:W[fe.id]?`${W[fe.id]}px`:"150px",minWidth:"80px",maxWidth:"600px"},className:`table-cell ${Ft(fe.id,te[fe.id])?"ce-clickable-cell":""}`,onClick:()=>{Ft(fe.id,te[fe.id])?Mt(te,fe.id):Array.isArray(te[fe.id])&&te[fe.id].length>0&&Ve(oe,fe.id)},children:React.isValidElement(te[fe.id])?te[fe.id]:(Array.isArray(l)?l.includes(fe.id):l===fe.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:fe.id,checked:_e(te)===fe.id,onChange:()=>me({rowIndex:oe,columnId:fe.id,rowData:te})})}):Array.isArray(te[fe.id])?`${te[fe.id].length}`:typeof te[fe.id]=="object"&&te[fe.id]!==null?Object.entries(te[fe.id]).map(([ye,be])=>`${ye}: ${be}`).join(", "):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(te[fe.id]??"")})},fe.id):null}),(u||y||m||d||x||f)&&jsxRuntimeExports.jsx("td",{className:"table-cell",style:{textAlign:"center"},children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"8px",flexWrap:"wrap"},children:[u&&jsxRuntimeExports.jsx("img",{src:Edit,alt:"Edit",title:"Edit",width:20,height:20,style:{cursor:"pointer"},onClick:g}),y&&jsxRuntimeExports.jsx("img",{src:Reassign,alt:"Reassign",width:20,height:20,style:{cursor:"pointer"},onClick:b}),m&&jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:C}),d&&jsxRuntimeExports.jsx("img",{src:Approve,alt:"Approve",width:20,height:20,style:{cursor:"pointer"},onClick:T}),x&&jsxRuntimeExports.jsx("img",{src:Delete,alt:"Delete",width:20,height:20,style:{cursor:"pointer"},onClick:_}),f&&jsxRuntimeExports.jsx("img",{src:Add,alt:"Add",width:20,height:20,style:{cursor:"pointer"},onClick:S})]})})]}),Array.from(pt).map(de=>{const[fe,ye]=de.split("-");if(Number(fe)===oe){const be=ye?{[ye]:te[ye]}:Object.keys(te).filter(Se=>Array.isArray(te[Se])||typeof te[Se]=="object").reduce((Se,Re)=>({...Se,[Re]:te[Re]}),{});return jsxRuntimeExports.jsx("tr",{className:"expanded-row",children:jsxRuntimeExports.jsx("td",{colSpan:Je.size+2,className:"expanded-cell",children:Object.entries(be).map(([Se,Re],je)=>jsxRuntimeExports.jsxs("div",{className:`expanded-section ${je%2===0?"expanded-section-even":"expanded-section-odd"}`,style:{backgroundColor:je%2===0?"#e8f5e9":"#e3f2fd",padding:"10px",marginBottom:"10px",borderRadius:"5px"},children:[jsxRuntimeExports.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:Se.charAt(0).toUpperCase()+Se.slice(1)}),lt(Re)]},Se))})},`expanded-${de}`)}return null})]},oe))})]})}),O&&jsxRuntimeExports.jsxs("div",{className:"pagination-container",children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"40px"},children:[jsxRuntimeExports.jsx(EntriesInfo,{dataLength:ue.length,currentPage:Ze,rowsPerPage:et}),jsxRuntimeExports.jsx(RowsPerPageSelector,{rowsPerPage:et,setRowsPerPage:nt,setCurrentPage:qe,pageSizeOptions:U})]}),jsxRuntimeExports.jsx(PaginationControls,{currentPage:Ze,totalPages:Math.ceil(ue.length/et),setCurrentPage:qe})]}),Ne&&jsxRuntimeExports.jsx("div",{className:"filter-modal",children:jsxRuntimeExports.jsxs("div",{className:"filter-modal-content",ref:Pe,onKeyDown:Et,tabIndex:0,children:[jsxRuntimeExports.jsxs("div",{className:"filter-modal-header",children:[jsxRuntimeExports.jsx("h3",{children:"Filter Data"}),jsxRuntimeExports.jsx(CEButton,{className:"close-button-close",onClick:()=>Ce(!1),children:"×"})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-body",children:[jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Column:"}),jsxRuntimeExports.jsx("select",{value:Ye,onChange:te=>Le(te.target.value),className:"filter-select","aria-label":"Filter column",title:"Select column to filter",children:Qe.map(te=>jsxRuntimeExports.jsx("option",{value:te.id,children:te.label},te.id))})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Operator:"}),jsxRuntimeExports.jsxs("select",{value:We,onChange:te=>Ge(te.target.value),className:"filter-select","aria-label":"Filter operator",title:"Select filter operator",children:[jsxRuntimeExports.jsx("option",{value:"contains",children:"contains"}),jsxRuntimeExports.jsx("option",{value:"equals",children:"equals"}),jsxRuntimeExports.jsx("option",{value:"startsWith",children:"starts with"}),jsxRuntimeExports.jsx("option",{value:"endsWith",children:"ends with"}),jsxRuntimeExports.jsx("option",{value:"does not contain",children:"does not contain"}),jsxRuntimeExports.jsx("option",{value:"does not equal",children:"does not equal"}),jsxRuntimeExports.jsx("option",{value:"is any of",children:"is any of"})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Value:"}),jsxRuntimeExports.jsx("input",{type:"text",value:Ke,onChange:te=>Ue(te.target.value),placeholder:"Enter filter value",title:"Filter value",className:"filter-input",autoFocus:!0,onKeyDown:te=>{te.key==="Enter"&&yt(),te.key==="Escape"&&Ce(!1)}})]}),Object.keys(Be).length>0&&jsxRuntimeExports.jsxs("div",{className:"active-filters-summary",children:[jsxRuntimeExports.jsx("div",{className:"active-filters-header",children:"Active Filters:"}),Object.entries(Be).map(([te,oe])=>{const de=Qe.find(fe=>fe.id===te);return jsxRuntimeExports.jsxs("div",{className:"active-filter-item",children:[jsxRuntimeExports.jsxs("span",{children:[(de==null?void 0:de.label)||te,": "]}),jsxRuntimeExports.jsx("span",{className:"filter-operator",children:oe.operator}),jsxRuntimeExports.jsxs("span",{className:"filter-value",children:['"',oe.value,'"']})]},te)})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-footer",children:[jsxRuntimeExports.jsx(CEButton,{onClick:()=>{Xe({}),le(ve),qe(0),Ce(!1)},className:"clear-filters-button",variant:"outlined",children:"Clear All"}),jsxRuntimeExports.jsx(CEButton,{onClick:yt,className:"apply-filter-button",variant:"primary",children:"Apply Filter"})]})]})})]}),Nt=()=>{const te=Qe.filter(ye=>Je.has(ye.id)),oe=we.map(ye=>Object.fromEntries(te.map(be=>[be.label||be.id,getColumnValue(ye[be.id])]))),de=utils.json_to_sheet(oe),fe=utils.book_new();utils.book_append_sheet(fe,de,"Data"),writeFileSync(fe,"data-grid-export.xlsx",{bookType:"xlsx"})},jt=()=>{j?(re(!0),Promise.resolve(j()).finally(()=>{Xe({}),re(!1)})):(re(!0),setTimeout(()=>{le(t),Q(t),qe(0),at(""),Ue(""),Le(""),Xe({}),q(null),re(!1)},300))},Bt=Qe.filter(te=>te.shouldVisible!==!1).every(te=>Je.has(te.id));return jsxRuntimeExports.jsxs("div",{className:`datatable-wrapper${G?" ce-grid-fullscreen":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"grid-header",children:[e&&jsxRuntimeExports.jsx("span",{className:"header-title",children:e}),jsxRuntimeExports.jsxs("div",{className:"search-container",children:[c&&jsxRuntimeExports.jsxs("div",{className:"search-wrapper",children:[jsxRuntimeExports.jsx("img",{src:SearchRounded,alt:"Show Filter",title:"Show/Hide Filter",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>{const te=!Me;ke(te),te||(Xe({}),le(ve),qe(0),at(""))}}),st&&jsxRuntimeExports.jsx("button",{className:"search-cancel-button",onClick:()=>{at(""),ge()},children:"×"})]}),M&&jsxRuntimeExports.jsx("img",{src:ShowOrHideColumn,alt:"Columns",title:"Show/Hide Columns",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>dt(!0)}),Object.keys(Be).length>0&&jsxRuntimeExports.jsx("img",{src:FilterAltOffRounded,alt:"Clear Filters",title:"Clear All Filters",width:20,height:20,style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:()=>{Xe({}),le(ve),qe(0)}}),B&&jsxRuntimeExports.jsx("img",{src:ExportIcon,alt:"Export",title:"Export to XLS",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:Nt}),E&&jsxRuntimeExports.jsx("img",{src:FileOpenRounded,alt:"Export",title:"Export All to Excel",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:Lt}),K&&jsxRuntimeExports.jsx("img",{src:ReloadIcon,alt:"Reload",title:"Reload Data",width:20,height:20,className:"ce-reload-icon",style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:jt}),ee&&jsxRuntimeExports.jsx("button",{className:"fullscreen-button",onClick:G?ie:J,title:G?"Exit Full Screen":"Full Screen",children:G?"⤫":"⤢"})]})]}),ht&&jsxRuntimeExports.jsx("div",{className:"column-modal",children:jsxRuntimeExports.jsxs("div",{className:"column-modal-content",ref:xt,children:[jsxRuntimeExports.jsx("div",{className:"column-modal-header",children:jsxRuntimeExports.jsx("button",{className:"modal-close-button",onClick:()=>dt(!1),children:"×"})}),jsxRuntimeExports.jsx("h3",{className:"column-modal-title",children:"Column Visibility and Order"}),jsxRuntimeExports.jsx("p",{className:"column-modal-description",children:"Drag and drop columns to change their order. Check or uncheck to show or hide columns."}),jsxRuntimeExports.jsx("div",{className:"column-modal-actions",children:jsxRuntimeExports.jsx("div",{className:"select-all-action",children:jsxRuntimeExports.jsx(CECheckBox,{label:"Select All",checked:Bt,onChange:te=>{mt(te?new Set(Qe.filter(oe=>oe.shouldVisible!==!1).map(oe=>oe.id)):new Set)}})})}),jsxRuntimeExports.jsx("div",{className:"column-list-container",children:ot.filter(te=>Qe.find(oe=>oe.id===te&&oe.shouldVisible!==!1)).map(te=>{const oe=Qe.find(de=>de.id===te);return oe?jsxRuntimeExports.jsxs("div",{className:`column-item ${ut===oe.id?"dragging":""}`,draggable:!0,onDragStart:de=>{St(oe.id),de.dataTransfer.effectAllowed="move",de.dataTransfer.setData("text/plain",oe.id)},onDragEnd:()=>St(null),onDragOver:de=>{de.preventDefault(),de.dataTransfer.dropEffect="move"},onDragEnter:de=>{de.preventDefault(),de.currentTarget.classList.add("drag-over")},onDragLeave:de=>{de.currentTarget.classList.remove("drag-over")},onDrop:de=>{if(de.preventDefault(),de.currentTarget.classList.remove("drag-over"),ut&&ut!==oe.id){const fe=[...ot],ye=fe.indexOf(ut),be=fe.indexOf(oe.id);ye!==-1&&be!==-1&&(fe.splice(ye,1),fe.splice(be,0,ut),wt(fe))}},children:[jsxRuntimeExports.jsx("div",{className:"column-drag-handle",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:jsxRuntimeExports.jsx("path",{d:"M4 4h2v2H4V4zm0 6h2v2H4v-2zm0-3h2v2H4V7zm8 3h-6v2h6v-2zm0-3h-6v2h6V7zm0-3h-6v2h6V4z"})})}),jsxRuntimeExports.jsx(CECheckBox,{label:oe.label??oe.id,checked:Je.has(oe.id),onChange:()=>Ae(oe.id)})]},oe.id):null})})]})}),pe?jsxRuntimeExports.jsx(CESkeletonTable,{columns:Qe.length||5,rows:et||10}):Dt()]})},DateInputPart=({value:e,onChange:t,max:i,min:n,length:s,placeholder:a})=>{const o=React.useRef(null),l=u=>{const x=u.target.value.replace(/\D/g,"");if(x.length<=s){if(x.length===1){const d=parseInt(x);if(i===12&&d>1){t(`0${d}`);return}if(i===31&&d>3){t(`0${d}`);return}}if(x.length===2){const d=parseInt(x);d>=n&&d<=i&&t(x);return}t(x)}},c=()=>{var u;(u=o.current)==null||u.select()},f=()=>{e.length===1&&t(e.padStart(2,"0"))};return jsxRuntimeExports.jsx("input",{ref:o,type:"text",value:e,onChange:l,onFocus:c,onBlur:f,maxLength:s,className:"date-input-part",placeholder:a})},DateRangeIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%204.5H18V3.5C18%202.95%2017.55%202.5%2017%202.5C16.45%202.5%2016%202.95%2016%203.5V4.5H8V3.5C8%202.95%207.55%202.5%207%202.5C6.45%202.5%206%202.95%206%203.5V4.5H5C3.89%204.5%203.01%205.4%203.01%206.5L3%2020.5C3%2021.6%203.89%2022.5%205%2022.5H19C20.1%2022.5%2021%2021.6%2021%2020.5V6.5C21%205.4%2020.1%204.5%2019%204.5ZM19%2019.5C19%2020.05%2018.55%2020.5%2018%2020.5H6C5.45%2020.5%205%2020.05%205%2019.5V9.5H19V19.5ZM7%2011.5H9V13.5H7V11.5ZM11%2011.5H13V13.5H11V11.5ZM15%2011.5H17V13.5H15V11.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",WEEKDAYS=["Su","Mo","Tu","We","Th","Fr","Sa"],CEDatePicker=({onChange:e,label:t="Calendar"})=>{const[i,n]=React.useState(!1),[s,a]=React.useState(null),[o,l]=React.useState(new Date),[c,f]=React.useState(!1),[u,x]=React.useState({start:2020,end:2031}),[d,y]=React.useState("left"),[m,p]=React.useState(0),E=React.useRef(null),[g,S]=React.useState(!1),[_,T]=React.useState(""),[b,C]=React.useState(""),[R,F]=React.useState(""),[L,P]=React.useState(!0),j=()=>{n(!1),!_&&!b&&!R&&S(!1)};useEscapeKey(j);const B=()=>{n(I=>{if(!I){const D=s||new Date;l(D),_||T(String(D.getMonth()+1).padStart(2,"0")),b||C(String(D.getDate()).padStart(2,"0")),R||F(String(D.getFullYear()))}return!I})};React.useEffect(()=>{const I=D=>{E.current&&!E.current.contains(D.target)&&j()};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[_,b,R]);const K=I=>{const D=new Date(o.getFullYear(),o.getMonth(),I);a(D),l(D);const O=String(D.getMonth()+1).padStart(2,"0"),z=String(D.getDate()).padStart(2,"0"),U=String(D.getFullYear());T(O),C(z),F(U),P(!0),e(`${O}/${z}/${U}`),n(!1)},ee=I=>{y(I>0?"left":"right"),l(D=>{const O=new Date(D.getFullYear(),D.getMonth()+I,1);return s&&T(String(O.getMonth()+1).padStart(2,"0")),p(z=>z+1),O})},X=()=>{f(I=>!I)},M=I=>{x(D=>({start:D.start+I*10,end:D.end+I*10}))},V=I=>{const D=new Date(I,o.getMonth(),1);l(D),F(String(I)),f(!1)},A=()=>{const I=new Date(o.getFullYear(),o.getMonth(),1),D=new Date(o.getFullYear(),o.getMonth()+1,0),O=I.getDay(),z=D.getDate(),U=new Date,W=se=>!s&&U.getDate()===se&&U.getMonth()===o.getMonth()&&U.getFullYear()===o.getFullYear(),Z=[];for(let se=0;se<O;se++)Z.push(jsxRuntimeExports.jsx("div",{className:"dp-day empty"},`empty-${se}`));for(let se=1;se<=z;se++){const ce=(s==null?void 0:s.getDate())===se&&(s==null?void 0:s.getMonth())===o.getMonth()&&(s==null?void 0:s.getFullYear())===o.getFullYear();Z.push(jsxRuntimeExports.jsx("div",{className:`dp-day ${ce?"selected":""} ${W(se)?"today":""}`,onClick:()=>K(se),children:se},se))}return Z},k=(I,D,O)=>{if(!I||!D||!O){P(!1),l(new Date),a(null);return}const z=`${O}-${I}-${D}`,U=new Date(z);if(U.getFullYear()===parseInt(O)&&U.getMonth()+1===parseInt(I)&&U.getDate()===parseInt(D))a(U),l(U),P(!0),e(`${I}/${D}/${O}`);else{const W=new Date;P(!1),a(null),l(W),T(I),C(D),F(O)}};return jsxRuntimeExports.jsxs("div",{className:"dp-wrapper",ref:E,children:[jsxRuntimeExports.jsxs("div",{className:`dp-input-container ${g||i?"focused":""} ${L?"":"invalid"}`,children:[jsxRuntimeExports.jsx("div",{className:`dp-label ${g||i||s||_||b||R?"floating":""} ${L?"":"invalid"}`,children:t}),jsxRuntimeExports.jsxs("div",{className:"dp-input-wrapper",onClick:()=>{S(!0)},children:[jsxRuntimeExports.jsx(DateInputPart,{value:_,onChange:I=>{T(I),k(I,b,R)},max:12,min:1,length:2,placeholder:"MM",onClick:B}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx(DateInputPart,{value:b,onChange:I=>{C(I),k(_,I,R)},placeholder:"DD",max:31,min:1,length:2,onClick:B}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("input",{type:"text",value:R,onChange:I=>{const D=I.target.value.replace(/\D/g,"");D.length<=4&&(F(D),D.length===4&&k(_,b,D))},onFocus:I=>I.target.select(),onBlur:()=>{R.length===4&&k(_,b,R)},className:"date-input-part",maxLength:4,placeholder:"YYYY"}),jsxRuntimeExports.jsx("span",{className:"dp-icon",onClick:B,children:jsxRuntimeExports.jsx("img",{src:DateRangeIcon,alt:"Calendar Icon"})})]})]}),i&&jsxRuntimeExports.jsxs("div",{className:"dp-calendar",children:[jsxRuntimeExports.jsxs("div",{className:"dp-header",children:[jsxRuntimeExports.jsxs("div",{className:"dp-title",onClick:X,children:[c?`${u.start} - ${u.end}`:`${o.toLocaleString("default",{month:"long"})} ${o.getFullYear()}`,jsxRuntimeExports.jsx("button",{className:"dp-toggle-icon",children:"▾"})]}),jsxRuntimeExports.jsxs("div",{className:"dp-controls",children:[jsxRuntimeExports.jsx("button",{onClick:()=>c?M(-1):ee(-1),children:"‹"}),jsxRuntimeExports.jsx("button",{onClick:()=>c?M(1):ee(1),children:"›"})]})]}),!c&&jsxRuntimeExports.jsx("div",{className:"dp-weekdays",children:WEEKDAYS.map(I=>jsxRuntimeExports.jsx("div",{className:"dp-weekday",children:I},I))}),c?jsxRuntimeExports.jsx("div",{className:"dp-years-grid",children:Array.from({length:u.end-u.start+1},(I,D)=>{const O=u.start+D;return jsxRuntimeExports.jsx("div",{className:"dp-year-item",onClick:()=>V(O),children:O},O)})}):jsxRuntimeExports.jsx("div",{className:`dp-days dp-slide-${d}`,children:A()},m)]})]})},CEDateRangePicker=({label:e="Submitted Date",onChange:t,size:i="medium",style:n,inputGroupStyle:s})=>{const[a,o]=React.useState(""),[l,c]=React.useState(""),[f,u]=React.useState(!1),[x,d]=React.useState(""),y=g=>{!g.currentTarget.value&&!a&&!l&&u(!1)},m=(g,S)=>{g&&S&&new Date(S)<new Date(g)?d("End date must be after or equal to start date"):(d(""),t==null||t({startDate:g,endDate:S}))},p=g=>{const S=g.target.value;o(S),m(S,l)},E=g=>{const S=g.target.value;c(S),m(a,S)};return jsxRuntimeExports.jsxs("div",{className:"date-range-picker",style:n,children:[jsxRuntimeExports.jsxs("div",{className:"date-range-field-group",style:s,children:[jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:a,onChange:p,onFocus:()=>u(!0),onBlur:g=>y(g)}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"From"})]}),jsxRuntimeExports.jsx("span",{className:"range-separator centered",children:"to"}),jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:l,onChange:E,onFocus:()=>u(!0),onBlur:g=>y(g)}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"To"})]})]}),x&&jsxRuntimeExports.jsx("div",{className:"error-text",children:x})]})},FieldsInput=({label:e,name:t,placeholder:i="",value:n="",onChange:s,size:a="medium"})=>{const[o,l]=React.useState(!1),[c,f]=React.useState(!1),u=getSizeStyle$1(a);React.useEffect(()=>{n&&n.trim().length>0&&f(!0)},[n]);const x=()=>{l(!0),f(!0)},d=m=>{l(!1),m.target.value.trim()||f(!1)},y=o||!!n;return jsxRuntimeExports.jsxs("div",{className:`floating-input-wrapper${c?" focused":""}`,style:u,children:[jsxRuntimeExports.jsx("label",{htmlFor:t,className:"floating-label",children:e}),jsxRuntimeExports.jsx("input",{id:t,name:t,className:"floating-input",placeholder:y?i:"",value:n,onChange:s,onFocus:x,onBlur:d})]})},CEFooter=()=>jsxRuntimeExports.jsx("footer",{style:{zIndex:1100,backgroundColor:"var(--grey-color)",width:"100%",height:"36px",position:"fixed",bottom:"0",left:"0",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"auto"},children:jsxRuntimeExports.jsx("p",{style:{color:"var(--white-color)",fontSize:"0.8rem",margin:"0"},children:"© All rights reserved by Clean Earth."})}),CEGridItem=({children:e,size:t=1})=>jsxRuntimeExports.jsx("div",{style:{gridColumn:`span ${t}`},children:e}),CEGridLayout=({children:e,columns:t=12,gap:i="1rem",alignItems:n="stretch",justifyItems:s="stretch",gridTemplateColumns:a})=>jsxRuntimeExports.jsx("div",{className:"grid-container",style:{display:"grid",gridTemplateColumns:a||`repeat(${t}, 1fr)`,gap:i,alignItems:n,justifyItems:s,backgroundColor:"transparent"},children:e}),CELogo=({src:e,alt:t="Logo",style:i})=>jsxRuntimeExports.jsx("img",{src:e,alt:t,style:{height:25,...i}}),CESearchBar=({onFocus:e,onBlur:t,quickActions:i=[],recentSearches:n=[]})=>{const[s,a]=React.useState(!1),[o,l]=React.useState(""),[c,f]=React.useState(i),[u,x]=React.useState(n),d=(m,p)=>{m==="quickActions"?f(E=>E.filter((g,S)=>S!==p)):x(E=>E.filter((g,S)=>S!==p))},y=()=>{o.trim()!==""&&(x(m=>[o,...m]),l(""))};return jsxRuntimeExports.jsxs("div",{className:"ceui-search-bar",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",className:"ceui-search-input",value:o,onChange:m=>l(m.target.value),onFocus:()=>{a(!0),e&&e()},onBlur:()=>{setTimeout(()=>a(!1),200),t&&t()},onKeyDown:m=>{m.key==="Enter"&&y()}}),s&&jsxRuntimeExports.jsxs("div",{className:"ceui-search-suggestions",children:[c.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Quick actions"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:c.map((m,p)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[m,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>d("quickActions",p),children:"✕"})]},p))})]}),u.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Recent search"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:u.map((m,p)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[m,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>d("recentSearches",p),children:"✕"})]},p))})]})]})]})},CESearchButton=({showSuggestions:e=!1,quickActions:t=[],recentSearches:i=[]})=>{const[n,s]=React.useState(!1),[a,o]=React.useState(!1),l=React.useRef(null),c=u=>{l.current&&!l.current.contains(u.target)&&(s(!1),o(!1))},f=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5001 14.5H14.7101L14.4301 14.23C15.6301 12.83 16.2501 10.92 15.9101 8.89002C15.4401 6.11002 13.1201 3.89002 10.3201 3.55002C6.09014 3.03002 2.53014 6.59001 3.05014 10.82C3.39014 13.62 5.61014 15.94 8.39014 16.41C10.4201 16.75 12.3301 16.13 13.7301 14.93L14.0001 15.21V16L18.2501 20.25C18.6601 20.66 19.3301 20.66 19.7401 20.25C20.1501 19.84 20.1501 19.17 19.7401 18.76L15.5001 14.5ZM9.50014 14.5C7.01014 14.5 5.00014 12.49 5.00014 10C5.00014 7.51002 7.01014 5.50002 9.50014 5.50002C11.9901 5.50002 14.0001 7.51002 14.0001 10C14.0001 12.49 11.9901 14.5 9.50014 14.5Z",fill:"black",fillOpacity:"0.54"})});return React.useEffect(()=>(n?document.addEventListener("mousedown",c):document.removeEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}),[n]),console.log("isSearchOpen:",n),console.log("showDropdown:",a),console.log("showSuggestions:",e),jsxRuntimeExports.jsxs("div",{ref:l,className:`ceui-animated-search-wrapper ${n?"expanded":"collapsed"}`,children:[jsxRuntimeExports.jsx("button",{className:"ceui-search-button","aria-label":"Open search",onClick:()=>s(!0),children:jsxRuntimeExports.jsx(f,{})}),n&&jsxRuntimeExports.jsx(CESearchBar,{showSuggestions:n&&(e||a),onFocus:()=>o(!0),onBlur:()=>{setTimeout(()=>o(!1),200)},quickActions:t,recentSearches:i})]})},CEHelpButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Help",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2.5C6.48 2.5 2 6.98 2 12.5C2 18.02 6.48 22.5 12 22.5C17.52 22.5 22 18.02 22 12.5C22 6.98 17.52 2.5 12 2.5ZM13 19.5H11V17.5H13V19.5ZM15.07 11.75L14.17 12.67C13.67 13.18 13.31 13.64 13.13 14.36C13.05 14.68 13 15.04 13 15.5H11V15C11 14.54 11.08 14.1 11.22 13.69C11.42 13.11 11.75 12.59 12.17 12.17L13.41 10.91C13.87 10.47 14.09 9.81 13.96 9.11C13.83 8.39 13.27 7.78 12.57 7.58C11.46 7.27 10.43 7.9 10.1 8.85C9.98 9.22 9.67 9.5 9.28 9.5H8.98C8.4 9.5 8 8.94 8.16 8.38C8.59 6.91 9.84 5.79 11.39 5.55C12.91 5.31 14.36 6.1 15.26 7.35C16.44 8.98 16.09 10.73 15.07 11.75Z",fill:"black",fillOpacity:"0.54"})})}),CENotificationButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Notifications",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.4775 22.2632C12.0837 22.2632 12.6651 21.9999 13.0938 21.531C13.5224 21.0622 13.7633 20.4264 13.7633 19.7634H9.19183C9.19183 20.4264 9.43264 21.0622 9.8613 21.531C10.2899 21.9999 10.8713 22.2632 11.4775 22.2632ZM12.6147 3.63801C12.6306 3.46421 12.6131 3.28869 12.5632 3.12276C12.5133 2.95683 12.4322 2.80417 12.3251 2.67464C12.2179 2.54511 12.0871 2.44157 11.9412 2.37071C11.7952 2.29985 11.6372 2.26324 11.4775 2.26324C11.3178 2.26324 11.1599 2.29985 11.0139 2.37071C10.8679 2.44157 10.7372 2.54511 10.63 2.67464C10.5229 2.80417 10.4417 2.95683 10.3919 3.12276C10.342 3.28869 10.3244 3.46421 10.3404 3.63801C9.04845 3.92494 7.88695 4.6916 7.05275 5.80806C6.21856 6.92452 5.76299 8.3221 5.76325 9.76393C5.76325 11.1364 5.19182 17.2635 3.47754 18.5134H19.4775C17.7633 17.2635 17.1918 11.1364 17.1918 9.76393C17.1918 6.73909 15.2261 4.21423 12.6147 3.63801Z",fill:"#757575"})})}),CEAvatarMenu=()=>{const[e,t]=React.useState(!1),i=React.useRef(null),n=()=>t(!e),s=a=>{i.current&&!i.current.contains(a.target)&&t(!1)};return React.useEffect(()=>(e?document.addEventListener("mousedown",s):document.removeEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}),[e]),jsxRuntimeExports.jsxs("div",{style:{position:"relative",zIndex:1e3},children:[jsxRuntimeExports.jsx("img",{src:"src/assets/profile_pic.png",alt:"Profile",style:{width:40,height:40,borderRadius:"50%",cursor:"pointer"},onClick:n}),e&&jsxRuntimeExports.jsxs("div",{ref:i,style:{position:"absolute",right:0,top:"100%",background:"white",border:"1px solid #ccc",boxShadow:"0 2px 10px rgba(0,0,0,0.1)",zIndex:9999,minWidth:120},children:[jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"My Account"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Settings"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Logout"})]})]})},menuItemStyle={padding:"10px 15px",cursor:"pointer",fontSize:14,borderBottom:"1px solid #eee"},CEUserInfo=({name:e,role:t})=>jsxRuntimeExports.jsxs("div",{className:"ceui-user-info",children:[jsxRuntimeExports.jsx("span",{className:"ceui-user-name",children:e}),jsxRuntimeExports.jsx("span",{className:"ceui-user-role",children:t})]}),CEHeader=({headerColor:e="white",logoSrc:t,logoHeight:i,logoWidth:n,showSearchButton:s=!1,quickActions:a=[],recentSearches:o=[],showHelpButton:l=!1,showNotificationButton:c=!1,showAvatarMenu:f=!1,showUserInfo:u=!1,showHamburgerButton:x=!1,showDrawer:d=!1,userInfoProps:y,onMenuClick:m,drawerJsonUrl:p="",isDrawerOpen:E=!1,onDrawerClose:g})=>{const S=()=>jsxRuntimeExports.jsxs("svg",{width:"120",height:"35",viewBox:"0 0 245 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_1572_8855)",children:[jsxRuntimeExports.jsx("path",{d:"M0 1.49012e-05H245V60H0V1.49012e-05Z",fill:"#F4F5F7"}),jsxRuntimeExports.jsx("path",{d:"M53.3741 31.7566C53.3741 39.7826 47.1908 46.1485 39.2275 46.1485C31.2641 46.1485 25.0809 39.7826 25.0809 31.7566C25.0809 23.7306 31.2641 17.3646 39.2275 17.3646C47.1908 17.3646 53.3741 23.7306 53.3741 31.7566Z",fill:"#007ACC"}),jsxRuntimeExports.jsx("path",{d:"M91.5 25H76V35H91.5V30H81.5V29H91.5V25Z",fill:"#000"}),jsxRuntimeExports.jsx("path",{d:"M65 35H69V25H65V35Z",fill:"#000"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_1572_8855",children:jsxRuntimeExports.jsx("rect",{width:"245",height:"60",fill:"white"})})})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("header",{className:"ceui-header",style:{backgroundColor:e},children:[jsxRuntimeExports.jsx("div",{className:"ceui-header-left",children:t?jsxRuntimeExports.jsx(CELogo,{src:t,alt:"Core Logo",style:{height:i||35,width:n||"auto",maxWidth:120}}):jsxRuntimeExports.jsx(S,{})}),jsxRuntimeExports.jsxs("div",{className:"ceui-header-right",children:[s&&jsxRuntimeExports.jsx(CESearchButton,{showSuggestions:!0,quickActions:a,recentSearches:o,value:"",onChange:()=>{},onClear:()=>{}}),l&&jsxRuntimeExports.jsx(CEHelpButton,{}),c&&jsxRuntimeExports.jsx(CENotificationButton,{}),f&&jsxRuntimeExports.jsx(CEAvatarMenu,{}),u&&y&&jsxRuntimeExports.jsx(CEUserInfo,{name:y.name,role:y.role})]})]}),d&&x&&jsxRuntimeExports.jsx(CEDrawer,{jsonUrl:p,isOpen:E,onClose:g||(()=>{})})]})},CEGridMenuButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},children:jsxRuntimeExports.jsx("img",{src:"src/assets/Grid_4x4Rounded.svg",alt:""})}),CEHamburgerButton=({onClick:e,style:t})=>jsxRuntimeExports.jsx("button",{onClick:e,style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none",...t},children:jsxRuntimeExports.jsx("img",{src:"src/assets/MenuRounded.svg",alt:"Menu"})}),CEInputBox=({value:e,onChange:t,placeholder:i="",type:n="text",maxLength:s,minLength:a,required:o=!1,customValidator:l,errorMessage:c="Invalid input",showError:f=!0,label:u,labelSuffix:x,disabled:d=!1,style:y={},size:m="medium",onFocus:p,onBlur:E,autoFocus:g=!1,alwaysShowLabel:S})=>{const[_,T]=React.useState(!1),b=j=>{T(!0),p==null||p(j)},C=j=>{T(!1),E==null||E(j)},R=j=>{const B=j.target.value;n==="number"&&!/^\d*$/.test(B)||n==="alphanumeric"&&!/^[a-zA-Z0-9]*$/.test(B)||t(B)},F=getSizeStyle$1(m||"medium"),L=f&&o&&!e,P={fontSize:F.fontSize,padding:F.padding,...y};return jsxRuntimeExports.jsxs("div",{className:`validated-input-wrapper ${_?"focused":""} ${L?"error":""}`,children:[u&&jsxRuntimeExports.jsxs("label",{className:`validated-input-label ${S||e||_?"shrink":""}`,children:[u,x&&jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:x})]}),n==="textarea"?jsxRuntimeExports.jsx("textarea",{value:e,onChange:R,onFocus:b,onBlur:C,placeholder:i||" ",className:`validated-input-field ${L?"input-error":""}`,disabled:d,style:P}):jsxRuntimeExports.jsx("input",{type:n,value:e,onChange:R,onFocus:b,onBlur:C,placeholder:i||" ",className:`validated-input-field ${L?"input-error":""}`,disabled:d,style:P,autoFocus:g}),f&&!e&&jsxRuntimeExports.jsx("div",{className:"validated-input-error",children:c})]})},InputDropDown=({options:e,selected:t,onChange:i,multiple:n=!1,placeholder:s="Select...",size:a="medium",style:o={},allowClear:l=!0,showInputPills:c=!0})=>{const[f,u]=React.useState(!1),[x,d]=React.useState(!1),y=React.useRef(null),p={...getSizeStyle$1(a),...o},E=T=>{if(n){const b=t.includes(T)?t.filter(C=>C!==T):[...t,T];i(b)}else i([T]),u(!1)},g=()=>i([]),S=e.filter(T=>t.includes(T.value)).map(T=>T.label);React.useEffect(()=>{const T=b=>{var C;(C=y.current)!=null&&C.contains(b.target)||u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const _=T=>{const b=t.filter(C=>C!==T);i(b)};return jsxRuntimeExports.jsx("div",{className:`dropdown-container ${f||t.length>0?"float":""}`,ref:y,style:p,children:jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${f?"open":""}`,onClick:()=>u(T=>!T),onFocus:()=>d(!0),onBlur:()=>d(!1),tabIndex:0,children:[jsxRuntimeExports.jsx("label",{className:"floating-placeholder",children:s}),jsxRuntimeExports.jsx("div",{className:"selected-display",children:t.length===0?"":n?c?S.map((T,b)=>jsxRuntimeExports.jsxs("span",{className:"chip",children:[T,jsxRuntimeExports.jsx("span",{className:"close-icon",onClick:C=>{var R;C.stopPropagation(),_(((R=e.find(F=>F.label===T))==null?void 0:R.value)||"")},children:"×"})]},b)):jsxRuntimeExports.jsx("div",{className:"selected-display-label",children:S.join(",")}):jsxRuntimeExports.jsx("span",{children:S[0]})}),l&&t.length>0&&jsxRuntimeExports.jsx("button",{className:"clear-button",onClick:T=>{T.stopPropagation(),g()},children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-icon-img ${f?"rotate-icon":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"black",fillOpacity:"0.54"})})}),f&&jsxRuntimeExports.jsx("ul",{className:"dropdown-options",children:e.map(T=>jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${t.includes(T.value)?"selected":""}`,onClick:b=>{b.stopPropagation(),E(T.value)},children:[n&&jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:t.includes(T.value)}),T.label]},T.value))})]})})},CELinearProgressBar=({duration:e,color:t="#4caf50",backgroundColor:i="#e0e0e0",height:n="10px",isActive:s=!1})=>{const a=React.useRef(null);return React.useEffect(()=>{const o=a.current;if(!(!o||!s))return o.style.width="0%",o.style.transition="none",o.offsetWidth,requestAnimationFrame(()=>{o&&(o.style.transition=`width ${e}ms linear`,o.style.width="100%")}),()=>{o&&(o.style.width="0%",o.style.transition="none")}},[e,s]),jsxRuntimeExports.jsx("div",{className:"snackbar__progress-container",style:{height:n},children:jsxRuntimeExports.jsx("div",{ref:a,className:"snackbar__progress-bar"})})},CEMenuBar=({menuData:e})=>{const[t,i]=React.useState({}),n=(c,f)=>{i(u=>({...u,[c]:f}))};useEscapeKey(()=>{i({})});const a=c=>c.children&&c.children.length>0,o=c=>c.some(f=>a(f)),l=(c,f="")=>!c||c.length===0?null:jsxRuntimeExports.jsx("ul",{className:f?"ce-submenu":"ce-dropdown",children:c.map(u=>{const x=f?`${f}-${u.name}`:u.name,d=a(u);return jsxRuntimeExports.jsxs("li",{className:`ce-dropdown-item ${d?"has-submenu":""}`,onMouseEnter:()=>d&&n(x,!0),onMouseLeave:()=>d&&n(x,!1),onClick:()=>console.log(`Clicked: ${u.name}`),children:[u.name,d&&jsxRuntimeExports.jsx("span",{className:"ce-icon right",children:"▶"}),d&&t[x]&&l(u.children,x)]},x)})});return jsxRuntimeExports.jsx("div",{className:"ce-menu-bar",children:jsxRuntimeExports.jsx("div",{className:"ce-menu-container",children:e.map(c=>{const f=o(c.items);return jsxRuntimeExports.jsxs("div",{className:"ce-menu-item",onMouseEnter:()=>f&&n(c.title,!0),onMouseLeave:()=>f&&n(c.title,!1),children:[jsxRuntimeExports.jsxs("button",{className:"ce-menu-button",children:[c.title,f&&jsxRuntimeExports.jsx("span",{className:"ce-icon",children:"▼"})]}),f&&t[c.title]&&l(c.items,c.title)]},c.title)})})})},CEPagination=({currentPage:e,totalPages:t,onPageChange:i})=>{const n=()=>{const c=[];if(t<=8)for(let f=0;f<t;f++)c.push(f);else if(e<7){for(let f=0;f<8;f++)c.push(f);c.push("..."),c.push(t-1)}else if(e>=t-8+1){c.push(0),c.push("...");for(let f=t-8;f<t;f++)c.push(f)}else{c.push(0),c.push("...");for(let f=e-3;f<=e+3;f++)c.push(f);c.push("..."),c.push(t-1)}return c},s=l=>{typeof l=="number"&&i(l)},a=()=>{e>0&&i(e-1)},o=()=>{e<t-1&&i(e+1)};return jsxRuntimeExports.jsxs("div",{className:"pagination",children:[jsxRuntimeExports.jsx("button",{onClick:a,disabled:e===0,className:"pagination-button",children:"Previous"}),n().map((l,c)=>typeof l=="number"?jsxRuntimeExports.jsx("button",{onClick:()=>s(l),className:`pagination-button page-number ${e===l?"active":""}`,children:l+1},c):jsxRuntimeExports.jsx("span",{className:"pagination-ellipsis",children:l},c)),jsxRuntimeExports.jsx("button",{onClick:o,disabled:e===t-1,className:"pagination-button",children:"Next"})]})},CERadioButtonGroup=({options:e,name:t,defaultValue:i,onChange:n,direction:s="horizontal"})=>{const[a,o]=React.useState(i||""),l=c=>{o(c),n(c)};return jsxRuntimeExports.jsx("div",{className:`radio-button-group ${s}`,role:"radiogroup","aria-labelledby":t,children:e.map(c=>jsxRuntimeExports.jsx("div",{className:"radio-button",children:jsxRuntimeExports.jsx(CERadioButton,{label:c.label,value:c.value,checked:a===c.value,onChange:l})},c.value))})},saveSelection=()=>{const e=window.getSelection();return e!=null&&e.rangeCount?e.getRangeAt(0):null},restoreSelection=e=>{if(e){const t=window.getSelection();t==null||t.removeAllRanges(),t==null||t.addRange(e)}},CERichTextEditor=({initialValue:e="",onChange:t,width:i="100%",height:n="auto",minHeight:s="200px",maxHeight:a="none",className:o="",style:l={},editorStyle:c={}})=>{const f=React.useRef(null),[u,x]=React.useState("3"),[d,y]=React.useState("Arial"),[m,p]=React.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1,subscript:!1,superscript:!1,justifyLeft:!0,justifyCenter:!1,justifyRight:!1,justifyFull:!1});React.useEffect(()=>{f.current&&e&&(f.current.innerHTML=e)},[e]);const E=React.useCallback(C=>{try{return document.queryCommandState(C)}catch{return!1}},[]),g=React.useCallback(()=>{p({bold:E("bold"),italic:E("italic"),underline:E("underline"),strikeThrough:E("strikethrough"),subscript:E("subscript"),superscript:E("superscript"),justifyLeft:E("justifyLeft"),justifyCenter:E("justifyCenter"),justifyRight:E("justifyRight"),justifyFull:E("justifyFull")})},[E]),S=React.useCallback((C,R="")=>{var P,j;const F=saveSelection(),L=document.getSelection();if(C==="createLink"){const B=prompt("Enter URL:");if(B){restoreSelection(F),document.execCommand("createLink",!1,B);const K=(P=L==null?void 0:L.anchorNode)==null?void 0:P.parentElement;K instanceof HTMLAnchorElement&&(K.target="_blank",K.rel="noopener noreferrer")}}else if(C==="insertImage"){const B=prompt("Enter image URL:");if(B){restoreSelection(F);const K=`<img src="${B}" alt="image" style="max-width: 100%; height: auto;"/>`;document.execCommand("insertHTML",!1,K)}}else C==="fontSize"||C==="fontName"?(restoreSelection(F),document.execCommand(C,!0,R),C==="fontSize"?x(R):y(R)):(restoreSelection(F),document.execCommand(C,!1,R));f.current&&(t==null||t(f.current.innerHTML)),(j=f.current)==null||j.focus(),g()},[t,g]),_=C=>{if(C.key==="Tab"&&(C.preventDefault(),document.execCommand("insertHTML",!1," ")),C.ctrlKey||C.metaKey)switch(C.key.toLowerCase()){case"z":C.preventDefault(),C.shiftKey?S("redo"):S("undo");break;case"y":C.preventDefault(),S("redo");break}},T=[{value:"1",label:"2"},{value:"2",label:"4"},{value:"3",label:"6"},{value:"4",label:"8"},{value:"5",label:"10"},{value:"6",label:"12"},{value:"7",label:"14"}],b=["Arial","Times New Roman","Courier New","Georgia","Verdana","Helvetica","Serif Fonts","Algerian"];return jsxRuntimeExports.jsxs("div",{className:`rich-text-editor ${o}`,style:{width:i,height:n,...l},children:[jsxRuntimeExports.jsxs("div",{className:"toolbar",children:[jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("bold"),className:`toolbar-button ${m.bold?"active":""}`,title:"Bold",children:jsxRuntimeExports.jsx("strong",{children:"B"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("italic"),className:`toolbar-button ${m.italic?"active":""}`,title:"Italic",children:jsxRuntimeExports.jsx("em",{children:"I"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("underline"),className:`toolbar-button ${m.underline?"active":""}`,title:"Underline",children:jsxRuntimeExports.jsx("u",{children:"U"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("strikeThrough"),className:`toolbar-button ${m.strikeThrough?"active":""}`,title:"Strike Through",children:jsxRuntimeExports.jsx("s",{children:"S"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("subscript"),className:`toolbar-button ${m.subscript?"active":""}`,title:"Subscript",children:"X₂"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("superscript"),className:`toolbar-button ${m.superscript?"active":""}`,title:"Superscript",children:"X²"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyLeft"),className:`toolbar-button ${m.justifyLeft?"active":""}`,title:"Align Left",children:"⇤"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyCenter"),className:`toolbar-button ${m.justifyCenter?"active":""}`,title:"Center",children:"⇔"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyRight"),className:`toolbar-button ${m.justifyRight?"active":""}`,title:"Align Right",children:"⇥"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>S("justifyFull"),className:`toolbar-button ${m.justifyFull?"active":""}`,title:"Justify",children:"≡"})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>S("insertUnorderedList"),className:"toolbar-button",title:"Bullet List",children:"●"}),jsxRuntimeExports.jsx("button",{onClick:()=>S("insertOrderedList"),className:"toolbar-button",title:"Numbered List",children:"1. 2. 3."})]}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:u,onChange:C=>S("fontSize",C.target.value),className:"toolbar-select",title:"Font Size",children:T.map(C=>jsxRuntimeExports.jsx("option",{value:C.value,children:C.label},C.value))})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:d,onChange:C=>S("fontName",C.target.value),className:"toolbar-select",title:"Font Family",children:b.map(C=>jsxRuntimeExports.jsx("option",{value:C,children:C},C))})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>S("createLink"),className:"toolbar-button",title:"Insert Link",children:"🔗"}),jsxRuntimeExports.jsx("button",{onClick:()=>S("insertImage"),className:"toolbar-button",title:"Insert Image",children:"📷"})]}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>S("undo"),className:"toolbar-button",title:"Undo (Ctrl+Z)",children:"↩"}),jsxRuntimeExports.jsx("button",{onClick:()=>S("redo"),className:"toolbar-button",title:"Redo (Ctrl+Y)",children:"↪"})]})]}),jsxRuntimeExports.jsx("div",{ref:f,className:"editor-content",contentEditable:!0,style:{minHeight:s,maxHeight:a,height:n==="auto"?"auto":"100%",...c},onKeyDown:_,onKeyUp:g,onMouseUp:g,onInput:()=>{f.current&&(t==null||t(f.current.innerHTML)),g()}})]})},CETabView=({tabs:e,renderContent:t})=>{const[i,n]=React.useState(e[0]);return jsxRuntimeExports.jsxs("div",{className:"tabview-container",children:[jsxRuntimeExports.jsx("div",{className:"tabview-sidebar",children:e.map(s=>jsxRuntimeExports.jsx("div",{className:`tabview-tab ${i===s?"tabview-tab-active":""}`,onClick:()=>n(s),children:s},s))}),jsxRuntimeExports.jsx("div",{className:"tabview-content",children:t(i)})]})},CETemplate=({children:e,headerProps:t,showHeader:i=!0,showFooter:n=!0,containerClassName:s="",containerStyle:a={}})=>jsxRuntimeExports.jsxs("div",{className:`ce-wrapper ${s}`,style:a,children:[i&&jsxRuntimeExports.jsx(CEHeader,{...t}),jsxRuntimeExports.jsx("main",{className:"main-content",children:e}),n&&jsxRuntimeExports.jsx(CEFooter,{})]}),CETimePicker=({label:e="Select Time",onChange:t,initialTime:i="",className:n=""})=>{const[s,a]=React.useState(!1),[o,l]=React.useState(i),[c,f]=React.useState("12"),[u,x]=React.useState("00"),[d,y]=React.useState("AM"),[m,p]=React.useState(!1),[E,g]=React.useState(""),[S,_]=React.useState(""),T=React.useRef(null),b=Array.from({length:12},(X,M)=>String(M+1).padStart(2,"0")),C=Array.from({length:60},(X,M)=>String(M).padStart(2,"0")),R=(X,M)=>{if(!X)return"";const V=parseInt(X);return M==="hours"?V>12?"12":V===0?"01":X.padStart(2,"0"):V>59?"59":X.padStart(2,"0")},F=X=>{const M=X.target.value,V=X.target.selectionStart||0;let A=c,k=u,I=d,D=o;if(V<=2){const O=M.substring(0,2).replace(/[^0-9]/g,"");if(O){if(O.length===1){const z=parseInt(O);z>=2&&z<=9?(A=O.padStart(2,"0"),setTimeout(()=>{T.current&&T.current.setSelectionRange(3,5)},10)):(A=O,setTimeout(()=>{T.current&&T.current.setSelectionRange(1,1)},10))}else if(O.length===2){const z=parseInt(O);z>=1&&z<=12?(A=O,setTimeout(()=>{T.current&&T.current.setSelectionRange(3,5)},10)):(A=O[0],setTimeout(()=>{T.current&&T.current.setSelectionRange(1,1)},10))}D=`${A}:${u} ${d}`}}else if(V>=3&&V<=5){const O=M.indexOf(":")+1,z=M.substring(O,O+2).replace(/[^0-9]/g,"");if(z){if(z.length===1)k=z,D=`${c}:${k} ${d}`,setTimeout(()=>{T.current&&T.current.setSelectionRange(4,4)},10);else if(z.length===2){const U=parseInt(z);U>=0&&U<=59?(k=z,setTimeout(()=>{T.current&&T.current.setSelectionRange(6,8)},10)):(k=z[0],setTimeout(()=>{T.current&&T.current.setSelectionRange(4,4)},10))}D=`${c}:${k} ${d}`}}else if(V>=6){const z=M.substring(M.lastIndexOf(" ")+1).toUpperCase();z.startsWith("A")?(I="AM",D=`${c}:${u} AM`):z.startsWith("P")&&(I="PM",D=`${c}:${u} PM`)}f(A),x(k),y(I),l(D),a(!1),t==null||t(D)},L=X=>{if(!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","0","1","2","3","4","5","6","7","8","9",":","A","P","M"," ","a","p","m"].includes(X.key)){X.preventDefault();return}if(X.key==="Enter"||X.key===":"){X.preventDefault();const V=X.currentTarget.selectionStart||0;if(V<=2){if(E){const A=R(E,"hours");f(A),g(""),l(`${A}:${u} ${d}`)}X.currentTarget.setSelectionRange(3,5)}else if(V>=3&&V<=5){if(S){const A=R(S,"minutes");x(A),_(""),l(`${c}:${A} ${d}`)}X.currentTarget.setSelectionRange(6,8)}}},P=X=>{const M=X.currentTarget.selectionStart||0,V=T.current;V&&(M<=1?V.setSelectionRange(0,2):M>=3&&M<=4?V.setSelectionRange(3,5):M>=6&&V.setSelectionRange(6,8))},j=()=>{a(!0),p(!0)},B=(X,M)=>{const V=X==="hours"?M:c,A=X==="minutes"?M:u,k=X==="period"?M:d;f(V),x(A),y(k);const I=`${V}:${A} ${k}`;l(I),t==null||t(I)},K=()=>{const X=`${c}:${u} ${d}`;l(X),a(!1),t==null||t(X)},ee=()=>{l(""),f("12"),x("00"),y("AM"),a(!1),p(!1)};return jsxRuntimeExports.jsxs("div",{className:`time-picker-container ${n}`,children:[jsxRuntimeExports.jsxs("div",{className:`time-picker-input ${s||m?"active":""}`,children:[jsxRuntimeExports.jsx("input",{ref:T,type:"text",value:o,onChange:F,onKeyDown:L,onClick:X=>{o||j(),P(X)},onFocus:()=>p(!0),onBlur:()=>!s&&p(!1),placeholder:m||o?"hh:mm AM":"",className:"time-input",maxLength:8}),jsxRuntimeExports.jsx("label",{className:`floating-label ${s||m||o?"active":""}`,children:e}),jsxRuntimeExports.jsx("span",{className:"clock-icon",onClick:X=>{X.stopPropagation(),j()},children:jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("path",{d:"M12 6v6l4 2"})]})})]}),jsxRuntimeExports.jsxs("div",{className:`time-picker-popup ${s?"open":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"time-picker-sections",children:[jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Hours"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:b.map(X=>jsxRuntimeExports.jsx("div",{className:`time-item ${X===c?"selected":""}`,onClick:()=>B("hours",X),children:X},X))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Minutes"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:C.map(X=>jsxRuntimeExports.jsx("div",{className:`time-item ${X===u?"selected":""}`,onClick:()=>B("minutes",X),children:X},X))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section period",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Period"}),jsxRuntimeExports.jsx("div",{className:"period-list",children:["AM","PM"].map(X=>jsxRuntimeExports.jsx("div",{className:`period-item ${X===d?"selected":""}`,onClick:()=>B("period",X),children:X},X))})]})]}),jsxRuntimeExports.jsxs("div",{className:"time-picker-actions",children:[jsxRuntimeExports.jsx("button",{className:"time-picker-button cancel",onClick:ee,children:"Cancel"}),jsxRuntimeExports.jsx("button",{className:"time-picker-button ok",onClick:K,children:"OK"})]})]})]})},TransferItem=({label:e,checked:t,onChange:i,disabled:n})=>jsxRuntimeExports.jsx(CECheckBox,{label:e,checked:t,onChange:i,disabled:n}),CETransferButton=({label:e,onClick:t,disabled:i=!1,className:n=""})=>jsxRuntimeExports.jsx("button",{onClick:t,disabled:i,className:`transfer-button ${n}`,children:e}),TransferList=({dataUrl:e,onTransfer:t,containerClass:i="",boxClass:n="",buttonClass:s=""})=>{const[a,o]=React.useState([]),[l,c]=React.useState([]),[f,u]=React.useState(!0),[x,d]=React.useState(null),[y,m]=React.useState(new Set),[p,E]=React.useState(new Set);React.useEffect(()=>{(async()=>{var C,R;try{u(!0),d(null);const L=(await axios.get(e)).data.items||[];o(L.slice(0,Math.ceil(L.length/2))),c(L.slice(Math.ceil(L.length/2)))}catch(F){d(axios.isAxiosError(F)?((R=(C=F.response)==null?void 0:C.data)==null?void 0:R.message)||F.message:"An error occurred")}finally{u(!1)}})()},[]);const g=b=>{if(b==="available"){const C=a.filter(F=>y.has(F.id)).sort((F,L)=>{const P=parseInt(F.id.replace(/\D/g,"")),j=parseInt(L.id.replace(/\D/g,""));return P-j}),R=a.filter(F=>!y.has(F.id));o(R),c(F=>[...F,...C].sort((P,j)=>{const B=parseInt(P.id.replace(/\D/g,"")),K=parseInt(j.id.replace(/\D/g,""));return B-K})),m(new Set)}else{const C=l.filter(F=>p.has(F.id)).sort((F,L)=>{const P=parseInt(F.id.replace(/\D/g,"")),j=parseInt(L.id.replace(/\D/g,""));return P-j}),R=l.filter(F=>!p.has(F.id));c(R),o(F=>[...F,...C].sort((P,j)=>{const B=parseInt(P.id.replace(/\D/g,"")),K=parseInt(j.id.replace(/\D/g,""));return B-K})),E(new Set)}t(l,a)},S=(b,C,R)=>{R(F=>{const L=new Set(F);return L.has(b)?L.delete(b):L.add(b),L})},_=(b,C,R)=>F=>{const L=new Set(C),P=b.filter(j=>!j.disabled);F?P.forEach(j=>L.add(j.id)):P.forEach(j=>L.delete(j.id)),R(L)},T=(b,C,R,F)=>{const L=b.filter(ee=>!ee.disabled),P=L.length>0&&L.every(ee=>C.has(ee.id)),j=C.size,B=b.length,K=b.length===0;return jsxRuntimeExports.jsxs("div",{className:`transfer-box ${n}`,children:[jsxRuntimeExports.jsx("div",{className:"transfer-box-header",children:jsxRuntimeExports.jsxs("div",{className:"header-content",children:[jsxRuntimeExports.jsx("div",{className:"checkbox-wrapper",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:P,onChange:_(b,C,R),disabled:K})}),jsxRuntimeExports.jsxs("div",{className:"title-section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:F}),jsxRuntimeExports.jsxs("div",{className:"count-text",children:[j,"/",B," selected"]})]})]})}),jsxRuntimeExports.jsx("div",{className:"transfer-items",children:b.map(ee=>jsxRuntimeExports.jsx(TransferItem,{label:ee.label,checked:C.has(ee.id),disabled:ee.disabled,onChange:()=>S(ee.id,C,R)},ee.id))})]})};return f?jsxRuntimeExports.jsx("div",{children:"Loading..."}):x?jsxRuntimeExports.jsxs("div",{children:["Error: ",x]}):jsxRuntimeExports.jsxs("div",{className:`transfer-list-container ${i}`,children:[T(a,y,m,"Choices"),jsxRuntimeExports.jsxs("div",{className:"transfer-buttons",children:[jsxRuntimeExports.jsx(CETransferButton,{label:">>",onClick:()=>g("available"),disabled:y.size===0,className:s}),jsxRuntimeExports.jsx(CETransferButton,{label:"<<",onClick:()=>g("chosen"),disabled:p.size===0,className:s})]}),T(l,p,E,"Chosen")]})},CEBadge=({label:e,backgroundColor:t="#e0e0e0",textColor:i="#000",style:n})=>jsxRuntimeExports.jsx("span",{style:{backgroundColor:t,color:i,padding:"4px 10px",borderRadius:"12px",fontSize:"12px",display:"inline-block",whiteSpace:"nowrap",...n},children:e}),chatIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%202.5H4C2.9%202.5%202.01%203.4%202.01%204.5L2%2022.5L6%2018.5H20C21.1%2018.5%2022%2017.6%2022%2016.5V4.5C22%203.4%2021.1%202.5%2020%202.5ZM7%209.5H17C17.55%209.5%2018%209.95%2018%2010.5C18%2011.05%2017.55%2011.5%2017%2011.5H7C6.45%2011.5%206%2011.05%206%2010.5C6%209.95%206.45%209.5%207%209.5ZM13%2014.5H7C6.45%2014.5%206%2014.05%206%2013.5C6%2012.95%206.45%2012.5%207%2012.5H13C13.55%2012.5%2014%2012.95%2014%2013.5C14%2014.05%2013.55%2014.5%2013%2014.5ZM17%208.5H7C6.45%208.5%206%208.05%206%207.5C6%206.95%206.45%206.5%207%206.5H17C17.55%206.5%2018%206.95%2018%207.5C18%208.05%2017.55%208.5%2017%208.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",CEChatbox=({notes:e,onAddNote:t,buttonLabel:i,buttonIcon:n})=>{const[s,a]=React.useState(""),o=()=>{t(s),a("")},l=c=>{c.key==="Enter"&&o()};return jsxRuntimeExports.jsxs("div",{className:"notes-container",children:[jsxRuntimeExports.jsxs("div",{className:"notes-header",children:[jsxRuntimeExports.jsx("img",{src:chatIcon,alt:"Chat Icon",className:"notes-icon"}),jsxRuntimeExports.jsx("span",{className:"notes-title",children:"Notes"})]}),jsxRuntimeExports.jsxs("div",{className:"add-note-section",children:[jsxRuntimeExports.jsx("textarea",{value:s,onChange:c=>a(c.target.value),onKeyPress:l,placeholder:"Add a note...",className:"add-note-input",rows:3}),jsxRuntimeExports.jsx(CEButton,{label:i,icon:n,variant:"outlinedGreen",onClick:o,sx:{width:"100%",marginTop:"10px"},children:void 0})]}),jsxRuntimeExports.jsx("div",{className:"notes-list",children:e.map(c=>jsxRuntimeExports.jsxs("div",{className:"note-item",children:[jsxRuntimeExports.jsx("div",{className:"note-avatar",children:c.initials}),jsxRuntimeExports.jsxs("div",{className:"note-content",children:[jsxRuntimeExports.jsxs("div",{className:"note-header",children:[jsxRuntimeExports.jsx("span",{className:"note-author",children:c.author}),jsxRuntimeExports.jsx("span",{className:"note-timestamp",children:c.timestamp})]}),jsxRuntimeExports.jsx("div",{className:"note-text",children:c.content})]})]},c.id))})]})},CEStatusDropdown=({options:e,selected:t,onChange:i,placeholder:n="Select status...",size:s="medium",disabled:a=!1,ariaLabel:o="Status selection dropdown"})=>{const[l,c]=React.useState(!1),f=React.useRef(null),u=e.find(p=>p.value===t),x=p=>{i(p),c(!1)};React.useEffect(()=>{const p=E=>{var g;(g=f.current)!=null&&g.contains(E.target)||c(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const d=p=>{a||(p.key==="Enter"||p.key===" "?(p.preventDefault(),c(!l)):p.key==="Escape"&&c(!1))},y=p=>{if(p!=null&&p.statusType)switch(p.statusType){case"in-progress":return"in-progress";case"declined":return"declined";case"withdrawn":return"withdrawn";default:return""}return""},m=()=>{if(u){const p={};return u.backgroundColor&&(p.backgroundColor=u.backgroundColor),u.textColor&&(p.color=u.textColor),p}return{}};return jsxRuntimeExports.jsxs("div",{className:`status-dropdown-container ${a?"disabled":""} size-${s}`,ref:f,children:[jsxRuntimeExports.jsxs("div",{className:`status-dropdown-trigger ${l?"open":""} ${u?`has-selection ${y(u)}`:""}`,onClick:()=>!a&&c(!l),onKeyDown:d,tabIndex:a?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":l?"true":"false","aria-label":o,style:m(),children:[jsxRuntimeExports.jsx("span",{className:"status-text",children:u?u.label:n}),jsxRuntimeExports.jsx("span",{className:"status-dropdown-icon",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-arrow ${l?"rotate":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"currentColor",fillOpacity:"0.7"})})})]}),l&&!a&&jsxRuntimeExports.jsx("ul",{className:"status-dropdown-options",role:"listbox","aria-label":"Status options",children:e.map(p=>{const E={};return p.backgroundColor&&(E.backgroundColor=p.backgroundColor),p.textColor&&(E.color=p.textColor),jsxRuntimeExports.jsxs("li",{className:`status-dropdown-option ${t===p.value?"selected":""} ${y(p)}`,onClick:()=>x(p.value),role:"option","aria-selected":t===p.value?"true":"false",style:E,children:[jsxRuntimeExports.jsx("span",{className:"option-indicator",children:p.icon?p.icon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[p.statusType==="declined"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ff4757"}),jsxRuntimeExports.jsx("path",{d:"M15 9l-6 6m0-6l6 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),p.statusType==="withdrawn"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ffa502"}),jsxRuntimeExports.jsx("path",{d:"M12 8v4M12 16h.01",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),p.statusType==="in-progress"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#5f27cd"}),jsxRuntimeExports.jsx("path",{d:"M8 12l2 2 4-4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}),p.label]},p.value)})})]})};exports.CEAutoSuggestInput=CEAutoSuggestInput;exports.CEAvatarMenu=CEAvatarMenu;exports.CEBadge=CEBadge;exports.CEBreadcrumbs=Breadcrumbs;exports.CEButton=CEButton;exports.CEChatbox=CEChatbox;exports.CECheckbox=CECheckBox;exports.CEChipInput=CEChipInput;exports.CEDataGridDynamicTable=CEDataGridDynamicTable;exports.CEDatePicker=CEDatePicker;exports.CEDateRangePicker=CEDateRangePicker;exports.CEDialogBox=CEDialogBox;exports.CEDrawer=CEDrawer;exports.CEDynamicSearchField=CEDynamicSearchField;exports.CEDynamicSelectField=CEDynamicSelectField;exports.CEDynamicTextField=CEDynamicTextField;exports.CEFieldsInput=FieldsInput;exports.CEFileUpload=CEFileUpload;exports.CEFileUploadDocument=CEFileUploadDocument;exports.CEFooter=CEFooter;exports.CEGridItem=CEGridItem;exports.CEGridLayout=CEGridLayout;exports.CEGridMenuButton=CEGridMenuButton;exports.CEHamburgerButton=CEHamburgerButton;exports.CEHeader=CEHeader;exports.CEInputBox=CEInputBox;exports.CEInputDropDown=InputDropDown;exports.CELinearProgressBar=CELinearProgressBar;exports.CELogo=CELogo;exports.CEMenuBar=CEMenuBar;exports.CEMessageModal=CEMessageModal;exports.CEModalPopUp=CECustomModal;exports.CENotificationButton=CENotificationButton;exports.CEPagination=CEPagination;exports.CERadioButton=CERadioButton;exports.CERadioGroup=CERadioButtonGroup;exports.CERichTextEditor=CERichTextEditor;exports.CESearchBar=CESearchBar;exports.CESearchButton=CESearchButton;exports.CESkeletonTable=CESkeletonTable;exports.CESnackBar=CESnackBar;exports.CEStatusDropdown=CEStatusDropdown;exports.CEStepper=CEStepper;exports.CETabView=CETabView;exports.CETemplate=CETemplate;exports.CETimePicker=CETimePicker;exports.CETransferButton=CETransferButton;exports.CETruncatedTextWithTooltip=CETruncatedTextWithTooltip;exports.CEUploadModalWrapper=CEUploadModalWrapper;exports.CEUserInfo=CEUserInfo;exports.CeBox=CeBox;exports.TransferList=TransferList;
|
|
@@ -41228,7 +41228,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
41228
41228
|
}
|
|
41229
41229
|
)
|
|
41230
41230
|
}
|
|
41231
|
-
), CEGridLayout = ({
|
|
41231
|
+
), CEGridItem = ({ children: e, size: t = 1 }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { gridColumn: `span ${t}` }, children: e }), CEGridLayout = ({
|
|
41232
41232
|
children: e,
|
|
41233
41233
|
columns: t = 12,
|
|
41234
41234
|
gap: i = "1rem",
|
|
@@ -42853,6 +42853,7 @@ export {
|
|
|
42853
42853
|
CEFileUpload,
|
|
42854
42854
|
CEFileUploadDocument,
|
|
42855
42855
|
CEFooter,
|
|
42856
|
+
CEGridItem,
|
|
42856
42857
|
CEGridLayout,
|
|
42857
42858
|
CEGridMenuButton,
|
|
42858
42859
|
CEHamburgerButton,
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { default as CEDateRangePicker } from './components/Common/DateRangePicke
|
|
|
21
21
|
export { default as CEFieldsInput } from './components/Common/Fields/CEFields';
|
|
22
22
|
export { default as CEModalPopUp } from './components/Common/CEModalPopUp/CEModalPopUp';
|
|
23
23
|
export { default as CEFooter } from './components/Common/Footer/CEFooter';
|
|
24
|
-
export { CEGridLayout } from './components/Common/GridLayout/CEGridLayout';
|
|
24
|
+
export { CEGridLayout, CEGridItem } from './components/Common/GridLayout/CEGridLayout';
|
|
25
25
|
export { default as CEHeader } from './components/Common/Header/CEHeader';
|
|
26
26
|
export { default as CEAvatarMenu } from './components/Common/Header/AvatarMenu';
|
|
27
27
|
export { default as CEGridMenuButton } from './components/Common/Header/GridMenuButton';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cecomponent",
|
|
3
3
|
"description": "A React component library for building modern UIs for Cleanearth",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.97",
|
|
5
5
|
"main": "dist/ce-component-lib.js",
|
|
6
6
|
"module": "dist/ce-component-lib.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|