@wavv/ui 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +1 -1
- package/build/esm/index.js +1 -1
- package/package.json +1 -1
package/build/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
23
|
*/
|
|
24
|
-
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=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;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(s[u]=n[u]);if(r){a=r(n);for(var l=0;l<a.length;l++)i.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV)var r=n(2),o=n(4),i=n(3),a={};e.exports=function(e,n,s,c,u){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",c||"React class",s,l,typeof e[l]),f=e[l](n,l,c,s,null,i)}catch(e){f=e}if(o(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",s,l,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=u?u():"";o(!1,"Failed %s type: %s%s",s,f.message,null!=p?p:"")}}}}).call(t,n(0))},function(e,t,n){var r=n(1),o=n(2),i=n(3);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="insert",o="backspace",i=t.isInvalidKey=function(e){return"Backspace"!==e&&!/[0-9]/.test(e)},a=function(e){return e.start!==e.end};t.update=function(e,t,n){var r=a(t);return"Backspace"===n?s(e,t):function(e,t,n){return!(10===u(e).length&&!n||i(t))}(e,n,r)?c(e,t,n):{phoneNumber:e,cursorPosition:t.start}};var s=t.backspace=function(e,t){var n=t.start,r=t.end,i=e;if(!a(t)&&n>0&&e[n-1].match(/[0-9]/)&&(i=e.substring(0,n-1)+i.substring(n)),a(t)){var s=e.substring(n,r).replace(/\d/g,"");i=e.substring(0,n)+s+i.substring(r)}var c=p(e,i,t,o);return{phoneNumber:f(i),cursorPosition:c}},c=t.insert=function(e,t,n){t.start,t.end;var o=e;a(t)&&(o=l(e,n,t)),a(t)||(o=l(e,n,t));var i=p(e,o,t,r);return{phoneNumber:f(o),cursorPosition:i}},u=t.normalize=function(e){return e.replace(/\D/g,"")},l=t.insertChars=function(e,t,n){return e.substring(0,n.start)+t+e.substring(n.end)},f=t.format=function(e){var t=u(e),n=t.substring(0,3),r=t.substring(3,6),o=t.substring(6,11);return o?"("+n+") "+r+"-"+o:r?n+"-"+r:t},p=t.getCursorPosition=function(e,t,n,i){if(n.start===e.length)return f(t).length;if(0===n.start){if(i===o)return 0;if(i===r)return 1}if(i===o){var s=/[^0-9]/g;if(a(n)&&s.test(e.substring(n.start,n.end)))return n.start;if(!a(n)&&s.test(e[n.start-1]))return n.start-1}var c=e.substring(n.end).match(/[0-9]/g),u=c?c.length:0,l=f(t),p=d(l,u);return l.length-p},d=t.getCharCountFromEndWithNumbers=function(e,t){var n=e.split("");n.reverse();var r=0,o=n.reduce((function(e,n){return r===t?e:(/[0-9]/.test(n)&&r++,e+1)}),0);return r<t?0:o}}]);const zr=t=>{var{size:n,color:r,center:o,background:i,margin:s,marginTop:c,marginBottom:u,marginRight:l,marginLeft:f,position:p,top:d,bottom:h,right:g,left:y}=t,v=a(t,["size","color","center","background","margin","marginTop","marginBottom","marginRight","marginLeft","position","top","bottom","right","left"]);const m={margin:s,marginTop:c,marginBottom:u,marginRight:l,marginLeft:f,position:p,top:d,bottom:h,right:g,left:y};return e.jsx(Hr,Object.assign({},m,{center:o,background:i},{children:e.jsx(Ur,{children:e.jsx(un,Object.assign({},v,{size:n,name:"loading",color:r,inheritColor:!r}))})}))},Hr=X.div({width:"max-content",height:"max-content"},(({center:e})=>e&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),(({center:e,background:t})=>{if(!e||!t)return null;return{background:"string"==typeof t?t:"rgba(0, 0, 0, 0.5)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}),an,sn),Vr=n.keyframes({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Ur=X.div({animation:`${Vr} 1s linear infinite`,width:"max-content",height:"max-content"}),Kr=(e,n,r=!0)=>{const[o,i]=t.useState(!1);return{focused:o,handleFocus:t=>{r&&i(!0),e&&e(t)},handleBlur:e=>{i(!1),n&&n(e)}}},$r=e=>!!e||null!=e&&""!==e,Wr=X.div((({theme:{input:e},backgroundColor:t,borderRadius:n,borderless:r,borderColor:o,textOnly:i,focused:a,invalid:s,disabled:c,hasLabel:u,pointer:l})=>({display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",minHeight:u?48:40,height:u?48:40,padding:"5px 16px",boxSizing:"border-box",color:c?e.labelColor.disabled:e.labelColor.default,backgroundColor:e.background.default,borderBottom:r?void 0:"1px solid",borderColor:o||e.borderColor.default,borderRadius:null!=n?n:4,borderBottomLeftRadius:0,borderBottomRightRadius:0,cursor:l?"pointer":void 0,"&:hover":{backgroundColor:c||i||t?void 0:e.background.hover,borderColor:a||c||r||s?void 0:e.borderColor.hover,Label:{color:a||c?void 0:e.labelColor.hover}}})),(({theme:{input:e},focused:t})=>({backgroundColor:t?e.background.focused:void 0,borderColor:t?e.borderColor.focused:void 0})),(({theme:{input:e},invalid:t})=>({borderColor:t?e.borderColor.error:void 0})),(({theme:{input:e},disabled:t,readOnly:n})=>({backgroundColor:t?e.background.disabled:void 0,borderColor:t?e.borderColor.disabled:void 0,pointerEvents:t||n?"none":void 0})),(({borderless:e})=>({border:e?"none":void 0})),(({theme:e,textOnly:t,disabled:n})=>({padding:t?0:void 0,backgroundColor:t?"transparent":void 0,width:t?"max-content":void 0,height:t?"max-content":void 0,minHeight:t?"max-content":void 0,color:t&&n?e.scale4:void 0})),(({backgroundColor:e})=>({backgroundColor:e})),rn,an),qr=X.div((({readOnly:e})=>({display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",position:"relative","& > label, & > input":{pointerEvents:e?"none":void 0,caretColor:e?"transparent":void 0}}))),Gr=X.label((({theme:{font:e,input:t},filled:n,focused:r})=>({fontSize:n||r?e.size.sm:e.size.lg,color:n?t.labelColor.filled:t.labelColor.default,position:"relative",top:n||r?void 0:1})),(({theme:{input:e},disabled:t})=>({color:t?e.labelColor.disabled:void 0})),(({theme:{input:e},focused:t})=>({color:t?e.labelColor.focused:void 0})));var Zr={Container:Wr,Wrapper:qr,Label:Gr,useInputFocus:Kr,isInputFilled:$r};const Yr=(n,r)=>{const o=e=>t.cloneElement(e,r);return"string"==typeof n?e.jsx(un,Object.assign({name:n,inheritColor:!0},r)):"object"==typeof n&&"props"in n&&"trigger"in n.props?t.cloneElement(n,{trigger:o(n.props.trigger)}):"object"==typeof n&&"props"in n?o(n):e.jsx(un,Object.assign({},n,r))},Xr=t.forwardRef(((r,o)=>{var{id:i,label:s,placeholder:c,placeholderColor:u,description:l,isLoading:f,search:p,phone:d,textOnly:h,iconLeft:g,iconRight:y,invalid:v,borderless:m,borderRadius:b,borderColor:w,backgroundColor:x,fontSize:_,width:C,height:O,margin:S,marginLeft:k,marginRight:E,marginTop:j,marginBottom:A,containerRef:T,value:P,disabled:M,readOnly:D,preventFocus:R,pointer:N,onChange:I,onClick:L,onClear:B,onFocus:F,onBlur:z}=r,H=a(r,["id","label","placeholder","placeholderColor","description","isLoading","search","phone","textOnly","iconLeft","iconRight","invalid","borderless","borderRadius","borderColor","backgroundColor","fontSize","width","height","margin","marginLeft","marginRight","marginTop","marginBottom","containerRef","value","disabled","readOnly","preventFocus","pointer","onChange","onClick","onClear","onFocus","onBlur"]);const{focused:V,handleFocus:U,handleBlur:K}=Kr(F,z,!R&&!D),$=t.useRef(null),{color:W}=n.useTheme(),[q,G]=t.useState(h?50:void 0),Z=t.useRef(null);t.useLayoutEffect((()=>{if(h&&Z){const{current:e}=Z,t=null==e?void 0:e.offsetWidth;"number"==typeof t&&G(t+3)}}),[h,P,c,Z]);const Y=h?P||c:P,X=P&&B&&!f,J=()=>{V||U()},Q=()=>{V&&K()};t.useImperativeHandle(o,(()=>({focus:J,blur:Q,hasFocus:V}))),t.useEffect((()=>{var e;V&&(null===(e=$.current)||void 0===e||e.focus())}),[V]);return e.jsxs(Wr,Object.assign({ref:T,invalid:v,textOnly:h,borderless:m||h,borderRadius:b,borderColor:w,backgroundColor:x,width:C,height:O,margin:S,marginLeft:k,marginRight:E,marginTop:j,marginBottom:A,focused:V,disabled:M,hasLabel:!!s,onClick:e=>{R||D||J(),L&&L(e)},pointer:N,readOnly:D},{children:[p&&e.jsx(un,{name:"search",marginRight:8,inheritColor:!0}),g&&Yr(g,{marginRight:8}),e.jsxs(qr,Object.assign({readOnly:D||R},{children:[h&&e.jsx(to,Object.assign({ref:Z,fontSize:_},{children:Y})),s&&!h&&e.jsx(Gr,Object.assign({htmlFor:i||s,filled:$r(P),focused:V,disabled:M},{children:s})),e.jsx(Jr,Object.assign({id:i||s,ref:$,value:P,placeholder:c,placeholderColor:u,onChange:e=>{if(d){const{value:t}=e.target,n=Fr.normalize(t);if(n.length>10)return;const r=Fr.format(n);I&&I(e,r,n)}else I&&I(e)},onFocus:U,onBlur:K,disabled:M,hide:!($r(P)||!s||V||h),width:q,fontSize:_},H))]})),y&&Yr(y),f&&e.jsx(zr,{}),X&&e.jsx(Qr,Object.assign({onClick:B},{children:e.jsx(un,{name:"close-circle-outline",color:W.brand})})),l&&e.jsx(eo,Object.assign({invalid:v},{children:l}))]}))})),Jr=X.input((({theme:{font:e,input:t,size:n,accent:r},fontSize:o,hide:i,disabled:a,width:s,placeholderColor:c})=>({outline:"none",border:"none",color:a?t.color.disabled:t.color.default,caretColor:r,backgroundColor:"transparent",paddingLeft:0,fontSize:o||e.size.lg,fontFamily:e.family.default,width:s||"100%",height:"100%",marginRight:n.sm,boxSizing:"border-box",opacity:i?0:1,position:i?"absolute":void 0,"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active":{transition:"background-color 0s 50000s",WebkitTextFillColor:t.color.default},"&::placeholder":{color:c||t.color.placeholder,opacity:1}}))),Qr=X.div({height:"100%",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:4}),eo=X.div((({theme:{font:e,input:t},invalid:n})=>({color:n?t.color.descriptionError:t.color.description,fontSize:e.size.sm,position:"absolute",left:0,top:"calc(100% + 4px)"}))),to=X.div((({theme:{font:e},fontSize:t})=>({position:"absolute",width:"max-content",opacity:0,fontSize:t||e.size.lg,zIndex:-1}))),no=({id:n,children:o,containerRef:i,parentSelector:a,width:s,maxHeight:c=200,offsetY:u,offsetX:l,centerY:f,centerX:p,direction:d})=>{const[h,g]=t.useState(),y=t.useRef(null);t.useLayoutEffect((()=>{const{current:e}=i||y;if(e&&d){const{scrollWidth:t,scrollHeight:n}=e,r="left"===d||"right"===d;g((r?t:n<c?n:c)+((r?l:u)||4))}}),[i,d]);const v=e.jsx(ro,Object.assign({id:n,ref:i||y,offsetX:l,offsetY:u,width:s,maxHeight:c,centerY:f,centerX:p,optionsPosition:{direction:d,amount:h}},{children:o}));if(a){const e=document.querySelector(a);return e?r.createPortal(v,e):v}return v};no.Item=t=>{var{children:n,id:r,onClick:o,selected:i,noSelect:s,contentPosition:c,color:u,accented:l}=t,f=a(t,["children","id","onClick","selected","noSelect","contentPosition","color","accented"]);return e.jsx(oo,Object.assign({id:null==r?void 0:r.toString(),onClick:o,selected:i,noSelect:s,contentPosition:c,color:u,accented:l,tabIndex:s?-1:0},f,{children:n}))};const ro=X.div((({theme:{elevation3:e,font:t,options:n},width:r,maxHeight:o,offsetY:i,offsetX:a})=>({boxSizing:"border-box",position:"absolute",fontFamily:t.family.default,fontSize:t.size.md,width:r||"max-content",maxHeight:o,backgroundColor:n.background,borderRadius:4,boxShadow:e,zIndex:2,overflowY:"auto",top:i?-i:"100%",left:a||void 0})),(({centerY:e,centerX:t})=>({top:e?"50%":void 0,left:t?"50%":void 0,transform:`translate(${t?"-50%":0}, ${e?"-50%":0})`})),(({optionsPosition:e})=>{const{direction:t,amount:n}=e;return t&&n?{left:"left"===t?-n:void 0,right:"right"===t?-n:void 0,top:"top"===t?-n:void 0}:{}})),oo=X.div({border:"none",padding:"5px 16px",display:"flex",alignItems:"center",userSelect:"none"},(({theme:{optionItem:e},accented:t,selected:n,noSelect:r=!1})=>({color:t?e.color.accent:e.color.inactive,cursor:r?"inherit":"pointer",backgroundColor:!r&&n?e.background.active:e.background.inactive,"&:hover":{backgroundColor:r?e.background.inactive:e.background.active},"&:focus":{outline:"none",backgroundColor:e.background.active}})),(({color:e})=>({color:e})),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e}))),io=(e,t)=>{if(!e)return[];const{search:n,filter:r,inputText:o}=t;return n&&r&&o?e.filter((e=>{const t=e=>{if(!e)return!1;const t=o.toLowerCase();return e.toString().toLowerCase().includes(t)};let n=t(e.label);return!n&&"id"in e&&(n=t(e.id)),n||!("value"in e)||"string"!=typeof e.value&&"number"!=typeof e.value||(n=t(e.value)),!n&&"body"in e&&(n=t(e.body)),!n&&"header"in e&&(n=t(e.header)),n})):e},ao=(n,r,o,i,s)=>{const{selected:c}=s,u=((t,n,r,o)=>{if(t&&t.length>0)return io(t,o).map((t=>{const o=t.onClick?e=>{t.onClick&&t.onClick(e),r()}:e=>n(t,e);return e.jsxs(no.Item,Object.assign({id:t.id,onClick:o},{children:[t.leftElement||null,t.header&&t.body?e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[e.jsx(so,{children:t.header}),e.jsx(co,{children:t.body})]})):t.label,t.rightElement&&e.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:t.rightElement}))]}),t.id)}));return[]})(n,o,i,a(s,["selected"])),l=((e,n,r)=>e?Br(e).map((e=>e?t.cloneElement(e,{setValue:n,close:r}):null)):[])(r,o,i),f=[...u,...l];return Br(f).map(((e,n)=>e?t.cloneElement(e,{selected:c===n}):null))},so=X.div((({theme:e})=>({fontSize:e.font.size.md,color:e.scale10}))),co=X.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6}))),uo=e=>t.Children.toArray(e).filter((e=>"string"==typeof e)).join("").trim(),lo=r=>{var{onChange:o,onTextChange:i,afterShow:s,afterHide:c,onFocus:u,onBlur:l,onError:f,placeholder:p,placeholderColor:d,value:h,options:g,children:y,borderless:v,borderColor:m,backgroundColor:b,hideIcon:w,clearOnSelect:x,textOnly:_,width:C,height:O,isLoading:S,margin:k,marginTop:E,marginBottom:j,marginRight:A,marginLeft:T,label:P,id:M,name:D,trigger:R,centerY:N,centerX:I,offsetY:L,offsetX:B,direction:F,fontSize:z,description:H,disabled:V,invalid:U,search:K,filter:$,restrictInput:W,inputRef:q,optionsParent:G}=r,Z=a(r,["onChange","onTextChange","afterShow","afterHide","onFocus","onBlur","onError","placeholder","placeholderColor","value","options","children","borderless","borderColor","backgroundColor","hideIcon","clearOnSelect","textOnly","width","height","isLoading","margin","marginTop","marginBottom","marginRight","marginLeft","label","id","name","trigger","centerY","centerX","offsetY","offsetX","direction","fontSize","description","disabled","invalid","search","filter","restrictInput","inputRef","optionsParent"]);const[Y,X]=t.useState(""),[J,Q]=t.useState(""),[ee,te]=t.useState(!1),[ne,re]=t.useState(!1),[oe,ie]=t.useState(!1),ae=t.useRef(null),{input:se}=n.useTheme(),ce={margin:k,marginTop:E,marginBottom:j,marginRight:A,marginLeft:T},ue=e=>{e&&e.stopPropagation(),!ee&&s&&s(),ee&&c&&c(),te((e=>!e))};t.useEffect((()=>{var e;if(ee&&K){null===(e=(q||ae).current)||void 0===e||e.focus()}}),[ee,K]),t.useEffect((()=>{f&&f(oe)}),[oe]),t.useEffect((()=>{i&&i(J)}),[J]);const le=at(ue,ee,G?[G,`${G} *`]:void 0),fe=(e,t)=>{if(void 0===e)return!1;return e.toString().toLowerCase()===t.toLowerCase()},pe=e=>{const t=ye().find((t=>{let n=fe(t.label,e);return!n&&"id"in t&&(n=fe(t.id,e)),n||!("value"in t)||"string"!=typeof t.value&&"number"!=typeof t.value||(n=fe(t.value,e)),n}));return t},de=e=>"function"==typeof W?!W(e):W,he=e=>ge(null,e),ge=(e,t)=>{let n,r=!1;if("string"==typeof e){n=(e=>{if(de(e))return pe(e)||null;return{id:Er(),label:e,value:e}})(e);const t=de(e);null===n&&t&&(r=!0)}else n=e;ee&&ue(t),X((null==n?void 0:n.label)||""),o&&void 0!==n&&o(n),r?ie(!0):(oe&&ie(!1),x&&X(""),Q(""))};t.useEffect((()=>{""===h&&he()}),[h]);const ye=()=>{const e=Br(y).map((e=>{const t=e;let n=t.props.displayText||"";return!P&&t.props.children&&(n=uo(t.props.children)),{id:t.props.id,label:n,onClick:t.props.onClick}}));return[...io(g||[],{search:K,filter:$,inputText:J}),...e]},ve={options:ye(),select:ge,open:ue,close:ue,searchText:K?J:void 0,isOpen:ee,isFocused:ne},[me,be]=ut(ve),we=ao(g||[],y,ge,ue,{selected:me,search:K,filter:$,inputText:J}),xe=ee?"caret-up":"caret-down",_e=_&&!V?d||se.color.default:void 0,Ce=a(Z,["onClear","phone"]);return e.jsx(fo,Object.assign({textOnly:_,altTrigger:!!R,width:C,height:O,focused:ne,search:K},ce,{children:e.jsxs(po,Object.assign({ref:le},{children:[R?e.jsx(ho,Object.assign({id:M,onClick:ue,tabIndex:0,onFocus:()=>re(!0),onBlur:()=>re(!1)},{children:R})):e.jsx(yo,Object.assign({shake:oe},{children:e.jsx(Xr,Object.assign({},Ce,{ref:q||ae,id:M,name:D,label:P,fontSize:z,pointer:!0,preventFocus:!K,value:J||h||Y,placeholder:p||"Select",placeholderColor:_e,iconRight:w||S?void 0:xe,borderless:v,borderColor:m,backgroundColor:b,isLoading:S,textOnly:_,description:H,disabled:V,invalid:oe||U,onClick:ue,onChange:e=>{var t;const{value:n}=e.target,r=null===(t=(q||ae).current)||void 0===t?void 0:t.hasFocus;K?(Q(n),!ee&&r&&te(!0),oe&&ie(!1)):n||he(e);const o=pe(n),i=de(n),a=""===n||i&&!r;o&&!(K&&(!i||r))?ge(o,e):K&&!a||he(e)},onFocus:e=>{re(!0),u&&u(e)},onBlur:e=>{var t;if(re(!1),l&&l(e),K&&J&&e){const{relatedTarget:n}=e;(null===(t=null==be?void 0:be.current)||void 0===t?void 0:t.contains(n))||ge(J,e)}}}))})),ee&&we.length>0&&e.jsx(no,Object.assign({containerRef:be,parentSelector:G,width:!R&&!_||G?"100%":void 0,centerY:N,centerX:I,offsetY:L,offsetX:B,direction:F},{children:we}))]}))}))};lo.Item=({value:t,displayText:n,setValue:r,close:o,children:i,contentPosition:a,color:s,accented:c,onClick:u,id:l})=>{const f=u?e=>{u&&u(e),o&&o()}:e=>{const o={id:l,label:n||uo(i)||"",value:t};r&&r(o,e)};return e.jsx(no.Item,Object.assign({id:l,contentPosition:a,color:s,onClick:f,accented:c},{children:i}))};const fo=X.div({display:"flex",boxSizing:"border-box"},(({theme:{accent:e},focused:t,search:n,altTrigger:r,textOnly:o})=>({width:r||o?"max-content":"100%",flexDirection:"column",outline:!t||n||r?void 0:`${e} solid 1px`})),rn,an),po=X.div({position:"relative",width:"100%",height:"inherit"}),ho=X.div((({theme:{accent:e}})=>({display:"flex",height:"inherit","&:focus-visible":{outline:`${e} solid 1px`}}))),go=n.keyframes({"10%":{transform:"translate3d(-1px, 0, 0)"},"30%":{transform:"translate3d(2px, 0, 0)"},"50%":{transform:"translate3d(-2px, 0, 0)"},"70%":{transform:"translate3d(2px, 0, 0)"},"90%":{transform:"translate3d(-1px, 0, 0)"}}),yo=X.div((({shake:e})=>({"& input":{animation:e?`${go} .5s linear`:void 0}}))),vo=n=>{var{children:r,disabled:o,outline:i,size:s,small:c,large:u,secondary:l,negative:f,positive:p,caution:d,collapse:h}=n,g=a(n,["children","disabled","outline","size","small","large","secondary","negative","positive","caution","collapse"]);if(r){const n=t.Children.count(r);return e.jsx(mo,Object.assign({},g,{children:t.Children.map(r,((e,r)=>{let a;if(n>1&&(a=0===r?"right":r===n-1?"left":"middle"),e){let n=e;"trigger"in e.props&&(n=e.props.trigger);const r=n,g=c||r.props.small,y=u||r.props.large,v=s||r.props.size,m=o||r.props.disabled,b=i||r.props.outline,w=l||r.props.secondary,x=f||r.props.negative,_=p||r.props.positive,C=d||r.props.caution,O=h||r.props.collapse,S=t.cloneElement(n,{joined:a,size:v,small:g,large:y,disabled:m,outline:b,secondary:w,negative:x,positive:_,caution:C,collapse:O});return"trigger"in e.props?t.cloneElement(e,{trigger:S}):S}return null}))}))}return null},mo=X.div((({width:e})=>({display:"inline-flex",width:e})),an),bo=({size:t})=>e.jsx(wo,Object.assign({className:"button-loader"},{children:e.jsx(zr,{size:t})})),wo=X.div({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",display:"flex",justifyContent:"center",alignItems:"center"}),xo=t=>{const{content:n,children:r,dropdown:o,options:i}=t,s=a(t,["content","children","dropdown","options"]),c=n||r;return o&&i?e.jsx(Co,Object.assign({options:i},s,{children:c})):e.jsx(_o,Object.assign({},s,{children:c}))};xo.Group=vo;const _o=t=>{var{children:r,onClick:o,icon:i,iconPosition:s,iconColor:c,joined:u,size:l,small:f,large:p,isLoading:d,collapse:h,backgroundColor:g,color:y,type:v,animation:m}=t,b=a(t,["children","onClick","icon","iconPosition","iconColor","joined","size","small","large","isLoading","collapse","backgroundColor","color","type","animation"]);const{button:w}=n.useTheme(),x=i&&(!r||h),_="right"===s;let C=l||"medium";f?C="small":p&&(C="large");const O=w[C],{iconSize:S}=O,k=h&&i;return e.jsxs(Oo,Object.assign({},b,{type:v||"button",size:C,iconOnly:x,iconRight:_,joined:u,onClick:o,isLoading:d,color:y,backgroundColor:g,animation:m},{children:[i?e.jsx(un,{size:S,name:i,marginRight:x||_?0:4,marginLeft:!x&&_?4:0,color:c,inheritColor:!c}):null,!k&&e.jsx("span",{children:r}),d&&e.jsx(bo,{size:S})]}))},Co=n=>{var{children:r,options:o,onClick:i,afterShow:s,afterHide:c,secondary:u,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:v,isLoading:m,direction:b,collapse:w,width:x}=n,_=a(n,["children","options","onClick","afterShow","afterHide","secondary","negative","positive","caution","outline","size","small","large","disabled","isLoading","direction","collapse","width"]);const[C,O]=t.useState(!1),S={secondary:u,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:v},k=t.useMemo((()=>`button-dropdown-${Er()}`),[]);return e.jsx(So,Object.assign({id:k},{children:e.jsxs(vo,Object.assign({width:w?void 0:x},{children:[e.jsx(_o,Object.assign({},S,_,{width:x&&!w?"100%":void 0,collapse:w,isLoading:m,onClick:e=>{i&&i(e)}},{children:e.jsx(ko,{children:r})})),e.jsx(lo,{options:o,direction:b,optionsParent:`#${k}`,afterShow:()=>{s&&s(),O(!0)},afterHide:()=>{c&&c(),O(!1)},trigger:e.jsx(_o,Object.assign({},S,{icon:C?"caret-up":"caret-down",preventPointerEvents:m,tabIndex:-1}))})]}))}))},Oo=X.button((({theme:{accent:e,font:t,button:n},size:r="medium",joined:o,circle:i,iconOnly:a,iconRight:s,width:c,height:u,animation:l})=>{const f=i||a&&!o,p=n[r],d=c||"max-content",{height:h,font:g,padding:y,iconOnlyPadding:v}=p,m=u||h,b=a||f?v:y;return{display:"inline-flex",alignItems:"center",justifyContent:"center",flexDirection:s?"row-reverse":"row",fontSize:g,width:f?m:d,height:m,fontFamily:t.family.default,fontWeight:t.weight.bold,borderRadius:f?"50%":30,cursor:"pointer",outline:"none",padding:`0px ${b}px`,position:"relative",animation:l,"&:focus-visible":{outline:`${e} solid 1px`}}}),(({theme:e,joined:t,iconOnly:n,outline:r,negative:o,positive:i,caution:a,secondary:s,disabled:c,subtle:u,link:l})=>{const{button:f,size:p}=e;let d=f.primary;u?d=f.subtle:l?d=f.link:c?d=f.disabled:o?d=f.negative:i?d=f.positive:a?d=f.caution:s&&(d=f.secondary);const h=r?d.outlineBackground:d.background;let g=r?d.outlineColor:d.color;if(l||u){let e=f.subtle;l&&(e=f.link),c?g=f.disabled.color:o?g=e.negativeColor:i?g=e.positiveColor:a?g=e.cautionColor:s&&(g=e.secondaryColor)}const y="left"===t||"middle"===t,v="right"===t||"middle"===t,m=n?p.xs:p.sm;return{backgroundColor:h.default,color:g.default,border:r&&!l?"1px solid":"none",borderColor:d.border.default,"&:hover":{backgroundColor:h.hover,color:g.hover,borderColor:r&&!c?d.border.hover:void 0},"&:active":{backgroundColor:h.active,color:g.active,borderColor:r&&!c?d.border.active:void 0},"&:disabled":{backgroundColor:u?"transparent":void 0,cursor:"not-allowed"},borderTopLeftRadius:y?0:void 0,borderBottomLeftRadius:y?0:void 0,borderTopRightRadius:v?0:void 0,borderBottomRightRadius:v?0:void 0,paddingLeft:y?m:void 0,paddingRight:v?m:void 0,borderRight:v?`1px solid ${r?d.border.default:d.divider}`:void 0,borderLeft:y?"none":void 0}}),(({link:e})=>({height:e?"max-content":void 0,width:e?"max-content":void 0,padding:e?0:void 0})),(({isLoading:e,preventPointerEvents:t})=>({pointerEvents:e||t?"none":void 0,"& > *":{visibility:e?"hidden":void 0},"& > .button-loader":{visibility:e?"visible":void 0}})),(({theme:{name:e},backgroundColor:t,color:n,disabled:r})=>{const o="dark"===e?or:ar,i="dark"===e?ar:or;return r||!n&&!t?{}:{backgroundColor:t,color:n,"&:hover":{backgroundColor:t?o(.05,t):void 0,color:n?i(.05,n):void 0},"&:active":{backgroundColor:t?o(.1,t):void 0,color:n?i(.1,n):void 0}}}),an),So=X.div({display:"inline-flex",flexDirection:"column",position:"relative"}),ko=X.div({marginRight:8}),Eo=t=>{var{value:n,max:r=100,step:o=1,width:i,height:s,disabled:c,onChange:u}=t,l=a(t,["value","max","step","width","height","disabled","onChange"]);return e.jsx(Ao,Object.assign({},l,{type:"range",max:r,value:n,percent:n/r*100,onChange:e=>{const{value:t}=e.target;u&&u(+t)},step:o,width:i,height:s,disabled:c,readOnly:!u}))},jo=(e,t)=>({appearance:"none",backgroundColor:t?"transparent":e.color.brand,height:e.size.sm,width:e.size.sm,border:"none",borderRadius:"50%"}),Ao=X.input((({theme:e,percent:t,width:n,height:r,disabled:o,readOnly:i})=>{const a=o?e.scale0:e.scale1,s=o?e.scale1:e.color.brand;return{appearance:"none",display:"block",width:n||"100%",height:r||2,borderRadius:24,outline:"none",background:`linear-gradient(to right, ${s} 0%, ${s} ${t}%, ${a} ${t}%, ${a} 100%)`,"&::-webkit-slider-thumb":jo(e,o||i),"&::-moz-range-thumb":jo(e,o||i),"&:focus-visible":{outline:o||i?"none":`${e.accent} solid 1px`}}}),an),To=t.forwardRef(((n,r)=>{var{src:o,title:i,width:s,infoPosition:c,centerAlignContent:u,small:l,collapsed:f,hideSliderOnStop:p,hideTimeOnStop:d,fontSizeTitle:h,fontSizeTime:g,onPlay:y,onPause:v,onStop:m}=n,b=a(n,["src","title","width","infoPosition","centerAlignContent","small","collapsed","hideSliderOnStop","hideTimeOnStop","fontSizeTitle","fontSizeTime","onPlay","onPause","onStop"]);const[w,x]=t.useState(!1),[_,C]=t.useState(!0),[O,S]=t.useState(0),[k,E]=t.useState(0),[j,A]=t.useState(""),[T,P]=t.useState(""),M=t.useRef(null),D=()=>{const{current:e}=M;e&&e.play().catch((()=>{throw Error("Video failed to play")}))},R=()=>{const{current:e}=M;e&&e.pause()},N=()=>{const{current:e}=M;e&&e.load()};t.useImperativeHandle(r,(()=>({play:D,pause:R,stop:N})),[M,w]);const I=e=>{x(!1),C(!0),m&&m(e)};t.useEffect((()=>{(()=>{const{current:e}=M;!!e&&e.paused})()}),[w]);const L=e=>{const t=(e/100).toFixed(2),[n,r]=t.split(".");return`${n}:${r}`},B=_&&p,F=_&&d;return e.jsxs(Po,Object.assign({width:s},b,{children:[e.jsx(xo,{outline:!0,small:l,icon:w?"pause":"play",onClick:()=>{w?R():D()},marginRight:8}),!f&&e.jsxs(Mo,Object.assign({alignDataTop:"top"===c},{children:[!B&&e.jsx(Eo,{value:O,max:k,step:.1,onChange:e=>{(null==M?void 0:M.current)&&(M.current.currentTime=e)}}),e.jsxs(Do,Object.assign({alignTop:"top"===c,noSlider:B,relative:u||B},{children:[i?e.jsx(Ro,Object.assign({fontSize:h},{children:i})):e.jsx("div",{}),!F&&e.jsxs(Ro,Object.assign({secondary:!0,fontSize:g},{children:[j&&!_?`${j} / `:"",T]}))]}))]})),e.jsxs("audio",Object.assign({ref:M,onPlay:e=>{x(!0),C(!1),y&&y(e)},onPause:e=>{x(!1),v&&v(e)},onEmptied:I,onEnded:I,onTimeUpdate:()=>{const{current:e}=M;if(e){const{currentTime:t}=e,n=L(t);S(t),A(n)}},onDurationChange:()=>{const{current:e}=M;if(e){const{duration:t}=e,n=L(t);E(t),P(n)}}},{children:[e.jsx("track",{kind:"captions"}),e.jsx("source",{src:o})]}))]}))})),Po=X.div((({width:e=250})=>({display:"flex",alignItems:"center",width:e})),an),Mo=X.div((({alignDataTop:e})=>({display:"flex",flexDirection:e?"column-reverse":"column",position:"relative",width:"100%"}))),Do=X.div((({alignTop:e,noSlider:t,relative:n})=>({position:n?"relative":"absolute",top:e||t?void 0:6,bottom:e&&!t?6:void 0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%"}))),Ro=X.div((({theme:e,secondary:t,fontSize:n})=>({color:t?e.scale6:e.scale10,fontSize:n||10})));var No={};
|
|
24
|
+
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=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;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(s[u]=n[u]);if(r){a=r(n);for(var l=0;l<a.length;l++)i.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV)var r=n(2),o=n(4),i=n(3),a={};e.exports=function(e,n,s,c,u){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",c||"React class",s,l,typeof e[l]),f=e[l](n,l,c,s,null,i)}catch(e){f=e}if(o(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",s,l,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=u?u():"";o(!1,"Failed %s type: %s%s",s,f.message,null!=p?p:"")}}}}).call(t,n(0))},function(e,t,n){var r=n(1),o=n(2),i=n(3);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="insert",o="backspace",i=t.isInvalidKey=function(e){return"Backspace"!==e&&!/[0-9]/.test(e)},a=function(e){return e.start!==e.end};t.update=function(e,t,n){var r=a(t);return"Backspace"===n?s(e,t):function(e,t,n){return!(10===u(e).length&&!n||i(t))}(e,n,r)?c(e,t,n):{phoneNumber:e,cursorPosition:t.start}};var s=t.backspace=function(e,t){var n=t.start,r=t.end,i=e;if(!a(t)&&n>0&&e[n-1].match(/[0-9]/)&&(i=e.substring(0,n-1)+i.substring(n)),a(t)){var s=e.substring(n,r).replace(/\d/g,"");i=e.substring(0,n)+s+i.substring(r)}var c=p(e,i,t,o);return{phoneNumber:f(i),cursorPosition:c}},c=t.insert=function(e,t,n){t.start,t.end;var o=e;a(t)&&(o=l(e,n,t)),a(t)||(o=l(e,n,t));var i=p(e,o,t,r);return{phoneNumber:f(o),cursorPosition:i}},u=t.normalize=function(e){return e.replace(/\D/g,"")},l=t.insertChars=function(e,t,n){return e.substring(0,n.start)+t+e.substring(n.end)},f=t.format=function(e){var t=u(e),n=t.substring(0,3),r=t.substring(3,6),o=t.substring(6,11);return o?"("+n+") "+r+"-"+o:r?n+"-"+r:t},p=t.getCursorPosition=function(e,t,n,i){if(n.start===e.length)return f(t).length;if(0===n.start){if(i===o)return 0;if(i===r)return 1}if(i===o){var s=/[^0-9]/g;if(a(n)&&s.test(e.substring(n.start,n.end)))return n.start;if(!a(n)&&s.test(e[n.start-1]))return n.start-1}var c=e.substring(n.end).match(/[0-9]/g),u=c?c.length:0,l=f(t),p=d(l,u);return l.length-p},d=t.getCharCountFromEndWithNumbers=function(e,t){var n=e.split("");n.reverse();var r=0,o=n.reduce((function(e,n){return r===t?e:(/[0-9]/.test(n)&&r++,e+1)}),0);return r<t?0:o}}]);const zr=t=>{var{size:n,color:r,center:o,background:i,margin:s,marginTop:c,marginBottom:u,marginRight:l,marginLeft:f,position:p,top:d,bottom:h,right:g,left:y}=t,v=a(t,["size","color","center","background","margin","marginTop","marginBottom","marginRight","marginLeft","position","top","bottom","right","left"]);const m={margin:s,marginTop:c,marginBottom:u,marginRight:l,marginLeft:f,position:p,top:d,bottom:h,right:g,left:y};return e.jsx(Hr,Object.assign({},m,{center:o,background:i},{children:e.jsx(Ur,{children:e.jsx(un,Object.assign({},v,{size:n,name:"loading",color:r,inheritColor:!r}))})}))},Hr=X.div({width:"max-content",height:"max-content"},(({center:e})=>e&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),(({center:e,background:t})=>{if(!e||!t)return null;return{background:"string"==typeof t?t:"rgba(0, 0, 0, 0.5)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}),an,sn),Vr=n.keyframes({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Ur=X.div({animation:`${Vr} 1s linear infinite`,width:"max-content",height:"max-content"}),Kr=(e,n,r=!0)=>{const[o,i]=t.useState(!1);return{focused:o,handleFocus:t=>{r&&i(!0),e&&e(t)},handleBlur:e=>{i(!1),n&&n(e)}}},$r=e=>!!e||null!=e&&""!==e,Wr=X.div((({theme:{input:e},backgroundColor:t,borderRadius:n,borderless:r,borderColor:o,textOnly:i,focused:a,invalid:s,disabled:c,hasLabel:u,pointer:l})=>({display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",minHeight:u?48:40,height:u?48:40,padding:"5px 16px",boxSizing:"border-box",color:c?e.labelColor.disabled:e.labelColor.default,backgroundColor:e.background.default,borderBottom:r?void 0:"1px solid",borderColor:o||e.borderColor.default,borderRadius:null!=n?n:4,borderBottomLeftRadius:null!=n?n:0,borderBottomRightRadius:null!=n?n:0,cursor:l?"pointer":void 0,"&:hover":{backgroundColor:c||i||t?void 0:e.background.hover,borderColor:a||c||r||s?void 0:e.borderColor.hover,Label:{color:a||c?void 0:e.labelColor.hover}}})),(({theme:{input:e},focused:t})=>({backgroundColor:t?e.background.focused:void 0,borderColor:t?e.borderColor.focused:void 0})),(({theme:{input:e},invalid:t})=>({borderColor:t?e.borderColor.error:void 0})),(({theme:{input:e},disabled:t,readOnly:n})=>({backgroundColor:t?e.background.disabled:void 0,borderColor:t?e.borderColor.disabled:void 0,pointerEvents:t||n?"none":void 0})),(({borderless:e})=>({border:e?"none":void 0})),(({theme:e,textOnly:t,disabled:n})=>({padding:t?0:void 0,backgroundColor:t?"transparent":void 0,width:t?"max-content":void 0,height:t?"max-content":void 0,minHeight:t?"max-content":void 0,color:t&&n?e.scale4:void 0})),(({backgroundColor:e})=>({backgroundColor:e})),rn,an),qr=X.div((({readOnly:e})=>({display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",position:"relative","& > label, & > input":{pointerEvents:e?"none":void 0,caretColor:e?"transparent":void 0}}))),Gr=X.label((({theme:{font:e,input:t},filled:n,focused:r})=>({fontSize:n||r?e.size.sm:e.size.lg,color:n?t.labelColor.filled:t.labelColor.default,position:"relative",top:n||r?void 0:1})),(({theme:{input:e},disabled:t})=>({color:t?e.labelColor.disabled:void 0})),(({theme:{input:e},focused:t})=>({color:t?e.labelColor.focused:void 0})));var Zr={Container:Wr,Wrapper:qr,Label:Gr,useInputFocus:Kr,isInputFilled:$r};const Yr=(n,r)=>{const o=e=>t.cloneElement(e,r);return"string"==typeof n?e.jsx(un,Object.assign({name:n,inheritColor:!0},r)):"object"==typeof n&&"props"in n&&"trigger"in n.props?t.cloneElement(n,{trigger:o(n.props.trigger)}):"object"==typeof n&&"props"in n?o(n):e.jsx(un,Object.assign({},n,r))},Xr=t.forwardRef(((r,o)=>{var{id:i,label:s,placeholder:c,placeholderColor:u,description:l,isLoading:f,search:p,phone:d,textOnly:h,iconLeft:g,iconRight:y,invalid:v,borderless:m,borderRadius:b,borderColor:w,backgroundColor:x,fontSize:_,width:C,height:O,margin:S,marginLeft:k,marginRight:E,marginTop:j,marginBottom:A,containerRef:T,value:P,disabled:M,readOnly:D,preventFocus:R,pointer:N,onChange:I,onClick:L,onClear:B,onFocus:F,onBlur:z}=r,H=a(r,["id","label","placeholder","placeholderColor","description","isLoading","search","phone","textOnly","iconLeft","iconRight","invalid","borderless","borderRadius","borderColor","backgroundColor","fontSize","width","height","margin","marginLeft","marginRight","marginTop","marginBottom","containerRef","value","disabled","readOnly","preventFocus","pointer","onChange","onClick","onClear","onFocus","onBlur"]);const{focused:V,handleFocus:U,handleBlur:K}=Kr(F,z,!R&&!D),$=t.useRef(null),{color:W}=n.useTheme(),[q,G]=t.useState(h?50:void 0),Z=t.useRef(null);t.useLayoutEffect((()=>{if(h&&Z){const{current:e}=Z,t=null==e?void 0:e.offsetWidth;"number"==typeof t&&G(t+3)}}),[h,P,c,Z]);const Y=h?P||c:P,X=P&&B&&!f,J=()=>{V||U()},Q=()=>{V&&K()};t.useImperativeHandle(o,(()=>({focus:J,blur:Q,hasFocus:V}))),t.useEffect((()=>{var e;V&&(null===(e=$.current)||void 0===e||e.focus())}),[V]);return e.jsxs(Wr,Object.assign({ref:T,invalid:v,textOnly:h,borderless:m||h,borderRadius:b,borderColor:w,backgroundColor:x,width:C,height:O,margin:S,marginLeft:k,marginRight:E,marginTop:j,marginBottom:A,focused:V,disabled:M,hasLabel:!!s,onClick:e=>{R||D||J(),L&&L(e)},pointer:N,readOnly:D},{children:[p&&e.jsx(un,{name:"search",marginRight:8,inheritColor:!0}),g&&Yr(g,{marginRight:8}),e.jsxs(qr,Object.assign({readOnly:D||R},{children:[h&&e.jsx(to,Object.assign({ref:Z,fontSize:_},{children:Y})),s&&!h&&e.jsx(Gr,Object.assign({htmlFor:i||s,filled:$r(P),focused:V,disabled:M},{children:s})),e.jsx(Jr,Object.assign({id:i||s,ref:$,value:P,placeholder:c,placeholderColor:u,onChange:e=>{if(d){const{value:t}=e.target,n=Fr.normalize(t);if(n.length>10)return;const r=Fr.format(n);I&&I(e,r,n)}else I&&I(e)},onFocus:U,onBlur:K,disabled:M,hide:!($r(P)||!s||V||h),width:q,fontSize:_},H))]})),y&&Yr(y),f&&e.jsx(zr,{}),X&&e.jsx(Qr,Object.assign({onClick:B},{children:e.jsx(un,{name:"close-circle-outline",color:W.brand})})),l&&e.jsx(eo,Object.assign({invalid:v},{children:l}))]}))})),Jr=X.input((({theme:{font:e,input:t,size:n,accent:r},fontSize:o,hide:i,disabled:a,width:s,placeholderColor:c})=>({outline:"none",border:"none",color:a?t.color.disabled:t.color.default,caretColor:r,backgroundColor:"transparent",paddingLeft:0,fontSize:o||e.size.lg,fontFamily:e.family.default,width:s||"100%",height:"100%",marginRight:n.sm,boxSizing:"border-box",opacity:i?0:1,position:i?"absolute":void 0,"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active":{transition:"background-color 0s 50000s",WebkitTextFillColor:t.color.default},"&::placeholder":{color:c||t.color.placeholder,opacity:1}}))),Qr=X.div({height:"100%",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:4}),eo=X.div((({theme:{font:e,input:t},invalid:n})=>({color:n?t.color.descriptionError:t.color.description,fontSize:e.size.sm,position:"absolute",left:0,top:"calc(100% + 4px)"}))),to=X.div((({theme:{font:e},fontSize:t})=>({position:"absolute",width:"max-content",opacity:0,fontSize:t||e.size.lg,zIndex:-1}))),no=({id:n,children:o,containerRef:i,parentSelector:a,width:s,maxHeight:c=200,offsetY:u,offsetX:l,centerY:f,centerX:p,direction:d})=>{const[h,g]=t.useState(),y=t.useRef(null);t.useLayoutEffect((()=>{const{current:e}=i||y;if(e&&d){const{scrollWidth:t,scrollHeight:n}=e,r="left"===d||"right"===d;g((r?t:n<c?n:c)+((r?l:u)||4))}}),[i,d]);const v=e.jsx(ro,Object.assign({id:n,ref:i||y,offsetX:l,offsetY:u,width:s,maxHeight:c,centerY:f,centerX:p,optionsPosition:{direction:d,amount:h}},{children:o}));if(a){const e=document.querySelector(a);return e?r.createPortal(v,e):v}return v};no.Item=t=>{var{children:n,id:r,onClick:o,selected:i,noSelect:s,contentPosition:c,color:u,accented:l}=t,f=a(t,["children","id","onClick","selected","noSelect","contentPosition","color","accented"]);return e.jsx(oo,Object.assign({id:null==r?void 0:r.toString(),onClick:o,selected:i,noSelect:s,contentPosition:c,color:u,accented:l,tabIndex:s?-1:0},f,{children:n}))};const ro=X.div((({theme:{elevation3:e,font:t,options:n},width:r,maxHeight:o,offsetY:i,offsetX:a})=>({boxSizing:"border-box",position:"absolute",fontFamily:t.family.default,fontSize:t.size.md,width:r||"max-content",maxHeight:o,backgroundColor:n.background,borderRadius:4,boxShadow:e,zIndex:2,overflowY:"auto",top:i?-i:"100%",left:a||void 0})),(({centerY:e,centerX:t})=>({top:e?"50%":void 0,left:t?"50%":void 0,transform:`translate(${t?"-50%":0}, ${e?"-50%":0})`})),(({optionsPosition:e})=>{const{direction:t,amount:n}=e;return t&&n?{left:"left"===t?-n:void 0,right:"right"===t?-n:void 0,top:"top"===t?-n:void 0}:{}})),oo=X.div({border:"none",padding:"5px 16px",display:"flex",alignItems:"center",userSelect:"none"},(({theme:{optionItem:e},accented:t,selected:n,noSelect:r=!1})=>({color:t?e.color.accent:e.color.inactive,cursor:r?"inherit":"pointer",backgroundColor:!r&&n?e.background.active:e.background.inactive,"&:hover":{backgroundColor:r?e.background.inactive:e.background.active},"&:focus":{outline:"none",backgroundColor:e.background.active}})),(({color:e})=>({color:e})),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e}))),io=(e,t)=>{if(!e)return[];const{search:n,filter:r,inputText:o}=t;return n&&r&&o?e.filter((e=>{const t=e=>{if(!e)return!1;const t=o.toLowerCase();return e.toString().toLowerCase().includes(t)};let n=t(e.label);return!n&&"id"in e&&(n=t(e.id)),n||!("value"in e)||"string"!=typeof e.value&&"number"!=typeof e.value||(n=t(e.value)),!n&&"body"in e&&(n=t(e.body)),!n&&"header"in e&&(n=t(e.header)),n})):e},ao=(n,r,o,i,s)=>{const{selected:c}=s,u=((t,n,r,o)=>{if(t&&t.length>0)return io(t,o).map((t=>{const o=t.onClick?e=>{t.onClick&&t.onClick(e),r()}:e=>n(t,e);return e.jsxs(no.Item,Object.assign({id:t.id,onClick:o},{children:[t.leftElement||null,t.header&&t.body?e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[e.jsx(so,{children:t.header}),e.jsx(co,{children:t.body})]})):t.label,t.rightElement&&e.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:t.rightElement}))]}),t.id)}));return[]})(n,o,i,a(s,["selected"])),l=((e,n,r)=>e?Br(e).map((e=>e?t.cloneElement(e,{setValue:n,close:r}):null)):[])(r,o,i),f=[...u,...l];return Br(f).map(((e,n)=>e?t.cloneElement(e,{selected:c===n}):null))},so=X.div((({theme:e})=>({fontSize:e.font.size.md,color:e.scale10}))),co=X.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6}))),uo=e=>t.Children.toArray(e).filter((e=>"string"==typeof e)).join("").trim(),lo=r=>{var{onChange:o,onTextChange:i,afterShow:s,afterHide:c,onFocus:u,onBlur:l,onError:f,placeholder:p,placeholderColor:d,value:h,options:g,children:y,borderless:v,borderColor:m,backgroundColor:b,hideIcon:w,clearOnSelect:x,textOnly:_,width:C,height:O,isLoading:S,margin:k,marginTop:E,marginBottom:j,marginRight:A,marginLeft:T,label:P,id:M,name:D,trigger:R,centerY:N,centerX:I,offsetY:L,offsetX:B,direction:F,fontSize:z,description:H,disabled:V,invalid:U,search:K,filter:$,restrictInput:W,inputRef:q,optionsParent:G}=r,Z=a(r,["onChange","onTextChange","afterShow","afterHide","onFocus","onBlur","onError","placeholder","placeholderColor","value","options","children","borderless","borderColor","backgroundColor","hideIcon","clearOnSelect","textOnly","width","height","isLoading","margin","marginTop","marginBottom","marginRight","marginLeft","label","id","name","trigger","centerY","centerX","offsetY","offsetX","direction","fontSize","description","disabled","invalid","search","filter","restrictInput","inputRef","optionsParent"]);const[Y,X]=t.useState(""),[J,Q]=t.useState(""),[ee,te]=t.useState(!1),[ne,re]=t.useState(!1),[oe,ie]=t.useState(!1),ae=t.useRef(null),{input:se}=n.useTheme(),ce={margin:k,marginTop:E,marginBottom:j,marginRight:A,marginLeft:T},ue=e=>{e&&e.stopPropagation(),!ee&&s&&s(),ee&&c&&c(),te((e=>!e))};t.useEffect((()=>{var e;if(ee&&K){null===(e=(q||ae).current)||void 0===e||e.focus()}}),[ee,K]),t.useEffect((()=>{f&&f(oe)}),[oe]),t.useEffect((()=>{i&&i(J)}),[J]);const le=at(ue,ee,G?[G,`${G} *`]:void 0),fe=(e,t)=>{if(void 0===e)return!1;return e.toString().toLowerCase()===t.toLowerCase()},pe=e=>{const t=ye().find((t=>{let n=fe(t.label,e);return!n&&"id"in t&&(n=fe(t.id,e)),n||!("value"in t)||"string"!=typeof t.value&&"number"!=typeof t.value||(n=fe(t.value,e)),n}));return t},de=e=>"function"==typeof W?!W(e):W,he=e=>ge(null,e),ge=(e,t)=>{let n,r=!1;if("string"==typeof e){n=(e=>{if(de(e))return pe(e)||null;return{id:Er(),label:e,value:e}})(e);const t=de(e);null===n&&t&&(r=!0)}else n=e;ee&&ue(t),X((null==n?void 0:n.label)||""),o&&void 0!==n&&o(n),r?ie(!0):(oe&&ie(!1),x&&X(""),Q(""))};t.useEffect((()=>{""===h&&he()}),[h]);const ye=()=>{const e=Br(y).map((e=>{const t=e;let n=t.props.displayText||"";return!P&&t.props.children&&(n=uo(t.props.children)),{id:t.props.id,label:n,onClick:t.props.onClick}}));return[...io(g||[],{search:K,filter:$,inputText:J}),...e]},ve={options:ye(),select:ge,open:ue,close:ue,searchText:K?J:void 0,isOpen:ee,isFocused:ne},[me,be]=ut(ve),we=ao(g||[],y,ge,ue,{selected:me,search:K,filter:$,inputText:J}),xe=ee?"caret-up":"caret-down",_e=_&&!V?d||se.color.default:void 0,Ce=a(Z,["onClear","phone"]);return e.jsx(fo,Object.assign({textOnly:_,altTrigger:!!R,width:C,height:O,focused:ne,search:K},ce,{children:e.jsxs(po,Object.assign({ref:le},{children:[R?e.jsx(ho,Object.assign({id:M,onClick:ue,tabIndex:0,onFocus:()=>re(!0),onBlur:()=>re(!1)},{children:R})):e.jsx(yo,Object.assign({shake:oe},{children:e.jsx(Xr,Object.assign({},Ce,{ref:q||ae,id:M,name:D,label:P,fontSize:z,pointer:!0,preventFocus:!K,value:J||h||Y,placeholder:p||"Select",placeholderColor:_e,iconRight:w||S?void 0:xe,borderless:v,borderColor:m,backgroundColor:b,isLoading:S,textOnly:_,description:H,disabled:V,invalid:oe||U,onClick:ue,onChange:e=>{var t;const{value:n}=e.target,r=null===(t=(q||ae).current)||void 0===t?void 0:t.hasFocus;K?(Q(n),!ee&&r&&te(!0),oe&&ie(!1)):n||he(e);const o=pe(n),i=de(n),a=""===n||i&&!r;o&&!(K&&(!i||r))?ge(o,e):K&&!a||he(e)},onFocus:e=>{re(!0),u&&u(e)},onBlur:e=>{var t;if(re(!1),l&&l(e),K&&J&&e){const{relatedTarget:n}=e;(null===(t=null==be?void 0:be.current)||void 0===t?void 0:t.contains(n))||ge(J,e)}}}))})),ee&&we.length>0&&e.jsx(no,Object.assign({containerRef:be,parentSelector:G,width:!R&&!_||G?"100%":void 0,centerY:N,centerX:I,offsetY:L,offsetX:B,direction:F},{children:we}))]}))}))};lo.Item=({value:t,displayText:n,setValue:r,close:o,children:i,contentPosition:a,color:s,accented:c,onClick:u,id:l})=>{const f=u?e=>{u&&u(e),o&&o()}:e=>{const o={id:l,label:n||uo(i)||"",value:t};r&&r(o,e)};return e.jsx(no.Item,Object.assign({id:l,contentPosition:a,color:s,onClick:f,accented:c},{children:i}))};const fo=X.div({display:"flex",boxSizing:"border-box"},(({theme:{accent:e},focused:t,search:n,altTrigger:r,textOnly:o})=>({width:r||o?"max-content":"100%",flexDirection:"column",outline:!t||n||r?void 0:`${e} solid 1px`})),rn,an),po=X.div({position:"relative",width:"100%",height:"inherit"}),ho=X.div((({theme:{accent:e}})=>({display:"flex",height:"inherit","&:focus-visible":{outline:`${e} solid 1px`}}))),go=n.keyframes({"10%":{transform:"translate3d(-1px, 0, 0)"},"30%":{transform:"translate3d(2px, 0, 0)"},"50%":{transform:"translate3d(-2px, 0, 0)"},"70%":{transform:"translate3d(2px, 0, 0)"},"90%":{transform:"translate3d(-1px, 0, 0)"}}),yo=X.div((({shake:e})=>({"& input":{animation:e?`${go} .5s linear`:void 0}}))),vo=n=>{var{children:r,disabled:o,outline:i,size:s,small:c,large:u,secondary:l,negative:f,positive:p,caution:d,collapse:h}=n,g=a(n,["children","disabled","outline","size","small","large","secondary","negative","positive","caution","collapse"]);if(r){const n=t.Children.count(r);return e.jsx(mo,Object.assign({},g,{children:t.Children.map(r,((e,r)=>{let a;if(n>1&&(a=0===r?"right":r===n-1?"left":"middle"),e){let n=e;"trigger"in e.props&&(n=e.props.trigger);const r=n,g=c||r.props.small,y=u||r.props.large,v=s||r.props.size,m=o||r.props.disabled,b=i||r.props.outline,w=l||r.props.secondary,x=f||r.props.negative,_=p||r.props.positive,C=d||r.props.caution,O=h||r.props.collapse,S=t.cloneElement(n,{joined:a,size:v,small:g,large:y,disabled:m,outline:b,secondary:w,negative:x,positive:_,caution:C,collapse:O});return"trigger"in e.props?t.cloneElement(e,{trigger:S}):S}return null}))}))}return null},mo=X.div((({width:e})=>({display:"inline-flex",width:e})),an),bo=({size:t})=>e.jsx(wo,Object.assign({className:"button-loader"},{children:e.jsx(zr,{size:t})})),wo=X.div({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",display:"flex",justifyContent:"center",alignItems:"center"}),xo=t=>{const{content:n,children:r,dropdown:o,options:i}=t,s=a(t,["content","children","dropdown","options"]),c=n||r;return o&&i?e.jsx(Co,Object.assign({options:i},s,{children:c})):e.jsx(_o,Object.assign({},s,{children:c}))};xo.Group=vo;const _o=t=>{var{children:r,onClick:o,icon:i,iconPosition:s,iconColor:c,joined:u,size:l,small:f,large:p,isLoading:d,collapse:h,backgroundColor:g,color:y,type:v,animation:m}=t,b=a(t,["children","onClick","icon","iconPosition","iconColor","joined","size","small","large","isLoading","collapse","backgroundColor","color","type","animation"]);const{button:w}=n.useTheme(),x=i&&(!r||h),_="right"===s;let C=l||"medium";f?C="small":p&&(C="large");const O=w[C],{iconSize:S}=O,k=h&&i;return e.jsxs(Oo,Object.assign({},b,{type:v||"button",size:C,iconOnly:x,iconRight:_,joined:u,onClick:o,isLoading:d,color:y,backgroundColor:g,animation:m},{children:[i?e.jsx(un,{size:S,name:i,marginRight:x||_?0:4,marginLeft:!x&&_?4:0,color:c,inheritColor:!c}):null,!k&&e.jsx("span",{children:r}),d&&e.jsx(bo,{size:S})]}))},Co=n=>{var{children:r,options:o,onClick:i,afterShow:s,afterHide:c,secondary:u,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:v,isLoading:m,direction:b,collapse:w,width:x}=n,_=a(n,["children","options","onClick","afterShow","afterHide","secondary","negative","positive","caution","outline","size","small","large","disabled","isLoading","direction","collapse","width"]);const[C,O]=t.useState(!1),S={secondary:u,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:v},k=t.useMemo((()=>`button-dropdown-${Er()}`),[]);return e.jsx(So,Object.assign({id:k},{children:e.jsxs(vo,Object.assign({width:w?void 0:x},{children:[e.jsx(_o,Object.assign({},S,_,{width:x&&!w?"100%":void 0,collapse:w,isLoading:m,onClick:e=>{i&&i(e)}},{children:e.jsx(ko,{children:r})})),e.jsx(lo,{options:o,direction:b,optionsParent:`#${k}`,afterShow:()=>{s&&s(),O(!0)},afterHide:()=>{c&&c(),O(!1)},trigger:e.jsx(_o,Object.assign({},S,{icon:C?"caret-up":"caret-down",preventPointerEvents:m,tabIndex:-1}))})]}))}))},Oo=X.button((({theme:{accent:e,font:t,button:n},size:r="medium",joined:o,circle:i,iconOnly:a,iconRight:s,width:c,height:u,animation:l})=>{const f=i||a&&!o,p=n[r],d=c||"max-content",{height:h,font:g,padding:y,iconOnlyPadding:v}=p,m=u||h,b=a||f?v:y;return{display:"inline-flex",alignItems:"center",justifyContent:"center",flexDirection:s?"row-reverse":"row",fontSize:g,width:f?m:d,height:m,fontFamily:t.family.default,fontWeight:t.weight.bold,borderRadius:f?"50%":30,cursor:"pointer",outline:"none",padding:`0px ${b}px`,position:"relative",animation:l,"&:focus-visible":{outline:`${e} solid 1px`}}}),(({theme:e,joined:t,iconOnly:n,outline:r,negative:o,positive:i,caution:a,secondary:s,disabled:c,subtle:u,link:l})=>{const{button:f,size:p}=e;let d=f.primary;u?d=f.subtle:l?d=f.link:c?d=f.disabled:o?d=f.negative:i?d=f.positive:a?d=f.caution:s&&(d=f.secondary);const h=r?d.outlineBackground:d.background;let g=r?d.outlineColor:d.color;if(l||u){let e=f.subtle;l&&(e=f.link),c?g=f.disabled.color:o?g=e.negativeColor:i?g=e.positiveColor:a?g=e.cautionColor:s&&(g=e.secondaryColor)}const y="left"===t||"middle"===t,v="right"===t||"middle"===t,m=n?p.xs:p.sm;return{backgroundColor:h.default,color:g.default,border:r&&!l?"1px solid":"none",borderColor:d.border.default,"&:hover":{backgroundColor:h.hover,color:g.hover,borderColor:r&&!c?d.border.hover:void 0},"&:active":{backgroundColor:h.active,color:g.active,borderColor:r&&!c?d.border.active:void 0},"&:disabled":{backgroundColor:u?"transparent":void 0,cursor:"not-allowed"},borderTopLeftRadius:y?0:void 0,borderBottomLeftRadius:y?0:void 0,borderTopRightRadius:v?0:void 0,borderBottomRightRadius:v?0:void 0,paddingLeft:y?m:void 0,paddingRight:v?m:void 0,borderRight:v?`1px solid ${r?d.border.default:d.divider}`:void 0,borderLeft:y?"none":void 0}}),(({link:e})=>({height:e?"max-content":void 0,width:e?"max-content":void 0,padding:e?0:void 0})),(({isLoading:e,preventPointerEvents:t})=>({pointerEvents:e||t?"none":void 0,"& > *":{visibility:e?"hidden":void 0},"& > .button-loader":{visibility:e?"visible":void 0}})),(({theme:{name:e},backgroundColor:t,color:n,disabled:r})=>{const o="dark"===e?or:ar,i="dark"===e?ar:or;return r||!n&&!t?{}:{backgroundColor:t,color:n,"&:hover":{backgroundColor:t?o(.05,t):void 0,color:n?i(.05,n):void 0},"&:active":{backgroundColor:t?o(.1,t):void 0,color:n?i(.1,n):void 0}}}),an),So=X.div({display:"inline-flex",flexDirection:"column",position:"relative"}),ko=X.div({marginRight:8}),Eo=t=>{var{value:n,max:r=100,step:o=1,width:i,height:s,disabled:c,onChange:u}=t,l=a(t,["value","max","step","width","height","disabled","onChange"]);return e.jsx(Ao,Object.assign({},l,{type:"range",max:r,value:n,percent:n/r*100,onChange:e=>{const{value:t}=e.target;u&&u(+t)},step:o,width:i,height:s,disabled:c,readOnly:!u}))},jo=(e,t)=>({appearance:"none",backgroundColor:t?"transparent":e.color.brand,height:e.size.sm,width:e.size.sm,border:"none",borderRadius:"50%"}),Ao=X.input((({theme:e,percent:t,width:n,height:r,disabled:o,readOnly:i})=>{const a=o?e.scale0:e.scale1,s=o?e.scale1:e.color.brand;return{appearance:"none",display:"block",width:n||"100%",height:r||2,borderRadius:24,outline:"none",background:`linear-gradient(to right, ${s} 0%, ${s} ${t}%, ${a} ${t}%, ${a} 100%)`,"&::-webkit-slider-thumb":jo(e,o||i),"&::-moz-range-thumb":jo(e,o||i),"&:focus-visible":{outline:o||i?"none":`${e.accent} solid 1px`}}}),an),To=t.forwardRef(((n,r)=>{var{src:o,title:i,width:s,infoPosition:c,centerAlignContent:u,small:l,collapsed:f,hideSliderOnStop:p,hideTimeOnStop:d,fontSizeTitle:h,fontSizeTime:g,onPlay:y,onPause:v,onStop:m}=n,b=a(n,["src","title","width","infoPosition","centerAlignContent","small","collapsed","hideSliderOnStop","hideTimeOnStop","fontSizeTitle","fontSizeTime","onPlay","onPause","onStop"]);const[w,x]=t.useState(!1),[_,C]=t.useState(!0),[O,S]=t.useState(0),[k,E]=t.useState(0),[j,A]=t.useState(""),[T,P]=t.useState(""),M=t.useRef(null),D=()=>{const{current:e}=M;e&&e.play().catch((()=>{throw Error("Video failed to play")}))},R=()=>{const{current:e}=M;e&&e.pause()},N=()=>{const{current:e}=M;e&&e.load()};t.useImperativeHandle(r,(()=>({play:D,pause:R,stop:N})),[M,w]);const I=e=>{x(!1),C(!0),m&&m(e)};t.useEffect((()=>{(()=>{const{current:e}=M;!!e&&e.paused})()}),[w]);const L=e=>{const t=(e/100).toFixed(2),[n,r]=t.split(".");return`${n}:${r}`},B=_&&p,F=_&&d;return e.jsxs(Po,Object.assign({width:s},b,{children:[e.jsx(xo,{outline:!0,small:l,icon:w?"pause":"play",onClick:()=>{w?R():D()},marginRight:8}),!f&&e.jsxs(Mo,Object.assign({alignDataTop:"top"===c},{children:[!B&&e.jsx(Eo,{value:O,max:k,step:.1,onChange:e=>{(null==M?void 0:M.current)&&(M.current.currentTime=e)}}),e.jsxs(Do,Object.assign({alignTop:"top"===c,noSlider:B,relative:u||B},{children:[i?e.jsx(Ro,Object.assign({fontSize:h},{children:i})):e.jsx("div",{}),!F&&e.jsxs(Ro,Object.assign({secondary:!0,fontSize:g},{children:[j&&!_?`${j} / `:"",T]}))]}))]})),e.jsxs("audio",Object.assign({ref:M,onPlay:e=>{x(!0),C(!1),y&&y(e)},onPause:e=>{x(!1),v&&v(e)},onEmptied:I,onEnded:I,onTimeUpdate:()=>{const{current:e}=M;if(e){const{currentTime:t}=e,n=L(t);S(t),A(n)}},onDurationChange:()=>{const{current:e}=M;if(e){const{duration:t}=e,n=L(t);E(t),P(n)}}},{children:[e.jsx("track",{kind:"captions"}),e.jsx("source",{src:o})]}))]}))})),Po=X.div((({width:e=250})=>({display:"flex",alignItems:"center",width:e})),an),Mo=X.div((({alignDataTop:e})=>({display:"flex",flexDirection:e?"column-reverse":"column",position:"relative",width:"100%"}))),Do=X.div((({alignTop:e,noSlider:t,relative:n})=>({position:n?"relative":"absolute",top:e||t?void 0:6,bottom:e&&!t?6:void 0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%"}))),Ro=X.div((({theme:e,secondary:t,fontSize:n})=>({color:t?e.scale6:e.scale10,fontSize:n||10})));var No={};
|
|
25
25
|
/*!
|
|
26
26
|
Copyright (c) 2018 Jed Watson.
|
|
27
27
|
Licensed under the MIT License (MIT), see
|
package/build/esm/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from
|
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
23
|
*/
|
|
24
|
-
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=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;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(s[u]=n[u]);if(r){a=r(n);for(var l=0;l<a.length;l++)i.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV)var r=n(2),o=n(4),i=n(3),a={};e.exports=function(e,n,s,c,u){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",c||"React class",s,l,typeof e[l]),f=e[l](n,l,c,s,null,i)}catch(e){f=e}if(o(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",s,l,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=u?u():"";o(!1,"Failed %s type: %s%s",s,f.message,null!=p?p:"")}}}}).call(t,n(0))},function(e,t,n){var r=n(1),o=n(2),i=n(3);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="insert",o="backspace",i=t.isInvalidKey=function(e){return"Backspace"!==e&&!/[0-9]/.test(e)},a=function(e){return e.start!==e.end};t.update=function(e,t,n){var r=a(t);return"Backspace"===n?s(e,t):function(e,t,n){return!(10===u(e).length&&!n||i(t))}(e,n,r)?c(e,t,n):{phoneNumber:e,cursorPosition:t.start}};var s=t.backspace=function(e,t){var n=t.start,r=t.end,i=e;if(!a(t)&&n>0&&e[n-1].match(/[0-9]/)&&(i=e.substring(0,n-1)+i.substring(n)),a(t)){var s=e.substring(n,r).replace(/\d/g,"");i=e.substring(0,n)+s+i.substring(r)}var c=p(e,i,t,o);return{phoneNumber:f(i),cursorPosition:c}},c=t.insert=function(e,t,n){t.start,t.end;var o=e;a(t)&&(o=l(e,n,t)),a(t)||(o=l(e,n,t));var i=p(e,o,t,r);return{phoneNumber:f(o),cursorPosition:i}},u=t.normalize=function(e){return e.replace(/\D/g,"")},l=t.insertChars=function(e,t,n){return e.substring(0,n.start)+t+e.substring(n.end)},f=t.format=function(e){var t=u(e),n=t.substring(0,3),r=t.substring(3,6),o=t.substring(6,11);return o?"("+n+") "+r+"-"+o:r?n+"-"+r:t},p=t.getCursorPosition=function(e,t,n,i){if(n.start===e.length)return f(t).length;if(0===n.start){if(i===o)return 0;if(i===r)return 1}if(i===o){var s=/[^0-9]/g;if(a(n)&&s.test(e.substring(n.start,n.end)))return n.start;if(!a(n)&&s.test(e[n.start-1]))return n.start-1}var c=e.substring(n.end).match(/[0-9]/g),u=c?c.length:0,l=f(t),p=d(l,u);return l.length-p},d=t.getCharCountFromEndWithNumbers=function(e,t){var n=e.split("");n.reverse();var r=0,o=n.reduce((function(e,n){return r===t?e:(/[0-9]/.test(n)&&r++,e+1)}),0);return r<t?0:o}}]);const go=t=>{var{size:n,color:r,center:o,background:i,margin:a,marginTop:s,marginBottom:c,marginRight:u,marginLeft:l,position:f,top:p,bottom:d,right:h,left:g}=t,y=M(t,["size","color","center","background","margin","marginTop","marginBottom","marginRight","marginLeft","position","top","bottom","right","left"]);const v={margin:a,marginTop:s,marginBottom:c,marginRight:u,marginLeft:l,position:f,top:p,bottom:d,right:h,left:g};return e(yo,Object.assign({},v,{center:o,background:i},{children:e(mo,{children:e(Ln,Object.assign({},y,{size:n,name:"loading",color:r,inheritColor:!r}))})}))},yo=Oe.div({width:"max-content",height:"max-content"},(({center:e})=>e&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),(({center:e,background:t})=>{if(!e||!t)return null;return{background:"string"==typeof t?t:"rgba(0, 0, 0, 0.5)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}),Nn,In),vo=k({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),mo=Oe.div({animation:`${vo} 1s linear infinite`,width:"max-content",height:"max-content"}),bo=(e,t,n=!0)=>{const[r,o]=v(!1);return{focused:r,handleFocus:t=>{n&&o(!0),e&&e(t)},handleBlur:e=>{o(!1),t&&t(e)}}},wo=e=>!!e||null!=e&&""!==e,xo=Oe.div((({theme:{input:e},backgroundColor:t,borderRadius:n,borderless:r,borderColor:o,textOnly:i,focused:a,invalid:s,disabled:c,hasLabel:u,pointer:l})=>({display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",minHeight:u?48:40,height:u?48:40,padding:"5px 16px",boxSizing:"border-box",color:c?e.labelColor.disabled:e.labelColor.default,backgroundColor:e.background.default,borderBottom:r?void 0:"1px solid",borderColor:o||e.borderColor.default,borderRadius:null!=n?n:4,borderBottomLeftRadius:0,borderBottomRightRadius:0,cursor:l?"pointer":void 0,"&:hover":{backgroundColor:c||i||t?void 0:e.background.hover,borderColor:a||c||r||s?void 0:e.borderColor.hover,Label:{color:a||c?void 0:e.labelColor.hover}}})),(({theme:{input:e},focused:t})=>({backgroundColor:t?e.background.focused:void 0,borderColor:t?e.borderColor.focused:void 0})),(({theme:{input:e},invalid:t})=>({borderColor:t?e.borderColor.error:void 0})),(({theme:{input:e},disabled:t,readOnly:n})=>({backgroundColor:t?e.background.disabled:void 0,borderColor:t?e.borderColor.disabled:void 0,pointerEvents:t||n?"none":void 0})),(({borderless:e})=>({border:e?"none":void 0})),(({theme:e,textOnly:t,disabled:n})=>({padding:t?0:void 0,backgroundColor:t?"transparent":void 0,width:t?"max-content":void 0,height:t?"max-content":void 0,minHeight:t?"max-content":void 0,color:t&&n?e.scale4:void 0})),(({backgroundColor:e})=>({backgroundColor:e})),Mn,Nn),_o=Oe.div((({readOnly:e})=>({display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",position:"relative","& > label, & > input":{pointerEvents:e?"none":void 0,caretColor:e?"transparent":void 0}}))),Oo=Oe.label((({theme:{font:e,input:t},filled:n,focused:r})=>({fontSize:n||r?e.size.sm:e.size.lg,color:n?t.labelColor.filled:t.labelColor.default,position:"relative",top:n||r?void 0:1})),(({theme:{input:e},disabled:t})=>({color:t?e.labelColor.disabled:void 0})),(({theme:{input:e},focused:t})=>({color:t?e.labelColor.focused:void 0})));var Co={Container:xo,Wrapper:_o,Label:Oo,useInputFocus:bo,isInputFilled:wo};const So=(t,n)=>{const r=e=>h(e,n);return"string"==typeof t?e(Ln,Object.assign({name:t,inheritColor:!0},n)):"object"==typeof t&&"props"in t&&"trigger"in t.props?h(t,{trigger:r(t.props.trigger)}):"object"==typeof t&&"props"in t?r(t):e(Ln,Object.assign({},t,n))},ko=f(((n,r)=>{var{id:o,label:i,placeholder:a,placeholderColor:s,description:c,isLoading:u,search:l,phone:f,textOnly:p,iconLeft:d,iconRight:h,invalid:b,borderless:x,borderRadius:_,borderColor:O,backgroundColor:C,fontSize:S,width:k,height:A,margin:j,marginLeft:T,marginRight:P,marginTop:D,marginBottom:N,containerRef:I,value:R,disabled:L,readOnly:B,preventFocus:F,pointer:z,onChange:H,onClick:V,onClear:U,onFocus:K,onBlur:$}=n,W=M(n,["id","label","placeholder","placeholderColor","description","isLoading","search","phone","textOnly","iconLeft","iconRight","invalid","borderless","borderRadius","borderColor","backgroundColor","fontSize","width","height","margin","marginLeft","marginRight","marginTop","marginBottom","containerRef","value","disabled","readOnly","preventFocus","pointer","onChange","onClick","onClear","onFocus","onBlur"]);const{focused:q,handleFocus:G,handleBlur:Z}=bo(K,$,!F&&!B),Y=g(null),{color:X}=E(),[J,Q]=v(p?50:void 0),ee=g(null);m((()=>{if(p&&ee){const{current:e}=ee,t=null==e?void 0:e.offsetWidth;"number"==typeof t&&Q(t+3)}}),[p,R,a,ee]);const te=p?R||a:R,ne=R&&U&&!u,re=()=>{q||G()},oe=()=>{q&&Z()};w(r,(()=>({focus:re,blur:oe,hasFocus:q}))),y((()=>{var e;q&&(null===(e=Y.current)||void 0===e||e.focus())}),[q]);return t(xo,Object.assign({ref:I,invalid:b,textOnly:p,borderless:x||p,borderRadius:_,borderColor:O,backgroundColor:C,width:k,height:A,margin:j,marginLeft:T,marginRight:P,marginTop:D,marginBottom:N,focused:q,disabled:L,hasLabel:!!i,onClick:e=>{F||B||re(),V&&V(e)},pointer:z,readOnly:B},{children:[l&&e(Ln,{name:"search",marginRight:8,inheritColor:!0}),d&&So(d,{marginRight:8}),t(_o,Object.assign({readOnly:B||F},{children:[p&&e(To,Object.assign({ref:ee,fontSize:S},{children:te})),i&&!p&&e(Oo,Object.assign({htmlFor:o||i,filled:wo(R),focused:q,disabled:L},{children:i})),e(Eo,Object.assign({id:o||i,ref:Y,value:R,placeholder:a,placeholderColor:s,onChange:e=>{if(f){const{value:t}=e.target,n=ho.normalize(t);if(n.length>10)return;const r=ho.format(n);H&&H(e,r,n)}else H&&H(e)},onFocus:G,onBlur:Z,disabled:L,hide:!(wo(R)||!i||q||p),width:J,fontSize:S},W))]})),h&&So(h),u&&e(go,{}),ne&&e(Ao,Object.assign({onClick:U},{children:e(Ln,{name:"close-circle-outline",color:X.brand})})),c&&e(jo,Object.assign({invalid:b},{children:c}))]}))})),Eo=Oe.input((({theme:{font:e,input:t,size:n,accent:r},fontSize:o,hide:i,disabled:a,width:s,placeholderColor:c})=>({outline:"none",border:"none",color:a?t.color.disabled:t.color.default,caretColor:r,backgroundColor:"transparent",paddingLeft:0,fontSize:o||e.size.lg,fontFamily:e.family.default,width:s||"100%",height:"100%",marginRight:n.sm,boxSizing:"border-box",opacity:i?0:1,position:i?"absolute":void 0,"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active":{transition:"background-color 0s 50000s",WebkitTextFillColor:t.color.default},"&::placeholder":{color:c||t.color.placeholder,opacity:1}}))),Ao=Oe.div({height:"100%",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:4}),jo=Oe.div((({theme:{font:e,input:t},invalid:n})=>({color:n?t.color.descriptionError:t.color.description,fontSize:e.size.sm,position:"absolute",left:0,top:"calc(100% + 4px)"}))),To=Oe.div((({theme:{font:e},fontSize:t})=>({position:"absolute",width:"max-content",opacity:0,fontSize:t||e.size.lg,zIndex:-1}))),Po=({id:t,children:n,containerRef:r,parentSelector:o,width:i,maxHeight:a=200,offsetY:s,offsetX:c,centerY:u,centerX:l,direction:f})=>{const[p,d]=v(),h=g(null);m((()=>{const{current:e}=r||h;if(e&&f){const{scrollWidth:t,scrollHeight:n}=e,r="left"===f||"right"===f;d((r?t:n<a?n:a)+((r?c:s)||4))}}),[r,f]);const y=e(Mo,Object.assign({id:t,ref:r||h,offsetX:c,offsetY:s,width:i,maxHeight:a,centerY:u,centerX:l,optionsPosition:{direction:f,amount:p}},{children:n}));if(o){const e=document.querySelector(o);return e?j.createPortal(y,e):y}return y};Po.Item=t=>{var{children:n,id:r,onClick:o,selected:i,noSelect:a,contentPosition:s,color:c,accented:u}=t,l=M(t,["children","id","onClick","selected","noSelect","contentPosition","color","accented"]);return e(Do,Object.assign({id:null==r?void 0:r.toString(),onClick:o,selected:i,noSelect:a,contentPosition:s,color:c,accented:u,tabIndex:a?-1:0},l,{children:n}))};const Mo=Oe.div((({theme:{elevation3:e,font:t,options:n},width:r,maxHeight:o,offsetY:i,offsetX:a})=>({boxSizing:"border-box",position:"absolute",fontFamily:t.family.default,fontSize:t.size.md,width:r||"max-content",maxHeight:o,backgroundColor:n.background,borderRadius:4,boxShadow:e,zIndex:2,overflowY:"auto",top:i?-i:"100%",left:a||void 0})),(({centerY:e,centerX:t})=>({top:e?"50%":void 0,left:t?"50%":void 0,transform:`translate(${t?"-50%":0}, ${e?"-50%":0})`})),(({optionsPosition:e})=>{const{direction:t,amount:n}=e;return t&&n?{left:"left"===t?-n:void 0,right:"right"===t?-n:void 0,top:"top"===t?-n:void 0}:{}})),Do=Oe.div({border:"none",padding:"5px 16px",display:"flex",alignItems:"center",userSelect:"none"},(({theme:{optionItem:e},accented:t,selected:n,noSelect:r=!1})=>({color:t?e.color.accent:e.color.inactive,cursor:r?"inherit":"pointer",backgroundColor:!r&&n?e.background.active:e.background.inactive,"&:hover":{backgroundColor:r?e.background.inactive:e.background.active},"&:focus":{outline:"none",backgroundColor:e.background.active}})),(({color:e})=>({color:e})),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e}))),No=(e,t)=>{if(!e)return[];const{search:n,filter:r,inputText:o}=t;return n&&r&&o?e.filter((e=>{const t=e=>{if(!e)return!1;const t=o.toLowerCase();return e.toString().toLowerCase().includes(t)};let n=t(e.label);return!n&&"id"in e&&(n=t(e.id)),n||!("value"in e)||"string"!=typeof e.value&&"number"!=typeof e.value||(n=t(e.value)),!n&&"body"in e&&(n=t(e.body)),!n&&"header"in e&&(n=t(e.header)),n})):e},Io=(n,r,o,i,a)=>{const{selected:s}=a,c=((n,r,o,i)=>{if(n&&n.length>0)return No(n,i).map((n=>{const i=n.onClick?e=>{n.onClick&&n.onClick(e),o()}:e=>r(n,e);return t(Po.Item,Object.assign({id:n.id,onClick:i},{children:[n.leftElement||null,n.header&&n.body?t("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[e(Ro,{children:n.header}),e(Lo,{children:n.body})]})):n.label,n.rightElement&&e("div",Object.assign({style:{marginLeft:"auto"}},{children:n.rightElement}))]}),n.id)}));return[]})(n,o,i,M(a,["selected"])),u=((e,t,n)=>e?po(e).map((e=>e?h(e,{setValue:t,close:n}):null)):[])(r,o,i),l=[...c,...u];return po(l).map(((e,t)=>e?h(e,{selected:s===t}):null))},Ro=Oe.div((({theme:e})=>({fontSize:e.font.size.md,color:e.scale10}))),Lo=Oe.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6}))),Bo=e=>p.toArray(e).filter((e=>"string"==typeof e)).join("").trim(),Fo=n=>{var{onChange:r,onTextChange:o,afterShow:i,afterHide:a,onFocus:s,onBlur:c,onError:u,placeholder:l,placeholderColor:f,value:p,options:d,children:h,borderless:m,borderColor:b,backgroundColor:w,hideIcon:x,clearOnSelect:_,textOnly:O,width:C,height:S,isLoading:k,margin:A,marginTop:j,marginBottom:T,marginRight:P,marginLeft:D,label:N,id:I,name:R,trigger:L,centerY:B,centerX:F,offsetY:z,offsetX:H,direction:V,fontSize:U,description:K,disabled:$,invalid:W,search:q,filter:G,restrictInput:Z,inputRef:Y,optionsParent:X}=n,J=M(n,["onChange","onTextChange","afterShow","afterHide","onFocus","onBlur","onError","placeholder","placeholderColor","value","options","children","borderless","borderColor","backgroundColor","hideIcon","clearOnSelect","textOnly","width","height","isLoading","margin","marginTop","marginBottom","marginRight","marginLeft","label","id","name","trigger","centerY","centerX","offsetY","offsetX","direction","fontSize","description","disabled","invalid","search","filter","restrictInput","inputRef","optionsParent"]);const[Q,ee]=v(""),[te,ne]=v(""),[re,oe]=v(!1),[ie,ae]=v(!1),[se,ce]=v(!1),ue=g(null),{input:le}=E(),fe={margin:A,marginTop:j,marginBottom:T,marginRight:P,marginLeft:D},pe=e=>{e&&e.stopPropagation(),!re&&i&&i(),re&&a&&a(),oe((e=>!e))};y((()=>{var e;if(re&&q){null===(e=(Y||ue).current)||void 0===e||e.focus()}}),[re,q]),y((()=>{u&&u(se)}),[se]),y((()=>{o&&o(te)}),[te]);const de=Mt(pe,re,X?[X,`${X} *`]:void 0),he=(e,t)=>{if(void 0===e)return!1;return e.toString().toLowerCase()===t.toLowerCase()},ge=e=>{const t=be().find((t=>{let n=he(t.label,e);return!n&&"id"in t&&(n=he(t.id,e)),n||!("value"in t)||"string"!=typeof t.value&&"number"!=typeof t.value||(n=he(t.value,e)),n}));return t},ye=e=>"function"==typeof Z?!Z(e):Z,ve=e=>me(null,e),me=(e,t)=>{let n,o=!1;if("string"==typeof e){n=(e=>{if(ye(e))return ge(e)||null;return{id:to(),label:e,value:e}})(e);const t=ye(e);null===n&&t&&(o=!0)}else n=e;re&&pe(t),ee((null==n?void 0:n.label)||""),r&&void 0!==n&&r(n),o?ce(!0):(se&&ce(!1),_&&ee(""),ne(""))};y((()=>{""===p&&ve()}),[p]);const be=()=>{const e=po(h).map((e=>{const t=e;let n=t.props.displayText||"";return!N&&t.props.children&&(n=Bo(t.props.children)),{id:t.props.id,label:n,onClick:t.props.onClick}}));return[...No(d||[],{search:q,filter:G,inputText:te}),...e]},we={options:be(),select:me,open:pe,close:pe,searchText:q?te:void 0,isOpen:re,isFocused:ie},[xe,_e]=Lt(we),Oe=Io(d||[],h,me,pe,{selected:xe,search:q,filter:G,inputText:te}),Ce=re?"caret-up":"caret-down",Se=O&&!$?f||le.color.default:void 0,ke=M(J,["onClear","phone"]);return e(zo,Object.assign({textOnly:O,altTrigger:!!L,width:C,height:S,focused:ie,search:q},fe,{children:t(Ho,Object.assign({ref:de},{children:[L?e(Vo,Object.assign({id:I,onClick:pe,tabIndex:0,onFocus:()=>ae(!0),onBlur:()=>ae(!1)},{children:L})):e(Ko,Object.assign({shake:se},{children:e(ko,Object.assign({},ke,{ref:Y||ue,id:I,name:R,label:N,fontSize:U,pointer:!0,preventFocus:!q,value:te||p||Q,placeholder:l||"Select",placeholderColor:Se,iconRight:x||k?void 0:Ce,borderless:m,borderColor:b,backgroundColor:w,isLoading:k,textOnly:O,description:K,disabled:$,invalid:se||W,onClick:pe,onChange:e=>{var t;const{value:n}=e.target,r=null===(t=(Y||ue).current)||void 0===t?void 0:t.hasFocus;q?(ne(n),!re&&r&&oe(!0),se&&ce(!1)):n||ve(e);const o=ge(n),i=ye(n),a=""===n||i&&!r;o&&!(q&&(!i||r))?me(o,e):q&&!a||ve(e)},onFocus:e=>{ae(!0),s&&s(e)},onBlur:e=>{var t;if(ae(!1),c&&c(e),q&&te&&e){const{relatedTarget:n}=e;(null===(t=null==_e?void 0:_e.current)||void 0===t?void 0:t.contains(n))||me(te,e)}}}))})),re&&Oe.length>0&&e(Po,Object.assign({containerRef:_e,parentSelector:X,width:!L&&!O||X?"100%":void 0,centerY:B,centerX:F,offsetY:z,offsetX:H,direction:V},{children:Oe}))]}))}))};Fo.Item=({value:t,displayText:n,setValue:r,close:o,children:i,contentPosition:a,color:s,accented:c,onClick:u,id:l})=>{const f=u?e=>{u&&u(e),o&&o()}:e=>{const o={id:l,label:n||Bo(i)||"",value:t};r&&r(o,e)};return e(Po.Item,Object.assign({id:l,contentPosition:a,color:s,onClick:f,accented:c},{children:i}))};const zo=Oe.div({display:"flex",boxSizing:"border-box"},(({theme:{accent:e},focused:t,search:n,altTrigger:r,textOnly:o})=>({width:r||o?"max-content":"100%",flexDirection:"column",outline:!t||n||r?void 0:`${e} solid 1px`})),Mn,Nn),Ho=Oe.div({position:"relative",width:"100%",height:"inherit"}),Vo=Oe.div((({theme:{accent:e}})=>({display:"flex",height:"inherit","&:focus-visible":{outline:`${e} solid 1px`}}))),Uo=k({"10%":{transform:"translate3d(-1px, 0, 0)"},"30%":{transform:"translate3d(2px, 0, 0)"},"50%":{transform:"translate3d(-2px, 0, 0)"},"70%":{transform:"translate3d(2px, 0, 0)"},"90%":{transform:"translate3d(-1px, 0, 0)"}}),Ko=Oe.div((({shake:e})=>({"& input":{animation:e?`${Uo} .5s linear`:void 0}}))),$o=t=>{var{children:n,disabled:r,outline:o,size:i,small:a,large:s,secondary:c,negative:u,positive:l,caution:f,collapse:d}=t,g=M(t,["children","disabled","outline","size","small","large","secondary","negative","positive","caution","collapse"]);if(n){const t=p.count(n);return e(Wo,Object.assign({},g,{children:p.map(n,((e,n)=>{let p;if(t>1&&(p=0===n?"right":n===t-1?"left":"middle"),e){let t=e;"trigger"in e.props&&(t=e.props.trigger);const n=t,g=a||n.props.small,y=s||n.props.large,v=i||n.props.size,m=r||n.props.disabled,b=o||n.props.outline,w=c||n.props.secondary,x=u||n.props.negative,_=l||n.props.positive,O=f||n.props.caution,C=d||n.props.collapse,S=h(t,{joined:p,size:v,small:g,large:y,disabled:m,outline:b,secondary:w,negative:x,positive:_,caution:O,collapse:C});return"trigger"in e.props?h(e,{trigger:S}):S}return null}))}))}return null},Wo=Oe.div((({width:e})=>({display:"inline-flex",width:e})),Nn),qo=({size:t})=>e(Go,Object.assign({className:"button-loader"},{children:e(go,{size:t})})),Go=Oe.div({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",display:"flex",justifyContent:"center",alignItems:"center"}),Zo=t=>{const{content:n,children:r,dropdown:o,options:i}=t,a=M(t,["content","children","dropdown","options"]),s=n||r;return o&&i?e(Xo,Object.assign({options:i},a,{children:s})):e(Yo,Object.assign({},a,{children:s}))};Zo.Group=$o;const Yo=n=>{var{children:r,onClick:o,icon:i,iconPosition:a,iconColor:s,joined:c,size:u,small:l,large:f,isLoading:p,collapse:d,backgroundColor:h,color:g,type:y,animation:v}=n,m=M(n,["children","onClick","icon","iconPosition","iconColor","joined","size","small","large","isLoading","collapse","backgroundColor","color","type","animation"]);const{button:b}=E(),w=i&&(!r||d),x="right"===a;let _=u||"medium";l?_="small":f&&(_="large");const O=b[_],{iconSize:C}=O,S=d&&i;return t(Jo,Object.assign({},m,{type:y||"button",size:_,iconOnly:w,iconRight:x,joined:c,onClick:o,isLoading:p,color:g,backgroundColor:h,animation:v},{children:[i?e(Ln,{size:C,name:i,marginRight:w||x?0:4,marginLeft:!w&&x?4:0,color:s,inheritColor:!s}):null,!S&&e("span",{children:r}),p&&e(qo,{size:C})]}))},Xo=n=>{var{children:r,options:o,onClick:i,afterShow:a,afterHide:s,secondary:c,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:m,isLoading:b,direction:w,collapse:x,width:_}=n,O=M(n,["children","options","onClick","afterShow","afterHide","secondary","negative","positive","caution","outline","size","small","large","disabled","isLoading","direction","collapse","width"]);const[C,S]=v(!1),k={secondary:c,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:m},E=u((()=>`button-dropdown-${to()}`),[]);return e(Qo,Object.assign({id:E},{children:t($o,Object.assign({width:x?void 0:_},{children:[e(Yo,Object.assign({},k,O,{width:_&&!x?"100%":void 0,collapse:x,isLoading:b,onClick:e=>{i&&i(e)}},{children:e(ei,{children:r})})),e(Fo,{options:o,direction:w,optionsParent:`#${E}`,afterShow:()=>{a&&a(),S(!0)},afterHide:()=>{s&&s(),S(!1)},trigger:e(Yo,Object.assign({},k,{icon:C?"caret-up":"caret-down",preventPointerEvents:b,tabIndex:-1}))})]}))}))},Jo=Oe.button((({theme:{accent:e,font:t,button:n},size:r="medium",joined:o,circle:i,iconOnly:a,iconRight:s,width:c,height:u,animation:l})=>{const f=i||a&&!o,p=n[r],d=c||"max-content",{height:h,font:g,padding:y,iconOnlyPadding:v}=p,m=u||h,b=a||f?v:y;return{display:"inline-flex",alignItems:"center",justifyContent:"center",flexDirection:s?"row-reverse":"row",fontSize:g,width:f?m:d,height:m,fontFamily:t.family.default,fontWeight:t.weight.bold,borderRadius:f?"50%":30,cursor:"pointer",outline:"none",padding:`0px ${b}px`,position:"relative",animation:l,"&:focus-visible":{outline:`${e} solid 1px`}}}),(({theme:e,joined:t,iconOnly:n,outline:r,negative:o,positive:i,caution:a,secondary:s,disabled:c,subtle:u,link:l})=>{const{button:f,size:p}=e;let d=f.primary;u?d=f.subtle:l?d=f.link:c?d=f.disabled:o?d=f.negative:i?d=f.positive:a?d=f.caution:s&&(d=f.secondary);const h=r?d.outlineBackground:d.background;let g=r?d.outlineColor:d.color;if(l||u){let e=f.subtle;l&&(e=f.link),c?g=f.disabled.color:o?g=e.negativeColor:i?g=e.positiveColor:a?g=e.cautionColor:s&&(g=e.secondaryColor)}const y="left"===t||"middle"===t,v="right"===t||"middle"===t,m=n?p.xs:p.sm;return{backgroundColor:h.default,color:g.default,border:r&&!l?"1px solid":"none",borderColor:d.border.default,"&:hover":{backgroundColor:h.hover,color:g.hover,borderColor:r&&!c?d.border.hover:void 0},"&:active":{backgroundColor:h.active,color:g.active,borderColor:r&&!c?d.border.active:void 0},"&:disabled":{backgroundColor:u?"transparent":void 0,cursor:"not-allowed"},borderTopLeftRadius:y?0:void 0,borderBottomLeftRadius:y?0:void 0,borderTopRightRadius:v?0:void 0,borderBottomRightRadius:v?0:void 0,paddingLeft:y?m:void 0,paddingRight:v?m:void 0,borderRight:v?`1px solid ${r?d.border.default:d.divider}`:void 0,borderLeft:y?"none":void 0}}),(({link:e})=>({height:e?"max-content":void 0,width:e?"max-content":void 0,padding:e?0:void 0})),(({isLoading:e,preventPointerEvents:t})=>({pointerEvents:e||t?"none":void 0,"& > *":{visibility:e?"hidden":void 0},"& > .button-loader":{visibility:e?"visible":void 0}})),(({theme:{name:e},backgroundColor:t,color:n,disabled:r})=>{const o="dark"===e?Mr:Nr,i="dark"===e?Nr:Mr;return r||!n&&!t?{}:{backgroundColor:t,color:n,"&:hover":{backgroundColor:t?o(.05,t):void 0,color:n?i(.05,n):void 0},"&:active":{backgroundColor:t?o(.1,t):void 0,color:n?i(.1,n):void 0}}}),Nn),Qo=Oe.div({display:"inline-flex",flexDirection:"column",position:"relative"}),ei=Oe.div({marginRight:8}),ti=t=>{var{value:n,max:r=100,step:o=1,width:i,height:a,disabled:s,onChange:c}=t,u=M(t,["value","max","step","width","height","disabled","onChange"]);return e(ri,Object.assign({},u,{type:"range",max:r,value:n,percent:n/r*100,onChange:e=>{const{value:t}=e.target;c&&c(+t)},step:o,width:i,height:a,disabled:s,readOnly:!c}))},ni=(e,t)=>({appearance:"none",backgroundColor:t?"transparent":e.color.brand,height:e.size.sm,width:e.size.sm,border:"none",borderRadius:"50%"}),ri=Oe.input((({theme:e,percent:t,width:n,height:r,disabled:o,readOnly:i})=>{const a=o?e.scale0:e.scale1,s=o?e.scale1:e.color.brand;return{appearance:"none",display:"block",width:n||"100%",height:r||2,borderRadius:24,outline:"none",background:`linear-gradient(to right, ${s} 0%, ${s} ${t}%, ${a} ${t}%, ${a} 100%)`,"&::-webkit-slider-thumb":ni(e,o||i),"&::-moz-range-thumb":ni(e,o||i),"&:focus-visible":{outline:o||i?"none":`${e.accent} solid 1px`}}}),Nn),oi=f(((n,r)=>{var{src:o,title:i,width:a,infoPosition:s,centerAlignContent:c,small:u,collapsed:l,hideSliderOnStop:f,hideTimeOnStop:p,fontSizeTitle:d,fontSizeTime:h,onPlay:m,onPause:b,onStop:x}=n,_=M(n,["src","title","width","infoPosition","centerAlignContent","small","collapsed","hideSliderOnStop","hideTimeOnStop","fontSizeTitle","fontSizeTime","onPlay","onPause","onStop"]);const[O,C]=v(!1),[S,k]=v(!0),[E,A]=v(0),[j,T]=v(0),[P,D]=v(""),[N,I]=v(""),R=g(null),L=()=>{const{current:e}=R;e&&e.play().catch((()=>{throw Error("Video failed to play")}))},B=()=>{const{current:e}=R;e&&e.pause()},F=()=>{const{current:e}=R;e&&e.load()};w(r,(()=>({play:L,pause:B,stop:F})),[R,O]);const z=e=>{C(!1),k(!0),x&&x(e)};y((()=>{(()=>{const{current:e}=R;!!e&&e.paused})()}),[O]);const H=e=>{const t=(e/100).toFixed(2),[n,r]=t.split(".");return`${n}:${r}`},V=S&&f,U=S&&p;return t(ii,Object.assign({width:a},_,{children:[e(Zo,{outline:!0,small:u,icon:O?"pause":"play",onClick:()=>{O?B():L()},marginRight:8}),!l&&t(ai,Object.assign({alignDataTop:"top"===s},{children:[!V&&e(ti,{value:E,max:j,step:.1,onChange:e=>{(null==R?void 0:R.current)&&(R.current.currentTime=e)}}),t(si,Object.assign({alignTop:"top"===s,noSlider:V,relative:c||V},{children:[i?e(ci,Object.assign({fontSize:d},{children:i})):e("div",{}),!U&&t(ci,Object.assign({secondary:!0,fontSize:h},{children:[P&&!S?`${P} / `:"",N]}))]}))]})),t("audio",Object.assign({ref:R,onPlay:e=>{C(!0),k(!1),m&&m(e)},onPause:e=>{C(!1),b&&b(e)},onEmptied:z,onEnded:z,onTimeUpdate:()=>{const{current:e}=R;if(e){const{currentTime:t}=e,n=H(t);A(t),D(n)}},onDurationChange:()=>{const{current:e}=R;if(e){const{duration:t}=e,n=H(t);T(t),I(n)}}},{children:[e("track",{kind:"captions"}),e("source",{src:o})]}))]}))})),ii=Oe.div((({width:e=250})=>({display:"flex",alignItems:"center",width:e})),Nn),ai=Oe.div((({alignDataTop:e})=>({display:"flex",flexDirection:e?"column-reverse":"column",position:"relative",width:"100%"}))),si=Oe.div((({alignTop:e,noSlider:t,relative:n})=>({position:n?"relative":"absolute",top:e||t?void 0:6,bottom:e&&!t?6:void 0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%"}))),ci=Oe.div((({theme:e,secondary:t,fontSize:n})=>({color:t?e.scale6:e.scale10,fontSize:n||10})));var ui={};
|
|
24
|
+
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=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;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(s[u]=n[u]);if(r){a=r(n);for(var l=0;l<a.length;l++)i.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV)var r=n(2),o=n(4),i=n(3),a={};e.exports=function(e,n,s,c,u){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",c||"React class",s,l,typeof e[l]),f=e[l](n,l,c,s,null,i)}catch(e){f=e}if(o(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",s,l,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=u?u():"";o(!1,"Failed %s type: %s%s",s,f.message,null!=p?p:"")}}}}).call(t,n(0))},function(e,t,n){var r=n(1),o=n(2),i=n(3);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="insert",o="backspace",i=t.isInvalidKey=function(e){return"Backspace"!==e&&!/[0-9]/.test(e)},a=function(e){return e.start!==e.end};t.update=function(e,t,n){var r=a(t);return"Backspace"===n?s(e,t):function(e,t,n){return!(10===u(e).length&&!n||i(t))}(e,n,r)?c(e,t,n):{phoneNumber:e,cursorPosition:t.start}};var s=t.backspace=function(e,t){var n=t.start,r=t.end,i=e;if(!a(t)&&n>0&&e[n-1].match(/[0-9]/)&&(i=e.substring(0,n-1)+i.substring(n)),a(t)){var s=e.substring(n,r).replace(/\d/g,"");i=e.substring(0,n)+s+i.substring(r)}var c=p(e,i,t,o);return{phoneNumber:f(i),cursorPosition:c}},c=t.insert=function(e,t,n){t.start,t.end;var o=e;a(t)&&(o=l(e,n,t)),a(t)||(o=l(e,n,t));var i=p(e,o,t,r);return{phoneNumber:f(o),cursorPosition:i}},u=t.normalize=function(e){return e.replace(/\D/g,"")},l=t.insertChars=function(e,t,n){return e.substring(0,n.start)+t+e.substring(n.end)},f=t.format=function(e){var t=u(e),n=t.substring(0,3),r=t.substring(3,6),o=t.substring(6,11);return o?"("+n+") "+r+"-"+o:r?n+"-"+r:t},p=t.getCursorPosition=function(e,t,n,i){if(n.start===e.length)return f(t).length;if(0===n.start){if(i===o)return 0;if(i===r)return 1}if(i===o){var s=/[^0-9]/g;if(a(n)&&s.test(e.substring(n.start,n.end)))return n.start;if(!a(n)&&s.test(e[n.start-1]))return n.start-1}var c=e.substring(n.end).match(/[0-9]/g),u=c?c.length:0,l=f(t),p=d(l,u);return l.length-p},d=t.getCharCountFromEndWithNumbers=function(e,t){var n=e.split("");n.reverse();var r=0,o=n.reduce((function(e,n){return r===t?e:(/[0-9]/.test(n)&&r++,e+1)}),0);return r<t?0:o}}]);const go=t=>{var{size:n,color:r,center:o,background:i,margin:a,marginTop:s,marginBottom:c,marginRight:u,marginLeft:l,position:f,top:p,bottom:d,right:h,left:g}=t,y=M(t,["size","color","center","background","margin","marginTop","marginBottom","marginRight","marginLeft","position","top","bottom","right","left"]);const v={margin:a,marginTop:s,marginBottom:c,marginRight:u,marginLeft:l,position:f,top:p,bottom:d,right:h,left:g};return e(yo,Object.assign({},v,{center:o,background:i},{children:e(mo,{children:e(Ln,Object.assign({},y,{size:n,name:"loading",color:r,inheritColor:!r}))})}))},yo=Oe.div({width:"max-content",height:"max-content"},(({center:e})=>e&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),(({center:e,background:t})=>{if(!e||!t)return null;return{background:"string"==typeof t?t:"rgba(0, 0, 0, 0.5)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}),Nn,In),vo=k({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),mo=Oe.div({animation:`${vo} 1s linear infinite`,width:"max-content",height:"max-content"}),bo=(e,t,n=!0)=>{const[r,o]=v(!1);return{focused:r,handleFocus:t=>{n&&o(!0),e&&e(t)},handleBlur:e=>{o(!1),t&&t(e)}}},wo=e=>!!e||null!=e&&""!==e,xo=Oe.div((({theme:{input:e},backgroundColor:t,borderRadius:n,borderless:r,borderColor:o,textOnly:i,focused:a,invalid:s,disabled:c,hasLabel:u,pointer:l})=>({display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",minHeight:u?48:40,height:u?48:40,padding:"5px 16px",boxSizing:"border-box",color:c?e.labelColor.disabled:e.labelColor.default,backgroundColor:e.background.default,borderBottom:r?void 0:"1px solid",borderColor:o||e.borderColor.default,borderRadius:null!=n?n:4,borderBottomLeftRadius:null!=n?n:0,borderBottomRightRadius:null!=n?n:0,cursor:l?"pointer":void 0,"&:hover":{backgroundColor:c||i||t?void 0:e.background.hover,borderColor:a||c||r||s?void 0:e.borderColor.hover,Label:{color:a||c?void 0:e.labelColor.hover}}})),(({theme:{input:e},focused:t})=>({backgroundColor:t?e.background.focused:void 0,borderColor:t?e.borderColor.focused:void 0})),(({theme:{input:e},invalid:t})=>({borderColor:t?e.borderColor.error:void 0})),(({theme:{input:e},disabled:t,readOnly:n})=>({backgroundColor:t?e.background.disabled:void 0,borderColor:t?e.borderColor.disabled:void 0,pointerEvents:t||n?"none":void 0})),(({borderless:e})=>({border:e?"none":void 0})),(({theme:e,textOnly:t,disabled:n})=>({padding:t?0:void 0,backgroundColor:t?"transparent":void 0,width:t?"max-content":void 0,height:t?"max-content":void 0,minHeight:t?"max-content":void 0,color:t&&n?e.scale4:void 0})),(({backgroundColor:e})=>({backgroundColor:e})),Mn,Nn),_o=Oe.div((({readOnly:e})=>({display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",position:"relative","& > label, & > input":{pointerEvents:e?"none":void 0,caretColor:e?"transparent":void 0}}))),Oo=Oe.label((({theme:{font:e,input:t},filled:n,focused:r})=>({fontSize:n||r?e.size.sm:e.size.lg,color:n?t.labelColor.filled:t.labelColor.default,position:"relative",top:n||r?void 0:1})),(({theme:{input:e},disabled:t})=>({color:t?e.labelColor.disabled:void 0})),(({theme:{input:e},focused:t})=>({color:t?e.labelColor.focused:void 0})));var Co={Container:xo,Wrapper:_o,Label:Oo,useInputFocus:bo,isInputFilled:wo};const So=(t,n)=>{const r=e=>h(e,n);return"string"==typeof t?e(Ln,Object.assign({name:t,inheritColor:!0},n)):"object"==typeof t&&"props"in t&&"trigger"in t.props?h(t,{trigger:r(t.props.trigger)}):"object"==typeof t&&"props"in t?r(t):e(Ln,Object.assign({},t,n))},ko=f(((n,r)=>{var{id:o,label:i,placeholder:a,placeholderColor:s,description:c,isLoading:u,search:l,phone:f,textOnly:p,iconLeft:d,iconRight:h,invalid:b,borderless:x,borderRadius:_,borderColor:O,backgroundColor:C,fontSize:S,width:k,height:A,margin:j,marginLeft:T,marginRight:P,marginTop:D,marginBottom:N,containerRef:I,value:R,disabled:L,readOnly:B,preventFocus:F,pointer:z,onChange:H,onClick:V,onClear:U,onFocus:K,onBlur:$}=n,W=M(n,["id","label","placeholder","placeholderColor","description","isLoading","search","phone","textOnly","iconLeft","iconRight","invalid","borderless","borderRadius","borderColor","backgroundColor","fontSize","width","height","margin","marginLeft","marginRight","marginTop","marginBottom","containerRef","value","disabled","readOnly","preventFocus","pointer","onChange","onClick","onClear","onFocus","onBlur"]);const{focused:q,handleFocus:G,handleBlur:Z}=bo(K,$,!F&&!B),Y=g(null),{color:X}=E(),[J,Q]=v(p?50:void 0),ee=g(null);m((()=>{if(p&&ee){const{current:e}=ee,t=null==e?void 0:e.offsetWidth;"number"==typeof t&&Q(t+3)}}),[p,R,a,ee]);const te=p?R||a:R,ne=R&&U&&!u,re=()=>{q||G()},oe=()=>{q&&Z()};w(r,(()=>({focus:re,blur:oe,hasFocus:q}))),y((()=>{var e;q&&(null===(e=Y.current)||void 0===e||e.focus())}),[q]);return t(xo,Object.assign({ref:I,invalid:b,textOnly:p,borderless:x||p,borderRadius:_,borderColor:O,backgroundColor:C,width:k,height:A,margin:j,marginLeft:T,marginRight:P,marginTop:D,marginBottom:N,focused:q,disabled:L,hasLabel:!!i,onClick:e=>{F||B||re(),V&&V(e)},pointer:z,readOnly:B},{children:[l&&e(Ln,{name:"search",marginRight:8,inheritColor:!0}),d&&So(d,{marginRight:8}),t(_o,Object.assign({readOnly:B||F},{children:[p&&e(To,Object.assign({ref:ee,fontSize:S},{children:te})),i&&!p&&e(Oo,Object.assign({htmlFor:o||i,filled:wo(R),focused:q,disabled:L},{children:i})),e(Eo,Object.assign({id:o||i,ref:Y,value:R,placeholder:a,placeholderColor:s,onChange:e=>{if(f){const{value:t}=e.target,n=ho.normalize(t);if(n.length>10)return;const r=ho.format(n);H&&H(e,r,n)}else H&&H(e)},onFocus:G,onBlur:Z,disabled:L,hide:!(wo(R)||!i||q||p),width:J,fontSize:S},W))]})),h&&So(h),u&&e(go,{}),ne&&e(Ao,Object.assign({onClick:U},{children:e(Ln,{name:"close-circle-outline",color:X.brand})})),c&&e(jo,Object.assign({invalid:b},{children:c}))]}))})),Eo=Oe.input((({theme:{font:e,input:t,size:n,accent:r},fontSize:o,hide:i,disabled:a,width:s,placeholderColor:c})=>({outline:"none",border:"none",color:a?t.color.disabled:t.color.default,caretColor:r,backgroundColor:"transparent",paddingLeft:0,fontSize:o||e.size.lg,fontFamily:e.family.default,width:s||"100%",height:"100%",marginRight:n.sm,boxSizing:"border-box",opacity:i?0:1,position:i?"absolute":void 0,"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active":{transition:"background-color 0s 50000s",WebkitTextFillColor:t.color.default},"&::placeholder":{color:c||t.color.placeholder,opacity:1}}))),Ao=Oe.div({height:"100%",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:4}),jo=Oe.div((({theme:{font:e,input:t},invalid:n})=>({color:n?t.color.descriptionError:t.color.description,fontSize:e.size.sm,position:"absolute",left:0,top:"calc(100% + 4px)"}))),To=Oe.div((({theme:{font:e},fontSize:t})=>({position:"absolute",width:"max-content",opacity:0,fontSize:t||e.size.lg,zIndex:-1}))),Po=({id:t,children:n,containerRef:r,parentSelector:o,width:i,maxHeight:a=200,offsetY:s,offsetX:c,centerY:u,centerX:l,direction:f})=>{const[p,d]=v(),h=g(null);m((()=>{const{current:e}=r||h;if(e&&f){const{scrollWidth:t,scrollHeight:n}=e,r="left"===f||"right"===f;d((r?t:n<a?n:a)+((r?c:s)||4))}}),[r,f]);const y=e(Mo,Object.assign({id:t,ref:r||h,offsetX:c,offsetY:s,width:i,maxHeight:a,centerY:u,centerX:l,optionsPosition:{direction:f,amount:p}},{children:n}));if(o){const e=document.querySelector(o);return e?j.createPortal(y,e):y}return y};Po.Item=t=>{var{children:n,id:r,onClick:o,selected:i,noSelect:a,contentPosition:s,color:c,accented:u}=t,l=M(t,["children","id","onClick","selected","noSelect","contentPosition","color","accented"]);return e(Do,Object.assign({id:null==r?void 0:r.toString(),onClick:o,selected:i,noSelect:a,contentPosition:s,color:c,accented:u,tabIndex:a?-1:0},l,{children:n}))};const Mo=Oe.div((({theme:{elevation3:e,font:t,options:n},width:r,maxHeight:o,offsetY:i,offsetX:a})=>({boxSizing:"border-box",position:"absolute",fontFamily:t.family.default,fontSize:t.size.md,width:r||"max-content",maxHeight:o,backgroundColor:n.background,borderRadius:4,boxShadow:e,zIndex:2,overflowY:"auto",top:i?-i:"100%",left:a||void 0})),(({centerY:e,centerX:t})=>({top:e?"50%":void 0,left:t?"50%":void 0,transform:`translate(${t?"-50%":0}, ${e?"-50%":0})`})),(({optionsPosition:e})=>{const{direction:t,amount:n}=e;return t&&n?{left:"left"===t?-n:void 0,right:"right"===t?-n:void 0,top:"top"===t?-n:void 0}:{}})),Do=Oe.div({border:"none",padding:"5px 16px",display:"flex",alignItems:"center",userSelect:"none"},(({theme:{optionItem:e},accented:t,selected:n,noSelect:r=!1})=>({color:t?e.color.accent:e.color.inactive,cursor:r?"inherit":"pointer",backgroundColor:!r&&n?e.background.active:e.background.inactive,"&:hover":{backgroundColor:r?e.background.inactive:e.background.active},"&:focus":{outline:"none",backgroundColor:e.background.active}})),(({color:e})=>({color:e})),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e}))),No=(e,t)=>{if(!e)return[];const{search:n,filter:r,inputText:o}=t;return n&&r&&o?e.filter((e=>{const t=e=>{if(!e)return!1;const t=o.toLowerCase();return e.toString().toLowerCase().includes(t)};let n=t(e.label);return!n&&"id"in e&&(n=t(e.id)),n||!("value"in e)||"string"!=typeof e.value&&"number"!=typeof e.value||(n=t(e.value)),!n&&"body"in e&&(n=t(e.body)),!n&&"header"in e&&(n=t(e.header)),n})):e},Io=(n,r,o,i,a)=>{const{selected:s}=a,c=((n,r,o,i)=>{if(n&&n.length>0)return No(n,i).map((n=>{const i=n.onClick?e=>{n.onClick&&n.onClick(e),o()}:e=>r(n,e);return t(Po.Item,Object.assign({id:n.id,onClick:i},{children:[n.leftElement||null,n.header&&n.body?t("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[e(Ro,{children:n.header}),e(Lo,{children:n.body})]})):n.label,n.rightElement&&e("div",Object.assign({style:{marginLeft:"auto"}},{children:n.rightElement}))]}),n.id)}));return[]})(n,o,i,M(a,["selected"])),u=((e,t,n)=>e?po(e).map((e=>e?h(e,{setValue:t,close:n}):null)):[])(r,o,i),l=[...c,...u];return po(l).map(((e,t)=>e?h(e,{selected:s===t}):null))},Ro=Oe.div((({theme:e})=>({fontSize:e.font.size.md,color:e.scale10}))),Lo=Oe.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6}))),Bo=e=>p.toArray(e).filter((e=>"string"==typeof e)).join("").trim(),Fo=n=>{var{onChange:r,onTextChange:o,afterShow:i,afterHide:a,onFocus:s,onBlur:c,onError:u,placeholder:l,placeholderColor:f,value:p,options:d,children:h,borderless:m,borderColor:b,backgroundColor:w,hideIcon:x,clearOnSelect:_,textOnly:O,width:C,height:S,isLoading:k,margin:A,marginTop:j,marginBottom:T,marginRight:P,marginLeft:D,label:N,id:I,name:R,trigger:L,centerY:B,centerX:F,offsetY:z,offsetX:H,direction:V,fontSize:U,description:K,disabled:$,invalid:W,search:q,filter:G,restrictInput:Z,inputRef:Y,optionsParent:X}=n,J=M(n,["onChange","onTextChange","afterShow","afterHide","onFocus","onBlur","onError","placeholder","placeholderColor","value","options","children","borderless","borderColor","backgroundColor","hideIcon","clearOnSelect","textOnly","width","height","isLoading","margin","marginTop","marginBottom","marginRight","marginLeft","label","id","name","trigger","centerY","centerX","offsetY","offsetX","direction","fontSize","description","disabled","invalid","search","filter","restrictInput","inputRef","optionsParent"]);const[Q,ee]=v(""),[te,ne]=v(""),[re,oe]=v(!1),[ie,ae]=v(!1),[se,ce]=v(!1),ue=g(null),{input:le}=E(),fe={margin:A,marginTop:j,marginBottom:T,marginRight:P,marginLeft:D},pe=e=>{e&&e.stopPropagation(),!re&&i&&i(),re&&a&&a(),oe((e=>!e))};y((()=>{var e;if(re&&q){null===(e=(Y||ue).current)||void 0===e||e.focus()}}),[re,q]),y((()=>{u&&u(se)}),[se]),y((()=>{o&&o(te)}),[te]);const de=Mt(pe,re,X?[X,`${X} *`]:void 0),he=(e,t)=>{if(void 0===e)return!1;return e.toString().toLowerCase()===t.toLowerCase()},ge=e=>{const t=be().find((t=>{let n=he(t.label,e);return!n&&"id"in t&&(n=he(t.id,e)),n||!("value"in t)||"string"!=typeof t.value&&"number"!=typeof t.value||(n=he(t.value,e)),n}));return t},ye=e=>"function"==typeof Z?!Z(e):Z,ve=e=>me(null,e),me=(e,t)=>{let n,o=!1;if("string"==typeof e){n=(e=>{if(ye(e))return ge(e)||null;return{id:to(),label:e,value:e}})(e);const t=ye(e);null===n&&t&&(o=!0)}else n=e;re&&pe(t),ee((null==n?void 0:n.label)||""),r&&void 0!==n&&r(n),o?ce(!0):(se&&ce(!1),_&&ee(""),ne(""))};y((()=>{""===p&&ve()}),[p]);const be=()=>{const e=po(h).map((e=>{const t=e;let n=t.props.displayText||"";return!N&&t.props.children&&(n=Bo(t.props.children)),{id:t.props.id,label:n,onClick:t.props.onClick}}));return[...No(d||[],{search:q,filter:G,inputText:te}),...e]},we={options:be(),select:me,open:pe,close:pe,searchText:q?te:void 0,isOpen:re,isFocused:ie},[xe,_e]=Lt(we),Oe=Io(d||[],h,me,pe,{selected:xe,search:q,filter:G,inputText:te}),Ce=re?"caret-up":"caret-down",Se=O&&!$?f||le.color.default:void 0,ke=M(J,["onClear","phone"]);return e(zo,Object.assign({textOnly:O,altTrigger:!!L,width:C,height:S,focused:ie,search:q},fe,{children:t(Ho,Object.assign({ref:de},{children:[L?e(Vo,Object.assign({id:I,onClick:pe,tabIndex:0,onFocus:()=>ae(!0),onBlur:()=>ae(!1)},{children:L})):e(Ko,Object.assign({shake:se},{children:e(ko,Object.assign({},ke,{ref:Y||ue,id:I,name:R,label:N,fontSize:U,pointer:!0,preventFocus:!q,value:te||p||Q,placeholder:l||"Select",placeholderColor:Se,iconRight:x||k?void 0:Ce,borderless:m,borderColor:b,backgroundColor:w,isLoading:k,textOnly:O,description:K,disabled:$,invalid:se||W,onClick:pe,onChange:e=>{var t;const{value:n}=e.target,r=null===(t=(Y||ue).current)||void 0===t?void 0:t.hasFocus;q?(ne(n),!re&&r&&oe(!0),se&&ce(!1)):n||ve(e);const o=ge(n),i=ye(n),a=""===n||i&&!r;o&&!(q&&(!i||r))?me(o,e):q&&!a||ve(e)},onFocus:e=>{ae(!0),s&&s(e)},onBlur:e=>{var t;if(ae(!1),c&&c(e),q&&te&&e){const{relatedTarget:n}=e;(null===(t=null==_e?void 0:_e.current)||void 0===t?void 0:t.contains(n))||me(te,e)}}}))})),re&&Oe.length>0&&e(Po,Object.assign({containerRef:_e,parentSelector:X,width:!L&&!O||X?"100%":void 0,centerY:B,centerX:F,offsetY:z,offsetX:H,direction:V},{children:Oe}))]}))}))};Fo.Item=({value:t,displayText:n,setValue:r,close:o,children:i,contentPosition:a,color:s,accented:c,onClick:u,id:l})=>{const f=u?e=>{u&&u(e),o&&o()}:e=>{const o={id:l,label:n||Bo(i)||"",value:t};r&&r(o,e)};return e(Po.Item,Object.assign({id:l,contentPosition:a,color:s,onClick:f,accented:c},{children:i}))};const zo=Oe.div({display:"flex",boxSizing:"border-box"},(({theme:{accent:e},focused:t,search:n,altTrigger:r,textOnly:o})=>({width:r||o?"max-content":"100%",flexDirection:"column",outline:!t||n||r?void 0:`${e} solid 1px`})),Mn,Nn),Ho=Oe.div({position:"relative",width:"100%",height:"inherit"}),Vo=Oe.div((({theme:{accent:e}})=>({display:"flex",height:"inherit","&:focus-visible":{outline:`${e} solid 1px`}}))),Uo=k({"10%":{transform:"translate3d(-1px, 0, 0)"},"30%":{transform:"translate3d(2px, 0, 0)"},"50%":{transform:"translate3d(-2px, 0, 0)"},"70%":{transform:"translate3d(2px, 0, 0)"},"90%":{transform:"translate3d(-1px, 0, 0)"}}),Ko=Oe.div((({shake:e})=>({"& input":{animation:e?`${Uo} .5s linear`:void 0}}))),$o=t=>{var{children:n,disabled:r,outline:o,size:i,small:a,large:s,secondary:c,negative:u,positive:l,caution:f,collapse:d}=t,g=M(t,["children","disabled","outline","size","small","large","secondary","negative","positive","caution","collapse"]);if(n){const t=p.count(n);return e(Wo,Object.assign({},g,{children:p.map(n,((e,n)=>{let p;if(t>1&&(p=0===n?"right":n===t-1?"left":"middle"),e){let t=e;"trigger"in e.props&&(t=e.props.trigger);const n=t,g=a||n.props.small,y=s||n.props.large,v=i||n.props.size,m=r||n.props.disabled,b=o||n.props.outline,w=c||n.props.secondary,x=u||n.props.negative,_=l||n.props.positive,O=f||n.props.caution,C=d||n.props.collapse,S=h(t,{joined:p,size:v,small:g,large:y,disabled:m,outline:b,secondary:w,negative:x,positive:_,caution:O,collapse:C});return"trigger"in e.props?h(e,{trigger:S}):S}return null}))}))}return null},Wo=Oe.div((({width:e})=>({display:"inline-flex",width:e})),Nn),qo=({size:t})=>e(Go,Object.assign({className:"button-loader"},{children:e(go,{size:t})})),Go=Oe.div({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",display:"flex",justifyContent:"center",alignItems:"center"}),Zo=t=>{const{content:n,children:r,dropdown:o,options:i}=t,a=M(t,["content","children","dropdown","options"]),s=n||r;return o&&i?e(Xo,Object.assign({options:i},a,{children:s})):e(Yo,Object.assign({},a,{children:s}))};Zo.Group=$o;const Yo=n=>{var{children:r,onClick:o,icon:i,iconPosition:a,iconColor:s,joined:c,size:u,small:l,large:f,isLoading:p,collapse:d,backgroundColor:h,color:g,type:y,animation:v}=n,m=M(n,["children","onClick","icon","iconPosition","iconColor","joined","size","small","large","isLoading","collapse","backgroundColor","color","type","animation"]);const{button:b}=E(),w=i&&(!r||d),x="right"===a;let _=u||"medium";l?_="small":f&&(_="large");const O=b[_],{iconSize:C}=O,S=d&&i;return t(Jo,Object.assign({},m,{type:y||"button",size:_,iconOnly:w,iconRight:x,joined:c,onClick:o,isLoading:p,color:g,backgroundColor:h,animation:v},{children:[i?e(Ln,{size:C,name:i,marginRight:w||x?0:4,marginLeft:!w&&x?4:0,color:s,inheritColor:!s}):null,!S&&e("span",{children:r}),p&&e(qo,{size:C})]}))},Xo=n=>{var{children:r,options:o,onClick:i,afterShow:a,afterHide:s,secondary:c,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:m,isLoading:b,direction:w,collapse:x,width:_}=n,O=M(n,["children","options","onClick","afterShow","afterHide","secondary","negative","positive","caution","outline","size","small","large","disabled","isLoading","direction","collapse","width"]);const[C,S]=v(!1),k={secondary:c,negative:l,positive:f,caution:p,outline:d,size:h,small:g,large:y,disabled:m},E=u((()=>`button-dropdown-${to()}`),[]);return e(Qo,Object.assign({id:E},{children:t($o,Object.assign({width:x?void 0:_},{children:[e(Yo,Object.assign({},k,O,{width:_&&!x?"100%":void 0,collapse:x,isLoading:b,onClick:e=>{i&&i(e)}},{children:e(ei,{children:r})})),e(Fo,{options:o,direction:w,optionsParent:`#${E}`,afterShow:()=>{a&&a(),S(!0)},afterHide:()=>{s&&s(),S(!1)},trigger:e(Yo,Object.assign({},k,{icon:C?"caret-up":"caret-down",preventPointerEvents:b,tabIndex:-1}))})]}))}))},Jo=Oe.button((({theme:{accent:e,font:t,button:n},size:r="medium",joined:o,circle:i,iconOnly:a,iconRight:s,width:c,height:u,animation:l})=>{const f=i||a&&!o,p=n[r],d=c||"max-content",{height:h,font:g,padding:y,iconOnlyPadding:v}=p,m=u||h,b=a||f?v:y;return{display:"inline-flex",alignItems:"center",justifyContent:"center",flexDirection:s?"row-reverse":"row",fontSize:g,width:f?m:d,height:m,fontFamily:t.family.default,fontWeight:t.weight.bold,borderRadius:f?"50%":30,cursor:"pointer",outline:"none",padding:`0px ${b}px`,position:"relative",animation:l,"&:focus-visible":{outline:`${e} solid 1px`}}}),(({theme:e,joined:t,iconOnly:n,outline:r,negative:o,positive:i,caution:a,secondary:s,disabled:c,subtle:u,link:l})=>{const{button:f,size:p}=e;let d=f.primary;u?d=f.subtle:l?d=f.link:c?d=f.disabled:o?d=f.negative:i?d=f.positive:a?d=f.caution:s&&(d=f.secondary);const h=r?d.outlineBackground:d.background;let g=r?d.outlineColor:d.color;if(l||u){let e=f.subtle;l&&(e=f.link),c?g=f.disabled.color:o?g=e.negativeColor:i?g=e.positiveColor:a?g=e.cautionColor:s&&(g=e.secondaryColor)}const y="left"===t||"middle"===t,v="right"===t||"middle"===t,m=n?p.xs:p.sm;return{backgroundColor:h.default,color:g.default,border:r&&!l?"1px solid":"none",borderColor:d.border.default,"&:hover":{backgroundColor:h.hover,color:g.hover,borderColor:r&&!c?d.border.hover:void 0},"&:active":{backgroundColor:h.active,color:g.active,borderColor:r&&!c?d.border.active:void 0},"&:disabled":{backgroundColor:u?"transparent":void 0,cursor:"not-allowed"},borderTopLeftRadius:y?0:void 0,borderBottomLeftRadius:y?0:void 0,borderTopRightRadius:v?0:void 0,borderBottomRightRadius:v?0:void 0,paddingLeft:y?m:void 0,paddingRight:v?m:void 0,borderRight:v?`1px solid ${r?d.border.default:d.divider}`:void 0,borderLeft:y?"none":void 0}}),(({link:e})=>({height:e?"max-content":void 0,width:e?"max-content":void 0,padding:e?0:void 0})),(({isLoading:e,preventPointerEvents:t})=>({pointerEvents:e||t?"none":void 0,"& > *":{visibility:e?"hidden":void 0},"& > .button-loader":{visibility:e?"visible":void 0}})),(({theme:{name:e},backgroundColor:t,color:n,disabled:r})=>{const o="dark"===e?Mr:Nr,i="dark"===e?Nr:Mr;return r||!n&&!t?{}:{backgroundColor:t,color:n,"&:hover":{backgroundColor:t?o(.05,t):void 0,color:n?i(.05,n):void 0},"&:active":{backgroundColor:t?o(.1,t):void 0,color:n?i(.1,n):void 0}}}),Nn),Qo=Oe.div({display:"inline-flex",flexDirection:"column",position:"relative"}),ei=Oe.div({marginRight:8}),ti=t=>{var{value:n,max:r=100,step:o=1,width:i,height:a,disabled:s,onChange:c}=t,u=M(t,["value","max","step","width","height","disabled","onChange"]);return e(ri,Object.assign({},u,{type:"range",max:r,value:n,percent:n/r*100,onChange:e=>{const{value:t}=e.target;c&&c(+t)},step:o,width:i,height:a,disabled:s,readOnly:!c}))},ni=(e,t)=>({appearance:"none",backgroundColor:t?"transparent":e.color.brand,height:e.size.sm,width:e.size.sm,border:"none",borderRadius:"50%"}),ri=Oe.input((({theme:e,percent:t,width:n,height:r,disabled:o,readOnly:i})=>{const a=o?e.scale0:e.scale1,s=o?e.scale1:e.color.brand;return{appearance:"none",display:"block",width:n||"100%",height:r||2,borderRadius:24,outline:"none",background:`linear-gradient(to right, ${s} 0%, ${s} ${t}%, ${a} ${t}%, ${a} 100%)`,"&::-webkit-slider-thumb":ni(e,o||i),"&::-moz-range-thumb":ni(e,o||i),"&:focus-visible":{outline:o||i?"none":`${e.accent} solid 1px`}}}),Nn),oi=f(((n,r)=>{var{src:o,title:i,width:a,infoPosition:s,centerAlignContent:c,small:u,collapsed:l,hideSliderOnStop:f,hideTimeOnStop:p,fontSizeTitle:d,fontSizeTime:h,onPlay:m,onPause:b,onStop:x}=n,_=M(n,["src","title","width","infoPosition","centerAlignContent","small","collapsed","hideSliderOnStop","hideTimeOnStop","fontSizeTitle","fontSizeTime","onPlay","onPause","onStop"]);const[O,C]=v(!1),[S,k]=v(!0),[E,A]=v(0),[j,T]=v(0),[P,D]=v(""),[N,I]=v(""),R=g(null),L=()=>{const{current:e}=R;e&&e.play().catch((()=>{throw Error("Video failed to play")}))},B=()=>{const{current:e}=R;e&&e.pause()},F=()=>{const{current:e}=R;e&&e.load()};w(r,(()=>({play:L,pause:B,stop:F})),[R,O]);const z=e=>{C(!1),k(!0),x&&x(e)};y((()=>{(()=>{const{current:e}=R;!!e&&e.paused})()}),[O]);const H=e=>{const t=(e/100).toFixed(2),[n,r]=t.split(".");return`${n}:${r}`},V=S&&f,U=S&&p;return t(ii,Object.assign({width:a},_,{children:[e(Zo,{outline:!0,small:u,icon:O?"pause":"play",onClick:()=>{O?B():L()},marginRight:8}),!l&&t(ai,Object.assign({alignDataTop:"top"===s},{children:[!V&&e(ti,{value:E,max:j,step:.1,onChange:e=>{(null==R?void 0:R.current)&&(R.current.currentTime=e)}}),t(si,Object.assign({alignTop:"top"===s,noSlider:V,relative:c||V},{children:[i?e(ci,Object.assign({fontSize:d},{children:i})):e("div",{}),!U&&t(ci,Object.assign({secondary:!0,fontSize:h},{children:[P&&!S?`${P} / `:"",N]}))]}))]})),t("audio",Object.assign({ref:R,onPlay:e=>{C(!0),k(!1),m&&m(e)},onPause:e=>{C(!1),b&&b(e)},onEmptied:z,onEnded:z,onTimeUpdate:()=>{const{current:e}=R;if(e){const{currentTime:t}=e,n=H(t);A(t),D(n)}},onDurationChange:()=>{const{current:e}=R;if(e){const{duration:t}=e,n=H(t);T(t),I(n)}}},{children:[e("track",{kind:"captions"}),e("source",{src:o})]}))]}))})),ii=Oe.div((({width:e=250})=>({display:"flex",alignItems:"center",width:e})),Nn),ai=Oe.div((({alignDataTop:e})=>({display:"flex",flexDirection:e?"column-reverse":"column",position:"relative",width:"100%"}))),si=Oe.div((({alignTop:e,noSlider:t,relative:n})=>({position:n?"relative":"absolute",top:e||t?void 0:6,bottom:e&&!t?6:void 0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",width:"100%"}))),ci=Oe.div((({theme:e,secondary:t,fontSize:n})=>({color:t?e.scale6:e.scale10,fontSize:n||10})));var ui={};
|
|
25
25
|
/*!
|
|
26
26
|
Copyright (c) 2018 Jed Watson.
|
|
27
27
|
Licensed under the MIT License (MIT), see
|