@lax-wp/design-system 0.8.27 → 0.8.28
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/index.es.js +514 -517
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
-webkit-text-fill-color: white !important;
|
|
18
18
|
-webkit-box-shadow: 0 0 0px 1000px var(--input-bg-color) inset !important;
|
|
19
19
|
}
|
|
20
|
-
`}),h?a.jsx("label",{htmlFor:k,className:"mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",children:a.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:a.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:a.jsx(ot,{label:h||"",required:d||!1})})})}):null,a.jsxs("div",{className:"relative input-field",children:[a.jsx("input",{...x,ref:v,id:k,type:f,value:e,defaultValue:s,placeholder:u,required:d,disabled:o,max:l,min:c,onKeyDown:r,style:D(),className:V("border border-solid h-8 rounded-md block w-full pl-3","text-sm font-medium text-neutral-900 dark:text-black-100","bg-white dark:bg-black-600","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2",P(),o&&"opacity-70 cursor-not-allowed bg-neutral-50 dark:bg-black-700",b),onChange:T=>t(T.target.value),onClick:T=>T.stopPropagation()}),p&&a.jsx("div",{ref:w,className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p})]}),a.jsx(ze.AnimatePresence,{children:n&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a.jsx(K,{className:V("mt-1",S()),appearance:"custom",size:"extra-small",variant:"medium",children:n})})})]})});_a.displayName="InputField";const Yt=({size:A=16,className:e="",...t})=>a.jsxs("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-neutral-500 hover:text-neutral-700 ${e}`,...t,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),a.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Gh=y.forwardRef(({size:A=24,fill:e="currentColor",className:t,...r},n)=>a.jsx("svg",{ref:n,className:V(t),width:A,height:A,viewBox:"0 0 20 20",fill:e,xmlns:"http://www.w3.org/2000/svg",...r,children:a.jsx("path",{d:"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z"})}));Gh.displayName="CloseIcon";const br={primary:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#001c35",975:"#00111f"},black:{50:"#f0f0f0",100:"#d9d9d9",200:"#bfbfbf",300:"#8c8c8c",400:"#595959",500:"#454545",600:"#262626",700:"#1f1f1f",800:"#141414",900:"#000000",950:"#0a0a0a",975:"#050505"},blue:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#002547",975:"#001529"},success:{50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31",950:"#033625",975:"#022419"},neutral:{50:"#F9FAFB",100:"#F2F4F7",200:"#EAECF0",300:"#D0D5DD",400:"#98A2B3",500:"#667085",600:"#475467",700:"#344054",800:"#1D2939",900:"#101828",950:"#0c1219",975:"#080a0f"},error:{50:"#FEF3F2",100:"#FEE4E2",200:"#FECDCA",300:"#FDA29B",400:"#F97066",500:"#F04438",600:"#D92D20",700:"#B42318",800:"#912018",900:"#7A271A",950:"#3d1008",975:"#2a0b05"},warning:{50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E",950:"#662505",975:"#451803"},teal:{50:"#ebf5f5",100:"#c2e0df",200:"#a4d1d0",300:"#7abcba",400:"#61afad",500:"#399b98",600:"#348d8a",700:"#286e6c",800:"#1f5554",900:"#184140",950:"#133534",975:"#0c2222"},green:{50:"#f2f7f2",100:"#d5e5d5",200:"#c1d9c1",300:"#a5c7a5",400:"#94bd93",500:"#79ac78",600:"#6e9d6d",700:"#567a55",800:"#435f42",900:"#334832",950:"#001e00",975:"#182818"},yellow:{50:"#fffaed",100:"#fff0c7",200:"#ffe8ac",300:"#ffde86",400:"#ffd76f",500:"#ffcd4b",600:"#e8bb44",700:"#b59235",800:"#8c7129",900:"#6b5620",950:"#524314",975:"#382e0e"},orange:{50:"#fef4e8",100:"#fddeb7",200:"#fcce94",300:"#fbb764",400:"#faa945",500:"#f99417",600:"#e38715",700:"#b16910",800:"#89510d",900:"#693e0a",950:"#4d2d07",975:"#331e05"},peach:{50:"#fceef3",100:"#f5cad9",200:"#f0b0c6",300:"#ea8cad",400:"#e5759d",500:"#df5384",600:"#cb4c78",700:"#9e3b5e",800:"#7b2e49",900:"#5e2337",950:"#451a2b",975:"#2e111d"},red:{50:"#fceaeb",100:"#f6bec0",200:"#f29ea2",300:"#ec7278",400:"#e9575d",500:"#e32d35",600:"#cf2930",700:"#a12026",800:"#7d191d",900:"#5f1316",950:"#470c0f",975:"#2f080a"},purple:{50:"#f5e7ff",100:"#dfb4ff",200:"#d090ff",300:"#bb5dff",400:"#ad3dff",500:"#990dff",600:"#8b0ce8",700:"#6d09b5",800:"#54078c",900:"#40056b",950:"#300450",975:"#200336"},navy:{50:"#eaebf6",100:"#bebfe2",200:"#9ea1d3",300:"#7276bf",400:"#575bb3",500:"#2d32a0",600:"#292e92",700:"#202472",800:"#191c58",900:"#131543",950:"#0d0e2f",975:"#090a20"},grey:{50:"#f2f2f2",100:"#d5d5d5",200:"#c1c1c1",300:"#a5a5a5",400:"#939393",500:"#787878",600:"#6d6d6d",700:"#555555",800:"#424242",900:"#323232",950:"#252525",975:"#191919"}},Zg=A=>{let e=0;for(let n=0;n<A.length;n++)e=A.charCodeAt(n)+((e<<5)-e);const t=(e&16777215).toString(16).toUpperCase();return`#${"00000".substring(0,6-t.length)+t}`},Ra=(A,e=80)=>{let t=parseInt(A.slice(1,3),16),r=parseInt(A.slice(3,5),16),n=parseInt(A.slice(5,7),16);return t=Math.min(255,t+(255-t)*(e/100)),r=Math.min(255,r+(255-r)*(e/100)),n=Math.min(255,n+(255-n)*(e/100)),`#${Math.round(t).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(n).toString(16).padStart(2,"0")}`},Jh=(A,e=30)=>{let t=parseInt(A.slice(1,3),16),r=parseInt(A.slice(3,5),16),n=parseInt(A.slice(5,7),16);return t=Math.max(0,t*(1-e/100)),r=Math.max(0,r*(1-e/100)),n=Math.max(0,n*(1-e/100)),`#${Math.round(t).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(n).toString(16).padStart(2,"0")}`},Yg=(A,e)=>({background:e?br[A]?.[975]:br[A]?.[50],borderColor:e?br[A]?.[900]:br[A]?.[100],color:e?br[A]?.[500]:br[A]?.[600]}),Gg=(A,e)=>{const t=A.startsWith("#")?A:Zg(A);return{background:e?Jh(t,80):Ra(t,90),borderColor:e?Jh(t,40):Ra(t,50),color:e?Ra(t,40):t}},Jg=A=>({background:A?"#2D3748":"#F7FAFC",borderColor:A?"#4A5568":"#E2E8F0",color:A?"#A0AEC0":"#4A5568"}),$g=A=>{switch(A){case"xs":return"text-xs px-1 py-0.5";case"lg":return"text-sm px-2.5 py-1.5";case"md":return"text-sm px-2 py-1";default:return"text-xs px-1.5 py-0.5"}},_g=(A,e,t,r)=>A?t?e.color:br[A]?.[500]||e.color:r?"#A0AEC0":"#4A5568",St=y.forwardRef(({label:A,color:e,size:t="sm",className:r,onClick:n,onMouseDown:i,truncate:s,isHashColor:o=!1,icon:l,removable:c=!1,onRemove:d,onUpload:h,acceptsUpload:f=!1,"aria-label":u},p)=>{const b=y.useMemo(()=>typeof window>"u"?"light":localStorage.getItem("vite-ui-theme")||"light",[])==="dark",g=()=>e?e in br?Yg(e,b):Gg(e,b):Jg(b),x=
|
|
20
|
+
`}),h?a.jsx("label",{htmlFor:k,className:"mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",children:a.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:a.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:a.jsx(ot,{label:h||"",required:d||!1})})})}):null,a.jsxs("div",{className:"relative input-field",children:[a.jsx("input",{...x,ref:v,id:k,type:f,value:e,defaultValue:s,placeholder:u,required:d,disabled:o,max:l,min:c,onKeyDown:r,style:D(),className:V("border border-solid h-8 rounded-md block w-full pl-3","text-sm font-medium text-neutral-900 dark:text-black-100","bg-white dark:bg-black-600","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2",P(),o&&"opacity-70 cursor-not-allowed bg-neutral-50 dark:bg-black-700",b),onChange:T=>t(T.target.value),onClick:T=>T.stopPropagation()}),p&&a.jsx("div",{ref:w,className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p})]}),a.jsx(ze.AnimatePresence,{children:n&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a.jsx(K,{className:V("mt-1",S()),appearance:"custom",size:"extra-small",variant:"medium",children:n})})})]})});_a.displayName="InputField";const Yt=({size:A=16,className:e="",...t})=>a.jsxs("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-neutral-500 hover:text-neutral-700 ${e}`,...t,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),a.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Gh=y.forwardRef(({size:A=24,fill:e="currentColor",className:t,...r},n)=>a.jsx("svg",{ref:n,className:V(t),width:A,height:A,viewBox:"0 0 20 20",fill:e,xmlns:"http://www.w3.org/2000/svg",...r,children:a.jsx("path",{d:"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z",fill:"currentColor"})}));Gh.displayName="CloseIcon";const br={primary:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#001c35",975:"#00111f"},black:{50:"#f0f0f0",100:"#d9d9d9",200:"#bfbfbf",300:"#8c8c8c",400:"#595959",500:"#454545",600:"#262626",700:"#1f1f1f",800:"#141414",900:"#000000",950:"#0a0a0a",975:"#050505"},blue:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#002547",975:"#001529"},success:{50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31",950:"#033625",975:"#022419"},neutral:{50:"#F9FAFB",100:"#F2F4F7",200:"#EAECF0",300:"#D0D5DD",400:"#98A2B3",500:"#667085",600:"#475467",700:"#344054",800:"#1D2939",900:"#101828",950:"#0c1219",975:"#080a0f"},error:{50:"#FEF3F2",100:"#FEE4E2",200:"#FECDCA",300:"#FDA29B",400:"#F97066",500:"#F04438",600:"#D92D20",700:"#B42318",800:"#912018",900:"#7A271A",950:"#3d1008",975:"#2a0b05"},warning:{50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E",950:"#662505",975:"#451803"},teal:{50:"#ebf5f5",100:"#c2e0df",200:"#a4d1d0",300:"#7abcba",400:"#61afad",500:"#399b98",600:"#348d8a",700:"#286e6c",800:"#1f5554",900:"#184140",950:"#133534",975:"#0c2222"},green:{50:"#f2f7f2",100:"#d5e5d5",200:"#c1d9c1",300:"#a5c7a5",400:"#94bd93",500:"#79ac78",600:"#6e9d6d",700:"#567a55",800:"#435f42",900:"#334832",950:"#001e00",975:"#182818"},yellow:{50:"#fffaed",100:"#fff0c7",200:"#ffe8ac",300:"#ffde86",400:"#ffd76f",500:"#ffcd4b",600:"#e8bb44",700:"#b59235",800:"#8c7129",900:"#6b5620",950:"#524314",975:"#382e0e"},orange:{50:"#fef4e8",100:"#fddeb7",200:"#fcce94",300:"#fbb764",400:"#faa945",500:"#f99417",600:"#e38715",700:"#b16910",800:"#89510d",900:"#693e0a",950:"#4d2d07",975:"#331e05"},peach:{50:"#fceef3",100:"#f5cad9",200:"#f0b0c6",300:"#ea8cad",400:"#e5759d",500:"#df5384",600:"#cb4c78",700:"#9e3b5e",800:"#7b2e49",900:"#5e2337",950:"#451a2b",975:"#2e111d"},red:{50:"#fceaeb",100:"#f6bec0",200:"#f29ea2",300:"#ec7278",400:"#e9575d",500:"#e32d35",600:"#cf2930",700:"#a12026",800:"#7d191d",900:"#5f1316",950:"#470c0f",975:"#2f080a"},purple:{50:"#f5e7ff",100:"#dfb4ff",200:"#d090ff",300:"#bb5dff",400:"#ad3dff",500:"#990dff",600:"#8b0ce8",700:"#6d09b5",800:"#54078c",900:"#40056b",950:"#300450",975:"#200336"},navy:{50:"#eaebf6",100:"#bebfe2",200:"#9ea1d3",300:"#7276bf",400:"#575bb3",500:"#2d32a0",600:"#292e92",700:"#202472",800:"#191c58",900:"#131543",950:"#0d0e2f",975:"#090a20"},grey:{50:"#f2f2f2",100:"#d5d5d5",200:"#c1c1c1",300:"#a5a5a5",400:"#939393",500:"#787878",600:"#6d6d6d",700:"#555555",800:"#424242",900:"#323232",950:"#252525",975:"#191919"}},Zg=A=>{let e=0;for(let n=0;n<A.length;n++)e=A.charCodeAt(n)+((e<<5)-e);const t=(e&16777215).toString(16).toUpperCase();return`#${"00000".substring(0,6-t.length)+t}`},Ra=(A,e=80)=>{let t=parseInt(A.slice(1,3),16),r=parseInt(A.slice(3,5),16),n=parseInt(A.slice(5,7),16);return t=Math.min(255,t+(255-t)*(e/100)),r=Math.min(255,r+(255-r)*(e/100)),n=Math.min(255,n+(255-n)*(e/100)),`#${Math.round(t).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(n).toString(16).padStart(2,"0")}`},Jh=(A,e=30)=>{let t=parseInt(A.slice(1,3),16),r=parseInt(A.slice(3,5),16),n=parseInt(A.slice(5,7),16);return t=Math.max(0,t*(1-e/100)),r=Math.max(0,r*(1-e/100)),n=Math.max(0,n*(1-e/100)),`#${Math.round(t).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(n).toString(16).padStart(2,"0")}`},Yg=(A,e)=>({background:e?br[A]?.[975]:br[A]?.[50],borderColor:e?br[A]?.[900]:br[A]?.[100],color:e?br[A]?.[500]:br[A]?.[600]}),Gg=(A,e)=>{const t=A.startsWith("#")?A:Zg(A);return{background:e?Jh(t,80):Ra(t,90),borderColor:e?Jh(t,40):Ra(t,50),color:e?Ra(t,40):t}},Jg=A=>({background:A?"#2D3748":"#F7FAFC",borderColor:A?"#4A5568":"#E2E8F0",color:A?"#A0AEC0":"#4A5568"}),$g=A=>{switch(A){case"xs":return"text-xs px-1 py-0.5";case"lg":return"text-sm px-2.5 py-1.5";case"md":return"text-sm px-2 py-1";default:return"text-xs px-1.5 py-0.5"}},_g=(A,e,t,r)=>A?t?e.color:br[A]?.[500]||e.color:r?"#A0AEC0":"#4A5568",St=y.forwardRef(({label:A,color:e,size:t="sm",className:r,onClick:n,onMouseDown:i,truncate:s,isHashColor:o=!1,icon:l,removable:c=!1,onRemove:d,onUpload:h,acceptsUpload:f=!1,"aria-label":u},p)=>{const b=y.useMemo(()=>typeof window>"u"?"light":localStorage.getItem("vite-ui-theme")||"light",[])==="dark",g=()=>e?e in br?Yg(e,b):Gg(e,b):Jg(b),x=O=>{const C=O.target.files?.[0];C&&h&&h(C),O.target.value=""},v=g(),w=_g(e,v,o,b);return a.jsx("div",{ref:p,className:V("inline-flex items-center border rounded-md transition-colors bg-primary-50 border-primary-100 text-primary-600 dark:bg-primary-900 dark:border-primary-800 dark:text-primary-400",$g(t),(n||f)&&"cursor-pointer hover:opacity-80",r),style:{maxWidth:"100%"},onMouseDown:i,onClick:n,"aria-label":u||`Tag: ${A}`,role:"button",tabIndex:n||f?0:void 0,children:a.jsxs("div",{className:"flex items-center gap-0.5 min-w-0 overflow-hidden",style:{maxWidth:"100%"},children:[l,s?a.jsx("p",{title:A,className:`text-${t} ${n||f?"cursor-pointer":""} overflow-hidden whitespace-nowrap text-ellipsis`,style:{maxWidth:"100%"},children:A.length>s?`${A.slice(0,s)}...`:A}):a.jsx("p",{className:`text-${t} overflow-hidden whitespace-nowrap text-ellipsis`,style:{maxWidth:"100%"},children:A}),f&&a.jsx("input",{type:"file",onChange:x,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${A}`}),c&&d&&a.jsx("button",{onClick:d,className:"ml-1 flex-shrink-0","aria-label":`Remove ${A}`,type:"button",children:a.jsx(Gh,{size:12,fill:w,className:"cursor-pointer text-primary-600 dark:text-primary-400"})})]})})});St.displayName="Tag";const Gt=({labels:A=[]})=>{const e=[],t=[];return A.forEach(r=>{typeof r=="string"&&!e.includes(r)?e.push(r):typeof r!="string"&&!t.some(n=>n.label===r.label)&&t.push(r)}),a.jsxs(a.Fragment,{children:[e?.map(r=>a.jsx(St,{size:"xs",label:r,color:"primary"},r)),t?.map((r,n)=>a.jsx(St,{size:"xs",label:r?.label,color:r?.color},r?.id||n))]})},Rn=()=>{if(typeof window>"u"||typeof navigator>"u")return"other";const A=navigator.platform?.toLowerCase()||"",e=navigator.userAgent?.toLowerCase()||"";return A.includes("mac")||e.includes("mac")?"macos":A.includes("win")||e.includes("win")?"windows":A.includes("linux")||e.includes("linux")?"linux":"other"},ei=()=>y.useMemo(()=>Rn(),[]),Rg=()=>Rn()==="macos",xs={Meta:{macos:"⌘",other:"Ctrl"},Alt:{macos:"⌥",other:"Alt"},Shift:{macos:"⇧",other:"Shift"},Control:{macos:"⌃",other:"Ctrl"},Enter:{macos:"↵",other:"Enter"},Delete:{macos:"⌫",other:"Delete"}},$h=(A,e)=>{const t=e??Rn(),r=xs[A];return r?t==="macos"?r.macos:r.other:A},el=(A,e)=>{const t=e??Rn();return A.map(r=>$h(r,t))},e9=A=>{const e=ei();return y.useMemo(()=>el(A,e),[A,e])},t9=`
|
|
21
21
|
.tooltip-container {
|
|
22
22
|
background-color: #101828;
|
|
23
23
|
border-radius: 8px;
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
.dark [class*="virtual-list-scrollbar-thumb"] {
|
|
165
165
|
background: #454545 !important;
|
|
166
166
|
}
|
|
167
|
-
`,document.head.appendChild(he)},[]);const Se=()=>{if(q){let _="";Z==null?_="":typeof Z=="string"||typeof Z=="number"?_=String(Z):Array.isArray(Z)?_=Z.map(pe=>typeof pe=="object"&&pe!==null&&"value"in pe?pe.value:pe).join(", "):typeof Z=="object"&&"value"in Z&&(_=String(Z.value)),q({key:u,value:_})}},Z=a9(e),$=y.useMemo(()=>m?Ng(m,b):null,[m,b]),R=(_,he)=>{if(te.current&&Y.id){const pe=document.getElementById(Y.id);if(pe){const Ne=Array.isArray(he)?he.map(_e=>_e.value):he?.value;pe.dataset.selectedValue=JSON.stringify(Ne);const Xt=new Event("change",{bubbles:!0});Object.defineProperty(Xt,"target",{writable:!1,value:pe}),pe.dispatchEvent(Xt);const gt=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${Y.id}`,value:Ne,type:"change"}});pe.dispatchEvent(gt)}}if(t==="tags"){const pe=Array.isArray(_)?_:[_];p?.(pe?.map(Ne=>({label:Ne,value:Ne})))}else p?.(he)},re=c9({options:n,value:e,defaultValue:Y?.defaultValue}),De=y.useMemo(()=>re.length>0||Z!=null,[re,Z]),Pe=y.useMemo(()=>{if(!t||t!=="multiple"||re.length===0)return!1;const _=Array.isArray(Z)?Z:[];return re.map(pe=>pe.value).every(pe=>_.some(Ne=>typeof Ne=="object"&&Ne!==null&&"value"in Ne?String(Ne.value)===String(pe):String(Ne)===String(pe)))},[Z,re,t]),Xe=()=>{!t||t!=="multiple"||!p||p(Pe?[]:re)},ye=y.useCallback(_=>{if(!_)return;const he=new Event("submit",{bubbles:!0,cancelable:!0});_.dispatchEvent(he);const pe=_.querySelector('button[type="submit"]');pe&&pe.click()},[]),Qe=y.useCallback(_=>{if(_.key==="Enter"&&!Ae&&(_.preventDefault(),_.stopPropagation(),Z)){const he=_.currentTarget.closest("form");ye(he)}},[Ae,Z,ye]),Qt=y.useCallback(_=>{const{label:he,value:pe,onClose:Ne}=_,gt=re.find(kt=>String(kt.value)===String(pe))?.color||"blue",_e=kt=>{kt.preventDefault(),kt.stopPropagation()};return a.jsx("div",{className:"cursor-pointer me-1 inline-flex",children:a.jsx(St,{label:he,color:gt,size:"sm",onMouseDown:_e,onClick:D?void 0:Ne,isHashColor:!0,removable:!0,onRemove:Ne})})},[re,D]),ne=y.useCallback(_=>{we(_),(l||$)?.(_)},[l,$]);return a.jsxs("div",{ref:B,className:V("flex gap-0.5 w-full relative",j&&f?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),id:Y.id,children:[f&&!j?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,a.jsxs("div",{className:V("w-full flex flex-col gap-1 risk-analysis-select-field",o),onMouseDown:_=>_.stopPropagation(),onKeyDownCapture:Qe,role:"group","aria-labelledby":A?"select-field-label":void 0,children:[A?a.jsx("label",{id:"select-field-label",htmlFor:"label",className:`text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${d?"":"capitalize"} ${Q||""}`,children:a.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[a.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[a.jsx(ot,{label:A||"",required:i||!1,isRequiredConditional:W||!1}),F&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),h&&a.jsx(bA,{}),a.jsx(Gt,{labels:s}),c&&a.jsx(Oe,{placement:"top",title:c,children:a.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&_.preventDefault()},children:a.jsx(Yt,{})})})]}),f&&j?a.jsx("button",{id:"btn-select-field-base-add-to-document",className:"cursor-pointer",onClick:Se,type:"button",children:a.jsx(Oe,{placement:"top",title:I("Add to document"),children:a.jsx(le.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,a.jsx(Ce.Select,{onOpenChange:ge,disabled:D,className:`w-full text-black-900 dark:text-black-200 ${r&&i?"ant-select-status-error":"#e2e8f0"} ${N&&L?.color?"risk-select-field":""}`,classNames:{popup:{root:"!z-[5001]"}},style:{width:"100%","--risk-color":N&&L?.hexBgColor?L?.hexBgColor:"","--risk-border-color":N&&L?.hexBorderColor?L?.hexBorderColor:""},"aria-required":i,mode:t,value:Z,onChange:R,filterOption:m?g:(_,he)=>(he?.label||"")?.toLowerCase()?.includes(_?.toLowerCase()),showSearch:!0,onSearch:ne||void 0,onPopupScroll:x,popupClassName:"select-field-dropdown-popup",popupRender:_=>a.jsx(h9,{showSelectAll:T,mode:t,options:re,searchValue:ce,handleSelectAll:Xe,isAllSelected:Pe,menu:_,isLoading:v,hasExistingData:De,t:I}),options:re.map(({label:_,value:he,color:pe,...Ne})=>({label:String(_),value:String(he),key:String(he),id:String(he),color:pe,...Ne})),optionRender:_=>{const he=_?.data?.fullname;if(he&&H){const[pe,Ne]=he.split(" ");return a.jsxs("div",{className:"flex items-center justify-start gap-1",children:[a.jsx(H,{firstName:pe,lastName:Ne,profilePic:_?.data?.url||"",size:"xs",enablePopper:!0,userId:_?.data?.value}),a.jsx("span",{className:"ml-2",children:_.label})]})}return a.jsx("span",{children:_.label})},autoClearSearchValue:O,onClear:()=>p&&p(t==="tags"||t==="multiple"?[]:null),maxTagCount:t==="tags"&&P?void 0:"responsive",maxTagPlaceholder:_=>a.jsx(Oe,{placement:"top",title:_.length>3?_.slice(0,3).map(({label:he})=>he).join(", ")+"...":_.map(({label:he})=>he).join(", "),children:a.jsxs("span",{children:["+",_.length," more"]})}),tagRender:S||Qt,allowClear:w,...Y}),r&&a.jsx(K,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})]}),j&&L&&N&&M&&a.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:_=>_.stopPropagation(),onMouseDown:_=>_.preventDefault(),onKeyDown:_=>{_.key==="Escape"&&ee(!1)},children:a.jsx(M,{riskDetails:L})})]})});ws.displayName="SelectField";const Rh=y.forwardRef(({id:A,label:e,checked:t,isChecked:r,onChange:n,disabled:i=!1,required:s=!1,message:o,messageType:l="default",wrapperClassName:c,checkboxClassName:d,labelClassName:h,size:f="medium",variant:u="default",labelPosition:p="right",checkboxProps:m},b)=>{const g=t!==void 0?t:r||!1,x=()=>{switch(f){case"small":return"w-3 h-3";case"large":return"w-5 h-5";default:return"w-4 h-4"}},v=()=>{if(l==="error")return"text-red-600 border-red-300 focus:ring-red-500 dark:focus:ring-red-600";if(l==="success")return"text-green-600 border-green-300 focus:ring-green-500 dark:focus:ring-green-600";if(l==="info")return"text-blue-600 border-blue-300 focus:ring-blue-500 dark:focus:ring-blue-600";switch(u){case"outline":return"text-primary-600 bg-transparent border-neutral-300 focus:ring-primary-500 dark:focus:ring-primary-600";case"solid":return"text-primary-600 bg-primary-50 border-primary-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-primary-900/20";default:return"text-primary-600 bg-gray-100 border-gray-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-neutral-600 dark:border-gray-600"}},w=()=>l==="error"?"text-red-500 dark:text-red-400":l==="success"?"text-green-500 dark:text-green-400":l==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",O=()=>{switch(f){case"small":return"extra-small";case"large":return"medium";default:return"small"}},C=k=>{n(k.target.checked,k)},P=a.jsx(Ce.Checkbox,{...m,ref:b,id:A,checked:g,onChange:C,disabled:i,className:V("rounded focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400 focus:ring-offset-gray-800 transition-colors duration-200",x(),v(),i&&"opacity-50 cursor-not-allowed",d),"aria-required":s,"aria-invalid":o&&l==="error"?"true":"false","aria-describedby":o?`${A}-message`:void 0}),S=e?a.jsx("label",{htmlFor:A,className:V("font-medium cursor-pointer transition-colors duration-200",i?"text-neutral-400 dark:text-neutral-600 cursor-not-allowed":"text-neutral-900 dark:text-neutral-100",p==="right"?"ml-2":"mr-2",h),children:a.jsxs(K,{variant:"medium",size:O(),appearance:"body",children:[e,s&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}):null;return a.jsxs("div",{className:V("flex flex-col",c),children:[a.jsx("div",{className:V("flex items-center",p==="left"&&"flex-row-reverse justify-end"),children:p==="left"?a.jsxs(a.Fragment,{children:[P,S]}):a.jsxs(a.Fragment,{children:[P,S]})}),a.jsx(ze.AnimatePresence,{children:o&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${A}-message`,role:l==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",w()),appearance:"custom",size:"extra-small",variant:"medium",children:o})})})]})});Rh.displayName="Checkbox";const ef=({label:A,isChecked:e,onChange:t,id:r,...n})=>a.jsxs("div",{className:"flex items-center",children:[a.jsx(Ce.Checkbox,{checked:e,onChange:t,id:r,type:"checkbox",value:"",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:!bg-neutral-600 dark:border-gray-600",...n}),a.jsx("label",{className:"ml-2 text-sm font-medium text-neutral-900 dark:text-neutral-100",children:A})]}),tf=y.forwardRef(({id:A,label:e,value:t,defaultValue:r="#000000",onChange:n,onColorChange:i,disabled:s=!1,required:o=!1,message:l,messageType:c="default",wrapperClassName:d,inputClassName:h,labelClassName:f,size:u="medium",showValue:p=!1,valueFormat:m="hex",inputProps:b,helpText:g},x)=>{const v=y.useRef(null),w=x||v,O=y.useCallback(()=>{requestAnimationFrame(()=>{w.current?.focus()})},[w]),C=y.useCallback(z=>{if(z.key==="Enter"&&!z.shiftKey){z.preventDefault();const X=z.target.closest("form");if(X){const H=X.querySelector('button[type="submit"]');H?H.click():X.requestSubmit()}}b?.onKeyDown?.(z)},[b]),P=t!==void 0?t:r,S=()=>{switch(u){case"small":return"w-8 h-8";case"large":return"w-16 h-16";default:return"w-12 h-12"}},k=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",D=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",T=()=>{switch(u){case"small":return"extra-small";case"large":return"medium";default:return"small"}},Q=z=>{const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(z);if(!X)return z;const H=parseInt(X[1],16),q=parseInt(X[2],16),W=parseInt(X[3],16);return`rgb(${H}, ${q}, ${W})`},L=z=>{const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(z);if(!X)return z;const H=parseInt(X[1],16)/255,q=parseInt(X[2],16)/255,W=parseInt(X[3],16)/255,F=Math.max(H,q,W),Y=Math.min(H,q,W);let B=0,I=0;const j=(F+Y)/2;if(F!==Y){const ee=F-Y;switch(I=j>.5?ee/(2-F-Y):ee/(F+Y),F){case H:B=(q-W)/ee+(q<W?6:0);break;case q:B=(W-H)/ee+2;break;case W:B=(H-q)/ee+4;break}B/=6}return`hsl(${Math.round(B*360)}, ${Math.round(I*100)}%, ${Math.round(j*100)}%)`},N=()=>{switch(m){case"rgb":return Q(P);case"hsl":return L(P);default:return P.toUpperCase()}},M=z=>{const X=z.target.value;n(X,z),i?.(X)};return a.jsxs("div",{className:V("flex flex-col w-full",d),children:[e&&a.jsx("label",{htmlFor:A,className:V("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",f),children:a.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:a.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:a.jsxs(K,{variant:"medium",size:T(),appearance:"subtitle",children:[e,o&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),g&&a.jsx(K,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:g}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"relative",children:a.jsx("input",{...b,ref:w,onBlur:O,onKeyDown:C,type:"color",id:A,value:P,onChange:M,disabled:s,required:o,className:V("border rounded-md cursor-pointer transition-all duration-200","focus:outline-none focus:ring-2",S(),D(),s&&"opacity-50 cursor-not-allowed",h),style:{backgroundColor:P},"aria-required":o,"aria-invalid":l&&c==="error"?"true":"false","aria-describedby":l||g?`${A}-description`:void 0})}),p&&a.jsx("div",{className:"flex-1",children:a.jsx(K,{variant:"medium",size:"small",appearance:"body",className:"font-mono text-neutral-700 dark:text-neutral-300",children:N()})})]}),a.jsx(ze.AnimatePresence,{children:l&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${A}-description`,role:c==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",k()),appearance:"custom",size:"extra-small",variant:"medium",children:l})})}),g&&!l&&a.jsx("div",{id:`${A}-description`,className:"sr-only",children:g})]})});tf.displayName="ColorPicker";const Al=()=>{const[A,e]=y.useState(!1);return y.useEffect(()=>{const t=()=>{e(document.documentElement.classList.contains("dark"))};t();const r=new MutationObserver(n=>{n.forEach(i=>{i.attributeName==="class"&&t()})});return r.observe(document.documentElement,{attributes:!0}),()=>r.disconnect()},[]),A},Af=({id:A,label:e,errorMessage:t,selectOptions:r,loading:n,isClearable:i,multiSelect:s,selectedValues:o,disabled:l,required:c,value:d,className:h,tooltip:f,tags:u,originalCase:p=!1,onChange:m,filterOption:b,placeholder:g,...x})=>{const v=Al(),[w,O]=y.useState(!1),C=(N,M)=>{m&&m(N);const z=document.getElementById(A);if(z){const X=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${A}`,value:N,type:"change"}});z.dispatchEvent(X)}},P={control:(N,M)=>({...N,borderColor:t&&c?v?"#F04438":"#fda49b":M.isFocused?"var(--color-primary-600)":v?"#404040":"#d9d9d9",backgroundColor:v?"rgb(38 38 38)":M.isDisabled?"#f5f5f5":"#fff",borderRadius:"6px",minHeight:"32px",fontSize:"14px",padding:"0 4px 0 12px",opacity:M.isDisabled?.6:1,cursor:M.isDisabled?"not-allowed":"pointer",boxShadow:"none","&:hover":{borderColor:t&&c?v?"#F04438":"#fda49b":"var(--color-primary-600)"}}),valueContainer:N=>({...N,fontSize:"14px",padding:0}),input:N=>({...N,margin:"0",padding:"0",color:v?"rgb(229 229 229)":"inherit"}),indicatorsContainer:N=>({...N,padding:0}),option:(N,M)=>({...N,fontSize:"14px",lineHeight:"22px",padding:"5px 12px",backgroundColor:M.isSelected?v?"#262626":"#e6f4ff":v?"#0a0a0a":"#fff",color:M.isDisabled?v?"#737373":"#a3a3a3":v?"#e5e5e5":"rgba(0,0,0,0.88)",cursor:M.isDisabled?"not-allowed":"pointer",opacity:M.isDisabled?.6:1,"&:hover":{backgroundColor:M.isDisabled?v?"#262626":"#fff":v?"#404040":"#f5f5f5"},"&:active":{backgroundColor:v?"#404040":"#e6f4ff"}}),singleValue:(N,M)=>({...N,fontSize:"14px",lineHeight:"20px",color:M.isDisabled?v?"#737373":"#a3a3a3":v?"#e5e5e5":"rgba(0,0,0,0.88)"}),placeholder:N=>({...N,fontSize:"14px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:v?"#525252":"#bfbfbf"}),multiValue:N=>({...N,backgroundColor:v?"#262626":"#f0f5ff",border:v?"1px solid #404040":"1px solid #adc6ff",borderRadius:"4px"}),multiValueLabel:N=>({...N,color:v?"#e5e5e5":"var(--color-primary-600)",fontSize:"12px"}),multiValueRemove:N=>({...N,color:v?"#e5e5e5":"var(--color-primary-600)","&:hover":{backgroundColor:v?"#404040":"#e6f4ff",color:v?"#fff":"var(--color-primary-600)"}}),menu:N=>({...N,zIndex:5001,borderRadius:"8px",boxShadow:v?"0 6px 16px 0 rgba(0,0,0,0.32)":"0 6px 16px 0 rgba(0,0,0,0.08), 0 3px 6px -4px rgba(0,0,0,0.12), 0 9px 28px 8px rgba(0,0,0,0.05)",backgroundColor:v?"#0a0a0a":"#fff",border:v?"1px solid #404040":"none",overflow:"hidden"}),menuList:N=>({...N,padding:"4px",maxHeight:"256px"})},S=!!o?.length,T=w&&!l&&(i?S||!!d:!1),Q=N=>{N.stopPropagation(),N.preventDefault(),C(s?[]:null)},L=()=>a.jsx("div",{className:"flex items-center",children:T?a.jsx(le.CancelRounded,{onClick:Q,sx:{fontSize:"16px",cursor:"pointer",color:v?"rgba(255,255,255,0.45)":"rgba(0,0,0,0.25)","&:hover":{color:v?"rgba(255,255,255,0.65)":"rgba(0,0,0,0.45)"}}}):a.jsx(le.ChevronLeftRounded,{className:"-rotate-90",sx:{fontSize:"18px",color:v?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.25)"}})});return a.jsxs("div",{id:A,className:V("w-full flex flex-col gap-1",h),onMouseDown:N=>N.stopPropagation(),role:"group","aria-labelledby":e?A+"Label":void 0,children:[e&&a.jsxs("label",{id:A+"Label",htmlFor:"text",className:`text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${p?"":"capitalize"}`,children:[a.jsx(ot,{label:e||"",required:c||!1}),a.jsx(Gt,{labels:u}),f&&a.jsx(Ce.Tooltip,{placement:"top",title:f,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),a.jsx("div",{onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:a.jsx(Lg,{...x,id:"cm"+e,required:c,options:r,isClearable:!1,isLoading:n,isDisabled:l,styles:P,isMulti:s,value:s?o:d,onChange:C,filterOption:b,placeholder:g,classNames:{menuList:()=>"nowheel"},components:{DropdownIndicator:L,IndicatorSeparator:()=>null}})}),t&&a.jsx(K,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:t})]})};Af.displayName="CreatableSelectField";const rl=({ref:A,handler:e,enabled:t=!0})=>{y.useEffect(()=>{if(!t)return;const r=n=>{A.current&&!A.current.contains(n.target)&&e()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[A,e,t])},f9={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",850:"#1e3a8a",900:"#1e3a8a",950:"#172554",975:"#121f47"},rf=({id:A,label:e,options:t,placeholder:r,onChange:n,isLoading:i=!1,hideLabel:s=!1,errorMessage:o,required:l=!1,optionConfig:c,menuConfig:d,value:h,isMulti:f=!1,isClearable:u=!0,disabled:p=!1,className:m,isDark:b=!1,primaryColorShades:g=f9})=>{const x=y.useRef(null),[v,w]=y.useState(null),[O,C]=y.useState("");rl({ref:x,handler:()=>{w(null)}});const P={control:(L,N)=>({...L,borderColor:o&&l?"#F04438":N.isFocused?b?"#1e1e1e":g[600]:b?"#1e1e1e":"#e2e8f0",backgroundColor:N.isDisabled?b?"#1a1a1a":"#f5f5f5":b?"#262626":"#FFFFFF",color:N.isDisabled?b?"#666666":"#a0a0a0":b?"#d4d4d4":"#0F172A",borderRadius:"6px",minHeight:"32px",fontSize:"14px",padding:"0px 10px",cursor:N.isDisabled?"not-allowed":"default",opacity:(N.isDisabled,1),boxShadow:N.isFocused?b?`0 0 0 2px ${g[400]}`:`0 0 0 2px ${g[500]}`:"none"}),valueContainer:L=>({...L,fontSize:"14px",maxHeight:"60px",overflowY:"auto",padding:"0px",margin:"0px",color:b?"#d4d4d4":"inherit","::-webkit-scrollbar":{display:"none"}}),input:L=>({...L,margin:"0"}),indicatorSeparator:()=>({display:"none"}),option:L=>({...L,fontWeight:500,fontSize:"14px",lineHeight:"1",borderBottom:b?"1px solid #1e1e1e":"1px solid #eee",backgroundColor:b?"#000000":"#FFFFFF",color:b?"#d4d4d4":"#0F172A",display:"flex",alignItems:"center",zIndex:200,":hover":{backgroundColor:b?"#171717":g[50]},".icon":{height:"14px",width:"14px"}}),singleValue:(L,N)=>({...L,fontWeight:500,fontSize:"14px",lineHeight:"1.25rem",color:(N.isDisabled,b?"#d4d4d4":"#0F172A"),display:"flex",alignItems:"center",".icon":{height:"14px",width:"14px"}}),placeholder:(L,N)=>({...L,fontSize:"14px",fontWeight:500,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:(N.isDisabled,b?"#595959":"#9CA3AF")}),multiValue:L=>({...L,backgroundColor:b?"#000000":g[50],borderRadius:"6px",fontFamily:"Inter",fontSize:"12px",height:"20px",alignItems:"center"}),indicatorsContainer:L=>({...L,padding:"0",height:"30px"}),multiValueLabel:L=>({...L,color:b?"#d4d4d4":g[600],fontSize:"12px"}),multiValueRemove:L=>({...L,color:b?"#d4d4d4":g[600],height:"12px",fontSize:"8px",":hover":{backgroundColor:b?"#171717":g[50]},svg:{height:"12px",width:"12px"}})},S=L=>{const N=t.filter(M=>M?.label?.toLowerCase()?.includes(O?.toLowerCase()));return a.jsx(bs.components.MenuList,{...L,className:V("!z-50 rounded !visible overflow-x-scroll",b?"bg-black-800":"bg-white",b?"text-neutral-300":"text-slate-900",d?.className),ref:x,children:N?.length?N.map((M,z)=>a.jsxs("div",{className:V("item z-[9999] flex items-center justify-between px-4 py-1.5 no-wheel",p?"cursor-not-allowed opacity-50":"cursor-pointer",b?"text-neutral-300":"text-slate-900",!p&&k(M)?b?"bg-black-700":"bg-primary-50":p?"":b?"hover:bg-black-700":"hover:bg-primary-50",d?.optionClassName?"":b?"border-b border-black-700":"border-b border-[#eee]"),onClick:X=>{p||(X.stopPropagation(),L.selectOption(M))},children:[c?.component?a.jsx(c.component,{...c.componentProps,...M}):a.jsx("div",{children:M.label}),a.jsx("div",{className:"flex items-center gap-1",children:k(M)&&c?.selectIndecator?c?.selectIndecator:null})]},z)):a.jsx("div",{className:V("opacity-50 flex justify-center items-center p-1 font-medium",b?"text-neutral-400":"text-gray-700"),children:"No options"})})},k=L=>f?v?.some(N=>N.value===L.value):L.value===v?.value,D=L=>{const{children:N,innerProps:M,isDisabled:z,getValue:X}=L,H=X();return a.jsx(bs.components.SingleValue,{...L,innerProps:M,isDisabled:z,children:H.length>0?H.map((q,W)=>a.jsx("span",{children:c?.component?a.jsx(c.component,{...c.componentProps,...q}):a.jsx("div",{children:q.label})},W)):a.jsx(a.Fragment,{children:N})})},T=L=>{const{innerProps:N,isDisabled:M,data:z}=L;return a.jsx(bs.components.MultiValue,{...L,innerProps:N,isDisabled:M,children:c?.component?a.jsx(c.component,{...c.componentProps,...z}):a.jsx("div",{children:z.label})})},Q=(L,N)=>(C(N),!0);return a.jsxs("div",{className:V("flex flex-col",b?"text-black-300":"text-slate-900",i?"opacity-50":"opacity-100",p?"cursor-not-allowed":""),id:A,children:[s||!e?null:a.jsx(ot,{label:e||"",required:l||!1}),a.jsx(bs,{required:!0,options:t,placeholder:r,value:h,onChange:L=>{w(L),n(L)},styles:P,isMulti:f,className:V(b&&"bg-black-800 border-black-700",m),components:{MenuList:S,SingleValue:D,MultiValue:T},filterOption:Q,closeMenuOnSelect:!0,isClearable:u,isDisabled:p}),o&&a.jsx(K,{className:V("mt-1",b?"text-red-400":"text-red-500"),appearance:"custom",size:"extra-small",variant:"medium",children:o})]})};rf.displayName="CustomizableSelectField";const nf=[{value:"AED",label:"UAE Dirham"},{value:"AFN",label:"Afghan Afghani"},{value:"ALL",label:"Albanian Lek"},{value:"AMD",label:"Armenian Dram"},{value:"AOA",label:"Angolan Kwanza"},{value:"ARS",label:"Argentine Peso"},{value:"AUD",label:"Australian Dollar"},{value:"AWG",label:"Aruban Florin"},{value:"AZN",label:"Azerbaijani Manat"},{value:"BBD",label:"Barbadian Dollar"},{value:"BDT",label:"Bangladeshi Taka"},{value:"BGN",label:"Bulgarian Lev"},{value:"BHD",label:"Bahraini Dinar"},{value:"BIF",label:"Burundian Franc"},{value:"BMD",label:"Bermudian Dollar"},{value:"BND",label:"Brunei Dollar"},{value:"BRL",label:"Brazilian Real"},{value:"BSD",label:"Bahamian Dollar"},{value:"BTN",label:"Bhutanese Ngultrum"},{value:"BWP",label:"Botswanan Pula"},{value:"BYN",label:"Belarusian Ruble"},{value:"BZD",label:"Belize Dollar"},{value:"CAD",label:"Canadian Dollar"},{value:"CDF",label:"Congolese Franc"},{value:"CHE",label:"WIR Euro"},{value:"CHF",label:"Swiss Franc"},{value:"CHW",label:"WIR Franc"},{value:"CLP",label:"Chilean Peso"},{value:"CNY",label:"Chinese Yuan"},{value:"COP",label:"Colombian Peso"},{value:"CRC",label:"Costa Rican Colón"},{value:"CUC",label:"Cuban Convertible Peso"},{value:"CUP",label:"Cuban Peso"},{value:"CVE",label:"Cape Verdean Escudo"},{value:"CZK",label:"Czech Koruna"},{value:"DJF",label:"Djiboutian Franc"},{value:"DKK",label:"Danish Krone"},{value:"DOP",label:"Dominican Peso"},{value:"DZD",label:"Algerian Dinar"},{value:"EGP",label:"Egyptian Pound"},{value:"ERN",label:"Eritrean Nakfa"},{value:"ESP",label:"Spanish Peseta"},{value:"ETB",label:"Ethiopian Birr"},{value:"EUR",label:"Euro"},{value:"FJD",label:"Fijian Dollar"},{value:"FKP",label:"Falkland Islands Pound"},{value:"GBP",label:"British Pound"},{value:"GEL",label:"Georgian Lari"},{value:"GHS",label:"Ghanaian Cedi"},{value:"GIP",label:"Gibraltar Pound"},{value:"GMD",label:"Gambian Dalasi"},{value:"GNF",label:"Guinean Franc"},{value:"GTQ",label:"Guatemalan Quetzal"},{value:"GYD",label:"Guyanese Dollar"},{value:"HKD",label:"Hong Kong Dollar"},{value:"HNL",label:"Honduran Lempira"},{value:"HRK",label:"Croatian Kuna"},{value:"HTG",label:"Haitian Gourde"},{value:"HUF",label:"Hungarian Forint"},{value:"IDR",label:"Indonesian Rupiah"},{value:"ILS",label:"Israeli New Shekel"},{value:"INR",label:"Indian Rupee"},{value:"IQD",label:"Iraqi Dinar"},{value:"IRR",label:"Iranian Rial"},{value:"ISK",label:"Icelandic Króna"},{value:"JMD",label:"Jamaican Dollar"},{value:"JOD",label:"Jordanian Dinar"},{value:"JPY",label:"Japanese Yen"},{value:"KES",label:"Kenyan Shilling"},{value:"KGS",label:"Kyrgyzstani Som"},{value:"KHR",label:"Cambodian Riel"},{value:"KMF",label:"Comorian Franc"},{value:"KPW",label:"North Korean Won"},{value:"KRW",label:"South Korean Won"},{value:"KWD",label:"Kuwaiti Dinar"},{value:"KYD",label:"Caymanian Dollar"},{value:"KZT",label:"Kazakhstani Tenge"},{value:"LAK",label:"Lao Kip"},{value:"LBP",label:"Lebanese Pound"},{value:"LKR",label:"Sri Lankan Rupee"},{value:"LRD",label:"Liberian Dollar"},{value:"LSL",label:"Lesotho Loti"},{value:"LTL",label:"Lithuanian Litas"},{value:"LVL",label:"Latvian Lats"},{value:"LYD",label:"Libyan Dinar"},{value:"MAD",label:"Moroccan Dirham"},{value:"MDL",label:"Moldovan Leu"},{value:"MGA",label:"Malagasy Ariary"},{value:"MKD",label:"Macedonian Denar"},{value:"MMK",label:"Myanmar Kyat"},{value:"MNT",label:"Mongolian Tögrög"},{value:"MOP",label:"Macanese Pataca"},{value:"MRU",label:"Mauritanian Ouguiya"},{value:"MUR",label:"Mauritian Rupee"},{value:"MVR",label:"Maldivian Rufiyaa"},{value:"MWK",label:"Malawian Kwacha"},{value:"MXN",label:"Mexican Peso"},{value:"MYR",label:"Malaysian Ringgit"},{value:"MZN",label:"Mozambican Metical"},{value:"NAD",label:"Namibian Dollar"},{value:"NGN",label:"Nigerian Naira"},{value:"NIO",label:"Nicaraguan Córdoba"},{value:"NOK",label:"Norwegian Krone"},{value:"NPR",label:"Nepalese Rupee"},{value:"NZD",label:"New Zealand Dollar"},{value:"OMR",label:"Omani Rial"},{value:"PAB",label:"Panamanian Balboa"},{value:"PEN",label:"Peruvian Sol"},{value:"PHP",label:"Philippine Peso"},{value:"PKR",label:"Pakistani Rupee"},{value:"PLN",label:"Polish Zloty"},{value:"PRB",label:"Transnistrian Ruble"},{value:"PYG",label:"Paraguayan Guarani"},{value:"QAR",label:"Qatari Riyal"},{value:"RON",label:"Romanian Leu"},{value:"RSD",label:"Serbian Dinar"},{value:"RUB",label:"Russian Ruble"},{value:"RWF",label:"Rwandan Franc"},{value:"SAR",label:"Saudi Riyal"},{value:"SCR",label:"Seychellois Rupee"},{value:"SDG",label:"Sudanese Pound"},{value:"SEK",label:"Swedish Krona"},{value:"SGD",label:"Singapore Dollar"},{value:"SHP",label:"Saint Helena Pound"},{value:"SLL",label:"Sierra Leonean Leone"},{value:"SOS",label:"Somali Shilling"},{value:"SRD",label:"Surinamese Dollar"},{value:"SSP",label:"South Sudanese Pound"},{value:"SVC",label:"Salvadoran Colón"},{value:"SYP",label:"Syrian Pound"},{value:"SZL",label:"Swazi Lilangeni"},{value:"THB",label:"Thai Baht"},{value:"TJS",label:"Tajikistani Somoni"},{value:"TMT",label:"Turkmenistani Manat"},{value:"TND",label:"Tunisian Dinar"},{value:"TOP",label:"Tongan Paʻanga"},{value:"TRY",label:"Turkish Lira"},{value:"TWD",label:"New Taiwan Dollar"},{value:"TZS",label:"Tanzanian Shilling"},{value:"UAH",label:"Ukrainian Hryvnia"},{value:"UGX",label:"Ugandan Shilling"},{value:"USD",label:"United States Dollar"},{value:"UYU",label:"Uruguayan Peso"},{value:"UZS",label:"Uzbekistani Som"},{value:"VEF",label:"Venezuelan Bolívar"},{value:"VND",label:"Vietnamese Dong"},{value:"VUV",label:"Vanuatu Vatu"},{value:"WST",label:"Samoan Tala"},{value:"YER",label:"Yemeni Rial"},{value:"ZAR",label:"South African Rand"},{value:"ZMW",label:"Zambian Kwacha"},{value:"ZWL",label:"Zimbabwean Dollar"}],sf={AED:"د.إ",AFN:"؋",ALL:"Lek",AMD:"դր",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"Fr",BMD:"$",BND:"$",BOB:"Bs.",BOV:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"$",CAD:"$",CDF:"Fr",CHE:"Fr",CHF:"Fr",CHW:"Fr",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fr",DKK:"kr",DOP:"$",DZD:"د.ج",EGP:"£",ERN:"Nkf",ESP:"₧",ETB:"Br",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GHS:"₵",GIP:"£",GMD:"D",GNF:"Fr",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IQD:"ع.د",IRR:"ریال",ISK:"kr",JMD:"$",JOD:"د.ا",JPY:"¥",KES:"Sh",KGS:"лв",KHR:"៛",KMF:"Fr",KPW:"₩",KRW:"₩",KWD:"د.ك",KYD:"$",KZT:"₸",LAK:"₭",LBP:"ل.ل",LKR:"₨",LRD:"$",LSL:"M",LTL:"Lt",LVL:"Ls",LYD:"د.ل",MAD:"د.م.",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"P",MRU:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"ر.ع.",PAB:"B/.",PEN:"S/",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PRB:"₽",PYG:"₲",QAR:"ر.ق",RON:"lei",RSD:"дин.",RUB:"₽",RWF:"Fr",SAR:"ر.س",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"Sh",SRD:"$",SSP:"£",STN:"Db",SVC:"$",SYP:"ل.س",SZL:"L",THB:"฿",TJS:"SM",TMT:"m",TND:"د.ت",TOP:"T$",TRY:"₺",TTD:"$",TWD:"NT$",TZS:"Sh",UAH:"₴",UGX:"Sh",USD:"$",UYU:"$",UZS:"сўм",VEF:"Bs.F",VND:"₫",VUV:"Vt",WST:"T",XAF:"Fr",XAG:"XAG",XAU:"XAU",XBA:"XBA",XBB:"XBB",XBC:"XBC",XBD:"XBD",XCD:"$",XDR:"XDR",XOF:"Fr",XPD:"XPD",XPF:"₣",XPT:"XPT",XSU:"XSU",XTS:"XTS",XUA:"XUA",YER:"ر.ي",ZAR:"R",ZMW:"K",ZWL:"$"},Os=({classValue:A,size:e=24,fill:t="currentColor",...r})=>a.jsxs("svg",{className:V(A),width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[a.jsx("rect",{width:"12",height:"12",rx:"6",fill:t}),a.jsx("g",{clipPath:"url(#clip0_8212_362816)",children:a.jsx("path",{d:"M8.10023 3.90357C7.97023 3.77357 7.76023 3.77357 7.63023 3.90357L6.00023 5.53023L4.37023 3.90023C4.24023 3.77023 4.03023 3.77023 3.90023 3.90023C3.77023 4.03023 3.77023 4.24023 3.90023 4.37023L5.53023 6.00023L3.90023 7.63023C3.77023 7.76023 3.77023 7.97023 3.90023 8.10023C4.03023 8.23023 4.24023 8.23023 4.37023 8.10023L6.00023 6.47023L7.63023 8.10023C7.76023 8.23023 7.97023 8.23023 8.10023 8.10023C8.23023 7.97023 8.23023 7.76023 8.10023 7.63023L6.47023 6.00023L8.10023 4.37023C8.2269 4.24357 8.2269 4.03023 8.10023 3.90357Z",fill:"#98A2B3"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_8212_362816",children:a.jsx("rect",{width:"8",height:"8",fill:"white",transform:"translate(2 2)"})})})]});Os.displayName="CloseRounded";const of=({width:A=15,height:e=15,fill:t="#98A2B3",className:r})=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:A.toString(),height:e.toString(),viewBox:"0 0 20 20",fill:"none",className:r,children:a.jsx("path",{d:"M17.5 17.5L12.5001 12.5M14.1667 8.33333C14.1667 11.555 11.555 14.1667 8.33333 14.1667C5.11167 14.1667 2.5 11.555 2.5 8.33333C2.5 5.11167 5.11167 2.5 8.33333 2.5C11.555 2.5 14.1667 5.11167 14.1667 8.33333Z",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),nl=A=>{const{value:e,placeholder:t,onChange:r,id:n,debounceTimeout:i=0,classValues:s,handleKeyDown:o,isClearable:l,onFocusText:c,autoComplete:d="false",searchRef:h,hasNavigation:f=!1,autoFocus:u=!1,searchConfig:p,hideSearchIcon:m,allowAStarSearch:b=!1,...g}=A,{t:x}=rt.useTranslation(),[v,w]=y.useState(!1),[O,C]=y.useState("search"),P=y.useRef(null),{searchCount:S,searchPointer:k,setSearchPointer:D}=p||{},T=()=>{w(!0),C(c||t||x("Search"));const L=h||P;L.current&&L.current.focus()},Q=()=>{w(!1),C("")};return a.jsxs("label",{className:V("relative flex items-center justify-start px-4 py-[9px] w-full dark:bg-neutral-900 bg-white dark:bg-black-700 rounded-lg text-neutral-400 h-8",s),children:[!m&&a.jsx("div",{className:"flex items-center h-6 w-6 pointer-events-none",children:a.jsx(of,{width:"16",height:"16"})}),a.jsx(ja.DebounceInput,{...g,spellCheck:"false",debounceTimeout:i,id:n,inputRef:h||P,type:"text",className:V(`absolute inset-0 dark:text-[#98A2B3] text-neutral-900 ${m?"pl-2":"pl-10"} pl-10 pr-7 w-full text-sm dark:text-white bg-transparent rounded-lg focus:outline-none focus:!ring-primary-500 focus:!border-primary-500`,"border border-solid","dark:border-neutral-800 border-neutral-200","dark:caret-white",s),onKeyDown:L=>{L.key==="Enter"&&L.preventDefault(),o&&o(L)},value:e||"",placeholder:v?O:b?"":`${x("Search")}`,onChange:L=>r?.(L.target.value),autoComplete:d,onFocus:L=>{w(!0),T(),A.onFocus&&A.onFocus(L)},onBlur:L=>{w(!1),Q(),A.onBlur&&A.onBlur(L)},autoFocus:u}),f&&e&&a.jsxs("div",{className:V("absolute mr-2 focus:outline-none flex gap-1",l?"right-6":"right-0"),children:[!!S&&(S||0)>0&&a.jsxs("span",{className:"text-xs border-r pr-2 border-gray-200",children:[(k||0)+1,"/",S]}),a.jsxs("div",{className:"flex gap-1 items-center",children:[a.jsx("button",{id:"btn-search-bar-set-search-pointer-forward",onClick:()=>{D&&D(L=>(L||0)-1)},disabled:k===0,children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M15 18l-6-6 6-6",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsx("button",{id:"btn-search-bar-set-search-pointer-backward",onClick:()=>{D&&D(L=>(L||0)+1)},disabled:k===(S||0)-1,children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M9 18l6-6-6-6",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),b&&!(l&&e)&&!v&&!e?a.jsxs("div",{className:"absolute flex ml-6 items-center justify-center focus:outline-none gap-1 flex-wrap-none",children:[a.jsxs(K,{className:"text-[#98A2B3] dark:text-black-400 font-inter text-sm font-medium leading-5",children:[x("Search")," (use"]}),a.jsx("button",{className:" bg-[#EAECF0] dark:bg-black-800 rounded-sm text-sm w-3 h-5",children:a.jsx(Ce.Tooltip,{placement:"bottomRight",color:"#141414",classNames:{root:"custom-tooltip dark:!bg-black-800"},title:a.jsxs("div",{className:"flex flex-col items-start justify-center p-2 w-full h-full gap-2 dark:bg-black-800",children:[a.jsx(K,{className:"text-white text-lg font-semibold leading-5",children:x("Normal Search")}),a.jsx(K,{className:"text-primary-300 dark:text-primary-300 text-sm font-bold leading-[18px] font-inter",appearance:"custom",children:x("Examples")}),a.jsxs("div",{className:"flex flex-col items-start justify-center ",children:[a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"data"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "data", "Data".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"text"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "text", "context", "plaintext".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"base"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "database", "baseball", "basename".'})]})]}),a.jsx(K,{className:"text-white text-lg font-semibold leading-5 mt-2",children:"Wildcard Search"}),a.jsx(K,{className:"text-white dark:text-black-200 text-sm font-medium leading-[18px] font-inter",appearance:"custom",children:"Use * as a wildcard to refine your search."}),a.jsx(K,{className:"text-primary-300 dark:text-primary-300 text-sm font-bold leading-[18px] font-inter",appearance:"custom",children:"Examples:"}),a.jsxs("div",{className:"flex flex-col items-start justify-center ",children:[a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter ",children:"contract*"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ "contracts", "contractor", "CONTRACTOR".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter ",children:"*agreement"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "service agreement", "legal agreement".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"*clause*"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "clause", "subclause", "clauses".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"*l*s*"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "clause", "clauses".'})]})]})]}),children:a.jsx("div",{className:"text-[#475467] dark:text-black-300 dark:bg-black-600",children:"*"})})}),a.jsx(K,{className:"text-[#98A2B3] dark:text-black-400 font-inter text-sm font-medium leading-5",children:"as a wildcard)"})]}):l&&e&&a.jsx("button",{id:"btn-search-bar-close",className:"absolute right-0 mr-2 focus:outline-none",onClick:()=>r?.(""),children:a.jsx(Os,{classValue:"text-neutral-200 dark:text-black-500",size:16})})]})};var fn=(A=>(A.LEFT="left",A.RIGHT="right",A.TOP="top",A))(fn||{});const u9=(A,e,t,r="medium")=>{const n={small:"w-7 h-4 after:h-3 after:w-3 after:top-0.5 after:left-0.5",medium:"w-9 h-5 after:h-4 after:w-4 after:top-0.5 after:left-0.5",large:"w-11 h-6 after:h-5 after:w-5 after:top-0.5 after:left-0.5"},i={small:"peer-checked:after:translate-x-3",medium:"peer-checked:after:translate-x-full",large:"peer-checked:after:translate-x-5"};return V("p-0.5 rounded-full peer after:content-[''] after:absolute after:rounded-full after:transition-all bg-gray-200 dark:bg-black-400",n[r],i[r],{"peer-checked:bg-primary-600 dark:peer-checked:bg-primary-700 peer-checked:after:translate-x-full after:bg-white dark:after:bg-primary-500":A,"after:bg-white dark:after:bg-black-500":!A,"text-white dark:text-black-900":e,"cursor-not-allowed opacity-70":t})},p9=({size:A=18,fill:e="#016DCF"})=>a.jsx("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:e})}),m9=({size:A=18,fill:e="#101828"})=>a.jsx("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z",fill:e})}),tr=y.forwardRef(({isGTN:A=!1,isChecked:e,id:t,onChange:r,label:n,required:i,isRequiredConditional:s=!1,hideStatus:o=!1,labelDirection:l=fn.TOP,statusText:c,withIcon:d=!1,tags:h,isAiExtracted:f=!1,tooltip:u="",className:p="",isDisabled:m=!1,icon:b,stopClickPropagation:g=!0,gtnName:x,variant:v="primary",labelClassName:w,isLiveField:O=!1,message:C,messageType:P="default",wrapperClassName:S,helpText:k,size:D="medium",renderGTNAddButton:T,onAddGTNToDocument:Q},L)=>{const{t:N}=rt.useTranslation(),M=l===fn.TOP,z=l===fn.LEFT,X=l===fn.RIGHT,[H,q]=y.useState(!1),W=()=>{Q&&Q({key:x,value:e?"Yes":"No"})},F=()=>P==="error"?"text-red-500 dark:text-red-400":P==="success"?"text-green-500 dark:text-green-400":P==="info"?"text-primary-500 dark:text-primary-400":"text-neutral-500 dark:text-neutral-400";return a.jsxs("div",{className:V("flex gap-0.5",H&&A?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",S),onMouseEnter:()=>q(!0),onMouseLeave:()=>q(!1),onClick:Y=>{g&&Y.stopPropagation()},children:[A&&!H?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-pulse mt-1.5"}):null,a.jsxs("div",{className:"w-full flex flex-col",children:[M&&n&&a.jsxs("div",{className:"w-full flex justify-between flex-wrap",children:[a.jsxs("h1",{className:V("mb-1 font-inter text-neutral-600 font-medium text-xs flex items-center gap-0.5 flex-wrap",w),children:[a.jsx(ot,{label:n||"",required:i||!1,isRequiredConditional:s||!1}),O&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),f&&a.jsx(bA,{}),a.jsx(Gt,{labels:h||[]}),u&&a.jsx(Oe,{placement:"top",title:u,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),A&&H?T?T(W):a.jsx("button",{id:"btn-toggle-add-to-document",className:"cursor-pointer",onClick:W,type:"button",children:a.jsx(Ce.Tooltip,{placement:"top",title:N("Add to document"),children:a.jsx(le.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]}),k&&a.jsx(K,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:k}),a.jsxs("div",{className:"flex",children:[z&&a.jsx(K,{size:"small",variant:"medium",className:V("mr-2 text-neutral-700 dark:text-black-200",w),appearance:"custom",children:n}),a.jsxs("label",{className:V("relative inline-flex items-center",X||c?"":"w-min",m?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:Y=>Y.stopPropagation(),children:[a.jsx("input",{ref:L,type:"checkbox",id:t,onChange:Y=>!m&&r(Y.target.checked),value:"",disabled:m,checked:e,className:V("sr-only peer w-full",p),"aria-required":i,"aria-invalid":C&&P==="error"?"true":"false","aria-describedby":C||k?`${t}-description`:void 0}),a.jsx("div",{className:u9(e,d,m,D),children:d?a.jsx("div",{className:"flex items-center justify-center h-full w-full",children:a.jsx("div",{className:V("z-10 transition-all transform",D==="small"&&(e?"translate-x-2":"translate-x-[-6px]"),D==="medium"&&(e?"translate-x-[8.5px]":"translate-x-[-8px]"),D==="large"&&(e?"translate-x-2.5":"translate-x-[-10px]")),children:e?b?.checkedIcon?b.checkedIcon:a.jsx(p9,{size:18,fill:"#016DCF"}):b?.uncheckedIcon?b.uncheckedIcon:a.jsx(m9,{size:18,fill:"#101828"})})}):null}),X&&a.jsx(K,{size:"small",variant:"medium",className:V("ml-2 text-neutral-700 dark:text-black-300",w),appearance:"custom",children:n}),o?null:a.jsx(K,{size:"small",variant:"medium",className:"ml-2 text-neutral-900 dark:text-black-100",appearance:"custom",children:c||(e?"Yes":"No")})]})]}),a.jsx(ze.AnimatePresence,{children:C&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${t}-description`,role:P==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",F()),appearance:"custom",size:"extra-small",variant:"medium",children:C})})}),k&&!C&&a.jsx("div",{id:`${t}-description`,className:"sr-only",children:k})]})]})});tr.displayName="Toggle";const g9=A=>{try{return JSON.parse(A)}catch{return null}},b9=A=>{let e="";const t="0123456789abcdef";for(let r=0;r<A;r++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},v9=A=>A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),y9=A=>{const e=[...A].sort((r,n)=>r.length-n.length),t=[];for(const r of e)t.some(i=>r!==i&&r.startsWith(i+"."))||t.push(r);return t},un=A=>{let e="";if(A){let t=0;Object.keys(A).forEach(r=>{if(A[r]!==void 0&&A[r]!==null&&A[r]!==""){let n=A[r];typeof n=="object"?n=JSON.stringify(n):Array.isArray(n)&&(n=n.join(",")),n!=null&&n!==""&&(t===0?e+=`?${r}=${encodeURIComponent(n)}`:e+=`&${r}=${encodeURIComponent(n)}`,t+=1)}})}return e},af=({shortcuts:A,variant:e="dark",className:t})=>{const n=ei()==="macos",i=y.useMemo(()=>A.map(s=>{const o=xs[s];return o?n?o.macos:o.other:s}),[A,n]);return a.jsx("div",{className:V("flex flex-1 gap-1",t),children:i.map((s,o)=>a.jsx("kbd",{className:V("flex items-center rounded-[3px] px-1.5 py-[2px] min-w-[26px] justify-center text-xs font-medium",{"bg-neutral-800 text-white":e==="dark","bg-neutral-100 text-neutral-500 dark:bg-neutral-800 dark:text-white":e==="light"}),children:s},o))})},x9=({className:A="",fill:e="var(--color-primary-600)",size:t=24})=>a.jsx("svg",{className:A,width:t,height:t,viewBox:"0 0 20 20",fill:e,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("g",{mask:"url(#mask0_6752_28309)",children:a.jsx("path",{d:"M8.33317 11.3333L13.2498 6.41667C13.4026 6.26389 13.5971 6.1875 13.8332 6.1875C14.0693 6.1875 14.2637 6.26389 14.4165 6.41667C14.5693 6.56944 14.6457 6.76389 14.6457 7C14.6457 7.23611 14.5693 7.43056 14.4165 7.58333L8.9165 13.0833C8.74984 13.25 8.55539 13.3333 8.33317 13.3333C8.11095 13.3333 7.9165 13.25 7.74984 13.0833L5.58317 10.9167C5.43039 10.7639 5.354 10.5694 5.354 10.3333C5.354 10.0972 5.43039 9.90278 5.58317 9.75C5.73595 9.59722 5.93039 9.52083 6.1665 9.52083C6.40262 9.52083 6.59706 9.59722 6.74984 9.75L8.33317 11.3333Z",fill:e})})}),qt=({id:A,onClick:e,icon:t,text:r,className:n,isDisabled:i,onClose:s,notVisible:o,hideHoverEffect:l,leadingIcon:c,suffixRecord:d,stopPropagation:h,onToggle:f,isChecked:u=!1,highlight:p,truncateText:m=!1,showTick:b=!1,width:g="100%",tooltip:x,isFlowAvailable:v=!0,shortcuts:w})=>{const O=y.useCallback(D=>{s&&s(),D.preventDefault(),e?.(D),h&&D.stopPropagation()},[s,e,h]),C=(D,T)=>{if(!T||!D||typeof D!="string"&&typeof D!="number")return D;const Q=v9(T),L=new RegExp(`(${Q?.trim()})`,"gi"),N=D?.toString()?.split(L);return a.jsxs("span",{className:"overflow-clip text-ellipsis",children:[N[0],a.jsx("span",{className:"bg-yellow-300 dark:bg-primary-100 dark:text-black-900 rounded-sm",children:N[1]}),N?.slice(2)?.join("")]})},P=y.useCallback(D=>{f?.(),D.stopPropagation()},[f]),S=["delete","remove","clear","terminate session","terminate sessions","terminate all sessions"].some(T=>r?.toLowerCase().includes(T)),k=i||!v;return o?null:a.jsx("button",{id:A,className:V("w-full p-1 bg-white dark:bg-black-800 group",n,k&&"opacity-60"),onClick:f?()=>null:O,disabled:k,onMouseMove:D=>D.stopPropagation(),children:a.jsxs("div",{className:V("flex w-full justify-start items-center gap-2 px-2 py-1 rounded-lg transition-all duration-300 ease-in-out",!l&&"hover:bg-gray-50 dark:hover:bg-black-600 hover:shadow-md dark:hover:shadow-lg dark:hover:shadow-primary-500/20"),children:[t?a.jsx("div",{className:V("h-5 w-5 flex-shrink-0 flex items-center text-neutral-900 dark:text-white transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:text-primary-600 dark:group-hover:text-primary-400"),children:a.jsx(Oe,{placement:"top",title:x,children:t})}):null,a.jsxs("div",{className:"flex gap-2 flex-1 min-w-0 text-left justify-between items-center",children:[a.jsx("div",{className:V("flex-1 min-w-0",m&&"max-w-[150px]"),style:{width:g},children:a.jsx(K,{className:V("font-medium text-sm truncate transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:!text-primary-600 dark:group-hover:!text-primary-400"),appearance:"custom",children:p?C(r,p):r})}),d?.[r]?a.jsx("span",{className:"flex-shrink-0 text-neutral-500 dark:text-neutral-200 bg-neutral-100 dark:bg-black-700 border-[#D0D5DD] dark:border-black-700 text-xs leading-[18px] font-normal border rounded-full px-2 py-0.5",children:d[r]||""}):null,b?a.jsx("div",{className:"flex-shrink-0",children:a.jsx(x9,{fill:"var(--color-primary-600)"})}):null]}),c?a.jsx(a.Fragment,{children:x?a.jsx(Oe,{placement:"top",title:x,children:a.jsx("div",{className:V("flex-shrink-0 transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:text-primary-600 dark:group-hover:text-primary-400"),children:c})}):a.jsx("div",{className:V("flex-shrink-0 transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:text-primary-600 dark:group-hover:text-primary-400"),children:c})}):null,w?a.jsx("div",{className:"flex items-center justify-end",children:a.jsx(af,{variant:"light",shortcuts:w})}):null,f?a.jsx("div",{className:"flex-shrink-0",children:a.jsx(tr,{onChange:P,isChecked:u,isDisabled:i,hideStatus:!0})}):null]})})};qt.displayName="OptionButton";const ks=(A,e)=>{const t=A.slice(0,2),r=_n[t];return r?a.jsx("div",{className:`
|
|
167
|
+
`,document.head.appendChild(he)},[]);const Se=()=>{if(q){let _="";Z==null?_="":typeof Z=="string"||typeof Z=="number"?_=String(Z):Array.isArray(Z)?_=Z.map(pe=>typeof pe=="object"&&pe!==null&&"value"in pe?pe.value:pe).join(", "):typeof Z=="object"&&"value"in Z&&(_=String(Z.value)),q({key:u,value:_})}},Z=a9(e),$=y.useMemo(()=>m?Ng(m,b):null,[m,b]),R=(_,he)=>{if(te.current&&Y.id){const pe=document.getElementById(Y.id);if(pe){const Ne=Array.isArray(he)?he.map(_e=>_e.value):he?.value;pe.dataset.selectedValue=JSON.stringify(Ne);const Xt=new Event("change",{bubbles:!0});Object.defineProperty(Xt,"target",{writable:!1,value:pe}),pe.dispatchEvent(Xt);const gt=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${Y.id}`,value:Ne,type:"change"}});pe.dispatchEvent(gt)}}if(t==="tags"){const pe=Array.isArray(_)?_:[_];p?.(pe?.map(Ne=>({label:Ne,value:Ne})))}else p?.(he)},re=c9({options:n,value:e,defaultValue:Y?.defaultValue}),De=y.useMemo(()=>re.length>0||Z!=null,[re,Z]),Pe=y.useMemo(()=>{if(!t||t!=="multiple"||re.length===0)return!1;const _=Array.isArray(Z)?Z:[];return re.map(pe=>pe.value).every(pe=>_.some(Ne=>typeof Ne=="object"&&Ne!==null&&"value"in Ne?String(Ne.value)===String(pe):String(Ne)===String(pe)))},[Z,re,t]),Xe=()=>{!t||t!=="multiple"||!p||p(Pe?[]:re)},ye=y.useCallback(_=>{if(!_)return;const he=new Event("submit",{bubbles:!0,cancelable:!0});_.dispatchEvent(he);const pe=_.querySelector('button[type="submit"]');pe&&pe.click()},[]),Qe=y.useCallback(_=>{if(_.key==="Enter"&&!Ae&&(_.preventDefault(),_.stopPropagation(),Z)){const he=_.currentTarget.closest("form");ye(he)}},[Ae,Z,ye]),Qt=y.useCallback(_=>{const{label:he,value:pe,onClose:Ne}=_,gt=re.find(kt=>String(kt.value)===String(pe))?.color||"blue",_e=kt=>{kt.preventDefault(),kt.stopPropagation()};return a.jsx("div",{className:"cursor-pointer me-1 inline-flex",children:a.jsx(St,{label:he,color:gt,size:"sm",onMouseDown:_e,onClick:D?void 0:Ne,isHashColor:!0,removable:!0,onRemove:Ne})})},[re,D]),ne=y.useCallback(_=>{we(_),(l||$)?.(_)},[l,$]);return a.jsxs("div",{ref:B,className:V("flex gap-0.5 w-full relative",j&&f?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),id:Y.id,children:[f&&!j?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,a.jsxs("div",{className:V("w-full flex flex-col gap-1 risk-analysis-select-field",o),onMouseDown:_=>_.stopPropagation(),onKeyDownCapture:Qe,role:"group","aria-labelledby":A?"select-field-label":void 0,children:[A?a.jsx("label",{id:"select-field-label",htmlFor:"label",className:`text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${d?"":"capitalize"} ${Q||""}`,children:a.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[a.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[a.jsx(ot,{label:A||"",required:i||!1,isRequiredConditional:W||!1}),F&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),h&&a.jsx(bA,{}),a.jsx(Gt,{labels:s}),c&&a.jsx(Oe,{placement:"top",title:c,children:a.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&_.preventDefault()},children:a.jsx(Yt,{})})})]}),f&&j?a.jsx("button",{id:"btn-select-field-base-add-to-document",className:"cursor-pointer",onClick:Se,type:"button",children:a.jsx(Oe,{placement:"top",title:I("Add to document"),children:a.jsx(le.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,a.jsx(Ce.Select,{onOpenChange:ge,disabled:D,className:`w-full text-black-900 dark:text-black-200 ${r&&i?"ant-select-status-error":"#e2e8f0"} ${N&&L?.color?"risk-select-field":""}`,classNames:{popup:{root:"!z-[5001]"}},style:{width:"100%","--risk-color":N&&L?.hexBgColor?L?.hexBgColor:"","--risk-border-color":N&&L?.hexBorderColor?L?.hexBorderColor:""},"aria-required":i,mode:t,value:Z,onChange:R,filterOption:m?g:(_,he)=>(he?.label||"")?.toLowerCase()?.includes(_?.toLowerCase()),showSearch:!0,onSearch:ne||void 0,onPopupScroll:x,popupClassName:"select-field-dropdown-popup",popupRender:_=>a.jsx(h9,{showSelectAll:T,mode:t,options:re,searchValue:ce,handleSelectAll:Xe,isAllSelected:Pe,menu:_,isLoading:v,hasExistingData:De,t:I}),options:re.map(({label:_,value:he,color:pe,...Ne})=>({label:String(_),value:String(he),key:String(he),id:String(he),color:pe,...Ne})),optionRender:_=>{const he=_?.data?.fullname;if(he&&H){const[pe,Ne]=he.split(" ");return a.jsxs("div",{className:"flex items-center justify-start gap-1",children:[a.jsx(H,{firstName:pe,lastName:Ne,profilePic:_?.data?.url||"",size:"xs",enablePopper:!0,userId:_?.data?.value}),a.jsx("span",{className:"ml-2",children:_.label})]})}return a.jsx("span",{children:_.label})},autoClearSearchValue:O,onClear:()=>p&&p(t==="tags"||t==="multiple"?[]:null),maxTagCount:t==="tags"&&P?void 0:"responsive",maxTagPlaceholder:_=>a.jsx(Oe,{placement:"top",title:_.length>3?_.slice(0,3).map(({label:he})=>he).join(", ")+"...":_.map(({label:he})=>he).join(", "),children:a.jsxs("span",{children:["+",_.length," more"]})}),tagRender:S||Qt,allowClear:w,...Y}),r&&a.jsx(K,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})]}),j&&L&&N&&M&&a.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:_=>_.stopPropagation(),onMouseDown:_=>_.preventDefault(),onKeyDown:_=>{_.key==="Escape"&&ee(!1)},children:a.jsx(M,{riskDetails:L})})]})});ws.displayName="SelectField";const Rh=y.forwardRef(({id:A,label:e,checked:t,isChecked:r,onChange:n,disabled:i=!1,required:s=!1,message:o,messageType:l="default",wrapperClassName:c,checkboxClassName:d,labelClassName:h,size:f="medium",variant:u="default",labelPosition:p="right",checkboxProps:m},b)=>{const g=t!==void 0?t:r||!1,x=()=>{switch(f){case"small":return"w-3 h-3";case"large":return"w-5 h-5";default:return"w-4 h-4"}},v=()=>{if(l==="error")return"text-red-600 border-red-300 focus:ring-red-500 dark:focus:ring-red-600";if(l==="success")return"text-green-600 border-green-300 focus:ring-green-500 dark:focus:ring-green-600";if(l==="info")return"text-blue-600 border-blue-300 focus:ring-blue-500 dark:focus:ring-blue-600";switch(u){case"outline":return"text-primary-600 bg-transparent border-neutral-300 focus:ring-primary-500 dark:focus:ring-primary-600";case"solid":return"text-primary-600 bg-primary-50 border-primary-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-primary-900/20";default:return"text-primary-600 bg-gray-100 border-gray-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-neutral-600 dark:border-gray-600"}},w=()=>l==="error"?"text-red-500 dark:text-red-400":l==="success"?"text-green-500 dark:text-green-400":l==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",O=()=>{switch(f){case"small":return"extra-small";case"large":return"medium";default:return"small"}},C=k=>{n(k.target.checked,k)},P=a.jsx(Ce.Checkbox,{...m,ref:b,id:A,checked:g,onChange:C,disabled:i,className:V("rounded focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400 focus:ring-offset-gray-800 transition-colors duration-200",x(),v(),i&&"opacity-50 cursor-not-allowed",d),"aria-required":s,"aria-invalid":o&&l==="error"?"true":"false","aria-describedby":o?`${A}-message`:void 0}),S=e?a.jsx("label",{htmlFor:A,className:V("font-medium cursor-pointer transition-colors duration-200",i?"text-neutral-400 dark:text-neutral-600 cursor-not-allowed":"text-neutral-900 dark:text-neutral-100",p==="right"?"ml-2":"mr-2",h),children:a.jsxs(K,{variant:"medium",size:O(),appearance:"body",children:[e,s&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}):null;return a.jsxs("div",{className:V("flex flex-col",c),children:[a.jsx("div",{className:V("flex items-center",p==="left"&&"flex-row-reverse justify-end"),children:p==="left"?a.jsxs(a.Fragment,{children:[P,S]}):a.jsxs(a.Fragment,{children:[P,S]})}),a.jsx(ze.AnimatePresence,{children:o&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${A}-message`,role:l==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",w()),appearance:"custom",size:"extra-small",variant:"medium",children:o})})})]})});Rh.displayName="Checkbox";const ef=({label:A,isChecked:e,onChange:t,id:r,...n})=>a.jsxs("div",{className:"flex items-center",children:[a.jsx(Ce.Checkbox,{checked:e,onChange:t,id:r,type:"checkbox",value:"",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:!bg-neutral-600 dark:border-gray-600",...n}),a.jsx("label",{className:"ml-2 text-sm font-medium text-neutral-900 dark:text-neutral-100",children:A})]}),tf=y.forwardRef(({id:A,label:e,value:t,defaultValue:r="#000000",onChange:n,onColorChange:i,disabled:s=!1,required:o=!1,message:l,messageType:c="default",wrapperClassName:d,inputClassName:h,labelClassName:f,size:u="medium",showValue:p=!1,valueFormat:m="hex",inputProps:b,helpText:g},x)=>{const v=y.useRef(null),w=x||v,O=y.useCallback(()=>{requestAnimationFrame(()=>{w.current?.focus()})},[w]),C=y.useCallback(z=>{if(z.key==="Enter"&&!z.shiftKey){z.preventDefault();const X=z.target.closest("form");if(X){const H=X.querySelector('button[type="submit"]');H?H.click():X.requestSubmit()}}b?.onKeyDown?.(z)},[b]),P=t!==void 0?t:r,S=()=>{switch(u){case"small":return"w-8 h-8";case"large":return"w-16 h-16";default:return"w-12 h-12"}},k=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",D=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",T=()=>{switch(u){case"small":return"extra-small";case"large":return"medium";default:return"small"}},Q=z=>{const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(z);if(!X)return z;const H=parseInt(X[1],16),q=parseInt(X[2],16),W=parseInt(X[3],16);return`rgb(${H}, ${q}, ${W})`},L=z=>{const X=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(z);if(!X)return z;const H=parseInt(X[1],16)/255,q=parseInt(X[2],16)/255,W=parseInt(X[3],16)/255,F=Math.max(H,q,W),Y=Math.min(H,q,W);let B=0,I=0;const j=(F+Y)/2;if(F!==Y){const ee=F-Y;switch(I=j>.5?ee/(2-F-Y):ee/(F+Y),F){case H:B=(q-W)/ee+(q<W?6:0);break;case q:B=(W-H)/ee+2;break;case W:B=(H-q)/ee+4;break}B/=6}return`hsl(${Math.round(B*360)}, ${Math.round(I*100)}%, ${Math.round(j*100)}%)`},N=()=>{switch(m){case"rgb":return Q(P);case"hsl":return L(P);default:return P.toUpperCase()}},M=z=>{const X=z.target.value;n(X,z),i?.(X)};return a.jsxs("div",{className:V("flex flex-col w-full",d),children:[e&&a.jsx("label",{htmlFor:A,className:V("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",f),children:a.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:a.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:a.jsxs(K,{variant:"medium",size:T(),appearance:"subtitle",children:[e,o&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),g&&a.jsx(K,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:g}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"relative",children:a.jsx("input",{...b,ref:w,onBlur:O,onKeyDown:C,type:"color",id:A,value:P,onChange:M,disabled:s,required:o,className:V("border rounded-md cursor-pointer transition-all duration-200","focus:outline-none focus:ring-2",S(),D(),s&&"opacity-50 cursor-not-allowed",h),style:{backgroundColor:P},"aria-required":o,"aria-invalid":l&&c==="error"?"true":"false","aria-describedby":l||g?`${A}-description`:void 0})}),p&&a.jsx("div",{className:"flex-1",children:a.jsx(K,{variant:"medium",size:"small",appearance:"body",className:"font-mono text-neutral-700 dark:text-neutral-300",children:N()})})]}),a.jsx(ze.AnimatePresence,{children:l&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${A}-description`,role:c==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",k()),appearance:"custom",size:"extra-small",variant:"medium",children:l})})}),g&&!l&&a.jsx("div",{id:`${A}-description`,className:"sr-only",children:g})]})});tf.displayName="ColorPicker";const Al=()=>{const[A,e]=y.useState(!1);return y.useEffect(()=>{const t=()=>{e(document.documentElement.classList.contains("dark"))};t();const r=new MutationObserver(n=>{n.forEach(i=>{i.attributeName==="class"&&t()})});return r.observe(document.documentElement,{attributes:!0}),()=>r.disconnect()},[]),A},Af=({id:A,label:e,errorMessage:t,selectOptions:r,loading:n,isClearable:i,multiSelect:s,selectedValues:o,disabled:l,required:c,value:d,className:h,tooltip:f,tags:u,originalCase:p=!1,onChange:m,filterOption:b,placeholder:g,...x})=>{const v=Al(),[w,O]=y.useState(!1),C=(N,M)=>{m&&m(N);const z=document.getElementById(A);if(z){const X=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${A}`,value:N,type:"change"}});z.dispatchEvent(X)}},P={control:(N,M)=>({...N,borderColor:t&&c?v?"#F04438":"#fda49b":M.isFocused?"var(--color-primary-600)":v?"#404040":"#d9d9d9",backgroundColor:v?"rgb(38 38 38)":M.isDisabled?"#f5f5f5":"#fff",borderRadius:"6px",minHeight:"32px",fontSize:"14px",padding:"0 4px 0 12px",opacity:M.isDisabled?.6:1,cursor:M.isDisabled?"not-allowed":"pointer",boxShadow:"none","&:hover":{borderColor:t&&c?v?"#F04438":"#fda49b":"var(--color-primary-600)"}}),valueContainer:N=>({...N,fontSize:"14px",padding:0}),input:N=>({...N,margin:"0",padding:"0",color:v?"rgb(229 229 229)":"inherit"}),indicatorsContainer:N=>({...N,padding:0}),option:(N,M)=>({...N,fontSize:"14px",lineHeight:"22px",padding:"5px 12px",backgroundColor:M.isSelected?v?"#262626":"#e6f4ff":M.isFocused?v?"#404040":"#f5f5f5":v?"#0a0a0a":"#fff",color:M.isDisabled?v?"#737373":"#a3a3a3":v?"#e5e5e5":"rgba(0,0,0,0.88)",cursor:M.isDisabled?"not-allowed":"pointer",opacity:M.isDisabled?.6:1,"&:hover":{backgroundColor:M.isDisabled?v?"#262626":"#fff":v?"#404040":"#f5f5f5"},"&:active":{backgroundColor:v?"#404040":"#e6f4ff"}}),singleValue:(N,M)=>({...N,fontSize:"14px",lineHeight:"20px",color:M.isDisabled?v?"#737373":"#a3a3a3":v?"#e5e5e5":"rgba(0,0,0,0.88)"}),placeholder:N=>({...N,fontSize:"14px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:v?"#525252":"#bfbfbf"}),multiValue:N=>({...N,backgroundColor:v?"#262626":"#f0f5ff",border:v?"1px solid #404040":"1px solid #adc6ff",borderRadius:"4px"}),multiValueLabel:N=>({...N,color:v?"#e5e5e5":"var(--color-primary-600)",fontSize:"12px"}),multiValueRemove:N=>({...N,color:v?"#e5e5e5":"var(--color-primary-600)","&:hover":{backgroundColor:v?"#404040":"#e6f4ff",color:v?"#fff":"var(--color-primary-600)"}}),menu:N=>({...N,zIndex:5001,borderRadius:"8px",boxShadow:v?"0 6px 16px 0 rgba(0,0,0,0.32)":"0 6px 16px 0 rgba(0,0,0,0.08), 0 3px 6px -4px rgba(0,0,0,0.12), 0 9px 28px 8px rgba(0,0,0,0.05)",backgroundColor:v?"#0a0a0a":"#fff",border:v?"1px solid #404040":"none",overflow:"hidden"}),menuList:N=>({...N,padding:"4px",maxHeight:"256px"})},S=!!o?.length,T=w&&!l&&(i?S||!!d:!1),Q=N=>{N.stopPropagation(),N.preventDefault(),C(s?[]:null)},L=()=>a.jsx("div",{className:"flex items-center",children:T?a.jsx(le.CancelRounded,{onClick:Q,sx:{fontSize:"16px",cursor:"pointer",color:v?"rgba(255,255,255,0.45)":"rgba(0,0,0,0.25)","&:hover":{color:v?"rgba(255,255,255,0.65)":"rgba(0,0,0,0.45)"}}}):a.jsx(le.ChevronLeftRounded,{className:"-rotate-90",sx:{fontSize:"18px",color:v?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.25)"}})});return a.jsxs("div",{id:A,className:V("w-full flex flex-col gap-1",h),onMouseDown:N=>N.stopPropagation(),role:"group","aria-labelledby":e?A+"Label":void 0,children:[e&&a.jsxs("label",{id:A+"Label",htmlFor:"text",className:`text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${p?"":"capitalize"}`,children:[a.jsx(ot,{label:e||"",required:c||!1}),a.jsx(Gt,{labels:u}),f&&a.jsx(Ce.Tooltip,{placement:"top",title:f,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),a.jsx("div",{onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:a.jsx(Lg,{...x,id:"cm"+e,required:c,options:r,isClearable:!1,isLoading:n,isDisabled:l,styles:P,isMulti:s,value:s?o:d,onChange:C,filterOption:b,placeholder:g,classNames:{menuList:()=>"nowheel"},components:{DropdownIndicator:L,IndicatorSeparator:()=>null}})}),t&&a.jsx(K,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:t})]})};Af.displayName="CreatableSelectField";const rl=({ref:A,handler:e,enabled:t=!0})=>{y.useEffect(()=>{if(!t)return;const r=n=>{A.current&&!A.current.contains(n.target)&&e()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[A,e,t])},f9={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",850:"#1e3a8a",900:"#1e3a8a",950:"#172554",975:"#121f47"},rf=({id:A,label:e,options:t,placeholder:r,onChange:n,isLoading:i=!1,hideLabel:s=!1,errorMessage:o,required:l=!1,optionConfig:c,menuConfig:d,value:h,isMulti:f=!1,isClearable:u=!0,disabled:p=!1,className:m,isDark:b=!1,primaryColorShades:g=f9})=>{const x=y.useRef(null),[v,w]=y.useState(null),[O,C]=y.useState("");rl({ref:x,handler:()=>{w(null)}});const P={control:(L,N)=>({...L,borderColor:o&&l?"#F04438":N.isFocused?b?"#1e1e1e":g[600]:b?"#1e1e1e":"#e2e8f0",backgroundColor:N.isDisabled?b?"#1a1a1a":"#f5f5f5":b?"#262626":"#FFFFFF",color:N.isDisabled?b?"#666666":"#a0a0a0":b?"#d4d4d4":"#0F172A",borderRadius:"6px",minHeight:"32px",fontSize:"14px",padding:"0px 10px",cursor:N.isDisabled?"not-allowed":"default",opacity:(N.isDisabled,1),boxShadow:N.isFocused?b?`0 0 0 2px ${g[400]}`:`0 0 0 2px ${g[500]}`:"none"}),valueContainer:L=>({...L,fontSize:"14px",maxHeight:"60px",overflowY:"auto",padding:"0px",margin:"0px",color:b?"#d4d4d4":"inherit","::-webkit-scrollbar":{display:"none"}}),input:L=>({...L,margin:"0"}),indicatorSeparator:()=>({display:"none"}),option:L=>({...L,fontWeight:500,fontSize:"14px",lineHeight:"1",borderBottom:b?"1px solid #1e1e1e":"1px solid #eee",backgroundColor:b?"#000000":"#FFFFFF",color:b?"#d4d4d4":"#0F172A",display:"flex",alignItems:"center",zIndex:200,":hover":{backgroundColor:b?"#171717":g[50]},".icon":{height:"14px",width:"14px"}}),singleValue:(L,N)=>({...L,fontWeight:500,fontSize:"14px",lineHeight:"1.25rem",color:(N.isDisabled,b?"#d4d4d4":"#0F172A"),display:"flex",alignItems:"center",".icon":{height:"14px",width:"14px"}}),placeholder:(L,N)=>({...L,fontSize:"14px",fontWeight:500,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:(N.isDisabled,b?"#595959":"#9CA3AF")}),multiValue:L=>({...L,backgroundColor:b?"#000000":g[50],borderRadius:"6px",fontFamily:"Inter",fontSize:"12px",height:"20px",alignItems:"center"}),indicatorsContainer:L=>({...L,padding:"0",height:"30px"}),multiValueLabel:L=>({...L,color:b?"#d4d4d4":g[600],fontSize:"12px"}),multiValueRemove:L=>({...L,color:b?"#d4d4d4":g[600],height:"12px",fontSize:"8px",":hover":{backgroundColor:b?"#171717":g[50]},svg:{height:"12px",width:"12px"}})},S=L=>{const N=t.filter(M=>M?.label?.toLowerCase()?.includes(O?.toLowerCase()));return a.jsx(bs.components.MenuList,{...L,className:V("!z-50 rounded !visible overflow-x-scroll",b?"bg-black-800":"bg-white",b?"text-neutral-300":"text-slate-900",d?.className),ref:x,children:N?.length?N.map((M,z)=>a.jsxs("div",{className:V("item z-[9999] flex items-center justify-between px-4 py-1.5 no-wheel",p?"cursor-not-allowed opacity-50":"cursor-pointer",b?"text-neutral-300":"text-slate-900",!p&&k(M)?b?"bg-black-700":"bg-primary-50":p?"":b?"hover:bg-black-700":"hover:bg-primary-50",d?.optionClassName?"":b?"border-b border-black-700":"border-b border-[#eee]"),onClick:X=>{p||(X.stopPropagation(),L.selectOption(M))},children:[c?.component?a.jsx(c.component,{...c.componentProps,...M}):a.jsx("div",{children:M.label}),a.jsx("div",{className:"flex items-center gap-1",children:k(M)&&c?.selectIndecator?c?.selectIndecator:null})]},z)):a.jsx("div",{className:V("opacity-50 flex justify-center items-center p-1 font-medium",b?"text-neutral-400":"text-gray-700"),children:"No options"})})},k=L=>f?v?.some(N=>N.value===L.value):L.value===v?.value,D=L=>{const{children:N,innerProps:M,isDisabled:z,getValue:X}=L,H=X();return a.jsx(bs.components.SingleValue,{...L,innerProps:M,isDisabled:z,children:H.length>0?H.map((q,W)=>a.jsx("span",{children:c?.component?a.jsx(c.component,{...c.componentProps,...q}):a.jsx("div",{children:q.label})},W)):a.jsx(a.Fragment,{children:N})})},T=L=>{const{innerProps:N,isDisabled:M,data:z}=L;return a.jsx(bs.components.MultiValue,{...L,innerProps:N,isDisabled:M,children:c?.component?a.jsx(c.component,{...c.componentProps,...z}):a.jsx("div",{children:z.label})})},Q=(L,N)=>(C(N),!0);return a.jsxs("div",{className:V("flex flex-col",b?"text-black-300":"text-slate-900",i?"opacity-50":"opacity-100",p?"cursor-not-allowed":""),id:A,children:[s||!e?null:a.jsx(ot,{label:e||"",required:l||!1}),a.jsx(bs,{required:!0,options:t,placeholder:r,value:h,onChange:L=>{w(L),n(L)},styles:P,isMulti:f,className:V(b&&"bg-black-800 border-black-700",m),components:{MenuList:S,SingleValue:D,MultiValue:T},filterOption:Q,closeMenuOnSelect:!0,isClearable:u,isDisabled:p}),o&&a.jsx(K,{className:V("mt-1",b?"text-red-400":"text-red-500"),appearance:"custom",size:"extra-small",variant:"medium",children:o})]})};rf.displayName="CustomizableSelectField";const nf=[{value:"AED",label:"UAE Dirham"},{value:"AFN",label:"Afghan Afghani"},{value:"ALL",label:"Albanian Lek"},{value:"AMD",label:"Armenian Dram"},{value:"AOA",label:"Angolan Kwanza"},{value:"ARS",label:"Argentine Peso"},{value:"AUD",label:"Australian Dollar"},{value:"AWG",label:"Aruban Florin"},{value:"AZN",label:"Azerbaijani Manat"},{value:"BBD",label:"Barbadian Dollar"},{value:"BDT",label:"Bangladeshi Taka"},{value:"BGN",label:"Bulgarian Lev"},{value:"BHD",label:"Bahraini Dinar"},{value:"BIF",label:"Burundian Franc"},{value:"BMD",label:"Bermudian Dollar"},{value:"BND",label:"Brunei Dollar"},{value:"BRL",label:"Brazilian Real"},{value:"BSD",label:"Bahamian Dollar"},{value:"BTN",label:"Bhutanese Ngultrum"},{value:"BWP",label:"Botswanan Pula"},{value:"BYN",label:"Belarusian Ruble"},{value:"BZD",label:"Belize Dollar"},{value:"CAD",label:"Canadian Dollar"},{value:"CDF",label:"Congolese Franc"},{value:"CHE",label:"WIR Euro"},{value:"CHF",label:"Swiss Franc"},{value:"CHW",label:"WIR Franc"},{value:"CLP",label:"Chilean Peso"},{value:"CNY",label:"Chinese Yuan"},{value:"COP",label:"Colombian Peso"},{value:"CRC",label:"Costa Rican Colón"},{value:"CUC",label:"Cuban Convertible Peso"},{value:"CUP",label:"Cuban Peso"},{value:"CVE",label:"Cape Verdean Escudo"},{value:"CZK",label:"Czech Koruna"},{value:"DJF",label:"Djiboutian Franc"},{value:"DKK",label:"Danish Krone"},{value:"DOP",label:"Dominican Peso"},{value:"DZD",label:"Algerian Dinar"},{value:"EGP",label:"Egyptian Pound"},{value:"ERN",label:"Eritrean Nakfa"},{value:"ESP",label:"Spanish Peseta"},{value:"ETB",label:"Ethiopian Birr"},{value:"EUR",label:"Euro"},{value:"FJD",label:"Fijian Dollar"},{value:"FKP",label:"Falkland Islands Pound"},{value:"GBP",label:"British Pound"},{value:"GEL",label:"Georgian Lari"},{value:"GHS",label:"Ghanaian Cedi"},{value:"GIP",label:"Gibraltar Pound"},{value:"GMD",label:"Gambian Dalasi"},{value:"GNF",label:"Guinean Franc"},{value:"GTQ",label:"Guatemalan Quetzal"},{value:"GYD",label:"Guyanese Dollar"},{value:"HKD",label:"Hong Kong Dollar"},{value:"HNL",label:"Honduran Lempira"},{value:"HRK",label:"Croatian Kuna"},{value:"HTG",label:"Haitian Gourde"},{value:"HUF",label:"Hungarian Forint"},{value:"IDR",label:"Indonesian Rupiah"},{value:"ILS",label:"Israeli New Shekel"},{value:"INR",label:"Indian Rupee"},{value:"IQD",label:"Iraqi Dinar"},{value:"IRR",label:"Iranian Rial"},{value:"ISK",label:"Icelandic Króna"},{value:"JMD",label:"Jamaican Dollar"},{value:"JOD",label:"Jordanian Dinar"},{value:"JPY",label:"Japanese Yen"},{value:"KES",label:"Kenyan Shilling"},{value:"KGS",label:"Kyrgyzstani Som"},{value:"KHR",label:"Cambodian Riel"},{value:"KMF",label:"Comorian Franc"},{value:"KPW",label:"North Korean Won"},{value:"KRW",label:"South Korean Won"},{value:"KWD",label:"Kuwaiti Dinar"},{value:"KYD",label:"Caymanian Dollar"},{value:"KZT",label:"Kazakhstani Tenge"},{value:"LAK",label:"Lao Kip"},{value:"LBP",label:"Lebanese Pound"},{value:"LKR",label:"Sri Lankan Rupee"},{value:"LRD",label:"Liberian Dollar"},{value:"LSL",label:"Lesotho Loti"},{value:"LTL",label:"Lithuanian Litas"},{value:"LVL",label:"Latvian Lats"},{value:"LYD",label:"Libyan Dinar"},{value:"MAD",label:"Moroccan Dirham"},{value:"MDL",label:"Moldovan Leu"},{value:"MGA",label:"Malagasy Ariary"},{value:"MKD",label:"Macedonian Denar"},{value:"MMK",label:"Myanmar Kyat"},{value:"MNT",label:"Mongolian Tögrög"},{value:"MOP",label:"Macanese Pataca"},{value:"MRU",label:"Mauritanian Ouguiya"},{value:"MUR",label:"Mauritian Rupee"},{value:"MVR",label:"Maldivian Rufiyaa"},{value:"MWK",label:"Malawian Kwacha"},{value:"MXN",label:"Mexican Peso"},{value:"MYR",label:"Malaysian Ringgit"},{value:"MZN",label:"Mozambican Metical"},{value:"NAD",label:"Namibian Dollar"},{value:"NGN",label:"Nigerian Naira"},{value:"NIO",label:"Nicaraguan Córdoba"},{value:"NOK",label:"Norwegian Krone"},{value:"NPR",label:"Nepalese Rupee"},{value:"NZD",label:"New Zealand Dollar"},{value:"OMR",label:"Omani Rial"},{value:"PAB",label:"Panamanian Balboa"},{value:"PEN",label:"Peruvian Sol"},{value:"PHP",label:"Philippine Peso"},{value:"PKR",label:"Pakistani Rupee"},{value:"PLN",label:"Polish Zloty"},{value:"PRB",label:"Transnistrian Ruble"},{value:"PYG",label:"Paraguayan Guarani"},{value:"QAR",label:"Qatari Riyal"},{value:"RON",label:"Romanian Leu"},{value:"RSD",label:"Serbian Dinar"},{value:"RUB",label:"Russian Ruble"},{value:"RWF",label:"Rwandan Franc"},{value:"SAR",label:"Saudi Riyal"},{value:"SCR",label:"Seychellois Rupee"},{value:"SDG",label:"Sudanese Pound"},{value:"SEK",label:"Swedish Krona"},{value:"SGD",label:"Singapore Dollar"},{value:"SHP",label:"Saint Helena Pound"},{value:"SLL",label:"Sierra Leonean Leone"},{value:"SOS",label:"Somali Shilling"},{value:"SRD",label:"Surinamese Dollar"},{value:"SSP",label:"South Sudanese Pound"},{value:"SVC",label:"Salvadoran Colón"},{value:"SYP",label:"Syrian Pound"},{value:"SZL",label:"Swazi Lilangeni"},{value:"THB",label:"Thai Baht"},{value:"TJS",label:"Tajikistani Somoni"},{value:"TMT",label:"Turkmenistani Manat"},{value:"TND",label:"Tunisian Dinar"},{value:"TOP",label:"Tongan Paʻanga"},{value:"TRY",label:"Turkish Lira"},{value:"TWD",label:"New Taiwan Dollar"},{value:"TZS",label:"Tanzanian Shilling"},{value:"UAH",label:"Ukrainian Hryvnia"},{value:"UGX",label:"Ugandan Shilling"},{value:"USD",label:"United States Dollar"},{value:"UYU",label:"Uruguayan Peso"},{value:"UZS",label:"Uzbekistani Som"},{value:"VEF",label:"Venezuelan Bolívar"},{value:"VND",label:"Vietnamese Dong"},{value:"VUV",label:"Vanuatu Vatu"},{value:"WST",label:"Samoan Tala"},{value:"YER",label:"Yemeni Rial"},{value:"ZAR",label:"South African Rand"},{value:"ZMW",label:"Zambian Kwacha"},{value:"ZWL",label:"Zimbabwean Dollar"}],sf={AED:"د.إ",AFN:"؋",ALL:"Lek",AMD:"դր",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"Fr",BMD:"$",BND:"$",BOB:"Bs.",BOV:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"$",CAD:"$",CDF:"Fr",CHE:"Fr",CHF:"Fr",CHW:"Fr",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fr",DKK:"kr",DOP:"$",DZD:"د.ج",EGP:"£",ERN:"Nkf",ESP:"₧",ETB:"Br",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GHS:"₵",GIP:"£",GMD:"D",GNF:"Fr",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IQD:"ع.د",IRR:"ریال",ISK:"kr",JMD:"$",JOD:"د.ا",JPY:"¥",KES:"Sh",KGS:"лв",KHR:"៛",KMF:"Fr",KPW:"₩",KRW:"₩",KWD:"د.ك",KYD:"$",KZT:"₸",LAK:"₭",LBP:"ل.ل",LKR:"₨",LRD:"$",LSL:"M",LTL:"Lt",LVL:"Ls",LYD:"د.ل",MAD:"د.م.",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"P",MRU:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"ر.ع.",PAB:"B/.",PEN:"S/",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PRB:"₽",PYG:"₲",QAR:"ر.ق",RON:"lei",RSD:"дин.",RUB:"₽",RWF:"Fr",SAR:"ر.س",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"Sh",SRD:"$",SSP:"£",STN:"Db",SVC:"$",SYP:"ل.س",SZL:"L",THB:"฿",TJS:"SM",TMT:"m",TND:"د.ت",TOP:"T$",TRY:"₺",TTD:"$",TWD:"NT$",TZS:"Sh",UAH:"₴",UGX:"Sh",USD:"$",UYU:"$",UZS:"сўм",VEF:"Bs.F",VND:"₫",VUV:"Vt",WST:"T",XAF:"Fr",XAG:"XAG",XAU:"XAU",XBA:"XBA",XBB:"XBB",XBC:"XBC",XBD:"XBD",XCD:"$",XDR:"XDR",XOF:"Fr",XPD:"XPD",XPF:"₣",XPT:"XPT",XSU:"XSU",XTS:"XTS",XUA:"XUA",YER:"ر.ي",ZAR:"R",ZMW:"K",ZWL:"$"},Os=({classValue:A,size:e=24,fill:t="currentColor",...r})=>a.jsxs("svg",{className:V(A),width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[a.jsx("rect",{width:"12",height:"12",rx:"6",fill:t}),a.jsx("g",{clipPath:"url(#clip0_8212_362816)",children:a.jsx("path",{d:"M8.10023 3.90357C7.97023 3.77357 7.76023 3.77357 7.63023 3.90357L6.00023 5.53023L4.37023 3.90023C4.24023 3.77023 4.03023 3.77023 3.90023 3.90023C3.77023 4.03023 3.77023 4.24023 3.90023 4.37023L5.53023 6.00023L3.90023 7.63023C3.77023 7.76023 3.77023 7.97023 3.90023 8.10023C4.03023 8.23023 4.24023 8.23023 4.37023 8.10023L6.00023 6.47023L7.63023 8.10023C7.76023 8.23023 7.97023 8.23023 8.10023 8.10023C8.23023 7.97023 8.23023 7.76023 8.10023 7.63023L6.47023 6.00023L8.10023 4.37023C8.2269 4.24357 8.2269 4.03023 8.10023 3.90357Z",fill:"#98A2B3"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_8212_362816",children:a.jsx("rect",{width:"8",height:"8",fill:"white",transform:"translate(2 2)"})})})]});Os.displayName="CloseRounded";const of=({width:A=15,height:e=15,fill:t="#98A2B3",className:r})=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:A.toString(),height:e.toString(),viewBox:"0 0 20 20",fill:"none",className:r,children:a.jsx("path",{d:"M17.5 17.5L12.5001 12.5M14.1667 8.33333C14.1667 11.555 11.555 14.1667 8.33333 14.1667C5.11167 14.1667 2.5 11.555 2.5 8.33333C2.5 5.11167 5.11167 2.5 8.33333 2.5C11.555 2.5 14.1667 5.11167 14.1667 8.33333Z",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),nl=A=>{const{value:e,placeholder:t,onChange:r,id:n,debounceTimeout:i=0,classValues:s,handleKeyDown:o,isClearable:l,onFocusText:c,autoComplete:d="false",searchRef:h,hasNavigation:f=!1,autoFocus:u=!1,searchConfig:p,hideSearchIcon:m,allowAStarSearch:b=!1,...g}=A,{t:x}=rt.useTranslation(),[v,w]=y.useState(!1),[O,C]=y.useState("search"),P=y.useRef(null),{searchCount:S,searchPointer:k,setSearchPointer:D}=p||{},T=()=>{w(!0),C(c||t||x("Search"));const L=h||P;L.current&&L.current.focus()},Q=()=>{w(!1),C("")};return a.jsxs("label",{className:V("relative flex items-center justify-start px-4 py-[9px] w-full dark:bg-neutral-900 bg-white dark:bg-black-700 rounded-lg text-neutral-400 h-8",s),children:[!m&&a.jsx("div",{className:"flex items-center h-6 w-6 pointer-events-none",children:a.jsx(of,{width:"16",height:"16"})}),a.jsx(ja.DebounceInput,{...g,spellCheck:"false",debounceTimeout:i,id:n,inputRef:h||P,type:"text",className:V(`absolute inset-0 dark:text-[#98A2B3] text-neutral-900 ${m?"pl-2":"pl-10"} pl-10 pr-7 w-full text-sm dark:text-white bg-transparent rounded-lg focus:outline-none focus:!ring-primary-500 focus:!border-primary-500`,"border border-solid","dark:border-neutral-800 border-neutral-200","dark:caret-white",s),onKeyDown:L=>{L.key==="Enter"&&L.preventDefault(),o&&o(L)},value:e||"",placeholder:v?O:b?"":`${x("Search")}`,onChange:L=>r?.(L.target.value),autoComplete:d,onFocus:L=>{w(!0),T(),A.onFocus&&A.onFocus(L)},onBlur:L=>{w(!1),Q(),A.onBlur&&A.onBlur(L)},autoFocus:u}),f&&e&&a.jsxs("div",{className:V("absolute mr-2 focus:outline-none flex gap-1",l?"right-6":"right-0"),children:[!!S&&(S||0)>0&&a.jsxs("span",{className:"text-xs border-r pr-2 border-gray-200",children:[(k||0)+1,"/",S]}),a.jsxs("div",{className:"flex gap-1 items-center",children:[a.jsx("button",{id:"btn-search-bar-set-search-pointer-forward",onClick:()=>{D&&D(L=>(L||0)-1)},disabled:k===0,children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M15 18l-6-6 6-6",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsx("button",{id:"btn-search-bar-set-search-pointer-backward",onClick:()=>{D&&D(L=>(L||0)+1)},disabled:k===(S||0)-1,children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M9 18l6-6-6-6",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),b&&!(l&&e)&&!v&&!e?a.jsxs("div",{className:"absolute flex ml-6 items-center justify-center focus:outline-none gap-1 flex-wrap-none",children:[a.jsxs(K,{className:"text-[#98A2B3] dark:text-black-400 font-inter text-sm font-medium leading-5",children:[x("Search")," (use"]}),a.jsx("button",{className:" bg-[#EAECF0] dark:bg-black-800 rounded-sm text-sm w-3 h-5",children:a.jsx(Ce.Tooltip,{placement:"bottomRight",color:"#141414",classNames:{root:"custom-tooltip dark:!bg-black-800"},title:a.jsxs("div",{className:"flex flex-col items-start justify-center p-2 w-full h-full gap-2 dark:bg-black-800",children:[a.jsx(K,{className:"text-white text-lg font-semibold leading-5",children:x("Normal Search")}),a.jsx(K,{className:"text-primary-300 dark:text-primary-300 text-sm font-bold leading-[18px] font-inter",appearance:"custom",children:x("Examples")}),a.jsxs("div",{className:"flex flex-col items-start justify-center ",children:[a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"data"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "data", "Data".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"text"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "text", "context", "plaintext".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"base"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "database", "baseball", "basename".'})]})]}),a.jsx(K,{className:"text-white text-lg font-semibold leading-5 mt-2",children:"Wildcard Search"}),a.jsx(K,{className:"text-white dark:text-black-200 text-sm font-medium leading-[18px] font-inter",appearance:"custom",children:"Use * as a wildcard to refine your search."}),a.jsx(K,{className:"text-primary-300 dark:text-primary-300 text-sm font-bold leading-[18px] font-inter",appearance:"custom",children:"Examples:"}),a.jsxs("div",{className:"flex flex-col items-start justify-center ",children:[a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter ",children:"contract*"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ "contracts", "contractor", "CONTRACTOR".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter ",children:"*agreement"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "service agreement", "legal agreement".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"*clause*"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "clause", "subclause", "clauses".'})]}),a.jsxs("div",{className:"flex items-center justify-center gap-1",children:[a.jsx(K,{className:"flex-shrink-0",appearance:"custom",children:"•"}),a.jsx("div",{className:"flex px-1 items-center justify-center bg-primary-700 rounded-sm",children:a.jsx(K,{className:"text-primary-300 dark:text-black-200 text-xs font-medium leading-[18px] font-inter",children:"*l*s*"})}),a.jsx(K,{className:"text-white dark:text-black-100 text-xs font-medium leading-[18px] font-inter",appearance:"custom",children:'→ finds "clause", "clauses".'})]})]})]}),children:a.jsx("div",{className:"text-[#475467] dark:text-black-300 dark:bg-black-600",children:"*"})})}),a.jsx(K,{className:"text-[#98A2B3] dark:text-black-400 font-inter text-sm font-medium leading-5",children:"as a wildcard)"})]}):l&&e&&a.jsx("button",{id:"btn-search-bar-close",className:"absolute right-0 mr-2 focus:outline-none",onClick:()=>r?.(""),children:a.jsx(Os,{classValue:"text-neutral-200 dark:text-black-500",size:16})})]})};var fn=(A=>(A.LEFT="left",A.RIGHT="right",A.TOP="top",A))(fn||{});const u9=(A,e,t,r="medium")=>{const n={small:"w-7 h-4 after:h-3 after:w-3 after:top-0.5 after:left-0.5",medium:"w-9 h-5 after:h-4 after:w-4 after:top-0.5 after:left-0.5",large:"w-11 h-6 after:h-5 after:w-5 after:top-0.5 after:left-0.5"},i={small:"peer-checked:after:translate-x-3",medium:"peer-checked:after:translate-x-full",large:"peer-checked:after:translate-x-5"};return V("p-0.5 rounded-full peer after:content-[''] after:absolute after:rounded-full after:transition-all bg-gray-200 dark:bg-black-400 peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-primary-500 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-primary-400 dark:peer-focus-visible:ring-offset-black-900",n[r],i[r],{"peer-checked:bg-primary-600 dark:peer-checked:bg-primary-700 peer-checked:after:translate-x-full after:bg-white dark:after:bg-primary-500":A,"after:bg-white dark:after:bg-black-500":!A,"text-white dark:text-black-900":e,"cursor-not-allowed opacity-70":t})},p9=({size:A=18,fill:e="#016DCF"})=>a.jsx("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:e})}),m9=({size:A=18,fill:e="#101828"})=>a.jsx("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z",fill:e})}),tr=y.forwardRef(({isGTN:A=!1,isChecked:e,id:t,onChange:r,label:n,required:i,isRequiredConditional:s=!1,hideStatus:o=!1,labelDirection:l=fn.TOP,statusText:c,withIcon:d=!1,tags:h,isAiExtracted:f=!1,tooltip:u="",className:p="",isDisabled:m=!1,icon:b,stopClickPropagation:g=!0,gtnName:x,variant:v="primary",labelClassName:w,isLiveField:O=!1,message:C,messageType:P="default",wrapperClassName:S,helpText:k,size:D="medium",renderGTNAddButton:T,onAddGTNToDocument:Q},L)=>{const{t:N}=rt.useTranslation(),M=l===fn.TOP,z=l===fn.LEFT,X=l===fn.RIGHT,[H,q]=y.useState(!1),W=()=>{Q&&Q({key:x,value:e?"Yes":"No"})},F=()=>P==="error"?"text-red-500 dark:text-red-400":P==="success"?"text-green-500 dark:text-green-400":P==="info"?"text-primary-500 dark:text-primary-400":"text-neutral-500 dark:text-neutral-400";return a.jsxs("div",{className:V("flex gap-0.5",H&&A?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",S),onMouseEnter:()=>q(!0),onMouseLeave:()=>q(!1),onClick:Y=>{g&&Y.stopPropagation()},children:[A&&!H?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-pulse mt-1.5"}):null,a.jsxs("div",{className:"w-full flex flex-col",children:[M&&n&&a.jsxs("div",{className:"w-full flex justify-between flex-wrap",children:[a.jsxs("h1",{className:V("mb-1 font-inter text-neutral-600 font-medium text-xs flex items-center gap-0.5 flex-wrap",w),children:[a.jsx(ot,{label:n||"",required:i||!1,isRequiredConditional:s||!1}),O&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),f&&a.jsx(bA,{}),a.jsx(Gt,{labels:h||[]}),u&&a.jsx(Oe,{placement:"top",title:u,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),A&&H?T?T(W):a.jsx("button",{id:"btn-toggle-add-to-document",className:"cursor-pointer",onClick:W,type:"button",children:a.jsx(Ce.Tooltip,{placement:"top",title:N("Add to document"),children:a.jsx(le.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]}),k&&a.jsx(K,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:k}),a.jsxs("div",{className:"flex",children:[z&&a.jsx(K,{size:"small",variant:"medium",className:V("mr-2 text-neutral-700 dark:text-black-200",w),appearance:"custom",children:n}),a.jsxs("label",{className:V("relative inline-flex items-center",X||c?"":"w-min",m?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:Y=>Y.stopPropagation(),children:[a.jsx("input",{ref:L,type:"checkbox",id:t,onChange:Y=>!m&&r(Y.target.checked),value:"",disabled:m,checked:e,className:V("sr-only peer w-full",p),"aria-required":i,"aria-invalid":C&&P==="error"?"true":"false","aria-describedby":C||k?`${t}-description`:void 0}),a.jsx("div",{className:u9(e,d,m,D),children:d?a.jsx("div",{className:"flex items-center justify-center h-full w-full",children:a.jsx("div",{className:V("z-10 transition-all transform",D==="small"&&(e?"translate-x-2":"translate-x-[-6px]"),D==="medium"&&(e?"translate-x-[8.5px]":"translate-x-[-8px]"),D==="large"&&(e?"translate-x-2.5":"translate-x-[-10px]")),children:e?b?.checkedIcon?b.checkedIcon:a.jsx(p9,{size:18,fill:"#016DCF"}):b?.uncheckedIcon?b.uncheckedIcon:a.jsx(m9,{size:18,fill:"#101828"})})}):null}),X&&a.jsx(K,{size:"small",variant:"medium",className:V("ml-2 text-neutral-700 dark:text-black-300",w),appearance:"custom",children:n}),o?null:a.jsx(K,{size:"small",variant:"medium",className:"ml-2 text-neutral-900 dark:text-black-100",appearance:"custom",children:c||(e?"Yes":"No")})]})]}),a.jsx(ze.AnimatePresence,{children:C&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${t}-description`,role:P==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",F()),appearance:"custom",size:"extra-small",variant:"medium",children:C})})}),k&&!C&&a.jsx("div",{id:`${t}-description`,className:"sr-only",children:k})]})]})});tr.displayName="Toggle";const g9=A=>{try{return JSON.parse(A)}catch{return null}},b9=A=>{let e="";const t="0123456789abcdef";for(let r=0;r<A;r++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},v9=A=>A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),y9=A=>{const e=[...A].sort((r,n)=>r.length-n.length),t=[];for(const r of e)t.some(i=>r!==i&&r.startsWith(i+"."))||t.push(r);return t},un=A=>{let e="";if(A){let t=0;Object.keys(A).forEach(r=>{if(A[r]!==void 0&&A[r]!==null&&A[r]!==""){let n=A[r];typeof n=="object"?n=JSON.stringify(n):Array.isArray(n)&&(n=n.join(",")),n!=null&&n!==""&&(t===0?e+=`?${r}=${encodeURIComponent(n)}`:e+=`&${r}=${encodeURIComponent(n)}`,t+=1)}})}return e},af=({shortcuts:A,variant:e="dark",className:t})=>{const n=ei()==="macos",i=y.useMemo(()=>A.map(s=>{const o=xs[s];return o?n?o.macos:o.other:s}),[A,n]);return a.jsx("div",{className:V("flex flex-1 gap-1",t),children:i.map((s,o)=>a.jsx("kbd",{className:V("flex items-center rounded-[3px] px-1.5 py-[2px] min-w-[26px] justify-center text-xs font-medium",{"bg-neutral-800 text-white":e==="dark","bg-neutral-100 text-neutral-500 dark:bg-neutral-800 dark:text-white":e==="light"}),children:s},o))})},x9=({className:A="",fill:e="var(--color-primary-600)",size:t=24})=>a.jsx("svg",{className:A,width:t,height:t,viewBox:"0 0 20 20",fill:e,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("g",{mask:"url(#mask0_6752_28309)",children:a.jsx("path",{d:"M8.33317 11.3333L13.2498 6.41667C13.4026 6.26389 13.5971 6.1875 13.8332 6.1875C14.0693 6.1875 14.2637 6.26389 14.4165 6.41667C14.5693 6.56944 14.6457 6.76389 14.6457 7C14.6457 7.23611 14.5693 7.43056 14.4165 7.58333L8.9165 13.0833C8.74984 13.25 8.55539 13.3333 8.33317 13.3333C8.11095 13.3333 7.9165 13.25 7.74984 13.0833L5.58317 10.9167C5.43039 10.7639 5.354 10.5694 5.354 10.3333C5.354 10.0972 5.43039 9.90278 5.58317 9.75C5.73595 9.59722 5.93039 9.52083 6.1665 9.52083C6.40262 9.52083 6.59706 9.59722 6.74984 9.75L8.33317 11.3333Z",fill:e})})}),qt=({id:A,onClick:e,icon:t,text:r,className:n,isDisabled:i,onClose:s,notVisible:o,hideHoverEffect:l,leadingIcon:c,suffixRecord:d,stopPropagation:h,onToggle:f,isChecked:u=!1,highlight:p,truncateText:m=!1,showTick:b=!1,width:g="100%",tooltip:x,isFlowAvailable:v=!0,shortcuts:w})=>{const O=y.useCallback(D=>{s&&s(),D.preventDefault(),e?.(D),h&&D.stopPropagation()},[s,e,h]),C=(D,T)=>{if(!T||!D||typeof D!="string"&&typeof D!="number")return D;const Q=v9(T),L=new RegExp(`(${Q?.trim()})`,"gi"),N=D?.toString()?.split(L);return a.jsxs("span",{className:"overflow-clip text-ellipsis",children:[N[0],a.jsx("span",{className:"bg-yellow-300 dark:bg-primary-100 dark:text-black-900 rounded-sm",children:N[1]}),N?.slice(2)?.join("")]})},P=y.useCallback(D=>{f?.(),D.stopPropagation()},[f]),S=["delete","remove","clear","terminate session","terminate sessions","terminate all sessions"].some(T=>r?.toLowerCase().includes(T)),k=i||!v;return o?null:a.jsx("button",{id:A,className:V("w-full p-1 bg-white dark:bg-black-800 group",n,k&&"opacity-60"),onClick:f?()=>null:O,disabled:k,onMouseMove:D=>D.stopPropagation(),children:a.jsxs("div",{className:V("flex w-full justify-start items-center gap-2 px-2 py-1 rounded-lg transition-all duration-300 ease-in-out",!l&&"hover:bg-gray-50 dark:hover:bg-black-600 hover:shadow-md dark:hover:shadow-lg dark:hover:shadow-primary-500/20"),children:[t?a.jsx("div",{className:V("h-5 w-5 flex-shrink-0 flex items-center text-neutral-900 dark:text-white transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:text-primary-600 dark:group-hover:text-primary-400"),children:a.jsx(Oe,{placement:"top",title:x,children:t})}):null,a.jsxs("div",{className:"flex gap-2 flex-1 min-w-0 text-left justify-between items-center",children:[a.jsx("div",{className:V("flex-1 min-w-0",m&&"max-w-[150px]"),style:{width:g},children:a.jsx(K,{className:V("font-medium text-sm truncate transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:!text-primary-600 dark:group-hover:!text-primary-400"),appearance:"custom",children:p?C(r,p):r})}),d?.[r]?a.jsx("span",{className:"flex-shrink-0 text-neutral-500 dark:text-neutral-200 bg-neutral-100 dark:bg-black-700 border-[#D0D5DD] dark:border-black-700 text-xs leading-[18px] font-normal border rounded-full px-2 py-0.5",children:d[r]||""}):null,b?a.jsx("div",{className:"flex-shrink-0",children:a.jsx(x9,{fill:"var(--color-primary-600)"})}):null]}),c?a.jsx(a.Fragment,{children:x?a.jsx(Oe,{placement:"top",title:x,children:a.jsx("div",{className:V("flex-shrink-0 transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:text-primary-600 dark:group-hover:text-primary-400"),children:c})}):a.jsx("div",{className:V("flex-shrink-0 transition-colors duration-300 ease-in-out",S?"group-hover:!text-red-600":"group-hover:text-primary-600 dark:group-hover:text-primary-400"),children:c})}):null,w?a.jsx("div",{className:"flex items-center justify-end",children:a.jsx(af,{variant:"light",shortcuts:w})}):null,f?a.jsx("div",{className:"flex-shrink-0",children:a.jsx(tr,{onChange:P,isChecked:u,isDisabled:i,hideStatus:!0})}):null]})})};qt.displayName="OptionButton";const ks=(A,e)=>{const t=A.slice(0,2),r=_n[t];return r?a.jsx("div",{className:`
|
|
168
168
|
w-5 h-5 rounded-full overflow-hidden border-[0.9px] flex items-center justify-center relative
|
|
169
169
|
${e?"border-neutral-100 dark:border-neutral-100":"border-neutral-400 dark:border-neutral-500"}
|
|
170
170
|
`,children:a.jsx(r,{style:{width:"110%",height:"110%",transform:"translate(-50%, -50%)",position:"absolute",top:"50%",left:"50%"}})}):null},w9=A=>{const e=A.slice(0,2),t=_n[e];return t?a.jsx("div",{className:"w-4 h-4 rounded-full overflow-hidden flex items-center justify-center relative",children:a.jsx(t,{style:{width:"120%",height:"120%",transform:"translate(-50%, -50%)",position:"absolute",top:"50%",left:"50%"}})}):null},O9=A=>{const e=A.slice(0,2),t=_n[e];return t?a.jsx("div",{className:"w-7 h-5 rounded-md overflow-hidden border border-neutral-300 dark:border-neutral-300 flex items-center justify-center relative",children:a.jsx(t,{style:{width:"110%",height:"110%",transform:"translate(-50%, -50%)",position:"absolute",top:"50%",left:"50%"}})}):null},k9=A=>{const e=A.slice(0,2),t=_n[e];return t?a.jsx("div",{className:"w-4 h-3 rounded-sm overflow-hidden border border-neutral-300 dark:border-neutral-300 flex items-center justify-center relative",children:a.jsx(t,{style:{width:"120%",height:"120%",transform:"translate(-50%, -50%)",position:"absolute",top:"50%",left:"50%"}})}):null},lf=A=>{const e=A.slice(0,2),t=_n[e];return t?a.jsx("div",{className:"w-5 h-4 rounded-sm overflow-hidden border border-neutral-300 dark:border-neutral-300 flex items-center justify-center relative",children:a.jsx(t,{style:{width:"115%",height:"115%",transform:"translate(-50%, -50%)",position:"absolute",top:"50%",left:"50%"}})}):null},cf=y.forwardRef(({id:A,label:e,value:t,onChange:r,errorMessage:n,defaultValue:i,required:s=!1,isRequiredConditional:o=!1,tags:l,className:c,originalCase:d=!1,tooltip:h,simpleMode:f=!1,inputFieldClassName:u="",isAiExtracted:p=!1,isGTN:m=!1,gtnName:b=null,allowMultiCurrency:g=!1,placeholder:x,disabled:v=!1,currencyCode:w="USD",inputStyle:O,labelClassName:C,isLiveField:P=!1,onBlur:S,autoFocus:k=!1,isRecording:D=!1,isPlaying:T=!1,onAddGTNToDocument:Q,riskDetails:L,isRiskAnalysisOpen:N=!1,RiskDetailsCard:M,...z},X)=>{const{t:H}=rt.useTranslation(),[q,W]=y.useState(!1),[F,Y]=y.useState([]),[B,I]=y.useState(""),[j,ee]=y.useState(w||"USD"),[te,Ae]=y.useState(!1),ge=R=>{Q&&Q({key:b,value:R})},ce=R=>{if(R==null)return"";const re=Number(R);return isNaN(re)?R:re?.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},we=R=>{const re=R.target.value,De=re===""||re===null||re===void 0?0:Number(re);r(De,j);const Pe=document.getElementById(A);if(Pe&&Pe.setAttribute("data-selected-value",JSON.stringify({value:De,currency_code:j})),Pe&&(D||T)){const Xe=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${A}`,value:{value:De,currency_code:j},type:"change"}});Pe.dispatchEvent(Xe)}},Se=()=>{W(!0)},Z=()=>{W(!1),(t==null||t==="")&&we({target:{value:"0.00"}}),S?.()},$=()=>{const R="pl-11 border h-[32px] text-sm rounded-lg block w-full p-2.5 font-inter font-medium text-neutral-900 dark:text-black-200 disabled:bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400",re=n?"border-red-300":N&&L?.color?`border-${L.color}-300`:"border-gray-300 dark:border-black-600",De=`${N&&L?.color?`bg-${L.color}-50`:"bg-white dark:bg-black-600"}`;return`${R} ${re} ${De} ${u}`};return y.useEffect(()=>{w&&ee(w)},[w]),y.useEffect(()=>{if(j){const R=t===""||t===null||t===void 0?0:Number(t);w!==j&&r(R,j);const re=document.getElementById(A);if(re&&(re.setAttribute("data-selected-value",JSON.stringify({value:R,currency_code:j})),D||T)){const De=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${A}`,value:{value:R,currency_code:j},type:"change"}});re.dispatchEvent(De)}}},[j]),y.useEffect(()=>{const R=nf.filter(re=>(re.value+" - "+re.label).toLowerCase().includes(B.toLowerCase())).map(re=>({label:a.jsx(qt,{text:`${re.value} - ${re.label}`,icon:ks(re.value),showTick:j===re.value,onClick:()=>ee(re.value),className:"text-black-900 dark:text-white"}),key:re.value}));Y(R)},[B,j]),y.useEffect(()=>{I("")},[j]),f?a.jsxs("label",{id:A,className:`mb-1 text-xs font-medium text-gray-600 h-full inline-flex items-center gap-1 ${d?"":"capitalize"} ${C||""}`,children:[a.jsx("span",{className:"absolute inset-y-0 left-1 top-0.5 flex items-center pl-3",children:"$"}),a.jsx("input",{...z,ref:X,type:q?"number":"text",required:s,className:V(u,"pl-8 h-[32px]"),onChange:we,min:0,onFocus:Se,onBlur:Z,value:q?t:ce(t),...i&&!t?{defaultValue:q?i:ce(i)}:{},id:A||e,autoFocus:k})]}):a.jsxs("div",{className:V("flex gap-0.5 relative",te&&m?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>Ae(!0),onMouseLeave:()=>Ae(!1),children:[m&&!te?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,a.jsxs("div",{className:V("w-full flex flex-col",c),children:[a.jsx("label",{htmlFor:"text",className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${d?"":"uppercase"} ${C||""}`,children:a.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[a.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[a.jsx(ot,{label:e||"",required:s||!1,isRequiredConditional:o||!1}),P&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),p&&a.jsx(bA,{}),a.jsx(Gt,{labels:l}),h&&a.jsx(Oe,{placement:"top",title:h,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),m&&te&&Q?a.jsx("button",{id:"btn-currency-input-add-to-document",className:"cursor-pointer",onClick:()=>ge(ce(t)),type:"button",children:a.jsx(Ce.Tooltip,{placement:"top",title:H("Add to document"),children:a.jsx(le.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}),a.jsxs("label",{className:"relative block",children:[a.jsx("span",{className:"absolute inset-y-0 left-1 flex items-center pl-3 text-neutral-900 dark:text-white",children:sf[j]}),a.jsx("input",{...z,ref:X,placeholder:x,type:q?"number":"text",required:s,disabled:v,className:$(),onChange:we,min:0,onFocus:Se,onBlur:Z,value:q?t:ce(t),defaultValue:q?i:ce(i),id:A||e,style:O,autoComplete:"off",autoFocus:k}),a.jsx("span",{className:`absolute inset-y-0 right-2 flex items-center z-[1000px] h-full cursor-pointer dark:text-black-200 ${g?"cursor-pointer":""}`,children:g?a.jsx(Ce.Dropdown,{menu:{items:[...F]},trigger:["click"],overlayClassName:"row-option-cell",placement:"bottomRight",overlayStyle:{zIndex:999},getPopupContainer:R=>R.parentElement,popupRender:R=>a.jsxs("div",{style:{maxHeight:"200px",width:"330px",textOverflow:"ellipsis",overflowY:"auto",zIndex:"999px",borderRadius:"6px"},className:"[&>*:nth-child(2)]:!shadow-none [&>*:nth-child(2)>*]:!px-2 flex flex-col gap-2 p-2 bg-white dark:bg-black-700 border border-solid border-neutral-200 dark:border-black-600",children:[a.jsx(nl,{id:"search-bar-currency-input",value:B,onChange:re=>I(re),className:"mb-2"}),R]}),children:a.jsxs("div",{className:"pl-4 pr-2 py-1.5 text-sm text-gray-700 dark:text-black-200 flex items-center gap-1",children:[ks(j)," ",j]})}):j})]}),n&&a.jsx(K,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:n})]}),te&&L&&N&&M&&a.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:R=>R.stopPropagation(),onMouseDown:R=>R.preventDefault(),onKeyDown:R=>{R.key==="Escape"&&Ae(!1)},children:a.jsx(M,{riskDetails:L})})]})});cf.displayName="CurrencyInputField";const df=y.forwardRef(({id:A,label:e,value:t,defaultValue:r,onChange:n,disabled:i=!1,required:s=!1,message:o,messageType:l="default",wrapperClassName:c,inputClassName:d,labelClassName:h,helpText:f,size:u="medium",minDate:p,maxDate:m,startPlaceholder:b="Start date",endPlaceholder:g="End date",allowClear:x=!0,inputProps:v},w)=>{const O=t!==void 0?t:r||{startDate:null,endDate:null},C=()=>{switch(u){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm"}}},P=()=>l==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":l==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":l==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",S=()=>l==="error"?"text-red-500 dark:text-red-400":l==="success"?"text-green-500 dark:text-green-400":l==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",k=()=>{switch(u){case"small":return"extra-small";case"large":return"medium";default:return"small"}},D=X=>{if(!X)return"";const H=X.getFullYear(),q=String(X.getMonth()+1).padStart(2,"0"),W=String(X.getDate()).padStart(2,"0");return`${H}-${q}-${W}`},T=X=>{if(!X)return null;const H=new Date(X);return isNaN(H.getTime())?null:H},Q=X=>{const H=T(X.target.value);n({startDate:H,endDate:O.endDate})},L=X=>{const H=T(X.target.value);n({startDate:O.startDate,endDate:H})},N=()=>{n({startDate:null,endDate:null})},M=X=>X?D(X):void 0,z=C();return a.jsxs("div",{className:V("flex flex-col w-full",c),ref:w,children:[e&&a.jsx("label",{htmlFor:`${A}-start`,className:V("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",h),children:a.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:a.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:a.jsxs(K,{variant:"medium",size:k(),appearance:"subtitle",children:[e,s&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),f&&a.jsx(K,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:f}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex-1",children:a.jsx("input",{...v,id:`${A}-start`,type:"date",value:D(O.startDate),onChange:Q,disabled:i,required:s,min:M(p),max:M(m),placeholder:b,className:V("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",z.height,z.padding,z.fontSize,P(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",d),"aria-required":s,"aria-invalid":o&&l==="error"?"true":"false","aria-describedby":o||f?`${A}-description`:void 0})}),a.jsx("div",{className:"flex-shrink-0 text-neutral-500 dark:text-neutral-400",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 12H6"})})}),a.jsx("div",{className:"flex-1",children:a.jsx("input",{...v,id:`${A}-end`,type:"date",value:D(O.endDate),onChange:L,disabled:i,required:s,min:M(O.startDate||p),max:M(m),placeholder:g,className:V("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",z.height,z.padding,z.fontSize,P(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",d),"aria-required":s,"aria-invalid":o&&l==="error"?"true":"false","aria-describedby":o||f?`${A}-description`:void 0})}),x&&(O.startDate||O.endDate)&&!i&&a.jsx("button",{type:"button",onClick:N,className:"flex-shrink-0 p-1 text-neutral-500 hover:text-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-200 transition-colors","aria-label":"Clear date range",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 pointer-events-none text-neutral-400 dark:text-neutral-500",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),a.jsx(ze.AnimatePresence,{children:o&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${A}-description`,role:l==="error"?"alert":void 0,children:a.jsx(K,{className:V("mt-1",S()),appearance:"custom",size:"extra-small",variant:"medium",children:o})})}),f&&!o&&a.jsx("div",{id:`${A}-description`,className:"sr-only",children:f})]})});df.displayName="DateRange2";var Cs={exports:{}},C9=Cs.exports,hf;function S9(){return hf||(hf=1,function(A,e){(function(t,r){A.exports=r()})(C9,function(){var t=1e3,r=6e4,n=36e5,i="millisecond",s="second",o="minute",l="hour",c="day",d="week",h="month",f="quarter",u="year",p="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var M=["th","st","nd","rd"],z=N%100;return"["+N+(M[(z-20)%10]||M[z]||M[0])+"]"}},v=function(N,M,z){var X=String(N);return!X||X.length>=M?N:""+Array(M+1-X.length).join(z)+N},w={s:v,z:function(N){var M=-N.utcOffset(),z=Math.abs(M),X=Math.floor(z/60),H=z%60;return(M<=0?"+":"-")+v(X,2,"0")+":"+v(H,2,"0")},m:function N(M,z){if(M.date()<z.date())return-N(z,M);var X=12*(z.year()-M.year())+(z.month()-M.month()),H=M.clone().add(X,h),q=z-H<0,W=M.clone().add(X+(q?-1:1),h);return+(-(X+(z-H)/(q?H-W:W-H))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:h,y:u,w:d,d:c,D:p,h:l,m:o,s,ms:i,Q:f}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},O="en",C={};C[O]=x;var P="$isDayjsObject",S=function(N){return N instanceof Q||!(!N||!N[P])},k=function N(M,z,X){var H;if(!M)return O;if(typeof M=="string"){var q=M.toLowerCase();C[q]&&(H=q),z&&(C[q]=z,H=q);var W=M.split("-");if(!H&&W.length>1)return N(W[0])}else{var F=M.name;C[F]=M,H=F}return!X&&H&&(O=H),H||!X&&O},D=function(N,M){if(S(N))return N.clone();var z=typeof M=="object"?M:{};return z.date=N,z.args=arguments,new Q(z)},T=w;T.l=k,T.i=S,T.w=function(N,M){return D(N,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var Q=function(){function N(z){this.$L=k(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[P]=!0}var M=N.prototype;return M.parse=function(z){this.$d=function(X){var H=X.date,q=X.utc;if(H===null)return new Date(NaN);if(T.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var W=H.match(b);if(W){var F=W[2]-1||0,Y=(W[7]||"0").substring(0,3);return q?new Date(Date.UTC(W[1],F,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Y)):new Date(W[1],F,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Y)}}return new Date(H)}(z),this.init()},M.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},M.$utils=function(){return T},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(z,X){var H=D(z);return this.startOf(X)<=H&&H<=this.endOf(X)},M.isAfter=function(z,X){return D(z)<this.startOf(X)},M.isBefore=function(z,X){return this.endOf(X)<D(z)},M.$g=function(z,X,H){return T.u(z)?this[X]:this.set(H,z)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(z,X){var H=this,q=!!T.u(X)||X,W=T.p(z),F=function(ge,ce){var we=T.w(H.$u?Date.UTC(H.$y,ce,ge):new Date(H.$y,ce,ge),H);return q?we:we.endOf(c)},Y=function(ge,ce){return T.w(H.toDate()[ge].apply(H.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ce)),H)},B=this.$W,I=this.$M,j=this.$D,ee="set"+(this.$u?"UTC":"");switch(W){case u:return q?F(1,0):F(31,11);case h:return q?F(1,I):F(0,I+1);case d:var te=this.$locale().weekStart||0,Ae=(B<te?B+7:B)-te;return F(q?j-Ae:j+(6-Ae),I);case c:case p:return Y(ee+"Hours",0);case l:return Y(ee+"Minutes",1);case o:return Y(ee+"Seconds",2);case s:return Y(ee+"Milliseconds",3);default:return this.clone()}},M.endOf=function(z){return this.startOf(z,!1)},M.$set=function(z,X){var H,q=T.p(z),W="set"+(this.$u?"UTC":""),F=(H={},H[c]=W+"Date",H[p]=W+"Date",H[h]=W+"Month",H[u]=W+"FullYear",H[l]=W+"Hours",H[o]=W+"Minutes",H[s]=W+"Seconds",H[i]=W+"Milliseconds",H)[q],Y=q===c?this.$D+(X-this.$W):X;if(q===h||q===u){var B=this.clone().set(p,1);B.$d[F](Y),B.init(),this.$d=B.set(p,Math.min(this.$D,B.daysInMonth())).$d}else F&&this.$d[F](Y);return this.init(),this},M.set=function(z,X){return this.clone().$set(z,X)},M.get=function(z){return this[T.p(z)]()},M.add=function(z,X){var H,q=this;z=Number(z);var W=T.p(X),F=function(I){var j=D(q);return T.w(j.date(j.date()+Math.round(I*z)),q)};if(W===h)return this.set(h,this.$M+z);if(W===u)return this.set(u,this.$y+z);if(W===c)return F(1);if(W===d)return F(7);var Y=(H={},H[o]=r,H[l]=n,H[s]=t,H)[W]||1,B=this.$d.getTime()+z*Y;return T.w(B,this)},M.subtract=function(z,X){return this.add(-1*z,X)},M.format=function(z){var X=this,H=this.$locale();if(!this.isValid())return H.invalidDate||m;var q=z||"YYYY-MM-DDTHH:mm:ssZ",W=T.z(this),F=this.$H,Y=this.$m,B=this.$M,I=H.weekdays,j=H.months,ee=H.meridiem,te=function(ce,we,Se,Z){return ce&&(ce[we]||ce(X,q))||Se[we].slice(0,Z)},Ae=function(ce){return T.s(F%12||12,ce,"0")},ge=ee||function(ce,we,Se){var Z=ce<12?"AM":"PM";return Se?Z.toLowerCase():Z};return q.replace(g,function(ce,we){return we||function(Se){switch(Se){case"YY":return String(X.$y).slice(-2);case"YYYY":return T.s(X.$y,4,"0");case"M":return B+1;case"MM":return T.s(B+1,2,"0");case"MMM":return te(H.monthsShort,B,j,3);case"MMMM":return te(j,B);case"D":return X.$D;case"DD":return T.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return te(H.weekdaysMin,X.$W,I,2);case"ddd":return te(H.weekdaysShort,X.$W,I,3);case"dddd":return I[X.$W];case"H":return String(F);case"HH":return T.s(F,2,"0");case"h":return Ae(1);case"hh":return Ae(2);case"a":return ge(F,Y,!0);case"A":return ge(F,Y,!1);case"m":return String(Y);case"mm":return T.s(Y,2,"0");case"s":return String(X.$s);case"ss":return T.s(X.$s,2,"0");case"SSS":return T.s(X.$ms,3,"0");case"Z":return W}return null}(ce)||W.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(z,X,H){var q,W=this,F=T.p(X),Y=D(z),B=(Y.utcOffset()-this.utcOffset())*r,I=this-Y,j=function(){return T.m(W,Y)};switch(F){case u:q=j()/12;break;case h:q=j();break;case f:q=j()/3;break;case d:q=(I-B)/6048e5;break;case c:q=(I-B)/864e5;break;case l:q=I/n;break;case o:q=I/r;break;case s:q=I/t;break;default:q=I}return H?q:T.a(q)},M.daysInMonth=function(){return this.endOf(h).$D},M.$locale=function(){return C[this.$L]},M.locale=function(z,X){if(!z)return this.$L;var H=this.clone(),q=k(z,X,!0);return q&&(H.$L=q),H},M.clone=function(){return T.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},N}(),L=Q.prototype;return D.prototype=L,[["$ms",i],["$s",s],["$m",o],["$H",l],["$W",c],["$M",h],["$y",u],["$D",p]].forEach(function(N){L[N[1]]=function(M){return this.$g(M,N[0],N[1])}}),D.extend=function(N,M){return N.$i||(N(M,Q,D),N.$i=!0),D},D.locale=k,D.isDayjs=S,D.unix=function(N){return D(1e3*N)},D.en=C[O],D.Ls=C,D.p={},D})}(Cs)),Cs.exports}var P9=S9();const Re=Br(P9),{RangePicker:ff}=Ce.DatePicker,uf={ENTER:"Enter"},pf=()=>Math.random().toString(36).substring(2,9),D9=(A,e)=>{const t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]),y.useEffect(()=>{const r=n=>t.current(n);return document.addEventListener(A,r),()=>{document.removeEventListener(A,r)}},[A])},mf=({onCalendarChange:A=void 0,onChange:e,required:t,label:r,startDate:n,endDate:i,errorMessage:s,className:o,id:l,disabled:c=!1,dateFormat:d,shouldPopOnParent:h=!0,getPopupContainer:f,maxDateRange:u,open:p,onOpenChange:m,placement:b="bottomLeft",renderAsIconButton:g=!1,iconButtonClassName:x,iconClassName:v})=>{const[w,O]=y.useState(!1),[C,P]=y.useState(!1),S=y.useRef(null),k=y.useRef(null),D=H=>H?Re(H):null,T=`date-range-start-${pf()}`,Q=`date-range-end-${pf()}`,L=()=>{O(!0),setTimeout(()=>{S.current&&S.current.focus()},0)};D9("keydown",H=>{if(H.key===uf.ENTER&&document.activeElement instanceof HTMLInputElement){if(document?.activeElement?.id===T){const q=Re(document?.activeElement?.value);q.isValid()&&e([q,D(i)])}if(document?.activeElement?.id===Q){const q=Re(document?.activeElement?.value);q.isValid()&&e([D(n),q])}}});const N=y.useCallback(H=>{const[q,W]=[D(n),D(i)];return u?q?H.isBefore(q.startOf("day"))||H.isAfter(q.add(u,"day").endOf("day")):W?H.isBefore(W.subtract(u,"day").startOf("day"))||H.isAfter(W.endOf("day")):!1:!1},[n,i,u]),M=y.useCallback(H=>{if(H.key===uf.ENTER&&!(g?w:p??C)){H.preventDefault(),H.stopPropagation();const W=H.target.closest("form");if(W){const F=W.querySelector('button[type="submit"]');F?F.click():W.requestSubmit()}}},[g,w,p,C]),z=y.useCallback(H=>{O(H),H||requestAnimationFrame(()=>{S.current?.focus()})},[]),X=y.useCallback(H=>{P(H),m?.(H),H||requestAnimationFrame(()=>{k.current?.focus()})},[m]);return g?a.jsxs("div",{id:l,className:o,onKeyDownCapture:M,children:[a.jsx(Pt,{onClick:L,disabled:c,variant:"default",className:x,children:a.jsx(Ba.BiCalendar,{className:V("w-5 h-5",v)})}),a.jsx(ff,{ref:S,onChange:H=>{e(H),O(!1)},onCalendarChange:A,value:[D(n),D(i)],id:{start:T,end:Q},allowClear:!0,format:d||"DD MMM, YYYY",separator:a.jsx(LA.BsDash,{className:"dark:text-gray-100"}),suffixIcon:a.jsx(Ba.BiCalendar,{className:"dark:text-gray-100"}),getPopupContainer:f||(h?H=>H.parentElement:()=>document.body),disabled:c,disabledDate:u?N:void 0,autoComplete:"off",open:w,onOpenChange:z,placement:b,style:{position:"absolute",opacity:0,pointerEvents:"none",width:0,height:0}})]}):a.jsxs("div",{id:l,className:V("flex flex-col",o),onKeyDownCapture:M,children:[a.jsx(ot,{label:r||"",required:t||!1}),a.jsx(ff,{ref:k,onChange:e,onCalendarChange:A,value:[D(n),D(i)],id:{start:T,end:Q},allowClear:!0,format:d||"DD MMM, YYYY",separator:a.jsx(LA.BsDash,{className:"dark:text-gray-100"}),suffixIcon:a.jsx(Ba.BiCalendar,{className:"dark:text-gray-100"}),getPopupContainer:f||(h?H=>H.parentElement:()=>document.body),disabled:c,disabledDate:u?N:void 0,open:p,onOpenChange:X,autoComplete:"off",placement:b}),s&&a.jsx("p",{className:V("text-sm font-inter font-normal text-left pt-[6px]","text-red-500"),children:s})]})};mf.displayName="DateRange";var Ss={exports:{}},T9=Ss.exports,gf;function H9(){return gf||(gf=1,function(A,e){(function(t,r){A.exports=r()})(T9,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},d=function(b){return function(g){this[b]=+g}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var x=g.match(/([+-]|\d\d)/g),v=60*x[1]+(+x[2]||0);return v===0?0:x[0]==="+"?-v:v}(b)}],f=function(b){var g=l[b];return g&&(g.indexOf?g:g.s.concat(g.f))},u=function(b,g){var x,v=l.meridiem;if(v){for(var w=1;w<=24;w+=1)if(b.indexOf(v(w,0,g))>-1){x=w>12;break}}else x=b===(g?"pm":"PM");return x},p={A:[o,function(b){this.afternoon=u(b,!1)}],a:[o,function(b){this.afternoon=u(b,!0)}],Q:[n,function(b){this.month=3*(b-1)+1}],S:[n,function(b){this.milliseconds=100*+b}],SS:[i,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[i,d("day")],Do:[o,function(b){var g=l.ordinal,x=b.match(/\d+/);if(this.day=x[0],g)for(var v=1;v<=31;v+=1)g(v).replace(/\[|\]/g,"")===b&&(this.day=v)}],w:[s,d("week")],ww:[i,d("week")],M:[s,d("month")],MM:[i,d("month")],MMM:[o,function(b){var g=f("months"),x=(f("monthsShort")||g.map(function(v){return v.slice(0,3)})).indexOf(b)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[o,function(b){var g=f("months").indexOf(b)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,d("year")],YY:[i,function(b){this.year=c(b)}],YYYY:[/\d{4}/,d("year")],Z:h,ZZ:h};function m(b){var g,x;g=b,x=l&&l.formats;for(var v=(b=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,T,Q){var L=Q&&Q.toUpperCase();return T||x[Q]||t[Q]||x[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(N,M,z){return M||z.slice(1)})})).match(r),w=v.length,O=0;O<w;O+=1){var C=v[O],P=p[C],S=P&&P[0],k=P&&P[1];v[O]=k?{regex:S,parser:k}:C.replace(/^\[|\]$/g,"")}return function(D){for(var T={},Q=0,L=0;Q<w;Q+=1){var N=v[Q];if(typeof N=="string")L+=N.length;else{var M=N.regex,z=N.parser,X=D.slice(L),H=M.exec(X)[0];z.call(T,H),D=D.replace(H,"")}}return function(q){var W=q.afternoon;if(W!==void 0){var F=q.hours;W?F<12&&(q.hours+=12):F===12&&(q.hours=0),delete q.afternoon}}(T),T}}return function(b,g,x){x.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var v=g.prototype,w=v.parse;v.parse=function(O){var C=O.date,P=O.utc,S=O.args;this.$u=P;var k=S[1];if(typeof k=="string"){var D=S[2]===!0,T=S[3]===!0,Q=D||T,L=S[2];T&&(L=S[2]),l=this.$locale(),!D&&L&&(l=x.Ls[L]),this.$d=function(X,H,q,W){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1e3:1)*X);var F=m(H)(X),Y=F.year,B=F.month,I=F.day,j=F.hours,ee=F.minutes,te=F.seconds,Ae=F.milliseconds,ge=F.zone,ce=F.week,we=new Date,Se=I||(Y||B?1:we.getDate()),Z=Y||we.getFullYear(),$=0;Y&&!B||($=B>0?B-1:we.getMonth());var R,re=j||0,De=ee||0,Pe=te||0,Xe=Ae||0;return ge?new Date(Date.UTC(Z,$,Se,re,De,Pe,Xe+60*ge.offset*1e3)):q?new Date(Date.UTC(Z,$,Se,re,De,Pe,Xe)):(R=new Date(Z,$,Se,re,De,Pe,Xe),ce&&(R=W(R).week(ce).toDate()),R)}catch{return new Date("")}}(C,k,P,x),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),Q&&C!=this.format(k)&&(this.$d=new Date("")),l={}}else if(k instanceof Array)for(var N=k.length,M=1;M<=N;M+=1){S[1]=k[M-1];var z=x.apply(this,S);if(z.isValid()){this.$d=z.$d,this.$L=z.$L,this.init();break}M===N&&(this.$d=new Date(""))}else w.call(this,O)}}})}(Ss)),Ss.exports}var N9=H9();const L9=Br(N9);var Ps={exports:{}},M9=Ps.exports,bf;function z9(){return bf||(bf=1,function(A,e){(function(t,r){A.exports=r()})(M9,function(){return function(t,r,n){var i=r.prototype,s=function(h){return h&&(h.indexOf?h:h.s)},o=function(h,f,u,p,m){var b=h.name?h:h.$locale(),g=s(b[f]),x=s(b[u]),v=g||x.map(function(O){return O.slice(0,p)});if(!m)return v;var w=b.weekStart;return v.map(function(O,C){return v[(C+(w||0))%7]})},l=function(){return n.Ls[n.locale()]},c=function(h,f){return h.formats[f]||function(u){return u.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,m,b){return m||b.slice(1)})}(h.formats[f.toUpperCase()])},d=function(){var h=this;return{months:function(f){return f?f.format("MMMM"):o(h,"months")},monthsShort:function(f){return f?f.format("MMM"):o(h,"monthsShort","months",3)},firstDayOfWeek:function(){return h.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):o(h,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):o(h,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):o(h,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return c(h.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return d.bind(this)()},n.localeData=function(){var h=l();return{firstDayOfWeek:function(){return h.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(f){return c(h,f)},meridiem:h.meridiem,ordinal:h.ordinal}},n.months=function(){return o(l(),"months")},n.monthsShort=function(){return o(l(),"monthsShort","months",3)},n.weekdays=function(h){return o(l(),"weekdays",null,null,h)},n.weekdaysShort=function(h){return o(l(),"weekdaysShort","weekdays",3,h)},n.weekdaysMin=function(h){return o(l(),"weekdaysMin","weekdays",2,h)}}})}(Ps)),Ps.exports}var E9=z9();const Q9=Br(E9);var Ds={exports:{}},X9=Ds.exports,vf;function q9(){return vf||(vf=1,function(A,e){(function(t,r){A.exports=r()})(X9,function(){var t="minute",r=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,s,o){var l=s.prototype;o.utc=function(m){var b={date:m,utc:!0,args:arguments};return new s(b)},l.utc=function(m){var b=o(this.toDate(),{locale:this.$L,utc:!0});return m?b.add(this.utcOffset(),t):b},l.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var d=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var h=l.utcOffset;l.utcOffset=function(m,b){var g=this.$utils().u;if(g(m))return this.$u?0:g(this.$offset)?h.call(this):this.$offset;if(typeof m=="string"&&(m=function(O){O===void 0&&(O="");var C=O.match(r);if(!C)return null;var P=(""+C[0]).match(n)||["-",0,0],S=P[0],k=60*+P[1]+ +P[2];return k===0?0:S==="+"?k:-k}(m),m===null))return this;var x=Math.abs(m)<=16?60*m:m,v=this;if(b)return v.$offset=x,v.$u=m===0,v;if(m!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(v=this.local().add(x+w,t)).$offset=x,v.$x.$localOffset=w}else v=this.utc();return v};var f=l.format;l.format=function(m){var b=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,b)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var u=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var p=l.diff;l.diff=function(m,b,g){if(m&&this.$u===m.$u)return p.call(this,m,b,g);var x=this.local(),v=o(m).local();return p.call(x,v,b,g)}}})}(Ds)),Ds.exports}var W9=q9();const V9=Br(W9);var Ts={exports:{}},U9=Ts.exports,yf;function F9(){return yf||(yf=1,function(A,e){(function(t,r){A.exports=r()})(U9,function(){return function(t,r){r.prototype.weekday=function(n){var i=this.$locale().weekStart||0,s=this.$W,o=(s<i?s+7:s)-i;return this.$utils().u(n)?o:this.subtract(o,"day").add(n,"day")}}})}(Ts)),Ts.exports}var j9=F9();const B9=Br(j9);Re.extend(V9),Re.extend(L9),Re.extend(B9),Re.extend(Q9);const xf="MM/DD/YYYY",Hs="MM/DD/YYYY - hh:mm A",wf="YYYY-MM-DD",Of="YYYY-MM-DDTHH:mm:ss",kf={ENTER:"Enter"},Cf=["MM/DD/YYYY","M/DD/YYYY","MM/D/YYYY","M/D/YYYY","MM/DD/YY","M/DD/YY","MM/D/YY","M/D/YY","YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ"],I9=["MM/DD/YYYY - hh:mm A","M/DD/YYYY - hh:mm A","MM/D/YYYY - hh:mm A","M/D/YYYY - hh:mm A","MM/DD/YYYY hh:mm A","M/DD/YYYY hh:mm A","MM/D/YYYY hh:mm A","M/D/YYYY hh:mm A","MM/DD/YYYY HH:mm","M/DD/YYYY HH:mm","MM/D/YYYY HH:mm","M/D/YYYY HH:mm","MM/DD/YY - hh:mm A","M/DD/YY - hh:mm A","MM/D/YY - hh:mm A","M/D/YY - hh:mm A","MM/DD/YY hh:mm A","M/DD/YY hh:mm A","MM/D/YY hh:mm A","M/D/YY hh:mm A","MM/DD/YY HH:mm","M/DD/YY HH:mm","MM/D/YY HH:mm","M/D/YY HH:mm",...Cf,"YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ"],K9=()=>Math.random().toString(36).substring(2,9),ti=(A,e=!1)=>{if(!A)return null;const t=e?I9:Cf;for(const n of t){const i=Re(A,n,!0);if(i.isValid())return i}const r=Re(A);return r.isValid()?r:null},Sf=(A,e)=>{const t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]),y.useEffect(()=>{const r=n=>t.current(n);return document.addEventListener(A,r),()=>{document.removeEventListener(A,r)}},[A])},Pf=y.forwardRef(({label:A,value:e,required:t,isRequiredConditional:r=!1,disabled:n,className:i=void 0,errorMessage:s,handleOnChange:o,showTime:l=!0,tags:c,needConfirm:d=!1,simpleMode:h,originalCase:f=!1,dateFormat:u=void 0,tooltip:p,isAiExtracted:m=!1,isGTN:b=!1,gtnName:g=null,shouldPopOnParent:x=!1,allowTimezoneConversion:v=!0,inputStyle:w,labelClassName:O,isLiveField:C=!1,riskDetails:P,isRiskAnalysisOpen:S=!1,RiskDetailsCard:k,onAddGTNToDocument:D,formatDateForGTN:T,...Q},L)=>{const{t:N}=rt.useTranslation(),[M,z]=y.useState(!1),[X,H]=y.useState(null),[q,W]=y.useState(null),[F,Y]=y.useState(!1),B=u||(l?Hs:xf),I=Q?.id||`date-picker-${K9()}`,j=y.useRef(null);Sf("paste",Z=>{document.activeElement?.id===I&&(Z.preventDefault(),navigator.clipboard.readText().then($=>{const R=ti($,l);R&&ce(R)}))}),Sf("keydown",Z=>{if(Z.key===kf.ENTER&&document.activeElement instanceof HTMLInputElement&&document.activeElement.id===I){const $=ti(document?.activeElement?.value,l);$&&ce($)}});const ee=y.useCallback(Z=>{if(!D)return;let $=Z||"";if(T&&Z)$=T(Z,{skipTimezone:!0,withTime:l});else if(Z){const re=Re(Z);re.isValid()&&($=re.format(B))}D({key:g,value:$})},[D,g,T,l,B]),te=y.useCallback(()=>{const Z=document.getElementsByClassName("ant-picker-footer")[0];Z&&(Z.style.display="none")},[]),Ae=y.useCallback(Z=>{if(!v){const $=l?Of:wf;if(o(Z?Z.format($):null),Z){const R=document.getElementById(I);if(R){const re=new CustomEvent("pilot-date-change",{bubbles:!0,detail:{selector:`#${I}`,value:Z.format?Z.format(B):Z,type:"date-change",elementId:I}});R.dispatchEvent(re)}}return}if(Z){let $;if(l?$=Re(Z).utc().toISOString():$=Re(Z).utc().add(Re(Z).utcOffset(),"minute").startOf("day").toISOString(),$){o($);const R=document.getElementById(I);if(R){const re=new CustomEvent("pilot-date-change",{bubbles:!0,detail:{selector:`#${I}`,value:Z.format(B),type:"date-change",elementId:I}});R.dispatchEvent(re)}}}else o(null)},[v,o,l,I,B]),ge=y.useCallback(Z=>{if(!Z)return null;if(!v)try{const $=Re(Z);if($.isValid())return $;const R=Re(Z,B);return R.isValid()?R:null}catch{return null}if(l){const $=Re(Z);return Re($).isValid()?$:null}else if(Z?.toString()?.includes("Z")){const $=Re.utc(Z);return Re($).isValid()?$:null}else{const $=Re(Z);return Re($).isValid()?$:null}},[v,B,l]),ce=y.useCallback(Z=>{if(Z?.isValid()||Z===null){H(Z);const $=l?Of:wf,R=v?Z?.toISOString():Z?Z.format($):"";if(o(R||null),Z?.isValid()){const re=document.getElementById(I);if(re){const De=new CustomEvent("pilot-date-change",{bubbles:!0,detail:{selector:`#${I}`,value:Z.format(B),type:"date-change",elementId:I}});re.dispatchEvent(De)}}}},[v,B,o,I,l]);y.useEffect(()=>{H(ge(e))},[e,ge]),y.useEffect(()=>{q&&W(null)},[q]),y.useEffect(()=>{const Z=document.getElementById(I);if(!Z)return;const $=R=>{const{value:re,type:De}=R.detail;if(De==="date-playback"&&re){const Pe=ti(re,l);Pe&&Pe.isValid()&&(H(Pe),Ae(Pe),setTimeout(()=>{const Xe=Z.querySelector("input");if(Xe&&(Xe.focus(),setTimeout(()=>{Xe.blur()},10)),j.current)try{const ye=j.current;typeof ye.blur=="function"&&ye.blur()}catch{}setTimeout(()=>{document.querySelectorAll(".ant-picker-dropdown:not(.ant-picker-dropdown-hidden)").forEach(Qe=>{Qe instanceof HTMLElement&&(Qe.style.display="none",Qe.classList.add("ant-picker-dropdown-hidden"))})},50)},50))}};return Z.addEventListener("pilot-date-playback",$),()=>{Z.removeEventListener("pilot-date-playback",$)}},[I,B,Ae,l]);const we=y.useCallback(Z=>{if(Z.key===kf.ENTER&&!F){Z.preventDefault(),Z.stopPropagation();const $=Z.target.closest("form");if($){const R=$.querySelector('button[type="submit"]');R?R.click():$.requestSubmit()}}},[F]),Se=y.useCallback(Z=>{Y(Z),Z||requestAnimationFrame(()=>{j.current?.focus()})},[]);return h?a.jsx("div",{onKeyDownCapture:we,children:a.jsx(Ce.DatePicker,{...Q,showTime:l,format:B,placeholder:B===Hs?"MM/DD/YYYY hh:mm":B,value:X,needConfirm:!1,onChange:Z=>{H(Z),Ae(Z),W(Z?.toISOString()||null)},className:i,showNow:!1,onFocus:te,onOpenChange:Se,onBlur:Z=>{const $=Z.target.value;if($){const R=ti($,l);R&&ce(R)}},ref:j,disabled:n,id:I})}):a.jsxs("div",{ref:L,className:V("flex gap-0.5 relative",M&&b?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[b&&!M?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,a.jsxs("div",{className:`w-full flex flex-col font-inter ${i||""}`,onKeyDownCapture:we,children:[A?a.jsx("label",{className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${f?"":"capitalize"} ${O||""}`,children:a.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[a.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[a.jsx(ot,{label:A||"",required:t||!1,isRequiredConditional:r||!1}),C&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),m&&a.jsx(bA,{}),a.jsx(Gt,{labels:c}),p&&a.jsx(Oe,{placement:"top",title:p,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),b&&M&&D?a.jsx("button",{id:"btn-date-field-add-to-document",className:"cursor-pointer",onClick:()=>ee(e),type:"button",children:a.jsx(Ce.Tooltip,{placement:"top",title:N("Add to document"),children:a.jsx(le.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,a.jsx(Ce.DatePicker,{...Q,showTime:l?{use12Hours:!0}:!1,format:B,placeholder:B===Hs?"MM/DD/YYYY - HH:MM":B,className:`w-full h-8 text-inter font-medium ${s?"border-red-400":""} dark:text-black-300 ${S&&P?.color&&`bg-${P.color}-50 border-${P.color}-300`}`,styles:{root:{...w,borderRadius:"7px"}},showNow:!1,value:X,onChange:Z=>{H(Z),Ae(Z),W(Z?.toISOString()||null)},onBlur:Z=>{const $=Z.target.value;if($){const R=ti($,l);R&&(H(R),Ae(R))}},needConfirm:d,ref:j,disabled:n,inputReadOnly:!1,onOpenChange:Se,getPopupContainer:x?Z=>Z.parentElement:()=>document.body,id:I,autoComplete:"off"}),s&&a.jsx(K,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:s})]}),M&&P&&S&&k&&a.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:Z=>Z.stopPropagation(),onMouseDown:Z=>Z.preventDefault(),onKeyDown:Z=>{Z.key==="Escape"&&z(!1)},children:a.jsx(k,{riskDetails:P})})]})});Pf.displayName="DateTimeField";const Df=({id:A,label:e,onChange:t,errorMessage:r,required:n,bg:i,tags:s,color:o,debounceTimeout:l=0,className:c,isDarkMode:d,...h})=>{const{inputRef:f,...u}=h;return a.jsxs("div",{className:V("flex flex-col",c),children:[e&&a.jsxs("label",{htmlFor:A,className:"block mb-1 text-xs font-medium leading-[18px] text-neutral-600 dark:text-black-300 font-inter capitalize",children:[a.jsx(ot,{label:e||"",required:n||!1}),a.jsx(Gt,{labels:s})]}),a.jsx("label",{className:"relative block h-8",children:y.createElement(ja.DebounceInput,{...u,debounceTimeout:l,id:A,key:A,required:n,className:V("border",r?"!border-error-300":"border-neutral-200 dark:border-black-600",i,o,"dark:bg-black-700 text-neutral-900 dark:text-neutral-100 text-[14px] rounded-md","focus:outline-none focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400","focus:border-primary-500 dark:focus:border-primary-400","block w-full h-8 px-3 py-1.5 font-inter font-medium","disabled:opacity-70 disabled:!bg-neutral-50 dark:disabled:!bg-black-800"),onChange:p=>{t(p.target.value)},autoComplete:"off"})}),a.jsx(ze.AnimatePresence,{children:r&&a.jsx(ze.motion.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.15},children:a.jsx(K,{className:"pt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})})})]})};Df.displayName="DebounceInputField";const Tf=y.forwardRef(({id:A,label:e,placeholder:t,value:r,onChange:n,errorMessage:i,defaultValue:s,required:o=!1,isRequiredConditional:l=!1,dataSource:c,dataKey:d,tags:h,tooltip:f="",originalCase:u=!1,color:p="",isGTN:m=!1,gtnName:b,isAiExtracted:g=!1,labelClassName:x,disabled:v=!1,isLiveField:w=!1,onAddGTNToDocument:O,riskDetails:C,isRiskAnalysisOpen:P=!1,RiskDetailsCard:S,primaryColorShades:k,isRecording:D=!1,isPlaying:T=!1,setDisableActions:Q,showDeprecatedFieldWarning:L,DynamicDataModal:N},M)=>{const{t:z}=rt.useTranslation(),[X,H]=y.useState(!1),[q,W]=y.useState(r),[F,Y]=y.useState(!1),B=y.useRef(null),I=M||B,j=()=>{Q?.(!F),Y(!F)},ee=ce=>{if(ce.keyCode===9||ce.key==="Enter"){const we=I.current||B.current;we&&(q!==null&&n(q),W(q),we.blur())}},te=()=>{W(""),n("")},Ae=ce=>{O&&b&&O({key:b,value:ce})},ge=()=>{const ce="border h-[32px] text-sm rounded-lg block w-full p-2.5 font-inter font-medium",we=i?"border-red-300":P&&C?.color?`border-${C?.color}-300`:"border-gray-300 dark:border-black-600",Se="placeholder:text-neutral-900 dark:placeholder:text-black-400",Z=`${P&&C?.color?`bg-${C?.color}-50`:"bg-gray-200 dark:bg-black-600 "} ${p||"text-neutral-900 dark:text-black-200"}`;return`${ce} ${we} ${Z} ${Se}`};return y.useEffect(()=>{F&&!c&&(L?.(),Y(!1))},[F,c,L]),y.useEffect(()=>{W(r)},[r]),a.jsxs("div",{className:V("flex gap-0.5 w-full relative",X&&m?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",{"error-field":!!i}),onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),children:[m&&!X?a.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,a.jsxs("div",{className:V("flex flex-col w-full"),children:[a.jsx("label",{htmlFor:"text",className:`text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${u?"":"capitalize"} ${x||""}`,children:a.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[a.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[a.jsx(ot,{label:e||"",required:o||!1,isRequiredConditional:l||!1}),w&&a.jsx(le.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),g&&a.jsx(bA,{}),a.jsx(Gt,{labels:h}),f&&a.jsx(Oe,{placement:"top",title:f,children:a.jsx("div",{className:"cursor-pointer",children:a.jsx(Yt,{})})})]}),m&&X&&O?a.jsx("button",{id:"btn-dynamic-data-input-add-to-document",className:"cursor-pointer",onClick:()=>Ae(r?.toString()||""),type:"button",children:a.jsx(Ce.Tooltip,{placement:"top",title:z("Add to document"),children:a.jsx(le.NoteAddOutlined,{sx:{fontSize:16,color:k?.[600]||"var(--color-primary-600)"}})})}):null]})}),a.jsxs("label",{className:"relative block mt-1",children:[a.jsx("input",{id:A,ref:I,required:o,placeholder:t,className:ge(),onChange:ce=>{n(ce.target.value),W(ce.target?.value)},onKeyDown:ee,value:q!==null?q:r,defaultValue:s,disabled:!0}),a.jsx(Pt,{id:"btn-dynamic-data-input-rx-cross",onClick:te,className:"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:v,children:a.jsx(le.CloseRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})}),a.jsx(Pt,{id:"btn-dynamic-data-input-ai-outline-pic-center",onClick:j,className:"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:v,children:a.jsx(le.TableChartRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})})]}),i&&a.jsx(K,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:i}),F&&N&&a.jsx(N,{isVisible:F,onSelect:ce=>{n(ce),W(ce)},onClose:j,dataKey:d,dataSource:c})]}),X&&C&&P&&S&&a.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ce=>ce.stopPropagation(),onMouseDown:ce=>ce.preventDefault(),onKeyDown:ce=>{ce.key==="Escape"&&H(!1)},children:a.jsx(S,{riskDetails:C})})]})});Tf.displayName="DynamicDataInputField";const ut=({status:A="primary",appearance:e,className:t,disabled:r,children:n,isLoading:i,title:s,id:o,onClick:l,onKeyDown:c,badge:d,type:h="button",options:f,tooltip:u,tooltipPlacement:p="top",shortcuts:m,tooltipShortcuts:b,theme:g="light",autoFocus:x})=>{const v=y.useCallback(()=>{switch(e){case"outline":return C();case"ghost":return P();case"dashed":return S();default:return O()}},[e,A,r,g]),w=y.useCallback(()=>{switch(e){case"dashed":return k();default:return{}}},[e,A,r,g]),O=y.useCallback(()=>{switch(A){case"primary":return"bg-primary-600 text-white focus:border-primary-200 hover:bg-primary-700 disabled:opacity-60";case"secondary":return"bg-primary-50 dark:bg-black-800 text-primary-600 dark:hover:text-primary-400 border border-primary-200 dark:border-primary-600 hover:bg-primary-100 dark:hover:bg-black-800 focus:border-primary-200 hover:border-primary-200 dark:hover:border-primary-400 disabled:opacity-60";case"error":return"bg-error-600 dark:bg-error-500 text-white hover:bg-error-700 dark:hover:bg-error-600 focus:!border-error-300 dark:focus:!border-error-600 dark:focus:bg-error-800 disabled:opacity-60";case"error-secondary":return"bg-error-100 dark:bg-black-800 text-error-600 border !border-error-300 dark:!border-error-900 hover:bg-error-200 focus:!border-error-300 dark:focus:!border-error-400 disabled:opacity-60";case"secondary-neutral":return"bg-white dark:bg-black-800 text-neutral-900 border border-neutral-300 dark:border-black-600 dark:hover:bg-black-600 dark:text-black-200 hover:bg-neutral-100 focus:border-primary-200 disabled:opacity-60";case"warning":return"bg-warning-300 dark:bg-warning-600 text-white border-warning-300 border hover:bg-warning-400 disabled:opacity-60";case"success":return"bg-success-600 text-white border-success-600 border hover:bg-success-700 disabled:opacity-60";case"publish":return"bg-teal-800 text-white border-teal-800 border hover:bg-teal-900 disabled:opacity-60";case"no-background":return"bg-transparent text-neutral-900 dark:text-black-100 border-transparent border";default:return"bg-white dark:bg-black-800 text-neutral-900 dark:text-white border-white border hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60"}},[A,r,g]),C=y.useCallback(()=>{switch(A){case"primary":return"text-primary-700 dark:text-primary-600 border-primary-700 border dark:border-primary-600 hover:bg-primary-100 disabled:opacity-60";case"secondary":return"text-primary-700 dark:text-primary-600 border-primary-100 dark:border-primary-600 border bg-primary-50 dark:bg-black-800 hover:bg-primary-100 disabled:opacity-60";case"secondary-neutral":return"text-neutral-900 dark:text-white border-neutral-300 dark:border-neutral-700 border bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60";case"error":return"text-error-600 dark:text-error-500 !border-error-600 dark:!border-error-500 border hover:bg-[#FEF3F2] disabled:opacity-60";case"warning":return"text-warning-300 dark:text-warning-500 border-warning-300 dark:border-warning-500 border hover:bg-[#FFFAEB] disabled:opacity-60";case"success":return"text-success-600 dark:text-success-500 border-success-600 dark:border-success-500 border hover:bg-[#ECFDF3] disabled:opacity-60";default:return"bg-white dark:bg-black-800 text-neutral-900 dark:text-white border-neutral-300 dark:border-neutral-700 border hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60"}},[A,g]),P=y.useCallback(()=>{switch(A){case"primary":return"text-primary-700 dark:text-primary-600 border border-transparent dark:border-transparent hover:text-primary-700 disabled:opacity-60";case"secondary":return"text-primary-50 dark:text-primary-900 border border-transparent dark:border-transparent hover:text-primary-100 disabled:opacity-60";case"error":return"text-error-600 dark:text-error-500 border border-transparent dark:border-transparent hover:text-error-600 disabled:opacity-60";case"warning":return"text-warning-300 dark:text-warning-500 border border-transparent dark:border-transparent hover:text-warning-400 disabled:opacity-60";case"success":return"text-success-600 dark:text-success-500 border border-transparent dark:border-transparent hover:text-success-700 disabled:opacity-60";default:return"text-neutral-900 dark:text-white border border-transparent dark:border-transparent hover:text-[#667085] disabled:opacity-60"}},[A,g]),S=y.useCallback(()=>{switch(A){case"primary":return"bg-primary-50 dark:bg-black-700 text-primary-600 dark:text-primary-600 disabled:text-primary-100 hover:bg-primary-100 dark:hover:bg-black-600";default:return"bg-primary-50 dark:bg-black-700 text-primary-600 dark:text-primary-600 disabled:text-primary-100 hover:bg-primary-100 dark:hover:bg-black-600"}},[A,g]),k=y.useCallback(()=>{switch(A){case"primary":return{backgroundImage:"repeating-linear-gradient(3deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(93deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(183deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(273deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px)",backgroundSize:"1px 100%, 100% 1px, 1px 100% , 100% 1px",backgroundPosition:"0 0, 0 0, 100% 0, 0 100%",backgroundRepeat:"no-repeat"};default:return{}}},[A,g]),D=y.useCallback(()=>{if(!e||e==="filled")switch(A){case"primary":return"bg-primary-700 text-primary-100";case"secondary":return"bg-primary-100 text-primary-700 dark:bg-black-700 dark:text-primary-400";case"secondary-neutral":return"bg-neutral-100 text-neutral-500 dark:bg-black-700 dark:text-black-300";case"error":return"bg-error-700 text-error-100 dark:bg-error-600 dark:text-error-100";case"error-secondary":return"bg-error-200 text-error-700 dark:bg-black-700 dark:text-error-400";case"warning":return"bg-warning-400 text-white dark:bg-warning-700 dark:text-warning-100";case"success":return"bg-success-700 text-success-100";case"publish":return"bg-teal-900 text-teal-200";case"no-background":return"bg-neutral-100 text-neutral-500 dark:bg-black-700 dark:text-neutral-400";default:return"bg-neutral-100 text-neutral-500 dark:bg-black-700 dark:text-neutral-400"}switch(A){case"primary":case"secondary":return"bg-primary-100 text-primary-800 dark:bg-primary-950 dark:text-primary-400";case"error":case"error-secondary":return"bg-error-100 text-error-700 dark:bg-error-950 dark:text-error-400";case"warning":return"bg-warning-100 text-warning-700 dark:bg-warning-950 dark:text-warning-400";case"success":return"bg-success-100 text-success-700 dark:bg-success-950 dark:text-success-400";default:return"bg-neutral-100 text-neutral-500 dark:bg-black-700 dark:text-neutral-400"}},[A,e]),T=ei(),Q=y.useMemo(()=>m?.length?m.map(M=>{const z=xs[M];return z?T==="macos"?z.macos:z.other:M}):[],[m,T]),L=()=>a.jsx(a.Fragment,{children:a.jsx(Ia.CgSpinner,{size:24,className:"inline mr-2 spinner"})}),N=h||(A==="primary"?"submit":h);return a.jsx(Oe,{title:u,placement:p,shortcuts:b,delayShow:!0,children:a.jsxs("button",{className:`
|