UNPKG

@mielo-ui/mielo-react

Version:

React components & wrappers around mielo.css framework.

14 lines 76.4 kB
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function a(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function c(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var s=t.forwardRef((function(t,n){var r=t.className,i=t.progressVisible,c=t.indeterminate,s=t.transparent,l=t.children,u=t.progress,f=t.accent,d=t.color,p=a("mie progressbar",c&&"indeterminate ".concat(c),f&&(!0===f?"accent":f),d,{transparent:s},r),v={style:u?{width:"".concat(u,"%")}:{},className:p,ref:n};return e.jsx("div",o({},v,{children:l||e.jsxs("div",{className:a("label",{visible:i}),children:[u,"%"]})}))}));s.displayName="Mie.Progress.Bar";var l=t.forwardRef((function(t,n){var r=t.className,o=t.multiple,i=t.children,c=t.accent,s=a("mie progress",c&&(!0===c?"accent":c),t.color,t.size,{multiple:o},r);return e.jsx("div",{ref:n,className:s,children:i})}));l.displayName="Mie.Progress";var u=Object.assign(l,{Bar:s});function f(t){var n=t.className,r=t.children,o=a("mie buttons",n);return e.jsx("div",{className:o,children:r})}f.displayName="Mie.Button.Group";var d=t.forwardRef((function(n,r){var c,s=n.className,l=n.transparent,u=n.children,f=n.tertiary,d=n.circular,p=n.pilled,v=n.filled,m=n.center,h=n.accent,y=n.active,b=n.color,g=n.hover,x=n.label,j=n.link,w=n.icon,N=n.size,E=i(n,["className","transparent","children","tertiary","circular","pilled","filled","center","accent","active","color","hover","label","link","icon","size"]),O=a("mie button",h&&(!0===h?"accent":h),b,N,s,{content:w&&x,transparent:l,tertiary:f,circular:d,center:m,pilled:p,filled:v,active:y,hover:g});return c=u||e.jsxs(e.Fragment,{children:[w&&w,x&&x]}),t.createElement(j?"a":"button",o({ref:r,href:j||void 0,className:O},E),c)}));d.displayName="Mie.Button";var p=Object.assign(d,{Group:f}),v=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M13.753 4.659a1 1 0 0 0-.432-1.607 1 1 0 0 0-1.074.289L5.95 10.536 3.706 8.292a1 1 0 1 0-1.414 1.416l3 3a1 1 0 0 0 1.46-.049l7-8Z"})}))};v.displayName="Mie.Icon.EmblemOk";var m=t.forwardRef((function(n,r){var o,i,c,s,l=n.className,u=n.onChange,f=n.checked,d=n.icon,p=n.children,m=n.circular,h=n.disabled,y=n.toggle,b=n.accent,g=n.color,x=n.size,j=n.label,w=n.name,N=t.useState(f),E=N[0],O=N[1],_=b&&(!0===b?"accent":b);t.useEffect((function(){O(f)}),[f]);var C,S=t.useCallback((function(e){O(e.target.checked),null==u||u(e)}),[]),k="toggle_".concat(w);C=y?E?null===(o=null==d?void 0:d.indicator)||void 0===o?void 0:o.checked:null===(i=null==d?void 0:d.indicator)||void 0===i?void 0:i.unchecked:e.jsx(v,{});var R=a("mie",y?"toggle":"checkbox",_,g,x,{disabled:h,circular:m},l);return e.jsxs("div",{className:R,children:[e.jsx("input",{onChange:S,disabled:h,checked:E,className:"input",id:k,type:"checkbox",ref:r}),e.jsxs("label",{className:"label",htmlFor:k,children:[e.jsx("div",{className:a("indicator",{checked:E}),children:y?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"dot",children:e.jsx("div",{className:"icon",children:C})}),(null==d?void 0:d.layout)&&e.jsxs("div",{className:"icon layout",children:[e.jsx("div",{className:"checked",children:null===(c=null==d?void 0:d.layout)||void 0===c?void 0:c.checked}),e.jsx("div",{className:"unchecked",children:null===(s=null==d?void 0:d.layout)||void 0===s?void 0:s.unchecked})]})]}):e.jsx("div",{className:"icon",children:C})}),(p||j)&&e.jsx("div",{className:"content",children:p||j})]})]})}));function h(t){var n=t.className,r=t.children,c=i(t,["className","children"]),s=a("mie divider",{content:!!r},n);return e.jsx("div",o({className:s},c,{children:r}))}m.displayName="Mie.Checkbox",h.displayName="Mie.Divider";var y=t.forwardRef((function(n,r){var i,c,s=n.className,l=n.onClose,u=n.onOpen,f=n.menuHeight,d=n.opened,p=n.props,v=n.content,m=n.menu,h=t.useState(!1),y=h[0],b=h[1],g=t.useRef(null),x=t.useRef(null),j=t.useRef(null);t.useEffect((function(){var e=function(e){var t,n=e.target;n instanceof Node&&!(null===(t=g.current)||void 0===t?void 0:t.contains(n))&&(y&&(null==N||N()),b(!1))};return window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[]),t.useEffect((function(){var e=x.current;if(e){var t=function(e){"Enter"===e.key&&b((function(e){var t=!e;return t?null==u||u():null==l||l(),t}))};return e.addEventListener("keydown",t),function(){e.removeEventListener("keydown",t)}}}),[]);var w=t.useCallback((function(){null==u||u(),b(!0)}),[]),N=t.useCallback((function(){null==l||l(),b(!1)}),[]);t.useImperativeHandle(r,(function(){return{close:N,open:w}}));var E={content:a("content",null==s?void 0:s.content),container:a("mie dropdown",null==s?void 0:s.container,{opened:y||d}),menu:a("menu",null==s?void 0:s.menu,{opened:y||d})},O=Object.assign({},y&&{zIndex:100},null===(i=null==p?void 0:p.container)||void 0===i?void 0:i.style),_=Object.assign({},f&&y&&{minHeight:f},null===(c=null==p?void 0:p.menu)||void 0===c?void 0:c.style),C={close:N,open:w,isOpen:y};return e.jsxs("div",o({},(null==p?void 0:p.container)?null==p?void 0:p.container:{},{className:E.container,"data-is-active":y,style:O,ref:g,children:[e.jsx("div",o({},(null==p?void 0:p.menu)?null==p?void 0:p.menu:{},{className:E.menu,style:_,ref:j,children:m(C)})),e.jsx("div",o({ref:x,className:E.content},null==p?void 0:p.content,{children:v(C)}))]}))}));y.displayName="Mie.Dropdown";var b=function(t){var n=t.strokeWidth,r=t.color,a=t.size,c=i(t,["strokeWidth","color","size"]);return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:a||16,height:a||16,stroke:r||"currentColor",strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:n||2,fill:"none"},c,{children:e.jsx("path",{d:"m6 9 6 6 6-6"})}))};function g(n){var r=n.selected,o=n.label,i=n.postfix,c=n.prefix,s=n.isOpen,l=n.close,u=n.open;n.accent,n.name,n.size;var f=t.useCallback((function(){s?l():u()}),[s]),d=a("base",{opened:s,selected:!!r});return e.jsxs("div",{className:d,onClick:f,role:"button",tabIndex:0,children:[c,e.jsxs("div",{className:"header",children:[e.jsx("div",{className:"label",children:o}),r&&e.jsx("div",{className:"value",children:r.title})]}),e.jsxs("div",{className:"right",children:[i,e.jsx("div",{className:"arrow",children:e.jsx(b,{})})]})]})}var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,a=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",s="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",f="[object Error]",d="[object Function]",p="[object GeneratorFunction]",v="[object Map]",m="[object Number]",h="[object Null]",y="[object Object]",b="[object Promise]",g="[object Proxy]",j="[object RegExp]",w="[object Set]",N="[object String]",E="[object Symbol]",O="[object Undefined]",_="[object WeakMap]",C="[object ArrayBuffer]",S="[object DataView]",k=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[i]=M[c]=M[C]=M[l]=M[S]=M[u]=M[f]=M[d]=M[v]=M[m]=M[y]=M[j]=M[w]=M[N]=M[_]=!1;var z="object"==typeof x&&x&&x.Object===Object&&x,A="object"==typeof self&&self&&self.Object===Object&&self,P=z||A||Function("return this")(),I=t&&!t.nodeType&&t,T=I&&e&&!e.nodeType&&e,$=T&&T.exports===I,L=$&&z.process,D=function(){try{return L&&L.binding&&L.binding("util")}catch(e){}}(),B=D&&D.isTypedArray;function V(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function F(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,q,U,G=Array.prototype,Y=Function.prototype,J=Object.prototype,Q=P["__core-js_shared__"],X=Y.toString,Z=J.hasOwnProperty,K=(W=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=J.toString,te=RegExp("^"+X.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=$?P.Buffer:void 0,re=P.Symbol,ae=P.Uint8Array,oe=J.propertyIsEnumerable,ie=G.splice,ce=re?re.toStringTag:void 0,se=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,ue=(q=Object.keys,U=Object,function(e){return q(U(e))}),fe=De(P,"DataView"),de=De(P,"Map"),pe=De(P,"Promise"),ve=De(P,"Set"),me=De(P,"WeakMap"),he=De(Object,"create"),ye=He(fe),be=He(de),ge=He(pe),xe=He(ve),je=He(me),we=re?re.prototype:void 0,Ne=we?we.valueOf:void 0;function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _e;++t<n;)this.add(e[t])}function Se(e){var t=this.__data__=new Oe(e);this.size=t.size}function ke(e,t){var n=Ue(e),r=!n&&qe(e),a=!n&&!r&&Ge(e),o=!n&&!r&&!a&&Ze(e),i=n||r||a||o,c=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=c.length;for(var l in e)!Z.call(e,l)||i&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Fe(l,s))||c.push(l);return c}function Re(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Me(e){return null==e?void 0===e?O:h:ce&&ce in Object(e)?function(e){var t=Z.call(e,ce),n=e[ce];try{e[ce]=void 0;var r=!0}catch(e){}var a=ee.call(e);r&&(t?e[ce]=n:delete e[ce]);return a}(e):function(e){return ee.call(e)}(e)}function ze(e){return Xe(e)&&Me(e)==i}function Ae(e,t,n,o,s){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,o,s,d){var p=Ue(e),h=Ue(t),b=p?c:Ve(e),g=h?c:Ve(t),x=(b=b==i?y:b)==y,O=(g=g==i?y:g)==y,_=b==g;if(_&&Ge(e)){if(!Ge(t))return!1;p=!0,x=!1}if(_&&!x)return d||(d=new Se),p||Ze(e)?Te(e,t,n,o,s,d):function(e,t,n,o,i,c,s){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!c(new ae(e),new ae(t)));case l:case u:case m:return We(+e,+t);case f:return e.name==t.name&&e.message==t.message;case j:case N:return e==t+"";case v:var d=F;case w:var p=o&r;if(d||(d=H),e.size!=t.size&&!p)return!1;var h=s.get(e);if(h)return h==t;o|=a,s.set(e,t);var y=Te(d(e),d(t),o,i,c,s);return s.delete(e),y;case E:if(Ne)return Ne.call(e)==Ne.call(t)}return!1}(e,t,b,n,o,s,d);if(!(n&r)){var k=x&&Z.call(e,"__wrapped__"),R=O&&Z.call(t,"__wrapped__");if(k||R){var M=k?e.value():e,z=R?t.value():t;return d||(d=new Se),s(M,z,n,o,d)}}if(!_)return!1;return d||(d=new Se),function(e,t,n,a,o,i){var c=n&r,s=$e(e),l=s.length,u=$e(t),f=u.length;if(l!=f&&!c)return!1;var d=l;for(;d--;){var p=s[d];if(!(c?p in t:Z.call(t,p)))return!1}var v=i.get(e);if(v&&i.get(t))return v==t;var m=!0;i.set(e,t),i.set(t,e);var h=c;for(;++d<l;){var y=e[p=s[d]],b=t[p];if(a)var g=c?a(b,y,p,t,e,i):a(y,b,p,e,t,i);if(!(void 0===g?y===b||o(y,b,n,a,i):g)){m=!1;break}h||(h="constructor"==p)}if(m&&!h){var x=e.constructor,j=t.constructor;x==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof j&&j instanceof j||(m=!1)}return i.delete(e),i.delete(t),m}(e,t,n,o,s,d)}(e,t,n,o,Ae,s))}function Pe(e){return!(!Qe(e)||function(e){return!!K&&K in e}(e))&&(Ye(e)?te:k).test(He(e))}function Ie(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||J,t!==r)return ue(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Te(e,t,n,o,i,c){var s=n&r,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var f=c.get(e);if(f&&c.get(t))return f==t;var d=-1,p=!0,v=n&a?new Ce:void 0;for(c.set(e,t),c.set(t,e);++d<l;){var m=e[d],h=t[d];if(o)var y=s?o(h,m,d,t,e,c):o(m,h,d,e,t,c);if(void 0!==y){if(y)continue;p=!1;break}if(v){if(!V(t,(function(e,t){if(r=t,!v.has(r)&&(m===e||i(m,e,n,o,c)))return v.push(t);var r}))){p=!1;break}}else if(m!==h&&!i(m,h,n,o,c)){p=!1;break}}return c.delete(e),c.delete(t),p}function $e(e){return function(e,t,n){var r=t(e);return Ue(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ke,Be)}function Le(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function De(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=he?he(null):{},this.size=0},Ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ee.prototype.get=function(e){var t=this.__data__;if(he){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return he?void 0!==t[e]:Z.call(t,e)},Ee.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=he&&void 0===t?n:t,this},Oe.prototype.clear=function(){this.__data__=[],this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)},Oe.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},Oe.prototype.has=function(e){return Re(this.__data__,e)>-1},Oe.prototype.set=function(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},_e.prototype.clear=function(){this.size=0,this.__data__={hash:new Ee,map:new(de||Oe),string:new Ee}},_e.prototype.delete=function(e){var t=Le(this,e).delete(e);return this.size-=t?1:0,t},_e.prototype.get=function(e){return Le(this,e).get(e)},_e.prototype.has=function(e){return Le(this,e).has(e)},_e.prototype.set=function(e,t){var n=Le(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,n),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.clear=function(){this.__data__=new Oe,this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Oe){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _e(r)}return n.set(e,t),this.size=n.size,this};var Be=se?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}(se(e),(function(t){return oe.call(e,t)})))}:function(){return[]},Ve=Me;function Fe(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function He(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(fe&&Ve(new fe(new ArrayBuffer(1)))!=S||de&&Ve(new de)!=v||pe&&Ve(pe.resolve())!=b||ve&&Ve(new ve)!=w||me&&Ve(new me)!=_)&&(Ve=function(e){var t=Me(e),n=t==y?e.constructor:void 0,r=n?He(n):"";if(r)switch(r){case ye:return S;case be:return v;case ge:return b;case xe:return w;case je:return _}return t});var qe=ze(function(){return arguments}())?ze:function(e){return Xe(e)&&Z.call(e,"callee")&&!oe.call(e,"callee")},Ue=Array.isArray;var Ge=le||function(){return!1};function Ye(e){if(!Qe(e))return!1;var t=Me(e);return t==d||t==p||t==s||t==g}function Je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Ze=B?function(e){return function(t){return e(t)}}(B):function(e){return Xe(e)&&Je(e.length)&&!!M[Me(e)]};function Ke(e){return null!=(t=e)&&Je(t.length)&&!Ye(t)?ke(e):Ie(e);var t}e.exports=function(e,t){return Ae(e,t)}}(w,w.exports);var N=j(w.exports);function E(n){var r=n.isSelected,a=n.onSelect,i=n.option,c=t.useRef(null);t.useEffect((function(){var e=c.current;if(e){var t=function(t){document.activeElement===e&&"Enter"===t.key&&a(i)};return e.addEventListener("keydown",t),function(){e.removeEventListener("keydown",t)}}}),[i,a]);var s=o({onClick:function(){return a(i)},tabIndex:0,active:r,activatable:!0,pv:"small",ph:"small",mh:"tiny",r:!0},i);return e.jsx(Br.Item,o({ref:c},s))}function O(n){var r=n.customItem,a=n.onSelect;n.isOpen;var i=n.listProps,c=n.selected,s=n.options,l=n.close,u=t.useCallback((function(e){a(e),l()}),[]),f=s.map((function(t,n){var a={isSelected:N(t.value,null==c?void 0:c.value),onSelect:u,option:t};return r?e.jsx(r,o({},a),"item-".concat(n)):e.jsx(E,o({},a),"item-".concat(n))}));return e.jsx(Br,o({pv:"mini",gr:"mini"},i,{children:f}))}var _=t.forwardRef((function(n,r){var c=n.className,s=n.options,l=n.label,u=n.value,f=n.name,d=n.transparent,p=n.bordered,v=n.disabled,m=n.opened,h=n.postfix,b=n.prefix,x=n.accent,j=n.color,w=n.customItem,N=n.menuHeight,E=n.listProps,_=n.onChange,C=n.onClose,S=n.onOpen,k=n.size,R=i(n,["className","options","label","value","name","transparent","bordered","disabled","opened","postfix","prefix","accent","color","customItem","menuHeight","listProps","onChange","onClose","onOpen","size"]),M=t.useRef(null),z=x&&(!0===x?"accent":x);t.useImperativeHandle(r,(function(){return{}}));var A={menuHeight:N,onClose:C,onOpen:S,opened:m,content:function(t){var n=o({postfix:h,prefix:b,accent:x,selected:u,label:l,size:k,name:f},t);return e.jsx(g,o({},n))},menu:function(t){var n=o({onSelect:_,selected:u,customItem:w,listProps:E,options:s},t);return e.jsx(O,o({},n))},className:{container:a("select",z,j,k,{selected:!!u,transparent:d,disabled:v,bordered:p},c)},props:{container:o({"data-name":f},R),content:{"data-selected":!!(null==u?void 0:u.value)},menu:{}}};return e.jsx(y,o({ref:M},A))}));_.displayName="Mie.Select";var C=t.forwardRef((function(t,n){var r=t.className,c=t.inverted,s=t.iconSided,l=t.accent,u=t.subtitle,f=t.flattened,d=t.color,p=t.center,v=t.title,m=t.size,h=t.icon,y=i(t,["className","inverted","iconSided","accent","subtitle","flattened","color","center","title","size","icon"]),b=a("mie header",m,l&&(!0===l?"accent":l),d,{center:p,inverted:c,flattened:f},r);return e.jsxs("div",o({ref:n,className:b},y,{children:[h&&s&&h,e.jsxs("div",{className:"heading",children:[h&&!s&&h,v&&e.jsx("div",{className:"title",children:v}),u&&e.jsx("div",{className:"subtitle",children:u})]})]}))}));C.displayName="Mie.Header";var S=Object.assign,k=t.forwardRef((function(t,n){var r=t.className,c=t.style,s=t.transparent,l=t.container,u=t.children,f=t.circular,d=t.bordered;t.onClick;var p=t.accent,v=t.color,m=t.size,h=t.src,y=i(t,["className","style","transparent","container","children","circular","bordered","onClick","accent","color","size","src"]),b=a("mie image",m,p&&(!0===p?"accent":p),v,{bordered:d,transparent:s,circular:f},r),g=S({background:"url(".concat(h,")")},c||{});return l?e.jsx("div",o({},y,{ref:n,style:g,className:b,children:u})):e.jsx("img",o({},y,{ref:n,className:b,style:c,src:h}))}));k.displayName="Mie.Image";var R=t.forwardRef((function(n,r){var c=n.className,s=n.onChange,l=n.onFocus,u=n.onBlur,f=n.containerId,d=n.placeholder,p=n.transparent,v=n.disabled,m=n.bordered,h=n.accent,y=n.color,b=n.label,g=n.postfix,x=n.prefix,j=n.value,w=n.size,N=n.id,E=i(n,["className","onChange","onFocus","onBlur","containerId","placeholder","transparent","disabled","bordered","accent","color","label","postfix","prefix","value","size","id"]),O=h&&(!0===h?"accent":h),_=t.useState(!1),C=_[0],S=_[1],k=t.useCallback((function(e){null==s||s(e)}),[s]),R=t.useCallback((function(e){S(!0),null==l||l(e)}),[]),M=t.useCallback((function(e){S(!1),null==u||u(e)}),[]),z=a("mie entry",O,y,w,{disabled:v,transparent:p,bordered:m},c),A=o({className:a({filled:j&&j.length>0}),placeholder:C?d:"",onChange:k,disabled:v,onFocus:R,onBlur:M,value:j,ref:r,id:N},E);return e.jsxs("div",{id:f,className:z,children:[x,e.jsxs("div",{className:"field",children:[e.jsx("input",o({},A)),e.jsx("label",{htmlFor:N,children:b})]}),g]})}));R.displayName="Mie.Entry";var M=t.forwardRef((function(t,n){var r=t.className,c=t.children,s=t.disabled,l=t.checked,u=t.accent;t.value;var f=t.color,d=t.size,p=t.id,v=i(t,["className","children","disabled","checked","accent","value","color","size","id"]),m=a("mie radio",u&&(!0===u?"accent":u),f,d,{disabled:s},r),h=o({className:"input",type:"radio",disabled:s,checked:l,ref:n,id:p},v);return e.jsxs("div",{className:m,children:[e.jsx("input",o({},h)),e.jsxs("label",{className:"label",htmlFor:p,children:[e.jsx("div",{className:"indicator"}),c&&e.jsx("div",{className:"content",children:c})]})]})}));M.displayName="Mie.Radio";var z=t.forwardRef((function(t,n){var r=t.className,c=t.transparent,s=t.circular,l=t.floating,u=t.bordered,f=t.children,d=t.accent,p=t.color,v=t.size,m=i(t,["className","transparent","circular","floating","bordered","children","accent","color","size"]),h=a("mie label",v,d&&(!0===d?"accent":d),p,l&&(!0===l?"floating":"floating ".concat(l)),{bordered:u,transparent:c,circular:s},r);return e.jsx("div",o({ref:n},m,{className:h,children:f}))}));z.displayName="Mie.Label";var A=t.forwardRef((function(n,r){var c=n.disableSidePropagation,s=void 0===c||c,l=n.className,u=n.description,f=n.activatable,d=n.inverted,p=n.vertical,v=n.onClick,m=n.content,h=n.label,y=n.active,b=n.accent,g=n.center,x=n.hover,j=n.color,w=n.title,N=n.size,E=n.link,O=n.icon,_=n.side,C=i(n,["disableSidePropagation","className","description","activatable","inverted","vertical","onClick","content","label","active","accent","center","hover","color","title","size","link","icon","side"]),S=b&&(!0===b?"accent":b),k=t.useCallback((function(e){e.stopPropagation()}),[s]),R=a("mie item",S,j,N,{vertical:p,center:g,activatable:f,active:y,hover:x},l),M=e.jsxs(e.Fragment,{children:[h&&h,O&&O,e.jsx("div",{className:a("content",{inverted:d}),children:m||e.jsxs(e.Fragment,{children:[w&&e.jsx("div",{className:"title",children:w}),u&&e.jsx("div",{className:"description",children:u})]})}),_&&e.jsx("div",{className:"side",onClick:k,children:_})]});return t.createElement(E?"a":"div",o({href:E,className:R,onClick:v,ref:r},C),M)}));A.displayName="Mie.Item";var P=t.forwardRef((function(t,n){var r=t.className,c=t.circular,s=t.filled,l=t.accent,u=t.icon,f=t.size,d=t.color,p=t.bg,v=i(t,["className","circular","filled","accent","icon","size","color","bg"]),m=a("mie icon",l&&(!0===l?"accent":l),d,f,{circular:c,filled:s,bg:p},r);return e.jsx("div",o({ref:n,className:m},v,{children:u}))}));P.displayName="Mie.Icon";var I=t.forwardRef((function(e,n){var r=e.className,c=e.children,s=e.element,l=e.accent,u=e.center,f=e.invert,d=e.color,p=e.muted,v=e.fsemibold,m=e.fregular,h=e.flight,y=e.fbold,b=e.size,g=i(e,["className","children","element","accent","center","invert","color","muted","fsemibold","fregular","flight","fbold","size"]),x=a("mie text",l&&(!0===l?"accent":l),d,b,{fsemibold:v,fregular:m,flight:h,fbold:y,center:u,invert:f,muted:p},r),j=o(o({},g),{className:x,ref:n});return t.createElement(s||"div",j,c)}));I.displayName="Mie.Text";var T=9007199254740991,$="[object Arguments]",L="[object Function]",D="[object GeneratorFunction]",B=/^(?:0|[1-9]\d*)$/;function V(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var F=Object.prototype,H=F.hasOwnProperty,W=F.toString,q=F.propertyIsEnumerable,U=Math.max;function G(e,t){var n=ee(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&te(e)}(e)&&H.call(e,"callee")&&(!q.call(e,"callee")||W.call(e)==$)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)a&&("length"==o||Z(o,r))||n.push(o);return n}function Y(e,t,n,r){return void 0===e||K(e,F[n])&&!H.call(r,n)?t:e}function J(e,t,n){var r=e[t];H.call(e,t)&&K(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Q(e){if(!ne(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,r,a=(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||F,t===r),o=[];for(var i in e)("constructor"!=i||!a&&H.call(e,i))&&o.push(i);return o}function X(e,t){return t=U(void 0===t?e.length-1:t,0),function(){for(var n=arguments,r=-1,a=U(n.length-t,0),o=Array(a);++r<a;)o[r]=n[t+r];r=-1;for(var i=Array(t+1);++r<t;)i[r]=n[r];return i[t]=o,V(e,this,i)}}function Z(e,t){return!!(t=null==t?T:t)&&("number"==typeof e||B.test(e))&&e>-1&&e%1==0&&e<t}function K(e,t){return e===t||e!=e&&t!=t}var ee=Array.isArray;function te(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}(e.length)&&!function(e){var t=ne(e)?W.call(e):"";return t==L||t==D}(e)}function ne(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var re,ae=(re=function(e,t,n,r){!function(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a<o;){var i=t[a],c=r?r(n[i],e[i],i,n,e):void 0;J(n,i,void 0===c?e[i]:c)}}(t,function(e){return te(e)?G(e):Q(e)}(t),e,r)},X((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(a=re.length>3&&"function"==typeof a?(r--,a):void 0,o&&function(e,t,n){if(!ne(n))return!1;var r=typeof t;return!!("number"==r?te(n)&&Z(t,n.length):"string"==r&&t in n)&&K(n[t],e)}(t[0],t[1],o)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var i=t[n];i&&re(e,i,n,a)}return e})));var oe=j(X((function(e){return e.push(void 0,Y),V(ae,void 0,e)})));function ie(e){for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var a=r[n],o=a[0],i=a[1];if(i){var c=!0===i?o:"".concat(o,"-").concat(i);t.push(c)}}return t}var ce={spaceBetween:!1,gap:!1,padding:!0,margin:!0,rounded:!0,shadow:!0,flex:!0};function se(e,t){var n,r,a=[],o=oe(t,ce);return o.shadow&&a.push(function(e){var t=e.shadow;return t&&(!0===t?"shadow":"shadow ".concat(t))}(e.shadow)),o.rounded&&a.push.apply(a,function(e){for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var a=r[n],o=a[0],i=a[1];if(i){var c=!0===i?o:"".concat(o,"-").concat(i);t.push(c)}}return t}(e.rounded)),o.flex&&a.push.apply(a,(n=e.flex,r=[],["f1","f","fc","fr","fw"].forEach((function(e){n[e]&&r.push(e)})),["fjc","fai"].forEach((function(e){n[e]&&r.push("".concat(e,"-").concat(n[e]))})),r)),o.gap&&a.push.apply(a,function(e){for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var a=r[n],o=a[0],i=a[1];if(i){var c=!0===i?o:"".concat(o,"-").concat(i);t.push(c)}}return t}(e.gap)),o.margin&&a.push.apply(a,ie(e.margin)),o.padding&&a.push.apply(a,ie(e.padding)),o.margin&&a.push.apply(a,function(e){for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var a=r[n],o=a[0],i=a[1];if(i){var c=!0===i?o:"".concat(o,"-").concat(i);t.push(c)}}return t}(e.spaceBetween)),a}function le(e){var t=e.fjc,n=e.fai,r=e.fc,a=e.fw,o=e.f1,c=e.fr,s=e.f,l=e.p,u=e.ph,f=e.pv,d=e.pt,p=e.pr,v=e.pb,m=e.pl,h=e.m,y=e.mh,b=e.mv,g=e.mt,x=e.mr,j=e.mb,w=e.ml,N=e.r,E=e.rt,O=e.rb,_=e.rl,C=e.rr,S=e.rtl,k=e.rtr,R=e.rbl,M=e.rbr,z=e.g,A=e.gr,P=e.gc;return{spaceBetween:{sbh:e.sbh,sbv:e.sbv},rounded:{r:N,rt:E,rb:O,rl:_,rr:C,rtl:S,rtr:k,rbl:R,rbr:M},flex:{fjc:t,fai:n,fc:r,f1:o,fr:c,f:s,fw:a},gap:{g:z,gc:P,gr:A},padding:{p:l,ph:u,pv:f,pt:d,pr:p,pb:v,pl:m},margin:{m:h,mh:y,mv:b,mt:g,mr:x,mb:j,ml:w},shadow:{shadow:e.shadow},props:i(e,["fjc","fai","fc","fw","f1","fr","f","p","ph","pv","pt","pr","pb","pl","m","mh","mv","mt","mr","mb","ml","r","rt","rb","rl","rr","rtl","rtr","rbl","rbr","g","gr","gc","sbh","sbv","shadow"])}}var ue=t.forwardRef((function(e,n){var r=e.options,o=void 0===r?ce:r,c=e.props,s=e.component,l=le(c||{}),u=l.props,f=i(l,["props"]);return u.ref=n,u.className=a(u.className,se(f,o)),t.createElement(s,u)}));function fe(n,r){var a=t.forwardRef((function(t,a){var i={component:n,options:r,props:t};return e.jsx(ue,o({ref:a},i))}));return a.displayName="".concat(n.displayName,".Layout"),a}var de=fe(h,{flex:!1}),pe=fe(C,{flex:!1}),ve=fe(_,{flex:!1}),me=fe(R,{flex:!1}),he=fe(M,{flex:!1}),ye=fe(I,{flex:!1}),be=fe(P,{flex:!1}),ge=fe(A,{flex:!1}),xe=fe(z),je=fe(k),we=fe(m,{flex:!1}),Ne=fe(f,{flex:!1}),Ee=Object.assign(fe(p,{rounded:!0}),{Group:Ne}),Oe=fe(s),_e=Object.assign(fe(u,{flex:!1}),{Bar:Oe}),Ce=Object.freeze({__proto__:null,Button:Ee,ButtonGroup:Ne,Checkbox:we,Divider:de,Entry:me,Header:pe,Icon:be,Image:je,Item:ge,Label:xe,Progress:_e,ProgressBar:Oe,Radio:he,Select:ve,Text:ye}),Se=t.forwardRef((function(t,n){var r=t.className,c=i(t,["className"]);return e.jsx(_,o({ref:n,className:a("row",r)},c))}));Se.displayName="Mie.Select.Row";var ke=t.forwardRef((function(t,n){var r=t.className,c=i(t,["className"]);return e.jsx(R,o({ref:n,className:a("row",r)},c))}));ke.displayName="Mie.Entry.Row";var Re=t.forwardRef((function(t,n){var r=t.className,c=i(t,["className"]),s=a("row property",r);return e.jsx(A,o({ref:n,className:s},c))}));Re.displayName="Mie.Row";var Me=t.forwardRef((function(t,n){var r=t.className,c=t.children,s=i(t,["className","children"]),l=a("mie rows",r);return e.jsx("div",o({ref:n,className:l},s,{children:c}))}));Me.displayName="Mie.Rows";var ze=Object.assign(Me,{Select:Se,Entry:ke,Row:Re}),Ae=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M3.988 3.992v8.012H12V3.992zm2 2H10v4.012H5.988zm0 0"})}))};Ae.displayName="Mie.Icon.Window.Maximize";var Pe=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M4 10.008h8v1.988H4zm0 0"})}))};Pe.displayName="Mie.Icon.Window.Minimize";var Ie=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M4.988 4.992v6.012H11V4.992zm2 2H9v2.012H6.988zm0 0"})}))};Ie.displayName="Mie.Icon.Window.Restore";var Te=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M4 4h1.031c.254.012.512.129.688.313L8 6.592l2.313-2.28c.265-.231.445-.305.687-.313h1v1c0 .285-.035.55-.25.75L9.469 8.031l2.25 2.25c.187.188.281.453.281.719v1h-1c-.266 0-.531-.094-.719-.281L8 9.438l-2.281 2.28A1.016 1.016 0 0 1 5 12H4v-1c0-.266.094-.531.281-.719l2.282-2.25L4.28 5.75A.904.904 0 0 1 4 5zm0 0"})}))};Te.displayName="Mie.Icon.Window.Close";var $e=Object.freeze({__proto__:null,Close:Te,Maximize:Ae,Minimize:Pe,Restore:Ie}),Le=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M7.996 0C5.16 0 2.703 2 2.125 4.777 1.598 7.313 2.813 9.812 5 11.105V12a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1l.004-.898c2.18-1.293 3.398-3.797 2.867-6.332A6.011 6.011 0 0 0 7.996 0zm0 2a3.994 3.994 0 0 1 3.918 3.18 3.99 3.99 0 0 1-2.312 4.488 1.002 1.002 0 0 0-.602.914V11H7v-.418a1.006 1.006 0 0 0-.602-.914c-1.742-.762-2.703-2.625-2.316-4.484S6.098 2 7.996 2zM6 14v1c0 .555.445 1 1 1h2c.555 0 1-.445 1-1v-1zm0 0"}),e.jsx("path",{fillOpacity:.349,d:"M6.645 6.145a.5.5 0 0 0 0 .707l1 1a.5.5 0 0 0 .707 0l1-1a.5.5 0 0 0 0-.707.507.507 0 0 0-.707 0l-.649.648-.644-.648a.507.507 0 0 0-.707 0zm0 0"})]})}))};Le.displayName="Mie.Icon.Dialog.Information";var De=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M6 1a5 5 0 1 0 0 10 4.989 4.989 0 0 0 2.383-.617L9 11v2h2v2h4v-3l-4.309-4.309c.2-.543.305-1.113.309-1.691a5 5 0 0 0-5-5zM5 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 0"})}))};De.displayName="Mie.Icon.Dialog.Password";var Be=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M8 .031c-.398 0-.816.16-1.125.469L.5 6.875a1.591 1.591 0 0 0 0 2.25L6.875 15.5a1.591 1.591 0 0 0 2.25 0L15.5 9.125a1.591 1.591 0 0 0 0-2.25L9.125.5A1.61 1.61 0 0 0 8 .031zm.152 2.977a2.99 2.99 0 0 1 1.97.87 3.012 3.012 0 0 1 .651 3.27A3.015 3.015 0 0 1 9 8.82V10H7V8c0-.55.45-1 1-1a1 1 0 1 0-1-1H5c0-1.21.734-2.309 1.852-2.77a2.945 2.945 0 0 1 1.3-.222zM8 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 0"})}))};Be.displayName="Mie.Icon.Dialog.Question";var Ve=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M7.906.094C7.38.066 6.867.375 6.47 1.063L.219 12.655C-.316 13.621.266 15 1.312 15H14.47c.98 0 1.902-1.16 1.219-2.344L9.375 1.125C8.977.48 8.434.121 7.906.094zM9 4v5c.008.527-.473 1-1 1s-1.008-.473-1-1V4zm-1 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 0"})}))};Ve.displayName="Mie.Icon.Dialog.Warning";var Fe=function(t){return e.jsx("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:16,height:16},t,{children:e.jsx("path",{fill:"currentColor",d:"M8 1C4.129 1 1 4.129 1 8s3.129 7 7 7 7-3.129 7-7-3.129-7-7-7zM4 7h8v2H4zm0 0"})}))};Fe.displayName="Mie.Icon.Dialog.Error";var He=Object.freeze({__proto__:null,Error:Fe,Information:Le,Password:De,Question:Be,Warning:Ve}),We=Object.freeze({__proto__:null,Dialog:He,EmblemOk:v,Window:$e});function qe(t){var n=t.description,r=t.onClose,a=t.title,o=t.icon;return e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{className:"icon",children:o}),e.jsxs("div",{className:"content",children:[a&&e.jsx("div",{className:"title",children:a}),n&&e.jsx("div",{className:"description",children:n})]}),e.jsx(p,{icon:e.jsx(P,{icon:e.jsx(Te,{})}),onClick:r,className:"close",size:"small",transparent:!0,circular:!0})]})}var Ue=t.forwardRef((function(t,n){var r=t.description,c=t.attached,s=t.children,l=t.onClose,u=t.accent,f=t.marked,d=t.banner,p=t.color,v=t.title,m=t.size,h=t.icon,y=i(t,["description","attached","children","onClose","accent","marked","banner","color","title","size","icon"]),b=a("mie message",!0===u?"accent":u,p,m,{banner:d,marked:f},c&&"attached attached-".concat(c)),g={description:r,onClose:l,title:v,icon:h};return e.jsx("div",o({ref:n,className:b},y,{children:s||e.jsx(qe,o({},g))}))}));Ue.displayName="Mie.Message";var Ge=Object.assign(Ue,{Content:qe}),Ye={maximize:e.jsx(Ae,{}),minimize:e.jsx(Pe,{}),restore:e.jsx(Ie,{}),close:e.jsx(Te,{})},Je=t.forwardRef((function(t,n){var r=t.icons,c=void 0===r?Ye:r,s=t.className,l=t.onClickControl,u=t.controls,f=i(t,["icons","className","onClickControl","controls"]),d=a("mie window-controls",s),v=oe(c,Ye);return e.jsx("div",o({ref:n},f,{className:d,children:u.map((function(t,n){return e.jsx(p,{onClick:function(e){return null==l?void 0:l(e,t)},icon:e.jsx(P,{icon:v[t]}),transparent:"close"!==t,className:t,size:"tiny",circular:!0},"".concat(t,"-").concat(n))}))}))}));Je.displayName="Mie.Window.Controls";var Qe=t.forwardRef((function(t,n){var r=t.className,c=t.transparent,s=t.bordered,l=t.controls,u=t.accent,f=t.header,d=t.left,p=t.right,v=i(t,["className","transparent","bordered","controls","accent","header","left","right"]),m=a("mie headerbar",u&&(!0===u?"accent":u),{transparent:c,bordered:s},r);return e.jsxs("div",o({ref:n},v,{className:m,children:[!!v["data-desktop-drag"]&&e.jsx("div",o({},{"data-tauri-drag-region":!0,style:{WebkitAppRegion:"drag",position:"absolute",height:"100%",width:"100%",left:0,top:0}})),e.jsx("div",{className:"left",children:d}),e.jsx("div",{className:"center",children:f}),e.jsxs("div",{className:"right",children:[e.jsx("div",{className:"content",children:p}),l]})]}))}));Qe.displayName="Mie.HeaderBar";var Xe=t.forwardRef((function(t,n){var r=t.className,c=t.animateStyle,s=void 0===c?"width":c,l=t.opened,u=void 0!==l&&l,f=t.headerbar,d=t.children,p=t.accent,v=t.color,m=t.size,h=i(t,["className","animateStyle","opened","headerbar","children","accent","color","size"]),y=a("mie sidebar",m,p&&(!0===p?"accent":p),v,s,{opened:u},r);return e.jsx("div",o({ref:n},h,{className:y,children:e.jsxs("div",{className:"content",children:[f&&f,d]})}))}));Xe.displayName="Mie..Sidebar";var Ze=t.forwardRef((function(t,n){var r=t.className,c=t.contentClassName,s=t.headerbar,l=t.children,u=t.sidebar,f=t.overlay,d=t.accent,p=t.color,v=i(t,["className","contentClassName","headerbar","children","sidebar","overlay","accent","color"]),m=a("mie splitview",d&&(!0===d?"accent":d),p,r);return e.jsxs("div",o({ref:n},v,{className:m,children:[u,f&&e.jsx("div",{onClick:f,className:"overlay"}),e.jsxs("div",{className:"container",children:[s,e.jsx("div",{className:a("content",c),children:l})]})]}))}));Ze.displayName="Mie.SplitView";var Ke=Object.assign(Ze,{Sidebar:Xe}),et=t.forwardRef((function(t,n){var r=t.className,c=t.transparent,s=t.children,l=t.headerbar,u=t.split,f=t.accent,d=t.color,p=i(t,["className","transparent","children","headerbar","split","accent","color"]),v=a("mie window",f&&(!0===f?"accent":f),d,{transparent:c},r);return e.jsx("div",o({ref:n},p,{className:v,children:u?e.jsx(Ke,o({},u,{children:s})):e.jsxs(e.Fragment,{children:[l&&e.jsx(Qe,o({},l)),s]})}))}));et.displayName="Mie.Window";var tt=Object.assign(et,{Controls:Je});function nt(t){var n=le(t),r=n.props,o=r.className,s=r.height,l=r.offset,u=r.accent,f=r.color,d=r.width,p=se(i(n,["props"]),{flex:!1}),v=u&&(!0===u?"accent":u),m=a.apply(void 0,c(c(["mie tab background",v,f],p,!1),[o],!1));return e.jsx("div",{className:m,style:{height:s,width:d,left:l}})}var rt=t.forwardRef((function(t,n){var r=t.className,o=t.accent,i=t.color,c=t.children,s=a("mie tabs",o&&(!0===o?"accent":o),i,r);return e.jsx("div",{ref:n,className:s,children:c})}));rt.displayName="Mie.Tabs.Raw";var at=t.forwardRef((function(t,n){var r=le(t),o=r.props,s=o.className,l=o.transparent,u=o.selected,f=o.onClick,d=o.accent,p=o.color,v=o.title,m=o.icon,h=o.name,y=se(i(r,["props"]),{flex:!1}),b=d&&(!0===d?"accent":d),g=h===u,x=a.apply(void 0,c(["mie tab",b,p,s,{active:g,transparent:l}],y,!1));return e.jsxs("div",{ref:n,className:x,onClick:f,children:[m&&m,v]})}));at.displayName="Mie.Tabs.Tab";var ot=t.forwardRef((function(n,r){var s=t.useRef(null),l=t.useRef(null),u=t.useState(0),f=u[0],d=u[1],p=t.useState(0),v=p[0],m=p[1],h=t.useState(0),y=h[0],b=h[1],g=t.useMemo((function(){return Array.isArray(n.tabs)?n.tabs.find((function(e){return n.selected===e.name})):n.tabs[n.selected]}),[n.tabs,n.selected]);if(!g)throw new Error("Property 'selected' required in Tabs component.");var x=le(n),j=x.props,w=j.className,N=j.tabProps,E=j.transparent,O=j.onChange,_=j.animated,C=j.selected,S=j.accent,k=j.color,R=j.tabs,M=S&&(!0===S?"accent":S),z=se(i(x,["props"]),{flex:!1});t.useEffect((function(){if(s.current){var e=s.current,t=e.offsetLeft,n=e.clientWidth,r=e.clientHeight;d(r),m(t),b(n)}}),[C,s]);var A=t.useCallback((function(e,t){return function(e){null==O||O(t)}}),[O,R]);t.useImperativeHandle(r,(function(){return{}}));var P=t.useCallback((function(t,n){var r=o(o({ref:C===t.name?s:l,onClick:A(n,t.name),transparent:_,selected:C,index:n},N),t);return e.jsx(at,o({},r),t.name)}),[C,_,N]),I=Array.isArray(R)?R.map(P):Object.entries(R).map((function(e,t){e[0];var n=e[1];return P(n,t)})),T=a.apply(void 0,c(c(["mie tabs",M,k,{transparent:E}],z,!1),[w],!1));return e.jsxs("div",{className:T,children:[I,_&&e.jsx(nt,o({},N,{accent:g.accent,color:g.color,offset:v,height:f,width:y}))]})}));ot.displayName="Mie.Tabs";var it=Object.assign(ot,{Raw:rt}),ct=t.forwardRef((function(n,r){var c=n.className,s=n.style,l=n.children,u=n.open,f=i(n,["className","style","children","open"]),d=t.useState(u?void 0:0),p=d[0],v=d[1],m=t.useRef(null);t.useEffect((function(){if(p&&u&&m.current){var e=new ResizeObserver((function(e){var t=e[0].contentRect;v(t.height)}));return e.observe(m.current),function(){e.disconnect()}}}),[p,u]),t.useEffect((function(){var e,t=null===(e=m.current)||void 0===e?void 0:e.getBoundingClientRect().height;v(u?t:0)}),[u]);var h=a("mie collapsible",c),y=Object.assign({},{height:p},s||{});return e.jsx("div",o({ref:r,className:h,style:y},f,{children:e.jsx("div",{ref:m,children:l})}))}));ct.displayName="Mie.Collapsible";var st=t.forwardRef((function(t,n){var r=t.className,c=t.children,s=t.accent,l=t.color,u=t.active,f=t.hover,d=i(t,["className","children","accent","color","active","hover"]),p=a("mie activatable",s&&(!0===s?"accent":s),l,{active:u,hover:f},r);return e.jsx("div",o({ref:n},d,{className:p,children:c}))}));function lt(e,t){void 0===t&&(t=document.body);var n=document.getElementById(e);if(n)return n;var r=document.createElement("div");return r.setAttribute("id",e),t.appendChild(r),r}function ut(t){var n=t.isOpen,r=t.onRequestClose;return n&&e.jsx("div",{className:"mie modal-overlay",onClick:r})}st.displayName="Mie.Activatable";function ft(t){var r=t.children,a=i(t,["children"]),c=n.createPortal(e.jsx(ut,o({},a)),lt("overlay-root")),s=n.createPortal(r,lt("modal-root"));return e.jsxs("div",{children:[c,s]})}function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(null,arguments)}function pt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function vt(e,t){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vt(e,t)}function mt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vt(e,t)}var ht,yt={exports:{}},bt={exports:{}},gt={};var xt,jt,wt,Nt,Et,Ot,_t,Ct,St,kt,Rt,Mt,zt,At,Pt={}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function It(){return jt||(jt=1,"production"===process.env.NODE_ENV?bt.exports=function(){if(ht)return gt;ht=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:switch(e=e.type){case s:case l:case r:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case u:case v:case p:case i:return e;default:return d}}case n:return d}}}function x(e){return g(e)===l}return gt.AsyncMode=s,gt.ConcurrentMode=l,gt.ContextConsumer=c,gt.ContextProvider=i,gt.Element=t,gt.ForwardRef=u,gt.Fragment=r,gt.Lazy=v,gt.Memo=p,gt.Portal=n,gt.Profiler=o,gt.StrictMode=a,gt.Suspense=f,gt.isAsyncMode=function(e){return x(e)||g(e)===s},gt.isConcurrentMode=x,gt.isContextConsumer=function(e){return g(e)===c},gt.isContextProvider=function(e){return g(e)===i},gt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},gt.isForwardRef=function(e){return g(e)===u},gt.isFragment=function(e){return g(e)===r},gt.isLazy=function(e){return g(e)===v},gt.isMemo=function(e){return g(e)===p},gt.isPortal=function(e){return g(e)===n},gt.isProfiler=function(e){return g(e)===o},gt.isStrictMode=function(e){return g(e)===a},gt.isSuspense=function(e){return g(e)===f},gt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===o||e===a||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===p||e.$$typeof===i||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},gt.typeOf=g,gt}():bt.exports=(xt||(xt=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var m=e.type;switch(m){case s:case l:case r:case o:case a:case f:return m;default:var h=m&&m.$$typeof;switch(h){case c:case u:case v:case p:case i:return h;default:return d}}case n:return d}}}var x=s,j=l,w=c,N=i,E=t,O=u,_=r,C=v,S=p,k=n,R=o,M=a,z=f,A=!1;function P(e){return g(e)===l}Pt.AsyncMode=x,Pt.ConcurrentMode=j,Pt.ContextConsumer=w,Pt.ContextProvider=N,Pt.Element=E,Pt.ForwardRef=O,Pt.Fragment=_,Pt.Lazy=C,Pt.Memo=S,Pt.Portal=k,Pt.Profiler=R,Pt.StrictMode=M,Pt.Suspense=z,Pt.isAsyncMode=function(e){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||g(e)===s},Pt.isConcurrentMode=P,Pt.isContextConsumer=function(e){return g(e)===c},Pt.isContextProvider=function(e){return g(e)===i},Pt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Pt.isForwardRef=function(e){return g(e)===u},Pt.isFragment=function(e){return g(e)===r},Pt.isLazy=function(e){return g(e)===v},Pt.isMemo=function(e){return g(e)===p},Pt.isPortal=function(e){return g(e)===n},Pt.isProfiler=function(e){return g(e)===o},Pt.isStrictMode=function(e){return g(e)===a},Pt.isSuspense=function(e){return g(e)===f},Pt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===o||e===a||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===p||e.$$typeof===i||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},Pt.typeOf=g}()),Pt)),bt.exports} /* object-assign (c) Sindre Sorhus @license MIT */function Tt(){if(Nt)return wt;Nt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return wt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,a){for(var o,i,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),s=1;s<arguments.length;s++){for(var l in o=Object(arguments[s]))t.call(o,l)&&(c[l]=o[l]);if(e){i=e(o);for(var u=0;u<i.length;u++)n.call(o,i[u])&&(c[i[u]]=o[i[u]])}}return c},wt}function $t(){if(Ot)return Et;Ot=1;return Et="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Lt(){return Ct?_t:(Ct=1,_t=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Dt=It();yt.exports=function(){if(Mt)return Rt;Mt=1;var e=It(),t=Tt(),n=$t(),r=Lt(),a=function(){if(kt)return St;kt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=$t(),n={},r=Lt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,o,i,c,s){if("production"!==process.env.NODE_ENV)for(var l in a)if(r(a,l)){var u;try{if("function"!=typeof a[l]){var f=Error((c||"React class")+": "+i+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=a[l](o,l,c,i,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((c||"React class")+": type specification of "+i+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned