UNPKG

censa_front_end_library

Version:

React components library project for censa Design System

6 lines 685 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).censaDesignSystem={},e.React,e.ReactDOM)}(this,(function(e,t,n){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=r(t),i=r(n),o=Object.freeze({__proto__:null,colorToHex:function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))}});function c(e,t,n){return t=S(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}(e,l()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(){d=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new j(r||[]);return a(o,"_invoke",{value:N(e,n,c)}),o}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",m="executing",v="completed",y={};function g(){}function b(){}function w(){}var x={};s(x,o,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(M([])));E&&E!==n&&r.call(E,o)&&(x=E);var O=w.prototype=g.prototype=Object.create(x);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(a,i,o,c){var l=p(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function N(t,n,r){var a=f;return function(i,o){if(a===m)throw Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=D(c,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var s=p(t,n,r);if("normal"===s.type){if(a=r.done?v:h,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function D(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=p(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=w,a(O,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=s(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},k(C.prototype),s(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new C(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},k(O),s(O,l,"Generator"),s(O,o,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;A(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function p(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function f(e){return f="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},f(e)}function h(e,t,n,r,a,i,o){try{var c=e[i](o),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){h(i,r,a,o,c,"next",e)}function c(e){h(i,r,a,o,c,"throw",e)}o(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}function g(e,t,n){return t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function O(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||D(e,t)||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 N(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=D(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(c)throw i}}}}var j=b(b({},"hh:mm","--:--"),"hh:mm AM","--:-- AM"),M=function(e){return"hh:mm AM"===e},T=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},I=function(e,t){if(!t)return"";if("number"==typeof t){var n=_(e,t);return z(e,n)}return t},_=function(e,t){var n=new Date(t),r=n.getHours(),a=M(e)?T(r).hrs:r,i=M(e)?T(r).AMPM:"";return{hours:a,minutes:n.getMinutes(),seconds:n.getSeconds(),am_pm:i}},L=function(e,t){var n=0,r=0,a=e.length,i=t.length,o=e.substring(a-2,a),c="AM"===o||"PM"===o,l=c?t.substring(i-2,i):"",s=c?t.substring(0,i-3):t,u=c?e.substring(0,a-3):e,d=s.split(":");return u.split(":").forEach((function(e,t){switch(e){case"hh":n=+d[t]||0;break;case"mm":r=+d[t]||0}})),{hours:n,minutes:r,am_pm:l}},z=function(e,t){var n=t.hours,r=t.minutes,a=t.am_pm,i=e.split(" ")[0].split(":"),o="";return i.forEach((function(e,t){switch(e){case"hh":o+=n<10?"0".concat(n):n;break;case"mm":o+=r<10?"0".concat(r):r}t!==e.length-1&&(o+=":")})),o+=M(e)&&a?" ".concat(a):""},R=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(Array.isArray(e)?e:[e]).every((function(e){return e.apply(void 0,n)}))},B=function(e,t){var n=function(e,t,n){var r=[31,28,31,30,31,30,31,31,30,31,30,31];return(n%400==0||n%100!=0&&n%4==0)&&(r[1]=29),t<=12&&e<=r[t-1]};if(e)switch(t){case"dd/mm/yyyy":var r=e.split("/");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm/dd/yyyy":var a=e.split("/");return n(+a[1]||1,+a[0]||1,+a[2]||1900);case"yyyy/mm/dd":var i=e.split("/");return n(+i[2]||1,+i[1]||1,+i[0]||1900);case"dd-mm-yyyy":var o=e.split("-");return n(+o[0]||1,+o[1]||1,+o[2]||1900);case"mm-dd-yyyy":var c=e.split("-");return n(+c[1]||1,+c[0]||1,+c[2]||1900);case"yyyy-mm-dd":var l=e.split("-");return n(+l[2]||1,+l[1]||1,+l[0]||1900);default:return!1}return!1},F=function(e,t){var n=L(t,e),r=n.hours,a=n.minutes;return(M(t)?r<=12:r<24)&&a<=60},H=function(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))},W=Object.freeze({__proto__:null,date:B,isNaturalNumber:H,isValid:R,time:F}),V={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},U={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},G=b(b({},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),q=Object.freeze({__proto__:null,date:V,rangeDate:U,time:G}),$=Object.freeze({__proto__:null,css:o,masks:q,validators:W}),K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function X(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y={exports:{}}; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var i in e)t.call(e,i)&&e[i]&&(r=a(r,i));return r}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Y);var Z=X(Y.exports),J=function(e){return["className","data-test"].reduce((function(t,n){return e[n]?u(u({},t),{},b({},n,e[n])):u({},t)}),{})},Q=function(e,t,n){return Object.entries(e).filter((function(e){return n?t.includes(e[0]):!t.includes(e[0])})).reduce((function(e,t){return e[t[0]]=t[1],e}),{})},ee=a.createContext({size:"regular",appearance:"secondary",firstName:"",lastName:""}),te=ee.Provider,ne={secondary:"inverse",primary:"white",alert:"white",accent2:"white",accent3:"white",warning:"warning_darker",success:"success_darker",accent1:"accent1_darker",accent4:"accent4_darker"},re={regular:32,tiny:24},ae=["accent4","primary","accent3","alert","accent2","warning","accent1","success"],ie=function(e){var t=e.withTooltip,n=e.tooltipPosition,r=e.size,i=e.children,o=e.firstName,c=e.lastName,l=e.className,s=e.appearance,u=J(e),d=i&&"string"==typeof i?i.trim().slice(0,2):"".concat(o?o.trim()[0]:"").concat(c?c.trim()[0]:""),p=i&&"string"==typeof i?i:"".concat(o||""," ").concat(c||"")||"",f=s||ae[(d.charCodeAt(0)+(d.charCodeAt(1)||0))%8]||"secondary",h=Z(b(b(b({Avatar:!0},"Avatar--".concat(r),r),"Avatar--".concat(f),f),"Avatar--disabled",!d||!t),l),m=Z(b(b({},"Avatar-content--".concat(r),r),"Avatar-content--".concat(f),f)),v=Z(b({},"Avatar-content--".concat(f),f)),y={size:r,firstName:o,lastName:c,appearance:f},g=function(){return i&&"string"!=typeof i?a.createElement(te,{value:y},a.createElement("span",w({"data-test":"DesignSystem-Avatar"},u,{className:h}),i)):a.createElement("span",w({"data-test":"DesignSystem-Avatar"},u,{className:h}),d&&a.createElement(xe,{weight:"medium",appearance:"white",className:m},d),!d&&a.createElement(Ne,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===r?20:16,appearance:"white",className:v}))};return t&&d?a.createElement(eo,{tooltip:p,position:n,triggerClass:"flex-grow-0"},g()):g()};ie.displayName="Avatar",ie.Icon=function(e){var t=a.useContext(ee),n=t.size,r=t.appearance,i="regular"===n?20:16,o=r&&ne[r]||"inverse";return a.createElement(Ne,w({},e,{size:i,appearance:o}))},ie.Image=function(e){var t=e.children,n=e.src,r=C(a.useState(!1),2),i=r[0],o=r[1],c=a.useContext(ee),l=c.size,s=c.appearance,u=c.firstName,d=c.lastName,p=J(e),f="".concat(u?u.trim()[0]:"").concat(d?d.trim()[0]:""),h=l&&re[l],m=Z(b(b({},"Avatar-content--".concat(l),l),"Avatar-content--".concat(s),s)),v=Z(b({},"Avatar-content--".concat(s),s));return t?a.createElement(a.Fragment,null,t):i?f?a.createElement(xe,w({weight:"medium",appearance:"white",className:m},p),f):a.createElement(Ne,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===l?20:16,appearance:"white",className:v}):a.createElement("img",w({"data-test":"DesignSystem-Image",src:n,alt:u},p,{height:h,width:h,onError:function(){o(!0)}}))},ie.defaultProps={tooltipPosition:"bottom",withTooltip:!1,size:"regular"};var oe=function(e){var t=e.hiddenAvatarCount,n=e.avatarStyle,r=e.size,i=Z(b(b({},"Avatar-content--secondary",!0),"Avatar-content--tiny","tiny"===r)),o=Z(b(b(b(b({Avatar:!0},"Avatar--regular","regular"===r),"Avatar--tiny","tiny"===r),"Avatar--secondary",!0),"Avatar--disabled",!0));return a.createElement("div",{"data-test":"DesignSystem-AvatarGroup--TriggerAvatar",className:"AvatarCount-wrapper",style:n},a.createElement("span",{className:o},a.createElement(xe,{appearance:"white",className:i},"+".concat(t))))},ce=function(e){var t=e.avatarList,n=e.avatarStyle,r=e.tooltipPosition,i=e.size,o=Z(b(b(b({},"AvatarGroup-item",!0),"AvatarGroup-item--tiny","tiny"===i),"AvatarGroup-item--regular","regular"===i)),c=t.map((function(e,t){var c=e.appearance,l=e.firstName,s=e.lastName;return a.createElement("div",{"data-test":"DesignSystem-AvatarGroup--Avatar",className:o,style:n,key:t},a.createElement(ie,{size:i,appearance:c,firstName:l,lastName:s,withTooltip:!0,tooltipPosition:r}))}));return c},le=function(e){var t=e.hiddenAvatarList,n=e.popperRenderer,r=e.maxHeight,i=e.dark;return n?n(t):a.createElement("div",{className:"py-6 pr-4 pl-6"},a.createElement("div",{className:"AvatarGroup-TextWrapper",style:{maxHeight:r}},t.map((function(e,n){var r=e.firstName,o=void 0===r?"":r,c=e.lastName,l=void 0===c?"":c,s="".concat(o," ").concat(l),u=Z(b({},"mb-5",n<t.length-1));return a.createElement(xe,{key:n,appearance:i?"white":"default",className:u,"data-test":"DesignSystem-AvatarGroup--Text"},s)}))))},se=function(e){var t=e.max,n=e.borderColor,r=e.popoverOptions,i=e.tooltipPosition,o=e.list,c=e.className,l=e.size,s=r.popperRenderer,d=r.maxHeight,p=void 0===d?150:d,f=r.position,h=void 0===f?"bottom":f,m=r.on,v=void 0===m?"hover":m,y=r.dark,g=void 0===y||y,x=r.appendToBody,S=void 0===x||x,E=r.popperClassName,O=void 0===E?"":E,k=J(e),C=o.length>t?Math.min(o.length-t,99):0,N={backgroundColor:"".concat(n),boxShadow:"0 0 0 calc(var(--spacing-xs) + var(--spacing-s)) ".concat(n)},D={boxShadow:"0 0 0 var(--spacing-s) ".concat(n)},P="tiny"===l?u(u({},N),D):N,A=Z(b({},"AvatarGroup",!0),c),j=Z(b({},"AvatarGroup-Popper",!0),O);return a.createElement("div",w({"data-test":"DesignSystem-AvatarGroup"},k,{className:"".concat(A," d-inline-flex")}),a.createElement(ce,{size:l,avatarList:o.slice(0,t),avatarStyle:P,tooltipPosition:i}),o.length-t>0&&a.createElement(Vi,{on:v,dark:g,trigger:a.createElement(oe,{size:l,hiddenAvatarCount:C,avatarStyle:P}),position:h,appendToBody:S,className:j,offset:"medium"},a.createElement(le,{hiddenAvatarList:o.slice(t,o.length),popperRenderer:s,maxHeight:p,dark:g})))};se.displayName="AvatarGroup",se.defaultProps={max:2,tooltipPosition:"bottom",borderColor:"white",popoverOptions:{},size:"regular"};var ue=function(e){var t=a.useEffect,n=a.useState,r=e.className,o=J(e),c=C(n(null),2),l=c[0],s=c[1],u=C(a.useState(e.open),2),d=u[0],p=u[1],f=C(a.useState(e.open),2),h=f[0],m=f[1],v=Z({Backdrop:!0,"Backdrop--open":d,"Backdrop-animation--open":h,"Backdrop-animation--close":!h},r),y=function(){document.body.style.overflow=l||"",s(null)};return t((function(){return e.open&&(s(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),p(!0),m(!0)),e.open||(window.setTimeout((function(){p(!1)}),120),m(!1),y()),function(){y()}}),[e.open]),i.createPortal(a.createElement("div",w({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":d},o,{className:v,style:{zIndex:e.zIndex}})),document.body)};ue.displayName="Backdrop";var de=function(e){var t=e.appearance,n=e.children,r=e.subtle,i=e.className,o=J(e),c=Z(b(b({Badge:!0},"Badge--".concat(t),t&&!r),"Badge--subtle-".concat(t),r),i);return a.createElement("span",w({"data-test":"DesignSystem-Badge"},o,{className:c}),n)};de.displayName="Badge",de.defaultProps={appearance:"secondary"};var pe=["children","componentType","className"],fe=function(e){var t=e.children,n=e.componentType,r=void 0===n?"span":n,i=e.className,o=O(e,pe);return a.createElement(r,u(u({},o),{},{className:i}),t)},he=function(e){var t=e.item,n=e.onClick;return a.createElement(At,{className:"Breadcrumbs-link ellipsis--noWrap","data-test":"DesignSystem-Breadcrumbs-link",href:t.link,onClick:function(e){n&&(e.preventDefault(),n(t.link))},appearance:"subtle",size:"tiny"},t.label)},me=function(e){var t=e.item,n=e.onClick,r=e.index,i=e.showTooltip,o=e.length;return a.createElement("div",{key:r,className:"Breadcrumbs-item mr-2","data-test":"DesignSystem-Breadcrumbs-item"},i?a.createElement(eo,{tooltip:t.label,position:"bottom"},r<o-1?a.createElement(he,{item:t,onClick:n}):a.createElement(fe,{className:"Breadcrumbs-last-item",componentType:"span"},t.label)):r<o-1?a.createElement(he,{item:t,onClick:n}):a.createElement(fe,{className:"Breadcrumbs-last-item",componentType:"span"},t.label),r<o-1&&a.createElement(Ne,{name:"chevron_right"}))},ve=["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconVariations","iconType"],ye={tiny:12,regular:16,large:20},ge=a.forwardRef((function(e,t){var n=e.size,r=void 0===n?"regular":n,i=e.appearance,o=void 0===i?"basic":i,c=e.iconAlign,l=void 0===c?"left":c,s=e.tabIndex,u=void 0===s?0:s,d=e.largeIcon,p=e.type,f=e.children,h=e.icon,m=e.expanded,v=e.selected,y=e.loading,g=e.disabled,x=e.className;e.tooltip;var S=e.iconVariations,E=e.iconType,k=O(e,ve),C=Z(b(b(b(b(b(b(b(b({},"Button",!0),"Button--expanded",m),"Button--".concat(r),r),"Button--".concat(r,"Square"),!f),"Button--".concat(o),o),"Button--selected",v&&("basic"===o||"transparent"===o)),"Button--iconAlign-".concat(l),f&&l),"".concat(x),x)),N=Z(b(b({},"Button-icon",!0),"Button-icon--".concat(l),f&&l));return a.createElement("button",w(b({"data-test":"DesignSystem-Button",ref:t,type:p,className:C,disabled:g||y,tabIndex:u},"type",E),k),y?a.createElement(a.Fragment,null,a.createElement(sn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),a.createElement(xe,{className:"Button-text Button-text--hidden"},f||"")):a.createElement(a.Fragment,null,h&&a.createElement("div",{className:N},a.createElement(Ne,{"data-test":"DesignSystem-Button--Icon",name:h,type:E,variations:S,size:d&&!f?ye[r]+4:ye[r]})),f&&a.createElement("span",{className:"Button-text"},f)))})),be=a.forwardRef((function(e,t){var n=e.icon,r=e.tooltip,i=e.children;return n&&r&&!i?a.createElement(eo,{tooltip:r},a.createElement(ge,w({},e,{ref:t}))):a.createElement(ge,w({},e,{ref:t}))}));be.displayName="Button";var we=["appearance","size","children","weight","small","className","color"],xe=function(e){var t=e.appearance,n=e.size,r=e.children,i=e.weight,o=e.small,c=e.className,l=e.color,s=O(e,we),u=Z(b(b(b(b(b({Text:!0},"Text--".concat(t),!l&&t),"Text--".concat(i),i),"Text--".concat(n),n),"color-".concat(l),l),"Text--small","small"===n||o),c);return a.createElement(fe,w({"data-test":"DesignSystem-Text"},s,{className:u,componentType:"span"}),r)};xe.displayName="Text",xe.defaultProps={appearance:"default",size:"regular"};var Se=["onClick","onKeyDown","role","tabIndex"],Ee={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},Oe=function(e){var t=e.onClick,n=e.onKeyDown,r=e.role,a=void 0===r?"button":r,i=e.tabIndex,o=O(e,Se);return u({},t?{onClick:t,role:a,tabIndex:i||0,"aria-label":o["aria-label"],onKeyDown:function(e){if(n)n(e);else{var r=e.key;(function(e,t){return!!Ee[e]&&Ee[e].has(t)})(a,r)&&t&&(e.preventDefault(),t(e))}}}:{role:a,tabIndex:i,"aria-label":o["aria-label"]})},ke=function(e){return e&&e<=20?20:e&&e>=48?48:e},Ce={more_horiz:{weight:600,opticalSize:24},delete:{fill:0},radio_button_checked:{fill:0},radio_button_unchecked:{fill:0},schedule:{fill:0},help_outline:{fill:0},check_circle_outline:{fill:0},highlight_of:{fill:0},credit_card:{fill:0},delete_outline:{fill:0},bookmark_border:{fill:0},work_outline:{fill:0},alarm:{fill:0},arrow_circle_up:{fill:0},copyright:{fill:0},query_builder:{fill:0},card_membership:{fill:0},arrow_circle_down:{fill:0},change_history:{fill:0},aspect_ratio:{fill:0},calendar_view_month:{fill:0},alarm_on:{fill:0},thumb_down_off_alt:{fill:0},important_devices:{fill:0},turned_in_not:{fill:0},add_circle_outline:{fill:0},speed:{fill:0},content_copy:{fill:0},timelapse:{fill:0},info_outline:{fill:0}},Ne=function(e){var t=e.appearance,n=e.className,r=e.name,i=e.size,o=e.children,c=e.variations,l=Oe(e),s=J(e),d=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type,p=t&&t.includes("_")?function(e){var t=e.indexOf("_");return e.slice(0,t)+e.charAt(t+1).toUpperCase()+e.slice(t+2)}(t):t,f=Z(b(b(b(b(b(b({},"material-icons",!0),"material-icons-rounded","rounded"===d),"material-icons-outlined","outlined"===d),"Icon",!0),"Icon--".concat(p),t),"".concat(n),n)),h=function(e,t,n,r){return u(u(u({},{fill:"outlined"===n?0:1,weight:400,grade:0,opticalSize:ke(r)}),Ce[e]),t)}(r,c,d,i),m=h.fill,v=h.grade,y=h.opticalSize,g=h.weight,x={fontSize:"".concat(i,"px"),width:"".concat(i,"px"),fontVariationSettings:'"FILL" '.concat(m,', "wght" ').concat(g,', "GRAD" ').concat(v,', "opsz" ').concat(y)};return o&&a.isValidElement(o)?a.createElement("span",w({},s,{className:n}),o):a.createElement("i",w({"data-test":"DesignSystem-Icon"},s,{className:f,style:x},l),r)};Ne.displayName="Icon",Ne.defaultProps={size:16,type:"outlined"};var De=function(e){var t=e.error,n=e.hide,r=e.withInput,i=e.children,o=e.className,c=J(e),l=Z(b(b({Caption:!0},"Caption--hidden",n),"Caption--withInput",r),o),s=Z(b({},"Caption-icon",!0));return a.createElement("div",w({},c,{className:l,"data-test":"DesignSystem-Caption"}),t&&a.createElement("div",{className:s},a.createElement(Ne,{size:14,name:"error",appearance:"alert"})),a.createElement(xe,{appearance:t?"destructive":"subtle",size:"small",weight:"medium"},"".concat(i)))};De.displayName="Caption";var Pe=["shadow","children","className"],Ae=a.forwardRef((function(e,t){var n=e.shadow,r=void 0===n?"shadow10":n,i=e.children,o=e.className,c=O(e,Pe),l=Z(b(b({Card:!0},"Card--".concat(r),r),"".concat(o),o));return a.createElement("div",w({"data-test":"DesignSystem-Card",ref:t},c,{className:l}),i)}));Ae.displayName="Card",Ae.defaultProps={shadow:"shadow10"};var je=function(e){var t=e.className,n=e.children,r=J(e),i=Z({"Card-body":!0},t);return a.createElement("div",w({"data-test":"DesignSystem-CardBody"},r,{className:i}),n)};je.displayName="CardBody";var Me=function(e){var t=e.className,n=e.children,r=e.withSeperator,i=J(e),o=Z(b({"Card-footer":!0},"Card-footer--withSeperator",r),t);return a.createElement("div",w({"data-test":"DesignSystem-CardFooter"},i,{className:o}),n)};Me.displayName="CardFooter",Me.defaultProps={withSeperator:!0};var Te=function(e){var t=e.className,n=e.children,r=J(e),i=Z({"Card-header":!0},t);return a.createElement("div",w({"data-test":"DesignSystem-CardHeader"},r,{className:i}),n)};Te.displayName="CardHeader";var Ie=["border","children","className"],_e=a.forwardRef((function(e,t){var n=e.border,r=e.children,i=e.className,o=O(e,Ie),c=Z(b({CardSubdued:!0},"CardSubdued--".concat(n),n),i);return a.createElement("div",w({"data-test":"DesignSystem-CardSubdued",ref:t},o,{className:c}),r)}));_e.displayName="CardSubdued";var Le=function(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}));return t},ze=function(e){switch(e.name){case"checked--regular":return t.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.66667 5.56L8.72667 0.5L9.66667 1.44667L3.66667 7.44667L0.333333 4.11333L1.27333 3.17333L3.66667 5.56Z",fill:"white"}));case"checked--tiny":return t.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0.333344 4L1.27334 3.06L3.66668 5.44667L8.72668 0.386665L9.66668 1.33333L3.66668 7.33333L0.333344 4Z",fill:"white"}));case"indeterminate--regular":return t.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return t.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}},Re=["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"],Be=a.forwardRef((function(e,t){var n=e.size,r=void 0===n?"regular":n,i=e.tabIndex,o=void 0===i?0:i,c=e.defaultChecked,l=e.indeterminate,s=e.label,u=e.error,d=e.disabled,p=e.onChange,f=e.name,h=e.value,m=e.className,v=e.checked,y=e.helpText,g=e.id,x=void 0===g?"".concat(f,"-").concat(s,"-").concat(Le()):g,S=O(e,Re),E=a.useRef(null);a.useImperativeHandle(t,(function(){return E.current}));var k=C(a.useState(void 0===v?c:v),2),N=k[0],D=k[1];a.useEffect((function(){I(l)}),[l]),a.useEffect((function(){void 0!==v&&D(v)}),[v]);var P=Z(b(b({},"Checkbox",!0),"Checkbox--disabled",d),m),A=Z(b(b({},"Checkbox-outerWrapper",!0),"Checkbox-outerWrapper--".concat(r),r)),j=Z(b(b(b({},"Checkbox-input",!0),"Checkbox-input--checked",N),"Checkbox-input--indeterminate",e.indeterminate)),M=Z(b(b(b({},"Checkbox-wrapper",!0),"Checkbox-wrapper--default",!u),"Checkbox-wrapper--error",u)),T=Z(b(b({},"Checkbox-label",!0),"Checkbox-label--tiny","tiny"===r)),I=function(e){E.current.indeterminate=e},_=Z(b(b(b(b({},"checked--regular",N&&"regular"===r),"checked--tiny",N&&"tiny"===r),"indeterminate--regular",l&&"regular"===r),"indeterminate--tiny",l&&"tiny"===r));return a.createElement(a.Fragment,null,a.createElement("div",{"data-test":"DesignSystem-Checkbox",className:P},a.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:A},a.createElement("input",w({},S,{type:"checkbox",defaultChecked:c,onChange:function(e){void 0===v&&(D(e.target.checked),I(e.target.indeterminate)),p&&p(e)},checked:N,disabled:d,ref:E,name:f,value:h,className:j,tabIndex:o,id:x,"data-test":"DesignSystem-Checkbox-InputBox"})),a.createElement("span",{className:M,"data-test":"DesignSystem-Checkbox-Icon"},_&&a.createElement(ze,{name:_}))),a.createElement("div",{className:"Checkbox-labelWrapper"},s&&s.trim()&&a.createElement("label",{htmlFor:x,className:T,"data-test":"DesignSystem-Checkbox-Label"},a.createElement(xe,{size:"tiny"===r?"small":"regular",appearance:d?"disabled":"default"},s.trim())),y&&a.createElement(xe,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:d?"disabled":"subtle"},y.trim()))))}));Be.displayName="Checkbox";var Fe=function(e){var t=e.label,n=e.icon,r=e.clearButton,i=e.disabled,o=e.className,c=e.selected,l=e.onClose,s=e.onClick,u=e.labelPrefix,d=J(e),p=function(e){return Z(b(b(b(b(b({},"Chip-icon",!0),"Chip-icon--".concat(e),e),"Chip-icon-disabled--right","right"===e&&i),"cursor-pointer","right"===e&&!i),"Chip-icon--selected","right"===e&&c))},f=function(e){e.stopPropagation(),l&&l()},h=function(e){return Z(b(b(b(b(b({},"disabled",i&&!c),"primary_dark",!i&&c),"primary_lighter",i&&c),"subtle",!i&&!c&&"right"===e),"inverse",!i&&!c&&"left"===e))},m=Z(b(b(b(b({},"primary-lighter",i&&c),"inverse-lightest",i&&!c),"primary-dark",c),"inverse",!i&&!c));return a.createElement("div",w({tabIndex:i?-1:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},d,{className:"Chip-wrapper ".concat(o),onClick:function(){s&&s()}}),n&&a.createElement(Ne,{"data-test":"DesignSystem-GenericChip--Icon",name:n,appearance:h("left"),className:p("left")}),"string"==typeof t?a.createElement(a.Fragment,null,u&&a.createElement(xe,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:m,className:"Chip-text mr-3"},u),a.createElement(xe,{"data-test":"DesignSystem-GenericChip--Text",color:m,className:"Chip-text"},t)):t,r&&a.createElement("div",{role:"button",onClick:f,tabIndex:i?-1:0,onKeyDown:function(e){"Enter"===e.key&&f(e)},className:p("right"),"data-test":"DesignSystem-GenericChip--clearButton"},a.createElement(Ne,{name:"clear",appearance:h("right"),className:"p-2"})))};Fe.displayName="GenericChip";var He=function(e){var t=e.label,n=e.icon,r=e.clearButton,i=e.type,o=e.disabled,c=e.selected,l=e.onClose,s=e.onClick,u=e.name,d=e.className,p=e.labelPrefix,f=J(e),h="action"!==i&&r,m=!("selection"!==i||!c),v=Z(b(b(b(b(b({Chip:!0},"Chip-".concat(i,"--disabled"),o),"Chip--".concat(i),i&&!o),"Chip-".concat(i,"--selected"),c&&!o),"Chip-selection--selectedDisabled","selection"===i&&c&&o),"Chip-icon--clear",h),d);return a.createElement(Fe,w({"data-test":"DesignSystem-Chip--GenericChip"},f,{label:t,selected:m,icon:n,clearButton:h,disabled:o,className:v,onClose:function(){!o&&l&&l(u)},onClick:function(){!o&&s&&s(u)},name:u,labelPrefix:p}))};He.displayName="Chip",He.defaultProps={type:"input"};var We=function(e){var t=e.list,n=e.onClick,r=e.onClose,i=e.className,o=J(e),c=function(e){n&&n(e)},l=function(e){r&&r(e)},s=Z(b({},"ChipGroup",!0),i);return a.createElement("div",w({"data-test":"DesignSystem-ChipGroup"},o,{className:s}),t.map((function(e,t){var n=e.label,r=void 0===n?"":n,i=e.icon,o=e.type,s=e.disabled,u=e.selected,d=e.clearButton,p=e.name;return a.createElement("span",{key:t,className:"ChipGroup-item"},a.createElement(He,{"data-test":"DesignSystem-ChipGroup--Chip",name:p,label:r,selected:u,icon:i,disabled:s,clearButton:d,type:o,onClick:function(){return c(e)},onClose:function(){return l(e)}}))})))};We.displayName="ChipGroup";var Ve=function(e){var t=e.expanded,n=e.hoverable,r=e.expandedWidth,i=e.height,o=e.children,c=e.className,l=e.onToggle,s=e.withTrigger,u=C(a.useState(!0),2),d=u[0],p=u[1],f=C(a.useState(!1),2),h=f[0],m=f[1],v=a.createRef(),y=J(e);a.useEffect((function(){v.current&&m(v.current.scrollHeight>v.current.clientHeight)}));var g=Z(b(b({},"Collapsible-wrapper",!0),"Collapsible-wrapper--overlay",!d)),x=Z(b(b({},"Collapsible-body",!0),"overflow-hidden",!t&&n)),S=Z(b(b({Collapsible:!0},"Collapsible--overlay",!d),"Collapsible--shadow",!d&&t),c),E=Z(b(b({},"Collapsible-footer",!0),"Collapsible-footer--seperator",h)),O=function(e,r){return function(){if(l){if("mouseenter"===r||"mouseleave"===r){if(d&&t||!n)return;p(!1)}"click"===r&&p(!0),l(e)}}},k=t?r:void 0;return a.createElement("div",{"data-test":"DesignSystem-CollapsibleWrapper",className:g,style:{height:i}},a.createElement("div",w({"data-test":"DesignSystem-Collapsible"},y,{"data-layer":!0,className:S,style:{width:k}}),a.createElement("div",{className:x,"data-test":"DesignSystem-CollapsibleBody",onMouseEnter:O(!0,"mouseenter"),onMouseLeave:O(!1,"mouseleave"),ref:v},o),s&&a.createElement("div",{role:"button",tabIndex:0,className:E,"data-test":"DesignSystem-Collapsible--Footer",onClick:O(!t,"click"),onKeyDown:O(!t,"click")},a.createElement(Ne,{name:t?"keyboard_arrow_left":"keyboard_arrow_right","data-test":"DesignSystem-Collapsible--FooterIcon",className:"px-6 py-4 my-2 cursor-pointer",size:16}))))};Ve.displayName="Collapsible",Ve.defaultProps={expanded:!1,hoverable:!0,height:"100%",expandedWidth:"240px",withTrigger:!0};var Ue=["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"],Ge=a.forwardRef((function(e,t){var n=e.size,r=e.sizeXS,i=e.sizeS,o=e.sizeM,c=e.sizeL,l=e.sizeXL,s=e.className,u=e.children,d=O(e,Ue),p=Z(b(b(b(b(b(b(b(b({},"Col",!0),"Col--".concat(n),n),"Col--xs-".concat(r),r),"Col--s-".concat(i),i),"Col--m-".concat(o),o),"Col--l-".concat(c),c),"Col--xl-".concat(l),l),"".concat(s),s));return a.createElement("div",w({ref:t,"data-test":"DesignSystem-Column"},d,{className:p}),u)}));Ge.displayName="Column";var qe=function(e){var t=e.vertical,n=e.appearance,r=e.className,i=J(e),o=Z(b(b(b(b(b({},"Divider",!0),"Divider--horizontal",!t),"Divider--vertical",t),"Divider--basic",!t&&"header"!==n),"Divider--header",!t&&"header"===n),r);return a.createElement("hr",w({"data-test":"DesignSystem-Divider"},i,{className:o}))};function $e(e,t,n,r){var a,i=!1,o=0;function c(){a&&clearTimeout(a)}function l(){for(var l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];var d=this,p=Date.now()-o;function f(){o=Date.now(),n.apply(d,s)}i||(r&&!a&&f(),c(),void 0===r&&p>e?f():!0!==t&&(a=setTimeout(r?function(){a=void 0}:f,void 0===r?e-p:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){c(),i=!0},l}function Ke(e,t,n){return void 0===n?$e(e,t,!1):$e(e,n,!1!==t)}qe.displayName="Divider",qe.defaultProps={appearance:"basic",vertical:!1};var Xe=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error"],Ye=a.forwardRef((function(e,t){var n=e.triggerSize,r=void 0===n?"regular":n,i=e.placeholder,o=void 0===i?"Select":i,c=e.menu,l=void 0!==c&&c,s=e.children,u=e.icon,d=e.disabled,p=e.open,f=e.inlineLabel,h=e.error,m=O(e,Xe),v=d?"disabled":"default",y=o.trim(),g=s||y,x=l?u||"more_horiz":"keyboard_arrow_down",S=Z(b(b(b(b(b(b(b(b({},"Button",!0),"DropdownButton",!0),"DropdownButton--".concat(r),r),"DropdownButton--".concat(r,"Square"),l),"DropdownButton--placeholder",!s&&!l),"DropdownButton--icon",u),"DropdownButton--open",p),"DropdownButton--error",h)),E=Z(b(b(b({},"Text",!0),"Text--regular",!0),"DropdownButton-text",!0));return a.createElement("button",w({ref:t,type:"button",value:s,className:S,disabled:d,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},m),!l&&a.createElement("div",{className:"DropdownButton-wrapper"},f&&a.createElement(xe,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(f.trim().charAt(0).toUpperCase()).concat(f.trim().slice(1))),u&&!f&&a.createElement(Ne,{appearance:v,className:"d-flex align-items-center mr-4",name:u}),g&&a.createElement("span",{className:E},g)),a.createElement(Ne,{appearance:v,name:x}))}));Ye.displayName="DropdownButton";var Ze=function(e){var t=e.length,n=e.size,r=e.className,i=J(e),o=Z(b({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(n),n)),c=Z(b(b({"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(t),t),"PlaceholderParagraph-wrapper--size-".concat(n),n),r);return a.createElement("div",w({},i,{className:c}),a.createElement("span",{className:o}))};Ze.displayName="PlaceholderParagraph",Ze.defaultProps={length:"medium"};var Je=function(e){var t=e.size,n=void 0===t?"small":t,r=e.round,i=e.className,o=J(e),c=Z(b(b({PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),"PlaceholderImage--".concat(n),n),i);return a.createElement("span",w({},o,{className:c}))};Je.displayName="PlaceholderImage",Je.defaultProps={size:"small"};var Qe=function(e){var t=e.imageSize,n=e.withImage,r=e.round,i=e.children,o=e.className,c=J(e),l=Z(b({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),s=Z(b({},"Placeholder",!0),o);return a.createElement("div",w({"data-test":"DesignSystem-Placeholder"},c,{className:s}),n&&a.createElement(Je,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),i&&a.createElement("div",{className:l,"data-test":"DesignSystem-Placeholder--Paragraph"},i))};Qe.displayName="Placeholder",Qe.defaultProps={withImage:!0,imageSize:"small"};var et=function(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return a.createElement(Ze,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return a.createElement(Qe,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},a.createElement(Ze,{length:"large"}));case"WITH_META":return a.createElement(Qe,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},a.createElement(Ze,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),a.createElement(Ze,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return a.createElement(Qe,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},a.createElement(Ze,{length:"large"}));case"ICON_WITH_META":return a.createElement(Qe,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},a.createElement(Ze,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),a.createElement(Ze,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null},tt=b(b(b(b(b({},"DEFAULT",(function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,i=e.optionData,o=e.color,c=e.onUpdateActiveOption,l=e.dataTest,s=i.label,u=i.disabled;return a.createElement("div",{className:t,onClick:r,onMouseEnter:c,"data-test":l,"data-disabled":u},a.createElement("div",{className:"Option-label"},a.createElement(xe,{className:n,color:o,id:i.optionID},s)))})),"WITH_ICON",(function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,i=e.optionData,o=e.onUpdateActiveOption,c=e.color,l=e.dataTest,s=i.label,u=i.icon,d=i.disabled,p=Z(b(b({},"".concat(t),!0),"Option--icon",u));return a.createElement("div",{className:p,onClick:r,onMouseEnter:o,"data-test":l,"data-disabled":d},u&&a.createElement(Ne,{className:"Option-icon mr-4","data-test":"".concat(l,"--Icon"),name:u}),a.createElement("div",{className:"Option-label"},a.createElement(xe,{className:n,color:c},s)))})),"WITH_META",(function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,i=e.optionData,o=e.onUpdateActiveOption,c=e.renderSubInfo,l=e.color,s=e.dataTest,u=i.subInfo,d=i.label,p=i.disabled;return a.createElement("div",{className:t,onClick:r,onMouseEnter:o,"data-test":s,"data-disabled":p},a.createElement("div",{className:"Option-label"},a.createElement(xe,{className:n,color:l},d),u&&c(u)))})),"WITH_CHECKBOX",(function(e){var t=e.className,n=e.selected,r=e.optionData,i=e.onChangeHandler,o=e.onUpdateActiveOption,c=e.dataTest,l=e.id,s=void 0===l?"":l,u=r.subInfo,d=r.label,p=r.disabled;return a.createElement("div",{className:t,onMouseEnter:o,"data-test":c,"data-disabled":p},a.createElement(Be,{label:d,disabled:p,checked:n,onChange:i,tabIndex:-1,className:"OptionCheckbox ".concat(u?"pb-0":""),"data-test":"".concat(c,"--Checkbox"),id:s}),u&&a.createElement("div",{className:"pl-8 ml-3"},function(e){var t=p?"disabled":"subtle",r=n?"white":"disabled";if("string"==typeof e)return a.createElement(xe,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);var i=e.list,o=void 0===i?[]:i,c=e.seperator;return a.createElement(It,{list:o,seperator:c,iconAppearance:r,labelAppearance:t,seperatorAppearance:r,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})}(u)))})),"ICON_WITH_META",(function(e){var t=e.className,n=e.textClassName,r=e.renderSubInfo,i=e.onClickHandler,o=e.optionData,c=e.onUpdateActiveOption,l=e.appearance,s=e.color,u=e.dataTest,d=o.subInfo,p=o.label,f=o.icon,h=o.disabled,m=Z(b(b({},"".concat(t),!0),"Option--icon",f));return a.createElement("div",{className:m,onClick:i,onMouseEnter:c,"data-test":u,"data-disabled":h},f&&a.createElement(Ne,{"data-test":"".concat(u,"--Icon"),className:"Option-icon mr-4",name:f,appearance:l}),a.createElement("div",{className:"Option-label"},a.createElement(xe,{className:n,color:s},p),d&&r(d)))})),nt=function(e){var t=e.optionData,n=e.selected,r=e.onClick,i=e.updateActiveOption,o=e.onChange,c=e.active,l=e.index,s=e.checkboxes,u=e.menu,d=e.id,p=void 0===d?"":d,f=(t.optionType?t:e).optionType,h=void 0===f?"DEFAULT":f,m=t.disabled,v=m?"inverse-lightest":n&&!u?"primary-dark":"inverse",y=m?"disabled":n&&!u?"primary_dark":"default",g=s?"WITH_CHECKBOX":h,x=tt[g],S=Z(b(b(b(b(b(b({},"Option",!0),"Option--active",c),"Option--selected",n&&!u),"Option--disabled",m),"OptionWrapper",!0),"color-".concat(v),!0)),E=Z(b(b(b({},"Option-checkbox",!0),"Option-checkbox--active",c),"OptionWrapper",!0)),O=Z(b(b({},"Option-text",!0),"Option-text--wrap",!e.truncateOption)),k=Z(b(b({},"OptionWrapper",!0),"OptionWrapper--disabled",m)),C=function(){m||i&&i(l)};if(e.optionRenderer)return a.createElement("div",w({"data-test":"DesignSystem-DropdownOption--Custom",className:k,"data-disabled":m,onMouseEnter:C},!s&&{onClick:r}),e.optionRenderer({optionData:t,selected:n,onChange:o,active:c,index:l}));return x({selected:n,index:l,renderSubInfo:function(e){var t=m?"disabled":n&&!u?"white":"subtle",r=m?"inverse-lightest":n&&!u?"primary-dark":"inverse-lighter",i=n?"white":"disabled";if("string"==typeof e)return a.createElement(xe,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:r,size:"small",weight:"medium",className:"Option-subInfo"},e);var o=e.list,c=void 0===o?[]:o,l=e.seperator;return a.createElement(It,{list:c,seperator:l,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})},optionData:t,textClassName:O,appearance:y,color:v,onClickHandler:function(e){e.stopPropagation(),m||r&&r()},onChangeHandler:function(e){e.stopPropagation(),m||o&&o(e)},onUpdateActiveOption:C,dataTest:"DesignSystem-DropdownOption--".concat(g),className:s?E:S,id:p})},rt=function(e){return e.sort((function(e,t){return e.value>t.value?1:t.value>e.value?-1:0}))},at=function(e,t){var n=rt(N(e)),r=rt(N(t));return n.length===r.length&&n.every((function(e,t){return e.value===r[t].value}))},it=function(e){return void 0!==e},ot=function(e){return void 0!==e},ct=function(e,t,n){return e&&n&&""===t},lt=function(e,t,n,r){return r&&n&&0===t&&""===e},st=function(e,t){e.scrollTo(0,t)},ut=function(e,t,n){if(e.length){if(e.length>0&&n>0&&e.length===t-n)return{indeterminate:!0,checked:!0};var r=e.