cecomponent 2.0.101 → 2.0.102
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
CHANGED
|
@@ -344,7 +344,7 @@ i.goToAndStop(b-i.firstFrame-1,!0)}S.type==="loop"&&(d===null||d!==S.frames||i.i
|
|
|
344
344
|
`),p.push(` </office:body>
|
|
345
345
|
`),f.bookType=="fods"?p.push("</office:document>"):p.push("</office:document-content>"),p.join("")}})();function write_ods(e,t){if(t.bookType=="fods")return write_content_ods(e,t);var n=zip_new(),i="",o=[],l=[];return i="mimetype",zip_add_file(n,i,"application/vnd.oasis.opendocument.spreadsheet"),i="content.xml",zip_add_file(n,i,write_content_ods(e,t)),o.push([i,"text/xml"]),l.push([i,"ContentFile"]),i="styles.xml",zip_add_file(n,i,write_styles_ods(e,t)),o.push([i,"text/xml"]),l.push([i,"StylesFile"]),i="meta.xml",zip_add_file(n,i,XML_HEADER+write_meta_ods()),o.push([i,"text/xml"]),l.push([i,"MetadataFile"]),i="manifest.rdf",zip_add_file(n,i,write_rdf(l)),o.push([i,"application/rdf+xml"]),i="META-INF/manifest.xml",zip_add_file(n,i,write_manifest(o)),n}/*! 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 n=0;n<=e.length-t.length;++n){for(var i=0;i<t.length;++i)if(e[n+i]!=t[i])continue e;return!0}return!1}function u8concat(e){var t=e.reduce(function(o,l){return o+l.length},0),n=new Uint8Array(t),i=0;return e.forEach(function(o){n.set(o,i),i+=o.length}),n}function writeDecimal128LE(e,t,n){var i=Math.floor(n==0?0:Math.LOG10E*Math.log(Math.abs(n)))+6176-20,o=n/Math.pow(10,i-6176);e[t+15]|=i>>7,e[t+14]|=(i&127)<<1;for(var l=0;o>=1;++l,o/=256)e[t+l]=o&255;e[t+15]|=n>=0?0:128}function parse_varint49(e,t){var n=t?t[0]:0,i=e[n]&127;e:if(e[n++]>=128&&(i|=(e[n]&127)<<7,e[n++]<128||(i|=(e[n]&127)<<14,e[n++]<128)||(i|=(e[n]&127)<<21,e[n++]<128)||(i+=(e[n]&127)*Math.pow(2,28),++n,e[n++]<128)||(i+=(e[n]&127)*Math.pow(2,35),++n,e[n++]<128)||(i+=(e[n]&127)*Math.pow(2,42),++n,e[n++]<128)))break e;return t&&(t[0]=n),i}function write_varint49(e){var t=new Uint8Array(7);t[0]=e&127;var n=1;e:if(e>127){if(t[n-1]|=128,t[n]=e>>7&127,++n,e<=16383||(t[n-1]|=128,t[n]=e>>14&127,++n,e<=2097151)||(t[n-1]|=128,t[n]=e>>21&127,++n,e<=268435455)||(t[n-1]|=128,t[n]=e/256>>>21&127,++n,e<=34359738367)||(t[n-1]|=128,t[n]=e/65536>>>21&127,++n,e<=4398046511103))break e;t[n-1]|=128,t[n]=e/16777216>>>21&127,++n}return t.slice(0,n)}function varint_to_i32(e){var t=0,n=e[t]&127;e:if(e[t++]>=128){if(n|=(e[t]&127)<<7,e[t++]<128||(n|=(e[t]&127)<<14,e[t++]<128)||(n|=(e[t]&127)<<21,e[t++]<128))break e;n|=(e[t]&127)<<28}return n}function parse_shallow(e){for(var t=[],n=[0];n[0]<e.length;){var i=n[0],o=parse_varint49(e,n),l=o&7;o=Math.floor(o/8);var u=0,f;if(o==0)break;switch(l){case 0:{for(var p=n[0];e[n[0]++]>=128;);f=e.slice(p,n[0])}break;case 5:u=4,f=e.slice(n[0],n[0]+u),n[0]+=u;break;case 1:u=8,f=e.slice(n[0],n[0]+u),n[0]+=u;break;case 2:u=parse_varint49(e,n),f=e.slice(n[0],n[0]+u),n[0]+=u;break;case 3:case 4:default:throw new Error("PB Type ".concat(l," for Field ").concat(o," at offset ").concat(i))}var m={data:f,type:l};t[o]==null?t[o]=[m]:t[o].push(m)}return t}function write_shallow(e){var t=[];return e.forEach(function(n,i){n.forEach(function(o){o.data&&(t.push(write_varint49(i*8+o.type)),o.type==2&&t.push(write_varint49(o.data.length)),t.push(o.data))})}),u8concat(t)}function parse_iwa_file(e){for(var t,n=[],i=[0];i[0]<e.length;){var o=parse_varint49(e,i),l=parse_shallow(e.slice(i[0],i[0]+o));i[0]+=o;var u={id:varint_to_i32(l[1][0].data),messages:[]};l[2].forEach(function(f){var p=parse_shallow(f.data),m=varint_to_i32(p[3][0].data);u.messages.push({meta:p,data:e.slice(i[0],i[0]+m)}),i[0]+=m}),(t=l[3])!=null&&t[0]&&(u.merge=varint_to_i32(l[3][0].data)>>>0>0),n.push(u)}return n}function write_iwa_file(e){var t=[];return e.forEach(function(n){var i=[];i[1]=[{data:write_varint49(n.id),type:0}],i[2]=[],n.merge!=null&&(i[3]=[{data:write_varint49(+!!n.merge),type:0}]);var o=[];n.messages.forEach(function(u){o.push(u.data),u.meta[3]=[{type:0,data:write_varint49(u.data.length)}],i[2].push({data:write_shallow(u.meta),type:2})});var l=write_shallow(i);t.push(write_varint49(l.length)),t.push(l),o.forEach(function(u){return t.push(u)})}),u8concat(t)}function parse_snappy_chunk(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var n=[0],i=parse_varint49(t,n),o=[];n[0]<t.length;){var l=t[n[0]]&3;if(l==0){var u=t[n[0]++]>>2;if(u<60)++u;else{var f=u-59;u=t[n[0]],f>1&&(u|=t[n[0]+1]<<8),f>2&&(u|=t[n[0]+2]<<16),f>3&&(u|=t[n[0]+3]<<24),u>>>=0,u++,n[0]+=f}o.push(t.slice(n[0],n[0]+u)),n[0]+=u;continue}else{var p=0,m=0;if(l==1?(m=(t[n[0]]>>2&7)+4,p=(t[n[0]++]&224)<<3,p|=t[n[0]++]):(m=(t[n[0]++]>>2)+1,l==2?(p=t[n[0]]|t[n[0]+1]<<8,n[0]+=2):(p=(t[n[0]]|t[n[0]+1]<<8|t[n[0]+2]<<16|t[n[0]+3]<<24)>>>0,n[0]+=4)),o=[u8concat(o)],p==0)throw new Error("Invalid offset 0");if(p>o[0].length)throw new Error("Invalid offset beyond length");if(m>=p)for(o.push(o[0].slice(-p)),m-=p;m>=o[o.length-1].length;)o.push(o[o.length-1]),m-=o[o.length-1].length;o.push(o[0].slice(-p,-p+m))}}var d=u8concat(o);if(d.length!=i)throw new Error("Unexpected length: ".concat(d.length," != ").concat(i));return d}function decompress_iwa_file(e){for(var t=[],n=0;n<e.length;){var i=e[n++],o=e[n]|e[n+1]<<8|e[n+2]<<16;n+=3,t.push(parse_snappy_chunk(i,e.slice(n,n+o))),n+=o}if(n!==e.length)throw new Error("data is not a valid framed stream!");return u8concat(t)}function compress_iwa_file(e){for(var t=[],n=0;n<e.length;){var i=Math.min(e.length-n,268435455),o=new Uint8Array(4);t.push(o);var l=write_varint49(i),u=l.length;t.push(l),i<=60?(u++,t.push(new Uint8Array([i-1<<2]))):i<=256?(u+=2,t.push(new Uint8Array([240,i-1&255]))):i<=65536?(u+=3,t.push(new Uint8Array([244,i-1&255,i-1>>8&255]))):i<=16777216?(u+=4,t.push(new Uint8Array([248,i-1&255,i-1>>8&255,i-1>>16&255]))):i<=4294967296&&(u+=5,t.push(new Uint8Array([252,i-1&255,i-1>>8&255,i-1>>16&255,i-1>>>24&255]))),t.push(e.slice(n,n+i)),u+=i,o[0]=0,o[1]=u&255,o[2]=u>>8&255,o[3]=u>>16&255,n+=i}return u8concat(t)}function write_new_storage(e,t){var n=new Uint8Array(32),i=u8_to_dataview(n),o=12,l=0;switch(n[0]=5,e.t){case"n":n[1]=2,writeDecimal128LE(n,o,e.v),l|=1,o+=16;break;case"b":n[1]=6,i.setFloat64(o,e.v?1:0,!0),l|=2,o+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));n[1]=3,i.setUint32(o,t.indexOf(e.v),!0),l|=8,o+=4;break;default:throw"unsupported cell type "+e.t}return i.setUint32(8,l,!0),n.slice(0,o)}function write_old_storage(e,t){var n=new Uint8Array(32),i=u8_to_dataview(n),o=12,l=0;switch(n[0]=3,e.t){case"n":n[2]=2,i.setFloat64(o,e.v,!0),l|=32,o+=8;break;case"b":n[2]=6,i.setFloat64(o,e.v?1:0,!0),l|=32,o+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));n[2]=3,i.setUint32(o,t.indexOf(e.v),!0),l|=16,o+=4;break;default:throw"unsupported cell type "+e.t}return i.setUint32(4,l,!0),n.slice(0,o)}function parse_TSP_Reference(e){var t=parse_shallow(e);return parse_varint49(t[1][0].data)}function write_tile_row(e,t,n){var i,o,l,u;if(!((i=e[6])!=null&&i[0])||!((o=e[7])!=null&&o[0]))throw"Mutation only works on post-BNC storages!";var f=((u=(l=e[8])==null?void 0:l[0])==null?void 0:u.data)&&varint_to_i32(e[8][0].data)>0||!1;if(f)throw"Math only works with normal offsets";for(var p=0,m=u8_to_dataview(e[7][0].data),d=0,g=[],_=u8_to_dataview(e[4][0].data),E=0,S=[],b=0;b<t.length;++b){if(t[b]==null){m.setUint16(b*2,65535,!0),_.setUint16(b*2,65535);continue}m.setUint16(b*2,d,!0),_.setUint16(b*2,E,!0);var T,C;switch(typeof t[b]){case"string":T=write_new_storage({t:"s",v:t[b]},n),C=write_old_storage({t:"s",v:t[b]},n);break;case"number":T=write_new_storage({t:"n",v:t[b]},n),C=write_old_storage({t:"n",v:t[b]},n);break;case"boolean":T=write_new_storage({t:"b",v:t[b]},n),C=write_old_storage({t:"b",v:t[b]},n);break;default:throw new Error("Unsupported value "+t[b])}g.push(T),d+=T.length,S.push(C),E+=C.length,++p}for(e[2][0].data=write_varint49(p);b<e[7][0].data.length/2;++b)m.setUint16(b*2,65535,!0),_.setUint16(b*2,65535,!0);return e[6][0].data=u8concat(g),e[3][0].data=u8concat(S),p}function write_numbers_iwa(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var n=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var i=decode_range(n["!ref"]);i.s.r=i.s.c=0;var o=!1;i.e.c>9&&(o=!0,i.e.c=9),i.e.r>49&&(o=!0,i.e.r=49),o&&console.error("The Numbers writer is currently limited to ".concat(encode_range(i)));var l=sheet_to_json(n,{range:i,header:1}),u=["~Sh33tJ5~"];l.forEach(function(q){return q.forEach(function(H){typeof H=="string"&&u.push(H)})});var f={},p=[],m=CFB.read(t.numbers,{type:"base64"});m.FileIndex.map(function(q,H){return[q,m.FullPaths[H]]}).forEach(function(q){var H=q[0],Q=q[1];if(H.type==2&&H.name.match(/\.iwa/)){var ue=H.content,de=decompress_iwa_file(ue),Se=parse_iwa_file(de);Se.forEach(function(pe){p.push(pe.id),f[pe.id]={deps:[],location:Q,type:varint_to_i32(pe.messages[0].meta[1][0].data)}})}}),p.sort(function(q,H){return q-H});var d=p.filter(function(q){return q>1}).map(function(q){return[q,write_varint49(q)]});m.FileIndex.map(function(q,H){return[q,m.FullPaths[H]]}).forEach(function(q){var H=q[0];if(q[1],!!H.name.match(/\.iwa/)){var Q=parse_iwa_file(decompress_iwa_file(H.content));Q.forEach(function(ue){ue.messages.forEach(function(de){d.forEach(function(Se){ue.messages.some(function(pe){return varint_to_i32(pe.meta[1][0].data)!=11006&&u8contains(pe.data,Se[1])})&&f[Se[0]].deps.push(ue.id)})})})}});for(var g=CFB.find(m,f[1].location),_=parse_iwa_file(decompress_iwa_file(g.content)),E,S=0;S<_.length;++S){var b=_[S];b.id==1&&(E=b)}var T=parse_TSP_Reference(parse_shallow(E.messages[0].data)[1][0].data);for(g=CFB.find(m,f[T].location),_=parse_iwa_file(decompress_iwa_file(g.content)),S=0;S<_.length;++S)b=_[S],b.id==T&&(E=b);for(T=parse_TSP_Reference(parse_shallow(E.messages[0].data)[2][0].data),g=CFB.find(m,f[T].location),_=parse_iwa_file(decompress_iwa_file(g.content)),S=0;S<_.length;++S)b=_[S],b.id==T&&(E=b);for(T=parse_TSP_Reference(parse_shallow(E.messages[0].data)[2][0].data),g=CFB.find(m,f[T].location),_=parse_iwa_file(decompress_iwa_file(g.content)),S=0;S<_.length;++S)b=_[S],b.id==T&&(E=b);var C=parse_shallow(E.messages[0].data);{C[6][0].data=write_varint49(i.e.r+1),C[7][0].data=write_varint49(i.e.c+1);var A=parse_TSP_Reference(C[46][0].data),R=CFB.find(m,f[A].location),O=parse_iwa_file(decompress_iwa_file(R.content));{for(var j=0;j<O.length&&O[j].id!=A;++j);if(O[j].id!=A)throw"Bad ColumnRowUIDMapArchive";var I=parse_shallow(O[j].messages[0].data);I[1]=[],I[2]=[],I[3]=[];for(var D=0;D<=i.e.c;++D){var F=[];F[1]=F[2]=[{type:0,data:write_varint49(D+420690)}],I[1].push({type:2,data:write_shallow(F)}),I[2].push({type:0,data:write_varint49(D)}),I[3].push({type:0,data:write_varint49(D)})}I[4]=[],I[5]=[],I[6]=[];for(var B=0;B<=i.e.r;++B)F=[],F[1]=F[2]=[{type:0,data:write_varint49(B+726270)}],I[4].push({type:2,data:write_shallow(F)}),I[5].push({type:0,data:write_varint49(B)}),I[6].push({type:0,data:write_varint49(B)});O[j].messages[0].data=write_shallow(I)}R.content=compress_iwa_file(write_iwa_file(O)),R.size=R.content.length,delete C[46];var X=parse_shallow(C[4][0].data);{X[7][0].data=write_varint49(i.e.r+1);var U=parse_shallow(X[1][0].data),N=parse_TSP_Reference(U[2][0].data);R=CFB.find(m,f[N].location),O=parse_iwa_file(decompress_iwa_file(R.content));{if(O[0].id!=N)throw"Bad HeaderStorageBucket";var G=parse_shallow(O[0].messages[0].data);for(B=0;B<l.length;++B){var ee=parse_shallow(G[2][0].data);ee[1][0].data=write_varint49(B),ee[4][0].data=write_varint49(l[B].length),G[2][B]={type:G[2][0].type,data:write_shallow(ee)}}O[0].messages[0].data=write_shallow(G)}R.content=compress_iwa_file(write_iwa_file(O)),R.size=R.content.length;var te=parse_TSP_Reference(X[2][0].data);R=CFB.find(m,f[te].location),O=parse_iwa_file(decompress_iwa_file(R.content));{if(O[0].id!=te)throw"Bad HeaderStorageBucket";for(G=parse_shallow(O[0].messages[0].data),D=0;D<=i.e.c;++D)ee=parse_shallow(G[2][0].data),ee[1][0].data=write_varint49(D),ee[4][0].data=write_varint49(i.e.r+1),G[2][D]={type:G[2][0].type,data:write_shallow(ee)};O[0].messages[0].data=write_shallow(G)}R.content=compress_iwa_file(write_iwa_file(O)),R.size=R.content.length;var z=parse_TSP_Reference(X[4][0].data);(function(){for(var q=CFB.find(m,f[z].location),H=parse_iwa_file(decompress_iwa_file(q.content)),Q,ue=0;ue<H.length;++ue){var de=H[ue];de.id==z&&(Q=de)}var Se=parse_shallow(Q.messages[0].data);{Se[3]=[];var pe=[];u.forEach(function(ie,Ie){pe[1]=[{type:0,data:write_varint49(Ie)}],pe[2]=[{type:0,data:write_varint49(1)}],pe[3]=[{type:2,data:stru8(ie)}],Se[3].push({type:2,data:write_shallow(pe)})})}Q.messages[0].data=write_shallow(Se);var ye=write_iwa_file(H),Ae=compress_iwa_file(ye);q.content=Ae,q.size=q.content.length})();var K=parse_shallow(X[3][0].data);{var L=K[1][0];delete K[2];var W=parse_shallow(L.data);{var Y=parse_TSP_Reference(W[2][0].data);(function(){for(var q=CFB.find(m,f[Y].location),H=parse_iwa_file(decompress_iwa_file(q.content)),Q,ue=0;ue<H.length;++ue){var de=H[ue];de.id==Y&&(Q=de)}var Se=parse_shallow(Q.messages[0].data);{delete Se[6],delete K[7];var pe=new Uint8Array(Se[5][0].data);Se[5]=[];for(var ye=0,Ae=0;Ae<=i.e.r;++Ae){var ie=parse_shallow(pe);ye+=write_tile_row(ie,l[Ae],u),ie[1][0].data=write_varint49(Ae),Se[5].push({data:write_shallow(ie),type:2})}Se[1]=[{type:0,data:write_varint49(i.e.c+1)}],Se[2]=[{type:0,data:write_varint49(i.e.r+1)}],Se[3]=[{type:0,data:write_varint49(ye)}],Se[4]=[{type:0,data:write_varint49(i.e.r+1)}]}Q.messages[0].data=write_shallow(Se);var Ie=write_iwa_file(H),we=compress_iwa_file(Ie);q.content=we,q.size=q.content.length})()}L.data=write_shallow(W)}X[3][0].data=write_shallow(K)}C[4][0].data=write_shallow(X)}E.messages[0].data=write_shallow(C);var V=write_iwa_file(_),M=compress_iwa_file(V);return g.content=M,g.size=g.content.length,m}function fix_opts_func(e){return function(n){for(var i=0;i!=e.length;++i){var o=e[i];n[o[0]]===void 0&&(n[o[0]]=o[1]),o[2]==="n"&&(n[o[0]]=Number(n[o[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 n=t.bookType=="xlsb"?"bin":"xml",i=VBAFMTS.indexOf(t.bookType)>-1,o=new_ct();fix_write_opts(t=t||{});var l=zip_new(),u="",f=0;if(t.cellXfs=[],get_cell_style(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),u="docProps/core.xml",zip_add_file(l,u,write_core_props(e.Props,t)),o.coreprops.push(u),add_rels(t.rels,2,u,RELS.CORE_PROPS),u="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var p=[],m=0;m<e.SheetNames.length;++m)(e.Workbook.Sheets[m]||{}).Hidden!=2&&p.push(e.SheetNames[m]);e.Props.SheetNames=p}for(e.Props.Worksheets=e.Props.SheetNames.length,zip_add_file(l,u,write_ext_props(e.Props)),o.extprops.push(u),add_rels(t.rels,3,u,RELS.EXT_PROPS),e.Custprops!==e.Props&&keys(e.Custprops||{}).length>0&&(u="docProps/custom.xml",zip_add_file(l,u,write_cust_props(e.Custprops)),o.custprops.push(u),add_rels(t.rels,4,u,RELS.CUST_PROPS)),f=1;f<=e.SheetNames.length;++f){var d={"!id":{}},g=e.Sheets[e.SheetNames[f-1]],_=(g||{})["!type"]||"sheet";switch(_){case"chart":default:u="xl/worksheets/sheet"+f+"."+n,zip_add_file(l,u,write_ws(f-1,u,t,e,d)),o.sheets.push(u),add_rels(t.wbrels,-1,"worksheets/sheet"+f+"."+n,RELS.WS[0])}if(g){var E=g["!comments"],S=!1,b="";E&&E.length>0&&(b="xl/comments"+f+"."+n,zip_add_file(l,b,write_cmnt(E,b)),o.comments.push(b),add_rels(d,-1,"../comments"+f+"."+n,RELS.CMNT),S=!0),g["!legacy"]&&S&&zip_add_file(l,"xl/drawings/vmlDrawing"+f+".vml",write_comments_vml(f,g["!comments"])),delete g["!comments"],delete g["!legacy"]}d["!id"].rId1&&zip_add_file(l,get_rels_path(u),write_rels(d))}return t.Strings!=null&&t.Strings.length>0&&(u="xl/sharedStrings."+n,zip_add_file(l,u,write_sst(t.Strings,u,t)),o.strs.push(u),add_rels(t.wbrels,-1,"sharedStrings."+n,RELS.SST)),u="xl/workbook."+n,zip_add_file(l,u,write_wb(e,u)),o.workbooks.push(u),add_rels(t.rels,1,u,RELS.WB),u="xl/theme/theme1.xml",zip_add_file(l,u,write_theme(e.Themes,t)),o.themes.push(u),add_rels(t.wbrels,-1,"theme/theme1.xml",RELS.THEME),u="xl/styles."+n,zip_add_file(l,u,write_sty(e,u,t)),o.styles.push(u),add_rels(t.wbrels,-1,"styles."+n,RELS.STY),e.vbaraw&&i&&(u="xl/vbaProject.bin",zip_add_file(l,u,e.vbaraw),o.vba.push(u),add_rels(t.wbrels,-1,"vbaProject.bin",RELS.VBA)),u="xl/metadata."+n,zip_add_file(l,u,write_xlmeta(u)),o.metadata.push(u),add_rels(t.wbrels,-1,"metadata."+n,RELS.XLMETA),zip_add_file(l,"[Content_Types].xml",write_ct(o,t)),zip_add_file(l,"_rels/.rels",write_rels(t.rels)),zip_add_file(l,"xl/_rels/workbook."+n+".rels",write_rels(t.wbrels)),delete t.revssf,delete t.ssf,l}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 n="xml",i=VBAFMTS.indexOf(t.bookType)>-1,o=new_ct();fix_write_opts(t=t||{});var l=zip_new(),u="",f=0;if(t.cellXfs=[],get_cell_style(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),u="docProps/core.xml",zip_add_file(l,u,write_core_props(e.Props,t)),o.coreprops.push(u),add_rels(t.rels,2,u,RELS.CORE_PROPS),u="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var p=[],m=0;m<e.SheetNames.length;++m)(e.Workbook.Sheets[m]||{}).Hidden!=2&&p.push(e.SheetNames[m]);e.Props.SheetNames=p}e.Props.Worksheets=e.Props.SheetNames.length,zip_add_file(l,u,write_ext_props(e.Props)),o.extprops.push(u),add_rels(t.rels,3,u,RELS.EXT_PROPS),e.Custprops!==e.Props&&keys(e.Custprops||{}).length>0&&(u="docProps/custom.xml",zip_add_file(l,u,write_cust_props(e.Custprops)),o.custprops.push(u),add_rels(t.rels,4,u,RELS.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,f=1;f<=e.SheetNames.length;++f){var g={"!id":{}},_=e.Sheets[e.SheetNames[f-1]],E=(_||{})["!type"]||"sheet";switch(E){case"chart":default:u="xl/worksheets/sheet"+f+"."+n,zip_add_file(l,u,write_ws_xml(f-1,t,e,g)),o.sheets.push(u),add_rels(t.wbrels,-1,"worksheets/sheet"+f+"."+n,RELS.WS[0])}if(_){var S=_["!comments"],b=!1,T="";if(S&&S.length>0){var C=!1;S.forEach(function(A){A[1].forEach(function(R){R.T==!0&&(C=!0)})}),C&&(T="xl/threadedComments/threadedComment"+f+"."+n,zip_add_file(l,T,write_tcmnt_xml(S,d,t)),o.threadedcomments.push(T),add_rels(g,-1,"../threadedComments/threadedComment"+f+"."+n,RELS.TCMNT)),T="xl/comments"+f+"."+n,zip_add_file(l,T,write_comments_xml(S)),o.comments.push(T),add_rels(g,-1,"../comments"+f+"."+n,RELS.CMNT),b=!0}_["!legacy"]&&b&&zip_add_file(l,"xl/drawings/vmlDrawing"+f+".vml",write_comments_vml(f,_["!comments"])),delete _["!comments"],delete _["!legacy"]}g["!id"].rId1&&zip_add_file(l,get_rels_path(u),write_rels(g))}return t.Strings!=null&&t.Strings.length>0&&(u="xl/sharedStrings."+n,zip_add_file(l,u,write_sst_xml(t.Strings,t)),o.strs.push(u),add_rels(t.wbrels,-1,"sharedStrings."+n,RELS.SST)),u="xl/workbook."+n,zip_add_file(l,u,write_wb_xml(e)),o.workbooks.push(u),add_rels(t.rels,1,u,RELS.WB),u="xl/theme/theme1.xml",zip_add_file(l,u,write_theme(e.Themes,t)),o.themes.push(u),add_rels(t.wbrels,-1,"theme/theme1.xml",RELS.THEME),u="xl/styles."+n,zip_add_file(l,u,write_sty_xml(e,t)),o.styles.push(u),add_rels(t.wbrels,-1,"styles."+n,RELS.STY),e.vbaraw&&i&&(u="xl/vbaProject.bin",zip_add_file(l,u,e.vbaraw),o.vba.push(u),add_rels(t.wbrels,-1,"vbaProject.bin",RELS.VBA)),u="xl/metadata."+n,zip_add_file(l,u,write_xlmeta_xml()),o.metadata.push(u),add_rels(t.wbrels,-1,"metadata."+n,RELS.XLMETA),d.length>1&&(u="xl/persons/person.xml",zip_add_file(l,u,write_people_xml(d)),o.people.push(u),add_rels(t.wbrels,-1,"persons/person.xml",RELS.PEOPLE)),zip_add_file(l,"[Content_Types].xml",write_ct(o,t)),zip_add_file(l,"_rels/.rels",write_rels(t.rels)),zip_add_file(l,"xl/_rels/workbook."+n+".rels",write_rels(t.wbrels)),delete t.revssf,delete t.ssf,l}function firstbyte(e,t){var n="";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":n=Base64_decode(e.slice(0,12));break;case"binary":n=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[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.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 n=dup(t||{}),i=write_zip(e,n);return write_zip_denouement(i,n)}function write_zip_denouement(e,t){var n={},i=has_buf?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(n.compression="DEFLATE"),t.password)n.type=i;else switch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":n.type=i;break;default:throw new Error("Unrecognized type "+t.type)}var o=e.FullPaths?CFB.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[n.type]||n.type,compression:!!t.compression}):e.generate(n);if(typeof Deno<"u"&&typeof o=="string"){if(t.type=="binary"||t.type=="base64")return o;o=new Uint8Array(s2ab(o))}return t.password&&typeof encrypt_agile<"u"?write_cfb_ctr(encrypt_agile(o,t.password),t):t.type==="file"?write_dl(t.file,o):t.type=="string"?utf8read(o):o}function write_cfb_type(e,t){var n=t||{},i=write_xlscfb(e,n);return write_cfb_ctr(i,n)}function write_string_type(e,t,n){n||(n="");var i=n+e;switch(t.type){case"base64":return Base64_encode(utf8write(i));case"binary":return utf8write(i);case"string":return e;case"file":return write_dl(t.file,i,"utf8");case"buffer":return has_buf?Buffer_from(i,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(i):write_string_type(i,{type:"binary"}).split("").map(function(o){return o.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(n){return n.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 n="",i=0;i<e.length;++i)n+=String.fromCharCode(e[i]);return t.type=="base64"?Base64_encode(n):t.type=="string"?utf8read(n):n;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 n=dup(t||{});if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),n.type=="array"){n.type="binary";var i=writeSync(e,n);return n.type="array",s2ab(i)}var o=0;if(n.sheet&&(typeof n.sheet=="number"?o=n.sheet:o=e.SheetNames.indexOf(n.sheet),!e.SheetNames[o]))throw new Error("Sheet not found: "+n.sheet+" : "+typeof n.sheet);switch(n.bookType||"xlsb"){case"xml":case"xlml":return write_string_type(write_xlml(e,n),n);case"slk":case"sylk":return write_string_type(SYLK.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"htm":case"html":return write_string_type(sheet_to_html(e.Sheets[e.SheetNames[o]],n),n);case"txt":return write_stxt_type(sheet_to_txt(e.Sheets[e.SheetNames[o]],n),n);case"csv":return write_string_type(sheet_to_csv(e.Sheets[e.SheetNames[o]],n),n,"\uFEFF");case"dif":return write_string_type(DIF.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"dbf":return write_binary_type(DBF.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"prn":return write_string_type(PRN.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"rtf":return write_string_type(RTF.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"eth":return write_string_type(ETH.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"fods":return write_string_type(write_ods(e,n),n);case"wk1":return write_binary_type(WK_.sheet_to_wk1(e.Sheets[e.SheetNames[o]],n),n);case"wk3":return write_binary_type(WK_.book_to_wk3(e,n),n);case"biff2":n.biff||(n.biff=2);case"biff3":n.biff||(n.biff=3);case"biff4":return n.biff||(n.biff=4),write_binary_type(write_biff_buf(e,n),n);case"biff5":n.biff||(n.biff=5);case"biff8":case"xla":case"xls":return n.biff||(n.biff=8),write_cfb_type(e,n);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return write_zip_type(e,n);default:throw new Error("Unrecognized bookType |"+n.bookType+"|")}}function resolve_book_type(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},n=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();n.match(/^\.[a-z]+$/)&&(e.bookType=n.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function writeFileSync(e,t,n){var i={};return i.type="file",i.file=t,resolve_book_type(i),writeSync(e,i)}function make_json_row(e,t,n,i,o,l,u,f){var p=encode_row(n),m=f.defval,d=f.raw||!Object.prototype.hasOwnProperty.call(f,"raw"),g=!0,_=o===1?[]:{};if(o!==1)if(Object.defineProperty)try{Object.defineProperty(_,"__rowNum__",{value:n,enumerable:!1})}catch{_.__rowNum__=n}else _.__rowNum__=n;if(!u||e[n])for(var E=t.s.c;E<=t.e.c;++E){var S=u?e[n][E]:e[i[E]+p];if(S===void 0||S.t===void 0){if(m===void 0)continue;l[E]!=null&&(_[l[E]]=m);continue}var b=S.v;switch(S.t){case"z":if(b==null)break;continue;case"e":b=b==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+S.t)}if(l[E]!=null){if(b==null)if(S.t=="e"&&b===null)_[l[E]]=null;else if(m!==void 0)_[l[E]]=m;else if(d&&b===null)_[l[E]]=null;else continue;else _[l[E]]=d&&(S.t!=="n"||S.t==="n"&&f.rawNumbers!==!1)?b:format_cell(S,b,f);b!=null&&(g=!1)}}return{row:_,isempty:g}}function sheet_to_json(e,t){if(e==null||e["!ref"]==null)return[];var n={t:"n",v:0},i=0,o=1,l=[],u=0,f="",p={s:{r:0,c:0},e:{r:0,c:0}},m=t||{},d=m.range!=null?m.range:e["!ref"];switch(m.header===1?i=1:m.header==="A"?i=2:Array.isArray(m.header)?i=3:m.header==null&&(i=0),typeof d){case"string":p=safe_decode_range(d);break;case"number":p=safe_decode_range(e["!ref"]),p.s.r=d;break;default:p=d}i>0&&(o=0);var g=encode_row(p.s.r),_=[],E=[],S=0,b=0,T=Array.isArray(e),C=p.s.r,A=0,R={};T&&!e[C]&&(e[C]=[]);var O=m.skipHidden&&e["!cols"]||[],j=m.skipHidden&&e["!rows"]||[];for(A=p.s.c;A<=p.e.c;++A)if(!(O[A]||{}).hidden)switch(_[A]=encode_col(A),n=T?e[C][A]:e[_[A]+g],i){case 1:l[A]=A-p.s.c;break;case 2:l[A]=_[A];break;case 3:l[A]=m.header[A-p.s.c];break;default:if(n==null&&(n={w:"__EMPTY",t:"s"}),f=u=format_cell(n,null,m),b=R[u]||0,!b)R[u]=1;else{do f=u+"_"+b++;while(R[f]);R[u]=b,R[f]=1}l[A]=f}for(C=p.s.r+o;C<=p.e.r;++C)if(!(j[C]||{}).hidden){var I=make_json_row(e,p,C,_,i,l,T,m);(I.isempty===!1||(i===1?m.blankrows!==!1:m.blankrows))&&(E[S++]=I.row)}return E.length=S,E}var qreg=/"/g;function make_csv_row(e,t,n,i,o,l,u,f){for(var p=!0,m=[],d="",g=encode_row(n),_=t.s.c;_<=t.e.c;++_)if(i[_]){var E=f.dense?(e[n]||[])[_]:e[i[_]+g];if(E==null)d="";else if(E.v!=null){p=!1,d=""+(f.rawNumbers&&E.t=="n"?E.v:format_cell(E,null,f));for(var S=0,b=0;S!==d.length;++S)if((b=d.charCodeAt(S))===o||b===l||b===34||f.forceQuotes){d='"'+d.replace(qreg,'""')+'"';break}d=="ID"&&(d='"ID"')}else E.f!=null&&!E.F?(p=!1,d="="+E.f,d.indexOf(",")>=0&&(d='"'+d.replace(qreg,'""')+'"')):d="";m.push(d)}return f.blankrows===!1&&p?null:m.join(u)}function sheet_to_csv(e,t){var n=[],i=t??{};if(e==null||e["!ref"]==null)return"";var o=safe_decode_range(e["!ref"]),l=i.FS!==void 0?i.FS:",",u=l.charCodeAt(0),f=i.RS!==void 0?i.RS:`
|
|
346
346
|
`,p=f.charCodeAt(0),m=new RegExp((l=="|"?"\\|":l)+"+$"),d="",g=[];i.dense=Array.isArray(e);for(var _=i.skipHidden&&e["!cols"]||[],E=i.skipHidden&&e["!rows"]||[],S=o.s.c;S<=o.e.c;++S)(_[S]||{}).hidden||(g[S]=encode_col(S));for(var b=0,T=o.s.r;T<=o.e.r;++T)(E[T]||{}).hidden||(d=make_csv_row(e,o,T,g,u,p,l,i),d!=null&&(i.strip&&(d=d.replace(m,"")),(d||i.blankrows!==!1)&&n.push((b++?f:"")+d)));return delete i.dense,n.join("")}function sheet_to_txt(e,t){t||(t={}),t.FS=" ",t.RS=`
|
|
347
|
-
`;var n=sheet_to_csv(e,t);return n}function sheet_to_formulae(e){var t="",n,i="";if(e==null||e["!ref"]==null)return[];var o=safe_decode_range(e["!ref"]),l="",u=[],f,p=[],m=Array.isArray(e);for(f=o.s.c;f<=o.e.c;++f)u[f]=encode_col(f);for(var d=o.s.r;d<=o.e.r;++d)for(l=encode_row(d),f=o.s.c;f<=o.e.c;++f)if(t=u[f]+l,n=m?(e[d]||[])[f]:e[t],i="",n!==void 0){if(n.F!=null){if(t=n.F,!n.f)continue;i=n.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(n.f!=null)i=n.f;else{if(n.t=="z")continue;if(n.t=="n"&&n.v!=null)i=""+n.v;else if(n.t=="b")i=n.v?"TRUE":"FALSE";else if(n.w!==void 0)i="'"+n.w;else{if(n.v===void 0)continue;n.t=="s"?i="'"+n.v:i=""+n.v}}p[p.length]=t+"="+i}return p}function sheet_add_json(e,t,n){var i=n||{},o=+!i.skipHeader,l=e||{},u=0,f=0;if(l&&i.origin!=null)if(typeof i.origin=="number")u=i.origin;else{var p=typeof i.origin=="string"?decode_cell(i.origin):i.origin;u=p.r,f=p.c}var m,d={s:{c:0,r:0},e:{c:f,r:u+t.length-1+o}};if(l["!ref"]){var g=safe_decode_range(l["!ref"]);d.e.c=Math.max(d.e.c,g.e.c),d.e.r=Math.max(d.e.r,g.e.r),u==-1&&(u=g.e.r+1,d.e.r=u+t.length-1+o)}else u==-1&&(u=0,d.e.r=t.length-1+o);var _=i.header||[],E=0;t.forEach(function(b,T){keys(b).forEach(function(C){(E=_.indexOf(C))==-1&&(_[E=_.length]=C);var A=b[C],R="z",O="",j=encode_cell({c:f+E,r:u+T+o});m=ws_get_cell_stub(l,j),A&&typeof A=="object"&&!(A instanceof Date)?l[j]=A:(typeof A=="number"?R="n":typeof A=="boolean"?R="b":typeof A=="string"?R="s":A instanceof Date?(R="d",i.cellDates||(R="n",A=datenum(A)),O=i.dateNF||table_fmt[14]):A===null&&i.nullError&&(R="e",A=0),m?(m.t=R,m.v=A,delete m.w,delete m.R,O&&(m.z=O)):l[j]=m={t:R,v:A},O&&(m.z=O))})}),d.e.c=Math.max(d.e.c,f+_.length-1);var S=encode_row(u);if(o)for(E=0;E<_.length;++E)l[encode_col(E+f)+S]={t:"s",v:_[E]};return l["!ref"]=encode_range(d),l}function json_to_sheet(e,t){return sheet_add_json(null,e,t)}function ws_get_cell_stub(e,t,n){if(typeof t=="string"){if(Array.isArray(e)){var i=decode_cell(t);return e[i.r]||(e[i.r]=[]),e[i.r][i.c]||(e[i.r][i.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:n||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 n=e.SheetNames.indexOf(t);if(n>-1)return n;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,n,i){var o=1;if(!n)for(;o<=65535&&e.SheetNames.indexOf(n="Sheet"+o)!=-1;++o,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(i&&e.SheetNames.indexOf(n)>=0){var l=n.match(/(^.*?)(\d+)$/);o=l&&+l[2]||0;var u=l&&l[1]||n;for(++o;o<=65535&&e.SheetNames.indexOf(n=u+o)!=-1;++o);}if(check_ws_name(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function book_set_sheet_visibility(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var i=wb_sheet_idx(e,t);switch(e.Workbook.Sheets[i]||(e.Workbook.Sheets[i]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[i].Hidden=n}function cell_set_number_format(e,t){return e.z=t,e}function cell_set_hyperlink(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}function cell_set_internal_link(e,t,n){return cell_set_hyperlink(e,"#"+t,n)}function cell_add_comment(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})}function sheet_set_array_formula(e,t,n,i){for(var o=typeof t!="string"?t:safe_decode_range(t),l=typeof t=="string"?t:encode_range(t),u=o.s.r;u<=o.e.r;++u)for(var f=o.s.c;f<=o.e.c;++f){var p=ws_get_cell_stub(e,u,f);p.t="n",p.F=l,delete p.v,u==o.s.r&&f==o.s.c&&(p.f=n,i&&(p.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 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((n,i)=>jsxRuntimeExports.jsx("th",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-header"})},i))})}),jsxRuntimeExports.jsx("tbody",{children:Array.from({length:t}).map((n,i)=>jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((o,l)=>jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-cell"})},l))},i))})]})}),CERadioButton=({label:e,value:t,checked:n,onChange:i,id:o,name:l,disabled:u=!1})=>jsxRuntimeExports.jsxs("label",{className:"radio-button",style:{margin:"0.5rem 0"},children:[jsxRuntimeExports.jsx("input",{type:"radio",id:o,name:l,value:t,checked:n,onChange:()=>i(t),style:{marginRight:e?"0.5rem":0},disabled:u}),e&&jsxRuntimeExports.jsx("span",{children:e})]}),CETruncatedTextWithTooltip=({text:e})=>{const[t,n]=React.useState(!1),[i,o]=React.useState({top:0,left:0}),l=React.useRef(null),[u,f]=React.useState(!1);React.useEffect(()=>{l.current&&f(l.current.scrollWidth>l.current.clientWidth)},[e]);const p=()=>{if(!l.current)return;const d=l.current.getBoundingClientRect(),g=300,_=100;let E=d.bottom+window.scrollY,S=d.left+window.scrollX;const b=window.innerWidth,T=window.innerHeight;S+g>b&&(S=b-g-8),d.bottom+_>T&&(E=d.top+window.scrollY-_-8),o({top:E,left:S}),n(!0)},m=()=>n(!1);return jsxRuntimeExports.jsxs("span",{className:"truncated-text-with-tooltip",ref:l,onMouseEnter:p,onMouseLeave:m,children:[e,u&&t&&ReactDOM.createPortal(jsxRuntimeExports.jsx("div",{className:"truncated-text-tooltip global-tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:e}),document.body)]})},DatePickerCell=({row:e,colId:t})=>{var u;const n=f=>{if(!f)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(f))return f;if(f.includes("/")){const d=f.split("/").map(g=>g.trim());if(d.length>=3){const g=d[0].padStart(2,"0").slice(0,2),_=d[1].padStart(2,"0").slice(0,2),S=d[2].replace(/\D/g,"").slice(0,4);return S.length!==4?"":`${S}-${g}-${_}`}}const p=f.replace(/\D/g,"");if(p.length===8){const d=p.slice(0,4),g=p.slice(4,6),_=p.slice(6,8);if(+g>=1&&+g<=12)return`${d}-${g}-${_}`;const E=p.slice(0,2),S=p.slice(2,4);return`${p.slice(4,8)}-${E}-${S}`}const m=new Date(f);if(!isNaN(m.getTime())){const d=m.getFullYear().toString().slice(0,4).padStart(4,"0"),g=(m.getMonth()+1).toString().padStart(2,"0"),_=m.getDate().toString().padStart(2,"0");return`${d}-${g}-${_}`}return""},[i,o]=React.useState(((u=e[t])==null?void 0:u.value)||"");React.useEffect(()=>{var f;o(n(((f=e[t])==null?void 0:f.value)||""))},[e,t]);const l=f=>{var m;const p=n(f.target.value);o(p),(m=e[t])==null||m.onchange(p)};return jsxRuntimeExports.jsx("div",{style:{minWidth:"120px"},children:jsxRuntimeExports.jsx("input",{type:"date",value:i,onChange:f=>l(f)})})},AddNewRowCell=({row:e,column:t,colId:n})=>{var p,m,d,g,_,E,S,b,T,C,A,R,O,j,I,D,F;const i=(((p=e[n])==null?void 0:p.required)??t.required)||!1,o=!!e[n].error,[l,u]=React.useState(!1),f=t.elementType;return React.useEffect(()=>{u(!(o||i))},[o,i,t.required]),jsxRuntimeExports.jsx("div",{children:o&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-content",onClick:()=>u(!0),role:"button",tabIndex:0,title:((m=e[n])==null?void 0:m.tooltip)||"","aria-label":((d=e[n])==null?void 0:d.tooltip)||"",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:(g=e[n])==null?void 0:g.value}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#d32f2f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-circle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})]},e.id):i&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-warning",onClick:()=>u(!0),role:"button",tabIndex:0,title:((_=e[n])==null?void 0:_.tooltip)||"This field is required. Click to enter a value.","aria-label":((E=e[n])==null?void 0:E.tooltip)||"This field is required. Click to enter a value.",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:((S=e[n])==null?void 0:S.value)||"Required"}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#ff9800",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-triangle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),jsxRuntimeExports.jsx("path",{d:"M12 9v4"}),jsxRuntimeExports.jsx("path",{d:"M12 17h.01"})]})]},e.id):l&&(f==="auto-suggest"?jsxRuntimeExports.jsx(CEAdvancedAutoSuggest,{label:"",fetchSuggestions:(b=e[n])==null?void 0:b.fetchOptions,onChange:()=>{},onSelect:B=>{var X,U;return(U=(X=e[n])==null?void 0:X.onselect)==null?void 0:U.call(X,B)},value:((T=e[n])==null?void 0:T.selectedOption)||null}):f==="date-picker"?jsxRuntimeExports.jsx(DatePickerCell,{row:e,colId:n}):f==="text-input"?jsxRuntimeExports.jsx(CEInputBox,{onChange:B=>{var X;return(X=e[n])==null?void 0:X.onchange(B)},value:((C=e[n])==null?void 0:C.value)||"",showError:!1,disabled:((A=e[n])==null?void 0:A.disabled)??!1}):f==="number-input"?jsxRuntimeExports.jsx(CEInputBox,{type:"number",onChange:B=>{var X;return(X=e[n])==null?void 0:X.onchange(B)},value:((R=e[n])==null?void 0:R.value)||"",showError:!1,disabled:((O=e[n])==null?void 0:O.disabled)??!1,decimalScale:((j=e[n])==null?void 0:j.decimalScale)??3}):f==="drop-down-input"?jsxRuntimeExports.jsx(CEDynamicSelectField,{label:"",value:((I=e[n])==null?void 0:I.value)||"",onChange:B=>{var X;(X=e[n])==null||X.onchange(B.target.value)},options:((D=e[n])==null?void 0:D.options)||[],showPlaceholder:!0,placeholderText:""}):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(((F=e[n])==null?void 0:F.value)??"")}))})},CEDateRangePicker=({label:e="Submitted Date",tooltip:t,required:n=!1,onChange:i,size:o="medium",style:l,inputGroupStyle:u,id:f,name:p,mode:m="range",defaultValue:d,disabled:g=!1,minDate:_="",defaultFloat:E=!0,disablePastDates:S=!1})=>{const[b,T]=React.useState(""),[C,A]=React.useState(""),[R,O]=React.useState(()=>!!E),[j,I]=React.useState(""),F=new Date().toISOString().split("T")[0],B=_?new Date(_).toISOString().split("T")[0]:S?F:void 0,X=()=>O(!0),U=Y=>{!Y.currentTarget.value&&!b&&!C&&O(!1)},N=(Y,V)=>{if(i==null||i({startDate:Y||"",endDate:V||""}),Y&&!V||!Y&&V){I("Both start and end dates must be selected");return}if(Y&&V&&new Date(V)<new Date(Y)){I("End date must be after or equal to start date");return}I("")},G=Y=>{if(!Y)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(Y))return Y;if(Y.includes("/")){const q=Y.split("/").map(H=>H.trim());if(q.length>=3){const H=q[0].padStart(2,"0").slice(0,2),Q=q[1].padStart(2,"0").slice(0,2),de=q[2].replace(/\D/g,"").slice(0,4);return de.length!==4?"":`${de}-${H}-${Q}`}}const V=Y.replace(/\D/g,"");if(V.length===8){const q=V.slice(0,4),H=V.slice(4,6),Q=V.slice(6,8);if(+H>=1&&+H<=12)return`${q}-${H}-${Q}`;const ue=V.slice(0,2),de=V.slice(2,4);return`${V.slice(4,8)}-${ue}-${de}`}const M=new Date(Y);if(!isNaN(M.getTime())){const q=M.getFullYear().toString().slice(0,4).padStart(4,"0"),H=(M.getMonth()+1).toString().padStart(2,"0"),Q=M.getDate().toString().padStart(2,"0");return`${q}-${H}-${Q}`}return""},ee=Y=>{const V=Y.match(/^(\d{4})/);return(V==null?void 0:V[1])==="0000"};React.useEffect(()=>{d&&(d.startDate&&T(G(d.startDate)),d.endDate&&A(G(d.endDate)))},[d]);const te=Y=>{const V=G(Y.target.value);T(V),N(V,C)},z=Y=>{const V=G(Y.target.value);A(V),N(b,V)},K=!!(R||b||C),L=getSizeStyle$1(o),W=({text:Y,float:V,showTooltip:M=!0})=>jsxRuntimeExports.jsxs("label",{className:`floating-label-box${V?" float":""}`,children:[jsxRuntimeExports.jsxs("span",{className:"label-text",children:[Y,n&&jsxRuntimeExports.jsx("span",{className:"required-star",children:"*"})]}),t&&M&&jsxRuntimeExports.jsxs("span",{className:"tooltip-icon",role:"button","aria-label":t,tabIndex:0,children:[jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em","aria-hidden":"true",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),jsxRuntimeExports.jsx("text",{x:"12",y:"16",textAnchor:"middle",fontSize:"12",fill:"currentColor",fontFamily:"Inter, Arial",fontWeight:"600",children:"i"})]}),jsxRuntimeExports.jsx("span",{className:"tooltip-bubble",role:"tooltip",children:t})]})]});return jsxRuntimeExports.jsxs("div",{className:"date-range-picker",style:l,id:f,children:[jsxRuntimeExports.jsx("div",{className:"date-range-field-group",style:u,children:m==="single"?jsxRuntimeExports.jsxs("div",{className:"field-box ",style:L,children:[jsxRuntimeExports.jsx("input",{type:"date",value:b,name:p,min:B,disabled:g,onChange:Y=>{const V=Y.target.value;if(T(V),ee(V)){I("Year cannot be 0000");return}j==="Year cannot be 0000"&&I("");const M=G(V);i==null||i({startDate:M,endDate:""})},onFocus:X,onBlur:U}),jsxRuntimeExports.jsx(W,{text:e,float:K,showTooltip:!0})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"field-box ",style:L,children:[jsxRuntimeExports.jsx("input",{type:"date",value:b,name:p?`${p}-from`:void 0,min:B,onChange:te,onFocus:X,onBlur:U,disabled:g}),jsxRuntimeExports.jsx(W,{text:"From",float:!0,showTooltip:!0})]}),jsxRuntimeExports.jsx("span",{className:"range-separator centered",children:"to"}),jsxRuntimeExports.jsxs("div",{className:"field-box ",style:L,children:[jsxRuntimeExports.jsx("input",{type:"date",value:C,name:p?`${p}-to`:void 0,min:B,onChange:z,onFocus:X,onBlur:U,disabled:g}),jsxRuntimeExports.jsx(W,{text:"To",float:!0,showTooltip:!1})]})]})}),j&&m!=="single"&&jsxRuntimeExports.jsx("div",{className:"error-text",children:j})]})},useEscapeKey=e=>{React.useEffect(()=>{const t=n=>{n.key==="Escape"&&e()};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[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 n in e)React.isValidElement(e[n])||(t[n]=stripReactElements(e[n]));return t}return e},Edit="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.06%203.58988L20.41%204.93988C21.2%205.71988%2021.2%206.98988%2020.41%207.76988L7.18%2020.9999H3V16.8199L13.4%206.40988L16.23%203.58988C17.01%202.80988%2018.28%202.80988%2019.06%203.58988ZM5%2018.9999L6.41%2019.0599L16.23%209.22988L14.82%207.81988L5%2017.6399V18.9999Z'%20fill='%2379747E'/%3e%3c/svg%3e",Approve="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.00003%2016.1701L4.83003%2012.0001L3.41003%2013.4101L9.00003%2019.0001L21%207.00009L19.59%205.59009L9.00003%2016.1701Z'%20fill='%2379747E'/%3e%3c/svg%3e",Reassign="data:image/svg+xml,%3csvg%20width='17'%20height='20'%20viewBox='0%200%2017%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.83828%200.221421C8.68188%200.075693%208.47503%20-0.00364251%208.2613%200.000128532C8.04757%200.00389957%207.84365%200.0904828%207.69249%200.241637C7.54134%200.392791%207.45476%200.596715%207.45098%200.810446C7.44721%201.02418%207.52655%201.23103%207.67228%201.38742L9.01428%202.72942H8.53028C6.89858%202.72942%205.30353%203.21327%203.94682%204.1198C2.59012%205.02632%201.53269%206.31479%200.908271%207.82228C0.283848%209.32977%200.120471%2010.9886%200.438799%2012.5889C0.757127%2014.1893%201.54286%2015.6593%202.69665%2016.8131C3.85043%2017.9668%205.32044%2018.7526%206.92078%2019.0709C8.52112%2019.3892%2010.1799%2019.2258%2011.6874%2018.6014C13.1949%2017.977%2014.4834%2016.9196%2015.3899%2015.5629C16.2964%2014.2062%2016.7803%2012.6111%2016.7803%2010.9794C16.7803%2010.7606%2016.6934%2010.5508%2016.5386%2010.3961C16.3839%2010.2413%2016.1741%2010.1544%2015.9553%2010.1544C15.7365%2010.1544%2015.5266%2010.2413%2015.3719%2010.3961C15.2172%2010.5508%2015.1303%2010.7606%2015.1303%2010.9794C15.1302%2012.2819%2014.7448%2013.5553%2014.0225%2014.6391C13.3002%2015.723%2012.2733%2016.5689%2011.0712%2017.0703C9.86915%2017.5718%208.54557%2017.7064%207.26716%2017.4571C5.98875%2017.2078%204.81268%2016.5859%203.88704%2015.6695C2.96139%2014.7532%202.32757%2013.5835%202.06538%2012.3077C1.80319%2011.0318%201.92436%209.70696%202.41362%208.49986C2.90289%207.29276%203.73837%206.25741%204.81488%205.52419C5.89138%204.79097%207.16076%204.39266%208.46318%204.37942L7.67118%205.17142C7.52097%205.32709%207.43791%205.53552%207.43989%205.75184C7.44187%205.96815%207.52873%206.17503%207.68177%206.32792C7.8348%206.48081%208.04177%206.56748%208.25808%206.56925C8.47439%206.57103%208.68275%206.48778%208.83828%206.33742L11.3133%203.86242C11.4678%203.70773%2011.5546%203.49805%2011.5546%203.27942C11.5546%203.0608%2011.4678%202.85111%2011.3133%202.69642L8.83828%200.221421ZM12.9523%207.08542C13.1097%207.23717%2013.2005%207.44523%2013.2046%207.66387C13.2087%207.8825%2013.1259%208.09384%2012.9743%208.25142L8.73928%2012.6514C8.66232%2012.7313%208.57005%2012.7948%208.46799%2012.8382C8.36593%2012.8815%208.25617%2012.9039%208.14528%2012.9039C8.03438%2012.9039%207.92462%2012.8815%207.82256%2012.8382C7.7205%2012.7948%207.62824%2012.7313%207.55128%2012.6514L5.73628%2010.766C5.65735%2010.6888%205.59473%2010.5965%205.55212%2010.4947C5.50952%2010.3928%205.48779%2010.2834%205.48822%2010.173C5.48866%2010.0626%205.51125%209.95343%205.55467%209.85191C5.59808%209.75039%205.66143%209.65862%205.74096%209.58204C5.82049%209.50545%205.91459%209.44561%206.01767%209.40606C6.12075%209.3665%206.23073%209.34804%206.34107%209.35177C6.45142%209.3555%206.5599%209.38134%206.66008%209.42776C6.76026%209.47418%206.8501%209.54024%206.92428%209.62202L8.14528%2010.8892L11.7863%207.10742C11.938%206.94997%2012.1461%206.85921%2012.3647%206.85509C12.5834%206.85096%2012.7947%206.93381%2012.9523%207.08542Z'%20fill='%2365B230'/%3e%3c/svg%3e",Add="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%2013H13V20H11V13H4V11H11V4H13V11H20V13Z'%20fill='%2379747E'/%3e%3c/svg%3e",Delete="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%203V4H20V6H19V19C19%2020.1%2018.1%2021%2017%2021H7C5.9%2021%205%2020.1%205%2019V6H4V4H9V3H15ZM7%2019H17V6H7V19ZM9%208H11V17H9V8ZM15%208H13V17H15V8Z'%20fill='%2379747E'/%3e%3c/svg%3e",Cancel="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202C6.47%202%202%206.47%202%2012C2%2017.53%206.47%2022%2012%2022C17.53%2022%2022%2017.53%2022%2012C22%206.47%2017.53%202%2012%202ZM12%2020C7.59%2020%204%2016.41%204%2012C4%207.59%207.59%204%2012%204C16.41%204%2020%207.59%2020%2012C20%2016.41%2016.41%2020%2012%2020ZM12%2010.59L15.59%207L17%208.41L13.41%2012L17%2015.59L15.59%2017L12%2013.41L8.41%2017L7%2015.59L10.59%2012L7%208.41L8.41%207L12%2010.59Z'%20fill='%23C53225'/%3e%3c/svg%3e",CopyIcon="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='M15%2020.5H5V7.5C5%206.95%204.55%206.5%204%206.5C3.45%206.5%203%206.95%203%207.5V20.5C3%2021.6%203.9%2022.5%205%2022.5H15C15.55%2022.5%2016%2022.05%2016%2021.5C16%2020.95%2015.55%2020.5%2015%2020.5ZM20%2016.5V4.5C20%203.4%2019.1%202.5%2018%202.5H9C7.9%202.5%207%203.4%207%204.5V16.5C7%2017.6%207.9%2018.5%209%2018.5H18C19.1%2018.5%2020%2017.6%2020%2016.5ZM18%2016.5H9V4.5H18V16.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ViewIcon="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='M12%204.5C7%204.5%202.73%207.61%201%2012C2.73%2016.39%207%2019.5%2012%2019.5C17%2019.5%2021.27%2016.39%2023%2012C21.27%207.61%2017%204.5%2012%204.5ZM12%2017C9.24%2017%207%2014.76%207%2012C7%209.24%209.24%207%2012%207C14.76%207%2017%209.24%2017%2012C17%2014.76%2014.76%2017%2012%2017ZM12%209C10.34%209%209%2010.34%209%2012C9%2013.66%2010.34%2015%2012%2015C13.66%2015%2015%2013.66%2015%2012C15%2010.34%2013.66%209%2012%209Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ShowOrHideColumn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%3e%3cpath%20d='M0%200%20C1.39042818%20-0.00202787%202.78085531%20-0.00494519%204.17127991%20-0.00869751%20C7.06831102%20-0.0130889%209.9650623%20-0.00679496%2012.86206055%200.00732422%20C16.54104169%200.02439842%2020.21936509%200.01456623%2023.89832211%20-0.00339317%20C26.76486496%20-0.0143319%2029.63125676%20-0.01073875%2032.49780464%20-0.0030098%20C34.50268617%20-0.00008719%2036.50757401%20-0.00906178%2038.51243591%20-0.0184021%20C51.84643905%200.08288397%2062.36831214%202.18438052%2072.34765625%2011.3984375%20C82.72862089%2022.29501297%2083.81157502%2035.39563727%2083.72860718%2049.8704834%20C83.73328715%2051.15071931%2083.73796712%2052.43095523%2083.74278891%2053.74998617%20C83.75517662%2057.26010193%2083.74918524%2060.76996931%2083.73983026%2064.28008533%20C83.73298924%2068.08247635%2083.7435458%2071.88482726%2083.75177002%2075.68721008%20C83.76505611%2083.11894567%2083.76225259%2090.55058996%2083.7535321%2097.98232901%20C83.74673568%20104.02640949%2083.74584727%20110.07046452%2083.74910355%20116.11454773%20C83.74956325%20116.97729682%2083.75002294%20117.84004591%2083.75049657%20118.72893891%20C83.75145582%20120.4820182%2083.75242847%20122.23509749%2083.75341435%20123.98817676%20C83.76195323%20140.39713998%2083.75215774%20156.80605278%2083.73601325%20173.21500772%20C83.72261144%20187.27113064%2083.72493995%20201.32717921%2083.73876953%20215.38330078%20C83.75485194%20231.73663572%2083.7611294%20248.08992656%2083.75193274%20264.4432683%20C83.75097717%20266.18962128%2083.75003406%20267.93597427%2083.74910355%20269.68232727%20C83.74864072%20270.54139399%2083.74817789%20271.4004607%2083.74770104%20272.28555974%20C83.74511913%20278.31698617%2083.74946486%20284.34838445%2083.75654221%20290.37980652%20C83.76498704%20297.73782249%2083.76261469%20305.09574254%2083.74669997%20312.45374763%20C83.73885718%20316.20237621%2083.73565678%20319.95084531%2083.74564743%20323.69947243%20C83.75634508%20327.77524883%2083.74350635%20331.85062835%2083.72860718%20335.9263916%20C83.73529934%20337.09392896%2083.74199151%20338.26146632%2083.74888647%20339.4643836%20C83.6547451%20352.81613252%2081.80817857%20364.46802168%2072.34765625%20374.3984375%20C61.26850374%20384.62796175%2049.36756952%20385.86653363%2034.74609375%20385.76171875%20C33.37472535%20385.7611982%2032.0033562%20385.76172342%2030.63198853%20385.76322937%20C27.77960848%20385.76314043%2024.92751564%20385.75287014%2022.07519531%20385.73461914%20C18.44659665%20385.71189135%2014.81841439%20385.71140425%2011.18976402%20385.71813679%20C8.36535029%20385.72150093%205.54102895%20385.71480174%202.71663284%20385.70500755%20C0.73715224%20385.69937125%20-1.24234414%20385.70058074%20-3.22183228%20385.70198059%20C-16.18209116%20385.60087128%20-25.59788448%20384.09755013%20-35.65234375%20375.3984375%20C-45.54661727%20364.26539458%20-47.11519405%20351.39165616%20-47.03329468%20336.96398926%20C-47.03797465%20335.6757351%20-47.04265462%20334.38748094%20-47.04747641%20333.06018877%20C-47.05988124%20329.52308071%20-47.0538647%20325.98621866%20-47.04451776%20322.44911027%20C-47.03768394%20318.61945404%20-47.04822979%20314.78983788%20-47.05645752%20310.96018982%20C-47.06975116%20303.47317331%20-47.06693669%20295.98624736%20-47.0582196%20288.4992274%20C-47.05142618%20282.41077808%20-47.05053348%20276.32235401%20-47.05379105%20270.23390198%20C-47.05425075%20269.36517795%20-47.05471044%20268.49645393%20-47.05518407%20267.60140494%20C-47.05614331%20265.83624438%20-47.05711595%20264.07108383%20-47.05810185%20262.30592328%20C-47.06664294%20245.77967925%20-47.05684175%20229.25348526%20-47.04070075%20212.72724944%20C-47.02729873%20198.56732745%20-47.02962719%20184.40747926%20-47.04345703%20170.24755859%20C-47.05953551%20153.7777782%20-47.06581909%20137.3080416%20-47.05662024%20120.83825445%20C-47.05566466%20119.07982732%20-47.05472155%20117.32140017%20-47.05379105%20115.56297302%20C-47.05332822%20114.69794239%20-47.05286539%20113.83291175%20-47.05238854%20112.94166806%20C-47.04980545%20106.8651998%20-47.05415492%20100.78875947%20-47.06122971%2094.71229553%20C-47.06967015%2087.30042821%20-47.06731132%2079.88865612%20-47.05138747%2072.47679961%20C-47.04353884%2068.69994852%20-47.04035446%2064.92325585%20-47.05033493%2061.14640617%20C-47.06101703%2057.0417633%20-47.04820598%2052.93751546%20-47.03329468%2048.83288574%20C-47.03998684%2047.65397152%20-47.04667901%2046.47505731%20-47.05357397%2045.26041842%20C-46.9542233%2031.0988315%20-44.31098753%2020.04518898%20-34.13671875%209.88671875%20C-23.81712366%200.73176368%20-13.42909464%20-0.06246693%200%200%20Z%20'%20fill='%23212121'%20transform='translate(88.65234375,63.6015625)'/%3e%3cpath%20d='M0%200%20C1.37183255%20-0.00389885%202.74366391%20-0.00823591%204.11549377%20-0.01298523%20C6.97555474%20-0.02039888%209.83549214%20-0.02019147%2012.69555664%20-0.01489258%20C16.33091665%20-0.00909958%2019.96576688%20-0.02604816%2023.60104275%20-0.04923725%20C26.42978286%20-0.06408398%2029.25840319%20-0.06483166%2032.08717537%20-0.06172752%20C34.0694059%20-0.06247893%2036.05161807%20-0.07625581%2038.03379822%20-0.09040833%20C50.34165442%20-0.02798927%2060.24736289%202.00602656%2069.62890625%2010.30078125%20C80.23052058%2021.7808721%2081.93785653%2033.21068447%2081.88960266%2048.37446594%20C81.89342821%2049.66015683%2081.89725376%2050.94584772%2081.90119523%2052.27049893%20C81.9114249%2055.81433436%2081.90930634%2059.35806804%2081.90501463%2062.90191162%20C81.9025382%2066.73366042%2081.91157295%2070.56538531%2081.91905212%2074.39712524%20C81.93177597%2081.89455933%2081.93359569%2089.39195757%2081.93125186%2096.88940064%20C81.92946586%20102.98649949%2081.93122438%20109.08358749%2081.9354763%20115.18068504%20C81.93607149%20116.04981554%2081.93666668%20116.91894603%2081.93727991%20117.81441381%20C81.93849171%20119.58029897%2081.93970585%20121.34618412%2081.94092228%20123.11206927%20C81.95178902%20139.65831656%2081.9496395%20156.20454344%2081.94353744%20172.75079187%20C81.93836971%20187.86983815%2081.94962147%20202.98881998%2081.96863566%20218.10785351%20C81.98803326%20233.65155953%2081.99626664%20249.19523509%2081.9925124%20264.73895329%20C81.99060319%20273.45773292%2081.99306052%20282.17645771%2082.00722694%20290.89522743%20C82.01916628%20298.31814058%2082.02051713%20305.74096513%2082.00843678%20313.16387955%20C82.00256581%20316.94678992%2082.00139893%20320.72953843%2082.01343918%20324.51243782%20C82.02637213%20328.62380077%2082.01579126%20332.73478184%2082.00312805%20336.84614563%20C82.01050234%20338.02710621%2082.01787662%20339.20806678%2082.02547437%20340.42481405%20C81.94020249%20353.64162412%2079.58475249%20365.22365731%2070.62890625%20375.30078125%20C59.43149551%20384.98877486%2048.5995069%20385.6116798%2034.29296875%20385.6015625%20C32.92353183%20385.60546179%2031.5540961%20385.60979893%2030.18466187%20385.61454773%20C27.32879702%20385.62196213%2024.47305589%20385.62175381%2021.6171875%20385.61645508%20C17.99089323%20385.61066763%2014.36511094%20385.62759691%2010.73890114%20385.65079975%20C7.91440971%20385.66566391%205.090038%20385.66639174%202.26551437%20385.66329002%20C0.28942353%20385.66404012%20-1.68664899%20385.67780547%20-3.66268921%20385.69197083%20C-16.94942739%20385.62458325%20-27.43251173%20383.47720207%20-37.37109375%20374.30078125%20C-47.75205839%20363.40420578%20-48.83501252%20350.30358148%20-48.75204468%20335.82873535%20C-48.75672465%20334.54849944%20-48.76140462%20333.26826352%20-48.76622641%20331.94923258%20C-48.77861412%20328.43911682%20-48.77262274%20324.92924944%20-48.76326776%20321.41913342%20C-48.75642674%20317.6167424%20-48.7669833%20313.81439149%20-48.77520752%20310.01200867%20C-48.78849361%20302.58027308%20-48.78569009%20295.14862879%20-48.7769696%20287.71688974%20C-48.77017318%20281.67280926%20-48.76928477%20275.62875423%20-48.77254105%20269.58467102%20C-48.77300075%20268.72192193%20-48.77346044%20267.85917284%20-48.77393407%20266.97027984%20C-48.77489332%20265.21720055%20-48.77586597%20263.46412126%20-48.77685185%20261.71104199%20C-48.78539073%20245.30207877%20-48.77559524%20228.89316597%20-48.75945075%20212.48421103%20C-48.74604894%20198.42808811%20-48.74837745%20184.37203954%20-48.76220703%20170.31591797%20C-48.77828944%20153.96258303%20-48.7845669%20137.60929219%20-48.77537024%20121.25595045%20C-48.77441467%20119.50959747%20-48.77347156%20117.76324448%20-48.77254105%20116.01689148%20C-48.77184681%20114.72829141%20-48.77184681%20114.72829141%20-48.77113854%20113.41365901%20C-48.76855663%20107.38223258%20-48.77290236%20101.3508343%20-48.77997971%2095.31941223%20C-48.78842454%2087.96139626%20-48.78605219%2080.60347621%20-48.77013747%2073.24547112%20C-48.76229468%2069.49684254%20-48.75909428%2065.74837344%20-48.76908493%2061.99974632%20C-48.77978258%2057.92396992%20-48.76694385%2053.8485904%20-48.75204468%2049.77282715%20C-48.75873684%2048.60528979%20-48.76542901%2047.43775243%20-48.77232397%2046.23483515%20C-48.67188333%2031.98968244%20-46.49788008%2020.60627557%20-36.37109375%2010.30078125%20C-24.99934532%200.70204736%20-14.4396423%20-0.01018664%200%200%20Z%20'%20fill='%23212121'%20transform='translate(389.37109375,63.69921875)'/%3e%3cpath%20d='M0%200%20C1.37422758%20-0.00135128%202.7484547%20-0.00329565%204.12268066%20-0.00579834%20C6.98694461%20-0.00872786%209.85108284%20-0.00452264%2012.71533203%200.00488281%20C16.35966249%200.01627611%2020.0036982%200.00970489%2023.64801788%20-0.00226212%20C26.48099937%20-0.00953987%2029.31391266%20-0.00716587%2032.14689636%20-0.00200653%20C34.13524571%20-0.00005138%2036.12359788%20-0.00605238%2038.11193848%20-0.01226807%20C50.97970432%200.05377783%2060.71208654%201.43181578%2070.59375%2010.265625%20C80.43904472%2021.59627658%2081.90061916%2032.80877037%2081.85444641%2047.42196655%20C81.85827196%2048.71653011%2081.86209751%2050.01109367%2081.86603898%2051.34488642%20C81.87626947%2054.91345539%2081.87414988%2058.48192333%2081.86985838%2062.05050039%20C81.86738212%2065.90881512%2081.87641644%2069.76710608%2081.88389587%2073.62541199%20C81.89661984%2081.17464796%2081.89843945%2088.72384832%2081.89609561%2096.27309321%20C81.89430976%20102.4116766%2081.89606782%20108.55024922%2081.90032005%20114.68883133%20C81.90091524%20115.56380127%2081.90151043%20116.43877121%2081.90212366%20117.34025539%20C81.90333546%20119.11798027%2081.90454959%20120.89570516%2081.90576603%20122.67343004%20C81.91663264%20139.33028616%2081.91448321%20155.98712201%2081.90838119%20172.64397927%20C81.90321249%20187.86716535%2081.9144678%20203.09028744%2081.93347941%20218.31346087%20C81.95287204%20233.96225318%2081.96111133%20249.61101523%2081.95735615%20265.25981963%20C81.95544632%20274.03837098%2081.9579105%20282.81686787%2081.97207069%20291.59540939%20C81.98400361%20299.06848993%2081.98536797%20306.54148247%2081.97328053%20314.01456426%20C81.96740531%20317.8236788%2081.96625461%20321.63263253%2081.97828293%20325.44173622%20C81.99119743%20329.57972269%2081.98064519%20333.71732895%2081.9679718%20337.85531616%20C81.97534609%20339.04697148%2081.98272037%20340.23862679%2081.99031812%20341.46639287%20C81.9070551%20354.42932661%2079.28845483%20365.35673186%2070.59375%20375.265625%20C59.40723239%20384.95958111%2048.55610413%20385.57651772%2034.2578125%20385.56640625%20C32.88837558%20385.57030554%2031.51893985%20385.57464268%2030.14950562%20385.57939148%20C27.29364077%20385.58680588%2024.43789964%20385.58659756%2021.58203125%20385.58129883%20C17.95573698%20385.57551138%2014.32995469%20385.59244066%2010.70374489%20385.6156435%20C7.87925346%20385.63050766%205.05488175%20385.63123549%202.23035812%20385.62813377%20C0.25426728%20385.62888387%20-1.72180524%20385.64264922%20-3.69784546%20385.65681458%20C-16.86957859%20385.59001028%20-27.6387559%20383.53875206%20-37.40625%20374.265625%20C-47.39849958%20362.83409444%20-48.87080006%20349.69908274%20-48.79393005%20334.88296509%20C-48.79931559%20333.61230741%20-48.80470113%20332.34164973%20-48.81024987%20331.03248727%20C-48.82455435%20327.54904283%20-48.8205075%20324.06583798%20-48.81308305%20320.58238125%20C-48.80831603%20316.80857637%20-48.82089218%20313.03482073%20-48.83110046%20309.2610321%20C-48.84822503%20301.88477917%20-48.84914173%20294.50861166%20-48.84388756%20287.13234402%20C-48.83983281%20281.1321392%20-48.84130485%20275.13195947%20-48.84663582%20269.13175583%20C-48.84738424%20268.27513491%20-48.84813266%20267.41851399%20-48.84890376%20266.53593486%20C-48.85043537%20264.79526103%20-48.85197372%20263.05458721%20-48.85351873%20261.31391339%20C-48.86722079%20245.02030083%20-48.86182222%20228.72673639%20-48.85033352%20212.43312494%20C-48.84040323%20197.55559901%20-48.85334236%20182.67819748%20-48.87726771%20167.80069073%20C-48.90170128%20152.49074933%20-48.91125616%20137.18086577%20-48.90461498%20121.87090528%20C-48.90113225%20113.28900812%20-48.90329207%20104.70720657%20-48.92086601%2096.12532425%20C-48.93564136%2088.82004658%20-48.93615417%2081.51493187%20-48.9187951%2074.20965721%20C-48.91032641%2070.48908615%20-48.90803312%2066.76880554%20-48.92344666%2063.0482502%20C-49.06818906%2025.32392537%20-49.06818906%2025.32392537%20-38.8046875%2012.67578125%20C-27.21540674%201.02987534%20-15.72851608%20-0.04916843%200%200%20Z%20'%20fill='%23212121'%20transform='translate(239.40625,63.734375)'/%3e%3c/svg%3e",SearchRounded="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='M15.5001%2014.5H14.7101L14.4301%2014.23C15.6301%2012.83%2016.2501%2010.92%2015.9101%208.89002C15.4401%206.11002%2013.1201%203.89002%2010.3201%203.55002C6.09014%203.03002%202.53014%206.59001%203.05014%2010.82C3.39014%2013.62%205.61014%2015.94%208.39014%2016.41C10.4201%2016.75%2012.3301%2016.13%2013.7301%2014.93L14.0001%2015.21V16L18.2501%2020.25C18.6601%2020.66%2019.3301%2020.66%2019.7401%2020.25C20.1501%2019.84%2020.1501%2019.17%2019.7401%2018.76L15.5001%2014.5ZM9.50014%2014.5C7.01014%2014.5%205.00014%2012.49%205.00014%2010C5.00014%207.51002%207.01014%205.50002%209.50014%205.50002C11.9901%205.50002%2014.0001%207.51002%2014.0001%2010C14.0001%2012.49%2011.9901%2014.5%209.50014%2014.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",SortIcon="data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3115_5954)'%3e%3cpath%20d='M4.72326%2013.2386L1.2194%209.72426C0.396731%209.2419%20-0.40373%2010.2466%200.225485%2010.9546C1.77064%2012.4991%203.28619%2014.0746%204.8348%2015.616C4.89796%2015.6789%204.93004%2015.7593%205.00061%2015.8228C5.43736%2016.2172%206.29803%2015.9196%206.3158%2015.2815L6.31382%200.712092C6.27829%20-0.0888571%205.09586%20-0.25464%204.80025%200.452932C4.78347%200.493379%204.72277%200.686625%204.72277%200.711592V13.2391L4.72326%2013.2386Z'%20fill='%23909090'/%3e%3cpath%20d='M10.2754%202.75243L13.7792%206.26632C14.596%206.75068%2015.4078%205.7465%2014.7727%205.03643C13.2423%203.50195%2011.7332%201.94449%2010.2004%200.412502C10.1372%200.349085%2010.1051%200.26919%2010.0345%200.205773C9.56868%20-0.214176%208.72134%200.0359959%208.68235%200.709612L8.68432%2015.279C8.71986%2016.0799%209.90229%2016.2457%2010.1979%2015.5381C10.2147%2015.4977%2010.2754%2015.3045%2010.2754%2015.2795V2.75243Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3115_5954'%3e%3crect%20width='15'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%201%2015%200)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",InfoIcon="data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.71338%2011.25H9.21338V6.75H7.71338V11.25ZM8.46338%205.25C8.67588%205.25%208.85413%205.178%208.99813%205.034C9.14213%204.89%209.21388%204.712%209.21338%204.5C9.21338%204.2875%209.14138%204.1095%208.99738%203.966C8.85338%203.8225%208.67538%203.7505%208.46338%203.75C8.25088%203.75%208.07288%203.822%207.92938%203.966C7.78588%204.11%207.71388%204.288%207.71338%204.5C7.71338%204.7125%207.78538%204.89075%207.92938%205.03475C8.07338%205.17875%208.25138%205.2505%208.46338%205.25ZM8.46338%2015C7.42588%2015%206.45088%2014.803%205.53838%2014.409C4.62588%2014.015%203.83213%2013.4807%203.15713%2012.8062C2.48213%2012.1312%201.94788%2011.3375%201.55438%2010.425C1.16088%209.5125%200.963879%208.5375%200.963379%207.5C0.963379%206.4625%201.16038%205.4875%201.55438%204.575C1.94838%203.6625%202.48263%202.86875%203.15713%202.19375C3.83213%201.51875%204.62588%200.9845%205.53838%200.591C6.45088%200.1975%207.42588%200.0005%208.46338%200C9.50088%200%2010.4759%200.197%2011.3884%200.591C12.3009%200.985%2013.0946%201.51925%2013.7696%202.19375C14.4446%202.86875%2014.9791%203.6625%2015.3731%204.575C15.7671%205.4875%2015.9639%206.4625%2015.9634%207.5C15.9634%208.5375%2015.7664%209.5125%2015.3724%2010.425C14.9784%2011.3375%2014.4441%2012.1312%2013.7696%2012.8062C13.0946%2013.4812%2012.3009%2014.0157%2011.3884%2014.4097C10.4759%2014.8037%209.50088%2015.0005%208.46338%2015ZM8.46338%2013.5C10.1384%2013.5%2011.5571%2012.9187%2012.7196%2011.7562C13.8821%2010.5937%2014.4634%209.175%2014.4634%207.5C14.4634%205.825%2013.8821%204.40625%2012.7196%203.24375C11.5571%202.08125%2010.1384%201.5%208.46338%201.5C6.78838%201.5%205.36963%202.08125%204.20713%203.24375C3.04463%204.40625%202.46338%205.825%202.46338%207.5C2.46338%209.175%203.04463%2010.5937%204.20713%2011.7562C5.36963%2012.9187%206.78838%2013.5%208.46338%2013.5Z'%20fill='%23464646'/%3e%3c/svg%3e",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",SaveIcon="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.59%204.09C17.21%203.71%2016.7%203.5%2016.17%203.5H5C3.89%203.5%203%204.4%203%205.5V19.5C3%2020.6%203.9%2021.5%205%2021.5H19C20.1%2021.5%2021%2020.6%2021%2019.5V8.33C21%207.8%2020.79%207.29%2020.41%206.92L17.59%204.09ZM12%2019.5C10.34%2019.5%209%2018.16%209%2016.5C9%2014.84%2010.34%2013.5%2012%2013.5C13.66%2013.5%2015%2014.84%2015%2016.5C15%2018.16%2013.66%2019.5%2012%2019.5ZM13%209.5H7C5.9%209.5%205%208.6%205%207.5C5%206.4%205.9%205.5%207%205.5H13C14.1%205.5%2015%206.4%2015%207.5C15%208.6%2014.1%209.5%2013%209.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e";class ViewManager{constructor(){zt(this,"storageKeyPrefix","ce-grid-view")}getStorageKey(t){return`${this.storageKeyPrefix}:${t}`}getSavedViews(t){try{if(typeof window>"u")return[];const n=this.getStorageKey(t),i=window.localStorage.getItem(n);return i?JSON.parse(i):[]}catch(n){return console.error("Error retrieving saved views:",n),[]}}saveView(t,n,i,o,l){try{if(typeof window>"u")throw new Error("LocalStorage unavailable");const u=this.getSavedViews(t),p={id:`view_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,config:{name:n.name,description:n.description,timestamp:Date.now(),columns:i,pagination:o,...n.includeSort&&(l==null?void 0:l.sort)&&{sort:l.sort},...n.includeFilters&&(l==null?void 0:l.filters)&&{filters:l.filters},...n.includeSearch&&(l==null?void 0:l.searchQuery)&&{searchQuery:l.searchQuery}}};u.push(p);const m=this.getStorageKey(t);return window.localStorage.setItem(m,JSON.stringify(u)),p}catch(u){throw console.error("Error saving view:",u),u}}updateView(t,n,i,o,l){try{if(typeof window>"u")throw new Error("LocalStorage unavailable");const u=this.getSavedViews(t),f=u.findIndex(m=>m.id===n);if(f===-1)return null;u[f].config={...u[f].config,columns:i,pagination:o,timestamp:Date.now(),...(l==null?void 0:l.sort)&&{sort:l.sort},...(l==null?void 0:l.filters)&&{filters:l.filters},...(l==null?void 0:l.searchQuery)&&{searchQuery:l.searchQuery}};const p=this.getStorageKey(t);return window.localStorage.setItem(p,JSON.stringify(u)),u[f]}catch(u){return console.error("Error updating view:",u),null}}loadView(t,n){try{const o=this.getSavedViews(t).find(l=>l.id===n);return o?o.config:null}catch(i){return console.error("Error loading view:",i),null}}deleteView(t,n){try{if(typeof window>"u")return!1;let i=this.getSavedViews(t);i=i.filter(l=>l.id!==n);const o=this.getStorageKey(t);return window.localStorage.setItem(o,JSON.stringify(i)),!0}catch(i){return console.error("Error deleting view:",i),!1}}renameView(t,n,i,o){try{if(typeof window>"u")throw new Error("LocalStorage unavailable");const l=this.getSavedViews(t),u=l.find(p=>p.id===n);if(!u)return null;u.config.name=i,o!==void 0&&(u.config.description=o);const f=this.getStorageKey(t);return window.localStorage.setItem(f,JSON.stringify(l)),u}catch(l){return console.error("Error renaming view:",l),null}}clearAllViews(t){try{if(typeof window>"u")return!1;const n=this.getStorageKey(t);return window.localStorage.removeItem(n),!0}catch(n){return console.error("Error clearing views:",n),!1}}exportViews(t){const n=this.getSavedViews(t);return JSON.stringify(n,null,2)}importViews(t,n){try{if(typeof window>"u")return!1;const i=JSON.parse(n);if(!Array.isArray(i)||!i.every(l=>l.id&&l.config&&l.config.name&&l.config.columns&&l.config.pagination))return!1;const o=this.getStorageKey(t);return window.localStorage.setItem(o,JSON.stringify(i)),!0}catch(i){return console.error("Error importing views:",i),!1}}}const viewManager=new ViewManager,useViewPersistence=(e,t=!0)=>{const n=React.useRef(0),i=React.useCallback((m,d,g,_,E,S,b,T)=>{if(!e||!t)return;const C=Date.now();if(!(C-n.current<2e3)){n.current=C;try{const R=viewManager.getSavedViews(e),O={visibleColumns:m,columnOrder:d,...Array.isArray(g)&&{frozenColumnIds:g}},j={currentPage:_,rowsPerPage:E},I={...S&&{sort:S},...b&&{filters:b},...T&&{searchQuery:T}};if(R.length>0){const D=R[R.length-1].id;viewManager.updateView(e,D,O,j,I)}else{const D=viewManager.saveView(e,{name:"Auto View",includeFilters:!0,includeSort:!0,includeSearch:!0},O,j,I)}}catch(R){console.warn("[ViewPersistence] Auto-save failed:",R)}}},[e,t]),o=React.useCallback(()=>{var m,d,g,_,E;if(!e||!t)return null;try{const S=viewManager.getSavedViews(e);if(S.length===0)return null;const T=S[S.length-1].config;return{visibleColumns:((m=T.columns)==null?void 0:m.visibleColumns)||[],columnOrder:((d=T.columns)==null?void 0:d.columnOrder)||[],frozenColumnIds:((g=T.columns)==null?void 0:g.frozenColumnIds)||[],currentPage:((_=T.pagination)==null?void 0:_.currentPage)||0,rowsPerPage:((E=T.pagination)==null?void 0:E.rowsPerPage)||20,sort:T.sort,filters:T.filters,searchQuery:T.searchQuery}}catch(S){return console.warn("[ViewPersistence] Auto-restore failed:",S),null}},[e,t]),l=React.useCallback((m,d,g,_,E,S,b,T,C)=>{if(!e||!t)return null;try{const A=S||`View ${new Date().toLocaleTimeString()}`;return viewManager.saveView(e,{name:A,includeFilters:!0,includeSort:!0,includeSearch:!0},{visibleColumns:m,columnOrder:d,...Array.isArray(g)&&{frozenColumnIds:g}},{currentPage:_,rowsPerPage:E},{...b&&{sort:b},...T&&{filters:T},...C&&{searchQuery:C}}).id}catch(A){return console.error("[ViewPersistence] Save failed:",A),null}},[e,t]),u=React.useCallback(m=>{var d,g,_,E,S;if(!e||!t)return null;try{let b=viewManager.getSavedViews(e);if(b.length===0)return null;const T=m?b.find(A=>A.id===m):b[b.length-1];if(!T)return null;const C=T.config;return{visibleColumns:((d=C.columns)==null?void 0:d.visibleColumns)||[],columnOrder:((g=C.columns)==null?void 0:g.columnOrder)||[],frozenColumnIds:((_=C.columns)==null?void 0:_.frozenColumnIds)||[],currentPage:((E=C.pagination)==null?void 0:E.currentPage)||0,rowsPerPage:((S=C.pagination)==null?void 0:S.rowsPerPage)||20,sort:C.sort,filters:C.filters,searchQuery:C.searchQuery}}catch(b){return console.error("[ViewPersistence] Load failed:",b),null}},[e,t]),f=React.useCallback(()=>{if(!e||!t)return[];try{return viewManager.getSavedViews(e)}catch(m){return console.warn("[ViewPersistence] Get views failed:",m),[]}},[e,t]),p=React.useCallback(()=>{if(!e||!t)return!1;try{return viewManager.clearAllViews(e),!0}catch(m){return console.error("[ViewPersistence] Clear failed:",m),!1}},[e,t]);return React.useMemo(()=>({autoSave:i,autoRestore:o,saveView:l,loadView:u,getSavedViews:f,clearAllViews:p}),[i,o,l,u,f,p])},PaginationControls=({currentPage:e,totalPages:t,setCurrentPage:n})=>{const l=Math.floor(e/5)*5,u=Math.min(l+5,t),f=()=>{n(Math.max(0,l-1))},p=()=>{n(Math.min(t-1,u))},m=[];for(let d=l;d<u;d++)m.push(jsxRuntimeExports.jsx("button",{className:`pagination-page${e===d?" active":""}`,onClick:()=>n(d),disabled:e===d,children:d+1},d));return jsxRuntimeExports.jsxs("div",{className:"pagination-controls",children:[jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(0),disabled:e===0,children:"First"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e-1),disabled:e===0,children:"Previous"}),l>0&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:f,children:"..."}),m,u<t&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:p,children:"..."}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e+1),disabled:e===t-1,children:"Next"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(t-1),disabled:e===t-1,children:"Last"})]})},RowsPerPageSelector=({rowsPerPage:e,setRowsPerPage:t,setCurrentPage:n,pageSizeOptions:i})=>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:o=>{t(Number(o.target.value)),n(0)},className:"ml-8",children:i.map(o=>jsxRuntimeExports.jsx("option",{value:o,children:o},o))})]}),EntriesInfo=({dataLength:e,currentPage:t,rowsPerPage:n,totalRecords:i})=>jsxRuntimeExports.jsx("div",{className:"entries-info",children:e>0&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(()=>{const o=i??e;if(o===0)return"Showing 0 to 0 of 0 entries";const l=t*n+1,u=Math.min((t+1)*n,o);return`Showing ${l} to ${u} of ${o} entries`})()})}),CEDataGridDynamicTable=({title:e,jsonData:t,columnList:n,ischeckBoxInGrid:i,isSingleSelectionMode:o=!1,renderCheckboxInColumnId:l,onColumnCheckboxChange:u,isRadioButtonInGrid:f,onRadioChange:p,getSelectedRadioValue:m,renderRadioInColumnId:d,isSearchBoxInGrid:g,isAddButtonRequired:_,isEditButtonRequired:E,isDeleteButtonRequired:S,isApproveButtonRequired:b,isReassignButtonRequired:T,isCancelButtonRequired:C,isCopyButtonRequired:A,isViewButtonRequired:R,isExportAllToExcel:O,handleEditClick:j,handleAddClick:I,handleDeleteClick:D,handleApproveClick:F,handleReassignClick:B,handleCancelClick:X,handleCopyClick:U,handleViewClick:N,enableRowLevelEdit:G=!1,rowEditIcon:ee,editableColumns:te,editableCellPredicate:z,noOfPagesPerPage:K,totalRecords:L,clickableColumns:W,conditionalClickableColumns:Y,clickableCellPredicate:V,handleCellClick:M,onReload:q,showDownloadIcon:H=!0,downloadOptions:Q,showRefreshIcon:ue=!0,showFullViewIcon:de=!0,showColumnVisibilityIcon:Se=!0,showSortIcon:pe=!0,showFilterIcon:ye=!0,defaultSortConfig:Ae,onDataUpdate:ie,isOverrideCSS:Ie,showPagination:we=!0,shouldResetSearchOnDataChange:Ue,pageSizeOptions:We=[10,20,50,100],handleSelectedRows:Ce,rowsSelected:qe,selectionKey:Je="id",onPageChange:rt,getRowDisabled:tt,getRowStyle:Ve,customActions:mt=[],shouldColumnPersist:it=!1,serverSidePagination:Oe=!1,enableFreezeControls:Me=!1,freezeColumns:Be,defaultFreezeColumns:ze,onFreezeColumnsChange:Qe,gridId:ut,enableAutoSave:ct=!1,enableAutoRestore:ot=!1,onViewPersistenceReady:Ct,gridContext:He,onGridContextChange:Et,onColumnPanelClose:Mt})=>{const kt=useViewPersistence(ut,ct||ot),[St,Gt]=React.useState({}),[at,yt]=React.useState([]),[Ke,Pt]=React.useState([]),[qt,Xt]=React.useState(!1),[Yt,Ye]=React.useState(null),[lt,Dt]=React.useState(()=>{const Z=Be??ze;return Z==null?[]:typeof Z=="number"?[]:Z.filter(ne=>typeof ne=="string").map(ne=>ne.trim()).filter(Boolean)}),[At,Vt]=React.useState(new Set),[Zt,Jt]=React.useState({}),[$t,Ot]=React.useState(null),[J,oe]=React.useState(!1),[ae,se]=React.useState(""),[ce,fe]=React.useState(null),[ve,Te]=React.useState("contains"),[_e,ge]=React.useState(""),[me,je]=React.useState({}),[ke,Ne]=React.useState(0),[Pe,Le]=React.useState(K??10),[Ze,dt]=React.useState(new Set),[Ge,ht]=React.useState(""),[Ft,Wt]=React.useState(!1),[et,Rt]=React.useState(new Set),[ft,wt]=React.useState([]),[Qt,br]=React.useState(null),[Dr,or]=React.useState(null),Er=React.useRef(null),Nr=React.useRef(null),Mr=React.useRef(null),un=React.useRef(null),[er,fn]=React.useState(new Set),[pt,pn]=React.useState([]),[Ut,$r]=React.useState(null),[jt,Sr]=React.useState(null),[lr,dn]=React.useState(!1),[Zn,Jn]=React.useState(!1),[nt,cr]=React.useState(null),[ur,Fr]=React.useState(!1),[hn,It]=React.useState(!0),Lr=React.useRef([]),Br=React.useRef(""),Vr=React.useRef(""),mn=React.useRef(void 0),Wr=React.useRef("");React.useRef(!1);const pr=React.useRef(!1),zr=React.useRef([]),Ur=React.useRef([]),Hr=React.useRef([]),wr=React.useRef(!1),Gr=React.useRef(rt),qr=React.useRef({visibleColumns:[],columnOrder:[],frozenColumnIds:[],currentPage:0,rowsPerPage:K??10,sortConfig:null,activeFilters:{},searchQuery:""}),Kt=typeof L=="number"&&Number.isFinite(L)&&L>=0?Math.floor(L):void 0,Kr=Oe?Kt??at.length:at.length,dr=Math.max(1,Math.ceil(Kr/Pe)),hr=E===!0||G===!0,yn=mt.length>0,mr=hr||T||C||b||S||_||A||R||yn,xn=(hr?1:0)+(T?1:0)+(C?1:0)+(b?1:0)+(S?1:0)+(_?1:0)+(A?1:0)+(R?1:0)+mt.length,Xr=Math.max(48,xn*28+16),yr=(Z,ne)=>Z.length===ne.length&&Z.every((le,he)=>le===ne[he]),Yr=React.useCallback(()=>{if(typeof Et!="function"||wr.current)return;const Z={currentPage:ke,rowsPerPage:Pe,sortConfig:nt,filters:me,searchQuery:Ge,visibleColumns:Array.from(et),columnOrder:ft,frozenColumnIds:lt},ne=JSON.stringify(Z);if(ne!==Vr.current)try{Et(Z),Vr.current=ne}catch{}},[Et,ke,Pe,nt,me,Ge,et,ft,lt]),xr=React.useCallback(Z=>{pr.current=!0,zr.current=Z.visibleColumns,Ur.current=Z.columnOrder,Hr.current=Z.frozenColumnIds??[],Rt(new Set(Z.visibleColumns)),wt(Z.columnOrder),Array.isArray(Z.frozenColumnIds)&&Dt(Z.frozenColumnIds),Ne(Z.currentPage),Le(Z.rowsPerPage),Z.sort&&cr(Z.sort),Z.filters&&je(Z.filters),typeof Z.searchQuery=="string"&&ht(Z.searchQuery)},[]);React.useEffect(()=>{if(!He)return;const Z=JSON.stringify({currentPage:He.currentPage,rowsPerPage:He.rowsPerPage,sortConfig:He.sortConfig,filters:He.filters,searchQuery:He.searchQuery,visibleColumns:He.visibleColumns,columnOrder:He.columnOrder,frozenColumnIds:He.frozenColumnIds});if(Br.current===Z)return;Br.current=Z;let ne=!1;if(typeof He.currentPage=="number"&&Number.isFinite(He.currentPage)&&He.currentPage>=0){const le=Math.floor(He.currentPage);le!==ke&&(Ne(le),ne=!0)}if(typeof He.rowsPerPage=="number"&&Number.isFinite(He.rowsPerPage)&&He.rowsPerPage>0){const le=Math.floor(He.rowsPerPage);le!==Pe&&(Le(le),ne=!0)}if(He.sortConfig!==void 0){const le=He.sortConfig??null;JSON.stringify(le)!==JSON.stringify(nt)&&(cr(le),ne=!0)}if(He.filters!==void 0){const le=He.filters??{};JSON.stringify(le)!==JSON.stringify(me)&&(je(le),ne=!0)}if(He.searchQuery!==void 0){const le=He.searchQuery??"";le!==Ge&&(ht(le),ne=!0)}if(Array.isArray(He.visibleColumns)){const le=Array.from(et);yr(le,He.visibleColumns)||(Rt(new Set(He.visibleColumns)),ne=!0)}Array.isArray(He.columnOrder)&&(yr(ft,He.columnOrder)||(wt(He.columnOrder),ne=!0)),Array.isArray(He.frozenColumnIds)&&(yr(lt,He.frozenColumnIds)||(Dt(He.frozenColumnIds),ne=!0)),ne&&(wr.current=!0,Promise.resolve().then(()=>{wr.current=!1}))},[He,ke,Pe,nt,me,Ge,et,ft,lt]),React.useEffect(()=>{Yr()},[Yr]),React.useEffect(()=>{K!=null&&K>0&&(Oe&&K!==Pe&&It(!0),Le(K),tr(0))},[K]),React.useEffect(()=>{if(ot&&ut){const Z=kt.autoRestore();Z&&xr(Z)}},[ot,ut,kt,xr]),React.useEffect(()=>{!ct||!ut||kt.autoSave(Array.from(et),ft,lt,ke,Pe,nt,me,Ge)},[ct,ut,kt,et,ft,lt,ke,Pe,nt,me,Ge]),React.useEffect(()=>{qr.current={visibleColumns:Array.from(et),columnOrder:ft,frozenColumnIds:lt,currentPage:ke,rowsPerPage:Pe,sortConfig:nt,activeFilters:me,searchQuery:Ge}},[et,ft,lt,ke,Pe,nt,me,Ge]),React.useEffect(()=>{if(!Ct||!ut)return;Ct({saveView:()=>{const le=qr.current;kt.saveView(le.visibleColumns,le.columnOrder,le.frozenColumnIds,le.currentPage,le.rowsPerPage,`Manual View ${new Date().toLocaleTimeString()}`,le.sortConfig,le.activeFilters,le.searchQuery)},restoreView:()=>{const le=kt.loadView();le&&xr(le)}})},[Ct,ut,kt,xr]);const vn=()=>Fr(!0),gn=()=>Fr(!1),tr=Z=>{const ne=Math.max(0,Math.min(Z,dr-1));ne!==ke&&(Oe&&It(!0),Ne(ne))};React.useEffect(()=>{Gr.current=rt},[rt]),React.useEffect(()=>{const Z=Gr.current;if(typeof Z=="function")try{Z(ke,Pe)}catch{}},[ke,Pe]);const _n=Z=>{!Number.isFinite(Z)||Z<=0||(Oe&&Z!==Pe&&It(!0),Le(Z),tr(0))},gt=(Z,ne)=>{if(typeof Je=="function")try{const le=Je(Z);if(le!=null)return le}catch{}else if(typeof Je=="string"&&Z&&Z[Je]!==void 0)return Z[Je];if(ne!==void 0)return`__row_${ne}`},bn=()=>l?(Array.isArray(l)?l:[l]).filter(ne=>typeof ne=="string"&&!!ne):[],Zr=Z=>{if(Z===!0)return!0;if(typeof Z=="string"){const ne=Z.trim().toLowerCase();return ne==="true"||ne==="1"||ne==="yes"}return typeof Z=="number"?Z===1:!1},Jr=Z=>{const ne=bn();if(ne.length===0)return{};const le={};return Z.forEach((he,xe)=>{const Re=gt(he,xe);if(Re===void 0)return;const De=ne.filter(Ee=>Zr(he==null?void 0:he[Ee]));De.length>0&&(le[String(Re)]=De)}),le};React.useEffect(()=>{if(typeof Ce=="function"){const Z=Array.from(At),ne=Z.map(le=>{if(typeof le=="string"&&le.startsWith("__row_")){const xe=parseInt(le.slice(6),10);return!isNaN(xe)&&xe>=0&&xe<at.length?at[xe]:void 0}return(Ke||at||[]).find(xe=>{const Re=gt(xe);return Re!==void 0&&(Re===le||String(Re)===String(le))})}).filter(Boolean);try{Ce.length===1?Ce({ids:Z,rows:ne}):Ce(ne)}catch{try{Ce(ne)}catch{}}}},[At,at,Je]),React.useEffect(()=>{if(!qe)return;const Z=Array.from(qe),ne=Z.every(xe=>typeof xe=="number"&&xe>=0&&xe<at.length),le=new Set(Z.map(xe=>{if(ne){const Re=at[xe-1];return gt(Re,xe)??`__row_${xe}`}return xe}));((xe,Re)=>!(xe.size!==Re.size||!Array.from(xe).every(De=>Re.has(De))))(le,At)||Vt(le)},[qe,at,Je,gt,At]),React.useEffect(()=>{if(!(t&&Array.isArray(t))){It(!0);return}const Z=stripReactElements(Lr.current),ne=stripReactElements(t);if(!(JSON.stringify(Z)!==JSON.stringify(ne))){It(!1);return}const he=[...t],xe=nt??Ae??null;let Re=he;xe!=null&&xe.column&&(Re=[...he].sort((Xe,st)=>{const xt=Ht(Xe,st,xe.column);return xe.direction==="asc"?xt:-xt}),!nt&&Ae&&cr(Ae));let De=Ge,Ee=me;Ue&&(De="",Ee={},ht(""),je({}));const be=Lt(Re,Ee,De);Pt(Re),yt(be);const Fe=Oe?Kt??be.length:be.length,$e=Math.max(0,Math.ceil(Math.max(Fe,1)/Pe)-1);if(ke>$e&&Ne($e),d){const Xe={},st=Array.isArray(d)?d:[d];Re.forEach((xt,vt)=>{const Tt=xt.id??`__row_${vt}`;for(const _t of st)if(xt[_t]===!0){Xe[Tt]={columnId:_t,rowData:xt};break}}),Qr(Xe)}Jt(l?Jr(Re):{}),Lr.current=t,It(!1)},[t,Ae,l,d,nt,me,Ge,Ue,Oe,Kt,Pe,ke]);const rr=React.useMemo(()=>{const Z=(n??[]).map(le=>le.id).join("|");return`ce-grid:${typeof e=="string"?e:"grid"}:${Z}`},[n,e]);React.useEffect(()=>{if(!n||n.length===0)return;const Z=JSON.stringify(n.map(Ee=>({id:Ee.id,label:Ee.label,tooltip:Ee.tooltip,shouldDisplay:Ee.shouldDisplay??!0,shouldVisible:Ee.shouldVisible??!0,width:Ee.width,elementType:Ee.elementType,required:Ee.required??!1})));if(lr&&Wr.current===Z)return;const ne=n.map(Ee=>({id:Ee.id,label:Ee.label??Ee.id,tooltip:Ee.tooltip,shouldDisplay:Ee.shouldDisplay??!0,shouldVisible:Ee.shouldVisible??!0,width:Ee.width,elementType:Ee.elementType,required:Ee.required??!1}));pn(ne);const le=(()=>{try{const Ee=typeof window<"u"?window.localStorage.getItem(`${rr}:columns`):null;return Ee?JSON.parse(Ee):null}catch{return null}})();let he;ot&&pr.current?he=zr.current.filter(Ee=>{var be,Fe;return ne.some($e=>$e.id===Ee)&&((be=ne.find($e=>$e.id===Ee))==null?void 0:be.shouldDisplay)!==!1&&((Fe=ne.find($e=>$e.id===Ee))==null?void 0:Fe.shouldVisible)!==!1}):le!=null&&le.visibleColumns?he=le.visibleColumns.filter(Ee=>{var be,Fe;return ne.some($e=>$e.id===Ee)&&((be=ne.find($e=>$e.id===Ee))==null?void 0:be.shouldDisplay)!==!1&&((Fe=ne.find($e=>$e.id===Ee))==null?void 0:Fe.shouldVisible)!==!1}):he=ne.filter(Ee=>Ee.shouldDisplay!==!1&&Ee.shouldVisible!==!1).map(Ee=>Ee.id);let xe=[];ot&&pr.current?xe=Ur.current.filter(Ee=>{var be;return ne.some(Fe=>Fe.id===Ee)&&((be=ne.find(Fe=>Fe.id===Ee))==null?void 0:be.shouldVisible)!==!1}):le!=null&&le.columnOrder?xe=le.columnOrder.filter(Ee=>{var be;return ne.some(Fe=>Fe.id===Ee)&&((be=ne.find(Fe=>Fe.id===Ee))==null?void 0:be.shouldVisible)!==!1}):xe=ne.filter(Ee=>Ee.shouldVisible!==!1).map(Ee=>Ee.id);const Re=xe.filter(Ee=>he.includes(Ee));let De=[];if(Be!=null)if(typeof Be=="number"){const Ee=Math.max(0,Math.floor(Be));De=Re.slice(0,Ee)}else{const Ee=new Set(Be.filter(be=>typeof be=="string").map(be=>be.trim()).filter(Boolean));De=xe.filter(be=>Ee.has(be))}else if(ot&&pr.current)De=Hr.current.filter(Ee=>ne.some(be=>be.id===Ee));else if(Array.isArray(le==null?void 0:le.frozenColumnIds))De=le.frozenColumnIds.filter(Ee=>ne.some(be=>be.id===Ee));else if(ze!=null)if(typeof ze=="number"){const Ee=Math.max(0,Math.floor(ze));De=Re.slice(0,Ee)}else{const Ee=new Set(ze.filter(be=>typeof be=="string").map(be=>be.trim()).filter(Boolean));De=xe.filter(be=>Ee.has(be))}he.length===0&&(he=ne.filter(Ee=>Ee.shouldDisplay!==!1).map(Ee=>Ee.id)),xe.length===0&&(xe=ne.filter(Ee=>Ee.shouldVisible!==!1).map(Ee=>Ee.id)),Rt(new Set(he)),wt(xe),Dt(De),dn(!0),Wr.current=Z,mn.current=n},[n,rr,ot,lr,Be,ze,kt]),React.useEffect(()=>{if(pt.length===0)return;const Z=Array.from(et).filter(le=>!pt.some(he=>he.id===le&&he.shouldVisible!==!1));if(Z.length>0){const le=new Set(Array.from(et).filter(he=>!Z.includes(he)));if(le.size===0){const he=pt.find(xe=>xe.shouldDisplay!==!1&&xe.shouldVisible!==!1);he&&le.add(he.id)}Rt(le)}const ne=ft.filter(le=>{var he;return((he=pt.find(xe=>xe.id===le))==null?void 0:he.shouldVisible)===!1});if(ne.length>0){const le=ft.filter(he=>!ne.includes(he));wt(le)}},[pt,et,ft]),React.useEffect(()=>{if(lr)try{if(typeof window<"u")if(it){const Z={visibleColumns:Array.from(et),columnOrder:ft,frozenColumnIds:lt};window.localStorage.setItem(`${rr}:columns`,JSON.stringify(Z))}else window.localStorage.removeItem(`${rr}:columns`)}catch(Z){console.warn("[CEDataGrid] Failed to manage column persistence:",Z)}},[et,ft,lt,rr,lr,it]);const[En,Qr]=React.useState({}),Sn=({row:Z,rowIndex:ne,columnId:le,checked:he})=>{const xe=Ke&&Ke.length>0?Ke:at,Re=xe.indexOf(Z),De=gt(Z,Re>=0?Re:ke*Pe+ne);if(De===void 0)return;const Ee=xt=>{let vt;return{nextList:xt.map((_t,Bt)=>{const ar=gt(_t,Bt);return!(ar!==void 0&&(ar===De||String(ar)===String(De)))&&_t!==Z?_t:(vt={..._t,[le]:he},vt)}),patchedRow:vt}},{nextList:be,patchedRow:Fe}=Ee(xe),{nextList:$e}=Ee(at);Pt(be),yt($e);const Xe=Jr(be);Jt(Xe);const st=Fe??{...Z,[le]:he};if(typeof Ce=="function"){const xt=Array.from(At),vt=xt.map(_t=>{if(typeof _t=="string"&&_t.startsWith("__row_")){const Bt=parseInt(_t.slice(6),10);return!isNaN(Bt)&&Bt>=0&&Bt<be.length?be[Bt]:void 0}return be.find((Bt,ar)=>{const _r=gt(Bt,ar);return _r!==void 0&&(_r===_t||String(_r)===String(_t))})}).filter(Boolean),Tt={ids:xt,rows:vt,columnCheckboxSelection:Xe,toggledColumnId:le,toggledColumnChecked:he,toggledRowId:De,toggledRow:st};try{Ce.length===1?Ce(Tt):Ce(vt)}catch{try{Ce(vt)}catch{}}}if(typeof u=="function"){const xt=Xe[String(De)]||[];try{u({rowIndex:ne,rowData:st,columnId:le,checked:he,selectedColumnIds:xt,selectionMap:Xe,fullData:be})}catch{}}ie&&ie({fullData:be,updatedRow:st})},wn=({rowIndex:Z,columnId:ne,rowData:le})=>{const he=Array.isArray(d)?d:[d],xe={...le,...Object.fromEntries(he.map(Ee=>[Ee,Ee===ne]))},Re=le.id??`__row_${Z}`;Qr(Ee=>({...Ee,[Re]:{columnId:ne,rowData:xe}}));const De=at.map((Ee,be)=>(Ee.id??`__row_${be}`)===Re?{...Ee,...Object.fromEntries(he.map($e=>[$e,$e===ne]))}:Ee);yt(De),Pt(De),ie&&ie({fullData:De,updatedRow:xe})},Tn=Z=>{var he;const ne=at.findIndex(xe=>xe===Z),le=Z.id??`__row_${ne}`;return((he=En[le])==null?void 0:he.columnId)||""};React.useEffect(()=>{ke>0&&ke>=dr&&tr(0)},[ke,dr]);const Nt=React.useMemo(()=>{if(Oe)return at;const Z=ke*Pe,ne=Z+Pe;return at.slice(Z,ne)},[at,ke,Pe,Oe]),Cn=()=>{ht("");const Z=Lt(Ke,me,"");yt(Z)},en=(Z,ne)=>{Rt(le=>{const he=new Set(le);return ne?he.add(Z):(he.delete(Z),Dt(xe=>xe.filter(Re=>Re!==Z))),he})},Pn=(Z,ne)=>{!Z||!ne||Z===ne||wt(le=>{const he=pt.filter(Fe=>Fe.shouldVisible!==!1).map(Fe=>Fe.id),xe=[...le.filter(Fe=>he.includes(Fe)),...he.filter(Fe=>!le.includes(Fe))],Re=xe.indexOf(Z),De=xe.indexOf(ne);if(Re===-1||De===-1||Re===De)return xe;const Ee=[...xe],[be]=Ee.splice(Re,1);return Ee.splice(De,0,be),Ee})},tn=React.useCallback(()=>{if(Wt(!1),Mt){const Z=pt.filter(he=>he.shouldVisible!==!1).map(he=>he.id),le=(ft.length>0?[...ft.filter(he=>Z.includes(he)),...Z.filter(he=>!ft.includes(he))]:Z).map((he,xe)=>{const Re=pt.find(De=>De.id===he);return{id:he,label:Re==null?void 0:Re.label,position:xe+1,visible:et.has(he)}});Mt(le)}},[ft,pt,et,Mt]),rn=(Z,ne=null)=>{const le=ne?`${Z}-${ne}`:`${Z}`,he=new Set(Ze);he.has(le)?he.delete(le):(Array.from(he).forEach(xe=>{xe.startsWith(`${Z}`)&&he.delete(xe)}),he.add(le)),dt(he)},nn=Z=>{Ot($t===Z?null:Z)};React.useEffect(()=>{const Z=ne=>{var De,Ee,be,Fe;if(!$t)return;const le=ne.target,he=((De=Nr.current)==null?void 0:De.contains(le))??!1,xe=((Ee=Mr.current)==null?void 0:Ee.contains(le))??!1,Re=((Fe=(be=ne.target)==null?void 0:be.closest)==null?void 0:Fe.call(be,".dropdown-trigger"))!=null;!he&&!xe&&!Re&&Ot(null)};return document.addEventListener("click",Z),()=>{document.removeEventListener("click",Z)}},[$t]),React.useMemo(()=>new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),[]);const Rn=(Z,ne)=>{if(Z==null)return 1;if(ne==null)return-1;const le=/^-?\$?[\d,]+(\.\d+)?$|^\(\$?[\d,]+(\.\d+)?\)$/,he=be=>{if(be==null)return null;const Fe=String(be).trim();if(!le.test(Fe))return null;const $e=/^\(.*\)$/.test(Fe),Xe=Fe.replace(/[(),$]/g,"").replace(/,/g,"");if(!Xe)return null;const st=Number(Xe);return isNaN(st)?null:$e?-st:st},xe=he(Z),Re=he(ne);if(xe!==null&&Re!==null)return xe-Re;const De=new Date(Z),Ee=new Date(ne);return!isNaN(De.getTime())&&!isNaN(Ee.getTime())?De.getTime()-Ee.getTime():!isNaN(Number(Z))&&!isNaN(Number(ne))?Number(Z)-Number(ne):String(Z).localeCompare(String(ne),void 0,{numeric:!0,sensitivity:"base"})},Ht=(Z,ne,le)=>{const he=getColumnValue(Z==null?void 0:Z[le]),xe=getColumnValue(ne==null?void 0:ne[le]);return Rn(he,xe)};React.useEffect(()=>{if(!(nt!=null&&nt.column)||!Array.isArray(Ke)||Ke.length===0)return;const Z=[...Ke].sort((ne,le)=>{const he=Ht(ne,le,nt.column);return nt.direction==="asc"?he:-he});Pt(Z)},[nt==null?void 0:nt.column,nt==null?void 0:nt.direction]);const An=Z=>{if(!nt)return Z;const{column:ne,direction:le}=nt;return[...Z].sort((he,xe)=>{const Re=Ht(he,xe,ne);return le==="asc"?Re:-Re})},kn=(Z,ne)=>{for(let le=1;le<Z.length;le++)if(Ht(Z[le-1],Z[le],ne)>0)return!1;return!0},On=(Z,ne)=>{for(let le=1;le<Z.length;le++)if(Ht(Z[le-1],Z[le],ne)<0)return!1;return!0},Lt=(Z,ne=me,le=Ge)=>{let he=[...Z];if(le&&le.trim()){const xe=le.toLowerCase();he=he.filter(Re=>Object.entries(Re).some(([De,Ee])=>et.has(De)?String(Ee??"").toLowerCase().includes(xe):!1))}return Object.entries(ne||{}).forEach(([xe,Re])=>{const{value:De,operator:Ee}=Re,be=(De??"").toLowerCase();he=he.filter(Fe=>{const $e=Fe[xe],Xe=String(getColumnValue($e)??"").toLowerCase();switch((Ee||"").toString()){case"contains":return Xe.includes(be);case"equals":return Xe===be;case"startsWith":return Xe.startsWith(be);case"endsWith":return Xe.endsWith(be);case"does not contain":return!Xe.includes(be);case"does not equal":return Xe!==be;case"is any of":return De.split(",").map(st=>st.trim().toLowerCase()).includes(Xe);case"Date Range":case"dateRange":{if(!De)return!0;const st=De.split(" - ").map(_t=>_t.trim());if(st.length!==2)return!1;const xt=new Date(st[0]),vt=new Date(st[1]);if(isNaN(xt.getTime())||isNaN(vt.getTime())||(xt.setHours(0,0,0,0),vt.setHours(23,59,59,999),!$e))return!1;const Tt=new Date($e);return isNaN(Tt.getTime())?!1:(Tt.setHours(0,0,0,0),Tt>=xt&&Tt<=vt)}default:return!0}})}),he};React.useEffect(()=>{if(!Array.isArray(Ke))return;const Z=Lt(Ke,me,Ge);yt(Z);const ne=Oe?Kt??Z.length:Z.length,le=Math.max(0,Math.ceil(Math.max(ne,1)/Pe)-1);ke>le&&Ne(le)},[Ke,me,Ge,Pe,ke,Oe,Kt]);const jn=Z=>{if(!Ke||Ke.length===0)return;const ne=Object.keys(me).length>0,le=Ge.trim().length>0,he=ne||le?at:Ke;let xe;(nt==null?void 0:nt.column)===Z?xe=nt.direction==="asc"?"desc":"asc":kn(he,Z)?xe="desc":(On(he,Z),xe="asc"),cr({column:Z,direction:xe});const Re=[...Ke].sort((Ee,be)=>{const Fe=Ht(Ee,be,Z);return xe==="asc"?Fe:-Fe});Pt(Re);const De=Lt(Re);yt(De),Ne(0)},an=()=>{if(!ae){oe(!1),ge(""),se(""),Ne(0);return}if(ve==="Date Range")if(ce&&ce.startDate&&ce.endDate)nr(ae,void 0,"Date Range");else{oe(!0);return}else _e&&_e.trim()!==""&&nr(ae,_e,ve);oe(!1),ge(""),se(""),fe(null),Ne(0)},nr=(Z,ne,le)=>{if(le==="Date Range"&&ce&&Z){const{startDate:he,endDate:xe}=ce;if(!he||!xe){console.warn("Invalid date range:",he,xe);return}const Re=new Date(he);Re.setHours(0,0,0,0);const De=new Date(xe);De.setHours(23,59,59,999);const Ee=Ke.filter(be=>{const Fe=be[Z];if(!Fe)return!1;const $e=new Date(Fe);return isNaN($e.getTime())?!1:($e.setHours(0,0,0,0),$e>=Re&&$e<=De)});yt(Ee),Ne(0),je({...me,[Z]:{value:`${he} - ${xe}`,operator:"Date Range"}}),oe(!1),Ot(null),fe(null);return}if(Z){const he={...me};if(ne===""&&(le==="contains"||le==="equals")){se(Z),Te(le||ve),ge(""),oe(!0);return}else ne&&ne.trim()!==""?he[Z]={value:ne,operator:le||ve}:delete he[Z];je(he);let xe=[...Ke];Object.entries(he).forEach(([Re,De])=>{const{value:Ee,operator:be}=De;xe=xe.filter(Fe=>{const $e=String(getColumnValue(Fe[Re])||"").toLowerCase(),Xe=Ee.toLowerCase();switch(be){case"contains":return $e.includes(Xe);case"equals":return $e===Xe;case"startsWith":return $e.startsWith(Xe);case"endsWith":return $e.endsWith(Xe);case"does not contain":return!$e.includes(Xe);case"does not equal":return $e!==Xe;case"is any of":return Ee.split(",").map(st=>st.trim().toLowerCase()).includes($e);default:return!0}})}),yt(xe),Ne(0),oe(!1)}},In=Z=>{Z.key==="Enter"&&nr()};useEscapeKey(()=>{Ot(null),oe(!1)});const Tr=(Z,ne="")=>{const le=he=>{const xe=new Set(er);xe.has(he)?xe.delete(he):xe.add(he),fn(xe)};if(Array.isArray(Z)){const he=Array.from(new Set(Z.reduce((xe,Re)=>typeof Re=="object"&&Re!==null?[...xe,...Object.keys(Re)]:xe,[])));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:he.map(xe=>jsxRuntimeExports.jsx("th",{children:xe.charAt(0).toUpperCase()+xe.slice(1)},xe))})}),jsxRuntimeExports.jsx("tbody",{children:Z.map((xe,Re)=>jsxRuntimeExports.jsx("tr",{children:he.map(De=>jsxRuntimeExports.jsx("td",{children:typeof xe[De]=="object"&&xe[De]!==null?jsxRuntimeExports.jsxs("div",{className:"flex-row-center",children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>le(`${ne}-${Re}-${De}`),children:er.has(`${ne}-${Re}-${De}`)?"▼":"▶"}),er.has(`${ne}-${Re}-${De}`)&&Tr(xe[De],`${ne}-${Re}-${De}`)]}):String(xe[De]||"")},`${ne}-${Re}-${De}`))},`${ne}-${Re}`))})]})})})}else if(typeof Z=="object"&&Z!==null)return jsxRuntimeExports.jsx("div",{className:"nested-object",children:jsxRuntimeExports.jsxs("table",{className:"custom-table nested",children:[jsxRuntimeExports.jsx("thead",{style:{zIndex:20001,position:"sticky",top:0,background:"#f5f5f5"},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(Z).map(([he,xe])=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:"table-cell",children:jsxRuntimeExports.jsx("strong",{children:he})}),jsxRuntimeExports.jsx("td",{className:"table-cell",children:typeof xe=="object"&&xe!==null?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>le(`${ne}-${he}`),children:er.has(`${ne}-${he}`)?"▼":"▶"}),er.has(`${ne}-${he}`)&&Tr(xe,`${ne}-${he}`)]}):String(xe)})]},`${ne}-${he}`))})]})});return jsxRuntimeExports.jsx("span",{children:String(Z)})},sn=Z=>{var ne;if(Z){const le=(ne=Z.parentElement)==null?void 0:ne.querySelector(".dropdown-trigger");if(!le)return;const he=le.getBoundingClientRect(),xe=window.innerHeight,Re=window.innerWidth,De=Z.offsetHeight,Ee=Z.offsetWidth,be=he.bottom+De>xe,Fe=he.left+Ee>Re,$e=he.left-Ee<0;let Xe,st;be?(Xe=he.top-De,Z.classList.add("adjust-top")):(Xe=he.bottom,Z.classList.remove("adjust-top")),Fe?(st=he.right-Ee,Z.classList.add("adjust-left"),Z.classList.remove("adjust-right")):$e?(st=he.left,Z.classList.add("adjust-right"),Z.classList.remove("adjust-left")):(st=he.left,Z.classList.remove("adjust-left"),Z.classList.remove("adjust-right")),Z.style.top=`${Xe}px`,Z.style.left=`${st}px`,Z.classList.add("dropdown-fixed-position")}};React.useEffect(()=>{const Z=ne=>{J&&Er.current&&!Er.current.contains(ne.target)&&oe(!1)};return document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[J]),React.useEffect(()=>()=>{},[$t]),React.useEffect(()=>{if(!(typeof document>"u"))return Ft?document.body.classList.add("ce-column-modal-open"):document.body.classList.remove("ce-column-modal-open"),()=>{document.body.classList.remove("ce-column-modal-open")}},[Ft]);const Dn=(Z,ne)=>{Z.preventDefault();const le=Z.pageX,he=St[ne]||150,xe=De=>{const Ee=Math.max(100,he+(De.pageX-le));Gt(be=>({...be,[ne]:Ee}))},Re=()=>{document.removeEventListener("mousemove",xe),document.removeEventListener("mouseup",Re)};document.addEventListener("mousemove",xe),document.addEventListener("mouseup",Re)},Cr=(Z,ne,le)=>{var xe;const he=String(ne??"");if(typeof V=="function")try{if(V(le??{},Z))return!0}catch{}return W!=null&&W.includes(Z)?Y!=null&&Y[Z]?Y[Z].includes(he):!0:!!((xe=Y==null?void 0:Y._global_)!=null&&xe.includes(he))},Nn=(Z,ne,le)=>{Cr(ne,Z[ne],Z)&&M&&M(Z,ne,le)},Mn=Z=>{if(Z==null||Z==="")return"";const ne=String(Z).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(ne))return ne;const le=new Date(ne);if(isNaN(le.getTime()))return"";const he=le.getFullYear().toString().padStart(4,"0"),xe=(le.getMonth()+1).toString().padStart(2,"0"),Re=le.getDate().toString().padStart(2,"0");return`${he}-${xe}-${Re}`},$n=(Z,ne)=>{const le=ne==null?void 0:ne[Z.id];if(typeof z=="function")try{if(!z(ne,Z.id))return!1}catch{return!1}else if(Array.isArray(te)&&te.length>0&&!te.includes(Z.id))return!1;return!(Z.elementType==="label-text"||React.isValidElement(le)||Array.isArray(le)||typeof le=="object"&&le!==null||(Array.isArray(d)?d.includes(Z.id):d===Z.id)||(Array.isArray(l)?l.includes(Z.id):l===Z.id))},Fn=(Z,ne)=>{const he=(Ke&&Ke.length>0?Ke:at).indexOf(Z),xe=gt(Z,he>=0?he:ke*Pe+ne);xe!==void 0&&($r(xe),Sr({...Z}))},Pr=(Z,ne)=>{Sr(le=>({...le||{},[Z]:ne}))},Rr=()=>{$r(null),Sr(null)},Ln=()=>{if(Ut===null||!jt)return;const Z=Ke,ne=at,le=(Ke||[]).map((Re,De)=>{const Ee=gt(Re,De);return Ee===Ut||String(Ee)===String(Ut)?{...Re,...jt}:Re}),he=An(le),xe=Lt(he,me,Ge);if(Pt(he),yt(xe),typeof ie=="function")try{const Re=ie({fullData:he,updatedRow:{...jt}});if(Re&&typeof Re.then=="function"){Promise.resolve(Re).then(()=>{Rr()}).catch(()=>{Pt(Z),yt(ne)});return}}catch{Pt(Z),yt(ne);return}Rr()},vr=Nt.some(Z=>Array.from(et).some(ne=>Array.isArray(Z[ne])&&Z[ne].length>0&&Z[ne].some(le=>typeof le=="object"&&le!==null))),Bn=Z=>{const ne=/[\\/:*?"<>|]/g;return Z.replace(ne,"").trim()},Vn=Z=>{try{const ne=window.prompt("Enter file name",Z);if(!ne)return Z;const le=Bn(ne);return le.length===0?Z:le.endsWith(".xlsx")?le:`${le}.xlsx`}catch{return Z}},gr=(Z=!1)=>{const ne=pt.filter(be=>et.has(be.id));let le;if(Z||!(at&&at.length>0))le=Ke;else{const be=Array.from(At);if(be.length>0){let Fe;if(typeof Je=="function")Fe=Je;else{const $e=Je??"id";Fe=Xe=>Xe[$e]}le=at.filter($e=>be.includes(Fe($e)))}else le=at}const he=le.map(be=>ne.reduce((Fe,$e)=>(Fe[$e.label||$e.id]=getColumnValue(be[$e.id]),Fe),{})),xe=utils.json_to_sheet(he),Re=utils.book_new();utils.book_append_sheet(Re,xe,"Data");let De;Z||le===Ke?De="all-data-export.xlsx":Array.from(At).length>0?De="selected-rows-export.xlsx":De="filtered-search-export.xlsx";const Ee=Vn(De);writeFileSync(Re,Ee)},Wn=()=>jsxRuntimeExports.jsxs("div",{className:Ie?"esign-table-container":"table-container",children:[jsxRuntimeExports.jsx("div",{className:"table-scroll-container",children:et.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:[vr&&jsxRuntimeExports.jsx("th",{className:"expand-column"}),i&&et.size>0&&jsxRuntimeExports.jsx("th",{className:"checkbox-column",children:o?jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:At.size>0,onChange:()=>{Vt(new Set)}}):jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:Nt.length>0&&(()=>{const Z=Ke&&Ke.length>0?Ke:at||[],ne=Nt.filter(le=>!(typeof tt=="function"?tt(le):!1));return ne.length>0&&ne.every(le=>{let he=gt(le);if(he===void 0){const xe=Z.indexOf(le);xe>=0&&(he=`__row_${xe}`)}return he!==void 0&&At.has(he)})})(),onChange:Z=>{const ne=new Set(At),le=Ke&&Ke.length>0?Ke:at||[],he=Nt.filter(Re=>!(typeof tt=="function"?tt(Re):!1)).map(Re=>{const De=gt(Re);if(De!==void 0)return De;const Ee=le.indexOf(Re);return Ee>=0?`__row_${Ee}`:void 0}).filter(Re=>Re!==void 0),xe=new Set(he);if(Z){if(Vt(new Set(xe)),typeof Ce=="function"){const Re=Array.from(xe),De=Re.map(Ee=>le.find(be=>{const Fe=gt(be);return Fe!==void 0&&(Fe===Ee||String(Fe)===String(Ee))})).filter(Boolean);try{Ce.length===1?Ce({ids:Re,rows:De,toggledId:void 0,toggledRow:void 0,toggledChecked:!0}):Ce(De)}catch{try{Ce(De)}catch{}}}}else{const Re=new Set(ne);if(he.forEach(De=>Re.delete(De)),Vt(Re),typeof Ce=="function"){const De=he,Ee=De.map(be=>le.find(Fe=>{const $e=gt(Fe);return $e!==void 0&&($e===be||String($e)===String(be))})).filter(Boolean);try{Ce.length===1?Ce({ids:Array.from(Re),rows:Array.from(Re).map(be=>le.find(Fe=>{const $e=gt(Fe);return $e!==void 0&&($e===be||String($e)===String(be))})).filter(Boolean),unselectedIds:De,unselectedRows:Ee,toggledId:void 0,toggledRow:void 0,toggledChecked:!1}):Ce(Array.from(Re).map(be=>le.find(Fe=>{const $e=gt(Fe);return $e!==void 0&&($e===be||String($e)===String(be))})).filter(Boolean))}catch{try{Ce([])}catch{}}}}}})}),bt.filter(Z=>pt.find(le=>le.id===Z)&&et.has(Z)).map(Z=>{const ne=pt.find(le=>le.id===Z);return ne?jsxRuntimeExports.jsx("th",{className:Ir(ne.id,"table-header-cell"),style:{width:St[ne.id]?`${St[ne.id]}px`:ne.width||"150px",minWidth:"80px",maxWidth:"600px",...jr(ne.id,"header")},children:jsxRuntimeExports.jsxs("div",{className:"column-header",children:[jsxRuntimeExports.jsxs("span",{className:"column-label-with-info",children:[ne.label,ne.tooltip&&jsxRuntimeExports.jsx("img",{src:InfoIcon,alt:"info",title:ne.tooltip,width:14,height:14,className:"info-icon"})]}),jsxRuntimeExports.jsxs("div",{className:"column-actions",children:[pe&&jsxRuntimeExports.jsx("img",{src:SortIcon,alt:"Sort",title:"Sort",width:14,height:14,onClick:()=>jn(ne.id),style:{cursor:"pointer",transition:"transform 0.2s ease-in-out",transform:(nt==null?void 0:nt.column)===ne.id?nt.direction==="asc"?"rotate(0deg)":"rotate(180deg)":"none",filter:(nt==null?void 0:nt.column)===ne.id?"brightness(0.6)":"none"}}),ye&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:ne.id===$t?Nr:null,children:[jsxRuntimeExports.jsx("span",{className:`dropdown-trigger ${me[ne.id]?"filter-active":""}`,onClick:le=>{le.stopPropagation(),nn(ne.id)},title:me[ne.id]?`Filter: ${me[ne.id].operator} "${me[ne.id].value}"`:"Filter options",children:"⋮"}),$t===ne.id&&jsxRuntimeExports.jsxs("div",{className:"dropdown-menu",ref:le=>{le&&setTimeout(()=>sn(le),0)},children:[jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{se(ne.id),oe(!0),Ot(null)},children:"Filter"}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{nr(ne.id,"","contains"),Ot(null)},children:"Contains..."}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{nr(ne.id,"","equals"),Ot(null)},children:"Equals..."}),me[ne.id]&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{const le={...me};delete le[ne.id],je(le),ge(""),se("");const he=Lt(Ke,le,Ge);yt(he),Ne(0),Ot(null)},children:"Clear Filter"}),Object.keys(me).length>0&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{je({}),ge(""),se(""),fe(null),ht(""),yt(Ke),Ne(0),Ot(null)},children:"Clear All Filters"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"column-resizer",onMouseDown:le=>Dn(le,ne.id)})]})},ne.id):null}),mr&&jsxRuntimeExports.jsx("th",{className:"table-header-cell action-column",style:{width:`${Xr}px`,minWidth:`${Xr}px`,textAlign:"center"},children:"Action"})]}),qt&&jsxRuntimeExports.jsxs("tr",{className:"filter-row",children:[vr&&jsxRuntimeExports.jsx("td",{className:"expand-column"}),i&&et.size>0&&jsxRuntimeExports.jsx("td",{className:"checkbox-column"}),bt.filter(Z=>pt.find(le=>le.id===Z)&&et.has(Z)).map(Z=>{var le;const ne=pt.find(he=>he.id===Z);return ne?jsxRuntimeExports.jsxs("td",{className:Ir(ne.id,"filter-cell"),style:{position:"relative",width:St[ne.id]?`${St[ne.id]}px`:ne.width||"150px",minWidth:"80px",maxWidth:"600px",...jr(ne.id,"body")},children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:`Search ${ne.label}`,value:((le=me[ne.id])==null?void 0:le.value)||"",onChange:he=>{const xe=he.target.value;ge(xe),se(ne.id);const Re={...me};xe===""?delete Re[ne.id]:Re[ne.id]={value:xe,operator:"contains"},je(Re);const De=Lt(Ke,Re,Ge);yt(De),Ne(0)},className:"filter-input-with-clear filter-input-padding"}),me[ne.id]&&jsxRuntimeExports.jsx("span",{className:"filter-clear-icon-inside",onClick:()=>{const he={...me};delete he[ne.id],je(he),ge(""),se("");const xe=Lt(Ke,he,Ge);yt(xe),Ne(0)},title:"Clear",children:"×"})]},`filter-${ne.id}`):null}),mr&&jsxRuntimeExports.jsx("td",{className:"action-column"})]})]}),jsxRuntimeExports.jsx("tbody",{children:Nt.length===0?jsxRuntimeExports.jsx("tr",{className:"no-records-row",children:jsxRuntimeExports.jsx("td",{colSpan:(vr?1:0)+(i?1:0)+Array.from(et).length+(mr?1:0),className:"no-records-cell",children:Ge.trim()||Object.keys(me).length>0?jsxRuntimeExports.jsxs("div",{style:{minHeight:"200px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"40px 20px",color:"#666",fontSize:"1em",background:"#fafafa",border:"1px solid #eee",borderRadius:"8px",gap:"20px"},children:[(Ge.trim()||Object.keys(me).length>0)&&jsxRuntimeExports.jsxs("div",{style:{backgroundColor:"#e8f5e9",border:"1px solid #4caf50",borderRadius:"6px",padding:"12px 16px",width:"100%",maxWidth:"400px",textAlign:"left"},children:[jsxRuntimeExports.jsx("p",{style:{margin:"0 0 8px 0",fontSize:"0.875em",fontWeight:"600",color:"#333"},children:"Applied Search Criteria:"}),Ge.trim()&&jsxRuntimeExports.jsxs("p",{style:{margin:"4px 0",fontSize:"0.85em",color:"#555"},children:[jsxRuntimeExports.jsx("strong",{children:"Search Query:"})," ",jsxRuntimeExports.jsxs("span",{style:{backgroundColor:"#fff",padding:"2px 6px",borderRadius:"3px",border:"1px solid #ccc"},children:['"',Ge.trim(),'"']})]}),Object.keys(me).length>0&&jsxRuntimeExports.jsxs("div",{style:{marginTop:"6px"},children:[jsxRuntimeExports.jsx("p",{style:{margin:"0 0 4px 0",fontSize:"0.85em",color:"#555"},children:jsxRuntimeExports.jsx("strong",{children:"Filters:"})}),Object.entries(me).map(([Z,ne])=>{const le=pt.find(he=>he.id===Z);return jsxRuntimeExports.jsxs("p",{style:{margin:"3px 0",fontSize:"0.8em",color:"#666",paddingLeft:"12px"},children:["• ",(le==null?void 0:le.label)||Z,":"," ",jsxRuntimeExports.jsxs("span",{style:{backgroundColor:"#fff",padding:"2px 6px",borderRadius:"3px",border:"1px solid #ccc"},children:['"',ne.value,'"']})]},Z)})]})]}),jsxRuntimeExports.jsx("div",{style:{textAlign:"center"},children:jsxRuntimeExports.jsx("p",{style:{margin:"0",fontSize:"1.1em",fontWeight:"500"},children:Ge.trim()&&Object.keys(me).length>0?"No data matches both the search query and filters":Ge.trim()?"No data matches the search query":"No data matches the applied filters"})}),(Ge.trim()||Object.keys(me).length>0)&&jsxRuntimeExports.jsx(CEButton,{variant:"primary",size:"small",onClick:()=>{ht(""),je({}),ge(""),se(""),fe(null),yt(Ke),Ne(0)},children:"Clear All Filters"})]}):"No Data found"})}):Nt.map((Z,ne)=>{const le=typeof tt=="function"?tt(Z):!1,xe=(Ke&&Ke.length>0?Ke:at).indexOf(Z),Re=gt(Z,xe>=0?xe:ke*Pe+ne),De=G&&Ut!==null&&Re!==void 0&&(Re===Ut||String(Re)===String(Ut));return jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsxs("tr",{onMouseEnter:()=>Ye(ke*Pe+ne),onMouseLeave:()=>Ye(null),className:(Z.isNewRow?`table-new-row ${Z.hasError?"row-error":""}`:ne%2===0?`table-row-even ${Z.hasError?"row-error":Z.isModified?"row-invalid":""}`:`table-row-odd ${Z.hasError?"row-error":Z.isModified?"row-invalid":""}`)+(Yt===ke*Pe+ne?" row-hovered":"")+(le?" row-disabled":""),title:Z.rowMessage||"",style:{...typeof Ve=="function"?Ve(Z):{}},children:[vr&&jsxRuntimeExports.jsx("td",{className:"expand-column",children:Array.from(et).some(Ee=>Array.isArray(Z[Ee])&&Z[Ee].length>0&&Z[Ee].some(be=>typeof be=="object"&&be!==null))&&jsxRuntimeExports.jsx("button",{className:"expand-button",onClick:()=>rn(ne),children:Array.from(Ze).some(Ee=>Ee.startsWith(`${ne}`))?"▼":"▶"})}),i&&et.size>0&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:(()=>{const Ee=gt(Z,ke*Pe+ne);return Ee!==void 0&&At.has(Ee)})(),onChange:Ee=>{if(le)return;const be=gt(Z,ke*Pe+ne);if(be===void 0)return;let Fe;o?(Fe=Ee?new Set([be]):new Set,Vt(Fe)):(Fe=new Set(At),Ee?Fe.add(be):Fe.delete(be),Vt(Fe));const $e=Ke&&Ke.length>0?Ke:at||[],Xe=Array.from(Fe),st=Xe.map(vt=>{if(typeof vt=="string"&&vt.startsWith("__row_")){const Tt=parseInt(vt.slice(6),10);return!isNaN(Tt)&&Tt>=0&&Tt<$e.length?$e[Tt]:void 0}return $e.find(Tt=>{const _t=gt(Tt);return _t!==void 0&&(_t===vt||String(_t)===String(vt))})}).filter(Boolean),xt={ids:Xe,rows:st,toggledId:be,toggledRow:Z,toggledChecked:!!Ee};if(typeof Ce=="function")try{Ce.length===1?Ce(xt):Ce(st)}catch{try{Ce(st)}catch{}}},disabled:le})}),f&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:"selected",checked:(m==null?void 0:m(ne))==="selected",onChange:()=>p==null?void 0:p({rowIndex:ne,columnId:"selected",rowData:Z})})})}),bt.filter(Ee=>pt.find(Fe=>Fe.id===Ee)&&et.has(Ee)).map(Ee=>{const be=pt.find($e=>$e.id===Ee);if(!be)return null;const Fe=De?$n(be,Z):!1;return jsxRuntimeExports.jsx("td",{style:{width:St[be.id]?`${St[be.id]}px`:"150px",minWidth:"80px",maxWidth:"600px",...jr(be.id,"body")},className:Ir(be.id,`table-cell ${Cr(be.id,Z[be.id],Z)?"ce-clickable-cell":""} ${De?Fe?"ce-editable-cell":"ce-readonly-cell":""}`),onClick:$e=>{Cr(be.id,Z[be.id],Z)?Nn(Z,be.id,$e):Array.isArray(Z[be.id])&&Z[be.id].length>0&&rn(ne,be.id)},children:Z.isNewRow?jsxRuntimeExports.jsx(AddNewRowCell,{row:Z,column:be,colId:Ee}):De&&Fe?be.elementType==="number-input"?jsxRuntimeExports.jsx("input",{type:"number",title:`Edit ${be.label||be.id}`,"aria-label":`Edit ${be.label||be.id}`,value:(jt==null?void 0:jt[be.id])??"",onChange:$e=>Pr(be.id,$e.target.value),style:{width:"100%"}}):be.elementType==="date-picker"?jsxRuntimeExports.jsx("input",{type:"date",title:`Edit ${be.label||be.id}`,"aria-label":`Edit ${be.label||be.id}`,value:Mn(jt==null?void 0:jt[be.id]),onChange:$e=>Pr(be.id,$e.target.value),style:{width:"100%"}}):jsxRuntimeExports.jsx("input",{type:"text",title:`Edit ${be.label||be.id}`,"aria-label":`Edit ${be.label||be.id}`,value:(jt==null?void 0:jt[be.id])??"",onChange:$e=>Pr(be.id,$e.target.value),style:{width:"100%"}}):React.isValidElement(Z[be.id])?Z[be.id]:(Array.isArray(l)?l.includes(be.id):l===be.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:(()=>{const $e=gt(Z,ke*Pe+ne);return($e!==void 0?Zt[String($e)]||[]:[]).includes(be.id)||Zr(Z[be.id])})(),onChange:$e=>Sn({row:Z,rowIndex:ne,columnId:be.id,checked:$e}),disabled:le})}):(Array.isArray(d)?d.includes(be.id):d===be.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:be.id,checked:Tn(Z)===be.id,onChange:()=>wn({rowIndex:ne,columnId:be.id,rowData:Z})})}):Array.isArray(Z[be.id])?`${Z[be.id].length}`:typeof Z[be.id]=="object"&&Z[be.id]!==null?Object.entries(Z[be.id]).map(([$e,Xe])=>`${$e}: ${Xe}`).join(", "):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(Z[be.id]??"")})},be.id)}),mr&&jsxRuntimeExports.jsx("td",{className:"center-text action-column",children:jsxRuntimeExports.jsxs("div",{className:"action-flex",children:[hr&&!G&&jsxRuntimeExports.jsx("img",{src:Edit,alt:"Edit",title:"Edit",width:20,height:20,style:{cursor:"pointer"},onClick:()=>j==null?void 0:j(Z,ne)}),hr&&G&&(De?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:SaveIcon,alt:"Save",title:"Save",width:20,height:20,style:{cursor:"pointer"},onClick:Ln}),jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",title:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:Rr})]}):jsxRuntimeExports.jsx("img",{src:ee||Edit,alt:"Inline Edit",title:"Inline Edit",width:20,height:20,style:{cursor:"pointer"},onClick:()=>{Ut===null&&(Fn(Z,ne),j==null||j(Z,ne))}})),T&&jsxRuntimeExports.jsx("img",{src:Reassign,alt:"Reassign",width:20,height:20,style:{cursor:"pointer"},onClick:B}),C&&jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:()=>X==null?void 0:X(Z,ne)}),b&&jsxRuntimeExports.jsx("img",{src:Approve,alt:"Approve",width:20,height:20,style:{cursor:"pointer"},onClick:()=>F==null?void 0:F(Z,ne)}),S&&jsxRuntimeExports.jsx("img",{src:Delete,alt:"Delete",width:20,height:20,style:{cursor:"pointer"},onClick:()=>D==null?void 0:D(Z,ne)}),A&&jsxRuntimeExports.jsx("img",{src:CopyIcon,alt:"Copy",title:"Copy",width:20,height:20,style:{cursor:"pointer"},onClick:()=>U==null?void 0:U(Z,ne)}),R&&jsxRuntimeExports.jsx("img",{src:ViewIcon,alt:"View",title:"View",width:20,height:20,style:{cursor:"pointer"},onClick:()=>N==null?void 0:N(Z,ne)}),_&&jsxRuntimeExports.jsx("img",{src:Add,alt:"Add",width:20,height:20,style:{cursor:"pointer"},onClick:I}),mt.map(Ee=>Ee.condition&&!Ee.condition(Z)?null:jsxRuntimeExports.jsx("img",{src:Ee.icon,alt:Ee.title,title:Ee.title,width:20,height:20,style:{cursor:"pointer"},onClick:()=>Ee.onClick(Z,ne)},Ee.id))]})})]}),Array.from(Ze).map(Ee=>{const[be,Fe]=Ee.split("-");if(Number(be)===ne){const $e=Fe?{[Fe]:Z[Fe]}:Object.keys(Z).filter(Xe=>Array.isArray(Z[Xe])||typeof Z[Xe]=="object").reduce((Xe,st)=>({...Xe,[st]:Z[st]}),{});return jsxRuntimeExports.jsx("tr",{className:"expanded-row",children:jsxRuntimeExports.jsx("td",{colSpan:et.size+2,className:"expanded-cell",children:Object.entries($e).map(([Xe,st],xt)=>jsxRuntimeExports.jsxs("div",{className:`expanded-section ${xt%2===0?"expanded-section-even":"expanded-section-odd"}`,style:{backgroundColor:xt%2===0?"#e8f5e9":"#e3f2fd",padding:"10px",marginBottom:"10px",borderRadius:"5px"},children:[jsxRuntimeExports.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:Xe.charAt(0).toUpperCase()+Xe.slice(1)}),Tr(st)]},Xe))})},`expanded-${Ee}`)}return null})]},ne)})})]},`table-${Array.from(et).join("|")}__${bt.join("|")}`)}),we&&jsxRuntimeExports.jsxs("div",{className:"pagination-container",children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"40px"},children:[jsxRuntimeExports.jsx(EntriesInfo,{dataLength:at.length,currentPage:ke,rowsPerPage:Pe,totalRecords:Kr}),jsxRuntimeExports.jsx(RowsPerPageSelector,{rowsPerPage:Pe,setRowsPerPage:_n,setCurrentPage:tr,pageSizeOptions:We})]}),jsxRuntimeExports.jsx(PaginationControls,{currentPage:ke,totalPages:dr,setCurrentPage:tr})]}),J&&jsxRuntimeExports.jsx("div",{className:"filter-modal",children:jsxRuntimeExports.jsxs("div",{className:"filter-modal-content",ref:Er,onKeyDown:In,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:()=>oe(!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:ae,onChange:Z=>se(Z.target.value),className:"filter-select","aria-label":"Filter column",title:"Select column to filter",children:pt.map(Z=>jsxRuntimeExports.jsx("option",{value:Z.id,children:Z.label},Z.id))})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Operator:"}),jsxRuntimeExports.jsxs("select",{value:ve,onChange:Z=>Te(Z.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:"Date Range",children:"Date Range"}),jsxRuntimeExports.jsx("option",{value:"is any of",children:"Is any of"})]}),ve==="Date Range"&&jsxRuntimeExports.jsx("div",{style:{marginTop:"10px"},children:jsxRuntimeExports.jsx(CEDateRangePicker,{mode:"range",onChange:Z=>{fe({startDate:Z.startDate,endDate:Z.endDate})}})})]}),ve!=="Date Range"&&jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Value:"}),jsxRuntimeExports.jsx("input",{type:"text",value:_e,onChange:Z=>ge(Z.target.value),placeholder:"Enter filter value",title:"Filter value",className:"filter-input",autoFocus:!0,onKeyDown:Z=>{Z.key==="Enter"&&an(),Z.key==="Escape"&&oe(!1)}})]}),Object.keys(me).length>0&&jsxRuntimeExports.jsxs("div",{className:"active-filters-summary",children:[jsxRuntimeExports.jsx("div",{className:"active-filters-header",children:"Active Filters:"}),Object.entries(me).map(([Z,ne])=>{const le=pt.find(he=>he.id===Z);return jsxRuntimeExports.jsxs("div",{className:"active-filter-item",children:[jsxRuntimeExports.jsxs("span",{children:[(le==null?void 0:le.label)||Z,": "]}),jsxRuntimeExports.jsx("span",{className:"filter-operator",children:ne.operator}),jsxRuntimeExports.jsxs("span",{className:"filter-value",children:['"',ne.value,'"']})]},Z)})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-footer",children:[jsxRuntimeExports.jsx(CEButton,{onClick:()=>{je({}),yt(Ke),Ne(0),oe(!1)},className:"clear-filters-button",variant:"outlined",children:"Clear All"}),jsxRuntimeExports.jsx(CEButton,{onClick:an,className:"apply-filter-button",variant:"primary",children:"Apply Filter"})]})]})})]}),zn=()=>{if(q)It(!0),Promise.resolve(q()).catch(()=>{}).finally(()=>{It(!1)});else if(Oe&&rt)It(!0),Promise.resolve(rt(ke,Pe)).catch(()=>{}).finally(()=>{It(!1)});else{It(!0);const Z=Array.isArray(t)?[...t]:[],ne=nt??Ae??null,le=ne!=null&&ne.column?[...Z].sort((De,Ee)=>{const be=Ht(De,Ee,ne.column);return ne.direction==="asc"?be:-be}):Z,he=Lt(le,me,Ge);Pt(le),yt(he);const xe=Oe?Kt??he.length:he.length,Re=Math.max(0,Math.ceil(Math.max(xe,1)/Pe)-1);ke>Re&&Ne(Re),It(!1)}},Ar=pt.filter(Z=>Z.shouldVisible!==!1),bt=React.useMemo(()=>{const Z=Ar.map(he=>he.id),ne=ft.filter(he=>Z.includes(he)),le=Z.filter(he=>!ne.includes(he));return[...ne,...le]},[ft,Ar]),on=React.useMemo(()=>bt.filter(Z=>et.has(Z)),[bt,et]),Un=40,ir=React.useMemo(()=>lt.filter(Z=>et.has(Z)),[lt,et]),Or=React.useMemo(()=>{const Z={};let ne=i||f?Un:0;return ir.forEach(le=>{Z[le]=ne;const he=pt.find(De=>De.id===le),xe=St[le],Re=typeof xe=="number"&&xe>0?xe:typeof(he==null?void 0:he.width)=="string"&&parseFloat(he.width)||150;ne+=Re}),Z},[ir,pt,St,i,f]),Hn=ir.length>0?ir[ir.length-1]:null,jr=(Z,ne)=>Z in Or?{position:"sticky",left:Or[Z],zIndex:ne==="header"?12:6,backgroundColor:ne==="header"?"#e0e0e0":void 0,boxShadow:"none"}:{},Ir=(Z,ne="")=>{const le=[ne];return Z in Or&&(le.push("ce-frozen-column"),Z===Hn&&le.push("ce-frozen-column-boundary")),le.filter(Boolean).join(" ")},Gn=JSON.stringify(Be??null);React.useEffect(()=>{if(Be==null)return;let Z=[];if(typeof Be=="number"){const ne=Math.max(0,Math.floor(Be));Z=on.slice(0,ne)}else{const ne=new Set(Be.filter(le=>typeof le=="string").map(le=>le.trim()).filter(Boolean));Z=bt.filter(le=>ne.has(le))}Dt(ne=>yr(ne,Z)?ne:Z)},[Gn,bt,on]);const qn=Z=>{Dt(ne=>{const le=ne.includes(Z)?ne.filter(he=>he!==Z):[...ne,Z].sort((he,xe)=>{const Re=bt.indexOf(he),De=bt.indexOf(xe);return Re-De});if(typeof Qe=="function")try{Qe(le)}catch{}return le})},Kn=Ar.every(Z=>et.has(Z.id));return React.useEffect(()=>{if(bt.length!==0){if(bt.length!==ft.length){wt(bt);return}for(let Z=0;Z<bt.length;Z++)if(bt[Z]!==ft[Z]){wt(bt);return}}},[bt,ft]),jsxRuntimeExports.jsxs("div",{className:`datatable-wrapper${ur?" 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:[g&&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 Z=!qt;Xt(Z),Z||(je({}),yt(Ke),Ne(0),ht(""))}}),Ge&&jsxRuntimeExports.jsx("button",{className:"search-cancel-button",onClick:()=>{ht(""),Cn()},children:"×"})]}),Se&&jsxRuntimeExports.jsx("img",{src:ShowOrHideColumn,alt:"Columns",title:Nt.length>0?"Show/Hide Columns":"No data available",width:20,height:20,style:{cursor:Nt.length>0?"pointer":"not-allowed",fill:"#808080",opacity:Nt.length>0?1:.4,filter:Nt.length===0?"grayscale(100%)":"none"},onClick:()=>{Nt.length>0&&Wt(!0)}}),Object.keys(me).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:()=>{je({}),yt(Ke),Ne(0)}}),O&&jsxRuntimeExports.jsx("img",{src:FileOpenRounded,alt:"Export",title:"Export All to Excel",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",fill:"#808080"},onClick:()=>gr(!0)}),ue&&jsxRuntimeExports.jsx("img",{src:ReloadIcon,alt:"Reload",title:"Reload Data",width:20,height:20,className:"ce-reload-icon",style:{cursor:"pointer",fill:"#808080"},onClick:zn}),H&&jsxRuntimeExports.jsxs("div",{ref:Mr,children:[jsxRuntimeExports.jsx("img",{src:ExportIcon,alt:"Download",title:"Download",width:20,height:20,className:"ce-export-icon icon-button dropdown-trigger",style:{cursor:"pointer"},onClick:Z=>{Z.stopPropagation(),Q&&Q.length>0?nn("download"):gr()}}),(()=>{const Z=Q??[],ne=Z.find(xe=>xe.usedefault===!0),le=Z.filter(xe=>!xe.usedefault);let he=[];return Z.length>0?ne?he=[{label:ne.label,onClick:()=>{ne.forceAll?gr(!0):gr()}},...le]:he=[...le]:he=[],$t==="download"&&he.length>0&&jsxRuntimeExports.jsx("div",{className:"dropdown-menu",ref:xe=>{xe&&setTimeout(()=>sn(xe),0)},children:he.map((xe,Re)=>jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:De=>{De.stopPropagation();try{xe.onClick()}finally{Ot(null)}},children:xe.label},Re))})})()]}),de&&jsxRuntimeExports.jsx("button",{className:"fullscreen-button",onClick:ur?gn:vn,title:ur?"Exit Full Screen":"Full Screen",children:ur?"⤫":"⤢"})]})]}),Ft&&jsxRuntimeExports.jsx("div",{className:"cecol-modal-overlay",onMouseDown:()=>tn(),children:jsxRuntimeExports.jsxs("div",{className:"cecol-modal-content",ref:un,onMouseDown:Z=>Z.stopPropagation(),children:[jsxRuntimeExports.jsx("div",{className:"cecol-modal-header",children:jsxRuntimeExports.jsx("button",{className:"cecol-modal-close-button",onClick:()=>tn(),children:"×"})}),jsxRuntimeExports.jsx("h3",{className:"cecol-modal-title",children:"Column Visibility and Order"}),jsxRuntimeExports.jsx("p",{className:"cecol-modal-description",children:"Use the checkboxes to show or hide columns."}),jsxRuntimeExports.jsx("div",{className:"cecol-modal-actions",children:jsxRuntimeExports.jsx("div",{className:"cecol-select-all-action",children:jsxRuntimeExports.jsxs("label",{className:"cecol-native-checkbox",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:Kn,onChange:Z=>{const ne=Z.target.checked;Rt(ne?new Set(pt.filter(le=>le.shouldVisible!==!1).map(le=>le.id)):new Set)}}),jsxRuntimeExports.jsx("span",{children:"Select All"})]})})}),jsxRuntimeExports.jsx("div",{className:"cecol-list-container",children:bt.filter(Z=>pt.find(ne=>ne.id===Z&&ne.shouldVisible!==!1)).map(Z=>{const ne=pt.find(le=>le.id===Z);return ne?jsxRuntimeExports.jsxs("div",{className:`cecol-item${Qt===ne.id?" cecol-item-dragging":""}${Dr===ne.id&&Qt!==ne.id?" cecol-item-drag-over":""}`,onDragOver:le=>{le.preventDefault(),!(!Qt||Qt===ne.id)&&(le.dataTransfer.dropEffect="move",or(ne.id))},onDrop:le=>{le.preventDefault();const he=Qt||le.dataTransfer.getData("text/plain");he&&Pn(he,ne.id),br(null),or(null)},onDragLeave:()=>{Dr===ne.id&&or(null)},onClick:le=>{const he=!et.has(ne.id);en(ne.id,he)},children:[jsxRuntimeExports.jsx("span",{className:"cecol-drag-handle",title:"Drag to reorder",draggable:!0,onMouseDown:le=>le.stopPropagation(),onClick:le=>le.stopPropagation(),onDragStart:le=>{le.stopPropagation(),br(ne.id),le.dataTransfer.effectAllowed="move",le.dataTransfer.setData("text/plain",ne.id)},onDragEnd:()=>{br(null),or(null)},children:"⋮⋮"}),jsxRuntimeExports.jsx("div",{className:"cecol-checkbox-wrapper",children:jsxRuntimeExports.jsxs("label",{className:"cecol-native-checkbox",onClick:le=>le.stopPropagation(),children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:et.has(ne.id),onClick:le=>le.stopPropagation(),onChange:le=>{le.stopPropagation(),en(ne.id,le.target.checked)}}),jsxRuntimeExports.jsx("span",{className:"cecol-label-text",children:ne.label??ne.id??"-"})]})}),Me&&jsxRuntimeExports.jsx("button",{className:`column-freeze-toggle${lt.includes(ne.id)?" active":""}`,title:lt.includes(ne.id)?"Unpin column":"Pin column (freeze left)",onClick:le=>{le.stopPropagation(),qn(ne.id)},children:lt.includes(ne.id)?"📌 Unpin":"📌 Pin"})]},ne.id):null})})]})}),hn?jsxRuntimeExports.jsx(CESkeletonTable,{columns:pt.length||5,rows:Pe||10}):Wn()]})},DateInputPart=({value:e,onChange:t,max:n,min:i,length:o,placeholder:l,className:u,onClick:f,id:p,name:m,disabled:d=!1})=>{const g=React.useRef(null),_=b=>{if(d)return;const T=b.target.value.replace(/\D/g,"");if(T.length<=o){if(T.length===1){const C=parseInt(T);if(n===12&&C>1){t(`0${C}`);return}if(n===31&&C>3){t(`0${C}`);return}}if(T.length===2){const C=parseInt(T);C>=i&&C<=n&&t(T);return}t(T)}},E=()=>{var b;d||(b=g.current)==null||b.select()},S=()=>{e.length===1&&t(e.padStart(2,"0"))};return jsxRuntimeExports.jsx("input",{ref:g,type:"text",value:e,onChange:_,onFocus:E,onBlur:S,id:p,name:m,onClick:f,maxLength:o,disabled:d,className:u??"date-input-part",placeholder:l})},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"],CALENDAR_HEIGHT_PX=290,GAP_PX=8,YEAR_PAGE_SIZE=12,getYearRangeForYear=e=>{const t=e-e%YEAR_PAGE_SIZE;return{start:t,end:t+YEAR_PAGE_SIZE-1}},CEDatePicker=({onChange:e,label:t="Calendar",value:n,focused:i=!1,id:o,name:l,disablePastDates:u=!1,minDate:f,maxDate:p,disabled:m=!1})=>{const[d,g]=React.useState(!1),[_,E]=React.useState(null),[S,b]=React.useState(()=>{const Oe=new Date;return new Date(Oe.getFullYear(),Oe.getMonth(),Oe.getDate())}),[T,C]=React.useState(!1),[A,R]=React.useState({start:2020,end:2031}),[O,j]=React.useState("left"),[I,D]=React.useState(0),F=React.useRef(null),[B,X]=React.useState(i),[U,N]=React.useState(""),[G,ee]=React.useState(""),[te,z]=React.useState(""),[K,L]=React.useState(!0),[W,Y]=React.useState({left:0,top:0}),V=React.useCallback((Oe=new Date)=>new Date(Oe.getFullYear(),Oe.getMonth(),Oe.getDate()),[]),M=React.useCallback((Oe,Me,Be)=>{if(!Oe||!Me||!Be)return null;const ze=Number(Oe),Qe=Number(Me),ut=Number(Be);if(!Number.isInteger(ze)||!Number.isInteger(Qe)||!Number.isInteger(ut))return null;const ct=new Date(ut,ze-1,Qe);return ct.getFullYear()!==ut||ct.getMonth()!==ze-1||ct.getDate()!==Qe?null:ct},[]),q=React.useMemo(()=>{if(f==null||f==="")return null;let Oe;if(typeof f=="string"){const[Me,Be,ze]=f.split("-");Oe=new Date(Number(Me),Number(Be)-1,Number(ze))}else Oe=new Date(f.getFullYear(),f.getMonth(),f.getDate());return isNaN(Oe.getTime())?null:Oe},[f]),H=React.useMemo(()=>{if(p==null||p==="")return null;let Oe;if(typeof p=="string"){const[Me,Be,ze]=p.split("-");Oe=new Date(Number(Me),Number(Be)-1,Number(ze))}else Oe=new Date(p.getFullYear(),p.getMonth(),p.getDate());return isNaN(Oe.getTime())?null:Oe},[p]),Q=React.useMemo(()=>u?V():null,[u,V]),ue=React.useMemo(()=>Q?q?Q.getTime()>q.getTime()?Q:q:Q:q,[q,Q]),de=React.useCallback(()=>{g(!1),!U&&!G&&!te&&X(!1)},[G,U,te]);useEscapeKey(de);const Se=React.useRef(void 0);React.useEffect(()=>{if(n){const[Oe,Me,Be]=n.split("/"),ze=M(Oe,Me,Be);if(ze){E(ze),b(Qe=>Qe.getFullYear()!==ze.getFullYear()||Qe.getMonth()!==ze.getMonth()||Qe.getDate()!==ze.getDate()?ze:Qe),N(Oe),ee(Me),z(Be),R(getYearRangeForYear(ze.getFullYear())),L(!0),Se.current=n;return}}Se.current&&b(V()),E(null),N(""),ee(""),z(""),L(!0),Se.current=n},[M,V,n]);const pe=React.useRef(null),ye=()=>{const Oe=F.current;if(!Oe)return;const Me=Oe.getBoundingClientRect(),Be=window.scrollY||window.pageYOffset,Qe=(window.innerHeight||document.documentElement.clientHeight)-Me.bottom,ut=Me.top;Qe<CALENDAR_HEIGHT_PX&&ut>=CALENDAR_HEIGHT_PX?Y({left:Me.left+window.scrollX,top:Me.top+Be-CALENDAR_HEIGHT_PX-GAP_PX}):Y({left:Me.left+window.scrollX,top:Me.bottom+Be+GAP_PX})};React.useEffect(()=>{if(!pe.current)return;const Oe=pe.current;Oe.style.position="absolute",Oe.style.left=`${Math.max(8,W.left)}px`,Oe.style.top=`${W.top}px`,Oe.style.zIndex="99999"},[W,d]);const Ae=React.useCallback(Oe=>{const Me=V(Oe);b(Me),C(!1),R(getYearRangeForYear(Me.getFullYear())),_&&(N(String(Me.getMonth()+1).padStart(2,"0")),ee(String(Me.getDate()).padStart(2,"0")),z(String(Me.getFullYear()))),D(Be=>Be+1),setTimeout(ye,0)},[V,_]),ie=React.useCallback(()=>{d||(Ae(_||V()),g(!0))},[V,d,_,Ae]),Ie=()=>{if(d){g(!1);return}ie()};React.useEffect(()=>{if(!d)return;const Oe=()=>ye(),Me=()=>ye();return window.addEventListener("scroll",Oe,!0),window.addEventListener("resize",Me),()=>{window.removeEventListener("scroll",Oe,!0),window.removeEventListener("resize",Me)}},[d]),React.useEffect(()=>{const Oe=Me=>{const Be=Me.target;if(!F.current)return;const ze=F.current.contains(Be),Qe=pe.current?pe.current.contains(Be):!1;!ze&&!Qe&&de()};return document.addEventListener("mousedown",Oe),()=>document.removeEventListener("mousedown",Oe)},[U,G,te,de]);const we=Oe=>{const Me=new Date(S.getFullYear(),S.getMonth(),Oe);if(u&&Q&&Me.getTime()<Q.getTime()||q&&Me.getTime()<q.getTime()||H&&Me.getTime()>H.getTime())return;E(Me),b(Me);const Be=String(Me.getMonth()+1).padStart(2,"0"),ze=String(Me.getDate()).padStart(2,"0"),Qe=String(Me.getFullYear());N(Be),ee(ze),z(Qe),L(!0),e(`${Be}/${ze}/${Qe}`),g(!1)},Ue=Oe=>{j(Oe>0?"left":"right"),b(Me=>{const Be=new Date(Me.getFullYear(),Me.getMonth()+Oe,1);return D(ze=>ze+1),Be})},We=Oe=>R(Me=>({start:Me.start+Oe*10,end:Me.end+Oe*10})),Ce=React.useCallback(Oe=>{const Me=new Date(S.getFullYear(),S.getMonth()+Oe,1);if(Oe<0&&ue){const Be=new Date(ue.getFullYear(),ue.getMonth(),1);if(Me.getTime()<Be.getTime())return!1}if(Oe>0&&H){const Be=new Date(H.getFullYear(),H.getMonth(),1);if(Me.getTime()>Be.getTime())return!1}return!0},[S,ue,H]),qe=ue==null?void 0:ue.getFullYear(),Je=H==null?void 0:H.getFullYear(),rt=Oe=>{if(qe!==void 0&&Oe<qe||Je!==void 0&&Oe>Je)return;const Me=new Date(Oe,S.getMonth(),1);b(Me),C(!1)},tt=()=>{const Oe=new Date(S.getFullYear(),S.getMonth(),1),Me=new Date(S.getFullYear(),S.getMonth()+1,0),Be=Oe.getDay(),ze=Me.getDate(),Qe=Q,ut=ot=>Qe?!_&&Qe.getDate()===ot&&Qe.getMonth()===S.getMonth()&&Qe.getFullYear()===S.getFullYear():!1,ct=[];for(let ot=0;ot<Be;ot++)ct.push(jsxRuntimeExports.jsx("div",{className:"dp-day empty"},`empty-${ot}`));for(let ot=1;ot<=ze;ot++){const Ct=(_==null?void 0:_.getDate())===ot&&(_==null?void 0:_.getMonth())===S.getMonth()&&(_==null?void 0:_.getFullYear())===S.getFullYear(),He=new Date(S.getFullYear(),S.getMonth(),ot);let Et=!1;u&&Qe&&He.getTime()<Qe.getTime()&&(Et=!0),q&&He.getTime()<q.getTime()&&(Et=!0),H&&He.getTime()>H.getTime()&&(Et=!0),ct.push(jsxRuntimeExports.jsx("div",{className:`dp-day ${Ct?"selected":""} ${ut(ot)?"today":""} ${Et?"disabled":""}`,onClick:()=>{Et||we(ot)},"aria-label":Et?"Date unavailable":"Select date","data-disabled":Et?"true":"false",tabIndex:Et?-1:0,children:ot},ot))}return ct},Ve=(Oe,Me,Be)=>{if(!Oe||!Me||!Be){L(!1);const Qe=new Date;b(new Date(Qe.getFullYear(),Qe.getMonth(),Qe.getDate())),E(null);return}const ze=M(Oe,Me,Be);if(ze){if(u&&Q&&ze.getTime()<Q.getTime()||q&&ze.getTime()<q.getTime()||H&&ze.getTime()>H.getTime()){L(!1),E(null),b(V());return}E(ze),b(ze),L(!0),e(`${Oe}/${Me}/${Be}`)}else L(!1),E(null),b(V()),N(Oe),ee(Me),z(Be)},mt=jsxRuntimeExports.jsx("div",{className:"dp-wrapper",ref:F,children:jsxRuntimeExports.jsxs("div",{className:`dp-input-container${B||d?" focused":""}${_||U||G||te?" has-value":""}${K?"":" invalid"}${m?" dp-disabled":""}`,"aria-disabled":m?"true":"false",children:[jsxRuntimeExports.jsx("div",{className:"dp-label floating",children:t}),jsxRuntimeExports.jsxs("div",{className:`dp-input-wrapper${m?" dp-input-wrapper-disabled":""}`,onClick:()=>{m||X(!0)},children:[jsxRuntimeExports.jsx(DateInputPart,{value:U,onChange:Oe=>{m||(N(Oe),Ve(Oe,G,te))},max:12,min:1,length:2,placeholder:"MM",onClick:m?void 0:ie,id:o?`${o}-month`:void 0,name:l?`${l}-month`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx(DateInputPart,{value:G,onChange:Oe=>{m||(ee(Oe),Ve(U,Oe,te))},placeholder:"DD",max:31,min:1,length:2,onClick:m?void 0:ie,id:o?`${o}-day`:void 0,name:l?`${l}-day`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("input",{type:"text",value:te,onChange:Oe=>{if(m)return;const Me=Oe.target.value.replace(/\D/g,"");Me.length<=4&&(z(Me),Me.length===4&&Ve(U,G,Me))},onFocus:Oe=>{m||Oe.target.select()},onClick:m?void 0:ie,onBlur:()=>{!m&&te.length===4&&Ve(U,G,te)},className:"date-input-part",id:o?`${o}-year`:void 0,name:l?`${l}-year`:void 0,maxLength:4,placeholder:"YYYY",disabled:m}),jsxRuntimeExports.jsx("span",{className:`dp-icon${m?" dp-icon-disabled":""}`,onClick:m?void 0:Ie,children:jsxRuntimeExports.jsx("img",{src:DateRangeIcon,alt:"Calendar Icon"})})]})]})}),it=jsxRuntimeExports.jsxs("div",{className:"dp-calendar",ref:pe,role:"dialog","aria-modal":"true",children:[jsxRuntimeExports.jsxs("div",{className:"dp-header",children:[jsxRuntimeExports.jsxs("div",{className:"dp-title",onClick:()=>C(Oe=>!Oe),children:[T?`${A.start} - ${A.end}`:`${S.toLocaleString("default",{month:"long"})} ${S.getFullYear()}`,jsxRuntimeExports.jsx("button",{type:"button",className:"dp-toggle-icon",children:"▾"})]}),jsxRuntimeExports.jsxs("div",{className:"dp-controls",children:[jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>T?We(-1):Ue(-1),disabled:T?!1:!Ce(-1),children:"‹"}),jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>T?We(1):Ue(1),disabled:T?!1:!Ce(1),children:"›"})]})]}),!T&&jsxRuntimeExports.jsx("div",{className:"dp-weekdays",children:WEEKDAYS.map(Oe=>jsxRuntimeExports.jsx("div",{className:"dp-weekday",children:Oe},Oe))}),T?jsxRuntimeExports.jsx("div",{className:"dp-years-grid",children:Array.from({length:A.end-A.start+1},(Oe,Me)=>{const Be=A.start+Me;return jsxRuntimeExports.jsx("div",{className:`dp-year-item ${qe!==void 0&&Be<qe||Je!==void 0&&Be>Je?"disabled":""}`,onClick:()=>rt(Be),"aria-disabled":qe!==void 0&&Be<qe||Je!==void 0&&Be>Je?"true":"false",children:Be},Be)})}):jsxRuntimeExports.jsx("div",{className:`dp-days dp-slide-${O}`,children:tt()},I)]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[mt,d&&!m&&ReactDOM.createPortal(it,document.body)]})},FieldsInput=({label:e,name:t,placeholder:n="",value:i="",onChange:o,size:l="medium"})=>{const[u,f]=React.useState(!1),[p,m]=React.useState(!1),d=getSizeStyle$1(l);React.useEffect(()=>{i&&i.trim().length>0&&m(!0)},[i]);const g=()=>{f(!0),m(!0)},_=S=>{f(!1),S.target.value.trim()||m(!1)},E=u||!!i;return jsxRuntimeExports.jsxs("div",{className:`floating-input-wrapper${p?" focused":""}`,style:d,children:[jsxRuntimeExports.jsx("label",{htmlFor:t,className:"floating-label",children:e}),jsxRuntimeExports.jsx("input",{id:t,name:t,className:"floating-input",placeholder:E?n:"",value:i,onChange:o,onFocus:g,onBlur:_})]})},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:n="1rem",alignItems:i="stretch",justifyItems:o="stretch",gridTemplateColumns:l})=>jsxRuntimeExports.jsx("div",{className:"grid-container",style:{display:"grid",width:"100%",gridTemplateColumns:l||`repeat(${t}, 1fr)`,gap:n,alignItems:i,justifyItems:o,backgroundColor:"transparent"},children:e}),CELogo=({src:e,alt:t="Logo",style:n})=>jsxRuntimeExports.jsx("img",{src:e,alt:t,style:{height:25,...n}}),CESearchBar=({onFocus:e,onBlur:t,quickActions:n=[],recentSearches:i=[]})=>{const[o,l]=React.useState(!1),[u,f]=React.useState(""),[p,m]=React.useState(n),[d,g]=React.useState(i),_=(S,b)=>{S==="quickActions"?m(T=>T.filter((C,A)=>A!==b)):g(T=>T.filter((C,A)=>A!==b))},E=()=>{u.trim()!==""&&(g(S=>[u,...S]),f(""))};return jsxRuntimeExports.jsxs("div",{className:"ceui-search-bar",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",className:"ceui-search-input",value:u,onChange:S=>f(S.target.value),onFocus:()=>{l(!0),e&&e()},onBlur:()=>{setTimeout(()=>l(!1),200),t&&t()},onKeyDown:S=>{S.key==="Enter"&&E()}}),o&&jsxRuntimeExports.jsxs("div",{className:"ceui-search-suggestions",children:[p.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Quick actions"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:p.map((S,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[S,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("quickActions",b),children:"✕"})]},b))})]}),d.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Recent search"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:d.map((S,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[S,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("recentSearches",b),children:"✕"})]},b))})]})]})]})},CESearchButton=({showSuggestions:e=!1,quickActions:t=[],recentSearches:n=[]})=>{const[i,o]=React.useState(!1),[l,u]=React.useState(!1),f=React.useRef(null),p=d=>{f.current&&!f.current.contains(d.target)&&(o(!1),u(!1))},m=()=>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(()=>(i?document.addEventListener("mousedown",p):document.removeEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}),[i]),console.log("isSearchOpen:",i),console.log("showDropdown:",l),console.log("showSuggestions:",e),jsxRuntimeExports.jsxs("div",{ref:f,className:`ceui-animated-search-wrapper ${i?"expanded":"collapsed"}`,children:[jsxRuntimeExports.jsx("button",{className:"ceui-search-button","aria-label":"Open search",onClick:()=>o(!0),children:jsxRuntimeExports.jsx(m,{})}),i&&jsxRuntimeExports.jsx(CESearchBar,{showSuggestions:i&&(e||l),onFocus:()=>u(!0),onBlur:()=>{setTimeout(()=>u(!1),200)},quickActions:t,recentSearches:n})]})},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),n=React.useRef(null),i=()=>t(!e),o=l=>{n.current&&!n.current.contains(l.target)&&t(!1)};return React.useEffect(()=>(e?document.addEventListener("mousedown",o):document.removeEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}),[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:i}),e&&jsxRuntimeExports.jsxs("div",{ref:n,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:n,logoWidth:i,showSearchButton:o=!1,quickActions:l=[],recentSearches:u=[],showHelpButton:f=!1,showNotificationButton:p=!1,showAvatarMenu:m=!1,showUserInfo:d=!1,showHamburgerButton:g=!1,showDrawer:_=!1,userInfoProps:E,onMenuClick:S,drawerJsonUrl:b="",isDrawerOpen:T=!1,onDrawerClose:C})=>{const A=()=>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:n||35,width:i||"auto",maxWidth:120}}):jsxRuntimeExports.jsx(A,{})}),jsxRuntimeExports.jsxs("div",{className:"ceui-header-right",children:[o&&jsxRuntimeExports.jsx(CESearchButton,{showSuggestions:!0,quickActions:l,recentSearches:u,value:"",onChange:()=>{},onClear:()=>{}}),f&&jsxRuntimeExports.jsx(CEHelpButton,{}),p&&jsxRuntimeExports.jsx(CENotificationButton,{}),m&&jsxRuntimeExports.jsx(CEAvatarMenu,{}),d&&E&&jsxRuntimeExports.jsx(CEUserInfo,{name:E.name,role:E.role})]})]}),_&&g&&jsxRuntimeExports.jsx(CEDrawer,{jsonUrl:b,isOpen:T,onClose:C||(()=>{})})]})},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"})}),CEShowMoreLessTextArea=({value:e,onChange:t,id:n,name:i,onChangeMeta:o,placeholder:l="",rows:u,maxLength:f,required:p=!1,errorMessage:m="Invalid input",showError:d=!0,label:g,labelSuffix:_,disabled:E=!1,style:S={},size:b="medium",onFocus:T,onBlur:C,autoFocus:A=!1,alwaysShowLabel:R,maxLines:O=2})=>{const[j,I]=React.useState(!1),[D,F]=React.useState(!1),[B,X]=React.useState(!1),[U,N]=React.useState(0),G=React.useRef(null),ee=React.useRef(null),te=React.useRef(null),z=e==null?"":String(e),K=Math.max(1,O),L=getSizeStyle$1(b||"medium"),W=React.useMemo(()=>({fontSize:L.fontSize,padding:L.padding,...S}),[L.fontSize,L.padding,S]),Y=typeof W.fontSize=="number"?`${W.fontSize}px`:String(W.fontSize),V=typeof W.padding=="number"?`${W.padding}px`:String(W.padding),M=typeof W.lineHeight=="number"?`${W.lineHeight}px`:typeof W.lineHeight=="string"&&W.lineHeight.trim().length>0?W.lineHeight:"24px",q=Number.parseFloat(Y),H=Number.parseFloat(M),Q=Number.isFinite(H)?H:Number.isFinite(q)?q*1.5:24,ue=React.useCallback(()=>{const ie=ee.current,Ie=te.current;if(!ie||!Ie)return;const we=Q*K;N(we),Ie.style.width=`${ie.clientWidth}px`,Ie.style.padding=V,Ie.style.fontSize=Y,Ie.style.fontFamily=String(W.fontFamily||"inherit"),Ie.style.fontWeight=String(W.fontWeight||"inherit"),Ie.style.lineHeight=M,Ie.style.letterSpacing=String(W.letterSpacing||"normal"),Ie.style.wordBreak="break-word",Ie.style.overflowWrap="anywhere",Ie.style.whiteSpace="pre-wrap",Ie.textContent=z||"";const Ue=Ie.scrollHeight;X(Ue>we+.5)},[Q,W.fontFamily,W.fontWeight,W.letterSpacing,z,Y,M,V,K]);React.useEffect(()=>{G.current&&(G.current.style.height="auto",G.current.style.height=`${G.current.scrollHeight}px`)},[z,D]),React.useLayoutEffect(()=>{ue();const ie=window.requestAnimationFrame(ue);return()=>window.cancelAnimationFrame(ie)},[ue]),React.useEffect(()=>{if(!ee.current)return;const ie=new ResizeObserver(()=>{ue()});return ie.observe(ee.current),()=>ie.disconnect()},[ue]),React.useEffect(()=>{B||F(!1)},[B]);const de=d&&p&&!z,Se=B&&!D,pe=!!g&&(R||!!z||j||l&&l.trim().length>0),ye=ie=>{I(!0),T==null||T(ie)},Ae=ie=>{I(!1),C==null||C(ie)};return jsxRuntimeExports.jsxs("div",{className:`validated-input-wrapper ${j?"focused":""} ${de?"error":""} ${E?"disabled":""}`,children:[g&&jsxRuntimeExports.jsxs("label",{className:`validated-input-label ${pe?"shrink":""}`,children:[g,p&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"}),_&&jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:_})]}),jsxRuntimeExports.jsxs("div",{className:"ce-sm-textarea-scope",ref:ee,children:[jsxRuntimeExports.jsx("div",{ref:te,"aria-hidden":"true",className:"ce-sm-textarea-measure"}),Se?jsxRuntimeExports.jsxs("div",{className:"ce-sm-collapsed-box",children:[jsxRuntimeExports.jsx("div",{style:{padding:V},children:jsxRuntimeExports.jsx("div",{className:"ce-sm-collapsed-text",style:{maxHeight:`${U}px`,fontSize:Y,lineHeight:M},children:z})}),jsxRuntimeExports.jsx("div",{className:"ce-sm-more-less-row",children:jsxRuntimeExports.jsx("button",{type:"button",className:"ce-sm-more-less-btn",onClick:()=>F(!0),children:"Show more"})})]}):jsxRuntimeExports.jsxs("div",{className:"ce-sm-expanded-wrap",children:[jsxRuntimeExports.jsx("textarea",{ref:G,rows:u,value:z,onChange:ie=>{t(ie.target.value),o==null||o(ie.target.value,{id:n,name:i})},onFocus:ye,onBlur:Ae,placeholder:l||" ",id:n,name:i,className:`validated-input-field ce-sm-textarea ${de?"input-error":""}`,disabled:E,style:W,autoFocus:A,maxLength:f}),B&&jsxRuntimeExports.jsx("div",{className:"ce-sm-more-less-row",children:jsxRuntimeExports.jsx("button",{type:"button",className:"ce-sm-more-less-btn",onClick:()=>F(!1),children:"Show less"})})]})]}),d&&de&&jsxRuntimeExports.jsx("div",{className:"validated-input-error",children:m})]})},InputDropDown=({options:e,selected:t,onChange:n,multiple:i=!1,placeholder:o="Select...",size:l="medium",style:u={},allowClear:f=!0,showInputPills:p=!0,id:m,name:d,required:g=!1,enableSelectAll:_=!1,selectAllLabel:E="Select All",isSearchField:S=!1})=>{const[b,T]=React.useState(!1),[C,A]=React.useState(!1),[R,O]=React.useState(""),j=React.useRef(null),I=React.useRef([]),[D,F]=React.useState(-1),B=React.useRef(null),U={...getSizeStyle$1(l),...u},N=S?e.filter(M=>M.label.toLowerCase().includes(R.toLowerCase())):e,G=M=>{if(i){const q=t.includes(M)?t.filter(H=>H!==M):[...t,M];n(q)}else n([M]),T(!1)},ee=()=>n([]),te=M=>{n(t.filter(q=>q!==M))},z=e.filter(M=>t.includes(M.value)).map(M=>M.label),K=e.map(M=>M.value),L=i&&t.length===K.length&&K.length>0,W=()=>{n(L?[]:K)};React.useEffect(()=>{const M=q=>{var H;(H=B.current)!=null&&H.contains(q.target)||T(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]),React.useEffect(()=>{!b&&S&&O("")},[b,S]),React.useEffect(()=>{b||F(-1)},[b]),React.useEffect(()=>{b&&S&&requestAnimationFrame(()=>{var M;(M=j.current)==null||M.focus()})},[b,S]);const Y=M=>{var q;if(!b&&(M.key==="Enter"||M.key==="ArrowDown")){M.preventDefault(),T(!0);return}if(M.key==="ArrowDown"&&(M.preventDefault(),V(D+1)),M.key==="ArrowUp"&&(M.preventDefault(),D<=0&&S?((q=j.current)==null||q.focus(),F(-1)):V(D-1)),M.key==="Escape"&&T(!1),M.key==="Tab"&&T(!1),M.key==="Enter"&&b){M.preventDefault();const H=N[D];H&&G(H.value)}},V=M=>{var H;const q=N.length-1;M<0||M>q||(F(M),(H=I.current[M])==null||H.focus())};return jsxRuntimeExports.jsx("div",{className:`dropdown-container ${b||t.length>0?"float":""}`,ref:B,style:U,id:m,"data-name":d,"aria-required":g,children:jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${b?"open":""}`,onFocus:()=>{A(!0)},onClick:()=>T(M=>!M),onKeyDown:Y,tabIndex:0,children:[jsxRuntimeExports.jsxs("label",{className:"floating-placeholder",children:[o,g&&jsxRuntimeExports.jsx("span",{className:"required-asterisk","aria-hidden":"true",children:"*"})]}),jsxRuntimeExports.jsx("div",{className:"selected-display",children:t.length===0?"":i?p?z.map((M,q)=>jsxRuntimeExports.jsxs("span",{className:"chip",children:[M,jsxRuntimeExports.jsx("span",{className:"close-icon",onClick:H=>{var Q;H.stopPropagation(),te(((Q=e.find(ue=>ue.label===M))==null?void 0:Q.value)||"")},children:"×"})]},q)):jsxRuntimeExports.jsx("div",{className:"selected-display-label",children:z.join(",")}):jsxRuntimeExports.jsx("span",{children:z[0]})}),f&&t.length>0&&jsxRuntimeExports.jsx("button",{className:"clear-button",onClick:M=>{M.stopPropagation(),ee()},children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M6 9l6 6 6-6"})})}),b&&jsxRuntimeExports.jsxs("ul",{className:"dropdown-options",children:[S&&jsxRuntimeExports.jsx("li",{className:"component-add-dropdown-search",onClick:M=>M.stopPropagation(),children:jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",value:R,autoFocus:!0,onChange:M=>O(M.target.value),onKeyDown:M=>{M.key==="ArrowDown"&&(M.preventDefault(),V(0))}})}),i&&_&&jsxRuntimeExports.jsxs("li",{className:`dropdown-option select-all ${L?"selected":""}`,onClick:M=>{M.stopPropagation(),W()},children:[jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:L}),E]}),N.map((M,q)=>jsxRuntimeExports.jsxs("li",{ref:H=>I.current[q]=H,tabIndex:0,className:`dropdown-option ${t.includes(M.value)?"selected":""}`,onClick:H=>{H.stopPropagation(),G(M.value)},onKeyDown:H=>{var Q;H.key==="ArrowDown"&&(H.preventDefault(),V(q+1)),H.key==="ArrowUp"&&(H.preventDefault(),q===0&&S?((Q=j.current)==null||Q.focus(),F(-1)):V(q-1)),H.key==="Enter"&&G(M.value)},children:[i&&jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:t.includes(M.value)}),M.label]},M.value)),S&&N.length===0&&jsxRuntimeExports.jsx("li",{className:"dropdown-empty",children:"No results found"})]})]})})},CELinearProgressBar=({duration:e,color:t="#4caf50",backgroundColor:n="#e0e0e0",height:i="10px",isActive:o=!1})=>{const l=React.useRef(null);return React.useEffect(()=>{const u=l.current;if(!(!u||!o))return u.style.width="0%",u.style.transition="none",u.offsetWidth,requestAnimationFrame(()=>{u&&(u.style.transition=`width ${e}ms linear`,u.style.width="100%")}),()=>{u&&(u.style.width="0%",u.style.transition="none")}},[e,o]),jsxRuntimeExports.jsx("div",{className:"snackbar__progress-container",style:{height:i},children:jsxRuntimeExports.jsx("div",{ref:l,className:"snackbar__progress-bar"})})},CEMenuBar=({menuData:e})=>{const[t,n]=React.useState({}),i=(p,m)=>{n(d=>({...d,[p]:m}))};useEscapeKey(()=>{n({})});const l=p=>p.children&&p.children.length>0,u=p=>p.some(m=>l(m)),f=(p,m="")=>!p||p.length===0?null:jsxRuntimeExports.jsx("ul",{className:m?"ce-submenu":"ce-dropdown",children:p.map(d=>{const g=m?`${m}-${d.name}`:d.name,_=l(d);return jsxRuntimeExports.jsxs("li",{className:`ce-dropdown-item ${_?"has-submenu":""}`,onMouseEnter:()=>_&&i(g,!0),onMouseLeave:()=>_&&i(g,!1),onClick:()=>console.log(`Clicked: ${d.name}`),children:[d.name,_&&jsxRuntimeExports.jsx("span",{className:"ce-icon right",children:"▶"}),_&&t[g]&&f(d.children,g)]},g)})});return jsxRuntimeExports.jsx("div",{className:"ce-menu-bar",children:jsxRuntimeExports.jsx("div",{className:"ce-menu-container",children:e.map(p=>{const m=u(p.items);return jsxRuntimeExports.jsxs("div",{className:"ce-menu-item",onMouseEnter:()=>m&&i(p.title,!0),onMouseLeave:()=>m&&i(p.title,!1),children:[jsxRuntimeExports.jsxs("button",{className:"ce-menu-button",children:[p.title,m&&jsxRuntimeExports.jsx("span",{className:"ce-icon",children:"▼"})]}),m&&t[p.title]&&f(p.items,p.title)]},p.title)})})})},CEPagination=({currentPage:e,totalPages:t,onPageChange:n})=>{const i=()=>{const p=[];if(t<=8)for(let m=0;m<t;m++)p.push(m);else if(e<7){for(let m=0;m<8;m++)p.push(m);p.push("..."),p.push(t-1)}else if(e>=t-8+1){p.push(0),p.push("...");for(let m=t-8;m<t;m++)p.push(m)}else{p.push(0),p.push("...");for(let m=e-3;m<=e+3;m++)p.push(m);p.push("..."),p.push(t-1)}return p},o=f=>{typeof f=="number"&&n(f)},l=()=>{e>0&&n(e-1)},u=()=>{e<t-1&&n(e+1)};return jsxRuntimeExports.jsxs("div",{className:"pagination",children:[jsxRuntimeExports.jsx("button",{onClick:l,disabled:e===0,className:"pagination-button",children:"Previous"}),i().map((f,p)=>typeof f=="number"?jsxRuntimeExports.jsx("button",{onClick:()=>o(f),className:`pagination-button page-number ${e===f?"active":""}`,children:f+1},p):jsxRuntimeExports.jsx("span",{className:"pagination-ellipsis",children:f},p)),jsxRuntimeExports.jsx("button",{onClick:u,disabled:e===t-1,className:"pagination-button",children:"Next"})]})},CERadioButtonGroup=({options:e,name:t,defaultValue:n,onChange:i,direction:o="horizontal",id:l,nameAttr:u,disabled:f=!1})=>{const[p,m]=React.useState(n||""),d=g=>{m(g),i(g)};return jsxRuntimeExports.jsx("div",{className:`radio-button-group ${o}`,role:"radiogroup","aria-labelledby":t,id:l,children:e.map(g=>jsxRuntimeExports.jsx("div",{className:"radio-button",children:jsxRuntimeExports.jsx(CERadioButton,{label:g.label,value:g.value,checked:p===g.value,onChange:d,id:l?`${l}-${g.value}`:void 0,name:u,disabled:f})},g.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:n="100%",height:i="auto",minHeight:o="200px",maxHeight:l="none",className:u="",style:f={},editorStyle:p={}})=>{const m=React.useRef(null),[d,g]=React.useState("3"),[_,E]=React.useState("Arial"),[S,b]=React.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1,subscript:!1,superscript:!1,justifyLeft:!0,justifyCenter:!1,justifyRight:!1,justifyFull:!1});React.useEffect(()=>{m.current&&e&&(m.current.innerHTML=e)},[e]);const T=React.useCallback(I=>{try{return document.queryCommandState(I)}catch{return!1}},[]),C=React.useCallback(()=>{b({bold:T("bold"),italic:T("italic"),underline:T("underline"),strikeThrough:T("strikethrough"),subscript:T("subscript"),superscript:T("superscript"),justifyLeft:T("justifyLeft"),justifyCenter:T("justifyCenter"),justifyRight:T("justifyRight"),justifyFull:T("justifyFull")})},[T]),A=React.useCallback((I,D="")=>{var X,U;const F=saveSelection(),B=document.getSelection();if(I==="createLink"){const N=prompt("Enter URL:");if(N){restoreSelection(F),document.execCommand("createLink",!1,N);const G=(X=B==null?void 0:B.anchorNode)==null?void 0:X.parentElement;G instanceof HTMLAnchorElement&&(G.target="_blank",G.rel="noopener noreferrer")}}else if(I==="insertImage"){const N=prompt("Enter image URL:");if(N){restoreSelection(F);const G=`<img src="${N}" alt="image" style="max-width: 100%; height: auto;"/>`;document.execCommand("insertHTML",!1,G)}}else I==="fontSize"||I==="fontName"?(restoreSelection(F),document.execCommand(I,!0,D),I==="fontSize"?g(D):E(D)):(restoreSelection(F),document.execCommand(I,!1,D));m.current&&(t==null||t(m.current.innerHTML)),(U=m.current)==null||U.focus(),C()},[t,C]),R=I=>{if(I.key==="Tab"&&(I.preventDefault(),document.execCommand("insertHTML",!1," ")),I.ctrlKey||I.metaKey)switch(I.key.toLowerCase()){case"z":I.preventDefault(),I.shiftKey?A("redo"):A("undo");break;case"y":I.preventDefault(),A("redo");break}},O=[{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"}],j=["Arial","Times New Roman","Courier New","Georgia","Verdana","Helvetica","Serif Fonts","Algerian"];return jsxRuntimeExports.jsxs("div",{className:`rich-text-editor ${u}`,style:{width:n,height:i,...f},children:[jsxRuntimeExports.jsxs("div",{className:"toolbar",children:[jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("bold"),className:`toolbar-button ${S.bold?"active":""}`,title:"Bold",children:jsxRuntimeExports.jsx("strong",{children:"B"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("italic"),className:`toolbar-button ${S.italic?"active":""}`,title:"Italic",children:jsxRuntimeExports.jsx("em",{children:"I"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("underline"),className:`toolbar-button ${S.underline?"active":""}`,title:"Underline",children:jsxRuntimeExports.jsx("u",{children:"U"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("strikeThrough"),className:`toolbar-button ${S.strikeThrough?"active":""}`,title:"Strike Through",children:jsxRuntimeExports.jsx("s",{children:"S"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("subscript"),className:`toolbar-button ${S.subscript?"active":""}`,title:"Subscript",children:"X₂"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("superscript"),className:`toolbar-button ${S.superscript?"active":""}`,title:"Superscript",children:"X²"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyLeft"),className:`toolbar-button ${S.justifyLeft?"active":""}`,title:"Align Left",children:"⇤"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyCenter"),className:`toolbar-button ${S.justifyCenter?"active":""}`,title:"Center",children:"⇔"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyRight"),className:`toolbar-button ${S.justifyRight?"active":""}`,title:"Align Right",children:"⇥"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyFull"),className:`toolbar-button ${S.justifyFull?"active":""}`,title:"Justify",children:"≡"})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("insertUnorderedList"),className:"toolbar-button",title:"Bullet List",children:"●"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertOrderedList"),className:"toolbar-button",title:"Numbered List",children:"1. 2. 3."})]}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:d,onChange:I=>A("fontSize",I.target.value),className:"toolbar-select",title:"Font Size",children:O.map(I=>jsxRuntimeExports.jsx("option",{value:I.value,children:I.label},I.value))})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:_,onChange:I=>A("fontName",I.target.value),className:"toolbar-select",title:"Font Family",children:j.map(I=>jsxRuntimeExports.jsx("option",{value:I,children:I},I))})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("createLink"),className:"toolbar-button",title:"Insert Link",children:"🔗"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertImage"),className:"toolbar-button",title:"Insert Image",children:"📷"})]}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("undo"),className:"toolbar-button",title:"Undo (Ctrl+Z)",children:"↩"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("redo"),className:"toolbar-button",title:"Redo (Ctrl+Y)",children:"↪"})]})]}),jsxRuntimeExports.jsx("div",{ref:m,className:"editor-content",contentEditable:!0,style:{minHeight:o,maxHeight:l,height:i==="auto"?"auto":"100%",...p},onKeyDown:R,onKeyUp:C,onMouseUp:C,onInput:()=>{m.current&&(t==null||t(m.current.innerHTML)),C()}})]})},CETabView=({tabs:e,renderContent:t,variant:n="top"})=>{var f;const i=React.useMemo(()=>e.map(p=>{if(typeof p=="string")return{key:p,label:p};const m=p.key??p.label??"tab",d=p.label??p.key??"Tab";return{key:m,label:d,icon:p.icon,badgeCount:p.badgeCount}}),[e]),[o,l]=React.useState(((f=i[0])==null?void 0:f.key)??"");if(React.useEffect(()=>{if(!i.length)return;i.some(m=>m.key===o)||l(i[0].key)},[i,o]),!i.length)return null;const u=n==="top";return jsxRuntimeExports.jsxs("div",{className:`tabview-container ${u?"tabview-container-top":"tabview-container-sidebar"}`,children:[u?jsxRuntimeExports.jsx("div",{className:"tabview-topbar",role:"tablist","aria-label":"Tab navigation",children:i.map(p=>{const m=o===p.key;return jsxRuntimeExports.jsxs("button",{className:`tabview-top-tab ${m?"tabview-top-tab-active":""}`,onClick:()=>l(p.key),role:"tab",tabIndex:m?0:-1,children:[p.icon&&jsxRuntimeExports.jsx("span",{className:"tabview-icon",children:p.icon}),jsxRuntimeExports.jsx("span",{className:"tabview-label",children:p.label}),p.badgeCount!==void 0&&p.badgeCount!==null?jsxRuntimeExports.jsx("span",{className:"tabview-badge","aria-label":`${p.badgeCount} items`,children:p.badgeCount}):null]},p.key)})}):jsxRuntimeExports.jsx("div",{className:"tabview-sidebar",role:"tablist","aria-label":"Tab navigation",children:i.map(p=>{const m=o===p.key;return jsxRuntimeExports.jsxs("div",{className:`tabview-tab ${m?"tabview-tab-active":""}`,onClick:()=>l(p.key),role:"tab",tabIndex:m?0:-1,children:[p.icon&&jsxRuntimeExports.jsx("span",{className:"tabview-icon",children:p.icon}),jsxRuntimeExports.jsx("span",{className:"tabview-label",children:p.label}),p.badgeCount!==void 0&&p.badgeCount!==null?jsxRuntimeExports.jsx("span",{className:"tabview-badge","aria-label":`${p.badgeCount} items`,children:p.badgeCount}):null]},p.key)})}),jsxRuntimeExports.jsx("div",{className:"tabview-content",role:"tabpanel",children:t(o)})]})},CETemplate=({children:e,headerProps:t,showHeader:n=!0,showFooter:i=!0,containerClassName:o="",containerStyle:l={}})=>jsxRuntimeExports.jsxs("div",{className:`ce-wrapper ${o}`,style:l,children:[n&&jsxRuntimeExports.jsx(CEHeader,{...t}),jsxRuntimeExports.jsx("main",{className:"main-content",children:e}),i&&jsxRuntimeExports.jsx(CEFooter,{})]}),CETimePicker=({label:e="Select Time",onChange:t,initialTime:n="",className:i="",id:o,name:l,disabled:u=!1})=>{const[f,p]=React.useState(!1),[m,d]=React.useState(n),[g,_]=React.useState("12"),[E,S]=React.useState("00"),[b,T]=React.useState("AM"),[C,A]=React.useState(!1),[R,O]=React.useState(""),[j,I]=React.useState(""),D=React.useRef(null);React.useEffect(()=>{u&&(p(!1),A(!1))},[u]);const F=Array.from({length:12},(L,W)=>String(W+1).padStart(2,"0")),B=Array.from({length:60},(L,W)=>String(W).padStart(2,"0")),X=(L,W)=>{if(!L)return"";const Y=parseInt(L);return W==="hours"?Y>12?"12":Y===0?"01":L.padStart(2,"0"):Y>59?"59":L.padStart(2,"0")},U=L=>{const W=L.target.value,Y=L.target.selectionStart||0;let V=g,M=E,q=b,H=m;if(Y<=2){const Q=W.substring(0,2).replace(/[^0-9]/g,"");if(Q){if(Q.length===1){const ue=parseInt(Q);ue>=2&&ue<=9?(V=Q.padStart(2,"0"),setTimeout(()=>{D.current&&D.current.setSelectionRange(3,5)},10)):(V=Q,setTimeout(()=>{D.current&&D.current.setSelectionRange(1,1)},10))}else if(Q.length===2){const ue=parseInt(Q);ue>=1&&ue<=12?(V=Q,setTimeout(()=>{D.current&&D.current.setSelectionRange(3,5)},10)):(V=Q[0],setTimeout(()=>{D.current&&D.current.setSelectionRange(1,1)},10))}H=`${V}:${E} ${b}`}}else if(Y>=3&&Y<=5){const Q=W.indexOf(":")+1,ue=W.substring(Q,Q+2).replace(/[^0-9]/g,"");if(ue){if(ue.length===1)M=ue,H=`${g}:${M} ${b}`,setTimeout(()=>{D.current&&D.current.setSelectionRange(4,4)},10);else if(ue.length===2){const de=parseInt(ue);de>=0&&de<=59?(M=ue,setTimeout(()=>{D.current&&D.current.setSelectionRange(6,8)},10)):(M=ue[0],setTimeout(()=>{D.current&&D.current.setSelectionRange(4,4)},10))}H=`${g}:${M} ${b}`}}else if(Y>=6){const ue=W.substring(W.lastIndexOf(" ")+1).toUpperCase();ue.startsWith("A")?(q="AM",H=`${g}:${E} AM`):ue.startsWith("P")&&(q="PM",H=`${g}:${E} PM`)}_(V),S(M),T(q),d(H),p(!1),t==null||t(H)},N=L=>{if(!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","0","1","2","3","4","5","6","7","8","9",":","A","P","M"," ","a","p","m"].includes(L.key)){L.preventDefault();return}if(L.key==="Enter"||L.key===":"){L.preventDefault();const Y=L.currentTarget.selectionStart||0;if(Y<=2){if(R){const V=X(R,"hours");_(V),O(""),d(`${V}:${E} ${b}`)}L.currentTarget.setSelectionRange(3,5)}else if(Y>=3&&Y<=5){if(j){const V=X(j,"minutes");S(V),I(""),d(`${g}:${V} ${b}`)}L.currentTarget.setSelectionRange(6,8)}}},G=L=>{const W=L.currentTarget.selectionStart||0,Y=D.current;Y&&(W<=1?Y.setSelectionRange(0,2):W>=3&&W<=4?Y.setSelectionRange(3,5):W>=6&&Y.setSelectionRange(6,8))},ee=()=>{u||(p(!0),A(!0))},te=(L,W)=>{const Y=L==="hours"?W:g,V=L==="minutes"?W:E,M=L==="period"?W:b;_(Y),S(V),T(M);const q=`${Y}:${V} ${M}`;d(q),t==null||t(q)},z=()=>{const L=`${g}:${E} ${b}`;d(L),p(!1),t==null||t(L)},K=()=>{d(""),_("12"),S("00"),T("AM"),p(!1),A(!1)};return jsxRuntimeExports.jsxs("div",{className:`time-picker-container ${i}`,children:[jsxRuntimeExports.jsxs("div",{className:`time-picker-input ${f||C?"active":""}`,children:[jsxRuntimeExports.jsx("input",{ref:D,type:"text",id:o,name:l,disabled:u,value:m,onChange:U,onKeyDown:N,onClick:L=>{u||(m||ee(),G(L))},onFocus:()=>A(!0),onBlur:()=>!f&&A(!1),placeholder:C||m?"hh:mm AM":"",className:"time-input",maxLength:8}),jsxRuntimeExports.jsx("label",{className:`floating-label ${f||C||m?"active":""}`,children:e}),jsxRuntimeExports.jsx("span",{className:"clock-icon",onClick:L=>{L.stopPropagation(),!u&&ee()},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 ${f?"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:F.map(L=>jsxRuntimeExports.jsx("div",{className:`time-item ${L===g?"selected":""}`,onClick:()=>te("hours",L),children:L},L))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Minutes"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:B.map(L=>jsxRuntimeExports.jsx("div",{className:`time-item ${L===E?"selected":""}`,onClick:()=>te("minutes",L),children:L},L))})]}),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(L=>jsxRuntimeExports.jsx("div",{className:`period-item ${L===b?"selected":""}`,onClick:()=>te("period",L),children:L},L))})]})]}),jsxRuntimeExports.jsxs("div",{className:"time-picker-actions",children:[jsxRuntimeExports.jsx("button",{className:"time-picker-button cancel",onClick:K,children:"Cancel"}),jsxRuntimeExports.jsx("button",{className:"time-picker-button ok",onClick:z,children:"OK"})]})]})]})},TransferItem=({label:e,checked:t,onChange:n,disabled:i})=>jsxRuntimeExports.jsx(CECheckBox,{label:e,checked:t,onChange:n,disabled:i}),CETransferButton=({label:e,onClick:t,disabled:n=!1,className:i=""})=>jsxRuntimeExports.jsx("button",{onClick:t,disabled:n,className:`transfer-button ${i}`,children:e}),TransferList=({dataUrl:e,onTransfer:t,containerClass:n="",boxClass:i="",buttonClass:o=""})=>{const[l,u]=React.useState([]),[f,p]=React.useState([]),[m,d]=React.useState(!0),[g,_]=React.useState(null),[E,S]=React.useState(new Set),[b,T]=React.useState(new Set);React.useEffect(()=>{(async()=>{var I,D;try{d(!0),_(null);const B=(await axios.get(e)).data.items||[];u(B.slice(0,Math.ceil(B.length/2))),p(B.slice(Math.ceil(B.length/2)))}catch(F){_(axios.isAxiosError(F)?((D=(I=F.response)==null?void 0:I.data)==null?void 0:D.message)||F.message:"An error occurred")}finally{d(!1)}})()},[]);const C=j=>{if(j==="available"){const I=l.filter(F=>E.has(F.id)).sort((F,B)=>{const X=parseInt(F.id.replace(/\D/g,"")),U=parseInt(B.id.replace(/\D/g,""));return X-U}),D=l.filter(F=>!E.has(F.id));u(D),p(F=>[...F,...I].sort((X,U)=>{const N=parseInt(X.id.replace(/\D/g,"")),G=parseInt(U.id.replace(/\D/g,""));return N-G})),S(new Set)}else{const I=f.filter(F=>b.has(F.id)).sort((F,B)=>{const X=parseInt(F.id.replace(/\D/g,"")),U=parseInt(B.id.replace(/\D/g,""));return X-U}),D=f.filter(F=>!b.has(F.id));p(D),u(F=>[...F,...I].sort((X,U)=>{const N=parseInt(X.id.replace(/\D/g,"")),G=parseInt(U.id.replace(/\D/g,""));return N-G})),T(new Set)}t(f,l)},A=(j,I,D)=>{D(F=>{const B=new Set(F);return B.has(j)?B.delete(j):B.add(j),B})},R=(j,I,D)=>F=>{const B=new Set(I),X=j.filter(U=>!U.disabled);F?X.forEach(U=>B.add(U.id)):X.forEach(U=>B.delete(U.id)),D(B)},O=(j,I,D,F)=>{const B=j.filter(ee=>!ee.disabled),X=B.length>0&&B.every(ee=>I.has(ee.id)),U=I.size,N=j.length,G=j.length===0;return jsxRuntimeExports.jsxs("div",{className:`transfer-box ${i}`,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:X,onChange:R(j,I,D),disabled:G})}),jsxRuntimeExports.jsxs("div",{className:"title-section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:F}),jsxRuntimeExports.jsxs("div",{className:"count-text",children:[U,"/",N," selected"]})]})]})}),jsxRuntimeExports.jsx("div",{className:"transfer-items",children:j.map(ee=>jsxRuntimeExports.jsx(TransferItem,{label:ee.label,checked:I.has(ee.id),disabled:ee.disabled,onChange:()=>A(ee.id,I,D)},ee.id))})]})};return m?jsxRuntimeExports.jsx("div",{children:"Loading..."}):g?jsxRuntimeExports.jsxs("div",{children:["Error: ",g]}):jsxRuntimeExports.jsxs("div",{className:`transfer-list-container ${n}`,children:[O(l,E,S,"Choices"),jsxRuntimeExports.jsxs("div",{className:"transfer-buttons",children:[jsxRuntimeExports.jsx(CETransferButton,{label:">>",onClick:()=>C("available"),disabled:E.size===0,className:o}),jsxRuntimeExports.jsx(CETransferButton,{label:"<<",onClick:()=>C("chosen"),disabled:b.size===0,className:o})]}),O(f,b,T,"Chosen")]})},CEBadge=({label:e,backgroundColor:t="#e0e0e0",textColor:n="#000",style:i,id:o,name:l,disable:u=!1})=>jsxRuntimeExports.jsx("span",{id:o,"data-name":l,"aria-disabled":u,style:{backgroundColor:t,color:n,padding:"4px 10px",borderRadius:"12px",fontSize:"12px",display:"inline-block",whiteSpace:"nowrap",...u?{opacity:.6,pointerEvents:"none"}:{},...i},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:n,buttonIcon:i})=>{const[o,l]=React.useState(""),u=()=>{t(o),l("")},f=p=>{p.key==="Enter"&&u()};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:o,onChange:p=>l(p.target.value),onKeyPress:f,placeholder:"Add a note...",className:"add-note-input",rows:3}),jsxRuntimeExports.jsx(CEButton,{label:n,icon:i,variant:"outlinedGreen",onClick:u,sx:{width:"100%",marginTop:"10px"},children:void 0})]}),jsxRuntimeExports.jsx("div",{className:"notes-list",children:e.map(p=>jsxRuntimeExports.jsxs("div",{className:"note-item",children:[jsxRuntimeExports.jsx("div",{className:"note-avatar",children:p.initials}),jsxRuntimeExports.jsxs("div",{className:"note-content",children:[jsxRuntimeExports.jsxs("div",{className:"note-header",children:[jsxRuntimeExports.jsx("span",{className:"note-author",children:p.author}),jsxRuntimeExports.jsx("span",{className:"note-timestamp",children:p.timestamp})]}),jsxRuntimeExports.jsx("div",{className:"note-text",children:p.content})]})]},p.id))})]})},CEStatusDropdown=({options:e,selected:t,onChange:n,placeholder:i="Select status...",size:o="medium",disabled:l=!1,ariaLabel:u="Status selection dropdown",fullButtonAsDropdown:f=!1})=>{const[p,m]=React.useState(!1),d=React.useRef(null),g=e.find(T=>T.value===t),_=T=>{n(T),m(!1)};React.useEffect(()=>{const T=C=>{var A;(A=d.current)!=null&&A.contains(C.target)||m(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const E=T=>{l||(T.key==="Enter"||T.key===" "?(T.preventDefault(),m(!p)):T.key==="Escape"&&m(!1))},S=T=>{if(T!=null&&T.statusType)switch(T.statusType){case"in-progress":return"in-progress";case"declined":return"declined";case"withdrawn":return"withdrawn";default:return""}return""},b=()=>{if(g){const T={};return g.backgroundColor&&(T.backgroundColor=g.backgroundColor),g.textColor&&(T.color=g.textColor),T}return{}};return jsxRuntimeExports.jsxs("div",{className:`status-dropdown-container ${l?"disabled":""} size-${o}`,ref:d,children:[jsxRuntimeExports.jsxs("div",{className:`status-dropdown-trigger ${p?"open":""} ${g?`has-selection ${S(g)}`:""}`,onClick:()=>{l||(f?m(!p):_((g==null?void 0:g.value)||""))},onKeyDown:E,tabIndex:l?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":p?"true":"false","aria-label":u,style:b(),children:[jsxRuntimeExports.jsx("span",{className:"status-text",children:g?g.label:i}),jsxRuntimeExports.jsx("span",{className:"status-dropdown-icon",onClick:T=>{T.stopPropagation(),!l&&m(!p)},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 ${p?"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"})})})]}),p&&!l&&jsxRuntimeExports.jsx("ul",{className:"status-dropdown-options",role:"listbox","aria-label":"Status options",children:e.map(T=>{const C={};return T.backgroundColor&&(C.backgroundColor=T.backgroundColor),T.textColor&&(C.color=T.textColor),jsxRuntimeExports.jsxs("li",{className:`status-dropdown-option ${t===T.value?"selected":""} ${S(T)}`,onClick:()=>_(T.value),role:"option","aria-selected":t===T.value?"true":"false",style:C,children:[jsxRuntimeExports.jsx("span",{className:"option-indicator",children:T.icon?T.icon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[T.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"})]}),T.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"})]}),T.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"})]})]})}),T.label]},T.value)})})]})},CEToggleYesNo=({value:e,onChange:t,label:n,disabled:i=!1})=>jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("div",{className:"label",children:n}),jsxRuntimeExports.jsxs("div",{className:"toggle-group",children:[jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="yes"?"primary":"outlined",className:`toggle-btn ${e==="yes"?"active":""}`,disabled:i,onClick:()=>{i||t("yes")},children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"YES"]}),jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="no"?"primary":"outlined",className:`toggle-btn ${e==="no"?"active":""}`,disabled:i,onClick:()=>{i||t("no")},children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"NO"]})]})]}),days=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CEOperatingDaysSelector=({selectedDays:e,onChange:t})=>{const n=i=>{e.includes(i)?t(e.filter(o=>o!==i)):t([...e,i])};return jsxRuntimeExports.jsx("div",{className:"days-group",children:days.map(i=>jsxRuntimeExports.jsx(CEButton,{size:"small",variant:e.includes(i)?"primary":"outlined",className:`day-btn ${e.includes(i)?"active":""}`,onClick:()=>n(i),children:i},i))})},CERoundTabNav=({tabs:e,activeTab:t,onTabClick:n,tabBarBgColor:i,tabBarItemBgColor:o})=>jsxRuntimeExports.jsx("div",{className:"om-om-radiusTab-bar-nwo",style:{backgroundColor:i||"#6fb744"},children:e.map(l=>jsxRuntimeExports.jsx("div",{className:`om-radiusTab-item-nwo ${l.value===t?"active":""}`,onClick:u=>n(l.value,u),style:{backgroundColor:l.value===t?o||"#ebebf0":""},children:l.label},l.value))}),CEAccordion=({children:e})=>jsxRuntimeExports.jsx("div",{className:"accordion-container",children:e}),CEAccordionItem=({title:e,children:t,initiallyOpen:n=!1})=>{const[i,o]=React.useState(n);return jsxRuntimeExports.jsxs("div",{className:"accordion-item",children:[jsxRuntimeExports.jsxs("button",{className:`accordion-header ${i?"open":""}`,onClick:()=>o(!i),children:[jsxRuntimeExports.jsx("span",{className:"accordion-title",children:e}),jsxRuntimeExports.jsx("span",{className:`accordion-icon ${i?"open":""}`,children:jsxRuntimeExports.jsxs("svg",{width:"21",height:"12",viewBox:"0 0 21 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_20728_2951)",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 1.89L19.094 0.5L10.487 8.761L9.569 7.88L9.574 7.885L1.927 0.545L0.5 1.914L10.487 11.5L20.5 1.89Z",fill:"black"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_20728_2951",children:jsxRuntimeExports.jsx("rect",{width:"11",height:"20",fill:"white",transform:"matrix(0 -1 1 0 0.5 11.5)"})})})]})})]}),i&&jsxRuntimeExports.jsx("div",{className:"accordion-content",children:t})]})},CEToggleSlide=({checked:e,onToggle:t,label:n,disabled:i=!1})=>{const o=()=>{i||t(!e)};return jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("span",{className:"toggle-label",children:n}),jsxRuntimeExports.jsxs("label",{className:`toggle-switch ${i?"disabled":""}`,children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:e,onChange:o,disabled:i,className:"toggle-checkbox"}),jsxRuntimeExports.jsx("span",{className:"toggle-slider"})]})]})};var DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React.createContext&&React.createContext(DefaultContext),_excluded$n=["attr","size","title"];function _objectWithoutProperties$n(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose$n(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose$n(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function _extends$t(){return _extends$t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$t.apply(this,arguments)}function ownKeys$C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$C(Object(n),!0).forEach(function(i){_defineProperty$E(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$C(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$E(e,t,n){return t=_toPropertyKey$E(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$E(e){var t=_toPrimitive$E(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$E(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tree2Element(e){return e&&e.map((t,n)=>React.createElement(t.tag,_objectSpread$C({key:n},t.attr),Tree2Element(t.child)))}function GenIcon(e){return t=>React.createElement(IconBase,_extends$t({attr:_objectSpread$C({},e.attr)},t),Tree2Element(e.child))}function IconBase(e){var t=n=>{var{attr:i,size:o,title:l}=e,u=_objectWithoutProperties$n(e,_excluded$n),f=o||n.size||"1em",p;return n.className&&(p=n.className),e.className&&(p=(p?p+" ":"")+e.className),React.createElement("svg",_extends$t({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,u,{className:p,style:_objectSpread$C(_objectSpread$C({color:e.color||n.color},n.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&React.createElement("title",null,l),e.children)};return IconContext!==void 0?React.createElement(IconContext.Consumer,null,n=>t(n)):t(DefaultContext)}function FaSearch(e){return GenIcon({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function MdKeyboardArrowDown(e){return GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(e)}const CEAdvancedMultiSelectDropdown=({options:e,onSelectItem:t,onChange:n,placeholder:i="Search customers...",allowSearch:o=!0,width:l="100%",inputHeight:u="3rem",dropdownMaxHeight:f="20rem",id:p,name:m,disabled:d=!1})=>{const[g,_]=React.useState(!1),[E,S]=React.useState(""),[b,T]=React.useState([]),C=React.useRef(null);React.useEffect(()=>{n&&n(b)},[b,n]);const A=e.filter(R=>{var O;return R.label.toLowerCase().includes(E.toLowerCase())||((O=R.subtitle)==null?void 0:O.toLowerCase().includes(E.toLowerCase()))});return React.useEffect(()=>{const R=O=>{var j;(j=C.current)!=null&&j.contains(O.target)||_(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]),jsxRuntimeExports.jsxs("div",{className:`dropdown-container ${d?"disabled":""}`,ref:C,style:{width:l},children:[jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${g?"open":""} ${d?"disabled":""}`,style:{minHeight:u},children:[jsxRuntimeExports.jsx(FaSearch,{className:"search-icon"}),jsxRuntimeExports.jsxs("div",{className:"selected-chips",onClick:()=>!d&&_(!0),children:[b.length===0&&jsxRuntimeExports.jsx("input",{type:"text",className:"search-input",id:p,name:m,placeholder:i,value:E,onChange:R=>{d||(S(R.target.value),g||_(!0))},onClick:R=>{d||(R.stopPropagation(),_(!0))},disabled:d,style:{height:u}}),b.map(R=>jsxRuntimeExports.jsxs("div",{className:"selected-item-inline",children:[jsxRuntimeExports.jsx("span",{className:"selected-item-label",children:R.label}),jsxRuntimeExports.jsx("button",{type:"button",className:"selected-item-remove",onClick:O=>{d||(O.stopPropagation(),T(j=>j.filter(I=>I.value!==R.value)))},disabled:d,"aria-label":`Remove ${R.label}`,children:"×"})]},R.value))]}),jsxRuntimeExports.jsx(MdKeyboardArrowDown,{className:`dropdown-arrow ${g?"rotated":""}`,onClick:R=>{d||(R.stopPropagation(),_(O=>!O))}})]}),g&&jsxRuntimeExports.jsx("div",{className:"dropdown-options",style:{maxHeight:f},children:jsxRuntimeExports.jsx("ul",{className:"dropdown-list",children:A.length>0?A.map(R=>{const O=b.some(j=>j.value===R.value);return jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${O?"selected":""}`,onClick:j=>{d||(j.stopPropagation(),T(I=>{const D=I.some(B=>B.value===R.value);let F;return D?F=I.filter(B=>B.value!==R.value):F=[...I,R],F}),S(""),t(R),_(!1))},children:[jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("div",{className:"option-line-1",children:R.label}),R.subtitle&&jsxRuntimeExports.jsx("div",{className:"option-line-2",children:R.subtitle})]}),R.icon&&jsxRuntimeExports.jsx("div",{className:"option-icon",children:R.icon})]},R.value)}):jsxRuntimeExports.jsx("li",{className:"dropdown-option no-results",children:"No results found"})})})]})},AutoCompleteInput=({label:e,options:t,value:n,onChange:i,multiple:o=!0,showCheckboxes:l=!0,required:u=!1,disabled:f=!1})=>{const[p,m]=React.useState(!1),[d,g]=React.useState(!1),[_,E]=React.useState(""),S=React.useRef(null),b=React.useRef(null),T=t.filter(R=>R.toLowerCase().includes(_.toLowerCase())),C=R=>{if(!f)if(o){const O=n.includes(R);i(O?n.filter(j=>j!==R):[...n,R]),E("")}else i([R]),E(R),m(!1)},A=R=>{b.current&&!b.current.contains(R.target)&&(m(!1),g(!1))};return React.useEffect(()=>(document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)),[]),jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:b,children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper always-float ${d||p?"focused":""} ${n.length>0?"has-value":""} ${f?"disabled":""}`,children:[jsxRuntimeExports.jsxs("label",{className:"autocomplete-label",children:[e,u&&jsxRuntimeExports.jsx("span",{className:"required-asterisk","aria-hidden":"true",children:"*"})]}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[o&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:n.map(R=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[R,jsxRuntimeExports.jsx("button",{onClick:O=>{O.stopPropagation(),f||i(n.filter(j=>j!==R))},disabled:f,children:"×"})]},R))}),jsxRuntimeExports.jsx("input",{ref:S,type:"text",className:"autocomplete-input",value:_,placeholder:o&&n.length>0?"":"Select Status",onChange:R=>!f&&E(R.target.value),onFocus:()=>{f||(g(!0),m(!0))},disabled:f}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onClick:()=>!f&&m(R=>!R),children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M6 9l6 6 6-6"})})})]})]}),p&&jsxRuntimeExports.jsxs("ul",{className:"autocomplete-list",children:[o&&l&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{if(!f){const R=n.length===t.length;i(R?[]:[...t])}},disabled:f}),"Select All"]})}),T.map(R=>jsxRuntimeExports.jsx("li",{onClick:()=>C(R),children:o&&l?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(R),onChange:()=>C(R),onClick:O=>O.stopPropagation()}),R]}):R},R))]})]})},CEAutoCompleteSelect=({label:e,options:t,value:n,onChange:i,placeholderText:o,multiple:l=!1,showCheckboxes:u=!1,id:f,required:p=!1,showSelectionCountOnly:m=!1,disabled:d=!1})=>{const[g,_]=React.useState(!1),[E,S]=React.useState(!1),[b,T]=React.useState(""),C=React.useRef(null),A=React.useRef(null),[R,O]=React.useState(-1),j=React.useRef(null),I=t.filter(N=>{var G;return(G=N.label)==null?void 0:G.toLowerCase().includes(b==null?void 0:b.toLowerCase())});React.useEffect(()=>{if(l)l&&T("");else{const N=B(n[0]);T(N||"")}},[n,l,t]),React.useEffect(()=>{if(!j.current||R<0)return;const N=j.current.children[R];N==null||N.scrollIntoView({block:"nearest"})},[R]);const D=N=>{if(!d)if(l){const G=n.includes(N.value);i(G?n.filter(ee=>ee!==N.value):[...n,N.value]),T("")}else i([N.value]),T(N.label),_(!1)},F=N=>{if(!d)switch(N.key){case"ArrowDown":N.preventDefault(),g?O(G=>G<I.length-1?G+1:0):(_(!0),O(0));break;case"ArrowUp":N.preventDefault(),g?O(G=>G>0?G-1:I.length-1):(_(!0),O(I.length-1));break;case"Enter":N.preventDefault(),g&&R>=0&&I[R]&&D(I[R]);break;case"Escape":_(!1),O(-1);break;case"Tab":_(!1),S(!1),O(-1);break}};React.useEffect(()=>{const N=G=>{A.current&&!A.current.contains(G.target)&&(_(!1),S(!1),O(-1))};return document.addEventListener("mousedown",N),document.addEventListener("click",N),()=>{document.removeEventListener("click",N),document.removeEventListener("mousedown",N)}},[]);const B=N=>{var G;return Array.isArray(t)&&((G=t.find(ee=>ee.value===N||ee.label===N))==null?void 0:G.label)||""},X=N=>{N.stopPropagation(),T(""),i([])},U=n.length>0||b.trim().length>0;return jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:A,id:f,"data-testid":f?`ce-autocomplete-${f}`:"ce-autocomplete",children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper always-float ${E||g?"focused":""} ${U?"has-value has-clear":""} ${d?"disabled":""}`,onClick:()=>{var N;d||(_(!0),(N=C.current)==null||N.focus())},children:[jsxRuntimeExports.jsxs("label",{className:"autocomplete-label",children:[e,p&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"})]}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[l&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:m?jsxRuntimeExports.jsxs("span",{className:"selected-summary",children:["Selected + ",n.length]}):n.map(N=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[B(N),jsxRuntimeExports.jsx("button",{onClick:G=>{d||(G.stopPropagation(),i(n.filter(ee=>ee!==N)))},children:"×"})]},N))}),jsxRuntimeExports.jsx("input",{ref:C,type:"text",className:"autocomplete-input",placeholder:l&&n.length>0?"":o,value:b,disabled:d,onChange:N=>{T(N.target.value),g||(_(!0),O(0))},onFocus:()=>{d||(S(!0),_(!0),O(I.length>0?0:-1))},onKeyDown:F}),U&&!d&&jsxRuntimeExports.jsx("span",{className:"clear-icon",onClick:X,title:"Clear",children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onMouseDown:N=>{N.preventDefault(),N.stopPropagation()},onClick:N=>{var G;d||(N.stopPropagation(),_(!0),(G=C.current)==null||G.focus())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M6 9l6 6 6-6"})})})]})]}),g&&jsxRuntimeExports.jsx("ul",{className:"autocomplete-list",ref:j,children:I.length===0?jsxRuntimeExports.jsx("li",{className:"no-results-option",style:{color:"#999",padding:"8px 16px",cursor:"default"},children:"No results found"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[l&&u&&I.length>0&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{const N=n.length===t.length;i(N?[]:t.map(G=>G.value))}}),"Select All"]})}),I.map((N,G)=>jsxRuntimeExports.jsx("li",{onClick:()=>D(N),className:G===R?"comhighlighted":"",onMouseEnter:()=>O(G),children:l&&u?jsxRuntimeExports.jsxs("div",{className:"option-row",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(N.value),readOnly:!0,onClick:ee=>{ee.stopPropagation(),D(N)}}),jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("span",{className:"option-label",children:N.label}),N.subtitle&&jsxRuntimeExports.jsx("span",{className:"option-subtitle",children:N.subtitle})]})]}):jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("span",{className:"option-label",children:N.label}),N.subtitle&&jsxRuntimeExports.jsx("span",{className:"option-subtitle",children:N.subtitle})]})},N.value))]})})]})};var EventKeys=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function isEventKey(e){if(typeof e!="string")return!1;var t=EventKeys;return t.includes(e)}var SVGElementPropKeys=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function isSvgElementPropKey(e){if(typeof e!="string")return!1;var t=SVGElementPropKeys;return t.includes(e)}function isDataAttribute(e){return typeof e=="string"&&e.startsWith("data-")}function svgPropertiesNoEvents(e){var t=Object.entries(e).filter(n=>{var[i]=n;return isSvgElementPropKey(i)||isDataAttribute(i)});return Object.fromEntries(t)}function svgPropertiesNoEventsFromUnknown(e){if(e==null)return null;if(React.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return svgPropertiesNoEvents(t)}return typeof e=="object"&&!Array.isArray(e)?svgPropertiesNoEvents(e):null}function svgPropertiesAndEvents(e){var t=Object.entries(e).filter(n=>{var[i]=n;return isSvgElementPropKey(i)||isDataAttribute(i)||isEventKey(i)});return Object.fromEntries(t)}function svgPropertiesAndEventsFromUnknown(e){return e==null?null:React.isValidElement(e)?svgPropertiesAndEvents(e.props):typeof e=="object"&&!Array.isArray(e)?svgPropertiesAndEvents(e):null}var _excluded$m=["children","width","height","viewBox","className","style","title","desc"];function _extends$s(){return _extends$s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$s.apply(null,arguments)}function _objectWithoutProperties$m(e,t){if(e==null)return{};var n,i,o=_objectWithoutPropertiesLoose$m(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose$m(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}var Surface=React.forwardRef((e,t)=>{var{children:n,width:i,height:o,viewBox:l,className:u,style:f,title:p,desc:m}=e,d=_objectWithoutProperties$m(e,_excluded$m),g=l||{width:i,height:o,x:0,y:0},_=clsx("recharts-surface",u);return React__namespace.createElement("svg",_extends$s({},svgPropertiesAndEvents(d),{className:_,width:i,height:o,style:f,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),React__namespace.createElement("title",null,p),React__namespace.createElement("desc",null,m),n)}),_excluded$l=["children","className"];function _extends$r(){return _extends$r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$r.apply(null,arguments)}function _objectWithoutProperties$l(e,t){if(e==null)return{};var n,i,o=_objectWithoutPropertiesLoose$l(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose$l(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}var Layer=React__namespace.forwardRef((e,t)=>{var{children:n,className:i}=e,o=_objectWithoutProperties$l(e,_excluded$l),l=clsx("recharts-layer",i);return React__namespace.createElement("g",_extends$r({className:l},svgPropertiesAndEvents(o),{ref:t}),n)}),LegendPortalContext=React.createContext(null),useLegendPortal=()=>React.useContext(LegendPortalContext);function constant$1(e){return function(){return e}}const cos=Math.cos,sin=Math.sin,sqrt$1=Math.sqrt,pi$1=Math.PI,tau$1=2*pi$1,pi=Math.PI,tau=2*pi,epsilon=1e-6,tauEpsilon=tau-epsilon;function append(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function appendRound(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return append;const n=10**t;return function(i){this._+=i[0];for(let o=1,l=i.length;o<l;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}class Path{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?append:appendRound(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,o){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,n,i,o,l,u){this._append`C${+t},${+n},${+i},${+o},${this._x1=+l},${this._y1=+u}`}arcTo(t,n,i,o,l){if(t=+t,n=+n,i=+i,o=+o,l=+l,l<0)throw new Error(`negative radius: ${l}`);let u=this._x1,f=this._y1,p=i-t,m=o-n,d=u-t,g=f-n,_=d*d+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(_>epsilon)if(!(Math.abs(g*p-m*d)>epsilon)||!l)this._append`L${this._x1=t},${this._y1=n}`;else{let E=i-u,S=o-f,b=p*p+m*m,T=E*E+S*S,C=Math.sqrt(b),A=Math.sqrt(_),R=l*Math.tan((pi-Math.acos((b+_-T)/(2*C*A)))/2),O=R/A,j=R/C;Math.abs(O-1)>epsilon&&this._append`L${t+O*d},${n+O*g}`,this._append`A${l},${l},0,0,${+(g*E>d*S)},${this._x1=t+j*p},${this._y1=n+j*m}`}}arc(t,n,i,o,l,u){if(t=+t,n=+n,i=+i,u=!!u,i<0)throw new Error(`negative radius: ${i}`);let f=i*Math.cos(o),p=i*Math.sin(o),m=t+f,d=n+p,g=1^u,_=u?o-l:l-o;this._x1===null?this._append`M${m},${d}`:(Math.abs(this._x1-m)>epsilon||Math.abs(this._y1-d)>epsilon)&&this._append`L${m},${d}`,i&&(_<0&&(_=_%tau+tau),_>tauEpsilon?this._append`A${i},${i},0,1,${g},${t-f},${n-p}A${i},${i},0,1,${g},${this._x1=m},${this._y1=d}`:_>epsilon&&this._append`A${i},${i},0,${+(_>=pi)},${g},${this._x1=t+i*Math.cos(l)},${this._y1=n+i*Math.sin(l)}`)}rect(t,n,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function withPath(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new Path(t)}function array(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Linear(e){this._context=e}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function curveLinear(e){return new Linear(e)}function x(e){return e[0]}function y(e){return e[1]}function shapeLine(e,t){var n=constant$1(!0),i=null,o=curveLinear,l=null,u=withPath(f);e=typeof e=="function"?e:e===void 0?x:constant$1(e),t=typeof t=="function"?t:t===void 0?y:constant$1(t);function f(p){var m,d=(p=array(p)).length,g,_=!1,E;for(i==null&&(l=o(E=u())),m=0;m<=d;++m)!(m<d&&n(g=p[m],m,p))===_&&((_=!_)?l.lineStart():l.lineEnd()),_&&l.point(+e(g,m,p),+t(g,m,p));if(E)return l=null,E+""||null}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:constant$1(+p),f):e},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:constant$1(+p),f):t},f.defined=function(p){return arguments.length?(n=typeof p=="function"?p:constant$1(!!p),f):n},f.curve=function(p){return arguments.length?(o=p,i!=null&&(l=o(i)),f):o},f.context=function(p){return arguments.length?(p==null?i=l=null:l=o(i=p),f):i},f}function shapeArea(e,t,n){var i=null,o=constant$1(!0),l=null,u=curveLinear,f=null,p=withPath(m);e=typeof e=="function"?e:e===void 0?x:constant$1(+e),t=typeof t=="function"?t:constant$1(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?y:constant$1(+n);function m(g){var _,E,S,b=(g=array(g)).length,T,C=!1,A,R=new Array(b),O=new Array(b);for(l==null&&(f=u(A=p())),_=0;_<=b;++_){if(!(_<b&&o(T=g[_],_,g))===C)if(C=!C)E=_,f.areaStart(),f.lineStart();else{for(f.lineEnd(),f.lineStart(),S=_-1;S>=E;--S)f.point(R[S],O[S]);f.lineEnd(),f.areaEnd()}C&&(R[_]=+e(T,_,g),O[_]=+t(T,_,g),f.point(i?+i(T,_,g):R[_],n?+n(T,_,g):O[_]))}if(A)return f=null,A+""||null}function d(){return shapeLine().defined(o).curve(u).context(l)}return m.x=function(g){return arguments.length?(e=typeof g=="function"?g:constant$1(+g),i=null,m):e},m.x0=function(g){return arguments.length?(e=typeof g=="function"?g:constant$1(+g),m):e},m.x1=function(g){return arguments.length?(i=g==null?null:typeof g=="function"?g:constant$1(+g),m):i},m.y=function(g){return arguments.length?(t=typeof g=="function"?g:constant$1(+g),n=null,m):t},m.y0=function(g){return arguments.length?(t=typeof g=="function"?g:constant$1(+g),m):t},m.y1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:constant$1(+g),m):n},m.lineX0=m.lineY0=function(){return d().x(e).y(t)},m.lineY1=function(){return d().x(e).y(n)},m.lineX1=function(){return d().x(i).y(t)},m.defined=function(g){return arguments.length?(o=typeof g=="function"?g:constant$1(!!g),m):o},m.curve=function(g){return arguments.length?(u=g,l!=null&&(f=u(l)),m):u},m.context=function(g){return arguments.length?(g==null?l=f=null:f=u(l=g),m):l},m}class Bump{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function bumpX(e){return new Bump(e,!0)}function bumpY(e){return new Bump(e,!1)}const symbolCircle={draw(e,t){const n=sqrt$1(t/pi$1);e.moveTo(n,0),e.arc(0,0,n,0,tau$1)}},symbolCross={draw(e,t){const n=sqrt$1(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},tan30=sqrt$1(1/3),tan30_2=tan30*2,symbolDiamond={draw(e,t){const n=sqrt$1(t/tan30_2),i=n*tan30;e.moveTo(0,-n),e.lineTo(i,0),e.lineTo(0,n),e.lineTo(-i,0),e.closePath()}},symbolSquare={draw(e,t){const n=sqrt$1(t),i=-n/2;e.rect(i,i,n,n)}},ka=.8908130915292852,kr=sin(pi$1/10)/sin(7*pi$1/10),kx=sin(tau$1/10)*kr,ky=-cos(tau$1/10)*kr,symbolStar={draw(e,t){const n=sqrt$1(t*ka),i=kx*n,o=ky*n;e.moveTo(0,-n),e.lineTo(i,o);for(let l=1;l<5;++l){const u=tau$1*l/5,f=cos(u),p=sin(u);e.lineTo(p*n,-f*n),e.lineTo(f*i-p*o,p*i+f*o)}e.closePath()}},sqrt3=sqrt$1(3),symbolTriangle={draw(e,t){const n=-sqrt$1(t/(sqrt3*3));e.moveTo(0,n*2),e.lineTo(-sqrt3*n,-n),e.lineTo(sqrt3*n,-n),e.closePath()}},c=-.5,s=sqrt$1(3)/2,k=1/sqrt$1(12),a=(k/2+1)*3,symbolWye={draw(e,t){const n=sqrt$1(t/a),i=n/2,o=n*k,l=i,u=n*k+n,f=-l,p=u;e.moveTo(i,o),e.lineTo(l,u),e.lineTo(f,p),e.lineTo(c*i-s*o,s*i+c*o),e.lineTo(c*l-s*u,s*l+c*u),e.lineTo(c*f-s*p,s*f+c*p),e.lineTo(c*i+s*o,c*o-s*i),e.lineTo(c*l+s*u,c*u-s*l),e.lineTo(c*f+s*p,c*p-s*f),e.closePath()}};function Symbol$1(e,t){let n=null,i=withPath(o);e=typeof e=="function"?e:constant$1(e||symbolCircle),t=typeof t=="function"?t:constant$1(t===void 0?64:+t);function o(){let l;if(n||(n=l=i()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),l)return n=null,l+""||null}return o.type=function(l){return arguments.length?(e=typeof l=="function"?l:constant$1(l),o):e},o.size=function(l){return arguments.length?(t=typeof l=="function"?l:constant$1(+l),o):t},o.context=function(l){return arguments.length?(n=l??null,o):n},o}function noop$5(){}function point$2(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Basis(e){this._context=e}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$2(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$2(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasis(e){return new Basis(e)}function BasisClosed(e){this._context=e}BasisClosed.prototype={areaStart:noop$5,areaEnd:noop$5,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:point$2(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasisClosed(e){return new BasisClosed(e)}function BasisOpen(e){this._context=e}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:point$2(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasisOpen(e){return new BasisOpen(e)}function LinearClosed(e){this._context=e}LinearClosed.prototype={areaStart:noop$5,areaEnd:noop$5,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function curveLinearClosed(e){return new LinearClosed(e)}function sign(e){return e<0?-1:1}function slope3(e,t,n){var i=e._x1-e._x0,o=t-e._x1,l=(e._y1-e._y0)/(i||o<0&&-0),u=(n-e._y1)/(o||i<0&&-0),f=(l*o+u*i)/(i+o);return(sign(l)+sign(u))*Math.min(Math.abs(l),Math.abs(u),.5*Math.abs(f))||0}function slope2(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function point$1(e,t,n){var i=e._x0,o=e._y0,l=e._x1,u=e._y1,f=(l-i)/3;e._context.bezierCurveTo(i+f,o+f*t,l-f,u-f*n,l,u)}function MonotoneX(e){this._context=e}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,n=slope3(this,e,t)),n);break;default:point$1(this,this._t0,n=slope3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function MonotoneY(e){this._context=new ReflectContext(e)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(e,t){MonotoneX.prototype.point.call(this,t,e)};function ReflectContext(e){this._context=e}ReflectContext.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,o,l){this._context.bezierCurveTo(t,e,i,n,l,o)}};function monotoneX(e){return new MonotoneX(e)}function monotoneY(e){return new MonotoneY(e)}function Natural(e){this._context=e}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var i=controlPoints(e),o=controlPoints(t),l=0,u=1;u<n;++l,++u)this._context.bezierCurveTo(i[0][l],o[0][l],i[1][l],o[1][l],e[u],t[u]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function controlPoints(e){var t,n=e.length-1,i,o=new Array(n),l=new Array(n),u=new Array(n);for(o[0]=0,l[0]=2,u[0]=e[0]+2*e[1],t=1;t<n-1;++t)o[t]=1,l[t]=4,u[t]=4*e[t]+2*e[t+1];for(o[n-1]=2,l[n-1]=7,u[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)i=o[t]/l[t-1],l[t]-=i,u[t]-=i*u[t-1];for(o[n-1]=u[n-1]/l[n-1],t=n-2;t>=0;--t)o[t]=(u[t]-o[t+1])/l[t];for(l[n-1]=(e[n]+o[n-1])/2,t=0;t<n-1;++t)l[t]=2*e[t+1]-o[t+1];return[o,l]}function curveNatural(e){return new Natural(e)}function Step(e,t){this._context=e,this._t=t}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function curveStep(e){return new Step(e,.5)}function stepBefore(e){return new Step(e,0)}function stepAfter(e){return new Step(e,1)}function stackOffsetNone(e,t){if((u=e.length)>1)for(var n=1,i,o,l=e[t[0]],u,f=l.length;n<u;++n)for(o=l,l=e[t[n]],i=0;i<f;++i)l[i][1]+=l[i][0]=isNaN(o[i][1])?o[i][0]:o[i][1]}function stackOrderNone(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function stackValue(e,t){return e[t]}function stackSeries(e){const t=[];return t.key=e,t}function shapeStack(){var e=constant$1([]),t=stackOrderNone,n=stackOffsetNone,i=stackValue;function o(l){var u=Array.from(e.apply(this,arguments),stackSeries),f,p=u.length,m=-1,d;for(const g of l)for(f=0,++m;f<p;++f)(u[f][m]=[0,+i(g,u[f].key,m,l)]).data=g;for(f=0,d=array(t(u));f<p;++f)u[d[f]].index=f;return n(u,d),u}return o.keys=function(l){return arguments.length?(e=typeof l=="function"?l:constant$1(Array.from(l)),o):e},o.value=function(l){return arguments.length?(i=typeof l=="function"?l:constant$1(+l),o):i},o.order=function(l){return arguments.length?(t=l==null?stackOrderNone:typeof l=="function"?l:constant$1(Array.from(l)),o):t},o.offset=function(l){return arguments.length?(n=l??stackOffsetNone,o):n},o}function stackOffsetExpand(e,t){if((i=e.length)>0){for(var n,i,o=0,l=e[0].length,u;o<l;++o){for(u=n=0;n<i;++n)u+=e[n][o][1]||0;if(u)for(n=0;n<i;++n)e[n][o][1]/=u}stackOffsetNone(e,t)}}function stackOffsetSilhouette(e,t){if((o=e.length)>0){for(var n=0,i=e[t[0]],o,l=i.length;n<l;++n){for(var u=0,f=0;u<o;++u)f+=e[u][n][1]||0;i[n][1]+=i[n][0]=-f/2}stackOffsetNone(e,t)}}function stackOffsetWiggle(e,t){if(!(!((u=e.length)>0)||!((l=(o=e[t[0]]).length)>0))){for(var n=0,i=1,o,l,u;i<l;++i){for(var f=0,p=0,m=0;f<u;++f){for(var d=e[t[f]],g=d[i][1]||0,_=d[i-1][1]||0,E=(g-_)/2,S=0;S<f;++S){var b=e[t[S]],T=b[i][1]||0,C=b[i-1][1]||0;E+=T-C}p+=g,m+=E*g}o[i-1][1]+=o[i-1][0]=n,p&&(n-=m/p)}o[i-1][1]+=o[i-1][0]=n,stackOffsetNone(e,t)}}var get$2={},isUnsafeProperty={},hasRequiredIsUnsafeProperty;function requireIsUnsafeProperty(){return hasRequiredIsUnsafeProperty||(hasRequiredIsUnsafeProperty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(isUnsafeProperty)),isUnsafeProperty}var isDeepKey={},hasRequiredIsDeepKey;function requireIsDeepKey(){return hasRequiredIsDeepKey||(hasRequiredIsDeepKey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(isDeepKey)),isDeepKey}var toKey={},hasRequiredToKey;function requireToKey(){return hasRequiredToKey||(hasRequiredToKey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var i;return typeof n=="string"||typeof n=="symbol"?n:Object.is((i=n==null?void 0:n.valueOf)==null?void 0:i.call(n),-0)?"-0":String(n)}e.toKey=t})(toKey)),toKey}var toPath={},toString$1={},hasRequiredToString;function requireToString(){return hasRequiredToString||(hasRequiredToString=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const i=String(n);return i==="0"&&Object.is(Number(n),-0)?"-0":i}e.toString=t})(toString$1)),toString$1}var hasRequiredToPath;function requireToPath(){return hasRequiredToPath||(hasRequiredToPath=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireToString(),n=requireToKey();function i(o){if(Array.isArray(o))return o.map(n.toKey);if(typeof o=="symbol")return[o];o=t.toString(o);const l=[],u=o.length;if(u===0)return l;let f=0,p="",m="",d=!1;for(o.charCodeAt(0)===46&&(l.push(""),f++);f<u;){const g=o[f];m?g==="\\"&&f+1<u?(f++,p+=o[f]):g===m?m="":p+=g:d?g==='"'||g==="'"?m=g:g==="]"?(d=!1,l.push(p),p=""):p+=g:g==="["?(d=!0,p&&(l.push(p),p="")):g==="."?p&&(l.push(p),p=""):p+=g,f++}return p&&l.push(p),l}e.toPath=i})(toPath)),toPath}var hasRequiredGet$1;function requireGet$1(){return hasRequiredGet$1||(hasRequiredGet$1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsUnsafeProperty(),n=requireIsDeepKey(),i=requireToKey(),o=requireToPath();function l(f,p,m){if(f==null)return m;switch(typeof p){case"string":{if(t.isUnsafeProperty(p))return m;const d=f[p];return d===void 0?n.isDeepKey(p)?l(f,o.toPath(p),m):m:d}case"number":case"symbol":{typeof p=="number"&&(p=i.toKey(p));const d=f[p];return d===void 0?m:d}default:{if(Array.isArray(p))return u(f,p,m);if(Object.is(p==null?void 0:p.valueOf(),-0)?p="-0":p=String(p),t.isUnsafeProperty(p))return m;const d=f[p];return d===void 0?m:d}}}function u(f,p,m){if(p.length===0)return m;let d=f;for(let g=0;g<p.length;g++){if(d==null||t.isUnsafeProperty(p[g]))return m;d=d[p[g]]}return d===void 0?m:d}e.get=l})(get$2)),get$2}var get$1,hasRequiredGet;function requireGet(){return hasRequiredGet||(hasRequiredGet=1,get$1=requireGet$1().get),get$1}var getExports=requireGet();const get=getDefaultExportFromCjs(getExports);var mathSign=e=>e===0?0:e>0?1:-1,isNan=e=>typeof e=="number"&&e!=+e,isPercent=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,isNumber=e=>(typeof e=="number"||e instanceof Number)&&!isNan(e),isNumOrStr=e=>isNumber(e)||typeof e=="string",idCounter=0,uniqueId=e=>{var t=++idCounter;return"".concat(e||"").concat(t)},getPercentValue=function e(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!isNumber(t)&&typeof t!="string")return i;var l;if(isPercent(t)){if(n==null)return i;var u=t.indexOf("%");l=n*parseFloat(t.slice(0,u))/100}else l=+t;return isNan(l)&&(l=i),o&&n!=null&&l>n&&(l=n),l},hasDuplicate=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},i=0;i<t;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1};function interpolate$1(e,t,n){return isNumber(e)&&isNumber(t)?e+n*(t-e):t}function findEntryInArray(e,t,n){if(!(!e||!e.length))return e.find(i=>i&&(typeof t=="function"?t(i):get(i,t))===n)}var isNullish=e=>e===null||typeof e>"u",upperFirst=e=>isNullish(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),_excluded$k=["type","size","sizeType"];function _extends$q(){return _extends$q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$q.apply(null,arguments)}function ownKeys$B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$B(Object(n),!0).forEach(function(i){_defineProperty$D(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$B(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$D(e,t,n){return(t=_toPropertyKey$D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$D(e){var t=_toPrimitive$D(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$D(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _objectWithoutProperties$k(e,t){if(e==null)return{};var n,i,o=_objectWithoutPropertiesLoose$k(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose$k(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}var symbolFactories={symbolCircle,symbolCross,symbolDiamond,symbolSquare,symbolStar,symbolTriangle,symbolWye},RADIAN$1=Math.PI/180,getSymbolFactory=e=>{var t="symbol".concat(upperFirst(e));return symbolFactories[t]||symbolCircle},calculateAreaSize=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*RADIAN$1;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.tan(i)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},registerSymbol=(e,t)=>{symbolFactories["symbol".concat(upperFirst(e))]=t},Symbols=e=>{var{type:t="circle",size:n=64,sizeType:i="area"}=e,o=_objectWithoutProperties$k(e,_excluded$k),l=_objectSpread$B(_objectSpread$B({},o),{},{type:t,size:n,sizeType:i}),u="circle";typeof t=="string"&&(u=t);var f=()=>{var _=getSymbolFactory(u),E=Symbol$1().type(_).size(calculateAreaSize(n,i,u)),S=E();if(S!==null)return S},{className:p,cx:m,cy:d}=l,g=svgPropertiesAndEvents(l);return m===+m&&d===+d&&n===+n?React__namespace.createElement("path",_extends$q({},g,{className:clsx("recharts-symbols",p),transform:"translate(".concat(m,", ").concat(d,")"),d:f()})):null};Symbols.registerSymbol=registerSymbol;var adaptEventHandlers=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(React.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var i={};return Object.keys(n).forEach(o=>{isEventKey(o)&&(i[o]=(l=>n[o](n,l)))}),i},getEventHandlerOfChild=(e,t,n)=>i=>(e(t,n,i),null),adaptEventsOfChild=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var i=null;return Object.keys(e).forEach(o=>{var l=e[o];isEventKey(o)&&typeof l=="function"&&(i||(i={}),i[o]=getEventHandlerOfChild(l,t,n))}),i};function _extends$p(){return _extends$p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$p.apply(null,arguments)}function ownKeys$A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$A(Object(n),!0).forEach(function(i){_defineProperty$C(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$A(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$C(e,t,n){return(t=_toPropertyKey$C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$C(e){var t=_toPrimitive$C(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$C(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SIZE=32;class DefaultLegendContent extends React.PureComponent{renderIcon(t,n){var{inactiveColor:i}=this.props,o=SIZE/2,l=SIZE/6,u=SIZE/3,f=t.inactive?i:t.color,p=n??t.type;if(p==="none")return null;if(p==="plainline")return React__namespace.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:o,x2:SIZE,y2:o,className:"recharts-legend-icon"});if(p==="line")return React__namespace.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(u,`
|
|
347
|
+
`;var n=sheet_to_csv(e,t);return n}function sheet_to_formulae(e){var t="",n,i="";if(e==null||e["!ref"]==null)return[];var o=safe_decode_range(e["!ref"]),l="",u=[],f,p=[],m=Array.isArray(e);for(f=o.s.c;f<=o.e.c;++f)u[f]=encode_col(f);for(var d=o.s.r;d<=o.e.r;++d)for(l=encode_row(d),f=o.s.c;f<=o.e.c;++f)if(t=u[f]+l,n=m?(e[d]||[])[f]:e[t],i="",n!==void 0){if(n.F!=null){if(t=n.F,!n.f)continue;i=n.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(n.f!=null)i=n.f;else{if(n.t=="z")continue;if(n.t=="n"&&n.v!=null)i=""+n.v;else if(n.t=="b")i=n.v?"TRUE":"FALSE";else if(n.w!==void 0)i="'"+n.w;else{if(n.v===void 0)continue;n.t=="s"?i="'"+n.v:i=""+n.v}}p[p.length]=t+"="+i}return p}function sheet_add_json(e,t,n){var i=n||{},o=+!i.skipHeader,l=e||{},u=0,f=0;if(l&&i.origin!=null)if(typeof i.origin=="number")u=i.origin;else{var p=typeof i.origin=="string"?decode_cell(i.origin):i.origin;u=p.r,f=p.c}var m,d={s:{c:0,r:0},e:{c:f,r:u+t.length-1+o}};if(l["!ref"]){var g=safe_decode_range(l["!ref"]);d.e.c=Math.max(d.e.c,g.e.c),d.e.r=Math.max(d.e.r,g.e.r),u==-1&&(u=g.e.r+1,d.e.r=u+t.length-1+o)}else u==-1&&(u=0,d.e.r=t.length-1+o);var _=i.header||[],E=0;t.forEach(function(b,T){keys(b).forEach(function(C){(E=_.indexOf(C))==-1&&(_[E=_.length]=C);var A=b[C],R="z",O="",j=encode_cell({c:f+E,r:u+T+o});m=ws_get_cell_stub(l,j),A&&typeof A=="object"&&!(A instanceof Date)?l[j]=A:(typeof A=="number"?R="n":typeof A=="boolean"?R="b":typeof A=="string"?R="s":A instanceof Date?(R="d",i.cellDates||(R="n",A=datenum(A)),O=i.dateNF||table_fmt[14]):A===null&&i.nullError&&(R="e",A=0),m?(m.t=R,m.v=A,delete m.w,delete m.R,O&&(m.z=O)):l[j]=m={t:R,v:A},O&&(m.z=O))})}),d.e.c=Math.max(d.e.c,f+_.length-1);var S=encode_row(u);if(o)for(E=0;E<_.length;++E)l[encode_col(E+f)+S]={t:"s",v:_[E]};return l["!ref"]=encode_range(d),l}function json_to_sheet(e,t){return sheet_add_json(null,e,t)}function ws_get_cell_stub(e,t,n){if(typeof t=="string"){if(Array.isArray(e)){var i=decode_cell(t);return e[i.r]||(e[i.r]=[]),e[i.r][i.c]||(e[i.r][i.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:n||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 n=e.SheetNames.indexOf(t);if(n>-1)return n;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,n,i){var o=1;if(!n)for(;o<=65535&&e.SheetNames.indexOf(n="Sheet"+o)!=-1;++o,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(i&&e.SheetNames.indexOf(n)>=0){var l=n.match(/(^.*?)(\d+)$/);o=l&&+l[2]||0;var u=l&&l[1]||n;for(++o;o<=65535&&e.SheetNames.indexOf(n=u+o)!=-1;++o);}if(check_ws_name(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function book_set_sheet_visibility(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var i=wb_sheet_idx(e,t);switch(e.Workbook.Sheets[i]||(e.Workbook.Sheets[i]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[i].Hidden=n}function cell_set_number_format(e,t){return e.z=t,e}function cell_set_hyperlink(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}function cell_set_internal_link(e,t,n){return cell_set_hyperlink(e,"#"+t,n)}function cell_add_comment(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})}function sheet_set_array_formula(e,t,n,i){for(var o=typeof t!="string"?t:safe_decode_range(t),l=typeof t=="string"?t:encode_range(t),u=o.s.r;u<=o.e.r;++u)for(var f=o.s.c;f<=o.e.c;++f){var p=ws_get_cell_stub(e,u,f);p.t="n",p.F=l,delete p.v,u==o.s.r&&f==o.s.c&&(p.f=n,i&&(p.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 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((n,i)=>jsxRuntimeExports.jsx("th",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-header"})},i))})}),jsxRuntimeExports.jsx("tbody",{children:Array.from({length:t}).map((n,i)=>jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((o,l)=>jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-cell"})},l))},i))})]})}),CERadioButton=({label:e,value:t,checked:n,onChange:i,id:o,name:l,disabled:u=!1})=>jsxRuntimeExports.jsxs("label",{className:"radio-button",style:{margin:"0.5rem 0"},children:[jsxRuntimeExports.jsx("input",{type:"radio",id:o,name:l,value:t,checked:n,onChange:()=>i(t),style:{marginRight:e?"0.5rem":0},disabled:u}),e&&jsxRuntimeExports.jsx("span",{children:e})]}),CETruncatedTextWithTooltip=({text:e})=>{const[t,n]=React.useState(!1),[i,o]=React.useState({top:0,left:0}),l=React.useRef(null),[u,f]=React.useState(!1);React.useEffect(()=>{l.current&&f(l.current.scrollWidth>l.current.clientWidth)},[e]);const p=()=>{if(!l.current)return;const d=l.current.getBoundingClientRect(),g=300,_=100;let E=d.bottom+window.scrollY,S=d.left+window.scrollX;const b=window.innerWidth,T=window.innerHeight;S+g>b&&(S=b-g-8),d.bottom+_>T&&(E=d.top+window.scrollY-_-8),o({top:E,left:S}),n(!0)},m=()=>n(!1);return jsxRuntimeExports.jsxs("span",{className:"truncated-text-with-tooltip",ref:l,onMouseEnter:p,onMouseLeave:m,children:[e,u&&t&&ReactDOM.createPortal(jsxRuntimeExports.jsx("div",{className:"truncated-text-tooltip global-tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:e}),document.body)]})},DatePickerCell=({row:e,colId:t})=>{var u;const n=f=>{if(!f)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(f))return f;if(f.includes("/")){const d=f.split("/").map(g=>g.trim());if(d.length>=3){const g=d[0].padStart(2,"0").slice(0,2),_=d[1].padStart(2,"0").slice(0,2),S=d[2].replace(/\D/g,"").slice(0,4);return S.length!==4?"":`${S}-${g}-${_}`}}const p=f.replace(/\D/g,"");if(p.length===8){const d=p.slice(0,4),g=p.slice(4,6),_=p.slice(6,8);if(+g>=1&&+g<=12)return`${d}-${g}-${_}`;const E=p.slice(0,2),S=p.slice(2,4);return`${p.slice(4,8)}-${E}-${S}`}const m=new Date(f);if(!isNaN(m.getTime())){const d=m.getFullYear().toString().slice(0,4).padStart(4,"0"),g=(m.getMonth()+1).toString().padStart(2,"0"),_=m.getDate().toString().padStart(2,"0");return`${d}-${g}-${_}`}return""},[i,o]=React.useState(((u=e[t])==null?void 0:u.value)||"");React.useEffect(()=>{var f;o(n(((f=e[t])==null?void 0:f.value)||""))},[e,t]);const l=f=>{var m;const p=n(f.target.value);o(p),(m=e[t])==null||m.onchange(p)};return jsxRuntimeExports.jsx("div",{style:{minWidth:"120px"},children:jsxRuntimeExports.jsx("input",{type:"date",value:i,onChange:f=>l(f)})})},AddNewRowCell=({row:e,column:t,colId:n})=>{var p,m,d,g,_,E,S,b,T,C,A,R,O,j,I,D,F;const i=(((p=e[n])==null?void 0:p.required)??t.required)||!1,o=!!e[n].error,[l,u]=React.useState(!1),f=t.elementType;return React.useEffect(()=>{u(!(o||i))},[o,i,t.required]),jsxRuntimeExports.jsx("div",{children:o&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-content",onClick:()=>u(!0),role:"button",tabIndex:0,title:((m=e[n])==null?void 0:m.tooltip)||"","aria-label":((d=e[n])==null?void 0:d.tooltip)||"",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:(g=e[n])==null?void 0:g.value}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#d32f2f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-circle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})]},e.id):i&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-warning",onClick:()=>u(!0),role:"button",tabIndex:0,title:((_=e[n])==null?void 0:_.tooltip)||"This field is required. Click to enter a value.","aria-label":((E=e[n])==null?void 0:E.tooltip)||"This field is required. Click to enter a value.",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:((S=e[n])==null?void 0:S.value)||"Required"}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#ff9800",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-triangle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),jsxRuntimeExports.jsx("path",{d:"M12 9v4"}),jsxRuntimeExports.jsx("path",{d:"M12 17h.01"})]})]},e.id):l&&(f==="auto-suggest"?jsxRuntimeExports.jsx(CEAdvancedAutoSuggest,{label:"",fetchSuggestions:(b=e[n])==null?void 0:b.fetchOptions,onChange:()=>{},onSelect:B=>{var X,U;return(U=(X=e[n])==null?void 0:X.onselect)==null?void 0:U.call(X,B)},value:((T=e[n])==null?void 0:T.selectedOption)||null}):f==="date-picker"?jsxRuntimeExports.jsx(DatePickerCell,{row:e,colId:n}):f==="text-input"?jsxRuntimeExports.jsx(CEInputBox,{onChange:B=>{var X;return(X=e[n])==null?void 0:X.onchange(B)},value:((C=e[n])==null?void 0:C.value)||"",showError:!1,disabled:((A=e[n])==null?void 0:A.disabled)??!1}):f==="number-input"?jsxRuntimeExports.jsx(CEInputBox,{type:"number",onChange:B=>{var X;return(X=e[n])==null?void 0:X.onchange(B)},value:((R=e[n])==null?void 0:R.value)||"",showError:!1,disabled:((O=e[n])==null?void 0:O.disabled)??!1,decimalScale:((j=e[n])==null?void 0:j.decimalScale)??3}):f==="drop-down-input"?jsxRuntimeExports.jsx(CEDynamicSelectField,{label:"",value:((I=e[n])==null?void 0:I.value)||"",onChange:B=>{var X;(X=e[n])==null||X.onchange(B.target.value)},options:((D=e[n])==null?void 0:D.options)||[],showPlaceholder:!0,placeholderText:""}):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(((F=e[n])==null?void 0:F.value)??"")}))})},CEDateRangePicker=({label:e="Submitted Date",tooltip:t,required:n=!1,onChange:i,size:o="medium",style:l,inputGroupStyle:u,id:f,name:p,mode:m="range",defaultValue:d,disabled:g=!1,minDate:_="",defaultFloat:E=!0,disablePastDates:S=!1})=>{const[b,T]=React.useState(""),[C,A]=React.useState(""),[R,O]=React.useState(()=>!!E),[j,I]=React.useState(""),F=new Date().toISOString().split("T")[0],B=_?new Date(_).toISOString().split("T")[0]:S?F:void 0,X=()=>O(!0),U=Y=>{!Y.currentTarget.value&&!b&&!C&&O(!1)},N=(Y,V)=>{if(i==null||i({startDate:Y||"",endDate:V||""}),Y&&!V||!Y&&V){I("Both start and end dates must be selected");return}if(Y&&V&&new Date(V)<new Date(Y)){I("End date must be after or equal to start date");return}I("")},G=Y=>{if(!Y)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(Y))return Y;if(Y.includes("/")){const q=Y.split("/").map(H=>H.trim());if(q.length>=3){const H=q[0].padStart(2,"0").slice(0,2),Q=q[1].padStart(2,"0").slice(0,2),de=q[2].replace(/\D/g,"").slice(0,4);return de.length!==4?"":`${de}-${H}-${Q}`}}const V=Y.replace(/\D/g,"");if(V.length===8){const q=V.slice(0,4),H=V.slice(4,6),Q=V.slice(6,8);if(+H>=1&&+H<=12)return`${q}-${H}-${Q}`;const ue=V.slice(0,2),de=V.slice(2,4);return`${V.slice(4,8)}-${ue}-${de}`}const M=new Date(Y);if(!isNaN(M.getTime())){const q=M.getFullYear().toString().slice(0,4).padStart(4,"0"),H=(M.getMonth()+1).toString().padStart(2,"0"),Q=M.getDate().toString().padStart(2,"0");return`${q}-${H}-${Q}`}return""},ee=Y=>{const V=Y.match(/^(\d{4})/);return(V==null?void 0:V[1])==="0000"};React.useEffect(()=>{d&&(d.startDate&&T(G(d.startDate)),d.endDate&&A(G(d.endDate)))},[d]);const te=Y=>{const V=G(Y.target.value);T(V),N(V,C)},z=Y=>{const V=G(Y.target.value);A(V),N(b,V)},K=!!(R||b||C),L=getSizeStyle$1(o),W=({text:Y,float:V,showTooltip:M=!0})=>jsxRuntimeExports.jsxs("label",{className:`floating-label-box${V?" float":""}`,children:[jsxRuntimeExports.jsxs("span",{className:"label-text",children:[Y,n&&jsxRuntimeExports.jsx("span",{className:"required-star",children:"*"})]}),t&&M&&jsxRuntimeExports.jsxs("span",{className:"tooltip-icon",role:"button","aria-label":t,tabIndex:0,children:[jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em","aria-hidden":"true",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),jsxRuntimeExports.jsx("text",{x:"12",y:"16",textAnchor:"middle",fontSize:"12",fill:"currentColor",fontFamily:"Inter, Arial",fontWeight:"600",children:"i"})]}),jsxRuntimeExports.jsx("span",{className:"tooltip-bubble",role:"tooltip",children:t})]})]});return jsxRuntimeExports.jsxs("div",{className:"date-range-picker",style:l,id:f,children:[jsxRuntimeExports.jsx("div",{className:"date-range-field-group",style:u,children:m==="single"?jsxRuntimeExports.jsxs("div",{className:"field-box ",style:L,children:[jsxRuntimeExports.jsx("input",{type:"date",value:b,name:p,min:B,disabled:g,onChange:Y=>{const V=Y.target.value;if(T(V),ee(V)){I("Year cannot be 0000");return}j==="Year cannot be 0000"&&I("");const M=G(V);i==null||i({startDate:M,endDate:""})},onFocus:X,onBlur:U}),jsxRuntimeExports.jsx(W,{text:e,float:K,showTooltip:!0})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"field-box ",style:L,children:[jsxRuntimeExports.jsx("input",{type:"date",value:b,name:p?`${p}-from`:void 0,min:B,onChange:te,onFocus:X,onBlur:U,disabled:g}),jsxRuntimeExports.jsx(W,{text:"From",float:!0,showTooltip:!0})]}),jsxRuntimeExports.jsx("span",{className:"range-separator centered",children:"to"}),jsxRuntimeExports.jsxs("div",{className:"field-box ",style:L,children:[jsxRuntimeExports.jsx("input",{type:"date",value:C,name:p?`${p}-to`:void 0,min:B,onChange:z,onFocus:X,onBlur:U,disabled:g}),jsxRuntimeExports.jsx(W,{text:"To",float:!0,showTooltip:!1})]})]})}),j&&m!=="single"&&jsxRuntimeExports.jsx("div",{className:"error-text",children:j})]})},useEscapeKey=e=>{React.useEffect(()=>{const t=n=>{n.key==="Escape"&&e()};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},extractTextFromValue=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(t=>extractTextFromValue(t)).join(" ");if(React.isValidElement(e)){const t=e.props??{children:void 0},n=extractTextFromValue(t.children);if(n.trim())return n;const i=[t["data-value"],t["data-sort"],t.label,t.text,t.title];for(const o of i){const l=extractTextFromValue(o).trim();if(l)return l}return""}return String(e)},getColumnValue=e=>{if(e==null)return"";if(React.isValidElement(e)){const t=e;return t.props["data-value"]||t.props["data-sort"]||extractTextFromValue(t)}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 n in e)React.isValidElement(e[n])||(t[n]=stripReactElements(e[n]));return t}return e},Edit="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.06%203.58988L20.41%204.93988C21.2%205.71988%2021.2%206.98988%2020.41%207.76988L7.18%2020.9999H3V16.8199L13.4%206.40988L16.23%203.58988C17.01%202.80988%2018.28%202.80988%2019.06%203.58988ZM5%2018.9999L6.41%2019.0599L16.23%209.22988L14.82%207.81988L5%2017.6399V18.9999Z'%20fill='%2379747E'/%3e%3c/svg%3e",Approve="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.00003%2016.1701L4.83003%2012.0001L3.41003%2013.4101L9.00003%2019.0001L21%207.00009L19.59%205.59009L9.00003%2016.1701Z'%20fill='%2379747E'/%3e%3c/svg%3e",Reassign="data:image/svg+xml,%3csvg%20width='17'%20height='20'%20viewBox='0%200%2017%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.83828%200.221421C8.68188%200.075693%208.47503%20-0.00364251%208.2613%200.000128532C8.04757%200.00389957%207.84365%200.0904828%207.69249%200.241637C7.54134%200.392791%207.45476%200.596715%207.45098%200.810446C7.44721%201.02418%207.52655%201.23103%207.67228%201.38742L9.01428%202.72942H8.53028C6.89858%202.72942%205.30353%203.21327%203.94682%204.1198C2.59012%205.02632%201.53269%206.31479%200.908271%207.82228C0.283848%209.32977%200.120471%2010.9886%200.438799%2012.5889C0.757127%2014.1893%201.54286%2015.6593%202.69665%2016.8131C3.85043%2017.9668%205.32044%2018.7526%206.92078%2019.0709C8.52112%2019.3892%2010.1799%2019.2258%2011.6874%2018.6014C13.1949%2017.977%2014.4834%2016.9196%2015.3899%2015.5629C16.2964%2014.2062%2016.7803%2012.6111%2016.7803%2010.9794C16.7803%2010.7606%2016.6934%2010.5508%2016.5386%2010.3961C16.3839%2010.2413%2016.1741%2010.1544%2015.9553%2010.1544C15.7365%2010.1544%2015.5266%2010.2413%2015.3719%2010.3961C15.2172%2010.5508%2015.1303%2010.7606%2015.1303%2010.9794C15.1302%2012.2819%2014.7448%2013.5553%2014.0225%2014.6391C13.3002%2015.723%2012.2733%2016.5689%2011.0712%2017.0703C9.86915%2017.5718%208.54557%2017.7064%207.26716%2017.4571C5.98875%2017.2078%204.81268%2016.5859%203.88704%2015.6695C2.96139%2014.7532%202.32757%2013.5835%202.06538%2012.3077C1.80319%2011.0318%201.92436%209.70696%202.41362%208.49986C2.90289%207.29276%203.73837%206.25741%204.81488%205.52419C5.89138%204.79097%207.16076%204.39266%208.46318%204.37942L7.67118%205.17142C7.52097%205.32709%207.43791%205.53552%207.43989%205.75184C7.44187%205.96815%207.52873%206.17503%207.68177%206.32792C7.8348%206.48081%208.04177%206.56748%208.25808%206.56925C8.47439%206.57103%208.68275%206.48778%208.83828%206.33742L11.3133%203.86242C11.4678%203.70773%2011.5546%203.49805%2011.5546%203.27942C11.5546%203.0608%2011.4678%202.85111%2011.3133%202.69642L8.83828%200.221421ZM12.9523%207.08542C13.1097%207.23717%2013.2005%207.44523%2013.2046%207.66387C13.2087%207.8825%2013.1259%208.09384%2012.9743%208.25142L8.73928%2012.6514C8.66232%2012.7313%208.57005%2012.7948%208.46799%2012.8382C8.36593%2012.8815%208.25617%2012.9039%208.14528%2012.9039C8.03438%2012.9039%207.92462%2012.8815%207.82256%2012.8382C7.7205%2012.7948%207.62824%2012.7313%207.55128%2012.6514L5.73628%2010.766C5.65735%2010.6888%205.59473%2010.5965%205.55212%2010.4947C5.50952%2010.3928%205.48779%2010.2834%205.48822%2010.173C5.48866%2010.0626%205.51125%209.95343%205.55467%209.85191C5.59808%209.75039%205.66143%209.65862%205.74096%209.58204C5.82049%209.50545%205.91459%209.44561%206.01767%209.40606C6.12075%209.3665%206.23073%209.34804%206.34107%209.35177C6.45142%209.3555%206.5599%209.38134%206.66008%209.42776C6.76026%209.47418%206.8501%209.54024%206.92428%209.62202L8.14528%2010.8892L11.7863%207.10742C11.938%206.94997%2012.1461%206.85921%2012.3647%206.85509C12.5834%206.85096%2012.7947%206.93381%2012.9523%207.08542Z'%20fill='%2365B230'/%3e%3c/svg%3e",Add="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%2013H13V20H11V13H4V11H11V4H13V11H20V13Z'%20fill='%2379747E'/%3e%3c/svg%3e",Delete="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%203V4H20V6H19V19C19%2020.1%2018.1%2021%2017%2021H7C5.9%2021%205%2020.1%205%2019V6H4V4H9V3H15ZM7%2019H17V6H7V19ZM9%208H11V17H9V8ZM15%208H13V17H15V8Z'%20fill='%2379747E'/%3e%3c/svg%3e",Cancel="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202C6.47%202%202%206.47%202%2012C2%2017.53%206.47%2022%2012%2022C17.53%2022%2022%2017.53%2022%2012C22%206.47%2017.53%202%2012%202ZM12%2020C7.59%2020%204%2016.41%204%2012C4%207.59%207.59%204%2012%204C16.41%204%2020%207.59%2020%2012C20%2016.41%2016.41%2020%2012%2020ZM12%2010.59L15.59%207L17%208.41L13.41%2012L17%2015.59L15.59%2017L12%2013.41L8.41%2017L7%2015.59L10.59%2012L7%208.41L8.41%207L12%2010.59Z'%20fill='%23C53225'/%3e%3c/svg%3e",CopyIcon="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='M15%2020.5H5V7.5C5%206.95%204.55%206.5%204%206.5C3.45%206.5%203%206.95%203%207.5V20.5C3%2021.6%203.9%2022.5%205%2022.5H15C15.55%2022.5%2016%2022.05%2016%2021.5C16%2020.95%2015.55%2020.5%2015%2020.5ZM20%2016.5V4.5C20%203.4%2019.1%202.5%2018%202.5H9C7.9%202.5%207%203.4%207%204.5V16.5C7%2017.6%207.9%2018.5%209%2018.5H18C19.1%2018.5%2020%2017.6%2020%2016.5ZM18%2016.5H9V4.5H18V16.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ViewIcon="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='M12%204.5C7%204.5%202.73%207.61%201%2012C2.73%2016.39%207%2019.5%2012%2019.5C17%2019.5%2021.27%2016.39%2023%2012C21.27%207.61%2017%204.5%2012%204.5ZM12%2017C9.24%2017%207%2014.76%207%2012C7%209.24%209.24%207%2012%207C14.76%207%2017%209.24%2017%2012C17%2014.76%2014.76%2017%2012%2017ZM12%209C10.34%209%209%2010.34%209%2012C9%2013.66%2010.34%2015%2012%2015C13.66%2015%2015%2013.66%2015%2012C15%2010.34%2013.66%209%2012%209Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ShowOrHideColumn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%3e%3cpath%20d='M0%200%20C1.39042818%20-0.00202787%202.78085531%20-0.00494519%204.17127991%20-0.00869751%20C7.06831102%20-0.0130889%209.9650623%20-0.00679496%2012.86206055%200.00732422%20C16.54104169%200.02439842%2020.21936509%200.01456623%2023.89832211%20-0.00339317%20C26.76486496%20-0.0143319%2029.63125676%20-0.01073875%2032.49780464%20-0.0030098%20C34.50268617%20-0.00008719%2036.50757401%20-0.00906178%2038.51243591%20-0.0184021%20C51.84643905%200.08288397%2062.36831214%202.18438052%2072.34765625%2011.3984375%20C82.72862089%2022.29501297%2083.81157502%2035.39563727%2083.72860718%2049.8704834%20C83.73328715%2051.15071931%2083.73796712%2052.43095523%2083.74278891%2053.74998617%20C83.75517662%2057.26010193%2083.74918524%2060.76996931%2083.73983026%2064.28008533%20C83.73298924%2068.08247635%2083.7435458%2071.88482726%2083.75177002%2075.68721008%20C83.76505611%2083.11894567%2083.76225259%2090.55058996%2083.7535321%2097.98232901%20C83.74673568%20104.02640949%2083.74584727%20110.07046452%2083.74910355%20116.11454773%20C83.74956325%20116.97729682%2083.75002294%20117.84004591%2083.75049657%20118.72893891%20C83.75145582%20120.4820182%2083.75242847%20122.23509749%2083.75341435%20123.98817676%20C83.76195323%20140.39713998%2083.75215774%20156.80605278%2083.73601325%20173.21500772%20C83.72261144%20187.27113064%2083.72493995%20201.32717921%2083.73876953%20215.38330078%20C83.75485194%20231.73663572%2083.7611294%20248.08992656%2083.75193274%20264.4432683%20C83.75097717%20266.18962128%2083.75003406%20267.93597427%2083.74910355%20269.68232727%20C83.74864072%20270.54139399%2083.74817789%20271.4004607%2083.74770104%20272.28555974%20C83.74511913%20278.31698617%2083.74946486%20284.34838445%2083.75654221%20290.37980652%20C83.76498704%20297.73782249%2083.76261469%20305.09574254%2083.74669997%20312.45374763%20C83.73885718%20316.20237621%2083.73565678%20319.95084531%2083.74564743%20323.69947243%20C83.75634508%20327.77524883%2083.74350635%20331.85062835%2083.72860718%20335.9263916%20C83.73529934%20337.09392896%2083.74199151%20338.26146632%2083.74888647%20339.4643836%20C83.6547451%20352.81613252%2081.80817857%20364.46802168%2072.34765625%20374.3984375%20C61.26850374%20384.62796175%2049.36756952%20385.86653363%2034.74609375%20385.76171875%20C33.37472535%20385.7611982%2032.0033562%20385.76172342%2030.63198853%20385.76322937%20C27.77960848%20385.76314043%2024.92751564%20385.75287014%2022.07519531%20385.73461914%20C18.44659665%20385.71189135%2014.81841439%20385.71140425%2011.18976402%20385.71813679%20C8.36535029%20385.72150093%205.54102895%20385.71480174%202.71663284%20385.70500755%20C0.73715224%20385.69937125%20-1.24234414%20385.70058074%20-3.22183228%20385.70198059%20C-16.18209116%20385.60087128%20-25.59788448%20384.09755013%20-35.65234375%20375.3984375%20C-45.54661727%20364.26539458%20-47.11519405%20351.39165616%20-47.03329468%20336.96398926%20C-47.03797465%20335.6757351%20-47.04265462%20334.38748094%20-47.04747641%20333.06018877%20C-47.05988124%20329.52308071%20-47.0538647%20325.98621866%20-47.04451776%20322.44911027%20C-47.03768394%20318.61945404%20-47.04822979%20314.78983788%20-47.05645752%20310.96018982%20C-47.06975116%20303.47317331%20-47.06693669%20295.98624736%20-47.0582196%20288.4992274%20C-47.05142618%20282.41077808%20-47.05053348%20276.32235401%20-47.05379105%20270.23390198%20C-47.05425075%20269.36517795%20-47.05471044%20268.49645393%20-47.05518407%20267.60140494%20C-47.05614331%20265.83624438%20-47.05711595%20264.07108383%20-47.05810185%20262.30592328%20C-47.06664294%20245.77967925%20-47.05684175%20229.25348526%20-47.04070075%20212.72724944%20C-47.02729873%20198.56732745%20-47.02962719%20184.40747926%20-47.04345703%20170.24755859%20C-47.05953551%20153.7777782%20-47.06581909%20137.3080416%20-47.05662024%20120.83825445%20C-47.05566466%20119.07982732%20-47.05472155%20117.32140017%20-47.05379105%20115.56297302%20C-47.05332822%20114.69794239%20-47.05286539%20113.83291175%20-47.05238854%20112.94166806%20C-47.04980545%20106.8651998%20-47.05415492%20100.78875947%20-47.06122971%2094.71229553%20C-47.06967015%2087.30042821%20-47.06731132%2079.88865612%20-47.05138747%2072.47679961%20C-47.04353884%2068.69994852%20-47.04035446%2064.92325585%20-47.05033493%2061.14640617%20C-47.06101703%2057.0417633%20-47.04820598%2052.93751546%20-47.03329468%2048.83288574%20C-47.03998684%2047.65397152%20-47.04667901%2046.47505731%20-47.05357397%2045.26041842%20C-46.9542233%2031.0988315%20-44.31098753%2020.04518898%20-34.13671875%209.88671875%20C-23.81712366%200.73176368%20-13.42909464%20-0.06246693%200%200%20Z%20'%20fill='%23212121'%20transform='translate(88.65234375,63.6015625)'/%3e%3cpath%20d='M0%200%20C1.37183255%20-0.00389885%202.74366391%20-0.00823591%204.11549377%20-0.01298523%20C6.97555474%20-0.02039888%209.83549214%20-0.02019147%2012.69555664%20-0.01489258%20C16.33091665%20-0.00909958%2019.96576688%20-0.02604816%2023.60104275%20-0.04923725%20C26.42978286%20-0.06408398%2029.25840319%20-0.06483166%2032.08717537%20-0.06172752%20C34.0694059%20-0.06247893%2036.05161807%20-0.07625581%2038.03379822%20-0.09040833%20C50.34165442%20-0.02798927%2060.24736289%202.00602656%2069.62890625%2010.30078125%20C80.23052058%2021.7808721%2081.93785653%2033.21068447%2081.88960266%2048.37446594%20C81.89342821%2049.66015683%2081.89725376%2050.94584772%2081.90119523%2052.27049893%20C81.9114249%2055.81433436%2081.90930634%2059.35806804%2081.90501463%2062.90191162%20C81.9025382%2066.73366042%2081.91157295%2070.56538531%2081.91905212%2074.39712524%20C81.93177597%2081.89455933%2081.93359569%2089.39195757%2081.93125186%2096.88940064%20C81.92946586%20102.98649949%2081.93122438%20109.08358749%2081.9354763%20115.18068504%20C81.93607149%20116.04981554%2081.93666668%20116.91894603%2081.93727991%20117.81441381%20C81.93849171%20119.58029897%2081.93970585%20121.34618412%2081.94092228%20123.11206927%20C81.95178902%20139.65831656%2081.9496395%20156.20454344%2081.94353744%20172.75079187%20C81.93836971%20187.86983815%2081.94962147%20202.98881998%2081.96863566%20218.10785351%20C81.98803326%20233.65155953%2081.99626664%20249.19523509%2081.9925124%20264.73895329%20C81.99060319%20273.45773292%2081.99306052%20282.17645771%2082.00722694%20290.89522743%20C82.01916628%20298.31814058%2082.02051713%20305.74096513%2082.00843678%20313.16387955%20C82.00256581%20316.94678992%2082.00139893%20320.72953843%2082.01343918%20324.51243782%20C82.02637213%20328.62380077%2082.01579126%20332.73478184%2082.00312805%20336.84614563%20C82.01050234%20338.02710621%2082.01787662%20339.20806678%2082.02547437%20340.42481405%20C81.94020249%20353.64162412%2079.58475249%20365.22365731%2070.62890625%20375.30078125%20C59.43149551%20384.98877486%2048.5995069%20385.6116798%2034.29296875%20385.6015625%20C32.92353183%20385.60546179%2031.5540961%20385.60979893%2030.18466187%20385.61454773%20C27.32879702%20385.62196213%2024.47305589%20385.62175381%2021.6171875%20385.61645508%20C17.99089323%20385.61066763%2014.36511094%20385.62759691%2010.73890114%20385.65079975%20C7.91440971%20385.66566391%205.090038%20385.66639174%202.26551437%20385.66329002%20C0.28942353%20385.66404012%20-1.68664899%20385.67780547%20-3.66268921%20385.69197083%20C-16.94942739%20385.62458325%20-27.43251173%20383.47720207%20-37.37109375%20374.30078125%20C-47.75205839%20363.40420578%20-48.83501252%20350.30358148%20-48.75204468%20335.82873535%20C-48.75672465%20334.54849944%20-48.76140462%20333.26826352%20-48.76622641%20331.94923258%20C-48.77861412%20328.43911682%20-48.77262274%20324.92924944%20-48.76326776%20321.41913342%20C-48.75642674%20317.6167424%20-48.7669833%20313.81439149%20-48.77520752%20310.01200867%20C-48.78849361%20302.58027308%20-48.78569009%20295.14862879%20-48.7769696%20287.71688974%20C-48.77017318%20281.67280926%20-48.76928477%20275.62875423%20-48.77254105%20269.58467102%20C-48.77300075%20268.72192193%20-48.77346044%20267.85917284%20-48.77393407%20266.97027984%20C-48.77489332%20265.21720055%20-48.77586597%20263.46412126%20-48.77685185%20261.71104199%20C-48.78539073%20245.30207877%20-48.77559524%20228.89316597%20-48.75945075%20212.48421103%20C-48.74604894%20198.42808811%20-48.74837745%20184.37203954%20-48.76220703%20170.31591797%20C-48.77828944%20153.96258303%20-48.7845669%20137.60929219%20-48.77537024%20121.25595045%20C-48.77441467%20119.50959747%20-48.77347156%20117.76324448%20-48.77254105%20116.01689148%20C-48.77184681%20114.72829141%20-48.77184681%20114.72829141%20-48.77113854%20113.41365901%20C-48.76855663%20107.38223258%20-48.77290236%20101.3508343%20-48.77997971%2095.31941223%20C-48.78842454%2087.96139626%20-48.78605219%2080.60347621%20-48.77013747%2073.24547112%20C-48.76229468%2069.49684254%20-48.75909428%2065.74837344%20-48.76908493%2061.99974632%20C-48.77978258%2057.92396992%20-48.76694385%2053.8485904%20-48.75204468%2049.77282715%20C-48.75873684%2048.60528979%20-48.76542901%2047.43775243%20-48.77232397%2046.23483515%20C-48.67188333%2031.98968244%20-46.49788008%2020.60627557%20-36.37109375%2010.30078125%20C-24.99934532%200.70204736%20-14.4396423%20-0.01018664%200%200%20Z%20'%20fill='%23212121'%20transform='translate(389.37109375,63.69921875)'/%3e%3cpath%20d='M0%200%20C1.37422758%20-0.00135128%202.7484547%20-0.00329565%204.12268066%20-0.00579834%20C6.98694461%20-0.00872786%209.85108284%20-0.00452264%2012.71533203%200.00488281%20C16.35966249%200.01627611%2020.0036982%200.00970489%2023.64801788%20-0.00226212%20C26.48099937%20-0.00953987%2029.31391266%20-0.00716587%2032.14689636%20-0.00200653%20C34.13524571%20-0.00005138%2036.12359788%20-0.00605238%2038.11193848%20-0.01226807%20C50.97970432%200.05377783%2060.71208654%201.43181578%2070.59375%2010.265625%20C80.43904472%2021.59627658%2081.90061916%2032.80877037%2081.85444641%2047.42196655%20C81.85827196%2048.71653011%2081.86209751%2050.01109367%2081.86603898%2051.34488642%20C81.87626947%2054.91345539%2081.87414988%2058.48192333%2081.86985838%2062.05050039%20C81.86738212%2065.90881512%2081.87641644%2069.76710608%2081.88389587%2073.62541199%20C81.89661984%2081.17464796%2081.89843945%2088.72384832%2081.89609561%2096.27309321%20C81.89430976%20102.4116766%2081.89606782%20108.55024922%2081.90032005%20114.68883133%20C81.90091524%20115.56380127%2081.90151043%20116.43877121%2081.90212366%20117.34025539%20C81.90333546%20119.11798027%2081.90454959%20120.89570516%2081.90576603%20122.67343004%20C81.91663264%20139.33028616%2081.91448321%20155.98712201%2081.90838119%20172.64397927%20C81.90321249%20187.86716535%2081.9144678%20203.09028744%2081.93347941%20218.31346087%20C81.95287204%20233.96225318%2081.96111133%20249.61101523%2081.95735615%20265.25981963%20C81.95544632%20274.03837098%2081.9579105%20282.81686787%2081.97207069%20291.59540939%20C81.98400361%20299.06848993%2081.98536797%20306.54148247%2081.97328053%20314.01456426%20C81.96740531%20317.8236788%2081.96625461%20321.63263253%2081.97828293%20325.44173622%20C81.99119743%20329.57972269%2081.98064519%20333.71732895%2081.9679718%20337.85531616%20C81.97534609%20339.04697148%2081.98272037%20340.23862679%2081.99031812%20341.46639287%20C81.9070551%20354.42932661%2079.28845483%20365.35673186%2070.59375%20375.265625%20C59.40723239%20384.95958111%2048.55610413%20385.57651772%2034.2578125%20385.56640625%20C32.88837558%20385.57030554%2031.51893985%20385.57464268%2030.14950562%20385.57939148%20C27.29364077%20385.58680588%2024.43789964%20385.58659756%2021.58203125%20385.58129883%20C17.95573698%20385.57551138%2014.32995469%20385.59244066%2010.70374489%20385.6156435%20C7.87925346%20385.63050766%205.05488175%20385.63123549%202.23035812%20385.62813377%20C0.25426728%20385.62888387%20-1.72180524%20385.64264922%20-3.69784546%20385.65681458%20C-16.86957859%20385.59001028%20-27.6387559%20383.53875206%20-37.40625%20374.265625%20C-47.39849958%20362.83409444%20-48.87080006%20349.69908274%20-48.79393005%20334.88296509%20C-48.79931559%20333.61230741%20-48.80470113%20332.34164973%20-48.81024987%20331.03248727%20C-48.82455435%20327.54904283%20-48.8205075%20324.06583798%20-48.81308305%20320.58238125%20C-48.80831603%20316.80857637%20-48.82089218%20313.03482073%20-48.83110046%20309.2610321%20C-48.84822503%20301.88477917%20-48.84914173%20294.50861166%20-48.84388756%20287.13234402%20C-48.83983281%20281.1321392%20-48.84130485%20275.13195947%20-48.84663582%20269.13175583%20C-48.84738424%20268.27513491%20-48.84813266%20267.41851399%20-48.84890376%20266.53593486%20C-48.85043537%20264.79526103%20-48.85197372%20263.05458721%20-48.85351873%20261.31391339%20C-48.86722079%20245.02030083%20-48.86182222%20228.72673639%20-48.85033352%20212.43312494%20C-48.84040323%20197.55559901%20-48.85334236%20182.67819748%20-48.87726771%20167.80069073%20C-48.90170128%20152.49074933%20-48.91125616%20137.18086577%20-48.90461498%20121.87090528%20C-48.90113225%20113.28900812%20-48.90329207%20104.70720657%20-48.92086601%2096.12532425%20C-48.93564136%2088.82004658%20-48.93615417%2081.51493187%20-48.9187951%2074.20965721%20C-48.91032641%2070.48908615%20-48.90803312%2066.76880554%20-48.92344666%2063.0482502%20C-49.06818906%2025.32392537%20-49.06818906%2025.32392537%20-38.8046875%2012.67578125%20C-27.21540674%201.02987534%20-15.72851608%20-0.04916843%200%200%20Z%20'%20fill='%23212121'%20transform='translate(239.40625,63.734375)'/%3e%3c/svg%3e",SearchRounded="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='M15.5001%2014.5H14.7101L14.4301%2014.23C15.6301%2012.83%2016.2501%2010.92%2015.9101%208.89002C15.4401%206.11002%2013.1201%203.89002%2010.3201%203.55002C6.09014%203.03002%202.53014%206.59001%203.05014%2010.82C3.39014%2013.62%205.61014%2015.94%208.39014%2016.41C10.4201%2016.75%2012.3301%2016.13%2013.7301%2014.93L14.0001%2015.21V16L18.2501%2020.25C18.6601%2020.66%2019.3301%2020.66%2019.7401%2020.25C20.1501%2019.84%2020.1501%2019.17%2019.7401%2018.76L15.5001%2014.5ZM9.50014%2014.5C7.01014%2014.5%205.00014%2012.49%205.00014%2010C5.00014%207.51002%207.01014%205.50002%209.50014%205.50002C11.9901%205.50002%2014.0001%207.51002%2014.0001%2010C14.0001%2012.49%2011.9901%2014.5%209.50014%2014.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",SortIcon="data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3115_5954)'%3e%3cpath%20d='M4.72326%2013.2386L1.2194%209.72426C0.396731%209.2419%20-0.40373%2010.2466%200.225485%2010.9546C1.77064%2012.4991%203.28619%2014.0746%204.8348%2015.616C4.89796%2015.6789%204.93004%2015.7593%205.00061%2015.8228C5.43736%2016.2172%206.29803%2015.9196%206.3158%2015.2815L6.31382%200.712092C6.27829%20-0.0888571%205.09586%20-0.25464%204.80025%200.452932C4.78347%200.493379%204.72277%200.686625%204.72277%200.711592V13.2391L4.72326%2013.2386Z'%20fill='%23909090'/%3e%3cpath%20d='M10.2754%202.75243L13.7792%206.26632C14.596%206.75068%2015.4078%205.7465%2014.7727%205.03643C13.2423%203.50195%2011.7332%201.94449%2010.2004%200.412502C10.1372%200.349085%2010.1051%200.26919%2010.0345%200.205773C9.56868%20-0.214176%208.72134%200.0359959%208.68235%200.709612L8.68432%2015.279C8.71986%2016.0799%209.90229%2016.2457%2010.1979%2015.5381C10.2147%2015.4977%2010.2754%2015.3045%2010.2754%2015.2795V2.75243Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3115_5954'%3e%3crect%20width='15'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%201%2015%200)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",InfoIcon="data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.71338%2011.25H9.21338V6.75H7.71338V11.25ZM8.46338%205.25C8.67588%205.25%208.85413%205.178%208.99813%205.034C9.14213%204.89%209.21388%204.712%209.21338%204.5C9.21338%204.2875%209.14138%204.1095%208.99738%203.966C8.85338%203.8225%208.67538%203.7505%208.46338%203.75C8.25088%203.75%208.07288%203.822%207.92938%203.966C7.78588%204.11%207.71388%204.288%207.71338%204.5C7.71338%204.7125%207.78538%204.89075%207.92938%205.03475C8.07338%205.17875%208.25138%205.2505%208.46338%205.25ZM8.46338%2015C7.42588%2015%206.45088%2014.803%205.53838%2014.409C4.62588%2014.015%203.83213%2013.4807%203.15713%2012.8062C2.48213%2012.1312%201.94788%2011.3375%201.55438%2010.425C1.16088%209.5125%200.963879%208.5375%200.963379%207.5C0.963379%206.4625%201.16038%205.4875%201.55438%204.575C1.94838%203.6625%202.48263%202.86875%203.15713%202.19375C3.83213%201.51875%204.62588%200.9845%205.53838%200.591C6.45088%200.1975%207.42588%200.0005%208.46338%200C9.50088%200%2010.4759%200.197%2011.3884%200.591C12.3009%200.985%2013.0946%201.51925%2013.7696%202.19375C14.4446%202.86875%2014.9791%203.6625%2015.3731%204.575C15.7671%205.4875%2015.9639%206.4625%2015.9634%207.5C15.9634%208.5375%2015.7664%209.5125%2015.3724%2010.425C14.9784%2011.3375%2014.4441%2012.1312%2013.7696%2012.8062C13.0946%2013.4812%2012.3009%2014.0157%2011.3884%2014.4097C10.4759%2014.8037%209.50088%2015.0005%208.46338%2015ZM8.46338%2013.5C10.1384%2013.5%2011.5571%2012.9187%2012.7196%2011.7562C13.8821%2010.5937%2014.4634%209.175%2014.4634%207.5C14.4634%205.825%2013.8821%204.40625%2012.7196%203.24375C11.5571%202.08125%2010.1384%201.5%208.46338%201.5C6.78838%201.5%205.36963%202.08125%204.20713%203.24375C3.04463%204.40625%202.46338%205.825%202.46338%207.5C2.46338%209.175%203.04463%2010.5937%204.20713%2011.7562C5.36963%2012.9187%206.78838%2013.5%208.46338%2013.5Z'%20fill='%23464646'/%3e%3c/svg%3e",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",SaveIcon="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.59%204.09C17.21%203.71%2016.7%203.5%2016.17%203.5H5C3.89%203.5%203%204.4%203%205.5V19.5C3%2020.6%203.9%2021.5%205%2021.5H19C20.1%2021.5%2021%2020.6%2021%2019.5V8.33C21%207.8%2020.79%207.29%2020.41%206.92L17.59%204.09ZM12%2019.5C10.34%2019.5%209%2018.16%209%2016.5C9%2014.84%2010.34%2013.5%2012%2013.5C13.66%2013.5%2015%2014.84%2015%2016.5C15%2018.16%2013.66%2019.5%2012%2019.5ZM13%209.5H7C5.9%209.5%205%208.6%205%207.5C5%206.4%205.9%205.5%207%205.5H13C14.1%205.5%2015%206.4%2015%207.5C15%208.6%2014.1%209.5%2013%209.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e";class ViewManager{constructor(){zt(this,"storageKeyPrefix","ce-grid-view")}getStorageKey(t){return`${this.storageKeyPrefix}:${t}`}getSavedViews(t){try{if(typeof window>"u")return[];const n=this.getStorageKey(t),i=window.localStorage.getItem(n);return i?JSON.parse(i):[]}catch(n){return console.error("Error retrieving saved views:",n),[]}}saveView(t,n,i,o,l){try{if(typeof window>"u")throw new Error("LocalStorage unavailable");const u=this.getSavedViews(t),p={id:`view_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,config:{name:n.name,description:n.description,timestamp:Date.now(),columns:i,pagination:o,...n.includeSort&&(l==null?void 0:l.sort)&&{sort:l.sort},...n.includeFilters&&(l==null?void 0:l.filters)&&{filters:l.filters},...n.includeSearch&&(l==null?void 0:l.searchQuery)&&{searchQuery:l.searchQuery}}};u.push(p);const m=this.getStorageKey(t);return window.localStorage.setItem(m,JSON.stringify(u)),p}catch(u){throw console.error("Error saving view:",u),u}}updateView(t,n,i,o,l){try{if(typeof window>"u")throw new Error("LocalStorage unavailable");const u=this.getSavedViews(t),f=u.findIndex(m=>m.id===n);if(f===-1)return null;u[f].config={...u[f].config,columns:i,pagination:o,timestamp:Date.now(),...(l==null?void 0:l.sort)&&{sort:l.sort},...(l==null?void 0:l.filters)&&{filters:l.filters},...(l==null?void 0:l.searchQuery)&&{searchQuery:l.searchQuery}};const p=this.getStorageKey(t);return window.localStorage.setItem(p,JSON.stringify(u)),u[f]}catch(u){return console.error("Error updating view:",u),null}}loadView(t,n){try{const o=this.getSavedViews(t).find(l=>l.id===n);return o?o.config:null}catch(i){return console.error("Error loading view:",i),null}}deleteView(t,n){try{if(typeof window>"u")return!1;let i=this.getSavedViews(t);i=i.filter(l=>l.id!==n);const o=this.getStorageKey(t);return window.localStorage.setItem(o,JSON.stringify(i)),!0}catch(i){return console.error("Error deleting view:",i),!1}}renameView(t,n,i,o){try{if(typeof window>"u")throw new Error("LocalStorage unavailable");const l=this.getSavedViews(t),u=l.find(p=>p.id===n);if(!u)return null;u.config.name=i,o!==void 0&&(u.config.description=o);const f=this.getStorageKey(t);return window.localStorage.setItem(f,JSON.stringify(l)),u}catch(l){return console.error("Error renaming view:",l),null}}clearAllViews(t){try{if(typeof window>"u")return!1;const n=this.getStorageKey(t);return window.localStorage.removeItem(n),!0}catch(n){return console.error("Error clearing views:",n),!1}}exportViews(t){const n=this.getSavedViews(t);return JSON.stringify(n,null,2)}importViews(t,n){try{if(typeof window>"u")return!1;const i=JSON.parse(n);if(!Array.isArray(i)||!i.every(l=>l.id&&l.config&&l.config.name&&l.config.columns&&l.config.pagination))return!1;const o=this.getStorageKey(t);return window.localStorage.setItem(o,JSON.stringify(i)),!0}catch(i){return console.error("Error importing views:",i),!1}}}const viewManager=new ViewManager,useViewPersistence=(e,t=!0)=>{const n=React.useRef(0),i=React.useCallback((m,d,g,_,E,S,b,T)=>{if(!e||!t)return;const C=Date.now();if(!(C-n.current<2e3)){n.current=C;try{const R=viewManager.getSavedViews(e),O={visibleColumns:m,columnOrder:d,...Array.isArray(g)&&{frozenColumnIds:g}},j={currentPage:_,rowsPerPage:E},I={...S&&{sort:S},...b&&{filters:b},...T&&{searchQuery:T}};if(R.length>0){const D=R[R.length-1].id;viewManager.updateView(e,D,O,j,I)}else{const D=viewManager.saveView(e,{name:"Auto View",includeFilters:!0,includeSort:!0,includeSearch:!0},O,j,I)}}catch(R){console.warn("[ViewPersistence] Auto-save failed:",R)}}},[e,t]),o=React.useCallback(()=>{var m,d,g,_,E;if(!e||!t)return null;try{const S=viewManager.getSavedViews(e);if(S.length===0)return null;const T=S[S.length-1].config;return{visibleColumns:((m=T.columns)==null?void 0:m.visibleColumns)||[],columnOrder:((d=T.columns)==null?void 0:d.columnOrder)||[],frozenColumnIds:((g=T.columns)==null?void 0:g.frozenColumnIds)||[],currentPage:((_=T.pagination)==null?void 0:_.currentPage)||0,rowsPerPage:((E=T.pagination)==null?void 0:E.rowsPerPage)||20,sort:T.sort,filters:T.filters,searchQuery:T.searchQuery}}catch(S){return console.warn("[ViewPersistence] Auto-restore failed:",S),null}},[e,t]),l=React.useCallback((m,d,g,_,E,S,b,T,C)=>{if(!e||!t)return null;try{const A=S||`View ${new Date().toLocaleTimeString()}`;return viewManager.saveView(e,{name:A,includeFilters:!0,includeSort:!0,includeSearch:!0},{visibleColumns:m,columnOrder:d,...Array.isArray(g)&&{frozenColumnIds:g}},{currentPage:_,rowsPerPage:E},{...b&&{sort:b},...T&&{filters:T},...C&&{searchQuery:C}}).id}catch(A){return console.error("[ViewPersistence] Save failed:",A),null}},[e,t]),u=React.useCallback(m=>{var d,g,_,E,S;if(!e||!t)return null;try{let b=viewManager.getSavedViews(e);if(b.length===0)return null;const T=m?b.find(A=>A.id===m):b[b.length-1];if(!T)return null;const C=T.config;return{visibleColumns:((d=C.columns)==null?void 0:d.visibleColumns)||[],columnOrder:((g=C.columns)==null?void 0:g.columnOrder)||[],frozenColumnIds:((_=C.columns)==null?void 0:_.frozenColumnIds)||[],currentPage:((E=C.pagination)==null?void 0:E.currentPage)||0,rowsPerPage:((S=C.pagination)==null?void 0:S.rowsPerPage)||20,sort:C.sort,filters:C.filters,searchQuery:C.searchQuery}}catch(b){return console.error("[ViewPersistence] Load failed:",b),null}},[e,t]),f=React.useCallback(()=>{if(!e||!t)return[];try{return viewManager.getSavedViews(e)}catch(m){return console.warn("[ViewPersistence] Get views failed:",m),[]}},[e,t]),p=React.useCallback(()=>{if(!e||!t)return!1;try{return viewManager.clearAllViews(e),!0}catch(m){return console.error("[ViewPersistence] Clear failed:",m),!1}},[e,t]);return React.useMemo(()=>({autoSave:i,autoRestore:o,saveView:l,loadView:u,getSavedViews:f,clearAllViews:p}),[i,o,l,u,f,p])},PaginationControls=({currentPage:e,totalPages:t,setCurrentPage:n})=>{const l=Math.floor(e/5)*5,u=Math.min(l+5,t),f=()=>{n(Math.max(0,l-1))},p=()=>{n(Math.min(t-1,u))},m=[];for(let d=l;d<u;d++)m.push(jsxRuntimeExports.jsx("button",{className:`pagination-page${e===d?" active":""}`,onClick:()=>n(d),disabled:e===d,children:d+1},d));return jsxRuntimeExports.jsxs("div",{className:"pagination-controls",children:[jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(0),disabled:e===0,children:"First"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e-1),disabled:e===0,children:"Previous"}),l>0&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:f,children:"..."}),m,u<t&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:p,children:"..."}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e+1),disabled:e===t-1,children:"Next"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(t-1),disabled:e===t-1,children:"Last"})]})},RowsPerPageSelector=({rowsPerPage:e,setRowsPerPage:t,setCurrentPage:n,pageSizeOptions:i})=>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:o=>{t(Number(o.target.value)),n(0)},className:"ml-8",children:i.map(o=>jsxRuntimeExports.jsx("option",{value:o,children:o},o))})]}),EntriesInfo=({dataLength:e,currentPage:t,rowsPerPage:n,totalRecords:i})=>jsxRuntimeExports.jsx("div",{className:"entries-info",children:e>0&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(()=>{const o=i??e;if(o===0)return"Showing 0 to 0 of 0 entries";const l=t*n+1,u=Math.min((t+1)*n,o);return`Showing ${l} to ${u} of ${o} entries`})()})}),CEDataGridDynamicTable=({title:e,jsonData:t,columnList:n,ischeckBoxInGrid:i,isSingleSelectionMode:o=!1,renderCheckboxInColumnId:l,onColumnCheckboxChange:u,isRadioButtonInGrid:f,onRadioChange:p,getSelectedRadioValue:m,renderRadioInColumnId:d,isSearchBoxInGrid:g,isAddButtonRequired:_,isEditButtonRequired:E,isDeleteButtonRequired:S,isApproveButtonRequired:b,isReassignButtonRequired:T,isCancelButtonRequired:C,isCopyButtonRequired:A,isViewButtonRequired:R,isExportAllToExcel:O,handleEditClick:j,handleAddClick:I,handleDeleteClick:D,handleApproveClick:F,handleReassignClick:B,handleCancelClick:X,handleCopyClick:U,handleViewClick:N,enableRowLevelEdit:G=!1,rowEditIcon:ee,editableColumns:te,editableCellPredicate:z,noOfPagesPerPage:K,totalRecords:L,clickableColumns:W,conditionalClickableColumns:Y,clickableCellPredicate:V,handleCellClick:M,onReload:q,showDownloadIcon:H=!0,downloadOptions:Q,showRefreshIcon:ue=!0,showFullViewIcon:de=!0,showColumnVisibilityIcon:Se=!0,showSortIcon:pe=!0,showFilterIcon:ye=!0,defaultSortConfig:Ae,onDataUpdate:ie,isOverrideCSS:Ie,showPagination:we=!0,shouldResetSearchOnDataChange:Ue,pageSizeOptions:We=[10,20,50,100],handleSelectedRows:Ce,rowsSelected:qe,selectionKey:Je="id",onPageChange:rt,getRowDisabled:tt,getRowStyle:Ve,customActions:mt=[],shouldColumnPersist:it=!1,serverSidePagination:Oe=!1,enableFreezeControls:Me=!1,freezeColumns:Be,defaultFreezeColumns:ze,onFreezeColumnsChange:Qe,gridId:ut,enableAutoSave:ct=!1,enableAutoRestore:ot=!1,onViewPersistenceReady:Ct,gridContext:He,onGridContextChange:Et,onColumnPanelClose:Mt})=>{const kt=useViewPersistence(ut,ct||ot),[St,Gt]=React.useState({}),[at,yt]=React.useState([]),[Ke,Pt]=React.useState([]),[qt,Xt]=React.useState(!1),[Yt,Ye]=React.useState(null),[lt,Dt]=React.useState(()=>{const Z=Be??ze;return Z==null?[]:typeof Z=="number"?[]:Z.filter(ne=>typeof ne=="string").map(ne=>ne.trim()).filter(Boolean)}),[At,Vt]=React.useState(new Set),[Zt,Jt]=React.useState({}),[$t,Ot]=React.useState(null),[J,oe]=React.useState(!1),[ae,se]=React.useState(""),[ce,fe]=React.useState(null),[ve,Te]=React.useState("contains"),[_e,ge]=React.useState(""),[me,je]=React.useState({}),[ke,Ne]=React.useState(0),[Pe,Le]=React.useState(K??10),[Ze,dt]=React.useState(new Set),[Ge,ht]=React.useState(""),[Ft,Wt]=React.useState(!1),[et,Rt]=React.useState(new Set),[ft,wt]=React.useState([]),[Qt,br]=React.useState(null),[Dr,or]=React.useState(null),Er=React.useRef(null),Nr=React.useRef(null),Mr=React.useRef(null),un=React.useRef(null),[er,fn]=React.useState(new Set),[pt,pn]=React.useState([]),[Ut,$r]=React.useState(null),[jt,Sr]=React.useState(null),[lr,dn]=React.useState(!1),[Zn,Jn]=React.useState(!1),[nt,cr]=React.useState(null),[ur,Fr]=React.useState(!1),[hn,It]=React.useState(!0),Lr=React.useRef([]),Br=React.useRef(""),Vr=React.useRef(""),mn=React.useRef(void 0),Wr=React.useRef("");React.useRef(!1);const pr=React.useRef(!1),zr=React.useRef([]),Ur=React.useRef([]),Hr=React.useRef([]),wr=React.useRef(!1),Gr=React.useRef(rt),qr=React.useRef({visibleColumns:[],columnOrder:[],frozenColumnIds:[],currentPage:0,rowsPerPage:K??10,sortConfig:null,activeFilters:{},searchQuery:""}),Kt=typeof L=="number"&&Number.isFinite(L)&&L>=0?Math.floor(L):void 0,Kr=Oe?Kt??at.length:at.length,dr=Math.max(1,Math.ceil(Kr/Pe)),hr=E===!0||G===!0,yn=mt.length>0,mr=hr||T||C||b||S||_||A||R||yn,xn=(hr?1:0)+(T?1:0)+(C?1:0)+(b?1:0)+(S?1:0)+(_?1:0)+(A?1:0)+(R?1:0)+mt.length,Xr=Math.max(48,xn*28+16),yr=(Z,ne)=>Z.length===ne.length&&Z.every((le,he)=>le===ne[he]),Yr=React.useCallback(()=>{if(typeof Et!="function"||wr.current)return;const Z={currentPage:ke,rowsPerPage:Pe,sortConfig:nt,filters:me,searchQuery:Ge,visibleColumns:Array.from(et),columnOrder:ft,frozenColumnIds:lt},ne=JSON.stringify(Z);if(ne!==Vr.current)try{Et(Z),Vr.current=ne}catch{}},[Et,ke,Pe,nt,me,Ge,et,ft,lt]),xr=React.useCallback(Z=>{pr.current=!0,zr.current=Z.visibleColumns,Ur.current=Z.columnOrder,Hr.current=Z.frozenColumnIds??[],Rt(new Set(Z.visibleColumns)),wt(Z.columnOrder),Array.isArray(Z.frozenColumnIds)&&Dt(Z.frozenColumnIds),Ne(Z.currentPage),Le(Z.rowsPerPage),Z.sort&&cr(Z.sort),Z.filters&&je(Z.filters),typeof Z.searchQuery=="string"&&ht(Z.searchQuery)},[]);React.useEffect(()=>{if(!He)return;const Z=JSON.stringify({currentPage:He.currentPage,rowsPerPage:He.rowsPerPage,sortConfig:He.sortConfig,filters:He.filters,searchQuery:He.searchQuery,visibleColumns:He.visibleColumns,columnOrder:He.columnOrder,frozenColumnIds:He.frozenColumnIds});if(Br.current===Z)return;Br.current=Z;let ne=!1;if(typeof He.currentPage=="number"&&Number.isFinite(He.currentPage)&&He.currentPage>=0){const le=Math.floor(He.currentPage);le!==ke&&(Ne(le),ne=!0)}if(typeof He.rowsPerPage=="number"&&Number.isFinite(He.rowsPerPage)&&He.rowsPerPage>0){const le=Math.floor(He.rowsPerPage);le!==Pe&&(Le(le),ne=!0)}if(He.sortConfig!==void 0){const le=He.sortConfig??null;JSON.stringify(le)!==JSON.stringify(nt)&&(cr(le),ne=!0)}if(He.filters!==void 0){const le=He.filters??{};JSON.stringify(le)!==JSON.stringify(me)&&(je(le),ne=!0)}if(He.searchQuery!==void 0){const le=He.searchQuery??"";le!==Ge&&(ht(le),ne=!0)}if(Array.isArray(He.visibleColumns)){const le=Array.from(et);yr(le,He.visibleColumns)||(Rt(new Set(He.visibleColumns)),ne=!0)}Array.isArray(He.columnOrder)&&(yr(ft,He.columnOrder)||(wt(He.columnOrder),ne=!0)),Array.isArray(He.frozenColumnIds)&&(yr(lt,He.frozenColumnIds)||(Dt(He.frozenColumnIds),ne=!0)),ne&&(wr.current=!0,Promise.resolve().then(()=>{wr.current=!1}))},[He,ke,Pe,nt,me,Ge,et,ft,lt]),React.useEffect(()=>{Yr()},[Yr]),React.useEffect(()=>{K!=null&&K>0&&(Oe&&K!==Pe&&It(!0),Le(K),tr(0))},[K]),React.useEffect(()=>{if(ot&&ut){const Z=kt.autoRestore();Z&&xr(Z)}},[ot,ut,kt,xr]),React.useEffect(()=>{!ct||!ut||kt.autoSave(Array.from(et),ft,lt,ke,Pe,nt,me,Ge)},[ct,ut,kt,et,ft,lt,ke,Pe,nt,me,Ge]),React.useEffect(()=>{qr.current={visibleColumns:Array.from(et),columnOrder:ft,frozenColumnIds:lt,currentPage:ke,rowsPerPage:Pe,sortConfig:nt,activeFilters:me,searchQuery:Ge}},[et,ft,lt,ke,Pe,nt,me,Ge]),React.useEffect(()=>{if(!Ct||!ut)return;Ct({saveView:()=>{const le=qr.current;kt.saveView(le.visibleColumns,le.columnOrder,le.frozenColumnIds,le.currentPage,le.rowsPerPage,`Manual View ${new Date().toLocaleTimeString()}`,le.sortConfig,le.activeFilters,le.searchQuery)},restoreView:()=>{const le=kt.loadView();le&&xr(le)}})},[Ct,ut,kt,xr]);const vn=()=>Fr(!0),gn=()=>Fr(!1),tr=Z=>{const ne=Math.max(0,Math.min(Z,dr-1));ne!==ke&&(Oe&&It(!0),Ne(ne))};React.useEffect(()=>{Gr.current=rt},[rt]),React.useEffect(()=>{const Z=Gr.current;if(typeof Z=="function")try{Z(ke,Pe)}catch{}},[ke,Pe]);const _n=Z=>{!Number.isFinite(Z)||Z<=0||(Oe&&Z!==Pe&&It(!0),Le(Z),tr(0))},gt=(Z,ne)=>{if(typeof Je=="function")try{const le=Je(Z);if(le!=null)return le}catch{}else if(typeof Je=="string"&&Z&&Z[Je]!==void 0)return Z[Je];if(ne!==void 0)return`__row_${ne}`},bn=()=>l?(Array.isArray(l)?l:[l]).filter(ne=>typeof ne=="string"&&!!ne):[],Zr=Z=>{if(Z===!0)return!0;if(typeof Z=="string"){const ne=Z.trim().toLowerCase();return ne==="true"||ne==="1"||ne==="yes"}return typeof Z=="number"?Z===1:!1},Jr=Z=>{const ne=bn();if(ne.length===0)return{};const le={};return Z.forEach((he,xe)=>{const Re=gt(he,xe);if(Re===void 0)return;const De=ne.filter(Ee=>Zr(he==null?void 0:he[Ee]));De.length>0&&(le[String(Re)]=De)}),le};React.useEffect(()=>{if(typeof Ce=="function"){const Z=Array.from(At),ne=Z.map(le=>{if(typeof le=="string"&&le.startsWith("__row_")){const xe=parseInt(le.slice(6),10);return!isNaN(xe)&&xe>=0&&xe<at.length?at[xe]:void 0}return(Ke||at||[]).find(xe=>{const Re=gt(xe);return Re!==void 0&&(Re===le||String(Re)===String(le))})}).filter(Boolean);try{Ce.length===1?Ce({ids:Z,rows:ne}):Ce(ne)}catch{try{Ce(ne)}catch{}}}},[At,at,Je]),React.useEffect(()=>{if(!qe)return;const Z=Array.from(qe),ne=Z.every(xe=>typeof xe=="number"&&xe>=0&&xe<at.length),le=new Set(Z.map(xe=>{if(ne){const Re=at[xe-1];return gt(Re,xe)??`__row_${xe}`}return xe}));((xe,Re)=>!(xe.size!==Re.size||!Array.from(xe).every(De=>Re.has(De))))(le,At)||Vt(le)},[qe,at,Je,gt,At]),React.useEffect(()=>{if(!(t&&Array.isArray(t))){It(!0);return}const Z=stripReactElements(Lr.current),ne=stripReactElements(t);if(!(JSON.stringify(Z)!==JSON.stringify(ne))){It(!1);return}const he=[...t],xe=nt??Ae??null;let Re=he;xe!=null&&xe.column&&(Re=[...he].sort((Xe,st)=>{const xt=Ht(Xe,st,xe.column);return xe.direction==="asc"?xt:-xt}),!nt&&Ae&&cr(Ae));let De=Ge,Ee=me;Ue&&(De="",Ee={},ht(""),je({}));const be=Lt(Re,Ee,De);Pt(Re),yt(be);const Fe=Oe?Kt??be.length:be.length,$e=Math.max(0,Math.ceil(Math.max(Fe,1)/Pe)-1);if(ke>$e&&Ne($e),d){const Xe={},st=Array.isArray(d)?d:[d];Re.forEach((xt,vt)=>{const Tt=xt.id??`__row_${vt}`;for(const _t of st)if(xt[_t]===!0){Xe[Tt]={columnId:_t,rowData:xt};break}}),Qr(Xe)}Jt(l?Jr(Re):{}),Lr.current=t,It(!1)},[t,Ae,l,d,nt,me,Ge,Ue,Oe,Kt,Pe,ke]);const rr=React.useMemo(()=>{const Z=(n??[]).map(le=>le.id).join("|");return`ce-grid:${typeof e=="string"?e:"grid"}:${Z}`},[n,e]);React.useEffect(()=>{if(!n||n.length===0)return;const Z=JSON.stringify(n.map(Ee=>({id:Ee.id,label:Ee.label,tooltip:Ee.tooltip,shouldDisplay:Ee.shouldDisplay??!0,shouldVisible:Ee.shouldVisible??!0,width:Ee.width,elementType:Ee.elementType,required:Ee.required??!1})));if(lr&&Wr.current===Z)return;const ne=n.map(Ee=>({id:Ee.id,label:Ee.label??Ee.id,tooltip:Ee.tooltip,shouldDisplay:Ee.shouldDisplay??!0,shouldVisible:Ee.shouldVisible??!0,width:Ee.width,elementType:Ee.elementType,required:Ee.required??!1}));pn(ne);const le=(()=>{try{const Ee=typeof window<"u"?window.localStorage.getItem(`${rr}:columns`):null;return Ee?JSON.parse(Ee):null}catch{return null}})();let he;ot&&pr.current?he=zr.current.filter(Ee=>{var be,Fe;return ne.some($e=>$e.id===Ee)&&((be=ne.find($e=>$e.id===Ee))==null?void 0:be.shouldDisplay)!==!1&&((Fe=ne.find($e=>$e.id===Ee))==null?void 0:Fe.shouldVisible)!==!1}):le!=null&&le.visibleColumns?he=le.visibleColumns.filter(Ee=>{var be,Fe;return ne.some($e=>$e.id===Ee)&&((be=ne.find($e=>$e.id===Ee))==null?void 0:be.shouldDisplay)!==!1&&((Fe=ne.find($e=>$e.id===Ee))==null?void 0:Fe.shouldVisible)!==!1}):he=ne.filter(Ee=>Ee.shouldDisplay!==!1&&Ee.shouldVisible!==!1).map(Ee=>Ee.id);let xe=[];ot&&pr.current?xe=Ur.current.filter(Ee=>{var be;return ne.some(Fe=>Fe.id===Ee)&&((be=ne.find(Fe=>Fe.id===Ee))==null?void 0:be.shouldVisible)!==!1}):le!=null&&le.columnOrder?xe=le.columnOrder.filter(Ee=>{var be;return ne.some(Fe=>Fe.id===Ee)&&((be=ne.find(Fe=>Fe.id===Ee))==null?void 0:be.shouldVisible)!==!1}):xe=ne.filter(Ee=>Ee.shouldVisible!==!1).map(Ee=>Ee.id);const Re=xe.filter(Ee=>he.includes(Ee));let De=[];if(Be!=null)if(typeof Be=="number"){const Ee=Math.max(0,Math.floor(Be));De=Re.slice(0,Ee)}else{const Ee=new Set(Be.filter(be=>typeof be=="string").map(be=>be.trim()).filter(Boolean));De=xe.filter(be=>Ee.has(be))}else if(ot&&pr.current)De=Hr.current.filter(Ee=>ne.some(be=>be.id===Ee));else if(Array.isArray(le==null?void 0:le.frozenColumnIds))De=le.frozenColumnIds.filter(Ee=>ne.some(be=>be.id===Ee));else if(ze!=null)if(typeof ze=="number"){const Ee=Math.max(0,Math.floor(ze));De=Re.slice(0,Ee)}else{const Ee=new Set(ze.filter(be=>typeof be=="string").map(be=>be.trim()).filter(Boolean));De=xe.filter(be=>Ee.has(be))}he.length===0&&(he=ne.filter(Ee=>Ee.shouldDisplay!==!1).map(Ee=>Ee.id)),xe.length===0&&(xe=ne.filter(Ee=>Ee.shouldVisible!==!1).map(Ee=>Ee.id)),Rt(new Set(he)),wt(xe),Dt(De),dn(!0),Wr.current=Z,mn.current=n},[n,rr,ot,lr,Be,ze,kt]),React.useEffect(()=>{if(pt.length===0)return;const Z=Array.from(et).filter(le=>!pt.some(he=>he.id===le&&he.shouldVisible!==!1));if(Z.length>0){const le=new Set(Array.from(et).filter(he=>!Z.includes(he)));if(le.size===0){const he=pt.find(xe=>xe.shouldDisplay!==!1&&xe.shouldVisible!==!1);he&&le.add(he.id)}Rt(le)}const ne=ft.filter(le=>{var he;return((he=pt.find(xe=>xe.id===le))==null?void 0:he.shouldVisible)===!1});if(ne.length>0){const le=ft.filter(he=>!ne.includes(he));wt(le)}},[pt,et,ft]),React.useEffect(()=>{if(lr)try{if(typeof window<"u")if(it){const Z={visibleColumns:Array.from(et),columnOrder:ft,frozenColumnIds:lt};window.localStorage.setItem(`${rr}:columns`,JSON.stringify(Z))}else window.localStorage.removeItem(`${rr}:columns`)}catch(Z){console.warn("[CEDataGrid] Failed to manage column persistence:",Z)}},[et,ft,lt,rr,lr,it]);const[En,Qr]=React.useState({}),Sn=({row:Z,rowIndex:ne,columnId:le,checked:he})=>{const xe=Ke&&Ke.length>0?Ke:at,Re=xe.indexOf(Z),De=gt(Z,Re>=0?Re:ke*Pe+ne);if(De===void 0)return;const Ee=xt=>{let vt;return{nextList:xt.map((_t,Bt)=>{const ar=gt(_t,Bt);return!(ar!==void 0&&(ar===De||String(ar)===String(De)))&&_t!==Z?_t:(vt={..._t,[le]:he},vt)}),patchedRow:vt}},{nextList:be,patchedRow:Fe}=Ee(xe),{nextList:$e}=Ee(at);Pt(be),yt($e);const Xe=Jr(be);Jt(Xe);const st=Fe??{...Z,[le]:he};if(typeof Ce=="function"){const xt=Array.from(At),vt=xt.map(_t=>{if(typeof _t=="string"&&_t.startsWith("__row_")){const Bt=parseInt(_t.slice(6),10);return!isNaN(Bt)&&Bt>=0&&Bt<be.length?be[Bt]:void 0}return be.find((Bt,ar)=>{const _r=gt(Bt,ar);return _r!==void 0&&(_r===_t||String(_r)===String(_t))})}).filter(Boolean),Tt={ids:xt,rows:vt,columnCheckboxSelection:Xe,toggledColumnId:le,toggledColumnChecked:he,toggledRowId:De,toggledRow:st};try{Ce.length===1?Ce(Tt):Ce(vt)}catch{try{Ce(vt)}catch{}}}if(typeof u=="function"){const xt=Xe[String(De)]||[];try{u({rowIndex:ne,rowData:st,columnId:le,checked:he,selectedColumnIds:xt,selectionMap:Xe,fullData:be})}catch{}}ie&&ie({fullData:be,updatedRow:st})},wn=({rowIndex:Z,columnId:ne,rowData:le})=>{const he=Array.isArray(d)?d:[d],xe={...le,...Object.fromEntries(he.map(Ee=>[Ee,Ee===ne]))},Re=le.id??`__row_${Z}`;Qr(Ee=>({...Ee,[Re]:{columnId:ne,rowData:xe}}));const De=at.map((Ee,be)=>(Ee.id??`__row_${be}`)===Re?{...Ee,...Object.fromEntries(he.map($e=>[$e,$e===ne]))}:Ee);yt(De),Pt(De),ie&&ie({fullData:De,updatedRow:xe})},Tn=Z=>{var he;const ne=at.findIndex(xe=>xe===Z),le=Z.id??`__row_${ne}`;return((he=En[le])==null?void 0:he.columnId)||""};React.useEffect(()=>{ke>0&&ke>=dr&&tr(0)},[ke,dr]);const Nt=React.useMemo(()=>{if(Oe)return at;const Z=ke*Pe,ne=Z+Pe;return at.slice(Z,ne)},[at,ke,Pe,Oe]),Cn=()=>{ht("");const Z=Lt(Ke,me,"");yt(Z)},en=(Z,ne)=>{Rt(le=>{const he=new Set(le);return ne?he.add(Z):(he.delete(Z),Dt(xe=>xe.filter(Re=>Re!==Z))),he})},Pn=(Z,ne)=>{!Z||!ne||Z===ne||wt(le=>{const he=pt.filter(Fe=>Fe.shouldVisible!==!1).map(Fe=>Fe.id),xe=[...le.filter(Fe=>he.includes(Fe)),...he.filter(Fe=>!le.includes(Fe))],Re=xe.indexOf(Z),De=xe.indexOf(ne);if(Re===-1||De===-1||Re===De)return xe;const Ee=[...xe],[be]=Ee.splice(Re,1);return Ee.splice(De,0,be),Ee})},tn=React.useCallback(()=>{if(Wt(!1),Mt){const Z=pt.filter(he=>he.shouldVisible!==!1).map(he=>he.id),le=(ft.length>0?[...ft.filter(he=>Z.includes(he)),...Z.filter(he=>!ft.includes(he))]:Z).map((he,xe)=>{const Re=pt.find(De=>De.id===he);return{id:he,label:Re==null?void 0:Re.label,position:xe+1,visible:et.has(he)}});Mt(le)}},[ft,pt,et,Mt]),rn=(Z,ne=null)=>{const le=ne?`${Z}-${ne}`:`${Z}`,he=new Set(Ze);he.has(le)?he.delete(le):(Array.from(he).forEach(xe=>{xe.startsWith(`${Z}`)&&he.delete(xe)}),he.add(le)),dt(he)},nn=Z=>{Ot($t===Z?null:Z)};React.useEffect(()=>{const Z=ne=>{var De,Ee,be,Fe;if(!$t)return;const le=ne.target,he=((De=Nr.current)==null?void 0:De.contains(le))??!1,xe=((Ee=Mr.current)==null?void 0:Ee.contains(le))??!1,Re=((Fe=(be=ne.target)==null?void 0:be.closest)==null?void 0:Fe.call(be,".dropdown-trigger"))!=null;!he&&!xe&&!Re&&Ot(null)};return document.addEventListener("click",Z),()=>{document.removeEventListener("click",Z)}},[$t]),React.useMemo(()=>new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),[]);const Rn=(Z,ne)=>{if(Z==null)return 1;if(ne==null)return-1;const le=/^-?\$?[\d,]+(\.\d+)?$|^\(\$?[\d,]+(\.\d+)?\)$/,he=be=>{if(be==null)return null;const Fe=String(be).trim();if(!le.test(Fe))return null;const $e=/^\(.*\)$/.test(Fe),Xe=Fe.replace(/[(),$]/g,"").replace(/,/g,"");if(!Xe)return null;const st=Number(Xe);return isNaN(st)?null:$e?-st:st},xe=he(Z),Re=he(ne);if(xe!==null&&Re!==null)return xe-Re;const De=new Date(Z),Ee=new Date(ne);return!isNaN(De.getTime())&&!isNaN(Ee.getTime())?De.getTime()-Ee.getTime():!isNaN(Number(Z))&&!isNaN(Number(ne))?Number(Z)-Number(ne):String(Z).localeCompare(String(ne),void 0,{numeric:!0,sensitivity:"base"})},Ht=(Z,ne,le)=>{const he=getColumnValue(Z==null?void 0:Z[le]),xe=getColumnValue(ne==null?void 0:ne[le]);return Rn(he,xe)};React.useEffect(()=>{if(!(nt!=null&&nt.column)||!Array.isArray(Ke)||Ke.length===0)return;const Z=[...Ke].sort((ne,le)=>{const he=Ht(ne,le,nt.column);return nt.direction==="asc"?he:-he});Pt(Z)},[nt==null?void 0:nt.column,nt==null?void 0:nt.direction]);const An=Z=>{if(!nt)return Z;const{column:ne,direction:le}=nt;return[...Z].sort((he,xe)=>{const Re=Ht(he,xe,ne);return le==="asc"?Re:-Re})},kn=(Z,ne)=>{for(let le=1;le<Z.length;le++)if(Ht(Z[le-1],Z[le],ne)>0)return!1;return!0},On=(Z,ne)=>{for(let le=1;le<Z.length;le++)if(Ht(Z[le-1],Z[le],ne)<0)return!1;return!0},Lt=(Z,ne=me,le=Ge)=>{let he=[...Z];if(le&&le.trim()){const xe=le.toLowerCase();he=he.filter(Re=>Object.entries(Re).some(([De,Ee])=>et.has(De)?extractTextFromValue(Ee).toLowerCase().includes(xe):!1))}return Object.entries(ne||{}).forEach(([xe,Re])=>{const{value:De,operator:Ee}=Re,be=(De??"").toLowerCase();he=he.filter(Fe=>{const $e=Fe[xe],Xe=String(getColumnValue($e)??"").toLowerCase();switch((Ee||"").toString()){case"contains":return Xe.includes(be);case"equals":return Xe===be;case"startsWith":return Xe.startsWith(be);case"endsWith":return Xe.endsWith(be);case"does not contain":return!Xe.includes(be);case"does not equal":return Xe!==be;case"is any of":return De.split(",").map(st=>st.trim().toLowerCase()).includes(Xe);case"Date Range":case"dateRange":{if(!De)return!0;const st=De.split(" - ").map(_t=>_t.trim());if(st.length!==2)return!1;const xt=new Date(st[0]),vt=new Date(st[1]);if(isNaN(xt.getTime())||isNaN(vt.getTime())||(xt.setHours(0,0,0,0),vt.setHours(23,59,59,999),!$e))return!1;const Tt=new Date($e);return isNaN(Tt.getTime())?!1:(Tt.setHours(0,0,0,0),Tt>=xt&&Tt<=vt)}default:return!0}})}),he};React.useEffect(()=>{if(!Array.isArray(Ke))return;const Z=Lt(Ke,me,Ge);yt(Z);const ne=Oe?Kt??Z.length:Z.length,le=Math.max(0,Math.ceil(Math.max(ne,1)/Pe)-1);ke>le&&Ne(le)},[Ke,me,Ge,Pe,ke,Oe,Kt]);const jn=Z=>{if(!Ke||Ke.length===0)return;const ne=Object.keys(me).length>0,le=Ge.trim().length>0,he=ne||le?at:Ke;let xe;(nt==null?void 0:nt.column)===Z?xe=nt.direction==="asc"?"desc":"asc":kn(he,Z)?xe="desc":(On(he,Z),xe="asc"),cr({column:Z,direction:xe});const Re=[...Ke].sort((Ee,be)=>{const Fe=Ht(Ee,be,Z);return xe==="asc"?Fe:-Fe});Pt(Re);const De=Lt(Re);yt(De),Ne(0)},an=()=>{if(!ae){oe(!1),ge(""),se(""),Ne(0);return}if(ve==="Date Range")if(ce&&ce.startDate&&ce.endDate)nr(ae,void 0,"Date Range");else{oe(!0);return}else _e&&_e.trim()!==""&&nr(ae,_e,ve);oe(!1),ge(""),se(""),fe(null),Ne(0)},nr=(Z,ne,le)=>{if(le==="Date Range"&&ce&&Z){const{startDate:he,endDate:xe}=ce;if(!he||!xe){console.warn("Invalid date range:",he,xe);return}const Re=new Date(he);Re.setHours(0,0,0,0);const De=new Date(xe);De.setHours(23,59,59,999);const Ee=Ke.filter(be=>{const Fe=be[Z];if(!Fe)return!1;const $e=new Date(Fe);return isNaN($e.getTime())?!1:($e.setHours(0,0,0,0),$e>=Re&&$e<=De)});yt(Ee),Ne(0),je({...me,[Z]:{value:`${he} - ${xe}`,operator:"Date Range"}}),oe(!1),Ot(null),fe(null);return}if(Z){const he={...me};if(ne===""&&(le==="contains"||le==="equals")){se(Z),Te(le||ve),ge(""),oe(!0);return}else ne&&ne.trim()!==""?he[Z]={value:ne,operator:le||ve}:delete he[Z];je(he);let xe=[...Ke];Object.entries(he).forEach(([Re,De])=>{const{value:Ee,operator:be}=De;xe=xe.filter(Fe=>{const $e=String(getColumnValue(Fe[Re])||"").toLowerCase(),Xe=Ee.toLowerCase();switch(be){case"contains":return $e.includes(Xe);case"equals":return $e===Xe;case"startsWith":return $e.startsWith(Xe);case"endsWith":return $e.endsWith(Xe);case"does not contain":return!$e.includes(Xe);case"does not equal":return $e!==Xe;case"is any of":return Ee.split(",").map(st=>st.trim().toLowerCase()).includes($e);default:return!0}})}),yt(xe),Ne(0),oe(!1)}},In=Z=>{Z.key==="Enter"&&nr()};useEscapeKey(()=>{Ot(null),oe(!1)});const Tr=(Z,ne="")=>{const le=he=>{const xe=new Set(er);xe.has(he)?xe.delete(he):xe.add(he),fn(xe)};if(Array.isArray(Z)){const he=Array.from(new Set(Z.reduce((xe,Re)=>typeof Re=="object"&&Re!==null?[...xe,...Object.keys(Re)]:xe,[])));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:he.map(xe=>jsxRuntimeExports.jsx("th",{children:xe.charAt(0).toUpperCase()+xe.slice(1)},xe))})}),jsxRuntimeExports.jsx("tbody",{children:Z.map((xe,Re)=>jsxRuntimeExports.jsx("tr",{children:he.map(De=>jsxRuntimeExports.jsx("td",{children:typeof xe[De]=="object"&&xe[De]!==null?jsxRuntimeExports.jsxs("div",{className:"flex-row-center",children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>le(`${ne}-${Re}-${De}`),children:er.has(`${ne}-${Re}-${De}`)?"▼":"▶"}),er.has(`${ne}-${Re}-${De}`)&&Tr(xe[De],`${ne}-${Re}-${De}`)]}):String(xe[De]||"")},`${ne}-${Re}-${De}`))},`${ne}-${Re}`))})]})})})}else if(typeof Z=="object"&&Z!==null)return jsxRuntimeExports.jsx("div",{className:"nested-object",children:jsxRuntimeExports.jsxs("table",{className:"custom-table nested",children:[jsxRuntimeExports.jsx("thead",{style:{zIndex:20001,position:"sticky",top:0,background:"#f5f5f5"},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(Z).map(([he,xe])=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:"table-cell",children:jsxRuntimeExports.jsx("strong",{children:he})}),jsxRuntimeExports.jsx("td",{className:"table-cell",children:typeof xe=="object"&&xe!==null?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>le(`${ne}-${he}`),children:er.has(`${ne}-${he}`)?"▼":"▶"}),er.has(`${ne}-${he}`)&&Tr(xe,`${ne}-${he}`)]}):String(xe)})]},`${ne}-${he}`))})]})});return jsxRuntimeExports.jsx("span",{children:String(Z)})},sn=Z=>{var ne;if(Z){const le=(ne=Z.parentElement)==null?void 0:ne.querySelector(".dropdown-trigger");if(!le)return;const he=le.getBoundingClientRect(),xe=window.innerHeight,Re=window.innerWidth,De=Z.offsetHeight,Ee=Z.offsetWidth,be=he.bottom+De>xe,Fe=he.left+Ee>Re,$e=he.left-Ee<0;let Xe,st;be?(Xe=he.top-De,Z.classList.add("adjust-top")):(Xe=he.bottom,Z.classList.remove("adjust-top")),Fe?(st=he.right-Ee,Z.classList.add("adjust-left"),Z.classList.remove("adjust-right")):$e?(st=he.left,Z.classList.add("adjust-right"),Z.classList.remove("adjust-left")):(st=he.left,Z.classList.remove("adjust-left"),Z.classList.remove("adjust-right")),Z.style.top=`${Xe}px`,Z.style.left=`${st}px`,Z.classList.add("dropdown-fixed-position")}};React.useEffect(()=>{const Z=ne=>{J&&Er.current&&!Er.current.contains(ne.target)&&oe(!1)};return document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[J]),React.useEffect(()=>()=>{},[$t]),React.useEffect(()=>{if(!(typeof document>"u"))return Ft?document.body.classList.add("ce-column-modal-open"):document.body.classList.remove("ce-column-modal-open"),()=>{document.body.classList.remove("ce-column-modal-open")}},[Ft]);const Dn=(Z,ne)=>{Z.preventDefault();const le=Z.pageX,he=St[ne]||150,xe=De=>{const Ee=Math.max(100,he+(De.pageX-le));Gt(be=>({...be,[ne]:Ee}))},Re=()=>{document.removeEventListener("mousemove",xe),document.removeEventListener("mouseup",Re)};document.addEventListener("mousemove",xe),document.addEventListener("mouseup",Re)},Cr=(Z,ne,le)=>{var xe;const he=String(ne??"");if(typeof V=="function")try{if(V(le??{},Z))return!0}catch{}return W!=null&&W.includes(Z)?Y!=null&&Y[Z]?Y[Z].includes(he):!0:!!((xe=Y==null?void 0:Y._global_)!=null&&xe.includes(he))},Nn=(Z,ne,le)=>{Cr(ne,Z[ne],Z)&&M&&M(Z,ne,le)},Mn=Z=>{if(Z==null||Z==="")return"";const ne=String(Z).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(ne))return ne;const le=new Date(ne);if(isNaN(le.getTime()))return"";const he=le.getFullYear().toString().padStart(4,"0"),xe=(le.getMonth()+1).toString().padStart(2,"0"),Re=le.getDate().toString().padStart(2,"0");return`${he}-${xe}-${Re}`},$n=(Z,ne)=>{const le=ne==null?void 0:ne[Z.id];if(typeof z=="function")try{if(!z(ne,Z.id))return!1}catch{return!1}else if(Array.isArray(te)&&te.length>0&&!te.includes(Z.id))return!1;return!(Z.elementType==="label-text"||React.isValidElement(le)||Array.isArray(le)||typeof le=="object"&&le!==null||(Array.isArray(d)?d.includes(Z.id):d===Z.id)||(Array.isArray(l)?l.includes(Z.id):l===Z.id))},Fn=(Z,ne)=>{const he=(Ke&&Ke.length>0?Ke:at).indexOf(Z),xe=gt(Z,he>=0?he:ke*Pe+ne);xe!==void 0&&($r(xe),Sr({...Z}))},Pr=(Z,ne)=>{Sr(le=>({...le||{},[Z]:ne}))},Rr=()=>{$r(null),Sr(null)},Ln=()=>{if(Ut===null||!jt)return;const Z=Ke,ne=at,le=(Ke||[]).map((Re,De)=>{const Ee=gt(Re,De);return Ee===Ut||String(Ee)===String(Ut)?{...Re,...jt}:Re}),he=An(le),xe=Lt(he,me,Ge);if(Pt(he),yt(xe),typeof ie=="function")try{const Re=ie({fullData:he,updatedRow:{...jt}});if(Re&&typeof Re.then=="function"){Promise.resolve(Re).then(()=>{Rr()}).catch(()=>{Pt(Z),yt(ne)});return}}catch{Pt(Z),yt(ne);return}Rr()},vr=Nt.some(Z=>Array.from(et).some(ne=>Array.isArray(Z[ne])&&Z[ne].length>0&&Z[ne].some(le=>typeof le=="object"&&le!==null))),Bn=Z=>{const ne=/[\\/:*?"<>|]/g;return Z.replace(ne,"").trim()},Vn=Z=>{try{const ne=window.prompt("Enter file name",Z);if(!ne)return Z;const le=Bn(ne);return le.length===0?Z:le.endsWith(".xlsx")?le:`${le}.xlsx`}catch{return Z}},gr=(Z=!1)=>{const ne=pt.filter(be=>et.has(be.id));let le;if(Z||!(at&&at.length>0))le=Ke;else{const be=Array.from(At);if(be.length>0){let Fe;if(typeof Je=="function")Fe=Je;else{const $e=Je??"id";Fe=Xe=>Xe[$e]}le=at.filter($e=>be.includes(Fe($e)))}else le=at}const he=le.map(be=>ne.reduce((Fe,$e)=>(Fe[$e.label||$e.id]=getColumnValue(be[$e.id]),Fe),{})),xe=utils.json_to_sheet(he),Re=utils.book_new();utils.book_append_sheet(Re,xe,"Data");let De;Z||le===Ke?De="all-data-export.xlsx":Array.from(At).length>0?De="selected-rows-export.xlsx":De="filtered-search-export.xlsx";const Ee=Vn(De);writeFileSync(Re,Ee)},Wn=()=>jsxRuntimeExports.jsxs("div",{className:Ie?"esign-table-container":"table-container",children:[jsxRuntimeExports.jsx("div",{className:"table-scroll-container",children:et.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:[vr&&jsxRuntimeExports.jsx("th",{className:"expand-column"}),i&&et.size>0&&jsxRuntimeExports.jsx("th",{className:"checkbox-column",children:o?jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:At.size>0,onChange:()=>{Vt(new Set)}}):jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:Nt.length>0&&(()=>{const Z=Ke&&Ke.length>0?Ke:at||[],ne=Nt.filter(le=>!(typeof tt=="function"?tt(le):!1));return ne.length>0&&ne.every(le=>{let he=gt(le);if(he===void 0){const xe=Z.indexOf(le);xe>=0&&(he=`__row_${xe}`)}return he!==void 0&&At.has(he)})})(),onChange:Z=>{const ne=new Set(At),le=Ke&&Ke.length>0?Ke:at||[],he=Nt.filter(Re=>!(typeof tt=="function"?tt(Re):!1)).map(Re=>{const De=gt(Re);if(De!==void 0)return De;const Ee=le.indexOf(Re);return Ee>=0?`__row_${Ee}`:void 0}).filter(Re=>Re!==void 0),xe=new Set(he);if(Z){if(Vt(new Set(xe)),typeof Ce=="function"){const Re=Array.from(xe),De=Re.map(Ee=>le.find(be=>{const Fe=gt(be);return Fe!==void 0&&(Fe===Ee||String(Fe)===String(Ee))})).filter(Boolean);try{Ce.length===1?Ce({ids:Re,rows:De,toggledId:void 0,toggledRow:void 0,toggledChecked:!0}):Ce(De)}catch{try{Ce(De)}catch{}}}}else{const Re=new Set(ne);if(he.forEach(De=>Re.delete(De)),Vt(Re),typeof Ce=="function"){const De=he,Ee=De.map(be=>le.find(Fe=>{const $e=gt(Fe);return $e!==void 0&&($e===be||String($e)===String(be))})).filter(Boolean);try{Ce.length===1?Ce({ids:Array.from(Re),rows:Array.from(Re).map(be=>le.find(Fe=>{const $e=gt(Fe);return $e!==void 0&&($e===be||String($e)===String(be))})).filter(Boolean),unselectedIds:De,unselectedRows:Ee,toggledId:void 0,toggledRow:void 0,toggledChecked:!1}):Ce(Array.from(Re).map(be=>le.find(Fe=>{const $e=gt(Fe);return $e!==void 0&&($e===be||String($e)===String(be))})).filter(Boolean))}catch{try{Ce([])}catch{}}}}}})}),bt.filter(Z=>pt.find(le=>le.id===Z)&&et.has(Z)).map(Z=>{const ne=pt.find(le=>le.id===Z);return ne?jsxRuntimeExports.jsx("th",{className:Ir(ne.id,"table-header-cell"),style:{width:St[ne.id]?`${St[ne.id]}px`:ne.width||"150px",minWidth:"80px",maxWidth:"600px",...jr(ne.id,"header")},children:jsxRuntimeExports.jsxs("div",{className:"column-header",children:[jsxRuntimeExports.jsxs("span",{className:"column-label-with-info",children:[ne.label,ne.tooltip&&jsxRuntimeExports.jsx("img",{src:InfoIcon,alt:"info",title:ne.tooltip,width:14,height:14,className:"info-icon"})]}),jsxRuntimeExports.jsxs("div",{className:"column-actions",children:[pe&&jsxRuntimeExports.jsx("img",{src:SortIcon,alt:"Sort",title:"Sort",width:14,height:14,onClick:()=>jn(ne.id),style:{cursor:"pointer",transition:"transform 0.2s ease-in-out",transform:(nt==null?void 0:nt.column)===ne.id?nt.direction==="asc"?"rotate(0deg)":"rotate(180deg)":"none",filter:(nt==null?void 0:nt.column)===ne.id?"brightness(0.6)":"none"}}),ye&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:ne.id===$t?Nr:null,children:[jsxRuntimeExports.jsx("span",{className:`dropdown-trigger ${me[ne.id]?"filter-active":""}`,onClick:le=>{le.stopPropagation(),nn(ne.id)},title:me[ne.id]?`Filter: ${me[ne.id].operator} "${me[ne.id].value}"`:"Filter options",children:"⋮"}),$t===ne.id&&jsxRuntimeExports.jsxs("div",{className:"dropdown-menu",ref:le=>{le&&setTimeout(()=>sn(le),0)},children:[jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{se(ne.id),oe(!0),Ot(null)},children:"Filter"}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{nr(ne.id,"","contains"),Ot(null)},children:"Contains..."}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{nr(ne.id,"","equals"),Ot(null)},children:"Equals..."}),me[ne.id]&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{const le={...me};delete le[ne.id],je(le),ge(""),se("");const he=Lt(Ke,le,Ge);yt(he),Ne(0),Ot(null)},children:"Clear Filter"}),Object.keys(me).length>0&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{je({}),ge(""),se(""),fe(null),ht(""),yt(Ke),Ne(0),Ot(null)},children:"Clear All Filters"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"column-resizer",onMouseDown:le=>Dn(le,ne.id)})]})},ne.id):null}),mr&&jsxRuntimeExports.jsx("th",{className:"table-header-cell action-column",style:{width:`${Xr}px`,minWidth:`${Xr}px`,textAlign:"center"},children:"Action"})]}),qt&&jsxRuntimeExports.jsxs("tr",{className:"filter-row",children:[vr&&jsxRuntimeExports.jsx("td",{className:"expand-column"}),i&&et.size>0&&jsxRuntimeExports.jsx("td",{className:"checkbox-column"}),bt.filter(Z=>pt.find(le=>le.id===Z)&&et.has(Z)).map(Z=>{var le;const ne=pt.find(he=>he.id===Z);return ne?jsxRuntimeExports.jsxs("td",{className:Ir(ne.id,"filter-cell"),style:{position:"relative",width:St[ne.id]?`${St[ne.id]}px`:ne.width||"150px",minWidth:"80px",maxWidth:"600px",...jr(ne.id,"body")},children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:`Search ${ne.label}`,value:((le=me[ne.id])==null?void 0:le.value)||"",onChange:he=>{const xe=he.target.value;ge(xe),se(ne.id);const Re={...me};xe===""?delete Re[ne.id]:Re[ne.id]={value:xe,operator:"contains"},je(Re);const De=Lt(Ke,Re,Ge);yt(De),Ne(0)},className:"filter-input-with-clear filter-input-padding"}),me[ne.id]&&jsxRuntimeExports.jsx("span",{className:"filter-clear-icon-inside",onClick:()=>{const he={...me};delete he[ne.id],je(he),ge(""),se("");const xe=Lt(Ke,he,Ge);yt(xe),Ne(0)},title:"Clear",children:"×"})]},`filter-${ne.id}`):null}),mr&&jsxRuntimeExports.jsx("td",{className:"action-column"})]})]}),jsxRuntimeExports.jsx("tbody",{children:Nt.length===0?jsxRuntimeExports.jsx("tr",{className:"no-records-row",children:jsxRuntimeExports.jsx("td",{colSpan:(vr?1:0)+(i?1:0)+Array.from(et).length+(mr?1:0),className:"no-records-cell",children:Ge.trim()||Object.keys(me).length>0?jsxRuntimeExports.jsxs("div",{style:{minHeight:"200px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"40px 20px",color:"#666",fontSize:"1em",background:"#fafafa",border:"1px solid #eee",borderRadius:"8px",gap:"20px"},children:[(Ge.trim()||Object.keys(me).length>0)&&jsxRuntimeExports.jsxs("div",{style:{backgroundColor:"#e8f5e9",border:"1px solid #4caf50",borderRadius:"6px",padding:"12px 16px",width:"100%",maxWidth:"400px",textAlign:"left"},children:[jsxRuntimeExports.jsx("p",{style:{margin:"0 0 8px 0",fontSize:"0.875em",fontWeight:"600",color:"#333"},children:"Applied Search Criteria:"}),Ge.trim()&&jsxRuntimeExports.jsxs("p",{style:{margin:"4px 0",fontSize:"0.85em",color:"#555"},children:[jsxRuntimeExports.jsx("strong",{children:"Search Query:"})," ",jsxRuntimeExports.jsxs("span",{style:{backgroundColor:"#fff",padding:"2px 6px",borderRadius:"3px",border:"1px solid #ccc"},children:['"',Ge.trim(),'"']})]}),Object.keys(me).length>0&&jsxRuntimeExports.jsxs("div",{style:{marginTop:"6px"},children:[jsxRuntimeExports.jsx("p",{style:{margin:"0 0 4px 0",fontSize:"0.85em",color:"#555"},children:jsxRuntimeExports.jsx("strong",{children:"Filters:"})}),Object.entries(me).map(([Z,ne])=>{const le=pt.find(he=>he.id===Z);return jsxRuntimeExports.jsxs("p",{style:{margin:"3px 0",fontSize:"0.8em",color:"#666",paddingLeft:"12px"},children:["• ",(le==null?void 0:le.label)||Z,":"," ",jsxRuntimeExports.jsxs("span",{style:{backgroundColor:"#fff",padding:"2px 6px",borderRadius:"3px",border:"1px solid #ccc"},children:['"',ne.value,'"']})]},Z)})]})]}),jsxRuntimeExports.jsx("div",{style:{textAlign:"center"},children:jsxRuntimeExports.jsx("p",{style:{margin:"0",fontSize:"1.1em",fontWeight:"500"},children:Ge.trim()&&Object.keys(me).length>0?"No data matches both the search query and filters":Ge.trim()?"No data matches the search query":"No data matches the applied filters"})}),(Ge.trim()||Object.keys(me).length>0)&&jsxRuntimeExports.jsx(CEButton,{variant:"primary",size:"small",onClick:()=>{ht(""),je({}),ge(""),se(""),fe(null),yt(Ke),Ne(0)},children:"Clear All Filters"})]}):"No Data found"})}):Nt.map((Z,ne)=>{const le=typeof tt=="function"?tt(Z):!1,xe=(Ke&&Ke.length>0?Ke:at).indexOf(Z),Re=gt(Z,xe>=0?xe:ke*Pe+ne),De=G&&Ut!==null&&Re!==void 0&&(Re===Ut||String(Re)===String(Ut));return jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsxs("tr",{onMouseEnter:()=>Ye(ke*Pe+ne),onMouseLeave:()=>Ye(null),className:(Z.isNewRow?`table-new-row ${Z.hasError?"row-error":""}`:ne%2===0?`table-row-even ${Z.hasError?"row-error":Z.isModified?"row-invalid":""}`:`table-row-odd ${Z.hasError?"row-error":Z.isModified?"row-invalid":""}`)+(Yt===ke*Pe+ne?" row-hovered":"")+(le?" row-disabled":""),title:Z.rowMessage||"",style:{...typeof Ve=="function"?Ve(Z):{}},children:[vr&&jsxRuntimeExports.jsx("td",{className:"expand-column",children:Array.from(et).some(Ee=>Array.isArray(Z[Ee])&&Z[Ee].length>0&&Z[Ee].some(be=>typeof be=="object"&&be!==null))&&jsxRuntimeExports.jsx("button",{className:"expand-button",onClick:()=>rn(ne),children:Array.from(Ze).some(Ee=>Ee.startsWith(`${ne}`))?"▼":"▶"})}),i&&et.size>0&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:(()=>{const Ee=gt(Z,ke*Pe+ne);return Ee!==void 0&&At.has(Ee)})(),onChange:Ee=>{if(le)return;const be=gt(Z,ke*Pe+ne);if(be===void 0)return;let Fe;o?(Fe=Ee?new Set([be]):new Set,Vt(Fe)):(Fe=new Set(At),Ee?Fe.add(be):Fe.delete(be),Vt(Fe));const $e=Ke&&Ke.length>0?Ke:at||[],Xe=Array.from(Fe),st=Xe.map(vt=>{if(typeof vt=="string"&&vt.startsWith("__row_")){const Tt=parseInt(vt.slice(6),10);return!isNaN(Tt)&&Tt>=0&&Tt<$e.length?$e[Tt]:void 0}return $e.find(Tt=>{const _t=gt(Tt);return _t!==void 0&&(_t===vt||String(_t)===String(vt))})}).filter(Boolean),xt={ids:Xe,rows:st,toggledId:be,toggledRow:Z,toggledChecked:!!Ee};if(typeof Ce=="function")try{Ce.length===1?Ce(xt):Ce(st)}catch{try{Ce(st)}catch{}}},disabled:le})}),f&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:"selected",checked:(m==null?void 0:m(ne))==="selected",onChange:()=>p==null?void 0:p({rowIndex:ne,columnId:"selected",rowData:Z})})})}),bt.filter(Ee=>pt.find(Fe=>Fe.id===Ee)&&et.has(Ee)).map(Ee=>{const be=pt.find($e=>$e.id===Ee);if(!be)return null;const Fe=De?$n(be,Z):!1;return jsxRuntimeExports.jsx("td",{style:{width:St[be.id]?`${St[be.id]}px`:"150px",minWidth:"80px",maxWidth:"600px",...jr(be.id,"body")},className:Ir(be.id,`table-cell ${Cr(be.id,Z[be.id],Z)?"ce-clickable-cell":""} ${De?Fe?"ce-editable-cell":"ce-readonly-cell":""}`),onClick:$e=>{Cr(be.id,Z[be.id],Z)?Nn(Z,be.id,$e):Array.isArray(Z[be.id])&&Z[be.id].length>0&&rn(ne,be.id)},children:Z.isNewRow?jsxRuntimeExports.jsx(AddNewRowCell,{row:Z,column:be,colId:Ee}):De&&Fe?be.elementType==="number-input"?jsxRuntimeExports.jsx("input",{type:"number",title:`Edit ${be.label||be.id}`,"aria-label":`Edit ${be.label||be.id}`,value:(jt==null?void 0:jt[be.id])??"",onChange:$e=>Pr(be.id,$e.target.value),style:{width:"100%"}}):be.elementType==="date-picker"?jsxRuntimeExports.jsx("input",{type:"date",title:`Edit ${be.label||be.id}`,"aria-label":`Edit ${be.label||be.id}`,value:Mn(jt==null?void 0:jt[be.id]),onChange:$e=>Pr(be.id,$e.target.value),style:{width:"100%"}}):jsxRuntimeExports.jsx("input",{type:"text",title:`Edit ${be.label||be.id}`,"aria-label":`Edit ${be.label||be.id}`,value:(jt==null?void 0:jt[be.id])??"",onChange:$e=>Pr(be.id,$e.target.value),style:{width:"100%"}}):React.isValidElement(Z[be.id])?Z[be.id]:(Array.isArray(l)?l.includes(be.id):l===be.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:(()=>{const $e=gt(Z,ke*Pe+ne);return($e!==void 0?Zt[String($e)]||[]:[]).includes(be.id)||Zr(Z[be.id])})(),onChange:$e=>Sn({row:Z,rowIndex:ne,columnId:be.id,checked:$e}),disabled:le})}):(Array.isArray(d)?d.includes(be.id):d===be.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:be.id,checked:Tn(Z)===be.id,onChange:()=>wn({rowIndex:ne,columnId:be.id,rowData:Z})})}):Array.isArray(Z[be.id])?`${Z[be.id].length}`:typeof Z[be.id]=="object"&&Z[be.id]!==null?Object.entries(Z[be.id]).map(([$e,Xe])=>`${$e}: ${Xe}`).join(", "):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(Z[be.id]??"")})},be.id)}),mr&&jsxRuntimeExports.jsx("td",{className:"center-text action-column",children:jsxRuntimeExports.jsxs("div",{className:"action-flex",children:[hr&&!G&&jsxRuntimeExports.jsx("img",{src:Edit,alt:"Edit",title:"Edit",width:20,height:20,style:{cursor:"pointer"},onClick:()=>j==null?void 0:j(Z,ne)}),hr&&G&&(De?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:SaveIcon,alt:"Save",title:"Save",width:20,height:20,style:{cursor:"pointer"},onClick:Ln}),jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",title:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:Rr})]}):jsxRuntimeExports.jsx("img",{src:ee||Edit,alt:"Inline Edit",title:"Inline Edit",width:20,height:20,style:{cursor:"pointer"},onClick:()=>{Ut===null&&(Fn(Z,ne),j==null||j(Z,ne))}})),T&&jsxRuntimeExports.jsx("img",{src:Reassign,alt:"Reassign",width:20,height:20,style:{cursor:"pointer"},onClick:B}),C&&jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:()=>X==null?void 0:X(Z,ne)}),b&&jsxRuntimeExports.jsx("img",{src:Approve,alt:"Approve",width:20,height:20,style:{cursor:"pointer"},onClick:()=>F==null?void 0:F(Z,ne)}),S&&jsxRuntimeExports.jsx("img",{src:Delete,alt:"Delete",width:20,height:20,style:{cursor:"pointer"},onClick:()=>D==null?void 0:D(Z,ne)}),A&&jsxRuntimeExports.jsx("img",{src:CopyIcon,alt:"Copy",title:"Copy",width:20,height:20,style:{cursor:"pointer"},onClick:()=>U==null?void 0:U(Z,ne)}),R&&jsxRuntimeExports.jsx("img",{src:ViewIcon,alt:"View",title:"View",width:20,height:20,style:{cursor:"pointer"},onClick:()=>N==null?void 0:N(Z,ne)}),_&&jsxRuntimeExports.jsx("img",{src:Add,alt:"Add",width:20,height:20,style:{cursor:"pointer"},onClick:I}),mt.map(Ee=>Ee.condition&&!Ee.condition(Z)?null:jsxRuntimeExports.jsx("img",{src:Ee.icon,alt:Ee.title,title:Ee.title,width:20,height:20,style:{cursor:"pointer"},onClick:()=>Ee.onClick(Z,ne)},Ee.id))]})})]}),Array.from(Ze).map(Ee=>{const[be,Fe]=Ee.split("-");if(Number(be)===ne){const $e=Fe?{[Fe]:Z[Fe]}:Object.keys(Z).filter(Xe=>Array.isArray(Z[Xe])||typeof Z[Xe]=="object").reduce((Xe,st)=>({...Xe,[st]:Z[st]}),{});return jsxRuntimeExports.jsx("tr",{className:"expanded-row",children:jsxRuntimeExports.jsx("td",{colSpan:et.size+2,className:"expanded-cell",children:Object.entries($e).map(([Xe,st],xt)=>jsxRuntimeExports.jsxs("div",{className:`expanded-section ${xt%2===0?"expanded-section-even":"expanded-section-odd"}`,style:{backgroundColor:xt%2===0?"#e8f5e9":"#e3f2fd",padding:"10px",marginBottom:"10px",borderRadius:"5px"},children:[jsxRuntimeExports.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:Xe.charAt(0).toUpperCase()+Xe.slice(1)}),Tr(st)]},Xe))})},`expanded-${Ee}`)}return null})]},ne)})})]},`table-${Array.from(et).join("|")}__${bt.join("|")}`)}),we&&jsxRuntimeExports.jsxs("div",{className:"pagination-container",children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"40px"},children:[jsxRuntimeExports.jsx(EntriesInfo,{dataLength:at.length,currentPage:ke,rowsPerPage:Pe,totalRecords:Kr}),jsxRuntimeExports.jsx(RowsPerPageSelector,{rowsPerPage:Pe,setRowsPerPage:_n,setCurrentPage:tr,pageSizeOptions:We})]}),jsxRuntimeExports.jsx(PaginationControls,{currentPage:ke,totalPages:dr,setCurrentPage:tr})]}),J&&jsxRuntimeExports.jsx("div",{className:"filter-modal",children:jsxRuntimeExports.jsxs("div",{className:"filter-modal-content",ref:Er,onKeyDown:In,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:()=>oe(!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:ae,onChange:Z=>se(Z.target.value),className:"filter-select","aria-label":"Filter column",title:"Select column to filter",children:pt.map(Z=>jsxRuntimeExports.jsx("option",{value:Z.id,children:Z.label},Z.id))})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Operator:"}),jsxRuntimeExports.jsxs("select",{value:ve,onChange:Z=>Te(Z.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:"Date Range",children:"Date Range"}),jsxRuntimeExports.jsx("option",{value:"is any of",children:"Is any of"})]}),ve==="Date Range"&&jsxRuntimeExports.jsx("div",{style:{marginTop:"10px"},children:jsxRuntimeExports.jsx(CEDateRangePicker,{mode:"range",onChange:Z=>{fe({startDate:Z.startDate,endDate:Z.endDate})}})})]}),ve!=="Date Range"&&jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Value:"}),jsxRuntimeExports.jsx("input",{type:"text",value:_e,onChange:Z=>ge(Z.target.value),placeholder:"Enter filter value",title:"Filter value",className:"filter-input",autoFocus:!0,onKeyDown:Z=>{Z.key==="Enter"&&an(),Z.key==="Escape"&&oe(!1)}})]}),Object.keys(me).length>0&&jsxRuntimeExports.jsxs("div",{className:"active-filters-summary",children:[jsxRuntimeExports.jsx("div",{className:"active-filters-header",children:"Active Filters:"}),Object.entries(me).map(([Z,ne])=>{const le=pt.find(he=>he.id===Z);return jsxRuntimeExports.jsxs("div",{className:"active-filter-item",children:[jsxRuntimeExports.jsxs("span",{children:[(le==null?void 0:le.label)||Z,": "]}),jsxRuntimeExports.jsx("span",{className:"filter-operator",children:ne.operator}),jsxRuntimeExports.jsxs("span",{className:"filter-value",children:['"',ne.value,'"']})]},Z)})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-footer",children:[jsxRuntimeExports.jsx(CEButton,{onClick:()=>{je({}),yt(Ke),Ne(0),oe(!1)},className:"clear-filters-button",variant:"outlined",children:"Clear All"}),jsxRuntimeExports.jsx(CEButton,{onClick:an,className:"apply-filter-button",variant:"primary",children:"Apply Filter"})]})]})})]}),zn=()=>{if(q)It(!0),Promise.resolve(q()).catch(()=>{}).finally(()=>{It(!1)});else if(Oe&&rt)It(!0),Promise.resolve(rt(ke,Pe)).catch(()=>{}).finally(()=>{It(!1)});else{It(!0);const Z=Array.isArray(t)?[...t]:[],ne=nt??Ae??null,le=ne!=null&&ne.column?[...Z].sort((De,Ee)=>{const be=Ht(De,Ee,ne.column);return ne.direction==="asc"?be:-be}):Z,he=Lt(le,me,Ge);Pt(le),yt(he);const xe=Oe?Kt??he.length:he.length,Re=Math.max(0,Math.ceil(Math.max(xe,1)/Pe)-1);ke>Re&&Ne(Re),It(!1)}},Ar=pt.filter(Z=>Z.shouldVisible!==!1),bt=React.useMemo(()=>{const Z=Ar.map(he=>he.id),ne=ft.filter(he=>Z.includes(he)),le=Z.filter(he=>!ne.includes(he));return[...ne,...le]},[ft,Ar]),on=React.useMemo(()=>bt.filter(Z=>et.has(Z)),[bt,et]),Un=40,ir=React.useMemo(()=>lt.filter(Z=>et.has(Z)),[lt,et]),Or=React.useMemo(()=>{const Z={};let ne=i||f?Un:0;return ir.forEach(le=>{Z[le]=ne;const he=pt.find(De=>De.id===le),xe=St[le],Re=typeof xe=="number"&&xe>0?xe:typeof(he==null?void 0:he.width)=="string"&&parseFloat(he.width)||150;ne+=Re}),Z},[ir,pt,St,i,f]),Hn=ir.length>0?ir[ir.length-1]:null,jr=(Z,ne)=>Z in Or?{position:"sticky",left:Or[Z],zIndex:ne==="header"?12:6,backgroundColor:ne==="header"?"#e0e0e0":void 0,boxShadow:"none"}:{},Ir=(Z,ne="")=>{const le=[ne];return Z in Or&&(le.push("ce-frozen-column"),Z===Hn&&le.push("ce-frozen-column-boundary")),le.filter(Boolean).join(" ")},Gn=JSON.stringify(Be??null);React.useEffect(()=>{if(Be==null)return;let Z=[];if(typeof Be=="number"){const ne=Math.max(0,Math.floor(Be));Z=on.slice(0,ne)}else{const ne=new Set(Be.filter(le=>typeof le=="string").map(le=>le.trim()).filter(Boolean));Z=bt.filter(le=>ne.has(le))}Dt(ne=>yr(ne,Z)?ne:Z)},[Gn,bt,on]);const qn=Z=>{Dt(ne=>{const le=ne.includes(Z)?ne.filter(he=>he!==Z):[...ne,Z].sort((he,xe)=>{const Re=bt.indexOf(he),De=bt.indexOf(xe);return Re-De});if(typeof Qe=="function")try{Qe(le)}catch{}return le})},Kn=Ar.every(Z=>et.has(Z.id));return React.useEffect(()=>{if(bt.length!==0){if(bt.length!==ft.length){wt(bt);return}for(let Z=0;Z<bt.length;Z++)if(bt[Z]!==ft[Z]){wt(bt);return}}},[bt,ft]),jsxRuntimeExports.jsxs("div",{className:`datatable-wrapper${ur?" 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:[g&&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 Z=!qt;Xt(Z),Z||(je({}),yt(Ke),Ne(0),ht(""))}}),Ge&&jsxRuntimeExports.jsx("button",{className:"search-cancel-button",onClick:()=>{ht(""),Cn()},children:"×"})]}),Se&&jsxRuntimeExports.jsx("img",{src:ShowOrHideColumn,alt:"Columns",title:Nt.length>0?"Show/Hide Columns":"No data available",width:20,height:20,style:{cursor:Nt.length>0?"pointer":"not-allowed",fill:"#808080",opacity:Nt.length>0?1:.4,filter:Nt.length===0?"grayscale(100%)":"none"},onClick:()=>{Nt.length>0&&Wt(!0)}}),Object.keys(me).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:()=>{je({}),yt(Ke),Ne(0)}}),O&&jsxRuntimeExports.jsx("img",{src:FileOpenRounded,alt:"Export",title:"Export All to Excel",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",fill:"#808080"},onClick:()=>gr(!0)}),ue&&jsxRuntimeExports.jsx("img",{src:ReloadIcon,alt:"Reload",title:"Reload Data",width:20,height:20,className:"ce-reload-icon",style:{cursor:"pointer",fill:"#808080"},onClick:zn}),H&&jsxRuntimeExports.jsxs("div",{ref:Mr,children:[jsxRuntimeExports.jsx("img",{src:ExportIcon,alt:"Download",title:"Download",width:20,height:20,className:"ce-export-icon icon-button dropdown-trigger",style:{cursor:"pointer"},onClick:Z=>{Z.stopPropagation(),Q&&Q.length>0?nn("download"):gr()}}),(()=>{const Z=Q??[],ne=Z.find(xe=>xe.usedefault===!0),le=Z.filter(xe=>!xe.usedefault);let he=[];return Z.length>0?ne?he=[{label:ne.label,onClick:()=>{ne.forceAll?gr(!0):gr()}},...le]:he=[...le]:he=[],$t==="download"&&he.length>0&&jsxRuntimeExports.jsx("div",{className:"dropdown-menu",ref:xe=>{xe&&setTimeout(()=>sn(xe),0)},children:he.map((xe,Re)=>jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:De=>{De.stopPropagation();try{xe.onClick()}finally{Ot(null)}},children:xe.label},Re))})})()]}),de&&jsxRuntimeExports.jsx("button",{className:"fullscreen-button",onClick:ur?gn:vn,title:ur?"Exit Full Screen":"Full Screen",children:ur?"⤫":"⤢"})]})]}),Ft&&jsxRuntimeExports.jsx("div",{className:"cecol-modal-overlay",onMouseDown:()=>tn(),children:jsxRuntimeExports.jsxs("div",{className:"cecol-modal-content",ref:un,onMouseDown:Z=>Z.stopPropagation(),children:[jsxRuntimeExports.jsx("div",{className:"cecol-modal-header",children:jsxRuntimeExports.jsx("button",{className:"cecol-modal-close-button",onClick:()=>tn(),children:"×"})}),jsxRuntimeExports.jsx("h3",{className:"cecol-modal-title",children:"Column Visibility and Order"}),jsxRuntimeExports.jsx("p",{className:"cecol-modal-description",children:"Use the checkboxes to show or hide columns."}),jsxRuntimeExports.jsx("div",{className:"cecol-modal-actions",children:jsxRuntimeExports.jsx("div",{className:"cecol-select-all-action",children:jsxRuntimeExports.jsxs("label",{className:"cecol-native-checkbox",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:Kn,onChange:Z=>{const ne=Z.target.checked;Rt(ne?new Set(pt.filter(le=>le.shouldVisible!==!1).map(le=>le.id)):new Set)}}),jsxRuntimeExports.jsx("span",{children:"Select All"})]})})}),jsxRuntimeExports.jsx("div",{className:"cecol-list-container",children:bt.filter(Z=>pt.find(ne=>ne.id===Z&&ne.shouldVisible!==!1)).map(Z=>{const ne=pt.find(le=>le.id===Z);return ne?jsxRuntimeExports.jsxs("div",{className:`cecol-item${Qt===ne.id?" cecol-item-dragging":""}${Dr===ne.id&&Qt!==ne.id?" cecol-item-drag-over":""}`,onDragOver:le=>{le.preventDefault(),!(!Qt||Qt===ne.id)&&(le.dataTransfer.dropEffect="move",or(ne.id))},onDrop:le=>{le.preventDefault();const he=Qt||le.dataTransfer.getData("text/plain");he&&Pn(he,ne.id),br(null),or(null)},onDragLeave:()=>{Dr===ne.id&&or(null)},onClick:le=>{const he=!et.has(ne.id);en(ne.id,he)},children:[jsxRuntimeExports.jsx("span",{className:"cecol-drag-handle",title:"Drag to reorder",draggable:!0,onMouseDown:le=>le.stopPropagation(),onClick:le=>le.stopPropagation(),onDragStart:le=>{le.stopPropagation(),br(ne.id),le.dataTransfer.effectAllowed="move",le.dataTransfer.setData("text/plain",ne.id)},onDragEnd:()=>{br(null),or(null)},children:"⋮⋮"}),jsxRuntimeExports.jsx("div",{className:"cecol-checkbox-wrapper",children:jsxRuntimeExports.jsxs("label",{className:"cecol-native-checkbox",onClick:le=>le.stopPropagation(),children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:et.has(ne.id),onClick:le=>le.stopPropagation(),onChange:le=>{le.stopPropagation(),en(ne.id,le.target.checked)}}),jsxRuntimeExports.jsx("span",{className:"cecol-label-text",children:ne.label??ne.id??"-"})]})}),Me&&jsxRuntimeExports.jsx("button",{className:`column-freeze-toggle${lt.includes(ne.id)?" active":""}`,title:lt.includes(ne.id)?"Unpin column":"Pin column (freeze left)",onClick:le=>{le.stopPropagation(),qn(ne.id)},children:lt.includes(ne.id)?"📌 Unpin":"📌 Pin"})]},ne.id):null})})]})}),hn?jsxRuntimeExports.jsx(CESkeletonTable,{columns:pt.length||5,rows:Pe||10}):Wn()]})},DateInputPart=({value:e,onChange:t,max:n,min:i,length:o,placeholder:l,className:u,onClick:f,id:p,name:m,disabled:d=!1})=>{const g=React.useRef(null),_=b=>{if(d)return;const T=b.target.value.replace(/\D/g,"");if(T.length<=o){if(T.length===1){const C=parseInt(T);if(n===12&&C>1){t(`0${C}`);return}if(n===31&&C>3){t(`0${C}`);return}}if(T.length===2){const C=parseInt(T);C>=i&&C<=n&&t(T);return}t(T)}},E=()=>{var b;d||(b=g.current)==null||b.select()},S=()=>{e.length===1&&t(e.padStart(2,"0"))};return jsxRuntimeExports.jsx("input",{ref:g,type:"text",value:e,onChange:_,onFocus:E,onBlur:S,id:p,name:m,onClick:f,maxLength:o,disabled:d,className:u??"date-input-part",placeholder:l})},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"],CALENDAR_HEIGHT_PX=290,GAP_PX=8,YEAR_PAGE_SIZE=12,getYearRangeForYear=e=>{const t=e-e%YEAR_PAGE_SIZE;return{start:t,end:t+YEAR_PAGE_SIZE-1}},CEDatePicker=({onChange:e,label:t="Calendar",value:n,focused:i=!1,id:o,name:l,disablePastDates:u=!1,minDate:f,maxDate:p,disabled:m=!1})=>{const[d,g]=React.useState(!1),[_,E]=React.useState(null),[S,b]=React.useState(()=>{const Oe=new Date;return new Date(Oe.getFullYear(),Oe.getMonth(),Oe.getDate())}),[T,C]=React.useState(!1),[A,R]=React.useState({start:2020,end:2031}),[O,j]=React.useState("left"),[I,D]=React.useState(0),F=React.useRef(null),[B,X]=React.useState(i),[U,N]=React.useState(""),[G,ee]=React.useState(""),[te,z]=React.useState(""),[K,L]=React.useState(!0),[W,Y]=React.useState({left:0,top:0}),V=React.useCallback((Oe=new Date)=>new Date(Oe.getFullYear(),Oe.getMonth(),Oe.getDate()),[]),M=React.useCallback((Oe,Me,Be)=>{if(!Oe||!Me||!Be)return null;const ze=Number(Oe),Qe=Number(Me),ut=Number(Be);if(!Number.isInteger(ze)||!Number.isInteger(Qe)||!Number.isInteger(ut))return null;const ct=new Date(ut,ze-1,Qe);return ct.getFullYear()!==ut||ct.getMonth()!==ze-1||ct.getDate()!==Qe?null:ct},[]),q=React.useMemo(()=>{if(f==null||f==="")return null;let Oe;if(typeof f=="string"){const[Me,Be,ze]=f.split("-");Oe=new Date(Number(Me),Number(Be)-1,Number(ze))}else Oe=new Date(f.getFullYear(),f.getMonth(),f.getDate());return isNaN(Oe.getTime())?null:Oe},[f]),H=React.useMemo(()=>{if(p==null||p==="")return null;let Oe;if(typeof p=="string"){const[Me,Be,ze]=p.split("-");Oe=new Date(Number(Me),Number(Be)-1,Number(ze))}else Oe=new Date(p.getFullYear(),p.getMonth(),p.getDate());return isNaN(Oe.getTime())?null:Oe},[p]),Q=React.useMemo(()=>u?V():null,[u,V]),ue=React.useMemo(()=>Q?q?Q.getTime()>q.getTime()?Q:q:Q:q,[q,Q]),de=React.useCallback(()=>{g(!1),!U&&!G&&!te&&X(!1)},[G,U,te]);useEscapeKey(de);const Se=React.useRef(void 0);React.useEffect(()=>{if(n){const[Oe,Me,Be]=n.split("/"),ze=M(Oe,Me,Be);if(ze){E(ze),b(Qe=>Qe.getFullYear()!==ze.getFullYear()||Qe.getMonth()!==ze.getMonth()||Qe.getDate()!==ze.getDate()?ze:Qe),N(Oe),ee(Me),z(Be),R(getYearRangeForYear(ze.getFullYear())),L(!0),Se.current=n;return}}Se.current&&b(V()),E(null),N(""),ee(""),z(""),L(!0),Se.current=n},[M,V,n]);const pe=React.useRef(null),ye=()=>{const Oe=F.current;if(!Oe)return;const Me=Oe.getBoundingClientRect(),Be=window.scrollY||window.pageYOffset,Qe=(window.innerHeight||document.documentElement.clientHeight)-Me.bottom,ut=Me.top;Qe<CALENDAR_HEIGHT_PX&&ut>=CALENDAR_HEIGHT_PX?Y({left:Me.left+window.scrollX,top:Me.top+Be-CALENDAR_HEIGHT_PX-GAP_PX}):Y({left:Me.left+window.scrollX,top:Me.bottom+Be+GAP_PX})};React.useEffect(()=>{if(!pe.current)return;const Oe=pe.current;Oe.style.position="absolute",Oe.style.left=`${Math.max(8,W.left)}px`,Oe.style.top=`${W.top}px`,Oe.style.zIndex="99999"},[W,d]);const Ae=React.useCallback(Oe=>{const Me=V(Oe);b(Me),C(!1),R(getYearRangeForYear(Me.getFullYear())),_&&(N(String(Me.getMonth()+1).padStart(2,"0")),ee(String(Me.getDate()).padStart(2,"0")),z(String(Me.getFullYear()))),D(Be=>Be+1),setTimeout(ye,0)},[V,_]),ie=React.useCallback(()=>{d||(Ae(_||V()),g(!0))},[V,d,_,Ae]),Ie=()=>{if(d){g(!1);return}ie()};React.useEffect(()=>{if(!d)return;const Oe=()=>ye(),Me=()=>ye();return window.addEventListener("scroll",Oe,!0),window.addEventListener("resize",Me),()=>{window.removeEventListener("scroll",Oe,!0),window.removeEventListener("resize",Me)}},[d]),React.useEffect(()=>{const Oe=Me=>{const Be=Me.target;if(!F.current)return;const ze=F.current.contains(Be),Qe=pe.current?pe.current.contains(Be):!1;!ze&&!Qe&&de()};return document.addEventListener("mousedown",Oe),()=>document.removeEventListener("mousedown",Oe)},[U,G,te,de]);const we=Oe=>{const Me=new Date(S.getFullYear(),S.getMonth(),Oe);if(u&&Q&&Me.getTime()<Q.getTime()||q&&Me.getTime()<q.getTime()||H&&Me.getTime()>H.getTime())return;E(Me),b(Me);const Be=String(Me.getMonth()+1).padStart(2,"0"),ze=String(Me.getDate()).padStart(2,"0"),Qe=String(Me.getFullYear());N(Be),ee(ze),z(Qe),L(!0),e(`${Be}/${ze}/${Qe}`),g(!1)},Ue=Oe=>{j(Oe>0?"left":"right"),b(Me=>{const Be=new Date(Me.getFullYear(),Me.getMonth()+Oe,1);return D(ze=>ze+1),Be})},We=Oe=>R(Me=>({start:Me.start+Oe*10,end:Me.end+Oe*10})),Ce=React.useCallback(Oe=>{const Me=new Date(S.getFullYear(),S.getMonth()+Oe,1);if(Oe<0&&ue){const Be=new Date(ue.getFullYear(),ue.getMonth(),1);if(Me.getTime()<Be.getTime())return!1}if(Oe>0&&H){const Be=new Date(H.getFullYear(),H.getMonth(),1);if(Me.getTime()>Be.getTime())return!1}return!0},[S,ue,H]),qe=ue==null?void 0:ue.getFullYear(),Je=H==null?void 0:H.getFullYear(),rt=Oe=>{if(qe!==void 0&&Oe<qe||Je!==void 0&&Oe>Je)return;const Me=new Date(Oe,S.getMonth(),1);b(Me),C(!1)},tt=()=>{const Oe=new Date(S.getFullYear(),S.getMonth(),1),Me=new Date(S.getFullYear(),S.getMonth()+1,0),Be=Oe.getDay(),ze=Me.getDate(),Qe=Q,ut=ot=>Qe?!_&&Qe.getDate()===ot&&Qe.getMonth()===S.getMonth()&&Qe.getFullYear()===S.getFullYear():!1,ct=[];for(let ot=0;ot<Be;ot++)ct.push(jsxRuntimeExports.jsx("div",{className:"dp-day empty"},`empty-${ot}`));for(let ot=1;ot<=ze;ot++){const Ct=(_==null?void 0:_.getDate())===ot&&(_==null?void 0:_.getMonth())===S.getMonth()&&(_==null?void 0:_.getFullYear())===S.getFullYear(),He=new Date(S.getFullYear(),S.getMonth(),ot);let Et=!1;u&&Qe&&He.getTime()<Qe.getTime()&&(Et=!0),q&&He.getTime()<q.getTime()&&(Et=!0),H&&He.getTime()>H.getTime()&&(Et=!0),ct.push(jsxRuntimeExports.jsx("div",{className:`dp-day ${Ct?"selected":""} ${ut(ot)?"today":""} ${Et?"disabled":""}`,onClick:()=>{Et||we(ot)},"aria-label":Et?"Date unavailable":"Select date","data-disabled":Et?"true":"false",tabIndex:Et?-1:0,children:ot},ot))}return ct},Ve=(Oe,Me,Be)=>{if(!Oe||!Me||!Be){L(!1);const Qe=new Date;b(new Date(Qe.getFullYear(),Qe.getMonth(),Qe.getDate())),E(null);return}const ze=M(Oe,Me,Be);if(ze){if(u&&Q&&ze.getTime()<Q.getTime()||q&&ze.getTime()<q.getTime()||H&&ze.getTime()>H.getTime()){L(!1),E(null),b(V());return}E(ze),b(ze),L(!0),e(`${Oe}/${Me}/${Be}`)}else L(!1),E(null),b(V()),N(Oe),ee(Me),z(Be)},mt=jsxRuntimeExports.jsx("div",{className:"dp-wrapper",ref:F,children:jsxRuntimeExports.jsxs("div",{className:`dp-input-container${B||d?" focused":""}${_||U||G||te?" has-value":""}${K?"":" invalid"}${m?" dp-disabled":""}`,"aria-disabled":m?"true":"false",children:[jsxRuntimeExports.jsx("div",{className:"dp-label floating",children:t}),jsxRuntimeExports.jsxs("div",{className:`dp-input-wrapper${m?" dp-input-wrapper-disabled":""}`,onClick:()=>{m||X(!0)},children:[jsxRuntimeExports.jsx(DateInputPart,{value:U,onChange:Oe=>{m||(N(Oe),Ve(Oe,G,te))},max:12,min:1,length:2,placeholder:"MM",onClick:m?void 0:ie,id:o?`${o}-month`:void 0,name:l?`${l}-month`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx(DateInputPart,{value:G,onChange:Oe=>{m||(ee(Oe),Ve(U,Oe,te))},placeholder:"DD",max:31,min:1,length:2,onClick:m?void 0:ie,id:o?`${o}-day`:void 0,name:l?`${l}-day`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("input",{type:"text",value:te,onChange:Oe=>{if(m)return;const Me=Oe.target.value.replace(/\D/g,"");Me.length<=4&&(z(Me),Me.length===4&&Ve(U,G,Me))},onFocus:Oe=>{m||Oe.target.select()},onClick:m?void 0:ie,onBlur:()=>{!m&&te.length===4&&Ve(U,G,te)},className:"date-input-part",id:o?`${o}-year`:void 0,name:l?`${l}-year`:void 0,maxLength:4,placeholder:"YYYY",disabled:m}),jsxRuntimeExports.jsx("span",{className:`dp-icon${m?" dp-icon-disabled":""}`,onClick:m?void 0:Ie,children:jsxRuntimeExports.jsx("img",{src:DateRangeIcon,alt:"Calendar Icon"})})]})]})}),it=jsxRuntimeExports.jsxs("div",{className:"dp-calendar",ref:pe,role:"dialog","aria-modal":"true",children:[jsxRuntimeExports.jsxs("div",{className:"dp-header",children:[jsxRuntimeExports.jsxs("div",{className:"dp-title",onClick:()=>C(Oe=>!Oe),children:[T?`${A.start} - ${A.end}`:`${S.toLocaleString("default",{month:"long"})} ${S.getFullYear()}`,jsxRuntimeExports.jsx("button",{type:"button",className:"dp-toggle-icon",children:"▾"})]}),jsxRuntimeExports.jsxs("div",{className:"dp-controls",children:[jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>T?We(-1):Ue(-1),disabled:T?!1:!Ce(-1),children:"‹"}),jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>T?We(1):Ue(1),disabled:T?!1:!Ce(1),children:"›"})]})]}),!T&&jsxRuntimeExports.jsx("div",{className:"dp-weekdays",children:WEEKDAYS.map(Oe=>jsxRuntimeExports.jsx("div",{className:"dp-weekday",children:Oe},Oe))}),T?jsxRuntimeExports.jsx("div",{className:"dp-years-grid",children:Array.from({length:A.end-A.start+1},(Oe,Me)=>{const Be=A.start+Me;return jsxRuntimeExports.jsx("div",{className:`dp-year-item ${qe!==void 0&&Be<qe||Je!==void 0&&Be>Je?"disabled":""}`,onClick:()=>rt(Be),"aria-disabled":qe!==void 0&&Be<qe||Je!==void 0&&Be>Je?"true":"false",children:Be},Be)})}):jsxRuntimeExports.jsx("div",{className:`dp-days dp-slide-${O}`,children:tt()},I)]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[mt,d&&!m&&ReactDOM.createPortal(it,document.body)]})},FieldsInput=({label:e,name:t,placeholder:n="",value:i="",onChange:o,size:l="medium"})=>{const[u,f]=React.useState(!1),[p,m]=React.useState(!1),d=getSizeStyle$1(l);React.useEffect(()=>{i&&i.trim().length>0&&m(!0)},[i]);const g=()=>{f(!0),m(!0)},_=S=>{f(!1),S.target.value.trim()||m(!1)},E=u||!!i;return jsxRuntimeExports.jsxs("div",{className:`floating-input-wrapper${p?" focused":""}`,style:d,children:[jsxRuntimeExports.jsx("label",{htmlFor:t,className:"floating-label",children:e}),jsxRuntimeExports.jsx("input",{id:t,name:t,className:"floating-input",placeholder:E?n:"",value:i,onChange:o,onFocus:g,onBlur:_})]})},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:n="1rem",alignItems:i="stretch",justifyItems:o="stretch",gridTemplateColumns:l})=>jsxRuntimeExports.jsx("div",{className:"grid-container",style:{display:"grid",width:"100%",gridTemplateColumns:l||`repeat(${t}, 1fr)`,gap:n,alignItems:i,justifyItems:o,backgroundColor:"transparent"},children:e}),CELogo=({src:e,alt:t="Logo",style:n})=>jsxRuntimeExports.jsx("img",{src:e,alt:t,style:{height:25,...n}}),CESearchBar=({onFocus:e,onBlur:t,quickActions:n=[],recentSearches:i=[]})=>{const[o,l]=React.useState(!1),[u,f]=React.useState(""),[p,m]=React.useState(n),[d,g]=React.useState(i),_=(S,b)=>{S==="quickActions"?m(T=>T.filter((C,A)=>A!==b)):g(T=>T.filter((C,A)=>A!==b))},E=()=>{u.trim()!==""&&(g(S=>[u,...S]),f(""))};return jsxRuntimeExports.jsxs("div",{className:"ceui-search-bar",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",className:"ceui-search-input",value:u,onChange:S=>f(S.target.value),onFocus:()=>{l(!0),e&&e()},onBlur:()=>{setTimeout(()=>l(!1),200),t&&t()},onKeyDown:S=>{S.key==="Enter"&&E()}}),o&&jsxRuntimeExports.jsxs("div",{className:"ceui-search-suggestions",children:[p.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Quick actions"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:p.map((S,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[S,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("quickActions",b),children:"✕"})]},b))})]}),d.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Recent search"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:d.map((S,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[S,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("recentSearches",b),children:"✕"})]},b))})]})]})]})},CESearchButton=({showSuggestions:e=!1,quickActions:t=[],recentSearches:n=[]})=>{const[i,o]=React.useState(!1),[l,u]=React.useState(!1),f=React.useRef(null),p=d=>{f.current&&!f.current.contains(d.target)&&(o(!1),u(!1))},m=()=>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(()=>(i?document.addEventListener("mousedown",p):document.removeEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}),[i]),console.log("isSearchOpen:",i),console.log("showDropdown:",l),console.log("showSuggestions:",e),jsxRuntimeExports.jsxs("div",{ref:f,className:`ceui-animated-search-wrapper ${i?"expanded":"collapsed"}`,children:[jsxRuntimeExports.jsx("button",{className:"ceui-search-button","aria-label":"Open search",onClick:()=>o(!0),children:jsxRuntimeExports.jsx(m,{})}),i&&jsxRuntimeExports.jsx(CESearchBar,{showSuggestions:i&&(e||l),onFocus:()=>u(!0),onBlur:()=>{setTimeout(()=>u(!1),200)},quickActions:t,recentSearches:n})]})},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),n=React.useRef(null),i=()=>t(!e),o=l=>{n.current&&!n.current.contains(l.target)&&t(!1)};return React.useEffect(()=>(e?document.addEventListener("mousedown",o):document.removeEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}),[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:i}),e&&jsxRuntimeExports.jsxs("div",{ref:n,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:n,logoWidth:i,showSearchButton:o=!1,quickActions:l=[],recentSearches:u=[],showHelpButton:f=!1,showNotificationButton:p=!1,showAvatarMenu:m=!1,showUserInfo:d=!1,showHamburgerButton:g=!1,showDrawer:_=!1,userInfoProps:E,onMenuClick:S,drawerJsonUrl:b="",isDrawerOpen:T=!1,onDrawerClose:C})=>{const A=()=>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:n||35,width:i||"auto",maxWidth:120}}):jsxRuntimeExports.jsx(A,{})}),jsxRuntimeExports.jsxs("div",{className:"ceui-header-right",children:[o&&jsxRuntimeExports.jsx(CESearchButton,{showSuggestions:!0,quickActions:l,recentSearches:u,value:"",onChange:()=>{},onClear:()=>{}}),f&&jsxRuntimeExports.jsx(CEHelpButton,{}),p&&jsxRuntimeExports.jsx(CENotificationButton,{}),m&&jsxRuntimeExports.jsx(CEAvatarMenu,{}),d&&E&&jsxRuntimeExports.jsx(CEUserInfo,{name:E.name,role:E.role})]})]}),_&&g&&jsxRuntimeExports.jsx(CEDrawer,{jsonUrl:b,isOpen:T,onClose:C||(()=>{})})]})},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"})}),CEShowMoreLessTextArea=({value:e,onChange:t,id:n,name:i,onChangeMeta:o,placeholder:l="",rows:u,maxLength:f,required:p=!1,errorMessage:m="Invalid input",showError:d=!0,label:g,labelSuffix:_,disabled:E=!1,style:S={},size:b="medium",onFocus:T,onBlur:C,autoFocus:A=!1,alwaysShowLabel:R,maxLines:O=2})=>{const[j,I]=React.useState(!1),[D,F]=React.useState(!1),[B,X]=React.useState(!1),[U,N]=React.useState(0),G=React.useRef(null),ee=React.useRef(null),te=React.useRef(null),z=e==null?"":String(e),K=Math.max(1,O),L=getSizeStyle$1(b||"medium"),W=React.useMemo(()=>({fontSize:L.fontSize,padding:L.padding,...S}),[L.fontSize,L.padding,S]),Y=typeof W.fontSize=="number"?`${W.fontSize}px`:String(W.fontSize),V=typeof W.padding=="number"?`${W.padding}px`:String(W.padding),M=typeof W.lineHeight=="number"?`${W.lineHeight}px`:typeof W.lineHeight=="string"&&W.lineHeight.trim().length>0?W.lineHeight:"24px",q=Number.parseFloat(Y),H=Number.parseFloat(M),Q=Number.isFinite(H)?H:Number.isFinite(q)?q*1.5:24,ue=React.useCallback(()=>{const ie=ee.current,Ie=te.current;if(!ie||!Ie)return;const we=Q*K;N(we),Ie.style.width=`${ie.clientWidth}px`,Ie.style.padding=V,Ie.style.fontSize=Y,Ie.style.fontFamily=String(W.fontFamily||"inherit"),Ie.style.fontWeight=String(W.fontWeight||"inherit"),Ie.style.lineHeight=M,Ie.style.letterSpacing=String(W.letterSpacing||"normal"),Ie.style.wordBreak="break-word",Ie.style.overflowWrap="anywhere",Ie.style.whiteSpace="pre-wrap",Ie.textContent=z||"";const Ue=Ie.scrollHeight;X(Ue>we+.5)},[Q,W.fontFamily,W.fontWeight,W.letterSpacing,z,Y,M,V,K]);React.useEffect(()=>{G.current&&(G.current.style.height="auto",G.current.style.height=`${G.current.scrollHeight}px`)},[z,D]),React.useLayoutEffect(()=>{ue();const ie=window.requestAnimationFrame(ue);return()=>window.cancelAnimationFrame(ie)},[ue]),React.useEffect(()=>{if(!ee.current)return;const ie=new ResizeObserver(()=>{ue()});return ie.observe(ee.current),()=>ie.disconnect()},[ue]),React.useEffect(()=>{B||F(!1)},[B]);const de=d&&p&&!z,Se=B&&!D,pe=!!g&&(R||!!z||j||l&&l.trim().length>0),ye=ie=>{I(!0),T==null||T(ie)},Ae=ie=>{I(!1),C==null||C(ie)};return jsxRuntimeExports.jsxs("div",{className:`validated-input-wrapper ${j?"focused":""} ${de?"error":""} ${E?"disabled":""}`,children:[g&&jsxRuntimeExports.jsxs("label",{className:`validated-input-label ${pe?"shrink":""}`,children:[g,p&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"}),_&&jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:_})]}),jsxRuntimeExports.jsxs("div",{className:"ce-sm-textarea-scope",ref:ee,children:[jsxRuntimeExports.jsx("div",{ref:te,"aria-hidden":"true",className:"ce-sm-textarea-measure"}),Se?jsxRuntimeExports.jsxs("div",{className:"ce-sm-collapsed-box",children:[jsxRuntimeExports.jsx("div",{style:{padding:V},children:jsxRuntimeExports.jsx("div",{className:"ce-sm-collapsed-text",style:{maxHeight:`${U}px`,fontSize:Y,lineHeight:M},children:z})}),jsxRuntimeExports.jsx("div",{className:"ce-sm-more-less-row",children:jsxRuntimeExports.jsx("button",{type:"button",className:"ce-sm-more-less-btn",onClick:()=>F(!0),children:"Show more"})})]}):jsxRuntimeExports.jsxs("div",{className:"ce-sm-expanded-wrap",children:[jsxRuntimeExports.jsx("textarea",{ref:G,rows:u,value:z,onChange:ie=>{t(ie.target.value),o==null||o(ie.target.value,{id:n,name:i})},onFocus:ye,onBlur:Ae,placeholder:l||" ",id:n,name:i,className:`validated-input-field ce-sm-textarea ${de?"input-error":""}`,disabled:E,style:W,autoFocus:A,maxLength:f}),B&&jsxRuntimeExports.jsx("div",{className:"ce-sm-more-less-row",children:jsxRuntimeExports.jsx("button",{type:"button",className:"ce-sm-more-less-btn",onClick:()=>F(!1),children:"Show less"})})]})]}),d&&de&&jsxRuntimeExports.jsx("div",{className:"validated-input-error",children:m})]})},InputDropDown=({options:e,selected:t,onChange:n,multiple:i=!1,placeholder:o="Select...",size:l="medium",style:u={},allowClear:f=!0,showInputPills:p=!0,id:m,name:d,required:g=!1,enableSelectAll:_=!1,selectAllLabel:E="Select All",isSearchField:S=!1})=>{const[b,T]=React.useState(!1),[C,A]=React.useState(!1),[R,O]=React.useState(""),j=React.useRef(null),I=React.useRef([]),[D,F]=React.useState(-1),B=React.useRef(null),U={...getSizeStyle$1(l),...u},N=S?e.filter(M=>M.label.toLowerCase().includes(R.toLowerCase())):e,G=M=>{if(i){const q=t.includes(M)?t.filter(H=>H!==M):[...t,M];n(q)}else n([M]),T(!1)},ee=()=>n([]),te=M=>{n(t.filter(q=>q!==M))},z=e.filter(M=>t.includes(M.value)).map(M=>M.label),K=e.map(M=>M.value),L=i&&t.length===K.length&&K.length>0,W=()=>{n(L?[]:K)};React.useEffect(()=>{const M=q=>{var H;(H=B.current)!=null&&H.contains(q.target)||T(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]),React.useEffect(()=>{!b&&S&&O("")},[b,S]),React.useEffect(()=>{b||F(-1)},[b]),React.useEffect(()=>{b&&S&&requestAnimationFrame(()=>{var M;(M=j.current)==null||M.focus()})},[b,S]);const Y=M=>{var q;if(!b&&(M.key==="Enter"||M.key==="ArrowDown")){M.preventDefault(),T(!0);return}if(M.key==="ArrowDown"&&(M.preventDefault(),V(D+1)),M.key==="ArrowUp"&&(M.preventDefault(),D<=0&&S?((q=j.current)==null||q.focus(),F(-1)):V(D-1)),M.key==="Escape"&&T(!1),M.key==="Tab"&&T(!1),M.key==="Enter"&&b){M.preventDefault();const H=N[D];H&&G(H.value)}},V=M=>{var H;const q=N.length-1;M<0||M>q||(F(M),(H=I.current[M])==null||H.focus())};return jsxRuntimeExports.jsx("div",{className:`dropdown-container ${b||t.length>0?"float":""}`,ref:B,style:U,id:m,"data-name":d,"aria-required":g,children:jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${b?"open":""}`,onFocus:()=>{A(!0)},onClick:()=>T(M=>!M),onKeyDown:Y,tabIndex:0,children:[jsxRuntimeExports.jsxs("label",{className:"floating-placeholder",children:[o,g&&jsxRuntimeExports.jsx("span",{className:"required-asterisk","aria-hidden":"true",children:"*"})]}),jsxRuntimeExports.jsx("div",{className:"selected-display",children:t.length===0?"":i?p?z.map((M,q)=>jsxRuntimeExports.jsxs("span",{className:"chip",children:[M,jsxRuntimeExports.jsx("span",{className:"close-icon",onClick:H=>{var Q;H.stopPropagation(),te(((Q=e.find(ue=>ue.label===M))==null?void 0:Q.value)||"")},children:"×"})]},q)):jsxRuntimeExports.jsx("div",{className:"selected-display-label",children:z.join(",")}):jsxRuntimeExports.jsx("span",{children:z[0]})}),f&&t.length>0&&jsxRuntimeExports.jsx("button",{className:"clear-button",onClick:M=>{M.stopPropagation(),ee()},children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M6 9l6 6 6-6"})})}),b&&jsxRuntimeExports.jsxs("ul",{className:"dropdown-options",children:[S&&jsxRuntimeExports.jsx("li",{className:"component-add-dropdown-search",onClick:M=>M.stopPropagation(),children:jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",value:R,autoFocus:!0,onChange:M=>O(M.target.value),onKeyDown:M=>{M.key==="ArrowDown"&&(M.preventDefault(),V(0))}})}),i&&_&&jsxRuntimeExports.jsxs("li",{className:`dropdown-option select-all ${L?"selected":""}`,onClick:M=>{M.stopPropagation(),W()},children:[jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:L}),E]}),N.map((M,q)=>jsxRuntimeExports.jsxs("li",{ref:H=>I.current[q]=H,tabIndex:0,className:`dropdown-option ${t.includes(M.value)?"selected":""}`,onClick:H=>{H.stopPropagation(),G(M.value)},onKeyDown:H=>{var Q;H.key==="ArrowDown"&&(H.preventDefault(),V(q+1)),H.key==="ArrowUp"&&(H.preventDefault(),q===0&&S?((Q=j.current)==null||Q.focus(),F(-1)):V(q-1)),H.key==="Enter"&&G(M.value)},children:[i&&jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:t.includes(M.value)}),M.label]},M.value)),S&&N.length===0&&jsxRuntimeExports.jsx("li",{className:"dropdown-empty",children:"No results found"})]})]})})},CELinearProgressBar=({duration:e,color:t="#4caf50",backgroundColor:n="#e0e0e0",height:i="10px",isActive:o=!1})=>{const l=React.useRef(null);return React.useEffect(()=>{const u=l.current;if(!(!u||!o))return u.style.width="0%",u.style.transition="none",u.offsetWidth,requestAnimationFrame(()=>{u&&(u.style.transition=`width ${e}ms linear`,u.style.width="100%")}),()=>{u&&(u.style.width="0%",u.style.transition="none")}},[e,o]),jsxRuntimeExports.jsx("div",{className:"snackbar__progress-container",style:{height:i},children:jsxRuntimeExports.jsx("div",{ref:l,className:"snackbar__progress-bar"})})},CEMenuBar=({menuData:e})=>{const[t,n]=React.useState({}),i=(p,m)=>{n(d=>({...d,[p]:m}))};useEscapeKey(()=>{n({})});const l=p=>p.children&&p.children.length>0,u=p=>p.some(m=>l(m)),f=(p,m="")=>!p||p.length===0?null:jsxRuntimeExports.jsx("ul",{className:m?"ce-submenu":"ce-dropdown",children:p.map(d=>{const g=m?`${m}-${d.name}`:d.name,_=l(d);return jsxRuntimeExports.jsxs("li",{className:`ce-dropdown-item ${_?"has-submenu":""}`,onMouseEnter:()=>_&&i(g,!0),onMouseLeave:()=>_&&i(g,!1),onClick:()=>console.log(`Clicked: ${d.name}`),children:[d.name,_&&jsxRuntimeExports.jsx("span",{className:"ce-icon right",children:"▶"}),_&&t[g]&&f(d.children,g)]},g)})});return jsxRuntimeExports.jsx("div",{className:"ce-menu-bar",children:jsxRuntimeExports.jsx("div",{className:"ce-menu-container",children:e.map(p=>{const m=u(p.items);return jsxRuntimeExports.jsxs("div",{className:"ce-menu-item",onMouseEnter:()=>m&&i(p.title,!0),onMouseLeave:()=>m&&i(p.title,!1),children:[jsxRuntimeExports.jsxs("button",{className:"ce-menu-button",children:[p.title,m&&jsxRuntimeExports.jsx("span",{className:"ce-icon",children:"▼"})]}),m&&t[p.title]&&f(p.items,p.title)]},p.title)})})})},CEPagination=({currentPage:e,totalPages:t,onPageChange:n})=>{const i=()=>{const p=[];if(t<=8)for(let m=0;m<t;m++)p.push(m);else if(e<7){for(let m=0;m<8;m++)p.push(m);p.push("..."),p.push(t-1)}else if(e>=t-8+1){p.push(0),p.push("...");for(let m=t-8;m<t;m++)p.push(m)}else{p.push(0),p.push("...");for(let m=e-3;m<=e+3;m++)p.push(m);p.push("..."),p.push(t-1)}return p},o=f=>{typeof f=="number"&&n(f)},l=()=>{e>0&&n(e-1)},u=()=>{e<t-1&&n(e+1)};return jsxRuntimeExports.jsxs("div",{className:"pagination",children:[jsxRuntimeExports.jsx("button",{onClick:l,disabled:e===0,className:"pagination-button",children:"Previous"}),i().map((f,p)=>typeof f=="number"?jsxRuntimeExports.jsx("button",{onClick:()=>o(f),className:`pagination-button page-number ${e===f?"active":""}`,children:f+1},p):jsxRuntimeExports.jsx("span",{className:"pagination-ellipsis",children:f},p)),jsxRuntimeExports.jsx("button",{onClick:u,disabled:e===t-1,className:"pagination-button",children:"Next"})]})},CERadioButtonGroup=({options:e,name:t,defaultValue:n,onChange:i,direction:o="horizontal",id:l,nameAttr:u,disabled:f=!1})=>{const[p,m]=React.useState(n||""),d=g=>{m(g),i(g)};return jsxRuntimeExports.jsx("div",{className:`radio-button-group ${o}`,role:"radiogroup","aria-labelledby":t,id:l,children:e.map(g=>jsxRuntimeExports.jsx("div",{className:"radio-button",children:jsxRuntimeExports.jsx(CERadioButton,{label:g.label,value:g.value,checked:p===g.value,onChange:d,id:l?`${l}-${g.value}`:void 0,name:u,disabled:f})},g.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:n="100%",height:i="auto",minHeight:o="200px",maxHeight:l="none",className:u="",style:f={},editorStyle:p={}})=>{const m=React.useRef(null),[d,g]=React.useState("3"),[_,E]=React.useState("Arial"),[S,b]=React.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1,subscript:!1,superscript:!1,justifyLeft:!0,justifyCenter:!1,justifyRight:!1,justifyFull:!1});React.useEffect(()=>{m.current&&e&&(m.current.innerHTML=e)},[e]);const T=React.useCallback(I=>{try{return document.queryCommandState(I)}catch{return!1}},[]),C=React.useCallback(()=>{b({bold:T("bold"),italic:T("italic"),underline:T("underline"),strikeThrough:T("strikethrough"),subscript:T("subscript"),superscript:T("superscript"),justifyLeft:T("justifyLeft"),justifyCenter:T("justifyCenter"),justifyRight:T("justifyRight"),justifyFull:T("justifyFull")})},[T]),A=React.useCallback((I,D="")=>{var X,U;const F=saveSelection(),B=document.getSelection();if(I==="createLink"){const N=prompt("Enter URL:");if(N){restoreSelection(F),document.execCommand("createLink",!1,N);const G=(X=B==null?void 0:B.anchorNode)==null?void 0:X.parentElement;G instanceof HTMLAnchorElement&&(G.target="_blank",G.rel="noopener noreferrer")}}else if(I==="insertImage"){const N=prompt("Enter image URL:");if(N){restoreSelection(F);const G=`<img src="${N}" alt="image" style="max-width: 100%; height: auto;"/>`;document.execCommand("insertHTML",!1,G)}}else I==="fontSize"||I==="fontName"?(restoreSelection(F),document.execCommand(I,!0,D),I==="fontSize"?g(D):E(D)):(restoreSelection(F),document.execCommand(I,!1,D));m.current&&(t==null||t(m.current.innerHTML)),(U=m.current)==null||U.focus(),C()},[t,C]),R=I=>{if(I.key==="Tab"&&(I.preventDefault(),document.execCommand("insertHTML",!1," ")),I.ctrlKey||I.metaKey)switch(I.key.toLowerCase()){case"z":I.preventDefault(),I.shiftKey?A("redo"):A("undo");break;case"y":I.preventDefault(),A("redo");break}},O=[{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"}],j=["Arial","Times New Roman","Courier New","Georgia","Verdana","Helvetica","Serif Fonts","Algerian"];return jsxRuntimeExports.jsxs("div",{className:`rich-text-editor ${u}`,style:{width:n,height:i,...f},children:[jsxRuntimeExports.jsxs("div",{className:"toolbar",children:[jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("bold"),className:`toolbar-button ${S.bold?"active":""}`,title:"Bold",children:jsxRuntimeExports.jsx("strong",{children:"B"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("italic"),className:`toolbar-button ${S.italic?"active":""}`,title:"Italic",children:jsxRuntimeExports.jsx("em",{children:"I"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("underline"),className:`toolbar-button ${S.underline?"active":""}`,title:"Underline",children:jsxRuntimeExports.jsx("u",{children:"U"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("strikeThrough"),className:`toolbar-button ${S.strikeThrough?"active":""}`,title:"Strike Through",children:jsxRuntimeExports.jsx("s",{children:"S"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("subscript"),className:`toolbar-button ${S.subscript?"active":""}`,title:"Subscript",children:"X₂"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("superscript"),className:`toolbar-button ${S.superscript?"active":""}`,title:"Superscript",children:"X²"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyLeft"),className:`toolbar-button ${S.justifyLeft?"active":""}`,title:"Align Left",children:"⇤"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyCenter"),className:`toolbar-button ${S.justifyCenter?"active":""}`,title:"Center",children:"⇔"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyRight"),className:`toolbar-button ${S.justifyRight?"active":""}`,title:"Align Right",children:"⇥"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyFull"),className:`toolbar-button ${S.justifyFull?"active":""}`,title:"Justify",children:"≡"})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("insertUnorderedList"),className:"toolbar-button",title:"Bullet List",children:"●"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertOrderedList"),className:"toolbar-button",title:"Numbered List",children:"1. 2. 3."})]}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:d,onChange:I=>A("fontSize",I.target.value),className:"toolbar-select",title:"Font Size",children:O.map(I=>jsxRuntimeExports.jsx("option",{value:I.value,children:I.label},I.value))})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:_,onChange:I=>A("fontName",I.target.value),className:"toolbar-select",title:"Font Family",children:j.map(I=>jsxRuntimeExports.jsx("option",{value:I,children:I},I))})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("createLink"),className:"toolbar-button",title:"Insert Link",children:"🔗"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertImage"),className:"toolbar-button",title:"Insert Image",children:"📷"})]}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("undo"),className:"toolbar-button",title:"Undo (Ctrl+Z)",children:"↩"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("redo"),className:"toolbar-button",title:"Redo (Ctrl+Y)",children:"↪"})]})]}),jsxRuntimeExports.jsx("div",{ref:m,className:"editor-content",contentEditable:!0,style:{minHeight:o,maxHeight:l,height:i==="auto"?"auto":"100%",...p},onKeyDown:R,onKeyUp:C,onMouseUp:C,onInput:()=>{m.current&&(t==null||t(m.current.innerHTML)),C()}})]})},CETabView=({tabs:e,renderContent:t,variant:n="top"})=>{var f;const i=React.useMemo(()=>e.map(p=>{if(typeof p=="string")return{key:p,label:p};const m=p.key??p.label??"tab",d=p.label??p.key??"Tab";return{key:m,label:d,icon:p.icon,badgeCount:p.badgeCount}}),[e]),[o,l]=React.useState(((f=i[0])==null?void 0:f.key)??"");if(React.useEffect(()=>{if(!i.length)return;i.some(m=>m.key===o)||l(i[0].key)},[i,o]),!i.length)return null;const u=n==="top";return jsxRuntimeExports.jsxs("div",{className:`tabview-container ${u?"tabview-container-top":"tabview-container-sidebar"}`,children:[u?jsxRuntimeExports.jsx("div",{className:"tabview-topbar",role:"tablist","aria-label":"Tab navigation",children:i.map(p=>{const m=o===p.key;return jsxRuntimeExports.jsxs("button",{className:`tabview-top-tab ${m?"tabview-top-tab-active":""}`,onClick:()=>l(p.key),role:"tab",tabIndex:m?0:-1,children:[p.icon&&jsxRuntimeExports.jsx("span",{className:"tabview-icon",children:p.icon}),jsxRuntimeExports.jsx("span",{className:"tabview-label",children:p.label}),p.badgeCount!==void 0&&p.badgeCount!==null?jsxRuntimeExports.jsx("span",{className:"tabview-badge","aria-label":`${p.badgeCount} items`,children:p.badgeCount}):null]},p.key)})}):jsxRuntimeExports.jsx("div",{className:"tabview-sidebar",role:"tablist","aria-label":"Tab navigation",children:i.map(p=>{const m=o===p.key;return jsxRuntimeExports.jsxs("div",{className:`tabview-tab ${m?"tabview-tab-active":""}`,onClick:()=>l(p.key),role:"tab",tabIndex:m?0:-1,children:[p.icon&&jsxRuntimeExports.jsx("span",{className:"tabview-icon",children:p.icon}),jsxRuntimeExports.jsx("span",{className:"tabview-label",children:p.label}),p.badgeCount!==void 0&&p.badgeCount!==null?jsxRuntimeExports.jsx("span",{className:"tabview-badge","aria-label":`${p.badgeCount} items`,children:p.badgeCount}):null]},p.key)})}),jsxRuntimeExports.jsx("div",{className:"tabview-content",role:"tabpanel",children:t(o)})]})},CETemplate=({children:e,headerProps:t,showHeader:n=!0,showFooter:i=!0,containerClassName:o="",containerStyle:l={}})=>jsxRuntimeExports.jsxs("div",{className:`ce-wrapper ${o}`,style:l,children:[n&&jsxRuntimeExports.jsx(CEHeader,{...t}),jsxRuntimeExports.jsx("main",{className:"main-content",children:e}),i&&jsxRuntimeExports.jsx(CEFooter,{})]}),CETimePicker=({label:e="Select Time",onChange:t,initialTime:n="",className:i="",id:o,name:l,disabled:u=!1})=>{const[f,p]=React.useState(!1),[m,d]=React.useState(n),[g,_]=React.useState("12"),[E,S]=React.useState("00"),[b,T]=React.useState("AM"),[C,A]=React.useState(!1),[R,O]=React.useState(""),[j,I]=React.useState(""),D=React.useRef(null);React.useEffect(()=>{u&&(p(!1),A(!1))},[u]);const F=Array.from({length:12},(L,W)=>String(W+1).padStart(2,"0")),B=Array.from({length:60},(L,W)=>String(W).padStart(2,"0")),X=(L,W)=>{if(!L)return"";const Y=parseInt(L);return W==="hours"?Y>12?"12":Y===0?"01":L.padStart(2,"0"):Y>59?"59":L.padStart(2,"0")},U=L=>{const W=L.target.value,Y=L.target.selectionStart||0;let V=g,M=E,q=b,H=m;if(Y<=2){const Q=W.substring(0,2).replace(/[^0-9]/g,"");if(Q){if(Q.length===1){const ue=parseInt(Q);ue>=2&&ue<=9?(V=Q.padStart(2,"0"),setTimeout(()=>{D.current&&D.current.setSelectionRange(3,5)},10)):(V=Q,setTimeout(()=>{D.current&&D.current.setSelectionRange(1,1)},10))}else if(Q.length===2){const ue=parseInt(Q);ue>=1&&ue<=12?(V=Q,setTimeout(()=>{D.current&&D.current.setSelectionRange(3,5)},10)):(V=Q[0],setTimeout(()=>{D.current&&D.current.setSelectionRange(1,1)},10))}H=`${V}:${E} ${b}`}}else if(Y>=3&&Y<=5){const Q=W.indexOf(":")+1,ue=W.substring(Q,Q+2).replace(/[^0-9]/g,"");if(ue){if(ue.length===1)M=ue,H=`${g}:${M} ${b}`,setTimeout(()=>{D.current&&D.current.setSelectionRange(4,4)},10);else if(ue.length===2){const de=parseInt(ue);de>=0&&de<=59?(M=ue,setTimeout(()=>{D.current&&D.current.setSelectionRange(6,8)},10)):(M=ue[0],setTimeout(()=>{D.current&&D.current.setSelectionRange(4,4)},10))}H=`${g}:${M} ${b}`}}else if(Y>=6){const ue=W.substring(W.lastIndexOf(" ")+1).toUpperCase();ue.startsWith("A")?(q="AM",H=`${g}:${E} AM`):ue.startsWith("P")&&(q="PM",H=`${g}:${E} PM`)}_(V),S(M),T(q),d(H),p(!1),t==null||t(H)},N=L=>{if(!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","0","1","2","3","4","5","6","7","8","9",":","A","P","M"," ","a","p","m"].includes(L.key)){L.preventDefault();return}if(L.key==="Enter"||L.key===":"){L.preventDefault();const Y=L.currentTarget.selectionStart||0;if(Y<=2){if(R){const V=X(R,"hours");_(V),O(""),d(`${V}:${E} ${b}`)}L.currentTarget.setSelectionRange(3,5)}else if(Y>=3&&Y<=5){if(j){const V=X(j,"minutes");S(V),I(""),d(`${g}:${V} ${b}`)}L.currentTarget.setSelectionRange(6,8)}}},G=L=>{const W=L.currentTarget.selectionStart||0,Y=D.current;Y&&(W<=1?Y.setSelectionRange(0,2):W>=3&&W<=4?Y.setSelectionRange(3,5):W>=6&&Y.setSelectionRange(6,8))},ee=()=>{u||(p(!0),A(!0))},te=(L,W)=>{const Y=L==="hours"?W:g,V=L==="minutes"?W:E,M=L==="period"?W:b;_(Y),S(V),T(M);const q=`${Y}:${V} ${M}`;d(q),t==null||t(q)},z=()=>{const L=`${g}:${E} ${b}`;d(L),p(!1),t==null||t(L)},K=()=>{d(""),_("12"),S("00"),T("AM"),p(!1),A(!1)};return jsxRuntimeExports.jsxs("div",{className:`time-picker-container ${i}`,children:[jsxRuntimeExports.jsxs("div",{className:`time-picker-input ${f||C?"active":""}`,children:[jsxRuntimeExports.jsx("input",{ref:D,type:"text",id:o,name:l,disabled:u,value:m,onChange:U,onKeyDown:N,onClick:L=>{u||(m||ee(),G(L))},onFocus:()=>A(!0),onBlur:()=>!f&&A(!1),placeholder:C||m?"hh:mm AM":"",className:"time-input",maxLength:8}),jsxRuntimeExports.jsx("label",{className:`floating-label ${f||C||m?"active":""}`,children:e}),jsxRuntimeExports.jsx("span",{className:"clock-icon",onClick:L=>{L.stopPropagation(),!u&&ee()},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 ${f?"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:F.map(L=>jsxRuntimeExports.jsx("div",{className:`time-item ${L===g?"selected":""}`,onClick:()=>te("hours",L),children:L},L))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Minutes"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:B.map(L=>jsxRuntimeExports.jsx("div",{className:`time-item ${L===E?"selected":""}`,onClick:()=>te("minutes",L),children:L},L))})]}),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(L=>jsxRuntimeExports.jsx("div",{className:`period-item ${L===b?"selected":""}`,onClick:()=>te("period",L),children:L},L))})]})]}),jsxRuntimeExports.jsxs("div",{className:"time-picker-actions",children:[jsxRuntimeExports.jsx("button",{className:"time-picker-button cancel",onClick:K,children:"Cancel"}),jsxRuntimeExports.jsx("button",{className:"time-picker-button ok",onClick:z,children:"OK"})]})]})]})},TransferItem=({label:e,checked:t,onChange:n,disabled:i})=>jsxRuntimeExports.jsx(CECheckBox,{label:e,checked:t,onChange:n,disabled:i}),CETransferButton=({label:e,onClick:t,disabled:n=!1,className:i=""})=>jsxRuntimeExports.jsx("button",{onClick:t,disabled:n,className:`transfer-button ${i}`,children:e}),TransferList=({dataUrl:e,onTransfer:t,containerClass:n="",boxClass:i="",buttonClass:o=""})=>{const[l,u]=React.useState([]),[f,p]=React.useState([]),[m,d]=React.useState(!0),[g,_]=React.useState(null),[E,S]=React.useState(new Set),[b,T]=React.useState(new Set);React.useEffect(()=>{(async()=>{var I,D;try{d(!0),_(null);const B=(await axios.get(e)).data.items||[];u(B.slice(0,Math.ceil(B.length/2))),p(B.slice(Math.ceil(B.length/2)))}catch(F){_(axios.isAxiosError(F)?((D=(I=F.response)==null?void 0:I.data)==null?void 0:D.message)||F.message:"An error occurred")}finally{d(!1)}})()},[]);const C=j=>{if(j==="available"){const I=l.filter(F=>E.has(F.id)).sort((F,B)=>{const X=parseInt(F.id.replace(/\D/g,"")),U=parseInt(B.id.replace(/\D/g,""));return X-U}),D=l.filter(F=>!E.has(F.id));u(D),p(F=>[...F,...I].sort((X,U)=>{const N=parseInt(X.id.replace(/\D/g,"")),G=parseInt(U.id.replace(/\D/g,""));return N-G})),S(new Set)}else{const I=f.filter(F=>b.has(F.id)).sort((F,B)=>{const X=parseInt(F.id.replace(/\D/g,"")),U=parseInt(B.id.replace(/\D/g,""));return X-U}),D=f.filter(F=>!b.has(F.id));p(D),u(F=>[...F,...I].sort((X,U)=>{const N=parseInt(X.id.replace(/\D/g,"")),G=parseInt(U.id.replace(/\D/g,""));return N-G})),T(new Set)}t(f,l)},A=(j,I,D)=>{D(F=>{const B=new Set(F);return B.has(j)?B.delete(j):B.add(j),B})},R=(j,I,D)=>F=>{const B=new Set(I),X=j.filter(U=>!U.disabled);F?X.forEach(U=>B.add(U.id)):X.forEach(U=>B.delete(U.id)),D(B)},O=(j,I,D,F)=>{const B=j.filter(ee=>!ee.disabled),X=B.length>0&&B.every(ee=>I.has(ee.id)),U=I.size,N=j.length,G=j.length===0;return jsxRuntimeExports.jsxs("div",{className:`transfer-box ${i}`,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:X,onChange:R(j,I,D),disabled:G})}),jsxRuntimeExports.jsxs("div",{className:"title-section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:F}),jsxRuntimeExports.jsxs("div",{className:"count-text",children:[U,"/",N," selected"]})]})]})}),jsxRuntimeExports.jsx("div",{className:"transfer-items",children:j.map(ee=>jsxRuntimeExports.jsx(TransferItem,{label:ee.label,checked:I.has(ee.id),disabled:ee.disabled,onChange:()=>A(ee.id,I,D)},ee.id))})]})};return m?jsxRuntimeExports.jsx("div",{children:"Loading..."}):g?jsxRuntimeExports.jsxs("div",{children:["Error: ",g]}):jsxRuntimeExports.jsxs("div",{className:`transfer-list-container ${n}`,children:[O(l,E,S,"Choices"),jsxRuntimeExports.jsxs("div",{className:"transfer-buttons",children:[jsxRuntimeExports.jsx(CETransferButton,{label:">>",onClick:()=>C("available"),disabled:E.size===0,className:o}),jsxRuntimeExports.jsx(CETransferButton,{label:"<<",onClick:()=>C("chosen"),disabled:b.size===0,className:o})]}),O(f,b,T,"Chosen")]})},CEBadge=({label:e,backgroundColor:t="#e0e0e0",textColor:n="#000",style:i,id:o,name:l,disable:u=!1})=>jsxRuntimeExports.jsx("span",{id:o,"data-name":l,"aria-disabled":u,style:{backgroundColor:t,color:n,padding:"4px 10px",borderRadius:"12px",fontSize:"12px",display:"inline-block",whiteSpace:"nowrap",...u?{opacity:.6,pointerEvents:"none"}:{},...i},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:n,buttonIcon:i})=>{const[o,l]=React.useState(""),u=()=>{t(o),l("")},f=p=>{p.key==="Enter"&&u()};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:o,onChange:p=>l(p.target.value),onKeyPress:f,placeholder:"Add a note...",className:"add-note-input",rows:3}),jsxRuntimeExports.jsx(CEButton,{label:n,icon:i,variant:"outlinedGreen",onClick:u,sx:{width:"100%",marginTop:"10px"},children:void 0})]}),jsxRuntimeExports.jsx("div",{className:"notes-list",children:e.map(p=>jsxRuntimeExports.jsxs("div",{className:"note-item",children:[jsxRuntimeExports.jsx("div",{className:"note-avatar",children:p.initials}),jsxRuntimeExports.jsxs("div",{className:"note-content",children:[jsxRuntimeExports.jsxs("div",{className:"note-header",children:[jsxRuntimeExports.jsx("span",{className:"note-author",children:p.author}),jsxRuntimeExports.jsx("span",{className:"note-timestamp",children:p.timestamp})]}),jsxRuntimeExports.jsx("div",{className:"note-text",children:p.content})]})]},p.id))})]})},CEStatusDropdown=({options:e,selected:t,onChange:n,placeholder:i="Select status...",size:o="medium",disabled:l=!1,ariaLabel:u="Status selection dropdown",fullButtonAsDropdown:f=!1})=>{const[p,m]=React.useState(!1),d=React.useRef(null),g=e.find(T=>T.value===t),_=T=>{n(T),m(!1)};React.useEffect(()=>{const T=C=>{var A;(A=d.current)!=null&&A.contains(C.target)||m(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const E=T=>{l||(T.key==="Enter"||T.key===" "?(T.preventDefault(),m(!p)):T.key==="Escape"&&m(!1))},S=T=>{if(T!=null&&T.statusType)switch(T.statusType){case"in-progress":return"in-progress";case"declined":return"declined";case"withdrawn":return"withdrawn";default:return""}return""},b=()=>{if(g){const T={};return g.backgroundColor&&(T.backgroundColor=g.backgroundColor),g.textColor&&(T.color=g.textColor),T}return{}};return jsxRuntimeExports.jsxs("div",{className:`status-dropdown-container ${l?"disabled":""} size-${o}`,ref:d,children:[jsxRuntimeExports.jsxs("div",{className:`status-dropdown-trigger ${p?"open":""} ${g?`has-selection ${S(g)}`:""}`,onClick:()=>{l||(f?m(!p):_((g==null?void 0:g.value)||""))},onKeyDown:E,tabIndex:l?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":p?"true":"false","aria-label":u,style:b(),children:[jsxRuntimeExports.jsx("span",{className:"status-text",children:g?g.label:i}),jsxRuntimeExports.jsx("span",{className:"status-dropdown-icon",onClick:T=>{T.stopPropagation(),!l&&m(!p)},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 ${p?"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"})})})]}),p&&!l&&jsxRuntimeExports.jsx("ul",{className:"status-dropdown-options",role:"listbox","aria-label":"Status options",children:e.map(T=>{const C={};return T.backgroundColor&&(C.backgroundColor=T.backgroundColor),T.textColor&&(C.color=T.textColor),jsxRuntimeExports.jsxs("li",{className:`status-dropdown-option ${t===T.value?"selected":""} ${S(T)}`,onClick:()=>_(T.value),role:"option","aria-selected":t===T.value?"true":"false",style:C,children:[jsxRuntimeExports.jsx("span",{className:"option-indicator",children:T.icon?T.icon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[T.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"})]}),T.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"})]}),T.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"})]})]})}),T.label]},T.value)})})]})},CEToggleYesNo=({value:e,onChange:t,label:n,disabled:i=!1})=>jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("div",{className:"label",children:n}),jsxRuntimeExports.jsxs("div",{className:"toggle-group",children:[jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="yes"?"primary":"outlined",className:`toggle-btn ${e==="yes"?"active":""}`,disabled:i,onClick:()=>{i||t("yes")},children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"YES"]}),jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="no"?"primary":"outlined",className:`toggle-btn ${e==="no"?"active":""}`,disabled:i,onClick:()=>{i||t("no")},children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"NO"]})]})]}),days=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CEOperatingDaysSelector=({selectedDays:e,onChange:t})=>{const n=i=>{e.includes(i)?t(e.filter(o=>o!==i)):t([...e,i])};return jsxRuntimeExports.jsx("div",{className:"days-group",children:days.map(i=>jsxRuntimeExports.jsx(CEButton,{size:"small",variant:e.includes(i)?"primary":"outlined",className:`day-btn ${e.includes(i)?"active":""}`,onClick:()=>n(i),children:i},i))})},CERoundTabNav=({tabs:e,activeTab:t,onTabClick:n,tabBarBgColor:i,tabBarItemBgColor:o})=>jsxRuntimeExports.jsx("div",{className:"om-om-radiusTab-bar-nwo",style:{backgroundColor:i||"#6fb744"},children:e.map(l=>jsxRuntimeExports.jsx("div",{className:`om-radiusTab-item-nwo ${l.value===t?"active":""}`,onClick:u=>n(l.value,u),style:{backgroundColor:l.value===t?o||"#ebebf0":""},children:l.label},l.value))}),CEAccordion=({children:e})=>jsxRuntimeExports.jsx("div",{className:"accordion-container",children:e}),CEAccordionItem=({title:e,children:t,initiallyOpen:n=!1})=>{const[i,o]=React.useState(n);return jsxRuntimeExports.jsxs("div",{className:"accordion-item",children:[jsxRuntimeExports.jsxs("button",{className:`accordion-header ${i?"open":""}`,onClick:()=>o(!i),children:[jsxRuntimeExports.jsx("span",{className:"accordion-title",children:e}),jsxRuntimeExports.jsx("span",{className:`accordion-icon ${i?"open":""}`,children:jsxRuntimeExports.jsxs("svg",{width:"21",height:"12",viewBox:"0 0 21 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_20728_2951)",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 1.89L19.094 0.5L10.487 8.761L9.569 7.88L9.574 7.885L1.927 0.545L0.5 1.914L10.487 11.5L20.5 1.89Z",fill:"black"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_20728_2951",children:jsxRuntimeExports.jsx("rect",{width:"11",height:"20",fill:"white",transform:"matrix(0 -1 1 0 0.5 11.5)"})})})]})})]}),i&&jsxRuntimeExports.jsx("div",{className:"accordion-content",children:t})]})},CEToggleSlide=({checked:e,onToggle:t,label:n,disabled:i=!1})=>{const o=()=>{i||t(!e)};return jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("span",{className:"toggle-label",children:n}),jsxRuntimeExports.jsxs("label",{className:`toggle-switch ${i?"disabled":""}`,children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:e,onChange:o,disabled:i,className:"toggle-checkbox"}),jsxRuntimeExports.jsx("span",{className:"toggle-slider"})]})]})};var DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React.createContext&&React.createContext(DefaultContext),_excluded$n=["attr","size","title"];function _objectWithoutProperties$n(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose$n(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose$n(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function _extends$t(){return _extends$t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$t.apply(this,arguments)}function ownKeys$C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$C(Object(n),!0).forEach(function(i){_defineProperty$E(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$C(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$E(e,t,n){return t=_toPropertyKey$E(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$E(e){var t=_toPrimitive$E(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$E(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tree2Element(e){return e&&e.map((t,n)=>React.createElement(t.tag,_objectSpread$C({key:n},t.attr),Tree2Element(t.child)))}function GenIcon(e){return t=>React.createElement(IconBase,_extends$t({attr:_objectSpread$C({},e.attr)},t),Tree2Element(e.child))}function IconBase(e){var t=n=>{var{attr:i,size:o,title:l}=e,u=_objectWithoutProperties$n(e,_excluded$n),f=o||n.size||"1em",p;return n.className&&(p=n.className),e.className&&(p=(p?p+" ":"")+e.className),React.createElement("svg",_extends$t({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,u,{className:p,style:_objectSpread$C(_objectSpread$C({color:e.color||n.color},n.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&React.createElement("title",null,l),e.children)};return IconContext!==void 0?React.createElement(IconContext.Consumer,null,n=>t(n)):t(DefaultContext)}function FaSearch(e){return GenIcon({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function MdKeyboardArrowDown(e){return GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(e)}const CEAdvancedMultiSelectDropdown=({options:e,onSelectItem:t,onChange:n,placeholder:i="Search customers...",allowSearch:o=!0,width:l="100%",inputHeight:u="3rem",dropdownMaxHeight:f="20rem",id:p,name:m,disabled:d=!1})=>{const[g,_]=React.useState(!1),[E,S]=React.useState(""),[b,T]=React.useState([]),C=React.useRef(null);React.useEffect(()=>{n&&n(b)},[b,n]);const A=e.filter(R=>{var O;return R.label.toLowerCase().includes(E.toLowerCase())||((O=R.subtitle)==null?void 0:O.toLowerCase().includes(E.toLowerCase()))});return React.useEffect(()=>{const R=O=>{var j;(j=C.current)!=null&&j.contains(O.target)||_(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]),jsxRuntimeExports.jsxs("div",{className:`dropdown-container ${d?"disabled":""}`,ref:C,style:{width:l},children:[jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${g?"open":""} ${d?"disabled":""}`,style:{minHeight:u},children:[jsxRuntimeExports.jsx(FaSearch,{className:"search-icon"}),jsxRuntimeExports.jsxs("div",{className:"selected-chips",onClick:()=>!d&&_(!0),children:[b.length===0&&jsxRuntimeExports.jsx("input",{type:"text",className:"search-input",id:p,name:m,placeholder:i,value:E,onChange:R=>{d||(S(R.target.value),g||_(!0))},onClick:R=>{d||(R.stopPropagation(),_(!0))},disabled:d,style:{height:u}}),b.map(R=>jsxRuntimeExports.jsxs("div",{className:"selected-item-inline",children:[jsxRuntimeExports.jsx("span",{className:"selected-item-label",children:R.label}),jsxRuntimeExports.jsx("button",{type:"button",className:"selected-item-remove",onClick:O=>{d||(O.stopPropagation(),T(j=>j.filter(I=>I.value!==R.value)))},disabled:d,"aria-label":`Remove ${R.label}`,children:"×"})]},R.value))]}),jsxRuntimeExports.jsx(MdKeyboardArrowDown,{className:`dropdown-arrow ${g?"rotated":""}`,onClick:R=>{d||(R.stopPropagation(),_(O=>!O))}})]}),g&&jsxRuntimeExports.jsx("div",{className:"dropdown-options",style:{maxHeight:f},children:jsxRuntimeExports.jsx("ul",{className:"dropdown-list",children:A.length>0?A.map(R=>{const O=b.some(j=>j.value===R.value);return jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${O?"selected":""}`,onClick:j=>{d||(j.stopPropagation(),T(I=>{const D=I.some(B=>B.value===R.value);let F;return D?F=I.filter(B=>B.value!==R.value):F=[...I,R],F}),S(""),t(R),_(!1))},children:[jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("div",{className:"option-line-1",children:R.label}),R.subtitle&&jsxRuntimeExports.jsx("div",{className:"option-line-2",children:R.subtitle})]}),R.icon&&jsxRuntimeExports.jsx("div",{className:"option-icon",children:R.icon})]},R.value)}):jsxRuntimeExports.jsx("li",{className:"dropdown-option no-results",children:"No results found"})})})]})},AutoCompleteInput=({label:e,options:t,value:n,onChange:i,multiple:o=!0,showCheckboxes:l=!0,required:u=!1,disabled:f=!1})=>{const[p,m]=React.useState(!1),[d,g]=React.useState(!1),[_,E]=React.useState(""),S=React.useRef(null),b=React.useRef(null),T=t.filter(R=>R.toLowerCase().includes(_.toLowerCase())),C=R=>{if(!f)if(o){const O=n.includes(R);i(O?n.filter(j=>j!==R):[...n,R]),E("")}else i([R]),E(R),m(!1)},A=R=>{b.current&&!b.current.contains(R.target)&&(m(!1),g(!1))};return React.useEffect(()=>(document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)),[]),jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:b,children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper always-float ${d||p?"focused":""} ${n.length>0?"has-value":""} ${f?"disabled":""}`,children:[jsxRuntimeExports.jsxs("label",{className:"autocomplete-label",children:[e,u&&jsxRuntimeExports.jsx("span",{className:"required-asterisk","aria-hidden":"true",children:"*"})]}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[o&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:n.map(R=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[R,jsxRuntimeExports.jsx("button",{onClick:O=>{O.stopPropagation(),f||i(n.filter(j=>j!==R))},disabled:f,children:"×"})]},R))}),jsxRuntimeExports.jsx("input",{ref:S,type:"text",className:"autocomplete-input",value:_,placeholder:o&&n.length>0?"":"Select Status",onChange:R=>!f&&E(R.target.value),onFocus:()=>{f||(g(!0),m(!0))},disabled:f}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onClick:()=>!f&&m(R=>!R),children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M6 9l6 6 6-6"})})})]})]}),p&&jsxRuntimeExports.jsxs("ul",{className:"autocomplete-list",children:[o&&l&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{if(!f){const R=n.length===t.length;i(R?[]:[...t])}},disabled:f}),"Select All"]})}),T.map(R=>jsxRuntimeExports.jsx("li",{onClick:()=>C(R),children:o&&l?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(R),onChange:()=>C(R),onClick:O=>O.stopPropagation()}),R]}):R},R))]})]})},CEAutoCompleteSelect=({label:e,options:t,value:n,onChange:i,placeholderText:o,multiple:l=!1,showCheckboxes:u=!1,id:f,required:p=!1,showSelectionCountOnly:m=!1,disabled:d=!1})=>{const[g,_]=React.useState(!1),[E,S]=React.useState(!1),[b,T]=React.useState(""),C=React.useRef(null),A=React.useRef(null),[R,O]=React.useState(-1),j=React.useRef(null),I=t.filter(N=>{var G;return(G=N.label)==null?void 0:G.toLowerCase().includes(b==null?void 0:b.toLowerCase())});React.useEffect(()=>{if(l)l&&T("");else{const N=B(n[0]);T(N||"")}},[n,l,t]),React.useEffect(()=>{if(!j.current||R<0)return;const N=j.current.children[R];N==null||N.scrollIntoView({block:"nearest"})},[R]);const D=N=>{if(!d)if(l){const G=n.includes(N.value);i(G?n.filter(ee=>ee!==N.value):[...n,N.value]),T("")}else i([N.value]),T(N.label),_(!1)},F=N=>{if(!d)switch(N.key){case"ArrowDown":N.preventDefault(),g?O(G=>G<I.length-1?G+1:0):(_(!0),O(0));break;case"ArrowUp":N.preventDefault(),g?O(G=>G>0?G-1:I.length-1):(_(!0),O(I.length-1));break;case"Enter":N.preventDefault(),g&&R>=0&&I[R]&&D(I[R]);break;case"Escape":_(!1),O(-1);break;case"Tab":_(!1),S(!1),O(-1);break}};React.useEffect(()=>{const N=G=>{A.current&&!A.current.contains(G.target)&&(_(!1),S(!1),O(-1))};return document.addEventListener("mousedown",N),document.addEventListener("click",N),()=>{document.removeEventListener("click",N),document.removeEventListener("mousedown",N)}},[]);const B=N=>{var G;return Array.isArray(t)&&((G=t.find(ee=>ee.value===N||ee.label===N))==null?void 0:G.label)||""},X=N=>{N.stopPropagation(),T(""),i([])},U=n.length>0||b.trim().length>0;return jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:A,id:f,"data-testid":f?`ce-autocomplete-${f}`:"ce-autocomplete",children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper always-float ${E||g?"focused":""} ${U?"has-value has-clear":""} ${d?"disabled":""}`,onClick:()=>{var N;d||(_(!0),(N=C.current)==null||N.focus())},children:[jsxRuntimeExports.jsxs("label",{className:"autocomplete-label",children:[e,p&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"})]}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[l&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:m?jsxRuntimeExports.jsxs("span",{className:"selected-summary",children:["Selected + ",n.length]}):n.map(N=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[B(N),jsxRuntimeExports.jsx("button",{onClick:G=>{d||(G.stopPropagation(),i(n.filter(ee=>ee!==N)))},children:"×"})]},N))}),jsxRuntimeExports.jsx("input",{ref:C,type:"text",className:"autocomplete-input",placeholder:l&&n.length>0?"":o,value:b,disabled:d,onChange:N=>{T(N.target.value),g||(_(!0),O(0))},onFocus:()=>{d||(S(!0),_(!0),O(I.length>0?0:-1))},onKeyDown:F}),U&&!d&&jsxRuntimeExports.jsx("span",{className:"clear-icon",onClick:X,title:"Clear",children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onMouseDown:N=>{N.preventDefault(),N.stopPropagation()},onClick:N=>{var G;d||(N.stopPropagation(),_(!0),(G=C.current)==null||G.focus())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M6 9l6 6 6-6"})})})]})]}),g&&jsxRuntimeExports.jsx("ul",{className:"autocomplete-list",ref:j,children:I.length===0?jsxRuntimeExports.jsx("li",{className:"no-results-option",style:{color:"#999",padding:"8px 16px",cursor:"default"},children:"No results found"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[l&&u&&I.length>0&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{const N=n.length===t.length;i(N?[]:t.map(G=>G.value))}}),"Select All"]})}),I.map((N,G)=>jsxRuntimeExports.jsx("li",{onClick:()=>D(N),className:G===R?"comhighlighted":"",onMouseEnter:()=>O(G),children:l&&u?jsxRuntimeExports.jsxs("div",{className:"option-row",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(N.value),readOnly:!0,onClick:ee=>{ee.stopPropagation(),D(N)}}),jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("span",{className:"option-label",children:N.label}),N.subtitle&&jsxRuntimeExports.jsx("span",{className:"option-subtitle",children:N.subtitle})]})]}):jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("span",{className:"option-label",children:N.label}),N.subtitle&&jsxRuntimeExports.jsx("span",{className:"option-subtitle",children:N.subtitle})]})},N.value))]})})]})};var EventKeys=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function isEventKey(e){if(typeof e!="string")return!1;var t=EventKeys;return t.includes(e)}var SVGElementPropKeys=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function isSvgElementPropKey(e){if(typeof e!="string")return!1;var t=SVGElementPropKeys;return t.includes(e)}function isDataAttribute(e){return typeof e=="string"&&e.startsWith("data-")}function svgPropertiesNoEvents(e){var t=Object.entries(e).filter(n=>{var[i]=n;return isSvgElementPropKey(i)||isDataAttribute(i)});return Object.fromEntries(t)}function svgPropertiesNoEventsFromUnknown(e){if(e==null)return null;if(React.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return svgPropertiesNoEvents(t)}return typeof e=="object"&&!Array.isArray(e)?svgPropertiesNoEvents(e):null}function svgPropertiesAndEvents(e){var t=Object.entries(e).filter(n=>{var[i]=n;return isSvgElementPropKey(i)||isDataAttribute(i)||isEventKey(i)});return Object.fromEntries(t)}function svgPropertiesAndEventsFromUnknown(e){return e==null?null:React.isValidElement(e)?svgPropertiesAndEvents(e.props):typeof e=="object"&&!Array.isArray(e)?svgPropertiesAndEvents(e):null}var _excluded$m=["children","width","height","viewBox","className","style","title","desc"];function _extends$s(){return _extends$s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$s.apply(null,arguments)}function _objectWithoutProperties$m(e,t){if(e==null)return{};var n,i,o=_objectWithoutPropertiesLoose$m(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose$m(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}var Surface=React.forwardRef((e,t)=>{var{children:n,width:i,height:o,viewBox:l,className:u,style:f,title:p,desc:m}=e,d=_objectWithoutProperties$m(e,_excluded$m),g=l||{width:i,height:o,x:0,y:0},_=clsx("recharts-surface",u);return React__namespace.createElement("svg",_extends$s({},svgPropertiesAndEvents(d),{className:_,width:i,height:o,style:f,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),React__namespace.createElement("title",null,p),React__namespace.createElement("desc",null,m),n)}),_excluded$l=["children","className"];function _extends$r(){return _extends$r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$r.apply(null,arguments)}function _objectWithoutProperties$l(e,t){if(e==null)return{};var n,i,o=_objectWithoutPropertiesLoose$l(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose$l(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}var Layer=React__namespace.forwardRef((e,t)=>{var{children:n,className:i}=e,o=_objectWithoutProperties$l(e,_excluded$l),l=clsx("recharts-layer",i);return React__namespace.createElement("g",_extends$r({className:l},svgPropertiesAndEvents(o),{ref:t}),n)}),LegendPortalContext=React.createContext(null),useLegendPortal=()=>React.useContext(LegendPortalContext);function constant$1(e){return function(){return e}}const cos=Math.cos,sin=Math.sin,sqrt$1=Math.sqrt,pi$1=Math.PI,tau$1=2*pi$1,pi=Math.PI,tau=2*pi,epsilon=1e-6,tauEpsilon=tau-epsilon;function append(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function appendRound(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return append;const n=10**t;return function(i){this._+=i[0];for(let o=1,l=i.length;o<l;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}class Path{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?append:appendRound(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,o){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,n,i,o,l,u){this._append`C${+t},${+n},${+i},${+o},${this._x1=+l},${this._y1=+u}`}arcTo(t,n,i,o,l){if(t=+t,n=+n,i=+i,o=+o,l=+l,l<0)throw new Error(`negative radius: ${l}`);let u=this._x1,f=this._y1,p=i-t,m=o-n,d=u-t,g=f-n,_=d*d+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(_>epsilon)if(!(Math.abs(g*p-m*d)>epsilon)||!l)this._append`L${this._x1=t},${this._y1=n}`;else{let E=i-u,S=o-f,b=p*p+m*m,T=E*E+S*S,C=Math.sqrt(b),A=Math.sqrt(_),R=l*Math.tan((pi-Math.acos((b+_-T)/(2*C*A)))/2),O=R/A,j=R/C;Math.abs(O-1)>epsilon&&this._append`L${t+O*d},${n+O*g}`,this._append`A${l},${l},0,0,${+(g*E>d*S)},${this._x1=t+j*p},${this._y1=n+j*m}`}}arc(t,n,i,o,l,u){if(t=+t,n=+n,i=+i,u=!!u,i<0)throw new Error(`negative radius: ${i}`);let f=i*Math.cos(o),p=i*Math.sin(o),m=t+f,d=n+p,g=1^u,_=u?o-l:l-o;this._x1===null?this._append`M${m},${d}`:(Math.abs(this._x1-m)>epsilon||Math.abs(this._y1-d)>epsilon)&&this._append`L${m},${d}`,i&&(_<0&&(_=_%tau+tau),_>tauEpsilon?this._append`A${i},${i},0,1,${g},${t-f},${n-p}A${i},${i},0,1,${g},${this._x1=m},${this._y1=d}`:_>epsilon&&this._append`A${i},${i},0,${+(_>=pi)},${g},${this._x1=t+i*Math.cos(l)},${this._y1=n+i*Math.sin(l)}`)}rect(t,n,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function withPath(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new Path(t)}function array(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Linear(e){this._context=e}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function curveLinear(e){return new Linear(e)}function x(e){return e[0]}function y(e){return e[1]}function shapeLine(e,t){var n=constant$1(!0),i=null,o=curveLinear,l=null,u=withPath(f);e=typeof e=="function"?e:e===void 0?x:constant$1(e),t=typeof t=="function"?t:t===void 0?y:constant$1(t);function f(p){var m,d=(p=array(p)).length,g,_=!1,E;for(i==null&&(l=o(E=u())),m=0;m<=d;++m)!(m<d&&n(g=p[m],m,p))===_&&((_=!_)?l.lineStart():l.lineEnd()),_&&l.point(+e(g,m,p),+t(g,m,p));if(E)return l=null,E+""||null}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:constant$1(+p),f):e},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:constant$1(+p),f):t},f.defined=function(p){return arguments.length?(n=typeof p=="function"?p:constant$1(!!p),f):n},f.curve=function(p){return arguments.length?(o=p,i!=null&&(l=o(i)),f):o},f.context=function(p){return arguments.length?(p==null?i=l=null:l=o(i=p),f):i},f}function shapeArea(e,t,n){var i=null,o=constant$1(!0),l=null,u=curveLinear,f=null,p=withPath(m);e=typeof e=="function"?e:e===void 0?x:constant$1(+e),t=typeof t=="function"?t:constant$1(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?y:constant$1(+n);function m(g){var _,E,S,b=(g=array(g)).length,T,C=!1,A,R=new Array(b),O=new Array(b);for(l==null&&(f=u(A=p())),_=0;_<=b;++_){if(!(_<b&&o(T=g[_],_,g))===C)if(C=!C)E=_,f.areaStart(),f.lineStart();else{for(f.lineEnd(),f.lineStart(),S=_-1;S>=E;--S)f.point(R[S],O[S]);f.lineEnd(),f.areaEnd()}C&&(R[_]=+e(T,_,g),O[_]=+t(T,_,g),f.point(i?+i(T,_,g):R[_],n?+n(T,_,g):O[_]))}if(A)return f=null,A+""||null}function d(){return shapeLine().defined(o).curve(u).context(l)}return m.x=function(g){return arguments.length?(e=typeof g=="function"?g:constant$1(+g),i=null,m):e},m.x0=function(g){return arguments.length?(e=typeof g=="function"?g:constant$1(+g),m):e},m.x1=function(g){return arguments.length?(i=g==null?null:typeof g=="function"?g:constant$1(+g),m):i},m.y=function(g){return arguments.length?(t=typeof g=="function"?g:constant$1(+g),n=null,m):t},m.y0=function(g){return arguments.length?(t=typeof g=="function"?g:constant$1(+g),m):t},m.y1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:constant$1(+g),m):n},m.lineX0=m.lineY0=function(){return d().x(e).y(t)},m.lineY1=function(){return d().x(e).y(n)},m.lineX1=function(){return d().x(i).y(t)},m.defined=function(g){return arguments.length?(o=typeof g=="function"?g:constant$1(!!g),m):o},m.curve=function(g){return arguments.length?(u=g,l!=null&&(f=u(l)),m):u},m.context=function(g){return arguments.length?(g==null?l=f=null:f=u(l=g),m):l},m}class Bump{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function bumpX(e){return new Bump(e,!0)}function bumpY(e){return new Bump(e,!1)}const symbolCircle={draw(e,t){const n=sqrt$1(t/pi$1);e.moveTo(n,0),e.arc(0,0,n,0,tau$1)}},symbolCross={draw(e,t){const n=sqrt$1(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},tan30=sqrt$1(1/3),tan30_2=tan30*2,symbolDiamond={draw(e,t){const n=sqrt$1(t/tan30_2),i=n*tan30;e.moveTo(0,-n),e.lineTo(i,0),e.lineTo(0,n),e.lineTo(-i,0),e.closePath()}},symbolSquare={draw(e,t){const n=sqrt$1(t),i=-n/2;e.rect(i,i,n,n)}},ka=.8908130915292852,kr=sin(pi$1/10)/sin(7*pi$1/10),kx=sin(tau$1/10)*kr,ky=-cos(tau$1/10)*kr,symbolStar={draw(e,t){const n=sqrt$1(t*ka),i=kx*n,o=ky*n;e.moveTo(0,-n),e.lineTo(i,o);for(let l=1;l<5;++l){const u=tau$1*l/5,f=cos(u),p=sin(u);e.lineTo(p*n,-f*n),e.lineTo(f*i-p*o,p*i+f*o)}e.closePath()}},sqrt3=sqrt$1(3),symbolTriangle={draw(e,t){const n=-sqrt$1(t/(sqrt3*3));e.moveTo(0,n*2),e.lineTo(-sqrt3*n,-n),e.lineTo(sqrt3*n,-n),e.closePath()}},c=-.5,s=sqrt$1(3)/2,k=1/sqrt$1(12),a=(k/2+1)*3,symbolWye={draw(e,t){const n=sqrt$1(t/a),i=n/2,o=n*k,l=i,u=n*k+n,f=-l,p=u;e.moveTo(i,o),e.lineTo(l,u),e.lineTo(f,p),e.lineTo(c*i-s*o,s*i+c*o),e.lineTo(c*l-s*u,s*l+c*u),e.lineTo(c*f-s*p,s*f+c*p),e.lineTo(c*i+s*o,c*o-s*i),e.lineTo(c*l+s*u,c*u-s*l),e.lineTo(c*f+s*p,c*p-s*f),e.closePath()}};function Symbol$1(e,t){let n=null,i=withPath(o);e=typeof e=="function"?e:constant$1(e||symbolCircle),t=typeof t=="function"?t:constant$1(t===void 0?64:+t);function o(){let l;if(n||(n=l=i()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),l)return n=null,l+""||null}return o.type=function(l){return arguments.length?(e=typeof l=="function"?l:constant$1(l),o):e},o.size=function(l){return arguments.length?(t=typeof l=="function"?l:constant$1(+l),o):t},o.context=function(l){return arguments.length?(n=l??null,o):n},o}function noop$5(){}function point$2(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Basis(e){this._context=e}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$2(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$2(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasis(e){return new Basis(e)}function BasisClosed(e){this._context=e}BasisClosed.prototype={areaStart:noop$5,areaEnd:noop$5,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:point$2(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasisClosed(e){return new BasisClosed(e)}function BasisOpen(e){this._context=e}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:point$2(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasisOpen(e){return new BasisOpen(e)}function LinearClosed(e){this._context=e}LinearClosed.prototype={areaStart:noop$5,areaEnd:noop$5,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function curveLinearClosed(e){return new LinearClosed(e)}function sign(e){return e<0?-1:1}function slope3(e,t,n){var i=e._x1-e._x0,o=t-e._x1,l=(e._y1-e._y0)/(i||o<0&&-0),u=(n-e._y1)/(o||i<0&&-0),f=(l*o+u*i)/(i+o);return(sign(l)+sign(u))*Math.min(Math.abs(l),Math.abs(u),.5*Math.abs(f))||0}function slope2(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function point$1(e,t,n){var i=e._x0,o=e._y0,l=e._x1,u=e._y1,f=(l-i)/3;e._context.bezierCurveTo(i+f,o+f*t,l-f,u-f*n,l,u)}function MonotoneX(e){this._context=e}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,n=slope3(this,e,t)),n);break;default:point$1(this,this._t0,n=slope3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function MonotoneY(e){this._context=new ReflectContext(e)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(e,t){MonotoneX.prototype.point.call(this,t,e)};function ReflectContext(e){this._context=e}ReflectContext.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,o,l){this._context.bezierCurveTo(t,e,i,n,l,o)}};function monotoneX(e){return new MonotoneX(e)}function monotoneY(e){return new MonotoneY(e)}function Natural(e){this._context=e}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var i=controlPoints(e),o=controlPoints(t),l=0,u=1;u<n;++l,++u)this._context.bezierCurveTo(i[0][l],o[0][l],i[1][l],o[1][l],e[u],t[u]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function controlPoints(e){var t,n=e.length-1,i,o=new Array(n),l=new Array(n),u=new Array(n);for(o[0]=0,l[0]=2,u[0]=e[0]+2*e[1],t=1;t<n-1;++t)o[t]=1,l[t]=4,u[t]=4*e[t]+2*e[t+1];for(o[n-1]=2,l[n-1]=7,u[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)i=o[t]/l[t-1],l[t]-=i,u[t]-=i*u[t-1];for(o[n-1]=u[n-1]/l[n-1],t=n-2;t>=0;--t)o[t]=(u[t]-o[t+1])/l[t];for(l[n-1]=(e[n]+o[n-1])/2,t=0;t<n-1;++t)l[t]=2*e[t+1]-o[t+1];return[o,l]}function curveNatural(e){return new Natural(e)}function Step(e,t){this._context=e,this._t=t}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function curveStep(e){return new Step(e,.5)}function stepBefore(e){return new Step(e,0)}function stepAfter(e){return new Step(e,1)}function stackOffsetNone(e,t){if((u=e.length)>1)for(var n=1,i,o,l=e[t[0]],u,f=l.length;n<u;++n)for(o=l,l=e[t[n]],i=0;i<f;++i)l[i][1]+=l[i][0]=isNaN(o[i][1])?o[i][0]:o[i][1]}function stackOrderNone(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function stackValue(e,t){return e[t]}function stackSeries(e){const t=[];return t.key=e,t}function shapeStack(){var e=constant$1([]),t=stackOrderNone,n=stackOffsetNone,i=stackValue;function o(l){var u=Array.from(e.apply(this,arguments),stackSeries),f,p=u.length,m=-1,d;for(const g of l)for(f=0,++m;f<p;++f)(u[f][m]=[0,+i(g,u[f].key,m,l)]).data=g;for(f=0,d=array(t(u));f<p;++f)u[d[f]].index=f;return n(u,d),u}return o.keys=function(l){return arguments.length?(e=typeof l=="function"?l:constant$1(Array.from(l)),o):e},o.value=function(l){return arguments.length?(i=typeof l=="function"?l:constant$1(+l),o):i},o.order=function(l){return arguments.length?(t=l==null?stackOrderNone:typeof l=="function"?l:constant$1(Array.from(l)),o):t},o.offset=function(l){return arguments.length?(n=l??stackOffsetNone,o):n},o}function stackOffsetExpand(e,t){if((i=e.length)>0){for(var n,i,o=0,l=e[0].length,u;o<l;++o){for(u=n=0;n<i;++n)u+=e[n][o][1]||0;if(u)for(n=0;n<i;++n)e[n][o][1]/=u}stackOffsetNone(e,t)}}function stackOffsetSilhouette(e,t){if((o=e.length)>0){for(var n=0,i=e[t[0]],o,l=i.length;n<l;++n){for(var u=0,f=0;u<o;++u)f+=e[u][n][1]||0;i[n][1]+=i[n][0]=-f/2}stackOffsetNone(e,t)}}function stackOffsetWiggle(e,t){if(!(!((u=e.length)>0)||!((l=(o=e[t[0]]).length)>0))){for(var n=0,i=1,o,l,u;i<l;++i){for(var f=0,p=0,m=0;f<u;++f){for(var d=e[t[f]],g=d[i][1]||0,_=d[i-1][1]||0,E=(g-_)/2,S=0;S<f;++S){var b=e[t[S]],T=b[i][1]||0,C=b[i-1][1]||0;E+=T-C}p+=g,m+=E*g}o[i-1][1]+=o[i-1][0]=n,p&&(n-=m/p)}o[i-1][1]+=o[i-1][0]=n,stackOffsetNone(e,t)}}var get$2={},isUnsafeProperty={},hasRequiredIsUnsafeProperty;function requireIsUnsafeProperty(){return hasRequiredIsUnsafeProperty||(hasRequiredIsUnsafeProperty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(isUnsafeProperty)),isUnsafeProperty}var isDeepKey={},hasRequiredIsDeepKey;function requireIsDeepKey(){return hasRequiredIsDeepKey||(hasRequiredIsDeepKey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(isDeepKey)),isDeepKey}var toKey={},hasRequiredToKey;function requireToKey(){return hasRequiredToKey||(hasRequiredToKey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var i;return typeof n=="string"||typeof n=="symbol"?n:Object.is((i=n==null?void 0:n.valueOf)==null?void 0:i.call(n),-0)?"-0":String(n)}e.toKey=t})(toKey)),toKey}var toPath={},toString$1={},hasRequiredToString;function requireToString(){return hasRequiredToString||(hasRequiredToString=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const i=String(n);return i==="0"&&Object.is(Number(n),-0)?"-0":i}e.toString=t})(toString$1)),toString$1}var hasRequiredToPath;function requireToPath(){return hasRequiredToPath||(hasRequiredToPath=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireToString(),n=requireToKey();function i(o){if(Array.isArray(o))return o.map(n.toKey);if(typeof o=="symbol")return[o];o=t.toString(o);const l=[],u=o.length;if(u===0)return l;let f=0,p="",m="",d=!1;for(o.charCodeAt(0)===46&&(l.push(""),f++);f<u;){const g=o[f];m?g==="\\"&&f+1<u?(f++,p+=o[f]):g===m?m="":p+=g:d?g==='"'||g==="'"?m=g:g==="]"?(d=!1,l.push(p),p=""):p+=g:g==="["?(d=!0,p&&(l.push(p),p="")):g==="."?p&&(l.push(p),p=""):p+=g,f++}return p&&l.push(p),l}e.toPath=i})(toPath)),toPath}var hasRequiredGet$1;function requireGet$1(){return hasRequiredGet$1||(hasRequiredGet$1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsUnsafeProperty(),n=requireIsDeepKey(),i=requireToKey(),o=requireToPath();function l(f,p,m){if(f==null)return m;switch(typeof p){case"string":{if(t.isUnsafeProperty(p))return m;const d=f[p];return d===void 0?n.isDeepKey(p)?l(f,o.toPath(p),m):m:d}case"number":case"symbol":{typeof p=="number"&&(p=i.toKey(p));const d=f[p];return d===void 0?m:d}default:{if(Array.isArray(p))return u(f,p,m);if(Object.is(p==null?void 0:p.valueOf(),-0)?p="-0":p=String(p),t.isUnsafeProperty(p))return m;const d=f[p];return d===void 0?m:d}}}function u(f,p,m){if(p.length===0)return m;let d=f;for(let g=0;g<p.length;g++){if(d==null||t.isUnsafeProperty(p[g]))return m;d=d[p[g]]}return d===void 0?m:d}e.get=l})(get$2)),get$2}var get$1,hasRequiredGet;function requireGet(){return hasRequiredGet||(hasRequiredGet=1,get$1=requireGet$1().get),get$1}var getExports=requireGet();const get=getDefaultExportFromCjs(getExports);var mathSign=e=>e===0?0:e>0?1:-1,isNan=e=>typeof e=="number"&&e!=+e,isPercent=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,isNumber=e=>(typeof e=="number"||e instanceof Number)&&!isNan(e),isNumOrStr=e=>isNumber(e)||typeof e=="string",idCounter=0,uniqueId=e=>{var t=++idCounter;return"".concat(e||"").concat(t)},getPercentValue=function e(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!isNumber(t)&&typeof t!="string")return i;var l;if(isPercent(t)){if(n==null)return i;var u=t.indexOf("%");l=n*parseFloat(t.slice(0,u))/100}else l=+t;return isNan(l)&&(l=i),o&&n!=null&&l>n&&(l=n),l},hasDuplicate=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},i=0;i<t;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1};function interpolate$1(e,t,n){return isNumber(e)&&isNumber(t)?e+n*(t-e):t}function findEntryInArray(e,t,n){if(!(!e||!e.length))return e.find(i=>i&&(typeof t=="function"?t(i):get(i,t))===n)}var isNullish=e=>e===null||typeof e>"u",upperFirst=e=>isNullish(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),_excluded$k=["type","size","sizeType"];function _extends$q(){return _extends$q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$q.apply(null,arguments)}function ownKeys$B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$B(Object(n),!0).forEach(function(i){_defineProperty$D(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$B(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$D(e,t,n){return(t=_toPropertyKey$D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$D(e){var t=_toPrimitive$D(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$D(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _objectWithoutProperties$k(e,t){if(e==null)return{};var n,i,o=_objectWithoutPropertiesLoose$k(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose$k(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}var symbolFactories={symbolCircle,symbolCross,symbolDiamond,symbolSquare,symbolStar,symbolTriangle,symbolWye},RADIAN$1=Math.PI/180,getSymbolFactory=e=>{var t="symbol".concat(upperFirst(e));return symbolFactories[t]||symbolCircle},calculateAreaSize=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*RADIAN$1;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.tan(i)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},registerSymbol=(e,t)=>{symbolFactories["symbol".concat(upperFirst(e))]=t},Symbols=e=>{var{type:t="circle",size:n=64,sizeType:i="area"}=e,o=_objectWithoutProperties$k(e,_excluded$k),l=_objectSpread$B(_objectSpread$B({},o),{},{type:t,size:n,sizeType:i}),u="circle";typeof t=="string"&&(u=t);var f=()=>{var _=getSymbolFactory(u),E=Symbol$1().type(_).size(calculateAreaSize(n,i,u)),S=E();if(S!==null)return S},{className:p,cx:m,cy:d}=l,g=svgPropertiesAndEvents(l);return m===+m&&d===+d&&n===+n?React__namespace.createElement("path",_extends$q({},g,{className:clsx("recharts-symbols",p),transform:"translate(".concat(m,", ").concat(d,")"),d:f()})):null};Symbols.registerSymbol=registerSymbol;var adaptEventHandlers=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(React.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var i={};return Object.keys(n).forEach(o=>{isEventKey(o)&&(i[o]=(l=>n[o](n,l)))}),i},getEventHandlerOfChild=(e,t,n)=>i=>(e(t,n,i),null),adaptEventsOfChild=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var i=null;return Object.keys(e).forEach(o=>{var l=e[o];isEventKey(o)&&typeof l=="function"&&(i||(i={}),i[o]=getEventHandlerOfChild(l,t,n))}),i};function _extends$p(){return _extends$p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$p.apply(null,arguments)}function ownKeys$A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$A(Object(n),!0).forEach(function(i){_defineProperty$C(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$A(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$C(e,t,n){return(t=_toPropertyKey$C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$C(e){var t=_toPrimitive$C(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$C(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SIZE=32;class DefaultLegendContent extends React.PureComponent{renderIcon(t,n){var{inactiveColor:i}=this.props,o=SIZE/2,l=SIZE/6,u=SIZE/3,f=t.inactive?i:t.color,p=n??t.type;if(p==="none")return null;if(p==="plainline")return React__namespace.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:o,x2:SIZE,y2:o,className:"recharts-legend-icon"});if(p==="line")return React__namespace.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(u,`
|
|
348
348
|
A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(o,`
|
|
349
349
|
H`).concat(SIZE,"M").concat(2*u,",").concat(o,`
|
|
350
350
|
A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(p==="rect")return React__namespace.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(SIZE/8,"h").concat(SIZE,"v").concat(SIZE*3/4,"h").concat(-SIZE,"z"),className:"recharts-legend-icon"});if(React__namespace.isValidElement(t.legendIcon)){var m=_objectSpread$A({},t);return delete m.legendIcon,React__namespace.cloneElement(t.legendIcon,m)}return React__namespace.createElement(Symbols,{fill:f,cx:o,cy:o,size:SIZE,sizeType:"diameter",type:p})}renderItems(){var{payload:t,iconSize:n,layout:i,formatter:o,inactiveColor:l,iconType:u}=this.props,f={x:0,y:0,width:SIZE,height:SIZE},p={display:i==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((d,g)=>{var _=d.formatter||o,E=clsx({"recharts-legend-item":!0,["legend-item-".concat(g)]:!0,inactive:d.inactive});if(d.type==="none")return null;var S=d.inactive?l:d.color,b=_?_(d.value,d,g):d.value;return React__namespace.createElement("li",_extends$p({className:E,style:p,key:"legend-item-".concat(g)},adaptEventsOfChild(this.props,d,g)),React__namespace.createElement(Surface,{width:n,height:n,viewBox:f,style:m,"aria-label":"".concat(b," legend icon")},this.renderIcon(d,u)),React__namespace.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},b))})}render(){var{payload:t,layout:n,align:i}=this.props;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return React__namespace.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}_defineProperty$C(DefaultLegendContent,"displayName","Legend");_defineProperty$C(DefaultLegendContent,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var uniqBy$3={},uniqBy$2={},hasRequiredUniqBy$2;function requireUniqBy$2(){return hasRequiredUniqBy$2||(hasRequiredUniqBy$2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,i){const o=new Map;for(let l=0;l<n.length;l++){const u=n[l],f=i(u);o.has(f)||o.set(f,u)}return Array.from(o.values())}e.uniqBy=t})(uniqBy$2)),uniqBy$2}var identity$4={},hasRequiredIdentity;function requireIdentity(){return hasRequiredIdentity||(hasRequiredIdentity=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(identity$4)),identity$4}var isArrayLikeObject={},isArrayLike={},isLength={},hasRequiredIsLength;function requireIsLength(){return hasRequiredIsLength||(hasRequiredIsLength=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(isLength)),isLength}var hasRequiredIsArrayLike;function requireIsArrayLike(){return hasRequiredIsArrayLike||(hasRequiredIsArrayLike=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsLength();function n(i){return i!=null&&typeof i!="function"&&t.isLength(i.length)}e.isArrayLike=n})(isArrayLike)),isArrayLike}var isObjectLike={},hasRequiredIsObjectLike;function requireIsObjectLike(){return hasRequiredIsObjectLike||(hasRequiredIsObjectLike=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(isObjectLike)),isObjectLike}var hasRequiredIsArrayLikeObject;function requireIsArrayLikeObject(){return hasRequiredIsArrayLikeObject||(hasRequiredIsArrayLikeObject=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsArrayLike(),n=requireIsObjectLike();function i(o){return n.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=i})(isArrayLikeObject)),isArrayLikeObject}var iteratee={},property={},hasRequiredProperty;function requireProperty(){return hasRequiredProperty||(hasRequiredProperty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireGet$1();function n(i){return function(o){return t.get(o,i)}}e.property=n})(property)),property}var matches={},isMatch={},isMatchWith={},isObject={},hasRequiredIsObject;function requireIsObject(){return hasRequiredIsObject||(hasRequiredIsObject=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(isObject)),isObject}var isPrimitive={},hasRequiredIsPrimitive;function requireIsPrimitive(){return hasRequiredIsPrimitive||(hasRequiredIsPrimitive=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(isPrimitive)),isPrimitive}var eq={},hasRequiredEq;function requireEq(){return hasRequiredEq||(hasRequiredEq=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,i){return n===i||Number.isNaN(n)&&Number.isNaN(i)}e.eq=t})(eq)),eq}var hasRequiredIsMatchWith;function requireIsMatchWith(){return hasRequiredIsMatchWith||(hasRequiredIsMatchWith=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsObject(),n=requireIsPrimitive(),i=requireEq();function o(d,g,_){return typeof _!="function"?o(d,g,()=>{}):l(d,g,function E(S,b,T,C,A,R){const O=_(S,b,T,C,A,R);return O!==void 0?!!O:l(S,b,E,R)},new Map)}function l(d,g,_,E){if(g===d)return!0;switch(typeof g){case"object":return u(d,g,_,E);case"function":return Object.keys(g).length>0?l(d,{...g},_,E):i.eq(d,g);default:return t.isObject(d)?typeof g=="string"?g==="":!0:i.eq(d,g)}}function u(d,g,_,E){if(g==null)return!0;if(Array.isArray(g))return p(d,g,_,E);if(g instanceof Map)return f(d,g,_,E);if(g instanceof Set)return m(d,g,_,E);const S=Object.keys(g);if(d==null)return S.length===0;if(S.length===0)return!0;if(E!=null&&E.has(g))return E.get(g)===d;E==null||E.set(g,d);try{for(let b=0;b<S.length;b++){const T=S[b];if(!n.isPrimitive(d)&&!(T in d)||g[T]===void 0&&d[T]!==void 0||g[T]===null&&d[T]!==null||!_(d[T],g[T],T,d,g,E))return!1}return!0}finally{E==null||E.delete(g)}}function f(d,g,_,E){if(g.size===0)return!0;if(!(d instanceof Map))return!1;for(const[S,b]of g.entries()){const T=d.get(S);if(_(T,b,S,d,g,E)===!1)return!1}return!0}function p(d,g,_,E){if(g.length===0)return!0;if(!Array.isArray(d))return!1;const S=new Set;for(let b=0;b<g.length;b++){const T=g[b];let C=!1;for(let A=0;A<d.length;A++){if(S.has(A))continue;const R=d[A];let O=!1;if(_(R,T,b,d,g,E)&&(O=!0),O){S.add(A),C=!0;break}}if(!C)return!1}return!0}function m(d,g,_,E){return g.size===0?!0:d instanceof Set?p([...d],[...g],_,E):!1}e.isMatchWith=o,e.isSetMatch=m})(isMatchWith)),isMatchWith}var hasRequiredIsMatch;function requireIsMatch(){return hasRequiredIsMatch||(hasRequiredIsMatch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsMatchWith();function n(i,o){return t.isMatchWith(i,o,()=>{})}e.isMatch=n})(isMatch)),isMatch}var cloneDeep$1={},cloneDeepWith$1={},getSymbols={},hasRequiredGetSymbols;function requireGetSymbols(){return hasRequiredGetSymbols||(hasRequiredGetSymbols=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(i=>Object.prototype.propertyIsEnumerable.call(n,i))}e.getSymbols=t})(getSymbols)),getSymbols}var getTag={},hasRequiredGetTag;function requireGetTag(){return hasRequiredGetTag||(hasRequiredGetTag=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(getTag)),getTag}var tags={},hasRequiredTags;function requireTags(){return hasRequiredTags||(hasRequiredTags=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",i="[object Number]",o="[object Boolean]",l="[object Arguments]",u="[object Symbol]",f="[object Date]",p="[object Map]",m="[object Set]",d="[object Array]",g="[object Function]",_="[object ArrayBuffer]",E="[object Object]",S="[object Error]",b="[object DataView]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",A="[object Uint16Array]",R="[object Uint32Array]",O="[object BigUint64Array]",j="[object Int8Array]",I="[object Int16Array]",D="[object Int32Array]",F="[object BigInt64Array]",B="[object Float32Array]",X="[object Float64Array]";e.argumentsTag=l,e.arrayBufferTag=_,e.arrayTag=d,e.bigInt64ArrayTag=F,e.bigUint64ArrayTag=O,e.booleanTag=o,e.dataViewTag=b,e.dateTag=f,e.errorTag=S,e.float32ArrayTag=B,e.float64ArrayTag=X,e.functionTag=g,e.int16ArrayTag=I,e.int32ArrayTag=D,e.int8ArrayTag=j,e.mapTag=p,e.numberTag=i,e.objectTag=E,e.regexpTag=t,e.setTag=m,e.stringTag=n,e.symbolTag=u,e.uint16ArrayTag=A,e.uint32ArrayTag=R,e.uint8ArrayTag=T,e.uint8ClampedArrayTag=C})(tags)),tags}var isTypedArray={},hasRequiredIsTypedArray;function requireIsTypedArray(){return hasRequiredIsTypedArray||(hasRequiredIsTypedArray=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(isTypedArray)),isTypedArray}var hasRequiredCloneDeepWith$1;function requireCloneDeepWith$1(){return hasRequiredCloneDeepWith$1||(hasRequiredCloneDeepWith$1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireGetSymbols(),n=requireGetTag(),i=requireTags(),o=requireIsPrimitive(),l=requireIsTypedArray();function u(d,g){return f(d,void 0,d,new Map,g)}function f(d,g,_,E=new Map,S=void 0){const b=S==null?void 0:S(d,g,_,E);if(b!==void 0)return b;if(o.isPrimitive(d))return d;if(E.has(d))return E.get(d);if(Array.isArray(d)){const T=new Array(d.length);E.set(d,T);for(let C=0;C<d.length;C++)T[C]=f(d[C],C,_,E,S);return Object.hasOwn(d,"index")&&(T.index=d.index),Object.hasOwn(d,"input")&&(T.input=d.input),T}if(d instanceof Date)return new Date(d.getTime());if(d instanceof RegExp){const T=new RegExp(d.source,d.flags);return T.lastIndex=d.lastIndex,T}if(d instanceof Map){const T=new Map;E.set(d,T);for(const[C,A]of d)T.set(C,f(A,C,_,E,S));return T}if(d instanceof Set){const T=new Set;E.set(d,T);for(const C of d)T.add(f(C,void 0,_,E,S));return T}if(typeof Buffer<"u"&&Buffer.isBuffer(d))return d.subarray();if(l.isTypedArray(d)){const T=new(Object.getPrototypeOf(d)).constructor(d.length);E.set(d,T);for(let C=0;C<d.length;C++)T[C]=f(d[C],C,_,E,S);return T}if(d instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&d instanceof SharedArrayBuffer)return d.slice(0);if(d instanceof DataView){const T=new DataView(d.buffer.slice(0),d.byteOffset,d.byteLength);return E.set(d,T),p(T,d,_,E,S),T}if(typeof File<"u"&&d instanceof File){const T=new File([d],d.name,{type:d.type});return E.set(d,T),p(T,d,_,E,S),T}if(typeof Blob<"u"&&d instanceof Blob){const T=new Blob([d],{type:d.type});return E.set(d,T),p(T,d,_,E,S),T}if(d instanceof Error){const T=new d.constructor;return E.set(d,T),T.message=d.message,T.name=d.name,T.stack=d.stack,T.cause=d.cause,p(T,d,_,E,S),T}if(d instanceof Boolean){const T=new Boolean(d.valueOf());return E.set(d,T),p(T,d,_,E,S),T}if(d instanceof Number){const T=new Number(d.valueOf());return E.set(d,T),p(T,d,_,E,S),T}if(d instanceof String){const T=new String(d.valueOf());return E.set(d,T),p(T,d,_,E,S),T}if(typeof d=="object"&&m(d)){const T=Object.create(Object.getPrototypeOf(d));return E.set(d,T),p(T,d,_,E,S),T}return d}function p(d,g,_=d,E,S){const b=[...Object.keys(g),...t.getSymbols(g)];for(let T=0;T<b.length;T++){const C=b[T],A=Object.getOwnPropertyDescriptor(d,C);(A==null||A.writable)&&(d[C]=f(g[C],C,_,E,S))}}function m(d){switch(n.getTag(d)){case i.argumentsTag:case i.arrayTag:case i.arrayBufferTag:case i.dataViewTag:case i.booleanTag:case i.dateTag:case i.float32ArrayTag:case i.float64ArrayTag:case i.int8ArrayTag:case i.int16ArrayTag:case i.int32ArrayTag:case i.mapTag:case i.numberTag:case i.objectTag:case i.regexpTag:case i.setTag:case i.stringTag:case i.symbolTag:case i.uint8ArrayTag:case i.uint8ClampedArrayTag:case i.uint16ArrayTag:case i.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=u,e.cloneDeepWithImpl=f,e.copyProperties=p})(cloneDeepWith$1)),cloneDeepWith$1}var hasRequiredCloneDeep$1;function requireCloneDeep$1(){return hasRequiredCloneDeep$1||(hasRequiredCloneDeep$1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireCloneDeepWith$1();function n(i){return t.cloneDeepWithImpl(i,void 0,i,new Map,void 0)}e.cloneDeep=n})(cloneDeep$1)),cloneDeep$1}var hasRequiredMatches;function requireMatches(){return hasRequiredMatches||(hasRequiredMatches=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsMatch(),n=requireCloneDeep$1();function i(o){return o=n.cloneDeep(o),l=>t.isMatch(l,o)}e.matches=i})(matches)),matches}var matchesProperty={},cloneDeep={},cloneDeepWith={},hasRequiredCloneDeepWith;function requireCloneDeepWith(){return hasRequiredCloneDeepWith||(hasRequiredCloneDeepWith=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireCloneDeepWith$1(),n=requireTags();function i(o,l){return t.cloneDeepWith(o,(u,f,p,m)=>{const d=l==null?void 0:l(u,f,p,m);if(d!==void 0)return d;if(typeof o=="object")switch(Object.prototype.toString.call(o)){case n.numberTag:case n.stringTag:case n.booleanTag:{const g=new o.constructor(o==null?void 0:o.valueOf());return t.copyProperties(g,o),g}case n.argumentsTag:{const g={};return t.copyProperties(g,o),g.length=o.length,g[Symbol.iterator]=o[Symbol.iterator],g}default:return}})}e.cloneDeepWith=i})(cloneDeepWith)),cloneDeepWith}var hasRequiredCloneDeep;function requireCloneDeep(){return hasRequiredCloneDeep||(hasRequiredCloneDeep=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireCloneDeepWith();function n(i){return t.cloneDeepWith(i)}e.cloneDeep=n})(cloneDeep)),cloneDeep}var has$1={},isIndex={},hasRequiredIsIndex;function requireIsIndex(){return hasRequiredIsIndex||(hasRequiredIsIndex=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(i,o=Number.MAX_SAFE_INTEGER){switch(typeof i){case"number":return Number.isInteger(i)&&i>=0&&i<o;case"symbol":return!1;case"string":return t.test(i)}}e.isIndex=n})(isIndex)),isIndex}var isArguments={},hasRequiredIsArguments;function requireIsArguments(){return hasRequiredIsArguments||(hasRequiredIsArguments=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireGetTag();function n(i){return i!==null&&typeof i=="object"&&t.getTag(i)==="[object Arguments]"}e.isArguments=n})(isArguments)),isArguments}var hasRequiredHas;function requireHas(){return hasRequiredHas||(hasRequiredHas=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsDeepKey(),n=requireIsIndex(),i=requireIsArguments(),o=requireToPath();function l(u,f){let p;if(Array.isArray(f)?p=f:typeof f=="string"&&t.isDeepKey(f)&&(u==null?void 0:u[f])==null?p=o.toPath(f):p=[f],p.length===0)return!1;let m=u;for(let d=0;d<p.length;d++){const g=p[d];if((m==null||!Object.hasOwn(m,g))&&!((Array.isArray(m)||i.isArguments(m))&&n.isIndex(g)&&g<m.length))return!1;m=m[g]}return!0}e.has=l})(has$1)),has$1}var hasRequiredMatchesProperty;function requireMatchesProperty(){return hasRequiredMatchesProperty||(hasRequiredMatchesProperty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIsMatch(),n=requireToKey(),i=requireCloneDeep(),o=requireGet$1(),l=requireHas();function u(f,p){switch(typeof f){case"object":{Object.is(f==null?void 0:f.valueOf(),-0)&&(f="-0");break}case"number":{f=n.toKey(f);break}}return p=i.cloneDeep(p),function(m){const d=o.get(m,f);return d===void 0?l.has(m,f):p===void 0?d===void 0:t.isMatch(d,p)}}e.matchesProperty=u})(matchesProperty)),matchesProperty}var hasRequiredIteratee;function requireIteratee(){return hasRequiredIteratee||(hasRequiredIteratee=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireIdentity(),n=requireProperty(),i=requireMatches(),o=requireMatchesProperty();function l(u){if(u==null)return t.identity;switch(typeof u){case"function":return u;case"object":return Array.isArray(u)&&u.length===2?o.matchesProperty(u[0],u[1]):i.matches(u);case"string":case"symbol":case"number":return n.property(u)}}e.iteratee=l})(iteratee)),iteratee}var hasRequiredUniqBy$1;function requireUniqBy$1(){return hasRequiredUniqBy$1||(hasRequiredUniqBy$1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=requireUniqBy$2(),n=requireIdentity(),i=requireIsArrayLikeObject(),o=requireIteratee();function l(u,f=n.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),o.iteratee(f)):[]}e.uniqBy=l})(uniqBy$3)),uniqBy$3}var uniqBy$1,hasRequiredUniqBy;function requireUniqBy(){return hasRequiredUniqBy||(hasRequiredUniqBy=1,uniqBy$1=requireUniqBy$1().uniqBy),uniqBy$1}var uniqByExports=requireUniqBy();const uniqBy=getDefaultExportFromCjs(uniqByExports);function getUniqPayload(e,t,n){return t===!0?uniqBy(e,n):typeof t=="function"?uniqBy(e,t):e}var withSelector$1={exports:{}},withSelector_production={},shim={exports:{}},useSyncExternalStoreShim_production={};/**
|