master-components-react 2.2.4 → 2.2.5
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} />`,yf,ka,Zk,ka),Ra[ka+yf]=!0}}return Z===n?Cf(di):mf(di),di}}function jk(Z,Te,Ne){return _r(Z,Te,Ne,!0)}function qk(Z,Te,Ne){return _r(Z,Te,Ne,!1)}var Yk=qk,Xk=jk;Ks.Fragment=n,Ks.jsx=Yk,Ks.jsxs=Xk}()),Ks}process.env.NODE_ENV==="production"?s_.exports=Jk():s_.exports=eB();var k=s_.exports;const tB="MainButton-module__mainButton",iB="MainButton-module__sm",nB="MainButton-module__onlyIcon",rB="MainButton-module__buttonSlot",aB="MainButton-module__buttonLabel",oB="MainButton-module__md",sB="MainButton-module__lg",lB="MainButton-module__xl",uB="MainButton-module__xl2",dB="MainButton-module__disabled",cB="MainButton-module__dark",Ba={mainButton:tB,sm:iB,onlyIcon:nB,buttonSlot:rB,buttonLabel:aB,md:oB,lg:sB,xl:lB,xl2:uB,disabled:dB,dark:cB},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:""]})}),hB="FormInput-module__inputWrapper",fB="FormInput-module__inputLabel",pB="FormInput-module__required",vB="FormInput-module__inputContainer",_B="FormInput-module__inputContent",gB="FormInput-module__inputTags",mB="FormInput-module__focused",CB="FormInput-module__error",yB="FormInput-module__rightIcon",xB="FormInput-module__leftIcon",bB="FormInput-module__inputDropDown",SB="FormInput-module__http",EB="FormInput-module__disabled",wB="FormInput-module__sm",IB="FormInput-module__md",TB="FormInput-module__withCopy",AB="FormInput-module__inputHelperText",DB="FormInput-module__dark",ci={inputWrapper:hB,inputLabel:fB,required:pB,inputContainer:vB,inputContent:_B,inputTags:gB,focused:mB,error:CB,rightIcon:yB,leftIcon:xB,inputDropDown:bB,http:SB,disabled:EB,sm:wB,md:IB,withCopy:TB,inputHelperText:AB,dark:DB},wh=({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"})}),OB=({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"})}),RB="Checkbox-module__checkboxWrapper",kB="Checkbox-module__sm",BB="Checkbox-module__md",LB="Checkbox-module__checkMark",PB="Checkbox-module__checked",FB="Checkbox-module__disabled",MB="Checkbox-module__dark",No={checkboxWrapper:RB,sm:kB,md:BB,checkMark:LB,checked:PB,disabled:FB,dark:MB},mI=({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"})}),CI=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"})}),Ih=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,theme:l="light",...u})=>{const d=ve.useRef(null),[c,h]=ve.useState(!1),f=()=>{t&&typeof t=="function"&&t(!e)},p=()=>c?o??{}:s??{};return k.jsxs("div",{style:p(),className:` ${l==="dark"?No.dark:""} ${No.checkboxWrapper} ${No[a]} ${e?No.checked:No.unChecked} ${i?No.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[k.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?k.jsx(CI,{}):k.jsx(mI,{}):""]})},VB="Tag-module__tagContainer",NB="Tag-module__onlyLabel",HB="Tag-module__sm",$B="Tag-module__md",WB="Tag-module__lg",zB="Tag-module__tagLabel",GB="Tag-module__tagNumber",UB="Tag-module__tagClose",KB="Tag-module__dark",La={tagContainer:VB,onlyLabel:NB,sm:HB,md:$B,lg:WB,tagLabel:zB,tagNumber:GB,tagClose:UB,dark:KB},Lg=({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(Ih,{...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"})})]})},fc=({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:$,leftIcon:H,withDropDown:V,dropdownData:U,onSelectData:K,withTags:X,tagProps:M,withLink:q,withCopy:b,onCopy:j,inputWrapperStyle:ne,inputLabelStyle:J,requiredStyle:pe,inputContainerStyle:le,leftIconStyle:Q,inputDropDownStyle:z,ulStyle:y,liStyle:I,httpStyle:S,inputStyle:B,rightIconStyle:N,withCopyStyle:G,inputHelperTextStyle:W,theme:ie="light"})=>{const[re,_e]=ve.useState(!1),oe=ve.useRef(null),[Re,w]=ve.useState(!1);ve.useState(!1);const he=ve.useRef(null),se=ve.useRef(null),[L,P]=ve.useState(!1),[Y,de]=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)},ae=()=>{w(!0),l&&typeof l=="function"&&l()},we=()=>{w(!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=()=>{j&&typeof j=="function"&&j(e)},We=Ge=>Ge,Qe=()=>{let Ge={};return b&&(Ge.borderTopRightRadius=0,Ge.borderBottomRightRadius=0,Ge.borderRight=0),V&&(Ge.paddingLeft=0),{...Ge,...le??{}}},it=Ge=>{!Ge.composedPath().includes(se.current)&&Ge.composedPath().includes(he.current)||P(!1)},Kt=Ge=>{de(Ge.id),P(!1),K&&typeof K=="function"&&K(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:ne??{},children:[t&&k.jsxs("label",{className:ci.inputLabel,style:J??{},children:[t," ",k.jsx("span",{className:ci.required,style:pe??{},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:[!V&&!q&&H&&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(H)}),!q&&V&&k.jsxs("div",{className:ci.inputDropDown,style:z??{},onClick:()=>P(!0),ref:he,children:[U.find(Ge=>Ge.id===Y).label,L&&k.jsx("ul",{ref:se,style:y??{},children:U&&U.length&&U.map((Ge,wt)=>k.jsx("li",{style:I??{},onClick:()=>Kt(Ge),children:(Ge==null?void 0:Ge.label)??"-"},Ge.id))}),k.jsx(wh,{})]}),q&&k.jsx("div",{className:`${ci.inputDropDown} ${ci.http}`,style:S??{},onClick:()=>P(!0),ref:he,children:"http://"}),k.jsxs("div",{className:ci.inputContent,children:[X&&p&&p.length>0&&k.jsx("div",{className:ci.inputTags,children:p.map((Ge,wt)=>k.jsx("div",{className:ci.inputSingleTags,children:k.jsx(Lg,{...M,id:Ge,label:Ge,withClose:!0})},wt))}),k.jsx("input",{ref:oe,style:B??{},type:a??"text",value:e,onChange:Ge=>Ce(Ge),onFocus:ae,onBlur:we,disabled:r,required:n,onKeyDown:Le,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),$&&k.jsx("div",{className:ci.rightIcon,style:N??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{C&&typeof C=="function"&&C()},children:We($)})]}),b&&k.jsxs("div",{style:G??{},onClick:Ie,className:ci.withCopy,children:[k.jsx(OB,{}),k.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&k.jsx("div",{style:W??{},className:`${ci.inputHelperText} ${d!=null&&d.error?ci.error:""}`,children:k.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},jB="Textarea-module__textareaContainer",qB="Textarea-module__textAreaLabel",YB="Textarea-module__required",XB="Textarea-module__wrap",ZB="Textarea-module__textarea",QB="Textarea-module__focused",JB="Textarea-module__disabled",eL="Textarea-module__error",tL="Textarea-module__helperTextStyle",iL="Textarea-module__dark",an={textareaContainer:jB,textAreaLabel:qB,required:YB,wrap:XB,textarea:ZB,focused:QB,disabled:JB,error:eL,helperTextStyle:tL,dark:iL},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,labelIcon:x})=>{const[T,R]=ve.useState(!1),A=U=>{let K=U.target.value;s&&typeof s=="function"&&s(K)},$=U=>U,H=()=>{R(!0),l&&typeof l=="function"&&l()},V=()=>{R(!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&&"*"}),x&&$(x)]}),k.jsx("div",{className:an.wrap,children:k.jsx("textarea",{style:g??{},className:`${an.textarea} ${T?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:H,disabled:d,onBlur:V,onChange:A})}),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"})}),l_=({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:$,pagination:H,withMultiSelect:V=!1,skipSelected:U,labelIcon:K,closeIcon:X,dropdownIcon:M,iconDown:q,onLabelIconClick:b,onLabelIconMouseEnter:j,onLabelIconMouseLeave:ne,dropdownWrapperStyle:J,dropdownLabelStyle:pe,requiredStyle:le,labelIconStyle:Q,dropdownContainerStyle:z,placeHolderStyle:y,selectedTagsStyle:I,selectedListStyle:S,additionalStyle:B,dropdownListStyle:N,listStyle:G,theme:W="light"})=>{const[ie,re]=ve.useState(!1),[_e,oe]=ve.useState(!1),[Re,w]=ve.useState(""),[he,se]=ve.useState("");ve.useState(null);const L=ve.useRef([]),P=ve.useRef(null),Y=ve.useRef(null),de=ve.useRef({}),Ce=(Se,Xe)=>{const Wt=new Set;return Se.filter(ai=>Wt.has(ai[Xe])?!1:(Wt.add(ai[Xe]),!0))},ae=Se=>{var Xe;de.current=Se,w((Xe=de.current)==null?void 0:Xe.label),C&&typeof C=="function"&&C(de.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||w(L.current.map(Xe=>Xe.label).join(", ")),re(Xe=>!Xe)},Le=Se=>{Se.stopPropagation(),L.current=[],x=null,m&&m.length>0&&m.forEach(Xe=>Xe.selected=!1),Ie(""),V?C([]):(de.current={},C({})),w("")},Ie=Se=>{$&&typeof $=="function"&&$(Se),se(Se),w(Se)},We=()=>{if(x||x===0){let Se=m.filter(Xe=>Number(Xe.id)===Number(x));Se&&Se[0]&&(de.current=Se[0],U?($&&typeof $=="function"&&$(de.current.label),w(de.current.label),closeOnSelect&&setCollapsed(Xe=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):ae(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;H&&ai&&!Qe&&(d&&typeof d=="function"&&d(!0),it(!0)),ai||it(!1)},wi=()=>{m.forEach(Se=>{Se.selected=!1}),L.current=[],C([]),w(""),l&&typeof l=="function"&&l(),re(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),w(L.current.map(Se=>Se.label).join(", ")),u&&typeof u=="function"&&u(),C(L.current),re(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=Y.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(()=>{V&&(L.current=m.filter(Se=>Se.selected),w(m.filter(Se=>Se.selected).map(Se=>Se.label).join(", ")))},[]),ve.useEffect(()=>{p&&s&&s.length>0&&se(s)},[]),ve.useEffect(()=>{rn()},[Y,_e]),ve.useEffect(()=>{V||We()},[x]),ve.useEffect(()=>(document.addEventListener("click",bt),document.addEventListener("wheel",Ki),()=>{document.removeEventListener("click",bt),document.removeEventListener("wheel",Ki)}),[]),k.jsxs("div",{className:`${W==="dark"?si.dark:""} ${si.dropdownWrapper}`,style:J??{},children:[e&&k.jsxs("label",{className:si.dropdownLabel,style:pe??{},children:[e," ",k.jsx("span",{className:si.required,style:le??{},children:i&&"*"}),k.jsxs("span",{style:{...Q??{},display:"grid",placeItems:"center"},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{j&&typeof j=="function"&&j()},onMouseLeave:()=>{ne&&typeof ne=="function"&&ne()},children:[" ",wt(K)]})]}),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:z??{},children:[p?k.jsxs("div",{children:[" ",k.jsx(NL,{})]}):k.jsx(k.Fragment,{children:M&&k.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:wt(M)})}),!p&&V&&r&&!_e&&L.current.length===0&&k.jsx("span",{className:si.placeHolder,style:y??{},children:r??""}),V&&k.jsx("div",{className:si.selectedTags,style:I??{},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:S??{},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:he}:{},onChange:Se=>Ie(Se.target.value)},x)}),k.jsx("input",{autoCorrect:"off",hidden:V,placeholder:r,readOnly:!T||!_e||V,type:"text",value:V&&!p&&_e?"":Re,onChange:Se=>Ie(Se.target.value)},x),m&&m.length>0&&_e&&k.jsxs("div",{ref:Y,onClick:Se=>Se.stopPropagation(),className:si.dropdownListContainer,children:[k.jsx("ul",{onScroll:Se=>Kt(),onClick:Se=>Se.stopPropagation(),className:si.dropdownList,style:N??{},children:m.map(Se=>{var Xe,Wt,ai,Oi;return k.jsxs("li",{style:G??{},className:`${!(Se!=null&&Se.label)||Se.label===void 0||Se!=null&&Se.disabled?si.disabled:""} ${(V?Se.selected:(Xe=de.current)!=null&&Xe.id&&((Wt=de.current)==null?void 0:Wt.id)===Se.id)?si.selected:""}`,onClick:()=>{V?we(Se):ae(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(CI,{}):k.jsx(VL,{})}):(V?Se.selected:((ai=de.current)==null?void 0:ai.id)&&((Oi=de.current)==null?void 0:Oi.id)===Se.id)&&k.jsx("span",{className:si.checkIcon,children:k.jsx(mI,{color:"#7F56D9",width:20,height:20})})]},Se==null?void 0:Se.id)})}),V&&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"})]})]}),!V&&R&&(L.current.length>0||Re.length)>0&&k.jsx("div",{onClick:Se=>Le(Se),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:X?wt(X):k.jsx(yu,{width:16,height:16})}),q?wt(q):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(wh,{})})]}),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="hover",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",theme:c})=>{const h=ve.useRef(null),f=ve.useRef(null);let p;const[g,m]=ve.useState(!1),C=()=>{r==="hover"&&(p=setTimeout(()=>{m(!0)},i||400))},x=()=>{r==="hover"&&(clearTimeout(p),setTimeout(()=>{m(!1)},i||400))},T=()=>{r==="click"&&m($=>!$)},R=()=>{const $=h.current,H=f.current;if(!H||!$)return;const V=$.getBoundingClientRect();switch(H.style.position="fixed",n){case"top":H.style.top=`${V.top-H.offsetHeight-8}px`;break;case"bottom":H.style.top=`${V.bottom+8}px`;break;case"left":H.style.top=`${V.top+V.height/2-H.offsetHeight/2}px`,H.style.left=`${V.left-H.offsetWidth-8}px`;break;case"right":H.style.top=`${V.top+V.height/2-H.offsetHeight/2}px`,H.style.left=`${V.right+8}px`;break}},A=$=>{$.composedPath().includes(h.current)||m(!1)};return ve.useEffect(()=>{R()},[h,g]),ve.useEffect(()=>(document.addEventListener("click",A),()=>{document.removeEventListener("click",A)}),[]),ve.useEffect(()=>{const $=f.current;$&&$.style.setProperty("--pointer-position",`${d}`)},[g]),k.jsxs("div",{ref:h,className:`${c==="dark"?Pa.dark:""} ${Pa.tooltipContainer}`,onClick:T,onMouseEnter:C,onMouseLeave:x,children:[e,g&&t?t():g&&k.jsxs("div",{style:s??{},onClick:$=>$.stopPropagation(),ref:f,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"})}),Pg=({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} />`,yf,ka,Zk,ka),Ra[ka+yf]=!0}}return Z===n?Cf(di):mf(di),di}}function jk(Z,Te,Ne){return _r(Z,Te,Ne,!0)}function qk(Z,Te,Ne){return _r(Z,Te,Ne,!1)}var Yk=qk,Xk=jk;Ks.Fragment=n,Ks.jsx=Yk,Ks.jsxs=Xk}()),Ks}process.env.NODE_ENV==="production"?s_.exports=Jk():s_.exports=eB();var k=s_.exports;const tB="MainButton-module__mainButton",iB="MainButton-module__sm",nB="MainButton-module__onlyIcon",rB="MainButton-module__buttonSlot",aB="MainButton-module__buttonLabel",oB="MainButton-module__md",sB="MainButton-module__lg",lB="MainButton-module__xl",uB="MainButton-module__xl2",dB="MainButton-module__disabled",cB="MainButton-module__dark",Ba={mainButton:tB,sm:iB,onlyIcon:nB,buttonSlot:rB,buttonLabel:aB,md:oB,lg:sB,xl:lB,xl2:uB,disabled:dB,dark:cB},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:""]})}),hB="FormInput-module__inputWrapper",fB="FormInput-module__inputLabel",pB="FormInput-module__required",vB="FormInput-module__inputContainer",_B="FormInput-module__inputContent",gB="FormInput-module__inputTags",mB="FormInput-module__focused",CB="FormInput-module__error",yB="FormInput-module__rightIcon",xB="FormInput-module__leftIcon",bB="FormInput-module__inputDropDown",SB="FormInput-module__http",EB="FormInput-module__disabled",wB="FormInput-module__sm",IB="FormInput-module__md",TB="FormInput-module__withCopy",AB="FormInput-module__inputHelperText",DB="FormInput-module__dark",ci={inputWrapper:hB,inputLabel:fB,required:pB,inputContainer:vB,inputContent:_B,inputTags:gB,focused:mB,error:CB,rightIcon:yB,leftIcon:xB,inputDropDown:bB,http:SB,disabled:EB,sm:wB,md:IB,withCopy:TB,inputHelperText:AB,dark:DB},wh=({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"})}),OB=({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"})}),RB="Checkbox-module__checkboxWrapper",kB="Checkbox-module__sm",BB="Checkbox-module__md",LB="Checkbox-module__checkMark",PB="Checkbox-module__checked",FB="Checkbox-module__disabled",MB="Checkbox-module__dark",No={checkboxWrapper:RB,sm:kB,md:BB,checkMark:LB,checked:PB,disabled:FB,dark:MB},mI=({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"})}),CI=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"})}),Ih=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,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(CI,{}):k.jsx(mI,{}):""]})},VB="Tag-module__tagContainer",NB="Tag-module__onlyLabel",HB="Tag-module__sm",$B="Tag-module__md",WB="Tag-module__lg",zB="Tag-module__tagLabel",GB="Tag-module__tagNumber",UB="Tag-module__tagClose",KB="Tag-module__dark",La={tagContainer:VB,onlyLabel:NB,sm:HB,md:$B,lg:WB,tagLabel:zB,tagNumber:GB,tagClose:UB,dark:KB},Lg=({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(Ih,{...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"})})]})},fc=({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:$,leftIcon:H,withDropDown:V,dropdownData:U,onSelectData:K,withTags:X,tagProps:M,withLink:q,withCopy:b,onCopy:j,inputWrapperStyle:ne,inputLabelStyle:J,requiredStyle:pe,inputContainerStyle:le,leftIconStyle:Q,inputDropDownStyle:z,ulStyle:y,liStyle:I,httpStyle:S,inputStyle:B,rightIconStyle:N,withCopyStyle:G,inputHelperTextStyle:W,theme:ie="light"})=>{const[re,_e]=ve.useState(!1),oe=ve.useRef(null),[Re,w]=ve.useState(!1);ve.useState(!1);const he=ve.useRef(null),se=ve.useRef(null),[L,P]=ve.useState(!1),[Y,de]=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)},ae=()=>{w(!0),l&&typeof l=="function"&&l()},we=()=>{w(!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=()=>{j&&typeof j=="function"&&j(e)},We=Ge=>Ge,Qe=()=>{let Ge={};return b&&(Ge.borderTopRightRadius=0,Ge.borderBottomRightRadius=0,Ge.borderRight=0),V&&(Ge.paddingLeft=0),{...Ge,...le??{}}},it=Ge=>{!Ge.composedPath().includes(se.current)&&Ge.composedPath().includes(he.current)||P(!1)},Kt=Ge=>{de(Ge.id),P(!1),K&&typeof K=="function"&&K(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:ne??{},children:[t&&k.jsxs("label",{className:ci.inputLabel,style:J??{},children:[t," ",k.jsx("span",{className:ci.required,style:pe??{},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:[!V&&!q&&H&&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(H)}),!q&&V&&k.jsxs("div",{className:ci.inputDropDown,style:z??{},onClick:()=>P(!0),ref:he,children:[U.find(Ge=>Ge.id===Y).label,L&&k.jsx("ul",{ref:se,style:y??{},children:U&&U.length&&U.map((Ge,wt)=>k.jsx("li",{style:I??{},onClick:()=>Kt(Ge),children:(Ge==null?void 0:Ge.label)??"-"},Ge.id))}),k.jsx(wh,{})]}),q&&k.jsx("div",{className:`${ci.inputDropDown} ${ci.http}`,style:S??{},onClick:()=>P(!0),ref:he,children:"http://"}),k.jsxs("div",{className:ci.inputContent,children:[X&&p&&p.length>0&&k.jsx("div",{className:ci.inputTags,children:p.map((Ge,wt)=>k.jsx("div",{className:ci.inputSingleTags,children:k.jsx(Lg,{...M,id:Ge,label:Ge,withClose:!0})},wt))}),k.jsx("input",{ref:oe,style:B??{},type:a??"text",value:e,onChange:Ge=>Ce(Ge),onFocus:ae,onBlur:we,disabled:r,required:n,onKeyDown:Le,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),$&&k.jsx("div",{className:ci.rightIcon,style:N??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{m&&typeof m=="function"&&m()},onMouseLeave:()=>{C&&typeof C=="function"&&C()},children:We($)})]}),b&&k.jsxs("div",{style:G??{},onClick:Ie,className:ci.withCopy,children:[k.jsx(OB,{}),k.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&k.jsx("div",{style:W??{},className:`${ci.inputHelperText} ${d!=null&&d.error?ci.error:""}`,children:k.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},jB="Textarea-module__textareaContainer",qB="Textarea-module__textAreaLabel",YB="Textarea-module__required",XB="Textarea-module__wrap",ZB="Textarea-module__textarea",QB="Textarea-module__focused",JB="Textarea-module__disabled",eL="Textarea-module__error",tL="Textarea-module__helperTextStyle",iL="Textarea-module__dark",an={textareaContainer:jB,textAreaLabel:qB,required:YB,wrap:XB,textarea:ZB,focused:QB,disabled:JB,error:eL,helperTextStyle:tL,dark:iL},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,labelIcon:x})=>{const[T,R]=ve.useState(!1),A=U=>{let K=U.target.value;s&&typeof s=="function"&&s(K)},$=U=>U,H=()=>{R(!0),l&&typeof l=="function"&&l()},V=()=>{R(!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&&"*"}),x&&$(x)]}),k.jsx("div",{className:an.wrap,children:k.jsx("textarea",{style:g??{},className:`${an.textarea} ${T?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:H,disabled:d,onBlur:V,onChange:A})}),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"})}),l_=({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:$,pagination:H,withMultiSelect:V=!1,skipSelected:U,labelIcon:K,closeIcon:X,dropdownIcon:M,iconDown:q,onLabelIconClick:b,onLabelIconMouseEnter:j,onLabelIconMouseLeave:ne,dropdownWrapperStyle:J,dropdownLabelStyle:pe,requiredStyle:le,labelIconStyle:Q,dropdownContainerStyle:z,placeHolderStyle:y,selectedTagsStyle:I,selectedListStyle:S,additionalStyle:B,dropdownListStyle:N,listStyle:G,theme:W="light"})=>{const[ie,re]=ve.useState(!1),[_e,oe]=ve.useState(!1),[Re,w]=ve.useState(""),[he,se]=ve.useState("");ve.useState(null);const L=ve.useRef([]),P=ve.useRef(null),Y=ve.useRef(null),de=ve.useRef({}),Ce=(Se,Xe)=>{const Wt=new Set;return Se.filter(ai=>Wt.has(ai[Xe])?!1:(Wt.add(ai[Xe]),!0))},ae=Se=>{var Xe;de.current=Se,w((Xe=de.current)==null?void 0:Xe.label),C&&typeof C=="function"&&C(de.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||w(L.current.map(Xe=>Xe.label).join(", ")),re(Xe=>!Xe)},Le=Se=>{Se.stopPropagation(),L.current=[],x=null,m&&m.length>0&&m.forEach(Xe=>Xe.selected=!1),Ie(""),V?C([]):(de.current={},C({})),w("")},Ie=Se=>{$&&typeof $=="function"&&$(Se),se(Se),w(Se)},We=()=>{if(x||x===0){let Se=m.filter(Xe=>Number(Xe.id)===Number(x));Se&&Se[0]&&(de.current=Se[0],U?($&&typeof $=="function"&&$(de.current.label),w(de.current.label),closeOnSelect&&setCollapsed(Xe=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):ae(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;H&&ai&&!Qe&&(d&&typeof d=="function"&&d(!0),it(!0)),ai||it(!1)},wi=()=>{m.forEach(Se=>{Se.selected=!1}),L.current=[],C([]),w(""),l&&typeof l=="function"&&l(),re(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),w(L.current.map(Se=>Se.label).join(", ")),u&&typeof u=="function"&&u(),C(L.current),re(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=Y.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(()=>{V&&(L.current=m.filter(Se=>Se.selected),w(m.filter(Se=>Se.selected).map(Se=>Se.label).join(", ")))},[]),ve.useEffect(()=>{p&&s&&s.length>0&&se(s)},[]),ve.useEffect(()=>{rn()},[Y,_e]),ve.useEffect(()=>{V||We()},[x]),ve.useEffect(()=>(document.addEventListener("click",bt),document.addEventListener("wheel",Ki),()=>{document.removeEventListener("click",bt),document.removeEventListener("wheel",Ki)}),[]),k.jsxs("div",{className:`${W==="dark"?si.dark:""} ${si.dropdownWrapper}`,style:J??{},children:[e&&k.jsxs("label",{className:si.dropdownLabel,style:pe??{},children:[e," ",k.jsx("span",{className:si.required,style:le??{},children:i&&"*"}),k.jsxs("span",{style:{...Q??{},display:"grid",placeItems:"center"},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{j&&typeof j=="function"&&j()},onMouseLeave:()=>{ne&&typeof ne=="function"&&ne()},children:[" ",wt(K)]})]}),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:z??{},children:[p?k.jsxs("div",{children:[" ",k.jsx(NL,{})]}):k.jsx(k.Fragment,{children:M&&k.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:wt(M)})}),!p&&V&&r&&!_e&&L.current.length===0&&k.jsx("span",{className:si.placeHolder,style:y??{},children:r??""}),V&&k.jsx("div",{className:si.selectedTags,style:I??{},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:S??{},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:he}:{},onChange:Se=>Ie(Se.target.value)},x)}),k.jsx("input",{autoCorrect:"off",hidden:V,placeholder:r,readOnly:!T||!_e||V,type:"text",value:V&&!p&&_e?"":Re,onChange:Se=>Ie(Se.target.value)},x),m&&m.length>0&&_e&&k.jsxs("div",{ref:Y,onClick:Se=>Se.stopPropagation(),className:si.dropdownListContainer,children:[k.jsx("ul",{onScroll:Se=>Kt(),onClick:Se=>Se.stopPropagation(),className:si.dropdownList,style:N??{},children:m.map(Se=>{var Xe,Wt,ai,Oi;return k.jsxs("li",{style:G??{},className:`${!(Se!=null&&Se.label)||Se.label===void 0||Se!=null&&Se.disabled?si.disabled:""} ${(V?Se.selected:(Xe=de.current)!=null&&Xe.id&&((Wt=de.current)==null?void 0:Wt.id)===Se.id)?si.selected:""}`,onClick:()=>{V?we(Se):ae(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(CI,{}):k.jsx(VL,{})}):(V?Se.selected:((ai=de.current)==null?void 0:ai.id)&&((Oi=de.current)==null?void 0:Oi.id)===Se.id)&&k.jsx("span",{className:si.checkIcon,children:k.jsx(mI,{color:"#7F56D9",width:20,height:20})})]},Se==null?void 0:Se.id)})}),V&&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"})]})]}),!V&&R&&(L.current.length>0||Re.length)>0&&k.jsx("div",{onClick:Se=>Le(Se),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:X?wt(X):k.jsx(yu,{width:16,height:16})}),q?wt(q):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(wh,{})})]}),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="hover",title:a,text:o,tooltipContentStyle:s,tooltipTitlestyle:l,tooltipTextStyle:u,pointerPosition:d="10%",theme:c})=>{const h=ve.useRef(null),f=ve.useRef(null);let p;const[g,m]=ve.useState(!1),C=()=>{r==="hover"&&(p=setTimeout(()=>{m(!0)},i||400))},x=()=>{r==="hover"&&(clearTimeout(p),setTimeout(()=>{m(!1)},i||400))},T=()=>{r==="click"&&m($=>!$)},R=()=>{const $=h.current,H=f.current;if(!H||!$)return;const V=$.getBoundingClientRect();switch(H.style.position="fixed",n){case"top":H.style.top=`${V.top-H.offsetHeight-8}px`;break;case"bottom":H.style.top=`${V.bottom+8}px`;break;case"left":H.style.top=`${V.top+V.height/2-H.offsetHeight/2}px`,H.style.left=`${V.left-H.offsetWidth-8}px`;break;case"right":H.style.top=`${V.top+V.height/2-H.offsetHeight/2}px`,H.style.left=`${V.right+8}px`;break}},A=$=>{$.composedPath().includes(h.current)||m(!1)};return ve.useEffect(()=>{R()},[h,g]),ve.useEffect(()=>(document.addEventListener("click",A),()=>{document.removeEventListener("click",A)}),[]),ve.useEffect(()=>{const $=f.current;$&&$.style.setProperty("--pointer-position",`${d}`)},[g]),k.jsxs("div",{ref:h,className:`${c==="dark"?Pa.dark:""} ${Pa.tooltipContainer}`,onClick:T,onMouseEnter:C,onMouseLeave:x,children:[e,g&&t?t():g&&k.jsxs("div",{style:s??{},onClick:$=>$.stopPropagation(),ref:f,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"})}),Pg=({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:""}
|
|
@@ -762,23 +762,22 @@ const rB = "MainButton-module__mainButton", aB = "MainButton-module__sm", oB = "
|
|
|
762
762
|
size: a = "md",
|
|
763
763
|
activeStyle: o,
|
|
764
764
|
checkBoxStyle: s,
|
|
765
|
-
theme: l = "light"
|
|
766
|
-
...u
|
|
765
|
+
theme: l = "light"
|
|
767
766
|
}) => {
|
|
768
|
-
const
|
|
767
|
+
const u = ut(null), [d, c] = Ze(!1), h = () => {
|
|
769
768
|
t && typeof t == "function" && t(!e);
|
|
770
|
-
},
|
|
769
|
+
}, f = () => d ? o ?? {} : s ?? {};
|
|
771
770
|
return /* @__PURE__ */ k.jsxs(
|
|
772
771
|
"div",
|
|
773
772
|
{
|
|
774
|
-
style:
|
|
773
|
+
style: f(),
|
|
775
774
|
className: ` ${l === "dark" ? Wo.dark : ""} ${Wo.checkboxWrapper} ${Wo[a]} ${e ? Wo.checked : Wo.unChecked} ${i ? Wo.disabled : ""}`,
|
|
776
|
-
onMouseDown: () =>
|
|
777
|
-
onMouseUp: () =>
|
|
778
|
-
onMouseLeave: () =>
|
|
779
|
-
onClick:
|
|
775
|
+
onMouseDown: () => c(!0),
|
|
776
|
+
onMouseUp: () => c(!1),
|
|
777
|
+
onMouseLeave: () => c(!1),
|
|
778
|
+
onClick: h,
|
|
780
779
|
children: [
|
|
781
|
-
/* @__PURE__ */ k.jsx("input", { ref:
|
|
780
|
+
/* @__PURE__ */ k.jsx("input", { ref: u, type: "checkbox", disabled: i, checked: e, hidden: !0, readOnly: !0, required: n ?? !1 }),
|
|
782
781
|
e ? r ? /* @__PURE__ */ k.jsx(bI, {}) : /* @__PURE__ */ k.jsx(xI, {}) : ""
|
|
783
782
|
]
|
|
784
783
|
}
|