master-components-react 2.1.0 → 2.1.1
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.
|
@@ -28,7 +28,7 @@ Check the top-level render call using <`+Ne+">.")}return Te}}function rd(Z,Te){{
|
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,Cf,ka,Xk,ka),Ra[ka+Cf]=!0}}return Z===n?mf(di):gf(di),di}}function Kk(Z,Te,Ne){return _r(Z,Te,Ne,!0)}function jk(Z,Te,Ne){return _r(Z,Te,Ne,!1)}var qk=jk,Yk=Kk;Ks.Fragment=n,Ks.jsx=qk,Ks.jsxs=Yk}()),Ks}process.env.NODE_ENV==="production"?o_.exports=Qk():o_.exports=Jk();var k=o_.exports;const eB="MainButton-module__mainButton",tB="MainButton-module__sm",iB="MainButton-module__onlyIcon",nB="MainButton-module__buttonSlot",rB="MainButton-module__buttonLabel",aB="MainButton-module__md",oB="MainButton-module__lg",sB="MainButton-module__xl",lB="MainButton-module__xl2",uB="MainButton-module__disabled",dB="MainButton-module__dark",Ba={mainButton:eB,sm:tB,onlyIcon:iB,buttonSlot:nB,buttonLabel:rB,md:aB,lg:oB,xl:sB,xl2:lB,disabled:uB,dark:dB},iu=({label:e,buttonType:t="button",onClick:i,size:n="md",disabled:r,withIcons:a,iconOne:o,iconTwo:s,onlyIcon:l,buttonStyle:u,labelStyle:d,buttonSlotStyle:c,theme:h="light"})=>k.jsx("button",{type:t,style:u&&typeof u=="object"?u:{},className:`${h==="dark"?Ba.dark:""} ${Ba.mainButton} ${l?Ba.onlyIcon:""} ${n?Ba[n]:""} ${r?Ba.disabled:""}`,onClick:()=>{i&&typeof i=="function"&&i()},children:k.jsxs("div",{className:Ba.buttonSlot,style:c??{},children:[l||a&&o?o:"",!l&&k.jsx("span",{style:d??{},className:Ba.buttonLabel,children:e??"Button"}),a&&s?s:""]})}),cB="FormInput-module__inputWrapper",hB="FormInput-module__inputLabel",fB="FormInput-module__required",pB="FormInput-module__inputContainer",vB="FormInput-module__inputContent",_B="FormInput-module__inputTags",gB="FormInput-module__focused",mB="FormInput-module__error",CB="FormInput-module__rightIcon",yB="FormInput-module__leftIcon",xB="FormInput-module__inputDropDown",bB="FormInput-module__http",SB="FormInput-module__disabled",EB="FormInput-module__sm",wB="FormInput-module__md",IB="FormInput-module__withCopy",TB="FormInput-module__inputHelperText",AB="FormInput-module__dark",ci={inputWrapper:cB,inputLabel:hB,required:fB,inputContainer:pB,inputContent:vB,inputTags:_B,focused:gB,error:mB,rightIcon:CB,leftIcon:yB,inputDropDown:xB,http:bB,disabled:SB,sm:EB,md:wB,withCopy:IB,inputHelperText:TB,dark:AB},Eh=({width:e,height:t,color:i})=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:k.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),DB=({width:e,height:t,color:i})=>k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[k.jsx("g",{clipPath:"url(#clip0_444_26)",children:k.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"})}),k.jsx("defs",{children:k.jsx("clipPath",{id:"clip0_444_26",children:k.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),yu=e=>k.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:k.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"})}),OB="Checkbox-module__checkboxWrapper",RB="Checkbox-module__sm",kB="Checkbox-module__md",BB="Checkbox-module__checkMark",LB="Checkbox-module__checked",PB="Checkbox-module__disabled",FB="Checkbox-module__dark",No={checkboxWrapper:OB,sm:RB,md:kB,checkMark:BB,checked:LB,disabled:PB,dark:FB},gI=({color:e,width:t,height:i})=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:k.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),mI=e=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:k.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),wh=({checked:e,change:t,disabled:i,required:n,multipleChecked:r,size:a="md",activeStyle:o,checkBoxStyle:s,theme:l="light"})=>{const u=ve.useRef(null),[d,c]=ve.useState(!1),h=()=>{t&&typeof t=="function"&&t(!e)},f=()=>d?o??{}:s??{};return k.jsxs("div",{style:f(),className:` ${l==="dark"?No.dark:""} ${No.checkboxWrapper} ${No[a]} ${e?No.checked:No.unChecked} ${i?No.disabled:""}`,onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onMouseLeave:()=>c(!1),onClick:h,children:[k.jsx("input",{ref:u,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?k.jsx(mI,{}):k.jsx(gI,{}):""]})},MB="Tag-module__tagContainer",VB="Tag-module__onlyLabel",NB="Tag-module__sm",HB="Tag-module__md",$B="Tag-module__lg",WB="Tag-module__tagLabel",zB="Tag-module__tagNumber",GB="Tag-module__tagClose",UB="Tag-module__dark",La={tagContainer:MB,onlyLabel:VB,sm:NB,md:HB,lg:$B,tagLabel:WB,tagNumber:zB,tagClose:GB,dark:UB},Bg=({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,C=()=>i,x=()=>{d&&typeof d=="function"&&d(e??null)};return k.jsxs("div",{style:c??{},className:`${g==="dark"?La.dark:""} ${La.tagContainer} ${m()?La.onlyLabel:""} ${La[u??"md"]}`,children:[r&&k.jsx(wh,{...s}),i&&C(),t&&k.jsx("p",{style:h??{},className:La.tagLabel,children:t??""}),a&&k.jsx("div",{style:f??{},className:La.tagNumber,children:o??""}),n&&k.jsx("div",{style:p??{},className:La.tagClose,onClick:x,children:k.jsx(yu,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},CI=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFouce:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:g,onRightIconIconMouseEnter:m,onRightIconIconMouseLeave:C,onLeftIconIconClick:x,onLeftIconIconMouseEnter:T,onLeftIconIconMouseLeave:R,onPressEnter:A,rightIcon:z,leftIcon:G,withDropDown:N,dropdownData:K,onSelectData:q,withTags:H,tagProps:F,withLink:j,withCopy:I,onCopy:Y,inputWrapperStyle:ue,inputLabelStyle:J,requiredStyle:se,inputContainerStyle:ae,leftIconStyle:Q,inputDropDownStyle:W,ulStyle:y,liStyle:w,httpStyle:E,inputStyle:B,rightIconStyle:V,withCopyStyle:U,inputHelperTextStyle:$,theme:ie="light"})=>{const[ne,_e]=ve.useState(!1),oe=ve.useRef(null),[Re,S]=ve.useState(!1);ve.useState(!1);const fe=ve.useRef(null),le=ve.useRef(null),[L,P]=ve.useState(!1),[X,ce]=ve.useState(1),Ce=Ge=>{let wt=Ge.target.value;wt.length===1&&(wt=wt.trim()),s&&typeof s=="function"&&s(f?wt.replace(/\d/g,""):wt)},re=()=>{S(!0),l&&typeof l=="function"&&l()},we=()=>{S(!1),u&&typeof u=="function"&&u()},Le=Ge=>{const wt=Ge.target.value,bt=wt.length===0;a==="number"&&(Ge.keyCode===69||!bt&&(Ge.keyCode===187||Ge.keyCode===107||Ge.keyCode===189||Ge.keyCode===109))&&Ge.preventDefault(),Ge.key==="Enter"&&wt&&wt.length>0&&A&&typeof A=="function"&&A(wt)},Ie=()=>{Y&&typeof Y=="function"&&Y(e)},We=Ge=>Ge,Qe=()=>{let Ge={};return I&&(Ge.borderTopRightRadius=0,Ge.borderBottomRightRadius=0,Ge.borderRight=0),N&&(Ge.paddingLeft=0),{...Ge,...ae??{}}},it=Ge=>{!Ge.composedPath().includes(le.current)&&Ge.composedPath().includes(fe.current)||P(!1)},Kt=Ge=>{ce(Ge.id),P(!1),q&&typeof q=="function"&&q(Ge)};ve.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),ve.useEffect(()=>(document.addEventListener("click",it),()=>{document.removeEventListener("click",it)}),[]);const wi=ve.useRef(!1);return ve.useEffect(()=>{wi.current?setTimeout(()=>{_e(Ge=>!Ge)},0):wi.current=!0},[]),k.jsxs("div",{className:`${ie==="dark"?ci.dark:""} ${ci.inputWrapper}`,style:ue??{},children:[t&&k.jsxs("label",{className:ci.inputLabel,style:J??{},children:[t," ",k.jsx("span",{className:ci.required,style:se??{},children:n&&"*"})]}),k.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[k.jsxs("div",{style:Qe(),className:`${ci.inputContainer} ${Re&&!c?ci.focused:""} ${r?ci.disabled:""} ${d!=null&&d.error?ci.error:""} ${ci[o??"sm"]}`,children:[!N&&!j&&G&&k.jsx("div",{className:ci.leftIcon,style:Q??{},onClick:()=>{x&&typeof x=="function"&&x()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{R&&typeof R=="function"&&R()},children:We(G)}),!j&&N&&k.jsxs("div",{className:ci.inputDropDown,style:W??{},onClick:()=>P(!0),ref:fe,children:[K.find(Ge=>Ge.id===X).label,L&&k.jsx("ul",{ref:le,style:y??{},children:K&&K.length&&K.map((Ge,wt)=>k.jsx("li",{style:w??{},onClick:()=>Kt(Ge),children:(Ge==null?void 0:Ge.label)??"-"},Ge.id))}),k.jsx(Eh,{})]}),j&&k.jsx("div",{className:`${ci.inputDropDown} ${ci.http}`,style:E??{},onClick:()=>P(!0),ref:fe,children:"http://"}),k.jsxs("div",{className:ci.inputContent,children:[H&&p&&p.length>0&&k.jsx("div",{className:ci.inputTags,children:p.map((Ge,wt)=>k.jsx("div",{className:ci.inputSingleTags,children:k.jsx(Bg,{...F,id:Ge,label:Ge,withClose:!0})},wt))}),k.jsx("input",{ref:oe,style:B??{},type:a??"text",value:e,onChange:Ge=>Ce(Ge),onFocus:re,onBlur:we,disabled:r,required:n,onKeyDown:Le,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),z&&k.jsx("div",{className:ci.rightIcon,style:V??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{C&&typeof C=="function"&&C()},children:We(z)})]}),I&&k.jsxs("div",{style:U??{},onClick:Ie,className:ci.withCopy,children:[k.jsx(DB,{}),k.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&k.jsx("div",{style:$??{},className:`${ci.inputHelperText} ${d!=null&&d.error?ci.error:""}`,children:k.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},KB="Textarea-module__textareaContainer",jB="Textarea-module__textAreaLabel",qB="Textarea-module__required",YB="Textarea-module__wrap",XB="Textarea-module__textarea",ZB="Textarea-module__focused",QB="Textarea-module__disabled",JB="Textarea-module__error",eL="Textarea-module__helperTextStyle",tL="Textarea-module__dark",an={textareaContainer:KB,textAreaLabel:jB,required:qB,wrap:YB,textarea:XB,focused:ZB,disabled:QB,error:JB,helperTextStyle:eL,dark:tL},iL=({width:e,height:t,color:i})=>k.jsxs("svg",{width:e??"16",height:t??"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("g",{id:"help-circle",clipPath:"url(#clip0_433_6293)",children:k.jsx("path",{id:"Icon",d:"M6.05992 5.99998C6.21665 5.55442 6.52602 5.17872 6.93322 4.9394C7.34042 4.70009 7.81918 4.61261 8.2847 4.69245C8.75022 4.7723 9.17246 5.01433 9.47664 5.37567C9.78081 5.737 9.94729 6.19433 9.94659 6.66665C9.94659 7.99998 7.94659 8.66665 7.94659 8.66665M7.99992 11.3333H8.00659M14.6666 7.99998C14.6666 11.6819 11.6818 14.6666 7.99992 14.6666C4.31802 14.6666 1.33325 11.6819 1.33325 7.99998C1.33325 4.31808 4.31802 1.33331 7.99992 1.33331C11.6818 1.33331 14.6666 4.31808 14.6666 7.99998Z",stroke:i??"#A4A7AE",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),k.jsx("defs",{children:k.jsx("clipPath",{id:"clip0_433_6293",children:k.jsx("rect",{width:e??"16",height:t??"16",fill:"white"})})})]}),nL=({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,theme:C})=>{const[x,T]=ve.useState(!1),R=G=>{let N=G.target.value;s&&typeof s=="function"&&s(N)},A=()=>{T(!0),l&&typeof l=="function"&&l()},z=()=>{T(!1),u&&typeof u=="function"&&u()};return k.jsxs("div",{style:h??{},className:`${C==="dark"?an.dark:""} ${an.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?an[i==null?void 0:i.type]:""} ${d?an.disabled:null}`,children:[t&&k.jsxs("div",{style:f,className:an.textAreaLabel,children:[k.jsx("p",{children:t}),k.jsx("span",{style:p??{},className:an.required,children:c&&"*"}),k.jsx(iL,{})]}),k.jsx("div",{className:an.wrap,children:k.jsx("textarea",{style:g??{},className:`${an.textarea} ${x?an.focused:""} ${d?an.disabled:""} ${i!=null&&i.error?an.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:o??null,onFocus:A,disabled:d,onBlur:z,onChange:R})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&k.jsx("div",{style:m??{},className:`${an.helperTextStyle} ${i!=null&&i.error?an.error:""}`,children:k.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},rL="Toggle-module__toggleWrapper",aL="Toggle-module__toggleState",oL="Toggle-module__checked",sL="Toggle-module__disabled",lL="Toggle-module__dark",js={toggleWrapper:rL,toggleState:aL,checked:oL,disabled:sL,dark:lL},uL=({checked:e,change:t,disabled:i,required:n,activeStyle:r,bgStyle:a,checkedBgStyle:o,disabledBgStyle:s,circleStyle:l,checkedCircleStyle:u,disabledCircleStyle:d,theme:c="light"})=>{const[h,f]=ve.useState(!1),p=()=>{t&&typeof t=="function"&&t(!e)},g=()=>{if(h)return r??{};if(e){if(o)return o}else if(e){if(i&&s)return s}else if(a)return a;return{}},m=()=>{if(e){if(u)return u}else if(e){if(i&&d)return d}else if(l)return l;return{}};return k.jsx("div",{style:g(),onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onMouseLeave:()=>f(!1),onClick:p,className:`${c==="dark"?js.dark:""} ${js.toggleWrapper} ${e?js.checked:""} ${i?js.disabled:""}`,children:k.jsx("div",{style:m(),className:js.toggleState,children:k.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},dL="Radio-module__radioWrapper",cL="Radio-module__sm",hL="Radio-module__md",fL="Radio-module__checked",pL="Radio-module__innerCircle",vL="Radio-module__radioState",_L="Radio-module__disabled",gL="Radio-module__dark",qr={radioWrapper:dL,sm:cL,md:hL,checked:fL,innerCircle:pL,radioState:vL,disabled:_L,dark:gL},yI=({checked:e,change:t,disabled:i,isRequired:n,withUncheckState:r=!0,size:a,theme:o="light"})=>{ve.useState(!1);const s=()=>{t&&typeof t=="function"&&(r||!r&&!e)&&t(!0)};return k.jsxs("div",{className:`${o==="dark"?qr.dark:""} ${qr.radioWrapper} ${qr[a]??qr.md} ${e?qr.checked:""} ${i?qr.disabled:""}`,onClick:s,children:[k.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n??!1}),k.jsx("div",{className:qr.radioState,children:k.jsx("div",{className:qr.innerCircle})})]})},mL="Dropdown-module__dropdownWrapper",CL="Dropdown-module__placeHolder",yL="Dropdown-module__dropdownLabel",xL="Dropdown-module__required",bL="Dropdown-module__dropdownContainer",SL="Dropdown-module__sm",EL="Dropdown-module__md",wL="Dropdown-module__selectedTags",IL="Dropdown-module__selectedList",TL="Dropdown-module__additional",AL="Dropdown-module__dropdownListContainer",DL="Dropdown-module__dropdownList",OL="Dropdown-module__checkIcon",RL="Dropdown-module__disabled",kL="Dropdown-module__selected",BL="Dropdown-module__dropdownListFooter",LL="Dropdown-module__focused",PL="Dropdown-module__error",FL="Dropdown-module__dropdownHelperText",ML="Dropdown-module__dark",si={dropdownWrapper:mL,placeHolder:CL,dropdownLabel:yL,required:xL,dropdownContainer:bL,sm:SL,md:EL,selectedTags:wL,selectedList:IL,additional:TL,dropdownListContainer:AL,dropdownList:DL,checkIcon:OL,disabled:RL,selected:kL,dropdownListFooter:BL,focused:LL,error:PL,dropdownHelperText:FL,dark:ML},VL=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:k.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"})}),NL=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:k.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"})}),s_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,withClearAll:c=!0,withSelectAll:h=!0,withPlus:f=!1,searchComponent:p=!1,withFooter:g=!0,data:m,onSelect:C,selectedOptionID:x,withFilter:T=!0,withClose:R=!0,fixedDropdown:A=!1,onSearch:z,pagination:G,withMultiSelect:N=!1,skipSelected:K,labelIcon:q,closeIcon:H,dropdownIcon:F,iconDown:j,onLabelIconClick:I,onLabelIconMouseEnter:Y,onLabelIconMouseLeave:ue,dropdownWrapperStyle:J,dropdownLabelStyle:se,requiredStyle:ae,labelIconStyle:Q,dropdownContainerStyle:W,placeHolderStyle:y,selectedTagsStyle:w,selectedListStyle:E,additionalStyle:B,dropdownListStyle:V,listStyle:U,theme:$="light"})=>{const[ie,ne]=ve.useState(!1),[_e,oe]=ve.useState(!1),[Re,S]=ve.useState(""),[fe,le]=ve.useState("");ve.useState(null);const L=ve.useRef([]),P=ve.useRef(null),X=ve.useRef(null),ce=ve.useRef({}),Ce=(Se,Xe)=>{const Wt=new Set;return Se.filter(ai=>Wt.has(ai[Xe])?!1:(Wt.add(ai[Xe]),!0))},re=Se=>{var Xe;ce.current=Se,S((Xe=ce.current)==null?void 0:Xe.label),C&&typeof C=="function"&&C(ce.current),oe(!1)},we=Se=>{L.current=[...L.current,...m.filter(Xe=>Xe.selected==!0),...m.filter(Xe=>Xe.id===Se.id)],Se.selected=!Se.selected,L.current=Ce(L.current,"id").filter(Xe=>Xe.selected),C&&typeof C=="function"&&C(L.current),p||S(L.current.map(Xe=>Xe.label).join(", ")),ne(Xe=>!Xe)},Le=Se=>{Se.stopPropagation(),L.current=[],x=null,m&&m.length>0&&m.forEach(Xe=>Xe.selected=!1),Ie(""),C(N?[]:{}),S("")},Ie=Se=>{z&&typeof z=="function"&&z(Se),le(Se),S(Se)},We=()=>{if(x||x===0){let Se=m.filter(Xe=>Number(Xe.id)===Number(x));Se&&Se[0]&&(ce.current=Se[0],K?(z&&typeof z=="function"&&z(ce.current.label),S(ce.current.label),closeOnSelect&&setCollapsed(Xe=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):re(Se[0]))}},[Qe,it]=ve.useState(!1),Kt=Se=>{let Xe=P.current.querySelector("ul"),ai=Math.abs(Xe.scrollTop+Xe.clientHeight-Xe.scrollHeight)<=2;G&&ai&&!Qe&&(d&&typeof d=="function"&&d(!0),it(!0)),ai||it(!1)},wi=()=>{m.forEach(Se=>{Se.selected=!1}),L.current=[],C([]),S(""),l&&typeof l=="function"&&l(),ne(Se=>!Se)},Ge=()=>{m.forEach(Se=>{Se!=null&&Se.id&&(Se==null?void 0:Se.id)!==null&&(Se!=null&&Se.label)&&(Se==null?void 0:Se.label)!==""&&(Se==null?void 0:Se.label)!=="-"&&!Se.disabled&&(Se.selected=!0)}),L.current=m,L.current=Ce(L.current,"id").filter(Se=>Se.selected),S(L.current.map(Se=>Se.label).join(", ")),u&&typeof u=="function"&&u(),C(L.current),ne(Se=>!Se)},wt=Se=>Se,bt=Se=>{Se.composedPath().includes(P.current)||oe(!1)},Ki=Se=>{if(A){if(Se.composedPath().includes(P.current))return;oe(!1)}},rn=()=>{const Se=P.current,Xe=X.current;if(!Xe||!Se)return;const Wt=Se.getBoundingClientRect(),ai=window.innerHeight;A?(Xe.style.position="fixed",Xe.style.width=Wt.width+"px",Xe.style.left=`${Wt.left+window.pageXOffset}px`,Wt.bottom+Xe.offsetHeight>ai?(Xe.style.top=`${window.scrollY+Wt.top-Xe.offsetHeight-8}px`,Xe.style.bottom="unset"):(Xe.style.top=`${window.scrollY+Wt.bottom}px`,Xe.style.bottom="unset")):Wt.bottom>ai?(Xe.style.top="unset",Xe.style.bottom="calc(100% + 8px)"):(Xe.style.bottom="unset",Xe.style.top="calc(100% + 8px)")},ui=ve.useRef(null);return ve.useEffect(()=>{_e&&ui.current&&ui.current.focus()},[_e]),ve.useEffect(()=>{N&&(L.current=m.filter(Se=>Se.selected),S(m.filter(Se=>Se.selected).map(Se=>Se.label).join(", ")))},[]),ve.useEffect(()=>{p&&s&&s.length>0&&le(s)},[]),ve.useEffect(()=>{rn()},[X,_e]),ve.useEffect(()=>{N||We()},[x]),ve.useEffect(()=>(document.addEventListener("click",bt),document.addEventListener("wheel",Ki),()=>{document.removeEventListener("click",bt),document.removeEventListener("wheel",Ki)}),[]),k.jsxs("div",{className:`${$==="dark"?si.dark:""} ${si.dropdownWrapper}`,style:J??{},children:[e&&k.jsxs("label",{className:si.dropdownLabel,style:se??{},children:[e," ",k.jsx("span",{className:si.required,style:ae??{},children:i&&"*"}),k.jsxs("span",{style:{...Q??{},display:"grid",placeItems:"center"},onClick:()=>{I&&typeof I=="function"&&I()},onMouseEnter:()=>{Y&&typeof Y=="function"&&Y()},onMouseLeave:()=>{ue&&typeof ue=="function"&&ue()},children:[" ",wt(q)]})]}),k.jsxs("div",{ref:P,onClick:()=>(oe(Se=>!Se),rn()),className:`${si.dropdownContainer} ${_e&&!o?si.focused:""} ${t?si.disabled:""} ${a!=null&&a.error?si.error:""} ${si[n]}`,style:W??{},children:[p?k.jsxs("div",{children:[" ",k.jsx(NL,{})]}):k.jsx(k.Fragment,{children:F&&k.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:wt(F)})}),!p&&N&&r&&!_e&&L.current.length===0&&k.jsx("span",{className:si.placeHolder,style:y??{},children:r??""}),N&&k.jsx("div",{className:si.selectedTags,style:w??{},children:!p&&!_e?k.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:[L.current.slice(0,3).map((Se,Xe)=>{let Wt=L.current[L.current.length-1];return k.jsxs("span",{className:si.selectedList,style:E??{},children:[!f&&Se.label,!f&&Se.id!==Wt.id&&Xe!==2?", ":""]},Se==null?void 0:Se.id)}),!f&&L.current.length>3&&k.jsxs("span",{className:si.additional,style:B??{},children:[" ","+(",L.current.length-3,")"]})]}):k.jsx("input",{ref:ui,onClick:Se=>(Se.stopPropagation(),oe(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...p?{value:fe}:{},onChange:Se=>Ie(Se.target.value)},x)}),k.jsx("input",{autoCorrect:"off",hidden:N,placeholder:r,readOnly:!T||!_e||N,type:"text",value:N&&!p&&_e?"":Re,onChange:Se=>Ie(Se.target.value)},x),m&&m.length>0&&_e&&k.jsxs("div",{ref:X,onClick:Se=>Se.stopPropagation(),className:si.dropdownListContainer,children:[k.jsx("ul",{onScroll:Se=>Kt(),onClick:Se=>Se.stopPropagation(),className:si.dropdownList,style:V??{},children:m.map(Se=>{var Xe,Wt,ai,Oi;return k.jsxs("li",{style:U??{},className:`${!(Se!=null&&Se.label)||Se.label===void 0||Se!=null&&Se.disabled?si.disabled:""} ${(N?Se.selected:(Xe=ce.current)!=null&&Xe.id&&((Wt=ce.current)==null?void 0:Wt.id)===Se.id)?si.selected:""}`,onClick:()=>{N?we(Se):re(Se)},children:[k.jsxs("p",{children:[" ",Se!=null&&Se.customLabel?Se.customLabel():(Se==null?void 0:Se.label)??"-"]}),f?k.jsx(k.Fragment,{children:Se.selected?k.jsx(mI,{}):k.jsx(VL,{})}):(N?Se.selected:((ai=ce.current)==null?void 0:ai.id)&&((Oi=ce.current)==null?void 0:Oi.id)===Se.id)&&k.jsx("span",{className:si.checkIcon,children:k.jsx(gI,{color:"#7F56D9",width:20,height:20})})]},Se==null?void 0:Se.id)})}),N&&g&&k.jsxs("div",{className:si.dropdownListFooter,children:[c&&k.jsx("span",{onClick:wi,children:"Clear All"}),h&&k.jsx("span",{onClick:Ge,children:"Select All"})]})]}),!N&&R&&(L.current.length>0||Re.length)>0&&k.jsx("div",{onClick:Se=>Le(Se),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:H?wt(H):k.jsx(yu,{width:16,height:16})}),j?wt(j):k.jsx("div",{style:{display:"grid",placeItems:"center",transform:_e?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!p&&k.jsx(Eh,{})})]}),a&&(a==null?void 0:a.visible)&&k.jsx("div",{className:`${si.dropdownHelperText} ${a!=null&&a.error?si.error:""}`,children:!_e&&k.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},HL="Tooltip-module__tooltipContainer",$L="Tooltip-module__tooltipContent",WL="Tooltip-module__top",zL="Tooltip-module__right",GL="Tooltip-module__bottom",UL="Tooltip-module__left",KL="Tooltip-module__tooltipTitle",jL="Tooltip-module__tooltipText",qL="Tooltip-module__dark",Pa={tooltipContainer:HL,tooltipContent:$L,top:WL,right:zL,bottom:GL,left:UL,tooltipTitle:KL,tooltipText:jL,dark:qL},YL=({children:e,tooltipSlot:t,delay:i,placement:n="top",trigger:r="click",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",fixedPosition:c=!1,theme:h})=>{const f=ve.useRef(null),p=ve.useRef(null),g=ve.useRef({top:0,left:0});let m;const[C,x]=ve.useState(!1),T=()=>{r==="hover"&&(m=setTimeout(()=>{x(!0)},i||400))},R=()=>{r==="hover"&&(clearTimeout(m),setTimeout(()=>{x(!1)},i||400))},A=()=>{r==="click"&&x(G=>!G)},z=G=>{G.composedPath().includes(f.current)||x(!1)};return ve.useEffect(()=>(document.addEventListener("click",z),()=>{document.removeEventListener("click",z)}),[]),ve.useEffect(()=>{const G=p.current;G&&G.style.setProperty("--pointer-position",`${d}`)},[C]),k.jsxs("div",{ref:f,className:`${h==="dark"?Pa.dark:""} ${Pa.tooltipContainer}`,onClick:A,onMouseEnter:T,onMouseLeave:R,children:[e,C&&t?t():C&&k.jsxs("div",{style:c?{...s??{},top:g.current.top,left:g.current.left,position:"fixed",zIndex:"150"}:{...s??{}},onClick:G=>G.stopPropagation(),ref:p,className:`${Pa.tooltipContent} ${n?Pa[n]:Pa.bottom}`,children:[a&&a.length>0&&k.jsx("h2",{className:Pa.tooltipTitle,style:l??{},children:a}),o&&o.length>0&&k.jsx("p",{className:Pa.tooltipText,style:u??{},children:o})]})]})},XL="Popup-module__modalOverlay",ZL="Popup-module__popupDrawerMode",QL="Popup-module__popupContainer",JL="Popup-module__EnterFromLeft",eP="Popup-module__fadeIn",tP="Popup-module__withOptions",iP="Popup-module__horizontal",nP="Popup-module__popupHeader",rP="Popup-module__popupTitle",aP="Popup-module__popupDescription",oP="Popup-module__typeIcon",sP="Popup-module__icon",lP="Popup-module__templateWrapper",uP="Popup-module__dark",gn={modalOverlay:XL,popupDrawerMode:ZL,popupContainer:QL,enterFromLeft:JL,fadeIn:eP,withOptions:tP,horizontal:iP,popupHeader:nP,popupTitle:rP,popupDescription:aP,typeIcon:oP,icon:sP,templateWrapper:lP,dark:uP},dP=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]},cP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),hP=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 fP=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},pP=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:k.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"})}),vP=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:k.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"})}),xI=({width:e,color:t})=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:k.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"})}),Lg=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,theme:h})=>{const f=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return k.jsx(xI,{});case"unsaved":return k.jsx(vP,{});case"success":return k.jsx(pP,{})}},p=()=>{a&&typeof a=="function"&&a(!1)},g=ve.useRef(null),m=C=>{C.target===g.current&&r&&typeof r=="function"&&r(!1)};return ve.useEffect(()=>(document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}),[]),e&&k.jsx("div",{ref:g,style:s??{},className:`
|
|
31
|
+
<%s key={someKey} {...props} />`,Cf,ka,Xk,ka),Ra[ka+Cf]=!0}}return Z===n?mf(di):gf(di),di}}function Kk(Z,Te,Ne){return _r(Z,Te,Ne,!0)}function jk(Z,Te,Ne){return _r(Z,Te,Ne,!1)}var qk=jk,Yk=Kk;Ks.Fragment=n,Ks.jsx=qk,Ks.jsxs=Yk}()),Ks}process.env.NODE_ENV==="production"?o_.exports=Qk():o_.exports=Jk();var k=o_.exports;const eB="MainButton-module__mainButton",tB="MainButton-module__sm",iB="MainButton-module__onlyIcon",nB="MainButton-module__buttonSlot",rB="MainButton-module__buttonLabel",aB="MainButton-module__md",oB="MainButton-module__lg",sB="MainButton-module__xl",lB="MainButton-module__xl2",uB="MainButton-module__disabled",dB="MainButton-module__dark",Ba={mainButton:eB,sm:tB,onlyIcon:iB,buttonSlot:nB,buttonLabel:rB,md:aB,lg:oB,xl:sB,xl2:lB,disabled:uB,dark:dB},iu=({label:e,buttonType:t="button",onClick:i,size:n="md",disabled:r,withIcons:a,iconOne:o,iconTwo:s,onlyIcon:l,buttonStyle:u,labelStyle:d,buttonSlotStyle:c,theme:h="light"})=>k.jsx("button",{type:t,style:u&&typeof u=="object"?u:{},className:`${h==="dark"?Ba.dark:""} ${Ba.mainButton} ${l?Ba.onlyIcon:""} ${n?Ba[n]:""} ${r?Ba.disabled:""}`,onClick:()=>{i&&typeof i=="function"&&i()},children:k.jsxs("div",{className:Ba.buttonSlot,style:c??{},children:[l||a&&o?o:"",!l&&k.jsx("span",{style:d??{},className:Ba.buttonLabel,children:e??"Button"}),a&&s?s:""]})}),cB="FormInput-module__inputWrapper",hB="FormInput-module__inputLabel",fB="FormInput-module__required",pB="FormInput-module__inputContainer",vB="FormInput-module__inputContent",_B="FormInput-module__inputTags",gB="FormInput-module__focused",mB="FormInput-module__error",CB="FormInput-module__rightIcon",yB="FormInput-module__leftIcon",xB="FormInput-module__inputDropDown",bB="FormInput-module__http",SB="FormInput-module__disabled",EB="FormInput-module__sm",wB="FormInput-module__md",IB="FormInput-module__withCopy",TB="FormInput-module__inputHelperText",AB="FormInput-module__dark",ci={inputWrapper:cB,inputLabel:hB,required:fB,inputContainer:pB,inputContent:vB,inputTags:_B,focused:gB,error:mB,rightIcon:CB,leftIcon:yB,inputDropDown:xB,http:bB,disabled:SB,sm:EB,md:wB,withCopy:IB,inputHelperText:TB,dark:AB},Eh=({width:e,height:t,color:i})=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:k.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),DB=({width:e,height:t,color:i})=>k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[k.jsx("g",{clipPath:"url(#clip0_444_26)",children:k.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"})}),k.jsx("defs",{children:k.jsx("clipPath",{id:"clip0_444_26",children:k.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),yu=e=>k.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:k.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"})}),OB="Checkbox-module__checkboxWrapper",RB="Checkbox-module__sm",kB="Checkbox-module__md",BB="Checkbox-module__checkMark",LB="Checkbox-module__checked",PB="Checkbox-module__disabled",FB="Checkbox-module__dark",No={checkboxWrapper:OB,sm:RB,md:kB,checkMark:BB,checked:LB,disabled:PB,dark:FB},gI=({color:e,width:t,height:i})=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:k.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),mI=e=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:k.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),wh=({checked:e,change:t,disabled:i,required:n,multipleChecked:r,size:a="md",activeStyle:o,checkBoxStyle:s,theme:l="light"})=>{const u=ve.useRef(null),[d,c]=ve.useState(!1),h=()=>{t&&typeof t=="function"&&t(!e)},f=()=>d?o??{}:s??{};return k.jsxs("div",{style:f(),className:` ${l==="dark"?No.dark:""} ${No.checkboxWrapper} ${No[a]} ${e?No.checked:No.unChecked} ${i?No.disabled:""}`,onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onMouseLeave:()=>c(!1),onClick:h,children:[k.jsx("input",{ref:u,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?k.jsx(mI,{}):k.jsx(gI,{}):""]})},MB="Tag-module__tagContainer",VB="Tag-module__onlyLabel",NB="Tag-module__sm",HB="Tag-module__md",$B="Tag-module__lg",WB="Tag-module__tagLabel",zB="Tag-module__tagNumber",GB="Tag-module__tagClose",UB="Tag-module__dark",La={tagContainer:MB,onlyLabel:VB,sm:NB,md:HB,lg:$B,tagLabel:WB,tagNumber:zB,tagClose:GB,dark:UB},Bg=({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,C=()=>i,x=()=>{d&&typeof d=="function"&&d(e??null)};return k.jsxs("div",{style:c??{},className:`${g==="dark"?La.dark:""} ${La.tagContainer} ${m()?La.onlyLabel:""} ${La[u??"md"]}`,children:[r&&k.jsx(wh,{...s}),i&&C(),t&&k.jsx("p",{style:h??{},className:La.tagLabel,children:t??""}),a&&k.jsx("div",{style:f??{},className:La.tagNumber,children:o??""}),n&&k.jsx("div",{style:p??{},className:La.tagClose,onClick:x,children:k.jsx(yu,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},CI=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFouce:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:g,onRightIconIconMouseEnter:m,onRightIconIconMouseLeave:C,onLeftIconIconClick:x,onLeftIconIconMouseEnter:T,onLeftIconIconMouseLeave:R,onPressEnter:A,rightIcon:z,leftIcon:G,withDropDown:N,dropdownData:K,onSelectData:q,withTags:H,tagProps:F,withLink:j,withCopy:I,onCopy:Y,inputWrapperStyle:ue,inputLabelStyle:J,requiredStyle:se,inputContainerStyle:ae,leftIconStyle:Q,inputDropDownStyle:W,ulStyle:y,liStyle:w,httpStyle:E,inputStyle:B,rightIconStyle:V,withCopyStyle:U,inputHelperTextStyle:$,theme:ie="light"})=>{const[ne,_e]=ve.useState(!1),oe=ve.useRef(null),[Re,S]=ve.useState(!1);ve.useState(!1);const fe=ve.useRef(null),le=ve.useRef(null),[L,P]=ve.useState(!1),[X,ce]=ve.useState(1),Ce=Ge=>{let wt=Ge.target.value;wt.length===1&&(wt=wt.trim()),s&&typeof s=="function"&&s(f?wt.replace(/\d/g,""):wt)},re=()=>{S(!0),l&&typeof l=="function"&&l()},we=()=>{S(!1),u&&typeof u=="function"&&u()},Le=Ge=>{const wt=Ge.target.value,bt=wt.length===0;a==="number"&&(Ge.keyCode===69||!bt&&(Ge.keyCode===187||Ge.keyCode===107||Ge.keyCode===189||Ge.keyCode===109))&&Ge.preventDefault(),Ge.key==="Enter"&&wt&&wt.length>0&&A&&typeof A=="function"&&A(wt)},Ie=()=>{Y&&typeof Y=="function"&&Y(e)},We=Ge=>Ge,Qe=()=>{let Ge={};return I&&(Ge.borderTopRightRadius=0,Ge.borderBottomRightRadius=0,Ge.borderRight=0),N&&(Ge.paddingLeft=0),{...Ge,...ae??{}}},it=Ge=>{!Ge.composedPath().includes(le.current)&&Ge.composedPath().includes(fe.current)||P(!1)},Kt=Ge=>{ce(Ge.id),P(!1),q&&typeof q=="function"&&q(Ge)};ve.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),ve.useEffect(()=>(document.addEventListener("click",it),()=>{document.removeEventListener("click",it)}),[]);const wi=ve.useRef(!1);return ve.useEffect(()=>{wi.current?setTimeout(()=>{_e(Ge=>!Ge)},0):wi.current=!0},[]),k.jsxs("div",{className:`${ie==="dark"?ci.dark:""} ${ci.inputWrapper}`,style:ue??{},children:[t&&k.jsxs("label",{className:ci.inputLabel,style:J??{},children:[t," ",k.jsx("span",{className:ci.required,style:se??{},children:n&&"*"})]}),k.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[k.jsxs("div",{style:Qe(),className:`${ci.inputContainer} ${Re&&!c?ci.focused:""} ${r?ci.disabled:""} ${d!=null&&d.error?ci.error:""} ${ci[o??"sm"]}`,children:[!N&&!j&&G&&k.jsx("div",{className:ci.leftIcon,style:Q??{},onClick:()=>{x&&typeof x=="function"&&x()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{R&&typeof R=="function"&&R()},children:We(G)}),!j&&N&&k.jsxs("div",{className:ci.inputDropDown,style:W??{},onClick:()=>P(!0),ref:fe,children:[K.find(Ge=>Ge.id===X).label,L&&k.jsx("ul",{ref:le,style:y??{},children:K&&K.length&&K.map((Ge,wt)=>k.jsx("li",{style:w??{},onClick:()=>Kt(Ge),children:(Ge==null?void 0:Ge.label)??"-"},Ge.id))}),k.jsx(Eh,{})]}),j&&k.jsx("div",{className:`${ci.inputDropDown} ${ci.http}`,style:E??{},onClick:()=>P(!0),ref:fe,children:"http://"}),k.jsxs("div",{className:ci.inputContent,children:[H&&p&&p.length>0&&k.jsx("div",{className:ci.inputTags,children:p.map((Ge,wt)=>k.jsx("div",{className:ci.inputSingleTags,children:k.jsx(Bg,{...F,id:Ge,label:Ge,withClose:!0})},wt))}),k.jsx("input",{ref:oe,style:B??{},type:a??"text",value:e,onChange:Ge=>Ce(Ge),onFocus:re,onBlur:we,disabled:r,required:n,onKeyDown:Le,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),z&&k.jsx("div",{className:ci.rightIcon,style:V??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{C&&typeof C=="function"&&C()},children:We(z)})]}),I&&k.jsxs("div",{style:U??{},onClick:Ie,className:ci.withCopy,children:[k.jsx(DB,{}),k.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&k.jsx("div",{style:$??{},className:`${ci.inputHelperText} ${d!=null&&d.error?ci.error:""}`,children:k.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},KB="Textarea-module__textareaContainer",jB="Textarea-module__textAreaLabel",qB="Textarea-module__required",YB="Textarea-module__wrap",XB="Textarea-module__textarea",ZB="Textarea-module__focused",QB="Textarea-module__disabled",JB="Textarea-module__error",eL="Textarea-module__helperTextStyle",tL="Textarea-module__dark",an={textareaContainer:KB,textAreaLabel:jB,required:qB,wrap:YB,textarea:XB,focused:ZB,disabled:QB,error:JB,helperTextStyle:eL,dark:tL},iL=({width:e,height:t,color:i})=>k.jsxs("svg",{width:e??"16",height:t??"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("g",{id:"help-circle",clipPath:"url(#clip0_433_6293)",children:k.jsx("path",{id:"Icon",d:"M6.05992 5.99998C6.21665 5.55442 6.52602 5.17872 6.93322 4.9394C7.34042 4.70009 7.81918 4.61261 8.2847 4.69245C8.75022 4.7723 9.17246 5.01433 9.47664 5.37567C9.78081 5.737 9.94729 6.19433 9.94659 6.66665C9.94659 7.99998 7.94659 8.66665 7.94659 8.66665M7.99992 11.3333H8.00659M14.6666 7.99998C14.6666 11.6819 11.6818 14.6666 7.99992 14.6666C4.31802 14.6666 1.33325 11.6819 1.33325 7.99998C1.33325 4.31808 4.31802 1.33331 7.99992 1.33331C11.6818 1.33331 14.6666 4.31808 14.6666 7.99998Z",stroke:i??"#A4A7AE",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),k.jsx("defs",{children:k.jsx("clipPath",{id:"clip0_433_6293",children:k.jsx("rect",{width:e??"16",height:t??"16",fill:"white"})})})]}),nL=({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,theme:C})=>{const[x,T]=ve.useState(!1),R=G=>{let N=G.target.value;s&&typeof s=="function"&&s(N)},A=()=>{T(!0),l&&typeof l=="function"&&l()},z=()=>{T(!1),u&&typeof u=="function"&&u()};return k.jsxs("div",{style:h??{},className:`${C==="dark"?an.dark:""} ${an.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?an[i==null?void 0:i.type]:""} ${d?an.disabled:null}`,children:[t&&k.jsxs("div",{style:f,className:an.textAreaLabel,children:[k.jsx("p",{children:t}),k.jsx("span",{style:p??{},className:an.required,children:c&&"*"}),k.jsx(iL,{})]}),k.jsx("div",{className:an.wrap,children:k.jsx("textarea",{style:g??{},className:`${an.textarea} ${x?an.focused:""} ${d?an.disabled:""} ${i!=null&&i.error?an.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:o??null,onFocus:A,disabled:d,onBlur:z,onChange:R})}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&k.jsx("div",{style:m??{},className:`${an.helperTextStyle} ${i!=null&&i.error?an.error:""}`,children:k.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},rL="Toggle-module__toggleWrapper",aL="Toggle-module__toggleState",oL="Toggle-module__checked",sL="Toggle-module__disabled",lL="Toggle-module__dark",js={toggleWrapper:rL,toggleState:aL,checked:oL,disabled:sL,dark:lL},uL=({checked:e,change:t,disabled:i,required:n,activeStyle:r,bgStyle:a,checkedBgStyle:o,disabledBgStyle:s,circleStyle:l,checkedCircleStyle:u,disabledCircleStyle:d,theme:c="light"})=>{const[h,f]=ve.useState(!1),p=()=>{t&&typeof t=="function"&&t(!e)},g=()=>{if(h)return r??{};if(e){if(o)return o}else if(e){if(i&&s)return s}else if(a)return a;return{}},m=()=>{if(e){if(u)return u}else if(e){if(i&&d)return d}else if(l)return l;return{}};return k.jsx("div",{style:g(),onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onMouseLeave:()=>f(!1),onClick:p,className:`${c==="dark"?js.dark:""} ${js.toggleWrapper} ${e?js.checked:""} ${i?js.disabled:""}`,children:k.jsx("div",{style:m(),className:js.toggleState,children:k.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},dL="Radio-module__radioWrapper",cL="Radio-module__sm",hL="Radio-module__md",fL="Radio-module__checked",pL="Radio-module__innerCircle",vL="Radio-module__radioState",_L="Radio-module__disabled",gL="Radio-module__dark",qr={radioWrapper:dL,sm:cL,md:hL,checked:fL,innerCircle:pL,radioState:vL,disabled:_L,dark:gL},yI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!0,size:a,theme:o="light"})=>{ve.useState(!1);const s=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return k.jsxs("div",{className:`${o==="dark"?qr.dark:""} ${qr.radioWrapper} ${qr[a]??qr.md} ${e?qr.checked:""} ${i?qr.disabled:""}`,onClick:s,children:[k.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),k.jsx("div",{className:qr.radioState,children:k.jsx("div",{className:qr.innerCircle})})]})},mL="Dropdown-module__dropdownWrapper",CL="Dropdown-module__placeHolder",yL="Dropdown-module__dropdownLabel",xL="Dropdown-module__required",bL="Dropdown-module__dropdownContainer",SL="Dropdown-module__sm",EL="Dropdown-module__md",wL="Dropdown-module__selectedTags",IL="Dropdown-module__selectedList",TL="Dropdown-module__additional",AL="Dropdown-module__dropdownListContainer",DL="Dropdown-module__dropdownList",OL="Dropdown-module__checkIcon",RL="Dropdown-module__disabled",kL="Dropdown-module__selected",BL="Dropdown-module__dropdownListFooter",LL="Dropdown-module__focused",PL="Dropdown-module__error",FL="Dropdown-module__dropdownHelperText",ML="Dropdown-module__dark",si={dropdownWrapper:mL,placeHolder:CL,dropdownLabel:yL,required:xL,dropdownContainer:bL,sm:SL,md:EL,selectedTags:wL,selectedList:IL,additional:TL,dropdownListContainer:AL,dropdownList:DL,checkIcon:OL,disabled:RL,selected:kL,dropdownListFooter:BL,focused:LL,error:PL,dropdownHelperText:FL,dark:ML},VL=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:k.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"})}),NL=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:k.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"})}),s_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,withClearAll:c=!0,withSelectAll:h=!0,withPlus:f=!1,searchComponent:p=!1,withFooter:g=!0,data:m,onSelect:C,selectedOptionID:x,withFilter:T=!0,withClose:R=!0,fixedDropdown:A=!1,onSearch:z,pagination:G,withMultiSelect:N=!1,skipSelected:K,labelIcon:q,closeIcon:H,dropdownIcon:F,iconDown:j,onLabelIconClick:I,onLabelIconMouseEnter:Y,onLabelIconMouseLeave:ue,dropdownWrapperStyle:J,dropdownLabelStyle:se,requiredStyle:ae,labelIconStyle:Q,dropdownContainerStyle:W,placeHolderStyle:y,selectedTagsStyle:w,selectedListStyle:E,additionalStyle:B,dropdownListStyle:V,listStyle:U,theme:$="light"})=>{const[ie,ne]=ve.useState(!1),[_e,oe]=ve.useState(!1),[Re,S]=ve.useState(""),[fe,le]=ve.useState("");ve.useState(null);const L=ve.useRef([]),P=ve.useRef(null),X=ve.useRef(null),ce=ve.useRef({}),Ce=(Se,Xe)=>{const Wt=new Set;return Se.filter(ai=>Wt.has(ai[Xe])?!1:(Wt.add(ai[Xe]),!0))},re=Se=>{var Xe;ce.current=Se,S((Xe=ce.current)==null?void 0:Xe.label),C&&typeof C=="function"&&C(ce.current),oe(!1)},we=Se=>{L.current=[...L.current,...m.filter(Xe=>Xe.selected==!0),...m.filter(Xe=>Xe.id===Se.id)],Se.selected=!Se.selected,L.current=Ce(L.current,"id").filter(Xe=>Xe.selected),C&&typeof C=="function"&&C(L.current),p||S(L.current.map(Xe=>Xe.label).join(", ")),ne(Xe=>!Xe)},Le=Se=>{Se.stopPropagation(),L.current=[],x=null,m&&m.length>0&&m.forEach(Xe=>Xe.selected=!1),Ie(""),C(N?[]:{}),S("")},Ie=Se=>{z&&typeof z=="function"&&z(Se),le(Se),S(Se)},We=()=>{if(x||x===0){let Se=m.filter(Xe=>Number(Xe.id)===Number(x));Se&&Se[0]&&(ce.current=Se[0],K?(z&&typeof z=="function"&&z(ce.current.label),S(ce.current.label),closeOnSelect&&setCollapsed(Xe=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):re(Se[0]))}},[Qe,it]=ve.useState(!1),Kt=Se=>{let Xe=P.current.querySelector("ul"),ai=Math.abs(Xe.scrollTop+Xe.clientHeight-Xe.scrollHeight)<=2;G&&ai&&!Qe&&(d&&typeof d=="function"&&d(!0),it(!0)),ai||it(!1)},wi=()=>{m.forEach(Se=>{Se.selected=!1}),L.current=[],C([]),S(""),l&&typeof l=="function"&&l(),ne(Se=>!Se)},Ge=()=>{m.forEach(Se=>{Se!=null&&Se.id&&(Se==null?void 0:Se.id)!==null&&(Se!=null&&Se.label)&&(Se==null?void 0:Se.label)!==""&&(Se==null?void 0:Se.label)!=="-"&&!Se.disabled&&(Se.selected=!0)}),L.current=m,L.current=Ce(L.current,"id").filter(Se=>Se.selected),S(L.current.map(Se=>Se.label).join(", ")),u&&typeof u=="function"&&u(),C(L.current),ne(Se=>!Se)},wt=Se=>Se,bt=Se=>{Se.composedPath().includes(P.current)||oe(!1)},Ki=Se=>{if(A){if(Se.composedPath().includes(P.current))return;oe(!1)}},rn=()=>{const Se=P.current,Xe=X.current;if(!Xe||!Se)return;const Wt=Se.getBoundingClientRect(),ai=window.innerHeight;A?(Xe.style.position="fixed",Xe.style.width=Wt.width+"px",Xe.style.left=`${Wt.left+window.pageXOffset}px`,Wt.bottom+Xe.offsetHeight>ai?(Xe.style.top=`${window.scrollY+Wt.top-Xe.offsetHeight-8}px`,Xe.style.bottom="unset"):(Xe.style.top=`${window.scrollY+Wt.bottom}px`,Xe.style.bottom="unset")):Wt.bottom>ai?(Xe.style.top="unset",Xe.style.bottom="calc(100% + 8px)"):(Xe.style.bottom="unset",Xe.style.top="calc(100% + 8px)")},ui=ve.useRef(null);return ve.useEffect(()=>{_e&&ui.current&&ui.current.focus()},[_e]),ve.useEffect(()=>{N&&(L.current=m.filter(Se=>Se.selected),S(m.filter(Se=>Se.selected).map(Se=>Se.label).join(", ")))},[]),ve.useEffect(()=>{p&&s&&s.length>0&&le(s)},[]),ve.useEffect(()=>{rn()},[X,_e]),ve.useEffect(()=>{N||We()},[x]),ve.useEffect(()=>(document.addEventListener("click",bt),document.addEventListener("wheel",Ki),()=>{document.removeEventListener("click",bt),document.removeEventListener("wheel",Ki)}),[]),k.jsxs("div",{className:`${$==="dark"?si.dark:""} ${si.dropdownWrapper}`,style:J??{},children:[e&&k.jsxs("label",{className:si.dropdownLabel,style:se??{},children:[e," ",k.jsx("span",{className:si.required,style:ae??{},children:i&&"*"}),k.jsxs("span",{style:{...Q??{},display:"grid",placeItems:"center"},onClick:()=>{I&&typeof I=="function"&&I()},onMouseEnter:()=>{Y&&typeof Y=="function"&&Y()},onMouseLeave:()=>{ue&&typeof ue=="function"&&ue()},children:[" ",wt(q)]})]}),k.jsxs("div",{ref:P,onClick:()=>(oe(Se=>!Se),rn()),className:`${si.dropdownContainer} ${_e&&!o?si.focused:""} ${t?si.disabled:""} ${a!=null&&a.error?si.error:""} ${si[n]}`,style:W??{},children:[p?k.jsxs("div",{children:[" ",k.jsx(NL,{})]}):k.jsx(k.Fragment,{children:F&&k.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:wt(F)})}),!p&&N&&r&&!_e&&L.current.length===0&&k.jsx("span",{className:si.placeHolder,style:y??{},children:r??""}),N&&k.jsx("div",{className:si.selectedTags,style:w??{},children:!p&&!_e?k.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:[L.current.slice(0,3).map((Se,Xe)=>{let Wt=L.current[L.current.length-1];return k.jsxs("span",{className:si.selectedList,style:E??{},children:[!f&&Se.label,!f&&Se.id!==Wt.id&&Xe!==2?", ":""]},Se==null?void 0:Se.id)}),!f&&L.current.length>3&&k.jsxs("span",{className:si.additional,style:B??{},children:[" ","+(",L.current.length-3,")"]})]}):k.jsx("input",{ref:ui,onClick:Se=>(Se.stopPropagation(),oe(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...p?{value:fe}:{},onChange:Se=>Ie(Se.target.value)},x)}),k.jsx("input",{autoCorrect:"off",hidden:N,placeholder:r,readOnly:!T||!_e||N,type:"text",value:N&&!p&&_e?"":Re,onChange:Se=>Ie(Se.target.value)},x),m&&m.length>0&&_e&&k.jsxs("div",{ref:X,onClick:Se=>Se.stopPropagation(),className:si.dropdownListContainer,children:[k.jsx("ul",{onScroll:Se=>Kt(),onClick:Se=>Se.stopPropagation(),className:si.dropdownList,style:V??{},children:m.map(Se=>{var Xe,Wt,ai,Oi;return k.jsxs("li",{style:U??{},className:`${!(Se!=null&&Se.label)||Se.label===void 0||Se!=null&&Se.disabled?si.disabled:""} ${(N?Se.selected:(Xe=ce.current)!=null&&Xe.id&&((Wt=ce.current)==null?void 0:Wt.id)===Se.id)?si.selected:""}`,onClick:()=>{N?we(Se):re(Se)},children:[k.jsxs("p",{children:[" ",Se!=null&&Se.customLabel?Se.customLabel():(Se==null?void 0:Se.label)??"-"]}),f?k.jsx(k.Fragment,{children:Se.selected?k.jsx(mI,{}):k.jsx(VL,{})}):(N?Se.selected:((ai=ce.current)==null?void 0:ai.id)&&((Oi=ce.current)==null?void 0:Oi.id)===Se.id)&&k.jsx("span",{className:si.checkIcon,children:k.jsx(gI,{color:"#7F56D9",width:20,height:20})})]},Se==null?void 0:Se.id)})}),N&&g&&k.jsxs("div",{className:si.dropdownListFooter,children:[c&&k.jsx("span",{onClick:wi,children:"Clear All"}),h&&k.jsx("span",{onClick:Ge,children:"Select All"})]})]}),!N&&R&&(L.current.length>0||Re.length)>0&&k.jsx("div",{onClick:Se=>Le(Se),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:H?wt(H):k.jsx(yu,{width:16,height:16})}),j?wt(j):k.jsx("div",{style:{display:"grid",placeItems:"center",transform:_e?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!p&&k.jsx(Eh,{})})]}),a&&(a==null?void 0:a.visible)&&k.jsx("div",{className:`${si.dropdownHelperText} ${a!=null&&a.error?si.error:""}`,children:!_e&&k.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},HL="Tooltip-module__tooltipContainer",$L="Tooltip-module__tooltipContent",WL="Tooltip-module__top",zL="Tooltip-module__right",GL="Tooltip-module__bottom",UL="Tooltip-module__left",KL="Tooltip-module__tooltipTitle",jL="Tooltip-module__tooltipText",qL="Tooltip-module__dark",Pa={tooltipContainer:HL,tooltipContent:$L,top:WL,right:zL,bottom:GL,left:UL,tooltipTitle:KL,tooltipText:jL,dark:qL},YL=({children:e,tooltipSlot:t,delay:i,placement:n="top",trigger:r="click",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",fixedPosition:c=!1,theme:h})=>{const f=ve.useRef(null),p=ve.useRef(null),g=ve.useRef({top:0,left:0});let m;const[C,x]=ve.useState(!1),T=()=>{r==="hover"&&(m=setTimeout(()=>{x(!0)},i||400))},R=()=>{r==="hover"&&(clearTimeout(m),setTimeout(()=>{x(!1)},i||400))},A=()=>{r==="click"&&x(G=>!G)},z=G=>{G.composedPath().includes(f.current)||x(!1)};return ve.useEffect(()=>(document.addEventListener("click",z),()=>{document.removeEventListener("click",z)}),[]),ve.useEffect(()=>{const G=p.current;G&&G.style.setProperty("--pointer-position",`${d}`)},[C]),k.jsxs("div",{ref:f,className:`${h==="dark"?Pa.dark:""} ${Pa.tooltipContainer}`,onClick:A,onMouseEnter:T,onMouseLeave:R,children:[e,C&&t?t():C&&k.jsxs("div",{style:c?{...s??{},top:g.current.top,left:g.current.left,position:"fixed",zIndex:"150"}:{...s??{}},onClick:G=>G.stopPropagation(),ref:p,className:`${Pa.tooltipContent} ${n?Pa[n]:Pa.bottom}`,children:[a&&a.length>0&&k.jsx("h2",{className:Pa.tooltipTitle,style:l??{},children:a}),o&&o.length>0&&k.jsx("p",{className:Pa.tooltipText,style:u??{},children:o})]})]})},XL="Popup-module__modalOverlay",ZL="Popup-module__popupDrawerMode",QL="Popup-module__popupContainer",JL="Popup-module__EnterFromLeft",eP="Popup-module__fadeIn",tP="Popup-module__withOptions",iP="Popup-module__horizontal",nP="Popup-module__popupHeader",rP="Popup-module__popupTitle",aP="Popup-module__popupDescription",oP="Popup-module__typeIcon",sP="Popup-module__icon",lP="Popup-module__templateWrapper",uP="Popup-module__dark",gn={modalOverlay:XL,popupDrawerMode:ZL,popupContainer:QL,enterFromLeft:JL,fadeIn:eP,withOptions:tP,horizontal:iP,popupHeader:nP,popupTitle:rP,popupDescription:aP,typeIcon:oP,icon:sP,templateWrapper:lP,dark:uP},dP=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]},cP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),hP=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 fP=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},pP=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:k.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"})}),vP=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:k.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"})}),xI=({width:e,color:t})=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:k.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"})}),Lg=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,theme:h})=>{const f=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return k.jsx(xI,{});case"unsaved":return k.jsx(vP,{});case"success":return k.jsx(pP,{})}},p=()=>{a&&typeof a=="function"&&a(!1)},g=ve.useRef(null),m=C=>{C.target===g.current&&r&&typeof r=="function"&&r(!1)};return ve.useEffect(()=>(document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}),[]),e&&k.jsx("div",{ref:g,style:s??{},className:`
|
|
32
32
|
${h==="dark"?gn.dark:""}
|
|
33
33
|
${gn.modalOverlay}
|
|
34
34
|
${i&&(i==null?void 0:i.mode)==="drawer"?gn.popupDrawerMode:""}
|
|
@@ -1128,10 +1128,10 @@ const nB = "MainButton-module__mainButton", rB = "MainButton-module__sm", aB = "
|
|
|
1128
1128
|
radioState: gL,
|
|
1129
1129
|
disabled: mL,
|
|
1130
1130
|
dark: CL
|
|
1131
|
-
}, yL = ({ checked: e, change: t, disabled: i,
|
|
1131
|
+
}, yL = ({ checked: e, change: t, disabled: i, required: n, withUncheckState: r = !0, size: a, theme: o = "light" }) => {
|
|
1132
1132
|
Qe(!1);
|
|
1133
1133
|
const s = () => {
|
|
1134
|
-
t && typeof t == "function" && (
|
|
1134
|
+
t && typeof t == "function" && (console.log(e), t(r ? !e : !0));
|
|
1135
1135
|
};
|
|
1136
1136
|
return /* @__PURE__ */ k.jsxs(
|
|
1137
1137
|
"div",
|
|
@@ -1139,7 +1139,7 @@ const nB = "MainButton-module__mainButton", rB = "MainButton-module__sm", aB = "
|
|
|
1139
1139
|
className: `${o === "dark" ? Zr.dark : ""} ${Zr.radioWrapper} ${Zr[a] ?? Zr.md} ${e ? Zr.checked : ""} ${i ? Zr.disabled : ""}`,
|
|
1140
1140
|
onClick: s,
|
|
1141
1141
|
children: [
|
|
1142
|
-
/* @__PURE__ */ k.jsx("input", { type: "radio", checked: !0, readOnly: !0, hidden: !0, disabled: i ?? !1, required: n
|
|
1142
|
+
/* @__PURE__ */ k.jsx("input", { type: "radio", checked: !0, readOnly: !0, hidden: !0, disabled: i ?? !1, required: n }),
|
|
1143
1143
|
/* @__PURE__ */ k.jsx("div", { className: Zr.radioState, children: /* @__PURE__ */ k.jsx("div", { className: Zr.innerCircle }) })
|
|
1144
1144
|
]
|
|
1145
1145
|
}
|