master-components-react 3.5.0 → 3.5.2
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?br.loading:""}
|
|
36
36
|
${n?br[n]:""}
|
|
37
37
|
${g&&p&&!c&&!r?br.active:""}
|
|
38
|
-
${r?br.disabled:""}`,onMouseDown:()=>y(!0),onMouseUp:()=>y(!1),onMouseLeave:()=>y(!1),onClick:()=>{!r&&i&&typeof i=="function"&&i()},children:T.jsxs("div",{className:br.buttonSlot,style:!r&&f?f:{},children:[u||o&&s?s:"",!u&&T.jsx(T.Fragment,{children:a?T.jsx("div",{style:{display:"grid",placeItems:"center"},children:T.jsx(rB,{})}):T.jsx("span",{style:!r&&h?h:{},className:br.buttonLabel,children:e??"Button"})}),o&&l?l:""]})})},gB="FormInput-module__inputWrapper",CB="FormInput-module__inputLabel",yB="FormInput-module__required",xB="FormInput-module__inputContainer",bB="FormInput-module__inputContent",SB="FormInput-module__inputTags",EB="FormInput-module__focused",wB="FormInput-module__error",IB="FormInput-module__rightIcon",TB="FormInput-module__leftIcon",AB="FormInput-module__inputDropDown",DB="FormInput-module__http",OB="FormInput-module__disabled",RB="FormInput-module__sm",kB="FormInput-module__md",BB="FormInput-module__withCopy",PB="FormInput-module__inputHelperText",LB="FormInput-module__dark",vi={inputWrapper:gB,inputLabel:CB,required:yB,inputContainer:xB,inputContent:bB,inputTags:SB,focused:EB,error:wB,rightIcon:IB,leftIcon:TB,inputDropDown:AB,http:DB,disabled:OB,sm:RB,md:kB,withCopy:BB,inputHelperText:PB,dark:LB},Ou=({width:e,height:t,color:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:T.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),FB=({width:e,height:t,color:i})=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[T.jsx("g",{clipPath:"url(#clip0_444_26)",children:T.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"})}),T.jsx("defs",{children:T.jsx("clipPath",{id:"clip0_444_26",children:T.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),Ru=e=>T.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:T.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"})}),MB="Checkbox-module__checkboxWrapper",VB="Checkbox-module__sm",NB="Checkbox-module__md",$B="Checkbox-module__checkMark",HB="Checkbox-module__checked",WB="Checkbox-module__disabled",zB="Checkbox-module__dark",qo={checkboxWrapper:MB,sm:VB,md:NB,checkMark:$B,checked:HB,disabled:WB,dark:zB},bI=({color:e,width:t,height:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:T.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),SI=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:T.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),ku=({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=ce.useRef(null),[c,h]=ce.useState(!1),f=()=>{i||t&&typeof t=="function"&&t(!e)},p=()=>c?!l||i?{boxShadow:"none",...o}:o??{}:s??{};return T.jsxs("div",{style:p(),className:` ${u==="dark"?qo.dark:""} ${qo.checkboxWrapper} ${qo[a]} ${e?qo.checked:qo.unChecked} ${i?qo.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[T.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?T.jsx(SI,{}):T.jsx(bI,{}):""]})},GB="Tag-module__tagContainer",UB="Tag-module__onlyLabel",KB="Tag-module__sm",jB="Tag-module__md",qB="Tag-module__lg",YB="Tag-module__tagLabel",XB="Tag-module__tagNumber",ZB="Tag-module__tagClose",JB="Tag-module__dark",$a={tagContainer:GB,onlyLabel:UB,sm:KB,md:jB,lg:qB,tagLabel:YB,tagNumber:XB,tagClose:ZB,dark:JB},Wm=({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:m})=>{const g=()=>!r&&!i&&!n&&!a,y=()=>i,b=()=>{d&&typeof d=="function"&&d(e??null)};return T.jsxs("div",{style:c??{},className:`${m==="dark"?$a.dark:""} ${$a.tagContainer} ${g()?$a.onlyLabel:""} ${$a[u??"md"]}`,children:[r&&T.jsx(ku,{...s}),i&&y(),t&&T.jsx("p",{style:h??{},className:$a.tagLabel,children:t??""}),a&&T.jsx("div",{style:f??{},className:$a.tagNumber,children:o??""}),n&&T.jsx("div",{style:p??{},className:$a.tagClose,onClick:b,children:T.jsx(Ru,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},Sc=({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:m,onRightIconIconMouseEnter:g,onRightIconIconMouseLeave:y,onLeftIconIconClick:b,onLeftIconIconMouseEnter:A,onLeftIconIconMouseLeave:k,onPressEnter:D,rightIcon:K,leftIcon:H,fixedDropdown:W=!0,withDropDown:G,dropdownData:q,dropDownPosition:ee="left",onSelectData:$,withTags:Y,tagProps:x,withLink:z,withCopy:te,onCopy:Q,inputWrapperStyle:_e,inputLabelStyle:ue,requiredStyle:Z,inputContainerStyle:V,leftIconStyle:C,inputDropDownStyle:w,ulStyle:S,liStyle:B,httpStyle:F,inputStyle:U,rightIconStyle:N,withCopyStyle:J,inputHelperTextStyle:de,theme:he="light"})=>{const[ie,Te]=ce.useState(!1),I=ce.useRef(null),[ne,oe]=ce.useState(!1),[L,P]=ce.useState(!1),X=ce.useRef(null),ve=ce.useRef(null),ge=ce.useRef(null),[le,we]=ce.useState(!1),[ke,Ae]=ce.useState(1),Ne=je=>{let ct=je.target.value;ct.length===1&&(ct=ct.trim()),s&&typeof s=="function"&&s(f?ct.replace(/\d/g,""):ct)},at=()=>{oe(!0),l&&typeof l=="function"&&l()},qe=()=>{oe(!1),u&&typeof u=="function"&&u()},it=je=>{const ct=je.target.value,Ci=ct.length===0;a==="number"&&(je.keyCode===69||!Ci&&(je.keyCode===187||je.keyCode===107||je.keyCode===189||je.keyCode===109))&&je.preventDefault(),je.key==="Enter"&&ct&&ct.length>0&&D&&typeof D=="function"&&D(ct)},ii=()=>{Q&&typeof Q=="function"&&Q(e)},jt=je=>je,Ht=()=>{let je={};return te&&(je.borderTopRightRadius=0,je.borderBottomRightRadius=0,je.borderRight=0),G&&(ee==="right"?je.flexDirection="row-reverse":G&&(je.paddingLeft=0)),{...je,...V??{}}},vt=je=>{!je.composedPath().includes(ve.current)&&je.composedPath().includes(X.current)||we(!1)},Vi=je=>{Ae(je.id),we(!1),$&&typeof $=="function"&&$(je)},Mt=()=>{const je=ge.current,ct=ve.current;if(!ct||!je)return;const Ci=je.getBoundingClientRect(),Pi=window.innerHeight,We=80;W&&(ct.style.position="fixed",ct.style.width=We+"px",ee==="right"?ct.style.left=`${Ci.right-We/2}px`:ct.style.left=`${Ci.left+We/2}px`,Ci.bottom+ct.offsetHeight>Pi?(ct.style.top=`${window.scrollY+Ci.top-ct.offsetHeight}px`,ct.style.bottom="unset"):(ct.style.top=`${window.scrollY+Ci.bottom}px`,ct.style.bottom="unset"))};ce.useEffect(()=>{Mt()},[ve,le]),ce.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),ce.useEffect(()=>(document.addEventListener("click",vt),()=>{document.removeEventListener("click",vt)}),[]);const di=ce.useRef(!1);return ce.useEffect(()=>{di.current?setTimeout(()=>{Te(je=>!je)},0):di.current=!0},[]),T.jsxs("div",{className:`${he==="dark"?vi.dark:""} ${vi.inputWrapper}`,style:_e??{},children:[t&&T.jsxs("label",{className:vi.inputLabel,style:ue??{},children:[t," ",T.jsx("span",{className:vi.required,style:Z??{},children:n&&"*"})]}),T.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[T.jsxs("div",{style:Ht(),ref:ge,className:`${vi.inputContainer} ${ne&&!c?vi.focused:""} ${r?vi.disabled:""} ${d!=null&&d.error?vi.error:""} ${vi[o??"sm"]}`,children:[!G&&!z&&H&&T.jsx("div",{className:vi.leftIcon,style:C??{},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{A&&typeof A=="function"&&A()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:jt(H)}),!z&&G&&T.jsxs("div",{className:vi.inputDropDown,style:w??{},onClick:()=>(we(!0),Mt()),ref:X,children:[q.find(je=>je.id===ke).label,le&&T.jsx("ul",{ref:ve,style:S??{},children:q&&q.length&&q.map((je,ct)=>T.jsx("li",{style:B??{},onClick:()=>Vi(je),children:(je==null?void 0:je.label)??"-"},je.id))}),T.jsx(Ou,{})]}),z&&T.jsx("div",{className:`${vi.inputDropDown} ${vi.http}`,style:F??{},onClick:()=>we(!0),ref:X,children:"http://"}),T.jsxs("div",{className:vi.inputContent,children:[Y&&p&&p.length>0&&T.jsx("div",{className:vi.inputTags,children:p.map((je,ct)=>T.jsx("div",{className:vi.inputSingleTags,children:T.jsx(Wm,{...x,id:je,label:je,withClose:!0})},ct))}),T.jsx("input",{ref:I,style:U??{},type:a??"text",value:e,onChange:je=>Ne(je),onFocus:at,onBlur:qe,disabled:r,required:n,onKeyDown:it,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),K&&T.jsx("div",{className:vi.rightIcon,style:N??{},onClick:()=>{m&&typeof m=="function"&&m()},onMouseEnter:()=>{g&&typeof g=="function"&&g()},onMouseLeave:()=>{y&&typeof y=="function"&&y()},children:jt(K)})]}),te&&T.jsxs("div",{style:J??{},onClick:ii,className:vi.withCopy,children:[T.jsx(FB,{}),T.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&T.jsx("div",{style:de??{},className:`${vi.inputHelperText} ${d!=null&&d.error?vi.error:""}`,children:T.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},QB="Textarea-module__textareaContainer",eP="Textarea-module__textAreaLabel",tP="Textarea-module__required",iP="Textarea-module__wrap",nP="Textarea-module__textarea",rP="Textarea-module__focused",aP="Textarea-module__disabled",oP="Textarea-module__error",sP="Textarea-module__helperTextStyle",lP="Textarea-module__dark",ln={textareaContainer:QB,textAreaLabel:eP,required:tP,wrap:iP,textarea:nP,focused:rP,disabled:aP,error:oP,helperTextStyle:sP,dark:lP},uP=({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:m,textareaHelperTextStyle:g,labelIcon:y,theme:b})=>{const[A,k]=ce.useState(!1),D=G=>{let q=G.target.value;s&&typeof s=="function"&&s(q)},K=G=>G,H=()=>{k(!0),l&&typeof l=="function"&&l()},W=()=>{k(!1),u&&typeof u=="function"&&u()};return T.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&&T.jsxs("div",{style:f,className:ln.textAreaLabel,children:[T.jsx("p",{children:t}),T.jsx("span",{style:p??{},className:ln.required,children:c&&"*"}),y&&K(y)]}),T.jsx("div",{className:ln.wrap,children:T.jsx("textarea",{style:m??{},className:`${ln.textarea} ${A?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:H,disabled:d,onBlur:W,onChange:D})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&T.jsx("div",{style:g??{},className:`${ln.helperTextStyle} ${i!=null&&i.error?ln.error:""}`,children:T.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},dP="Toggle-module__toggleWrapper",cP="Toggle-module__toggleState",hP="Toggle-module__checked",fP="Toggle-module__disabled",pP="Toggle-module__dark",al={toggleWrapper:dP,toggleState:cP,checked:hP,disabled:fP,dark:pP},vP=({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]=ce.useState(!1),m=()=>{!i&&t&&typeof t=="function"&&t(!e)},g=()=>{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 T.jsx("div",{style:g(),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onMouseLeave:()=>p(!1),onClick:m,className:`${h==="dark"?al.dark:""} ${al.toggleWrapper} ${e?al.checked:""} ${i?al.disabled:""}`,children:T.jsx("div",{style:y(),className:al.toggleState,children:T.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},_P="Radio-module__radioWrapper",mP="Radio-module__sm",gP="Radio-module__md",CP="Radio-module__checked",yP="Radio-module__innerCircle",xP="Radio-module__radioState",bP="Radio-module__disabled",SP="Radio-module__dark",ea={radioWrapper:_P,sm:mP,md:gP,checked:CP,innerCircle:yP,radioState:xP,disabled:bP,dark:SP},EI=({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]=ce.useState(!1),h=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return T.jsxs("div",{className:`${u==="dark"?ea.dark:""} ${ea.radioWrapper} ${ea[a]??ea.md} ${e?ea.checked:""} ${i?ea.disabled:""}`,style:o??{},onClick:h,children:[T.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),T.jsx("div",{style:s??{},className:ea.radioState,children:T.jsx("div",{style:l??{},className:ea.innerCircle})})]})},EP="Dropdown-module__dropdownWrapper",wP="Dropdown-module__placeHolder",IP="Dropdown-module__dropdownLabel",TP="Dropdown-module__required",AP="Dropdown-module__dropdownContainer",DP="Dropdown-module__sm",OP="Dropdown-module__md",RP="Dropdown-module__selectedTags",kP="Dropdown-module__selectedList",BP="Dropdown-module__additional",PP="Dropdown-module__dropdownListContainer",LP="Dropdown-module__dropdownList",FP="Dropdown-module__hidden",MP="Dropdown-module__visible",VP="Dropdown-module__checkIcon",NP="Dropdown-module__disabled",$P="Dropdown-module__selected",HP="Dropdown-module__dropdownListFooter",WP="Dropdown-module__focused",zP="Dropdown-module__error",GP="Dropdown-module__dropdownHelperText",UP="Dropdown-module__dark",ri={dropdownWrapper:EP,placeHolder:wP,dropdownLabel:IP,required:TP,dropdownContainer:AP,sm:DP,md:OP,selectedTags:RP,selectedList:kP,additional:BP,dropdownListContainer:PP,dropdownList:LP,hidden:FP,visible:MP,checkIcon:VP,disabled:NP,selected:$P,dropdownListFooter:HP,focused:WP,error:zP,dropdownHelperText:GP,dark:UP},KP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:T.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"})}),jP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:T.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"})}),v_=({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:m,onFocus:g,onBlur:y,withClearAll:b=!0,withSelectAll:A=!0,withPlus:k=!1,searchComponent:D=!1,withFooter:K=!0,data:H,onSelect:W,selectedOptionID:G,withFilter:q=!0,withClose:ee=!0,fixedDropdown:$=!1,onSearch:Y,pagination:x,withMultiSelect:z=!1,skipSelected:te,closeOnSelect:Q=!0,labelIcon:_e,closeIcon:ue,dropdownIcon:Z,iconDown:V,onLabelIconClick:C,onLabelIconMouseEnter:w,onLabelIconMouseLeave:S,dropdownWrapperStyle:B,dropdownLabelStyle:F,requiredStyle:U,labelIconStyle:N,dropdownContainerStyle:J,placeHolderStyle:de,selectedTagsStyle:he,selectedListStyle:ie,additionalStyle:Te,additionalSpanStyle:I,dropdownListStyle:ne,listStyle:oe,treeProps:L,theme:P="light"})=>{const[X,ve]=ce.useState(!1),[ge,le]=ce.useState(!1),[we,ke]=ce.useState([]),[Ae,Ne]=ce.useState(""),[at,qe]=ce.useState(""),it=ce.useRef([]),ii=ce.useRef(null),jt=ce.useRef(null),Ht=ce.useRef({}),vt=ce.useRef([]),Vi=(xe,ae)=>{const j=new Set;return xe.filter(be=>j.has(be[ae])?!1:(j.add(be[ae]),!0))},Mt=xe=>{var ae;Ht.current=xe,Ne((ae=Ht.current)==null?void 0:ae.label),W&&typeof W=="function"&&W(Ht.current),le(!1)},di=xe=>{it.current=[...it.current,...H.filter(ae=>ae.selected==!0),...H.filter(ae=>ae.id===xe.id)],xe.selected=!xe.selected,it.current=Vi(it.current,"id").filter(ae=>ae.selected),W&&typeof W=="function"&&W(it.current),D||Ne(it.current.map(ae=>ae.label).join(", ")),ve(ae=>!ae)},je=xe=>{xe.stopPropagation(),z||h?c&&(qe(""),vt.current=H,ve(ae=>!ae)):(it.current=[],G=null,H&&H.length>0&&H.forEach(ae=>ae.selected=!1),ct(""),Ht.current={},W({}),Ne("")),Y&&typeof Y=="function"&&Y("")},ct=xe=>{if(Y&&typeof Y=="function"&&Y(xe),z&&c){let ae=H,j=ae.filter(be=>{var Pe;return(Pe=be==null?void 0:be.label)==null?void 0:Pe.toLowerCase().includes((xe==null?void 0:xe.toLowerCase())||"")});vt.current=(xe==null?void 0:xe.length)>0?j:ae,qe(xe),ve(be=>!be)}else qe(xe),Ne(xe)},Ci=()=>{if(G||G===0){let xe=H.filter(ae=>Number(ae.id)===Number(G));xe&&xe[0]&&(Ht.current=xe[0],te?(Y&&typeof Y=="function"&&Y(Ht.current.label),Ne(Ht.current.label),Q&&le(ae=>!1)):Mt(xe[0]))}},[Pi,We]=ce.useState(!1),ht=xe=>{let ae=ii.current.querySelector("ul"),be=Math.abs(ae.scrollTop+ae.clientHeight-ae.scrollHeight)<=2;x&&be&&!Pi&&(d&&typeof d=="function"&&d(!0),We(!0)),be||We(!1)},Zt=()=>{H.forEach(xe=>{xe.selected=!1}),it.current=[],W([]),Ne(""),l&&typeof l=="function"&&l(),ve(xe=>!xe)},_t=()=>{H.forEach(xe=>{xe!=null&&xe.id&&(xe==null?void 0:xe.id)!==null&&(xe!=null&&xe.label)&&(xe==null?void 0:xe.label)!==""&&(xe==null?void 0:xe.label)!=="-"&&!xe.disabled&&(xe.selected=!0)}),it.current=H,it.current=Vi(it.current,"id").filter(xe=>xe.selected),Ne(it.current.map(xe=>xe.label).join(", ")),u&&typeof u=="function"&&u(),W(it.current),ve(xe=>!xe)},Wt=ce.useRef(!0);ce.useEffect(()=>{if(Wt.current){Wt.current=!1;return}ge||y&&typeof y=="function"&&y()},[ge]);const yr=()=>{g&&typeof g=="function"&&g()},xr=xe=>xe,zo=xe=>{let ae=!0,j=Ae;return q&&xe&&!xe.toLowerCase().split(" ").join("").trim().includes(j.toLowerCase().split(" ").join("").trim())&&j.trim()!==""&&(ae=!1),at.length>0&&xe==="-"?"hidden":ae?"visible":"hidden"},Go=xe=>{xe.composedPath().includes(ii.current)||le(!1)},Uo=xe=>{if($){if(xe.composedPath().includes(ii.current))return;le(!1)}},Ma=()=>{const xe=ii.current,ae=jt.current;if(!ae||!xe)return;const j=xe.getBoundingClientRect(),be=window.innerHeight;$?(ae.style.position="fixed",ae.style.width=j.width+"px",ae.style.left=`${j.left+window.pageXOffset}px`,j.bottom+ae.offsetHeight>be?(ae.style.top=`${window.scrollY+j.top-ae.offsetHeight-8}px`,ae.style.bottom="unset"):(ae.style.top=`${window.scrollY+j.bottom}px`,ae.style.bottom="unset")):j.bottom>be?(ae.style.top="unset",ae.style.bottom="calc(100% + 8px)"):(ae.style.bottom="unset",ae.style.top="calc(100% + 8px)")},Ko=xe=>{it.current=xe,W&&typeof W=="function"&&W(xe)},il=(xe,ae)=>{m&&typeof m=="function"&&m(xe,ae)},Va=ce.useRef(null);return ce.useEffect(()=>{ge&&Va.current&&Va.current.focus()},[ge]),ce.useEffect(()=>{z&&(it.current=H.filter(xe=>xe.selected),Ne(H.filter(xe=>xe.selected).map(xe=>xe.label).join(", ")))},[]),ce.useEffect(()=>{D&&s&&s.length>0&&qe(s),vt.current=H},[]),ce.useEffect(()=>{Ma()},[jt,ge]),ce.useEffect(()=>{z||Ci()},[G]),ce.useEffect(()=>(document.addEventListener("click",Go),document.addEventListener("wheel",Uo),()=>{document.removeEventListener("click",Go),document.removeEventListener("wheel",Uo)}),[]),T.jsxs("div",{className:`${P==="dark"?ri.dark:""} ${ri.dropdownWrapper}`,style:B??{},children:[e&&T.jsxs("label",{className:ri.dropdownLabel,style:F??{},children:[e," ",T.jsx("span",{className:ri.required,style:U??{},children:i&&"*"}),T.jsxs("span",{style:{...N??{},display:"grid",placeItems:"center"},onClick:()=>{C&&typeof C=="function"&&C()},onMouseEnter:()=>{w&&typeof w=="function"&&w()},onMouseLeave:()=>{S&&typeof S=="function"&&S()},children:[" ",xr(_e)]})]}),T.jsxs("div",{onFocus:yr,ref:ii,onClick:()=>(le(xe=>!xe),Ma()),className:`${ri.dropdownContainer} ${ge&&!o?ri.focused:""} ${t?ri.disabled:""} ${a!=null&&a.error?ri.error:""} ${ri[n]}`,style:J??{},children:[D?T.jsxs("div",{children:[" ",T.jsx(jP,{})]}):T.jsx(T.Fragment,{children:Z&&T.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:xr(Z)})}),!D&&(h||z)&&r&&!ge&&it.current.length===0&&T.jsx("span",{className:ri.placeHolder,style:de??{},children:r??""}),(z||h)&&T.jsx("div",{className:ri.selectedTags,style:he??{},children:!D&&!ge?T.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[it.current.slice(0,3).map((xe,ae)=>{let j=it.current[it.current.length-1];return T.jsxs("span",{className:ri.selectedList,style:ie??{},children:[!k&&xe.label,!k&&xe.id!==j.id&&ae!==2?",":""," "]},xe==null?void 0:xe.id)}),!k&&it.current.length>3&&T.jsxs("div",{className:ri.additional,style:Te??{},children:[" ",T.jsxs("span",{style:I??{},children:["+(",it.current.length-3,")"]})]})]}):T.jsx("input",{ref:Va,onClick:xe=>(xe.stopPropagation(),le(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:at}:{},onChange:xe=>ct(xe.target.value)},G)}),T.jsx("input",{autoCorrect:"off",hidden:z||h,placeholder:r,readOnly:!q||!ge||z||h,type:"text",value:(z||h)&&!D&&ge?"":Ae,onChange:xe=>ct(xe.target.value)},G),H&&H.length>0&&ge&&T.jsxs("div",{ref:jt,onClick:xe=>xe.stopPropagation(),className:ri.dropdownListContainer,children:[h?T.jsx(Jk,{SearchValue:at,expandedNodes:we,setExpandedNodes:ke,checkboxProps:p,onSelect:Ko,withClearAll:b,withSelectAll:A,SelectedData:it.current,fromDropdown:!0,onCollapse:il,defaultCollapsed:f,data:H,theme:P,treeProps:L}):T.jsx("ul",{onScroll:xe=>ht(),onClick:xe=>xe.stopPropagation(),className:ri.dropdownList,style:ne??{},children:(z&&q?vt.current:H).map(xe=>{var ae,j,be,Pe;return T.jsxs("li",{style:oe??{},className:`${!z&&c?ri[zo((xe==null?void 0:xe.label)??"-")]:""} ${!(xe!=null&&xe.label)||xe.label===void 0||xe!=null&&xe.disabled?ri.disabled:""} ${(z?xe.selected:(ae=Ht.current)!=null&&ae.id&&((j=Ht.current)==null?void 0:j.id)===xe.id)?ri.selected:""}`,onClick:()=>{z?di(xe):Mt(xe)},children:[T.jsxs("p",{children:[" ",xe!=null&&xe.customLabel?xe.customLabel():(xe==null?void 0:xe.label)??"-"]}),k?T.jsx(T.Fragment,{children:xe.selected?T.jsx(SI,{}):T.jsx(KP,{})}):(z?xe.selected:((be=Ht.current)==null?void 0:be.id)&&((Pe=Ht.current)==null?void 0:Pe.id)===xe.id)&&T.jsx("span",{className:ri.checkIcon,children:T.jsx(bI,{color:"#7F56D9",width:20,height:20})})]},xe==null?void 0:xe.id)})}),z&&K&&T.jsxs("div",{className:ri.dropdownListFooter,children:[b&&T.jsx("span",{onClick:Zt,children:"Clear All"}),A&&at===""&&T.jsx("span",{onClick:_t,children:"Select All"})]})]}),ee&&(!c&&Ae.length>0||at.length>0)&&T.jsx("div",{onClick:xe=>je(xe),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:ue?xr(ue):T.jsx(Ru,{width:16,height:16})}),V?xr(V):T.jsx("div",{style:{display:"grid",placeItems:"center",transform:ge?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&T.jsx(Ou,{})})]}),a&&(a==null?void 0:a.visible)&&T.jsx("div",{className:`${ri.dropdownHelperText} ${a!=null&&a.error?ri.error:""}`,children:!ge&&T.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},qP="Tooltip-module__tooltipContainer",YP="Tooltip-module__tooltipContent",XP="Tooltip-module__withoutPointer",ZP="Tooltip-module__top",JP="Tooltip-module__right",QP="Tooltip-module__bottom",eL="Tooltip-module__left",tL="Tooltip-module__tooltipTitle",iL="Tooltip-module__tooltipText",nL="Tooltip-module__dark",Nn={tooltipContainer:qP,tooltipContent:YP,withoutPointer:XP,top:ZP,right:JP,bottom:QP,left:eL,tooltipTitle:tL,tooltipText:iL,dark:nL},__=({children:e,tooltipSlot:t,delay:i=400,placement:n="top",trigger:r="hover",title:a,text:o,customText:s,tooltipContentStyle:l,tooltipTitlestyle:u,tooltipTextStyle:d,pointerPosition:c="10%",withPointer:h=!0,theme:f})=>{const p=ce.useRef(null),m=ce.useRef(null);let g;const[y,b]=ce.useState(!1),A=()=>{r==="hover"&&(g=setTimeout(()=>{b(!0)},i))},k=()=>{r==="hover"&&(clearTimeout(g),setTimeout(()=>{b(!1)},i))},D=()=>{r==="click"&&b(G=>!G)},K=()=>{const G=p.current,q=m.current;if(!q||!G)return;const ee=G.getBoundingClientRect();switch(q.style.position="fixed",n){case"top":q.style.top=`${ee.top-q.offsetHeight-8}px`;break;case"bottom":q.style.top=`${ee.bottom+8}px`;break;case"left":q.style.top=`${ee.top+ee.height/2-q.offsetHeight/2}px`,q.style.left=`${ee.left-q.offsetWidth-8}px`;break;case"right":q.style.top=`${ee.top+ee.height/2-q.offsetHeight/2}px`,q.style.left=`${ee.right+8}px`;break}},H=G=>{G.composedPath().includes(p.current)||b(!1)},W=()=>{b(!1)};return ce.useEffect(()=>{K()},[p,y]),ce.useEffect(()=>(document.addEventListener("click",H),window.addEventListener("scroll",W,!0),()=>{window.removeEventListener("scroll",handleScroll,!0),document.removeEventListener("click",H)}),[]),ce.useEffect(()=>{const G=m.current;G&&(G.style.setProperty("--pointer-position",`${c}`),h||G.classList.add(Nn.withoutPointer))},[y]),T.jsxs("div",{ref:p,className:`${f==="dark"?Nn.dark:""} ${Nn.tooltipContainer}`,onClick:D,onMouseEnter:A,onMouseLeave:k,children:[e,y&&t?T.jsx("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:t()}):y&&T.jsxs("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:[s&&typeof s=="function"&&s(),a&&a.length>0&&T.jsx("h2",{className:Nn.tooltipTitle,style:u??{},children:a}),o&&o.length>0&&T.jsx("p",{className:Nn.tooltipText,style:d??{},children:o})]})]})},rL="Popup-module__modalOverlay",aL="Popup-module__popupDrawerMode",oL="Popup-module__popupContainer",sL="Popup-module__closeButton",lL="Popup-module__withOptions",uL="Popup-module__horizontal",dL="Popup-module__popupHeader",cL="Popup-module__popupTitle",hL="Popup-module__popupDescription",fL="Popup-module__typeIcon",pL="Popup-module__icon",vL="Popup-module__templateWrapper",_L="Popup-module__dark",un={modalOverlay:rL,popupDrawerMode:aL,popupContainer:oL,closeButton:sL,withOptions:lL,horizontal:uL,popupHeader:dL,popupTitle:cL,popupDescription:hL,typeIcon:fL,icon:pL,templateWrapper:vL,dark:_L},mL=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]},gL=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),CL=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 wI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},yL=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.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"})}),xL=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.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"})}),zm=({width:e,color:t})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:T.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"})}),Gm=({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 T.jsx(zm,{});case"unsaved":return T.jsx(xL,{});case"success":return T.jsx(yL,{})}},m=()=>{a&&typeof a=="function"&&a(!1)},g=ce.useRef(null),y=b=>{b.target===g.current&&r&&typeof r=="function"&&r(!1)};return ce.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[]),e&&T.jsx("div",{ref:g,style:s??{},className:`
|
|
38
|
+
${r?br.disabled:""}`,onMouseDown:()=>y(!0),onMouseUp:()=>y(!1),onMouseLeave:()=>y(!1),onClick:()=>{!r&&i&&typeof i=="function"&&i()},children:T.jsxs("div",{className:br.buttonSlot,style:!r&&f?f:{},children:[u||o&&s?s:"",!u&&T.jsx(T.Fragment,{children:a?T.jsx("div",{style:{display:"grid",placeItems:"center"},children:T.jsx(rB,{})}):T.jsx("span",{style:!r&&h?h:{},className:br.buttonLabel,children:e??"Button"})}),o&&l?l:""]})})},gB="FormInput-module__inputWrapper",CB="FormInput-module__inputLabel",yB="FormInput-module__required",xB="FormInput-module__inputContainer",bB="FormInput-module__inputContent",SB="FormInput-module__inputTags",EB="FormInput-module__focused",wB="FormInput-module__error",IB="FormInput-module__rightIcon",TB="FormInput-module__leftIcon",AB="FormInput-module__inputDropDown",DB="FormInput-module__http",OB="FormInput-module__disabled",RB="FormInput-module__sm",kB="FormInput-module__md",BB="FormInput-module__withCopy",PB="FormInput-module__inputHelperText",LB="FormInput-module__dark",vi={inputWrapper:gB,inputLabel:CB,required:yB,inputContainer:xB,inputContent:bB,inputTags:SB,focused:EB,error:wB,rightIcon:IB,leftIcon:TB,inputDropDown:AB,http:DB,disabled:OB,sm:RB,md:kB,withCopy:BB,inputHelperText:PB,dark:LB},Ou=({width:e,height:t,color:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:T.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),FB=({width:e,height:t,color:i})=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[T.jsx("g",{clipPath:"url(#clip0_444_26)",children:T.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"})}),T.jsx("defs",{children:T.jsx("clipPath",{id:"clip0_444_26",children:T.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),Ru=e=>T.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:T.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"})}),MB="Checkbox-module__checkboxWrapper",VB="Checkbox-module__sm",NB="Checkbox-module__md",$B="Checkbox-module__checkMark",HB="Checkbox-module__checked",WB="Checkbox-module__disabled",zB="Checkbox-module__dark",qo={checkboxWrapper:MB,sm:VB,md:NB,checkMark:$B,checked:HB,disabled:WB,dark:zB},bI=({color:e,width:t,height:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:T.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),SI=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:T.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),ku=({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=ce.useRef(null),[c,h]=ce.useState(!1),f=()=>{i||t&&typeof t=="function"&&t(!e)},p=()=>c?!l||i?{boxShadow:"none",...o}:o??{}:s??{};return T.jsxs("div",{style:p(),className:` ${u==="dark"?qo.dark:""} ${qo.checkboxWrapper} ${qo[a]} ${e?qo.checked:qo.unChecked} ${i?qo.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[T.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?T.jsx(SI,{}):T.jsx(bI,{}):""]})},GB="Tag-module__tagContainer",UB="Tag-module__onlyLabel",KB="Tag-module__sm",jB="Tag-module__md",qB="Tag-module__lg",YB="Tag-module__tagLabel",XB="Tag-module__tagNumber",ZB="Tag-module__tagClose",JB="Tag-module__dark",$a={tagContainer:GB,onlyLabel:UB,sm:KB,md:jB,lg:qB,tagLabel:YB,tagNumber:XB,tagClose:ZB,dark:JB},Wm=({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:m})=>{const g=()=>!r&&!i&&!n&&!a,y=()=>i,b=()=>{d&&typeof d=="function"&&d(e??null)};return T.jsxs("div",{style:c??{},className:`${m==="dark"?$a.dark:""} ${$a.tagContainer} ${g()?$a.onlyLabel:""} ${$a[u??"md"]}`,children:[r&&T.jsx(ku,{...s}),i&&y(),t&&T.jsx("p",{style:h??{},className:$a.tagLabel,children:t??""}),a&&T.jsx("div",{style:f??{},className:$a.tagNumber,children:o??""}),n&&T.jsx("div",{style:p??{},className:$a.tagClose,onClick:b,children:T.jsx(Ru,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},Sc=({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:m,onRightIconIconMouseEnter:g,onRightIconIconMouseLeave:y,onLeftIconIconClick:b,onLeftIconIconMouseEnter:A,onLeftIconIconMouseLeave:k,onPressEnter:D,rightIcon:K,leftIcon:H,fixedDropdown:W=!0,withDropDown:G,dropdownData:q,dropDownPosition:ee="left",onSelectData:$,withTags:Y,tagProps:x,withLink:z,withCopy:te,onCopy:Q,inputWrapperStyle:_e,inputLabelStyle:ue,requiredStyle:Z,inputContainerStyle:V,leftIconStyle:C,inputDropDownStyle:w,ulStyle:S,liStyle:B,httpStyle:F,inputStyle:U,rightIconStyle:N,withCopyStyle:J,inputHelperTextStyle:de,theme:he="light"})=>{const[ie,Te]=ce.useState(!1),I=ce.useRef(null),[ne,oe]=ce.useState(!1),[L,P]=ce.useState(!1),X=ce.useRef(null),ve=ce.useRef(null),ge=ce.useRef(null),[le,we]=ce.useState(!1),[ke,Ae]=ce.useState(1),Ne=je=>{let ct=je.target.value;ct.length===1&&(ct=ct.trim()),s&&typeof s=="function"&&s(f?ct.replace(/\d/g,""):ct)},at=()=>{oe(!0),l&&typeof l=="function"&&l()},qe=()=>{oe(!1),u&&typeof u=="function"&&u()},it=je=>{const ct=je.target.value,Ci=ct.length===0;a==="number"&&(je.keyCode===69||!Ci&&(je.keyCode===187||je.keyCode===107||je.keyCode===189||je.keyCode===109))&&je.preventDefault(),je.key==="Enter"&&ct&&ct.length>0&&D&&typeof D=="function"&&D(ct)},ii=()=>{Q&&typeof Q=="function"&&Q(e)},jt=je=>je,Ht=()=>{let je={};return te&&(je.borderTopRightRadius=0,je.borderBottomRightRadius=0,je.borderRight=0),G&&(ee==="right"?je.flexDirection="row-reverse":G&&(je.paddingLeft=0)),{...je,...V??{}}},vt=je=>{!je.composedPath().includes(ve.current)&&je.composedPath().includes(X.current)||we(!1)},Vi=je=>{Ae(je.id),we(!1),$&&typeof $=="function"&&$(je)},Mt=()=>{const je=ge.current,ct=ve.current;if(!ct||!je)return;const Ci=je.getBoundingClientRect(),Pi=window.innerHeight,We=80;W&&(ct.style.position="fixed",ct.style.width=We+"px",ee==="right"?ct.style.left=`${Ci.right-We/2}px`:ct.style.left=`${Ci.left+We/2}px`,Ci.bottom+ct.offsetHeight>Pi?(ct.style.top=`${window.scrollY+Ci.top-ct.offsetHeight}px`,ct.style.bottom="unset"):(ct.style.top=`${window.scrollY+Ci.bottom}px`,ct.style.bottom="unset"))};ce.useEffect(()=>{Mt()},[ve,le]),ce.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),ce.useEffect(()=>(document.addEventListener("click",vt),()=>{document.removeEventListener("click",vt)}),[]);const di=ce.useRef(!1);return ce.useEffect(()=>{di.current?setTimeout(()=>{Te(je=>!je)},0):di.current=!0},[]),T.jsxs("div",{className:`${he==="dark"?vi.dark:""} ${vi.inputWrapper}`,style:_e??{},children:[t&&T.jsxs("label",{className:vi.inputLabel,style:ue??{},children:[t," ",T.jsx("span",{className:vi.required,style:Z??{},children:n&&"*"})]}),T.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[T.jsxs("div",{style:Ht(),ref:ge,className:`${vi.inputContainer} ${ne&&!c?vi.focused:""} ${r?vi.disabled:""} ${d!=null&&d.error?vi.error:""} ${vi[o??"sm"]}`,children:[!G&&!z&&H&&T.jsx("div",{className:vi.leftIcon,style:C??{},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{A&&typeof A=="function"&&A()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:jt(H)}),!z&&G&&T.jsxs("div",{className:vi.inputDropDown,style:w??{},onClick:()=>(we(!0),Mt()),ref:X,children:[q.find(je=>je.id===ke).label,le&&T.jsx("ul",{ref:ve,style:S??{},children:q&&q.length&&q.map((je,ct)=>T.jsx("li",{style:B??{},onClick:()=>Vi(je),children:(je==null?void 0:je.label)??"-"},je.id))}),T.jsx(Ou,{})]}),z&&T.jsx("div",{className:`${vi.inputDropDown} ${vi.http}`,style:F??{},onClick:()=>we(!0),ref:X,children:"http://"}),T.jsxs("div",{className:vi.inputContent,children:[Y&&p&&p.length>0&&T.jsx("div",{className:vi.inputTags,children:p.map((je,ct)=>T.jsx("div",{className:vi.inputSingleTags,children:T.jsx(Wm,{...x,id:je,label:je,withClose:!0})},ct))}),T.jsx("input",{ref:I,style:U??{},type:a??"text",value:e,onChange:je=>Ne(je),onFocus:at,onBlur:qe,disabled:r,required:n,onKeyDown:it,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),K&&T.jsx("div",{className:vi.rightIcon,style:N??{},onClick:()=>{m&&typeof m=="function"&&m()},onMouseEnter:()=>{g&&typeof g=="function"&&g()},onMouseLeave:()=>{y&&typeof y=="function"&&y()},children:jt(K)})]}),te&&T.jsxs("div",{style:J??{},onClick:ii,className:vi.withCopy,children:[T.jsx(FB,{}),T.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&T.jsx("div",{style:de??{},className:`${vi.inputHelperText} ${d!=null&&d.error?vi.error:""}`,children:T.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},QB="Textarea-module__textareaContainer",eP="Textarea-module__textAreaLabel",tP="Textarea-module__required",iP="Textarea-module__wrap",nP="Textarea-module__textarea",rP="Textarea-module__focused",aP="Textarea-module__disabled",oP="Textarea-module__error",sP="Textarea-module__helperTextStyle",lP="Textarea-module__dark",ln={textareaContainer:QB,textAreaLabel:eP,required:tP,wrap:iP,textarea:nP,focused:rP,disabled:aP,error:oP,helperTextStyle:sP,dark:lP},uP=({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:m,textareaHelperTextStyle:g,labelIcon:y,theme:b})=>{const[A,k]=ce.useState(!1),D=G=>{let q=G.target.value;s&&typeof s=="function"&&s(q)},K=G=>G,H=()=>{k(!0),l&&typeof l=="function"&&l()},W=()=>{k(!1),u&&typeof u=="function"&&u()};return T.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&&T.jsxs("div",{style:f,className:ln.textAreaLabel,children:[T.jsx("p",{children:t}),T.jsx("span",{style:p??{},className:ln.required,children:c&&"*"}),y&&K(y)]}),T.jsx("div",{className:ln.wrap,children:T.jsx("textarea",{style:m??{},className:`${ln.textarea} ${A?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:H,disabled:d,onBlur:W,onChange:D})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&T.jsx("div",{style:g??{},className:`${ln.helperTextStyle} ${i!=null&&i.error?ln.error:""}`,children:T.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},dP="Toggle-module__toggleWrapper",cP="Toggle-module__toggleState",hP="Toggle-module__checked",fP="Toggle-module__disabled",pP="Toggle-module__dark",al={toggleWrapper:dP,toggleState:cP,checked:hP,disabled:fP,dark:pP},vP=({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]=ce.useState(!1),m=()=>{!i&&t&&typeof t=="function"&&t(!e)},g=()=>{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 T.jsx("div",{style:g(),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onMouseLeave:()=>p(!1),onClick:m,className:`${h==="dark"?al.dark:""} ${al.toggleWrapper} ${e?al.checked:""} ${i?al.disabled:""}`,children:T.jsx("div",{style:y(),className:al.toggleState,children:T.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},_P="Radio-module__radioWrapper",mP="Radio-module__sm",gP="Radio-module__md",CP="Radio-module__checked",yP="Radio-module__innerCircle",xP="Radio-module__radioState",bP="Radio-module__disabled",SP="Radio-module__dark",ea={radioWrapper:_P,sm:mP,md:gP,checked:CP,innerCircle:yP,radioState:xP,disabled:bP,dark:SP},EI=({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]=ce.useState(!1),h=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return T.jsxs("div",{className:`${u==="dark"?ea.dark:""} ${ea.radioWrapper} ${ea[a]??ea.md} ${e?ea.checked:""} ${i?ea.disabled:""}`,style:o??{},onClick:h,children:[T.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),T.jsx("div",{style:s??{},className:ea.radioState,children:T.jsx("div",{style:l??{},className:ea.innerCircle})})]})},EP="Dropdown-module__dropdownWrapper",wP="Dropdown-module__placeHolder",IP="Dropdown-module__dropdownLabel",TP="Dropdown-module__required",AP="Dropdown-module__dropdownContainer",DP="Dropdown-module__sm",OP="Dropdown-module__md",RP="Dropdown-module__selectedTags",kP="Dropdown-module__selectedList",BP="Dropdown-module__additional",PP="Dropdown-module__dropdownListContainer",LP="Dropdown-module__dropdownList",FP="Dropdown-module__hidden",MP="Dropdown-module__visible",VP="Dropdown-module__checkIcon",NP="Dropdown-module__disabled",$P="Dropdown-module__selected",HP="Dropdown-module__dropdownListFooter",WP="Dropdown-module__focused",zP="Dropdown-module__error",GP="Dropdown-module__dropdownHelperText",UP="Dropdown-module__dark",ri={dropdownWrapper:EP,placeHolder:wP,dropdownLabel:IP,required:TP,dropdownContainer:AP,sm:DP,md:OP,selectedTags:RP,selectedList:kP,additional:BP,dropdownListContainer:PP,dropdownList:LP,hidden:FP,visible:MP,checkIcon:VP,disabled:NP,selected:$P,dropdownListFooter:HP,focused:WP,error:zP,dropdownHelperText:GP,dark:UP},KP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:T.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"})}),jP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:T.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"})}),v_=({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:m,onFocus:g,onBlur:y,withClearAll:b=!0,withSelectAll:A=!0,withPlus:k=!1,searchComponent:D=!1,withFooter:K=!0,data:H,onSelect:W,selectedOptionID:G,withFilter:q=!0,withClose:ee=!0,fixedDropdown:$=!1,onSearch:Y,pagination:x,withMultiSelect:z=!1,skipSelected:te,closeOnSelect:Q=!0,labelIcon:_e,closeIcon:ue,dropdownIcon:Z,iconDown:V,onLabelIconClick:C,onLabelIconMouseEnter:w,onLabelIconMouseLeave:S,dropdownWrapperStyle:B,dropdownLabelStyle:F,requiredStyle:U,labelIconStyle:N,dropdownContainerStyle:J,placeHolderStyle:de,selectedTagsStyle:he,selectedListStyle:ie,additionalStyle:Te,additionalSpanStyle:I,dropdownListStyle:ne,listStyle:oe,treeProps:L,theme:P="light"})=>{const[X,ve]=ce.useState(!1),[ge,le]=ce.useState(!1),[we,ke]=ce.useState([]),[Ae,Ne]=ce.useState(""),[at,qe]=ce.useState(""),it=ce.useRef([]),ii=ce.useRef(null),jt=ce.useRef(null),Ht=ce.useRef({}),vt=ce.useRef([]),Vi=(xe,ae)=>{const j=new Set;return xe.filter(be=>j.has(be[ae])?!1:(j.add(be[ae]),!0))},Mt=xe=>{var ae;Ht.current=xe,Ne((ae=Ht.current)==null?void 0:ae.label),W&&typeof W=="function"&&W(Ht.current),le(!1)},di=xe=>{it.current=[...it.current,...H.filter(ae=>ae.selected==!0),...H.filter(ae=>ae.id===xe.id)],xe.selected=!xe.selected,it.current=Vi(it.current,"id").filter(ae=>ae.selected),W&&typeof W=="function"&&W(it.current),D||Ne(it.current.map(ae=>ae.label).join(", ")),ve(ae=>!ae)},je=xe=>{xe.stopPropagation(),z||h?c&&(qe(""),vt.current=H,ve(ae=>!ae)):(it.current=[],G=null,H&&H.length>0&&H.forEach(ae=>ae.selected=!1),ct(""),Ht.current={},W({}),Ne("")),Y&&typeof Y=="function"&&Y("")},ct=xe=>{if(Y&&typeof Y=="function"&&Y(xe),z&&c){let ae=H,j=ae.filter(be=>{var Pe;return(Pe=be==null?void 0:be.label)==null?void 0:Pe.toLowerCase().includes((xe==null?void 0:xe.toLowerCase())||"")});vt.current=(xe==null?void 0:xe.length)>0?j:ae,qe(xe),ve(be=>!be)}else qe(xe),Ne(xe)},Ci=()=>{if(G||G===0){let xe=H.filter(ae=>Number(ae.id)===Number(G));xe&&xe[0]&&(Ht.current=xe[0],te?(Y&&typeof Y=="function"&&Y(Ht.current.label),Ne(Ht.current.label),Q&&le(ae=>!1)):Mt(xe[0]))}},[Pi,We]=ce.useState(!1),ht=xe=>{let ae=ii.current.querySelector("ul"),be=Math.abs(ae.scrollTop+ae.clientHeight-ae.scrollHeight)<=2;x&&be&&!Pi&&(d&&typeof d=="function"&&d(!0),We(!0)),be||We(!1)},Zt=()=>{H.forEach(xe=>{xe.selected=!1}),it.current=[],W([]),Ne(""),l&&typeof l=="function"&&l(),ve(xe=>!xe)},_t=()=>{H.forEach(xe=>{xe!=null&&xe.id&&(xe==null?void 0:xe.id)!==null&&(xe!=null&&xe.label)&&(xe==null?void 0:xe.label)!==""&&(xe==null?void 0:xe.label)!=="-"&&!xe.disabled&&(xe.selected=!0)}),it.current=H,it.current=Vi(it.current,"id").filter(xe=>xe.selected),Ne(it.current.map(xe=>xe.label).join(", ")),u&&typeof u=="function"&&u(),W(it.current),ve(xe=>!xe)},Wt=ce.useRef(!0);ce.useEffect(()=>{if(Wt.current){Wt.current=!1;return}ge||y&&typeof y=="function"&&y()},[ge]);const yr=()=>{g&&typeof g=="function"&&g()},xr=xe=>xe,zo=xe=>{let ae=!0,j=Ae;return q&&xe&&!xe.toLowerCase().split(" ").join("").trim().includes(j.toLowerCase().split(" ").join("").trim())&&j.trim()!==""&&(ae=!1),at.length>0&&xe==="-"?"hidden":ae?"visible":"hidden"},Go=xe=>{xe.composedPath().includes(ii.current)||le(!1)},Uo=xe=>{if($){if(xe.composedPath().includes(ii.current))return;le(!1)}},Ma=()=>{const xe=ii.current,ae=jt.current;if(!ae||!xe)return;const j=xe.getBoundingClientRect(),be=window.innerHeight;$?(ae.style.position="fixed",ae.style.width=j.width+"px",ae.style.left=`${j.left+window.pageXOffset}px`,j.bottom+ae.offsetHeight>be?(ae.style.top=`${window.scrollY+j.top-ae.offsetHeight-8}px`,ae.style.bottom="unset"):(ae.style.top=`${window.scrollY+j.bottom}px`,ae.style.bottom="unset")):j.bottom>be?(ae.style.top="unset",ae.style.bottom="calc(100% + 8px)"):(ae.style.bottom="unset",ae.style.top="calc(100% + 8px)")},Ko=xe=>{it.current=xe,W&&typeof W=="function"&&W(xe)},il=(xe,ae)=>{m&&typeof m=="function"&&m(xe,ae)},Va=ce.useRef(null);return ce.useEffect(()=>{ge&&Va.current&&Va.current.focus()},[ge]),ce.useEffect(()=>{z&&(it.current=H.filter(xe=>xe.selected),Ne(H.filter(xe=>xe.selected).map(xe=>xe.label).join(", ")))},[]),ce.useEffect(()=>{D&&s&&s.length>0&&qe(s),vt.current=H},[]),ce.useEffect(()=>{Ma()},[jt,ge]),ce.useEffect(()=>{z||Ci()},[G]),ce.useEffect(()=>(document.addEventListener("click",Go),document.addEventListener("wheel",Uo),()=>{document.removeEventListener("click",Go),document.removeEventListener("wheel",Uo)}),[]),T.jsxs("div",{className:`${P==="dark"?ri.dark:""} ${ri.dropdownWrapper}`,style:B??{},children:[e&&T.jsxs("label",{className:ri.dropdownLabel,style:F??{},children:[e," ",T.jsx("span",{className:ri.required,style:U??{},children:i&&"*"}),T.jsxs("span",{style:{...N??{},display:"grid",placeItems:"center"},onClick:()=>{C&&typeof C=="function"&&C()},onMouseEnter:()=>{w&&typeof w=="function"&&w()},onMouseLeave:()=>{S&&typeof S=="function"&&S()},children:[" ",xr(_e)]})]}),T.jsxs("div",{onFocus:yr,ref:ii,onClick:()=>(le(xe=>!xe),Ma()),className:`${ri.dropdownContainer} ${ge&&!o?ri.focused:""} ${t?ri.disabled:""} ${a!=null&&a.error?ri.error:""} ${ri[n]}`,style:J??{},children:[D?T.jsxs("div",{children:[" ",T.jsx(jP,{})]}):T.jsx(T.Fragment,{children:Z&&T.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:xr(Z)})}),!D&&(h||z)&&r&&!ge&&it.current.length===0&&T.jsx("span",{className:ri.placeHolder,style:de??{},children:r??""}),(z||h)&&T.jsx("div",{className:ri.selectedTags,style:he??{},children:!D&&!ge?T.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[it.current.slice(0,3).map((xe,ae)=>{let j=it.current[it.current.length-1];return T.jsxs("span",{className:ri.selectedList,style:ie??{},children:[!k&&xe.label,!k&&xe.id!==j.id&&ae!==2?",":""," "]},xe==null?void 0:xe.id)}),!k&&it.current.length>3&&T.jsxs("div",{className:ri.additional,style:Te??{},children:[" ",T.jsxs("span",{style:I??{},children:["+(",it.current.length-3,")"]})]})]}):T.jsx("input",{ref:Va,onClick:xe=>(xe.stopPropagation(),le(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:at}:{},onChange:xe=>ct(xe.target.value)},G)}),T.jsx("input",{autoCorrect:"off",hidden:z||h,placeholder:r,readOnly:!q||!ge||z||h,type:"text",value:(z||h)&&!D&&ge?"":Ae,onChange:xe=>ct(xe.target.value)},G),H&&H.length>0&&ge&&T.jsxs("div",{ref:jt,onClick:xe=>xe.stopPropagation(),className:ri.dropdownListContainer,children:[h?T.jsx(Jk,{SearchValue:at,expandedNodes:we,setExpandedNodes:ke,checkboxProps:p,onSelect:Ko,withClearAll:b,withSelectAll:A,SelectedData:it.current,fromDropdown:!0,onCollapse:il,defaultCollapsed:f,data:H,theme:P,treeProps:L}):T.jsx("ul",{onScroll:xe=>ht(),onClick:xe=>xe.stopPropagation(),className:ri.dropdownList,style:ne??{},children:(z&&q?vt.current:H).map(xe=>{var ae,j,be,Pe;return T.jsxs("li",{style:oe??{},className:`${!z&&c?ri[zo((xe==null?void 0:xe.label)??"-")]:""} ${!(xe!=null&&xe.label)||xe.label===void 0||xe!=null&&xe.disabled?ri.disabled:""} ${(z?xe.selected:(ae=Ht.current)!=null&&ae.id&&((j=Ht.current)==null?void 0:j.id)===xe.id)?ri.selected:""}`,onClick:()=>{z?di(xe):Mt(xe)},children:[T.jsxs("p",{children:[" ",xe!=null&&xe.customLabel?xe.customLabel():(xe==null?void 0:xe.label)??"-"]}),k?T.jsx(T.Fragment,{children:xe.selected?T.jsx(SI,{}):T.jsx(KP,{})}):(z?xe.selected:((be=Ht.current)==null?void 0:be.id)&&((Pe=Ht.current)==null?void 0:Pe.id)===xe.id)&&T.jsx("span",{className:ri.checkIcon,children:T.jsx(bI,{color:"#7F56D9",width:20,height:20})})]},xe==null?void 0:xe.id)})}),z&&K&&T.jsxs("div",{className:ri.dropdownListFooter,children:[b&&T.jsx("span",{onClick:Zt,children:"Clear All"}),A&&at===""&&T.jsx("span",{onClick:_t,children:"Select All"})]})]}),ee&&(!c&&Ae.length>0||at.length>0)&&T.jsx("div",{onClick:xe=>je(xe),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:ue?xr(ue):T.jsx(Ru,{width:16,height:16})}),V?xr(V):T.jsx("div",{style:{display:"grid",placeItems:"center",transform:ge?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&T.jsx(Ou,{})})]}),a&&(a==null?void 0:a.visible)&&T.jsx("div",{className:`${ri.dropdownHelperText} ${a!=null&&a.error?ri.error:""}`,children:!ge&&T.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},qP="Tooltip-module__tooltipContainer",YP="Tooltip-module__tooltipContent",XP="Tooltip-module__withoutPointer",ZP="Tooltip-module__top",JP="Tooltip-module__right",QP="Tooltip-module__bottom",eL="Tooltip-module__left",tL="Tooltip-module__tooltipTitle",iL="Tooltip-module__tooltipText",nL="Tooltip-module__dark",Nn={tooltipContainer:qP,tooltipContent:YP,withoutPointer:XP,top:ZP,right:JP,bottom:QP,left:eL,tooltipTitle:tL,tooltipText:iL,dark:nL},__=({children:e,tooltipSlot:t,delay:i=400,placement:n="top",trigger:r="hover",title:a,text:o,customText:s,tooltipContentStyle:l,tooltipTitlestyle:u,tooltipTextStyle:d,pointerPosition:c="10%",withPointer:h=!0,theme:f})=>{const p=ce.useRef(null),m=ce.useRef(null);let g;const[y,b]=ce.useState(!1),A=()=>{r==="hover"&&(g=setTimeout(()=>{b(!0)},i))},k=()=>{r==="hover"&&(clearTimeout(g),setTimeout(()=>{b(!1)},i))},D=()=>{r==="click"&&b(G=>!G)},K=()=>{const G=p.current,q=m.current;if(!q||!G)return;const ee=G.getBoundingClientRect();switch(q.style.position="fixed",n){case"top":q.style.top=`${ee.top-q.offsetHeight-8}px`;break;case"bottom":q.style.top=`${ee.bottom+8}px`;break;case"left":q.style.top=`${ee.top+ee.height/2-q.offsetHeight/2}px`,q.style.left=`${ee.left-q.offsetWidth-8}px`;break;case"right":q.style.top=`${ee.top+ee.height/2-q.offsetHeight/2}px`,q.style.left=`${ee.right+8}px`;break}},H=G=>{G.composedPath().includes(p.current)||b(!1)},W=()=>{b(!1)};return ce.useEffect(()=>{K()},[p,y]),ce.useEffect(()=>(document.addEventListener("click",H),window.addEventListener("scroll",W,!0),()=>{window.removeEventListener("scroll",W,!0),document.removeEventListener("click",H)}),[]),ce.useEffect(()=>{const G=m.current;G&&(G.style.setProperty("--pointer-position",`${c}`),h||G.classList.add(Nn.withoutPointer))},[y]),T.jsxs("div",{ref:p,className:`${f==="dark"?Nn.dark:""} ${Nn.tooltipContainer}`,onClick:D,onMouseEnter:A,onMouseLeave:k,children:[e,y&&t?T.jsx("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:t()}):y&&T.jsxs("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:[s&&typeof s=="function"&&s(),a&&a.length>0&&T.jsx("h2",{className:Nn.tooltipTitle,style:u??{},children:a}),o&&o.length>0&&T.jsx("p",{className:Nn.tooltipText,style:d??{},children:o})]})]})},rL="Popup-module__modalOverlay",aL="Popup-module__popupDrawerMode",oL="Popup-module__popupContainer",sL="Popup-module__closeButton",lL="Popup-module__withOptions",uL="Popup-module__horizontal",dL="Popup-module__popupHeader",cL="Popup-module__popupTitle",hL="Popup-module__popupDescription",fL="Popup-module__typeIcon",pL="Popup-module__icon",vL="Popup-module__templateWrapper",_L="Popup-module__dark",un={modalOverlay:rL,popupDrawerMode:aL,popupContainer:oL,closeButton:sL,withOptions:lL,horizontal:uL,popupHeader:dL,popupTitle:cL,popupDescription:hL,typeIcon:fL,icon:pL,templateWrapper:vL,dark:_L},mL=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]},gL=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),CL=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 wI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},yL=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.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"})}),xL=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.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"})}),zm=({width:e,color:t})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:T.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"})}),Gm=({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 T.jsx(zm,{});case"unsaved":return T.jsx(xL,{});case"success":return T.jsx(yL,{})}},m=()=>{a&&typeof a=="function"&&a(!1)},g=ce.useRef(null),y=b=>{b.target===g.current&&r&&typeof r=="function"&&r(!1)};return ce.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[]),e&&T.jsx("div",{ref:g,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:""}
|
|
@@ -1602,7 +1602,7 @@ const oB = ({ loadingColor: e }) => /* @__PURE__ */ T.jsxs(
|
|
|
1602
1602
|
return rt(() => {
|
|
1603
1603
|
K();
|
|
1604
1604
|
}, [p, y]), rt(() => (document.addEventListener("click", H), window.addEventListener("scroll", W, !0), () => {
|
|
1605
|
-
window.removeEventListener("scroll",
|
|
1605
|
+
window.removeEventListener("scroll", W, !0), document.removeEventListener("click", H);
|
|
1606
1606
|
}), []), rt(() => {
|
|
1607
1607
|
const G = m.current;
|
|
1608
1608
|
G && (G.style.setProperty("--pointer-position", `${c}`), h || G.classList.add(Hn.withoutPointer));
|