master-components-react 3.2.13 → 3.2.14
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.
|
@@ -35,7 +35,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
35
35
|
${a?xr.loading:""}
|
|
36
36
|
${n?xr[n]:""}
|
|
37
37
|
${m&&p&&!c&&!r?xr.active:""}
|
|
38
|
-
${r?xr.disabled:""}`,onMouseDown:()=>y(!0),onMouseUp:()=>y(!1),onMouseLeave:()=>y(!1),onClick:()=>{!r&&i&&typeof i=="function"&&i()},children:A.jsxs("div",{className:xr.buttonSlot,style:!r&&f?f:{},children:[u||o&&s?s:"",!u&&A.jsx(A.Fragment,{children:a?A.jsx("div",{style:{display:"grid",placeItems:"center"},children:A.jsx(iB,{})}):A.jsx("span",{style:!r&&h?h:{},className:xr.buttonLabel,children:e??"Button"})}),o&&l?l:""]})})},_B="FormInput-module__inputWrapper",gB="FormInput-module__inputLabel",mB="FormInput-module__required",CB="FormInput-module__inputContainer",yB="FormInput-module__inputContent",xB="FormInput-module__inputTags",bB="FormInput-module__focused",SB="FormInput-module__error",wB="FormInput-module__rightIcon",EB="FormInput-module__leftIcon",IB="FormInput-module__inputDropDown",TB="FormInput-module__http",AB="FormInput-module__disabled",DB="FormInput-module__sm",OB="FormInput-module__md",RB="FormInput-module__withCopy",kB="FormInput-module__inputHelperText",BB="FormInput-module__dark",pi={inputWrapper:_B,inputLabel:gB,required:mB,inputContainer:CB,inputContent:yB,inputTags:xB,focused:bB,error:SB,rightIcon:wB,leftIcon:EB,inputDropDown:IB,http:TB,disabled:AB,sm:DB,md:OB,withCopy:RB,inputHelperText:kB,dark:BB},Rh=({width:e,height:t,color:i})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:A.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),LB=({width:e,height:t,color:i})=>A.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[A.jsx("g",{clipPath:"url(#clip0_444_26)",children:A.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:i??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),A.jsx("defs",{children:A.jsx("clipPath",{id:"clip0_444_26",children:A.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),Tu=e=>A.jsx("svg",{xmlns:e.xmlns??"http://www.w3.org/2000/svg",width:e.width??"14",height:e.height??"14",viewBox:e.viewBox??"0 0 14 14",fill:e.fill??"none",children:A.jsx("path",{d:e.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:e.stroke??"#A4A7AE",strokeWidth:e.strokeWidth??"1.66667",strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round"})}),PB="Checkbox-module__checkboxWrapper",FB="Checkbox-module__sm",MB="Checkbox-module__md",VB="Checkbox-module__checkMark",NB="Checkbox-module__checked",HB="Checkbox-module__disabled",$B="Checkbox-module__dark",jo={checkboxWrapper:PB,sm:FB,md:MB,checkMark:VB,checked:NB,disabled:HB,dark:$B},yI=({color:e,width:t,height:i})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:A.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),xI=e=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:A.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Au=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,withActive:l=!0,theme:u="light"})=>{const d=de.useRef(null),[c,h]=de.useState(!1),f=()=>{i||t&&typeof t=="function"&&t(!e)},p=()=>c?!l||i?{boxShadow:"none",...o}:o??{}:s??{};return A.jsxs("div",{style:p(),className:` ${u==="dark"?jo.dark:""} ${jo.checkboxWrapper} ${jo[a]} ${e?jo.checked:jo.unChecked} ${i?jo.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[A.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?A.jsx(xI,{}):A.jsx(yI,{}):""]})},WB="Tag-module__tagContainer",zB="Tag-module__onlyLabel",GB="Tag-module__sm",UB="Tag-module__md",KB="Tag-module__lg",jB="Tag-module__tagLabel",qB="Tag-module__tagNumber",YB="Tag-module__tagClose",XB="Tag-module__dark",$a={tagContainer:WB,onlyLabel:zB,sm:GB,md:UB,lg:KB,tagLabel:jB,tagNumber:qB,tagClose:YB,dark:XB},Vg=({id:e,label:t,icon:i,withClose:n,withCheckbox:r,withNumber:a,number:o,checkboxProps:s,disable:l,size:u,onClose:d,tagContainerStyle:c,tagLabelStyle:h,tagNumberStyle:f,tagCloseStlye:p,theme:g})=>{const m=()=>!r&&!i&&!n&&!a,y=()=>i,b=()=>{d&&typeof d=="function"&&d(e??null)};return A.jsxs("div",{style:c??{},className:`${g==="dark"?$a.dark:""} ${$a.tagContainer} ${m()?$a.onlyLabel:""} ${$a[u??"md"]}`,children:[r&&A.jsx(Au,{...s}),i&&y(),t&&A.jsx("p",{style:h??{},className:$a.tagLabel,children:t??""}),a&&A.jsx("div",{style:f??{},className:$a.tagNumber,children:o??""}),n&&A.jsx("div",{style:p??{},className:$a.tagClose,onClick:b,children:A.jsx(Tu,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},Cc=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFocus:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:g,onRightIconIconMouseEnter:m,onRightIconIconMouseLeave:y,onLeftIconIconClick:b,onLeftIconIconMouseEnter:T,onLeftIconIconMouseLeave:k,onPressEnter:D,rightIcon:z,leftIcon:V,fixedDropdown:W=!0,withDropDown:j,dropdownData:q,dropDownPosition:ie="left",onSelectData:H,withTags:X,tagProps:x,withLink:G,withCopy:J,onCopy:ee,inputWrapperStyle:pe,inputLabelStyle:Q,requiredStyle:Y,inputContainerStyle:U,leftIconStyle:C,inputDropDownStyle:I,ulStyle:S,liStyle:B,httpStyle:N,inputStyle:K,rightIconStyle:$,withCopyStyle:te,inputHelperTextStyle:le,theme:me="light"})=>{const[ue,De]=de.useState(!1),E=de.useRef(null),[re,oe]=de.useState(!1),[F,P]=de.useState(!1),Z=de.useRef(null),fe=de.useRef(null),ge=de.useRef(null),[se,we]=de.useState(!1),[Be,Ie]=de.useState(1),Ve=Ke=>{let ft=Ke.target.value;ft.length===1&&(ft=ft.trim()),s&&typeof s=="function"&&s(f?ft.replace(/\d/g,""):ft)},st=()=>{oe(!0),l&&typeof l=="function"&&l()},Ye=()=>{oe(!1),u&&typeof u=="function"&&u()},Zt=Ke=>{const ft=Ke.target.value,mi=ft.length===0;a==="number"&&(Ke.keyCode===69||!mi&&(Ke.keyCode===187||Ke.keyCode===107||Ke.keyCode===189||Ke.keyCode===109))&&Ke.preventDefault(),Ke.key==="Enter"&&ft&&ft.length>0&&D&&typeof D=="function"&&D(ft)},Pi=()=>{ee&&typeof ee=="function"&&ee(e)},it=Ke=>Ke,ui=()=>{let Ke={};return J&&(Ke.borderTopRightRadius=0,Ke.borderBottomRightRadius=0,Ke.borderRight=0),j&&(ie==="right"?Ke.flexDirection="row-reverse":j&&(Ke.paddingLeft=0)),{...Ke,...U??{}}},yt=Ke=>{!Ke.composedPath().includes(fe.current)&&Ke.composedPath().includes(Z.current)||we(!1)},Kt=Ke=>{Ie(Ke.id),we(!1),H&&typeof H=="function"&&H(Ke)},Pt=()=>{const Ke=ge.current,ft=fe.current;if(!ft||!Ke)return;const mi=Ke.getBoundingClientRect(),Ci=window.innerHeight,$e=80;W&&(ft.style.position="fixed",ft.style.width=$e+"px",ie==="right"?ft.style.left=`${mi.right-$e/2}px`:ft.style.left=`${mi.left+$e/2}px`,mi.bottom+ft.offsetHeight>Ci?(ft.style.top=`${window.scrollY+mi.top-ft.offsetHeight}px`,ft.style.bottom="unset"):(ft.style.top=`${window.scrollY+mi.bottom}px`,ft.style.bottom="unset"))};de.useEffect(()=>{Pt()},[fe,se]),de.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),de.useEffect(()=>(document.addEventListener("click",yt),()=>{document.removeEventListener("click",yt)}),[]);const ii=de.useRef(!1);return de.useEffect(()=>{ii.current?setTimeout(()=>{De(Ke=>!Ke)},0):ii.current=!0},[]),A.jsxs("div",{className:`${me==="dark"?pi.dark:""} ${pi.inputWrapper}`,style:pe??{},children:[t&&A.jsxs("label",{className:pi.inputLabel,style:Q??{},children:[t," ",A.jsx("span",{className:pi.required,style:Y??{},children:n&&"*"})]}),A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsxs("div",{style:ui(),ref:ge,className:`${pi.inputContainer} ${re&&!c?pi.focused:""} ${r?pi.disabled:""} ${d!=null&&d.error?pi.error:""} ${pi[o??"sm"]}`,children:[!j&&!G&&V&&A.jsx("div",{className:pi.leftIcon,style:C??{},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:it(V)}),!G&&j&&A.jsxs("div",{className:pi.inputDropDown,style:I??{},onClick:()=>(we(!0),Pt()),ref:Z,children:[q.find(Ke=>Ke.id===Be).label,se&&A.jsx("ul",{ref:fe,style:S??{},children:q&&q.length&&q.map((Ke,ft)=>A.jsx("li",{style:B??{},onClick:()=>Kt(Ke),children:(Ke==null?void 0:Ke.label)??"-"},Ke.id))}),A.jsx(Rh,{})]}),G&&A.jsx("div",{className:`${pi.inputDropDown} ${pi.http}`,style:N??{},onClick:()=>we(!0),ref:Z,children:"http://"}),A.jsxs("div",{className:pi.inputContent,children:[X&&p&&p.length>0&&A.jsx("div",{className:pi.inputTags,children:p.map((Ke,ft)=>A.jsx("div",{className:pi.inputSingleTags,children:A.jsx(Vg,{...x,id:Ke,label:Ke,withClose:!0})},ft))}),A.jsx("input",{ref:E,style:K??{},type:a??"text",value:e,onChange:Ke=>Ve(Ke),onFocus:st,onBlur:Ye,disabled:r,required:n,onKeyDown:Zt,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),z&&A.jsx("div",{className:pi.rightIcon,style:$??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{y&&typeof y=="function"&&y()},children:it(z)})]}),J&&A.jsxs("div",{style:te??{},onClick:Pi,className:pi.withCopy,children:[A.jsx(LB,{}),A.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&A.jsx("div",{style:le??{},className:`${pi.inputHelperText} ${d!=null&&d.error?pi.error:""}`,children:A.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},ZB="Textarea-module__textareaContainer",QB="Textarea-module__textAreaLabel",JB="Textarea-module__required",eL="Textarea-module__wrap",tL="Textarea-module__textarea",iL="Textarea-module__focused",nL="Textarea-module__disabled",rL="Textarea-module__error",aL="Textarea-module__helperTextStyle",oL="Textarea-module__dark",ln={textareaContainer:ZB,textAreaLabel:QB,required:JB,wrap:eL,textarea:tL,focused:iL,disabled:nL,error:rL,helperTextStyle:aL,dark:oL},sL=({placeholder:e,label:t,msg:i,cols:n,rows:r,value:a,maxLength:o,onChange:s,onFocus:l,onBlur:u,disabled:d,required:c,textareaContainerStyle:h,textareaLabelStyle:f,requiredStyle:p,textareaStyle:g,textareaHelperTextStyle:m,labelIcon:y,theme:b})=>{const[T,k]=de.useState(!1),D=j=>{let q=j.target.value;s&&typeof s=="function"&&s(q)},z=j=>j,V=()=>{k(!0),l&&typeof l=="function"&&l()},W=()=>{k(!1),u&&typeof u=="function"&&u()};return A.jsxs("div",{style:h??{},className:`${b==="dark"?ln.dark:""} ${ln.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?ln[i==null?void 0:i.type]:""} ${d?ln.disabled:null}`,children:[t&&A.jsxs("div",{style:f,className:ln.textAreaLabel,children:[A.jsx("p",{children:t}),A.jsx("span",{style:p??{},className:ln.required,children:c&&"*"}),y&&z(y)]}),A.jsx("div",{className:ln.wrap,children:A.jsx("textarea",{style:g??{},className:`${ln.textarea} ${T?ln.focused:""} ${d?ln.disabled:""} ${i!=null&&i.error?ln.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:o??null,onFocus:V,disabled:d,onBlur:W,onChange:D})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&A.jsx("div",{style:m??{},className:`${ln.helperTextStyle} ${i!=null&&i.error?ln.error:""}`,children:A.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},lL="Toggle-module__toggleWrapper",uL="Toggle-module__toggleState",dL="Toggle-module__checked",cL="Toggle-module__disabled",hL="Toggle-module__dark",il={toggleWrapper:lL,toggleState:uL,checked:dL,disabled:cL,dark:hL},fL=({checked:e,change:t,disabled:i=!1,required:n,withActive:r=!0,activeStyle:a,bgStyle:o,checkedBgStyle:s,disabledBgStyle:l,circleStyle:u,checkedCircleStyle:d,disabledCircleStyle:c,theme:h="light"})=>{const[f,p]=de.useState(!1),g=()=>{!i&&t&&typeof t=="function"&&t(!e)},m=()=>{if(f)return!r||i?{boxShadow:"none",...a}:a??{};if(e){if(s)return s}else if(e){if(i&&l)return l}else if(o)return o;return{}},y=()=>{if(e){if(d)return d}else if(e){if(i&&c)return c}else if(u)return u;return{}};return A.jsx("div",{style:m(),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onMouseLeave:()=>p(!1),onClick:g,className:`${h==="dark"?il.dark:""} ${il.toggleWrapper} ${e?il.checked:""} ${i?il.disabled:""}`,children:A.jsx("div",{style:y(),className:il.toggleState,children:A.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},pL="Radio-module__radioWrapper",vL="Radio-module__sm",_L="Radio-module__md",gL="Radio-module__checked",mL="Radio-module__innerCircle",CL="Radio-module__radioState",yL="Radio-module__disabled",xL="Radio-module__dark",ea={radioWrapper:pL,sm:vL,md:_L,checked:gL,innerCircle:mL,radioState:CL,disabled:yL,dark:xL},bI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!1,size:a,radioWrapperStyle:o,radioStateStyle:s,innerCircleStyle:l,theme:u="light"})=>{const[d,c]=de.useState(!1),h=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return A.jsxs("div",{className:`${u==="dark"?ea.dark:""} ${ea.radioWrapper} ${ea[a]??ea.md} ${e?ea.checked:""} ${i?ea.disabled:""}`,style:o??{},onClick:h,children:[A.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),A.jsx("div",{style:s??{},className:ea.radioState,children:A.jsx("div",{style:l??{},className:ea.innerCircle})})]})},bL="Dropdown-module__dropdownWrapper",SL="Dropdown-module__placeHolder",wL="Dropdown-module__dropdownLabel",EL="Dropdown-module__required",IL="Dropdown-module__dropdownContainer",TL="Dropdown-module__sm",AL="Dropdown-module__md",DL="Dropdown-module__selectedTags",OL="Dropdown-module__selectedList",RL="Dropdown-module__additional",kL="Dropdown-module__dropdownListContainer",BL="Dropdown-module__dropdownList",LL="Dropdown-module__hidden",PL="Dropdown-module__visible",FL="Dropdown-module__checkIcon",ML="Dropdown-module__disabled",VL="Dropdown-module__selected",NL="Dropdown-module__dropdownListFooter",HL="Dropdown-module__focused",$L="Dropdown-module__error",WL="Dropdown-module__dropdownHelperText",zL="Dropdown-module__dark",ni={dropdownWrapper:bL,placeHolder:SL,dropdownLabel:wL,required:EL,dropdownContainer:IL,sm:TL,md:AL,selectedTags:DL,selectedList:OL,additional:RL,dropdownListContainer:kL,dropdownList:BL,hidden:LL,visible:PL,checkIcon:FL,disabled:ML,selected:VL,dropdownListFooter:NL,focused:HL,error:$L,dropdownHelperText:WL,dark:zL},GL=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:A.jsx("path",{stroke:"#10B77F",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 18.333c4.584 0 8.334-3.75 8.334-8.334 0-4.583-3.75-8.333-8.334-8.333-4.583 0-8.333 3.75-8.333 8.333 0 4.584 3.75 8.334 8.333 8.334zM6.667 10h6.667M10 13.333V6.666"})}),UL=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:A.jsx("path",{d:"M16.5 16.5L13.5834 13.5833M15.6667 8.58333C15.6667 12.4954 12.4954 15.6667 8.58333 15.6667C4.67132 15.6667 1.5 12.4954 1.5 8.58333C1.5 4.67132 4.67132 1.5 8.58333 1.5C12.4954 1.5 15.6667 4.67132 15.6667 8.58333Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),c_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,withSearch:c=!1,withTree:h=!1,defaultCollapsed:f=!0,checkboxProps:p,onCollapse:g,onFocus:m,onBlur:y,withClearAll:b=!0,withSelectAll:T=!0,withPlus:k=!1,searchComponent:D=!1,withFooter:z=!0,data:V,onSelect:W,selectedOptionID:j,withFilter:q=!0,withClose:ie=!0,fixedDropdown:H=!1,onSearch:X,pagination:x,withMultiSelect:G=!1,skipSelected:J,closeOnSelect:ee=!0,labelIcon:pe,closeIcon:Q,dropdownIcon:Y,iconDown:U,onLabelIconClick:C,onLabelIconMouseEnter:I,onLabelIconMouseLeave:S,dropdownWrapperStyle:B,dropdownLabelStyle:N,requiredStyle:K,labelIconStyle:$,dropdownContainerStyle:te,placeHolderStyle:le,selectedTagsStyle:me,selectedListStyle:ue,additionalStyle:De,additionalSpanStyle:E,dropdownListStyle:re,listStyle:oe,treeProps:F,theme:P="light"})=>{const[Z,fe]=de.useState(!1),[ge,se]=de.useState(!1),[we,Be]=de.useState([]),[Ie,Ve]=de.useState(""),[st,Ye]=de.useState(""),[Zt,Pi]=de.useState(null),it=de.useRef([]),ui=de.useRef(null),yt=de.useRef(null),Kt=de.useRef({}),Pt=de.useRef([]),ii=(L,_e)=>{const Te=new Set;return L.filter(We=>Te.has(We[_e])?!1:(Te.add(We[_e]),!0))},Ke=L=>{var _e;Kt.current=L,Ve((_e=Kt.current)==null?void 0:_e.label),W&&typeof W=="function"&&W(Kt.current),se(!1)},ft=L=>{it.current=[...it.current,...V.filter(_e=>_e.selected==!0),...V.filter(_e=>_e.id===L.id)],L.selected=!L.selected,it.current=ii(it.current,"id").filter(_e=>_e.selected),W&&typeof W=="function"&&W(it.current),D||Ve(it.current.map(_e=>_e.label).join(", ")),fe(_e=>!_e)},mi=L=>{L.stopPropagation(),it.current=[],j=null,V&&V.length>0&&V.forEach(_e=>_e.selected=!1),Ci(""),G?W([]):(Kt.current={},W({}),X&&typeof X=="function"&&X("")),Ve("")},Ci=L=>{if(X&&typeof X=="function"&&X(L),G&&c){let _e=V,Te=_e.filter(We=>{var pt;return(pt=We==null?void 0:We.label)==null?void 0:pt.toLowerCase().includes((L==null?void 0:L.toLowerCase())||"")});Pt.current=(L==null?void 0:L.length)>0?Te:_e,Ye(L),fe(We=>!We)}else Ye(L),Ve(L)},$e=()=>{if(j||j===0){let L=V.filter(_e=>Number(_e.id)===Number(j));L&&L[0]&&(Kt.current=L[0],J?(X&&typeof X=="function"&&X(Kt.current.label),Ve(Kt.current.label),ee&&setCollapsed(_e=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):Ke(L[0]))}},[ct,jt]=de.useState(!1),_t=L=>{let _e=ui.current.querySelector("ul"),We=Math.abs(_e.scrollTop+_e.clientHeight-_e.scrollHeight)<=2;x&&We&&!ct&&(d&&typeof d=="function"&&d(!0),jt(!0)),We||jt(!1)},Wt=()=>{V.forEach(L=>{L.selected=!1}),it.current=[],W([]),Ve(""),l&&typeof l=="function"&&l(),fe(L=>!L)},yr=()=>{V.forEach(L=>{L!=null&&L.id&&(L==null?void 0:L.id)!==null&&(L!=null&&L.label)&&(L==null?void 0:L.label)!==""&&(L==null?void 0:L.label)!=="-"&&!L.disabled&&(L.selected=!0)}),it.current=V,it.current=ii(it.current,"id").filter(L=>L.selected),Ve(it.current.map(L=>L.label).join(", ")),u&&typeof u=="function"&&u(),W(it.current),fe(L=>!L)},Ma=de.useRef(!0);de.useEffect(()=>{if(Ma.current){Ma.current=!1;return}ge||y&&typeof y=="function"&&y()},[ge]);const Go=()=>{m&&typeof m=="function"&&m()},Jr=L=>L,Js=L=>{let _e=!0,Te=Ie;return(q||withDropdownSearch)&&L&&!L.toLowerCase().split(" ").join("").trim().includes(Te.toLowerCase().split(" ").join("").trim())&&Te.trim()!==""&&(_e=!1),st.length>0&&L==="-"?"hidden":_e?"visible":"hidden"},Va=L=>{L.composedPath().includes(ui.current)||se(!1)},Na=L=>{if(H){if(L.composedPath().includes(ui.current))return;se(!1)}},Uo=()=>{const L=ui.current,_e=yt.current;if(!_e||!L)return;const Te=L.getBoundingClientRect(),We=window.innerHeight;H?(_e.style.position="fixed",_e.style.width=Te.width+"px",_e.style.left=`${Te.left+window.pageXOffset}px`,Te.bottom+_e.offsetHeight>We?(_e.style.top=`${window.scrollY+Te.top-_e.offsetHeight-8}px`,_e.style.bottom="unset"):(_e.style.top=`${window.scrollY+Te.bottom}px`,_e.style.bottom="unset")):Te.bottom>We?(_e.style.top="unset",_e.style.bottom="calc(100% + 8px)"):(_e.style.bottom="unset",_e.style.top="calc(100% + 8px)")},ye=L=>{it.current=L,W&&typeof W=="function"&&W(L)},Je=(L,_e)=>{g&&typeof g=="function"&&g(L,_e)},yi=de.useRef(null);return de.useEffect(()=>{ge&&yi.current&&yi.current.focus()},[ge]),de.useEffect(()=>{G&&(it.current=V.filter(L=>L.selected),Ve(V.filter(L=>L.selected).map(L=>L.label).join(", ")))},[]),de.useEffect(()=>{D&&s&&s.length>0&&Ye(s),Pt.current=V},[]),de.useEffect(()=>{Uo()},[yt,ge]),de.useEffect(()=>{G||$e()},[j]),de.useEffect(()=>(document.addEventListener("click",Va),document.addEventListener("wheel",Na),()=>{document.removeEventListener("click",Va),document.removeEventListener("wheel",Na)}),[]),A.jsxs("div",{className:`${P==="dark"?ni.dark:""} ${ni.dropdownWrapper}`,style:B??{},children:[e&&A.jsxs("label",{className:ni.dropdownLabel,style:N??{},children:[e," ",A.jsx("span",{className:ni.required,style:K??{},children:i&&"*"}),A.jsxs("span",{style:{...$??{},display:"grid",placeItems:"center"},onClick:()=>{C&&typeof C=="function"&&C()},onMouseEnter:()=>{I&&typeof I=="function"&&I()},onMouseLeave:()=>{S&&typeof S=="function"&&S()},children:[" ",Jr(pe)]})]}),A.jsxs("div",{onFocus:Go,ref:ui,onClick:()=>(se(L=>!L),Uo()),className:`${ni.dropdownContainer} ${ge&&!o?ni.focused:""} ${t?ni.disabled:""} ${a!=null&&a.error?ni.error:""} ${ni[n]}`,style:te??{},children:[D?A.jsxs("div",{children:[" ",A.jsx(UL,{})]}):A.jsx(A.Fragment,{children:Y&&A.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:Jr(Y)})}),!D&&(h||G)&&r&&!ge&&it.current.length===0&&A.jsx("span",{className:ni.placeHolder,style:le??{},children:r??""}),(G||h)&&A.jsx("div",{className:ni.selectedTags,style:me??{},children:!D&&!ge?A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[it.current.slice(0,3).map((L,_e)=>{let Te=it.current[it.current.length-1];return A.jsxs("span",{className:ni.selectedList,style:ue??{},children:[!k&&L.label,!k&&L.id!==Te.id&&_e!==2?", ":""]},L==null?void 0:L.id)}),!k&&it.current.length>3&&A.jsxs("div",{className:ni.additional,style:De??{},children:[" ",A.jsxs("span",{style:E??{},children:["+(",it.current.length-3,")"]})]})]}):A.jsx("input",{ref:yi,onClick:L=>(L.stopPropagation(),se(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:st}:{},onChange:L=>Ci(L.target.value)},j)}),A.jsx("input",{autoCorrect:"off",hidden:G||h,placeholder:r,readOnly:!q||!ge||G||h,type:"text",value:(G||h)&&!D&&ge?"":Ie,onChange:L=>Ci(L.target.value)},j),V&&V.length>0&&ge&&A.jsxs("div",{ref:yt,onClick:L=>L.stopPropagation(),className:ni.dropdownListContainer,children:[h?A.jsx(Xk,{SearchValue:st,expandedNodes:we,setExpandedNodes:Be,checkboxProps:p,onSelect:ye,withClearAll:b,withSelectAll:T,SelectedData:it.current,fromDropdown:!0,onCollapse:Je,defaultCollapsed:f,data:V,theme:P,treeProps:F}):A.jsx("ul",{onScroll:L=>_t(),onClick:L=>L.stopPropagation(),className:ni.dropdownList,style:re??{},children:(G&&q?Pt.current:V).map(L=>{var _e,Te,We,pt;return A.jsxs("li",{style:oe??{},className:`${!G&&c?ni[Js((L==null?void 0:L.label)??"-")]:""} ${!(L!=null&&L.label)||L.label===void 0||L!=null&&L.disabled?ni.disabled:""} ${(G?L.selected:(_e=Kt.current)!=null&&_e.id&&((Te=Kt.current)==null?void 0:Te.id)===L.id)?ni.selected:""}`,onClick:()=>{G?ft(L):Ke(L)},children:[A.jsxs("p",{children:[" ",L!=null&&L.customLabel?L.customLabel():(L==null?void 0:L.label)??"-"]}),k?A.jsx(A.Fragment,{children:L.selected?A.jsx(xI,{}):A.jsx(GL,{})}):(G?L.selected:((We=Kt.current)==null?void 0:We.id)&&((pt=Kt.current)==null?void 0:pt.id)===L.id)&&A.jsx("span",{className:ni.checkIcon,children:A.jsx(yI,{color:"#7F56D9",width:20,height:20})})]},L==null?void 0:L.id)})}),G&&z&&A.jsxs("div",{className:ni.dropdownListFooter,children:[b&&A.jsx("span",{onClick:Wt,children:"Clear All"}),T&&st===""&&A.jsx("span",{onClick:yr,children:"Select All"})]})]}),!G&&!h&&ie&&(it.current.length>0||Ie.length)>0&&A.jsx("div",{onClick:L=>mi(L),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:Q?Jr(Q):A.jsx(Tu,{width:16,height:16})}),U?Jr(U):A.jsx("div",{style:{display:"grid",placeItems:"center",transform:ge?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&A.jsx(Rh,{})})]}),a&&(a==null?void 0:a.visible)&&A.jsx("div",{className:`${ni.dropdownHelperText} ${a!=null&&a.error?ni.error:""}`,children:!ge&&A.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},KL="Tooltip-module__tooltipContainer",jL="Tooltip-module__tooltipContent",qL="Tooltip-module__top",YL="Tooltip-module__right",XL="Tooltip-module__bottom",ZL="Tooltip-module__left",QL="Tooltip-module__tooltipTitle",JL="Tooltip-module__tooltipText",eP="Tooltip-module__dark",Xn={tooltipContainer:KL,tooltipContent:jL,top:qL,right:YL,bottom:XL,left:ZL,tooltipTitle:QL,tooltipText:JL,dark:eP},h_=({children:e,tooltipSlot:t,delay:i,placement:n="top",trigger:r="hover",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",theme:c})=>{const h=de.useRef(null),f=de.useRef(null);let p;const[g,m]=de.useState(!1),y=()=>{r==="hover"&&(p=setTimeout(()=>{m(!0)},i||400))},b=()=>{r==="hover"&&(clearTimeout(p),setTimeout(()=>{m(!1)},i||400))},T=()=>{r==="click"&&m(z=>!z)},k=()=>{const z=h.current,V=f.current;if(!V||!z)return;const W=z.getBoundingClientRect();switch(V.style.position="fixed",n){case"top":V.style.top=`${W.top-V.offsetHeight-8}px`;break;case"bottom":V.style.top=`${W.bottom+8}px`;break;case"left":V.style.top=`${W.top+W.height/2-V.offsetHeight/2}px`,V.style.left=`${W.left-V.offsetWidth-8}px`;break;case"right":V.style.top=`${W.top+W.height/2-V.offsetHeight/2}px`,V.style.left=`${W.right+8}px`;break}},D=z=>{z.composedPath().includes(h.current)||m(!1)};return de.useEffect(()=>{k()},[h,g]),de.useEffect(()=>(document.addEventListener("click",D),()=>{document.removeEventListener("click",D)}),[]),de.useEffect(()=>{const z=f.current;z&&z.style.setProperty("--pointer-position",`${d}`)},[g]),A.jsxs("div",{ref:h,className:`${c==="dark"?Xn.dark:""} ${Xn.tooltipContainer}`,onClick:T,onMouseEnter:y,onMouseLeave:b,children:[e,g&&t?A.jsx("div",{style:s??{},onClick:z=>z.stopPropagation(),ref:f,className:`${Xn.tooltipContent} ${n?Xn[n]:Xn.bottom}`,children:t()}):g&&A.jsxs("div",{style:s??{},onClick:z=>z.stopPropagation(),ref:f,className:`${Xn.tooltipContent} ${n?Xn[n]:Xn.bottom}`,children:[a&&a.length>0&&A.jsx("h2",{className:Xn.tooltipTitle,style:l??{},children:a}),o&&o.length>0&&A.jsx("p",{className:Xn.tooltipText,style:u??{},children:o})]})]})},tP="Popup-module__modalOverlay",iP="Popup-module__popupDrawerMode",nP="Popup-module__popupContainer",rP="Popup-module__closeButton",aP="Popup-module__withOptions",oP="Popup-module__horizontal",sP="Popup-module__popupHeader",lP="Popup-module__popupTitle",uP="Popup-module__popupDescription",dP="Popup-module__typeIcon",cP="Popup-module__icon",hP="Popup-module__templateWrapper",fP="Popup-module__dark",un={modalOverlay:tP,popupDrawerMode:iP,popupContainer:nP,closeButton:rP,withOptions:aP,horizontal:oP,popupHeader:sP,popupTitle:lP,popupDescription:uP,typeIcon:dP,icon:cP,templateWrapper:hP,dark:fP},pP=e=>{const t=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];let i=0,n=parseInt(e,10)||0;for(;n>=1024&&++i;)n=n/1024;return n.toFixed(n<10&&i>0?1:0)+" "+t[i]},vP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),_P=e=>new Promise((t,i)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result.split(",")[1]),n.onerror=r=>i(r)});location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const SI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},gP=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:A.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),mP=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:A.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Ng=({width:e,color:t})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:A.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:t??"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Hg=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,closeButtonStyle:h,theme:f})=>{const p=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return A.jsx(Ng,{});case"unsaved":return A.jsx(mP,{});case"success":return A.jsx(gP,{})}},g=()=>{a&&typeof a=="function"&&a(!1)},m=de.useRef(null),y=b=>{b.target===m.current&&r&&typeof r=="function"&&r(!1)};return de.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[]),e&&A.jsx("div",{ref:m,style:s??{},className:`
|
|
38
|
+
${r?xr.disabled:""}`,onMouseDown:()=>y(!0),onMouseUp:()=>y(!1),onMouseLeave:()=>y(!1),onClick:()=>{!r&&i&&typeof i=="function"&&i()},children:A.jsxs("div",{className:xr.buttonSlot,style:!r&&f?f:{},children:[u||o&&s?s:"",!u&&A.jsx(A.Fragment,{children:a?A.jsx("div",{style:{display:"grid",placeItems:"center"},children:A.jsx(iB,{})}):A.jsx("span",{style:!r&&h?h:{},className:xr.buttonLabel,children:e??"Button"})}),o&&l?l:""]})})},_B="FormInput-module__inputWrapper",gB="FormInput-module__inputLabel",mB="FormInput-module__required",CB="FormInput-module__inputContainer",yB="FormInput-module__inputContent",xB="FormInput-module__inputTags",bB="FormInput-module__focused",SB="FormInput-module__error",wB="FormInput-module__rightIcon",EB="FormInput-module__leftIcon",IB="FormInput-module__inputDropDown",TB="FormInput-module__http",AB="FormInput-module__disabled",DB="FormInput-module__sm",OB="FormInput-module__md",RB="FormInput-module__withCopy",kB="FormInput-module__inputHelperText",BB="FormInput-module__dark",pi={inputWrapper:_B,inputLabel:gB,required:mB,inputContainer:CB,inputContent:yB,inputTags:xB,focused:bB,error:SB,rightIcon:wB,leftIcon:EB,inputDropDown:IB,http:TB,disabled:AB,sm:DB,md:OB,withCopy:RB,inputHelperText:kB,dark:BB},Rh=({width:e,height:t,color:i})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:A.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),LB=({width:e,height:t,color:i})=>A.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[A.jsx("g",{clipPath:"url(#clip0_444_26)",children:A.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:i??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),A.jsx("defs",{children:A.jsx("clipPath",{id:"clip0_444_26",children:A.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),Tu=e=>A.jsx("svg",{xmlns:e.xmlns??"http://www.w3.org/2000/svg",width:e.width??"14",height:e.height??"14",viewBox:e.viewBox??"0 0 14 14",fill:e.fill??"none",children:A.jsx("path",{d:e.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:e.stroke??"#A4A7AE",strokeWidth:e.strokeWidth??"1.66667",strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round"})}),PB="Checkbox-module__checkboxWrapper",FB="Checkbox-module__sm",MB="Checkbox-module__md",VB="Checkbox-module__checkMark",NB="Checkbox-module__checked",HB="Checkbox-module__disabled",$B="Checkbox-module__dark",jo={checkboxWrapper:PB,sm:FB,md:MB,checkMark:VB,checked:NB,disabled:HB,dark:$B},yI=({color:e,width:t,height:i})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:A.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),xI=e=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:A.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Au=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,withActive:l=!0,theme:u="light"})=>{const d=de.useRef(null),[c,h]=de.useState(!1),f=()=>{i||t&&typeof t=="function"&&t(!e)},p=()=>c?!l||i?{boxShadow:"none",...o}:o??{}:s??{};return A.jsxs("div",{style:p(),className:` ${u==="dark"?jo.dark:""} ${jo.checkboxWrapper} ${jo[a]} ${e?jo.checked:jo.unChecked} ${i?jo.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[A.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?A.jsx(xI,{}):A.jsx(yI,{}):""]})},WB="Tag-module__tagContainer",zB="Tag-module__onlyLabel",GB="Tag-module__sm",UB="Tag-module__md",KB="Tag-module__lg",jB="Tag-module__tagLabel",qB="Tag-module__tagNumber",YB="Tag-module__tagClose",XB="Tag-module__dark",$a={tagContainer:WB,onlyLabel:zB,sm:GB,md:UB,lg:KB,tagLabel:jB,tagNumber:qB,tagClose:YB,dark:XB},Vg=({id:e,label:t,icon:i,withClose:n,withCheckbox:r,withNumber:a,number:o,checkboxProps:s,disable:l,size:u,onClose:d,tagContainerStyle:c,tagLabelStyle:h,tagNumberStyle:f,tagCloseStlye:p,theme:g})=>{const m=()=>!r&&!i&&!n&&!a,y=()=>i,b=()=>{d&&typeof d=="function"&&d(e??null)};return A.jsxs("div",{style:c??{},className:`${g==="dark"?$a.dark:""} ${$a.tagContainer} ${m()?$a.onlyLabel:""} ${$a[u??"md"]}`,children:[r&&A.jsx(Au,{...s}),i&&y(),t&&A.jsx("p",{style:h??{},className:$a.tagLabel,children:t??""}),a&&A.jsx("div",{style:f??{},className:$a.tagNumber,children:o??""}),n&&A.jsx("div",{style:p??{},className:$a.tagClose,onClick:b,children:A.jsx(Tu,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},Cc=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFocus:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:g,onRightIconIconMouseEnter:m,onRightIconIconMouseLeave:y,onLeftIconIconClick:b,onLeftIconIconMouseEnter:T,onLeftIconIconMouseLeave:k,onPressEnter:D,rightIcon:z,leftIcon:V,fixedDropdown:W=!0,withDropDown:j,dropdownData:q,dropDownPosition:ie="left",onSelectData:H,withTags:X,tagProps:x,withLink:G,withCopy:J,onCopy:ee,inputWrapperStyle:pe,inputLabelStyle:Q,requiredStyle:Y,inputContainerStyle:U,leftIconStyle:C,inputDropDownStyle:I,ulStyle:S,liStyle:B,httpStyle:N,inputStyle:K,rightIconStyle:$,withCopyStyle:te,inputHelperTextStyle:le,theme:me="light"})=>{const[ue,De]=de.useState(!1),E=de.useRef(null),[re,oe]=de.useState(!1),[F,P]=de.useState(!1),Z=de.useRef(null),fe=de.useRef(null),ge=de.useRef(null),[se,we]=de.useState(!1),[Be,Ie]=de.useState(1),Ve=Ke=>{let ft=Ke.target.value;ft.length===1&&(ft=ft.trim()),s&&typeof s=="function"&&s(f?ft.replace(/\d/g,""):ft)},st=()=>{oe(!0),l&&typeof l=="function"&&l()},Ye=()=>{oe(!1),u&&typeof u=="function"&&u()},Zt=Ke=>{const ft=Ke.target.value,mi=ft.length===0;a==="number"&&(Ke.keyCode===69||!mi&&(Ke.keyCode===187||Ke.keyCode===107||Ke.keyCode===189||Ke.keyCode===109))&&Ke.preventDefault(),Ke.key==="Enter"&&ft&&ft.length>0&&D&&typeof D=="function"&&D(ft)},Pi=()=>{ee&&typeof ee=="function"&&ee(e)},it=Ke=>Ke,ui=()=>{let Ke={};return J&&(Ke.borderTopRightRadius=0,Ke.borderBottomRightRadius=0,Ke.borderRight=0),j&&(ie==="right"?Ke.flexDirection="row-reverse":j&&(Ke.paddingLeft=0)),{...Ke,...U??{}}},yt=Ke=>{!Ke.composedPath().includes(fe.current)&&Ke.composedPath().includes(Z.current)||we(!1)},Kt=Ke=>{Ie(Ke.id),we(!1),H&&typeof H=="function"&&H(Ke)},Pt=()=>{const Ke=ge.current,ft=fe.current;if(!ft||!Ke)return;const mi=Ke.getBoundingClientRect(),Ci=window.innerHeight,$e=80;W&&(ft.style.position="fixed",ft.style.width=$e+"px",ie==="right"?ft.style.left=`${mi.right-$e/2}px`:ft.style.left=`${mi.left+$e/2}px`,mi.bottom+ft.offsetHeight>Ci?(ft.style.top=`${window.scrollY+mi.top-ft.offsetHeight}px`,ft.style.bottom="unset"):(ft.style.top=`${window.scrollY+mi.bottom}px`,ft.style.bottom="unset"))};de.useEffect(()=>{Pt()},[fe,se]),de.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),de.useEffect(()=>(document.addEventListener("click",yt),()=>{document.removeEventListener("click",yt)}),[]);const ii=de.useRef(!1);return de.useEffect(()=>{ii.current?setTimeout(()=>{De(Ke=>!Ke)},0):ii.current=!0},[]),A.jsxs("div",{className:`${me==="dark"?pi.dark:""} ${pi.inputWrapper}`,style:pe??{},children:[t&&A.jsxs("label",{className:pi.inputLabel,style:Q??{},children:[t," ",A.jsx("span",{className:pi.required,style:Y??{},children:n&&"*"})]}),A.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[A.jsxs("div",{style:ui(),ref:ge,className:`${pi.inputContainer} ${re&&!c?pi.focused:""} ${r?pi.disabled:""} ${d!=null&&d.error?pi.error:""} ${pi[o??"sm"]}`,children:[!j&&!G&&V&&A.jsx("div",{className:pi.leftIcon,style:C??{},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:it(V)}),!G&&j&&A.jsxs("div",{className:pi.inputDropDown,style:I??{},onClick:()=>(we(!0),Pt()),ref:Z,children:[q.find(Ke=>Ke.id===Be).label,se&&A.jsx("ul",{ref:fe,style:S??{},children:q&&q.length&&q.map((Ke,ft)=>A.jsx("li",{style:B??{},onClick:()=>Kt(Ke),children:(Ke==null?void 0:Ke.label)??"-"},Ke.id))}),A.jsx(Rh,{})]}),G&&A.jsx("div",{className:`${pi.inputDropDown} ${pi.http}`,style:N??{},onClick:()=>we(!0),ref:Z,children:"http://"}),A.jsxs("div",{className:pi.inputContent,children:[X&&p&&p.length>0&&A.jsx("div",{className:pi.inputTags,children:p.map((Ke,ft)=>A.jsx("div",{className:pi.inputSingleTags,children:A.jsx(Vg,{...x,id:Ke,label:Ke,withClose:!0})},ft))}),A.jsx("input",{ref:E,style:K??{},type:a??"text",value:e,onChange:Ke=>Ve(Ke),onFocus:st,onBlur:Ye,disabled:r,required:n,onKeyDown:Zt,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),z&&A.jsx("div",{className:pi.rightIcon,style:$??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{y&&typeof y=="function"&&y()},children:it(z)})]}),J&&A.jsxs("div",{style:te??{},onClick:Pi,className:pi.withCopy,children:[A.jsx(LB,{}),A.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&A.jsx("div",{style:le??{},className:`${pi.inputHelperText} ${d!=null&&d.error?pi.error:""}`,children:A.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},ZB="Textarea-module__textareaContainer",QB="Textarea-module__textAreaLabel",JB="Textarea-module__required",eL="Textarea-module__wrap",tL="Textarea-module__textarea",iL="Textarea-module__focused",nL="Textarea-module__disabled",rL="Textarea-module__error",aL="Textarea-module__helperTextStyle",oL="Textarea-module__dark",ln={textareaContainer:ZB,textAreaLabel:QB,required:JB,wrap:eL,textarea:tL,focused:iL,disabled:nL,error:rL,helperTextStyle:aL,dark:oL},sL=({placeholder:e,label:t,msg:i,cols:n,rows:r,value:a,maxLength:o,onChange:s,onFocus:l,onBlur:u,disabled:d,required:c,textareaContainerStyle:h,textareaLabelStyle:f,requiredStyle:p,textareaStyle:g,textareaHelperTextStyle:m,labelIcon:y,theme:b})=>{const[T,k]=de.useState(!1),D=j=>{let q=j.target.value;s&&typeof s=="function"&&s(q)},z=j=>j,V=()=>{k(!0),l&&typeof l=="function"&&l()},W=()=>{k(!1),u&&typeof u=="function"&&u()};return A.jsxs("div",{style:h??{},className:`${b==="dark"?ln.dark:""} ${ln.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?ln[i==null?void 0:i.type]:""} ${d?ln.disabled:null}`,children:[t&&A.jsxs("div",{style:f,className:ln.textAreaLabel,children:[A.jsx("p",{children:t}),A.jsx("span",{style:p??{},className:ln.required,children:c&&"*"}),y&&z(y)]}),A.jsx("div",{className:ln.wrap,children:A.jsx("textarea",{style:g??{},className:`${ln.textarea} ${T?ln.focused:""} ${d?ln.disabled:""} ${i!=null&&i.error?ln.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:o??null,onFocus:V,disabled:d,onBlur:W,onChange:D})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&A.jsx("div",{style:m??{},className:`${ln.helperTextStyle} ${i!=null&&i.error?ln.error:""}`,children:A.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},lL="Toggle-module__toggleWrapper",uL="Toggle-module__toggleState",dL="Toggle-module__checked",cL="Toggle-module__disabled",hL="Toggle-module__dark",il={toggleWrapper:lL,toggleState:uL,checked:dL,disabled:cL,dark:hL},fL=({checked:e,change:t,disabled:i=!1,required:n,withActive:r=!0,activeStyle:a,bgStyle:o,checkedBgStyle:s,disabledBgStyle:l,circleStyle:u,checkedCircleStyle:d,disabledCircleStyle:c,theme:h="light"})=>{const[f,p]=de.useState(!1),g=()=>{!i&&t&&typeof t=="function"&&t(!e)},m=()=>{if(f)return!r||i?{boxShadow:"none",...a}:a??{};if(e){if(s)return s}else if(e){if(i&&l)return l}else if(o)return o;return{}},y=()=>{if(e){if(d)return d}else if(e){if(i&&c)return c}else if(u)return u;return{}};return A.jsx("div",{style:m(),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onMouseLeave:()=>p(!1),onClick:g,className:`${h==="dark"?il.dark:""} ${il.toggleWrapper} ${e?il.checked:""} ${i?il.disabled:""}`,children:A.jsx("div",{style:y(),className:il.toggleState,children:A.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},pL="Radio-module__radioWrapper",vL="Radio-module__sm",_L="Radio-module__md",gL="Radio-module__checked",mL="Radio-module__innerCircle",CL="Radio-module__radioState",yL="Radio-module__disabled",xL="Radio-module__dark",ea={radioWrapper:pL,sm:vL,md:_L,checked:gL,innerCircle:mL,radioState:CL,disabled:yL,dark:xL},bI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!1,size:a,radioWrapperStyle:o,radioStateStyle:s,innerCircleStyle:l,theme:u="light"})=>{const[d,c]=de.useState(!1),h=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return A.jsxs("div",{className:`${u==="dark"?ea.dark:""} ${ea.radioWrapper} ${ea[a]??ea.md} ${e?ea.checked:""} ${i?ea.disabled:""}`,style:o??{},onClick:h,children:[A.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),A.jsx("div",{style:s??{},className:ea.radioState,children:A.jsx("div",{style:l??{},className:ea.innerCircle})})]})},bL="Dropdown-module__dropdownWrapper",SL="Dropdown-module__placeHolder",wL="Dropdown-module__dropdownLabel",EL="Dropdown-module__required",IL="Dropdown-module__dropdownContainer",TL="Dropdown-module__sm",AL="Dropdown-module__md",DL="Dropdown-module__selectedTags",OL="Dropdown-module__selectedList",RL="Dropdown-module__additional",kL="Dropdown-module__dropdownListContainer",BL="Dropdown-module__dropdownList",LL="Dropdown-module__hidden",PL="Dropdown-module__visible",FL="Dropdown-module__checkIcon",ML="Dropdown-module__disabled",VL="Dropdown-module__selected",NL="Dropdown-module__dropdownListFooter",HL="Dropdown-module__focused",$L="Dropdown-module__error",WL="Dropdown-module__dropdownHelperText",zL="Dropdown-module__dark",ni={dropdownWrapper:bL,placeHolder:SL,dropdownLabel:wL,required:EL,dropdownContainer:IL,sm:TL,md:AL,selectedTags:DL,selectedList:OL,additional:RL,dropdownListContainer:kL,dropdownList:BL,hidden:LL,visible:PL,checkIcon:FL,disabled:ML,selected:VL,dropdownListFooter:NL,focused:HL,error:$L,dropdownHelperText:WL,dark:zL},GL=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:A.jsx("path",{stroke:"#10B77F",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 18.333c4.584 0 8.334-3.75 8.334-8.334 0-4.583-3.75-8.333-8.334-8.333-4.583 0-8.333 3.75-8.333 8.333 0 4.584 3.75 8.334 8.333 8.334zM6.667 10h6.667M10 13.333V6.666"})}),UL=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:A.jsx("path",{d:"M16.5 16.5L13.5834 13.5833M15.6667 8.58333C15.6667 12.4954 12.4954 15.6667 8.58333 15.6667C4.67132 15.6667 1.5 12.4954 1.5 8.58333C1.5 4.67132 4.67132 1.5 8.58333 1.5C12.4954 1.5 15.6667 4.67132 15.6667 8.58333Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),c_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,withSearch:c=!1,withTree:h=!1,defaultCollapsed:f=!0,checkboxProps:p,onCollapse:g,onFocus:m,onBlur:y,withClearAll:b=!0,withSelectAll:T=!0,withPlus:k=!1,searchComponent:D=!1,withFooter:z=!0,data:V,onSelect:W,selectedOptionID:j,withFilter:q=!0,withClose:ie=!0,fixedDropdown:H=!1,onSearch:X,pagination:x,withMultiSelect:G=!1,skipSelected:J,closeOnSelect:ee=!0,labelIcon:pe,closeIcon:Q,dropdownIcon:Y,iconDown:U,onLabelIconClick:C,onLabelIconMouseEnter:I,onLabelIconMouseLeave:S,dropdownWrapperStyle:B,dropdownLabelStyle:N,requiredStyle:K,labelIconStyle:$,dropdownContainerStyle:te,placeHolderStyle:le,selectedTagsStyle:me,selectedListStyle:ue,additionalStyle:De,additionalSpanStyle:E,dropdownListStyle:re,listStyle:oe,treeProps:F,theme:P="light"})=>{const[Z,fe]=de.useState(!1),[ge,se]=de.useState(!1),[we,Be]=de.useState([]),[Ie,Ve]=de.useState(""),[st,Ye]=de.useState(""),[Zt,Pi]=de.useState(null),it=de.useRef([]),ui=de.useRef(null),yt=de.useRef(null),Kt=de.useRef({}),Pt=de.useRef([]),ii=(L,_e)=>{const Te=new Set;return L.filter(We=>Te.has(We[_e])?!1:(Te.add(We[_e]),!0))},Ke=L=>{var _e;Kt.current=L,Ve((_e=Kt.current)==null?void 0:_e.label),W&&typeof W=="function"&&W(Kt.current),se(!1)},ft=L=>{it.current=[...it.current,...V.filter(_e=>_e.selected==!0),...V.filter(_e=>_e.id===L.id)],L.selected=!L.selected,it.current=ii(it.current,"id").filter(_e=>_e.selected),W&&typeof W=="function"&&W(it.current),D||Ve(it.current.map(_e=>_e.label).join(", ")),fe(_e=>!_e)},mi=L=>{L.stopPropagation(),it.current=[],j=null,V&&V.length>0&&V.forEach(_e=>_e.selected=!1),Ci(""),G?W([]):(Kt.current={},W({}),X&&typeof X=="function"&&X("")),Ve("")},Ci=L=>{if(X&&typeof X=="function"&&X(L),G&&c){let _e=V,Te=_e.filter(We=>{var pt;return(pt=We==null?void 0:We.label)==null?void 0:pt.toLowerCase().includes((L==null?void 0:L.toLowerCase())||"")});Pt.current=(L==null?void 0:L.length)>0?Te:_e,Ye(L),fe(We=>!We)}else Ye(L),Ve(L)},$e=()=>{if(j||j===0){let L=V.filter(_e=>Number(_e.id)===Number(j));L&&L[0]&&(Kt.current=L[0],J?(X&&typeof X=="function"&&X(Kt.current.label),Ve(Kt.current.label),ee&&se(_e=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):Ke(L[0]))}},[ct,jt]=de.useState(!1),_t=L=>{let _e=ui.current.querySelector("ul"),We=Math.abs(_e.scrollTop+_e.clientHeight-_e.scrollHeight)<=2;x&&We&&!ct&&(d&&typeof d=="function"&&d(!0),jt(!0)),We||jt(!1)},Wt=()=>{V.forEach(L=>{L.selected=!1}),it.current=[],W([]),Ve(""),l&&typeof l=="function"&&l(),fe(L=>!L)},yr=()=>{V.forEach(L=>{L!=null&&L.id&&(L==null?void 0:L.id)!==null&&(L!=null&&L.label)&&(L==null?void 0:L.label)!==""&&(L==null?void 0:L.label)!=="-"&&!L.disabled&&(L.selected=!0)}),it.current=V,it.current=ii(it.current,"id").filter(L=>L.selected),Ve(it.current.map(L=>L.label).join(", ")),u&&typeof u=="function"&&u(),W(it.current),fe(L=>!L)},Ma=de.useRef(!0);de.useEffect(()=>{if(Ma.current){Ma.current=!1;return}ge||y&&typeof y=="function"&&y()},[ge]);const Go=()=>{m&&typeof m=="function"&&m()},Jr=L=>L,Js=L=>{let _e=!0,Te=Ie;return(q||withDropdownSearch)&&L&&!L.toLowerCase().split(" ").join("").trim().includes(Te.toLowerCase().split(" ").join("").trim())&&Te.trim()!==""&&(_e=!1),st.length>0&&L==="-"?"hidden":_e?"visible":"hidden"},Va=L=>{L.composedPath().includes(ui.current)||se(!1)},Na=L=>{if(H){if(L.composedPath().includes(ui.current))return;se(!1)}},Uo=()=>{const L=ui.current,_e=yt.current;if(!_e||!L)return;const Te=L.getBoundingClientRect(),We=window.innerHeight;H?(_e.style.position="fixed",_e.style.width=Te.width+"px",_e.style.left=`${Te.left+window.pageXOffset}px`,Te.bottom+_e.offsetHeight>We?(_e.style.top=`${window.scrollY+Te.top-_e.offsetHeight-8}px`,_e.style.bottom="unset"):(_e.style.top=`${window.scrollY+Te.bottom}px`,_e.style.bottom="unset")):Te.bottom>We?(_e.style.top="unset",_e.style.bottom="calc(100% + 8px)"):(_e.style.bottom="unset",_e.style.top="calc(100% + 8px)")},ye=L=>{it.current=L,W&&typeof W=="function"&&W(L)},Je=(L,_e)=>{g&&typeof g=="function"&&g(L,_e)},yi=de.useRef(null);return de.useEffect(()=>{ge&&yi.current&&yi.current.focus()},[ge]),de.useEffect(()=>{G&&(it.current=V.filter(L=>L.selected),Ve(V.filter(L=>L.selected).map(L=>L.label).join(", ")))},[]),de.useEffect(()=>{D&&s&&s.length>0&&Ye(s),Pt.current=V},[]),de.useEffect(()=>{Uo()},[yt,ge]),de.useEffect(()=>{G||$e()},[j]),de.useEffect(()=>(document.addEventListener("click",Va),document.addEventListener("wheel",Na),()=>{document.removeEventListener("click",Va),document.removeEventListener("wheel",Na)}),[]),A.jsxs("div",{className:`${P==="dark"?ni.dark:""} ${ni.dropdownWrapper}`,style:B??{},children:[e&&A.jsxs("label",{className:ni.dropdownLabel,style:N??{},children:[e," ",A.jsx("span",{className:ni.required,style:K??{},children:i&&"*"}),A.jsxs("span",{style:{...$??{},display:"grid",placeItems:"center"},onClick:()=>{C&&typeof C=="function"&&C()},onMouseEnter:()=>{I&&typeof I=="function"&&I()},onMouseLeave:()=>{S&&typeof S=="function"&&S()},children:[" ",Jr(pe)]})]}),A.jsxs("div",{onFocus:Go,ref:ui,onClick:()=>(se(L=>!L),Uo()),className:`${ni.dropdownContainer} ${ge&&!o?ni.focused:""} ${t?ni.disabled:""} ${a!=null&&a.error?ni.error:""} ${ni[n]}`,style:te??{},children:[D?A.jsxs("div",{children:[" ",A.jsx(UL,{})]}):A.jsx(A.Fragment,{children:Y&&A.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:Jr(Y)})}),!D&&(h||G)&&r&&!ge&&it.current.length===0&&A.jsx("span",{className:ni.placeHolder,style:le??{},children:r??""}),(G||h)&&A.jsx("div",{className:ni.selectedTags,style:me??{},children:!D&&!ge?A.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[it.current.slice(0,3).map((L,_e)=>{let Te=it.current[it.current.length-1];return A.jsxs("span",{className:ni.selectedList,style:ue??{},children:[!k&&L.label,!k&&L.id!==Te.id&&_e!==2?", ":""]},L==null?void 0:L.id)}),!k&&it.current.length>3&&A.jsxs("div",{className:ni.additional,style:De??{},children:[" ",A.jsxs("span",{style:E??{},children:["+(",it.current.length-3,")"]})]})]}):A.jsx("input",{ref:yi,onClick:L=>(L.stopPropagation(),se(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:st}:{},onChange:L=>Ci(L.target.value)},j)}),A.jsx("input",{autoCorrect:"off",hidden:G||h,placeholder:r,readOnly:!q||!ge||G||h,type:"text",value:(G||h)&&!D&&ge?"":Ie,onChange:L=>Ci(L.target.value)},j),V&&V.length>0&&ge&&A.jsxs("div",{ref:yt,onClick:L=>L.stopPropagation(),className:ni.dropdownListContainer,children:[h?A.jsx(Xk,{SearchValue:st,expandedNodes:we,setExpandedNodes:Be,checkboxProps:p,onSelect:ye,withClearAll:b,withSelectAll:T,SelectedData:it.current,fromDropdown:!0,onCollapse:Je,defaultCollapsed:f,data:V,theme:P,treeProps:F}):A.jsx("ul",{onScroll:L=>_t(),onClick:L=>L.stopPropagation(),className:ni.dropdownList,style:re??{},children:(G&&q?Pt.current:V).map(L=>{var _e,Te,We,pt;return A.jsxs("li",{style:oe??{},className:`${!G&&c?ni[Js((L==null?void 0:L.label)??"-")]:""} ${!(L!=null&&L.label)||L.label===void 0||L!=null&&L.disabled?ni.disabled:""} ${(G?L.selected:(_e=Kt.current)!=null&&_e.id&&((Te=Kt.current)==null?void 0:Te.id)===L.id)?ni.selected:""}`,onClick:()=>{G?ft(L):Ke(L)},children:[A.jsxs("p",{children:[" ",L!=null&&L.customLabel?L.customLabel():(L==null?void 0:L.label)??"-"]}),k?A.jsx(A.Fragment,{children:L.selected?A.jsx(xI,{}):A.jsx(GL,{})}):(G?L.selected:((We=Kt.current)==null?void 0:We.id)&&((pt=Kt.current)==null?void 0:pt.id)===L.id)&&A.jsx("span",{className:ni.checkIcon,children:A.jsx(yI,{color:"#7F56D9",width:20,height:20})})]},L==null?void 0:L.id)})}),G&&z&&A.jsxs("div",{className:ni.dropdownListFooter,children:[b&&A.jsx("span",{onClick:Wt,children:"Clear All"}),T&&st===""&&A.jsx("span",{onClick:yr,children:"Select All"})]})]}),!G&&!h&&ie&&(it.current.length>0||Ie.length)>0&&A.jsx("div",{onClick:L=>mi(L),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:Q?Jr(Q):A.jsx(Tu,{width:16,height:16})}),U?Jr(U):A.jsx("div",{style:{display:"grid",placeItems:"center",transform:ge?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&A.jsx(Rh,{})})]}),a&&(a==null?void 0:a.visible)&&A.jsx("div",{className:`${ni.dropdownHelperText} ${a!=null&&a.error?ni.error:""}`,children:!ge&&A.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},KL="Tooltip-module__tooltipContainer",jL="Tooltip-module__tooltipContent",qL="Tooltip-module__top",YL="Tooltip-module__right",XL="Tooltip-module__bottom",ZL="Tooltip-module__left",QL="Tooltip-module__tooltipTitle",JL="Tooltip-module__tooltipText",eP="Tooltip-module__dark",Xn={tooltipContainer:KL,tooltipContent:jL,top:qL,right:YL,bottom:XL,left:ZL,tooltipTitle:QL,tooltipText:JL,dark:eP},h_=({children:e,tooltipSlot:t,delay:i,placement:n="top",trigger:r="hover",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",theme:c})=>{const h=de.useRef(null),f=de.useRef(null);let p;const[g,m]=de.useState(!1),y=()=>{r==="hover"&&(p=setTimeout(()=>{m(!0)},i||400))},b=()=>{r==="hover"&&(clearTimeout(p),setTimeout(()=>{m(!1)},i||400))},T=()=>{r==="click"&&m(z=>!z)},k=()=>{const z=h.current,V=f.current;if(!V||!z)return;const W=z.getBoundingClientRect();switch(V.style.position="fixed",n){case"top":V.style.top=`${W.top-V.offsetHeight-8}px`;break;case"bottom":V.style.top=`${W.bottom+8}px`;break;case"left":V.style.top=`${W.top+W.height/2-V.offsetHeight/2}px`,V.style.left=`${W.left-V.offsetWidth-8}px`;break;case"right":V.style.top=`${W.top+W.height/2-V.offsetHeight/2}px`,V.style.left=`${W.right+8}px`;break}},D=z=>{z.composedPath().includes(h.current)||m(!1)};return de.useEffect(()=>{k()},[h,g]),de.useEffect(()=>(document.addEventListener("click",D),()=>{document.removeEventListener("click",D)}),[]),de.useEffect(()=>{const z=f.current;z&&z.style.setProperty("--pointer-position",`${d}`)},[g]),A.jsxs("div",{ref:h,className:`${c==="dark"?Xn.dark:""} ${Xn.tooltipContainer}`,onClick:T,onMouseEnter:y,onMouseLeave:b,children:[e,g&&t?A.jsx("div",{style:s??{},onClick:z=>z.stopPropagation(),ref:f,className:`${Xn.tooltipContent} ${n?Xn[n]:Xn.bottom}`,children:t()}):g&&A.jsxs("div",{style:s??{},onClick:z=>z.stopPropagation(),ref:f,className:`${Xn.tooltipContent} ${n?Xn[n]:Xn.bottom}`,children:[a&&a.length>0&&A.jsx("h2",{className:Xn.tooltipTitle,style:l??{},children:a}),o&&o.length>0&&A.jsx("p",{className:Xn.tooltipText,style:u??{},children:o})]})]})},tP="Popup-module__modalOverlay",iP="Popup-module__popupDrawerMode",nP="Popup-module__popupContainer",rP="Popup-module__closeButton",aP="Popup-module__withOptions",oP="Popup-module__horizontal",sP="Popup-module__popupHeader",lP="Popup-module__popupTitle",uP="Popup-module__popupDescription",dP="Popup-module__typeIcon",cP="Popup-module__icon",hP="Popup-module__templateWrapper",fP="Popup-module__dark",un={modalOverlay:tP,popupDrawerMode:iP,popupContainer:nP,closeButton:rP,withOptions:aP,horizontal:oP,popupHeader:sP,popupTitle:lP,popupDescription:uP,typeIcon:dP,icon:cP,templateWrapper:hP,dark:fP},pP=e=>{const t=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];let i=0,n=parseInt(e,10)||0;for(;n>=1024&&++i;)n=n/1024;return n.toFixed(n<10&&i>0?1:0)+" "+t[i]},vP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),_P=e=>new Promise((t,i)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result.split(",")[1]),n.onerror=r=>i(r)});location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const SI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},gP=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:A.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),mP=()=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:A.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Ng=({width:e,color:t})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:A.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:t??"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Hg=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,closeButtonStyle:h,theme:f})=>{const p=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return A.jsx(Ng,{});case"unsaved":return A.jsx(mP,{});case"success":return A.jsx(gP,{})}},g=()=>{a&&typeof a=="function"&&a(!1)},m=de.useRef(null),y=b=>{b.target===m.current&&r&&typeof r=="function"&&r(!1)};return de.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[]),e&&A.jsx("div",{ref:m,style:s??{},className:`
|
|
39
39
|
${f==="dark"?un.dark:""}
|
|
40
40
|
${un.modalOverlay}
|
|
41
41
|
${i&&(i==null?void 0:i.mode)==="drawer"?un.popupDrawerMode:""}
|
|
@@ -1332,7 +1332,7 @@ const rB = ({ loadingColor: e }) => /* @__PURE__ */ A.jsxs(
|
|
|
1332
1332
|
}, He = () => {
|
|
1333
1333
|
if (j || j === 0) {
|
|
1334
1334
|
let L = V.filter((ve) => Number(ve.id) === Number(j));
|
|
1335
|
-
L && L[0] && (qt.current = L[0], J ? (X && typeof X == "function" && X(qt.current.label), Me(qt.current.label), ee &&
|
|
1335
|
+
L && L[0] && (qt.current = L[0], J ? (X && typeof X == "function" && X(qt.current.label), Me(qt.current.label), ee && se((ve) => !1), withDropdownSearch && DropdownSearchValue && SetDropdownSearchValue("")) : Ke(L[0]));
|
|
1336
1336
|
}
|
|
1337
1337
|
}, [ft, Yt] = We(!1), mt = (L) => {
|
|
1338
1338
|
let ve = ci.current.querySelector("ul"), $e = Math.abs(ve.scrollTop + ve.clientHeight - ve.scrollHeight) <= 2;
|