@athosws/react-components
Version:
This is a set of useful ReactJS components developed by Athos.\n Email:ladiesman217.as@gmail.com
1 lines • 192 kB
JavaScript
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("motion/react"),n=require("chroma-js"),o=require("uuid"),s=require("react-dom"),a=require("@dnd-kit/core"),i=require("@dnd-kit/sortable"),l=require("@dnd-kit/utilities"),c=require("react-redux"),d=require("@reduxjs/toolkit"),u=require("react-dom/client");!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('@import "tailwindcss";@plugin "daisyui";@custom-variant dark (&:where(.dark, .dark *));input[type=password]::-ms-clear,input[type=password]::-ms-reveal{display:none}');var p={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},h=t.createContext&&t.createContext(p),m=["attr","size","title"];function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){return e&&e.map((e,r)=>t.createElement(e.tag,x({key:r},e.attr),y(e.child)))}function v(e){return r=>t.createElement(w,C({attr:x({},e.attr)},r),y(e.child))}function w(e){var r=r=>{var n,{attr:o,size:s,title:a}=e,i=f(e,m),l=s||r.size||"1em";return r.className&&(n=r.className),e.className&&(n=(n?n+" ":"")+e.className),t.createElement("svg",C({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,i,{className:n,style:x(x({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&t.createElement("title",null,a),e.children)};return void 0!==h?t.createElement(h.Consumer,null,e=>r(e)):r(p)}function S(e){return v({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const j=t.createContext(void 0),N=t.createContext({}),k=({children:t,props:r})=>e.jsx(N.Provider,{value:r,children:t}),$=()=>{const e=t.useContext(N);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e};function T(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(e)}function M(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"},child:[]}]})(e)}function O(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"},child:[]}]})(e)}function R(e){return v({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(e)}const A=e=>{const{callback:r}=e;let n=[];n="refs"in e?e.refs:e.ids.map(e=>({current:document.getElementById(e)}));const o=e=>{n.some(t=>t.current?.contains(e.target))||r()};t.useEffect(()=>(document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)),[])},D={duration:.35,ease:"circInOut"},z={topandbottom:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},topandbottomWithFade:{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0}},leftandright:{initial:{width:0},animate:{width:"auto"},exit:{width:0}},leftandrightWithFade:{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0}}},E=({children:n,collpasedComponent:o,spacing:s,position:a="bottom",onToggle:i,initialOpen:l,collapsedClassName:c,wrapperClassName:d,buttonClassName:u,toggleOnWrapperClick:p,fade:h,hideOnClickOutside:m,extraButton:f,open:C,buttonContainerClassName:g,autoOpen:x=!0,disableClick:b})=>{const[y,v]=t.useState(l||!1),w=t.useRef(null),S=t.useRef(null),j=t.useRef(null),N="top"===a?"flex-col-reverse":"bottom"===a?"flex-col":"left"===a?"flex-row-reverse":"flex-row";m&&A({callback:()=>{v(!1),i&&i(void 0)},refs:[S,S,w]});return t.useEffect(()=>()=>{v(!1)},[]),t.useEffect(()=>{void 0!==C&&v(C)},[C]),e.jsxs(r.motion.div,{ref:w,animate:{gap:y?`${s}px`:0},onClick:()=>{b||x&&p&&(v(!y),i&&i(!y))},className:`flex ${N} ${d}`,children:[e.jsxs("div",{ref:S,className:g,children:[e.jsx("div",{className:u,onClick:()=>{b||x&&(p||(v(!y),i&&i(!y)))},children:n}),f]}),e.jsx(r.motion.div,{ref:j,initial:"initial",animate:y?"animate":"initial",variants:"top"===a||"bottom"===a?h?z.topandbottomWithFade:z.topandbottom:h?z.leftandrightWithFade:z.leftandright,style:"top"===a||"bottom"===a?{minWidth:"fit-content"}:{minHeight:"fit-content"},className:"flex overflow-hidden",transition:D,children:e.jsx("div",{className:`min-w-max min-h-max ${c}`,children:o})})]})},P=({index:e})=>{const{styles:r,levelIndicator:o}=$(),s=0+e/10*4;return{bgColor:t.useMemo(()=>{if(r?.selected?.bgcolorIndex)return r.selected.bgcolorIndex(s);const e=n(r?.selected?.bgColor||"#d6b2d1");return"brighten"===o?e.brighten(s).hex():e.darken(s).hex()},[s,r]),color:t.useMemo(()=>{if(r?.selected?.colorIndex)return r.selected.colorIndex(s);const e=n(r?.selected?.color||"#5c126b");return"brighten"===o?e.brighten(s).hex():e.darken(s).hex()},[s,r])}},I=({index:r,parentId:n})=>{const[o,s]=t.useState(),[a,i]=t.useState(!1),[l,c]=t.useState(!1),{onAdd:d,selected:u}=$(),{color:p}=P({index:r}),h=t.useMemo(()=>u?.some(e=>e===n),[u,n]);return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{style:{marginLeft:10*r+"px",color:h?p:"inherit"},type:"text",value:o,placeholder:"Adicionar",onChange:e=>{s(e.target.value),e.target.value&&i(!0)},className:"cursor-pointer py-1 px-2 outline-none focus:outline-none rounded-md text-zinc-400",onFocus:()=>{o&&i(!0)},onBlur:()=>{o||(i(!1),c(!1))}}),e.jsx(E,{wrapperClassName:"items-center flex",spacing:6,position:"left",open:l,onToggle:e=>c(!!e),collpasedComponent:e.jsx("p",{onClick:()=>{o&&(d(o,n),s(""),i(!1),c(!1))},className:"text-green-600 select-none cursor-pointer",children:"Confirmar"}),children:e.jsx("div",{className:`p-1 ${l?"bg-black":"bg-green-500"} rounded-full flex items-center gap-1 w-fit ${a?"":"hidden pointer-events-none"}`,children:l?e.jsx(R,{className:"cursor-pointer text-white text-xs",onClick:()=>{o&&(s(""),i(!1),c(!1))}}):e.jsx(T,{className:"cursor-pointer text-white text-xs"})})})]})},L=t.createContext(void 0),B=()=>{const e=t.useContext(L);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e};function F(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function H(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"},child:[]}]})(e)}function Z(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 136c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0 240c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0-120c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40z"},child:[]}]})(e)}function W(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 256l-96-96v64h-96v-96h64l-96-96-96 96h64v96h-96v-64l-96 96 96 96v-64h96v96h-64l96 96 96-96h-64v-96h96v64z"},child:[]}]})(e)}function _(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 3a2 2 0 0 0-2 2"},child:[]},{tag:"path",attr:{d:"M19 3a2 2 0 0 1 2 2"},child:[]},{tag:"path",attr:{d:"M21 19a2 2 0 0 1-2 2"},child:[]},{tag:"path",attr:{d:"M5 21a2 2 0 0 1-2-2"},child:[]},{tag:"path",attr:{d:"M9 3h1"},child:[]},{tag:"path",attr:{d:"M9 21h1"},child:[]},{tag:"path",attr:{d:"M14 3h1"},child:[]},{tag:"path",attr:{d:"M14 21h1"},child:[]},{tag:"path",attr:{d:"M3 9v1"},child:[]},{tag:"path",attr:{d:"M21 9v1"},child:[]},{tag:"path",attr:{d:"M3 14v1"},child:[]},{tag:"path",attr:{d:"M21 14v1"},child:[]}]})(e)}const V=t.createContext(void 0),q=({isMoving:r,isMovingThisTree:o,tree:s,index:a})=>{const{onDelete:i,onMove:l,onAdd:c,levelIndicator:d}=$(),{setFuncOpenId:u,funcOpenId:p}=(()=>{const e=t.useContext(V);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e})(),{setMovingId:h,movingId:m}=B(),[f,C]=t.useState(!1),g=t.useMemo(()=>p===s.id,[p,s.id]),{color:x}=P({index:a});return t.useMemo(()=>!c&&!l&&!i,[c,l,i])?null:o?e.jsx(W,{className:"opacity-60 hover:opacity-100 hover:text-red-400 transition-all duration-200 cursor-pointer",onClick:()=>{m===s.id?h(null):h(s.id)}}):r&&m?e.jsx(E,{spacing:6,wrapperClassName:"items-center",position:"left",open:f,collpasedComponent:e.jsx("p",{children:"Confirmar"}),children:e.jsx(_,{onClick:()=>{l?.(m,s.id),h(null),C(!1)},className:"cursor-pointer",onMouseOver:()=>C(!0),onMouseOut:()=>C(!1)})}):e.jsx(E,{open:g,onToggle:e=>{u(e?s.id:null)},spacing:6,position:"right",wrapperClassName:"text-sm",collapsedClassName:"flex items-center",collpasedComponent:e.jsxs("div",{style:{borderLeftColor:n(x).alpha(.3).hex()},className:"cursor-pointer border-l-1 px-1 flex gap-1 transition-opacity duration-200",children:[c&&e.jsx(M,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>c(s.name,s.id)}),l&&e.jsx(W,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>{m===s.id?h(null):h(s.id)}}),i&&e.jsx(O,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>i(s.id)})]}),children:e.jsx(Z,{className:"cursor-pointer rounded-full text-xl transition-colors duration-200 "+(g?"brighten"===d?"bg-white/5":"bg-black/5":"")})})},G=({tree:r,id:n,index:o})=>{const{fillWidth:s,onSelect:a}=$(),{movingId:i}=B(),[l,c]=t.useState(!1),d=t.useMemo(()=>!!r.sub&&Object.keys(r.sub).length>0,[r.sub]),{hasSelectedSubcategory:u,isSelected:p}=(({tree:e,id:r})=>{const{selected:n}=$(),o=t.useCallback((e,t)=>!!n?.some(t=>t===e.id)||!!e.sub&&Object.values(e.sub).some(e=>o(e,t)),[n]),s=t.useMemo(()=>o(e,r),[e,o,r]);return{isSelected:t.useMemo(()=>n?.some(t=>t===e.id)||s,[n,e.id,s]),hasSelectedSubcategory:s}})({tree:r,id:n}),{bgColor:h,color:m}=P({index:o}),f=`rounded-md ${d?"pb-2 ":""} py-1 px-2 gap-2 transition-colors duration-200 flex justify-between ${s?"":"w-fit"}`;t.useEffect(()=>c(u),[u]);const C=t.useMemo(()=>i===r.id,[i,r.id]),g=t.useMemo(()=>null!==i,[i]);return e.jsx("div",{style:{marginLeft:10*o+"px",backgroundColor:p?h:"transparent",color:p?m:"inherit",borderColor:C?m:"transparent"},className:`border border-dashed ${f} transition-[border] `,children:r.sub&&Object.keys(r.sub).length>0?e.jsxs(E,{open:u,onToggle:e=>c(!!e),collapsedClassName:`flex flex-col ${s?"w-full":""} gap-1`,wrapperClassName:""+(s?"w-full":""),spacing:6,collpasedComponent:e.jsx(Y,{data:r.sub,index:o+1,parentId:r.id}),buttonClassName:"cursor-pointer flex items-center gap-2 w-full",buttonContainerClassName:"w-full flex items-center justify-between",extraButton:e.jsx(q,{index:o,isMoving:g,isMovingThisTree:C,tree:r}),children:[l?"-":"+"," ",r.icon," ",r.component||r.name]}):e.jsxs("span",{className:(g?"":"cursor-pointer")+" w-full flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 w-full",onClick:()=>{g||(a?.(r.id),r.onClick?.(r.id))},children:[r.icon," ",r.component||r.name]}),e.jsx(q,{index:o,isMoving:g,isMovingThisTree:C,tree:r})]})},n)},Y=({data:r,index:n=0,parentId:o})=>{const{onAdd:s,isLoading:a}=$(),{addingToParent:i}=(()=>{const e=t.useContext(j);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e})();return e.jsxs("div",{className:""+(a&&0===n?"blur-[2px]":""),children:[r.map(t=>e.jsx(G,{tree:t,id:t.id,index:n})),s&&i===o&&e.jsx(I,{index:n,parentId:o})]})},U=[({children:r})=>{const[n,o]=t.useState(null);return e.jsx(j.Provider,{value:{addingToParent:n,setAddingToParent:o},children:r})},({children:r})=>{const[n,o]=t.useState(null);return e.jsx(L.Provider,{value:{movingId:n,setMovingId:o},children:r})},({children:r})=>{const[n,o]=t.useState(null);return e.jsx(V.Provider,{value:{funcOpenId:n,setFuncOpenId:o},children:r})}];const X=({position:e="top",onClickOutside:r,spacing:n=6,onToggle:s,id:a})=>{const i=t.useMemo(()=>a||o.v4(),[a]),[l,c]=t.useState(!1),d="top"===e?"dropdown-top dropdown-center":"top-left"===e?"dropdown-top":"top-right"===e?"dropdown-top dropdown-end":"bottom"===e?"dropdown-bottom dropdown-center":"bottom-left"===e?"dropdown-bottom":"bottom-right"===e?"dropdown-bottom dropdown-end":"left"===e?"dropdown-left dropdown-center":"left-top"===e?"dropdown-left":"left-bottom"===e?"dropdown-left dropdown-end":"right"===e?"dropdown-right dropdown-center":"right-top"===e?"dropdown-right":"right-bottom"===e?"dropdown-right dropdown-end":"dropdown-top dropdown-center",u=t.useMemo(()=>e.startsWith("top")?{marginBottom:`${n}px`}:e.startsWith("bottom")?{marginTop:`${n}px`}:e.startsWith("left")?{marginRight:`${n}px`}:{marginLeft:`${n}px`},[n,e]),p=t.useRef(null),h=t.useRef(null);return A({callback:()=>{c(!1),console.log("Popup closed"),r&&r()},refs:[p,h]}),t.useEffect(()=>{s&&s(l)},[l]),{id:i,pos:d,gap:u,childRef:p,contentRef:h,setIsOpened:c,isOpened:l}},K=t.createContext(null),J=r=>{const{multiSelect:n=!1,onToggle:o,position:s,spacing:a,matchLabelWidth:i,multiSelectLabelClassName:l}=r,c=X({onToggle:o,position:s,spacing:a}),[d,u]=t.useState(!1),[p,h]=t.useState(""),[m,f]=t.useState([]),[C,g]=t.useState(),x=t.useMemo(()=>(e=>"labels"in e&&Array.isArray(e.labels))(r)?r.labels:null,[r]),b=t.useMemo(()=>(e=>"cols"in e&&Array.isArray(e.cols))(r)?r.cols:null,[r]);t.useEffect(()=>(r.selected&&f(Array.isArray(r.selected)?r.selected:void 0!==r.selected&&null!==r.selected?[r.selected]:[]),()=>{f([]),g(void 0)}),[r.selected]);const y=t.useMemo(()=>x?.filter(e=>e.label?e.label.toString().toLowerCase().includes(p.toLowerCase()):e.value.toString().toLowerCase().includes(p.toLowerCase()))||null,[x,p]),v=t.useMemo(()=>b?.map(e=>e.filter(e=>e.label?e.label.toString().toLowerCase().includes(p.toLowerCase()):e.value.toString().toLowerCase().includes(p.toLowerCase())))||null,[b,p]);return e.jsx(K.Provider,{value:{props:r,selectedItems:m,select:function(e){if(d)return;const t=(()=>{const t=m;return n?t.includes(e)?t.filter(t=>t!==e):[...t,e]:t.includes(e)?t.filter(t=>t!==e):[e]})();if(f(t),r.onChange){const e=r.onChange(t);e&&"function"==typeof e.then?(u(!0),e.then(()=>{u(!1)}).catch(()=>{u(!1)})):u(!1)}},labels:y,cols:v,updating:d,setLastSelected:g,lastSelected:C,multiSelectLabelClassName:l,searchValue:p,setSearchValue:h,...c,originalCols:b,originalLabels:x},children:r.children})},Q=()=>{const e=t.useContext(K);if(!e)throw new Error("useATHOSSelectContext must be used within a ATHOSSelectProvider");return e};function ee(e){return v({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M13.917 7A6.002 6.002 0 0 0 2.083 7H1.071a7.002 7.002 0 0 1 13.858 0h-1.012z"},child:[]}]})(e)}const te=({option:t,onClick:n,isOpened:o,isLastSelected:s,className:a,style:i,selectedClassName:l,selectedStyle:c,isSelected:d})=>{const{updating:u}=Q();return e.jsxs(r.motion.li,{animate:{opacity:o?1:0},style:{...i,...t.style,...d?c:{}},onClick:n,className:`flex pr-3 justify-between items-center transform-gpu cursor-pointer select-none ${a} ${t.className} ${d?l:""}`,children:[t.component||t.label,e.jsx(r.AnimatePresence,{children:d?u&&s?e.jsx(ee,{className:"animate-spin"}):e.jsx(r.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},children:e.jsx(T,{size:12})}):null})]})},re=t=>{const{colClassName:r,optionClassName:n,labelsStyle:o}=t,{cols:s,select:a,selectedItems:i,isOpened:l,lastSelected:c}=Q();return e.jsx(e.Fragment,{children:s?.map((s,d)=>e.jsx("div",{className:`flex ${r}`,style:t.colStyle,children:s.map(r=>e.jsx(te,{isLastSelected:c===r.value,isOpened:l,selectedClassName:t.selectedLabelClassName,selectedStyle:t.selectedLabelStyle,style:o,className:n,option:r,onClick:()=>a(r.value),isSelected:i.includes(r.value)},r.value))},d))})};function ne(e){return v({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9A7.902 7.902 0 0 1 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1A7.902 7.902 0 0 1 20 12c0 4.42-3.58 8-8 8z"},child:[]}]})(e)}function oe(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function se(e){return v({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"},child:[]}]})(e)}function ae(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"},child:[]}]})(e)}function ie(e){return v({attr:{viewBox:"0 0 288 512"},child:[{tag:"path",attr:{d:"M209.2 233.4l-108-31.6C88.7 198.2 80 186.5 80 173.5c0-16.3 13.2-29.5 29.5-29.5h66.3c12.2 0 24.2 3.7 34.2 10.5 6.1 4.1 14.3 3.1 19.5-2l34.8-34c7.1-6.9 6.1-18.4-1.8-24.5C238 74.8 207.4 64.1 176 64V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C45.8 64-5.4 118.7.5 183.6c4.2 46.1 39.4 83.6 83.8 96.6l102.5 30c12.5 3.7 21.2 15.3 21.2 28.3 0 16.3-13.2 29.5-29.5 29.5h-66.3C100 368 88 364.3 78 357.5c-6.1-4.1-14.3-3.1-19.5 2l-34.8 34c-7.1 6.9-6.1 18.4 1.8 24.5 24.5 19.2 55.1 29.9 86.5 30v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48.2c46.6-.9 90.3-28.6 105.7-72.7 21.5-61.6-14.6-124.8-72.5-141.7z"},child:[]}]})(e)}function le(e){return v({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"},child:[]}]})(e)}function ce(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function de(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"},child:[]}]})(e)}function ue(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}var pe=function(){return pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pe.apply(this,arguments)};function he(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function me(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}"function"==typeof SuppressedError&&SuppressedError;var fe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ce=me(function(e){return fe.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),ge="-ms-",xe="-moz-",be="-webkit-",ye="comm",ve="rule",we="decl",Se="@keyframes",je=Math.abs,Ne=String.fromCharCode,ke=Object.assign;function $e(e){return e.trim()}function Te(e,t){return(e=t.exec(e))?e[0]:e}function Me(e,t,r){return e.replace(t,r)}function Oe(e,t,r){return e.indexOf(t,r)}function Re(e,t){return 0|e.charCodeAt(t)}function Ae(e,t,r){return e.slice(t,r)}function De(e){return e.length}function ze(e){return e.length}function Ee(e,t){return t.push(e),e}function Pe(e,t){return e.filter(function(e){return!Te(e,t)})}var Ie=1,Le=1,Be=0,Fe=0,He=0,Ze="";function We(e,t,r,n,o,s,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Ie,column:Le,length:a,return:"",siblings:i}}function _e(e,t){return ke(We("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ve(e){for(;e.root;)e=_e(e.root,{children:[e]});Ee(e,e.siblings)}function qe(){return He=Fe>0?Re(Ze,--Fe):0,Le--,10===He&&(Le=1,Ie--),He}function Ge(){return He=Fe<Be?Re(Ze,Fe++):0,Le++,10===He&&(Le=1,Ie++),He}function Ye(){return Re(Ze,Fe)}function Ue(){return Fe}function Xe(e,t){return Ae(Ze,e,t)}function Ke(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Je(e){return $e(Xe(Fe-1,tt(91===e?e+2:40===e?e+1:e)))}function Qe(e){for(;(He=Ye())&&He<33;)Ge();return Ke(e)>2||Ke(He)>3?"":" "}function et(e,t){for(;--t&&Ge()&&!(He<48||He>102||He>57&&He<65||He>70&&He<97););return Xe(e,Ue()+(t<6&&32==Ye()&&32==Ge()))}function tt(e){for(;Ge();)switch(He){case e:return Fe;case 34:case 39:34!==e&&39!==e&&tt(He);break;case 40:41===e&&tt(e);break;case 92:Ge()}return Fe}function rt(e,t){for(;Ge()&&e+He!==57&&(e+He!==84||47!==Ye()););return"/*"+Xe(t,Fe-1)+"*"+Ne(47===e?e:Ge())}function nt(e){for(;!Ke(Ye());)Ge();return Xe(e,Fe)}function ot(e){return function(e){return Ze="",e}(st("",null,null,null,[""],e=function(e){return Ie=Le=1,Be=De(Ze=e),Fe=0,[]}(e),0,[0],e))}function st(e,t,r,n,o,s,a,i,l){for(var c=0,d=0,u=a,p=0,h=0,m=0,f=1,C=1,g=1,x=0,b="",y=o,v=s,w=n,S=b;C;)switch(m=x,x=Ge()){case 40:if(108!=m&&58==Re(S,u-1)){-1!=Oe(S+=Me(Je(x),"&","&\f"),"&\f",je(c?i[c-1]:0))&&(g=-1);break}case 34:case 39:case 91:S+=Je(x);break;case 9:case 10:case 13:case 32:S+=Qe(m);break;case 92:S+=et(Ue()-1,7);continue;case 47:switch(Ye()){case 42:case 47:Ee(it(rt(Ge(),Ue()),t,r,l),l);break;default:S+="/"}break;case 123*f:i[c++]=De(S)*g;case 125*f:case 59:case 0:switch(x){case 0:case 125:C=0;case 59+d:-1==g&&(S=Me(S,/\f/g,"")),h>0&&De(S)-u&&Ee(h>32?lt(S+";",n,r,u-1,l):lt(Me(S," ","")+";",n,r,u-2,l),l);break;case 59:S+=";";default:if(Ee(w=at(S,t,r,c,d,o,i,b,y=[],v=[],u,s),s),123===x)if(0===d)st(S,t,w,w,y,s,u,i,v);else switch(99===p&&110===Re(S,3)?100:p){case 100:case 108:case 109:case 115:st(e,w,w,n&&Ee(at(e,w,w,0,0,o,i,b,o,y=[],u,v),v),o,v,u,i,n?y:v);break;default:st(S,w,w,w,[""],v,0,i,v)}}c=d=h=0,f=g=1,b=S="",u=a;break;case 58:u=1+De(S),h=m;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==qe())continue;switch(S+=Ne(x),x*f){case 38:g=d>0?1:(S+="\f",-1);break;case 44:i[c++]=(De(S)-1)*g,g=1;break;case 64:45===Ye()&&(S+=Je(Ge())),p=Ye(),d=u=De(b=S+=nt(Ue())),x++;break;case 45:45===m&&2==De(S)&&(f=0)}}return s}function at(e,t,r,n,o,s,a,i,l,c,d,u){for(var p=o-1,h=0===o?s:[""],m=ze(h),f=0,C=0,g=0;f<n;++f)for(var x=0,b=Ae(e,p+1,p=je(C=a[f])),y=e;x<m;++x)(y=$e(C>0?h[x]+" "+b:Me(b,/&\f/g,h[x])))&&(l[g++]=y);return We(e,t,r,0===o?ve:i,l,c,d,u)}function it(e,t,r,n){return We(e,t,r,ye,Ne(He),Ae(e,2,-2),0,n)}function lt(e,t,r,n,o){return We(e,t,r,we,Ae(e,0,n),Ae(e,n+1,-1),n,o)}function ct(e,t,r){switch(function(e,t){return 45^Re(e,0)?(((t<<2^Re(e,0))<<2^Re(e,1))<<2^Re(e,2))<<2^Re(e,3):0}(e,t)){case 5103:return be+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return be+e+e;case 4789:return xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return be+e+xe+e+ge+e+e;case 5936:switch(Re(e,t+11)){case 114:return be+e+ge+Me(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return be+e+ge+Me(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return be+e+ge+Me(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return be+e+ge+e+e;case 6165:return be+e+ge+"flex-"+e+e;case 5187:return be+e+Me(e,/(\w+).+(:[^]+)/,be+"box-$1$2"+ge+"flex-$1$2")+e;case 5443:return be+e+ge+"flex-item-"+Me(e,/flex-|-self/g,"")+(Te(e,/flex-|baseline/)?"":ge+"grid-row-"+Me(e,/flex-|-self/g,""))+e;case 4675:return be+e+ge+"flex-line-pack"+Me(e,/align-content|flex-|-self/g,"")+e;case 5548:return be+e+ge+Me(e,"shrink","negative")+e;case 5292:return be+e+ge+Me(e,"basis","preferred-size")+e;case 6060:return be+"box-"+Me(e,"-grow","")+be+e+ge+Me(e,"grow","positive")+e;case 4554:return be+Me(e,/([^-])(transform)/g,"$1"+be+"$2")+e;case 6187:return Me(Me(Me(e,/(zoom-|grab)/,be+"$1"),/(image-set)/,be+"$1"),e,"")+e;case 5495:case 3959:return Me(e,/(image-set\([^]*)/,be+"$1$`$1");case 4968:return Me(Me(e,/(.+:)(flex-)?(.*)/,be+"box-pack:$3"+ge+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+be+e+e;case 4200:if(!Te(e,/flex-|baseline/))return ge+"grid-column-align"+Ae(e,t)+e;break;case 2592:case 3360:return ge+Me(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,Te(e.props,/grid-\w+-end/)})?~Oe(e+(r=r[t].value),"span",0)?e:ge+Me(e,"-start","")+e+ge+"grid-row-span:"+(~Oe(r,"span",0)?Te(r,/\d+/):+Te(r,/\d+/)-+Te(e,/\d+/))+";":ge+Me(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return Te(e.props,/grid-\w+-start/)})?e:ge+Me(Me(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Me(e,/(.+)-inline(.+)/,be+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(De(e)-1-t>6)switch(Re(e,t+1)){case 109:if(45!==Re(e,t+4))break;case 102:return Me(e,/(.+:)(.+)-([^]+)/,"$1"+be+"$2-$3$1"+xe+(108==Re(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Oe(e,"stretch",0)?ct(Me(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Me(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return ge+r+":"+n+i+(o?ge+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===Re(e,t+6))return Me(e,":",":"+be)+e;break;case 6444:switch(Re(e,45===Re(e,14)?18:11)){case 120:return Me(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+be+(45===Re(e,14)?"inline-":"")+"box$3$1"+be+"$2$3$1"+ge+"$2box$3")+e;case 100:return Me(e,":",":"+ge)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Me(e,"scroll-","scroll-snap-")+e}return e}function dt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function ut(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case we:return e.return=e.return||e.value;case ye:return"";case Se:return e.return=e.value+"{"+dt(e.children,n)+"}";case ve:if(!De(e.value=e.props.join(",")))return""}return De(r=dt(e.children,n))?e.return=e.value+"{"+r+"}":""}function pt(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case we:return void(e.return=ct(e.value,e.length,r));case Se:return dt([_e(e,{value:Me(e.value,"@","@"+be)})],n);case ve:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(Te(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ve(_e(e,{props:[Me(t,/:(read-\w+)/,":-moz-$1")]})),Ve(_e(e,{props:[t]})),ke(e,{props:Pe(r,n)});break;case"::placeholder":Ve(_e(e,{props:[Me(t,/:(plac\w+)/,":"+be+"input-$1")]})),Ve(_e(e,{props:[Me(t,/:(plac\w+)/,":-moz-$1")]})),Ve(_e(e,{props:[Me(t,/:(plac\w+)/,ge+"input-$1")]})),Ve(_e(e,{props:[t]})),ke(e,{props:Pe(r,n)})}return""})}}var ht={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},mt="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ft="active",Ct="data-styled-version",gt="6.1.18",xt="/*!sc*/\n",bt="undefined"!=typeof window&&"undefined"!=typeof document,yt=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),vt=/invalid hook call/i,wt=new Set,St=function(e,r){if("production"!==process.env.NODE_ENV){var n=r?' with the id of "'.concat(r,'"'):"",o="The component ".concat(e).concat(n," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",s=console.error;try{var a=!0;console.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];vt.test(e)?(a=!1,wt.delete(o)):s.apply(void 0,he([e],t,!1))},t.useRef(),a&&!wt.has(o)&&(console.warn(o),wt.add(o))}catch(e){vt.test(e.message)&&wt.delete(o)}finally{console.error=s}}},jt=Object.freeze([]),Nt=Object.freeze({});var kt=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),$t=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Tt=/(^-|-$)/g;function Mt(e){return e.replace($t,"-").replace(Tt,"")}var Ot=/(a)(d)/gi,Rt=function(e){return String.fromCharCode(e+(e>25?39:97))};function At(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Rt(t%52)+r;return(Rt(t%52)+r).replace(Ot,"$1-$2")}var Dt,zt=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Et=function(e){return zt(5381,e)};function Pt(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function It(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Lt="function"==typeof Symbol&&Symbol.for,Bt=Lt?Symbol.for("react.memo"):60115,Ft=Lt?Symbol.for("react.forward_ref"):60112,Ht={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Zt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Wt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_t=((Dt={})[Ft]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Dt[Bt]=Wt,Dt);function Vt(e){return("type"in(t=e)&&t.type.$$typeof)===Bt?Wt:"$$typeof"in e?_t[e.$$typeof]:Ht;var t}var qt=Object.defineProperty,Gt=Object.getOwnPropertyNames,Yt=Object.getOwnPropertySymbols,Ut=Object.getOwnPropertyDescriptor,Xt=Object.getPrototypeOf,Kt=Object.prototype;function Jt(e,t,r){if("string"!=typeof t){if(Kt){var n=Xt(t);n&&n!==Kt&&Jt(e,n,r)}var o=Gt(t);Yt&&(o=o.concat(Yt(t)));for(var s=Vt(e),a=Vt(t),i=0;i<o.length;++i){var l=o[i];if(!(l in Zt||r&&r[l]||a&&l in a||s&&l in s)){var c=Ut(t,l);try{qt(e,l,c)}catch(e){}}}}return e}function Qt(e){return"function"==typeof e}function er(e){return"object"==typeof e&&"styledComponentId"in e}function tr(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function rr(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function nr(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function or(e,t,r){if(void 0===r&&(r=!1),!r&&!nr(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=or(e[n],t[n]);else if(nr(t))for(var n in t)e[n]=or(e[n],t[n]);return e}function sr(e,t){Object.defineProperty(e,"toString",{value:t})}var ar="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function ir(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e[0],n=[],o=1,s=e.length;o<s;o+=1)n.push(e[o]);return n.forEach(function(e){r=r.replace(/%[a-z]/,e)}),r}function lr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(ir.apply(void 0,he([ar[e]],t,!1)).trim())}var cr=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw lr(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}for(var a=this.indexOfGroup(e+1),i=(s=0,t.length);s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,s=n;s<o;s++)t+="".concat(this.tag.getRule(s)).concat(xt);return t},e}(),dr=1<<30,ur=new Map,pr=new Map,hr=1,mr=function(e){if(ur.has(e))return ur.get(e);for(;pr.has(hr);)hr++;var t=hr++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>dr))throw lr(16,"".concat(t));return ur.set(e,t),pr.set(t,e),t},fr=function(e,t){hr=t+1,ur.set(e,t),pr.set(t,e)},Cr="style[".concat(mt,"][").concat(Ct,'="').concat(gt,'"]'),gr=new RegExp("^".concat(mt,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),xr=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},br=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(xt),o=[],s=0,a=n.length;s<a;s++){var i=n[s].trim();if(i){var l=i.match(gr);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(fr(d,c),xr(e,d,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(i)}}},yr=function(e){for(var t=document.querySelectorAll(Cr),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(mt)!==ft&&(br(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var vr=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(mt,"]")));return t[t.length-1]}(r),s=void 0!==o?o.nextSibling:null;n.setAttribute(mt,ft),n.setAttribute(Ct,gt);var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&n.setAttribute("nonce",a),r.insertBefore(n,s),n},wr=function(){function e(e){this.element=vr(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw lr(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Sr=function(){function e(e){this.element=vr(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),jr=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Nr=bt,kr={isServer:!bt,useCSSOMInjection:!yt},$r=function(){function e(e,t,r){void 0===e&&(e=Nt),void 0===t&&(t={});var n=this;this.options=pe(pe({},kr),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&bt&&Nr&&(Nr=!1,yr(this)),sr(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=function(r){var o=function(e){return pr.get(e)}(r);if(void 0===o)return"continue";var s=e.names.get(o),a=t.getGroup(r);if(void 0===s||!s.size||0===a.length)return"continue";var i="".concat(mt,".g").concat(r,'[id="').concat(o,'"]'),l="";void 0!==s&&s.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),n+="".concat(a).concat(i,'{content:"').concat(l,'"}').concat(xt)},s=0;s<r;s++)o(s);return n}(n)})}return e.registerId=function(e){return mr(e)},e.prototype.rehydrate=function(){!this.server&&bt&&yr(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(pe(pe({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new jr(r):t?new wr(r):new Sr(r)}(this.options),new cr(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this