@devlander/styled-components-theme
Version:
Devlander's team utilizes this package during the development of their React Native projects. Its primary purpose is to facilitate code reuse by sharing types across multiple projects that uses the styled-components library.
1 lines • 109 kB
JavaScript
import e from"react";import{Platform as r,Dimensions as o,StatusBar as t}from"react-native";var a=function(e,r){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(e,r)};function n(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}a(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}var i,l,c=function(){return c=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var a in r=arguments[o])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},c.apply(this,arguments)};function s(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a<t.length;a++)r.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(o[t[a]]=e[t[a]])}return o}function u(e,r,o){if(o||2===arguments.length)for(var t,a=0,n=r.length;a<n;a++)!t&&a in r||(t||(t=Array.prototype.slice.call(r,0,a)),t[a]=r[a]);return e.concat(t||Array.prototype.slice.call(r))}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}"function"==typeof SuppressedError&&SuppressedError,function(e){e.NONE="",e.K="K",e.M="M",e.B="B",e.T="T",e.P="P",e.E="E"}(i||(i={})),function(e){e["4:3"]="4:3",e["16:9"]="16:9",e["1:1"]="1:1",e["3:2"]="3:2",e["8:5"]="8:5"}(l||(l={}));var h,p=(h=Object.create(null),function(e){var r=toString.call(e);return h[r]||(h[r]=r.slice(8,-1).toLowerCase())}),g=function(e){return e=e.toLowerCase(),function(r){return p(r)===e}};g("ArrayBuffer"),g("Date"),g("File");var b,m,f={blue:"[34m",green:"[32m",red:"[31m",yellow:"[33m",magenta:"[35m",bgBlue:"[44m",bgGreen:"[42m",bgRed:"[41m",reset:"[0m"},y=function(e,r,o){var t=f[e]||f.reset;console.log("".concat(t,"%s").concat(f.reset),r)},w=function(e,r,o){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bgBlue",a="object"===d(r)?JSON.stringify(r,null,2):String(r),n="Function: ".concat(e," ").concat(o?"- ".concat(o):""," | Variables: ").concat(a);y(t,n)},v=function(){console.log("\n==============================================\n")},k=function(e,r){v();var o=r?" (".concat(r,")"):"";y("blue","==== START: ".concat(e).concat(o," ====")),v()},F=function(e,r){v();y("blue","==== END: ".concat(e).concat(""," ====")),v()},x=require("color"),C=["transparent"],S=function(){return"undefined"!=typeof console&&console.log},P=function(e){S()&&console.log(e)},B=function(e){if(C.includes(e))return!0;try{var r=x(e);return Boolean(r)}catch(e){return!1}},A=function(e,r,o,t,a){void 0===t&&(t=C),void 0===a&&(a=!1);var n=a;if(n&&(k("adjustColor","adjust-color"),w("adjustColor",{colorValue:e,alphaValue:r,mode:o,cssColorNames:t},"1. - Initial parameters"),v()),t.includes(e))return e;var i="string"==typeof r?parseFloat(r):r;if(isNaN(i)||i<0||i>100)return P("Alpha value should be between 0 and 100. Returning default color."),"#FF0000";if(!B(e))return P("Failed to convert ".concat(e," into a color. Returning default color.")),"#FF0000";try{var l=x(e);n&&(w("adjustColor",l.hex(),"2. - Color converted using color package"),v()),"light"===o?(l=l.lighten(.2),n&&(w("adjustColor",l.hex(),"3. - Color lightened"),v())):"dark"===o&&(l=l.darken(.2),n&&(w("adjustColor",l.hex(),"4. - Color darkened"),v()));var c=i/100;return 1===l.alpha(c).alpha()?l.hex():l.rgb().string()}catch(r){return P("Error adjusting color with value: ".concat(e,". Returning default color.")),"#FF0000"}},T=function(e,r){var o="string"==typeof e?parseInt(e,10):e;if(isNaN(o))throw new Error("Invalid fontSize provided, it must be a number or a numeric string");return Math.min(o,r)},H=function(e){return"0px -1px 10px ".concat(e)};!function(e){e.PX="px"}(b||(b={})),function(e){e.PX="px",e.EM="em",e.REM="rem",e.VH="vh",e.VW="vw",e.VMIN="vmin",e.VMAX="vmax",e.PERCENT="%"}(m||(m={}));var O,D=function(e,r){if(r||(r=m.PX),e&&"auto"===e)return e;e&&void 0!==e&&0!==e&&void 0!==e||(e="0px");var o=!(!e||!e.toString().includes("%"))&&e.toString().includes("%");return e&&"number"==typeof e&&(e=o?e.toString():"".concat(e).concat(r)),e.toString()},E=function(e,r,o,t,a,n){void 0===t&&(t="primaryTextColor"),void 0===a&&(a="whiteAlpha100");var i,l=n&&"boolean"==typeof n&&!0===n;return l&&(k("getStyleForGhostPropsForNative","get-style-for-ghost-props.native"),w("getStyleForGhostPropsForNative",{ghost:e,disabled:r,colorOne:t,colorTwo:a},"1. - Initial parameters"),v()),i=!0===r&&!0===e?o.colorThemeHandler("blackAlpha40",.5,o):!1===r&&!1===e?o.colorThemeHandler(t,1,o):!0===e?o.colorThemeHandler(a,1,o):r?o.colorThemeHandler("blackAlpha40",.5,o):o.colorThemeHandler(t,1,o),l&&(w("getStyleForGhostPropsForNative",i,"2. - Final color determined"),v(),F("getStyleForGhostPropsForNative")),i},q=function(e,r,o,t,a,n,i){var l=i&&"boolean"==typeof i&&!0===i;if(l&&(k("getBorderRadius","border-radius-calculation"),w("getBorderRadius",{themeDefined:!!e,borderRadius:r,borderTopLeftRadius:o,borderTopRightRadius:t,borderBottomRightRadius:a,borderBottomLeftRadius:n},"Initial inputs"),v()),!e||!e.unitPropsHandler)return l&&(w("getBorderRadius",'Theme or unitPropsHandler not defined, returning default "0px 0px 0px 0px".',"Error"),F("getBorderRadius")),"border-radius: 0px 0px 0px 0px;";var c="border-radius: ".concat(void 0!==o?e.unitPropsHandler(o):void 0!==r?e.unitPropsHandler(r):"0px"," ").concat(void 0!==t?e.unitPropsHandler(t):void 0!==r?e.unitPropsHandler(r):"0px"," ").concat(void 0!==a?e.unitPropsHandler(a):void 0!==r?e.unitPropsHandler(r):"0px"," ").concat(void 0!==n?e.unitPropsHandler(n):void 0!==r?e.unitPropsHandler(r):"0px",";");return l&&(w("getBorderRadius",c,"Final computed border-radius"),v(),F("getBorderRadius")),c},R=function(e){var r=e.backgroundColorFromTheme,o=e.maxWidth,t=e.borderBottomRightRadius,a=e.borderColorFromTheme,n=e.borderTopRightRadius,i=e.maxHeight,l=e.height,c=e.theme,s=e.width,u=e.borderRadius,d=e.borderWidth,h=e.borderBottomLeftRadius,p=e.borderTopLeftRadius,g=e.debug;return"\n ".concat(r?"background-color: ".concat(c.colorThemeHandler(r,1,c),";"):"","\n\n ").concat(a?"border-color: ".concat(c.colorThemeHandler(a,1,c),";"):"","\n ").concat(d?"border-width: ".concat(c.unitPropsHandler(d),";"):"","\n\n ").concat(s?"width: ".concat(c.unitPropsHandler(s),";"):"","\n ").concat(l?"height: ".concat(c.unitPropsHandler(l),";"):"","\n ").concat(o?"max-width: ".concat(c.unitPropsHandler(o),";"):"","\n ").concat(i?"max-height: ".concat(c.unitPropsHandler(i),";"):"","\n\n ").concat(q(c,u,p,n,t,h,g),"\n\n ").trim()};!function(e){e.Font1="Font1",e.Font2="Font2",e.Font3="Font3",e.CondensedFont="CondensedFont"}(O||(O={}));var j=function(e){var o,t,a,n,i,l=e.theme,c=e.fontSize,u=e.maxFontSize,d=e.textColorFromTheme,h=e.fontType,p=e.fontTypeWeight,g=e.debug,b=e.fontWeight,m=e.color,f=s(e,["theme","fontSize","maxFontSize","textColorFromTheme","fontType","fontTypeWeight","debug","fontWeight","color"]),y=g&&"boolean"==typeof g&&!0===g;y&&(k("getStyleForTextPropsForNative","get-style-for-text-props.native"),w("getStyleForTextPropsForNative",{props:e},"1. - Initial props"),v());var x=null!==(o=null==l?void 0:l.unitPropsHandler)&&void 0!==o?o:null,C=null!==(t=null==l?void 0:l.colorThemeHandler)&&void 0!==t?t:null,S=null!==(a=null==l?void 0:l.fontSizePropsHandler)&&void 0!==a?a:null,P=null!==(n=null==l?void 0:l.fontThemeHandler)&&void 0!==n?n:null,B=null!==(i=null==l?void 0:l.fontSizeCap)&&void 0!==i?i:T,A=[c&&void 0===u?"font-size: ".concat(S(c),";"):c&&u?"font-size: ".concat(S(B(c,u)),";"):""],H=[c&&void 0===u?"font-size: ".concat(S(c),";"):c&&u?"font-size: ".concat(S(B(c,u)),";"):""],D=h&&p&&P?"font-family: ".concat(P(h,p,l),";"):P?"font-family: ".concat(P(O.Font1,"bold",l),";"):"",E=[f.shadowColor?"text-shadow-color: ".concat(String(f.shadowColor),";"):"",D,"color: ".concat(m||(d&&C?C(d,1,l):f.onDark?l.colors.whiteAlpha100:f.highlight?l.colors.accent:d&&"function"==typeof C?l.colorThemeHandler(d,1,l):f.destructive?l.colors.error:l.colors.blackAlpha100),";"),f.textDecorationLine&&"none"!==f.textDecorationLine?"text-decoration-line: ".concat(f.textDecorationLine,";"):"",f.flex?"flex: ".concat(f.flex,";"):"",b?"font-weight: ".concat(b,";"):"",f.paddingLeft?"padding-left: ".concat(x(f.paddingLeft),";"):"",f.paddingTop?"padding-top: ".concat(x(f.paddingTop),";"):"",f.fontStyle?"font-style: ".concat(f.fontStyle,";"):"",f.paddingRight?"padding-right: ".concat(x(f.paddingRight),";"):"",f.lineHeight?"line-height: ".concat(x(f.lineHeight),";"):c?"line-height: ".concat(x(c+6),";"):"",f.width?"width: ".concat(x(f.width),";"):"",f.textAlign?"text-align: ".concat(f.textAlign,";"):"",f.marginTop?"margin-top: ".concat(x(f.marginTop),";"):"",f.marginBottom?"margin-bottom: ".concat(x(f.marginBottom),";"):"",f.opacity?"opacity: ".concat(f.opacity,";"):"",f.marginLeft?"margin-left: ".concat(x(f.marginLeft),";"):"",f.marginRight?"margin-right: ".concat(x(f.marginRight),";"):"",f.shadowOpacity?"text-shadow-opacity: ".concat(f.shadowOpacity,";"):"",f.shadowOffsetX||f.shadowOffsetY?"text-shadow-offset: ".concat(x(f.shadowOffsetX||0)," ").concat(x(f.shadowOffsetY||0),";"):"",f.shadowRadius?"text-shadow-radius: ".concat(x(f.shadowRadius),";"):"",f.textTransform?"text-transform: ".concat(f.textTransform,";"):""];r&&"web"===r.OS?E.push.apply(E,H):E.push.apply(E,A);var q=E.filter(Boolean).join("\n");return y&&(w("getStyleForTextPropsForNative",{cssProperties:E},"2. - CSS properties"),v(),w("getStyleForTextPropsForNative",q,"3. - Final CSS before return"),v(),F("getStyleForTextPropsForNative")),q};function N(e){return e.sort()}var M=function(e){var r=e.borderBottomWidth,o=e.maxWidth,t=e.borderColorFromTheme,a=e.borderRadius,n=e.paddingBottom,i=e.alignItems,l=e.justifyContent,c=e.padding,s=e.theme,u=e.marginTop,d=e.backgroundColor,h=e.width,p=e.backgroundColorFromTheme,g=e.marginBottom,b=e.marginLeft,m=e.marginRight,f=e.paddingLeft,y=e.paddingRight,x=e.flex,C=e.paddingTop,S=e.alignSelf,P=e.borderColor,B=e.borderWidth,A=e.borderLeftWidth,T=e.borderRightWidth,H=e.borderTopWidth,O=e.opacity,D=e.overflow,E=e.shadowColor,q=e.shadowOffsetX,R=e.shadowOffsetY,j=e.shadowOpacity,M=e.shadowRadius,L=e.elevation,G=e.transform,W=e.debug,I=W&&"boolean"==typeof W&&!0===W;I&&(k("getStyleFromButtonPropsForNative","get-style-from-button-props.native"),w("getStyleFromButtonPropsForNative",{},"1. - Initial setup"),v());var z=[],V=s.colorThemeHandler;I&&(w("getStyleFromButtonPropsForNative",{css:z},"2. - Initial CSS array"),v()),d&&"string"==typeof d?z.push("background-color: ".concat(d,";")):p&&z.push("background-color: ".concat(V(p,1,s),";")),x&&z.push("flex: ".concat(x,";")),f&&z.push("padding-left: ".concat(s.unitPropsHandler(f),";")),h&&z.push("width: ".concat(s.unitPropsHandler(h),";")),n&&z.push("padding-bottom: ".concat(s.unitPropsHandler(n),";")),C&&z.push("padding-top: ".concat(s.unitPropsHandler(C),";")),y&&z.push("padding-right: ".concat(s.unitPropsHandler(y),";")),o&&z.push("max-width: ".concat(s.unitPropsHandler(o),";")),u&&z.push("margin-top: ".concat(s.unitPropsHandler(u),";")),g&&z.push("margin-bottom: ".concat(s.unitPropsHandler(g),";")),b&&z.push("margin-left: ".concat(s.unitPropsHandler(b),";")),m&&z.push("margin-right: ".concat(s.unitPropsHandler(m),";")),S&&z.push("align-self: ".concat(S,";")),c&&z.push("padding: ".concat(s.unitPropsHandler(c),";")),l&&z.push("justify-content: ".concat(l,";")),i&&z.push("align-items: ".concat(i,";")),a&&z.push("border-radius: ".concat(s.unitPropsHandler(a),";")),r&&z.push("border-bottom-width: ".concat(s.unitPropsHandler(r),";"));var _=(P&&"string"==typeof P?P:"")||(t&&V?V(t,1,s):"");P&&z.push("border-color: ".concat(_,";")),B&&z.push("border-width: ".concat(s.unitPropsHandler(B),"px;")),A&&z.push("border-left-width: ".concat(s.unitPropsHandler(A),"px;")),T&&z.push("border-right-width: ".concat(s.unitPropsHandler(T),"px;")),H&&z.push("border-top-width: ".concat(s.unitPropsHandler(H),"px;")),O&&z.push("opacity: ".concat(O,";")),D&&z.push("overflow: ".concat(D,";")),E&&z.push("shadow-color: ".concat(E,";")),q&&z.push("shadow-offset-x: ".concat(s.unitPropsHandler(q),"px;")),R&&z.push("shadow-offset-y: ".concat(s.unitPropsHandler(R),"px;")),j&&z.push("shadow-opacity: ".concat(j,";")),M&&z.push("shadow-radius: ".concat(s.unitPropsHandler(M),"px;")),L&&z.push("elevation: ".concat(L,";")),G&&z.push("transform: ".concat(G,";")),I&&(w("getStyleFromButtonPropsForNative",{css:z},"3. - CSS array before sorting"),v());var Y=N(z);I&&(w("getStyleFromButtonPropsForNative",{sortedProperties:Y},"4. - Sorted CSS array"),v());var X=Y.join(" ");return I&&(w("getStyleFromButtonPropsForNative",X,"5. - Final CSS before return"),v(),F("getStyleFromButtonPropsForNative")),X};function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}var G=function(e){return"string"==typeof e?"shadow-color: ".concat(e,";"):"symbol"===L(e)?"shadow-color: ".concat(String(e),";"):""},W=function(e){var r=e.backgroundColor,o=e.backgroundColorFromTheme,t=e.borderColorFromTheme,a=e.borderBottomWidth,n=e.borderTopWidth,i=e.borderLeftWidth,l=e.borderRightWidth,c=e.borderRadius,s=e.borderWidth,u=e.elevation,d=e.flex,h=e.flexDirection,p=e.height,g=e.marginLeft,b=e.marginRight,m=e.marginTop,f=e.marginBottom,y=e.margin,x=e.maxHeight,C=e.maxWidth,S=e.theme,P=e.minHeight,B=e.opacity,A=e.padding,T=e.paddingLeft,H=e.paddingTop,O=e.paddingRight,D=e.debug,E=e.style,q=void 0===E?{}:E,R=e.width,j=D&&"boolean"==typeof D&&!0===D;j&&(k("getStyleFromPropsNative","get-style-from-props.native"),w("getStyleFromPropsNative",q,"1. - Initial style object"),v());var M=null==q?void 0:q.zIndex,L=null==q?void 0:q.justifyContent,W=null==q?void 0:q.overflow,I=null==q?void 0:q.alignItems,z=null==q?void 0:q.transform,V=null==q?void 0:q.shadowColor,_=null==q?void 0:q.shadowOpacity,Y=null==q?void 0:q.shadowRadius,X=null==q?void 0:q.shadowOffsetX,$=null==q?void 0:q.shadowOffsetY,K=S.unitPropsHandler,U=S.colorThemeHandler,J=("string"==typeof r?r:"")||(o&&U?U(o,1,S):""),Q=V?G(V):"",Z=[M?"z-index: ".concat(M,";"):"",I?"align-items: ".concat(I,";"):"",J&&"background: ".concat(J,";"),c?"border-radius: ".concat(K(c),";"):"",a?"border-bottom-width: ".concat(K(a),";"):"",n?"border-top-width: ".concat(K(n),";"):"",i?"border-left-width: ".concat(K(i),";"):"",l?"border-right-width: ".concat(K(l),";"):"",t?"border-color: ".concat(U(t,1,S),";"):"",s?"border-width: ".concat(K(s),";"):"",u?"elevation: ".concat(u,";"):"",d?"flex: ".concat(d,";"):"",h?"flex-direction: ".concat(h,";"):"",p?"height: ".concat(K(p),";"):"",L?"justify-content: ".concat(L,";"):"",g?"margin-left: ".concat(K(g),";"):"",b?"margin-right: ".concat(K(b),";"):"",m?"margin-top: ".concat(K(m),";"):"",f?"margin-bottom: ".concat(K(f),";"):"",y?"margin: ".concat(K(y),";"):"",x?"max-height: ".concat(K(x),";"):"",C?"max-width: ".concat(K(C),";"):"",P?"min-height: ".concat(K(P),";"):"",B?"opacity: ".concat(B,";"):"",W?"overflow: ".concat(W,";"):"",A?"padding: ".concat(K(A),";"):"",T?"padding-left: ".concat(K(T),";"):"",H?"padding-top: ".concat(K(H),";"):"",O?"padding-right: ".concat(K(O),";"):"",Q,X?"shadow-offset-x: ".concat(K(X),";"):"",$?"shadow-offset-y: ".concat(K($),";"):"",_?"shadow-opacity: ".concat(_,";"):"",Y?"shadow-radius: ".concat(K(Y),";"):"",z?"transform: ".concat(z,";"):"",R?"width: ".concat(K(R),";"):""];j&&(w("getStyleFromPropsNative",{properties:Z},"2. - Properties before sorting"),v());var ee=N(Z).join("\n");return j&&(w("getStyleFromPropsNative",ee,"3. - Final CSS output"),v(),F("getStyleFromPropsNative")),ee};function I(e,r){(null==r||r>e.length)&&(r=e.length);for(var o=0,t=Array(r);o<r;o++)t[o]=e[o];return t}function z(e,r,o){return(r=X(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function V(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,t)}return o}function _(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?V(Object(o),!0).forEach((function(r){z(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function Y(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var t,a,n,i,l=[],c=!0,s=!1;try{if(n=(o=o.call(e)).next,0===r);else for(;!(c=(t=n.call(o)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,r)||function(e,r){if(e){if("string"==typeof e)return I(e,r);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?I(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e){var r=function(e){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof r?r:r+""}function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}var K=function(e,r){var o;o=r>1?r/100:r;var t=Math.min(Math.max(o,0),1);return _(_({},e),{},{a:t})},U=function(e,r){return"string"==typeof e&&/^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e)};function J(e){var r=e.r,o=e.g,t=e.b,a=e.a;return r<0||r>255||o<0||o>255||t<0||t>255||void 0!==a&&(a<0||a>1)}var Q,Z=function(e){try{var r=e.match(/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/);if(!r)return!1;var o=Y(r.map(Number),4);return!J({r:o[1],g:o[2],b:o[3]})}catch(r){return console.error("Error validating RGB string: ".concat(e),r),!1}},ee=function(e){try{var r=e.match(/^rgba?\(\s*((?:\d{1,3}%?\s*,\s*){2})(?:\d{1,3}%?\s*,\s*)\d{1,3}%?\s*(?:,\s*([+-]?\d*\.?\d+)\s*)?\)$/);if(!r)return!1;var o=function(e){var r=Number(e.replace("%",""));return e.includes("%")?2.55*r:r};return!J({r:o(r[1].trim()),g:o(r[2].trim()),b:o(r[3].trim()),a:void 0!==r[4]?Number(r[4]):void 0})}catch(r){return console.error("Error validating RGBA string: ".concat(e),r),!1}},re=function(e,r){var o=Math.abs(r)>1?r/100:r;return{r:Math.min(255,Math.max(0,Math.round(r<0?e.r*(1+r):e.r+o*(255-e.r)))),g:Math.min(255,Math.max(0,Math.round(r<0?e.g*(1+r):e.g+o*(255-e.g)))),b:Math.min(255,Math.max(0,Math.round(r<0?e.b*(1+r):e.b+o*(255-e.b))))}},oe=function(e,r){var o=Math.abs(r)>1?r/100:r;return{r:Math.max(0,Math.min(255,Math.round(r<0?e.r-o*(255-e.r):e.r*(1-o)))),g:Math.max(0,Math.min(255,Math.round(r<0?e.g-o*(255-e.g):e.g*(1-o)))),b:Math.max(0,Math.min(255,Math.round(r<0?e.b-o*(255-e.b):e.b*(1-o))))}},te=function(e){var r=function(e){return e.toString(16).padStart(2,"0")};return"#".concat(r(e.r)).concat(r(e.g)).concat(r(e.b)).toUpperCase()},ae=function(e){if(void 0!==e.a){var r=Math.round(10*e.a)/10;return"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(r,")")}return"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")},ne=function(e,r,o){var t;t=Math.abs(o)>1?o/100:o;var a=Math.min(Math.max(t,-1),1);return{r:Math.round(e.r*Math.abs(a)+r.r*(1-Math.abs(a))),g:Math.round(e.g*Math.abs(a)+r.g*(1-Math.abs(a))),b:Math.round(e.b*Math.abs(a)+r.b*(1-Math.abs(a)))}},ie=function(e){try{var r=null;if(Z(e)?r=/^rgb\(\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)$/.exec(e):ee(e)&&(r=/^rgba\(\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(0|1|0?\.\d+)\s*\)$/.exec(e)),r){var o=Y(r.slice(1).map((function(e){return e.endsWith("%")?(r=e,Math.round(2.55*parseFloat(r))):Number(e);var r})),4),t=o[0],a=o[1],n=o[2],i=o[3],l={r:t,g:a,b:n};return void 0!==i&&(l.a=Number(i)),l}return null}catch(e){return console.error("Error parsing RGB string:",e),null}};function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(le=function(){return!!e})()}function ce(e){var r=function(e){if("object"!=$(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=$(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$(r)?r:String(r)}function se(e){return se="function"==typeof Symbol&&"symbol"==$(Symbol.iterator)?function(e){return $(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":$(e)},se(e)}function ue(e){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ue(e)}function de(e,r){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},de(e,r)}function he(e){var r="function"==typeof Map?new Map:void 0;return he=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(r){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,o)}function o(){return function(e,r,o){if(le())return Reflect.construct.apply(null,arguments);var t=[null];t.push.apply(t,r);var a=new(e.bind.apply(e,t));return o&&de(a,o.prototype),a}(e,arguments,ue(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),de(o,e)},he(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(Q={}).NONE="",Q.K="K",Q.M="M",Q.B="B",Q.T="T",Q.P="P",Q.E="E",function(){function e(r,o,t){var a;return function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),a=function(e,r,o){return r=ue(r),function(e,r){if(r&&("object"==$(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}(e,le()?Reflect.construct(r,o,ue(e).constructor):r.apply(e,o))}(this,e,[r]),Error.captureStackTrace?Error.captureStackTrace(pe(a),a.constructor):a.stack=(new Error).stack,a.name="DevlanderError",o&&(a.code=o),t&&(a.config=t),Object.defineProperty(pe(a),"DevlanderError",{value:!0}),a}var r,o;(function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&de(e,r)})(e,he(Error)),r=e,o=[{key:"from",value:function(r,o,t,a){var n=Object.create(e.prototype);return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,t=arguments.length>3?arguments[3]:void 0,a={};if(null==e)return r;var n=e;do{for(var i=Object.getOwnPropertyNames(n),l=i.length-1;l>=0;l--){var c=i[l];t&&!t(c,e,r)||a[c]||(r[c]=n[c],a[c]=!0)}n=Object.getPrototypeOf(n)}while(n&&(!o||o(n))&&n!==Object.prototype)}(r,n,(function(e){return e!==Error.prototype}),(function(e){return"DevlanderError"!==e})),e.call(n,r.message,o,t),n.cause=r,n.name=r.name,a&&Object.assign(n,a),n}}],o&&function(e,r){for(var o=0;o<r.length;o++){var t=r[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,ce(t.key),t)}}(r,o),Object.defineProperty(r,"prototype",{writable:!1})}();var ge=function(e){return function(r){return se(r)===e}};!function(e){e["4:3"]="4:3",e["16:9"]="16:9",e["1:1"]="1:1",e["3:2"]="3:2",e["8:5"]="8:5"}({});var be,me=(be=Object.create(null),function(e){var r=toString.call(e);return be[r]||(be[r]=r.slice(8,-1).toLowerCase())}),fe=function(e){return e=e.toLowerCase(),function(r){return me(r)===e}};fe("ArrayBuffer"),fe("Date"),fe("File");var ye=ge("number"),we={exports:{}},ve=String,ke=function(){return{isColorSupported:!1,reset:ve,bold:ve,dim:ve,italic:ve,underline:ve,inverse:ve,hidden:ve,strikethrough:ve,black:ve,red:ve,green:ve,yellow:ve,blue:ve,magenta:ve,cyan:ve,white:ve,gray:ve,bgBlack:ve,bgRed:ve,bgGreen:ve,bgYellow:ve,bgBlue:ve,bgMagenta:ve,bgCyan:ve,bgWhite:ve}};we.exports=ke(),we.exports.createColors=ke,function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(we.exports);var Fe,xe=function(e){if(!e||"string"!=typeof e)throw new Error("Invalid hex color");var r=e.replace(/^#/,"");if(!function(e){return"string"==typeof e&&/^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e)}("#".concat(r)))throw new Error("Invalid hex color");var o=3===r.length||4===r.length,t=function(e){return e.repeat(2)};if(![3,4,6,8].includes(r.length))throw new Error("Invalid hex color length");return{r:o?t(r.slice(0,1)):e.slice(0,2),g:o?t(e.slice(1,2)):e.slice(2,4),b:o?t(e.slice(2,3)):e.slice(4,6),a:(o?t(e.slice(3,4)):e.slice(6,8))||"ff"}},Ce=function(e){return parseInt(e,16)},Se=function(e){return["r","g","b","a"].forEach((function(r){void 0!==e[r]&&isNaN(e[r])&&(e[r]=1)})),e},Pe=["transparent"],Be=function(e){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(e)},Ae=function(e,r,o){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Pe;try{if(t.includes(e))return e;if(r<0||r>100)return Be("Alpha value should be between 0.0 and 1.0. Returning default color."),"#FF0000";if(function(e){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:["transparent"]).includes(e)||U(e)||Z(e)||ee(e)}(e)){var a=null;if(U(e))a=function(e){var r=!function(e){return null!==e&&"object"===se(e)}(e)||function(e){return ge("string")(e)}(e)?xe(e):{r:e.r,g:e.g,b:e.b,a:"a"in e?e.a:"ff"},o=r.r,t=r.g,a=r.b,n=r.a,i={r:Ce(o),g:Ce(t),b:Ce(a)};return i.a=void 0!==n&&"ff"!==n?+(Ce(n)/255).toFixed(2):1,Se(i)}(xe(e));else if(Z(e))a=ie(e);else{if(!ee(e))throw new Error("Invalid color format");a=ie(e)}if(!a)throw new Error("Failed to parse color");var n="light"===o?.2:-.2;a="light"===o?re(a,n):oe(a,n);var i=r;if(U(e)){var l=ne(a,{r:255,g:255,b:255},i);return te(l)}var c=K(a,i);return ae(c)}return Be("Failed to convert ".concat(e," into a color. Returning default color.")),"#FF0000"}catch(r){return r instanceof Error?Be("Error adjusting color with value: ".concat(e,". Returning default color. Error: ").concat(r.message)):Be("Error adjusting color with value: ".concat(e,". Returning default color. Unknown error.")),"#FF0000"}};!function(e,r){(function(e,r){for(var o=0;o<r.length;o++){var t=r[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,X(t.key),t)}})(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1})}((function e(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"light";if(function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this.mode=o,"string"==typeof r){var t=r.replace("#","");this.color={r:Ce(t.substring(0,2)),g:Ce(t.substring(2,4)),b:Ce(t.substring(4,6))},8===t.length&&(this.color.a=+(Ce(t.substring(6,8))/255).toFixed(2))}else this.color=r}),[{key:"darken",value:function(e){return this.color=oe(this.color,e),this}},{key:"lighten",value:function(e){return this.color=re(this.color,e),this}},{key:"rgb",value:function(){return ae(this.color)}},{key:"hex",value:function(){return te(this.color)}},{key:"invert",value:function(){return this.mode="light"===this.mode?"dark":"light",Ae(this.hex(),1,this.mode)}},{key:"alpha",value:function(e){return this.color=K(this.color,e),this.color}},{key:"blend",value:function(e,r){return this.color=ne(this.color,r,e),this}},{key:"getColor",value:function(){return this.color}}]);var Te=function(e){return e.AliceBlue="aliceblue",e.AntiqueWhite="antiquewhite",e.Aqua="aqua",e.Aquamarine="aquamarine",e.Azure="azure",e.Beige="beige",e.Bisque="bisque",e.Black="black",e.BlanchedAlmond="blanchedalmond",e.Blue="blue",e.BlueViolet="blueviolet",e.Brown="brown",e.BurlyWood="burlywood",e.CadetBlue="cadetblue",e.Chartreuse="chartreuse",e.Chocolate="chocolate",e.Coral="coral",e.CornflowerBlue="cornflowerblue",e.Cornsilk="cornsilk",e.Crimson="crimson",e.Cyan="cyan",e.DarkBlue="darkblue",e.DarkCyan="darkcyan",e.DarkGoldenRod="darkgoldenrod",e.DarkGray="darkgray",e.DarkGreen="darkgreen",e.DarkGrey="darkgrey",e.DarkKhaki="darkkhaki",e.DarkMagenta="darkmagenta",e.DarkOliveGreen="darkolivegreen",e.DarkOrange="darkorange",e.DarkOrchid="darkorchid",e.DarkRed="darkred",e.DarkSalmon="darksalmon",e.DarkSeaGreen="darkseagreen",e.DarkSlateBlue="darkslateblue",e.DarkSlateGray="darkslategray",e.DarkTurquoise="darkturquoise",e.DarkViolet="darkviolet",e.DeepPink="deeppink",e.DeepSkyBlue="deepskyblue",e.DimGray="dimgray",e.DimGrey="dimgrey",e.DodgerBlue="dodgerblue",e.FireBrick="firebrick",e.FloralWhite="floralwhite",e.ForestGreen="forestgreen",e.Fuchsia="fuchsia",e.Gainsboro="gainsboro",e.GhostWhite="ghostwhite",e.Gold="gold",e.GoldenRod="goldenrod",e.Gray="gray",e.Green="green",e.GreenYellow="greenyellow",e.HoneyDew="honeydew",e.HotPink="hotpink",e.IndianRed="indianred",e.Indigo="indigo",e.Ivory="ivory",e.Khaki="khaki",e.Lavender="lavender",e.LavenderBlush="lavenderblush",e.LawnGreen="lawngreen",e.LemonChiffon="lemonchiffon",e.LightBlue="lightblue",e.LightCoral="lightcoral",e.LightCyan="lightcyan",e.LightGoldenRodYellow="lightgoldenrodyellow",e.LightGray="lightgray",e.LightGreen="lightgreen",e.LightGrey="lightgrey",e.LightPink="lightpink",e.LightSalmon="lightsalmon",e.LightSeaGreen="lightseagreen",e.LightSkyBlue="lightskyblue",e.LightSlateGray="lightslategray",e.LightSteelBlue="lightsteelblue",e.LightYellow="lightyellow",e.Lime="lime",e.LimeGreen="limegreen",e.Linen="linen",e.Magenta="magenta",e.Maroon="maroon",e.MediumAquaMarine="mediumaquamarine",e.MediumBlue="mediumblue",e.MediumOrchid="mediumorchid",e.MediumPurple="mediumpurple",e.MediumSeaGreen="mediumseagreen",e.MediumSlateBlue="mediumslateblue",e.MediumSpringGreen="mediumspringgreen",e.MediumTurquoise="mediumturquoise",e.MediumVioletRed="mediumvioletred",e.MidnightBlue="midnightblue",e.MintCream="mintcream",e.MistyRose="mistyrose",e.Moccasin="moccasin",e.NavajoWhite="navajowhite",e.Navy="navy",e.OldLace="oldlace",e.Olive="olive",e.OliveDrab="olivedrab",e.Orange="orange",e.OrangeRed="orangered",e.Orchid="orchid",e.PaleGoldenRod="palegoldenrod",e.PaleGreen="palegreen",e.PaleTurquoise="paleturquoise",e.PaleVioletRed="palevioletred",e.PapayaWhip="papayawhip",e.PeachPuff="peachpuff",e.Peru="peru",e.Pink="pink",e.Plum="plum",e.PowderBlue="powderblue",e.Purple="purple",e.RebeccaPurple="rebeccapurple",e.Red="red",e.RosyBrown="rosybrown",e.RoyalBlue="royalblue",e.SaddleBrown="saddlebrown",e.Salmon="salmon",e.SandyBrown="sandybrown",e.SeaGreen="seagreen",e.SeaShell="seashell",e.Sienna="sienna",e.Silver="silver",e.SkyBlue="skyblue",e.SlateBlue="slateblue",e.SlateGray="slategray",e.Snow="snow",e.SpringGreen="springgreen",e.SteelBlue="steelblue",e.Tan="tan",e.Teal="teal",e.Thistle="thistle",e.Tomato="tomato",e.Turquoise="turquoise",e.Violet="violet",e.Wheat="wheat",e.White="white",e.WhiteSmoke="whitesmoke",e.Yellow="yellow",e.YellowGreen="yellowgreen",e}({});function He(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!U(e))throw new Error("Invalid hex color");var o=e.replace(/^#/,""),t=xe(o),a=t.r,n=t.g,i=t.b;if(!a||!n||!i||2!==a.length||2!==n.length||2!==i.length)throw new TypeError("Invalid color components");var l,c=Ce(a),s=Ce(n),u=Ce(i);if("number"==typeof r){if(r<0||r>1)throw new Error("Invalid alpha value");l=r}else if(function(e){return"string"==typeof e?""!==e.trim()&&e.trim()===e&&!isNaN(Number(e))&&isFinite(Number(e)):"number"==typeof e?!isNaN(e)&&isFinite(e):ye(e)}(r)){if((l=parseFloat(r))<0||l>1)throw new Error("Invalid alpha value")}else l=1;return ae({r:c,g:s,b:u,a:l})}z(z(z(z(z(z(z(z(z(z(Fe={},Te.AliceBlue,{rgb:{r:240,g:248,b:255},hex:"#F0F8FF"}),Te.AntiqueWhite,{rgb:{r:250,g:235,b:215},hex:"#FAEBD7"}),Te.Aqua,{rgb:{r:0,g:255,b:255},hex:"#00FFFF"}),Te.Aquamarine,{rgb:{r:127,g:255,b:212},hex:"#7FFFD4"}),Te.Azure,{rgb:{r:240,g:255,b:255},hex:"#F0FFFF"}),Te.Beige,{rgb:{r:245,g:245,b:220},hex:"#F5F5DC"}),Te.Bisque,{rgb:{r:255,g:228,b:196},hex:"#FFE4C4"}),Te.Black,{rgb:{r:0,g:0,b:0},hex:"#000000"}),Te.BlanchedAlmond,{rgb:{r:255,g:235,b:205},hex:"#FFEBCD"}),Te.Blue,{rgb:{r:0,g:0,b:255},hex:"#0000FF"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.BlueViolet,{rgb:{r:138,g:43,b:226},hex:"#8A2BE2"}),Te.Brown,{rgb:{r:165,g:42,b:42},hex:"#A52A2A"}),Te.BurlyWood,{rgb:{r:222,g:184,b:135},hex:"#DEB887"}),Te.CadetBlue,{rgb:{r:95,g:158,b:160},hex:"#5F9EA0"}),Te.Chartreuse,{rgb:{r:127,g:255,b:0},hex:"#7FFF00"}),Te.Chocolate,{rgb:{r:210,g:105,b:30},hex:"#D2691E"}),Te.Coral,{rgb:{r:255,g:127,b:80},hex:"#FF7F50"}),Te.CornflowerBlue,{rgb:{r:100,g:149,b:237},hex:"#6495ED"}),Te.Cornsilk,{rgb:{r:255,g:248,b:220},hex:"#FFF8DC"}),Te.Crimson,{rgb:{r:220,g:20,b:60},hex:"#DC143C"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.Cyan,{rgb:{r:0,g:255,b:255},hex:"#00FFFF"}),Te.DarkBlue,{rgb:{r:0,g:0,b:139},hex:"#00008B"}),Te.DarkCyan,{rgb:{r:0,g:139,b:139},hex:"#008B8B"}),Te.DarkGoldenRod,{rgb:{r:184,g:134,b:11},hex:"#B8860B"}),Te.DarkGray,{rgb:{r:169,g:169,b:169},hex:"#A9A9A9"}),Te.DarkGreen,{rgb:{r:0,g:100,b:0},hex:"#006400"}),Te.DarkGrey,{rgb:{r:169,g:169,b:169},hex:"#A9A9A9"}),Te.DarkKhaki,{rgb:{r:189,g:183,b:107},hex:"#BDB76B"}),Te.DarkMagenta,{rgb:{r:139,g:0,b:139},hex:"#8B008B"}),Te.DarkOliveGreen,{rgb:{r:85,g:107,b:47},hex:"#556B2F"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.DarkOrange,{rgb:{r:255,g:140,b:0},hex:"#FF8C00"}),Te.DarkOrchid,{rgb:{r:153,g:50,b:204},hex:"#9932CC"}),Te.DarkRed,{rgb:{r:139,g:0,b:0},hex:"#8B0000"}),Te.DarkSalmon,{rgb:{r:233,g:150,b:122},hex:"#E9967A"}),Te.DarkSeaGreen,{rgb:{r:143,g:188,b:143},hex:"#8FBC8F"}),Te.DarkSlateBlue,{rgb:{r:72,g:61,b:139},hex:"#483D8B"}),Te.DarkSlateGray,{rgb:{r:47,g:79,b:79},hex:"#2F4F4F"}),Te.DarkTurquoise,{rgb:{r:0,g:206,b:209},hex:"#00CED1"}),Te.DarkViolet,{rgb:{r:148,g:0,b:211},hex:"#9400D3"}),Te.DeepPink,{rgb:{r:255,g:20,b:147},hex:"#FF1493"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.DeepSkyBlue,{rgb:{r:0,g:191,b:255},hex:"#00BFFF"}),Te.DimGray,{rgb:{r:105,g:105,b:105},hex:"#696969"}),Te.DimGrey,{rgb:{r:105,g:105,b:105},hex:"#696969"}),Te.DodgerBlue,{rgb:{r:30,g:144,b:255},hex:"#1E90FF"}),Te.FireBrick,{rgb:{r:178,g:34,b:34},hex:"#B22222"}),Te.FloralWhite,{rgb:{r:255,g:250,b:240},hex:"#FFFAF0"}),Te.ForestGreen,{rgb:{r:34,g:139,b:34},hex:"#228B22"}),Te.Fuchsia,{rgb:{r:255,g:0,b:255},hex:"#FF00FF"}),Te.Gainsboro,{rgb:{r:220,g:220,b:220},hex:"#DCDCDC"}),Te.GhostWhite,{rgb:{r:248,g:248,b:255},hex:"#F8F8FF"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.Gold,{rgb:{r:255,g:215,b:0},hex:"#FFD700"}),Te.GoldenRod,{rgb:{r:218,g:165,b:32},hex:"#DAA520"}),Te.Gray,{rgb:{r:128,g:128,b:128},hex:"#808080"}),Te.Green,{rgb:{r:0,g:128,b:0},hex:"#008000"}),Te.GreenYellow,{rgb:{r:173,g:255,b:47},hex:"#ADFF2F"}),Te.HoneyDew,{rgb:{r:240,g:255,b:240},hex:"#F0FFF0"}),Te.HotPink,{rgb:{r:255,g:105,b:180},hex:"#FF69B4"}),Te.IndianRed,{rgb:{r:205,g:92,b:92},hex:"#CD5C5C"}),Te.Indigo,{rgb:{r:75,g:0,b:130},hex:"#4B0082"}),Te.Ivory,{rgb:{r:255,g:255,b:240},hex:"#FFFFF0"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.Khaki,{rgb:{r:240,g:230,b:140},hex:"#F0E68C"}),Te.Lavender,{rgb:{r:230,g:230,b:250},hex:"#E6E6FA"}),Te.LavenderBlush,{rgb:{r:255,g:240,b:245},hex:"#FFF0F5"}),Te.LawnGreen,{rgb:{r:124,g:252,b:0},hex:"#7CFC00"}),Te.LemonChiffon,{rgb:{r:255,g:250,b:205},hex:"#FFFACD"}),Te.LightBlue,{rgb:{r:173,g:216,b:230},hex:"#ADD8E6"}),Te.LightCoral,{rgb:{r:240,g:128,b:128},hex:"#F08080"}),Te.LightCyan,{rgb:{r:224,g:255,b:255},hex:"#E0FFFF"}),Te.LightGoldenRodYellow,{rgb:{r:250,g:250,b:210},hex:"#FAFAD2"}),Te.LightGray,{rgb:{r:211,g:211,b:211},hex:"#D3D3D3"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.LightGreen,{rgb:{r:144,g:238,b:144},hex:"#90EE90"}),Te.LightGrey,{rgb:{r:211,g:211,b:211},hex:"#D3D3D3"}),Te.LightPink,{rgb:{r:255,g:182,b:193},hex:"#FFB6C1"}),Te.LightSalmon,{rgb:{r:255,g:160,b:122},hex:"#FFA07A"}),Te.LightSeaGreen,{rgb:{r:32,g:178,b:170},hex:"#20B2AA"}),Te.LightSkyBlue,{rgb:{r:135,g:206,b:250},hex:"#87CEFA"}),Te.LightSlateGray,{rgb:{r:119,g:136,b:153},hex:"#778899"}),Te.LightSteelBlue,{rgb:{r:176,g:196,b:222},hex:"#B0C4DE"}),Te.LightYellow,{rgb:{r:255,g:255,b:224},hex:"#FFFFE0"}),Te.Lime,{rgb:{r:0,g:255,b:0},hex:"#00FF00"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.LimeGreen,{rgb:{r:50,g:205,b:50},hex:"#32CD32"}),Te.Linen,{rgb:{r:250,g:240,b:230},hex:"#FAF0E6"}),Te.Magenta,{rgb:{r:255,g:0,b:255},hex:"#FF00FF"}),Te.Maroon,{rgb:{r:128,g:0,b:0},hex:"#800000"}),Te.MediumAquaMarine,{rgb:{r:102,g:205,b:170},hex:"#66CDAA"}),Te.MediumBlue,{rgb:{r:0,g:0,b:205},hex:"#0000CD"}),Te.MediumOrchid,{rgb:{r:186,g:85,b:211},hex:"#BA55D3"}),Te.MediumPurple,{rgb:{r:147,g:112,b:219},hex:"#9370DB"}),Te.MediumSeaGreen,{rgb:{r:60,g:179,b:113},hex:"#3CB371"}),Te.MediumSlateBlue,{rgb:{r:123,g:104,b:238},hex:"#7B68EE"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.MediumSpringGreen,{rgb:{r:0,g:250,b:154},hex:"#00FA9A"}),Te.MediumTurquoise,{rgb:{r:72,g:209,b:204},hex:"#48D1CC"}),Te.MediumVioletRed,{rgb:{r:199,g:21,b:133},hex:"#C71585"}),Te.MidnightBlue,{rgb:{r:25,g:25,b:112},hex:"#191970"}),Te.MintCream,{rgb:{r:245,g:255,b:250},hex:"#F5FFFA"}),Te.MistyRose,{rgb:{r:255,g:228,b:225},hex:"#FFE4E1"}),Te.Moccasin,{rgb:{r:255,g:228,b:181},hex:"#FFE4B5"}),Te.NavajoWhite,{rgb:{r:255,g:222,b:173},hex:"#FFDEAD"}),Te.Navy,{rgb:{r:0,g:0,b:128},hex:"#000080"}),Te.OldLace,{rgb:{r:253,g:245,b:230},hex:"#FDF5E6"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.Olive,{rgb:{r:128,g:128,b:0},hex:"#808000"}),Te.OliveDrab,{rgb:{r:107,g:142,b:35},hex:"#6B8E23"}),Te.Orange,{rgb:{r:255,g:165,b:0},hex:"#FFA500"}),Te.OrangeRed,{rgb:{r:255,g:69,b:0},hex:"#FF4500"}),Te.Orchid,{rgb:{r:218,g:112,b:214},hex:"#DA70D6"}),Te.PaleGoldenRod,{rgb:{r:238,g:232,b:170},hex:"#EEE8AA"}),Te.PaleGreen,{rgb:{r:152,g:251,b:152},hex:"#98FB98"}),Te.PaleTurquoise,{rgb:{r:175,g:238,b:238},hex:"#AFEEEE"}),Te.PaleVioletRed,{rgb:{r:219,g:112,b:147},hex:"#DB7093"}),Te.PapayaWhip,{rgb:{r:255,g:239,b:213},hex:"#FFEFD5"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.PeachPuff,{rgb:{r:255,g:218,b:185},hex:"#FFDAB9"}),Te.Peru,{rgb:{r:205,g:133,b:63},hex:"#CD853F"}),Te.Pink,{rgb:{r:255,g:192,b:203},hex:"#FFC0CB"}),Te.Plum,{rgb:{r:221,g:160,b:221},hex:"#DDA0DD"}),Te.PowderBlue,{rgb:{r:176,g:224,b:230},hex:"#B0E0E6"}),Te.Purple,{rgb:{r:128,g:0,b:128},hex:"#800080"}),Te.RebeccaPurple,{rgb:{r:102,g:51,b:153},hex:"#663399"}),Te.Red,{rgb:{r:255,g:0,b:0},hex:"#FF0000"}),Te.RosyBrown,{rgb:{r:188,g:143,b:143},hex:"#BC8F8F"}),Te.RoyalBlue,{rgb:{r:65,g:105,b:225},hex:"#4169E1"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.SaddleBrown,{rgb:{r:139,g:69,b:19},hex:"#8B4513"}),Te.Salmon,{rgb:{r:250,g:128,b:114},hex:"#FA8072"}),Te.SandyBrown,{rgb:{r:244,g:164,b:96},hex:"#F4A460"}),Te.SeaGreen,{rgb:{r:46,g:139,b:87},hex:"#2E8B57"}),Te.SeaShell,{rgb:{r:255,g:245,b:238},hex:"#FFF5EE"}),Te.Sienna,{rgb:{r:160,g:82,b:45},hex:"#A0522D"}),Te.Silver,{rgb:{r:192,g:192,b:192},hex:"#C0C0C0"}),Te.SkyBlue,{rgb:{r:135,g:206,b:235},hex:"#87CEEB"}),Te.SlateBlue,{rgb:{r:106,g:90,b:205},hex:"#6A5ACD"}),Te.SlateGray,{rgb:{r:112,g:128,b:144},hex:"#708090"}),z(z(z(z(z(z(z(z(z(z(Fe,Te.Snow,{rgb:{r:255,g:250,b:250},hex:"#FFFAFA"}),Te.SpringGreen,{rgb:{r:0,g:255,b:127},hex:"#00FF7F"}),Te.SteelBlue,{rgb:{r:70,g:130,b:180},hex:"#4682B4"}),Te.Tan,{rgb:{r:210,g:180,b:140},hex:"#D2B48C"}),Te.Teal,{rgb:{r:0,g:128,b:128},hex:"#008080"}),Te.Thistle,{rgb:{r:216,g:191,b:216},hex:"#D8BFD8"}),Te.Tomato,{rgb:{r:255,g:99,b:71},hex:"#FF6347"}),Te.Turquoise,{rgb:{r:64,g:224,b:208},hex:"#40E0D0"}),Te.Violet,{rgb:{r:238,g:130,b:238},hex:"#EE82EE"}),Te.Wheat,{rgb:{r:245,g:222,b:179},hex:"#F5DEB3"}),z(z(z(z(Fe,Te.White,{rgb:{r:255,g:255,b:255},hex:"#FFFFFF"}),Te.WhiteSmoke,{rgb:{r:245,g:245,b:245},hex:"#F5F5F5"}),Te.Yellow,{rgb:{r:255,g:255,b:0},hex:"#FFFF00"}),Te.YellowGreen,{rgb:{r:154,g:205,b:50},hex:"#9ACD32"});var Oe,De=function(e,r,o){r/=100,o/=100;var t=(1-Math.abs(2*o-1))*r,a=t*(1-Math.abs(e/60%2-1)),n=o-t/2,i=0,l=0,c=0;return 0<=e&&e<60?(i=t,l=a,c=0):60<=e&&e<120?(i=a,l=t,c=0):120<=e&&e<180?(i=0,l=t,c=a):180<=e&&e<240?(i=0,l=a,c=t):240<=e&&e<300?(i=a,l=0,c=t):300<=e&&e<360&&(i=t,l=0,c=a),[i=Math.round(255*(i+n)),l=Math.round(255*(l+n)),c=Math.round(255*(c+n))]};function Ee(e){var r=function(e){return{keys:Object.keys(e),values:Object.values(e)}}(e);return[r.keys,r.values]}!function(e){e.ColorName="colorName",e.ColorValue="colorValue"}(Oe||(Oe={}));var qe=function(e,r){var o=Ee(r.colors),t=o[0],a=o[1];return t.includes(e)?Oe.ColorName:!!a.includes(e)&&Oe.ColorValue};function Re(e){if(!e||"string"!=typeof e)return!1;if(!e.includes("#"))return!1;switch("#"===e.substring(0,1)&&(e=e.substring(1)),e.length){case 3:return/^[0-9A-F]{3}$/i.test(e);case 6:return/^[0-9A-F]{6}$/i.test(e);case 8:return/^[0-9A-F]{8}$/i.test(e);default:return!1}}var je,Ne=function(e,r,o){void 0===r&&(r=1);var t=(null==o?void 0:o.debug)&&"boolean"==typeof o.debug&&!0===o.debug;t&&(k("colorThemeHandlerNative","color-theme-handler.native"),w("colorThemeHandlerNative",{color:e,opacity:r},"1. - Initial parameters"),v());var a=qe(e,o);if(t&&(w("colorThemeHandlerNative",a,"2. - Result of isColorNameOrValue"),v()),a){if(a===Oe.ColorName){var n=o.colors[e];if(U(n)){var i=He(n,r);return t&&(w("colorThemeHandlerNative",i,"3. - Hex color (new version) converted to RGBA"),v()),i}if(Re(n)){var l=He(n,r);return t&&(w("colorThemeHandlerNative",l,"4. - Hex color (legacy version) converted to RGBA"),v()),l}var c=o.colors[e];return t&&(w("colorThemeHandlerNative",c,"5. - Theme color returned as is"),v()),c}i=He(e,r);return t&&(w("colorThemeHandlerNative",i,"6. - Hex color value converted to RGBA"),v()),i}var s=o.colors.primaryTextColor;return t&&(w("colorThemeHandlerNative",s,"7. - Default primaryTextColor returned"),v(),F("colorThemeHandlerNative")),s},Me={Font3:{light:"Roboto",regular:"Roboto",bold:"Roboto",name:"Roboto"},Font2:{light:"OpenSans-Light",regular:"OpenSans-Regular",bold:"OpenSans-Bold",name:'"Open Sans"'},CondensedFont:{light:"OpenSans-Condensed-Light",regular:"OpenSans-Condensed-Regular",bold:"OpenSans-Condensed-Bold",name:"'Open Sans Condensed'"},Font1:{light:"Montserrat-Light",regular:"Montserrat-Regular",bold:"Montserrat-Bold",name:"Montserrat"}},Le=function(e,o,t){void 0===o&&(o="bold");var a=(null==t?void 0:t.debug)&&"boolean"==typeof t.debug&&!0===t.debug;a&&(k("handleFontFromThemeForNative","font-theme-handler.native"),w("handleFontFromThemeForNative",{fontType:e,fontTypeWeight:o},"1. - Initial parameters"),v());var n=!(!r||!r.OS),i=e||O.Font2,l=Me.Font1.name;if(a&&(w("handleFontFromThemeForNative",{isPlatformDefined:n,tempFontType:i},"2. - Platform and fontType check"),v()),n&&e&&o&&r&&"web"===r.OS&&t.fonts[i]&&t.fonts[i].name){if(t.fonts[e].name){var c=t.fonts[e].name;l=c,a&&(w("handleFontFromThemeForNative",c,"3. - Web font returned"),v())}}else n&&e&&o&&"web"!==r.OS?t.fonts[e][o]&&(l=t.fonts[e][o],a&&(w("handleFontFromThemeForNative",l,"4. - Non-web font returned"),v())):n&&"web"===r.OS?(l=t.fonts.Font2.name,a&&(w("handleFontFromThemeForNative",l,"5. - Default web font returned"),v())):(l=t.fonts.Font2.bold,a&&(w("handleFontFromThemeForNative",l,"6. - Default font returned"),v()));return a&&F("handleFontFromThemeForNative"),l};function Ge(){if(o&&void 0!==o.get("window")&&r&&r.OS){var e=o.get("window");return!("ios"!==r.OS||r.isPad||r.isTV||780!==e.height&&780!==e.width&&812!==e.height&&812!==e.width&&844!==e.height&&844!==e.width&&896!==e.height&&896!==e.width&&926!==e.height&&926!==e.width)}return!1}function We(e,r){return Ge()?e:r}function Ie(e){var a={ios:0,android:0,default:0};return t&&t.currentHeight&&(a.android=t.currentHeight),o&&void 0!==o.get("window")&&(a.ios=We(e?44:30,20)),r.select(a)}function ze(){return Ge()?34:0}function Ve(){var e=0,r=0;return o&&o.get&&(e=o.get("window").width,r=o.get("window").height),r>e?"portrait":"landscape"}function _e(e){var a=Ve(),n=0,i=0;o&&o.get&&(i=o.get("window").width,n=o.get("window").height);var l="portrait"===a?n:i,c="ios"===r.OS?Ge()?78:20:t&&t.currentHeight?t.currentHeight:0,s=e*("ios"===r.OS&&"landscape"===a?l:l-c)/100;return Math.round(s)}function Ye(e,a){void 0===a&&(a=680);var n=Ve(),i=0,l=0;o&&o.get&&(l=o.get("window").width,i=o.get("window").height);var c="portrait"===n?i:l,s="ios"===r.OS?Ge()?78:20:t&&t.currentHeight?t.currentHeight:0,u=e*("ios"===r.OS&&"landscape"===n?c:c-s)/a;return Math.round(u)}!function(e){e.Percent="percent",e.Value="value"}(je||(je={}));var Xe,$e,Ke,Ue,Je=function(e,r,t,a){e||(e=13),r||(r=24),t||(t=o&&"function"==typeof o.get?o.get("window").height:50),a||(a=je.Value);var n=parseInt(e.toString(),10),i=r?parseInt(r.toString(),10):void 0;if(isNaN(n))throw new Error("Invalid fontSize provided");if(void 0!==i&&isNaN(i))throw new Error("Invalid maxFontSize provided");var l=function(e,r,o,t){var a=function(e,r,o){var t=0;return o===je.Value?t=r?Ye(e,r):Ye(e):o===je.Percent&&(t=_e(e)),0===t?e:t}(e,o,t),n=t===je.Value?r:_e(r);return T(a,n)}(n,i||n,t?parseInt(t.toString(),10):void 0,a);return"".concat(l,"px")},Qe=function(r){return function(o){var t=o.baseTheme,a=o.children,n=c(c({},t),{fontSizePropsHandler:Je,unitPropsHandler:D,layoutStyleGenerator:W,imageStyleGenerator:R,buttonStyleGenerator:M,ghostStyleGenerator:E,textStyleGenerator:j,boxShadowOne:H,boxShadowTwo:H,boxShadowThree:H,colorThemeHandler:Ne,fontThemeHandler:Le,fontSizeCap:T,colorAdjuster:A});return e.createElement(r,{baseTheme:t,theme:n},e.createElement(e.Fragment,null,a))}},Ze=Qe((function(r){var o=r.children,t=r.theme,a=r.ThemeProviderComponent;return t&&a?e.createElement(a,{theme:t},e.createElement(e.Fragment,null,o)):e.createElement(e.Fragment,null,o)})),er={placeholder:"#A8A8A8",selectedColorOne10:"rgba(229, 115, 115, 0.1)",selectedColorOne40:"rgba(229, 115, 115, 0.4)",selectedColorOne100:"#E57373",accentDarkest:"#FFA000",primaryDarkest:"#0055AA",onPrimary:"#FFFFFF",error:"#D32F2F",onPrimaryContainer:"#007BFF",onSecondary:"#333333",onSecondaryContainer:"#F5F5F5",onSurface:"#212121",onSurfaceVariant:"#757575",onSurfaceDisabled:"#BDBDBD",onBackground:"#333333",warningAlpha22:"rgba(255, 165, 0, 0.22)",warningAlpha62:"rgba(255, 165, 0, 0.62)",hyperLinkColor:"#1b88bf",colorOne:"#E57373",colorTwo:"#81C784",colorThree:"#64B5F6",colorFour:"#FFD54F",colorFive:"#BA68C8",primary:"#007BFF",primaryLighter:"#66AFFF",secondary:"#6C757D",background:"#FAFAFA",headerBackground:"#FFFFFF",surface:"#FFFFFF",surfaceVariant:"#F7F7F7",accent:"#FFC107",accentLighter:"#FFECB3",accent50:"rgba(255, 193, 7, 0.5)",accent80:"rgba(255, 193, 7, 0.8)",backdrop:"#F5F5F5",tertiary:"#F5F5F5",outline:"#D5D5D5",shadow:"rgba(0, 0, 0, 0.15)",secondaryButtonBackgroundColor:"#F7F7F7",errorContainer:"#D32F2F",onError:"#FFFFFF",onErrorContainer:"#FF5722"},rr={blackAlpha01:"rgba(0, 0, 0, 0.01)",blackAlpha05:"rgba(0, 0, 0, 0.05)",blackAlpha10:"rgba(0, 0, 0, 0.1)",blackAlpha15:"rgba(0, 0, 0, 0.15)",blackAlpha20:"rgba(0, 0, 0, 0.2)",blackAlpha30:"rgba(0, 0, 0, 0.3)",blackAlpha40:"rgba(0, 0, 0, 0.4)",blackAlpha50:"rgba(0, 0, 0, 0.5)",blackAlpha60:"rgba(0, 0, 0, 0.6)",blackAlpha70:"rgba(0, 0, 0, 0.6)",blackAlpha80:"rgba(0, 0, 0, 0.8)",blackAlpha95:"rgba(0, 0, 0, 0.95)",blackAlpha100:"rgba(0, 0, 0, 1)",whiteAlpha01:"rgba(255, 255, 255, 0.01)",whiteAlpha05:"rgba(255, 255, 255, 0.05)",whiteAlpha10:"rgba(255, 255, 255, 0.10)",whiteAlpha15:"rgba(255, 255, 255, 0.15)",whiteAlpha20:"rgba(255, 255, 255, 0.2)",whiteAlpha30:"rgba(255, 255, 255, 0.3)",whiteAlpha40:"rgba(255, 255, 255, 0.4)",whiteAlpha50:"rgba(255, 255, 255, 0.5)",whiteAlpha60:"rgba(255, 255, 255, 0.6)",whiteAlpha70:"rgba(255, 255, 255, 0.7)",whiteAlpha80:"rgba(255, 255, 255, 0.8)",whiteAlpha90:"rgba(255, 255, 255, 0.9)",whiteAlpha95:"rgba(255, 255, 255, 0.95)",whiteAlpha97:"rgba(255, 255, 255, 0.97)",whiteAlpha100:"rgba(255, 255, 255, 1)",blackAlpha90:"rgba(0, 0, 0, 0.9)",blackAlpha97:"rgba(0, 0, 0, 0.97)",whiteAlpha00:"#fff",blackAlpha00:"#000",transparent:"transparent",primaryTextColor:"#212121",text:"#333333",secondaryTextColor:"#757575",mediumTextColor:"#616161",inverseOnSurface:"#FFFFFF",inverseSurface:"#212121",inversePrimary:"#007BFF",black80:"#262626",white80:"#D9D9D9",white:Ae("#FFFFFF",100,"light"),white10:Ae("#FFFFFF",10,"light"),white20:Ae("#FFFFFF",20,"light"),white30:Ae("#FFFFFF",30,"light"),white40:Ae("#FFFFFF",40,"light"),white50:Ae("#FFFFFF",50,"light"),white60:Ae("#FFFFFF",60,"light"),white70:Ae("#FFFFFF",70,"light"),white90:Ae("#FFFFFF",90,"light"),white100:Ae("#FFFFFF",100,"light"),black:Ae("#000000",100,"dark"),black10:Ae("#000000",10,"dark"),black20:Ae("#000000",20,"dark"),black30:Ae("#000000",30,"dark"),black40:Ae("#000000",40,"dark"),black50:Ae("#000000",50,"dark"),black60:Ae("#000000",60,"dark"),black70:Ae("#000000",70,"dark"),black90:Ae("#000000",90,"dark"),black100:Ae("#000000",100,"dark")},or={primaryIconColor:"#007BFF",secondaryIconColor:"#6C757D",baseColor:er.colorOne,complementColor:er.colorTwo,supportColor:er.colorThree,highlightColor:er.colorFour,contrastColor:er.colorFive,primaryColor:er.primary,primaryLighterColor:er.primaryLighter,secondaryColor:er.secondary,accentColor:er.accent,accentLighterColor:er.accentLighter,accentM