@innovaccer/rich-text-editor 2.3.0-0 → 2.3.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/rich-text-editor.js +4 -4
- package/package.json +1 -1
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
module.exports=(n=>{var r={};function o(e){var t;return(r[e]||(t=r[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=103)})([function(e,t){e.exports=React},function(e,t,n){e.exports=n(200)()},function(e,t,n){var r=n(104),o=n(25),i=n(12),a=n(120),s=n(19),l=n(40),c=n(42),u=n(60),p=n(121),f=n(76),h=n(30),d=n(9),m=n(58),g=n(8),y=n(48),v=n(188),b=n(87),_=n(31),S=n(189),E=n(192),w=n(15),x=n(88),C=n(198),n=n(85);e.exports={Editor:p,EditorBlock:f,EditorState:g,CompositeDecorator:a,Entity:h,EntityInstance:m,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:l,RawDraftContentState:v,SelectionState:_,AtomicBlockUtils:r,KeyBindingUtil:y,Modifier:d,RichUtils:b,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:u,convertFromHTML:n,convertFromRaw:E,convertToRaw:S,genKey:w,getDefaultKeyBinding:x,getVisibleSelectionRect:C}},function(e,Xl,Ql){!function(f){Ql.d(Xl,"a",function(){return Pe}),Ql.d(Xl,"b",function(){return ft}),Ql.d(Xl,"c",function(){return ut}),Ql.d(Xl,"d",function(){return wn}),Ql.d(Xl,"e",function(){return kn}),Ql.d(Xl,"f",function(){return R}),Ql.d(Xl,"g",function(){return Tn}),Ql.d(Xl,"h",function(){return Bn}),Ql.d(Xl,"i",function(){return Gn}),Ql.d(Xl,"j",function(){return q}),Ql.d(Xl,"k",function(){return G}),Ql.d(Xl,"l",function(){return Ua}),Ql.d(Xl,"m",function(){return Te}),Ql.d(Xl,"n",function(){return M});var Se=Ql(0),g=Ql.n(Se),v=Ql(14);Ql(49);function y(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ee(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){we(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Z(e){return(Z="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)}function b(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function _(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){b(r,t,n,o,i,"next",e)}function i(e){b(r,t,n,o,i,"throw",e)}o(void 0)})}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(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,r.key,r)}}function a(e,t,n){t&&S(e.prototype,t),n&&S(e,n)}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(){return(xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function e(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}}),t&&w(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(n){var r=(()=>{if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}})();return function(){var e,t=E(n),t=(e=r?(e=E(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Y(t)}}function Ce(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}})(e,t)||x(e,t)||(()=>{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 ke(e){return(e=>{if(Array.isArray(e))return D(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||x(e)||(()=>{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 x(e,t){var n;if(e)return"string"==typeof e?D(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}function D(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 O(e,t){var n,r,o,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,o=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw o}}};if(Array.isArray(e)||(a=x(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){var n;return t?"number"==typeof t?(n=B(e,t),V(e,n)):t:""}function T(e,t){function n(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":r=e.split("/");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy/mm/dd":r=e.split("/");return n(+r[2]||1,+r[1]||1,+r[0]||1900);case"dd-mm-yyyy":r=e.split("-");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm-dd-yyyy":r=e.split("-");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy-mm-dd":r=e.split("-");return n(+r[2]||1,+r[1]||1,+r[0]||1900);default:return!1}return!1}function A(e,t){var n=(e=z(t,e)).hours,e=e.minutes;return(N(t)?n<=12:n<24)&&e<=60}function I(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))}we(n={},"hh:mm","--:--"),we(n,"hh:mm AM","--:-- AM");var F=n,N=function(e){return"hh:mm AM"===e},L=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},j=function(e,t){var n=e;return t?("PM"===t&&e<12?n=e+12:"AM"===t&&12===e&&(n=e-12),n):e},B=function(e,t){var t=new Date(t),n=t.getHours(),r=N(e)?L(n).hrs:n,e=N(e)?L(n).AMPM:"";return{hours:r,minutes:t.getMinutes(),seconds:t.getSeconds(),am_pm:e}},z=function(e,t){var n=0,r=0,o=e.length,i=t.length,a=e.substring(o-2,o),a="AM"===a||"PM"===a,s=a?t.substring(i-2,i):"",i=a?t.substring(0,i-3):t,t=a?e.substring(0,o-3):e,l=i.split(":");return t.split(":").forEach(function(e,t){switch(e){case"hh":n=+l[t]||0;break;case"mm":r=+l[t]||0}}),{hours:n,minutes:r,am_pm:s}},V=function(e,t){var n=t.hours,r=t.minutes,t=t.am_pm,o=e.split(" ")[0].split(":"),i="";return o.forEach(function(e,t){switch(e){case"hh":i+=n<10?"0".concat(n):n;break;case"mm":i+=r<10?"0".concat(r):r}t!==e.length-1&&(i+=":")}),i+=N(e)&&t?" ".concat(t):""},K=function(e){for(var t=arguments.length,n=new Array(1<t?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)})},H={"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/]},W={"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/]},X=(we(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),we(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==f?f:"undefined"!=typeof self?self:{};function ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}function te(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},{})}function ne(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=Oe(e),o=(u=Ce(fe(null),2))[0],i=u[1],a=(u=Ce(Se.useState(e.open),2))[0],s=u[1],l=(u=Ce(Se.useState(e.open),2))[0],c=u[1],u=De({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":l,"Backdrop-animation--close":!l},n);return pe(function(){return e.open&&(i(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),s(!0),c(!0)),e.open||(window.setTimeout(function(){s(!1)},120),c(!1),t()),function(){t()}},[e.open]),v.createPortal(Se.createElement("div",xe({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:u,style:{zIndex:e.zIndex}})),document.body)}var De=t(function(e){function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r,o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n))n.length&&(r=a.apply(null,n))&&e.push(r);else if("object"==o)if(n.toString===Object.prototype.toString)for(var i in n)s.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}
|
|
1
|
+
module.exports=(n=>{var r={};function o(e){var t;return(r[e]||(t=r[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=103)})([function(e,t){e.exports=React},function(e,t,n){e.exports=n(200)()},function(e,t,n){var r=n(104),o=n(25),i=n(12),a=n(120),s=n(19),l=n(40),c=n(42),u=n(60),p=n(121),f=n(76),h=n(30),d=n(9),m=n(58),g=n(8),y=n(48),v=n(188),b=n(87),_=n(31),S=n(189),E=n(192),w=n(15),x=n(88),C=n(198),n=n(85);e.exports={Editor:p,EditorBlock:f,EditorState:g,CompositeDecorator:a,Entity:h,EntityInstance:m,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:l,RawDraftContentState:v,SelectionState:_,AtomicBlockUtils:r,KeyBindingUtil:y,Modifier:d,RichUtils:b,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:u,convertFromHTML:n,convertFromRaw:E,convertToRaw:S,genKey:w,getDefaultKeyBinding:x,getVisibleSelectionRect:C}},function(e,ec,tc){!function(f){tc.d(ec,"a",function(){return Pe}),tc.d(ec,"b",function(){return ft}),tc.d(ec,"c",function(){return ut}),tc.d(ec,"d",function(){return wn}),tc.d(ec,"e",function(){return kn}),tc.d(ec,"f",function(){return R}),tc.d(ec,"g",function(){return Tn}),tc.d(ec,"h",function(){return Bn}),tc.d(ec,"i",function(){return Gn}),tc.d(ec,"j",function(){return q}),tc.d(ec,"k",function(){return G}),tc.d(ec,"l",function(){return Ua}),tc.d(ec,"m",function(){return Te}),tc.d(ec,"n",function(){return M});var Se=tc(0),g=tc.n(Se),v=tc(14);tc(49);function y(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ee(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){we(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Z(e){return(Z="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)}function b(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function _(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){b(r,t,n,o,i,"next",e)}function i(e){b(r,t,n,o,i,"throw",e)}o(void 0)})}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(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,r.key,r)}}function a(e,t,n){t&&S(e.prototype,t),n&&S(e,n)}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(){return(xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function e(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}}),t&&w(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(n){var r=(()=>{if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}})();return function(){var e,t=E(n),t=(e=r?(e=E(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Y(t)}}function Ce(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}})(e,t)||x(e,t)||(()=>{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 ke(e){return(e=>{if(Array.isArray(e))return D(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||x(e)||(()=>{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 x(e,t){var n;if(e)return"string"==typeof e?D(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}function D(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 O(e,t){var n,r,o,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,o=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw o}}};if(Array.isArray(e)||(a=x(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){var n;return t?"number"==typeof t?(n=B(e,t),V(e,n)):t:""}function T(e,t){function n(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":r=e.split("/");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy/mm/dd":r=e.split("/");return n(+r[2]||1,+r[1]||1,+r[0]||1900);case"dd-mm-yyyy":r=e.split("-");return n(+r[0]||1,+r[1]||1,+r[2]||1900);case"mm-dd-yyyy":r=e.split("-");return n(+r[1]||1,+r[0]||1,+r[2]||1900);case"yyyy-mm-dd":r=e.split("-");return n(+r[2]||1,+r[1]||1,+r[0]||1900);default:return!1}return!1}function A(e,t){var n=(e=z(t,e)).hours,e=e.minutes;return(N(t)?n<=12:n<24)&&e<=60}function I(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))}we(n={},"hh:mm","--:--"),we(n,"hh:mm AM","--:-- AM");var F=n,N=function(e){return"hh:mm AM"===e},L=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},j=function(e,t){var n=e;return t?("PM"===t&&e<12?n=e+12:"AM"===t&&12===e&&(n=e-12),n):e},B=function(e,t){var t=new Date(t),n=t.getHours(),r=N(e)?L(n).hrs:n,e=N(e)?L(n).AMPM:"";return{hours:r,minutes:t.getMinutes(),seconds:t.getSeconds(),am_pm:e}},z=function(e,t){var n=0,r=0,o=e.length,i=t.length,a=e.substring(o-2,o),a="AM"===a||"PM"===a,s=a?t.substring(i-2,i):"",i=a?t.substring(0,i-3):t,t=a?e.substring(0,o-3):e,l=i.split(":");return t.split(":").forEach(function(e,t){switch(e){case"hh":n=+l[t]||0;break;case"mm":r=+l[t]||0}}),{hours:n,minutes:r,am_pm:s}},V=function(e,t){var n=t.hours,r=t.minutes,t=t.am_pm,o=e.split(" ")[0].split(":"),i="";return o.forEach(function(e,t){switch(e){case"hh":i+=n<10?"0".concat(n):n;break;case"mm":i+=r<10?"0".concat(r):r}t!==e.length-1&&(i+=":")}),i+=N(e)&&t?" ".concat(t):""},K=function(e){for(var t=arguments.length,n=new Array(1<t?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)})},H={"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/]},W={"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/]},X=(we(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),we(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==f?f:"undefined"!=typeof self?self:{};function ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}function te(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},{})}function ne(e){function t(){document.body.style.overflow=o||"",i(null)}var n=e.className,r=Oe(e),o=(u=Ce(fe(null),2))[0],i=u[1],a=(u=Ce(Se.useState(e.open),2))[0],s=u[1],l=(u=Ce(Se.useState(e.open),2))[0],c=u[1],u=De({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":l,"Backdrop-animation--close":!l},n);return pe(function(){return e.open&&(i(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),s(!0),c(!0)),e.open||(window.setTimeout(function(){s(!1)},120),c(!1),t()),function(){t()}},[e.open]),v.createPortal(Se.createElement("div",xe({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:u,style:{zIndex:e.zIndex}})),document.body)}var De=t(function(e){function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r,o=typeof n;if("string"==o||"number"==o)e.push(n);else if(Array.isArray(n))n.length&&(r=a.apply(null,n))&&e.push(r);else if("object"==o)if(n.toString===Object.prototype.toString)for(var i in n)s.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var s;s={}.hasOwnProperty,e.exports?e.exports=a.default=a:window.classNames=a}),Oe=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?Ee(Ee({},e),{},we({},t,n[t])):Ee({},e)},{})},re=Se.createContext({size:"regular",appearance:"secondary",firstName:"",lastName:""}),oe=re.Provider,ie={secondary:"inverse",primary:"white",alert:"white",accent2:"white",accent3:"white",warning:"warning_darker",success:"success_darker",accent1:"accent1_darker",accent4:"accent4_darker"},ae={regular:32,tiny:24},se=2,le="secondary",ce=["accent4","primary","accent3","alert","accent2","warning","accent1","success"],ue=function(e){function t(){return i&&"string"!=typeof i?Se.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:b,role:m},Se.createElement(oe,{value:E},Se.createElement("span",xe({"data-test":"DesignSystem-Avatar"},g,{className:v,tabIndex:h||p?-1:0}),i))):Se.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:b,role:m},Se.createElement("span",xe({"data-test":"DesignSystem-Avatar"},g,{className:v,tabIndex:h||p?-1:0}),y&&Se.createElement(Te,{weight:"medium",appearance:"white",className:_},y),!y&&Se.createElement(R,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?20:16,appearance:"white",className:S})))}var n=e.withTooltip,r=e.tooltipPosition,o=e.size,i=e.children,a=e.firstName,s=e.lastName,l=e.className,c=e.appearance,u=e.shape,p=e.disabled,f=e.tooltipSuffix,h=e.tabIndex,d=e.role,m=void 0===d?"presentation":d,g=Oe(e),y=i&&"string"==typeof i?i.trim().slice(0,se):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),d=c||ce[(y.charCodeAt(0)+(y.charCodeAt(1)||0))%8]||le,v=De((we(e={Avatar:!0},"Avatar--square","square"===u),we(e,"Avatar--".concat(o),"square"!==u),we(e,"Avatar--".concat(d),d),we(e,"Avatar--noInitials",!y||!n),we(e,"Avatar--disabled",p),we(e,"Avatar--default",!p),e),l),b=De((we(c={},"Avatar-wrapper--square","square"===u),we(c,"Avatar--".concat(o),"square"===u),c)),_=De((we(e={},"Avatar-content--".concat(o),o),we(e,"Avatar-content--".concat(d),d),e)),S=De(we({},"Avatar-content--".concat(d),d)),E={size:o,firstName:a,lastName:s,appearance:d};return n&&y?Se.createElement(M,{tooltip:i&&"string"==typeof i?"".concat(i," ").concat(f||""):"".concat(a||""," ").concat(s||""," ").concat(f||"")||"",position:r,triggerClass:"flex-grow-0"},t()):t()},pe=(ue.displayName="Avatar",ue.Icon=function(e){var t=Se.useContext(re),n=t.size,t=t.appearance;return Se.createElement(R,xe({},e,{size:"regular"===n?20:16,appearance:t&&ie[t]||"inverse"}))},ue.Image=function(e){var t=e.children,n=e.src,r=Ce(Se.useState(!1),2),o=r[0],i=r[1],r=Se.useContext(re),a=r.size,s=r.appearance,l=r.firstName,r=r.lastName,e=Oe(e),r="".concat(l?l.trim()[0]:"").concat(r?r.trim()[0]:""),c=a&&ae[a],u=De((we(u={},"Avatar-content--".concat(a),a),we(u,"Avatar-content--".concat(s),s),u)),s=De(we({},"Avatar-content--".concat(s),s));return t?Se.createElement(Se.Fragment,null,t):o?r?Se.createElement(Te,xe({weight:"medium",appearance:"white",className:u},e),r):Se.createElement(R,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===a?20:16,appearance:"white",className:s}):Se.createElement("img",xe({"data-test":"DesignSystem-Image",src:n,alt:l},e,{height:c,width:c,onError:function(){i(!0)}}))},ue.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular",shape:"round"},Se.useEffect),fe=Se.useState,he=(ne.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconType"]),de={tiny:12,regular:16,large:20},me=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.appearance,r=void 0===r?"basic":r,o=e.iconAlign,o=void 0===o?"left":o,i=e.tabIndex,i=void 0===i?0:i,a=e.largeIcon,s=e.type,l=e.children,c=e.icon,u=e.expanded,p=e.selected,f=e.loading,h=e.disabled,d=e.className,m=e.iconType,e=U(e,he),p=De((we(g={},"Button",!0),we(g,"Button--expanded",u),we(g,"Button--".concat(n),n),we(g,"Button--".concat(n,"Square"),!l),we(g,"Button--".concat(r),r),we(g,"Button--selected",p&&("basic"===r||"transparent"===r)),we(g,"Button--iconAlign-".concat(o),l&&o),we(g,"".concat(d),d),g)),g=De((we(d={},"Button-icon",!0),we(d,"Button-icon--".concat(o),l&&o),we(d,"Button-regularIcon--".concat(o),l&&o&&"regular"===n&&!u),d));return Se.createElement("button",xe({"data-test":"DesignSystem-Button",ref:t,type:s,className:p,disabled:h||f,tabIndex:i},e),f?Se.createElement(Se.Fragment,null,Se.createElement(Xn,{size:"small",appearance:"basic"===r||"transparent"===r?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),Se.createElement(Te,{className:"Button-text Button-text--hidden"},l||"")):Se.createElement(Se.Fragment,null,c&&Se.createElement("div",{className:g,"data-test":"DesignSystem-Button--Icon-Wrapper"},Se.createElement(R,{"data-test":"DesignSystem-Button--Icon",name:c,type:m,size:a&&!l?de[n]+4:de[n]})),l&&Se.createElement("span",{className:"Button-text"},l)))}),Pe=Se.forwardRef(function(e,t){var n=e.icon,r=e.tooltip;return n&&r&&!e.children?Se.createElement(M,{tooltip:r},Se.createElement(me,xe({},e,{ref:t}))):Se.createElement(me,xe({},e,{ref:t}))});Pe.displayName="Button";function ge(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function ye(e,t){return new Date(e,t+1,0).getDate()}function ve(e,t,n){if(e){var r=J(e).decadeYear;switch(t){case"less":if(r<n)return!0;break;case"more":if(n<r)return!0;break;case"equal":if(r===n)return!0}}return!1}function $(e,t,n,r,o){if(e){var e=J(e),i=e.year,a=e.month,s=e.date;switch(t){case"less":if(i<n)return!0;if(n<i)return!1;if(void 0!==r){if(a<r)return!0;if(r<a)return!1}if(void 0!==o&&s<o)return!0;break;case"more":if(n<i)return!0;if(i<n)return!1;if(void 0!==r){if(r<a)return!0;if(a<r)return!1}if(void 0!==o&&o<s)return!0;break;case"equal":if(void 0!==o){if(i===n&&a===r&&s===o)return!0}else if(void 0!==r){if(i===n&&a===r)return!0}else if(i===n)return!0}}return!1}function C(e,t){var r,o,i,a,s;return e&&t?(t=J(t),r=t.year,o=t.month,i=t.date,a=e.includes("/")?"/":"-",(s=e.split(a)).reduce(function(e,t,n){switch(t){case"mm":e+=(o<9&&"0")+(o+1);break;case"yyyy":e+=r;break;case"dd":e+=(i<10&&"0")+i}return n!==s.length-1&&(e+=a),e},"")):""}function be(e,t){var n,r,o,i,a;if(K(2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],t,e))return n=e.includes("/")?"/":"-",i=o=r=-1,a=t.split(n),e.split(n).forEach(function(e,t){switch(e){case"mm":o=+a[t]-1;break;case"yyyy":r=+a[t];break;case"dd":i=+a[t]}}),m({year:r,month:o,date:i})}function _e(e,t,n,r,o){var i=new Date("".concat(o,"-").concat(r,"-").concat(n));if(e)switch(t){case"less":return e<=i;case"equal":return e.toDateString()===i.toDateString();case"more":return i<=e;default:return!1}return!1}function Me(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=e.tabIndex,e=U(e,rt);return Ee({},n?{onClick:n,role:o,tabIndex:t||0,"aria-label":e["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,it(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,tabIndex:t,"aria-label":e["aria-label"]})}function Ae(e){function t(e){var t;return De((we(t={},"Chip-icon",!0),we(t,"Chip-icon--".concat(e),e),we(t,"Chip-icon-disabled--right","right"===e&&l),we(t,"cursor-pointer","right"===e&&!l),we(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),p&&p()}function r(){f&&f()}function o(e){var t;return De((we(t={},"primary_dark",u),we(t,"subtle",!u&&"right"===e),we(t,"inverse",!u&&"left"===e),t))}var i=e.label,a=e.icon,s=e.clearButton,l=e.disabled,c=e.className,u=e.selected,p=e.onClose,f=e.onClick,h=e.labelPrefix,d=e.iconType,m={maxWidth:e.maxWidth},g=(_=Ce(Se.useState(!1),2))[0],y=_[1],v=M.useAutoTooltip().detectTruncation,b=Se.createRef(),_=(Se.useEffect(function(){var e=v(b);y(e)},[b]),Oe(e)),e=De((we(e={},"primary-dark",u),we(e,"inverse",!l&&!u),e));return Se.createElement(M,{showTooltip:g,"data-test":"DesignSystem-GenericChip--Tooltip",tooltip:(g="string"==typeof i?i:"",h?"".concat(h," ").concat(g):g),triggerClass:"flex-grow-0"},Se.createElement("div",xe({tabIndex:l?-1:0,style:m,"data-test":"DesignSystem-GenericChip--Wrapper",role:"button",onKeyDown:function(e){"Enter"===e.key&&r()}},_,{className:"Chip-wrapper ".concat(c),onClick:r}),a&&Se.createElement(R,{"data-test":"DesignSystem-GenericChip--Icon",name:a,type:d,appearance:o("left"),className:t("left")}),"string"==typeof i?Se.createElement("div",{className:"Chip-text--truncate",ref:b},h&&Se.createElement(Te,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:e,className:"Chip-text mr-3"},h),Se.createElement(Te,{"data-test":"DesignSystem-GenericChip--Text",color:e,className:"Chip-text"},i)):i,s&&Se.createElement("div",{role:"button",onClick:n,tabIndex:l?-1:0,onKeyDown:function(e){"Enter"===e.key&&n(e)},className:t("right"),"data-test":"DesignSystem-GenericChip--clearButton"},Se.createElement(R,{name:"clear",appearance:o("right"),className:"p-2"}))))}function Ie(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})}function Re(e){switch(e.name){case"checked--regular":return g.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.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 g.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.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 g.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return g.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function Fe(e){var o=e.inputFormat,i=e.inputOptions,a=e.validators,s=e.setState,e=(r=e.state).init,t=r.date,l=void 0===(n=i.placeholderChar)?"_":n,n=i.error||i.required&&r.error&&e,r=void 0===i.caption?"Invalid value":i.caption,c=H[o];return Se.createElement(Fn,xe({icon:"events",placeholder:o},i,{error:n,mask:c,value:t?C(o,t):e?Fn.utils.getDefaultValue(c,l):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(l)&&(t=be(o,t,a),s({date:t})),n&&n(e)},onPaste:function(e,t){var n,r=i.onPaste;s({open:!0}),t&&!t.includes(l)&&(n=be(o,t,a),s({date:n})),r&&r(e,t)},onBlur:function(e,t){var n=i.onBlur,r=(s({init:!0}),/\d/);t&&r.test(t)&&t.includes(l)?s({error:!0}):(!t||r.test(t))&&t||s({error:!1}),n&&n(e,t||"")},onClear:function(e){var t=i.onClear;s({init:!0,date:void 0}),t&&t(e)},caption:n?r:"",validators:[function(e){return K(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function Ne(e,t){var e=en(ke(e)),n=en(ke(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function Le(e){return void 0!==e}function je(e){return void 0!==e}function Be(e,t,n){return e&&n&&""===t}function ze(e,t,n,r){return r&&n&&0===t&&""===e}function Ve(e,t,n){return e.length?0<e.length&&0<n&&e.length===t-n?{indeterminate:!0,checked:!0}:(n=0<e.length&&e.length!==t,{checked:0<e.length&&e.length===t,indeterminate:n}):{indeterminate:!1,checked:!1}}function He(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Ke(e){var t,n,r,o,i,a,s=e.open,l=e.endTime,c=e.interval,u=e.onChange,p=e.startTime,f=e.timeFormat,h=e.showDuration,d=e.noResultMessage,m=e.disabledSlotList,g=e.fetchTimeOptions,y=e.error,v=Ce(Se.useState(0),2),b=v[0],_=v[1],S=(v=Ce(Se.useState(!1),2))[0],E=v[1],w=(v=Ce(Se.useState(-1),2))[0],x=v[1],C=(v=Ce(Se.useState(0),2))[0],k=v[1],D=(t=(v=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,v=e.id,e=t?wt(t):"00:00",n=n?wt(n):At(t),e=Dt(e,n,r),Mt(e,o,v,i,t,a));return Se.useEffect(function(){void 0!==s&&E(s)},[s]),Se.useEffect(function(){var e;return S&&-1!=w&&(_(w),e=setTimeout(function(){He(w,D)},100)),function(){clearTimeout(e)}},[S]),Se.useEffect(function(){k(C+1)},[p,l,c,h,m]),Se.createElement(wn,{key:C,maxHeight:160,loadersCount:0,withSearch:!0,open:S,tabIndex:b,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(gt(f)&&(e=Et(e)),D.findIndex(function(e){return e.value===t}));x(n),u&&u(e)},fetchOptions:g||function(e){n=e,t=Xt(t=D);var t,n,r=""===n?(r=Rt(),Yt(t,r)):Qt(t,n);return _(t=""===e&&-1!=w?w:r),Promise.resolve({options:-1===r?[]:D,count:D.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:d,staticLimit:D.length,onPopperToggle:function(){E(!S)},error:y})}function Ue(e){var t=e.validators,s=e.inputOptions,l=e.inputFormat,c=e.outputFormat,u=e.onTimeChange,n=e.time,e=e.error,p=(i=Ce(Se.useState(n),2))[0],r=i[1],o=(i=Ce(Se.useState(!1),2))[0],f=i[1],h=void 0===(i=s.placeholderChar)?"_":i,i=(Se.useEffect(function(){var e=P(l,p),e=void 0===n&&e.includes(h)?p:n;r(e)},[n]),X[l]);return Se.createElement(Fn,xe({placeholder:F[l],placeholderChar:h},s,{mask:i,value:p?P(l,p):o?Fn.utils.getDefaultValue(i,h):"",validators:function(e){return K(t,e,l)},onChange:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=null==t?void 0:t.toUpperCase();r(n),s.onChange&&s.onChange(e,t)},onClear:function(e){f(!0),u&&u(""),s.onClear&&s.onClear(e)},onBlur:function(e){var t,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=P(l,p);f(!0),u&&(r=!a||(r=h,(o=a)&&o.includes(r))?void 0:(o=a,(r=l)===(a=c)?o:(o=(r=z(r,o)).hours,t=r.minutes,r=r.am_pm,n=N(a)?L(o).AMPM:"",o=N(a)?L(o).hrs:j(o,r),V(a,{minutes:t,hours:o,am_pm:n}))),u(r)),s.onBlur&&s.onBlur(e,i)},error:e,id:"parent-TimePicker"}))}var We=12,Ge=3,qe=12,Ye=3,$e=7,Je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ze={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},Xe=We,Qe=function(e){return e-e%Xe},J=function(e){var t,n,r;return(e=e&&m(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:Qe(t),year:t,month:n,day:r,date:e}):{}},m=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?be(t,e,n):void 0;r=e instanceof Date?e:(t=e.year,new Date(t,e.month,e.date,0,0,0))}return r},et=(()=>{e(f,Se["Component"]);var p=d(f);function f(e){h(this,f),we(Y(q=p.call(this,e)),"updateState",function(e,t,n){q.setState({year:e,month:t,date:n})}),we(Y(q),"getDateValue",function(e,t,n){return new Date(e,t,n)}),we(Y(q),"getNavDateInfo",function(e){var t=q.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%qe==-1?11:(t+e)%qe,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),we(Y(q),"getInRangeError",function(){var e=q.props,t=e.rangePicker,e=e.rangeLimit,n=q.state,r=n.startDate,o=n.endDate,n=n.hoverDate;if(t&&e){var i,t=J(r),a=t.year,s=t.month,t=t.date,l=J(o),c=l.year,u=l.month,l=l.date,n=J(n),p=n.year,f=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),$(i,"less",p,f,n+1)||$(i,"less",c,u,l+1);if(o)return(i=new Date(o)).setDate(l-e),$(i,"more",p,f,n-1)||$(i,"more",a,s,t-1)}return!1}),we(Y(q),"selectYear",function(e){return function(){q.updateState(e),q.setState({view:"month"})}}),we(Y(q),"yearMouseOverHandler",function(e,t,n,r){var o=q.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),we(Y(q),"selectMonth",function(e){return function(){q.updateState(q.state.yearNav,e),q.setState({view:"date"})}}),we(Y(q),"monthMouseOverHandler",function(e,t,n,r){var o=Je,i=q.props.onMonthHover,o={value:o[e],month:o[e],year:q.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),we(Y(q),"selectDate",function(e,t,n,r){e=q.calculateDate(e,t,n,r,!1);q.setState({currDate:e})}),we(Y(q),"calculateDate",function(e,t,n,r,o){var i,a,s="",n=(t<=0?(i=e-1,a=n+t,s="prev"):a=(i=e,t),q.getNavDateInfo(i)),e=n.year,t=n.month;return!1===o&&(q.updateState(e,t,a),q.onNavIconClickHandler(s)()),q.getDateValue(e,t,a)}),we(Y(q),"onNavIconClickHandler",function(s){return function(){var e=q.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=We,a=qe;switch(t){case"year":"prev"===s&&q.setState({yearBlockNav:n-i}),"next"===s&&q.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&q.setState({yearNav:r-1}),"next"===s&&q.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&q.setState({yearNav:r-1}),q.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&q.setState({yearNav:r+1}),q.setState({monthNav:(o+1)%a}))}}}),we(Y(q),"renderJumpButton",function(e){var t=q.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=q.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,l=o.monthNav,c=!1;switch(i){case"year":"prev"===e&&(c=ve(n,"more",a)||ve(n,"equal",a)),"next"===e&&(c=ve(r,"less",a)||ve(r,"equal",a));break;case"month":"prev"===e&&(c=$(n,"more",s-1)),"next"===e&&(c=$(r,"less",s+1));break;case"date":"prev"===e&&(c=$(n,"more",s,l-1)),"next"===e&&(c=$(r,"less",s,l+1))}o=De(we({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return Se.createElement(Pe,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:c,size:"small"===t?"tiny":"regular",onClick:q.onNavIconClickHandler(e)})}),we(Y(q),"onNavHeadingClickHandler",function(n){return function(){var e=q.props.monthsInView,t=q.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&q.setState({view:"date"}),"month"===n&&q.setState({view:"year"}),"date"===n)&&q.setState({view:"month"})}}),we(Y(q),"renderHeaderContent",function(e){function t(e){return"small"===r?Se.createElement(Se.Fragment,null,Se.createElement(Te,{weight:"strong"},e),"year"!==a&&!i&&Se.createElement(R,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):Se.createElement(Se.Fragment,null,Se.createElement(kn,{size:"s"},e),"year"!==a&&!i&&Se.createElement(R,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=q.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=q.state,a=n.view,n=n.yearBlockNav,s=We,l=Je,c=q.getNavDateInfo(e),u=c.year,c=c.month,o=De({"Calendar-headerContent":!0,"Calendar-headerContent--noIcon-left":e===o-1,"Calendar-headerContent--noIcon-right":0===e}),e="";"year"===a&&(e="".concat(n," - ").concat(n+(s-1))),"month"===a&&(e="".concat(u));return Se.createElement("div",{className:o},"date"!==a&&Se.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:q.onNavHeadingClickHandler(a)},t(e)),"date"===a&&Se.createElement(Se.Fragment,null,Se.createElement("div",{onClick:q.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(l[c])),Se.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:q.onNavHeadingClickHandler("month")},t(u))))}),we(Y(q),"renderBodyYear",function(){var e=We,c=Ge,t=q.props,u=t.size,p=t.rangePicker,f=t.disabledBefore,h=t.disabledAfter,t=q.state,d=t.yearBlockNav,m=t.currYear,t=Math.ceil(e/c);return Array.from({length:t},function(e,l){return Se.createElement("div",{key:l,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){var n,r,o,i,a,s=c*l+t;if(s!==d)return a=!(s=$(f,"more",n=d+s)||$(h,"less",n))&&!p&&n===q.state.year,r=function(){return n===m},o=De((we(o={"Calendar-value":!0,"Calendar-value--active":a,"Calendar-value--disabled":s,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(u),u),we(o,"Calendar-value--currDateMonthYear",r()),o)),i=De({"Calendar-value--currDate":r()&&!a,"Calendar-text":!0}),a=De({inverse:!a&&!r()&&!s,white:a,"primary-lighter":r()&&s,primary:r(),"inverse-lightest":s}),Se.createElement("div",{key:"".concat(l,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:q.selectYear(n),onMouseOver:q.yearMouseOverHandler.bind(Y(q),n,r(),s)},Se.createElement(Te,{size:"small"===u?"small":"regular",color:a,className:i},n))}))})}),we(Y(q),"renderBodyMonth",function(){var e=qe,c=Ye,u=Je,t=q.props,p=t.size,f=t.disabledBefore,h=t.disabledAfter,t=q.state,d=t.yearNav,m=t.year,g=t.currYear,y=t.currMonth,t=Math.ceil(e/c);return Array.from({length:t},function(e,l){return Se.createElement("div",{key:l,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){function n(){return g===d&&y===r}var r=c*l+t,o=$(f,"more",d,r)||$(h,"less",d,r),i=!o&&m===d&&r===q.state.month,a=De((we(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(p),p),we(a,"Calendar-value--currDateMonthYear",n()),a)),s=De({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o}),i=De({"Calendar-value--currDate":n()&&!i,"Calendar-text":!0});return Se.createElement("div",{key:"".concat(l,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:q.selectMonth(r),onMouseOver:q.monthMouseOverHandler.bind(Y(q),r,n(),o)},Se.createElement(Te,{size:"small"===p?"small":"regular",color:s,className:i},u[r]))}))})}),we(Y(q),"onDateRowMouseLeaveHandler",function(){q.props.rangePicker&&q.setState({hoverDate:void 0})}),we(Y(q),"renderBodyDate",function(e){var o=$e,i=Ze,t=q.props,a=t.size,s=t.firstDayOfWeek,l="large"===a?"regular":"small";return Se.createElement(Se.Fragment,null,Se.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=De({"Calendar-valueWrapper":!0}),r=(t+o+ge(s))%o;return Se.createElement(Te,{key:t,className:n,appearance:"default",weight:"strong",size:l},i[a][r])})),Se.createElement("div",{className:"Calendar-dateValues",onMouseLeave:q.onDateRowMouseLeaveHandler},q.renderDateValues(e)))}),we(Y(q),"renderDateValues",function(_){function S(e){return function(){(!D||M&&A||!W)&&q.selectDate(_,e,H,K)}}function E(t){return function(){var e;D&&(e=q.getDateValue(z,V,t),M&&A||q.setState({hoverDate:e}))}}function w(e,t,n,r){var e=q.calculateDate(_,e,H,K,!0)||new Date,o=Je,i=Ze.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:q.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var x=$e,C=qe,e=q.props,k=e.size,D=e.rangePicker,t=e.firstDayOfWeek,O=e.disabledBefore,P=e.disabledAfter,T=e.monthsInView,a=e.onDateHover,e=q.state,M=e.startDate,A=e.endDate,I=e.hoverDate,R=e.year,F=e.month,N=e.date,L=e.currMonth,j=e.currYear,B=e.todayDate,e=q.getNavDateInfo(_),z=e.year,V=e.month,H=ye(z,V-1),K=ye(z,V),e=new Date(z,V).getDay(),t=ge(t),U=Math.abs((e-t+7)%7),e=Math.ceil((K+U)/x),W=(6===e||1<T||(e+=1),q.getInRangeError()),G=q.props.events;return Array.from({length:e},function(e,b){return Se.createElement("div",{key:b,className:"Calendar-valueRow"},Array.from({length:x},function(e,t){function n(){var e=r<=0?j===z&&L===V-1&&B===H+r:K<r?j===z&&L===V+1&&B===r-K:j===z&&L===V&&B===r;return e}var r=x*b+t-U+1,o=r<=0||K<r,i=$(O,"more",z,V,r)||$(P,"less",z,V,r),a=!i&&R===z&&F===V&&N===r,s=!1,l=J(M),l=(l.year,J(A)),l=(l.year,A&&!1),c=M&&!1,u="".concat(r<=0?H+r:K<r?r-K:r),p="".concat(r<=0?0===V?V+C:(V-1)%C+1:K<r?(V+1)%C+1:V+1),f="".concat(r<=0&&V+1===1?z-1:K<r&&V+1===12?z+1:z),h="".concat(2===p.length?p:"0".concat(p),"/").concat(2===u.length?u:"0".concat(u),"/").concat(f),h=G&&"object"===Z(G)&&G.hasOwnProperty(h),d=(D&&(d=$(M,"equal",z,V,r),m=$(A,"equal",z,V,r),g=$(I,"equal",z,V,r),a=!i&&(d||m),M&&A?s=!i&&(_e(M,"less",u,p,f)&&_e(A,"more",u,p,f)||d||m):M?s=!i&&(_e(I,"more",u,p,f)||g)&&_e(M,"less",u,p,f):A&&(s=!i&&(_e(I,"less",u,p,f)||g)&&_e(A,"more",u,p,f))),s&&W),m=M&&_e(M,"equal",u,p,f),g=A&&_e(A,"equal",u,p,f),y=M&&A&&(m||g),v=q.props.allowReverseSelection&&_e(I,"equal",u,p,f)&&I&&(M&&I<M||A&&I<A),u=_e(I,"equal",u,p,f)&&I&&M&&M<=I,p=0===t||6===t,f=s||D&&(a||y),s=De({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--disabled":i,"Calendar-valueWrapper--inRange":!p&&f,"Calendar-valueWrapper--inEdgeRange":f&&p,"Calendar-valueWrapper--inRangeError":d,"Calendar-valueWrapper--start":l&&!c&&6!==t||D&&m&&6!==t,"Calendar-valueWrapper--end":c&&!l&&0!==t||D&&g&&0!==t,"Calendar-valueWrapper--startEnd":l&&c,"Calendar-valueWrapper--startError":l&&d||D&&d&&m,"Calendar-valueWrapper--endError":c&&d||D&&d&&g,"Calendar-valueWrapper--dummy":o&&!i&&!y,"Calendar-valueWrapper--active-dummy":o&&!i&&y,"Calendar-valueWrapper--hoverDate":D&&u,"Calendar-valueWrapper--hoverEndDate":D&&v,"Calendar-valueWrapper--inStartRange":f&&0===t&&!a&&!y,"Calendar-valueWrapper--inEndRange":f&&6===t&&!a&&!y}),m=De((we(p={"Calendar-value":!0,"Calendar-inRangeValue":!(l||c||a||y),"Calendar-value--start":l&&!c,"Calendar-value--end":c&&!l,"Calendar-value--startError":l&&d,"Calendar-value--endError":c&&d,"Calendar-value--active":a||y,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(k),k),we(p,"Calendar-value--currDateMonthYear",n()),we(p,"Calendar-value--currDate",n()&&!a&&!y),p)),g=De({inverse:!(a||n()||i||y),white:a||y,primary:n()});return Se.createElement("div",{key:"".concat(b,"-").concat(t),className:s,"data-test":"designSystem-Calendar-WrapperClass"},!o&&Se.createElement(Se.Fragment,null,Se.createElement(Te,{color:g,size:"small"===k?"small":"regular",appearance:i?"subtle":"default","data-test":"DesignSystem-Calendar--dateValue",className:m,onClick:S(r),onMouseOver:E(r),onMouseEnter:w.bind(Y(q),r,n(),i)},r),h&&q.renderEventsIndicator(k,a)),(o&&0<r&&_===T-1||o&&r<=0&&0===_)&&Se.createElement(Se.Fragment,null,Se.createElement(Te,{appearance:a||y?"white":n()?"link":"subtle",size:"small"===k?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:m,onClick:S(r),onMouseOver:E(r),onMouseEnter:w.bind(Y(q),r,n(),i)},r<=0?H+r:r-K),h&&q.renderEventsIndicator(k,a)))}))})}),we(Y(q),"renderCalendar",function(e){var t=q.props,n=t.size,t=t.monthsInView,r=q.state.view,o=De((we(o={},"Calendar",!0),we(o,"Calendar-".concat(r,"--").concat(n),r),we(o,"Calendar--".concat(n),n),o)),n=De(we({},"Calendar-header--".concat(n),n)),i=De({"Calendar-body":!0});return Se.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},Se.createElement("div",{className:n},0===e&&q.renderJumpButton("prev"),q.renderHeaderContent(e),e===t-1&&q.renderJumpButton("next")),Se.createElement("div",{className:i},"year"===r&&q.renderBodyYear(),"month"===r&&q.renderBodyMonth(),"date"===r&&q.renderBodyDate(e)))});var q,t=q.props,n=t.rangePicker,r=t.startDate,o=t.endDate,i=t.monthsInView,t=t.view,n=n?o||r:e.date,a=void 0!==e.yearNav?e.yearNav:J(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:J(n||Date.now()).month,s=J(n),l=s.year,c=s.month,s=s.date,u=J(new Date(Date.now()));return q.state={currDate:n,startDate:r,endDate:o,yearNav:a,monthNav:e,year:l,month:c,date:s,todayDate:u.date,currMonth:u.month,currYear:u.year,view:1<i?"date":t,yearBlockNav:Qe(a)},q}return a(f,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(r=(i=J(this.props.date)).year,this.updateState(r,i.month,i.date),r=m(this.props.date),this.setState({currDate:r})),this.props.startDate&&!isNaN(this.props.startDate.getTime())&&e.startDate!==this.props.startDate&&(i=m(this.props.startDate),this.setState({startDate:i})),this.props.endDate&&!isNaN(this.props.endDate.getTime())&&e.endDate!==this.props.endDate&&(r=m(this.props.endDate),this.setState({endDate:r})),e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav&&(i=this.props.yearNav)&&this.setState({yearNav:i,yearBlockNav:Qe(i)}),e.monthNav!==this.props.monthNav&&(r=this.props.monthNav)&&this.setState({monthNav:r}),t.currDate!==this.state.currDate&&(e=(i=this.props).rangePicker,r=i.onDateChange,a=(i=this.state).currDate,o=i.startDate,i=i.endDate,a)&&(r&&r(a),e?(this.setState({hoverDate:void 0}),o&&i?this.setState({startDate:a,endDate:void 0}):(e=(r=J(a)).year,n=r.month,r=r.date,o?$(o,"more",e,n,r)?this.setState({startDate:a}):this.setState({endDate:a}):i&&$(i,"less",e,n,r)?this.setState({endDate:a}):this.setState({startDate:a}))):this.setState({startDate:a})),(this.state.startDate&&!isNaN(this.state.startDate.getTime())&&(null==(o=t.startDate)?void 0:o.getTime())!==(null==(i=this.state.startDate)?void 0:i.getTime())||this.state.endDate&&!isNaN(null==(e=this.state.endDate)?void 0:e.getTime())&&(null==(n=t.endDate)?void 0:n.getTime())!==(null==(r=this.state.endDate)?void 0:r.getTime()))&&(a=this.props.onRangeChange,i=(o=this.state).startDate,a)&&a(i,o.endDate),this.props.allowReverseSelection&&t.hoverDate!==this.state.hoverDate&&(n=(e=this.state).hoverDate,r=e.endDate,(a=e.startDate)&&!r?(o=(i=J(a)).year,$(n,"less",o,i.month,i.date)&&this.setState({startDate:void 0,endDate:a})):r&&!a&&(o=(e=J(r)).year,$(n,"more",o,e.month,e.date))&&this.setState({startDate:r,endDate:void 0})),t.year!==this.state.year&&void 0!==(i=this.state.year)&&1===s&&this.setState({year:i,yearBlockNav:Qe(i),yearNav:i}),t.month!==this.state.month&&void 0!==(a=this.state.month)&&1===s&&this.setState({monthNav:a})}},{key:"renderEventsIndicator",value:function(e,t){var n,e=De((we(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),we(n,"Calendar-eventsIndicator--active",t),n));return Se.createElement("span",{"data-test":"DesignSystem-Calendar-Event-Indicator",className:e})}},{key:"render",value:function(){var n=this,e=this.props,t=e.monthsInView,e=e.className,r=Oe(this.props),e=De({"Calendar-wrapper":!0},e);return Se.createElement("div",xe({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),f})(),tt=(we(et,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=Se.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"shadow10":r,o=e.children,i=e.className,e=U(e,tt),r=De((we(n={Card:!0},"Card--".concat(r),r),we(n,"".concat(i),i),n));return Se.createElement("div",xe({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),nt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),rt=(Se.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=U(e,nt),n=De(we({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return Se.createElement("div",xe({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role","tabIndex"]),ot={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},it=function(e,t){return!!ot[e]&&ot[e].has(t)},at={timelapse:"outlined",content_copy:"outlined",speed:"outlined",add_circle_outline:"outlined",turned_in_not:"outlined",important_devices:"outlined",thumb_down_off_alt:"outlined",alarm_on:"outlined",calendar_view_month:"outlined",aspect_ratio:"outlined",change_history:"outlined",arrow_circle_down:"outlined",card_membership:"outlined",query_builder:"outlined",copyright:"outlined",arrow_circle_up:"outlined",alarm:"outlined",work_outline:"outlined",bookmark_border:"outlined",delete_outline:"outlined",credit_card:"outlined",highlight_of:"outlined",check_circle_outline:"outlined",help_outline:"outlined",schedule:"outlined",radio_button_unchecked:"outlined",radio_button_checked:"outlined",delete:"outlined"},R=function(e){var t,n=e.appearance,r=e.className,o=e.name,i=e.size,a=e.children,s=Me(e),l=Oe(e),e=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||o&&at[o]||"rounded",c=n&&n.includes("_")?(t=(c=n).indexOf("_"),c.slice(0,t)+c.charAt(t+1).toUpperCase()+c.slice(t+2)):n,e=De((we(t={},"material-symbols",!0),we(t,"material-symbols-rounded","rounded"===e),we(t,"material-symbols-outlined","outlined"===e),we(t,"Icon",!0),we(t,"Icon--".concat(c),n),we(t,"".concat(r),r),t)),n={fontSize:"".concat(i,"px"),width:"".concat(i,"px")};return a&&Se.isValidElement(a)?Se.createElement("span",xe({},l,{className:r}),a):Se.createElement("i",xe({"data-test":"DesignSystem-Icon"},l,{className:e,style:n},s),o)},st=(R.displayName="Icon",R.defaultProps={size:16},["children","componentType","className"]),lt=Se.forwardRef(function(e,t){var n=e.children,r=e.componentType,r=void 0===r?"span":r,o=e.className,e=U(e,st);return Se.createElement(r,Ee(Ee({},e),{},{className:o,ref:t}),n)}),ct=["appearance","size","children","weight","small","className","color"],Te=Se.forwardRef(function(e,t){var n,r=e.appearance,r=void 0===r?"default":r,o=e.size,o=void 0===o?"regular":o,i=e.children,a=e.weight,s=e.small,l=e.className,c=e.color,e=U(e,ct),r=De((we(n={Text:!0},"Text--".concat(r),!c&&r),we(n,"Text--".concat(a),a),we(n,"Text--".concat(o),o),we(n,"color-".concat(c),c),we(n,"Text--small","small"===o||s),n),l);return Se.createElement(lt,xe({ref:t,"data-test":"DesignSystem-Text"},e,{className:r,componentType:"span"}),i)}),ut=(Te.displayName="Text",Te.defaultProps={appearance:"default",size:"regular"},Ae.displayName="GenericChip",Ae.defaultProps={maxWidth:"var(--spacing-9)"},function(e){var t,n=e.label,r=e.icon,o=e.clearButton,i=e.type,a=e.disabled,s=e.selected,l=e.onClose,c=e.onClick,u=e.name,p=e.className,f=e.labelPrefix,h=e.iconType,d=e.maxWidth,e=Oe(e),o="action"!==i&&o,m=!("selection"!==i||!s),i=De((we(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),we(t,"Chip--".concat(i),i&&!a),we(t,"Chip-".concat(i,"--selected"),s&&!a),we(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),we(t,"Chip-icon--clear",o),t),p);return Se.createElement(Ae,xe({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:m,icon:r,iconType:h,clearButton:o,disabled:a,className:i,onClose:function(){!a&&l&&l(u)},onClick:function(){!a&&c&&c(u)},name:u,labelPrefix:f,maxWidth:d}))}),pt=(ut.displayName="Chip",ut.defaultProps={type:"input",maxWidth:"var(--spacing-9)"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id","labelRef"]),ft=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.tabIndex,r=void 0===r?0:r,o=e.defaultChecked,i=e.indeterminate,a=e.label,s=e.error,l=e.disabled,c=e.onChange,u=e.name,p=e.value,f=e.className,h=e.checked,d=e.helpText,m=e.id,m=void 0===m?"".concat(u,"-").concat(a,"-").concat(Ie()):m,g=e.labelRef,y=U(e,pt),v=Se.useRef(null);Se.useImperativeHandle(t,function(){return v.current});var t=Ce(Se.useState(void 0===h?o:h),2),b=t[0],_=t[1],t=(Se.useEffect(function(){E(i)},[i]),Se.useEffect(function(){void 0!==h&&_(h)},[h]),De((we(t={},"Checkbox",!0),we(t,"Checkbox--disabled",l),t),f)),f=De((we(f={},"Checkbox-outerWrapper",!0),we(f,"Checkbox-outerWrapper--".concat(n),n),f)),e=De((we(S={},"Checkbox-input",!0),we(S,"Checkbox-input--checked",b),we(S,"Checkbox-input--indeterminate",e.indeterminate),S)),s=De((we(S={},"Checkbox-wrapper",!0),we(S,"Checkbox-wrapper--default",!s),we(S,"Checkbox-wrapper--error",s),S)),S=De((we(S={},"Checkbox-label",!0),we(S,"Checkbox-label--tiny","tiny"===n),S)),E=function(e){v.current.indeterminate=e},w=De((we(w={},"checked--regular",b&&"regular"===n),we(w,"checked--tiny",b&&"tiny"===n),we(w,"indeterminate--regular",i&&"regular"===n),we(w,"indeterminate--tiny",i&&"tiny"===n),w));return Se.createElement(Se.Fragment,null,Se.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},Se.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:f},Se.createElement("input",xe({},y,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===h&&(_(e.target.checked),E(e.target.indeterminate)),c&&c(e)},checked:b,disabled:l,ref:v,name:u,value:p,className:e,tabIndex:r,id:m,"data-test":"DesignSystem-Checkbox-InputBox"})),Se.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},w&&Se.createElement(Re,{name:w}))),Se.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&Se.createElement("label",{htmlFor:m,className:S,"data-test":"DesignSystem-Checkbox-Label"},Se.createElement(Te,{size:"tiny"===n?"small":"regular",appearance:l?"disabled":"default",className:"ellipsis--noWrap mw-100",ref:g},a.trim())),d&&Se.createElement(Te,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:l?"disabled":"subtle"},d.trim()))))}),ht=(ft.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),k=Se.forwardRef(function(e,t){var n,r=e.size,o=e.sizeXS,i=e.sizeS,a=e.sizeM,s=e.sizeL,l=e.sizeXL,c=e.className,u=e.children,e=U(e,ht),r=De((we(n={},"Col",!0),we(n,"Col--".concat(r),r),we(n,"Col--xs-".concat(o),o),we(n,"Col--s-".concat(i),i),we(n,"Col--m-".concat(a),a),we(n,"Col--l-".concat(s),s),we(n,"Col--xl-".concat(l),l),we(n,"".concat(c),c),n));return Se.createElement("div",xe({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),u)}),dt=(k.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children","view"]),n=(()=>{e(o,Se["Component"]);var r=d(o);function o(e){h(this,o),we(Y(c=r.call(this,e)),"getError",function(e){var t,n,r,o,i=c.props,a=i.disabledBefore,s=i.disabledAfter,l=i.outputFormat,i=i.onError;return!(!e||(t=(a=J(a)).year,n=a.month,a=a.date,r=(s=J(s)).year,o=s.month,s=s.date,!$(e,"less",t,n,a)&&!$(e,"more",r,o,s))||(i&&i(e,C(l,e)),0))}),we(Y(c),"onDateChangeHandler",function(e){c.setState({init:!0,date:e}),c.props.closeOnSelect&&c.setState({open:!1})}),we(Y(c),"onToggleHandler",function(e,t){var n=c.props.inputOptions.disabled;if(!n)switch(t){case"outsideClick":c.setState({open:e});break;case"onClick":c.setState({open:!0})}});var c,t=e.inputFormat,t=m(e.date,t,e.validators),n=c.getError(t);return c.state={date:t,error:n,init:!1,open:e.open||!1},c}return a(o,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.date!==this.props.date&&(n=(r=this.props).inputFormat,n=m(this.props.date,n,r.validators),this.setState({date:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date&&(n=(r=this.props).onDateChange,e=r.outputFormat,t=this.state.date,r=this.getError(t),this.setState({error:r}),n)&&(r?n(void 0,""):n(t,C(e,t)))}},{key:"renderCalendar",value:function(){var e=this,t=this.props,n=(t.date,t.inputFormat),r=t.validators,o=t.disabledBefore,i=t.disabledAfter,a=t.size,s=t.showTodayDate,s=void 0===s||s,l=t.children,l=void 0===l?Se.createElement(Se.Fragment,null):l,c=t.view,t=U(t,dt),u=this.state.date,p=Je,f=new Date(Date.now()),p="".concat(p[f.getMonth()]," ").concat(f.getDate()),f=m(u,n,r),u=m(o,n,r),o=m(i,n,r),i=De({"d-flex justify-content-center":!0,"pb-5":"small"===a,"pb-6":"large"===a,"pt-3":"large"===a&&"year"===c});return Se.createElement("div",null,Se.createElement("div",{className:"d-flex"},l,Se.createElement(et,xe({},t,{size:a,date:f,view:c,disabledBefore:u,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&Se.createElement("div",{className:i,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},Se.createElement(ut,{label:"Today, ".concat(p),name:"chip",type:"action",disabled:(n=!0,f&&u&&o?n=u<f&&f<o:f&&u?n=u<f:f&&o&&(n=f<o),!n),onClick:function(){return e.onDateChangeHandler(new Date)}})))}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.popoverOptions,r=this.state.open;return e.withInput?Se.createElement(Ua,xe({trigger:Se.createElement(Fe,{inputFormat:e.inputFormat,inputOptions:e.inputOptions,validators:e.validators,state:this.state,setState:this.setState.bind(this)})},n,{triggerClass:"w-100",position:t,appendToBody:!0,open:r,onToggle:this.onToggleHandler}),this.renderCalendar()):this.renderCalendar()}}]),o})(),mt=(we(n,"defaultProps",Ee(Ee({},et.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[T],inputOptions:{},closeOnSelect:!0})),function(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}),gt=function(e){return"12-Hour"===e},yt=function(e){return vt(e)||bt(e)},vt=function(e){return e.includes("a")||e.includes("A")},bt=function(e){return e.includes("p")||e.includes("P")},_t=function(e){var e=Ce(e.split(" "),2),t=e[0],e=e[1],t=t.split(":"),n=t[0],t=t[1];return"12"===n&&vt(e)&&(n="00"),bt(e)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)},St=function(e){return("0"+e).slice(-2)},Et=function(e){var e=e.split(":"),t=parseInt(e[0],10),n=12<=t?"PM":"AM",t=(t%12||12).toString(),t=St(t),e=e[1];return"".concat(t.toString(),":").concat(e," ").concat(n)},wt=function(e){return yt(e)?_t(e):e},xt=function(e,t){e=mt(e);return mt(t)<e},Ct=function(e,t,n){for(var r=[],o=mt(e),i=mt(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r},kt=function(e,t,n){var n=Ct("00:00","23:59",n),e=n.indexOf(e),r=n.indexOf(t),t=""===t?e:r+1,r=n.slice(e),e=n.slice(0,t);return r.concat(e)},Dt=function(e,t,n){return(""===t||xt(e,t)?kt:Ct)(e,t,n)},Ot=function(e,t){e=new Date("07/07/2022 "+e),t=new Date("07/07/2022 "+t).getTime()-e.getTime(),e=new Date(t);return{hour:e.getUTCHours(),minute:e.getUTCMinutes()}},Pt=function(e,t,n,r){var o=e;return gt(t)&&(o=Et(e)),n&&r&&(n=(t=Ot(r,e)).hour,r=t.minute,o+=" (".concat(n," hr ").concat(r," min)")),o},Tt=function(e,t,n){var r=e;return gt(t)&&(r=Et(e)),!!n.includes(r)},Mt=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"TimePicker-Option-key",o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0;return e.map(function(e,t){return{label:Pt(e,n,o,i),value:e,disabled:a&&Tt(e,n,a),selected:!1,optionID:r+t}})},At=function(e){return e?"":"23:59"},It=function(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)},Rt=function(){var e=new Date;return St(e.getHours())+":"+St(e.getMinutes())},Ft=function(e){return(parseInt(e,10)%24).toString()},Nt=function(e){return(parseInt(e,10)%12).toString()},Lt=function(e){return/^[0-9]+$/.test(e)},jt=function(e){return/^[0-9]+[ AaMmPp]+$/.test(e)},Bt=function(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)},zt=function(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(e)},Vt=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Ht=function(e){var e=e.split(Vt),t=Ft(e[0]);return{hour:St(t),min:((""!==e[1]?It(e[1]):"00")+"0").slice(0,2)}},Kt=function(e,t){var n=e.length,r=parseInt(e,10),o=e.slice(0,2),i="00",a="00";switch(n){case 1:i="0"+e;break;case 2:r<=24||t&&r<=12?i=St(e):(i="0"+e[0],a=It(e[1]+"0"));break;case 3:i="0"+e[0],a=It(e.slice(1));break;case 4:i=(t?Nt:Ft)(o),a=It(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}},Ut=function(e){e=e.split(/[\saAmMpP]/),e=Kt(e[0],!0);return{hour:e.hour,min:e.min}},Wt=function(e,t){var n,r={hour:"00",min:"00"};return Lt(t)?(n=Kt(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?qt(e,n):n):jt(t)?(r=Ut(t)).hour=Gt(r.hour,t):Bt(t)?(n=Ht(t),r=parseInt(n.hour)<=12?qt(e,n):n):zt(t)&&(e=t.replace(/[\saApPmM]/g,""),Lt(e)?r=Kt(e,!0):Bt(e)&&(r=Ht(e)),r.hour=Gt(r.hour,t)),r},Gt=function(e,t){return"12"===e&&vt(t)?e="00":bt(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e},qt=function(e,t){var n="".concat(t.hour,":").concat(t.min),r=Rt(),o=xt(r,n),r=Yt(e,r),e=Yt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t},Yt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=Ot(t,e[o]),a=i.hour,i=i.minute;(a<r.hour||a===r.hour&&i<r.mins)&&(r.hour=a,r.mins=i,n=o)}return n},$t=function(e,t){var t=Wt(e,t),n=t.hour,t=t.min,n=("60"===t&&(t="00",n=(parseInt(n,10)+1).toString()),"".concat(n,":").concat(t));return Yt(e,n)},Jt=function(e){return(null==(e=e.match(/\d/g))?void 0:e.length)||0},Zt=function(e){e=Jt(e);return 0<e&&e<5},Xt=function(e){return e.map(function(e){return e.value})},Qt=function(e,t){return Zt(t)?$t(e,t):-1},en=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},tn=function(e,t){e.scrollTo(0,t)};Ke.defaultProps={timeFormat:"12-Hour",interval:15},Ke.displayName="TimePickerWithSearch",Ue.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},Ue.displayName="TimePickerWithInput";function nn(a,s,l,c){var u,p=!1,f=0;function h(){u&&clearTimeout(u)}function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this,o=Date.now()-f;function i(){f=Date.now(),l.apply(r,t)}p||(c&&!u&&i(),h(),void 0===c&&a<o?i():!0!==s&&(u=setTimeout(c?function(){u=void 0}:i,void 0===c?a-o:a)))}return"boolean"!=typeof s&&(c=l,l=s,s=void 0),e.cancel=function(){h(),p=!0},e}function rn(e,t,n){return void 0===n?nn(e,t,!1):nn(e,n,!1!==t)}Ee(Ee({},Ue.defaultProps),Ke.defaultProps);function on(e){function t(){h||i&&i(l)}var n=e.optionData,r=e.selected,o=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,l=e.index,c=e.checkboxes,u=e.menu,p=void 0===(p=e.id)?"":p,f=(n.optionType?n:e).optionType,h=n.disabled,d=h?"inverse-lightest":r&&!u?"primary-dark":"inverse",m=h?"disabled":r&&!u?"primary_dark":"default",g=yn[f=c?"WITH_CHECKBOX":void 0===f?"DEFAULT":f],y=De((we(y={},"Option",!0),we(y,"Option--active",s),we(y,"Option--selected",r&&!u),we(y,"Option--disabled",h),we(y,"OptionWrapper",!0),we(y,"color-".concat(d),!0),y)),v=De((we(v={},"Option-checkbox",!0),we(v,"Option-checkbox--active",s),we(v,"OptionWrapper",!0),v)),b=De((we(b={},"Option-text",!0),we(b,"Option-text--wrap",!e.truncateOption),b)),_=De((we(_={},"OptionWrapper",!0),we(_,"OptionWrapper--disabled",h),_));return e.optionRenderer?Se.createElement("div",xe({"data-test":"DesignSystem-DropdownOption--Custom",className:_,"data-disabled":h,onMouseEnter:t},!c&&{onClick:o}),e.optionRenderer({optionData:n,selected:r,onChange:a,active:s,index:l})):g({selected:r,index:l,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?Se.createElement(Te,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:h?"inverse-lightest":r&&!u?"primary-dark":"inverse-lighter",size:"small",weight:"medium",className:"Option-subInfo"},e):(t=e.list,Se.createElement(zn,{list:void 0===t?[]:t,seperator:e.seperator,iconAppearance:n,labelAppearance:h?"disabled":r&&!u?"white":"subtle",seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"}))},optionData:n,textClassName:b,appearance:m,color:d,onClickHandler:function(e){e.stopPropagation(),h||o&&o()},onChangeHandler:function(e){e.stopPropagation(),h||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(f),className:c?v:y,id:p})}function an(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=Oe(e),r=De((we(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),we(t,"PlaceholderImage--".concat(n),n),t),o);return Se.createElement("span",xe({},e,{className:r}))}function sn(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return Se.createElement(G,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return Se.createElement(q,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large"}));case"WITH_META":return Se.createElement(q,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(G,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return Se.createElement(q,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large"}));case"ICON_WITH_META":return Se.createElement(q,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(G,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function ln(e){var t=e.dropdownStyle,n=e.errorType,r=e.updateOptions;return Se.createElement("div",{className:"Dropdown-wrapper px-7 d-flex",style:t,"data-test":"DesignSystem-Dropdown--wrapper"},Se.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center w-100","data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement(Te,{className:"text-align-center mb-3",weight:"strong"},vn[n]),Se.createElement(Te,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},bn[n]),"FAILED_TO_FETCH"===n&&Se.createElement(Pe,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:function(){return r()}},"Reload")))}function cn(i){function N(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&pe(e)}function L(){return Se.createElement(ln,{dropdownStyle:Ee(Ee({},ye),{},{minHeight:f}),updateOptions:ne,errorType:oe})}function o(e,t){Q(e,t),de||null!=(e=C.current)&&e.focus(),P(y)}function j(){var e;X(),null!=(e=C.current)&&e.focus()}function B(){var e;Z(),null!=(e=C.current)&&e.focus()}function z(){P(y),w&&_&&w("")}function V(e){P(y),w&&w(e.target.value)}function a(e,t){var n=i.onClearOptions,r=d.every(function(e){return e.disabled});return Se.createElement("div",{className:ve(t)},Se.createElement(Te,{size:"small",appearance:"subtle"},e),t&&Se.createElement(Pe,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=ze(_,g,p,E)?e+1===O:e===O,r=-1!==m.findIndex(function(e){return e.value===t.value}),o="Checkbox-option-".concat(e,"-").concat(t.value,"-").concat((new Date).getTime());return Se.createElement("label",{htmlFor:o,key:e},Se.createElement(on,{optionData:t,truncateOption:G,selected:r,index:e,updateActiveOption:_e,optionRenderer:J,active:n,checkboxes:E,menu:b,onClick:function(){return be(t)},onChange:function(e){return i.onSelect(t,e.target.checked)},optionType:i.optionType,id:o}))}function K(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),l="down"===e?O+1:O-1,c="down"===e?s.length:-1;l!==c;){if("true"!==s[l].getAttribute("data-disabled")){var u=s[l];u&&(n=se.current,r=u,a=i=o=void 0,o=null==n?void 0:n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=r.offsetHeight,i.bottom>o.bottom&&n?tn(n,r.offsetTop-o.height+a):i.top<o.top&&n&&tn(n,r.offsetTop-a)),void 0!==u&&P(l);break}"down"===e?l++:l--}}var U,e,s,l,r=void 0===(t=i.listOptions)?[]:t,W=i.inputRef,t=void 0===(t=i.align)?"right":t,n=void 0===(n=i.optionType)?"DEFAULT":n,c=void 0===(c=i.applyButtonLabel)?"Apply":c,u=void 0===(u=i.cancelButtonLabel)?"Cancel":u,G=void 0===(h=i.truncateOption)||h,p=void 0===(h=i.withSelectAll)||h,f=void 0===(h=i.maxHeight)?200:h,h=i.customTrigger,d=i.selected,m=i.tempSelected,q=i.previousSelected,g=i.remainingOptions,y=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,_=i.searchTerm,S=i.showApplyButton,E=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,w=i.onSearchChange,J=i.optionRenderer,Z=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,x=i.className,ee=void 0===(ee=i.searchPlaceholder)?"Search..":ee,te=i.scrollIndex,ne=i.updateOptions,re=i.noResultMessage,oe=i.errorType,ie=i.loadingOptions,ae=Oe(i),se=Se.createRef(),le=Se.createRef(),C=Se.createRef(),k=Se.createRef(),D=Se.createRef(),ce=(M=Ce(Se.useState(),2))[0],ue=M[1],O=(M=Ce(Se.useState(y),2))[0],P=M[1],T=(M=Ce(Se.useState(),2))[0],pe=M[1],M=0===r.length&&!ie&&d.length<=0;Se.useEffect(function(){var e,t,n;return v&&(n=i.width,t=null==(t=le.current)?void 0:t.clientWidth,n={width:n||t,minWidth:i.minWidth||(S?176:b?128:t),maxWidth:i.maxWidth||"100%"},requestAnimationFrame(N),ue(n),te)&&0===m.length&&(e=setTimeout(function(){He(te,r)},100)),function(){clearTimeout(e)}},[v]),Se.useEffect(function(){y!==O&&P(y)},[y]);var A=void 0===(A=i.triggerSize)?"regular":A,I=void 0===(I=i.placeholder)?"Select":I,fe=i.icon,he=i.error,de=i.disabled,R=i.inlineLabel,F=i.triggerLabel,me=i.iconType,ge=h?h(F||I):Se.createElement(Se.Fragment,null),h=h?Se.cloneElement(ge,{tabIndex:0,ref:C}):Se.createElement(gn,{placeholder:I,triggerSize:A,open:v,icon:fe,disabled:de,inlineLabel:R,menu:b,error:he,ref:C,iconType:me},F),ye={maxHeight:f,overflowY:"auto",overflowX:"hidden",minHeight:T},ge={maxHeight:T||f,overflowY:"auto",overflowX:"hidden",minHeight:T},ve=function(e){var t;return De((we(t={},"Dropdown-section",!0),we(t,"Dropdown-section--withClear",e),t))},I=De(we({},"Dropdown",!0),x),fe=De((we(A={},"Dropdown-wrapper",!0),we(A,"Dropdown-wrapper--wrap",!G),A)),he=De((we(R={},"Option-checkbox--active",0===O),we(R,"Option-checkboxWrapper",!0),we(R,"Option-checkbox",!0),we(R,"OptionWrapper",!0),R)),be=function(e){i.onOptionSelect(e),null!=(e=C.current)&&e.focus()},_e=function(e,t){t=E&&p&&!i.async&&!t?e+1:e;P(t)},me=Y||i.async;return Se.createElement("div",xe({},ae,{className:I,ref:le,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?K("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?K("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(W.current===r||C.current===r)&&(e.preventDefault(),r=E?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[O])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=D.current)?void 0:t.disabled,(r===k.current&&t||r===D.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===k.current?null!=(t=D.current)&&t.focus():null!=(r=k.current)&&r.focus()))}}}),Se.createElement(Ua,xe({onToggle:o,trigger:h,triggerClass:b?"":"w-100",open:v,customStyle:ce,position:_n[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),me&&Se.createElement("div",{className:"Dropdown-inputWrapper"},Se.createElement(Tn,{name:"Dropdown-search",icon:"search",value:_,placeholder:ee,autoFocus:!0,onChange:V,onClear:z,ref:W,autoComplete:"off",className:"Dropdown-input"})),(F=i.selectedSectionLabel,s=void 0===F?"Selected Items":F,F=void 0===(F=i.allItemsSectionLabel)?"All Items":F,T=void 0===(T=i.loadersCount)?10:T,x=void 0===(x=i.errorTemplate)?L:x,A=ze(_,g,p,E),l=(e=>(e=e.reduce(function(e,t){var n=t.group||"";return e[n]||(e[n]=[]),e[n].push(t),e},{}),Object.values(e).flatMap(ke)))(r),T&&ie?Se.createElement("div",{className:"Dropdown-loading"},Se.createElement("div",{className:"Dropdown-wrapper",style:ge},(e=T,e=Array(T).fill("Loading"),U=E?"WITH_CHECKBOX":n,e.map(function(e,t){return Se.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},Se.createElement(sn,{loadingType:U,optionIndex:t}))})))):M?re?Se.createElement("div",{className:"Dropdown-wrapper w-100",style:ye,"data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement("div",{className:"Option"},Se.createElement("div",{className:"Option-subinfo"},re))):x&&x({errorType:oe}):Se.createElement("div",{className:fe,style:ye,ref:se},A&&(T=i.selectAllLabel,e=i.selectAll,x=i.onSelectAll,T=(T=void 0===T?"Select All":T).trim()?T.trim():"Select All",A="Checkbox-option-".concat(T.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),Se.createElement("div",{className:he,onMouseEnter:function(){return _e(0,!0)}},Se.createElement("label",{htmlFor:A,className:"Checkbox-label"},Se.createElement(ft,{label:T,onChange:x,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:A})))),0<d.length&&a(s,!0),d.map(H),0<d.length&&0<r.length-d.length&&!(null!=(T=r[0].group)&&T.trim())&&a(F),l.map(function(e,t){var n=0<t?l[t-1].group:d.length?s:void 0,r=e.group,o=t+d.length;return Se.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),H(e,o))}),i.async&&0<g&&(x=i.footerLabel,Se.createElement("div",{className:"Dropdown-footer"},Se.createElement(Te,{size:"small",appearance:"subtle"},void 0===x?"Search for more options":x))))),S&&E&&(R=Ne(q,m)||i.loadingOptions,Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Pe,{ref:k,className:"mr-4",appearance:"basic",onClick:j,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},u),Se.createElement(Pe,{ref:D,appearance:"primary",disabled:R,size:"tiny",onClick:B,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},c)))))}function un(e){var t,n=e.className,r=e.iconType,e=U(e,Dn),n=De((we(t={},"ActionButton",!0),we(t,"".concat(n),n),t));return Se.createElement(R,xe({className:n,type:r,"data-test":"DesignSystem-Input-ActionButton"},e))}function pn(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===Z(e[r])?t:e[r];return n}function fn(e){var t=e.label,n=e.icon,r=e.size;return Se.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&Se.createElement(R,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",type:e.iconType,size:"regular"===r?16:12}),Se.createElement(Te,{size:r,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function hn(e){return"".concat((100*e).toFixed(2),"%")}function dn(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var mn=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error","iconType"],gn=Se.forwardRef(function(e,t){var n,r=e.triggerSize,r=void 0===r?"regular":r,o=e.placeholder,o=void 0===o?"Select":o,i=e.menu,i=void 0!==i&&i,a=e.children,s=e.icon,l=e.disabled,c=e.open,u=e.inlineLabel,p=e.error,f=e.iconType,e=U(e,mn),h=l?"disabled":"default",o=o.trim(),o=a||o,d=i?s||"more_horiz":"keyboard_arrow_down",r=De((we(n={},"Button",!0),we(n,"DropdownButton",!0),we(n,"DropdownButton--".concat(r),r),we(n,"DropdownButton--".concat(r,"Square"),i),we(n,"DropdownButton--placeholder",!a&&!i),we(n,"DropdownButton--icon",s),we(n,"DropdownButton--open",c),we(n,"DropdownButton--error",p),n)),p=De((we(c={},"Text",!0),we(c,"Text--regular",!0),we(c,"DropdownButton-text",!0),c));return Se.createElement("button",xe({ref:t,type:"button",value:a,className:r,disabled:l,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&Se.createElement("div",{className:"DropdownButton-wrapper"},u&&Se.createElement(Te,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(u.trim().charAt(0).toUpperCase()).concat(u.trim().slice(1))),s&&!u&&Se.createElement(R,{appearance:h,className:"d-flex align-items-center mr-4",name:s,type:f}),o&&Se.createElement("span",{className:p},o)),Se.createElement(R,{appearance:h,name:d,type:f}))}),yn=(gn.displayName="DropdownButton",we(n={},"DEFAULT",function(e){var t=e.className,n=e.optionData,r=n.label;return Se.createElement("div",{className:t,onClick:e.onClickHandler,onMouseEnter:e.onUpdateActiveOption,"data-test":e.dataTest,"data-disabled":n.disabled},Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:e.textClassName,color:e.color,id:n.optionID},r)))}),we(n,"WITH_ICON",function(e){var t,n=e.className,r=e.textClassName,o=e.onClickHandler,i=e.optionData,a=e.onUpdateActiveOption,s=e.color,e=e.dataTest,l=i.label,c=i.icon,u=i.disabled,i=i.iconType,n=De((we(t={},"".concat(n),!0),we(t,"Option--icon",c),t));return Se.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":u},c&&Se.createElement(R,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:c,type:i}),Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:r,color:s},l)))}),we(n,"WITH_META",function(e){var t=e.className,n=e.optionData,r=e.renderSubInfo,o=n.subInfo;return Se.createElement("div",{className:t,onClick:e.onClickHandler,onMouseEnter:e.onUpdateActiveOption,"data-test":e.dataTest,"data-disabled":n.disabled},Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:e.textClassName,color:e.color},n.label),o&&r(o)))}),we(n,"WITH_CHECKBOX",function(e){var t=e.className,n=e.selected,r=e.optionData,o=e.dataTest,i=e.id,i=void 0===i?"":i,a=r.subInfo,s=r.disabled;return Se.createElement("div",{className:t,onMouseEnter:e.onUpdateActiveOption,"data-test":o,"data-disabled":s},Se.createElement(ft,{label:r.label,disabled:s,checked:n,onChange:e.onChangeHandler,tabIndex:-1,className:"OptionCheckbox ".concat(a?"pb-0":""),"data-test":"".concat(o,"--Checkbox"),id:i}),a&&Se.createElement("div",{className:"pl-8 ml-3"},(t=s?"disabled":"subtle",r=n?"white":"disabled","string"==typeof(e=a)?Se.createElement(Te,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e):(o=e.list,Se.createElement(zn,{list:void 0===o?[]:o,seperator:e.seperator,iconAppearance:r,labelAppearance:t,seperatorAppearance:r,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),we(n,"ICON_WITH_META",function(e){var t,n=e.className,r=e.textClassName,o=e.renderSubInfo,i=e.onClickHandler,a=e.optionData,s=e.onUpdateActiveOption,l=e.appearance,c=e.color,e=e.dataTest,u=a.subInfo,p=a.label,f=a.icon,a=a.disabled,n=De((we(t={},"".concat(n),!0),we(t,"Option--icon",f),t));return Se.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},f&&Se.createElement(R,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:f,appearance:l}),Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:r,color:c},p),u&&o(u)))}),n),G=function(e){var t,n=e.length,r=e.size,o=e.className,e=Oe(e),i=De(we({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=De((we(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),we(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return Se.createElement("div",xe({},e,{className:n}),Se.createElement("span",{className:i}))},q=(G.displayName="PlaceholderParagraph",G.defaultProps={length:"medium"},an.displayName="PlaceholderImage",an.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=Oe(e),a=De(we({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=De(we({},"Placeholder",!0),i);return Se.createElement("div",xe({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&Se.createElement(an,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&Se.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),vn=(q.displayName="Placeholder",q.defaultProps={withImage:!0,imageSize:"small"},{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"}),bn={FAILED_TO_FETCH:"We couldn't load the data, try reloading.",NO_RECORDS_FOUND:"Try modifying your search to find what you are looking for.",DEFAULT:"We have nothing to show you at the moment."},_n={right:"bottom-start",left:"bottom-end"},Sn=(cn.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),En=Se.createRef(),wn=(()=>{e(u,Se["Component"]);var c=d(u);function u(e){h(this,u),we(Y(v=c.call(this,e)),"staticLimit",void 0),we(Y(v),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),we(Y(v),"fetchOptionsFunction",function(t){var n,e=v.props.options,r=t?(n=t,e.filter(function(e){return e.label.toLowerCase().includes(n.toLowerCase())})):e;return new Promise(function(e){e({searchTerm:t,options:r,count:r.length})})}),we(Y(v),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=v.props.selected,n=void 0===t?[]:t,e.filter(function(t){return Le(v.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===v.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),we(Y(v),"getSelectedOptions",function(e,t){var n=v.props.selected;return e.length?t?Le(v.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):v.state.tempSelected:[]}),we(Y(v),"updateOptions",function(l,e){var t=v.state,c=t.searchTerm,u=t.selectAll,p=t.tempSelected,f=t.previousSelected,h=t.errorType,d=void 0===e?v.state.async:e,t=v.props,m=t.fetchOptions,g=t.withCheckbox,y=t.withSearch;(m||v.fetchOptionsFunction)(c).then(function(e){var t,n,r,o,i,a=e.options,s=e.count;e.scrollToIndex&&setTimeout(function(){He(e.scrollToIndex,a)},0),e.searchTerm&&(e.searchTerm,e.searchTerm!==v.state.searchTerm)||(d=""===c?s>v.staticLimit:d,t=Be(d,c,g)?v.getUnSelectedOptions(a,l):a,n=""===c?v.getSelectedOptions(a,l):[],r=""===c?s:v.state.optionsLength,o=v.getDisabledOptions(t.slice(0,v.staticLimit)),i=h,i=0===r&&""===c?"DEFAULT":""!==c?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",v.setState(Ee(Ee({},v.state),{},{errorType:m?i:h,scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:d,searchedOptionsLength:s,options:t.slice(0,v.staticLimit),tempSelected:l?n:p,previousSelected:l?n:f,selected:Be(d,c,g)?n:[],triggerLabel:v.updateTriggerLabel(l?n:p),selectAll:!d&&l?Ve(n,r,o.length):u})),(d||y)&&null!=(i=En.current)&&i.focus())}).catch(function(){v.setState({errorType:m?"FAILED_TO_FETCH":h,loading:!1,options:[]})})}),we(Y(v),"updateSearchTerm",function(e){v.setState(Ee(Ee({},v.state),{},{loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"}))}),we(Y(v),"updateOnPopperToggle",function(){var e,t=v.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=v.state,s=a.previousSelected,l=a.tempSelected,c=a.optionsLength,u=a.async,p=a.loading,f=a.searchTerm,h=(je(v.props.open)?v.props:v.state).open,a=v.getDisabledOptions(a.options).length;n&&r&&(e=Le(v.props.selected)?t:s,v.setState({tempSelected:e,selectAll:Ve(e,c,a),triggerLabel:v.updateTriggerLabel(e)})),je(v.props.open)&&v.setState({open:h}),h&&(c=Be(u,f,n)&&!Ne(v.state.selected,l),v.setState({loading:c||p||""!==f,searchInit:""!==f,searchTerm:""}),c)&&v.updateOptions(!1),o&&!h&&(a=(n&&r?Le(v.props.selected)?t:s:v.state.tempSelected).map(function(e){return e.value}),v.debounceOnClose(a,i))}),we(Y(v),"debounceOnClose",rn(300,function(e,t){var n=v.props.onClose;n&&n(e,t)})),we(Y(v),"updateTriggerLabel",function(){var e,t,n,r,o,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a=i.length;return 0===a?"":(n=(e=v.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=v.state?v.state.optionsLength:1<arguments.length?arguments[1]:void 0,o="",o=a<=(void 0===n?2:n)?i.map(function(e){return e.label}).join(", "):t?t(a,r,i):"".concat(a," selected"),e&&e(o),o)}),we(Y(v),"updateSelectedOptions",function(e,t,n){var r=v.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,l=v.props,c=l.onChange,u=l.withCheckbox,p=l.showApplyButton,f=l.closeOnSelect,h=l.name,l=l.onPopperToggle,d=u&&p&&n,m=v.getDisabledOptions(v.state.options),g=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});v.setState(Ee(Ee({},v.state),{},{tempSelected:e,triggerLabel:v.updateTriggerLabel(e),selectAll:Ve(e,o,m.length),open:je(v.props.open)||u?r:!f,previousSelected:d?e:i,selected:g?e:a,loading:!!g||s})),g&&v.debounceClear(),!c||p&&!n||(o=e.map(function(e){return e.value}),c(t?o[0]:o,h)),!u&&f&&l&&je(v.props.open)&&l(!1,"optionClick")}),we(Y(v),"isValidOption",function(e){var t=v.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=v.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(v.setState(Ee(Ee({},v.state),{},{open:je(o)||!n})),!r&&n&&t&&je(o)&&t(!1,"optionClick"),1))}),we(Y(v),"onOptionSelect",function(e){var t=v.props,n=t.onUpdate,r=t.menu;Le(t.selected)?n&&(v.isValidOption(e)||r)&&n("select-option",e):(v.isValidOption(e)||r)&&v.updateSelectedOptions([e],!0)}),we(Y(v),"onSelect",function(t,e){var n=v.props,r=n.onUpdate;Le(n.selected)&&!n.showApplyButton?r&&r(e?"select-option":"deselect-option",t):(n=v.state.tempSelected.slice(),e||(r=n.findIndex(function(e){return e.value===t.value}),n.splice(r,1)),n=e?n.concat(t):n,v.updateSelectedOptions(n,!1))}),we(Y(v),"onSelectAll",function(e){var t=v.props,n=t.onUpdate,r=v.state,o=r.tempSelected,r=r.options;Le(t.selected)&&!t.showApplyButton?n&&n(e.target.checked?"select-all":"deselect-all"):(t=o.slice().filter(function(e){return e.disabled}),n=e.target.checked?[].concat(ke(r.filter(function(e){return!e.disabled})),ke(t)):t,v.updateSelectedOptions(n,!1))}),we(Y(v),"debounceSearch",rn(v.props.searchDebounceDuration,function(){v.setState({searchInit:!1},function(){v.updateOptions(!1)})})),we(Y(v),"reload",function(){v.setState({loading:!0},function(){v.updateOptions(!1)})}),we(Y(v),"debounceClear",rn(250,function(){return v.updateOptions(!1)})),we(Y(v),"onClearOptions",function(){var e=v.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=v.state.tempSelected.filter(function(e){return e.disabled});Le(t)&&!o?r&&r("clear-all"):(v.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),v.debounceClear(),e&&!o&&e(i,n))}),we(Y(v),"onTogglePopper",function(e){var t=v.props.onPopperToggle;t&&je(v.props.open)&&t(!1,e)}),we(Y(v),"onCancelOptions",function(){var e=v.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=v.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!je(v.props.open)&&v.state.open,l=t.map(function(e){return e.value});Le(o)?i&&i("cancel-selected",t,n):(o=v.updateTriggerLabel(t),i=v.getDisabledOptions(v.state.options),v.setState(Ee(Ee({},v.state),{},{tempSelected:t,selectAll:Ve(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(l,r)),v.onTogglePopper("cancelClick")}),we(Y(v),"onApplyOptions",function(){var e=v.state,t=e.tempSelected,e=e.previousSelected,n=v.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!je(v.props.open)&&v.state.open,l=t.map(function(e){return e.value});Le(o)?i&&i("apply-selected",e,t):(v.setState(Ee(Ee({},v.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(l,n),a&&!s&&a(l,n)),v.onTogglePopper("applyClick")}),we(Y(v),"onToggleDropdown",function(e,t){var n;v.props.disabled||((n=v.props.onPopperToggle)&&je(v.props.open)?n(e,t):v.setState({open:e}))});var v,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(v.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in v.props||e>v.staticLimit,s=n?[]:v.getSelectedOptions(a,!0),l=v.getDisabledOptions(a);return v.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Be(n,"",r)?t:[],triggerLabel:v.updateTriggerLabel(s,e),selectAll:Ve(s,e,l.length),errorType:"DEFAULT"},v}return a(u,[{key:"componentDidMount",value:function(){this.state.async&&this.updateOptions(!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a;this.state.async||(o=(a=this.props).loading,i=a.fetchOptions,n=a.withSearch,r=this.getDisabledOptions(a=void 0===(a=a.options)?[]:a).length,e.loading===o)||i||(a.length>this.staticLimit?this.updateOptions(!0,!0):(i=this.getSelectedOptions(a,!0),this.setState(Ee(Ee({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:Ve(i,this.state.optionsLength,r)})),n&&null!=(o=En.current)&&o.focus())),void 0!==this.props.selected&&e.selected!==this.props.selected&&e.loading===this.props.loading&&(a=!this.props.withCheckbox,this.updateSelectedOptions(this.props.selected,a,!0)),t.searchTerm!==this.state.searchTerm&&this.debounceSearch(),e.open===this.props.open&&t.open===this.state.open||je(this.props.open)&&this.props.open===this.state.open||this.updateOnPopperToggle()}},{key:"render",value:function(){var e=this.state,t=e.options,n=e.async,r=e.open,o=e.searchTerm,i=e.searchInit,a=e.loading,s=e.searchedOptionsLength,l=e.tempSelected,c=e.selectAll,u=e.triggerLabel,p=e.previousSelected,f=e.scrollIndex,e=e.errorType,h=this.props,d=h.withSelectAll,d=void 0===d||d,h=h.withCheckbox,m=this.props,g=m.triggerOptions,g=void 0===g?{}:g,y=m.tabIndex,m=U(m,Sn),s=s-t.length,y=y||(ze(o,s,d,h)?0:t.findIndex(function(e){return!e.disabled}));return Se.createElement(cn,xe({listOptions:t,inputRef:En,remainingOptions:s,firstEnabledOption:y,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:u,tempSelected:l,previousSelected:p,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:c,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:g.customTrigger,scrollIndex:f,updateOptions:this.reload,errorType:e},m))}}]),u})(),xn=(we(wn,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),Cn={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},kn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=U(e,xn),n=De((we(t={Heading:!0},"Heading--".concat(r),r),we(t,"Heading--".concat(n),!a&&n),we(t,"color-".concat(a),a),t),i);return Se.createElement(lt,xe({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:Cn[r]}),o)},Dn=(kn.displayName="Heading",kn.defaultProps={appearance:"default",size:"m"},["className","iconType"]),On=(un.displayName="ActionButton",un.defaultProps={size:16,type:"rounded"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","onPaste","actionIcon","className","autoFocus","disabled","readOnly","iconType"]),Pn={tiny:12,regular:16,large:20},Tn=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.type,r=void 0===r?"text":r,o=e.minWidth,o=void 0===o?"number"!==r?256:void 0:o,i=e.defaultValue,a=e.name,s=e.placeholder,l=e.value,c=e.icon,u=e.inlineLabel,p=e.required,f=e.error,h=e.info,d=e.onChange,m=e.onClick,g=e.onClear,y=e.onBlur,v=e.onFocus,b=e.onPaste,_=e.actionIcon,S=e.className,E=e.autoFocus,w=e.disabled,x=e.readOnly,C=e.iconType,k=U(e,On),D=Se.useRef(null),O=Ce(Se.useState(!l),2),P=O[0],T=O[1],O=(Se.useImperativeHandle(t,function(){return D.current}),Se.useEffect(function(){var e;E&&null!=(e=D.current)&&e.focus({preventScroll:!0})},[]),Oe(e)),e=De((we(t={},"Input",!0),we(t,"Input--".concat(n),n),we(t,"Input--disabled",w),we(t,"Input--error",f),we(t,"Input--readOnly",x),t),S),S=De((we(t={},"Input-input",!0),we(t,"Input-input--".concat(n),n),t)),P=De((we(t={},"Input-icon",!0),we(t,"Input-icon--left",!0),we(t,"Input-icon--inputBlank",P),we(t,"Input-icon--error",f),t)),t=De((we(f={},"Input-icon",!0),we(f,"Input-iconWrapper--right",!0),f)),f=Se.createElement("div",{className:t,tabIndex:0},Se.createElement(R,{name:"info",size:Pn[n],className:"Input-icon--right"}));return Se.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:e,style:{minWidth:o},onClick:function(){var e;return null==(e=D.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return T(!(null!=(e=D.current)&&e.value))}},u&&Se.createElement("div",{className:"Input-inlineLabel"},Se.createElement(Te,{appearance:"subtle"},u)),"tiny"!==n&&c&&Se.createElement("div",{className:P},Se.createElement(R,{name:c,size:Pn[n],type:C})),Se.createElement("input",xe({"data-test":"DesignSystem-Input"},O,k,{ref:D,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:l,required:p,disabled:w,readOnly:x,onChange:d,onBlur:y,onClick:m,onFocus:v,onPaste:b,tabIndex:x?-1:void 0})),w?"":h?Se.createElement(M,{position:"bottom",tooltip:h},f):_&&(l||i)?_:g&&(l||i)&&Se.createElement("div",{className:t},Se.createElement(R,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=D.current)&&t.focus({preventScroll:!0}),g(e)},name:"close",size:Pn[n],className:"Input-icon--right"})))}),Mn=(Tn.displayName="Input",Object.assign(Tn,{ActionButton:un}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown","iconType"]),An={regular:16,large:20},In=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.defaultValue,o=e.name,i=e.placeholder,a=e.icon,s=e.prefix,l=e.suffix,c=e.error,u=e.min,p=e.max,f=e.onChange,h=e.onClick,d=e.onBlur,m=e.onFocus,g=e.className,y=e.autoFocus,v=e.disabled,b=e.readOnly,_=e.value,S=e.showActionButton,E=void 0===S||S,S=e.onKeyDown,w=e.iconType,x=U(e,Mn),C=Se.useRef(null),k=void 0===_,D=Ce(Se.useState(_||r),2),O=D[0],P=D[1],D=(Se.useImperativeHandle(t,function(){return C.current}),Se.useEffect(function(){var e;y&&null!=(e=C.current)&&e.focus({preventScroll:!0})},[]),Se.useEffect(function(){void 0!==_&&P(_)},[_]),Oe(e)),e=De((we(t={},"MetricInput",!0),we(t,"MetricInput--".concat(n),n),we(t,"MetricInput--disabled",v),we(t,"MetricInput--readOnly",b),we(t,"MetricInput--error",c),t),g),t=De((we(c={},"MetricInput-input",!0),we(c,"MetricInput-input--".concat(n),n),we(c,"mr-4",!l&&!E&&"regular"===n),we(c,"mr-6",!l&&!E&&"large"===n),c)),c=De((we(g={},"MetricInput-icon",!0),we(g,"MetricInput-icon--".concat(n),n),g)),g=De((we(g={},"mr-4","regular"===n),we(g,"mr-5","regular"!==n),g)),T=De((we(T={},"ml-4 mr-3","regular"===n),we(T,"mx-5","regular"!==n),T)),M=De((we(M={},"p-0",!0),we(M,"MetricInput-arrowIcon--".concat(n),n),we(M,"ml-3",!0),M)),A=function(e,t){var n=Number(O||0),r=(null==(r=n.toString().split(".")[1])?void 0:r.length)||0;v||b||!("down"===t?void 0!==u&&u<n||void 0===u:void 0!==p&&n<p||void 0===p)||(n=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.min(e,t)}(p,function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:-1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.max(e,t)}(u,+(n="down"===t?n-1:n+1).toFixed(r))),k&&P(n),f&&(t=Object.create(e,{target:{value:{value:n}}}),f(t)))},I="large"===n?"regular":"tiny";return Se.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&Se.createElement(R,{"data-test":"DesignSystem-MetricInput--icon",name:a,type:w,size:An[n],appearance:O?"subtle":"disabled",className:c}),s&&Se.createElement(Te,{"data-test":"DesignSystem-MetricInput--prefix",className:g,size:n,appearance:"subtle"},s),Se.createElement("input",xe({"data-test":"DesignSystem-MetricInput"},D,x,{type:"number",ref:C,name:o,defaultValue:r,placeholder:i,className:t,value:O,disabled:v,readOnly:b,onChange:function(e){k&&P(e.target.value),f&&f(e)},onBlur:d,onClick:h,onFocus:m,onKeyDown:function(e){if(E){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),A(t,"down"));case"ArrowUp":t.preventDefault(),A(t,"up")}}}})),l&&Se.createElement(Te,{"data-test":"DesignSystem-MetricInput--suffix",className:T,size:n,appearance:"subtle"},l),E&&Se.createElement("div",{className:"MetricInput-arrowIcons"},Se.createElement(Pe,{type:"button",icon:"keyboard_arrow_up",size:I,className:"".concat(M," mb-2"),onClick:function(e){return A(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),Se.createElement(Pe,{type:"button",icon:"keyboard_arrow_down",size:I,className:M,onClick:function(e){return A(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),Rn=(In.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onPaste","onBlur","onFocus","onClear","className","id","helpText"]),n=Se.forwardRef(function(n,e){n.mask;var t=n.value,r=n.placeholderChar,h=void 0===r?"_":r,r=n.validators,d=void 0===r?[]:r,r=n.clearOnEmptyBlur,o=void 0===r||r,r=n.defaultValue,m=n.mask,i=n.error,a=n.caption,N=n.required,g=n.onChange,s=n.onPaste,l=n.onBlur,c=n.onFocus,u=n.onClear,p=n.className,y=n.id,L=n.helpText,j=U(n,Rn),v=Se.useCallback(function(e){return"object"===Z(m[e])},[m]),b=Se.useCallback(function(e,t){if("right"===e){for(var n=t;n<m.length;n++)if(v(n))return n;return m.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[m,v]),f=Se.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),_=Se.useCallback(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:m.length-1;return pn(m,h).slice(e,t+1)},[m,h]),S=Se.useMemo(function(){return _()},[_]),E=Se.useMemo(function(){return f()},[f]),w=Se.useRef(null),x=Se.useRef(),C=Se.useRef(E),k=Se.useRef(0),r=Ce(Se.useState(r||t||""),2),D=r[0],O=r[1],P=(Se.useImperativeHandle(e,function(){return w.current}),Se.useEffect(function(){O(t||"")},[t]),Se.useEffect(function(){A(k.current)},[D]),Se.useCallback(function(e){return Math.abs(e.end-e.start)},[])),T=Se.useCallback(function(){var e;return{start:(null==(e=w.current)?void 0:e.selectionStart)||0,end:(null==(e=w.current)?void 0:e.selectionEnd)||0}},[w.current]),B=["text","password","tel","url"],M=Se.useCallback(function(e){var t,n,r;w.current&&(t=w.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),B.includes(t.type)?t.setSelectionRange(n,e):(r=t.type,t.type="text",t.setSelectionRange(n,e),t.type=r))},[w.current]),A=Se.useCallback(function(e){document&&document.activeElement===w.current&&M({start:e,end:e})},[M]),I=Se.useCallback(function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o="",i=t+1,a=r;return t>=m.length||(r>=e.length?C.current={start:t,end:t}:(n=m[t],v(t)?(e[r].match(n)?o+=e[r]:o+=h,a++):o+=n,o+=I(e,i,a))),o},[m,h,v]),R=Se.useCallback(function(){C.current=T(),x.current=window.requestAnimationFrame(R)},[C.current,T]),F=function(e){var t=n.placeholder||"dd/mm/yyyy";return"yyyy"===t.substring(0,4)?e&&e[4]===t[4]&&e[7]===t[7]:e&&e[2]===t[2]&&e[5]===t[5]},r=Se.useCallback(function(e){for(var t,n=null==(n=e.currentTarget)?void 0:n.value,r=T(),o=Math.min(C.current.start,r.start),i=r.end,a=o,s="",l=0,i=n.slice(o,i),s=I(i,o),i=D,c=(0!==i.length||"parent-TimePicker"!==y&&"parent-DatePicker"!==y||(i=S),t=s.length,r.end>C.current.end?l=t?P(C.current):0:n.length<i.length&&(l=i.length-n.length),i.split("")),u=0;u<t;u++)c[o+u]=s[u];for(var p=0;p<l;p++){var f=o+t+p;c[f]=_(f,f)}r=c.slice(0,m.length).join(""),s!==h&&""!==s&&!s.includes(h)&&K(d,r)&&(a+=t),n=b(l?"left":"right",a),1===l&&!s.length&&!v(a)&&0<n?(a=n,c[--a]=h):1!==l&&(a=n),r=c.slice(0,m.length).join("");k.current=a,r!==i&&K(d,r)?"__:__ _M"===S?(O(r.toUpperCase()),null!=g&&g(e,r.toUpperCase())):(O(r),null!=g&&g(e,r)):window.requestAnimationFrame(function(){return A(k.current)})},[C.current,d,T,I,P,_,b,v,A,O,g]),e=Se.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(O(""),t=""),null!=l&&l(e,t),x.current&&window.cancelAnimationFrame(x.current)},[o,x.current,_,O,l]),z=Se.useCallback(function(e){k.current=E.start,O(S),null!=u&&u(e)},[O,_,A,f,u]),V=Se.useCallback(function(e){x.current=window.requestAnimationFrame(R),D||(k.current=E.start,O(_())),null!=c&&c(e)},[x.current,D,R,O,M,c]),H=Se.useMemo(function(){return De({"d-flex flex-column flex-grow-1":!0},p)},[p]);return Se.createElement("div",{className:H,"data-test":"DesignSystem-InputMask--Wrapper"},Se.createElement(Tn,xe({},j,{value:D,error:i,required:N,onFocus:V,onChange:r,onClear:D===S?void 0:z,onBlur:e,onPaste:function(e){e.preventDefault();var t,n=null==(n=e.clipboardData)?void 0:n.getData("Text"),r=(o=(t=n).length,t=t.substring(0,o),23===o?(r=(o=t.split(" - "))[0],o=o[1],F(r)&&F(o)):F(t)),o=K(d,n);r&&s&&o&&(s(e,n),O(n))},autoComplete:"off",ref:w})),Se.createElement(ol,{message:i?a:L,error:i}))}),Fn=(n.displayName="InputMask",n.utils={getDefaultValue:pn},n),Nn=["required","optional","withInput","disabled","children","className","info"],Ln=function(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=e.info,l=U(e,Nn),e=Oe(e),r=De((we(c={Label:!0},"Label--withInput",r),we(c,"Label--optional",n),c),a),c=De({"Label-text":!0,"Label--disabled":o});return Se.createElement("div",xe({"data-test":"DesignSystem-Label"},e,{className:r}),Se.createElement(lt,xe({"data-test":"DesignSystem-Label--Text",className:c,componentType:"label"},l),i,function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?Se.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?Se.createElement(Te,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&Se.createElement(M,{tooltip:s},Se.createElement(R,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"}))))},jn=(Ln.displayName="Label",["children","className","appearance","size","disabled"]),Bn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=U(e,jn),i=De((we(t={Link:!0},"Link--".concat(i),i),we(t,"Link--".concat(o),o),we(t,"Link--".concat(o,"-disabled"),a),t),r);return Se.createElement(lt,xe({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},zn=(Bn.displayName="Link",Bn.defaultProps={appearance:"default",size:"regular",disabled:!1},fn.displayName="Meta",function(e){var o=e.list,t=e.seperator,n=e.className,i=e.size,e=Oe(e),n=De(we({},"MetaList",!0),n),a=De(we({},"MetaList-seperator",!0)),r=De((we(r={},"MetaList-seperator",!0),we(r,"MetaList-seperator--left",!0),r));return Se.createElement("div",xe({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&Se.createElement(R,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),o.map(function(e,t){var n=e.label,r=t!==o.length-1;return Se.createElement("span",{key:t,className:"MetaList-item"},Se.createElement(fn,{size:i,label:void 0===n?"":n,icon:e.icon,iconType:e.iconType}),r&&Se.createElement(R,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:a,appearance:"disabled"}))}))});zn.displayName="MetaList",zn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function Vn(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var Hn=(()=>{e(i,Se["Component"]);var r=d(i);function i(){var o;h(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return we(Y(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),we(Y(o),"handleElement",null),we(Y(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),we(Y(o),"mouseEventClientOffset",function(e){return e.clientX}),we(Y(o),"clientToValue",function(e){var t=o.props,n=t.stepSize,r=t.tickSize,t=t.value;return null==o.handleElement||(e=e-((e=o.getHandleMidpointAndOffset(o.handleElement)).handleMidpoint+e.handleOffset),isNaN(e))?t:t+Math.round(e/(r*n))*n}),we(Y(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=dn(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),we(Y(o),"endHandleMovement",function(e){var e=o.mouseEventClientOffset(e),t=o.props.onRelease,e=(o.removeDocumentEventListeners(),o.setState({isHandleMoving:!1}),o.changeValue(o.clientToValue(e)));t&&t(e)}),we(Y(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),we(Y(o),"beginHandleMovement",function(e){o.props.disabled||(document.addEventListener("mousemove",o.continueHandleMovement),document.addEventListener("mouseup",o.endHandleMovement),o.setState({isHandleMoving:!0}),e=o.clientToValue(e.clientX),o.changeValue(e))}),we(Y(o),"handleKeyDown",function(e){var t,n,r;o.props.disabled||(t=(n=o.props).stepSize,n=n.value,37===(r=e.keyCode)?(o.changeValue(n-t),e.preventDefault()):39===r&&(o.changeValue(n+t),e.preventDefault()))}),we(Y(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),we(Y(o),"getHandleMidpointAndOffset",function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return null==e?{handleMidpoint:0,handleOffset:0}:{handleOffset:(e=e.getBoundingClientRect()).left,handleMidpoint:e[t?"height":"width"]/2}}),we(Y(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),we(Y(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),we(Y(o),"removeDocumentEventListeners",function(){document.removeEventListener("mousemove",o.continueHandleMovement),document.removeEventListener("mouseup",o.endHandleMovement)}),o}return a(i,[{key:"componentWillUnmount",value:function(){this.removeDocumentEventListeners()}},{key:"componentDidUpdate",value:function(e,t){t.isHandleMoving!==this.state.isHandleMoving&&this.handleElement&&this.handleElement.focus()}},{key:"render",value:function(){var e=this.props,t=e.min,n=e.tickSizeRatio,r=e.value,o=e.disabled,i=e.label,a=this.state,s=a.isHandleMoving,a=s||a.isHandleHovered||e.isCurrentLabelHovered,e=this.getHandleMidpointAndOffset(this.handleElement,!0).handleMidpoint,r={left:"calc(".concat(hn((r-t)*n)," - ").concat(e,"px)")},n=De((we(t={},"Slider-handle",!0),we(t,"Slider-handle--disabled",o),we(t,"Slider-handle--active",s),we(t,"border-0",o),t)),s=De((we(e={},"Slider-tooltip",!0),we(e,"Tooltip",!0),we(e,"d-none",!a),e));return Se.createElement(Se.Fragment,null,Se.createElement("div",{className:n,onMouseOver:this.handleMouseOver,onMouseLeave:this.handleMouseLeave,onMouseDown:this.beginHandleMovement,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,ref:this.refHandlers.handle,style:r,tabIndex:0,"data-test":"DesignSystem-MultiSlider-Handle"}),Se.createElement("div",{className:s,style:r},i))}}]),i})(),n=(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var f;return h(this,n),we(Y(f=t.call(this,e)),"handleElements",[]),we(Y(f),"trackElement",null),we(Y(f),"getLabelPrecision",function(e){var t=e.labelPrecision;return null==t?(e=e.stepSize,isFinite(e)&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0):t}),we(Y(f),"getOffsetRatio",function(e){return dn((e-f.props.min)*f.state.tickSizeRatio,0,1)}),we(Y(f),"addHandleRef",function(e){null!=e&&f.handleElements.push(e)}),we(Y(f),"getHandleValues",function(e){e=Se.Children.map(e.children,function(e){return null!=(t=e)&&null!=t.type?e.props:null;var t}),e=null!=e?e:[];return(e=e.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),e}),we(Y(f),"updateTickSize",function(){var e,t;null!=f.trackElement&&(e=f.trackElement.clientWidth,t=1/(f.props.max-f.props.min),f.setState({tickSize:e*t,tickSizeRatio:t}))}),we(Y(f),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),we(Y(f),"maybeHandleTrackClick",function(t){var e=t.target;!f.props.disabled&&null==e.closest(".Slider-handle")&&(e=f.nearestHandleForValue(f.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.beginHandleMovement(t)}),we(Y(f),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),we(Y(f),"getNewHandleValues",function(e,t){var n=f.getHandleValues(f.props).map(function(e){return e.value}),r=n.slice(),o=(r[t]=e,1<r.length&&r.sort(function(e,t){return e-t}),r.indexOf(e)),i=f.getLockedHandleIndex(t,o);return-1!==i?(Vn(n,t,i,n[i]),n):(Vn(r,t,o,e),r)}),we(Y(f),"onReleaseHandler",function(e,t){var n=f.props.onRangeRelease,r=f.getHandleValues(f.props),o=f.getNewHandleValues(e,t);n&&n(o),r.forEach(function(e,t){e.onRelease&&e.onRelease(o[t])})}),we(Y(f),"onChangeHandler",function(e,t){var n=f.props.onRangeChange,r=f.getHandleValues(f.props),o=r.map(function(e){return e.value}),i=f.getNewHandleValues(e,t);((n,e)=>{if(n.length==n.length)return e.every(function(e,t){return e===n[t]})})(i,o)||(n&&n(i),r.forEach(function(e,t){e.onChange&&e.onChange(i[t])}))}),we(Y(f),"formatLabel",function(e){var t=f.props.labelRenderer,e=e.toFixed(f.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),we(Y(f),"renderHandles",function(){var e=f.props,r=e.disabled,o=e.max,i=e.min,a=e.stepSize,s=f.getHandleValues(f.props);return 0===s.length?null:s.map(function(e,t){var e=e.value,n=f.state.hoveredLabelValue===Number(e.toFixed(f.state.labelPrecision));return Se.createElement(Hn,{disabled:r,key:"".concat(t,"-").concat(s.length),max:o,min:i,onRelease:function(e){return f.onReleaseHandler(e,t)},onChange:function(e){return f.onChangeHandler(e,t)},label:f.formatLabel(e),ref:f.addHandleRef,stepSize:a,tickSize:f.state.tickSize,tickSizeRatio:f.state.tickSizeRatio,value:e,isCurrentLabelHovered:n})})}),we(Y(f),"renderLabels",function(){for(var e,t=f.props,n=t.labelStepSize,r=t.max,o=t.min,i=t.labelRenderer,a=t.disabled,s=[],l=f.state.tickSizeRatio*n,c=f.getHandleValues(f.props).map(function(e){return e.value.toFixed(f.state.labelPrecision)}),u=o,p=0;u<r||(e=u,Math.abs(e-r)<=1e-5);u+=n,p+=l)((n,e)=>{var e={left:hn(e)},t=!a&&-1!==c.indexOf(n.toFixed(f.state.labelPrecision)),r=De((we(r={},"Slider-ticks",!0),we(r,"bg-dark",t),r));s.push(Se.createElement("div",{onClick:function(t){var e;f.props.disabled||(e=f.nearestHandleForValue(f.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.changeValue(n)},className:"Slider-label",key:n,style:e,onMouseOver:function(){return f.handleLabelMouseOver(n)},onMouseLeave:f.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},Se.createElement("span",{className:r}),!1!==i&&Se.createElement(Te,{size:"small",appearance:t?"default":"disabled"},f.formatLabel(n))))})(u,p);return s}),we(Y(f),"renderTrackFill",function(e,t,n){var r=Ce([f.getOffsetRatio(t.value),f.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),2),o=r[0],r=r[1],o=Number((100*o).toFixed(2)),r=Number((100*(1-r)).toFixed(2)),r=Ee({},{width:"".concat(100-r-o,"%")}),o=f.getTrackFill(t,n),n=De((we(t={},"Slider-progress",!0),we(t,"Slider-progress--disabled",f.props.disabled),we(t,"Slider-progress--inRange",o),we(t,"Slider-progress--inRangeDisabled",o&&f.props.disabled),t));return Se.createElement("div",{key:"track-".concat(e),className:n,style:r})}),we(Y(f),"renderTracks",function(){var e=f.getHandleValues(f.props),n=(e.push({value:f.props.max}),{value:f.props.min||0}),r=[];return e.forEach(function(e,t){r.push(f.renderTrackFill(t,n,e)),n=e}),r}),we(Y(f),"handleLabelMouseOver",function(e){f.setState({hoveredLabelValue:e})}),we(Y(f),"handleLabelMouseLeave",function(){f.setState({hoveredLabelValue:void 0})}),f.state={labelPrecision:f.getLabelPrecision(f.props),tickSize:0,tickSizeRatio:0},f}return a(n,[{key:"getDerivedStateFromProps",value:function(e){return{labelPrecision:this.getLabelPrecision(e)}}},{key:"getSnapshotBeforeUpdate",value:function(e){e=this.getHandleValues(e);return this.getHandleValues(this.props).length!==e.length&&(this.handleElements=[]),null}},{key:"componentDidMount",value:function(){this.updateTickSize()}},{key:"nearestHandleForValue",value:function(e,n){var t=e,r=function(e){var t=n(e),t=e.clientToValue(t),e=e.props.value;return Math.abs(t-e)};if(0!==t.length){for(var o=t[0],i=r(o),a=1;a<t.length;a++){var s=t[a],l=r(s);l<i&&(o=s,i=l)}return o}}},{key:"render",value:function(){var t=this,e=this.props,n=e.label,e=e.className,r=Oe(this.props),e=De(we({},"Slider",!0),e),o=De((we(o={},"Slider-wrapper",!0),we(o,"Slider-wrapper--disabled",this.props.disabled),o));return Se.createElement("div",xe({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&Se.createElement(Ln,{withInput:!0},n),Se.createElement("div",{className:o},Se.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),Se.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n})(),Kn=(we(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),we(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),Un=Se.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=U(e,Kn),i=Se.useRef(null),a=(Se.useImperativeHandle(t,function(){return i.current},[i]),Se.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),Se.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=De(we({},"OutsideClick",!0),r);return Se.createElement("div",xe({ref:i},e,{className:t}),n)}),Wn=(Un.displayName="OutsideClick",["appearance","children","className","color"]),Gn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=U(e,Wn),n=De((we(t={Text:!0},"Text--".concat(n),!i&&n),we(t,"color-".concat(i),i),t),o);return Se.createElement(lt,xe({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},qn=(Gn.displayName="Paragraph",Gn.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText","error"]),r=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.label,o=e.disabled,i=e.onChange,a=e.name,s=e.value,l=e.checked,c=e.defaultChecked,u=e.className,p=e.helpText,f=e.error,e=U(e,qn),h=Se.useRef(null),t=(Se.useImperativeHandle(t,function(){return h.current}),De((we(t={},"Radio",!0),we(t,"Radio--disabled",o),t),u)),f=De((we(u={},"Radio-wrapper",!0),we(u,"Radio-defaultWrapper",!f),we(u,"Radio-errorWrapper",f),we(u,"Radio-wrapper--".concat(n),n),u)),u=De((we(u={},"Radio-outerWrapper",!0),we(u,"Radio-outerWrapper--".concat(n),n),u)),d=De(we({},"Radio-Label",!0)),m="".concat(a,"-").concat(r,"-").concat(Ie());return Se.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},Se.createElement("div",{className:u,"data-test":"DesignSystem-Radio-OuterWrapper"},Se.createElement("input",xe({tabIndex:0},e,{type:"radio",disabled:o,checked:l,defaultChecked:c,ref:h,name:a,value:s,onChange:i,className:"Radio-input",id:m,"data-test":"DesignSystem-Radio-Input"})),Se.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:f})),Se.createElement("div",{className:"Radio-labelWrapper"},r&&Se.createElement("label",{className:d,htmlFor:m,"data-test":"DesignSystem-Radio-Label"},Se.createElement(Te,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),p&&Se.createElement(Te,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},p.trim())))}),Yn=(r.displayName="Radio",["className","children"]),$n=Se.forwardRef(function(e,t){var n=e.className,r=e.children,e=U(e,Yn),n=De(we({Row:!0},"".concat(n),n));return Se.createElement("div",xe({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),Jn=($n.displayName="Row",function(e){var t=e.appearance,n=e.children,r=e.onMouseEnter,o=e.onMouseLeave,i=e.onClick,a=e.truncateLabel,s=e.className,e=Oe(e),s=De(we({},"StatusHint",!0),s),t=De((we(l={},"StatusHint-icon",!0),we(l,"StatusHint--".concat(t),t),l)),l=De(we({},"ellipsis--noWrap",a));return Se.createElement("div",xe({"data-test":"DesignSystem-StatusHint"},e,{className:s,onClick:function(e){return i&&i(e)},onMouseEnter:function(e){return r&&r(e)},onMouseLeave:function(e){return o&&o(e)}}),Se.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:t}),Se.createElement(Te,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:l},n))}),Zn=(Jn.displayName="StatusHint",Jn.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=Oe(e),n=De((we(t={Pills:!0},"Badge--".concat(n),n&&!o),we(t,"Badge--subtle-".concat(n),o),t),i);return Se.createElement("span",xe({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Xn=(Zn.displayName="Pills",Zn.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=Oe(e),n=De(we({Spinner:!0},"Spinner--".concat(n),n),r),r=De(we({Circle:!0},"Circle--".concat(t),t));return Se.createElement("svg",xe({},e,{className:n},{viewBox:"0 0 50 50"}),Se.createElement("circle",xe({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Qn=(Xn.displayName="Spinner",Xn.defaultProps={appearance:"primary",size:"medium"},Ee(Ee({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",Ee(Ee({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),er=(Se.forwardRef(function(e,t){function n(e){"change"!=e.type&&"Space"!==e.key||(void 0===u&&h(!f),a&&a(e,!f))}var r=e.size,r=void 0===r?"regular":r,o=e.defaultChecked,i=e.disabled,a=e.onChange,s=e.name,l=e.value,c=e.className,u=e.checked,e=U(e,Qn),p=Ce(Se.useState(void 0===u?o:u),2),f=p[0],h=p[1],p=(Se.useEffect(function(){void 0!==u&&h(u)},[u]),De((we(p={},"Switch",!0),we(p,"Switch--disabled",i),we(p,"Switch--".concat(r),r),p),c)),r=De((we(c={},"Switch-wrapper",!0),we(c,"Switch-wrapper--disabled",i),we(c,"Switch-wrapper--".concat(r),r),we(c,"Switch-wrapper--checked",f),we(c,"Switch-wrapper--checkedDisabled",f&&i),c));return Se.createElement("div",{className:p},Se.createElement("input",xe({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:f,ref:t,name:s,value:l,className:"Switch-input",onKeyUp:n})),Se.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className","readOnly"]),o=Se.forwardRef(function(e,t){var n,r=e.rows,r=void 0===r?3:r,o=e.resize,o=void 0===o||o,i=e.disabled,a=e.name,s=e.placeholder,l=e.value,c=e.defaultValue,u=e.required,p=e.error,f=e.onChange,h=e.onClick,d=e.onBlur,m=e.onFocus,g=e.className,y=e.readOnly,e=U(e,er),o=De((we(n={},"Textarea",!0),we(n,"Textarea--resize",o),we(n,"Textarea--error",p),we(n,"Textarea--readOnly",y),n),g);return Se.createElement("textarea",xe({"data-test":"DesignSystem-Textarea"},e,{ref:t,name:a,rows:r,placeholder:s,className:o,value:l,defaultValue:c,required:u,disabled:i,onChange:f,onBlur:d,onClick:h,onFocus:m}))});o.displayName="Textarea";function tr(e){var t=vr.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===vr.call(e.callee)}function nr(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"!=typeof Symbol.iterator){var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}}return!0}function rr(){return nr()&&!!Symbol.toStringTag}var or,ir,ar,sr,lr,cr,ur,pr,fr,hr,dr=ee(t(function(e){e.exports=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0})),mr=ee(t(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),gr=t(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n.exports.default=n.exports,n.exports.__esModule=!0,r(e,t)}n.exports=r,n.exports.default=n.exports,n.exports.__esModule=!0}),r=(ee(gr),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gr(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),yr=ee(r),i=ee(t(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),s=ee(t(function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})),vr=Object.prototype.toString,o=(Object.keys||(or=Object.prototype.hasOwnProperty,ir=Object.prototype.toString,ar=tr,n=Object.prototype.propertyIsEnumerable,sr=!n.call({toString:null},"toString"),lr=n.call(function(){},"prototype"),cr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ur=function(e){var t=e.constructor;return t&&t.prototype===e},pr={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},fr=(()=>{if("undefined"!=typeof window)for(var e in window)try{if(!pr["$"+e]&&or.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{ur(window[e])}catch(e){return!0}}catch(e){return!0}return!1})(),hr=function(e){if("undefined"==typeof window||!fr)return ur(e);try{return ur(e)}catch(e){return!1}},l=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===ir.call(e),r=ar(e),o=t&&"[object String]"===ir.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=lr&&n;if(o&&0<e.length&&!or.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(r&&0<e.length)for(var l=0;l<e.length;++l)i.push(String(l));else for(var c in e)a&&"prototype"===c||!or.call(e,c)||i.push(String(c));if(sr)for(var u=hr(e),p=0;p<cr.length;++p)u&&"constructor"===cr[p]||!or.call(e,cr[p])||i.push(cr[p]);return i}),l),br=Array.prototype.slice,_r=Object.keys,Sr=_r?function(e){return _r(e)}:o,Er=Object.keys,wr=(Sr.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return tr(e)?Er(br.call(e)):Er(e)}):Object.keys=Sr,Object.keys||Sr},Sr),r="undefined"!=typeof Symbol&&Symbol,xr=Array.prototype.slice,Cr=Object.prototype.toString,kr=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==Cr.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=xr.call(arguments,1),i=Math.max(0,n.length-o.length),a=[],s=0;s<i;s++)a.push("$"+s);return r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){var e;return this instanceof r?(e=n.apply(this,o.concat(xr.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(xr.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},Dr=kr.call(Function.call,Object.prototype.hasOwnProperty),Or=SyntaxError,Pr=Function,Tr=TypeError,Mr=function(e){try{return Pr('"use strict"; return ('+e+").constructor;")()}catch(e){}},Ar=Object.getOwnPropertyDescriptor;if(Ar)try{Ar({},"")}catch(Ui){Ar=null}function Ir(){throw new Tr}function Rr(e,t){if("string"!=typeof e||0===e.length)throw new Tr("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new Tr('"allowMissing" argument must be a boolean');var n=(e=>{var t=to(e,0,1),n=to(e,-1);if("%"===t&&"%"!==n)throw new Or("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Or("invalid intrinsic syntax, expected opening `%`");var o=[];return eo(e,no,function(e,t,n,r){o[o.length]=n?eo(r,ro,"$1"):t||e}),o})(e),r=0<n.length?n[0]:"",o=((e,t)=>{var n,r=e;if(Dr(Zr,r)&&(r="%"+(n=Zr[r])[0]+"%"),Dr($r,r)){var o=$r[r];if(void 0!==(o=o===Yr?Jr(r):o)||t)return{alias:n,name:r,value:o};throw new Tr("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new Or("intrinsic "+e+" does not exist!")})("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Qr(n,Xr([0,1],o)));for(var s=1,l=!0;s<n.length;s+=1){var c=n[s],u=to(c,0,1),p=to(c,-1);if(('"'===u||"'"===u||"`"===u||'"'===p||"'"===p||"`"===p)&&u!==p)throw new Or("property names with quotes must have matching quotes");if("constructor"!==c&&l||(a=!0),Dr($r,u="%"+(r+="."+c)+"%"))i=$r[u];else if(null!=i){if(!(c in i)){if(t)return;throw new Tr("base intrinsic for "+e+" exists, but the property is not available.")}i=Ar&&s+1>=n.length?(l=!!(p=Ar(i,c)))&&"get"in p&&!("originalValue"in p.get)?p.get:i[c]:(l=Dr(i,c),i[c]),l&&!a&&($r[u]=i)}}return i}function Fr(e,t){return"function"==typeof(t=Rr(e,!!t))&&-1<io(e,".prototype.")?oo(t):t}function Nr(e){return!(ao&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===so(e)}function Lr(e){return!!Nr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==so(e)&&"[object Function]"===so(e.callee)}function jr(e,t){var n=2<arguments.length?arguments[2]:{},r=wr(t);co&&(r=po.call(r,Object.getOwnPropertySymbols(t)));for(var o,i,a,s,l=0;l<r.length;l+=1)o=e,i=r[l],a=t[r[l]],s=n[r[l]],i in o&&(!ho(s)||!s())||(mo?fo(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function Br(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!yo(e)||!yo(t))}function zr(){return"function"==typeof Object.is?Object.is:Br}function Vr(){if(null!=this&&this!==Eo(this))throw new wo("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}function Hr(){if(!xo)throw new ko("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=Co(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return Vr}var Kr,Ur,Wr,Gr,n=Ar?function(){try{return Ir}catch(e){try{return Ar(arguments,"callee").get}catch(e){return Ir}}}():Ir,l="function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&nr(),qr=Object.getPrototypeOf||function(e){return e.__proto__},Yr={},o="undefined"==typeof Uint8Array?c:qr(Uint8Array),$r={"%AggregateError%":"undefined"==typeof AggregateError?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?c:ArrayBuffer,"%ArrayIteratorPrototype%":l?qr([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":Yr,"%AsyncGenerator%":Yr,"%AsyncGeneratorFunction%":Yr,"%AsyncIteratorPrototype%":Yr,"%Atomics%":"undefined"==typeof Atomics?c:Atomics,"%BigInt%":"undefined"==typeof BigInt?c:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?c:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?c:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?c:FinalizationRegistry,"%Function%":Pr,"%GeneratorFunction%":Yr,"%Int8Array%":"undefined"==typeof Int8Array?c:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?c:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?qr(qr([][Symbol.iterator]())):c,"%JSON%":"object"==typeof JSON?JSON:c,"%Map%":"undefined"==typeof Map?c:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?qr((new Map)[Symbol.iterator]()):c,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?c:Promise,"%Proxy%":"undefined"==typeof Proxy?c:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?c:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?c:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?qr((new Set)[Symbol.iterator]()):c,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?qr(""[Symbol.iterator]()):c,"%Symbol%":l?Symbol:c,"%SyntaxError%":Or,"%ThrowTypeError%":n,"%TypedArray%":o,"%TypeError%":Tr,"%Uint8Array%":"undefined"==typeof Uint8Array?c:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?c:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?c:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?c:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?c:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?c:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?c:WeakSet},Jr=function e(t){var n,r;return"%AsyncFunction%"===t?n=Mr("async function () {}"):"%GeneratorFunction%"===t?n=Mr("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Mr("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=qr(r.prototype)),$r[t]=n},Zr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Xr=kr.call(Function.call,Array.prototype.concat),Qr=kr.call(Function.apply,Array.prototype.splice),eo=kr.call(Function.call,String.prototype.replace),to=kr.call(Function.call,String.prototype.slice),no=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ro=/\\(\\)?/g,oo=t(function(e){var t=Rr("%Function.prototype.apply%"),n=Rr("%Function.prototype.call%"),r=Rr("%Reflect.apply%",!0)||kr.call(n,t),o=Rr("%Object.getOwnPropertyDescriptor%",!0),i=Rr("%Object.defineProperty%",!0),a=Rr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(kr,n,arguments);return o&&i&&o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}),t};function s(){return r(kr,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),io=(oo.apply,oo(Rr("String.prototype.indexOf"))),ao=rr(),so=Fr("Object.prototype.toString"),r=function(){return Nr(arguments)}(),lo=(Nr.isLegacyArguments=Lr,r?Nr:Lr),co="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),uo=Object.prototype.toString,po=Array.prototype.concat,fo=Object.defineProperty,ho=function(e){return"function"==typeof e&&"[object Function]"===uo.call(e)},mo=fo&&(()=>{var e={};try{for(var t in fo(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}})(),go=(jr.supportsDescriptors=!!mo,jr),yo=function(e){return e!=e},l=oo(zr(),Object),vo=(go(l,{getPolyfill:zr,implementation:Br,shim:function(){var e=zr();return go(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),l),n=rr(),bo=(n&&(Kr=Fr("Object.prototype.hasOwnProperty"),Ur=Fr("RegExp.prototype.exec"),Wr={},Gr={toString:o=function(){throw Wr},valueOf:o},"symbol"==typeof Symbol.toPrimitive)&&(Gr[Symbol.toPrimitive]=o),Fr("Object.prototype.toString")),_o=Object.getOwnPropertyDescriptor,So=n?function(e){if(!e||"object"!=typeof e)return!1;var t=_o(e,"lastIndex");if(!(t&&Kr(t,"value")))return!1;try{Ur(e,Gr)}catch(e){return e===Wr}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===bo(e)},Eo=Object,wo=TypeError,xo=go.supportsDescriptors,Co=Object.getOwnPropertyDescriptor,ko=TypeError,Do=go.supportsDescriptors,Oo=Object.getOwnPropertyDescriptor,Po=Object.defineProperty,To=TypeError,Mo=Object.getPrototypeOf,Ao=/a/,c=oo(Vr),Io=(go(c,{getPolyfill:Hr,implementation:Vr,shim:function(){var e,t,n;if(Do&&Mo)return e=Hr(),t=Mo(Ao),(n=Oo(t,"flags"))&&n.get===e||Po(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new To("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),c),Ro=Date.prototype.getDay,Fo=function(e){try{return Ro.call(e),!0}catch(e){return!1}},No=Object.prototype.toString,Lo="[object Date]",jo=rr(),Bo=function(e){return"object"==typeof e&&null!==e&&(jo?Fo(e):No.call(e)===Lo)},zo=Date.prototype.getTime;function Vo(e,t,n){n=n||{};if(n.strict?!vo(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?vo(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(Ho(i)||Ho(a))return!1;if(i.prototype!==a.prototype)return!1;if(lo(i)!==lo(a))return!1;e=So(i),t=So(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&Io(i)===Io(a);if(Bo(i)&&Bo(a))return zo.call(i)===zo.call(a);if(e=Ko(i),t=Ko(a),e!==t)return!1;if(e||t){if(i.length!==a.length)return!1;for(r=0;r<i.length;r++)if(i[r]!==a[r])return!1}else{if(typeof i!=typeof a)return!1;try{var l=wr(i),c=wr(a)}catch(e){return!1}if(l.length!==c.length)return!1;for(l.sort(),c.sort(),r=l.length-1;0<=r;r--)if(l[r]!=c[r])return!1;for(r=l.length-1;0<=r;r--)if(o=l[r],!Vo(i[o],a[o],s))return!1}}return!0}function Ho(e){return null==e}function Ko(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||0<e.length&&"number"!=typeof e[0])}var Uo=Vo,Wo="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Go=(()=>{for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Wo&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0})();
|
|
6
|
+
*/var s;s={}.hasOwnProperty,e.exports?e.exports=a.default=a:window.classNames=a}),Oe=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?Ee(Ee({},e),{},we({},t,n[t])):Ee({},e)},{})},re=Se.createContext({size:"regular",appearance:"secondary",firstName:"",lastName:"",darkAppearance:[]}),oe=re.Provider,ie={secondary:"inverse",primary:"white",alert:"white",accent2:"white",accent3:"white",warning:"warning_darker",success:"success_darker",accent1:"accent1_darker",accent4:"accent4_darker"},ae={regular:32,tiny:24},se=2,le="secondary",ce=["accent4","primary","accent3","alert","accent2","warning","accent1","success"],ue=function(e){function t(){return i&&"string"!=typeof i?Se.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:b,role:m},Se.createElement(oe,{value:E},Se.createElement("span",xe({"data-test":"DesignSystem-Avatar"},g,{className:v,tabIndex:h||p?-1:0}),i))):Se.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:b,role:m},Se.createElement("span",xe({"data-test":"DesignSystem-Avatar"},g,{className:v,tabIndex:h||p?-1:0}),y&&Se.createElement(Te,{weight:"medium",appearance:"white",className:_},y),!y&&Se.createElement(R,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?20:16,appearance:"white",className:S})))}var n=e.withTooltip,r=e.tooltipPosition,o=e.size,i=e.children,a=e.firstName,s=e.lastName,l=e.className,c=e.appearance,u=e.shape,p=e.disabled,f=e.tooltipSuffix,h=e.tabIndex,d=e.role,m=void 0===d?"presentation":d,g=Oe(e),y=i&&"string"==typeof i?i.trim().slice(0,se):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),d=c||ce[(y.charCodeAt(0)+(y.charCodeAt(1)||0))%8]||le,e=["secondary","success","warning","accent1","accent4"],v=De((we(c={Avatar:!0},"Avatar--square","square"===u),we(c,"Avatar--".concat(o),"square"!==u),we(c,"Avatar--".concat(d),d),we(c,"Avatar--noInitials",!y||!n),we(c,"Avatar--disabled",p),we(c,"Avatar--default",!p),c),l),b=De((we(c={},"Avatar-wrapper--square","square"===u),we(c,"Avatar--".concat(o),"square"===u),c)),_=De((we(l={},"Avatar-content--".concat(o),o),we(l,"Avatar-content",e.includes(d)),l)),S=De(we({},"Avatar-content",e.includes(d))),E={size:o,firstName:a,lastName:s,appearance:d,darkAppearance:e};return n&&y?Se.createElement(M,{tooltip:i&&"string"==typeof i?"".concat(i," ").concat(f||""):"".concat(a||""," ").concat(s||""," ").concat(f||"")||"",position:r,triggerClass:"flex-grow-0"},t()):t()},pe=(ue.displayName="Avatar",ue.Icon=function(e){var t=Se.useContext(re),n=t.size,r=t.appearance,t=t.darkAppearance,t=void 0===t?[]:t,n="regular"===n?20:16,o=r&&ie[r]||"inverse",t=De(we({},"Avatar-content",r&&t.includes(r)));return Se.createElement(R,xe({},e,{size:n,appearance:o,className:t}))},ue.Image=function(e){var t=e.children,n=e.src,r=Ce(Se.useState(!1),2),o=r[0],i=r[1],r=Se.useContext(re),a=r.size,s=r.appearance,l=r.firstName,c=r.lastName,r=r.darkAppearance,e=Oe(e),c="".concat(l?l.trim()[0]:"").concat(c?c.trim()[0]:""),u=a&&ae[a],p=De((we(p={},"Avatar-content--".concat(a),a),we(p,"Avatar-content",s&&r.includes(s)),p)),r=De(we({},"Avatar-content",s&&r.includes(s)));return t?Se.createElement(Se.Fragment,null,t):o?c?Se.createElement(Te,xe({weight:"medium",appearance:"white",className:p},e),c):Se.createElement(R,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===a?20:16,appearance:"white",className:r}):Se.createElement("img",xe({"data-test":"DesignSystem-Image",src:n,alt:l},e,{height:u,width:u,onError:function(){i(!0)}}))},ue.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular",shape:"round"},Se.useEffect),fe=Se.useState,he=(ne.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconType"]),de={tiny:12,regular:16,large:20},me=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.appearance,r=void 0===r?"basic":r,o=e.iconAlign,o=void 0===o?"left":o,i=e.tabIndex,i=void 0===i?0:i,a=e.largeIcon,s=e.type,l=e.children,c=e.icon,u=e.expanded,p=e.selected,f=e.loading,h=e.disabled,d=e.className,m=e.iconType,e=U(e,he),p=De((we(g={},"Button",!0),we(g,"Button--expanded",u),we(g,"Button--".concat(n),n),we(g,"Button--".concat(n,"Square"),!l),we(g,"Button--".concat(r),r),we(g,"Button--selected",p&&("basic"===r||"transparent"===r)),we(g,"Button--iconAlign-".concat(o),l&&o),we(g,"".concat(d),d),g)),g=De((we(d={},"Button-icon",!0),we(d,"Button-icon--".concat(o),l&&o),we(d,"Button-regularIcon--".concat(o),l&&o&&"regular"===n&&!u),d));return Se.createElement("button",xe({"data-test":"DesignSystem-Button",ref:t,type:s,className:p,disabled:h||f,tabIndex:i},e),f?Se.createElement(Se.Fragment,null,Se.createElement(Xn,{size:"small",appearance:"basic"===r||"transparent"===r?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),Se.createElement(Te,{className:"Button-text Button-text--hidden"},l||"")):Se.createElement(Se.Fragment,null,c&&Se.createElement("div",{className:g,"data-test":"DesignSystem-Button--Icon-Wrapper"},Se.createElement(R,{"data-test":"DesignSystem-Button--Icon",name:c,type:m,size:a&&!l?de[n]+4:de[n]})),l&&Se.createElement("span",{className:"Button-text"},l)))}),Pe=Se.forwardRef(function(e,t){var n=e.icon,r=e.tooltip;return n&&r&&!e.children?Se.createElement(M,{tooltip:r},Se.createElement(me,xe({},e,{ref:t}))):Se.createElement(me,xe({},e,{ref:t}))});Pe.displayName="Button";function ge(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function ye(e,t){return new Date(e,t+1,0).getDate()}function ve(e,t,n){if(e){var r=J(e).decadeYear;switch(t){case"less":if(r<n)return!0;break;case"more":if(n<r)return!0;break;case"equal":if(r===n)return!0}}return!1}function $(e,t,n,r,o){if(e){var e=J(e),i=e.year,a=e.month,s=e.date;switch(t){case"less":if(i<n)return!0;if(n<i)return!1;if(void 0!==r){if(a<r)return!0;if(r<a)return!1}if(void 0!==o&&s<o)return!0;break;case"more":if(n<i)return!0;if(i<n)return!1;if(void 0!==r){if(r<a)return!0;if(a<r)return!1}if(void 0!==o&&o<s)return!0;break;case"equal":if(void 0!==o){if(i===n&&a===r&&s===o)return!0}else if(void 0!==r){if(i===n&&a===r)return!0}else if(i===n)return!0}}return!1}function C(e,t){var r,o,i,a,s;return e&&t?(t=J(t),r=t.year,o=t.month,i=t.date,a=e.includes("/")?"/":"-",(s=e.split(a)).reduce(function(e,t,n){switch(t){case"mm":e+=(o<9&&"0")+(o+1);break;case"yyyy":e+=r;break;case"dd":e+=(i<10&&"0")+i}return n!==s.length-1&&(e+=a),e},"")):""}function be(e,t){var n,r,o,i,a;if(K(2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],t,e))return n=e.includes("/")?"/":"-",i=o=r=-1,a=t.split(n),e.split(n).forEach(function(e,t){switch(e){case"mm":o=+a[t]-1;break;case"yyyy":r=+a[t];break;case"dd":i=+a[t]}}),m({year:r,month:o,date:i})}function _e(e,t,n,r,o){var i=new Date("".concat(o,"-").concat(r,"-").concat(n));if(e)switch(t){case"less":return e<=i;case"equal":return e.toDateString()===i.toDateString();case"more":return i<=e;default:return!1}return!1}function Me(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=e.tabIndex,e=U(e,rt);return Ee({},n?{onClick:n,role:o,tabIndex:t||0,"aria-label":e["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,it(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,tabIndex:t,"aria-label":e["aria-label"]})}function Ae(e){function t(e){var t;return De((we(t={},"Chip-icon",!0),we(t,"Chip-icon--".concat(e),e),we(t,"Chip-icon-disabled--right","right"===e&&l),we(t,"cursor-pointer","right"===e&&!l),we(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),p&&p()}function r(){f&&f()}function o(e){var t;return De((we(t={},"primary_dark",u),we(t,"subtle",!u&&"right"===e),we(t,"inverse",!u&&"left"===e),t))}var i=e.label,a=e.icon,s=e.clearButton,l=e.disabled,c=e.className,u=e.selected,p=e.onClose,f=e.onClick,h=e.labelPrefix,d=e.iconType,m={maxWidth:e.maxWidth},g=(_=Ce(Se.useState(!1),2))[0],y=_[1],v=M.useAutoTooltip().detectTruncation,b=Se.createRef(),_=(Se.useEffect(function(){var e=v(b);y(e)},[b]),Oe(e)),e=De((we(e={},"primary-dark",u),we(e,"inverse",!l&&!u),e));return Se.createElement(M,{showTooltip:g,"data-test":"DesignSystem-GenericChip--Tooltip",tooltip:(g="string"==typeof i?i:"",h?"".concat(h," ").concat(g):g),triggerClass:"flex-grow-0"},Se.createElement("div",xe({tabIndex:l?-1:0,style:m,"data-test":"DesignSystem-GenericChip--Wrapper",role:"button",onKeyDown:function(e){"Enter"===e.key&&r()}},_,{className:"Chip-wrapper ".concat(c),onClick:r}),a&&Se.createElement(R,{"data-test":"DesignSystem-GenericChip--Icon",name:a,type:d,appearance:o("left"),className:t("left")}),"string"==typeof i?Se.createElement("div",{className:"Chip-text--truncate",ref:b},h&&Se.createElement(Te,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:e,className:"Chip-text mr-3"},h),Se.createElement(Te,{"data-test":"DesignSystem-GenericChip--Text",color:e,className:"Chip-text"},i)):i,s&&Se.createElement("div",{role:"button",onClick:n,tabIndex:l?-1:0,onKeyDown:function(e){"Enter"===e.key&&n(e)},className:t("right"),"data-test":"DesignSystem-GenericChip--clearButton"},Se.createElement(R,{name:"clear",appearance:o("right"),className:"p-2"}))))}function Ie(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})}function Re(e){switch(e.name){case"checked--regular":return g.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.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 g.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.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 g.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return g.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function Fe(e){var o=e.inputFormat,i=e.inputOptions,a=e.validators,s=e.setState,e=(r=e.state).init,t=r.date,l=void 0===(n=i.placeholderChar)?"_":n,n=i.error||i.required&&r.error&&e,r=void 0===i.caption?"Invalid value":i.caption,c=H[o];return Se.createElement(Fn,xe({icon:"events",placeholder:o},i,{error:n,mask:c,value:t?C(o,t):e?Fn.utils.getDefaultValue(c,l):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(l)&&(t=be(o,t,a),s({date:t})),n&&n(e)},onPaste:function(e,t){var n,r=i.onPaste;s({open:!0}),t&&!t.includes(l)&&(n=be(o,t,a),s({date:n})),r&&r(e,t)},onBlur:function(e,t){var n=i.onBlur,r=(s({init:!0}),/\d/);t&&r.test(t)&&t.includes(l)?s({error:!0}):(!t||r.test(t))&&t||s({error:!1}),n&&n(e,t||"")},onClear:function(e){var t=i.onClear;s({init:!0,date:void 0}),t&&t(e)},caption:n?r:"",validators:[function(e){return K(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function Ne(e,t){var e=en(ke(e)),n=en(ke(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function Le(e){return void 0!==e}function je(e){return void 0!==e}function Be(e,t,n){return e&&n&&""===t}function ze(e,t,n,r){return r&&n&&0===t&&""===e}function Ve(e,t,n){return e.length?0<e.length&&0<n&&e.length===t-n?{indeterminate:!0,checked:!0}:(n=0<e.length&&e.length!==t,{checked:0<e.length&&e.length===t,indeterminate:n}):{indeterminate:!1,checked:!1}}function He(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Ke(e){var t,n,r,o,i,a,s=e.open,l=e.endTime,c=e.interval,u=e.onChange,p=e.startTime,f=e.timeFormat,h=e.showDuration,d=e.noResultMessage,m=e.disabledSlotList,g=e.fetchTimeOptions,y=e.error,v=Ce(Se.useState(0),2),b=v[0],_=v[1],S=(v=Ce(Se.useState(!1),2))[0],E=v[1],w=(v=Ce(Se.useState(-1),2))[0],x=v[1],C=(v=Ce(Se.useState(0),2))[0],k=v[1],D=(t=(v=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,v=e.id,e=t?wt(t):"00:00",n=n?wt(n):At(t),e=Dt(e,n,r),Mt(e,o,v,i,t,a));return Se.useEffect(function(){void 0!==s&&E(s)},[s]),Se.useEffect(function(){var e;return S&&-1!=w&&(_(w),e=setTimeout(function(){He(w,D)},100)),function(){clearTimeout(e)}},[S]),Se.useEffect(function(){k(C+1)},[p,l,c,h,m]),Se.createElement(wn,{key:C,maxHeight:160,loadersCount:0,withSearch:!0,open:S,tabIndex:b,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(gt(f)&&(e=Et(e)),D.findIndex(function(e){return e.value===t}));x(n),u&&u(e)},fetchOptions:g||function(e){n=e,t=Xt(t=D);var t,n,r=""===n?(r=Rt(),Yt(t,r)):Qt(t,n);return _(t=""===e&&-1!=w?w:r),Promise.resolve({options:-1===r?[]:D,count:D.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:d,staticLimit:D.length,onPopperToggle:function(){E(!S)},error:y})}function Ue(e){var t=e.validators,s=e.inputOptions,l=e.inputFormat,c=e.outputFormat,u=e.onTimeChange,n=e.time,e=e.error,p=(i=Ce(Se.useState(n),2))[0],r=i[1],o=(i=Ce(Se.useState(!1),2))[0],f=i[1],h=void 0===(i=s.placeholderChar)?"_":i,i=(Se.useEffect(function(){var e=P(l,p),e=void 0===n&&e.includes(h)?p:n;r(e)},[n]),X[l]);return Se.createElement(Fn,xe({placeholder:F[l],placeholderChar:h},s,{mask:i,value:p?P(l,p):o?Fn.utils.getDefaultValue(i,h):"",validators:function(e){return K(t,e,l)},onChange:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=null==t?void 0:t.toUpperCase();r(n),s.onChange&&s.onChange(e,t)},onClear:function(e){f(!0),u&&u(""),s.onClear&&s.onClear(e)},onBlur:function(e){var t,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=P(l,p);f(!0),u&&(r=!a||(r=h,(o=a)&&o.includes(r))?void 0:(o=a,(r=l)===(a=c)?o:(o=(r=z(r,o)).hours,t=r.minutes,r=r.am_pm,n=N(a)?L(o).AMPM:"",o=N(a)?L(o).hrs:j(o,r),V(a,{minutes:t,hours:o,am_pm:n}))),u(r)),s.onBlur&&s.onBlur(e,i)},error:e,id:"parent-TimePicker"}))}var We=12,Ge=3,qe=12,Ye=3,$e=7,Je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ze={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},Xe=We,Qe=function(e){return e-e%Xe},J=function(e){var t,n,r;return(e=e&&m(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:Qe(t),year:t,month:n,day:r,date:e}):{}},m=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?be(t,e,n):void 0;r=e instanceof Date?e:(t=e.year,new Date(t,e.month,e.date,0,0,0))}return r},et=(()=>{e(f,Se["Component"]);var p=d(f);function f(e){h(this,f),we(Y(q=p.call(this,e)),"updateState",function(e,t,n){q.setState({year:e,month:t,date:n})}),we(Y(q),"getDateValue",function(e,t,n){return new Date(e,t,n)}),we(Y(q),"getNavDateInfo",function(e){var t=q.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%qe==-1?11:(t+e)%qe,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),we(Y(q),"getInRangeError",function(){var e=q.props,t=e.rangePicker,e=e.rangeLimit,n=q.state,r=n.startDate,o=n.endDate,n=n.hoverDate;if(t&&e){var i,t=J(r),a=t.year,s=t.month,t=t.date,l=J(o),c=l.year,u=l.month,l=l.date,n=J(n),p=n.year,f=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),$(i,"less",p,f,n+1)||$(i,"less",c,u,l+1);if(o)return(i=new Date(o)).setDate(l-e),$(i,"more",p,f,n-1)||$(i,"more",a,s,t-1)}return!1}),we(Y(q),"selectYear",function(e){return function(){q.updateState(e),q.setState({view:"month"})}}),we(Y(q),"yearMouseOverHandler",function(e,t,n,r){var o=q.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),we(Y(q),"selectMonth",function(e){return function(){q.updateState(q.state.yearNav,e),q.setState({view:"date"})}}),we(Y(q),"monthMouseOverHandler",function(e,t,n,r){var o=Je,i=q.props.onMonthHover,o={value:o[e],month:o[e],year:q.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),we(Y(q),"selectDate",function(e,t,n,r){e=q.calculateDate(e,t,n,r,!1);q.setState({currDate:e})}),we(Y(q),"calculateDate",function(e,t,n,r,o){var i,a,s="",n=(t<=0?(i=e-1,a=n+t,s="prev"):a=(i=e,t),q.getNavDateInfo(i)),e=n.year,t=n.month;return!1===o&&(q.updateState(e,t,a),q.onNavIconClickHandler(s)()),q.getDateValue(e,t,a)}),we(Y(q),"onNavIconClickHandler",function(s){return function(){var e=q.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=We,a=qe;switch(t){case"year":"prev"===s&&q.setState({yearBlockNav:n-i}),"next"===s&&q.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&q.setState({yearNav:r-1}),"next"===s&&q.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&q.setState({yearNav:r-1}),q.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&q.setState({yearNav:r+1}),q.setState({monthNav:(o+1)%a}))}}}),we(Y(q),"renderJumpButton",function(e){var t=q.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=q.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,l=o.monthNav,c=!1;switch(i){case"year":"prev"===e&&(c=ve(n,"more",a)||ve(n,"equal",a)),"next"===e&&(c=ve(r,"less",a)||ve(r,"equal",a));break;case"month":"prev"===e&&(c=$(n,"more",s-1)),"next"===e&&(c=$(r,"less",s+1));break;case"date":"prev"===e&&(c=$(n,"more",s,l-1)),"next"===e&&(c=$(r,"less",s,l+1))}o=De(we({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return Se.createElement(Pe,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:c,size:"small"===t?"tiny":"regular",onClick:q.onNavIconClickHandler(e)})}),we(Y(q),"onNavHeadingClickHandler",function(n){return function(){var e=q.props.monthsInView,t=q.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&q.setState({view:"date"}),"month"===n&&q.setState({view:"year"}),"date"===n)&&q.setState({view:"month"})}}),we(Y(q),"renderHeaderContent",function(e){function t(e){return"small"===r?Se.createElement(Se.Fragment,null,Se.createElement(Te,{weight:"strong"},e),"year"!==a&&!i&&Se.createElement(R,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):Se.createElement(Se.Fragment,null,Se.createElement(kn,{size:"s"},e),"year"!==a&&!i&&Se.createElement(R,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=q.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=q.state,a=n.view,n=n.yearBlockNav,s=We,l=Je,c=q.getNavDateInfo(e),u=c.year,c=c.month,o=De({"Calendar-headerContent":!0,"Calendar-headerContent--noIcon-left":e===o-1,"Calendar-headerContent--noIcon-right":0===e}),e="";"year"===a&&(e="".concat(n," - ").concat(n+(s-1))),"month"===a&&(e="".concat(u));return Se.createElement("div",{className:o},"date"!==a&&Se.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:q.onNavHeadingClickHandler(a)},t(e)),"date"===a&&Se.createElement(Se.Fragment,null,Se.createElement("div",{onClick:q.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(l[c])),Se.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:q.onNavHeadingClickHandler("month")},t(u))))}),we(Y(q),"renderBodyYear",function(){var e=We,c=Ge,t=q.props,u=t.size,p=t.rangePicker,f=t.disabledBefore,h=t.disabledAfter,t=q.state,d=t.yearBlockNav,m=t.currYear,t=Math.ceil(e/c);return Array.from({length:t},function(e,l){return Se.createElement("div",{key:l,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){var n,r,o,i,a,s=c*l+t;if(s!==d)return a=!(s=$(f,"more",n=d+s)||$(h,"less",n))&&!p&&n===q.state.year,r=function(){return n===m},o=De((we(o={"Calendar-value":!0,"Calendar-value--active":a,"Calendar-value--disabled":s,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(u),u),we(o,"Calendar-value--currDateMonthYear",r()),o)),i=De({"Calendar-value--currDate":r()&&!a,"Calendar-text":!0}),a=De({inverse:!a&&!r()&&!s,white:a,"primary-lighter":r()&&s,primary:r(),"inverse-lightest":s}),Se.createElement("div",{key:"".concat(l,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:q.selectYear(n),onMouseOver:q.yearMouseOverHandler.bind(Y(q),n,r(),s)},Se.createElement(Te,{size:"small"===u?"small":"regular",color:a,className:i},n))}))})}),we(Y(q),"renderBodyMonth",function(){var e=qe,c=Ye,u=Je,t=q.props,p=t.size,f=t.disabledBefore,h=t.disabledAfter,t=q.state,d=t.yearNav,m=t.year,g=t.currYear,y=t.currMonth,t=Math.ceil(e/c);return Array.from({length:t},function(e,l){return Se.createElement("div",{key:l,className:"Calendar-valueRow"},Array.from({length:c},function(e,t){function n(){return g===d&&y===r}var r=c*l+t,o=$(f,"more",d,r)||$(h,"less",d,r),i=!o&&m===d&&r===q.state.month,a=De((we(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(p),p),we(a,"Calendar-value--currDateMonthYear",n()),a)),s=De({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o}),i=De({"Calendar-value--currDate":n()&&!i,"Calendar-text":!0});return Se.createElement("div",{key:"".concat(l,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:q.selectMonth(r),onMouseOver:q.monthMouseOverHandler.bind(Y(q),r,n(),o)},Se.createElement(Te,{size:"small"===p?"small":"regular",color:s,className:i},u[r]))}))})}),we(Y(q),"onDateRowMouseLeaveHandler",function(){q.props.rangePicker&&q.setState({hoverDate:void 0})}),we(Y(q),"renderBodyDate",function(e){var o=$e,i=Ze,t=q.props,a=t.size,s=t.firstDayOfWeek,l="large"===a?"regular":"small";return Se.createElement(Se.Fragment,null,Se.createElement("div",{className:"Calendar-dayValues"},Array.from({length:7},function(e,t){var n=De({"Calendar-valueWrapper":!0}),r=(t+o+ge(s))%o;return Se.createElement(Te,{key:t,className:n,appearance:"default",weight:"strong",size:l},i[a][r])})),Se.createElement("div",{className:"Calendar-dateValues",onMouseLeave:q.onDateRowMouseLeaveHandler},q.renderDateValues(e)))}),we(Y(q),"renderDateValues",function(_){function S(e){return function(){(!D||M&&A||!W)&&q.selectDate(_,e,H,K)}}function E(t){return function(){var e;D&&(e=q.getDateValue(z,V,t),M&&A||q.setState({hoverDate:e}))}}function w(e,t,n,r){var e=q.calculateDate(_,e,H,K,!0)||new Date,o=Je,i=Ze.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:q.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var x=$e,C=qe,e=q.props,k=e.size,D=e.rangePicker,t=e.firstDayOfWeek,O=e.disabledBefore,P=e.disabledAfter,T=e.monthsInView,a=e.onDateHover,e=q.state,M=e.startDate,A=e.endDate,I=e.hoverDate,R=e.year,F=e.month,N=e.date,L=e.currMonth,j=e.currYear,B=e.todayDate,e=q.getNavDateInfo(_),z=e.year,V=e.month,H=ye(z,V-1),K=ye(z,V),e=new Date(z,V).getDay(),t=ge(t),U=Math.abs((e-t+7)%7),e=Math.ceil((K+U)/x),W=(6===e||1<T||(e+=1),q.getInRangeError()),G=q.props.events;return Array.from({length:e},function(e,b){return Se.createElement("div",{key:b,className:"Calendar-valueRow"},Array.from({length:x},function(e,t){function n(){var e=r<=0?j===z&&L===V-1&&B===H+r:K<r?j===z&&L===V+1&&B===r-K:j===z&&L===V&&B===r;return e}var r=x*b+t-U+1,o=r<=0||K<r,i=$(O,"more",z,V,r)||$(P,"less",z,V,r),a=!i&&R===z&&F===V&&N===r,s=!1,l=J(M),l=(l.year,J(A)),l=(l.year,A&&!1),c=M&&!1,u="".concat(r<=0?H+r:K<r?r-K:r),p="".concat(r<=0?0===V?V+C:(V-1)%C+1:K<r?(V+1)%C+1:V+1),f="".concat(r<=0&&V+1===1?z-1:K<r&&V+1===12?z+1:z),h="".concat(2===p.length?p:"0".concat(p),"/").concat(2===u.length?u:"0".concat(u),"/").concat(f),h=G&&"object"===Z(G)&&G.hasOwnProperty(h),d=(D&&(d=$(M,"equal",z,V,r),m=$(A,"equal",z,V,r),g=$(I,"equal",z,V,r),a=!i&&(d||m),M&&A?s=!i&&(_e(M,"less",u,p,f)&&_e(A,"more",u,p,f)||d||m):M?s=!i&&(_e(I,"more",u,p,f)||g)&&_e(M,"less",u,p,f):A&&(s=!i&&(_e(I,"less",u,p,f)||g)&&_e(A,"more",u,p,f))),s&&W),m=M&&_e(M,"equal",u,p,f),g=A&&_e(A,"equal",u,p,f),y=M&&A&&(m||g),v=q.props.allowReverseSelection&&_e(I,"equal",u,p,f)&&I&&(M&&I<M||A&&I<A),u=_e(I,"equal",u,p,f)&&I&&M&&M<=I,p=0===t||6===t,f=s||D&&(a||y),s=De({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--disabled":i,"Calendar-valueWrapper--inRange":!p&&f,"Calendar-valueWrapper--inEdgeRange":f&&p,"Calendar-valueWrapper--inRangeError":d,"Calendar-valueWrapper--start":l&&!c&&6!==t||D&&m&&6!==t,"Calendar-valueWrapper--end":c&&!l&&0!==t||D&&g&&0!==t,"Calendar-valueWrapper--startEnd":l&&c,"Calendar-valueWrapper--startError":l&&d||D&&d&&m,"Calendar-valueWrapper--endError":c&&d||D&&d&&g,"Calendar-valueWrapper--dummy":o&&!i&&!y,"Calendar-valueWrapper--active-dummy":o&&!i&&y,"Calendar-valueWrapper--hoverDate":D&&u,"Calendar-valueWrapper--hoverEndDate":D&&v,"Calendar-valueWrapper--inStartRange":f&&0===t&&!a&&!y,"Calendar-valueWrapper--inEndRange":f&&6===t&&!a&&!y}),m=De((we(p={"Calendar-value":!0,"Calendar-inRangeValue":!(l||c||a||y),"Calendar-value--start":l&&!c,"Calendar-value--end":c&&!l,"Calendar-value--startError":l&&d,"Calendar-value--endError":c&&d,"Calendar-value--active":a||y,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(k),k),we(p,"Calendar-value--currDateMonthYear",n()),we(p,"Calendar-value--currDate",n()&&!a&&!y),p)),g=De({inverse:!(a||n()||i||y),white:a||y,primary:n()});return Se.createElement("div",{key:"".concat(b,"-").concat(t),className:s,"data-test":"designSystem-Calendar-WrapperClass"},!o&&Se.createElement(Se.Fragment,null,Se.createElement(Te,{color:g,size:"small"===k?"small":"regular",appearance:i?"subtle":"default","data-test":"DesignSystem-Calendar--dateValue",className:m,onClick:S(r),onMouseOver:E(r),onMouseEnter:w.bind(Y(q),r,n(),i)},r),h&&q.renderEventsIndicator(k,a)),(o&&0<r&&_===T-1||o&&r<=0&&0===_)&&Se.createElement(Se.Fragment,null,Se.createElement(Te,{appearance:a||y?"white":n()?"link":"subtle",size:"small"===k?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:m,onClick:S(r),onMouseOver:E(r),onMouseEnter:w.bind(Y(q),r,n(),i)},r<=0?H+r:r-K),h&&q.renderEventsIndicator(k,a)))}))})}),we(Y(q),"renderCalendar",function(e){var t=q.props,n=t.size,t=t.monthsInView,r=q.state.view,o=De((we(o={},"Calendar",!0),we(o,"Calendar-".concat(r,"--").concat(n),r),we(o,"Calendar--".concat(n),n),o)),n=De(we({},"Calendar-header--".concat(n),n)),i=De({"Calendar-body":!0});return Se.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},Se.createElement("div",{className:n},0===e&&q.renderJumpButton("prev"),q.renderHeaderContent(e),e===t-1&&q.renderJumpButton("next")),Se.createElement("div",{className:i},"year"===r&&q.renderBodyYear(),"month"===r&&q.renderBodyMonth(),"date"===r&&q.renderBodyDate(e)))});var q,t=q.props,n=t.rangePicker,r=t.startDate,o=t.endDate,i=t.monthsInView,t=t.view,n=n?o||r:e.date,a=void 0!==e.yearNav?e.yearNav:J(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:J(n||Date.now()).month,s=J(n),l=s.year,c=s.month,s=s.date,u=J(new Date(Date.now()));return q.state={currDate:n,startDate:r,endDate:o,yearNav:a,monthNav:e,year:l,month:c,date:s,todayDate:u.date,currMonth:u.month,currYear:u.year,view:1<i?"date":t,yearBlockNav:Qe(a)},q}return a(f,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(r=(i=J(this.props.date)).year,this.updateState(r,i.month,i.date),r=m(this.props.date),this.setState({currDate:r})),this.props.startDate&&!isNaN(this.props.startDate.getTime())&&e.startDate!==this.props.startDate&&(i=m(this.props.startDate),this.setState({startDate:i})),this.props.endDate&&!isNaN(this.props.endDate.getTime())&&e.endDate!==this.props.endDate&&(r=m(this.props.endDate),this.setState({endDate:r})),e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav&&(i=this.props.yearNav)&&this.setState({yearNav:i,yearBlockNav:Qe(i)}),e.monthNav!==this.props.monthNav&&(r=this.props.monthNav)&&this.setState({monthNav:r}),t.currDate!==this.state.currDate&&(e=(i=this.props).rangePicker,r=i.onDateChange,a=(i=this.state).currDate,o=i.startDate,i=i.endDate,a)&&(r&&r(a),e?(this.setState({hoverDate:void 0}),o&&i?this.setState({startDate:a,endDate:void 0}):(e=(r=J(a)).year,n=r.month,r=r.date,o?$(o,"more",e,n,r)?this.setState({startDate:a}):this.setState({endDate:a}):i&&$(i,"less",e,n,r)?this.setState({endDate:a}):this.setState({startDate:a}))):this.setState({startDate:a})),(this.state.startDate&&!isNaN(this.state.startDate.getTime())&&(null==(o=t.startDate)?void 0:o.getTime())!==(null==(i=this.state.startDate)?void 0:i.getTime())||this.state.endDate&&!isNaN(null==(e=this.state.endDate)?void 0:e.getTime())&&(null==(n=t.endDate)?void 0:n.getTime())!==(null==(r=this.state.endDate)?void 0:r.getTime()))&&(a=this.props.onRangeChange,i=(o=this.state).startDate,a)&&a(i,o.endDate),this.props.allowReverseSelection&&t.hoverDate!==this.state.hoverDate&&(n=(e=this.state).hoverDate,r=e.endDate,(a=e.startDate)&&!r?(o=(i=J(a)).year,$(n,"less",o,i.month,i.date)&&this.setState({startDate:void 0,endDate:a})):r&&!a&&(o=(e=J(r)).year,$(n,"more",o,e.month,e.date))&&this.setState({startDate:r,endDate:void 0})),t.year!==this.state.year&&void 0!==(i=this.state.year)&&1===s&&this.setState({year:i,yearBlockNav:Qe(i),yearNav:i}),t.month!==this.state.month&&void 0!==(a=this.state.month)&&1===s&&this.setState({monthNav:a})}},{key:"renderEventsIndicator",value:function(e,t){var n,e=De((we(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),we(n,"Calendar-eventsIndicator--active",t),n));return Se.createElement("span",{"data-test":"DesignSystem-Calendar-Event-Indicator",className:e})}},{key:"render",value:function(){var n=this,e=this.props,t=e.monthsInView,e=e.className,r=Oe(this.props),e=De({"Calendar-wrapper":!0},e);return Se.createElement("div",xe({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),f})(),tt=(we(et,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0}),["shadow","children","className"]),n=Se.forwardRef(function(e,t){var n,r=e.shadow,r=void 0===r?"shadow10":r,o=e.children,i=e.className,e=U(e,tt),r=De((we(n={Card:!0},"Card--".concat(r),r),we(n,"".concat(i),i),n));return Se.createElement("div",xe({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),nt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),rt=(Se.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=U(e,nt),n=De(we({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return Se.createElement("div",xe({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role","tabIndex"]),ot={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},it=function(e,t){return!!ot[e]&&ot[e].has(t)},at={timelapse:"outlined",content_copy:"outlined",speed:"outlined",add_circle_outline:"outlined",turned_in_not:"outlined",important_devices:"outlined",thumb_down_off_alt:"outlined",alarm_on:"outlined",calendar_view_month:"outlined",aspect_ratio:"outlined",change_history:"outlined",arrow_circle_down:"outlined",card_membership:"outlined",query_builder:"outlined",copyright:"outlined",arrow_circle_up:"outlined",alarm:"outlined",work_outline:"outlined",bookmark_border:"outlined",delete_outline:"outlined",credit_card:"outlined",highlight_of:"outlined",check_circle_outline:"outlined",help_outline:"outlined",schedule:"outlined",radio_button_unchecked:"outlined",radio_button_checked:"outlined",delete:"outlined"},R=function(e){var t,n=e.appearance,r=e.className,o=e.name,i=e.size,a=e.children,s=Me(e),l=Oe(e),e=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||o&&at[o]||"rounded",c=n&&n.includes("_")?(t=(c=n).indexOf("_"),c.slice(0,t)+c.charAt(t+1).toUpperCase()+c.slice(t+2)):n,e=De((we(t={},"material-symbols",!0),we(t,"material-symbols-rounded","rounded"===e),we(t,"material-symbols-outlined","outlined"===e),we(t,"Icon",!0),we(t,"Icon--".concat(c),n),we(t,"".concat(r),r),t)),n={fontSize:"".concat(i,"px"),width:"".concat(i,"px")};return a&&Se.isValidElement(a)?Se.createElement("span",xe({},l,{className:r}),a):Se.createElement("i",xe({"data-test":"DesignSystem-Icon"},l,{className:e,style:n},s),o)},st=(R.displayName="Icon",R.defaultProps={size:16},["children","componentType","className"]),lt=Se.forwardRef(function(e,t){var n=e.children,r=e.componentType,r=void 0===r?"span":r,o=e.className,e=U(e,st);return Se.createElement(r,Ee(Ee({},e),{},{className:o,ref:t}),n)}),ct=["appearance","size","children","weight","small","className","color"],Te=Se.forwardRef(function(e,t){var n,r=e.appearance,r=void 0===r?"default":r,o=e.size,o=void 0===o?"regular":o,i=e.children,a=e.weight,s=e.small,l=e.className,c=e.color,e=U(e,ct),r=De((we(n={Text:!0},"Text--".concat(r),!c&&r),we(n,"Text--".concat(a),a),we(n,"Text--".concat(o),o),we(n,"color-".concat(c),c),we(n,"Text--small","small"===o||s),n),l);return Se.createElement(lt,xe({ref:t,"data-test":"DesignSystem-Text"},e,{className:r,componentType:"span"}),i)}),ut=(Te.displayName="Text",Te.defaultProps={appearance:"default",size:"regular"},Ae.displayName="GenericChip",Ae.defaultProps={maxWidth:"var(--spacing-9)"},function(e){var t,n=e.label,r=e.icon,o=e.clearButton,i=e.type,a=e.disabled,s=e.selected,l=e.onClose,c=e.onClick,u=e.name,p=e.className,f=e.labelPrefix,h=e.iconType,d=e.maxWidth,e=Oe(e),o="action"!==i&&o,m=!("selection"!==i||!s),i=De((we(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),we(t,"Chip--".concat(i),i&&!a),we(t,"Chip-".concat(i,"--selected"),s&&!a),we(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),we(t,"Chip-icon--clear",o),t),p);return Se.createElement(Ae,xe({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:m,icon:r,iconType:h,clearButton:o,disabled:a,className:i,onClose:function(){!a&&l&&l(u)},onClick:function(){!a&&c&&c(u)},name:u,labelPrefix:f,maxWidth:d}))}),pt=(ut.displayName="Chip",ut.defaultProps={type:"input",maxWidth:"var(--spacing-9)"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id","labelRef"]),ft=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.tabIndex,r=void 0===r?0:r,o=e.defaultChecked,i=e.indeterminate,a=e.label,s=e.error,l=e.disabled,c=e.onChange,u=e.name,p=e.value,f=e.className,h=e.checked,d=e.helpText,m=e.id,m=void 0===m?"".concat(u,"-").concat(a,"-").concat(Ie()):m,g=e.labelRef,y=U(e,pt),v=Se.useRef(null);Se.useImperativeHandle(t,function(){return v.current});var t=Ce(Se.useState(void 0===h?o:h),2),b=t[0],_=t[1],t=(Se.useEffect(function(){E(i)},[i]),Se.useEffect(function(){void 0!==h&&_(h)},[h]),De((we(t={},"Checkbox",!0),we(t,"Checkbox--disabled",l),t),f)),f=De((we(f={},"Checkbox-outerWrapper",!0),we(f,"Checkbox-outerWrapper--".concat(n),n),f)),e=De((we(S={},"Checkbox-input",!0),we(S,"Checkbox-input--checked",b),we(S,"Checkbox-input--indeterminate",e.indeterminate),S)),s=De((we(S={},"Checkbox-wrapper",!0),we(S,"Checkbox-wrapper--default",!s),we(S,"Checkbox-wrapper--error",s),S)),S=De((we(S={},"Checkbox-label",!0),we(S,"Checkbox-label--tiny","tiny"===n),S)),E=function(e){v.current.indeterminate=e},w=De((we(w={},"checked--regular",b&&"regular"===n),we(w,"checked--tiny",b&&"tiny"===n),we(w,"indeterminate--regular",i&&"regular"===n),we(w,"indeterminate--tiny",i&&"tiny"===n),w));return Se.createElement(Se.Fragment,null,Se.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},Se.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:f},Se.createElement("input",xe({},y,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===h&&(_(e.target.checked),E(e.target.indeterminate)),c&&c(e)},checked:b,disabled:l,ref:v,name:u,value:p,className:e,tabIndex:r,id:m,"data-test":"DesignSystem-Checkbox-InputBox"})),Se.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},w&&Se.createElement(Re,{name:w}))),Se.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&Se.createElement("label",{htmlFor:m,className:S,"data-test":"DesignSystem-Checkbox-Label"},Se.createElement(Te,{size:"tiny"===n?"small":"regular",appearance:l?"disabled":"default",className:"ellipsis--noWrap mw-100",ref:g},a.trim())),d&&Se.createElement(Te,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:l?"disabled":"subtle"},d.trim()))))}),ht=(ft.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),k=Se.forwardRef(function(e,t){var n,r=e.size,o=e.sizeXS,i=e.sizeS,a=e.sizeM,s=e.sizeL,l=e.sizeXL,c=e.className,u=e.children,e=U(e,ht),r=De((we(n={},"Col",!0),we(n,"Col--".concat(r),r),we(n,"Col--xs-".concat(o),o),we(n,"Col--s-".concat(i),i),we(n,"Col--m-".concat(a),a),we(n,"Col--l-".concat(s),s),we(n,"Col--xl-".concat(l),l),we(n,"".concat(c),c),n));return Se.createElement("div",xe({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),u)}),dt=(k.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children","view"]),n=(()=>{e(o,Se["Component"]);var r=d(o);function o(e){h(this,o),we(Y(c=r.call(this,e)),"getError",function(e){var t,n,r,o,i=c.props,a=i.disabledBefore,s=i.disabledAfter,l=i.outputFormat,i=i.onError;return!(!e||(t=(a=J(a)).year,n=a.month,a=a.date,r=(s=J(s)).year,o=s.month,s=s.date,!$(e,"less",t,n,a)&&!$(e,"more",r,o,s))||(i&&i(e,C(l,e)),0))}),we(Y(c),"onDateChangeHandler",function(e){c.setState({init:!0,date:e}),c.props.closeOnSelect&&c.setState({open:!1})}),we(Y(c),"onToggleHandler",function(e,t){var n=c.props.inputOptions.disabled;if(!n)switch(t){case"outsideClick":c.setState({open:e});break;case"onClick":c.setState({open:!0})}});var c,t=e.inputFormat,t=m(e.date,t,e.validators),n=c.getError(t);return c.state={date:t,error:n,init:!1,open:e.open||!1},c}return a(o,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.date!==this.props.date&&(n=(r=this.props).inputFormat,n=m(this.props.date,n,r.validators),this.setState({date:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date&&(n=(r=this.props).onDateChange,e=r.outputFormat,t=this.state.date,r=this.getError(t),this.setState({error:r}),n)&&(r?n(void 0,""):n(t,C(e,t)))}},{key:"renderCalendar",value:function(){var e=this,t=this.props,n=(t.date,t.inputFormat),r=t.validators,o=t.disabledBefore,i=t.disabledAfter,a=t.size,s=t.showTodayDate,s=void 0===s||s,l=t.children,l=void 0===l?Se.createElement(Se.Fragment,null):l,c=t.view,t=U(t,dt),u=this.state.date,p=Je,f=new Date(Date.now()),p="".concat(p[f.getMonth()]," ").concat(f.getDate()),u=m(u,n,r),o=m(o,n,r),i=m(i,n,r),n=function(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()},r=De({"d-flex justify-content-center":!0,"pb-5":"small"===a,"pb-6":"large"===a,"pt-3":"large"===a&&"year"===c});return Se.createElement("div",null,Se.createElement("div",{className:"d-flex"},l,Se.createElement(et,xe({},t,{size:a,date:u,view:c,disabledBefore:o,disabledAfter:i,onDateChange:this.onDateChangeHandler}))),s&&Se.createElement("div",{className:r,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},Se.createElement(ut,{label:"Today, ".concat(p),name:"chip",type:"action",disabled:!(o&&n(f,o)||i&&n(f,i))&&(o&&f<o||i&&i<f),onClick:function(){return e.onDateChangeHandler(new Date)}})))}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.popoverOptions,r=this.state.open;return e.withInput?Se.createElement(Ua,xe({trigger:Se.createElement(Fe,{inputFormat:e.inputFormat,inputOptions:e.inputOptions,validators:e.validators,state:this.state,setState:this.setState.bind(this)})},n,{triggerClass:"w-100",position:t,appendToBody:!0,open:r,onToggle:this.onToggleHandler}),this.renderCalendar()):this.renderCalendar()}}]),o})(),mt=(we(n,"defaultProps",Ee(Ee({},et.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[T],inputOptions:{},closeOnSelect:!0})),function(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}),gt=function(e){return"12-Hour"===e},yt=function(e){return vt(e)||bt(e)},vt=function(e){return e.includes("a")||e.includes("A")},bt=function(e){return e.includes("p")||e.includes("P")},_t=function(e){var e=Ce(e.split(" "),2),t=e[0],e=e[1],t=t.split(":"),n=t[0],t=t[1];return"12"===n&&vt(e)&&(n="00"),bt(e)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)},St=function(e){return("0"+e).slice(-2)},Et=function(e){var e=e.split(":"),t=parseInt(e[0],10),n=12<=t?"PM":"AM",t=(t%12||12).toString(),t=St(t),e=e[1];return"".concat(t.toString(),":").concat(e," ").concat(n)},wt=function(e){return yt(e)?_t(e):e},xt=function(e,t){e=mt(e);return mt(t)<e},Ct=function(e,t,n){for(var r=[],o=mt(e),i=mt(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r},kt=function(e,t,n){var n=Ct("00:00","23:59",n),e=n.indexOf(e),r=n.indexOf(t),t=""===t?e:r+1,r=n.slice(e),e=n.slice(0,t);return r.concat(e)},Dt=function(e,t,n){return(""===t||xt(e,t)?kt:Ct)(e,t,n)},Ot=function(e,t){e=new Date("07/07/2022 "+e),t=new Date("07/07/2022 "+t).getTime()-e.getTime(),e=new Date(t);return{hour:e.getUTCHours(),minute:e.getUTCMinutes()}},Pt=function(e,t,n,r){var o=e;return gt(t)&&(o=Et(e)),n&&r&&(n=(t=Ot(r,e)).hour,r=t.minute,o+=" (".concat(n," hr ").concat(r," min)")),o},Tt=function(e,t,n){var r=e;return gt(t)&&(r=Et(e)),!!n.includes(r)},Mt=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"TimePicker-Option-key",o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0;return e.map(function(e,t){return{label:Pt(e,n,o,i),value:e,disabled:a&&Tt(e,n,a),selected:!1,optionID:r+t}})},At=function(e){return e?"":"23:59"},It=function(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)},Rt=function(){var e=new Date;return St(e.getHours())+":"+St(e.getMinutes())},Ft=function(e){return(parseInt(e,10)%24).toString()},Nt=function(e){return(parseInt(e,10)%12).toString()},Lt=function(e){return/^[0-9]+$/.test(e)},jt=function(e){return/^[0-9]+[ AaMmPp]+$/.test(e)},Bt=function(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)},zt=function(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(e)},Vt=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Ht=function(e){var e=e.split(Vt),t=Ft(e[0]);return{hour:St(t),min:((""!==e[1]?It(e[1]):"00")+"0").slice(0,2)}},Kt=function(e,t){var n=e.length,r=parseInt(e,10),o=e.slice(0,2),i="00",a="00";switch(n){case 1:i="0"+e;break;case 2:r<=24||t&&r<=12?i=St(e):(i="0"+e[0],a=It(e[1]+"0"));break;case 3:i="0"+e[0],a=It(e.slice(1));break;case 4:i=(t?Nt:Ft)(o),a=It(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}},Ut=function(e){e=e.split(/[\saAmMpP]/),e=Kt(e[0],!0);return{hour:e.hour,min:e.min}},Wt=function(e,t){var n,r={hour:"00",min:"00"};return Lt(t)?(n=Kt(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?qt(e,n):n):jt(t)?(r=Ut(t)).hour=Gt(r.hour,t):Bt(t)?(n=Ht(t),r=parseInt(n.hour)<=12?qt(e,n):n):zt(t)&&(e=t.replace(/[\saApPmM]/g,""),Lt(e)?r=Kt(e,!0):Bt(e)&&(r=Ht(e)),r.hour=Gt(r.hour,t)),r},Gt=function(e,t){return"12"===e&&vt(t)?e="00":bt(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e},qt=function(e,t){var n="".concat(t.hour,":").concat(t.min),r=Rt(),o=xt(r,n),r=Yt(e,r),e=Yt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t},Yt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=Ot(t,e[o]),a=i.hour,i=i.minute;(a<r.hour||a===r.hour&&i<r.mins)&&(r.hour=a,r.mins=i,n=o)}return n},$t=function(e,t){var t=Wt(e,t),n=t.hour,t=t.min,n=("60"===t&&(t="00",n=(parseInt(n,10)+1).toString()),"".concat(n,":").concat(t));return Yt(e,n)},Jt=function(e){return(null==(e=e.match(/\d/g))?void 0:e.length)||0},Zt=function(e){e=Jt(e);return 0<e&&e<5},Xt=function(e){return e.map(function(e){return e.value})},Qt=function(e,t){return Zt(t)?$t(e,t):-1},en=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},tn=function(e,t){e.scrollTo(0,t)};Ke.defaultProps={timeFormat:"12-Hour",interval:15},Ke.displayName="TimePickerWithSearch",Ue.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},Ue.displayName="TimePickerWithInput";function nn(a,s,l,c){var u,p=!1,f=0;function h(){u&&clearTimeout(u)}function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this,o=Date.now()-f;function i(){f=Date.now(),l.apply(r,t)}p||(c&&!u&&i(),h(),void 0===c&&a<o?i():!0!==s&&(u=setTimeout(c?function(){u=void 0}:i,void 0===c?a-o:a)))}return"boolean"!=typeof s&&(c=l,l=s,s=void 0),e.cancel=function(){h(),p=!0},e}function rn(e,t,n){return void 0===n?nn(e,t,!1):nn(e,n,!1!==t)}Ee(Ee({},Ue.defaultProps),Ke.defaultProps);function on(e){function t(){h||i&&i(l)}var n=e.optionData,r=e.selected,o=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,l=e.index,c=e.checkboxes,u=e.menu,p=void 0===(p=e.id)?"":p,f=(n.optionType?n:e).optionType,h=n.disabled,d=h?"inverse-lightest":r&&!u?"primary-dark":"inverse",m=h?"disabled":r&&!u?"primary_dark":"default",g=yn[f=c?"WITH_CHECKBOX":void 0===f?"DEFAULT":f],y=De((we(y={},"Option",!0),we(y,"Option--active",s),we(y,"Option--selected",r&&!u),we(y,"Option--disabled",h),we(y,"OptionWrapper",!0),we(y,"color-".concat(d),!0),y)),v=De((we(v={},"Option-checkbox",!0),we(v,"Option-checkbox--active",s),we(v,"OptionWrapper",!0),v)),b=De((we(b={},"Option-text",!0),we(b,"Option-text--wrap",!e.truncateOption),b)),_=De((we(_={},"OptionWrapper",!0),we(_,"OptionWrapper--disabled",h),_));return e.optionRenderer?Se.createElement("div",xe({"data-test":"DesignSystem-DropdownOption--Custom",className:_,"data-disabled":h,onMouseEnter:t},!c&&{onClick:o}),e.optionRenderer({optionData:n,selected:r,onChange:a,active:s,index:l})):g({selected:r,index:l,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?Se.createElement(Te,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:h?"inverse-lightest":r&&!u?"primary-dark":"inverse-lighter",size:"small",weight:"medium",className:"Option-subInfo"},e):(t=e.list,Se.createElement(zn,{list:void 0===t?[]:t,seperator:e.seperator,iconAppearance:n,labelAppearance:h?"disabled":r&&!u?"white":"subtle",seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"}))},optionData:n,textClassName:b,appearance:m,color:d,onClickHandler:function(e){e.stopPropagation(),h||o&&o()},onChangeHandler:function(e){e.stopPropagation(),h||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(f),className:c?v:y,id:p})}function an(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=Oe(e),r=De((we(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),we(t,"PlaceholderImage--".concat(n),n),t),o);return Se.createElement("span",xe({},e,{className:r}))}function sn(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return Se.createElement(G,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return Se.createElement(q,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large"}));case"WITH_META":return Se.createElement(q,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(G,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return Se.createElement(q,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large"}));case"ICON_WITH_META":return Se.createElement(q,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(G,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(G,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function ln(e){var t=e.dropdownStyle,n=e.errorType,r=e.updateOptions;return Se.createElement("div",{className:"Dropdown-wrapper px-7 d-flex",style:t,"data-test":"DesignSystem-Dropdown--wrapper"},Se.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center w-100","data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement(Te,{className:"text-align-center mb-3",weight:"strong"},vn[n]),Se.createElement(Te,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},bn[n]),"FAILED_TO_FETCH"===n&&Se.createElement(Pe,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:function(){return r()}},"Reload")))}function cn(i){function N(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&pe(e)}function L(){return Se.createElement(ln,{dropdownStyle:Ee(Ee({},ye),{},{minHeight:f}),updateOptions:ne,errorType:oe})}function o(e,t){Q(e,t),de||null!=(e=C.current)&&e.focus(),P(y)}function j(){var e;X(),null!=(e=C.current)&&e.focus()}function B(){var e;Z(),null!=(e=C.current)&&e.focus()}function z(){P(y),w&&_&&w("")}function V(e){P(y),w&&w(e.target.value)}function a(e,t){var n=i.onClearOptions,r=d.every(function(e){return e.disabled});return Se.createElement("div",{className:ve(t)},Se.createElement(Te,{size:"small",appearance:"subtle"},e),t&&Se.createElement(Pe,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=ze(_,g,p,E)?e+1===O:e===O,r=-1!==m.findIndex(function(e){return e.value===t.value}),o="Checkbox-option-".concat(e,"-").concat(t.value,"-").concat((new Date).getTime());return Se.createElement("label",{htmlFor:o,key:e},Se.createElement(on,{optionData:t,truncateOption:G,selected:r,index:e,updateActiveOption:_e,optionRenderer:J,active:n,checkboxes:E,menu:b,onClick:function(){return be(t)},onChange:function(e){return i.onSelect(t,e.target.checked)},optionType:i.optionType,id:o}))}function K(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),l="down"===e?O+1:O-1,c="down"===e?s.length:-1;l!==c;){if("true"!==s[l].getAttribute("data-disabled")){var u=s[l];u&&(n=se.current,r=u,a=i=o=void 0,o=null==n?void 0:n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=r.offsetHeight,i.bottom>o.bottom&&n?tn(n,r.offsetTop-o.height+a):i.top<o.top&&n&&tn(n,r.offsetTop-a)),void 0!==u&&P(l);break}"down"===e?l++:l--}}var U,e,s,l,r=void 0===(t=i.listOptions)?[]:t,W=i.inputRef,t=void 0===(t=i.align)?"right":t,n=void 0===(n=i.optionType)?"DEFAULT":n,c=void 0===(c=i.applyButtonLabel)?"Apply":c,u=void 0===(u=i.cancelButtonLabel)?"Cancel":u,G=void 0===(h=i.truncateOption)||h,p=void 0===(h=i.withSelectAll)||h,f=void 0===(h=i.maxHeight)?200:h,h=i.customTrigger,d=i.selected,m=i.tempSelected,q=i.previousSelected,g=i.remainingOptions,y=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,_=i.searchTerm,S=i.showApplyButton,E=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,w=i.onSearchChange,J=i.optionRenderer,Z=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,x=i.className,ee=void 0===(ee=i.searchPlaceholder)?"Search..":ee,te=i.scrollIndex,ne=i.updateOptions,re=i.noResultMessage,oe=i.errorType,ie=i.loadingOptions,ae=Oe(i),se=Se.createRef(),le=Se.createRef(),C=Se.createRef(),k=Se.createRef(),D=Se.createRef(),ce=(M=Ce(Se.useState(),2))[0],ue=M[1],O=(M=Ce(Se.useState(y),2))[0],P=M[1],T=(M=Ce(Se.useState(),2))[0],pe=M[1],M=0===r.length&&!ie&&d.length<=0;Se.useEffect(function(){var e,t,n;return v&&(n=i.width,t=null==(t=le.current)?void 0:t.clientWidth,n={width:n||t,minWidth:i.minWidth||(S?176:b?128:t),maxWidth:i.maxWidth||"100%"},requestAnimationFrame(N),ue(n),te)&&0===m.length&&(e=setTimeout(function(){He(te,r)},100)),function(){clearTimeout(e)}},[v]),Se.useEffect(function(){y!==O&&P(y)},[y]);var A=void 0===(A=i.triggerSize)?"regular":A,I=void 0===(I=i.placeholder)?"Select":I,fe=i.icon,he=i.error,de=i.disabled,R=i.inlineLabel,F=i.triggerLabel,me=i.iconType,ge=h?h(F||I):Se.createElement(Se.Fragment,null),h=h?Se.cloneElement(ge,{tabIndex:0,ref:C}):Se.createElement(gn,{placeholder:I,triggerSize:A,open:v,icon:fe,disabled:de,inlineLabel:R,menu:b,error:he,ref:C,iconType:me},F),ye={maxHeight:f,overflowY:"auto",overflowX:"hidden",minHeight:T},ge={maxHeight:T||f,overflowY:"auto",overflowX:"hidden",minHeight:T},ve=function(e){var t;return De((we(t={},"Dropdown-section",!0),we(t,"Dropdown-section--withClear",e),t))},I=De(we({},"Dropdown",!0),x),fe=De((we(A={},"Dropdown-wrapper",!0),we(A,"Dropdown-wrapper--wrap",!G),A)),he=De((we(R={},"Option-checkbox--active",0===O),we(R,"Option-checkboxWrapper",!0),we(R,"Option-checkbox",!0),we(R,"OptionWrapper",!0),R)),be=function(e){i.onOptionSelect(e),null!=(e=C.current)&&e.focus()},_e=function(e,t){t=E&&p&&!i.async&&!t?e+1:e;P(t)},me=Y||i.async;return Se.createElement("div",xe({},ae,{className:I,ref:le,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?K("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?K("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(W.current===r||C.current===r)&&(e.preventDefault(),r=E?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[O])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=D.current)?void 0:t.disabled,(r===k.current&&t||r===D.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===k.current?null!=(t=D.current)&&t.focus():null!=(r=k.current)&&r.focus()))}}}),Se.createElement(Ua,xe({onToggle:o,trigger:h,triggerClass:b?"":"w-100",open:v,customStyle:ce,position:_n[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),me&&Se.createElement("div",{className:"Dropdown-inputWrapper"},Se.createElement(Tn,{name:"Dropdown-search",icon:"search",value:_,placeholder:ee,autoFocus:!0,onChange:V,onClear:z,ref:W,autoComplete:"off",className:"Dropdown-input"})),(F=i.selectedSectionLabel,s=void 0===F?"Selected Items":F,F=void 0===(F=i.allItemsSectionLabel)?"All Items":F,T=void 0===(T=i.loadersCount)?10:T,x=void 0===(x=i.errorTemplate)?L:x,A=ze(_,g,p,E),l=(e=>(e=e.reduce(function(e,t){var n=t.group||"";return e[n]||(e[n]=[]),e[n].push(t),e},{}),Object.values(e).flatMap(ke)))(r),T&&ie?Se.createElement("div",{className:"Dropdown-loading"},Se.createElement("div",{className:"Dropdown-wrapper",style:ge},(e=T,e=Array(T).fill("Loading"),U=E?"WITH_CHECKBOX":n,e.map(function(e,t){return Se.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},Se.createElement(sn,{loadingType:U,optionIndex:t}))})))):M?re?Se.createElement("div",{className:"Dropdown-wrapper w-100",style:ye,"data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement("div",{className:"Option"},Se.createElement("div",{className:"Option-subinfo"},re))):x&&x({errorType:oe}):Se.createElement("div",{className:fe,style:ye,ref:se},A&&(T=i.selectAllLabel,e=i.selectAll,x=i.onSelectAll,T=(T=void 0===T?"Select All":T).trim()?T.trim():"Select All",A="Checkbox-option-".concat(T.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),Se.createElement("div",{className:he,onMouseEnter:function(){return _e(0,!0)}},Se.createElement("label",{htmlFor:A,className:"Checkbox-label"},Se.createElement(ft,{label:T,onChange:x,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:A})))),0<d.length&&a(s,!0),d.map(H),0<d.length&&0<r.length-d.length&&!(null!=(T=r[0].group)&&T.trim())&&a(F),l.map(function(e,t){var n=0<t?l[t-1].group:d.length?s:void 0,r=e.group,o=t+d.length;return Se.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),H(e,o))}),i.async&&0<g&&(x=i.footerLabel,Se.createElement("div",{className:"Dropdown-footer"},Se.createElement(Te,{size:"small",appearance:"subtle"},void 0===x?"Search for more options":x))))),S&&E&&(R=Ne(q,m)||i.loadingOptions,Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Pe,{ref:k,className:"mr-4",appearance:"basic",onClick:j,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},u),Se.createElement(Pe,{ref:D,appearance:"primary",disabled:R,size:"tiny",onClick:B,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},c)))))}function un(e){var t,n=e.className,r=e.iconType,e=U(e,Dn),n=De((we(t={},"ActionButton",!0),we(t,"".concat(n),n),t));return Se.createElement(R,xe({className:n,type:r,"data-test":"DesignSystem-Input-ActionButton"},e))}function pn(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===Z(e[r])?t:e[r];return n}function fn(e){var t=e.label,n=e.icon,r=e.size;return Se.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&Se.createElement(R,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",type:e.iconType,size:"regular"===r?16:12}),Se.createElement(Te,{size:r,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function hn(e){return"".concat((100*e).toFixed(2),"%")}function dn(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var mn=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error","iconType"],gn=Se.forwardRef(function(e,t){var n,r=e.triggerSize,r=void 0===r?"regular":r,o=e.placeholder,o=void 0===o?"Select":o,i=e.menu,i=void 0!==i&&i,a=e.children,s=e.icon,l=e.disabled,c=e.open,u=e.inlineLabel,p=e.error,f=e.iconType,e=U(e,mn),h=l?"disabled":"default",o=o.trim(),o=a||o,d=i?s||"more_horiz":"keyboard_arrow_down",r=De((we(n={},"Button",!0),we(n,"DropdownButton",!0),we(n,"DropdownButton--".concat(r),r),we(n,"DropdownButton--".concat(r,"Square"),i),we(n,"DropdownButton--placeholder",!a&&!i),we(n,"DropdownButton--icon",s),we(n,"DropdownButton--open",c),we(n,"DropdownButton--error",p),n)),p=De((we(c={},"Text",!0),we(c,"Text--regular",!0),we(c,"DropdownButton-text",!0),c));return Se.createElement("button",xe({ref:t,type:"button",value:a,className:r,disabled:l,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&Se.createElement("div",{className:"DropdownButton-wrapper"},u&&Se.createElement(Te,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(u.trim().charAt(0).toUpperCase()).concat(u.trim().slice(1))),s&&!u&&Se.createElement(R,{appearance:h,className:"d-flex align-items-center mr-4",name:s,type:f}),o&&Se.createElement("span",{className:p},o)),Se.createElement(R,{appearance:h,name:d,type:f}))}),yn=(gn.displayName="DropdownButton",we(n={},"DEFAULT",function(e){var t=e.className,n=e.optionData,r=n.label;return Se.createElement("div",{className:t,onClick:e.onClickHandler,onMouseEnter:e.onUpdateActiveOption,"data-test":e.dataTest,"data-disabled":n.disabled},Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:e.textClassName,color:e.color,id:n.optionID},r)))}),we(n,"WITH_ICON",function(e){var t,n=e.className,r=e.textClassName,o=e.onClickHandler,i=e.optionData,a=e.onUpdateActiveOption,s=e.color,e=e.dataTest,l=i.label,c=i.icon,u=i.disabled,i=i.iconType,n=De((we(t={},"".concat(n),!0),we(t,"Option--icon",c),t));return Se.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":u},c&&Se.createElement(R,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:c,type:i}),Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:r,color:s},l)))}),we(n,"WITH_META",function(e){var t=e.className,n=e.optionData,r=e.renderSubInfo,o=n.subInfo;return Se.createElement("div",{className:t,onClick:e.onClickHandler,onMouseEnter:e.onUpdateActiveOption,"data-test":e.dataTest,"data-disabled":n.disabled},Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:e.textClassName,color:e.color},n.label),o&&r(o)))}),we(n,"WITH_CHECKBOX",function(e){var t=e.className,n=e.selected,r=e.optionData,o=e.dataTest,i=e.id,i=void 0===i?"":i,a=r.subInfo,s=r.disabled;return Se.createElement("div",{className:t,onMouseEnter:e.onUpdateActiveOption,"data-test":o,"data-disabled":s},Se.createElement(ft,{label:r.label,disabled:s,checked:n,onChange:e.onChangeHandler,tabIndex:-1,className:"OptionCheckbox ".concat(a?"pb-0":""),"data-test":"".concat(o,"--Checkbox"),id:i}),a&&Se.createElement("div",{className:"pl-8 ml-3"},(t=s?"disabled":"subtle",r=n?"white":"disabled","string"==typeof(e=a)?Se.createElement(Te,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e):(o=e.list,Se.createElement(zn,{list:void 0===o?[]:o,seperator:e.seperator,iconAppearance:r,labelAppearance:t,seperatorAppearance:r,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),we(n,"ICON_WITH_META",function(e){var t,n=e.className,r=e.textClassName,o=e.renderSubInfo,i=e.onClickHandler,a=e.optionData,s=e.onUpdateActiveOption,l=e.appearance,c=e.color,e=e.dataTest,u=a.subInfo,p=a.label,f=a.icon,a=a.disabled,n=De((we(t={},"".concat(n),!0),we(t,"Option--icon",f),t));return Se.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},f&&Se.createElement(R,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:f,appearance:l}),Se.createElement("div",{className:"Option-label"},Se.createElement(Te,{className:r,color:c},p),u&&o(u)))}),n),G=function(e){var t,n=e.length,r=e.size,o=e.className,e=Oe(e),i=De(we({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=De((we(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),we(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return Se.createElement("div",xe({},e,{className:n}),Se.createElement("span",{className:i}))},q=(G.displayName="PlaceholderParagraph",G.defaultProps={length:"medium"},an.displayName="PlaceholderImage",an.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=Oe(e),a=De(we({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=De(we({},"Placeholder",!0),i);return Se.createElement("div",xe({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&Se.createElement(an,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&Se.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),vn=(q.displayName="Placeholder",q.defaultProps={withImage:!0,imageSize:"small"},{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"}),bn={FAILED_TO_FETCH:"We couldn't load the data, try reloading.",NO_RECORDS_FOUND:"Try modifying your search to find what you are looking for.",DEFAULT:"We have nothing to show you at the moment."},_n={right:"bottom-start",left:"bottom-end"},Sn=(cn.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),En=Se.createRef(),wn=(()=>{e(u,Se["Component"]);var c=d(u);function u(e){h(this,u),we(Y(v=c.call(this,e)),"staticLimit",void 0),we(Y(v),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),we(Y(v),"fetchOptionsFunction",function(t){var n,e=v.props.options,r=t?(n=t,e.filter(function(e){return e.label.toLowerCase().includes(n.toLowerCase())})):e;return new Promise(function(e){e({searchTerm:t,options:r,count:r.length})})}),we(Y(v),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=v.props.selected,n=void 0===t?[]:t,e.filter(function(t){return Le(v.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===v.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),we(Y(v),"getSelectedOptions",function(e,t){var n=v.props.selected;return e.length?t?Le(v.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):v.state.tempSelected:[]}),we(Y(v),"updateOptions",function(l,e){var t=v.state,c=t.searchTerm,u=t.selectAll,p=t.tempSelected,f=t.previousSelected,h=t.errorType,d=void 0===e?v.state.async:e,t=v.props,m=t.fetchOptions,g=t.withCheckbox,y=t.withSearch;(m||v.fetchOptionsFunction)(c).then(function(e){var t,n,r,o,i,a=e.options,s=e.count;e.scrollToIndex&&setTimeout(function(){He(e.scrollToIndex,a)},0),e.searchTerm&&(e.searchTerm,e.searchTerm!==v.state.searchTerm)||(d=""===c?s>v.staticLimit:d,t=Be(d,c,g)?v.getUnSelectedOptions(a,l):a,n=""===c?v.getSelectedOptions(a,l):[],r=""===c?s:v.state.optionsLength,o=v.getDisabledOptions(t.slice(0,v.staticLimit)),i=h,i=0===r&&""===c?"DEFAULT":""!==c?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",v.setState(Ee(Ee({},v.state),{},{errorType:m?i:h,scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:d,searchedOptionsLength:s,options:t.slice(0,v.staticLimit),tempSelected:l?n:p,previousSelected:l?n:f,selected:Be(d,c,g)?n:[],triggerLabel:v.updateTriggerLabel(l?n:p),selectAll:!d&&l?Ve(n,r,o.length):u})),(d||y)&&null!=(i=En.current)&&i.focus())}).catch(function(){v.setState({errorType:m?"FAILED_TO_FETCH":h,loading:!1,options:[]})})}),we(Y(v),"updateSearchTerm",function(e){v.setState(Ee(Ee({},v.state),{},{loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"}))}),we(Y(v),"updateOnPopperToggle",function(){var e,t=v.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=v.state,s=a.previousSelected,l=a.tempSelected,c=a.optionsLength,u=a.async,p=a.loading,f=a.searchTerm,h=(je(v.props.open)?v.props:v.state).open,a=v.getDisabledOptions(a.options).length;n&&r&&(e=Le(v.props.selected)?t:s,v.setState({tempSelected:e,selectAll:Ve(e,c,a),triggerLabel:v.updateTriggerLabel(e)})),je(v.props.open)&&v.setState({open:h}),h&&(c=Be(u,f,n)&&!Ne(v.state.selected,l),v.setState({loading:c||p||""!==f,searchInit:""!==f,searchTerm:""}),c)&&v.updateOptions(!1),o&&!h&&(a=(n&&r?Le(v.props.selected)?t:s:v.state.tempSelected).map(function(e){return e.value}),v.debounceOnClose(a,i))}),we(Y(v),"debounceOnClose",rn(300,function(e,t){var n=v.props.onClose;n&&n(e,t)})),we(Y(v),"updateTriggerLabel",function(){var e,t,n,r,o,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a=i.length;return 0===a?"":(n=(e=v.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=v.state?v.state.optionsLength:1<arguments.length?arguments[1]:void 0,o="",o=a<=(void 0===n?2:n)?i.map(function(e){return e.label}).join(", "):t?t(a,r,i):"".concat(a," selected"),e&&e(o),o)}),we(Y(v),"updateSelectedOptions",function(e,t,n){var r=v.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,l=v.props,c=l.onChange,u=l.withCheckbox,p=l.showApplyButton,f=l.closeOnSelect,h=l.name,l=l.onPopperToggle,d=u&&p&&n,m=v.getDisabledOptions(v.state.options),g=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});v.setState(Ee(Ee({},v.state),{},{tempSelected:e,triggerLabel:v.updateTriggerLabel(e),selectAll:Ve(e,o,m.length),open:je(v.props.open)||u?r:!f,previousSelected:d?e:i,selected:g?e:a,loading:!!g||s})),g&&v.debounceClear(),!c||p&&!n||(o=e.map(function(e){return e.value}),c(t?o[0]:o,h)),!u&&f&&l&&je(v.props.open)&&l(!1,"optionClick")}),we(Y(v),"isValidOption",function(e){var t=v.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=v.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(v.setState(Ee(Ee({},v.state),{},{open:je(o)||!n})),!r&&n&&t&&je(o)&&t(!1,"optionClick"),1))}),we(Y(v),"onOptionSelect",function(e){var t=v.props,n=t.onUpdate,r=t.menu;Le(t.selected)?n&&(v.isValidOption(e)||r)&&n("select-option",e):(v.isValidOption(e)||r)&&v.updateSelectedOptions([e],!0)}),we(Y(v),"onSelect",function(t,e){var n=v.props,r=n.onUpdate;Le(n.selected)&&!n.showApplyButton?r&&r(e?"select-option":"deselect-option",t):(n=v.state.tempSelected.slice(),e||(r=n.findIndex(function(e){return e.value===t.value}),n.splice(r,1)),n=e?n.concat(t):n,v.updateSelectedOptions(n,!1))}),we(Y(v),"onSelectAll",function(e){var t=v.props,n=t.onUpdate,r=v.state,o=r.tempSelected,r=r.options;Le(t.selected)&&!t.showApplyButton?n&&n(e.target.checked?"select-all":"deselect-all"):(t=o.slice().filter(function(e){return e.disabled}),n=e.target.checked?[].concat(ke(r.filter(function(e){return!e.disabled})),ke(t)):t,v.updateSelectedOptions(n,!1))}),we(Y(v),"debounceSearch",rn(v.props.searchDebounceDuration,function(){v.setState({searchInit:!1},function(){v.updateOptions(!1)})})),we(Y(v),"reload",function(){v.setState({loading:!0},function(){v.updateOptions(!1)})}),we(Y(v),"debounceClear",rn(250,function(){return v.updateOptions(!1)})),we(Y(v),"onClearOptions",function(){var e=v.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=v.state.tempSelected.filter(function(e){return e.disabled});Le(t)&&!o?r&&r("clear-all"):(v.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),v.debounceClear(),e&&!o&&e(i,n))}),we(Y(v),"onTogglePopper",function(e){var t=v.props.onPopperToggle;t&&je(v.props.open)&&t(!1,e)}),we(Y(v),"onCancelOptions",function(){var e=v.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=v.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!je(v.props.open)&&v.state.open,l=t.map(function(e){return e.value});Le(o)?i&&i("cancel-selected",t,n):(o=v.updateTriggerLabel(t),i=v.getDisabledOptions(v.state.options),v.setState(Ee(Ee({},v.state),{},{tempSelected:t,selectAll:Ve(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(l,r)),v.onTogglePopper("cancelClick")}),we(Y(v),"onApplyOptions",function(){var e=v.state,t=e.tempSelected,e=e.previousSelected,n=v.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!je(v.props.open)&&v.state.open,l=t.map(function(e){return e.value});Le(o)?i&&i("apply-selected",e,t):(v.setState(Ee(Ee({},v.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(l,n),a&&!s&&a(l,n)),v.onTogglePopper("applyClick")}),we(Y(v),"onToggleDropdown",function(e,t){var n;v.props.disabled||((n=v.props.onPopperToggle)&&je(v.props.open)?n(e,t):v.setState({open:e}))});var v,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(v.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in v.props||e>v.staticLimit,s=n?[]:v.getSelectedOptions(a,!0),l=v.getDisabledOptions(a);return v.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Be(n,"",r)?t:[],triggerLabel:v.updateTriggerLabel(s,e),selectAll:Ve(s,e,l.length),errorType:"DEFAULT"},v}return a(u,[{key:"componentDidMount",value:function(){this.state.async&&this.updateOptions(!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a;this.state.async||(o=(a=this.props).loading,i=a.fetchOptions,n=a.withSearch,r=this.getDisabledOptions(a=void 0===(a=a.options)?[]:a).length,e.loading===o)||i||(a.length>this.staticLimit?this.updateOptions(!0,!0):(i=this.getSelectedOptions(a,!0),this.setState(Ee(Ee({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:Ve(i,this.state.optionsLength,r)})),n&&null!=(o=En.current)&&o.focus())),void 0!==this.props.selected&&e.selected!==this.props.selected&&e.loading===this.props.loading&&(a=!this.props.withCheckbox,this.updateSelectedOptions(this.props.selected,a,!0)),t.searchTerm!==this.state.searchTerm&&this.debounceSearch(),e.open===this.props.open&&t.open===this.state.open||je(this.props.open)&&this.props.open===this.state.open||this.updateOnPopperToggle()}},{key:"render",value:function(){var e=this.state,t=e.options,n=e.async,r=e.open,o=e.searchTerm,i=e.searchInit,a=e.loading,s=e.searchedOptionsLength,l=e.tempSelected,c=e.selectAll,u=e.triggerLabel,p=e.previousSelected,f=e.scrollIndex,e=e.errorType,h=this.props,d=h.withSelectAll,d=void 0===d||d,h=h.withCheckbox,m=this.props,g=m.triggerOptions,g=void 0===g?{}:g,y=m.tabIndex,m=U(m,Sn),s=s-t.length,y=y||(ze(o,s,d,h)?0:t.findIndex(function(e){return!e.disabled}));return Se.createElement(cn,xe({listOptions:t,inputRef:En,remainingOptions:s,firstEnabledOption:y,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:u,tempSelected:l,previousSelected:p,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:c,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:g.customTrigger,scrollIndex:f,updateOptions:this.reload,errorType:e},m))}}]),u})(),xn=(we(wn,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),Cn={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},kn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=U(e,xn),n=De((we(t={Heading:!0},"Heading--".concat(r),r),we(t,"Heading--".concat(n),!a&&n),we(t,"color-".concat(a),a),t),i);return Se.createElement(lt,xe({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:Cn[r]}),o)},Dn=(kn.displayName="Heading",kn.defaultProps={appearance:"default",size:"m"},["className","iconType"]),On=(un.displayName="ActionButton",un.defaultProps={size:16,type:"rounded"},["size","type","minWidth","defaultValue","name","placeholder","value","icon","inlineLabel","required","error","info","onChange","onClick","onClear","onBlur","onFocus","onPaste","actionIcon","className","autoFocus","disabled","readOnly","iconType"]),Pn={tiny:12,regular:16,large:20},Tn=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.type,r=void 0===r?"text":r,o=e.minWidth,o=void 0===o?"number"!==r?256:void 0:o,i=e.defaultValue,a=e.name,s=e.placeholder,l=e.value,c=e.icon,u=e.inlineLabel,p=e.required,f=e.error,h=e.info,d=e.onChange,m=e.onClick,g=e.onClear,y=e.onBlur,v=e.onFocus,b=e.onPaste,_=e.actionIcon,S=e.className,E=e.autoFocus,w=e.disabled,x=e.readOnly,C=e.iconType,k=U(e,On),D=Se.useRef(null),O=Ce(Se.useState(!l),2),P=O[0],T=O[1],O=(Se.useImperativeHandle(t,function(){return D.current}),Se.useEffect(function(){var e;E&&null!=(e=D.current)&&e.focus({preventScroll:!0})},[]),Oe(e)),e=De((we(t={},"Input",!0),we(t,"Input--".concat(n),n),we(t,"Input--disabled",w),we(t,"Input--error",f),we(t,"Input--readOnly",x),t),S),S=De((we(t={},"Input-input",!0),we(t,"Input-input--".concat(n),n),t)),P=De((we(t={},"Input-icon",!0),we(t,"Input-icon--left",!0),we(t,"Input-icon--inputBlank",P),we(t,"Input-icon--error",f),t)),t=De((we(f={},"Input-icon",!0),we(f,"Input-iconWrapper--right",!0),f)),f=Se.createElement("div",{className:t,tabIndex:0},Se.createElement(R,{name:"info",size:Pn[n],className:"Input-icon--right"}));return Se.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:e,style:{minWidth:o},onClick:function(){var e;return null==(e=D.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return T(!(null!=(e=D.current)&&e.value))}},u&&Se.createElement("div",{className:"Input-inlineLabel"},Se.createElement(Te,{appearance:"subtle"},u)),"tiny"!==n&&c&&Se.createElement("div",{className:P},Se.createElement(R,{name:c,size:Pn[n],type:C})),Se.createElement("input",xe({"data-test":"DesignSystem-Input"},O,k,{ref:D,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:l,required:p,disabled:w,readOnly:x,onChange:d,onBlur:y,onClick:m,onFocus:v,onPaste:b,tabIndex:x?-1:void 0})),w?"":h?Se.createElement(M,{position:"bottom",tooltip:h},f):_&&(l||i)?_:g&&(l||i)&&Se.createElement("div",{className:t},Se.createElement(R,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=D.current)&&t.focus({preventScroll:!0}),g(e)},name:"close",size:Pn[n],className:"Input-icon--right"})))}),Mn=(Tn.displayName="Input",Object.assign(Tn,{ActionButton:un}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown","iconType"]),An={regular:16,large:20},In=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.defaultValue,o=e.name,i=e.placeholder,a=e.icon,s=e.prefix,l=e.suffix,c=e.error,u=e.min,p=e.max,f=e.onChange,h=e.onClick,d=e.onBlur,m=e.onFocus,g=e.className,y=e.autoFocus,v=e.disabled,b=e.readOnly,_=e.value,S=e.showActionButton,E=void 0===S||S,S=e.onKeyDown,w=e.iconType,x=U(e,Mn),C=Se.useRef(null),k=void 0===_,D=Ce(Se.useState(_||r),2),O=D[0],P=D[1],D=(Se.useImperativeHandle(t,function(){return C.current}),Se.useEffect(function(){var e;y&&null!=(e=C.current)&&e.focus({preventScroll:!0})},[]),Se.useEffect(function(){void 0!==_&&P(_)},[_]),Oe(e)),e=De((we(t={},"MetricInput",!0),we(t,"MetricInput--".concat(n),n),we(t,"MetricInput--disabled",v),we(t,"MetricInput--readOnly",b),we(t,"MetricInput--error",c),t),g),t=De((we(c={},"MetricInput-input",!0),we(c,"MetricInput-input--".concat(n),n),we(c,"mr-4",!l&&!E&&"regular"===n),we(c,"mr-6",!l&&!E&&"large"===n),c)),c=De((we(g={},"MetricInput-icon",!0),we(g,"MetricInput-icon--".concat(n),n),g)),g=De((we(g={},"mr-4","regular"===n),we(g,"mr-5","regular"!==n),g)),T=De((we(T={},"ml-4 mr-3","regular"===n),we(T,"mx-5","regular"!==n),T)),M=De((we(M={},"p-0",!0),we(M,"MetricInput-arrowIcon--".concat(n),n),we(M,"ml-3",!0),M)),A=function(e,t){var n=Number(O||0),r=(null==(r=n.toString().split(".")[1])?void 0:r.length)||0;v||b||!("down"===t?void 0!==u&&u<n||void 0===u:void 0!==p&&n<p||void 0===p)||(n=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.min(e,t)}(p,function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:-1/0,t=1<arguments.length?arguments[1]:void 0;return isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.max(e,t)}(u,+(n="down"===t?n-1:n+1).toFixed(r))),k&&P(n),f&&(t=Object.create(e,{target:{value:{value:n}}}),f(t)))},I="large"===n?"regular":"tiny";return Se.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&Se.createElement(R,{"data-test":"DesignSystem-MetricInput--icon",name:a,type:w,size:An[n],appearance:O?"subtle":"disabled",className:c}),s&&Se.createElement(Te,{"data-test":"DesignSystem-MetricInput--prefix",className:g,size:n,appearance:"subtle"},s),Se.createElement("input",xe({"data-test":"DesignSystem-MetricInput"},D,x,{type:"number",ref:C,name:o,defaultValue:r,placeholder:i,className:t,value:O,disabled:v,readOnly:b,onChange:function(e){k&&P(e.target.value),f&&f(e)},onBlur:d,onClick:h,onFocus:m,onKeyDown:function(e){if(E){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),A(t,"down"));case"ArrowUp":t.preventDefault(),A(t,"up")}}}})),l&&Se.createElement(Te,{"data-test":"DesignSystem-MetricInput--suffix",className:T,size:n,appearance:"subtle"},l),E&&Se.createElement("div",{className:"MetricInput-arrowIcons"},Se.createElement(Pe,{type:"button",icon:"keyboard_arrow_up",size:I,className:"".concat(M," mb-2"),onClick:function(e){return A(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),Se.createElement(Pe,{type:"button",icon:"keyboard_arrow_down",size:I,className:M,onClick:function(e){return A(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),Rn=(In.displayName="MetricInput",["mask","value","placeholderChar","validators","clearOnEmptyBlur","defaultValue","mask","error","caption","required","onChange","onPaste","onBlur","onFocus","onClear","className","id","helpText"]),n=Se.forwardRef(function(n,e){n.mask;var t=n.value,r=n.placeholderChar,h=void 0===r?"_":r,r=n.validators,d=void 0===r?[]:r,r=n.clearOnEmptyBlur,o=void 0===r||r,r=n.defaultValue,m=n.mask,i=n.error,a=n.caption,N=n.required,g=n.onChange,s=n.onPaste,l=n.onBlur,c=n.onFocus,u=n.onClear,p=n.className,y=n.id,L=n.helpText,j=U(n,Rn),v=Se.useCallback(function(e){return"object"===Z(m[e])},[m]),b=Se.useCallback(function(e,t){if("right"===e){for(var n=t;n<m.length;n++)if(v(n))return n;return m.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[m,v]),f=Se.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),_=Se.useCallback(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:m.length-1;return pn(m,h).slice(e,t+1)},[m,h]),S=Se.useMemo(function(){return _()},[_]),E=Se.useMemo(function(){return f()},[f]),w=Se.useRef(null),x=Se.useRef(),C=Se.useRef(E),k=Se.useRef(0),r=Ce(Se.useState(r||t||""),2),D=r[0],O=r[1],P=(Se.useImperativeHandle(e,function(){return w.current}),Se.useEffect(function(){O(t||"")},[t]),Se.useEffect(function(){A(k.current)},[D]),Se.useCallback(function(e){return Math.abs(e.end-e.start)},[])),T=Se.useCallback(function(){var e;return{start:(null==(e=w.current)?void 0:e.selectionStart)||0,end:(null==(e=w.current)?void 0:e.selectionEnd)||0}},[w.current]),B=["text","password","tel","url"],M=Se.useCallback(function(e){var t,n,r;w.current&&(t=w.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),B.includes(t.type)?t.setSelectionRange(n,e):(r=t.type,t.type="text",t.setSelectionRange(n,e),t.type=r))},[w.current]),A=Se.useCallback(function(e){document&&document.activeElement===w.current&&M({start:e,end:e})},[M]),I=Se.useCallback(function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o="",i=t+1,a=r;return t>=m.length||(r>=e.length?C.current={start:t,end:t}:(n=m[t],v(t)?(e[r].match(n)?o+=e[r]:o+=h,a++):o+=n,o+=I(e,i,a))),o},[m,h,v]),R=Se.useCallback(function(){C.current=T(),x.current=window.requestAnimationFrame(R)},[C.current,T]),F=function(e){var t=n.placeholder||"dd/mm/yyyy";return"yyyy"===t.substring(0,4)?e&&e[4]===t[4]&&e[7]===t[7]:e&&e[2]===t[2]&&e[5]===t[5]},r=Se.useCallback(function(e){for(var t,n=null==(n=e.currentTarget)?void 0:n.value,r=T(),o=Math.min(C.current.start,r.start),i=r.end,a=o,s="",l=0,i=n.slice(o,i),s=I(i,o),i=D,c=(0!==i.length||"parent-TimePicker"!==y&&"parent-DatePicker"!==y||(i=S),t=s.length,r.end>C.current.end?l=t?P(C.current):0:n.length<i.length&&(l=i.length-n.length),i.split("")),u=0;u<t;u++)c[o+u]=s[u];for(var p=0;p<l;p++){var f=o+t+p;c[f]=_(f,f)}r=c.slice(0,m.length).join(""),s!==h&&""!==s&&!s.includes(h)&&K(d,r)&&(a+=t),n=b(l?"left":"right",a),1===l&&!s.length&&!v(a)&&0<n?(a=n,c[--a]=h):1!==l&&(a=n),r=c.slice(0,m.length).join("");k.current=a,r!==i&&K(d,r)?"__:__ _M"===S?(O(r.toUpperCase()),null!=g&&g(e,r.toUpperCase())):(O(r),null!=g&&g(e,r)):window.requestAnimationFrame(function(){return A(k.current)})},[C.current,d,T,I,P,_,b,v,A,O,g]),e=Se.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(O(""),t=""),null!=l&&l(e,t),x.current&&window.cancelAnimationFrame(x.current)},[o,x.current,_,O,l]),z=Se.useCallback(function(e){k.current=E.start,O(S),null!=u&&u(e)},[O,_,A,f,u]),V=Se.useCallback(function(e){x.current=window.requestAnimationFrame(R),D||(k.current=E.start,O(_())),null!=c&&c(e)},[x.current,D,R,O,M,c]),H=Se.useMemo(function(){return De({"d-flex flex-column flex-grow-1":!0},p)},[p]);return Se.createElement("div",{className:H,"data-test":"DesignSystem-InputMask--Wrapper"},Se.createElement(Tn,xe({},j,{value:D,error:i,required:N,onFocus:V,onChange:r,onClear:D===S?void 0:z,onBlur:e,onPaste:function(e){e.preventDefault();var t,n=null==(n=e.clipboardData)?void 0:n.getData("Text"),r=(o=(t=n).length,t=t.substring(0,o),23===o?(r=(o=t.split(" - "))[0],o=o[1],F(r)&&F(o)):F(t)),o=K(d,n);r&&s&&o&&(s(e,n),O(n))},autoComplete:"off",ref:w})),Se.createElement(ol,{message:i?a:L,error:i}))}),Fn=(n.displayName="InputMask",n.utils={getDefaultValue:pn},n),Nn=["required","optional","withInput","disabled","children","className","info"],Ln=function(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=e.info,l=U(e,Nn),e=Oe(e),r=De((we(c={Label:!0},"Label--withInput",r),we(c,"Label--optional",n),c),a),c=De({"Label-text":!0,"Label--disabled":o});return Se.createElement("div",xe({"data-test":"DesignSystem-Label"},e,{className:r}),Se.createElement(lt,xe({"data-test":"DesignSystem-Label--Text",className:c,componentType:"label"},l),i,function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?Se.createElement("span",{className:"Label-requiredIndicator","data-test":"DesignSystem-Label--RequiredIndicator"}):(1<arguments.length?arguments[1]:void 0)?Se.createElement(Te,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&Se.createElement(M,{tooltip:s},Se.createElement(R,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"}))))},jn=(Ln.displayName="Label",["children","className","appearance","size","disabled"]),Bn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=U(e,jn),i=De((we(t={Link:!0},"Link--".concat(i),i),we(t,"Link--".concat(o),o),we(t,"Link--".concat(o,"-disabled"),a),t),r);return Se.createElement(lt,xe({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},zn=(Bn.displayName="Link",Bn.defaultProps={appearance:"default",size:"regular",disabled:!1},fn.displayName="Meta",function(e){var o=e.list,t=e.seperator,n=e.className,i=e.size,e=Oe(e),n=De(we({},"MetaList",!0),n),a=De(we({},"MetaList-seperator",!0)),r=De((we(r={},"MetaList-seperator",!0),we(r,"MetaList-seperator--left",!0),r));return Se.createElement("div",xe({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&Se.createElement(R,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),o.map(function(e,t){var n=e.label,r=t!==o.length-1;return Se.createElement("span",{key:t,className:"MetaList-item"},Se.createElement(fn,{size:i,label:void 0===n?"":n,icon:e.icon,iconType:e.iconType}),r&&Se.createElement(R,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:a,appearance:"disabled"}))}))});zn.displayName="MetaList",zn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function Vn(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var Hn=(()=>{e(i,Se["Component"]);var r=d(i);function i(){var o;h(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return we(Y(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),we(Y(o),"handleElement",null),we(Y(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),we(Y(o),"mouseEventClientOffset",function(e){return e.clientX}),we(Y(o),"clientToValue",function(e){var t=o.props,n=t.stepSize,r=t.tickSize,t=t.value;return null==o.handleElement||(e=e-((e=o.getHandleMidpointAndOffset(o.handleElement)).handleMidpoint+e.handleOffset),isNaN(e))?t:t+Math.round(e/(r*n))*n}),we(Y(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=dn(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),we(Y(o),"endHandleMovement",function(e){var e=o.mouseEventClientOffset(e),t=o.props.onRelease,e=(o.removeDocumentEventListeners(),o.setState({isHandleMoving:!1}),o.changeValue(o.clientToValue(e)));t&&t(e)}),we(Y(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),we(Y(o),"beginHandleMovement",function(e){o.props.disabled||(document.addEventListener("mousemove",o.continueHandleMovement),document.addEventListener("mouseup",o.endHandleMovement),o.setState({isHandleMoving:!0}),e=o.clientToValue(e.clientX),o.changeValue(e))}),we(Y(o),"handleKeyDown",function(e){var t,n,r;o.props.disabled||(t=(n=o.props).stepSize,n=n.value,37===(r=e.keyCode)?(o.changeValue(n-t),e.preventDefault()):39===r&&(o.changeValue(n+t),e.preventDefault()))}),we(Y(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),we(Y(o),"getHandleMidpointAndOffset",function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return null==e?{handleMidpoint:0,handleOffset:0}:{handleOffset:(e=e.getBoundingClientRect()).left,handleMidpoint:e[t?"height":"width"]/2}}),we(Y(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),we(Y(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),we(Y(o),"removeDocumentEventListeners",function(){document.removeEventListener("mousemove",o.continueHandleMovement),document.removeEventListener("mouseup",o.endHandleMovement)}),o}return a(i,[{key:"componentWillUnmount",value:function(){this.removeDocumentEventListeners()}},{key:"componentDidUpdate",value:function(e,t){t.isHandleMoving!==this.state.isHandleMoving&&this.handleElement&&this.handleElement.focus()}},{key:"render",value:function(){var e=this.props,t=e.min,n=e.tickSizeRatio,r=e.value,o=e.disabled,i=e.label,a=this.state,s=a.isHandleMoving,a=s||a.isHandleHovered||e.isCurrentLabelHovered,e=this.getHandleMidpointAndOffset(this.handleElement,!0).handleMidpoint,r={left:"calc(".concat(hn((r-t)*n)," - ").concat(e,"px)")},n=De((we(t={},"Slider-handle",!0),we(t,"Slider-handle--disabled",o),we(t,"Slider-handle--active",s),we(t,"border-0",o),t)),s=De((we(e={},"Slider-tooltip",!0),we(e,"Tooltip",!0),we(e,"d-none",!a),e));return Se.createElement(Se.Fragment,null,Se.createElement("div",{className:n,onMouseOver:this.handleMouseOver,onMouseLeave:this.handleMouseLeave,onMouseDown:this.beginHandleMovement,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,ref:this.refHandlers.handle,style:r,tabIndex:0,"data-test":"DesignSystem-MultiSlider-Handle"}),Se.createElement("div",{className:s,style:r},i))}}]),i})(),n=(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var f;return h(this,n),we(Y(f=t.call(this,e)),"handleElements",[]),we(Y(f),"trackElement",null),we(Y(f),"getLabelPrecision",function(e){var t=e.labelPrecision;return null==t?(e=e.stepSize,isFinite(e)&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0):t}),we(Y(f),"getOffsetRatio",function(e){return dn((e-f.props.min)*f.state.tickSizeRatio,0,1)}),we(Y(f),"addHandleRef",function(e){null!=e&&f.handleElements.push(e)}),we(Y(f),"getHandleValues",function(e){e=Se.Children.map(e.children,function(e){return null!=(t=e)&&null!=t.type?e.props:null;var t}),e=null!=e?e:[];return(e=e.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),e}),we(Y(f),"updateTickSize",function(){var e,t;null!=f.trackElement&&(e=f.trackElement.clientWidth,t=1/(f.props.max-f.props.min),f.setState({tickSize:e*t,tickSizeRatio:t}))}),we(Y(f),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),we(Y(f),"maybeHandleTrackClick",function(t){var e=t.target;!f.props.disabled&&null==e.closest(".Slider-handle")&&(e=f.nearestHandleForValue(f.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.beginHandleMovement(t)}),we(Y(f),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),we(Y(f),"getNewHandleValues",function(e,t){var n=f.getHandleValues(f.props).map(function(e){return e.value}),r=n.slice(),o=(r[t]=e,1<r.length&&r.sort(function(e,t){return e-t}),r.indexOf(e)),i=f.getLockedHandleIndex(t,o);return-1!==i?(Vn(n,t,i,n[i]),n):(Vn(r,t,o,e),r)}),we(Y(f),"onReleaseHandler",function(e,t){var n=f.props.onRangeRelease,r=f.getHandleValues(f.props),o=f.getNewHandleValues(e,t);n&&n(o),r.forEach(function(e,t){e.onRelease&&e.onRelease(o[t])})}),we(Y(f),"onChangeHandler",function(e,t){var n=f.props.onRangeChange,r=f.getHandleValues(f.props),o=r.map(function(e){return e.value}),i=f.getNewHandleValues(e,t);((n,e)=>{if(n.length==n.length)return e.every(function(e,t){return e===n[t]})})(i,o)||(n&&n(i),r.forEach(function(e,t){e.onChange&&e.onChange(i[t])}))}),we(Y(f),"formatLabel",function(e){var t=f.props.labelRenderer,e=e.toFixed(f.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),we(Y(f),"renderHandles",function(){var e=f.props,r=e.disabled,o=e.max,i=e.min,a=e.stepSize,s=f.getHandleValues(f.props);return 0===s.length?null:s.map(function(e,t){var e=e.value,n=f.state.hoveredLabelValue===Number(e.toFixed(f.state.labelPrecision));return Se.createElement(Hn,{disabled:r,key:"".concat(t,"-").concat(s.length),max:o,min:i,onRelease:function(e){return f.onReleaseHandler(e,t)},onChange:function(e){return f.onChangeHandler(e,t)},label:f.formatLabel(e),ref:f.addHandleRef,stepSize:a,tickSize:f.state.tickSize,tickSizeRatio:f.state.tickSizeRatio,value:e,isCurrentLabelHovered:n})})}),we(Y(f),"renderLabels",function(){for(var e,t=f.props,n=t.labelStepSize,r=t.max,o=t.min,i=t.labelRenderer,a=t.disabled,s=[],l=f.state.tickSizeRatio*n,c=f.getHandleValues(f.props).map(function(e){return e.value.toFixed(f.state.labelPrecision)}),u=o,p=0;u<r||(e=u,Math.abs(e-r)<=1e-5);u+=n,p+=l)((n,e)=>{var e={left:hn(e)},t=!a&&-1!==c.indexOf(n.toFixed(f.state.labelPrecision)),r=De((we(r={},"Slider-ticks",!0),we(r,"bg-dark",t),r));s.push(Se.createElement("div",{onClick:function(t){var e;f.props.disabled||(e=f.nearestHandleForValue(f.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.changeValue(n)},className:"Slider-label",key:n,style:e,onMouseOver:function(){return f.handleLabelMouseOver(n)},onMouseLeave:f.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},Se.createElement("span",{className:r}),!1!==i&&Se.createElement(Te,{size:"small",appearance:t?"default":"disabled"},f.formatLabel(n))))})(u,p);return s}),we(Y(f),"renderTrackFill",function(e,t,n){var r=Ce([f.getOffsetRatio(t.value),f.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),2),o=r[0],r=r[1],o=Number((100*o).toFixed(2)),r=Number((100*(1-r)).toFixed(2)),r=Ee({},{width:"".concat(100-r-o,"%")}),o=f.getTrackFill(t,n),n=De((we(t={},"Slider-progress",!0),we(t,"Slider-progress--disabled",f.props.disabled),we(t,"Slider-progress--inRange",o),we(t,"Slider-progress--inRangeDisabled",o&&f.props.disabled),t));return Se.createElement("div",{key:"track-".concat(e),className:n,style:r})}),we(Y(f),"renderTracks",function(){var e=f.getHandleValues(f.props),n=(e.push({value:f.props.max}),{value:f.props.min||0}),r=[];return e.forEach(function(e,t){r.push(f.renderTrackFill(t,n,e)),n=e}),r}),we(Y(f),"handleLabelMouseOver",function(e){f.setState({hoveredLabelValue:e})}),we(Y(f),"handleLabelMouseLeave",function(){f.setState({hoveredLabelValue:void 0})}),f.state={labelPrecision:f.getLabelPrecision(f.props),tickSize:0,tickSizeRatio:0},f}return a(n,[{key:"getDerivedStateFromProps",value:function(e){return{labelPrecision:this.getLabelPrecision(e)}}},{key:"getSnapshotBeforeUpdate",value:function(e){e=this.getHandleValues(e);return this.getHandleValues(this.props).length!==e.length&&(this.handleElements=[]),null}},{key:"componentDidMount",value:function(){this.updateTickSize()}},{key:"nearestHandleForValue",value:function(e,n){var t=e,r=function(e){var t=n(e),t=e.clientToValue(t),e=e.props.value;return Math.abs(t-e)};if(0!==t.length){for(var o=t[0],i=r(o),a=1;a<t.length;a++){var s=t[a],l=r(s);l<i&&(o=s,i=l)}return o}}},{key:"render",value:function(){var t=this,e=this.props,n=e.label,e=e.className,r=Oe(this.props),e=De(we({},"Slider",!0),e),o=De((we(o={},"Slider-wrapper",!0),we(o,"Slider-wrapper--disabled",this.props.disabled),o));return Se.createElement("div",xe({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&Se.createElement(Ln,{withInput:!0},n),Se.createElement("div",{className:o},Se.createElement("div",{className:"Slider-track",ref:function(e){return t.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),Se.createElement("div",{className:"Slider-axis"},this.renderLabels()),this.renderHandles()))}}]),n})(),Kn=(we(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),we(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),Un=Se.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=U(e,Kn),i=Se.useRef(null),a=(Se.useImperativeHandle(t,function(){return i.current},[i]),Se.useEffect(function(){return document.addEventListener("click",a,!0),function(){document.removeEventListener("click",a)}},[]),Se.useCallback(function(e){var t=i;e.target&&t.current&&(t.current.contains(e.target)||o(e))},[])),t=De(we({},"OutsideClick",!0),r);return Se.createElement("div",xe({ref:i},e,{className:t}),n)}),Wn=(Un.displayName="OutsideClick",["appearance","children","className","color"]),Gn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=U(e,Wn),n=De((we(t={Text:!0},"Text--".concat(n),!i&&n),we(t,"color-".concat(i),i),t),o);return Se.createElement(lt,xe({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},qn=(Gn.displayName="Paragraph",Gn.defaultProps={appearance:"default"},["size","label","disabled","onChange","name","value","checked","defaultChecked","className","helpText","error"]),r=Se.forwardRef(function(e,t){var n=e.size,n=void 0===n?"regular":n,r=e.label,o=e.disabled,i=e.onChange,a=e.name,s=e.value,l=e.checked,c=e.defaultChecked,u=e.className,p=e.helpText,f=e.error,e=U(e,qn),h=Se.useRef(null),t=(Se.useImperativeHandle(t,function(){return h.current}),De((we(t={},"Radio",!0),we(t,"Radio--disabled",o),t),u)),f=De((we(u={},"Radio-wrapper",!0),we(u,"Radio-defaultWrapper",!f),we(u,"Radio-errorWrapper",f),we(u,"Radio-wrapper--".concat(n),n),u)),u=De((we(u={},"Radio-outerWrapper",!0),we(u,"Radio-outerWrapper--".concat(n),n),u)),d=De(we({},"Radio-Label",!0)),m="".concat(a,"-").concat(r,"-").concat(Ie());return Se.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},Se.createElement("div",{className:u,"data-test":"DesignSystem-Radio-OuterWrapper"},Se.createElement("input",xe({tabIndex:0},e,{type:"radio",disabled:o,checked:l,defaultChecked:c,ref:h,name:a,value:s,onChange:i,className:"Radio-input",id:m,"data-test":"DesignSystem-Radio-Input"})),Se.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:f})),Se.createElement("div",{className:"Radio-labelWrapper"},r&&Se.createElement("label",{className:d,htmlFor:m,"data-test":"DesignSystem-Radio-Label"},Se.createElement(Te,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),p&&Se.createElement(Te,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},p.trim())))}),Yn=(r.displayName="Radio",["className","children"]),$n=Se.forwardRef(function(e,t){var n=e.className,r=e.children,e=U(e,Yn),n=De(we({Row:!0},"".concat(n),n));return Se.createElement("div",xe({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),Jn=($n.displayName="Row",function(e){var t=e.appearance,n=e.children,r=e.onMouseEnter,o=e.onMouseLeave,i=e.onClick,a=e.truncateLabel,s=e.className,e=Oe(e),s=De(we({},"StatusHint",!0),s),t=De((we(l={},"StatusHint-icon",!0),we(l,"StatusHint--".concat(t),t),l)),l=De(we({},"ellipsis--noWrap",a));return Se.createElement("div",xe({"data-test":"DesignSystem-StatusHint"},e,{className:s,onClick:function(e){return i&&i(e)},onMouseEnter:function(e){return r&&r(e)},onMouseLeave:function(e){return o&&o(e)}}),Se.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:t}),Se.createElement(Te,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:l},n))}),Zn=(Jn.displayName="StatusHint",Jn.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=Oe(e),n=De((we(t={Pills:!0},"Badge--".concat(n),n&&!o),we(t,"Badge--subtle-".concat(n),o),t),i);return Se.createElement("span",xe({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Xn=(Zn.displayName="Pills",Zn.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=Oe(e),n=De(we({Spinner:!0},"Spinner--".concat(n),n),r),r=De(we({Circle:!0},"Circle--".concat(t),t));return Se.createElement("svg",xe({},e,{className:n},{viewBox:"0 0 50 50"}),Se.createElement("circle",xe({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Qn=(Xn.displayName="Spinner",Xn.defaultProps={appearance:"primary",size:"medium"},Ee(Ee({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",Ee(Ee({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),er=(Se.forwardRef(function(e,t){function n(e){"change"!=e.type&&"Space"!==e.key||(void 0===u&&h(!f),a&&a(e,!f))}var r=e.size,r=void 0===r?"regular":r,o=e.defaultChecked,i=e.disabled,a=e.onChange,s=e.name,l=e.value,c=e.className,u=e.checked,e=U(e,Qn),p=Ce(Se.useState(void 0===u?o:u),2),f=p[0],h=p[1],p=(Se.useEffect(function(){void 0!==u&&h(u)},[u]),De((we(p={},"Switch",!0),we(p,"Switch--disabled",i),we(p,"Switch--".concat(r),r),p),c)),r=De((we(c={},"Switch-wrapper",!0),we(c,"Switch-wrapper--disabled",i),we(c,"Switch-wrapper--".concat(r),r),we(c,"Switch-wrapper--checked",f),we(c,"Switch-wrapper--checkedDisabled",f&&i),c));return Se.createElement("div",{className:p},Se.createElement("input",xe({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:f,ref:t,name:s,value:l,className:"Switch-input",onKeyUp:n})),Se.createElement("span",{className:r}))}).displayName="Switch",["rows","resize","disabled","name","placeholder","value","defaultValue","required","error","onChange","onClick","onBlur","onFocus","className","readOnly"]),o=Se.forwardRef(function(e,t){var n,r=e.rows,r=void 0===r?3:r,o=e.resize,o=void 0===o||o,i=e.disabled,a=e.name,s=e.placeholder,l=e.value,c=e.defaultValue,u=e.required,p=e.error,f=e.onChange,h=e.onClick,d=e.onBlur,m=e.onFocus,g=e.className,y=e.readOnly,e=U(e,er),o=De((we(n={},"Textarea",!0),we(n,"Textarea--resize",o),we(n,"Textarea--error",p),we(n,"Textarea--readOnly",y),n),g);return Se.createElement("textarea",xe({"data-test":"DesignSystem-Textarea"},e,{ref:t,name:a,rows:r,placeholder:s,className:o,value:l,defaultValue:c,required:u,disabled:i,onChange:f,onBlur:d,onClick:h,onFocus:m}))});o.displayName="Textarea";function tr(e){var t=vr.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===vr.call(e.callee)}function nr(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"!=typeof Symbol.iterator){var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}}return!0}function rr(){return nr()&&!!Symbol.toStringTag}var or,ir,ar,sr,lr,cr,ur,pr,fr,hr,dr=ee(t(function(e){e.exports=function(e,t){if(null==e)return{};for(var n,r={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],0<=t.indexOf(n)||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0})),mr=ee(t(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),gr=t(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n.exports.default=n.exports,n.exports.__esModule=!0,r(e,t)}n.exports=r,n.exports.default=n.exports,n.exports.__esModule=!0}),r=(ee(gr),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gr(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),yr=ee(r),i=ee(t(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),s=ee(t(function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})),vr=Object.prototype.toString,o=(Object.keys||(or=Object.prototype.hasOwnProperty,ir=Object.prototype.toString,ar=tr,n=Object.prototype.propertyIsEnumerable,sr=!n.call({toString:null},"toString"),lr=n.call(function(){},"prototype"),cr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ur=function(e){var t=e.constructor;return t&&t.prototype===e},pr={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},fr=(()=>{if("undefined"!=typeof window)for(var e in window)try{if(!pr["$"+e]&&or.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{ur(window[e])}catch(e){return!0}}catch(e){return!0}return!1})(),hr=function(e){if("undefined"==typeof window||!fr)return ur(e);try{return ur(e)}catch(e){return!1}},l=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===ir.call(e),r=ar(e),o=t&&"[object String]"===ir.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=lr&&n;if(o&&0<e.length&&!or.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(r&&0<e.length)for(var l=0;l<e.length;++l)i.push(String(l));else for(var c in e)a&&"prototype"===c||!or.call(e,c)||i.push(String(c));if(sr)for(var u=hr(e),p=0;p<cr.length;++p)u&&"constructor"===cr[p]||!or.call(e,cr[p])||i.push(cr[p]);return i}),l),br=Array.prototype.slice,_r=Object.keys,Sr=_r?function(e){return _r(e)}:o,Er=Object.keys,wr=(Sr.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return tr(e)?Er(br.call(e)):Er(e)}):Object.keys=Sr,Object.keys||Sr},Sr),r="undefined"!=typeof Symbol&&Symbol,xr=Array.prototype.slice,Cr=Object.prototype.toString,kr=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==Cr.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=xr.call(arguments,1),i=Math.max(0,n.length-o.length),a=[],s=0;s<i;s++)a.push("$"+s);return r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){var e;return this instanceof r?(e=n.apply(this,o.concat(xr.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(xr.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},Dr=kr.call(Function.call,Object.prototype.hasOwnProperty),Or=SyntaxError,Pr=Function,Tr=TypeError,Mr=function(e){try{return Pr('"use strict"; return ('+e+").constructor;")()}catch(e){}},Ar=Object.getOwnPropertyDescriptor;if(Ar)try{Ar({},"")}catch(Ui){Ar=null}function Ir(){throw new Tr}function Rr(e,t){if("string"!=typeof e||0===e.length)throw new Tr("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new Tr('"allowMissing" argument must be a boolean');var n=(e=>{var t=to(e,0,1),n=to(e,-1);if("%"===t&&"%"!==n)throw new Or("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Or("invalid intrinsic syntax, expected opening `%`");var o=[];return eo(e,no,function(e,t,n,r){o[o.length]=n?eo(r,ro,"$1"):t||e}),o})(e),r=0<n.length?n[0]:"",o=((e,t)=>{var n,r=e;if(Dr(Zr,r)&&(r="%"+(n=Zr[r])[0]+"%"),Dr($r,r)){var o=$r[r];if(void 0!==(o=o===Yr?Jr(r):o)||t)return{alias:n,name:r,value:o};throw new Tr("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new Or("intrinsic "+e+" does not exist!")})("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Qr(n,Xr([0,1],o)));for(var s=1,l=!0;s<n.length;s+=1){var c=n[s],u=to(c,0,1),p=to(c,-1);if(('"'===u||"'"===u||"`"===u||'"'===p||"'"===p||"`"===p)&&u!==p)throw new Or("property names with quotes must have matching quotes");if("constructor"!==c&&l||(a=!0),Dr($r,u="%"+(r+="."+c)+"%"))i=$r[u];else if(null!=i){if(!(c in i)){if(t)return;throw new Tr("base intrinsic for "+e+" exists, but the property is not available.")}i=Ar&&s+1>=n.length?(l=!!(p=Ar(i,c)))&&"get"in p&&!("originalValue"in p.get)?p.get:i[c]:(l=Dr(i,c),i[c]),l&&!a&&($r[u]=i)}}return i}function Fr(e,t){return"function"==typeof(t=Rr(e,!!t))&&-1<io(e,".prototype.")?oo(t):t}function Nr(e){return!(ao&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===so(e)}function Lr(e){return!!Nr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==so(e)&&"[object Function]"===so(e.callee)}function jr(e,t){var n=2<arguments.length?arguments[2]:{},r=wr(t);co&&(r=po.call(r,Object.getOwnPropertySymbols(t)));for(var o,i,a,s,l=0;l<r.length;l+=1)o=e,i=r[l],a=t[r[l]],s=n[r[l]],i in o&&(!ho(s)||!s())||(mo?fo(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function Br(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!yo(e)||!yo(t))}function zr(){return"function"==typeof Object.is?Object.is:Br}function Vr(){if(null!=this&&this!==Eo(this))throw new wo("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}function Hr(){if(!xo)throw new ko("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=Co(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return Vr}var Kr,Ur,Wr,Gr,n=Ar?function(){try{return Ir}catch(e){try{return Ar(arguments,"callee").get}catch(e){return Ir}}}():Ir,l="function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&nr(),qr=Object.getPrototypeOf||function(e){return e.__proto__},Yr={},o="undefined"==typeof Uint8Array?c:qr(Uint8Array),$r={"%AggregateError%":"undefined"==typeof AggregateError?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?c:ArrayBuffer,"%ArrayIteratorPrototype%":l?qr([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":Yr,"%AsyncGenerator%":Yr,"%AsyncGeneratorFunction%":Yr,"%AsyncIteratorPrototype%":Yr,"%Atomics%":"undefined"==typeof Atomics?c:Atomics,"%BigInt%":"undefined"==typeof BigInt?c:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?c:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?c:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?c:FinalizationRegistry,"%Function%":Pr,"%GeneratorFunction%":Yr,"%Int8Array%":"undefined"==typeof Int8Array?c:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?c:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?qr(qr([][Symbol.iterator]())):c,"%JSON%":"object"==typeof JSON?JSON:c,"%Map%":"undefined"==typeof Map?c:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?qr((new Map)[Symbol.iterator]()):c,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?c:Promise,"%Proxy%":"undefined"==typeof Proxy?c:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?c:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?c:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?qr((new Set)[Symbol.iterator]()):c,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?qr(""[Symbol.iterator]()):c,"%Symbol%":l?Symbol:c,"%SyntaxError%":Or,"%ThrowTypeError%":n,"%TypedArray%":o,"%TypeError%":Tr,"%Uint8Array%":"undefined"==typeof Uint8Array?c:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?c:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?c:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?c:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?c:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?c:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?c:WeakSet},Jr=function e(t){var n,r;return"%AsyncFunction%"===t?n=Mr("async function () {}"):"%GeneratorFunction%"===t?n=Mr("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Mr("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=qr(r.prototype)),$r[t]=n},Zr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Xr=kr.call(Function.call,Array.prototype.concat),Qr=kr.call(Function.apply,Array.prototype.splice),eo=kr.call(Function.call,String.prototype.replace),to=kr.call(Function.call,String.prototype.slice),no=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ro=/\\(\\)?/g,oo=t(function(e){var t=Rr("%Function.prototype.apply%"),n=Rr("%Function.prototype.call%"),r=Rr("%Reflect.apply%",!0)||kr.call(n,t),o=Rr("%Object.getOwnPropertyDescriptor%",!0),i=Rr("%Object.defineProperty%",!0),a=Rr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(kr,n,arguments);return o&&i&&o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}),t};function s(){return r(kr,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),io=(oo.apply,oo(Rr("String.prototype.indexOf"))),ao=rr(),so=Fr("Object.prototype.toString"),r=function(){return Nr(arguments)}(),lo=(Nr.isLegacyArguments=Lr,r?Nr:Lr),co="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),uo=Object.prototype.toString,po=Array.prototype.concat,fo=Object.defineProperty,ho=function(e){return"function"==typeof e&&"[object Function]"===uo.call(e)},mo=fo&&(()=>{var e={};try{for(var t in fo(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}})(),go=(jr.supportsDescriptors=!!mo,jr),yo=function(e){return e!=e},l=oo(zr(),Object),vo=(go(l,{getPolyfill:zr,implementation:Br,shim:function(){var e=zr();return go(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),l),n=rr(),bo=(n&&(Kr=Fr("Object.prototype.hasOwnProperty"),Ur=Fr("RegExp.prototype.exec"),Wr={},Gr={toString:o=function(){throw Wr},valueOf:o},"symbol"==typeof Symbol.toPrimitive)&&(Gr[Symbol.toPrimitive]=o),Fr("Object.prototype.toString")),_o=Object.getOwnPropertyDescriptor,So=n?function(e){if(!e||"object"!=typeof e)return!1;var t=_o(e,"lastIndex");if(!(t&&Kr(t,"value")))return!1;try{Ur(e,Gr)}catch(e){return e===Wr}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===bo(e)},Eo=Object,wo=TypeError,xo=go.supportsDescriptors,Co=Object.getOwnPropertyDescriptor,ko=TypeError,Do=go.supportsDescriptors,Oo=Object.getOwnPropertyDescriptor,Po=Object.defineProperty,To=TypeError,Mo=Object.getPrototypeOf,Ao=/a/,c=oo(Vr),Io=(go(c,{getPolyfill:Hr,implementation:Vr,shim:function(){var e,t,n;if(Do&&Mo)return e=Hr(),t=Mo(Ao),(n=Oo(t,"flags"))&&n.get===e||Po(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new To("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),c),Ro=Date.prototype.getDay,Fo=function(e){try{return Ro.call(e),!0}catch(e){return!1}},No=Object.prototype.toString,Lo="[object Date]",jo=rr(),Bo=function(e){return"object"==typeof e&&null!==e&&(jo?Fo(e):No.call(e)===Lo)},zo=Date.prototype.getTime;function Vo(e,t,n){n=n||{};if(n.strict?!vo(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?vo(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(Ho(i)||Ho(a))return!1;if(i.prototype!==a.prototype)return!1;if(lo(i)!==lo(a))return!1;e=So(i),t=So(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&Io(i)===Io(a);if(Bo(i)&&Bo(a))return zo.call(i)===zo.call(a);if(e=Ko(i),t=Ko(a),e!==t)return!1;if(e||t){if(i.length!==a.length)return!1;for(r=0;r<i.length;r++)if(i[r]!==a[r])return!1}else{if(typeof i!=typeof a)return!1;try{var l=wr(i),c=wr(a)}catch(e){return!1}if(l.length!==c.length)return!1;for(l.sort(),c.sort(),r=l.length-1;0<=r;r--)if(l[r]!=c[r])return!1;for(r=l.length-1;0<=r;r--)if(o=l[r],!Vo(i[o],a[o],s))return!1}}return!0}function Ho(e){return null==e}function Ko(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||0<e.length&&"number"!=typeof e[0])}var Uo=Vo,Wo="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Go=(()=>{for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Wo&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0})();
|
|
7
7
|
/**!
|
|
8
8
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
9
9
|
* @version 1.16.1
|
|
@@ -35,7 +35,7 @@ module.exports=(n=>{var r={};function o(e){var t;return(r[e]||(t=r[e]={i:e,l:!1,
|
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/function u(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Hi:switch(e=e.type){case $i:case Ji:case Ui:case Gi:case Wi:case Xi:return e;default:switch(e=e&&e.$$typeof){case Yi:case Zi:case ta:case ea:case qi:return e;default:return t}}case Ki:return t}}}function aa(e){return u(e)===Ji}var sa={AsyncMode:$i,ConcurrentMode:Ji,ContextConsumer:Yi,ContextProvider:qi,Element:Hi,ForwardRef:Zi,Fragment:Ui,Lazy:ta,Memo:ea,Portal:Ki,Profiler:Gi,StrictMode:Wi,Suspense:Xi,isAsyncMode:function(e){return aa(e)||u(e)===$i},isConcurrentMode:aa,isContextConsumer:function(e){return u(e)===Yi},isContextProvider:function(e){return u(e)===qi},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Hi},isForwardRef:function(e){return u(e)===Zi},isFragment:function(e){return u(e)===Ui},isLazy:function(e){return u(e)===ta},isMemo:function(e){return u(e)===ea},isPortal:function(e){return u(e)===Ki},isProfiler:function(e){return u(e)===Gi},isStrictMode:function(e){return u(e)===Wi},isSuspense:function(e){return u(e)===Xi},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Ui||e===Ji||e===Gi||e===Wi||e===Xi||e===Qi||"object"==typeof e&&null!==e&&(e.$$typeof===ta||e.$$typeof===ea||e.$$typeof===qi||e.$$typeof===Yi||e.$$typeof===Zi||e.$$typeof===ra||e.$$typeof===oa||e.$$typeof===ia||e.$$typeof===na)},typeOf:u},r=t(function(e,t){});r.AsyncMode,t(function(e){e.exports=sa}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(()=>{try{if(Object.assign){var e=new String("abc");if(e[5]="de","5"!==Object.getOwnPropertyNames(e)[0]){for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r,o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"===o.join(""))return r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")?1:void 0}}}catch(e){}})()&&Object.assign;function la(){}function ca(){}Function.call.bind(Object.prototype.hasOwnProperty),ca.resetWarningCache=la;function ua(){return Q[da]=(Q[da]||0)+1}function pa(e){return Array.isArray(e)?e[0]:e}function fa(e,t){if("function"==typeof e)return _a(e,t);null!=e&&(e.current=t)}var ha=t(function(e){function t(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i)throw(i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",i}function n(){return t}e.exports=(e={array:t.isRequired=t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:ca,resetWarningCache:la}).PropTypes=e}),da="__global_unique_id__",ma=function(){},ga=t(function(e,t){t.__esModule=!0,n(g.a);var u=n(ha),p=n(ua);function n(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n(ma);var m=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,p.default)()+"__",r=(d(l,s=g.a.Component),l.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},l.prototype.componentWillReceiveProps=function(e){var t,n,r,o,i;this.props.value!==e.value&&(t=this.props.value,n=e.value,r=void 0,(o=t)===(i=n)?0===o&&1/o!=1/i:o==o||i==i)&&(r="function"==typeof a?a(t,n):m,0!==(r|=0))&&this.emitter.set(e.value,r)},l.prototype.render=function(){return this.props.children},l);function l(){var e,t;f(this,l);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=h(this,s.call.apply(s,[this].concat(i)))).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(t){r=r.filter(function(e){return e!==t})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),h(t,e)}r.childContextTypes=((o={})[n]=u.default.object.isRequired,o),d(c,i=g.a.Component),c.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?m:e},c.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?m:e},c.prototype.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},c.prototype.getValue=function(){return this.context[n]?this.context[n].get():e},c.prototype.render=function(){return e=this.props.children,(Array.isArray(e)?e[0]:e)(this.state.value);var e};var i,o=c;function c(){var e,n;f(this,c);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n=h(this,i.call.apply(i,[this].concat(r)))).state={value:n.getValue()},n.onUpdate=function(e,t){0!=((0|n.observedBits)&t)&&n.setState({value:n.getValue()})},h(n,e)}return o.contextTypes=((t={})[n]=u.default.object,t),{Provider:r,Consumer:o}},e.exports=t.default}),f=(ee(ga),t(function(e,t){t.__esModule=!0;var n=o(g.a),r=o(ga);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),l=ee(f),ya=l(),va=l(),ba=(o=>{function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,s(i(i(t)),"referenceNode",void 0),s(i(i(t)),"setReferenceNode",function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())}),t}yr(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return Se.createElement(ya.Provider,{value:this.referenceNode},Se.createElement(va.Provider,{value:this.setReferenceNode},this.props.children))},e})(Se.Component),_a=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},Sa={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Ea={},wa=(o=>{function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=o.call.apply(o,[this].concat(t))||this,s(i(i(n)),"state",{data:void 0,placement:void 0}),s(i(i(n)),"popperInstance",void 0),s(i(i(n)),"popperNode",null),s(i(i(n)),"arrowNode",null),s(i(i(n)),"setPopperNode",function(e){e&&n.popperNode!==e&&(fa(n.props.innerRef,e),n.popperNode=e,n.updatePopperInstance())}),s(i(i(n)),"setArrowNode",function(e){n.arrowNode=e}),s(i(i(n)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var t=e.placement;return n.setState({data:e,placement:t}),e}}),s(i(i(n)),"getOptions",function(){return{placement:n.props.placement,eventsEnabled:n.props.eventsEnabled,positionFixed:n.props.positionFixed,modifiers:mr({},n.props.modifiers,{arrow:mr({},n.props.modifiers&&n.props.modifiers.arrow,{enabled:!!n.arrowNode,element:n.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:n.updateStateModifier})}}),s(i(i(n)),"getPopperStyle",function(){return n.popperNode&&n.state.data?mr({position:n.state.data.offsets.popper.position},n.state.data.styles):Sa}),s(i(i(n)),"getPopperPlacement",function(){return n.state.data?n.state.placement:void 0}),s(i(i(n)),"getArrowStyle",function(){return n.arrowNode&&n.state.data?n.state.data.arrowStyles:Ea}),s(i(i(n)),"getOutOfBoundariesState",function(){return n.state.data?n.state.data.hide:void 0}),s(i(i(n)),"destroyPopperInstance",function(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}),s(i(i(n)),"updatePopperInstance",function(){n.destroyPopperInstance();var e=i(i(n)).popperNode,t=n.props.referenceElement;t&&e&&(n.popperInstance=new Vi(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}yr(e,o);var t=e.prototype;return t.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&Uo(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},t.componentWillUnmount=function(){fa(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return pa(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},e})(Se.Component);function xa(e){var t=e.referenceElement,n=dr(e,["referenceElement"]);return Se.createElement(ya.Consumer,null,function(e){return Se.createElement(wa,mr({referenceElement:void 0!==t?t:e},n))})}s(wa,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),Vi.placements;var Ca=(o=>{function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,s(i(i(t)),"refHandler",function(e){fa(t.props.innerRef,e),_a(t.props.setReferenceNode,e)}),t}yr(e,o);var t=e.prototype;return t.componentWillUnmount=function(){fa(this.props.innerRef,null)},t.render=function(){return ma(Boolean(this.props.setReferenceNode)),pa(this.props.children)({ref:this.refHandler})},e})(Se.Component);function ka(t){return Se.createElement(va.Consumer,null,function(e){return Se.createElement(Ca,mr({setReferenceNode:e},t))})}function Da(e){return!!(e=null==e?void 0:e.current)&&e.scrollWidth>e.clientWidth}function Oa(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=Oe(e),t=De({OverlayFooter:!0},t),i=Se.createRef();return Se.useEffect(function(){var e,t;n&&i.current&&(e=null==(e=i.current)?void 0:e.querySelectorAll(".Button--basic"),t=e[e.length-1])&&window.requestAnimationFrame(function(){return t.focus({preventScroll:!0})})},[n]),o?Se.createElement("div",xe({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=U(e,qa);return Se.createElement(Pe,xe({type:"button"},e,{key:t}))})):Se.createElement("div",xe({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function Pa(e){var t=e.className,n=e.heading,r=e.subHeading,o=e.backButton,i=e.backIcon,a=e.backIconCallback,s=e.backButtonCallback,l=e.headingClass,e=Oe(e),t=De(we({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),c=De((we(c={},"OverlayHeader-subheading",!0),we(c,"OverlayHeader-subheading--withBackButton",o||i),c));return Se.createElement("div",xe({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),Se.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&Se.createElement(Pe,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&Se.createElement(kn,{className:l,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&Se.createElement(Te,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:c},r))}function Ta(e){var t=e.children,n=e.className,e=Oe(e),n=De({OverlayBody:!0},n);return Se.createElement("div",xe({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function Ma(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function Aa(e){var t=e.containerClassName,n=e.elementRef,e=e.element;if(null!==e){var r,e=e.querySelectorAll(t);if(!(e.length<1))return t=Array.from(e).filter(function(e){return e!==n.current}),r=-1,t.forEach(function(e){e=parseInt(window.getComputedStyle(e).zIndex||"0",10);r=Math.max(r,e+10)}),0<r?r:void 0}}function Ia(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function Ra(e){function t(e){switch(f(!0),e){case"first":u(1);break;case"last":u(r);break;case"prev":1<c&&u(c-1);break;case"next":c<r&&u(c+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=e.pageJumpDebounceDuration,s=Oe(e),l=Ce(Se.useState(e.page),2),c=l[0],u=l[1],p=(l=Ce(Se.useState(!1),2))[0],f=l[1],h=(l=Ce(Se.useState(0),2))[0],d=l[1],m=Se.useCallback(rn(a,o),[h]),a=(Se.useEffect(function(){u(e.page)},[e.page]),De((we(l={},"Pagination",!0),we(l,"Pagination--".concat(n),n),l),i)),h=De((we(o={},"Pagination-buttonWrapper",!0),we(o,"Pagination-buttonWrapper--next",!0),o)),i=De((we(l={},"Pagination-buttonWrapper",!0),we(l,"Pagination-buttonWrapper--previous",!0),l));return Se.useEffect(function(){p&&(1<=c&&c<=r?m(c):(m.cancel(),d(function(e){return e+1})))},[c]),Se.createElement("div",xe({"data-test":"DesignSystem-Pagination"},s,{className:a}),Se.createElement("div",{className:i},Se.createElement(Pe,{onClick:function(){return t("first")},disabled:c<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),Se.createElement(Pe,{onClick:function(){return t("prev")},disabled:c<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&Se.createElement("div",{className:"Pagination-pageIndex"},Se.createElement(In,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(p||f(!0),u(e))},value:"".concat(I(c)?c:""),"data-test":"DesignSystem-Pagination--Input",onKeyPress:function(e){I(e.key)||e.preventDefault()}}),Se.createElement(Te,null," of ".concat(r," pages"))),Se.createElement("div",{className:h},Se.createElement(Pe,{onClick:function(){return t("next")},disabled:r<=c,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),Se.createElement(Pe,{onClick:function(){return t("last")},disabled:r<=c,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function Fa(e){function t(e){var t,n;"start"===e&&(t=(n=J(d)).year,h({yearNav:t,monthNav:n.month})),"end"===e&&(n=(t=J(m)).year,h({yearNav:n,monthNav:t.month}))}function n(e,t,n){var r,o;h({open:!0}),"start"===n&&(o=c.placeholderChar||"_",t)&&!t.includes(o)&&(o=be(l,t,p))&&(h({startDate:o}),m&&(r=(o=J(m)).year,$(d,"more",r,o.month,o.date))&&h({endDate:void 0}),c.onPaste)&&c.onPaste(e,t),"end"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(o=be(l,t,p))&&(h({endDate:o}),u.onPaste)&&u.onPaste(e,t)}function r(e,t,n){var r,o;h({open:!0}),"start"===n&&(o=c.placeholderChar||"_",t)&&!t.includes(o)&&(o=be(l,t,p))&&!isNaN(o.getTime())&&(h({startDate:o}),m)&&(r=(o=J(m)).year,$(d,"more",r,o.month,o.date))&&h({endDate:void 0}),"end"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(o=be(l,t,p))&&!isNaN(o.getTime())&&h({endDate:o})}function o(e,t,n){h({init:!0});var r,o=/\d/;"start"===n&&(r=void 0===(r=c.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(r)?h({startError:!0}):(!t||o.test(t))&&t||h({startError:!1}),t&&!t.includes(r)||h({startDate:void 0})),"end"===n&&(n=void 0===(r=u.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(n)?h({endError:!0}):(!t||o.test(t))&&t||h({endError:!1}),t&&!t.includes(n)||h({endDate:void 0}))}function i(e){h({init:!0}),"start"===e&&(h({startDate:void 0}),t("end")),"end"===e&&(h({endDate:void 0}),t("start"))}function a(e){f.open||t(e)}function s(e){return K(p,e,l)}var l=e.inputFormat,c=e.startInputOptions,u=e.endInputOptions,p=e.validators,f=e.state,h=e.setState,e=f.init,d=f.startDate,m=f.endDate,g=H[l],y=c.placeholderChar||"_",v=u.placeholderChar||"_",b=c.error||c.required&&f.startError&&e,_=u.error||u.required&&f.endError&&e,S=void 0===c.caption?"Invalid value":c.caption,E=void 0===u.caption?"Invalid value":u.caption,w=c.label,x=u.label;return Se.createElement($n,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},Se.createElement(k,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},w&&Se.createElement(Ln,{required:c.required,withInput:!0},w),Se.createElement(Fn,xe({icon:"events",placeholder:l},c,{mask:g,value:d?C(l,d):e?Fn.utils.getDefaultValue(g,y):"",onChange:function(e,t){r(0,t||"","start")},onPaste:function(e,t){n(e,t||"","start")},onBlur:function(e,t){o(0,t||"","start")},onClear:function(){return i("start")},onClick:function(){return a("start")},error:b,caption:b?S:"",validators:[s],clearOnEmptyBlur:!0}))),Se.createElement(k,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},x&&Se.createElement(Ln,{required:u.required,withInput:!0},x),Se.createElement(Fn,xe({icon:"events",placeholder:l},u,{mask:g,value:m?C(l,m):e?Fn.utils.getDefaultValue(g,v):"",onChange:function(e,t){r(0,t||"","end")},onPaste:function(e,t){n(e,t||"","end")},onBlur:function(e,t){o(0,t||"","end")},onClear:function(){return i("end")},onClick:function(){return a("end")},error:_,caption:_?E:"",validators:[s],clearOnEmptyBlur:!0}))))}function Na(e){function i(e,t){var n=/\d/;return!(!e||!t||e.includes(d)||!t.includes(d))||!!(e&&n.test(e)&&e.includes(d))||!(e&&!n.test(e)||!e)&&null}var s=e.inputFormat,l=e.inputOptions,c=e.validators,u=e.setState,e=(n=e.state).init,a=n.startDate,p=n.endDate,f=n.startValue,h=n.endValue,t=W[s],n=l.error||l.required&&(n.startError||n.endError)&&e,r=void 0===l.caption?"Invalid value":l.caption,o=l.label,d=void 0===(m=l.placeholderChar)?"_":m,m=Fn.utils.getDefaultValue(t,d).split(" - "),g=f||m[0],m=h||m[1];return Se.createElement($n,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},Se.createElement(k,null,o&&Se.createElement(Ln,{required:l.required,withInput:!0},o),Se.createElement(Fn,xe({icon:"events",placeholder:"".concat(s," - ").concat(s)},l,{mask:t,value:a||p||e?"".concat(g," - ").concat(m):void 0,onChange:function(e,t){var n,r,o;t=(t=t||"").split(" - "),o=t[0],t=t[1],f!==o&&o&&!o.includes(d)&&(r=be(s,o,c))&&(n=h&&!h.includes(d),u({startDate:r,endDate:n?p:void 0}),p)&&(n=(r=J(p)).year,$(a,"more",n,r.month,r.date))&&u({endDate:void 0}),h!==t&&t&&!t.includes(d)&&(n=be(s,t,c),r=f&&!f.includes(d),n)&&u({endDate:n,startDate:r?a:void 0}),u({startValue:o,endValue:t})},onBlur:function(e,t){var n,r,o;t=t||"",u({init:!0}),t=t.split(" - "),n=t[0],r=i(n,t=t[1]),o=i(t,n),null!==r&&null!==o&&u({startError:r,endError:o}),n&&!n.includes(d)||u({startDate:void 0}),t&&!t.includes(d)||u({endDate:void 0})},onPaste:function(e,t){var n,r,o,i,a;e=e,t=t||"",n=l.onPaste,r=t.split(" - "),o=r[0],i=be(s,r=r[1],c),a=be(s,o,c),u({startDate:a,endDate:i,startValue:o,endValue:r}),n&&n(e,t)},onClear:function(){u({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:n,caption:n?r:"",validators:[function(e){var e=Ce(e.split(" - "),2),t=e[0],e=e[1];return K(c,t,s)&&K(c,e,s)}],clearOnEmptyBlur:!0}))))}function La(e){var t=new Date;return new Date(t.setDate(e))}function ja(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function Ba(e){e.preventDefault()}function za(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o.some(function(e){return!Za(t)&&e&&e.apply(void 0,[t].concat(n)),Za(t)})}}function Va(e,t){switch(t.type){case"focus":return Ee(Ee({},e),{},{isFocused:!0});case"blur":return Ee(Ee({},e),{},{isFocused:!1});case"openDialog":return Ee(Ee({},e),{},{isFileDialogActive:!0});case"closeDialog":return Ee(Ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return Ee(Ee({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return Ee(Ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ee(Ee({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var Ha=(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var o;return h(this,n),we(Y(o=t.call(this,e)),"triggerRef",void 0),we(Y(o),"popupRef",void 0),we(Y(o),"hoverableDelay",void 0),we(Y(o),"_timer",void 0),we(Y(o),"_throttleWait",void 0),we(Y(o),"offsetMapping",void 0),we(Y(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),we(Y(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),we(Y(o),"getUpdatedStyle",function(e,t,n){var r=Ee(Ee({},o.props.style),e);switch(t&&t.split("-")[0]){case"top":r.marginBottom=o.offsetMapping[n];break;case"bottom":r.marginTop=o.offsetMapping[n];break;case"left":r.marginRight=o.offsetMapping[n];break;case"right":r.marginLeft=o.offsetMapping[n]}return o.props.triggerCoordinates&&(r.position="absolute",r.transform="translate(".concat(o.props.triggerCoordinates.x,"px, ").concat(o.props.triggerCoordinates.y,"px)")),r}),o.state={animationKeyframe:"",isOpen:o.props.open&&!o.props.disabled||!1,uniqueKey:""},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=Se.createRef(),o.popupRef=Se.createRef(),o.getPopperChildren=o.getPopperChildren.bind(Y(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(Y(o)),o.handleMouseEnter=o.handleMouseEnter.bind(Y(o)),o.handleMouseLeave=o.handleMouseLeave.bind(Y(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(Y(o)),o}return a(n,[{key:"componentDidMount",value:function(){this.addBoundaryScrollHandler();var e=this.triggerRef.current,e=this.getZIndexForLayer(e);this.setState({zIndex:void 0===e?e:e+1})}},{key:"componentDidUpdate",value:function(e){!e.boundaryElement&&this.props.boundaryElement&&(this.removeBoundaryScrollHandler(),this.addBoundaryScrollHandler()),e.open!==this.props.open&&(this._throttleWait=!1,this.setState({animationKeyframe:""}),this.props.open&&!this.props.disabled?(e=this.triggerRef.current,e=this.getZIndexForLayer(e),this.setState({zIndex:void 0===e?e:e+1,isOpen:!0})):!this.props.open&&this.props.animationClass&&this.setState({isOpen:!1}))}},{key:"componentWillUnmount",value:function(){this.removeBoundaryScrollHandler()}},{key:"boundaryScrollHandler",value:function(){var e=this.props,t=e.open;"click"===e.on&&e.closeOnScroll&&t&&!this._throttleWait&&(this.togglePopper("onScroll",!1),this._throttleWait=!0)}},{key:"addBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.addEventListener&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.removeEventListener&&this.props.boundaryElement.removeEventListener("scroll",this.boundaryScrollHandler)}},{key:"mouseMoveHandler",value:function(){var e=this;this._timer&&clearTimeout(this._timer),this._timer=window.setTimeout(function(){(0,e.props.onToggle)(!1,"mouseLeave")},this.hoverableDelay)}},{key:"handleMouseEnter",value:function(){"hover"===this.props.on&&(this._timer&&clearTimeout(this._timer),(0,this.props.onToggle)(!0,"mouseEnter"),this.setState(function(){return{isOpen:!0}}))}},{key:"handleMouseLeave",value:function(){var e,t;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():(t(!1,"mouseLeave"),this.setState({isOpen:!1})))}},{key:"getZIndexForLayer",value:function(e){if(null!==e)return"auto"===(e=(e=e.closest("[data-layer]")||document.body)===document.body?"auto":parseInt(window.getComputedStyle(e).zIndex||"0",10))||isNaN(e)?500:e}},{key:"getTriggerElement",value:function(e){var a=this,t=this.props,n=t.trigger,r=t.disabled,e="hover"!==t.on||r?{ref:e,onClick:function(e){e.stopPropagation(),r||a.togglePopper("onClick")}}:{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleMouseEnter,onBlur:this.handleMouseLeave},t=De("PopperWrapper-trigger",t.triggerClass),o=function(t){var e=a.popupRef.current,n=document.body,r=e&&parseInt(window.getComputedStyle(e).zIndex),o=!1,i=!1;return n.querySelectorAll('[data-opened="true"]').forEach(function(e){e&&e.contains(t)&&(o=!0,parseInt(window.getComputedStyle(e).zIndex)<r)&&(i=!0)}),!(!n.isEqualNode(t)&&!i&&n.contains(t)&&o)};return Se.createElement(Un,xe({className:t,onOutsideClick:function(e){var t=a.props,n=t.open,t=t.closeOnBackdropClick;n&&o(e.target)&&t&&(a.doesEventContainsElement(e,a.popupRef)||a.togglePopper("outsideClick"))}},e),n)}},{key:"getPopperChildren",value:function(e){var t,n=this,r=e.ref,o=e.style,i=e.placement,e=e.outOfBoundaries,a=this.props,s=a.offset,l=a.children,c=a.open,a=a.animationClass,u=this.state,p=u.zIndex,f=u.animationKeyframe,u=u.uniqueKey,s=Ee(Ee({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:p}),o="",f=(a?o=De((we(p={},"".concat(a.open),this.state.isOpen),we(p,"".concat(a.close),!this.state.isOpen),p),l.props.className):(p=null==(p=this.popupRef.current)?void 0:p.offsetHeight,(null==(t=this.popupRef.current)?void 0:t.style.getPropertyValue("transform"))&&p&&i&&!f&&(t=Math.random().toString(36).substring(2,6),f=i.includes("top"),f="\n @keyframes popper-open-".concat(t," {\n from { \n max-height: 0;\n ").concat(f?"margin-top: ".concat(p,"px"):"",";\n }\n to {\n max-height: ").concat(p,"px;\n ").concat(f?"margin-top: 0px":"",";\n }\n }\n @keyframes popper-close-").concat(t," {\n from {\n max-height: ").concat(p,"px;\n ").concat(f?"margin-top: 0px":"",";\n }\n to {\n max-height: 0;\n ").concat(f?"margin-top: ".concat(p,"px"):"",";\n }\n }\n "),this.setState({animationKeyframe:f,uniqueKey:t})),p={animation:c?"popper-open-".concat(u," 120ms cubic-bezier(0, 0, 0.38, 0.9), popper-fade-in 120ms"):"popper-close-".concat(u," 120ms cubic-bezier(0.2, 0, 1, 0.9), fadeOut 100ms")},s=Ee(Ee(Ee({},s),p),{},{overflow:"hidden"})),{ref:r,style:s,"data-placement":i,"data-hide":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onAnimationEnd:function(){c||Object(v.flushSync)(function(){n.setState({isOpen:!1})})}});return Se.cloneElement(l,a?Ee(Ee({},f),{},{className:o}):Ee({},f))}},{key:"render",value:function(){var t=this,e=this.props,n=e.placement,r=e.appendToBody,o=e.hide,i=e.boundaryElement,a=e.triggerCoordinates,e=e.computeStyles,s=this.state,l=s.animationKeyframe,s=s.isOpen,c=Se.createElement(xa,{placement:n,innerRef:this.popupRef,modifiers:Ee({preventOverflow:{boundariesElement:i||document.body},hide:{enabled:o},computeStyles:e},a&&{offset:{offset:"".concat(a.x,"px, ").concat(a.y,"px")}})},this.getPopperChildren);return Se.createElement(ba,null,Se.createElement("style",null,l),Se.createElement(ka,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),s&&r&&!a&&v.createPortal(Se.createElement(xa,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:i||document.body},hide:{enabled:o},computeStyles:e}},this.getPopperChildren),document.body),s&&r&&a&&v.createPortal(c,document.body),s&&!r&&!a&&Se.createElement(xa,{placement:n,innerRef:this.popupRef,modifiers:{computeStyles:e}},this.getPopperChildren))}}]),n})(),Ka=(we(Ha,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{},disabled:!1}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement","name"]),Ua=function(e){var t=e.position,n=e.customStyle,r=e.dark,o=e.children,i=e.onToggle,a=e.className,s=e.hideOnReferenceEscape,l=e.boundaryElement,c=void 0===l?document.body:l,l=e.name,u=U(e,Ka),p=Ce(Se.useState(!!e.open),2),f=p[0],h=p[1],p=Ce(Se.useState(!1),2),d=p[0],m=p[1],p=(Se.useEffect(function(){void 0!==e.open&&h(e.open)},[e.open]),Se.useCallback(function(e){h(e)},[])),r=(Se.useEffect(function(){d||"current"in c&&c.current&&m(!0)},[c]),De(we({Popover:!0},"Popover--dark",r),a)),a=Se.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f,"data-name":l},o);return Se.createElement(Ha,xe({},u,{init:d,boundaryElement:"current"in c?c.current:c,open:f,hide:s,style:n,onToggle:i||p,placement:t}),a)},Wa=(Ua.displayName="Popover",Ua.defaultProps=Object.assign({},te(Ha.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip","showTooltip","showOnTruncation","elementRef"]),Ga={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},M=function(e){var t=e.children,n=e.tooltip,r=e.showTooltip,o=e.showOnTruncation,i=e.elementRef,a=U(e,Wa),s=Se.useRef(null),l=Ce(Se.useState(!1),2),c=l[0],u=l[1],l=(Se.useEffect(function(){u(Da(i||s))},[s,i,t]),i||!Se.isValidElement(t)?t:Se.cloneElement(t,{ref:s}));return r?(r=Se.createElement("div",{className:"Tooltip"},Se.createElement(Te,{className:"Tooltip-text",appearance:"white"},n)),o?c?Se.createElement(Ua,xe({trigger:l,on:"hover",offset:"medium"},a,{animationClass:{open:"Tooltip-animation-open-".concat(Ga[e.position]),close:"Tooltip-animation-close-".concat(Ga[e.position])},className:"Tooltip-container"}),r):l:Se.createElement(Ua,xe({trigger:t,on:"hover",offset:"medium"},a,{animationClass:{open:"Tooltip-animation-open-".concat(Ga[e.position]),close:"Tooltip-animation-close-".concat(Ga[e.position])},className:"Tooltip-container"}),r)):t},qa=(M.useAutoTooltip=function(){return{detectTruncation:Da}},M.defaultProps=Object.assign({},te(Ua.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1,showTooltip:!0,showOnTruncation:!1}),["label"]),p=(Oa.displayName="OverlayFooter",Pa.displayName="OverlayHeader",Ta.defaultProps={stickFooter:!0,withFooter:!0},Ta.displayName="OverlayBody",new((()=>{function e(){h(this,e),we(this,"overlays",void 0),this.overlays=[]}return a(e,[{key:"add",value:function(e){var t;if(null!==e)return-1===(t=this.overlays.indexOf(e))&&(t=this.overlays.length,this.overlays.push(e)),t}},{key:"remove",value:function(e){null!==e&&-1!==(e=this.overlays.indexOf(e))&&this.overlays.splice(e,1)}},{key:"isTopOverlay",value:function(e){if(null!==e)return!!this.overlays.length&&this.overlays[this.overlays.length-1]===e}}]),e})())),o=(Object.freeze(p),(()=>{e(r,Se["Component"]);var t=d(r);function r(e){var n;return h(this,r),we(Y(n=t.call(this,e)),"modalRef",Se.createRef()),we(Y(n),"element",void 0),we(Y(n),"onCloseHandler",function(e){var t=p.isTopOverlay(n.modalRef.current);Ia(e,t,n.onOutsideClickHandler)}),n.element=Ma(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(Y(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&p.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&p.add(this.modalRef.current);var e=Aa({element:this.element,containerClassName:".Overlay-container",elementRef:this.modalRef});this.setState({zIndex:e})}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=Aa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&p.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&p.remove(this.modalRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.closeOnEscape,r=t.backdropClose,t=t.onClose;this.state.open&&p.isTopOverlay(this.modalRef.current)&&((n||r)&&p.remove(this.modalRef.current),t?t(e,"OutsideClick"):"function"==typeof r&&r(e,"OutsideClick"))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.backdropClose,a=r.dimension,s=r.children,l=r.headerOptions,c=r.header,u=r.footerOptions,p=r.seperator,f=r.footer,h=r.onClose,r=e?e-1:1e3,t=De({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=De((we(o={},"Modal-header",!0),we(o,"Modal-header--withSeperator",p),o)),p=De((we(d={},"Modal-footer",!0),we(d,"Modal-footer--withSeperator",p),d)),d=De((we(d={},"Row",!0),we(d,"Overlay-container",!0),we(d,"Overlay-container--open",n),d)),m=l||u||f||c,m=De((we(g={},"Modal-body",!0),we(g,"Modal-body--withMargin",!m||!!f),we(g,"Modal-body--withPadding",!m||!f),g)),g=Oe(this.props),d=Se.createElement($n,{"data-test":"DesignSystem-ModalContainer",className:d,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},Se.createElement(k,xe({"data-test":"DesignSystem-Modal"},g,{className:t},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[a],{ref:this.modalRef}),(l||c)&&Se.createElement("div",{className:o},Se.createElement(k,null,!c&&Se.createElement(Pa,xe({"data-test":"DesignSystem-Modal--header"},l)),!!c&&c),Se.createElement(k,{className:"flex-grow-0"},Se.createElement(M,{tooltip:"Close",position:"bottom"},Se.createElement(Pe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){h&&h(e,"IconClick")}})))),n&&s&&Se.createElement(Se.Fragment,null,l||u||f||c?Se.createElement(Ta,{className:m},this.props.children):s),(!!f||!!u)&&Se.createElement(Oa,xe({"data-test":"DesignSystem-Modal--footer"},u,{open:n,className:p}),f))),e=i?Se.createElement(Un,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},d):d,g=v.createPortal(e,this.element);return Se.createElement(Se.Fragment,null,g,Se.createElement(ne,{open:this.state.animate,zIndex:r}))}}]),r})()),n=(we(o,"defaultProps",{dimension:"medium"}),(()=>{e(r,Se["Component"]);var t=d(r);function r(e){var n;return h(this,r),we(Y(n=t.call(this,e)),"modalRef",Se.createRef()),we(Y(n),"element",void 0),we(Y(n),"onOutsideClickHandler",function(e){p.remove(n.modalRef.current),n.props.onClose?n.props.onClose(e,"EscapePress"):n.setState({animate:!1},function(){window.setTimeout(function(){n.setState({open:!1})},120)})}),we(Y(n),"onCloseHandler",function(e){var t=p.isTopOverlay(n.modalRef.current);Ia(e,t,n.onOutsideClickHandler)}),n.element=Ma(),n.state={open:e.open,animate:e.open},n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&p.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=Aa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&p.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&p.remove(this.modalRef.current)))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.dimension,a=r.children,s=r.header,l=r.headerOptions,c=r.footer,u=r.footerOptions,p=r.onClose,r=De({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=De((we(t={},"Overlay-container",!0),we(t,"Overlay-container--open",n),t)),t=Oe(this.props),o=n?Se.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},Se.createElement("div",xe({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),Se.createElement($n,{className:"justify-content-center"},Se.createElement(k,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],Se.createElement($n,{className:"FullscreenModal-header"},Se.createElement(k,null,!s&&Se.createElement(Pa,xe({"data-test":"DesignSystem-FullscreenModal--header"},l)),!!s&&s),Se.createElement(k,{className:"flex-grow-0"},Se.createElement(M,{tooltip:"Close"},Se.createElement(Pe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){p&&p(e,"IconClick")}})))),Se.createElement(Ta,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!c||!!u)&&Se.createElement(Oa,xe({"data-test":"DesignSystem-FullscreenModal--footer"},u,{open:n,className:"FullscreenModal-footer"}),c))))):null,e=v.createPortal(o,this.element);return Se.createElement(Se.Fragment,null,e)}}]),r})()),Ya=(we(n,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),c=(()=>{e(r,Se["Component"]);var t=d(r);function r(e){var n;return h(this,r),we(Y(n=t.call(this,e)),"sidesheetRef",Se.createRef()),we(Y(n),"element",void 0),we(Y(n),"onCloseHandler",function(e){var t=p.isTopOverlay(n.sidesheetRef.current);Ia(e,t,n.onOutsideClickHandler)}),n.element=Ma(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(Y(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&p.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&p.add(this.sidesheetRef.current);var e=Aa({element:this.element,containerClassName:".Overlay-container",elementRef:this.sidesheetRef});this.setState({zIndex:e})}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.props.open?(e=Aa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&p.add(this.sidesheetRef.current)):(this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&p.remove(this.sidesheetRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.backdropClose,r=t.closeOnEscape,t=t.onClose;this.state.open&&p.isTopOverlay(this.sidesheetRef.current)&&((n||r)&&p.remove(this.sidesheetRef.current),t)&&t(e,"OutsideClick")}},{key:"handleAnimationEnd",value:function(){this.state.animate||this.setState({open:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.animate,r=t.open,t=t.zIndex,o=this.props,i=o.className,a=o.backdropClose,s=o.dimension,l=o.footer,c=o.seperator,u=o.stickFooter,p=o.headerOptions,f=o.footerOptions,h=o.header,d=o.onClose,o=t?t-1:1e3,i=De({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=De((we(m={},"Overlay-container",!0),we(m,"fade-in",n),we(m,"Overlay-container--open",n),we(m,"Overlay-container--close",!n),m)),m=De((we(m={},"Sidesheet-header",!0),we(m,"Sidesheet-header--withSeperator",c),m)),c=De((we(g={},"Sidesheet-footer",!0),we(g,"Sidesheet-footer--withSeperator",c),we(g,"Sidesheet-footer--stickToBottom",u),g)),u=De((we(g={},"Sidesheet-body",!0),we(g,"Sidesheet-body--withMargin",!!l&&u),we(g,"Sidesheet-body--nextPage",(null==p?void 0:p.backButton)||(null==p?void 0:p.backIcon)),we(g,"Sidesheet-body--firstPage",!(null!=p&&p.backButton||null!=p&&p.backIcon)),g)),g=De((we(g={},"Sidesheet-header--shiftRight",(null==p?void 0:p.backButton)||(null==p?void 0:p.backIcon)),we(g,"Sidesheet-header--shiftLeft",!(null!=p&&p.backButton||null!=p&&p.backIcon)),g)),y=Oe(this.props),n=Se.createElement($n,{"data-test":"DesignSystem-SidesheetContainer","data-open":this.state.open,className:n,"data-layer":!0,style:{zIndex:t||1001},ref:this.sidesheetRef,onAnimationEnd:function(){return e.handleAnimationEnd}},Se.createElement(k,xe({"data-test":"DesignSystem-Sidesheet"},y,{className:i,size:Ya[s]}),Se.createElement("div",{className:m},Se.createElement(k,{"data-test":"DesignSystem-Sidesheet--Header"},!h&&Se.createElement(Pa,xe({headingClass:g},p)),!!h&&h),Se.createElement(k,{className:"flex-grow-0"},Se.createElement(M,{tooltip:"Close"},Se.createElement(Pe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){d&&d(e,"IconClick")}})))),Se.createElement(Ta,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:u},this.props.children),(!!l||!!f)&&Se.createElement(Oa,xe({"data-test":"DesignSystem-Sidesheet--Footer"},f,{open:r,className:c}),l))),t=a?Se.createElement(Un,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,y=v.createPortal(t,this.element);return Se.createElement(Se.Fragment,null,y,Se.createElement(ne,{open:this.state.animate,zIndex:o}))}}]),r})(),r=(we(c,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=Oe(e),r=De({"Modal-description":!0},r);return Se.createElement("div",xe({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&Se.createElement(Te,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&Se.createElement("br",null),n&&Se.createElement(Te,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),$a=(r.displayName="ModalDescription",Ra.displayName="Pagination",Ra.defaultProps={type:"basic",page:1,totalPages:1,pageJumpDebounceDuration:750},["startDate","endDate","yearNav","monthNav","open","inputFormat","outputFormat","startInputOptions","endInputOptions","validators","withInput","position","disabledBefore","disabledAfter","onRangeChange","rangeLimit"]),f=(()=>{e(l,Se["Component"]);var s=d(l);function l(e){h(this,l),we(Y(u=s.call(this,e)),"monthsInView",void 0),we(Y(u),"getDate",function(e,t){var n=u.props.inputFormat;return{startValue:e?C(n,e):"",endValue:t?C(n,t):""}}),we(Y(u),"getErrors",function(e,t){function n(e){var t=(n=u.props).disabledBefore,n=n.disabledAfter,r=(t=J(t)).year,o=t.month,t=t.date,i=(n=J(n)).year,a=n.month,n=n.date;return!!e&&($(e,"less",r,o,t)||$(e,"more",i,a,n))}var r=n(e),o=n(t),t=J(t),i=t.year;return $(e,"more",i,t.month,t.date)&&(o=r=!0),{startError:r,endError:o}}),we(Y(u),"getInRangeError",function(){var e=u.props.rangeLimit;if(e){var t,n=u.state,r=n.startDate,n=n.endDate,o=J(r),i=o.year,a=o.month,o=o.date,s=J(n),l=s.year,c=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),$(t,"less",l,c,s+1);if(n)return(t=new Date(n)).setDate(s-e),$(t,"more",i,a,o-1)}return!1}),we(Y(u),"onRangeChangeHandler",function(e,t){u.setState({init:!0,startDate:e,endDate:t,startValue:e?C(u.props.inputFormat,e):"",endValue:t?C(u.props.inputFormat,t):""})}),we(Y(u),"onToggleHandler",function(e,t){var n=u.props,n=n.singleInput?n.inputOptions.disabled:n.startInputOptions.disabled||n.endInputOptions.disabled;if(!n)switch(t){case"outsideClick":u.setState({open:e});break;case"onClick":u.setState({open:!0})}});var u,t=e.inputFormat,n=e.validators,r=m(e.startDate,t,n),t=m(e.endDate,t,n),n=u.getDate(r,t),o=n.startValue,n=n.endValue,i=u.getErrors(r,t),a=i.startError;return u.state={startDate:r,endDate:t,startValue:o,endValue:n,startError:a,endError:i.endError,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},u.monthsInView=e.monthsInView||(e.withInput?2:1),u}return a(l,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;e.startDate!==this.props.startDate&&(n=(r=this.props).inputFormat,r=m(this.props.startDate,n,r.validators),n=C(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=m(this.props.endDate,n,r.validators),n=C(n,r),this.setState({endDate:r,endValue:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=(r=this.props).onRangeChange,e=r.outputFormat,r=(t=this.state).startDate,o=(i=this.getErrors(r,t=t.endDate)).startError,this.setState({startError:o,endError:i=i.endError}),n&&(a=this.getInRangeError(),s=C(e,r),e=C(e,t),a||o||i?this.props.allowReverseSelection||(o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e)):(!this.props.allowReverseSelection||r&&t)&&n(r,t,s,e)),this.state.startDate&&this.state.endDate&&this.setState({open:!1}))}},{key:"renderCalendar",value:function(){var e=this.props,t=(e.startDate,e.inputFormat),n=e.validators,r=e.disabledBefore,o=e.disabledAfter,i=e.rangeLimit,e=U(e,$a),a=this.state,s=a.startDate,l=a.endDate,c=a.yearNav,a=a.monthNav;return Se.createElement(et,xe({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:m(s,t,n),endDate:m(l,t,n),disabledBefore:m(r,t,n),disabledAfter:m(o,t,n),onRangeChange:this.onRangeChangeHandler,yearNav:c,monthNav:a,rangeLimit:i}))}},{key:"render",value:function(){var e,t=this.props,n=t.withInput,r=t.startInputOptions,o=t.endInputOptions,i=t.inputOptions,a=t.inputFormat,s=t.position,l=t.validators,c=t.singleInput,u=t.contentAlign,t=t.children,p=this.state.open,u=De((we(e={},"DateRangePicker",!0),we(e,"DateRangePicker--".concat(u),u),e));return n?(e=c?Se.createElement(Na,{inputFormat:a,inputOptions:i,validators:l,state:this.state,setState:this.setState.bind(this)}):Se.createElement(Fa,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:l,state:this.state,setState:this.setState.bind(this)}),Se.createElement(Ua,{trigger:e,triggerClass:"w-100",className:u,position:s,appendToBody:!0,open:p,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),l})(),l=(we(f,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:La(t-e+1),endDate:La(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:La(t-e-6),endDate:La(t-e)}},getPreviousMonth:function(){var e=new Date,t=e.getFullYear(),e=e.getMonth();return{endDate:new Date(t,e,0),startDate:new Date(t-(e<0),(e+11)%12,1)}},getPrevious90Days:function(){var e=(new Date).getDate();return{startDate:La(e-90),endDate:La(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),we(f,"defaultProps",Ee(Ee({},et.defaultProps),{},{children:Se.createElement(Se.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[T],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return Se.createElement(Se.Fragment,null,e)}),Ja=(l.displayName="Tab",function(e,t){var n,r,o;return!e||!t||(t=Array.isArray(t)?t:t.split(","),n=e.name||"",r=(e.type||"").toLowerCase(),o=r.replace(/\/.*$/,""),!r)||t.some(function(e){e=e.trim().toLowerCase();return"."===e.charAt(0)?n.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e})}),Za=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Xa=function(e){return null!=e},Qa=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e,e=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{type:"FILE_INVALID_TYPE",message:"File type must be ".concat(e)}},es=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},ts=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},ns=function(e,t){e="application/x-moz-file"===e.type||Ja(e,t);return[e,e?null:Qa(t)]},rs=function(e,t,n){if(Xa(e.size))if(Xa(t)&&Xa(n)){if(e.size>n)return[!1,es(n)];if(e.size<t)return[!1,ts(t)]}else{if(Xa(t)&&e.size<t)return[!1,ts(t)];if(Xa(n)&&e.size>n)return[!1,es(n)]}return[!0,null]},os=new Map([["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["png","image/png"],["bmp","image/bmp"],["tif","image/tiff"],["tiff","image/tiff"],["apng","image/apng"],["avif","image/avif"],["jfif","image/jpeg"],["pjpeg","image/pjpeg"],["pjp","image/jpeg"],["svg","image/svg+xml"],["webp","image/webp"],["cur","image/x-win-bitmap"],["MTS","model/vnd.mts"],["roq","video"],["f4a","video"],["f4b","video"],["drc","video"],["nsv","video"],["avi","video/x-msvideo"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["webm","video/webm"],["flv","video/x-flv"],["vob","video/x-ms-vob"],["ogv","video/ogg"],["ogg","application/ogg"],["gifv","image/gif"],["mng","video/x-mng"],["M2TS","video/MP2T"],["TS","video/mp2t"],["qt","video/quicktime"],["wmv","video/x-ms-wmv"],["yuv","application/octet-stream"],["rm","application/vnd.rn-realmedia"],["rmvb","application/vnd.rn-realmedia-vbr"],["viv","video/vnd.vivo"],["asf","video/x-ms-asf"],["amv","video/x-amv"],["m4v","video/x-m4v"],["mpg","video/mpeg"],["mpeg","video/mpeg"],["mpe","video/mpeg"],["mpv","video/mpv"],["m2v","video/mpeg"],["svi","video/x-msvideo"],["3gp","video/3gpp"],["3g2","video/3gpp2"],["mxf","application/mxf"],["flv","video/x-flv"],["f4v","video/x-f4v"],["f4p","video/mp4"],["aa","audio"],["aax","audio"],["act","audio"],["alac","audio"],["ape","audio"],["awb","audio"],["dss","audio"],["dvf","audio"],["iklax","audio"],["ivs","audio"],["msv","audio"],["nmf","audio"],["mogg","audio"],["raw","audio"],["rf64","audio"],["sln","audio"],["wv","audio"],["8svx","audio"],["3gp","audio/3gpp"],["mp2","audio/mpeg"],["aac","audio/x-aac"],["aiff","audio/x-aiff"],["amr","audio/amr"],["au","audio/basic"],["flac","audio/x-flac"],["gsm","audio/gsm"],["m4a","audio/mp4a-latm"],["m4b","audio/mp4a-latm"],["m4p","audio/mp4a-latm"],["mmf","application/vnd.smaf"],["mp3","audio/mpeg"],["ogg","audio/ogg"],["oga","audio/ogg"],["opus","audio/opus"],["tta","audio/x-tta"],["voc","audio/x-voice"],["wav","audio/x-wav"],["wma","audio/x-ms-wma"],["webm","audio/webm"],["cda ","application/x-cdf"],["ra","audio/x-pn-realaudio"],["vox","application/x-authorware-bin"],["rm","application/vnd.rn-realmedia"],["mpc","application/vnd.mophun.certificate"],["pdf","application/pdf"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xlss","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xls","application/vnd.ms-excel"],["odt","application/vnd.oasis.opendocument.text"],["tex","application/x-tex"],["wpd","application/wordperfect"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["csv","text/csv"],["rtf","text/rtf"],["txt","text/plain"],["tsv","text/tab-separated-values"]]),is=[".DS_Store","Thumbs.db"];function as(){return(as=_(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.dataTransfer?function(){return ls.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?us(t.target.files):[]).map(function(e){return ss(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function ss(e,t){var n,r=(e=>{var t=e.name;return t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=os.get(t))&&Object.defineProperty(e,"type",{value:t,writable:!1,configurable:!1,enumerable:!0}),e})(e);return"string"!=typeof r.path&&(n=e.webkitRelativePath,Object.defineProperty(r,"path",{value:"string"==typeof t?t:"string"==typeof n&&0<n.length?n:e.name,writable:!1,configurable:!1,enumerable:!0})),r}function ls(){return(ls=_(regeneratorRuntime.mark(function e(t,n){var r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.items){if(r=us(t.items).filter(function(e){return"file"===e.kind}),"drop"!==n)return e.abrupt("return",r);e.next=4}else e.next=8;break;case 4:return e.next=6,Promise.all(r.map(ps));case 6:return o=e.sent,e.abrupt("return",cs(function n(e){return e.reduce(function(e,t){return[].concat(ke(e),ke(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",cs(us(t.files).map(function(e){return ss(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function cs(e){return e.filter(function(e){return-1===is.indexOf(e.name)})}function us(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function ps(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?ms(t):fs(e)}function fs(e){var t=e.getAsFile();return t?(t=ss(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function hs(e){return ds.apply(this,arguments)}function ds(){return(ds=_(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(t.isDirectory?ms:function(){return gs.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ms(e){var t=e.createReader();return new Promise(function(o,i){var a=[];!function r(){t.readEntries((()=>{var t=_(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=13;break}return e.prev=1,e.next=4,Promise.all(a);case 4:n=e.sent,o(n),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),i(e.t0);case 11:e.next=16;break;case 13:n=Promise.all(t.map(hs)),a.push(n),r();case 16:case"end":return e.stop()}},e,null,[[1,8]])}));return function(e){return t.apply(this,arguments)}})(),function(e){i(e)})}()})}function gs(){return(gs=_(regeneratorRuntime.mark(function e(r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(t,n){r.file(function(e){e=ss(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ys(e){function t(){N&&setTimeout(function(){var e;!D.current||(e=D.current.files)&&e.length||(P({type:"closeDialog"}),"function"==typeof E&&E())},300)}function n(e){e.target instanceof HTMLDivElement&&k.current&&k.current.contains(e.target)||(e.preventDefault(),A.current=[])}function a(e){return f?null:e}var r,o,i,s,l,c,u,p=e.accept,f=e.disabled,h=e.maxSize,d=e.minSize,m=e.multiple,g=e.onDragEnter,y=e.onDragLeave,v=e.onDragOver,b=e.onDrop,_=e.onDropAccepted,S=e.onDropRejected,E=e.onFileDialogCancel,w=e.getFilesFromEvent,x=e.preventDropOnDocument,C=e.validator,k=Object(Se.useRef)(null),D=Object(Se.useRef)(null),O=(e=Ce(Object(Se.useReducer)(Va,ws),2))[0],P=e[1],e=O.isFocused,N=O.isFileDialogActive,T=O.draggedFiles,L=Object(Se.useCallback)(function(){D.current&&(P({type:"openDialog"}),D.current.value="",D.current.click())},[P]),j=(Object(Se.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[D,N,E]),Object(Se.useCallback)(function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[k,D])),B=Object(Se.useCallback)(function(){P({type:"focus"})},[]),M=Object(Se.useCallback)(function(){P({type:"blur"})},[]),A=Object(Se.useRef)([]),z=(Object(Se.useEffect)(function(){return x&&(document.addEventListener("dragover",Ba,!1),document.addEventListener("drop",n,!1)),function(){x&&(document.removeEventListener("dragover",Ba),document.removeEventListener("drop",n))}},[k,x]),Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),A.current=[].concat(ke(A.current),[t.target]),ja(t)&&Promise.resolve(w(t)).then(function(e){Za(t)||(P({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),g&&g(t))})},[w,g])),V=Object(Se.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return ja(e)&&v&&v(e),!1},[v]),H=Object(Se.useCallback)(function(e){e.preventDefault(),e.persist();var t=A.current.filter(function(e){return k.current&&k.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(A.current=t).length||(P({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ja(e)&&y&&y(e))},[k,y]),I=Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),A.current=[],ja(t)&&Promise.resolve(w(t)).then(function(e){var a,s;Za(t)||(a=[],s=[],e.forEach(function(e){var t=Ce(ns(e,p),2),n=t[0],t=t[1],r=Ce(rs(e,d,h),2),o=r[0],r=r[1],i=C?C(e):null;n&&o&&!i?a.push(e):(n=[t,r],o=(n=i?n.concat(i):n).filter(function(e){return e}),s.push({file:e,errors:o}))}),P({acceptedFiles:a,fileRejections:s,type:"setFiles"}),b&&b(t,a,s),0<s.length&&S&&S(t,s),0<a.length&&_&&_(t,a))}),P({type:"reset"})},[m,p,d,h,w,b,_,S]),j=Object(Se.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=e.onDragEnterCallback,r=e.onDragOverCallback,o=e.onDragLeaveCallback,i=e.onDropCallback,e=U(e,Ss);return Ee(we({onDragEnter:a(za(n,z)),onDragOver:a(za(r,V)),onDragLeave:a(za(o,H)),onDrop:a(za(i,I))},t,k),e)}},[k,j,B,M,z,V,H,I,f]),K=Object(Se.useCallback)(function(e){e.stopPropagation()},[]),B=Object(Se.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=e.onChange,r=e.onClick,e=U(e,Es);return Ee(Ee({},we({accept:p,multiple:m,type:"file",style:{display:"none"},onChange:a(za(n,I)),onClick:a(za(r,K)),autoComplete:"off",tabIndex:-1},t,D)),e)}},[D,p,m,I,f]),R=0<(M=T.length)&&(F=(R={accept:p,minSize:d,maxSize:h,multiple:m,files:T}).files,r=R.accept,o=R.minSize,i=R.maxSize,!(!R.multiple&&1<F.length))&&F.every(function(e){var t=Ce(ns(e,r),1)[0],e=Ce(rs(e,o,i),1)[0];return t&&e}),F=0<M&&!R,M=F?(s=(M={accept:p,minSize:d,maxSize:h,multiple:m,files:T}).files,l=M.accept,c=M.minSize,u=M.maxSize,!M.multiple&&1<s.length?"TOO_MANY_FILES":(M=s.every(function(e){return!Ce(ns(e,l),1)[0]}),s=s.every(function(e){return!Ce(rs(e,c,u),1)[0]}),M?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return Ee(Ee({},O),{},{isDragAccept:R,isDragReject:F,getRootProps:j,getInputProps:B,rootRef:k,inputRef:D,draggedFiles:T,fileError:M,isFocused:e&&!f,open:a(L)})}function vs(e){var t=e.accept,n=e.multiple,r=e.uploadButtonLabel,o=e.disabled,i=e.name,a=e.className,s=e.id,l=e.onChange,e=Oe(e),a=De(we({},"FileUploaderButton",!0),a);return Se.createElement("div",xe({},e,{className:a}),Se.createElement(Pe,{type:"button",disabled:o,icon:"backup"},r),Se.createElement("input",{name:i,id:s,"data-test":"DesignSystem-FileUploaderButton--Input",accept:t&&t.join(", "),multiple:n,disabled:o,type:"file",tabIndex:-1,className:"FileUploaderButton-input",onChange:function(e){var t=e.target.files?Array.from(e.target.files):[];l&&l(t,e)}}))}function bs(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=ke(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(ke(r.slice(0,o)),ke(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function _s(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Ss=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Es=["refKey","onChange","onClick"],ws={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]},xs=(ys.displayName="DropzoneBase",ys.defaultProps={disabled:!1,getFilesFromEvent:function(e){return as.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}},Ee(Ee({},ys.defaultProps),{},{type:"standard"}),vs.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},vs.displayName="FileUploaderButton",Object.assign({},vs.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"}),function(e,t,n){var r=e.updateColumnSchema,o=null==n?void 0:n.getBoundingClientRect().x;function i(e){e.preventDefault(),o&&r(t,{width:e.pageX-o})}window.addEventListener("mousemove",i),window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",i)})});function Cs(e,t){var n,r=e.ref,e=e.withCheckbox;return"string"==typeof t&&"%"===t.slice(-1)?(n=r.querySelector(".Grid-cell--checkbox"),e=e?(null==n?void 0:n.clientWidth)||28:0,(r.clientWidth-e)*(+t.slice(0,-1)/100)):t}function ks(e,t,n,r){var o,i=ke(e),a=O(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=Ee(Ee({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function Ds(e,t){var n=Ee({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?Ee(Ee({},n[e.name]),t):t),null!==n[e.name]&&"object"===Z(n[e.name])||(n[e.name]={title:n[e.name]}),n}function Os(e,t){return Math.ceil(e/t)}function Ps(e,t,n){var r;return!n&&(n=e.filter(function(e){return e.disabled&&t||!e.disabled})).length?(e=n.some(function(e){return!e._selected}),r=n.every(function(e){return!e._selected}),{indeterminate:n=0<=n.length&&e&&!r,checked:!n&&!r}):{indeterminate:!1,checked:!1}}function Ts(e){var t=Se.useContext(Gs),n=e.isHead,r=e.firstCell,o=e.schema,i=e.data,a=e.rowIndex,s=e.colIndex,l=e.expandedState,c=e.onSelectAll,u=e.onMenuChange,p=e.onFilterChange,f=e.updateColumnSchema,h=e.reorderColumn,e=e.nestedRowData,d=t.draggable,m=t.separator,g=t.nestedRows,y=t.ref,t=t.withCheckbox,v=o.name,b=o.hidden,_=o.pinned,S=(w={AVATAR:{minWidth:48},AVATAR_WITH_TEXT:{width:256},AVATAR_WITH_META_LIST:{width:256},ICON:{minWdth:48},STATUS_HINT:{width:96},WITH_META_LIST:{width:176},DEFAULT:{width:176}}[void 0===(w=o.cellType)?"DEFAULT":w]).width,E=void 0===(E=w.minWidth)?96:E,w=void 0===(w=w.maxWidth)?800:w,x=(k=Ce(Se.useState(!1),2))[0],C=k[1],k=De({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":x&&d,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:m),"Grid-cell--nestedRow":!n&&0===s&&g});return b?null:Se.createElement("div",{key:"".concat(a,"-").concat(s),className:k,draggable:n&&d,onDragStart:function(e){d&&(C(!0),e.dataTransfer.setData("name",v),_)&&e.dataTransfer.setData("type",_)},onDrag:function(){C(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){C(!1)},onDragEnd:function(e){e.preventDefault(),C(!1)},onDrop:function(e){var t;d&&(C(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:v,type:_||""}).type)&&h&&h(e.name,t.name)},style:{width:Cs({ref:y,withCheckbox:t},o.width||S),minWidth:Cs({ref:y,withCheckbox:t},o.minWidth||E),maxWidth:Cs({ref:y,withCheckbox:t},o.maxWidth||w)}},n?Se.createElement(Ys,{colIndex:s,schema:o,onSelectAll:c,onMenuChange:u,onFilterChange:p,updateColumnSchema:f,reorderColumn:h,setIsDragged:C}):Se.createElement($s,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:l,nestedRowData:e}))}function Ms(e){function t(e,t,r){var n;return e.length?(n=De((we(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),we(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n},t&&c?Se.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},u?Se.createElement(q,null):Se.createElement(ft,xe({},p,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:f.length+t;return"right"===r&&(n+=h.length),Se.createElement(Ts,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:l})}))):null}var n=Se.useContext(Gs),r=e.schema,o=e.onSelectAll,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,l=e.reorderColumn,c=n.withCheckbox,u=n.loading,p=n.selectAll,f=(e=r.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),n=e.filter(function(e){return!e.hidden&&"right"===e.pinned}),h=r.filter(function(e){return!e.hidden&&!e.pinned});return Se.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},Se.createElement("div",{className:"Grid-row Grid-row--head"},t(f,!!f.length,"left"),t(h,!f.length&&!!h.length),t(n,!1,"right")))}function As(e){function t(e,t,r){var n;return e.length?(n=De((we(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),we(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&l?Se.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},s?Se.createElement(q,null):Se.createElement(ft,{checked:!!p._selected,onChange:function(e){h(f,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:b.length+t;return"right"===r&&(n+=S.length),Se.createElement(Ts,{key:"".concat(f,"-").concat(n),rowIndex:f,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[m,g],nestedRowData:E})}))):null}var n,r,o,i=(c=Se.useContext(Gs)).type,a=c.onRowClick,s=c.loading,l=c.withCheckbox,c=c.nestedRows,u=e.schema,p=e.data,f=e.rowIndex,h=e.onSelect,e=e.className,d=Se.useRef(null),m=(y=Ce(Se.useState(!1),2))[0],g=y[1],y=De("Grid-row","Grid-row--body",{"Grid-row--selected":p._selected,"Grid-row--disabled":p.disabled}),v=Se.useCallback(function(){"resource"!==i||s||a&&a(p,f)},[p,f]),b=(_=u.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),_=_.filter(function(e){return!e.hidden&&"right"===e.pinned}),S=u.filter(function(e){return!e.hidden&&!e.pinned}),E=(u={data:p,rowIndex:f,expanded:m},n=Se.useContext(Gs),r=n.schema,w=n.nestedRowRenderer,o=u.data,w?w({data:o,schema:r,loading:n.loading,rowIndex:u.rowIndex,expanded:u.expanded}):null),w=De(e,{"Grid-rowWrapper":!0});return Se.createElement("div",{className:w},Se.createElement("div",{"data-test":"DesignSystem-Grid-row",className:y,onClick:v,ref:d},t(b,!!b.length,"left"),t(S,!b.length&&!!S.length),t(_,!1,"right")),c&&m&&Se.createElement("div",{className:"Grid-nestedRow"},E))}function Is(e){var n,t,r,o,i=Se.useContext(Gs),a=i.data,s=i.ref,l=i.loading,c=i.withPagination,u=i.page,p=i.pageSize,f=i.totalRecords,h=i.errorTemplate;return!l&&i.error?h?"function"==typeof h?h({}):h:null:(n=e.schema,t=e.prevPageInfo,r=e.updatePrevPageInfo,o=e.onSelect,Se.useEffect(function(){var e=s.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){t.page===u&&(e.scrollTop=t.scrollTop)}),function(){e&&r({page:u,scrollTop:e.scrollTop})}},[]),i=Math.ceil(f/p),h=c&&u===i?f-(u-1)*p:l?p:c?Math.min(f,p):f,Se.createElement("div",{className:"Grid-body"},(l&&!a.length?ke(Array(h).map(function(e){return e})):a).map(function(e,t){return t=t,e=e,Se.createElement(As,{key:t,rowIndex:t,data:e||a[t],schema:n,onSelect:o})})))}function Rs(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?Se.createElement(M,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},Se.createElement(Te,{className:"w-100 ellipsis"},e)):Se.createElement(Te,{className:"w-100 ellipsis"},e):null}function Fs(e){return(e=e.cellData.metaList)?Se.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return Se.createElement(Te,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function Ns(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?Se.createElement(ue,{className:"mr-5",firstName:t,lastName:n}):e?Se.createElement(ue,{className:"mr-5"},e):null}function Ls(e){var t=(e=e.cellData).title;return(e=e.icon||t)?Se.createElement(R,{name:e}):null}function js(e){var t=(e=e.cellData).statusAppearance;return(e=e.title)?Se.createElement(Jn,{appearance:t},e):null}function Bs(e){var t=e.options,n=e.onChange,r=(e=Ce(Se.useState(!1),2))[0],o=e[1],i=(e=Ce(Se.useState(t),2))[0],a=e[1],s=(e=Ce(Se.useState("var(--spacing-8)"),2))[0],l=e[1];return Se.useEffect(function(){a(t)},[r]),Se.createElement("div",{className:"Dropdown"},Se.createElement(Ua,{open:r,onToggle:function(e){o(e)},trigger:Se.createElement(Pe,{type:"button",ref:function(e){l("".concat(null==e?void 0:e.clientWidth,"px"))},size:"tiny",appearance:"transparent",icon:"keyboard_arrow_down_filled",iconAlign:"right"},"Showing ".concat(t.filter(function(e){return e.selected}).length," of ").concat(t.length," column").concat(Ws(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},Se.createElement("div",{className:"Dropdown-wrapper"},Se.createElement("div",{className:"OptionWrapper"},Se.createElement(ft,{className:"OptionCheckbox",label:"Select All",checked:i.every(function(e){return e.selected}),indeterminate:i.some(function(e){return e.selected})&&i.some(function(e){return!e.selected}),onChange:function(t){a(i.map(function(e){return Ee(Ee({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return Se.createElement("div",{"data-test":"DesignSystem-Table-Header--draggableDropdownOption",key:e.value,className:"OptionWrapper d-flex flex-space-between align-items-center cursor-pointer",draggable:!0,onDragStart:function(e){e.dataTransfer.setData("index","".concat(r))},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){e=+e.dataTransfer.getData("index");e!==r&&a(Ks(i,e,r))}},Se.createElement(ft,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=ke(i))[t]=Ee(Ee({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),Se.createElement(R,{name:"drag_handle",className:"mr-4"}))})),Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Pe,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),Se.createElement(Pe,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function zs(e){var t=e.loading,n=e.error,r=e.data,o=e.displayData,i=e.schema,a=e.withSearch,s=e.showHead,l=e.withPagination,c=e.page,u=e.pageSize,p=e.withCheckbox,f=e.children,h=e.updateSchema,d=void 0===(g=e.filterList)?{}:g,m=e.updateFilterList,g=void 0===(g=e.totalRecords)?0:g,y=e.onSelectAll,v=e.searchPlaceholder,b=e.selectAll,N=e.searchTerm,_=e.updateSearchTerm,S=e.globalActionRenderer,L=e.dynamicColumn,j=e.allowSelectAll,B=e.showFilters,E=e.customSelectionLabel,w=e.selectedRowsRef,x=e.selectedAllRef,z=e.onClearSelection,V=e.onSelectAllRows,C=e.selectionActionRenderer,e=e.uniqueColumnName,k=(D=Ce(Se.useState(!1),2))[0],H=D[1],K=(D=Ce(Se.useState(!0),2))[0],U=D[1],D=E||"item",E=r.filter(function(e){return e._selected}).length,r=(c-1)*u+1,c=Math.min(c*u,g),u=!0===(null==x?void 0:x.current)?g:(null==w||null==(u=w.current)?void 0:u.length)||0,O=p&&(E||0<u),P=(F=Ce(Se.useState(!0),2))[0],T=F[1],M=(F=Ce(Se.useState(!1),2))[0],A=F[1],I=(F=Ce(Se.useState(!1),2))[0],R=F[1],F=(Se.useEffect(function(){O?(R(!0),A(!1)):(R(!1),A(!0))},[O]),De({"Table-Header-Label--hide":I&&O,"Table-Header-Label--show":I&&!O})),I=De({"Table-Header-Label--hide":M&&!O,"Table-Header-Label--show":M&&O}),M=(Se.useEffect(function(){U(!K)},[i]),Se.useEffect(function(){b&&b.checked&&y&&y(!0,k)},[k]),Se.useEffect(function(){b&&!b.checked&&H(!1)},[b]),i.filter(function(e){return e.filters})),W=i.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}});return Se.createElement("div",{className:"Header"},Se.createElement("div",{className:"Header-content Header-content--top"},Se.createElement("div",{className:"d-flex w-100"},a&&Se.createElement("div",{className:"Header-search"},Se.createElement(Tn,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:v,onChange:function(e){e=e.target.value;_&&_(e)},value:N,onClear:function(){return _&&_("")},disabled:t&&!Us(i),autoComplete:"off"})),B&&0<M.length&&Se.createElement("div",{className:"Header-dropdown"},Se.createElement("div",{className:"Header-filters"},M.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return Ee(Ee({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return Se.createElement(wn,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=Ee(Ee({},d),{},we({},t,e)),m&&m(t)}})}))),f&&Se.createElement("div",{className:"Header-actions"},f)),S&&Se.createElement("div",{className:"Header-global-actions"},S(o))),Se.createElement("div",{className:"Header-content Header-content--bottom"},Se.createElement("div",{className:"Header-label"},!s&&p&&!t&&Se.createElement(ft,xe({},b,{onChange:function(e){y&&y(e.target.checked)}})),t?Se.createElement(q,{withImage:!s&&p},Se.createElement(G,{length:"small",size:"s"})):Se.createElement(Se.Fragment,null,P?Se.createElement("span",{className:I,onAnimationEnd:function(){T(!!O),A(!1),R(!0)}},Se.createElement(Ln,null,0<u&&e&&p?"Selected ".concat(u," ").concat(D).concat(Ws(u)):E&&!e&&p?"Selected ".concat(E," ").concat(D).concat(Ws(E)):(l?"Showing ".concat(r,"-").concat(c," of "):"Showing ").concat(g," ").concat(D).concat(Ws(g)))):Se.createElement("span",{className:F,onAnimationEnd:function(){T(!!O),A(!0),R(!1)}},Se.createElement(Ln,null,n?"Showing 0 ".concat(D,"s"):(l?"Showing ".concat(r,"-").concat(c," of "):"Showing ").concat(g," ").concat(D).concat(Ws(g)))),0<u&&j&&P&&Se.createElement("div",{className:I},Se.createElement("div",{className:"ml-4 d-flex"},Se.createElement(Pe,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",disabled:u===g,onClick:V},"Select ".concat(g," ").concat(D,"s")),Se.createElement(Pe,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",className:"ml-4",onClick:z},"Clear Selection"),C&&Se.createElement(rl,{vertical:!0,className:"mx-4 Table-Header--Divider"}))),C&&0<u&&P&&Se.createElement("div",{"data-test":"DesignSystem-Table-Header--ActionRenderer",className:I},C(null==w?void 0:w.current,null==x?void 0:x.current)))),L&&Se.createElement("div",{className:"Header-hideColumns"},Se.createElement(Bs,{options:W,onChange:function(e){e=e.map(function(t){return Ee(Ee({},i.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});h&&h(e)}}))))}function Vs(e,t,n,r,o){return e.map(function(e){return o||e._selected&&!r||n&&e[n]&&t&&Xs(t,n,e[n])&&!r?e._selected=!0:e._selected=!1,e})}function Hs(e,t){return t?Qs(e,t):e}var Ks=function(e,t,n){return t===n?e:t<n?[].concat(ke(e.slice(0,t)),ke(e.slice(t+1,n+1)),[e[t]],ke(e.slice(n+1))):[].concat(ke(e.slice(0,n)),[e[t]],ke(e.slice(n,t)),ke(e.slice(t+1)))},Us=function(e){return e&&!!e.length},Ws=function(e){return 1<e?"s":""},o={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},Gs=Se.createContext(Ee(Ee({},o),{},{ref:null})),qs=Gs.Provider,Ys=function(e){function t(){return Se.createElement(Se.Fragment,null,Se.createElement(Te,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),g&&Se.createElement("div",{className:"Grid-sortingIcons"},_?"asc"===_?Se.createElement(R,{name:"arrow_upward"}):Se.createElement(R,{name:"arrow_downward"}):Se.createElement(R,{name:"unfold_more"})))}var n=Se.useContext(Gs),r=e.schema,o=e.setIsDragged,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,e={schema:r,colIndex:e.colIndex,onSelectAll:e.onSelectAll,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:e.reorderColumn,setIsDragged:o},l=n.loading,c=n.draggable,u=n.showMenu,p=n.sortingList,f=n.filterList,h=n.headCellTooltip,d=n.showFilters,m=r.sorting,g=void 0===m||m,y=r.name,m=r.filters,v=r.pinned,n=Us(n.schema),b=p.findIndex(function(e){return e.name===y}),_=-1!==b?p[b].type:null,S=Se.createRef(),p=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],b=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],E={label:"Unpin",value:"unpin",icon:"replay"},E=("left"===v&&(b[0]=E),"right"===v&&(b[1]=E),{label:"Unsort",value:"unsort",icon:"unfold_more"}),E=("asc"===_&&(p[0]=E),"desc"===_&&(p[1]=E),[].concat(b,[{label:"Hide Column",value:"hide",icon:"cancel"}])),b=(g&&(E=[].concat(p,ke(E))),De({"Grid-headCell":!0,"Grid-headCell--draggable":c})),p=m?m.map(function(t){return Ee(Ee({},t),{},{selected:f[y]&&-1!==f[y].findIndex(function(e){return e===t.value})})}):[];return Se.createElement("div",{key:y,className:b,ref:S},Se.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&g&&("asc"===_&&i(y,"sortDesc"),"desc"===_&&i(y,"unsort"),_||i(y,"sortAsc"))}},l&&!n?Se.createElement(q,{withImage:!1},Se.createElement(G,{length:"medium"})):!r.headerCellRenderer&&h?Se.createElement(M,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!h?r.headerCellRenderer(e):t()),d&&m&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",null,Se.createElement(q,null)):Se.createElement("div",null,Se.createElement(wn,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return Se.createElement(Pe,{icon:"filter_list",appearance:"transparent"})}},options:p,align:"left",onChange:function(e){return a(y,e)},minWidth:176}))),u&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",{className:"ml-4"},Se.createElement(q,null)):Se.createElement("div",null,Se.createElement(wn,{key:"".concat(y,"-").concat(_,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return Se.createElement(Pe,{icon:"more_vert_filled",appearance:"transparent"})}},options:E,align:"left",onChange:function(e){return i(y,e)},minWidth:176}))),r.resizable&&Se.createElement("span",{className:"Grid-cellResize",onMouseDown:function(){xs({updateColumnSchema:s},y,S.current),o(!1)}}))},$s=function(e){var t=Se.useContext(Gs),n=e.data,r=e.schema,o=e.rowIndex,i=e.colIndex,a=e.nestedRowData,s=t.size,l=t.loading,t=t.nestedRows,e=Ce(e.expandedState,2),c=e[0],u=e[1],e={rowIndex:o,colIndex:i,size:s,schema:r,data:n,loading:l,expanded:c};return Se.createElement("div",{className:"Grid-cellContent"},0===i&&t&&Se.createElement(Se.Fragment,null,a?Se.createElement(R,{className:"Grid-nestedRowTrigger",name:c?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){a&&(e.stopPropagation(),u(!c))}}):Se.createElement("span",{className:"Grid-nestedRowPlaceholder"})),r.cellRenderer?r.cellRenderer(e):Se.createElement(Zs,xe({key:"".concat(o,"-").concat(i)},e)))},Js=(As.defaultProps={data:{}},(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var i;h(this,n),we(Y(i=t.call(this,e)),"gridRef",null),we(Y(i),"isHeadSyncing",!1),we(Y(i),"isBodySyncing",!1),we(Y(i),"syncScroll",function(n){return function(){var e=i.gridRef.querySelector(".Grid-head"),t=i.gridRef.querySelector(".Grid-body");"head"===n&&(i.isHeadSyncing||(i.isBodySyncing=!0,t.scrollLeft=e.scrollLeft),i.isHeadSyncing=!1),"body"===n&&(i.isBodySyncing||(i.isHeadSyncing=!0,e.scrollLeft=t.scrollLeft),i.isBodySyncing=!1)}}),we(Y(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),we(Y(i),"updateColumnSchema",function(t,e){var n=ke(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=Ee(Ee({},n[r]),e),i.updateRenderedSchema(n)}),we(Y(i),"reorderColumn",function(t,n){var e=i.props.schema,r=e.findIndex(function(e){return e.name===t}),o=e.findIndex(function(e){return e.name===n}),e=Ks(e,r,o);i.updateRenderedSchema(e)}),we(Y(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),we(Y(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),we(Y(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":bs({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":bs({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":bs({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":_s({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":_s({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":_s({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),we(Y(i),"onFilterChange",function(e,t){e=Ee(Ee({},i.props.filterList),{},we({},e,t));i.updateFilterList(e)}),we(Y(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),we(Y(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked,void 0,!0)}),we(Y(i),"updatePrevPageInfo",function(e){i.setState({prevPageInfo:e})});return i.state={init:!1,prevPageInfo:{page:1,scrollTop:0}},i}return a(n,[{key:"componentDidMount",value:function(){this.setState({init:!0}),window.addEventListener("resize",this.forceRerender.bind(this))}},{key:"forceRerender",value:function(){this.forceUpdate()}},{key:"componentWillUnmount",value:function(){this.removeScrollListeners(),window.removeEventListener("resize",this.forceRerender.bind(this))}},{key:"componentDidUpdate",value:function(e,t){t.init!==this.state.init&&this.addScrollListeners(),e.page===this.props.page&&e.error===this.props.error||(this.removeScrollListeners(),this.addScrollListeners())}},{key:"addScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.addEventListener("scroll",this.syncScroll("head")),t.addEventListener("scroll",this.syncScroll("body")))}},{key:"removeScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.removeEventListener("scroll",this.syncScroll("head")),t.removeEventListener("scroll",this.syncScroll("body")))}},{key:"render",value:function(){var t=this,e=Oe(this.props),n=this.state,r=n.init,n=n.prevPageInfo,o=this.props,i=o.type,a=o.size,s=o.showHead,l=o.className,c=o.page,u=(p=this.props.schema,u=o.loading,o=o.loaderSchema,p=!Us(p=p)&&u?o:p),p=De((we(o={Grid:"true"},"Grid--".concat(i),i),we(o,"Grid--".concat(a),a),o),l);return Se.createElement("div",xe({className:p},e,{ref:function(e){t.gridRef=e}}),r&&Se.createElement(qs,{value:Ee(Ee({},this.props),{},{ref:this.gridRef})},s&&Se.createElement(Ms,{schema:u,onSelectAll:null==(i=this.onSelectAll)?void 0:i.bind(this),onMenuChange:this.onMenuChange.bind(this),onFilterChange:this.onFilterChange.bind(this),updateColumnSchema:this.updateColumnSchema.bind(this),reorderColumn:this.reorderColumn.bind(this)}),Se.createElement(Is,{key:"".concat(c),schema:u,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n})()),Zs=(we(Js,"defaultProps",void 0),Js.defaultProps=o,function(e){var t=e.size,n=e.schema,r=e.loading,e=r?{}:Ds(n,e.data),o=n.name,i=n.cellType,i=void 0===i?"DEFAULT":i,a=n.align,s=void 0===a?"left":a,l=n.tooltip,c=e[o],u=De(we({},"GridCell",!0));switch(i){case"DEFAULT":return Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--default")},r?Se.createElement(G,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):Rs({tooltip:l,cellData:c}));case"WITH_META_LIST":return Se.createElement("div",{className:"".concat(u," GridCell--metaList")},r?Se.createElement(Se.Fragment,null,Se.createElement(G,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),Se.createElement(G,{length:"large",size:"xxs"})):Se.createElement(Se.Fragment,null,Rs({tooltip:l,cellData:c}),Fs({cellData:c})));case"AVATAR":return r?Se.createElement(q,{className:"GridCell--align-".concat(s),imageSize:"medium",round:!0}):Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==t&&Ns({cellData:c}));case"AVATAR_WITH_TEXT":return r?Se.createElement(q,{imageSize:"medium",round:!0},Se.createElement(G,{className:"ml-3",length:"medium"})):Se.createElement("div",{className:"".concat(u," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==t&&Ns({cellData:c}),Rs({tooltip:l,cellData:c}));case"AVATAR_WITH_META_LIST":return r?Se.createElement(q,{imageSize:"medium",round:!0},Se.createElement(G,{className:"ml-3",length:"medium"}),Se.createElement(G,{className:"ml-3",length:"large"})):Se.createElement("div",{className:"".concat(u," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==t&&Ns({cellData:c}),Se.createElement("div",{className:"GridCell-metaListWrapper"},Rs({tooltip:l,cellData:c}),Fs({cellData:c})));case"ICON":return r?Se.createElement(q,{className:"GridCell--align-".concat(s),imageSize:"small",round:!0}):Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--icon"),"data-test":"DesignSystem-GridCell-icon"},Ls({cellData:c}));case"STATUS_HINT":return Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--statusHint")},r?Se.createElement(q,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},Se.createElement(G,{length:"large"})):js({cellData:c}))}return null}),Xs=(Zs.displayName="GridCell",function(e,t,n){return 0<(null==e?void 0:e.filter(function(e){return e[t]===n})).length}),Qs=function(e,t){var n=new Set;return e.filter(function(e){e=e[t];return!n.has(e)&&(n.add(e),!0)})},el=["children"],n={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],displayData:[],schema:[],loading:!(zs.defaultProps={schema:[],data:[],searchPlaceholder:"Search",dynamicColumn:!0,showFilters:!0}),error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,pageJumpDebounceDuration:750,errorTemplate:function(e){e=e.errorType;return Se.createElement(kn,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},c=(()=>{e(o,Se["Component"]);var r=d(o);function o(e){h(this,o),we(Y(p=r.call(this,e)),"debounceUpdate",void 0),we(Y(p),"selectedRowsRef",Se.createRef()),we(Y(p),"clearSelectionRef",Se.createRef()),we(Y(p),"selectAllRef",Se.createRef()),we(Y(p),"updateData",function(e){p.state.async&&p.setState({loading:!0}),e?p.debounceUpdate():p.updateDataFn()}),we(Y(p),"updateDataFn",function(){var e=p.props,t=e.fetchData,n=e.pageSize,r=e.withPagination,o=e.data,i=e.onSearch,a=e.uniqueColumnName,e=p.state,s=e.async,l=e.page,c=e.sortingList,u=e.filterList,e=e.searchTerm,e=(p.onSelect(-1,!1),{page:l,pageSize:n,sortingList:c,filterList:u,searchTerm:e});p.props.withPagination||(delete e.page,delete e.pageSize),s?t&&t(e).then(function(e){var t,n,r,o;e.searchTerm&&(e.searchTerm,e.searchTerm!==p.state.searchTerm)||(t=e.data,n=JSON.parse(JSON.stringify(t)),r=(p.state.schema.length?p.state:e).schema,o=t.filter(function(e){return e._selected}),p.clearSelectionRef.current?p.selectedRowsRef.current=[]:p.selectedRowsRef.current=p.selectedRowsRef.current?Hs([].concat(ke(p.selectedRowsRef.current),ke(o)),a):Hs(ke(o),a),o=Vs(n,p.selectedRowsRef.current,a,p.clearSelectionRef.current,p.selectAllRef.current),p.setState({data:o,displayData:t,schema:r,selectAll:Ps(o,p.props.selectDisabledRow,p.clearSelectionRef.current),totalRecords:e.count,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND"}))}).catch(function(){p.setState({loading:!1,error:!0,errorType:"FAILED_TO_FETCH"})}):(t=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=2<arguments.length?arguments[2]:void 0,a=e;return i&&Object.keys(i).forEach(function(t){var n=i[t],e=o.findIndex(function(e){return e.name===t}),r=o[e].onFilterChange;n.length&&r&&(a=a.filter(function(e){return r(e,n)}))}),a}(s=p.state.schema,o,u),i=(u=o=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],t=2<arguments.length?arguments[2]:void 0,i=ke(e);return null!=t&&t.forEach(function(n){var e,r=o.findIndex(function(e){return e.name===n.name});-1!==r&&(e=o[r].comparator,i.sort(void 0===e?function(e,t){e=Ds(o[r],e),t=Ds(o[r],t);return e[n.name].title.localeCompare(t[n.name].title)}:e),"desc"===n.type)&&i.reverse()}),i}(s,i&&void 0!==e.searchTerm?i(t,e.searchTerm):t,c)).length,r&&l&&n&&(u=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0,t=(t-1)*n;return e.slice(t,t+n)}(u,l,n)),e=p.state.schema.length?p.state.schema:s,t=u.filter(function(e){return e._selected}),c=JSON.parse(JSON.stringify(u)),p.clearSelectionRef.current?p.selectedRowsRef.current=[]:p.selectedRowsRef.current=p.selectedRowsRef.current?Hs([].concat(ke(p.selectedRowsRef.current),ke(t)),a):Hs(ke(t),a),r=Vs(c,p.selectedRowsRef.current,a,p.clearSelectionRef.current,p.selectAllRef.current),p.setState({totalRecords:i,error:!u.length,errorType:"NO_RECORDS_FOUND",selectAll:Ps(u,p.props.selectDisabledRow,p.clearSelectionRef.current),schema:e,displayData:o,data:r}))}),we(Y(p),"onSelect",function(e,t){var n,r,o,i=p.state.data,a=p.props,s=a.onSelect,l=a.uniqueColumnName;p.selectAllRef.current&&-1!==e&&!t?(p.selectAllRef.current=!1,p.selectedRowsRef.current=[],a=Array.from({length:i.length},function(e,t){return t}),r=ks(i,a,{_selected:!1},p.props.selectDisabledRow),p.setState({data:r,selectAll:{checked:!1,indeterminate:!1}}),s&&(p.props.uniqueColumnName?s(a,t,p.selectedRowsRef.current,p.selectAllRef.current):s(a,t,-1===e?[]:r.filter(function(e){return e._selected})))):(a=[e],n=i[e],r=-1===e?[]:[n],o=i,0<=e?(o=ks(i,a,{_selected:t},p.props.selectDisabledRow),p.resetClearSelection(),p.setState({data:o,selectAll:Ps(o,p.props.selectDisabledRow,p.clearSelectionRef.current)}),p.selectedRowsRef.current&&t&&(r=[Ee(Ee({},n),{},{_selected:t})].concat(ke(p.selectedRowsRef.current))),!t&&l&&(r=p.selectedRowsRef.current.filter(function(e){return e[l]!==n[l]})),p.selectedRowsRef.current=Hs(r,l)):-1===e&&p.selectedRowsRef.current&&(r=p.selectedRowsRef.current),s&&(p.props.uniqueColumnName?s(a,t,-1===e&&0===(null==(i=r)?void 0:i.length)?[]:p.selectedRowsRef.current,p.selectAllRef.current):s(a,t,-1===e?[]:o.filter(function(e){return e._selected}))))}),we(Y(p),"onSelectAll",function(e,t,n){var r=p.props,o=r.onSelect,i=r.uniqueColumnName,r=p.state.data,a=Array.from({length:r.length},function(e,t){return t}),s=ks(r,a,{_selected:e},p.props.selectDisabledRow),l=[],r=(s.forEach(function(e,t){e._selected&&l.push(t)}),[]);e?(p.resetClearSelection(),r=void 0===t?[].concat(ke(p.selectedRowsRef.current||[]),ke(s.filter(function(e){return e._selected}))):p.selectedRowsRef.current):!e&&n&&i?(p.selectAllRef.current=!1,p.selectedRowsRef.current=[].concat(ke(p.selectedRowsRef.current||[]),ke(s)),p.selectedRowsRef.current=p.selectedRowsRef.current.filter(function(t){return!s.some(function(e){return t[i]===e[i]})})):(p.selectedRowsRef.current=[],p.selectAllRef.current=!1),n&&!e||(p.selectedRowsRef.current=Hs(r,i)),o&&(p.props.uniqueColumnName?o(l,e,Hs(n&&!e?p.selectedRowsRef.current:r,i),p.selectAllRef.current):o(l,e,s.filter(function(e){return e._selected}),t)),p.setState({data:s,selectAll:Ps(s,p.props.selectDisabledRow)})}),we(Y(p),"onPageChange",function(e){p.setState({page:e})}),we(Y(p),"updateSchema",function(e){p.setState({schema:e})}),we(Y(p),"updateSortingList",function(e){var t=p.props.multipleSorting;p.setState({sortingList:t?ke(e):e.slice(-1),page:1})}),we(Y(p),"updateFilterList",function(e){p.setState({filterList:e,page:1})}),we(Y(p),"updateSearchTerm",function(e){p.setState({searchTerm:e,page:1})}),we(Y(p),"onClearSelection",function(){p.selectedRowsRef.current=[],p.clearSelectionRef.current=!0,p.selectAllRef.current=!1,p.onSelectAll(!1),p.setState({selectAll:Ps([],p.props.selectDisabledRow,p.clearSelectionRef.current)})}),we(Y(p),"resetClearSelection",function(){p.clearSelectionRef.current=!1}),we(Y(p),"onSelectAllRows",function(){p.selectAllRef.current=!!p.props.uniqueColumnName,p.onSelectAll(!0,!0)});var p,t="fetchData"in p.props,n=e.data||[];return p.state={async:t,data:t?[]:n,displayData:t?[]:n,schema:t?[]:e.schema||[],page:e.page,sortingList:e.sortingList,filterList:e.filterList,totalRecords:t?0:n.length,loading:t||e.loading,error:!t&&e.error,errorType:e.errorType,selectAll:Ps([]),searchTerm:void 0},p.debounceUpdate=rn(e.searchDebounceDuration,p.updateDataFn),p}return a(o,[{key:"componentDidMount",value:function(){this.updateData()}},{key:"componentDidUpdate",value:function(e,t){var n,r,o=this;this.state.async||(e.error!==this.props.error&&(r=(n=this.props).data,this.setState({data:r=void 0===r?[]:r,displayData:r,schema:void 0===(n=n.schema)?[]:n,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:r.length||0,selectAll:Ps([])})),e.loading!==this.props.loading&&(r=(n=this.props).data,this.setState({data:e=void 0===r?[]:r,displayData:e,schema:void 0===(r=n.schema)?[]:r,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:Ps([])},function(){o.updateData()}))),t.page!==this.state.page&&(n=this.props.onPageChange)&&n(this.state.page),t.page===this.state.page&&t.filterList===this.state.filterList&&t.sortingList===this.state.sortingList&&t.searchTerm===this.state.searchTerm||this.props.loading||(r=t.searchTerm!==this.state.searchTerm,this.updateData(r))}},{key:"render",value:function(){var e=this.props,t=e.showHead,n=e.type,r=e.size,o=e.headCellTooltip,i=e.separator,a=e.draggable,s=e.nestedRows,l=e.nestedRowRenderer,c=e.withHeader,u=e.headerOptions,p=e.withCheckbox,f=e.showMenu,h=e.withPagination,d=e.paginationType,m=e.pageSize,g=e.pageJumpDebounceDuration,y=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,_=e.className,S=e.filterPosition,e=e.uniqueColumnName,E=Oe(this.props),w=u.children,u=U(u,el),_=_?" ".concat(_):"",x=this.state.totalRecords,C=Os(x,m);return Se.createElement("div",xe({},E,{className:"Table".concat(_),"data-test":"DesignSystem-Table-wrapper"}),c&&Se.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},Se.createElement(zs,xe({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:p,withPagination:h,pageSize:m,showFilters:"HEADER"===S,selectedRowsRef:this.selectedRowsRef,onClearSelection:this.onClearSelection,onSelectAllRows:this.onSelectAllRows,selectedAllRef:this.selectAllRef,uniqueColumnName:e},u),w)),Se.createElement("div",{className:"Table-grid"},Se.createElement(Js,xe({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:p,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:f,showHead:t,type:n,size:r,headCellTooltip:o,separator:i,draggable:a,nestedRows:s,nestedRowRenderer:l,withPagination:h&&1<C,pageSize:m,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:y,showFilters:"GRID"===S}))),h&&!this.state.loading&&!this.state.error&&1<C&&Se.createElement("div",{className:"Table-pagination"},Se.createElement(Ra,{page:this.state.page,totalPages:Os(x,m),type:d,onPageChange:this.onPageChange,pageJumpDebounceDuration:g})))}}]),o})(),tl=(we(c,"defaultProps",n),Se.useState,Se.useEffect,Se.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),nl=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=Oe(e),n=De(we({},"InlineMessage",!0),n),i=De((we(i={},"InlineMessage-icon--warning","warning"===t),we(i,"InlineMessage-icon--small","small"===o),we(i,"InlineMessage-icon--regular","regular"===o),i)),a=De(we({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,l="small"===o?"medium":void 0;return Se.createElement("div",xe({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&Se.createElement(R,{"data-test":"DesignSystem-InlineMessage--Icon",name:tl[t],appearance:t,className:i,size:s}),Se.createElement(Te,{size:o,weight:l,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},rl=(nl.displayName="InlineMessage",nl.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t,n=e.vertical,r=e.appearance,o=e.className,e=Oe(e),n=De((we(t={},"Divider",!0),we(t,"Divider--horizontal",!n),we(t,"Divider--vertical",n),we(t,"Divider--basic",!n&&"header"!==r),we(t,"Divider--header",!n&&"header"===r),t),o);return Se.createElement("hr",xe({"data-test":"DesignSystem-Divider"},e,{className:n}))}),ol=(rl.displayName="Divider",rl.defaultProps={appearance:"basic",vertical:!1},function(e){var t=e.error,n=e.message,r=e.className,e=Oe(e),r=De({"mt-3":!0},r);return n?t?Se.createElement(nl,{size:"small",className:r,appearance:"alert",description:n}):Se.createElement("div",xe({},e,{className:r}),Se.createElement(Te,{appearance:"subtle",size:"small",weight:"medium"},n)):null}),il=(ol.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign","iconType"]),al={tiny:12,regular:16},r=Se.forwardRef(function(e,t){var n=e.children,r=e.type,o=e.className,i=e.disabled,a=e.tabIndex,s=e.icon,l=e.subtle,c=e.size,u=e.iconAlign,p=e.iconType,e=U(e,il),l=De((we(f={},"LinkButton",!0),we(f,"LinkButton--".concat(c),c),we(f,"LinkButton--default",!l),we(f,"LinkButton--subtle",l),we(f,"LinkButton--iconAlign-".concat(u),n&&u),we(f,"".concat(o),o),f)),f=De((we(o={},"LinkButton-icon",!0),we(o,"LinkButton-icon--".concat(u),n&&u),o));return Se.createElement("button",xe({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:l,disabled:i,tabIndex:a},e),Se.createElement(Se.Fragment,null,s&&Se.createElement("div",{className:f},Se.createElement(R,{"data-test":"DesignSystem-LinkButton--Icon",name:s,type:p,size:c&&al[c]})),n))});r.displayName="LinkButton",r.defaultProps={size:"regular",type:"button",iconAlign:"left"},new Map;function sl(e){var t=window.getComputedStyle(e);return Math.max(parseInt(t["margin-top"],10),parseInt(t["margin-bottom"],10))+e.getBoundingClientRect().height}function ll(e,t,n){t=1<arguments.length&&void 0!==t?t:0,n=2<arguments.length&&void 0!==n?n:0;e&&(null===t||null===n?e.style.removeProperty("transform"):e.style.transform="translate(".concat(n,"px, ").concat(t,"px)"))}function cl(e,t,n){e&&(e.style.transition="transform ".concat(t,"ms").concat(n?" ".concat(n):""))}function ul(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o=t,i=i||requestAnimationFrame(function(){i=null,r.apply(void 0,ke(o))})}var o,i=null;return e.cancel=function(){i&&cancelAnimationFrame(i)},e}function pl(t){var e=t.children,n=t.className,r=t.tagName,o=Oe(t),i=De({Listbox:!0},n),n=g.a.Children.toArray(e).map(function(e){return g.a.cloneElement(e,{parentProps:Ee({},t)})}),a=(e=Ce(g.a.useState(n),2))[0],s=e[1];return g.a.createElement(ml,{values:a,onChange:function(e){var t,n=e.oldIndex;n=n,e=e.newIndex,(t=(t=a).slice()).splice(e<0?t.length+e:e,0,t.splice(n,1)[0]),s(t)},renderItem:function(e){var t=e.value;return g.a.createElement("div",xe({},e.props,{className:"Listbox-item--draggable"}),t)},renderList:function(e){var t=e.children;return g.a.createElement(r,xe({"data-test":"DesignSystem-Listbox"},o,{className:i},e.props),t)}})}function fl(e){var t=e.target,n=yl(t),r=vl(t);switch(e.key){case"ArrowDown":e.preventDefault(),bl(n,"down");break;case"ArrowUp":e.preventDefault(),bl(r,"up")}}function hl(e){var t,n=e.children,r=e.className,o=e.disabled,i=e.selected,a=e.activated,e=e.tabIndex,s=(c=Se.useContext(Il)).size,l=c.type,c=c.draggable,s=De((we(t={"Listbox-item":!0},"Listbox-item--".concat(s),s),we(t,"Listbox-item--".concat(l),l),we(t,"Listbox-item--disabled",o),we(t,"Listbox-item--selected",i&&"option"===l),we(t,"Listbox-item--activated",a&&"resource"===l),t),r);return Se.createElement("div",{"data-disabled":o,"data-test":"DesignSystem-Listbox-ItemWrapper",tabIndex:c?-1:e||0,className:s,onKeyDown:fl,role:"tablist"},c&&Se.createElement(R,{size:16,appearance:"subtle",name:"drag_indicator",className:"Listbox-item--drag-icon","data-test":"DesignSystem-Listbox-DragIcon"}),n)}var dl=200,ml=(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var a;return h(this,n),we(Y(a=t.call(this,e)),"listRef",Se.createRef()),we(Y(a),"ghostRef",Se.createRef()),we(Y(a),"topOffsets",[]),we(Y(a),"itemTranslateOffsets",[]),we(Y(a),"initialYOffset",0),we(Y(a),"lastScroll",0),we(Y(a),"lastYOffset",0),we(Y(a),"lastListYOffset",0),we(Y(a),"dropTimeout",void 0),we(Y(a),"needle",-1),we(Y(a),"afterIndex",-2),we(Y(a),"state",{itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,scrollingSpeed:0,scrollWindow:!1}),we(Y(a),"schdOnMouseMove",void 0),we(Y(a),"schdOnTouchMove",void 0),we(Y(a),"schdOnEnd",void 0),we(Y(a),"doScrolling",function(){var e=a.state,t=e.scrollingSpeed,n=e.scrollWindow,r=a.listRef.current;window.requestAnimationFrame(function(){n?window.scrollTo(window.pageXOffset,window.pageYOffset+1.5*t):r.scrollTop+=t,0!==t&&a.doScrolling()})}),we(Y(a),"getChildren",function(){return a.listRef&&a.listRef.current?Array.from(a.listRef.current.children):[]}),we(Y(a),"calculateOffsets",function(){a.topOffsets=a.getChildren().map(function(e){return e.getBoundingClientRect().top}),a.itemTranslateOffsets=a.getChildren().map(sl)}),we(Y(a),"getTargetIndex",function(t){return a.getChildren().findIndex(function(e){return e===t.target||e.contains(t.target)})}),we(Y(a),"onMouseOrTouchStart",function(e){a.dropTimeout&&-1<a.state.itemDragged&&(window.clearTimeout(a.dropTimeout),a.finishDrop());var t,n,r,o=(o=e).touches&&o.touches.length||o.changedTouches&&o.changedTouches.length;(o||0===e.button)&&(t=a.getTargetIndex(e),n=a.getChildren()[t],null==(r=e.target)?void 0:r.classList.contains("Listbox-item--drag-icon"))&&(e.preventDefault(),o?(r={passive:!1},n.style.touchAction="none",document.addEventListener("touchend",a.schdOnEnd,r),document.addEventListener("touchmove",a.schdOnTouchMove,r),document.addEventListener("touchcancel",a.schdOnEnd,r)):(document.addEventListener("mousemove",a.schdOnMouseMove),document.addEventListener("mouseup",a.schdOnEnd),(r=a.getChildren()[a.state.itemDragged])&&r.style&&(r.style.touchAction="")),a.onStart(n,(o?e.touches[0]:e).clientX,(o?e.touches[0]:e).clientY,t))}),we(Y(a),"getYOffset",function(){var e=a.listRef.current?a.listRef.current.scrollTop:0;return window.pageYOffset+e}),we(Y(a),"onStart",function(e,t,n,r){-1<a.state.selectedItem&&(a.setState({selectedItem:-1}),a.needle=-1);var o=e.getBoundingClientRect(),e=window.getComputedStyle(e);a.calculateOffsets(),a.initialYOffset=a.getYOffset(),a.lastYOffset=window.pageYOffset,a.lastListYOffset=a.listRef.current.scrollTop,a.setState({itemDragged:r,targetX:o.left-parseInt(e["margin-left"],10),targetY:o.top-parseInt(e["margin-top"],10),targetHeight:o.height,targetWidth:o.width,initialX:t,initialY:n})}),we(Y(a),"onMouseMove",function(e){e.cancelable&&e.preventDefault(),a.onMove(e.clientX,e.clientY)}),we(Y(a),"onTouchMove",function(e){e.cancelable&&e.preventDefault(),a.onMove(e.touches[0].clientX,e.touches[0].clientY)}),we(Y(a),"onWheel",function(e){a.state.itemDragged<0||(a.lastScroll=a.listRef.current.scrollTop+=e.deltaY,a.moveOtherItems())}),we(Y(a),"onMove",function(e,t){if(-1===a.state.itemDragged)return null;ll(a.ghostRef.current,t-a.state.initialY,a.props.lockVertically?0:e-a.state.initialX),a.autoScrolling(t),a.moveOtherItems()}),we(Y(a),"moveOtherItems",function(){var e=a.ghostRef.current.getBoundingClientRect(),e=e.top+e.height/2,t=sl(a.getChildren()[a.state.itemDragged]),n=a.getYOffset();a.initialYOffset!==n&&(a.topOffsets=a.topOffsets.map(function(e){return e-(n-a.initialYOffset)}),a.initialYOffset=n),a.isDraggedItemOutOfBounds()&&a.props.removableByMove?a.afterIndex=a.topOffsets.length+1:a.afterIndex=((e,t)=>{for(var n,r=0,o=e.length-1;r<=o;){if(!e[(n=Math.floor((o+r)/2))+1]||e[n]<=t&&e[n+1]>=t)return n;e[n]<t&&e[n+1]<t?r=n+1:o=n-1}return-1})(a.topOffsets,e),a.animateItems(-1===a.afterIndex?0:a.afterIndex,a.state.itemDragged,t)}),we(Y(a),"autoScrolling",function(e){var t=a.listRef.current.getBoundingClientRect(),n=t.top,r=t.bottom,t=t.height,o=window.innerHeight||document.documentElement.clientHeight;o<r&&o-e<dl?a.setState({scrollingSpeed:Math.round((dl-(o-e))/10),scrollWindow:!0}):n<0&&e<dl?a.setState({scrollingSpeed:Math.round((dl-e)/-10),scrollWindow:!0}):(a.state.scrollWindow&&0!==a.state.scrollingSpeed&&a.setState({scrollingSpeed:0,scrollWindow:!1}),t+20<a.listRef.current.scrollHeight&&(o=0,e-n<dl?o=Math.round((dl-(e-n))/-10):r-e<dl&&(o=Math.round((dl-(r-e))/10)),a.state.scrollingSpeed!==o)&&a.setState({scrollingSpeed:o}))}),we(Y(a),"animateItems",function(n,r,o){var i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];a.getChildren().forEach(function(e,t){if(cl(e,a.props.transitionDuration),r===t&&i){if(r===n)return ll(e,null);ll(e,r<n?a.itemTranslateOffsets.slice(r+1,n+1).reduce(function(e,t){return e+t},0):-1*a.itemTranslateOffsets.slice(n,r).reduce(function(e,t){return e+t},0))}else ll(e,r<n&&r<t&&t<=n?-o:t<r&&n<r&&n<=t?o:null)})}),we(Y(a),"isDraggedItemOutOfBounds",function(){var e=a.getChildren()[a.state.itemDragged].getBoundingClientRect(),t=a.ghostRef.current.getBoundingClientRect();return Math.abs(e.left-t.left)>t.width?(-1===a.state.itemDraggedOutOfBounds&&a.setState({itemDraggedOutOfBounds:a.state.itemDragged}),!0):(-1<a.state.itemDraggedOutOfBounds&&a.setState({itemDraggedOutOfBounds:-1}),!1)}),we(Y(a),"onEnd",function(e){e.cancelable&&e.preventDefault(),document.removeEventListener("mousemove",a.schdOnMouseMove),document.removeEventListener("touchmove",a.schdOnTouchMove),document.removeEventListener("mouseup",a.schdOnEnd),document.removeEventListener("touchup",a.schdOnEnd),document.removeEventListener("touchcancel",a.schdOnEnd);e=a.props.removableByMove&&a.isDraggedItemOutOfBounds();!e&&0<a.props.transitionDuration&&-2!==a.afterIndex&&ul(function(){cl(a.ghostRef.current,a.props.transitionDuration,"cubic-bezier(0.2, 0, 0.38, 0.9)"),a.afterIndex<1&&0===a.state.itemDragged?ll(a.ghostRef.current,0,0):ll(a.ghostRef.current,-(window.pageYOffset-a.lastYOffset)-(a.listRef.current.scrollTop-a.lastListYOffset)+(a.state.itemDragged<a.afterIndex?a.itemTranslateOffsets.slice(a.state.itemDragged+1,a.afterIndex+1).reduce(function(e,t){return e+t},0):-1*a.itemTranslateOffsets.slice(a.afterIndex<0?0:a.afterIndex,a.state.itemDragged).reduce(function(e,t){return e+t},0)),0)})(),a.dropTimeout=window.setTimeout(a.finishDrop,e||-2===a.afterIndex?0:a.props.transitionDuration)}),we(Y(a),"finishDrop",function(){var e=a.props.removableByMove&&a.isDraggedItemOutOfBounds();(e||-2<a.afterIndex&&a.state.itemDragged!==a.afterIndex)&&a.props.onChange({oldIndex:a.state.itemDragged,newIndex:e?-1:Math.max(a.afterIndex,0),targetRect:a.ghostRef.current.getBoundingClientRect()}),a.getChildren().forEach(function(e){cl(e,0),ll(e,null),e.style.touchAction=""}),a.setState({itemDragged:-1,scrollingSpeed:0}),a.afterIndex=-2,0<a.lastScroll&&(a.listRef.current.scrollTop=a.lastScroll,a.lastScroll=0)}),we(Y(a),"onKeyDown",function(e){var t=a.state.selectedItem,n=a.getTargetIndex(e);-1===n||a.props.values[n]&&a.props.values[n].props.disabled||(" "===e.key&&(e.preventDefault(),t===n?(t!==a.needle&&(a.getChildren().forEach(function(e){cl(e,0),ll(e,null)}),a.props.onChange({oldIndex:t,newIndex:a.needle,targetRect:a.getChildren()[a.needle].getBoundingClientRect()}),a.getChildren()[a.needle].focus()),a.setState({selectedItem:-1}),a.needle=-1):(a.setState({selectedItem:n}),a.needle=n,a.calculateOffsets())),("ArrowDown"===e.key||"j"===e.key)&&-1<t&&a.needle<a.props.values.length-1&&(e.preventDefault(),n=sl(a.getChildren()[t]),a.needle++,a.animateItems(a.needle,t,n,!0)),("ArrowUp"===e.key||"k"===e.key)&&-1<t&&0<a.needle&&(e.preventDefault(),n=sl(a.getChildren()[t]),a.needle--,a.animateItems(a.needle,t,n,!0)),"Escape"===e.key&&-1<t&&(a.getChildren().forEach(function(e){cl(e,0),ll(e,null)}),a.setState({selectedItem:-1}),a.needle=-1),("Tab"===e.key||"Enter"===e.key)&&-1<t&&e.preventDefault())}),a.schdOnMouseMove=ul(a.onMouseMove),a.schdOnTouchMove=ul(a.onTouchMove),a.schdOnEnd=ul(a.onEnd),a}return a(n,[{key:"componentDidMount",value:function(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}},{key:"componentDidUpdate",value:function(e,t){t.scrollingSpeed!==this.state.scrollingSpeed&&0===t.scrollingSpeed&&this.doScrolling()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}},{key:"render",value:function(){var o=this,i={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},e=Ee(Ee({},i),{},{top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,backgroundColor:"#ffffff",listStyleType:"none",margin:0,position:"fixed",boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.16)"});return Se.createElement(Se.Fragment,null,this.props.renderList({children:this.props.values.map(function(e,t){var n=t===o.state.itemDragged,r=t===o.state.selectedItem,n={key:t,tabIndex:o.props.values[t]&&o.props.values[t].props.disabled?-1:0,onKeyDown:o.onKeyDown,style:Ee(Ee({},i),{},{visibility:n?"hidden":void 0,zIndex:r?5e3:0})};return o.props.renderItem({value:e,props:n,index:t,isDragged:!1,isSelected:r,isOutOfBounds:!1})}),isDragged:-1<this.state.itemDragged,props:{ref:this.listRef}}),-1<this.state.itemDragged&&v.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:e,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isOutOfBounds:-1<this.state.itemDraggedOutOfBounds}),document.body))}}]),n})(),gl=(we(ml,"defaultProps",{transitionDuration:240,lockVertically:!1,removableByMove:!1}),function(e){return e&&"true"===e.getAttribute("data-disabled")}),yl=function(e){return null==e||null==(e=e.parentNode)||null==(e=e.nextSibling)?void 0:e.firstChild},vl=function(e){return null==e||null==(e=e.parentNode)||null==(e=e.previousSibling)?void 0:e.firstChild},bl=function(e,t){for(var n=e;n;){if(!gl(n)){n.focus();break}n=("down"===t?yl:vl)(n)}},_l=(hl.displayName="ListBody",function(e,t){return t?"nestedList-open-".concat(e," 240ms cubic-bezier(0, 0, 0.38, 0.9)"):"nestedList-close-".concat(e," 160ms cubic-bezier(0.2, 0, 1, 0.9)")}),Sl=function(e){return null==(e=e.current)?void 0:e.scrollHeight},El=function(e,t){return"\n @keyframes nestedList-open-".concat(t," {\n from {\n height: 0px;\n }\n to {\n height: ").concat(Sl(e),"px;\n }\n }\n\n @keyframes nestedList-close-").concat(t," {\n from {\n height: ").concat(Sl(e),"px;\n }\n to {\n height: 0px;\n }\n }\n ")};function wl(e){var t,n,r=e.nestedBody,o=e.expanded,i=(t=o,n=Se.useRef(),Se.useEffect(function(){null!=t&&(n.current=t)},[t]),n.current),a=(e=Ce(Se.useState(o),2))[0],s=e[1],l=(e=Ce(Se.useState(""),2))[0],c=e[1],u=Se.useRef(null),p=Math.random().toString(36).substring(2,6),f=(e=Ce(Se.useState(_l(p,o)),2))[0],h=e[1];return Se.useEffect(function(){null!=i&&i!==o&&s(!0),requestAnimationFrame(function(){var e=El(u,p);c(e)});var e=_l(p,o);h(e)},[o]),Se.createElement(Se.Fragment,null,Se.createElement("style",null,l),r&&a&&Se.createElement("div",{style:{animation:f,overflow:"hidden",animationFillMode:"forwards"},onAnimationEnd:function(){o||s(!1)},"data-test":"DesignSystem-Listbox--Nested-Item",ref:u},r))}function xl(e){var t=e.nestedBody,n=e.expanded,r=e.id,o=e.onClick,i=e.value,a=void 0===(a=e.tagName)?"li":a,s=U(e,Ml),l=(c=Se.useContext(Il)).showDivider,c=De(we({},"Listbox-item-wrapper",!c.draggable));return Se.createElement(a,xe({id:r,"data-test":"DesignSystem-Listbox-Item"},s,{onClick:function(e){o&&o(e,r,i)},"data-value":i,className:c}),Se.createElement(hl,e),t&&Se.createElement(wl,{expanded:n,nestedBody:t}),l&&Se.createElement(rl,{className:"Listbox-divider"}))}function Cl(e){var t=e.children,n=e.className,r=e.draggable,o=e.size,i=e.type,a=e.showDivider,s=e.tagName,l=U(e,Al),c=Oe(e),n=De({Listbox:!0},n);return Se.createElement(Rl,{value:{size:o,type:i,draggable:r,showDivider:a}},r?Se.createElement(pl,e):Se.createElement(s,xe({"data-test":"DesignSystem-Listbox"},c,{className:n},l),t))}function kl(e,t,n,r,o,i,a,s,l){switch(e.key){case"ArrowUp":e.preventDefault(),Ll("up",t,n,i,a);break;case"ArrowDown":e.preventDefault(),Ll("down",t,n,i,a);break;case"Enter":Nl(t),null!=o&&o(!1),null!=r&&r(!1);break;case"Escape":null!=s&&s(!1),l.current.focus(),null!=n&&n(void 0)}}function Dl(e){var t=(o=Se.useContext(Hl)).withSearch,n=o.minHeight,r=o.maxHeight,o=o.multiSelect,i=e.children,e=U(e,Kl);return Se.createElement(Cl,xe({style:{maxHeight:t?r-33:r,overflowY:"auto",minHeight:n},"aria-label":"Options item list","aria-multiselectable":o,className:"my-3"},e),i)}function Ol(e,t,n){var r=null==(r=n.current)?void 0:r.querySelectorAll('[data-test="DesignSystem-Select--Input"]'),n=null==(n=n.current)?void 0:n.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),e="down"===e?(null==r?void 0:r[0])||(null==n?void 0:n[0]):null==n?void 0:n[n.length-1];null!=(r=e)&&r.focus(),null!=(n=e)&&n.scrollIntoView({block:"center"}),t&&t(e)}function Pl(e){var t=e.children,r=e.option,n=e.checkedState,o=e.onClick,i=void 0===(i=e.withCheckbox)||i,a=e.disabled,e=U(e,ql),s=(_=Se.useContext(Hl)).onOptionClick,l=_.selectValue,c=_.setSelectValue,u=_.multiSelect,p=_.setIsOptionSelected,f=_.focusedOption,h=_.setFocusedOption,d=_.setHighlightFirstItem,m=_.setHighlightLastItem,g=_.listRef,y=_.withSearch,v=_.setOpenPopover,b=_.triggerRef,_="checked"===n||-1!==Ul(r,l),n="indeterminate"===n,S=De(we({},"Select-option",!0)),E=De((we(E={},"Select-option--text",!0),we(E,"pt-2",u),E));return Se.createElement(Cl.Item,xe({role:"option",onClick:function(){var e,t,n;a||(o?o(r):(n=u&&Array.isArray(l)?(e=r,t=ke(t=l),-1!==(n=Ul(e,t))?t.splice(n,1):t.push(e),t):r,null!=p&&p(!Array.isArray(n)||0!==n.length),null!=c&&c(n),null!=s&&s(n)))},"aria-selected":_,"aria-label":"option item",onKeyDown:function(e){var t=e,n=f,r=h,o=d,i=m,a=g,s=y,l=v,c=b;switch(t.key){case"ArrowUp":t.preventDefault(),Gl("up",n,r,a,s);break;case"ArrowDown":t.preventDefault(),Gl("down",n,r,a,s);break;case"Enter":Wl(n),null!=i&&i(!1),null!=o&&o(!1);break;case"Tab":null!=i&&i(!1),null!=o&&o(!1);break;case"Escape":null!=l&&l(!1),c.current.focus(),null!=r&&r(void 0)}},selected:_,tabIndex:-1,disabled:a,"data-test":"DesignSystem-Select-Option"},e),Se.createElement("div",{className:S},u&&i&&Se.createElement(ft,{tabIndex:-1,"aria-checked":n?"mixed":_,checked:_,indeterminate:n}),Se.createElement("div",{className:E},t)))}function Tl(e){var t=e.triggerSize,n=e.placeholder,r=e.withClearButton,o=e.icon,i=e.disabled,a=e.inlineLabel,s=e.iconType,l=e.onClear,c=e.setLabel,e=U(e,Yl),u=Se.useContext(Hl),p=Se.useRef(null),f=u.openPopover,h=u.selectValue,d=u.setSelectValue,m=u.isOptionSelected,g=u.setIsOptionSelected,y=u.multiSelect,v=u.setOpenPopover,b=u.setHighlightFirstItem,_=u.setHighlightLastItem,S=u.triggerRef,u=u.width,E=i?"disabled":"default",n=null==n?void 0:n.trim(),c=(h=h,c=c,(w=y)?(null==c?void 0:c(h.length))||(h.length<=2?h.map(function(e){return"".concat(e.label)}).join(", "):"".concat(h.length," Selected")):(null==h||null==(w=h.label)?void 0:w.trim())||""),h=m&&0<c.length?c:n,w=f?"keyboard_arrow_up":"keyboard_arrow_down",c={width:u},u=De((we(n={},"Button",!0),we(n,"Select-trigger",!0),we(n,"Select-trigger--".concat(t),t),we(n,"Select-trigger--placeholder",!m),we(n,"Select-trigger--icon",o),we(n,"Select-trigger--open",f),n)),n=De((we(t={},"Text",!0),we(t,"Text--regular",!0),we(t,"Select-trigger--text",!0),t));return Se.createElement(M,{showOnTruncation:!0,showTooltip:!f,tooltip:h,elementRef:p,className:"w-100",triggerClass:"w-100"},Se.createElement("button",xe({ref:S,onKeyDown:function(e){var t=e,n=v,r=b,o=_;switch(t.key){case"Enter":t.preventDefault(),null!=n&&n(!0),null!=r&&r(!0);break;case"ArrowDown":null!=n&&n(!0),null!=r&&r(!0);break;case"ArrowUp":null!=n&&n(!0),null!=o&&o(!0)}},type:"button",className:u,disabled:i,tabIndex:0,style:c,"aria-haspopup":"listbox","aria-expanded":f,"aria-label":"trigger","data-test":"DesignSystem-Select-trigger"},e),Se.createElement("div",{className:"Select-trigger-wrapper ellipsis--noWrap"},a&&Se.createElement(Te,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(a.trim().charAt(0).toUpperCase()).concat(a.trim().slice(1))),o&&!a&&Se.createElement(R,{appearance:E,className:"d-flex align-items-center mr-4",name:o,type:s}),h&&Se.createElement("span",{ref:p,className:n},h)),m&&r&&Se.createElement(R,{appearance:E,onClick:function(e){e.stopPropagation(),null!=d&&d(y?[]:{label:"",value:""}),null!=g&&g(!1),l&&l(e)},className:"align-items-center mr-2 ml-3 Select-crossButton",size:12,name:"close","aria-label":"clear selected",type:s,"data-test":"DesignSystem-Select--closeIcon"}),Se.createElement(R,{appearance:E,name:w,type:s})))}var Ml=["nestedBody","expanded","id","onClick","value","tagName"],Al=(xl.displayName="Listbox.Item",["children","className","draggable","size","type","showDivider","tagName"]),Il=Se.createContext({size:"standard",type:"resource",draggable:!(xl.defaultProps={tagName:"li"}),showDivider:!0}),Rl=Il.Provider,Fl=(Cl.displayName="Listbox",Cl.defaultProps={tagName:"ul",size:"standard",type:"resource",draggable:!1,showDivider:!0},Cl.Item=xl,Se.createContext({})),Nl=function(e){null!=e&&e.click()},Ll=function(e,t,n,r,o){var i=null==r?void 0:r.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(i).findIndex(function(e){return e==t});-1===a?"up"===e&&i.length:o&&0===a&&"up"===e||o&&a===i.length-1&&"down"===e?((o=r.current.querySelector('[data-test="DesignSystem-AvatarSelection--Input"]')).focus(),n&&n(o)):((r=i[a="up"===e?(a-1+i.length)%i.length:(a+1)%i.length]).focus(),n&&n(r),r.scrollIntoView({block:"center"}))},f=function(e){return Se.createElement(Cl,e,e.children)},jl=(f.defaultProps={type:"option",showDivider:!{minWidth:256},size:"compressed",tagName:"ul"},["children","value","disabled"]),l=function(e){var t=e.children,n=e.value,r=e.disabled,e=U(e,jl),o=Se.useContext(Fl),i=o.setSelectedItems,a=o.selectedItems,s=o.onSelect,l=o.focusedOption,c=o.setFocusedOption,u=o.setHighlightFirstItem,p=o.setHighlightLastItem,f=o.listRef,h=o.withSearch,d=o.setOpenPopover,m=o.triggerRef;return Se.createElement(Cl.Item,xe({onClick:function(e){return t=n,(e=e).preventDefault(),void(r||(e=a?ke(a):[],null!=a&&a.includes(t)?e=a.filter(function(e){return e!==t}):e.push(t),null!=i&&i(ke(e)),null!=d&&d(!0),s&&s(e)));var t},onKeyDown:function(e){kl(e,l,c,u,p,f,h,d,m)},selected:null==a?void 0:a.includes(n),"data-test":"DesignSystem-AvatarSelection--Option",disabled:r,tabIndex:-1},e),t)},Bl=(l.defaultProps={tagName:"li"},["chipOptions","allowDuplicates","disabled","error","placeholder","defaultValue","value","className","autoFocus","onChange","onBlur","onFocus","onKeyDown","onInputChange","tabIndex","role"]),zl=["type","onClick"],Vl={BACKSPACE:"Backspace",DELETE:"Delete",ENTER:"Enter"},o=function(e){function a(e){var t=ke(_);t.splice(e,1),i||S(t),C(t)}var s=e.chipOptions,o=e.allowDuplicates,l=e.disabled,t=e.error,n=e.placeholder,r=e.defaultValue,i=e.value,c=e.className,u=e.autoFocus,p=e.onChange,f=e.onBlur,h=e.onFocus,d=e.onKeyDown,m=e.onInputChange,g=e.tabIndex,y=e.role,v=U(e,Bl),b=Se.createRef(),r=Ce(Se.useState(i||r),2),_=r[0],S=r[1],r=Ce(Se.useState(""),2),E=r[0],w=r[1],r=Oe(e),x=(Se.useEffect(function(){void 0!==i&&(S(i),w(""))},[i]),De((we(x={},"ChipInput-border",!0),we(x,"ChipInput-border--error",t),x))),t=De((we(k={ChipInput:!0},"ChipInput--disabled",l),we(k,"ChipInput--withChips",_&&0<_.length),we(k,"ChipInput--error",t),k),c),C=function(e){p&&p(e)},k=_.map(function(e,t){var n=s.type,n=void 0===n?"input":n,r=s.onClick,o=U(s,zl),i="string"==typeof e?e:null==e?void 0:e.label;return Se.createElement(ut,xe({"data-test":"DesignSystem-MultiSelectTrigger--Chip",label:i,name:e,type:n,disabled:l,key:t,className:"my-3 mx-2",onClick:function(){return r&&r(e,t)},onClose:function(){return a(t)}},o))});return Se.createElement("div",{"data-test":"DesignSystem-MultiSelectTrigger--Border",className:x},Se.createElement("div",xe({"data-test":"DesignSystem-MultiSelectTrigger"},r,{className:t,onClick:function(){var e;null!=(e=b.current)&&e.focus()},tabIndex:l?-1:g||0}),Se.createElement("div",{className:"ChipInput-wrapper"},_&&0<_.length&&k,Se.createElement("input",xe({},v,{"data-test":"DesignSystem-MultiSelectTrigger--Input",ref:e.forwardedRef||b,className:"ChipInput-input",autoFocus:u,placeholder:_&&0<_.length?"":n,disabled:l,value:E,onBlur:f,onFocus:h,onChange:function(e){w(e.target.value),m&&m(e)},onKeyDown:function(e){var t,n,r=_.length;switch(e.key){case Vl.DELETE:case Vl.BACKSPACE:""===E&&0<r&&a(r-1);break;case Vl.ENTER:e.preventDefault(),E&&(t=E.trim(),n=0<_.filter(function(e){return e.label===t}).length,!o&&n||!t||(n=[].concat(ke(_),[{label:t,value:t,isSelectedOption:!1}]),i||S(n),C(n),w("")))}d&&d(e)},role:y}))),(0<_.length||0<E.length)&&Se.createElement(R,{"data-test":"DesignSystem-MultiSelectTrigger--Icon",name:"close",appearance:l?"disabled":"subtle",className:"ChipInput-icon",onClick:function(e){e.stopPropagation();e=[];i||S(e),C(e),w(""),m&&m()},tabIndex:l?-1:0})))},Hl=(o.displayName="MultiSelectTrigger",o.defaultProps={chipOptions:{},defaultValue:[],allowDuplicates:!1,autoFocus:!1},Se.createContext({})),Kl=["children"],Ul=(Dl.defaultProps={type:"option",showDivider:!1,size:"compressed",tagName:"ul"},function(t,e){return Array.isArray(e)?e.findIndex(function(e){return e.value===t.value}):t.value===(null==e?void 0:e.value)?0:-1}),Wl=function(e){null!=e&&e.click()},Gl=function(e,t,n,r,o){var i=r.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(i).findIndex(function(e){return e==t});-1===a?"up"===e&&i.length:o&&0===a&&"up"===e||o&&a===i.length-1&&"down"===e?((o=r.current.querySelector('[data-test="DesignSystem-Select--Input"]')).focus(),n&&n(o)):((r=i[a="up"===e?(a-1+i.length)%i.length:(a+1)%i.length]).focus(),n&&n(r),r.scrollIntoView({block:"center"}))},ql=["children","option","checkedState","onClick","withCheckbox","disabled"],Yl=(Pl.defaultProps={withCheckbox:!0},["triggerSize","placeholder","withClearButton","icon","disabled","inlineLabel","iconType","onClear","setLabel"]),$l=(Tl.defaultProps={triggerSize:"regular",placeholder:"Select",withClearButton:!0},["onChange","onClear"]),Jl=["title","description","children"],Zl=["children"],c=Se.forwardRef(function(e,t){var n=e.children,r=e.onSelect,o=e.width,i=e.maxHeight,a=e.minHeight,s=e.value,l=e.boundaryElement,c=e.appendToBody,u=e.multiSelect,p=void 0!==u&&u,f=e.onOutsideClick,h=e.triggerOptions,d=e.popoverWidth,m=e.trigger,g=e.onToggle,u=Ce(Se.useState(!1),2),y=u[0],v=u[1],u=(u=s,p?u&&!Array.isArray(u)?[u]:u||[]:u||{label:"",value:""}),u=Ce(Se.useState(u),2),b=u[0],_=u[1],u=Ce(Se.useState(!1),2),S=u[0],E=u[1],w=Se.createRef(),x=Se.useRef(null),u=Ce(Se.useState(!1),2),C=u[0],u=u[1],k=Ce(Se.useState(),2),D=k[0],O=k[1],k=Ce(Se.useState(!1),2),P=k[0],T=k[1],k=Ce(Se.useState(!1),2),M=k[0],A=k[1],k=Ce(Se.useState({width:d||o}),2),I=k[0],R=k[1],k=Oe(e),e=m?{}:{width:o};Se.useEffect(function(){var e=null==(e=w.current)?void 0:e.clientWidth;!d&&e&&R(Ee(Ee({},I),{},{width:m?Math.max(e||0,176):e}))},[]),Se.useImperativeHandle(t,function(){return{setOpen:function(e){null!=v&&v(e)},setFocusFirstItem:function(){y&&(requestAnimationFrame(function(){return Ol("down",O,x)}),T(!0))},setFocusLastItem:function(){y&&(requestAnimationFrame(function(){return Ol("up",O,x)}),A(!0))}}}),Se.useEffect(function(){y||(T(!1),A(!1))},[y]),Se.useEffect(function(){P&&y&&requestAnimationFrame(function(){return Ol("down",O,x)})},[P]),Se.useEffect(function(){M&&y&&requestAnimationFrame(function(){return Ol("up",O,x)})},[M]),Se.useEffect(function(){s&&(_(s),E(Array.isArray(s)?0<s.length:s&&"value"in s))},[s]);return Se.createElement(Hl.Provider,{value:{openPopover:y,setOpenPopover:v,selectValue:b,setSelectValue:_,isOptionSelected:S,setIsOptionSelected:E,onOptionClick:function(e){null!=r&&r(e),p||v(!1)},maxHeight:i,minHeight:a,withSearch:C,width:o,setWithSearch:u,multiSelect:p,listRef:x,triggerRef:w,focusedOption:D,setFocusedOption:O,setHighlightFirstItem:T,setHighlightLastItem:A}},Se.createElement("div",xe({"data-test":"DesignSystem-Select",style:e,"aria-haspopup":"listbox","aria-expanded":y},k),Se.createElement(Ua,{open:y,onToggle:function(e){g&&g(e),h&&h.disabled?v(!1):(v(e),T(e))},className:"mt-3",triggerClass:"d-block",position:"bottom-start",customStyle:I,boundaryElement:l,appendToBody:c,trigger:m?Se.cloneElement(m,{ref:w}):Se.createElement(Tl,xe({"aria-controls":"select-listbox"},h))},Se.createElement(Un,{onOutsideClick:function(){null!=f&&f()}},Se.createElement("div",{role:"listbox",id:"select-listbox",tabIndex:0,ref:x},n)))))});c.displayName="Select",c.defaultProps={maxHeight:256,width:176},c.Option=Pl,c.List=Dl,c.SearchInput=function(e){var t=Se.useContext(Hl),n=t.setWithSearch,r=t.maxHeight,s=t.listRef,l=t.setFocusedOption,c=t.setOpenPopover,u=t.triggerRef,o=e.onChange,i=e.onClear,t=U(e,$l);Se.useEffect(function(){null!=n&&n(!0)},[r]);return Se.createElement("div",{className:"Select-inputWrapper"},Se.createElement(Tn,xe({},t,{icon:"search",onKeyDown:function(e){var t,n=e,e=s,r=l,o=c,i=u,a=null==(e=e.current)?void 0:e.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');switch(n.key){case"ArrowUp":n.preventDefault(),t=a[a.length-1];break;case"ArrowDown":n.preventDefault(),t=a[0];break;case"Escape":null!=o&&o(!1),i.current.focus(),null!=r&&r(void 0)}null!=(e=t)&&e.focus(),null!=(e=t)&&e.scrollIntoView({block:"center"}),r&&r(t)},autoFocus:!0,onChange:function(e){o&&o(e.target.value)},onClear:function(e){i&&i(e)},autoComplete:"off","aria-label":"Search","aria-haspopup":"listbox",className:"Select-input","data-test":"DesignSystem-Select--Input"})))},c.EmptyTemplate=function(e){var t=Se.useContext(Hl),n=t.maxHeight,t=t.withSearch,r=e.title,o=e.description,i=e.children,e=U(e,Jl);return Se.createElement("div",xe({className:"px-7 d-flex justify-content-center align-items-center",style:{minHeight:t?n-33:n},"data-test":"DesignSystem-Select-EmptyState--wrapper","aria-live":"polite",role:"alert"},e),Se.createElement("div",{"aria-labelledby":r,"aria-describedby":o,className:"d-flex flex-column justify-content-center align-items-center"},r&&Se.createElement(Te,{id:r,role:"heading",className:"text-align-center mb-3",weight:"strong"},r),o&&Se.createElement(Te,{id:o,className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},o),i))},c.Footer=function(e){var t=e.children,e=U(e,Zl);return Se.createElement("div",xe({className:"Select-buttonWrapper"},e),t)}}.call(this,Ql(21))},function(e,t,n){function o(e){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},a[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}var r,i,a,s;window,e.exports=(r=n(2),i=n(24),s={},o.m=a=[function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(N,e,t){t.r(e);var c=t(0),o=t(1);function u(e){var t=e.getSelection(),e=e.getCurrentContent(),n=t.getStartKey(),r=t.getEndKey(),t=e.getBlockMap();return t.toSeq().skipUntil(function(e,t){return t===n}).takeUntil(function(e,t){return t===r}).concat([[r,t.get(r)]])}function p(e){return u(e).toList()}function l(e){if(e)return p(e).get(0)}function n(e){if(e){var n=l(e),e=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(e.forEach(function(e,t){e.get("key")===n.get("key")&&(r=t-1)}),-1<r)return e.get(r)}}function r(e){return e?e.getCurrentContent().getBlockMap().toList():new o.List}function i(e){var t=p(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function a(e){var t=c.RichUtils.tryToRemoveBlockStyle(e);return t?c.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=p(e);if(0<i.size){n.getIsBackward()&&(e=r,r=o,o=e);for(var a=0;a<i.size;a+=1){var s=0===a?r:0,l=a===i.size-1?o:i.get(a).getText().length;t+=i.get(a).getText().slice(s,l)}}return t}function f(e){var t=e.getCurrentContent(),n=e.getSelection(),n=(t=c.Modifier.removeRange(t,n,"forward")).getSelectionAfter(),r=t.getBlockForKey(n.getStartKey()),t=c.Modifier.insertText(t,n,"\n",r.getInlineStyleAt(n.getStartOffset()),null);return c.EditorState.push(e,t,"insert-fragment")}function h(e){var t=c.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return a(c.EditorState.push(e,t,"split-block"))}function d(e){var t=e.getCurrentContent().getBlockMap().toList(),t=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),t=c.Modifier.removeRange(e.getCurrentContent(),t,"forward");return c.EditorState.push(e,t,"remove-range")}function m(e,t){t=c.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return c.EditorState.push(e,t,"change-block-data")}function g(e){var r=new o.Map({}),t=p(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==(e=>{var n=t.get(e).getData();if(!n||0===n.size)return r=r.clear(),"break";if(0===e)r=n;else if(r.forEach(function(e,t){n.get(t)&&n.get(t)===e||(r=r.delete(t))}),0===r.size)return r=r.clear(),"break"})(n);n+=1);return r}var y=Object(o.Map)({code:{element:"pre"}}),v=c.DefaultDraftBlockRenderMap.merge(y);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function _(e,t,n){var r,o,i=e.getSelection(),i=i.getIsBackward()?i.getFocusKey():i.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i),l=s.getType();return"unordered-list-item"!==l&&"ordered-list-item"!==l||!(a=a.getBlockBefore(i))||a.getType()!==l||(i=s.getDepth(),1===t&&i===n)?e:(l=Math.min(a.getDepth()+1,n),r=t,o=l,i=(s=e).getSelection(),n=(a=s.getCurrentContent()).getBlockMap(),t=u(s).map(function(e){var t=e.getDepth()+r,t=Math.max(0,Math.min(t,o));return e.set("depth",t)}),n=n.merge(t),l=a.merge({blockMap:n,selectionBefore:i,selectionAfter:i}),c.EditorState.push(e,l,"adjust-depth"))}function S(e,t){var n,r;return 13===(t=t).which&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))?e.getSelection().isCollapsed()?c.RichUtils.insertSoftNewline(e):f(e):(e=(t=e).getSelection()).isCollapsed()?(n=t.getCurrentContent(),r=e.getStartKey(),b(n=n.getBlockForKey(r))||"unstyled"===n.getType()||n.getLength()!==e.getStartOffset()?b(n)&&0===n.getLength()?0===(r=n.getDepth())?a(t):0<r?_(t,-1,r):void 0:void 0:h(t)):void 0}function E(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="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)}function C(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),a=t.getEndOffset(),s=p(e);if(0<s.size){t=(()=>{for(var n={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},r=0;r<s.size;r+=1){var e=0===r?i:0,t=r===s.size-1?a:s.get(r).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var o=e;o<t;o+=1)(e=>{var t=s.get(r).getInlineStyleAt(e);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=n[e]&&t.get(e)===e})})(o)}return{v:n}})();if("object"===x(t))return t.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=l(e),a=r;a<o;a+=1){var s=i.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function D(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function O(e,t,n){T[e]["".concat(e.toLowerCase(),"-").concat(n)]=w({},"".concat(t),n)}function P(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach(function(e){w(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},T.color,{},T.bgcolor,{},T.fontSize,{},T.fontFamily,{CODE:T.CODE,SUPERSCRIPT:T.SUPERSCRIPT,SUBSCRIPT:T.SUBSCRIPT})}var T={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function M(e,t,n){var r=e.getSelection(),o=Object.keys(T[t]).reduce(function(e,t){return c.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=c.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return c.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=c.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=c.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),O(t,e,n)),o}function A(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?O("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?O("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?O("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&O("fontFamily","fontFamily",e.substr(11))})}function I(e,t,n){e=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}function R(n,l){if(n&&l&&0<l.length){var e=(()=>{var e=n.getSelection(),o={};if(e.isCollapsed())return l.forEach(function(e){o[e]=(t=>{var e=n.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)})(e)}),{v:o};var i=e.getStartOffset(),a=e.getEndOffset(),s=p(n);if(0<s.size){for(var t=0;t<s.size;t+=1)(n=>{var e=0===n?i:0,t=n===s.size-1?a:s.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=e;r<t;r+=1)(t=>{t===e?l.forEach(function(e){o[e]=I(s.get(n),e,t)}):l.forEach(function(e){o[e]&&o[e]!==I(s.get(n),e,t)&&(o[e]=void 0)})})(r)})(t);return{v:o}}})();if("object"===x(e))return e.v}return{}}function F(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=c.Modifier.removeInlineStyle(n,t.getSelection(),e)}),c.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return b}),t.d(e,"changeDepth",function(){return _}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return D}),t.d(e,"getCustomStyleMap",function(){return P}),t.d(e,"toggleCustomInlineStyle",function(){return M}),t.d(e,"getSelectionEntity",function(){return k}),t.d(e,"extractInlineStyle",function(){return A}),t.d(e,"removeAllInlineStyles",function(){return F}),t.d(e,"getSelectionInlineStyle",function(){return C}),t.d(e,"getSelectionCustomInlineStyle",function(){return R}),t.d(e,"getSelectedBlocksMap",function(){return u}),t.d(e,"getSelectedBlocksList",function(){return p}),t.d(e,"getSelectedBlock",function(){return l}),t.d(e,"getBlockBeforeSelectedBlock",function(){return n}),t.d(e,"getAllBlocks",function(){return r}),t.d(e,"getSelectedBlocksType",function(){return i}),t.d(e,"removeSelectedBlocksStyle",function(){return a}),t.d(e,"getSelectionText",function(){return s}),t.d(e,"addLineBreakRemovingSelection",function(){return f}),t.d(e,"insertNewUnstyledBlock",function(){return h}),t.d(e,"clearEditorContent",function(){return d}),t.d(e,"setBlockData",function(){return m}),t.d(e,"getSelectedBlocksMetadata",function(){return g}),t.d(e,"blockRenderMap",function(){return v})}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,t,n){var r;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,(e=>{if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t,n="";for(t in e)r.call(e,t)&&e[t]&&(n=i(n,t));return n})(n)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}
|
|
38
|
+
*/function u(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Hi:switch(e=e.type){case $i:case Ji:case Ui:case Gi:case Wi:case Xi:return e;default:switch(e=e&&e.$$typeof){case Yi:case Zi:case ta:case ea:case qi:return e;default:return t}}case Ki:return t}}}function aa(e){return u(e)===Ji}var sa={AsyncMode:$i,ConcurrentMode:Ji,ContextConsumer:Yi,ContextProvider:qi,Element:Hi,ForwardRef:Zi,Fragment:Ui,Lazy:ta,Memo:ea,Portal:Ki,Profiler:Gi,StrictMode:Wi,Suspense:Xi,isAsyncMode:function(e){return aa(e)||u(e)===$i},isConcurrentMode:aa,isContextConsumer:function(e){return u(e)===Yi},isContextProvider:function(e){return u(e)===qi},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Hi},isForwardRef:function(e){return u(e)===Zi},isFragment:function(e){return u(e)===Ui},isLazy:function(e){return u(e)===ta},isMemo:function(e){return u(e)===ea},isPortal:function(e){return u(e)===Ki},isProfiler:function(e){return u(e)===Gi},isStrictMode:function(e){return u(e)===Wi},isSuspense:function(e){return u(e)===Xi},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Ui||e===Ji||e===Gi||e===Wi||e===Xi||e===Qi||"object"==typeof e&&null!==e&&(e.$$typeof===ta||e.$$typeof===ea||e.$$typeof===qi||e.$$typeof===Yi||e.$$typeof===Zi||e.$$typeof===ra||e.$$typeof===oa||e.$$typeof===ia||e.$$typeof===na)},typeOf:u},r=t(function(e,t){});r.AsyncMode,t(function(e){e.exports=sa}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(()=>{try{if(Object.assign){var e=new String("abc");if(e[5]="de","5"!==Object.getOwnPropertyNames(e)[0]){for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r,o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"===o.join(""))return r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")?1:void 0}}}catch(e){}})()&&Object.assign;function la(){}function ca(){}Function.call.bind(Object.prototype.hasOwnProperty),ca.resetWarningCache=la;function ua(){return Q[da]=(Q[da]||0)+1}function pa(e){return Array.isArray(e)?e[0]:e}function fa(e,t){if("function"==typeof e)return _a(e,t);null!=e&&(e.current=t)}var ha=t(function(e){function t(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i)throw(i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",i}function n(){return t}e.exports=(e={array:t.isRequired=t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:ca,resetWarningCache:la}).PropTypes=e}),da="__global_unique_id__",ma=function(){},ga=t(function(e,t){t.__esModule=!0,n(g.a);var u=n(ha),p=n(ua);function n(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n(ma);var m=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,p.default)()+"__",r=(d(l,s=g.a.Component),l.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},l.prototype.componentWillReceiveProps=function(e){var t,n,r,o,i;this.props.value!==e.value&&(t=this.props.value,n=e.value,r=void 0,(o=t)===(i=n)?0===o&&1/o!=1/i:o==o||i==i)&&(r="function"==typeof a?a(t,n):m,0!==(r|=0))&&this.emitter.set(e.value,r)},l.prototype.render=function(){return this.props.children},l);function l(){var e,t;f(this,l);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=h(this,s.call.apply(s,[this].concat(i)))).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(t){r=r.filter(function(e){return e!==t})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),h(t,e)}r.childContextTypes=((o={})[n]=u.default.object.isRequired,o),d(c,i=g.a.Component),c.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?m:e},c.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?m:e},c.prototype.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},c.prototype.getValue=function(){return this.context[n]?this.context[n].get():e},c.prototype.render=function(){return e=this.props.children,(Array.isArray(e)?e[0]:e)(this.state.value);var e};var i,o=c;function c(){var e,n;f(this,c);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n=h(this,i.call.apply(i,[this].concat(r)))).state={value:n.getValue()},n.onUpdate=function(e,t){0!=((0|n.observedBits)&t)&&n.setState({value:n.getValue()})},h(n,e)}return o.contextTypes=((t={})[n]=u.default.object,t),{Provider:r,Consumer:o}},e.exports=t.default}),f=(ee(ga),t(function(e,t){t.__esModule=!0;var n=o(g.a),r=o(ga);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),l=ee(f),ya=l(),va=l(),ba=(o=>{function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,s(i(i(t)),"referenceNode",void 0),s(i(i(t)),"setReferenceNode",function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())}),t}yr(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return Se.createElement(ya.Provider,{value:this.referenceNode},Se.createElement(va.Provider,{value:this.setReferenceNode},this.props.children))},e})(Se.Component),_a=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},Sa={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Ea={},wa=(o=>{function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=o.call.apply(o,[this].concat(t))||this,s(i(i(n)),"state",{data:void 0,placement:void 0}),s(i(i(n)),"popperInstance",void 0),s(i(i(n)),"popperNode",null),s(i(i(n)),"arrowNode",null),s(i(i(n)),"setPopperNode",function(e){e&&n.popperNode!==e&&(fa(n.props.innerRef,e),n.popperNode=e,n.updatePopperInstance())}),s(i(i(n)),"setArrowNode",function(e){n.arrowNode=e}),s(i(i(n)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var t=e.placement;return n.setState({data:e,placement:t}),e}}),s(i(i(n)),"getOptions",function(){return{placement:n.props.placement,eventsEnabled:n.props.eventsEnabled,positionFixed:n.props.positionFixed,modifiers:mr({},n.props.modifiers,{arrow:mr({},n.props.modifiers&&n.props.modifiers.arrow,{enabled:!!n.arrowNode,element:n.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:n.updateStateModifier})}}),s(i(i(n)),"getPopperStyle",function(){return n.popperNode&&n.state.data?mr({position:n.state.data.offsets.popper.position},n.state.data.styles):Sa}),s(i(i(n)),"getPopperPlacement",function(){return n.state.data?n.state.placement:void 0}),s(i(i(n)),"getArrowStyle",function(){return n.arrowNode&&n.state.data?n.state.data.arrowStyles:Ea}),s(i(i(n)),"getOutOfBoundariesState",function(){return n.state.data?n.state.data.hide:void 0}),s(i(i(n)),"destroyPopperInstance",function(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}),s(i(i(n)),"updatePopperInstance",function(){n.destroyPopperInstance();var e=i(i(n)).popperNode,t=n.props.referenceElement;t&&e&&(n.popperInstance=new Vi(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}yr(e,o);var t=e.prototype;return t.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&Uo(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},t.componentWillUnmount=function(){fa(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return pa(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},e})(Se.Component);function xa(e){var t=e.referenceElement,n=dr(e,["referenceElement"]);return Se.createElement(ya.Consumer,null,function(e){return Se.createElement(wa,mr({referenceElement:void 0!==t?t:e},n))})}s(wa,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),Vi.placements;var Ca=(o=>{function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=o.call.apply(o,[this].concat(n))||this,s(i(i(t)),"refHandler",function(e){fa(t.props.innerRef,e),_a(t.props.setReferenceNode,e)}),t}yr(e,o);var t=e.prototype;return t.componentWillUnmount=function(){fa(this.props.innerRef,null)},t.render=function(){return ma(Boolean(this.props.setReferenceNode)),pa(this.props.children)({ref:this.refHandler})},e})(Se.Component);function ka(t){return Se.createElement(va.Consumer,null,function(e){return Se.createElement(Ca,mr({setReferenceNode:e},t))})}function Da(e){return!!(e=null==e?void 0:e.current)&&e.scrollWidth>e.clientWidth}function Oa(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=Oe(e),t=De({OverlayFooter:!0},t),i=Se.createRef();return Se.useEffect(function(){var e,t;n&&i.current&&(e=null==(e=i.current)?void 0:e.querySelectorAll(".Button--basic"),t=e[e.length-1])&&window.requestAnimationFrame(function(){return t.focus({preventScroll:!0})})},[n]),o?Se.createElement("div",xe({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=U(e,qa);return Se.createElement(Pe,xe({type:"button"},e,{key:t}))})):Se.createElement("div",xe({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function Pa(e){var t=e.className,n=e.heading,r=e.subHeading,o=e.backButton,i=e.backIcon,a=e.backIconCallback,s=e.backButtonCallback,l=e.headingClass,e=Oe(e),t=De(we({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),c=De((we(c={},"OverlayHeader-subheading",!0),we(c,"OverlayHeader-subheading--withBackButton",o||i),c));return Se.createElement("div",xe({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),Se.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&Se.createElement(Pe,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&Se.createElement(kn,{className:l,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&Se.createElement(Te,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:c},r))}function Ta(e){var t=e.children,n=e.className,e=Oe(e),n=De({OverlayBody:!0},n);return Se.createElement("div",xe({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function Ma(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function Aa(e){var t=e.containerClassName,n=e.elementRef,e=e.element;if(null!==e){var r,e=e.querySelectorAll(t);if(!(e.length<1))return t=Array.from(e).filter(function(e){return e!==n.current}),r=-1,t.forEach(function(e){e=parseInt(window.getComputedStyle(e).zIndex||"0",10);r=Math.max(r,e+10)}),0<r?r:void 0}}function Ia(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function Ra(e){function t(e){switch(f(!0),e){case"first":u(1);break;case"last":u(r);break;case"prev":1<c&&u(c-1);break;case"next":c<r&&u(c+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=e.pageJumpDebounceDuration,s=Oe(e),l=Ce(Se.useState(e.page),2),c=l[0],u=l[1],p=(l=Ce(Se.useState(!1),2))[0],f=l[1],h=(l=Ce(Se.useState(0),2))[0],d=l[1],m=Se.useCallback(rn(a,o),[h]),a=(Se.useEffect(function(){u(e.page)},[e.page]),De((we(l={},"Pagination",!0),we(l,"Pagination--".concat(n),n),l),i)),h=De((we(o={},"Pagination-buttonWrapper",!0),we(o,"Pagination-buttonWrapper--next",!0),o)),i=De((we(l={},"Pagination-buttonWrapper",!0),we(l,"Pagination-buttonWrapper--previous",!0),l));return Se.useEffect(function(){p&&(1<=c&&c<=r?m(c):(m.cancel(),d(function(e){return e+1})))},[c]),Se.createElement("div",xe({"data-test":"DesignSystem-Pagination"},s,{className:a}),Se.createElement("div",{className:i},Se.createElement(Pe,{onClick:function(){return t("first")},disabled:c<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),Se.createElement(Pe,{onClick:function(){return t("prev")},disabled:c<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&Se.createElement("div",{className:"Pagination-pageIndex"},Se.createElement(In,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(p||f(!0),u(e))},value:"".concat(I(c)?c:""),"data-test":"DesignSystem-Pagination--Input",onKeyPress:function(e){I(e.key)||e.preventDefault()}}),Se.createElement(Te,null," of ".concat(r," pages"))),Se.createElement("div",{className:h},Se.createElement(Pe,{onClick:function(){return t("next")},disabled:r<=c,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),Se.createElement(Pe,{onClick:function(){return t("last")},disabled:r<=c,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function Fa(e){function t(e){var t,n;"start"===e&&(t=(n=J(d)).year,h({yearNav:t,monthNav:n.month})),"end"===e&&(n=(t=J(m)).year,h({yearNav:n,monthNav:t.month}))}function n(e,t,n){var r,o;h({open:!0}),"start"===n&&(o=c.placeholderChar||"_",t)&&!t.includes(o)&&(o=be(l,t,p))&&(h({startDate:o}),m&&(r=(o=J(m)).year,$(d,"more",r,o.month,o.date))&&h({endDate:void 0}),c.onPaste)&&c.onPaste(e,t),"end"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(o=be(l,t,p))&&(h({endDate:o}),u.onPaste)&&u.onPaste(e,t)}function r(e,t,n){var r,o;h({open:!0}),"start"===n&&(o=c.placeholderChar||"_",t)&&!t.includes(o)&&(o=be(l,t,p))&&!isNaN(o.getTime())&&(h({startDate:o}),m)&&(r=(o=J(m)).year,$(d,"more",r,o.month,o.date))&&h({endDate:void 0}),"end"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(o=be(l,t,p))&&!isNaN(o.getTime())&&h({endDate:o})}function o(e,t,n){h({init:!0});var r,o=/\d/;"start"===n&&(r=void 0===(r=c.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(r)?h({startError:!0}):(!t||o.test(t))&&t||h({startError:!1}),t&&!t.includes(r)||h({startDate:void 0})),"end"===n&&(n=void 0===(r=u.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(n)?h({endError:!0}):(!t||o.test(t))&&t||h({endError:!1}),t&&!t.includes(n)||h({endDate:void 0}))}function i(e){h({init:!0}),"start"===e&&(h({startDate:void 0}),t("end")),"end"===e&&(h({endDate:void 0}),t("start"))}function a(e){f.open||t(e)}function s(e){return K(p,e,l)}var l=e.inputFormat,c=e.startInputOptions,u=e.endInputOptions,p=e.validators,f=e.state,h=e.setState,e=f.init,d=f.startDate,m=f.endDate,g=H[l],y=c.placeholderChar||"_",v=u.placeholderChar||"_",b=c.error||c.required&&f.startError&&e,_=u.error||u.required&&f.endError&&e,S=void 0===c.caption?"Invalid value":c.caption,E=void 0===u.caption?"Invalid value":u.caption,w=c.label,x=u.label;return Se.createElement($n,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},Se.createElement(k,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},w&&Se.createElement(Ln,{required:c.required,withInput:!0},w),Se.createElement(Fn,xe({icon:"events",placeholder:l},c,{mask:g,value:d?C(l,d):e?Fn.utils.getDefaultValue(g,y):"",onChange:function(e,t){r(0,t||"","start")},onPaste:function(e,t){n(e,t||"","start")},onBlur:function(e,t){o(0,t||"","start")},onClear:function(){return i("start")},onClick:function(){return a("start")},error:b,caption:b?S:"",validators:[s],clearOnEmptyBlur:!0}))),Se.createElement(k,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},x&&Se.createElement(Ln,{required:u.required,withInput:!0},x),Se.createElement(Fn,xe({icon:"events",placeholder:l},u,{mask:g,value:m?C(l,m):e?Fn.utils.getDefaultValue(g,v):"",onChange:function(e,t){r(0,t||"","end")},onPaste:function(e,t){n(e,t||"","end")},onBlur:function(e,t){o(0,t||"","end")},onClear:function(){return i("end")},onClick:function(){return a("end")},error:_,caption:_?E:"",validators:[s],clearOnEmptyBlur:!0}))))}function Na(e){function i(e,t){var n=/\d/;return!(!e||!t||e.includes(d)||!t.includes(d))||!!(e&&n.test(e)&&e.includes(d))||!(e&&!n.test(e)||!e)&&null}var s=e.inputFormat,l=e.inputOptions,c=e.validators,u=e.setState,e=(n=e.state).init,a=n.startDate,p=n.endDate,f=n.startValue,h=n.endValue,t=W[s],n=l.error||l.required&&(n.startError||n.endError)&&e,r=void 0===l.caption?"Invalid value":l.caption,o=l.label,d=void 0===(m=l.placeholderChar)?"_":m,m=Fn.utils.getDefaultValue(t,d).split(" - "),g=f||m[0],m=h||m[1];return Se.createElement($n,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},Se.createElement(k,null,o&&Se.createElement(Ln,{required:l.required,withInput:!0},o),Se.createElement(Fn,xe({icon:"events",placeholder:"".concat(s," - ").concat(s)},l,{mask:t,value:a||p||e?"".concat(g," - ").concat(m):void 0,onChange:function(e,t){var n,r,o;t=(t=t||"").split(" - "),o=t[0],t=t[1],f!==o&&o&&!o.includes(d)&&(r=be(s,o,c))&&(n=h&&!h.includes(d),u({startDate:r,endDate:n?p:void 0}),p)&&(n=(r=J(p)).year,$(a,"more",n,r.month,r.date))&&u({endDate:void 0}),h!==t&&t&&!t.includes(d)&&(n=be(s,t,c),r=f&&!f.includes(d),n)&&u({endDate:n,startDate:r?a:void 0}),u({startValue:o,endValue:t})},onBlur:function(e,t){var n,r,o;t=t||"",u({init:!0}),t=t.split(" - "),n=t[0],r=i(n,t=t[1]),o=i(t,n),null!==r&&null!==o&&u({startError:r,endError:o}),n&&!n.includes(d)||u({startDate:void 0}),t&&!t.includes(d)||u({endDate:void 0})},onPaste:function(e,t){var n,r,o,i,a;e=e,t=t||"",n=l.onPaste,r=t.split(" - "),o=r[0],i=be(s,r=r[1],c),a=be(s,o,c),u({startDate:a,endDate:i,startValue:o,endValue:r}),n&&n(e,t)},onClear:function(){u({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:n,caption:n?r:"",validators:[function(e){var e=Ce(e.split(" - "),2),t=e[0],e=e[1];return K(c,t,s)&&K(c,e,s)}],clearOnEmptyBlur:!0}))))}function La(e){var t=new Date;return new Date(t.setDate(e))}function ja(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function Ba(e){e.preventDefault()}function za(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o.some(function(e){return!Za(t)&&e&&e.apply(void 0,[t].concat(n)),Za(t)})}}function Va(e,t){switch(t.type){case"focus":return Ee(Ee({},e),{},{isFocused:!0});case"blur":return Ee(Ee({},e),{},{isFocused:!1});case"openDialog":return Ee(Ee({},e),{},{isFileDialogActive:!0});case"closeDialog":return Ee(Ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return Ee(Ee({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return Ee(Ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ee(Ee({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var Ha=(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var o;return h(this,n),we(Y(o=t.call(this,e)),"triggerRef",void 0),we(Y(o),"popupRef",void 0),we(Y(o),"hoverableDelay",void 0),we(Y(o),"_timer",void 0),we(Y(o),"_throttleWait",void 0),we(Y(o),"offsetMapping",void 0),we(Y(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),we(Y(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),we(Y(o),"getUpdatedStyle",function(e,t,n){var r=Ee(Ee({},o.props.style),e);switch(t&&t.split("-")[0]){case"top":r.marginBottom=o.offsetMapping[n];break;case"bottom":r.marginTop=o.offsetMapping[n];break;case"left":r.marginRight=o.offsetMapping[n];break;case"right":r.marginLeft=o.offsetMapping[n]}return o.props.triggerCoordinates&&(r.position="absolute",r.transform="translate(".concat(o.props.triggerCoordinates.x,"px, ").concat(o.props.triggerCoordinates.y,"px)")),r}),we(Y(o),"onClickHandler",function(){var e=o.props.openDelay;e&&!o.state.isOpen?window.setTimeout(function(){o.togglePopper("onClick")},e):o.togglePopper("onClick")}),o.state={animationKeyframe:"",isOpen:o.props.open&&!o.props.disabled||!1,uniqueKey:""},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=Se.createRef(),o.popupRef=Se.createRef(),o.getPopperChildren=o.getPopperChildren.bind(Y(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(Y(o)),o.handleMouseEnter=o.handleMouseEnter.bind(Y(o)),o.handleMouseLeave=o.handleMouseLeave.bind(Y(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(Y(o)),o}return a(n,[{key:"componentDidMount",value:function(){this.addBoundaryScrollHandler();var e=this.triggerRef.current,e=this.getZIndexForLayer(e);this.setState({zIndex:void 0===e?e:e+1})}},{key:"componentDidUpdate",value:function(e){!e.boundaryElement&&this.props.boundaryElement&&(this.removeBoundaryScrollHandler(),this.addBoundaryScrollHandler()),e.open!==this.props.open&&(this._throttleWait=!1,this.setState({animationKeyframe:""}),this.props.open&&!this.props.disabled?(e=this.triggerRef.current,e=this.getZIndexForLayer(e),this.setState({zIndex:void 0===e?e:e+1,isOpen:!0})):!this.props.open&&this.props.animationClass&&this.setState({isOpen:!1}))}},{key:"componentWillUnmount",value:function(){this.removeBoundaryScrollHandler()}},{key:"boundaryScrollHandler",value:function(){var e=this.props,t=e.open;"click"===e.on&&e.closeOnScroll&&t&&!this._throttleWait&&(this.togglePopper("onScroll",!1),this._throttleWait=!0)}},{key:"addBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.addEventListener&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.removeEventListener&&this.props.boundaryElement.removeEventListener("scroll",this.boundaryScrollHandler)}},{key:"mouseMoveHandler",value:function(){var e=this;this._timer&&clearTimeout(this._timer),this._timer=window.setTimeout(function(){(0,e.props.onToggle)(!1,"mouseLeave")},this.hoverableDelay)}},{key:"handleMouseEnter",value:function(){var e=this,t=this.props,n=t.on,r=t.openDelay,t=t.onToggle;"hover"===n&&(this._timer&&clearTimeout(this._timer),r?this._timer=window.setTimeout(function(){e.setState(function(){return{isOpen:!0}}),e.togglePopper("mouseEnter",!0)},r):(t(!0,"mouseEnter"),this.setState(function(){return{isOpen:!0}})))}},{key:"handleMouseLeave",value:function(){var e,t;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():(t(!1,"mouseLeave"),this.setState({isOpen:!1})))}},{key:"getZIndexForLayer",value:function(e){if(null!==e)return"auto"===(e=(e=e.closest("[data-layer]")||document.body)===document.body?"auto":parseInt(window.getComputedStyle(e).zIndex||"0",10))||isNaN(e)?500:e}},{key:"getTriggerElement",value:function(e){var a=this,t=this.props,n=t.trigger,r=t.disabled,e="hover"!==t.on||r?{ref:e,onClick:function(e){e.stopPropagation(),r||a.onClickHandler()}}:{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleMouseEnter,onBlur:this.handleMouseLeave},t=De("PopperWrapper-trigger",t.triggerClass),o=function(t){var e=a.popupRef.current,n=document.body,r=e&&parseInt(window.getComputedStyle(e).zIndex),o=!1,i=!1;return n.querySelectorAll('[data-opened="true"]').forEach(function(e){e&&e.contains(t)&&(o=!0,parseInt(window.getComputedStyle(e).zIndex)<r)&&(i=!0)}),!(!n.isEqualNode(t)&&!i&&n.contains(t)&&o)};return Se.createElement(Un,xe({className:t,onOutsideClick:function(e){var t=a.props,n=t.open,t=t.closeOnBackdropClick;n&&o(e.target)&&t&&(a.doesEventContainsElement(e,a.popupRef)||a.togglePopper("outsideClick"))}},e),n)}},{key:"getPopperChildren",value:function(e){var t,n=this,r=e.ref,o=e.style,i=e.placement,e=e.outOfBoundaries,a=this.props,s=a.offset,l=a.children,c=a.open,a=a.animationClass,u=this.state,p=u.zIndex,f=u.animationKeyframe,u=u.uniqueKey,s=Ee(Ee({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:p}),o="",f=(a?o=De((we(p={},"".concat(a.open),this.state.isOpen),we(p,"".concat(a.close),!this.state.isOpen),p),l.props.className):(p=null==(p=this.popupRef.current)?void 0:p.offsetHeight,(null==(t=this.popupRef.current)?void 0:t.style.getPropertyValue("transform"))&&p&&i&&!f&&(t=Math.random().toString(36).substring(2,6),f=i.includes("top"),f="\n @keyframes popper-open-".concat(t," {\n from { \n max-height: 0;\n ").concat(f?"margin-top: ".concat(p,"px"):"",";\n }\n to {\n max-height: ").concat(p,"px;\n ").concat(f?"margin-top: 0px":"",";\n }\n }\n @keyframes popper-close-").concat(t," {\n from {\n max-height: ").concat(p,"px;\n ").concat(f?"margin-top: 0px":"",";\n }\n to {\n max-height: 0;\n ").concat(f?"margin-top: ".concat(p,"px"):"",";\n }\n }\n "),this.setState({animationKeyframe:f,uniqueKey:t})),p={animation:c?"popper-open-".concat(u," 120ms cubic-bezier(0, 0, 0.38, 0.9), popper-fade-in 120ms"):"popper-close-".concat(u," 120ms cubic-bezier(0.2, 0, 1, 0.9), fadeOut 100ms")},s=Ee(Ee(Ee({},s),p),{},{overflow:"hidden"})),{ref:r,style:s,"data-placement":i,"data-hide":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onAnimationEnd:function(){c||Object(v.flushSync)(function(){n.setState({isOpen:!1})})}});return Se.cloneElement(l,a?Ee(Ee({},f),{},{className:o}):Ee({},f))}},{key:"render",value:function(){var t=this,e=this.props,n=e.placement,r=e.appendToBody,o=e.hide,i=e.boundaryElement,a=e.triggerCoordinates,e=e.computeStyles,s=this.state,l=s.animationKeyframe,s=s.isOpen,c=Se.createElement(xa,{placement:n,innerRef:this.popupRef,modifiers:Ee({preventOverflow:{boundariesElement:i||document.body},hide:{enabled:o},computeStyles:e},a&&{offset:{offset:"".concat(a.x,"px, ").concat(a.y,"px")}})},this.getPopperChildren);return Se.createElement(ba,null,Se.createElement("style",null,l),Se.createElement(ka,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),s&&r&&!a&&v.createPortal(Se.createElement(xa,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:i||document.body},hide:{enabled:o},computeStyles:e}},this.getPopperChildren),document.body),s&&r&&a&&v.createPortal(c,document.body),s&&!r&&!a&&Se.createElement(xa,{placement:n,innerRef:this.popupRef,modifiers:{computeStyles:e}},this.getPopperChildren))}}]),n})(),Ka=(we(Ha,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{},disabled:!1}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement","name"]),Ua=function(e){var t=e.position,n=e.customStyle,r=e.dark,o=e.children,i=e.onToggle,a=e.className,s=e.hideOnReferenceEscape,l=e.boundaryElement,c=void 0===l?document.body:l,l=e.name,u=U(e,Ka),p=Ce(Se.useState(!!e.open),2),f=p[0],h=p[1],p=Ce(Se.useState(!1),2),d=p[0],m=p[1],p=(Se.useEffect(function(){void 0!==e.open&&h(e.open)},[e.open]),Se.useCallback(function(e){h(e)},[])),r=(Se.useEffect(function(){d||"current"in c&&c.current&&m(!0)},[c]),De(we({Popover:!0},"Popover--dark",r),a)),a=Se.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f,"data-name":l},o);return Se.createElement(Ha,xe({},u,{init:d,boundaryElement:"current"in c?c.current:c,open:f,hide:s,style:n,onToggle:i||p,placement:t}),a)},Wa=(Ua.displayName="Popover",Ua.defaultProps=Object.assign({},te(Ha.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip","showTooltip","showOnTruncation","elementRef"]),Ga={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},M=function(e){var t=e.children,n=e.tooltip,r=e.showTooltip,o=e.showOnTruncation,i=e.elementRef,a=U(e,Wa),s=Se.useRef(null),l=Ce(Se.useState(!1),2),c=l[0],u=l[1],l=(Se.useEffect(function(){u(Da(i||s))},[s,i,t]),i||!Se.isValidElement(t)?t:Se.cloneElement(t,{ref:s}));return r?(r=Se.createElement("div",{className:"Tooltip"},Se.createElement(Te,{className:"Tooltip-text",appearance:"white"},n)),o?c?Se.createElement(Ua,xe({trigger:l,on:"hover",offset:"medium"},a,{animationClass:{open:"Tooltip-animation-open-".concat(Ga[e.position]),close:"Tooltip-animation-close-".concat(Ga[e.position])},className:"Tooltip-container"}),r):l:Se.createElement(Ua,xe({trigger:t,on:"hover",offset:"medium"},a,{animationClass:{open:"Tooltip-animation-open-".concat(Ga[e.position]),close:"Tooltip-animation-close-".concat(Ga[e.position])},className:"Tooltip-container"}),r)):t},qa=(M.useAutoTooltip=function(){return{detectTruncation:Da}},M.defaultProps=Object.assign({},te(Ua.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1,showTooltip:!0,showOnTruncation:!1}),["label"]),p=(Oa.displayName="OverlayFooter",Pa.displayName="OverlayHeader",Ta.defaultProps={stickFooter:!0,withFooter:!0},Ta.displayName="OverlayBody",new((()=>{function e(){h(this,e),we(this,"overlays",void 0),this.overlays=[]}return a(e,[{key:"add",value:function(e){var t;if(null!==e)return-1===(t=this.overlays.indexOf(e))&&(t=this.overlays.length,this.overlays.push(e)),t}},{key:"remove",value:function(e){null!==e&&-1!==(e=this.overlays.indexOf(e))&&this.overlays.splice(e,1)}},{key:"isTopOverlay",value:function(e){if(null!==e)return!!this.overlays.length&&this.overlays[this.overlays.length-1]===e}}]),e})())),o=(Object.freeze(p),(()=>{e(r,Se["Component"]);var t=d(r);function r(e){var n;return h(this,r),we(Y(n=t.call(this,e)),"modalRef",Se.createRef()),we(Y(n),"element",void 0),we(Y(n),"onCloseHandler",function(e){var t=p.isTopOverlay(n.modalRef.current);Ia(e,t,n.onOutsideClickHandler)}),n.element=Ma(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(Y(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&p.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&p.add(this.modalRef.current);var e=Aa({element:this.element,containerClassName:".Overlay-container",elementRef:this.modalRef});this.setState({zIndex:e})}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=Aa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&p.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&p.remove(this.modalRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.closeOnEscape,r=t.backdropClose,t=t.onClose;this.state.open&&p.isTopOverlay(this.modalRef.current)&&((n||r)&&p.remove(this.modalRef.current),t?t(e,"OutsideClick"):"function"==typeof r&&r(e,"OutsideClick"))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.backdropClose,a=r.dimension,s=r.children,l=r.headerOptions,c=r.header,u=r.footerOptions,p=r.seperator,f=r.footer,h=r.onClose,r=e?e-1:1e3,t=De({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=De((we(o={},"Modal-header",!0),we(o,"Modal-header--withSeperator",p),o)),p=De((we(d={},"Modal-footer",!0),we(d,"Modal-footer--withSeperator",p),d)),d=De((we(d={},"Row",!0),we(d,"Overlay-container",!0),we(d,"Overlay-container--open",n),d)),m=l||u||f||c,m=De((we(g={},"Modal-body",!0),we(g,"Modal-body--withMargin",!m||!!f),we(g,"Modal-body--withPadding",!m||!f),g)),g=Oe(this.props),d=Se.createElement($n,{"data-test":"DesignSystem-ModalContainer",className:d,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},Se.createElement(k,xe({"data-test":"DesignSystem-Modal"},g,{className:t},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[a],{ref:this.modalRef}),(l||c)&&Se.createElement("div",{className:o},Se.createElement(k,null,!c&&Se.createElement(Pa,xe({"data-test":"DesignSystem-Modal--header"},l)),!!c&&c),Se.createElement(k,{className:"flex-grow-0"},Se.createElement(M,{tooltip:"Close",position:"bottom"},Se.createElement(Pe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){h&&h(e,"IconClick")}})))),n&&s&&Se.createElement(Se.Fragment,null,l||u||f||c?Se.createElement(Ta,{className:m},this.props.children):s),(!!f||!!u)&&Se.createElement(Oa,xe({"data-test":"DesignSystem-Modal--footer"},u,{open:n,className:p}),f))),e=i?Se.createElement(Un,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},d):d,g=v.createPortal(e,this.element);return Se.createElement(Se.Fragment,null,g,Se.createElement(ne,{open:this.state.animate,zIndex:r}))}}]),r})()),n=(we(o,"defaultProps",{dimension:"medium"}),(()=>{e(r,Se["Component"]);var t=d(r);function r(e){var n;return h(this,r),we(Y(n=t.call(this,e)),"modalRef",Se.createRef()),we(Y(n),"element",void 0),we(Y(n),"onOutsideClickHandler",function(e){p.remove(n.modalRef.current),n.props.onClose?n.props.onClose(e,"EscapePress"):n.setState({animate:!1},function(){window.setTimeout(function(){n.setState({open:!1})},120)})}),we(Y(n),"onCloseHandler",function(e){var t=p.isTopOverlay(n.modalRef.current);Ia(e,t,n.onOutsideClickHandler)}),n.element=Ma(),n.state={open:e.open,animate:e.open},n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&p.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){var t=this;e.open!==this.props.open&&(this.props.open?(e=Aa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&p.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&p.remove(this.modalRef.current)))}},{key:"render",value:function(){var e=this.state,t=e.animate,n=e.open,e=e.zIndex,r=this.props,o=r.className,i=r.dimension,a=r.children,s=r.header,l=r.headerOptions,c=r.footer,u=r.footerOptions,p=r.onClose,r=De({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=De((we(t={},"Overlay-container",!0),we(t,"Overlay-container--open",n),t)),t=Oe(this.props),o=n?Se.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},Se.createElement("div",xe({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),Se.createElement($n,{className:"justify-content-center"},Se.createElement(k,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],Se.createElement($n,{className:"FullscreenModal-header"},Se.createElement(k,null,!s&&Se.createElement(Pa,xe({"data-test":"DesignSystem-FullscreenModal--header"},l)),!!s&&s),Se.createElement(k,{className:"flex-grow-0"},Se.createElement(M,{tooltip:"Close"},Se.createElement(Pe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){p&&p(e,"IconClick")}})))),Se.createElement(Ta,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!c||!!u)&&Se.createElement(Oa,xe({"data-test":"DesignSystem-FullscreenModal--footer"},u,{open:n,className:"FullscreenModal-footer"}),c))))):null,e=v.createPortal(o,this.element);return Se.createElement(Se.Fragment,null,e)}}]),r})()),Ya=(we(n,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),c=(()=>{e(r,Se["Component"]);var t=d(r);function r(e){var n;return h(this,r),we(Y(n=t.call(this,e)),"sidesheetRef",Se.createRef()),we(Y(n),"element",void 0),we(Y(n),"onCloseHandler",function(e){var t=p.isTopOverlay(n.sidesheetRef.current);Ia(e,t,n.onOutsideClickHandler)}),n.element=Ma(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(Y(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&p.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&p.add(this.sidesheetRef.current);var e=Aa({element:this.element,containerClassName:".Overlay-container",elementRef:this.sidesheetRef});this.setState({zIndex:e})}},{key:"componentWillUnmount",value:function(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}},{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.props.open?(e=Aa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&p.add(this.sidesheetRef.current)):(this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&p.remove(this.sidesheetRef.current)))}},{key:"onOutsideClickHandler",value:function(e){var t=this.props,n=t.backdropClose,r=t.closeOnEscape,t=t.onClose;this.state.open&&p.isTopOverlay(this.sidesheetRef.current)&&((n||r)&&p.remove(this.sidesheetRef.current),t)&&t(e,"OutsideClick")}},{key:"handleAnimationEnd",value:function(){this.state.animate||this.setState({open:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.animate,r=t.open,t=t.zIndex,o=this.props,i=o.className,a=o.backdropClose,s=o.dimension,l=o.footer,c=o.seperator,u=o.stickFooter,p=o.headerOptions,f=o.footerOptions,h=o.header,d=o.onClose,o=t?t-1:1e3,i=De({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=De((we(m={},"Overlay-container",!0),we(m,"fade-in",n),we(m,"Overlay-container--open",n),we(m,"Overlay-container--close",!n),m)),m=De((we(m={},"Sidesheet-header",!0),we(m,"Sidesheet-header--withSeperator",c),m)),c=De((we(g={},"Sidesheet-footer",!0),we(g,"Sidesheet-footer--withSeperator",c),we(g,"Sidesheet-footer--stickToBottom",u),g)),u=De((we(g={},"Sidesheet-body",!0),we(g,"Sidesheet-body--withMargin",!!l&&u),we(g,"Sidesheet-body--nextPage",(null==p?void 0:p.backButton)||(null==p?void 0:p.backIcon)),we(g,"Sidesheet-body--firstPage",!(null!=p&&p.backButton||null!=p&&p.backIcon)),g)),g=De((we(g={},"Sidesheet-header--shiftRight",(null==p?void 0:p.backButton)||(null==p?void 0:p.backIcon)),we(g,"Sidesheet-header--shiftLeft",!(null!=p&&p.backButton||null!=p&&p.backIcon)),g)),y=Oe(this.props),n=Se.createElement($n,{"data-test":"DesignSystem-SidesheetContainer","data-open":this.state.open,className:n,"data-layer":!0,style:{zIndex:t||1001},ref:this.sidesheetRef,onAnimationEnd:function(){return e.handleAnimationEnd}},Se.createElement(k,xe({"data-test":"DesignSystem-Sidesheet"},y,{className:i,size:Ya[s]}),Se.createElement("div",{className:m},Se.createElement(k,{"data-test":"DesignSystem-Sidesheet--Header"},!h&&Se.createElement(Pa,xe({headingClass:g},p)),!!h&&h),Se.createElement(k,{className:"flex-grow-0"},Se.createElement(M,{tooltip:"Close"},Se.createElement(Pe,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){d&&d(e,"IconClick")}})))),Se.createElement(Ta,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:u},this.props.children),(!!l||!!f)&&Se.createElement(Oa,xe({"data-test":"DesignSystem-Sidesheet--Footer"},f,{open:r,className:c}),l))),t=a?Se.createElement(Un,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,y=v.createPortal(t,this.element);return Se.createElement(Se.Fragment,null,y,Se.createElement(ne,{open:this.state.animate,zIndex:o}))}}]),r})(),r=(we(c,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=Oe(e),r=De({"Modal-description":!0},r);return Se.createElement("div",xe({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&Se.createElement(Te,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&Se.createElement("br",null),n&&Se.createElement(Te,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),$a=(r.displayName="ModalDescription",Ra.displayName="Pagination",Ra.defaultProps={type:"basic",page:1,totalPages:1,pageJumpDebounceDuration:750},["startDate","endDate","yearNav","monthNav","open","inputFormat","outputFormat","startInputOptions","endInputOptions","validators","withInput","position","disabledBefore","disabledAfter","onRangeChange","rangeLimit"]),f=(()=>{e(l,Se["Component"]);var s=d(l);function l(e){h(this,l),we(Y(u=s.call(this,e)),"monthsInView",void 0),we(Y(u),"getDate",function(e,t){var n=u.props.inputFormat;return{startValue:e?C(n,e):"",endValue:t?C(n,t):""}}),we(Y(u),"getErrors",function(e,t){function n(e){var t=(n=u.props).disabledBefore,n=n.disabledAfter,r=(t=J(t)).year,o=t.month,t=t.date,i=(n=J(n)).year,a=n.month,n=n.date;return!!e&&($(e,"less",r,o,t)||$(e,"more",i,a,n))}var r=n(e),o=n(t),t=J(t),i=t.year;return $(e,"more",i,t.month,t.date)&&(o=r=!0),{startError:r,endError:o}}),we(Y(u),"getInRangeError",function(){var e=u.props.rangeLimit;if(e){var t,n=u.state,r=n.startDate,n=n.endDate,o=J(r),i=o.year,a=o.month,o=o.date,s=J(n),l=s.year,c=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),$(t,"less",l,c,s+1);if(n)return(t=new Date(n)).setDate(s-e),$(t,"more",i,a,o-1)}return!1}),we(Y(u),"onRangeChangeHandler",function(e,t){u.setState({init:!0,startDate:e,endDate:t,startValue:e?C(u.props.inputFormat,e):"",endValue:t?C(u.props.inputFormat,t):""})}),we(Y(u),"onToggleHandler",function(e,t){var n=u.props,n=n.singleInput?n.inputOptions.disabled:n.startInputOptions.disabled||n.endInputOptions.disabled;if(!n)switch(t){case"outsideClick":u.setState({open:e});break;case"onClick":u.setState({open:!0})}});var u,t=e.inputFormat,n=e.validators,r=m(e.startDate,t,n),t=m(e.endDate,t,n),n=u.getDate(r,t),o=n.startValue,n=n.endValue,i=u.getErrors(r,t),a=i.startError;return u.state={startDate:r,endDate:t,startValue:o,endValue:n,startError:a,endError:i.endError,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},u.monthsInView=e.monthsInView||(e.withInput?2:1),u}return a(l,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;e.startDate!==this.props.startDate&&(n=(r=this.props).inputFormat,r=m(this.props.startDate,n,r.validators),n=C(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=m(this.props.endDate,n,r.validators),n=C(n,r),this.setState({endDate:r,endValue:n})),e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate===this.state.startDate&&t.endDate===this.state.endDate||(n=(r=this.props).onRangeChange,e=r.outputFormat,r=(t=this.state).startDate,o=(i=this.getErrors(r,t=t.endDate)).startError,this.setState({startError:o,endError:i=i.endError}),n&&(a=this.getInRangeError(),s=C(e,r),e=C(e,t),a||o||i?this.props.allowReverseSelection||(o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e)):(!this.props.allowReverseSelection||r&&t)&&n(r,t,s,e)),this.state.startDate&&this.state.endDate&&this.setState({open:!1}))}},{key:"renderCalendar",value:function(){var e=this.props,t=(e.startDate,e.inputFormat),n=e.validators,r=e.disabledBefore,o=e.disabledAfter,i=e.rangeLimit,e=U(e,$a),a=this.state,s=a.startDate,l=a.endDate,c=a.yearNav,a=a.monthNav;return Se.createElement(et,xe({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:m(s,t,n),endDate:m(l,t,n),disabledBefore:m(r,t,n),disabledAfter:m(o,t,n),onRangeChange:this.onRangeChangeHandler,yearNav:c,monthNav:a,rangeLimit:i}))}},{key:"render",value:function(){var e,t=this.props,n=t.withInput,r=t.startInputOptions,o=t.endInputOptions,i=t.inputOptions,a=t.inputFormat,s=t.position,l=t.validators,c=t.singleInput,u=t.contentAlign,t=t.children,p=this.state.open,u=De((we(e={},"DateRangePicker",!0),we(e,"DateRangePicker--".concat(u),u),e));return n?(e=c?Se.createElement(Na,{inputFormat:a,inputOptions:i,validators:l,state:this.state,setState:this.setState.bind(this)}):Se.createElement(Fa,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:l,state:this.state,setState:this.setState.bind(this)}),Se.createElement(Ua,{trigger:e,triggerClass:"w-100",className:u,position:s,appendToBody:!0,open:p,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),l})(),l=(we(f,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:La(t-e+1),endDate:La(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:La(t-e-6),endDate:La(t-e)}},getPreviousMonth:function(){var e=new Date,t=e.getFullYear(),e=e.getMonth();return{endDate:new Date(t,e,0),startDate:new Date(t-(e<0),(e+11)%12,1)}},getPrevious90Days:function(){var e=(new Date).getDate();return{startDate:La(e-90),endDate:La(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),we(f,"defaultProps",Ee(Ee({},et.defaultProps),{},{children:Se.createElement(Se.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[T],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return Se.createElement(Se.Fragment,null,e)}),Ja=(l.displayName="Tab",function(e,t){var n,r,o;return!e||!t||(t=Array.isArray(t)?t:t.split(","),n=e.name||"",r=(e.type||"").toLowerCase(),o=r.replace(/\/.*$/,""),!r)||t.some(function(e){e=e.trim().toLowerCase();return"."===e.charAt(0)?n.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e})}),Za=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Xa=function(e){return null!=e},Qa=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e,e=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{type:"FILE_INVALID_TYPE",message:"File type must be ".concat(e)}},es=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},ts=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},ns=function(e,t){e="application/x-moz-file"===e.type||Ja(e,t);return[e,e?null:Qa(t)]},rs=function(e,t,n){if(Xa(e.size))if(Xa(t)&&Xa(n)){if(e.size>n)return[!1,es(n)];if(e.size<t)return[!1,ts(t)]}else{if(Xa(t)&&e.size<t)return[!1,ts(t)];if(Xa(n)&&e.size>n)return[!1,es(n)]}return[!0,null]},os=new Map([["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["png","image/png"],["bmp","image/bmp"],["tif","image/tiff"],["tiff","image/tiff"],["apng","image/apng"],["avif","image/avif"],["jfif","image/jpeg"],["pjpeg","image/pjpeg"],["pjp","image/jpeg"],["svg","image/svg+xml"],["webp","image/webp"],["cur","image/x-win-bitmap"],["MTS","model/vnd.mts"],["roq","video"],["f4a","video"],["f4b","video"],["drc","video"],["nsv","video"],["avi","video/x-msvideo"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["webm","video/webm"],["flv","video/x-flv"],["vob","video/x-ms-vob"],["ogv","video/ogg"],["ogg","application/ogg"],["gifv","image/gif"],["mng","video/x-mng"],["M2TS","video/MP2T"],["TS","video/mp2t"],["qt","video/quicktime"],["wmv","video/x-ms-wmv"],["yuv","application/octet-stream"],["rm","application/vnd.rn-realmedia"],["rmvb","application/vnd.rn-realmedia-vbr"],["viv","video/vnd.vivo"],["asf","video/x-ms-asf"],["amv","video/x-amv"],["m4v","video/x-m4v"],["mpg","video/mpeg"],["mpeg","video/mpeg"],["mpe","video/mpeg"],["mpv","video/mpv"],["m2v","video/mpeg"],["svi","video/x-msvideo"],["3gp","video/3gpp"],["3g2","video/3gpp2"],["mxf","application/mxf"],["flv","video/x-flv"],["f4v","video/x-f4v"],["f4p","video/mp4"],["aa","audio"],["aax","audio"],["act","audio"],["alac","audio"],["ape","audio"],["awb","audio"],["dss","audio"],["dvf","audio"],["iklax","audio"],["ivs","audio"],["msv","audio"],["nmf","audio"],["mogg","audio"],["raw","audio"],["rf64","audio"],["sln","audio"],["wv","audio"],["8svx","audio"],["3gp","audio/3gpp"],["mp2","audio/mpeg"],["aac","audio/x-aac"],["aiff","audio/x-aiff"],["amr","audio/amr"],["au","audio/basic"],["flac","audio/x-flac"],["gsm","audio/gsm"],["m4a","audio/mp4a-latm"],["m4b","audio/mp4a-latm"],["m4p","audio/mp4a-latm"],["mmf","application/vnd.smaf"],["mp3","audio/mpeg"],["ogg","audio/ogg"],["oga","audio/ogg"],["opus","audio/opus"],["tta","audio/x-tta"],["voc","audio/x-voice"],["wav","audio/x-wav"],["wma","audio/x-ms-wma"],["webm","audio/webm"],["cda ","application/x-cdf"],["ra","audio/x-pn-realaudio"],["vox","application/x-authorware-bin"],["rm","application/vnd.rn-realmedia"],["mpc","application/vnd.mophun.certificate"],["pdf","application/pdf"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xlss","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xls","application/vnd.ms-excel"],["odt","application/vnd.oasis.opendocument.text"],["tex","application/x-tex"],["wpd","application/wordperfect"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["csv","text/csv"],["rtf","text/rtf"],["txt","text/plain"],["tsv","text/tab-separated-values"]]),is=[".DS_Store","Thumbs.db"];function as(){return(as=_(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.dataTransfer?function(){return ls.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?us(t.target.files):[]).map(function(e){return ss(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function ss(e,t){var n,r=(e=>{var t=e.name;return t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=os.get(t))&&Object.defineProperty(e,"type",{value:t,writable:!1,configurable:!1,enumerable:!0}),e})(e);return"string"!=typeof r.path&&(n=e.webkitRelativePath,Object.defineProperty(r,"path",{value:"string"==typeof t?t:"string"==typeof n&&0<n.length?n:e.name,writable:!1,configurable:!1,enumerable:!0})),r}function ls(){return(ls=_(regeneratorRuntime.mark(function e(t,n){var r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.items){if(r=us(t.items).filter(function(e){return"file"===e.kind}),"drop"!==n)return e.abrupt("return",r);e.next=4}else e.next=8;break;case 4:return e.next=6,Promise.all(r.map(ps));case 6:return o=e.sent,e.abrupt("return",cs(function n(e){return e.reduce(function(e,t){return[].concat(ke(e),ke(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",cs(us(t.files).map(function(e){return ss(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function cs(e){return e.filter(function(e){return-1===is.indexOf(e.name)})}function us(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function ps(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?ms(t):fs(e)}function fs(e){var t=e.getAsFile();return t?(t=ss(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function hs(e){return ds.apply(this,arguments)}function ds(){return(ds=_(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(t.isDirectory?ms:function(){return gs.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ms(e){var t=e.createReader();return new Promise(function(o,i){var a=[];!function r(){t.readEntries((()=>{var t=_(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=13;break}return e.prev=1,e.next=4,Promise.all(a);case 4:n=e.sent,o(n),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),i(e.t0);case 11:e.next=16;break;case 13:n=Promise.all(t.map(hs)),a.push(n),r();case 16:case"end":return e.stop()}},e,null,[[1,8]])}));return function(e){return t.apply(this,arguments)}})(),function(e){i(e)})}()})}function gs(){return(gs=_(regeneratorRuntime.mark(function e(r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(t,n){r.file(function(e){e=ss(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ys(e){function t(){N&&setTimeout(function(){var e;!D.current||(e=D.current.files)&&e.length||(P({type:"closeDialog"}),"function"==typeof E&&E())},300)}function n(e){e.target instanceof HTMLDivElement&&k.current&&k.current.contains(e.target)||(e.preventDefault(),A.current=[])}function a(e){return f?null:e}var r,o,i,s,l,c,u,p=e.accept,f=e.disabled,h=e.maxSize,d=e.minSize,m=e.multiple,g=e.onDragEnter,y=e.onDragLeave,v=e.onDragOver,b=e.onDrop,_=e.onDropAccepted,S=e.onDropRejected,E=e.onFileDialogCancel,w=e.getFilesFromEvent,x=e.preventDropOnDocument,C=e.validator,k=Object(Se.useRef)(null),D=Object(Se.useRef)(null),O=(e=Ce(Object(Se.useReducer)(Va,ws),2))[0],P=e[1],e=O.isFocused,N=O.isFileDialogActive,T=O.draggedFiles,L=Object(Se.useCallback)(function(){D.current&&(P({type:"openDialog"}),D.current.value="",D.current.click())},[P]),j=(Object(Se.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[D,N,E]),Object(Se.useCallback)(function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[k,D])),B=Object(Se.useCallback)(function(){P({type:"focus"})},[]),M=Object(Se.useCallback)(function(){P({type:"blur"})},[]),A=Object(Se.useRef)([]),z=(Object(Se.useEffect)(function(){return x&&(document.addEventListener("dragover",Ba,!1),document.addEventListener("drop",n,!1)),function(){x&&(document.removeEventListener("dragover",Ba),document.removeEventListener("drop",n))}},[k,x]),Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),A.current=[].concat(ke(A.current),[t.target]),ja(t)&&Promise.resolve(w(t)).then(function(e){Za(t)||(P({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),g&&g(t))})},[w,g])),V=Object(Se.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return ja(e)&&v&&v(e),!1},[v]),H=Object(Se.useCallback)(function(e){e.preventDefault(),e.persist();var t=A.current.filter(function(e){return k.current&&k.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(A.current=t).length||(P({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ja(e)&&y&&y(e))},[k,y]),I=Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),A.current=[],ja(t)&&Promise.resolve(w(t)).then(function(e){var a,s;Za(t)||(a=[],s=[],e.forEach(function(e){var t=Ce(ns(e,p),2),n=t[0],t=t[1],r=Ce(rs(e,d,h),2),o=r[0],r=r[1],i=C?C(e):null;n&&o&&!i?a.push(e):(n=[t,r],o=(n=i?n.concat(i):n).filter(function(e){return e}),s.push({file:e,errors:o}))}),P({acceptedFiles:a,fileRejections:s,type:"setFiles"}),b&&b(t,a,s),0<s.length&&S&&S(t,s),0<a.length&&_&&_(t,a))}),P({type:"reset"})},[m,p,d,h,w,b,_,S]),j=Object(Se.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=e.onDragEnterCallback,r=e.onDragOverCallback,o=e.onDragLeaveCallback,i=e.onDropCallback,e=U(e,Ss);return Ee(we({onDragEnter:a(za(n,z)),onDragOver:a(za(r,V)),onDragLeave:a(za(o,H)),onDrop:a(za(i,I))},t,k),e)}},[k,j,B,M,z,V,H,I,f]),K=Object(Se.useCallback)(function(e){e.stopPropagation()},[]),B=Object(Se.useMemo)(function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,t=void 0===t?"ref":t,n=e.onChange,r=e.onClick,e=U(e,Es);return Ee(Ee({},we({accept:p,multiple:m,type:"file",style:{display:"none"},onChange:a(za(n,I)),onClick:a(za(r,K)),autoComplete:"off",tabIndex:-1},t,D)),e)}},[D,p,m,I,f]),R=0<(M=T.length)&&(F=(R={accept:p,minSize:d,maxSize:h,multiple:m,files:T}).files,r=R.accept,o=R.minSize,i=R.maxSize,!(!R.multiple&&1<F.length))&&F.every(function(e){var t=Ce(ns(e,r),1)[0],e=Ce(rs(e,o,i),1)[0];return t&&e}),F=0<M&&!R,M=F?(s=(M={accept:p,minSize:d,maxSize:h,multiple:m,files:T}).files,l=M.accept,c=M.minSize,u=M.maxSize,!M.multiple&&1<s.length?"TOO_MANY_FILES":(M=s.every(function(e){return!Ce(ns(e,l),1)[0]}),s=s.every(function(e){return!Ce(rs(e,c,u),1)[0]}),M?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return Ee(Ee({},O),{},{isDragAccept:R,isDragReject:F,getRootProps:j,getInputProps:B,rootRef:k,inputRef:D,draggedFiles:T,fileError:M,isFocused:e&&!f,open:a(L)})}function vs(e){var t=e.accept,n=e.multiple,r=e.uploadButtonLabel,o=e.disabled,i=e.name,a=e.className,s=e.id,l=e.onChange,e=Oe(e),a=De(we({},"FileUploaderButton",!0),a);return Se.createElement("div",xe({},e,{className:a}),Se.createElement(Pe,{type:"button",disabled:o,icon:"backup"},r),Se.createElement("input",{name:i,id:s,"data-test":"DesignSystem-FileUploaderButton--Input",accept:t&&t.join(", "),multiple:n,disabled:o,type:"file",tabIndex:-1,className:"FileUploaderButton-input",onChange:function(e){var t=e.target.files?Array.from(e.target.files):[];l&&l(t,e)}}))}function bs(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=ke(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(ke(r.slice(0,o)),ke(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function _s(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Ss=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Es=["refKey","onChange","onClick"],ws={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]},xs=(ys.displayName="DropzoneBase",ys.defaultProps={disabled:!1,getFilesFromEvent:function(e){return as.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}},Ee(Ee({},ys.defaultProps),{},{type:"standard"}),vs.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},vs.displayName="FileUploaderButton",Object.assign({},vs.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"}),function(e,t,n){var r=e.updateColumnSchema,o=null==n?void 0:n.getBoundingClientRect().x;function i(e){e.preventDefault(),o&&r(t,{width:e.pageX-o})}window.addEventListener("mousemove",i),window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",i)})});function Cs(e,t){var n,r=e.ref,e=e.withCheckbox;return"string"==typeof t&&"%"===t.slice(-1)?(n=r.querySelector(".Grid-cell--checkbox"),e=e?(null==n?void 0:n.clientWidth)||28:0,(r.clientWidth-e)*(+t.slice(0,-1)/100)):t}function ks(e,t,n,r){var o,i=ke(e),a=O(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=Ee(Ee({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function Ds(e,t){var n=Ee({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?Ee(Ee({},n[e.name]),t):t),null!==n[e.name]&&"object"===Z(n[e.name])||(n[e.name]={title:n[e.name]}),n}function Os(e,t){return Math.ceil(e/t)}function Ps(e,t,n){var r;return!n&&(n=e.filter(function(e){return e.disabled&&t||!e.disabled})).length?(e=n.some(function(e){return!e._selected}),r=n.every(function(e){return!e._selected}),{indeterminate:n=0<=n.length&&e&&!r,checked:!n&&!r}):{indeterminate:!1,checked:!1}}function Ts(e){var t=Se.useContext(Gs),n=e.isHead,r=e.firstCell,o=e.schema,i=e.data,a=e.rowIndex,s=e.colIndex,l=e.expandedState,c=e.onSelectAll,u=e.onMenuChange,p=e.onFilterChange,f=e.updateColumnSchema,h=e.reorderColumn,e=e.nestedRowData,d=t.draggable,m=t.separator,g=t.nestedRows,y=t.ref,t=t.withCheckbox,v=o.name,b=o.hidden,_=o.pinned,S=(w={AVATAR:{minWidth:48},AVATAR_WITH_TEXT:{width:256},AVATAR_WITH_META_LIST:{width:256},ICON:{minWdth:48},STATUS_HINT:{width:96},WITH_META_LIST:{width:176},DEFAULT:{width:176}}[void 0===(w=o.cellType)?"DEFAULT":w]).width,E=void 0===(E=w.minWidth)?96:E,w=void 0===(w=w.maxWidth)?800:w,x=(k=Ce(Se.useState(!1),2))[0],C=k[1],k=De({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":x&&d,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:m),"Grid-cell--nestedRow":!n&&0===s&&g});return b?null:Se.createElement("div",{key:"".concat(a,"-").concat(s),className:k,draggable:n&&d,onDragStart:function(e){d&&(C(!0),e.dataTransfer.setData("name",v),_)&&e.dataTransfer.setData("type",_)},onDrag:function(){C(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){C(!1)},onDragEnd:function(e){e.preventDefault(),C(!1)},onDrop:function(e){var t;d&&(C(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:v,type:_||""}).type)&&h&&h(e.name,t.name)},style:{width:Cs({ref:y,withCheckbox:t},o.width||S),minWidth:Cs({ref:y,withCheckbox:t},o.minWidth||E),maxWidth:Cs({ref:y,withCheckbox:t},o.maxWidth||w)}},n?Se.createElement(Ys,{colIndex:s,schema:o,onSelectAll:c,onMenuChange:u,onFilterChange:p,updateColumnSchema:f,reorderColumn:h,setIsDragged:C}):Se.createElement($s,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:l,nestedRowData:e}))}function Ms(e){function t(e,t,r){var n;return e.length?(n=De((we(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),we(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n},t&&c?Se.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},u?Se.createElement(q,null):Se.createElement(ft,xe({},p,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:f.length+t;return"right"===r&&(n+=h.length),Se.createElement(Ts,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:l})}))):null}var n=Se.useContext(Gs),r=e.schema,o=e.onSelectAll,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,l=e.reorderColumn,c=n.withCheckbox,u=n.loading,p=n.selectAll,f=(e=r.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),n=e.filter(function(e){return!e.hidden&&"right"===e.pinned}),h=r.filter(function(e){return!e.hidden&&!e.pinned});return Se.createElement("div",{className:"Grid-head","data-test":"DesignSystem-GridHead-wrapper"},Se.createElement("div",{className:"Grid-row Grid-row--head"},t(f,!!f.length,"left"),t(h,!f.length&&!!h.length),t(n,!1,"right")))}function As(e){function t(e,t,r){var n;return e.length?(n=De((we(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),we(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&l?Se.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},s?Se.createElement(q,null):Se.createElement(ft,{checked:!!p._selected,onChange:function(e){h(f,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:b.length+t;return"right"===r&&(n+=S.length),Se.createElement(Ts,{key:"".concat(f,"-").concat(n),rowIndex:f,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[m,g],nestedRowData:E})}))):null}var n,r,o,i=(c=Se.useContext(Gs)).type,a=c.onRowClick,s=c.loading,l=c.withCheckbox,c=c.nestedRows,u=e.schema,p=e.data,f=e.rowIndex,h=e.onSelect,e=e.className,d=Se.useRef(null),m=(y=Ce(Se.useState(!1),2))[0],g=y[1],y=De("Grid-row","Grid-row--body",{"Grid-row--selected":p._selected,"Grid-row--disabled":p.disabled}),v=Se.useCallback(function(){"resource"!==i||s||a&&a(p,f)},[p,f]),b=(_=u.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),_=_.filter(function(e){return!e.hidden&&"right"===e.pinned}),S=u.filter(function(e){return!e.hidden&&!e.pinned}),E=(u={data:p,rowIndex:f,expanded:m},n=Se.useContext(Gs),r=n.schema,w=n.nestedRowRenderer,o=u.data,w?w({data:o,schema:r,loading:n.loading,rowIndex:u.rowIndex,expanded:u.expanded}):null),w=De(e,{"Grid-rowWrapper":!0});return Se.createElement("div",{className:w},Se.createElement("div",{"data-test":"DesignSystem-Grid-row",className:y,onClick:v,ref:d},t(b,!!b.length,"left"),t(S,!b.length&&!!S.length),t(_,!1,"right")),c&&m&&Se.createElement("div",{className:"Grid-nestedRow"},E))}function Is(e){var n,t,r,o,i=Se.useContext(Gs),a=i.data,s=i.ref,l=i.loading,c=i.withPagination,u=i.page,p=i.pageSize,f=i.totalRecords,h=i.errorTemplate;return!l&&i.error?h?"function"==typeof h?h({}):h:null:(n=e.schema,t=e.prevPageInfo,r=e.updatePrevPageInfo,o=e.onSelect,Se.useEffect(function(){var e=s.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){t.page===u&&(e.scrollTop=t.scrollTop)}),function(){e&&r({page:u,scrollTop:e.scrollTop})}},[]),i=Math.ceil(f/p),h=c&&u===i?f-(u-1)*p:l?p:c?Math.min(f,p):f,Se.createElement("div",{className:"Grid-body"},(l&&!a.length?ke(Array(h).map(function(e){return e})):a).map(function(e,t){return t=t,e=e,Se.createElement(As,{key:t,rowIndex:t,data:e||a[t],schema:n,onSelect:o})})))}function Rs(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?Se.createElement(M,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},Se.createElement(Te,{className:"w-100 ellipsis"},e)):Se.createElement(Te,{className:"w-100 ellipsis"},e):null}function Fs(e){return(e=e.cellData.metaList)?Se.createElement("div",{className:"GridCell-metaList","data-test":"DesignSystem-GridCell-metaList"},e.map(function(e,t){return Se.createElement(Te,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function Ns(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?Se.createElement(ue,{className:"mr-5",firstName:t,lastName:n}):e?Se.createElement(ue,{className:"mr-5"},e):null}function Ls(e){var t=(e=e.cellData).title;return(e=e.icon||t)?Se.createElement(R,{name:e}):null}function js(e){var t=(e=e.cellData).statusAppearance;return(e=e.title)?Se.createElement(Jn,{appearance:t},e):null}function Bs(e){var t=e.options,n=e.onChange,r=(e=Ce(Se.useState(!1),2))[0],o=e[1],i=(e=Ce(Se.useState(t),2))[0],a=e[1],s=(e=Ce(Se.useState("var(--spacing-8)"),2))[0],l=e[1];return Se.useEffect(function(){a(t)},[r]),Se.createElement("div",{className:"Dropdown"},Se.createElement(Ua,{open:r,onToggle:function(e){o(e)},trigger:Se.createElement(Pe,{type:"button",ref:function(e){l("".concat(null==e?void 0:e.clientWidth,"px"))},size:"tiny",appearance:"transparent",icon:"keyboard_arrow_down_filled",iconAlign:"right"},"Showing ".concat(t.filter(function(e){return e.selected}).length," of ").concat(t.length," column").concat(Ws(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},Se.createElement("div",{className:"Dropdown-wrapper"},Se.createElement("div",{className:"OptionWrapper"},Se.createElement(ft,{className:"OptionCheckbox",label:"Select All",checked:i.every(function(e){return e.selected}),indeterminate:i.some(function(e){return e.selected})&&i.some(function(e){return!e.selected}),onChange:function(t){a(i.map(function(e){return Ee(Ee({},e),{},{selected:t.target.checked})}))}})),i.map(function(e,r){return Se.createElement("div",{"data-test":"DesignSystem-Table-Header--draggableDropdownOption",key:e.value,className:"OptionWrapper d-flex flex-space-between align-items-center cursor-pointer",draggable:!0,onDragStart:function(e){e.dataTransfer.setData("index","".concat(r))},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){e=+e.dataTransfer.getData("index");e!==r&&a(Ks(i,e,r))}},Se.createElement(ft,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=ke(i))[t]=Ee(Ee({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),Se.createElement(R,{name:"drag_handle",className:"mr-4"}))})),Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Pe,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),Se.createElement(Pe,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function zs(e){var t=e.loading,n=e.error,r=e.data,o=e.displayData,i=e.schema,a=e.withSearch,s=e.showHead,l=e.withPagination,c=e.page,u=e.pageSize,p=e.withCheckbox,f=e.children,h=e.updateSchema,d=void 0===(g=e.filterList)?{}:g,m=e.updateFilterList,g=void 0===(g=e.totalRecords)?0:g,y=e.onSelectAll,v=e.searchPlaceholder,b=e.selectAll,N=e.searchTerm,_=e.updateSearchTerm,S=e.globalActionRenderer,L=e.dynamicColumn,j=e.allowSelectAll,B=e.showFilters,E=e.customSelectionLabel,w=e.selectedRowsRef,x=e.selectedAllRef,z=e.onClearSelection,V=e.onSelectAllRows,C=e.selectionActionRenderer,e=e.uniqueColumnName,k=(D=Ce(Se.useState(!1),2))[0],H=D[1],K=(D=Ce(Se.useState(!0),2))[0],U=D[1],D=E||"item",E=r.filter(function(e){return e._selected}).length,r=(c-1)*u+1,c=Math.min(c*u,g),u=!0===(null==x?void 0:x.current)?g:(null==w||null==(u=w.current)?void 0:u.length)||0,O=p&&(E||0<u),P=(F=Ce(Se.useState(!0),2))[0],T=F[1],M=(F=Ce(Se.useState(!1),2))[0],A=F[1],I=(F=Ce(Se.useState(!1),2))[0],R=F[1],F=(Se.useEffect(function(){O?(R(!0),A(!1)):(R(!1),A(!0))},[O]),De({"Table-Header-Label--hide":I&&O,"Table-Header-Label--show":I&&!O})),I=De({"Table-Header-Label--hide":M&&!O,"Table-Header-Label--show":M&&O}),M=(Se.useEffect(function(){U(!K)},[i]),Se.useEffect(function(){b&&b.checked&&y&&y(!0,k)},[k]),Se.useEffect(function(){b&&!b.checked&&H(!1)},[b]),i.filter(function(e){return e.filters})),W=i.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}});return Se.createElement("div",{className:"Header"},Se.createElement("div",{className:"Header-content Header-content--top"},Se.createElement("div",{className:"d-flex w-100"},a&&Se.createElement("div",{className:"Header-search"},Se.createElement(Tn,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:v,onChange:function(e){e=e.target.value;_&&_(e)},value:N,onClear:function(){return _&&_("")},disabled:t&&!Us(i),autoComplete:"off"})),B&&0<M.length&&Se.createElement("div",{className:"Header-dropdown"},Se.createElement("div",{className:"Header-filters"},M.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return Ee(Ee({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return Se.createElement(wn,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=Ee(Ee({},d),{},we({},t,e)),m&&m(t)}})}))),f&&Se.createElement("div",{className:"Header-actions"},f)),S&&Se.createElement("div",{className:"Header-global-actions"},S(o))),Se.createElement("div",{className:"Header-content Header-content--bottom"},Se.createElement("div",{className:"Header-label"},!s&&p&&!t&&Se.createElement(ft,xe({},b,{onChange:function(e){y&&y(e.target.checked)}})),t?Se.createElement(q,{withImage:!s&&p},Se.createElement(G,{length:"small",size:"s"})):Se.createElement(Se.Fragment,null,P?Se.createElement("span",{className:I,onAnimationEnd:function(){T(!!O),A(!1),R(!0)}},Se.createElement(Ln,null,0<u&&e&&p?"Selected ".concat(u," ").concat(D).concat(Ws(u)):E&&!e&&p?"Selected ".concat(E," ").concat(D).concat(Ws(E)):(l?"Showing ".concat(r,"-").concat(c," of "):"Showing ").concat(g," ").concat(D).concat(Ws(g)))):Se.createElement("span",{className:F,onAnimationEnd:function(){T(!!O),A(!0),R(!1)}},Se.createElement(Ln,null,n?"Showing 0 ".concat(D,"s"):(l?"Showing ".concat(r,"-").concat(c," of "):"Showing ").concat(g," ").concat(D).concat(Ws(g)))),0<u&&j&&P&&Se.createElement("div",{className:I},Se.createElement("div",{className:"ml-4 d-flex"},Se.createElement(Pe,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",disabled:u===g,onClick:V},"Select ".concat(g," ").concat(D,"s")),Se.createElement(Pe,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",className:"ml-4",onClick:z},"Clear Selection"),C&&Se.createElement(rl,{vertical:!0,className:"mx-4 Table-Header--Divider"}))),C&&0<u&&P&&Se.createElement("div",{"data-test":"DesignSystem-Table-Header--ActionRenderer",className:I},C(null==w?void 0:w.current,null==x?void 0:x.current)))),L&&Se.createElement("div",{className:"Header-hideColumns"},Se.createElement(Bs,{options:W,onChange:function(e){e=e.map(function(t){return Ee(Ee({},i.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});h&&h(e)}}))))}function Vs(e,t,n,r,o){return e.map(function(e){return o||e._selected&&!r||n&&e[n]&&t&&Xs(t,n,e[n])&&!r?e._selected=!0:e._selected=!1,e})}function Hs(e,t){return t?Qs(e,t):e}var Ks=function(e,t,n){return t===n?e:t<n?[].concat(ke(e.slice(0,t)),ke(e.slice(t+1,n+1)),[e[t]],ke(e.slice(n+1))):[].concat(ke(e.slice(0,n)),[e[t]],ke(e.slice(n,t)),ke(e.slice(t+1)))},Us=function(e){return e&&!!e.length},Ws=function(e){return 1<e?"s":""},o={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},Gs=Se.createContext(Ee(Ee({},o),{},{ref:null})),qs=Gs.Provider,Ys=function(e){function t(){return Se.createElement(Se.Fragment,null,Se.createElement(Te,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),g&&Se.createElement("div",{className:"Grid-sortingIcons"},_?"asc"===_?Se.createElement(R,{name:"arrow_upward"}):Se.createElement(R,{name:"arrow_downward"}):Se.createElement(R,{name:"unfold_more"})))}var n=Se.useContext(Gs),r=e.schema,o=e.setIsDragged,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,e={schema:r,colIndex:e.colIndex,onSelectAll:e.onSelectAll,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:e.reorderColumn,setIsDragged:o},l=n.loading,c=n.draggable,u=n.showMenu,p=n.sortingList,f=n.filterList,h=n.headCellTooltip,d=n.showFilters,m=r.sorting,g=void 0===m||m,y=r.name,m=r.filters,v=r.pinned,n=Us(n.schema),b=p.findIndex(function(e){return e.name===y}),_=-1!==b?p[b].type:null,S=Se.createRef(),p=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],b=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],E={label:"Unpin",value:"unpin",icon:"replay"},E=("left"===v&&(b[0]=E),"right"===v&&(b[1]=E),{label:"Unsort",value:"unsort",icon:"unfold_more"}),E=("asc"===_&&(p[0]=E),"desc"===_&&(p[1]=E),[].concat(b,[{label:"Hide Column",value:"hide",icon:"cancel"}])),b=(g&&(E=[].concat(p,ke(E))),De({"Grid-headCell":!0,"Grid-headCell--draggable":c})),p=m?m.map(function(t){return Ee(Ee({},t),{},{selected:f[y]&&-1!==f[y].findIndex(function(e){return e===t.value})})}):[];return Se.createElement("div",{key:y,className:b,ref:S},Se.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&g&&("asc"===_&&i(y,"sortDesc"),"desc"===_&&i(y,"unsort"),_||i(y,"sortAsc"))}},l&&!n?Se.createElement(q,{withImage:!1},Se.createElement(G,{length:"medium"})):!r.headerCellRenderer&&h?Se.createElement(M,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!h?r.headerCellRenderer(e):t()),d&&m&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",null,Se.createElement(q,null)):Se.createElement("div",null,Se.createElement(wn,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return Se.createElement(Pe,{icon:"filter_list",appearance:"transparent"})}},options:p,align:"left",onChange:function(e){return a(y,e)},minWidth:176}))),u&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",{className:"ml-4"},Se.createElement(q,null)):Se.createElement("div",null,Se.createElement(wn,{key:"".concat(y,"-").concat(_,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return Se.createElement(Pe,{icon:"more_vert_filled",appearance:"transparent"})}},options:E,align:"left",onChange:function(e){return i(y,e)},minWidth:176}))),r.resizable&&Se.createElement("span",{className:"Grid-cellResize",onMouseDown:function(){xs({updateColumnSchema:s},y,S.current),o(!1)}}))},$s=function(e){var t=Se.useContext(Gs),n=e.data,r=e.schema,o=e.rowIndex,i=e.colIndex,a=e.nestedRowData,s=t.size,l=t.loading,t=t.nestedRows,e=Ce(e.expandedState,2),c=e[0],u=e[1],e={rowIndex:o,colIndex:i,size:s,schema:r,data:n,loading:l,expanded:c};return Se.createElement("div",{className:"Grid-cellContent"},0===i&&t&&Se.createElement(Se.Fragment,null,a?Se.createElement(R,{className:"Grid-nestedRowTrigger",name:c?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){a&&(e.stopPropagation(),u(!c))}}):Se.createElement("span",{className:"Grid-nestedRowPlaceholder"})),r.cellRenderer?r.cellRenderer(e):Se.createElement(Zs,xe({key:"".concat(o,"-").concat(i)},e)))},Js=(As.defaultProps={data:{}},(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var i;h(this,n),we(Y(i=t.call(this,e)),"gridRef",null),we(Y(i),"isHeadSyncing",!1),we(Y(i),"isBodySyncing",!1),we(Y(i),"syncScroll",function(n){return function(){var e=i.gridRef.querySelector(".Grid-head"),t=i.gridRef.querySelector(".Grid-body");"head"===n&&(i.isHeadSyncing||(i.isBodySyncing=!0,t.scrollLeft=e.scrollLeft),i.isHeadSyncing=!1),"body"===n&&(i.isBodySyncing||(i.isHeadSyncing=!0,e.scrollLeft=t.scrollLeft),i.isBodySyncing=!1)}}),we(Y(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),we(Y(i),"updateColumnSchema",function(t,e){var n=ke(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=Ee(Ee({},n[r]),e),i.updateRenderedSchema(n)}),we(Y(i),"reorderColumn",function(t,n){var e=i.props.schema,r=e.findIndex(function(e){return e.name===t}),o=e.findIndex(function(e){return e.name===n}),e=Ks(e,r,o);i.updateRenderedSchema(e)}),we(Y(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),we(Y(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),we(Y(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":bs({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":bs({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":bs({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":_s({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":_s({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":_s({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),we(Y(i),"onFilterChange",function(e,t){e=Ee(Ee({},i.props.filterList),{},we({},e,t));i.updateFilterList(e)}),we(Y(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),we(Y(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked,void 0,!0)}),we(Y(i),"updatePrevPageInfo",function(e){i.setState({prevPageInfo:e})});return i.state={init:!1,prevPageInfo:{page:1,scrollTop:0}},i}return a(n,[{key:"componentDidMount",value:function(){this.setState({init:!0}),window.addEventListener("resize",this.forceRerender.bind(this))}},{key:"forceRerender",value:function(){this.forceUpdate()}},{key:"componentWillUnmount",value:function(){this.removeScrollListeners(),window.removeEventListener("resize",this.forceRerender.bind(this))}},{key:"componentDidUpdate",value:function(e,t){t.init!==this.state.init&&this.addScrollListeners(),e.page===this.props.page&&e.error===this.props.error||(this.removeScrollListeners(),this.addScrollListeners())}},{key:"addScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.addEventListener("scroll",this.syncScroll("head")),t.addEventListener("scroll",this.syncScroll("body")))}},{key:"removeScrollListeners",value:function(){var e=this.gridRef.querySelector(".Grid-head"),t=this.gridRef.querySelector(".Grid-body");e&&t&&(e.removeEventListener("scroll",this.syncScroll("head")),t.removeEventListener("scroll",this.syncScroll("body")))}},{key:"render",value:function(){var t=this,e=Oe(this.props),n=this.state,r=n.init,n=n.prevPageInfo,o=this.props,i=o.type,a=o.size,s=o.showHead,l=o.className,c=o.page,u=(p=this.props.schema,u=o.loading,o=o.loaderSchema,p=!Us(p=p)&&u?o:p),p=De((we(o={Grid:"true"},"Grid--".concat(i),i),we(o,"Grid--".concat(a),a),o),l);return Se.createElement("div",xe({className:p},e,{ref:function(e){t.gridRef=e}}),r&&Se.createElement(qs,{value:Ee(Ee({},this.props),{},{ref:this.gridRef})},s&&Se.createElement(Ms,{schema:u,onSelectAll:null==(i=this.onSelectAll)?void 0:i.bind(this),onMenuChange:this.onMenuChange.bind(this),onFilterChange:this.onFilterChange.bind(this),updateColumnSchema:this.updateColumnSchema.bind(this),reorderColumn:this.reorderColumn.bind(this)}),Se.createElement(Is,{key:"".concat(c),schema:u,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n})()),Zs=(we(Js,"defaultProps",void 0),Js.defaultProps=o,function(e){var t=e.size,n=e.schema,r=e.loading,e=r?{}:Ds(n,e.data),o=n.name,i=n.cellType,i=void 0===i?"DEFAULT":i,a=n.align,s=void 0===a?"left":a,l=n.tooltip,c=e[o],u=De(we({},"GridCell",!0));switch(i){case"DEFAULT":return Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--default")},r?Se.createElement(G,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):Rs({tooltip:l,cellData:c}));case"WITH_META_LIST":return Se.createElement("div",{className:"".concat(u," GridCell--metaList")},r?Se.createElement(Se.Fragment,null,Se.createElement(G,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),Se.createElement(G,{length:"large",size:"xxs"})):Se.createElement(Se.Fragment,null,Rs({tooltip:l,cellData:c}),Fs({cellData:c})));case"AVATAR":return r?Se.createElement(q,{className:"GridCell--align-".concat(s),imageSize:"medium",round:!0}):Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==t&&Ns({cellData:c}));case"AVATAR_WITH_TEXT":return r?Se.createElement(q,{imageSize:"medium",round:!0},Se.createElement(G,{className:"ml-3",length:"medium"})):Se.createElement("div",{className:"".concat(u," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==t&&Ns({cellData:c}),Rs({tooltip:l,cellData:c}));case"AVATAR_WITH_META_LIST":return r?Se.createElement(q,{imageSize:"medium",round:!0},Se.createElement(G,{className:"ml-3",length:"medium"}),Se.createElement(G,{className:"ml-3",length:"large"})):Se.createElement("div",{className:"".concat(u," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==t&&Ns({cellData:c}),Se.createElement("div",{className:"GridCell-metaListWrapper"},Rs({tooltip:l,cellData:c}),Fs({cellData:c})));case"ICON":return r?Se.createElement(q,{className:"GridCell--align-".concat(s),imageSize:"small",round:!0}):Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--icon"),"data-test":"DesignSystem-GridCell-icon"},Ls({cellData:c}));case"STATUS_HINT":return Se.createElement("div",{className:"".concat(u," GridCell--align-").concat(s," GridCell--statusHint")},r?Se.createElement(q,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},Se.createElement(G,{length:"large"})):js({cellData:c}))}return null}),Xs=(Zs.displayName="GridCell",function(e,t,n){return 0<(null==e?void 0:e.filter(function(e){return e[t]===n})).length}),Qs=function(e,t){var n=new Set;return e.filter(function(e){e=e[t];return!n.has(e)&&(n.add(e),!0)})},el=["children"],n={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],displayData:[],schema:[],loading:!(zs.defaultProps={schema:[],data:[],searchPlaceholder:"Search",dynamicColumn:!0,showFilters:!0}),error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,pageJumpDebounceDuration:750,errorTemplate:function(e){e=e.errorType;return Se.createElement(kn,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},c=(()=>{e(o,Se["Component"]);var r=d(o);function o(e){h(this,o),we(Y(p=r.call(this,e)),"debounceUpdate",void 0),we(Y(p),"selectedRowsRef",Se.createRef()),we(Y(p),"clearSelectionRef",Se.createRef()),we(Y(p),"selectAllRef",Se.createRef()),we(Y(p),"updateData",function(e){p.state.async&&p.setState({loading:!0}),e?p.debounceUpdate():p.updateDataFn()}),we(Y(p),"updateDataFn",function(){var e=p.props,t=e.fetchData,n=e.pageSize,r=e.withPagination,o=e.data,i=e.onSearch,a=e.uniqueColumnName,e=p.state,s=e.async,l=e.page,c=e.sortingList,u=e.filterList,e=e.searchTerm,e=(p.onSelect(-1,!1),{page:l,pageSize:n,sortingList:c,filterList:u,searchTerm:e});p.props.withPagination||(delete e.page,delete e.pageSize),s?t&&t(e).then(function(e){var t,n,r,o;e.searchTerm&&(e.searchTerm,e.searchTerm!==p.state.searchTerm)||(t=e.data,n=JSON.parse(JSON.stringify(t)),r=(p.state.schema.length?p.state:e).schema,o=t.filter(function(e){return e._selected}),p.clearSelectionRef.current?p.selectedRowsRef.current=[]:p.selectedRowsRef.current=p.selectedRowsRef.current?Hs([].concat(ke(p.selectedRowsRef.current),ke(o)),a):Hs(ke(o),a),o=Vs(n,p.selectedRowsRef.current,a,p.clearSelectionRef.current,p.selectAllRef.current),p.setState({data:o,displayData:t,schema:r,selectAll:Ps(o,p.props.selectDisabledRow,p.clearSelectionRef.current),totalRecords:e.count,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND"}))}).catch(function(){p.setState({loading:!1,error:!0,errorType:"FAILED_TO_FETCH"})}):(t=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=2<arguments.length?arguments[2]:void 0,a=e;return i&&Object.keys(i).forEach(function(t){var n=i[t],e=o.findIndex(function(e){return e.name===t}),r=o[e].onFilterChange;n.length&&r&&(a=a.filter(function(e){return r(e,n)}))}),a}(s=p.state.schema,o,u),i=(u=o=function(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],t=2<arguments.length?arguments[2]:void 0,i=ke(e);return null!=t&&t.forEach(function(n){var e,r=o.findIndex(function(e){return e.name===n.name});-1!==r&&(e=o[r].comparator,i.sort(void 0===e?function(e,t){e=Ds(o[r],e),t=Ds(o[r],t);return e[n.name].title.localeCompare(t[n.name].title)}:e),"desc"===n.type)&&i.reverse()}),i}(s,i&&void 0!==e.searchTerm?i(t,e.searchTerm):t,c)).length,r&&l&&n&&(u=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0,t=(t-1)*n;return e.slice(t,t+n)}(u,l,n)),e=p.state.schema.length?p.state.schema:s,t=u.filter(function(e){return e._selected}),c=JSON.parse(JSON.stringify(u)),p.clearSelectionRef.current?p.selectedRowsRef.current=[]:p.selectedRowsRef.current=p.selectedRowsRef.current?Hs([].concat(ke(p.selectedRowsRef.current),ke(t)),a):Hs(ke(t),a),r=Vs(c,p.selectedRowsRef.current,a,p.clearSelectionRef.current,p.selectAllRef.current),p.setState({totalRecords:i,error:!u.length,errorType:"NO_RECORDS_FOUND",selectAll:Ps(u,p.props.selectDisabledRow,p.clearSelectionRef.current),schema:e,displayData:o,data:r}))}),we(Y(p),"onSelect",function(e,t){var n,r,o,i=p.state.data,a=p.props,s=a.onSelect,l=a.uniqueColumnName;p.selectAllRef.current&&-1!==e&&!t?(p.selectAllRef.current=!1,p.selectedRowsRef.current=[],a=Array.from({length:i.length},function(e,t){return t}),r=ks(i,a,{_selected:!1},p.props.selectDisabledRow),p.setState({data:r,selectAll:{checked:!1,indeterminate:!1}}),s&&(p.props.uniqueColumnName?s(a,t,p.selectedRowsRef.current,p.selectAllRef.current):s(a,t,-1===e?[]:r.filter(function(e){return e._selected})))):(a=[e],n=i[e],r=-1===e?[]:[n],o=i,0<=e?(o=ks(i,a,{_selected:t},p.props.selectDisabledRow),p.resetClearSelection(),p.setState({data:o,selectAll:Ps(o,p.props.selectDisabledRow,p.clearSelectionRef.current)}),p.selectedRowsRef.current&&t&&(r=[Ee(Ee({},n),{},{_selected:t})].concat(ke(p.selectedRowsRef.current))),!t&&l&&(r=p.selectedRowsRef.current.filter(function(e){return e[l]!==n[l]})),p.selectedRowsRef.current=Hs(r,l)):-1===e&&p.selectedRowsRef.current&&(r=p.selectedRowsRef.current),s&&(p.props.uniqueColumnName?s(a,t,-1===e&&0===(null==(i=r)?void 0:i.length)?[]:p.selectedRowsRef.current,p.selectAllRef.current):s(a,t,-1===e?[]:o.filter(function(e){return e._selected}))))}),we(Y(p),"onSelectAll",function(e,t,n){var r=p.props,o=r.onSelect,i=r.uniqueColumnName,r=p.state.data,a=Array.from({length:r.length},function(e,t){return t}),s=ks(r,a,{_selected:e},p.props.selectDisabledRow),l=[],r=(s.forEach(function(e,t){e._selected&&l.push(t)}),[]);e?(p.resetClearSelection(),r=void 0===t?[].concat(ke(p.selectedRowsRef.current||[]),ke(s.filter(function(e){return e._selected}))):p.selectedRowsRef.current):!e&&n&&i?(p.selectAllRef.current=!1,p.selectedRowsRef.current=[].concat(ke(p.selectedRowsRef.current||[]),ke(s)),p.selectedRowsRef.current=p.selectedRowsRef.current.filter(function(t){return!s.some(function(e){return t[i]===e[i]})})):(p.selectedRowsRef.current=[],p.selectAllRef.current=!1),n&&!e||(p.selectedRowsRef.current=Hs(r,i)),o&&(p.props.uniqueColumnName?o(l,e,Hs(n&&!e?p.selectedRowsRef.current:r,i),p.selectAllRef.current):o(l,e,s.filter(function(e){return e._selected}),t)),p.setState({data:s,selectAll:Ps(s,p.props.selectDisabledRow)})}),we(Y(p),"onPageChange",function(e){p.setState({page:e})}),we(Y(p),"updateSchema",function(e){p.setState({schema:e})}),we(Y(p),"updateSortingList",function(e){var t=p.props.multipleSorting;p.setState({sortingList:t?ke(e):e.slice(-1),page:1})}),we(Y(p),"updateFilterList",function(e){p.setState({filterList:e,page:1})}),we(Y(p),"updateSearchTerm",function(e){p.setState({searchTerm:e,page:1})}),we(Y(p),"onClearSelection",function(){p.selectedRowsRef.current=[],p.clearSelectionRef.current=!0,p.selectAllRef.current=!1,p.onSelectAll(!1),p.setState({selectAll:Ps([],p.props.selectDisabledRow,p.clearSelectionRef.current)})}),we(Y(p),"resetClearSelection",function(){p.clearSelectionRef.current=!1}),we(Y(p),"onSelectAllRows",function(){p.selectAllRef.current=!!p.props.uniqueColumnName,p.onSelectAll(!0,!0)});var p,t="fetchData"in p.props,n=e.data||[];return p.state={async:t,data:t?[]:n,displayData:t?[]:n,schema:t?[]:e.schema||[],page:e.page,sortingList:e.sortingList,filterList:e.filterList,totalRecords:t?0:n.length,loading:t||e.loading,error:!t&&e.error,errorType:e.errorType,selectAll:Ps([]),searchTerm:void 0},p.debounceUpdate=rn(e.searchDebounceDuration,p.updateDataFn),p}return a(o,[{key:"componentDidMount",value:function(){this.updateData()}},{key:"componentDidUpdate",value:function(e,t){var n,r,o=this;this.state.async||(e.error!==this.props.error&&(r=(n=this.props).data,this.setState({data:r=void 0===r?[]:r,displayData:r,schema:void 0===(n=n.schema)?[]:n,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:r.length||0,selectAll:Ps([])})),e.loading!==this.props.loading&&(r=(n=this.props).data,this.setState({data:e=void 0===r?[]:r,displayData:e,schema:void 0===(r=n.schema)?[]:r,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:Ps([])},function(){o.updateData()}))),t.page!==this.state.page&&(n=this.props.onPageChange)&&n(this.state.page),t.page===this.state.page&&t.filterList===this.state.filterList&&t.sortingList===this.state.sortingList&&t.searchTerm===this.state.searchTerm||this.props.loading||(r=t.searchTerm!==this.state.searchTerm,this.updateData(r))}},{key:"render",value:function(){var e=this.props,t=e.showHead,n=e.type,r=e.size,o=e.headCellTooltip,i=e.separator,a=e.draggable,s=e.nestedRows,l=e.nestedRowRenderer,c=e.withHeader,u=e.headerOptions,p=e.withCheckbox,f=e.showMenu,h=e.withPagination,d=e.paginationType,m=e.pageSize,g=e.pageJumpDebounceDuration,y=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,_=e.className,S=e.filterPosition,e=e.uniqueColumnName,E=Oe(this.props),w=u.children,u=U(u,el),_=_?" ".concat(_):"",x=this.state.totalRecords,C=Os(x,m);return Se.createElement("div",xe({},E,{className:"Table".concat(_),"data-test":"DesignSystem-Table-wrapper"}),c&&Se.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},Se.createElement(zs,xe({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:p,withPagination:h,pageSize:m,showFilters:"HEADER"===S,selectedRowsRef:this.selectedRowsRef,onClearSelection:this.onClearSelection,onSelectAllRows:this.onSelectAllRows,selectedAllRef:this.selectAllRef,uniqueColumnName:e},u),w)),Se.createElement("div",{className:"Table-grid"},Se.createElement(Js,xe({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:p,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:f,showHead:t,type:n,size:r,headCellTooltip:o,separator:i,draggable:a,nestedRows:s,nestedRowRenderer:l,withPagination:h&&1<C,pageSize:m,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:y,showFilters:"GRID"===S}))),h&&!this.state.loading&&!this.state.error&&1<C&&Se.createElement("div",{className:"Table-pagination"},Se.createElement(Ra,{page:this.state.page,totalPages:Os(x,m),type:d,onPageChange:this.onPageChange,pageJumpDebounceDuration:g})))}}]),o})(),tl=(we(c,"defaultProps",n),Se.useState,Se.useEffect,Se.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),nl=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=Oe(e),n=De(we({},"InlineMessage",!0),n),i=De((we(i={},"InlineMessage-icon--warning","warning"===t),we(i,"InlineMessage-icon--small","small"===o),we(i,"InlineMessage-icon--regular","regular"===o),i)),a=De(we({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,l="small"===o?"medium":void 0;return Se.createElement("div",xe({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&Se.createElement(R,{"data-test":"DesignSystem-InlineMessage--Icon",name:tl[t],appearance:t,className:i,size:s}),Se.createElement(Te,{size:o,weight:l,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},rl=(nl.displayName="InlineMessage",nl.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t,n=e.vertical,r=e.appearance,o=e.className,e=Oe(e),n=De((we(t={},"Divider",!0),we(t,"Divider--horizontal",!n),we(t,"Divider--vertical",n),we(t,"Divider--basic",!n&&"header"!==r),we(t,"Divider--header",!n&&"header"===r),t),o);return Se.createElement("hr",xe({"data-test":"DesignSystem-Divider"},e,{className:n}))}),ol=(rl.displayName="Divider",rl.defaultProps={appearance:"basic",vertical:!1},function(e){var t=e.error,n=e.message,r=e.className,e=Oe(e),r=De({"mt-3":!0},r);return n?t?Se.createElement(nl,{size:"small",className:r,appearance:"alert",description:n}):Se.createElement("div",xe({},e,{className:r}),Se.createElement(Te,{appearance:"subtle",size:"small",weight:"medium"},n)):null}),il=(ol.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign","iconType"]),al={tiny:12,regular:16},r=Se.forwardRef(function(e,t){var n=e.children,r=e.type,o=e.className,i=e.disabled,a=e.tabIndex,s=e.icon,l=e.subtle,c=e.size,u=e.iconAlign,p=e.iconType,e=U(e,il),l=De((we(f={},"LinkButton",!0),we(f,"LinkButton--".concat(c),c),we(f,"LinkButton--default",!l),we(f,"LinkButton--subtle",l),we(f,"LinkButton--iconAlign-".concat(u),n&&u),we(f,"".concat(o),o),f)),f=De((we(o={},"LinkButton-icon",!0),we(o,"LinkButton-icon--".concat(u),n&&u),o));return Se.createElement("button",xe({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:l,disabled:i,tabIndex:a},e),Se.createElement(Se.Fragment,null,s&&Se.createElement("div",{className:f},Se.createElement(R,{"data-test":"DesignSystem-LinkButton--Icon",name:s,type:p,size:c&&al[c]})),n))});r.displayName="LinkButton",r.defaultProps={size:"regular",type:"button",iconAlign:"left"},new Map;function sl(e){var t=window.getComputedStyle(e);return Math.max(parseInt(t["margin-top"],10),parseInt(t["margin-bottom"],10))+e.getBoundingClientRect().height}function ll(e,t,n){t=1<arguments.length&&void 0!==t?t:0,n=2<arguments.length&&void 0!==n?n:0;e&&(null===t||null===n?e.style.removeProperty("transform"):e.style.transform="translate(".concat(n,"px, ").concat(t,"px)"))}function cl(e,t,n){e&&(e.style.transition="transform ".concat(t,"ms").concat(n?" ".concat(n):""))}function ul(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o=t,i=i||requestAnimationFrame(function(){i=null,r.apply(void 0,ke(o))})}var o,i=null;return e.cancel=function(){i&&cancelAnimationFrame(i)},e}function pl(t){var e=t.children,n=t.className,r=t.tagName,o=Oe(t),i=De({Listbox:!0},n),n=g.a.Children.toArray(e).map(function(e){return g.a.cloneElement(e,{parentProps:Ee({},t)})}),a=(e=Ce(g.a.useState(n),2))[0],s=e[1];return g.a.createElement(ml,{values:a,onChange:function(e){var t,n=e.oldIndex;n=n,e=e.newIndex,(t=(t=a).slice()).splice(e<0?t.length+e:e,0,t.splice(n,1)[0]),s(t)},renderItem:function(e){var t=e.value;return g.a.createElement("div",xe({},e.props,{className:"Listbox-item--draggable"}),t)},renderList:function(e){var t=e.children;return g.a.createElement(r,xe({"data-test":"DesignSystem-Listbox"},o,{className:i},e.props),t)}})}function fl(e){var t=e.target,n=yl(t),r=vl(t);switch(e.key){case"ArrowDown":e.preventDefault(),bl(n,"down");break;case"ArrowUp":e.preventDefault(),bl(r,"up")}}function hl(e){var t,n=e.children,r=e.className,o=e.disabled,i=e.selected,a=e.activated,e=e.tabIndex,s=(c=Se.useContext(Al)).size,l=c.type,c=c.draggable,s=De((we(t={"Listbox-item":!0},"Listbox-item--".concat(s),s),we(t,"Listbox-item--".concat(l),l),we(t,"Listbox-item--disabled",o),we(t,"Listbox-item--selected",i&&"option"===l),we(t,"Listbox-item--activated",a&&"resource"===l),t),r);return Se.createElement("div",{"data-disabled":o,"data-test":"DesignSystem-Listbox-ItemWrapper",tabIndex:c?-1:e||0,className:s,onKeyDown:fl,role:"tablist"},c&&Se.createElement(R,{size:16,appearance:"subtle",name:"drag_indicator",className:"Listbox-item--drag-icon","data-test":"DesignSystem-Listbox-DragIcon"}),n)}var dl=200,ml=(()=>{e(n,Se["Component"]);var t=d(n);function n(e){var a;return h(this,n),we(Y(a=t.call(this,e)),"listRef",Se.createRef()),we(Y(a),"ghostRef",Se.createRef()),we(Y(a),"topOffsets",[]),we(Y(a),"itemTranslateOffsets",[]),we(Y(a),"initialYOffset",0),we(Y(a),"lastScroll",0),we(Y(a),"lastYOffset",0),we(Y(a),"lastListYOffset",0),we(Y(a),"dropTimeout",void 0),we(Y(a),"needle",-1),we(Y(a),"afterIndex",-2),we(Y(a),"state",{itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,scrollingSpeed:0,scrollWindow:!1}),we(Y(a),"schdOnMouseMove",void 0),we(Y(a),"schdOnTouchMove",void 0),we(Y(a),"schdOnEnd",void 0),we(Y(a),"doScrolling",function(){var e=a.state,t=e.scrollingSpeed,n=e.scrollWindow,r=a.listRef.current;window.requestAnimationFrame(function(){n?window.scrollTo(window.pageXOffset,window.pageYOffset+1.5*t):r.scrollTop+=t,0!==t&&a.doScrolling()})}),we(Y(a),"getChildren",function(){return a.listRef&&a.listRef.current?Array.from(a.listRef.current.children):[]}),we(Y(a),"calculateOffsets",function(){a.topOffsets=a.getChildren().map(function(e){return e.getBoundingClientRect().top}),a.itemTranslateOffsets=a.getChildren().map(sl)}),we(Y(a),"getTargetIndex",function(t){return a.getChildren().findIndex(function(e){return e===t.target||e.contains(t.target)})}),we(Y(a),"onMouseOrTouchStart",function(e){a.dropTimeout&&-1<a.state.itemDragged&&(window.clearTimeout(a.dropTimeout),a.finishDrop());var t,n,r,o=(o=e).touches&&o.touches.length||o.changedTouches&&o.changedTouches.length;(o||0===e.button)&&(t=a.getTargetIndex(e),n=a.getChildren()[t],null==(r=e.target)?void 0:r.classList.contains("Listbox-item--drag-icon"))&&(e.preventDefault(),o?(r={passive:!1},n.style.touchAction="none",document.addEventListener("touchend",a.schdOnEnd,r),document.addEventListener("touchmove",a.schdOnTouchMove,r),document.addEventListener("touchcancel",a.schdOnEnd,r)):(document.addEventListener("mousemove",a.schdOnMouseMove),document.addEventListener("mouseup",a.schdOnEnd),(r=a.getChildren()[a.state.itemDragged])&&r.style&&(r.style.touchAction="")),a.onStart(n,(o?e.touches[0]:e).clientX,(o?e.touches[0]:e).clientY,t))}),we(Y(a),"getYOffset",function(){var e=a.listRef.current?a.listRef.current.scrollTop:0;return window.pageYOffset+e}),we(Y(a),"onStart",function(e,t,n,r){-1<a.state.selectedItem&&(a.setState({selectedItem:-1}),a.needle=-1);var o=e.getBoundingClientRect(),e=window.getComputedStyle(e);a.calculateOffsets(),a.initialYOffset=a.getYOffset(),a.lastYOffset=window.pageYOffset,a.lastListYOffset=a.listRef.current.scrollTop,a.setState({itemDragged:r,targetX:o.left-parseInt(e["margin-left"],10),targetY:o.top-parseInt(e["margin-top"],10),targetHeight:o.height,targetWidth:o.width,initialX:t,initialY:n})}),we(Y(a),"onMouseMove",function(e){e.cancelable&&e.preventDefault(),a.onMove(e.clientX,e.clientY)}),we(Y(a),"onTouchMove",function(e){e.cancelable&&e.preventDefault(),a.onMove(e.touches[0].clientX,e.touches[0].clientY)}),we(Y(a),"onWheel",function(e){a.state.itemDragged<0||(a.lastScroll=a.listRef.current.scrollTop+=e.deltaY,a.moveOtherItems())}),we(Y(a),"onMove",function(e,t){if(-1===a.state.itemDragged)return null;ll(a.ghostRef.current,t-a.state.initialY,a.props.lockVertically?0:e-a.state.initialX),a.autoScrolling(t),a.moveOtherItems()}),we(Y(a),"moveOtherItems",function(){var e=a.ghostRef.current.getBoundingClientRect(),e=e.top+e.height/2,t=sl(a.getChildren()[a.state.itemDragged]),n=a.getYOffset();a.initialYOffset!==n&&(a.topOffsets=a.topOffsets.map(function(e){return e-(n-a.initialYOffset)}),a.initialYOffset=n),a.isDraggedItemOutOfBounds()&&a.props.removableByMove?a.afterIndex=a.topOffsets.length+1:a.afterIndex=((e,t)=>{for(var n,r=0,o=e.length-1;r<=o;){if(!e[(n=Math.floor((o+r)/2))+1]||e[n]<=t&&e[n+1]>=t)return n;e[n]<t&&e[n+1]<t?r=n+1:o=n-1}return-1})(a.topOffsets,e),a.animateItems(-1===a.afterIndex?0:a.afterIndex,a.state.itemDragged,t)}),we(Y(a),"autoScrolling",function(e){var t=a.listRef.current.getBoundingClientRect(),n=t.top,r=t.bottom,t=t.height,o=window.innerHeight||document.documentElement.clientHeight;o<r&&o-e<dl?a.setState({scrollingSpeed:Math.round((dl-(o-e))/10),scrollWindow:!0}):n<0&&e<dl?a.setState({scrollingSpeed:Math.round((dl-e)/-10),scrollWindow:!0}):(a.state.scrollWindow&&0!==a.state.scrollingSpeed&&a.setState({scrollingSpeed:0,scrollWindow:!1}),t+20<a.listRef.current.scrollHeight&&(o=0,e-n<dl?o=Math.round((dl-(e-n))/-10):r-e<dl&&(o=Math.round((dl-(r-e))/10)),a.state.scrollingSpeed!==o)&&a.setState({scrollingSpeed:o}))}),we(Y(a),"animateItems",function(n,r,o){var i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];a.getChildren().forEach(function(e,t){if(cl(e,a.props.transitionDuration),r===t&&i){if(r===n)return ll(e,null);ll(e,r<n?a.itemTranslateOffsets.slice(r+1,n+1).reduce(function(e,t){return e+t},0):-1*a.itemTranslateOffsets.slice(n,r).reduce(function(e,t){return e+t},0))}else ll(e,r<n&&r<t&&t<=n?-o:t<r&&n<r&&n<=t?o:null)})}),we(Y(a),"isDraggedItemOutOfBounds",function(){var e=a.getChildren()[a.state.itemDragged].getBoundingClientRect(),t=a.ghostRef.current.getBoundingClientRect();return Math.abs(e.left-t.left)>t.width?(-1===a.state.itemDraggedOutOfBounds&&a.setState({itemDraggedOutOfBounds:a.state.itemDragged}),!0):(-1<a.state.itemDraggedOutOfBounds&&a.setState({itemDraggedOutOfBounds:-1}),!1)}),we(Y(a),"onEnd",function(e){e.cancelable&&e.preventDefault(),document.removeEventListener("mousemove",a.schdOnMouseMove),document.removeEventListener("touchmove",a.schdOnTouchMove),document.removeEventListener("mouseup",a.schdOnEnd),document.removeEventListener("touchup",a.schdOnEnd),document.removeEventListener("touchcancel",a.schdOnEnd);e=a.props.removableByMove&&a.isDraggedItemOutOfBounds();!e&&0<a.props.transitionDuration&&-2!==a.afterIndex&&ul(function(){cl(a.ghostRef.current,a.props.transitionDuration,"cubic-bezier(0.2, 0, 0.38, 0.9)"),a.afterIndex<1&&0===a.state.itemDragged?ll(a.ghostRef.current,0,0):ll(a.ghostRef.current,-(window.pageYOffset-a.lastYOffset)-(a.listRef.current.scrollTop-a.lastListYOffset)+(a.state.itemDragged<a.afterIndex?a.itemTranslateOffsets.slice(a.state.itemDragged+1,a.afterIndex+1).reduce(function(e,t){return e+t},0):-1*a.itemTranslateOffsets.slice(a.afterIndex<0?0:a.afterIndex,a.state.itemDragged).reduce(function(e,t){return e+t},0)),0)})(),a.dropTimeout=window.setTimeout(a.finishDrop,e||-2===a.afterIndex?0:a.props.transitionDuration)}),we(Y(a),"finishDrop",function(){var e=a.props.removableByMove&&a.isDraggedItemOutOfBounds();(e||-2<a.afterIndex&&a.state.itemDragged!==a.afterIndex)&&a.props.onChange({oldIndex:a.state.itemDragged,newIndex:e?-1:Math.max(a.afterIndex,0),targetRect:a.ghostRef.current.getBoundingClientRect()}),a.getChildren().forEach(function(e){cl(e,0),ll(e,null),e.style.touchAction=""}),a.setState({itemDragged:-1,scrollingSpeed:0}),a.afterIndex=-2,0<a.lastScroll&&(a.listRef.current.scrollTop=a.lastScroll,a.lastScroll=0)}),we(Y(a),"onKeyDown",function(e){var t=a.state.selectedItem,n=a.getTargetIndex(e);-1===n||a.props.values[n]&&a.props.values[n].props.disabled||(" "===e.key&&(e.preventDefault(),t===n?(t!==a.needle&&(a.getChildren().forEach(function(e){cl(e,0),ll(e,null)}),a.props.onChange({oldIndex:t,newIndex:a.needle,targetRect:a.getChildren()[a.needle].getBoundingClientRect()}),a.getChildren()[a.needle].focus()),a.setState({selectedItem:-1}),a.needle=-1):(a.setState({selectedItem:n}),a.needle=n,a.calculateOffsets())),("ArrowDown"===e.key||"j"===e.key)&&-1<t&&a.needle<a.props.values.length-1&&(e.preventDefault(),n=sl(a.getChildren()[t]),a.needle++,a.animateItems(a.needle,t,n,!0)),("ArrowUp"===e.key||"k"===e.key)&&-1<t&&0<a.needle&&(e.preventDefault(),n=sl(a.getChildren()[t]),a.needle--,a.animateItems(a.needle,t,n,!0)),"Escape"===e.key&&-1<t&&(a.getChildren().forEach(function(e){cl(e,0),ll(e,null)}),a.setState({selectedItem:-1}),a.needle=-1),("Tab"===e.key||"Enter"===e.key)&&-1<t&&e.preventDefault())}),a.schdOnMouseMove=ul(a.onMouseMove),a.schdOnTouchMove=ul(a.onTouchMove),a.schdOnEnd=ul(a.onEnd),a}return a(n,[{key:"componentDidMount",value:function(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}},{key:"componentDidUpdate",value:function(e,t){t.scrollingSpeed!==this.state.scrollingSpeed&&0===t.scrollingSpeed&&this.doScrolling()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}},{key:"render",value:function(){var o=this,i={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},e=Ee(Ee({},i),{},{top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,backgroundColor:"#ffffff",listStyleType:"none",margin:0,position:"fixed",boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.16)"});return Se.createElement(Se.Fragment,null,this.props.renderList({children:this.props.values.map(function(e,t){var n=t===o.state.itemDragged,r=t===o.state.selectedItem,n={key:t,tabIndex:o.props.values[t]&&o.props.values[t].props.disabled?-1:0,onKeyDown:o.onKeyDown,style:Ee(Ee({},i),{},{visibility:n?"hidden":void 0,zIndex:r?5e3:0})};return o.props.renderItem({value:e,props:n,index:t,isDragged:!1,isSelected:r,isOutOfBounds:!1})}),isDragged:-1<this.state.itemDragged,props:{ref:this.listRef}}),-1<this.state.itemDragged&&v.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:e,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isOutOfBounds:-1<this.state.itemDraggedOutOfBounds}),document.body))}}]),n})(),gl=(we(ml,"defaultProps",{transitionDuration:240,lockVertically:!1,removableByMove:!1}),function(e){return e&&"true"===e.getAttribute("data-disabled")}),yl=function(e){return null==e||null==(e=e.parentNode)||null==(e=e.nextSibling)?void 0:e.firstChild},vl=function(e){return null==e||null==(e=e.parentNode)||null==(e=e.previousSibling)?void 0:e.firstChild},bl=function(e,t){for(var n=e;n;){if(!gl(n)){n.focus();break}n=("down"===t?yl:vl)(n)}},_l=(hl.displayName="ListBody",function(e,t){return t?"nestedList-open-".concat(e," 240ms cubic-bezier(0, 0, 0.38, 0.9)"):"nestedList-close-".concat(e," 160ms cubic-bezier(0.2, 0, 1, 0.9)")}),Sl=function(e){return null==(e=e.current)?void 0:e.scrollHeight},El=function(e,t){return"\n @keyframes nestedList-open-".concat(t," {\n from {\n height: 0px;\n }\n to {\n height: ").concat(Sl(e),"px;\n }\n }\n\n @keyframes nestedList-close-").concat(t," {\n from {\n height: ").concat(Sl(e),"px;\n }\n to {\n height: 0px;\n }\n }\n ")};function wl(e){var t,n,r=e.nestedBody,o=e.expanded,i=(t=o,n=Se.useRef(),Se.useEffect(function(){null!=t&&(n.current=t)},[t]),n.current),a=(e=Ce(Se.useState(o),2))[0],s=e[1],l=(e=Ce(Se.useState(""),2))[0],c=e[1],u=Se.useRef(null),p=Math.random().toString(36).substring(2,6),f=(e=Ce(Se.useState(_l(p,o)),2))[0],h=e[1];return Se.useEffect(function(){null!=i&&i!==o&&s(!0),requestAnimationFrame(function(){var e=El(u,p);c(e)});var e=_l(p,o);h(e)},[o]),Se.createElement(Se.Fragment,null,Se.createElement("style",null,l),r&&a&&Se.createElement("div",{style:{animation:f,overflow:"hidden",animationFillMode:"forwards"},onAnimationEnd:function(){o||s(!1)},"data-test":"DesignSystem-Listbox--Nested-Item",ref:u},r))}function xl(e){var t=e.nestedBody,n=e.expanded,r=e.id,o=e.onClick,i=e.value,a=void 0===(a=e.tagName)?"li":a,s=U(e,Tl),l=(c=Se.useContext(Al)).showDivider,c=De(we({},"Listbox-item-wrapper",!c.draggable));return Se.createElement(a,xe({id:r,"data-test":"DesignSystem-Listbox-Item"},s,{onClick:function(e){o&&o(e,r,i)},"data-value":i,className:c}),Se.createElement(hl,e),t&&Se.createElement(wl,{expanded:n,nestedBody:t}),l&&Se.createElement(rl,{className:"Listbox-divider"}))}function Cl(e,t,n,r,o,i,a,s,l){switch(e.key){case"ArrowUp":e.preventDefault(),Ll("up",t,n,i,a);break;case"ArrowDown":e.preventDefault(),Ll("down",t,n,i,a);break;case"Enter":Nl(t),null!=o&&o(!1),null!=r&&r(!1);break;case"Escape":null!=s&&s(!1),l.current.focus(),null!=n&&n(void 0)}}function kl(e){var t=(o=Se.useContext(Ul)).withSearch,n=o.minHeight,r=o.maxHeight,o=o.multiSelect,i=e.children,e=U(e,Wl);return Se.createElement(Rl,xe({style:{maxHeight:t?r-33:r,overflowY:"auto",minHeight:n},"aria-label":"Options item list","aria-multiselectable":o,className:"my-3"},e),i)}function Dl(e,t,n){var r=null==(r=n.current)?void 0:r.querySelectorAll('[data-test="DesignSystem-Select--Input"]'),n=null==(n=n.current)?void 0:n.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),e="down"===e?(null==r?void 0:r[0])||(null==n?void 0:n[0]):null==n?void 0:n[n.length-1];null!=(r=e)&&r.focus(),null!=(n=e)&&n.scrollIntoView({block:"center"}),t&&t(e)}function Ol(e){var t=e.children,r=e.option,n=e.checkedState,o=e.onClick,i=void 0===(i=e.withCheckbox)||i,a=e.disabled,e=U(e,$l),s=(_=Se.useContext(Ul)).onOptionClick,l=_.selectValue,c=_.setSelectValue,u=_.multiSelect,p=_.setIsOptionSelected,f=_.focusedOption,h=_.setFocusedOption,d=_.setHighlightFirstItem,m=_.setHighlightLastItem,g=_.listRef,y=_.withSearch,v=_.setOpenPopover,b=_.triggerRef,_="checked"===n||-1!==Gl(r,l),n="indeterminate"===n,S=De(we({},"Select-option",!0)),E=De((we(E={},"Select-option--text",!0),we(E,"pt-2",u),E));return Se.createElement(Rl.Item,xe({role:"option",onClick:function(){var e,t,n;a||(o?o(r):(n=u&&Array.isArray(l)?(e=r,t=ke(t=l),-1!==(n=Gl(e,t))?t.splice(n,1):t.push(e),t):r,null!=p&&p(!Array.isArray(n)||0!==n.length),null!=c&&c(n),null!=s&&s(n)))},"aria-selected":_,"aria-label":"option item",onKeyDown:function(e){var t=e,n=f,r=h,o=d,i=m,a=g,s=y,l=v,c=b;switch(t.key){case"ArrowUp":t.preventDefault(),Yl("up",n,r,a,s);break;case"ArrowDown":t.preventDefault(),Yl("down",n,r,a,s);break;case"Enter":ql(n),null!=i&&i(!1),null!=o&&o(!1);break;case"Tab":null!=i&&i(!1),null!=o&&o(!1);break;case"Escape":null!=l&&l(!1),c.current.focus(),null!=r&&r(void 0)}},selected:_,tabIndex:-1,disabled:a,"data-test":"DesignSystem-Select-Option"},e),Se.createElement("div",{className:S},u&&i&&Se.createElement(ft,{tabIndex:-1,"aria-checked":n?"mixed":_,checked:_,indeterminate:n}),Se.createElement("div",{className:E},t)))}function Pl(e){var t=e.triggerSize,n=e.placeholder,r=e.withClearButton,o=e.icon,i=e.disabled,a=e.inlineLabel,s=e.iconType,l=e.onClear,c=e.setLabel,e=U(e,Jl),u=Se.useContext(Ul),p=Se.useRef(null),f=u.openPopover,h=u.selectValue,d=u.setSelectValue,m=u.isOptionSelected,g=u.setIsOptionSelected,y=u.multiSelect,v=u.setOpenPopover,b=u.setHighlightFirstItem,_=u.setHighlightLastItem,S=u.triggerRef,u=u.width,E=i?"disabled":"default",n=null==n?void 0:n.trim(),c=(h=h,c=c,(w=y)?(null==c?void 0:c(h.length))||(h.length<=2?h.map(function(e){return"".concat(e.label)}).join(", "):"".concat(h.length," Selected")):(null==h||null==(w=h.label)?void 0:w.trim())||""),h=m&&0<c.length?c:n,w=f?"keyboard_arrow_up":"keyboard_arrow_down",c={width:u},u=De((we(n={},"Button",!0),we(n,"Select-trigger",!0),we(n,"Select-trigger--".concat(t),t),we(n,"Select-trigger--placeholder",!m),we(n,"Select-trigger--icon",o),we(n,"Select-trigger--open",f),n)),n=De((we(t={},"Text",!0),we(t,"Text--regular",!0),we(t,"Select-trigger--text",!0),t));return Se.createElement(M,{showOnTruncation:!0,showTooltip:!f,tooltip:h,elementRef:p,className:"w-100",triggerClass:"w-100"},Se.createElement("button",xe({ref:S,onKeyDown:function(e){var t=e,n=v,r=b,o=_;switch(t.key){case"Enter":t.preventDefault(),null!=n&&n(!0),null!=r&&r(!0);break;case"ArrowDown":null!=n&&n(!0),null!=r&&r(!0);break;case"ArrowUp":null!=n&&n(!0),null!=o&&o(!0)}},type:"button",className:u,disabled:i,tabIndex:0,style:c,"aria-haspopup":"listbox","aria-expanded":f,"aria-label":"trigger","data-test":"DesignSystem-Select-trigger"},e),Se.createElement("div",{className:"Select-trigger-wrapper ellipsis--noWrap"},a&&Se.createElement(Te,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(a.trim().charAt(0).toUpperCase()).concat(a.trim().slice(1))),o&&!a&&Se.createElement(R,{appearance:E,className:"d-flex align-items-center mr-4",name:o,type:s}),h&&Se.createElement("span",{ref:p,className:n},h)),m&&r&&Se.createElement(R,{appearance:E,onClick:function(e){e.stopPropagation(),null!=d&&d(y?[]:{label:"",value:""}),null!=g&&g(!1),l&&l(e)},className:"align-items-center mr-2 ml-3 Select-crossButton",size:12,name:"close","aria-label":"clear selected",type:s,"data-test":"DesignSystem-Select--closeIcon"}),Se.createElement(R,{appearance:E,name:w,type:s})))}var Tl=["nestedBody","expanded","id","onClick","value","tagName"],Ml=(xl.displayName="Listbox.Item",["children","className","draggable","size","type","showDivider","tagName"]),Al=Se.createContext({size:"standard",type:"resource",draggable:!(xl.defaultProps={tagName:"li"}),showDivider:!0}),Il=Al.Provider,Rl=function(e){var t=e.children,n=e.className,r=e.draggable,o=e.size,i=e.type,a=e.showDivider,s=e.tagName,l=U(e,Ml),c=Oe(e),n=De({Listbox:!0},n);return Se.createElement(Il,{value:{size:o,type:i,draggable:r,showDivider:a}},r?Se.createElement(pl,e):Se.createElement(s,xe({"data-test":"DesignSystem-Listbox"},c,{className:n},l),t))},Fl=(Rl.displayName="Listbox",Rl.defaultProps={tagName:"ul",size:"standard",type:"resource",draggable:!1,showDivider:!0},Rl.Item=xl,Se.createContext({})),Nl=function(e){null!=e&&e.click()},Ll=function(e,t,n,r,o){var i=null==r?void 0:r.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(i).findIndex(function(e){return e==t});-1===a?"up"===e&&i.length:o&&0===a&&"up"===e||o&&a===i.length-1&&"down"===e?((o=r.current.querySelector('[data-test="DesignSystem-AvatarSelection--Input"]')).focus(),n&&n(o)):((r=i[a="up"===e?(a-1+i.length)%i.length:(a+1)%i.length]).focus(),n&&n(r),r.scrollIntoView({block:"center"}))},f=function(e){return Se.createElement(Rl,e,e.children)},jl=(f.defaultProps={type:"option",showDivider:!{minWidth:256},size:"compressed",tagName:"ul"},["children","value","disabled"]),l=function(e){var t=e.children,n=e.value,r=e.disabled,e=U(e,jl),o=Se.useContext(Fl),i=o.setSelectedItems,a=o.selectedItems,s=o.onSelect,l=o.focusedOption,c=o.setFocusedOption,u=o.setHighlightFirstItem,p=o.setHighlightLastItem,f=o.listRef,h=o.withSearch,d=o.setOpenPopover,m=o.triggerRef;return Se.createElement(Rl.Item,xe({onClick:function(e){return t=n,(e=e).preventDefault(),void(r||(e=a?ke(a):[],null!=a&&a.includes(t)?e=a.filter(function(e){return e!==t}):e.push(t),null!=i&&i(ke(e)),null!=d&&d(!0),s&&s(e)));var t},onKeyDown:function(e){Cl(e,l,c,u,p,f,h,d,m)},selected:null==a?void 0:a.includes(n),"data-test":"DesignSystem-AvatarSelection--Option",disabled:r,tabIndex:-1},e),t)},Bl=(l.defaultProps={tagName:"li"},["chipOptions","allowDuplicates","disabled","error","placeholder","defaultValue","value","className","autoFocus","onChange","onBlur","onFocus","onKeyDown","onInputChange","tabIndex","role"]),zl=["type","onClick"],Vl="Backspace",Hl="Delete",Kl="Enter",o=Se.forwardRef(function(e,t){function a(e){var t=ke(w);t.splice(e,1),c||x(t),D(t)}var s=e.chipOptions,o=e.allowDuplicates,l=e.disabled,n=e.error,r=e.placeholder,i=e.defaultValue,c=e.value,u=e.className,p=e.autoFocus,f=e.onChange,h=e.onBlur,d=e.onFocus,m=e.onKeyDown,g=e.onInputChange,y=e.tabIndex,v=e.role,b=U(e,Bl),_=Se.useRef(),S=Se.useRef(),E=t||_,t=Ce(Se.useState(c||i),2),w=t[0],x=t[1],_=Ce(Se.useState(""),2),C=_[0],k=_[1],i=Oe(e),_=(Se.useEffect(function(){void 0!==c&&(x(c),k(""))},[c]),Se.useEffect(function(){""===C&&E.current&&(E.current.style.flexBasis="0",S.current.charCount=null)},[C]),De((we(t={},"ChipInput-border",!0),we(t,"ChipInput-border--error",n),t))),t=De((we(e={ChipInput:!0},"ChipInput--disabled",l),we(e,"ChipInput--withChips",w&&0<w.length),we(e,"ChipInput--error",n),e),u),D=function(e){f&&f(e)},n=w.map(function(e,t){var n=s.type,n=void 0===n?"input":n,r=s.onClick,o=U(s,zl),i="string"==typeof e?e:null==e?void 0:e.label;return Se.createElement(ut,xe({"data-test":"DesignSystem-MultiSelectTrigger--Chip",label:i,name:e,type:n,disabled:l,key:t,className:"my-3 mx-2",onClick:function(){return r&&r(e,t)},onClose:function(){return a(t)}},o))});return Se.createElement("div",{"data-test":"DesignSystem-MultiSelectTrigger--Border",className:_},Se.createElement("div",xe({"data-test":"DesignSystem-MultiSelectTrigger"},i,{className:t,onClick:function(){var e;null!=(e=E.current)&&e.focus()},tabIndex:l?-1:y||0}),Se.createElement("div",{className:"ChipInput-wrapper",ref:S},w&&0<w.length&&n,Se.createElement("input",xe({},b,{"data-test":"DesignSystem-MultiSelectTrigger--Input",ref:E,className:"ChipInput-input",autoFocus:p,placeholder:w&&0<w.length?"":r,disabled:l,value:C,onBlur:h,onFocus:d,onChange:function(e){var t,n,r,o=E.current;o&&(t=e.target.value.length,n=o.scrollWidth,(r=o.clientWidth)<n&&C.length<=t?(o.style.flexBasis="auto",S.current&&(S.current.charCount=t)):n<=r&&C.length>t&&t<=((null==(n=S.current)?void 0:n.charCount)||0)-1&&(o.style.flexBasis="0")),k(e.target.value),g&&g(e)},onKeyDown:function(e){var t,n,r=w.length;switch(e.key){case Hl:case Vl:""===C&&0<r&&a(r-1);break;case Kl:e.preventDefault(),C&&(t=C.trim(),n=0<w.filter(function(e){return e.label===t}).length,!o&&n||!t||(n=[].concat(ke(w),[{label:t,value:t,isSelectedOption:!1}]),c||x(n),D(n),k("")))}m&&m(e)},role:v}))),(0<w.length||0<C.length)&&Se.createElement(R,{"data-test":"DesignSystem-MultiSelectTrigger--Icon",name:"close",appearance:l?"disabled":"subtle",className:"ChipInput-icon",onClick:function(e){e.stopPropagation();e=[];c||x(e),D(e),k(""),g&&g()},tabIndex:l?-1:0})))}),Ul=(o.displayName="MultiSelectTrigger",o.defaultProps={chipOptions:{},defaultValue:[],allowDuplicates:!1,autoFocus:!1},Se.createContext({})),Wl=["children"],Gl=(kl.defaultProps={type:"option",showDivider:!1,size:"compressed",tagName:"ul"},function(t,e){return Array.isArray(e)?e.findIndex(function(e){return e.value===t.value}):t.value===(null==e?void 0:e.value)?0:-1}),ql=function(e){null!=e&&e.click()},Yl=function(e,t,n,r,o){var i=r.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(i).findIndex(function(e){return e==t});-1===a?"up"===e&&i.length:o&&0===a&&"up"===e||o&&a===i.length-1&&"down"===e?((o=r.current.querySelector('[data-test="DesignSystem-Select--Input"]')).focus(),n&&n(o)):((r=i[a="up"===e?(a-1+i.length)%i.length:(a+1)%i.length]).focus(),n&&n(r),r.scrollIntoView({block:"center"}))},$l=["children","option","checkedState","onClick","withCheckbox","disabled"],Jl=(Ol.defaultProps={withCheckbox:!0},["triggerSize","placeholder","withClearButton","icon","disabled","inlineLabel","iconType","onClear","setLabel"]),Zl=(Pl.defaultProps={triggerSize:"regular",placeholder:"Select",withClearButton:!0},["onChange","onClear"]),Xl=["title","description","children"],Ql=["children"],c=Se.forwardRef(function(e,t){var n=e.children,r=e.onSelect,o=e.width,i=e.maxHeight,a=e.minHeight,s=e.value,l=e.boundaryElement,c=e.appendToBody,u=e.multiSelect,p=void 0!==u&&u,f=e.onOutsideClick,h=e.triggerOptions,d=e.popoverWidth,m=e.trigger,g=e.onToggle,u=Ce(Se.useState(!1),2),y=u[0],v=u[1],u=(u=s,p?u&&!Array.isArray(u)?[u]:u||[]:u||{label:"",value:""}),u=Ce(Se.useState(u),2),b=u[0],_=u[1],u=Ce(Se.useState(!1),2),S=u[0],E=u[1],w=Se.createRef(),x=Se.useRef(null),u=Ce(Se.useState(!1),2),C=u[0],u=u[1],k=Ce(Se.useState(),2),D=k[0],O=k[1],k=Ce(Se.useState(!1),2),P=k[0],T=k[1],k=Ce(Se.useState(!1),2),M=k[0],A=k[1],k=Ce(Se.useState({width:d||o}),2),I=k[0],R=k[1],k=Oe(e),e=m?{}:{width:o};Se.useEffect(function(){var e=null==(e=w.current)?void 0:e.clientWidth;!d&&e&&R(Ee(Ee({},I),{},{width:m?Math.max(e||0,176):e}))},[]),Se.useImperativeHandle(t,function(){return{setOpen:function(e){null!=v&&v(e)},setFocusFirstItem:function(){y&&(requestAnimationFrame(function(){return Dl("down",O,x)}),T(!0))},setFocusLastItem:function(){y&&(requestAnimationFrame(function(){return Dl("up",O,x)}),A(!0))}}}),Se.useEffect(function(){y||(T(!1),A(!1))},[y]),Se.useEffect(function(){P&&y&&requestAnimationFrame(function(){return Dl("down",O,x)})},[P]),Se.useEffect(function(){M&&y&&requestAnimationFrame(function(){return Dl("up",O,x)})},[M]),Se.useEffect(function(){s&&(_(s),E(Array.isArray(s)?0<s.length:s&&"value"in s))},[s]);return Se.createElement(Ul.Provider,{value:{openPopover:y,setOpenPopover:v,selectValue:b,setSelectValue:_,isOptionSelected:S,setIsOptionSelected:E,onOptionClick:function(e){null!=r&&r(e),p||v(!1)},maxHeight:i,minHeight:a,withSearch:C,width:o,setWithSearch:u,multiSelect:p,listRef:x,triggerRef:w,focusedOption:D,setFocusedOption:O,setHighlightFirstItem:T,setHighlightLastItem:A}},Se.createElement("div",xe({"data-test":"DesignSystem-Select",style:e,"aria-haspopup":"listbox","aria-expanded":y},k),Se.createElement(Ua,{open:y,onToggle:function(e){g&&g(e),h&&h.disabled?v(!1):(v(e),T(e))},className:"mt-3",triggerClass:"d-block",position:"bottom-start",customStyle:I,boundaryElement:l,appendToBody:c,trigger:m?Se.cloneElement(m,{ref:w}):Se.createElement(Pl,xe({"aria-controls":"select-listbox"},h))},Se.createElement(Un,{onOutsideClick:function(){null!=f&&f()}},Se.createElement("div",{role:"listbox",id:"select-listbox",tabIndex:0,ref:x},n)))))});c.displayName="Select",c.defaultProps={maxHeight:256,width:176},c.Option=Ol,c.List=kl,c.SearchInput=function(e){var t=Se.useContext(Ul),n=t.setWithSearch,r=t.maxHeight,s=t.listRef,l=t.setFocusedOption,c=t.setOpenPopover,u=t.triggerRef,o=e.onChange,i=e.onClear,t=U(e,Zl);Se.useEffect(function(){null!=n&&n(!0)},[r]);return Se.createElement("div",{className:"Select-inputWrapper"},Se.createElement(Tn,xe({},t,{icon:"search",onKeyDown:function(e){var t,n=e,e=s,r=l,o=c,i=u,a=null==(e=e.current)?void 0:e.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');switch(n.key){case"ArrowUp":n.preventDefault(),t=a[a.length-1];break;case"ArrowDown":n.preventDefault(),t=a[0];break;case"Escape":null!=o&&o(!1),i.current.focus(),null!=r&&r(void 0)}null!=(e=t)&&e.focus(),null!=(e=t)&&e.scrollIntoView({block:"center"}),r&&r(t)},autoFocus:!0,onChange:function(e){o&&o(e.target.value)},onClear:function(e){i&&i(e)},autoComplete:"off","aria-label":"Search","aria-haspopup":"listbox",className:"Select-input","data-test":"DesignSystem-Select--Input"})))},c.EmptyTemplate=function(e){var t=Se.useContext(Ul),n=t.maxHeight,t=t.withSearch,r=e.title,o=e.description,i=e.children,e=U(e,Xl);return Se.createElement("div",xe({className:"px-7 d-flex justify-content-center align-items-center",style:{minHeight:t?n-33:n},"data-test":"DesignSystem-Select-EmptyState--wrapper","aria-live":"polite",role:"alert"},e),Se.createElement("div",{"aria-labelledby":r,"aria-describedby":o,className:"d-flex flex-column justify-content-center align-items-center"},r&&Se.createElement(Te,{id:r,role:"heading",className:"text-align-center mb-3",weight:"strong"},r),o&&Se.createElement(Te,{id:o,className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},o),i))},c.Footer=function(e){var t=e.children,e=U(e,Ql);return Se.createElement("div",xe({className:"Select-buttonWrapper"},e),t)}}.call(this,tc(21))},function(e,t,n){function o(e){var t;return(s[e]||(t=s[e]={i:e,l:!1,exports:{}},a[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}var r,i,a,s;window,e.exports=(r=n(2),i=n(24),s={},o.m=a=[function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(N,e,t){t.r(e);var c=t(0),o=t(1);function u(e){var t=e.getSelection(),e=e.getCurrentContent(),n=t.getStartKey(),r=t.getEndKey(),t=e.getBlockMap();return t.toSeq().skipUntil(function(e,t){return t===n}).takeUntil(function(e,t){return t===r}).concat([[r,t.get(r)]])}function p(e){return u(e).toList()}function l(e){if(e)return p(e).get(0)}function n(e){if(e){var n=l(e),e=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(e.forEach(function(e,t){e.get("key")===n.get("key")&&(r=t-1)}),-1<r)return e.get(r)}}function r(e){return e?e.getCurrentContent().getBlockMap().toList():new o.List}function i(e){var t=p(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function a(e){var t=c.RichUtils.tryToRemoveBlockStyle(e);return t?c.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=p(e);if(0<i.size){n.getIsBackward()&&(e=r,r=o,o=e);for(var a=0;a<i.size;a+=1){var s=0===a?r:0,l=a===i.size-1?o:i.get(a).getText().length;t+=i.get(a).getText().slice(s,l)}}return t}function f(e){var t=e.getCurrentContent(),n=e.getSelection(),n=(t=c.Modifier.removeRange(t,n,"forward")).getSelectionAfter(),r=t.getBlockForKey(n.getStartKey()),t=c.Modifier.insertText(t,n,"\n",r.getInlineStyleAt(n.getStartOffset()),null);return c.EditorState.push(e,t,"insert-fragment")}function h(e){var t=c.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return a(c.EditorState.push(e,t,"split-block"))}function d(e){var t=e.getCurrentContent().getBlockMap().toList(),t=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),t=c.Modifier.removeRange(e.getCurrentContent(),t,"forward");return c.EditorState.push(e,t,"remove-range")}function m(e,t){t=c.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return c.EditorState.push(e,t,"change-block-data")}function g(e){var r=new o.Map({}),t=p(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==(e=>{var n=t.get(e).getData();if(!n||0===n.size)return r=r.clear(),"break";if(0===e)r=n;else if(r.forEach(function(e,t){n.get(t)&&n.get(t)===e||(r=r.delete(t))}),0===r.size)return r=r.clear(),"break"})(n);n+=1);return r}var y=Object(o.Map)({code:{element:"pre"}}),v=c.DefaultDraftBlockRenderMap.merge(y);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function _(e,t,n){var r,o,i=e.getSelection(),i=i.getIsBackward()?i.getFocusKey():i.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i),l=s.getType();return"unordered-list-item"!==l&&"ordered-list-item"!==l||!(a=a.getBlockBefore(i))||a.getType()!==l||(i=s.getDepth(),1===t&&i===n)?e:(l=Math.min(a.getDepth()+1,n),r=t,o=l,i=(s=e).getSelection(),n=(a=s.getCurrentContent()).getBlockMap(),t=u(s).map(function(e){var t=e.getDepth()+r,t=Math.max(0,Math.min(t,o));return e.set("depth",t)}),n=n.merge(t),l=a.merge({blockMap:n,selectionBefore:i,selectionAfter:i}),c.EditorState.push(e,l,"adjust-depth"))}function S(e,t){var n,r;return 13===(t=t).which&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))?e.getSelection().isCollapsed()?c.RichUtils.insertSoftNewline(e):f(e):(e=(t=e).getSelection()).isCollapsed()?(n=t.getCurrentContent(),r=e.getStartKey(),b(n=n.getBlockForKey(r))||"unstyled"===n.getType()||n.getLength()!==e.getStartOffset()?b(n)&&0===n.getLength()?0===(r=n.getDepth())?a(t):0<r?_(t,-1,r):void 0:void 0:h(t)):void 0}function E(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="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)}function C(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),a=t.getEndOffset(),s=p(e);if(0<s.size){t=(()=>{for(var n={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},r=0;r<s.size;r+=1){var e=0===r?i:0,t=r===s.size-1?a:s.get(r).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var o=e;o<t;o+=1)(e=>{var t=s.get(r).getInlineStyleAt(e);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=n[e]&&t.get(e)===e})})(o)}return{v:n}})();if("object"===x(t))return t.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=l(e),a=r;a<o;a+=1){var s=i.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function D(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function O(e,t,n){T[e]["".concat(e.toLowerCase(),"-").concat(n)]=w({},"".concat(t),n)}function P(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach(function(e){w(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},T.color,{},T.bgcolor,{},T.fontSize,{},T.fontFamily,{CODE:T.CODE,SUPERSCRIPT:T.SUPERSCRIPT,SUBSCRIPT:T.SUBSCRIPT})}var T={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function M(e,t,n){var r=e.getSelection(),o=Object.keys(T[t]).reduce(function(e,t){return c.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=c.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return c.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=c.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=c.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),O(t,e,n)),o}function A(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?O("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?O("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?O("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&O("fontFamily","fontFamily",e.substr(11))})}function I(e,t,n){e=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)}function R(n,l){if(n&&l&&0<l.length){var e=(()=>{var e=n.getSelection(),o={};if(e.isCollapsed())return l.forEach(function(e){o[e]=(t=>{var e=n.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(e&&0<e.size)return e.get(0)})(e)}),{v:o};var i=e.getStartOffset(),a=e.getEndOffset(),s=p(n);if(0<s.size){for(var t=0;t<s.size;t+=1)(n=>{var e=0===n?i:0,t=n===s.size-1?a:s.get(n).getText().length;e===t&&0===e?(e=1,t=2):e===t&&--e;for(var r=e;r<t;r+=1)(t=>{t===e?l.forEach(function(e){o[e]=I(s.get(n),e,t)}):l.forEach(function(e){o[e]&&o[e]!==I(s.get(n),e,t)&&(o[e]=void 0)})})(r)})(t);return{v:o}}})();if("object"===x(e))return e.v}return{}}function F(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=c.Modifier.removeInlineStyle(n,t.getSelection(),e)}),c.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return b}),t.d(e,"changeDepth",function(){return _}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return D}),t.d(e,"getCustomStyleMap",function(){return P}),t.d(e,"toggleCustomInlineStyle",function(){return M}),t.d(e,"getSelectionEntity",function(){return k}),t.d(e,"extractInlineStyle",function(){return A}),t.d(e,"removeAllInlineStyles",function(){return F}),t.d(e,"getSelectionInlineStyle",function(){return C}),t.d(e,"getSelectionCustomInlineStyle",function(){return R}),t.d(e,"getSelectedBlocksMap",function(){return u}),t.d(e,"getSelectedBlocksList",function(){return p}),t.d(e,"getSelectedBlock",function(){return l}),t.d(e,"getBlockBeforeSelectedBlock",function(){return n}),t.d(e,"getAllBlocks",function(){return r}),t.d(e,"getSelectedBlocksType",function(){return i}),t.d(e,"removeSelectedBlocksStyle",function(){return a}),t.d(e,"getSelectionText",function(){return s}),t.d(e,"addLineBreakRemovingSelection",function(){return f}),t.d(e,"insertNewUnstyledBlock",function(){return h}),t.d(e,"clearEditorContent",function(){return d}),t.d(e,"setBlockData",function(){return m}),t.d(e,"getSelectedBlocksMetadata",function(){return g}),t.d(e,"blockRenderMap",function(){return v})}],o.c=s,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2))},function(e,t,n){var r;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,(e=>{if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t,n="";for(t in e)r.call(e,t)&&e[t]&&(n=i(n,t));return n})(n)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}
|
|
39
39
|
/*!
|
|
40
40
|
Copyright (c) 2018 Jed Watson.
|
|
41
41
|
Licensed under the MIT License (MIT), see
|
|
@@ -56,4 +56,4 @@ var l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.pr
|
|
|
56
56
|
* This source code is licensed under the MIT license found in the
|
|
57
57
|
* LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/
|
|
59
|
-
var w=e(18),x=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,l=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,j=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,B=e?Symbol.for("react.suspense_list"):60120,z=e?Symbol.for("react.memo"):60115,V=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,K=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.scope"):60119;function g(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case l:return"Fragment";case s:return"Portal";case u:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case B:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return"Context.Consumer";case f:return"Context.Provider";case h:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case z:return g(e.type);case H:return g(e.render);case V:if(e=1===e._status?e._result:null)return g(e)}}return null}var e=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function y(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var m=new Uint16Array(16),t=0;t<15;t++)m[t]=t+1;m[15]=0;var G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,q=Object.prototype.hasOwnProperty,Y={},$={};function J(e){return q.call($,e)||!q.call(Y,e)&&(G.test(e)?$[e]=!0:void(Y[e]=!0))}function Z(e,t,n,r){if(null==t||((e,t,n,r)=>{if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return r?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}})(e,t,n,r))return 1;if(!r&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function n(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var k={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new n(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new n(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){k[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new n(e,5,!1,e.toLowerCase(),null,!1)}),/[\-:]([a-z])/g);function o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),k.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function D(e){if("boolean"==typeof e||"number"==typeof e)return""+e;var t=X.exec(e=""+e);if(t){for(var n="",r=0,o=t.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}r!==o&&(n+=e.substring(r,o)),r=o+1,n+=t}e=r!==o?n+e.substring(r,o):n}return e}var Q="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},v=null,i=null,a=null,b=!1,_=!1,S=null,E=0;function O(){if(null===v)throw Error(C(321));return v}function ee(){if(0<E)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function P(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;_;)_=!1,E+=1,a=null,n=e(t,r);return i=v=null,E=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=O(),a=P(),b){var r=a.queue;if(t=r.dispatch,null===S||void 0===(n=S.get(r)))return[a.memoizedState,t];for(S.delete(r),r=a.memoizedState;r=e(r,n.action),null!==(n=n.next););return[a.memoizedState=r,t]}return e=e===ne?"function"==typeof t?t():t:void 0!==n?n(t):t,a.memoizedState=e,e=(e=a.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(E<25))throw Error(C(301));if(e===v)if(_=!0,e={action:n,next:null},null===S&&(S=new Map),void 0===(n=S.get(t)))S.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function T(){}var M=0,oe={readContext:function(e){var t=M;return y(e,t),e[t]},useContext:function(e){O();var t=M;return y(e,t),e[t]},useMemo:function(e,t){if(v=O(),t=void 0===t?null:t,null!==(a=P())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=O();var t=(a=P()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:T,useEffect:T,useDebugValue:T,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return O(),e},useTransition:function(){return O(),[function(e){e()},!1]}},ie="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},le=w({menuitem:!0},se),A={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ce=["Webkit","ms","Moz","O"],ue=(Object.keys(A).forEach(function(t){ce.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),A[e]=A[t]})}),/([A-Z])/g),pe=/^ms-/,I=x.Children.toArray,R=e.ReactCurrentDispatcher,fe={listing:!0,pre:!0,textarea:!0},he=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,de={},F={};var me=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ye(e,t){if(void 0===e)throw Error(C(152,g(t)||"Component"))}function ve(h,d,m){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=((e,t,n,r)=>{if(r&&"object"==typeof(r=e.contextType)&&null!==r)return y(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=W;return t})(t,d,m,n),o=[],i=!1,a={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===o)return null},enqueueReplaceState:function(e,t){i=!0,o=[t]},enqueueSetState:function(e,t){if(null===o)return null;o.push(t)}};if(n){n=new t(e.props,r,a);"function"==typeof t.getDerivedStateFromProps&&null!=(l=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=w({},n.state,l))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void ye(h=n,t);if(n.props=e.props,n.context=r,n.updater=a,void 0===(a=n.state)&&(n.state=a=null),"function"==typeof n.UNSAFE_componentWillMount||"function"==typeof n.componentWillMount)if("function"==typeof n.componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.UNSAFE_componentWillMount(),o.length){var a=o,s=i,o=null,i=!1;if(s&&1===a.length)n.state=a[0];else{for(var l=s?a[0]:n.state,c=!0,s=s?1:0;s<a.length;s++){var u=a[s];null!=(u="function"==typeof u?u.call(n,l,e.props,r):u)&&(c?(c=!1,l=w({},l,u)):w(l,u))}n.state=l}}else o=null;if(ye(h=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var p,f=n.getChildContext();for(p in f)if(!(p in e))throw Error(C(108,g(t)||"Unknown",p))}f&&(d=w({},d,f))}for(;x.isValidElement(h);){var t=h,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:h,context:d}}(e=_e.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,m[e]=m[0],m[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(y(n,r),n[r]);this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},e.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.read=function(e){if(this.exhausted)return null;var t=M,n=(M=this.threadID,R.current);R.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;m[i]=m[0],m[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===f)this.popProvider(a.type);else if(a.type===d){this.suspenseDepth--;var l=r.pop();if(o){var o=!1,c=a.fallbackFrame;if(!c)throw Error(C(303));this.stack.push(c),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=s}else{var u=a.children[a.childIndex++],p="";try{p+=this.render(u,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=p}}return r[0]}finally{R.current=n,M=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e){if(""===(n=""+e))return"";if(!this.makeStaticMarkup){if(this.previousWasTextNode)return"\x3c!-- --\x3e"+D(n);this.previousWasTextNode=!0}return D(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!x.isValidElement(e)){if(null==e||null==e.$$typeof)return e=I(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case c:case j:case u:case B:case l:return e=I(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case d:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case h:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=I(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case z:return e=[x.createElement(o.type,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case f:return n={type:e,domNamespace:n,children:o=I(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case p:o=e.type,i=e.props;var a=this.threadID;return y(o,a),o=I(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case K:throw Error(C(338));case V:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[x.createElement(o._result,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw o._result;default:throw Error(C(295))}case U:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!de.hasOwnProperty(r)){if(!he.test(r))throw Error(C(65,r));de[r]=!0}var o,i,a,s,l,c=e.props;if("input"===r)c=w({type:void 0},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=c.value?c.value:c.defaultValue,checked:null!=c.checked?c.checked:c.defaultChecked});else if("textarea"===r){if(null==(u=c.value)){var u=c.defaultValue,p=c.children;if(null!=p){if(null!=u)throw Error(C(92));if(Array.isArray(p)){if(!(p.length<=1))throw Error(C(93));p=p[0]}u=""+p}null==u&&(u="")}c=w({},c,{value:void 0,children:""+u})}else if("select"===r)this.currentSelectValue=null!=c.value?c.value:c.defaultValue,c=w({},c,{value:void 0});else if("option"===r){var p=this.currentSelectValue,f=null==(f=c.children)?f:(o="",x.Children.forEach(f,function(e){null!=e&&(o+=e)}),o);if(null!=p){var h=null!=c.value?c.value+"":f;if(u=!1,Array.isArray(p)){for(var d=0;d<p.length;d++)if(""+p[d]===h){u=!0;break}}else u=""+p===h;c=w({selected:void 0,children:void 0},c,{selected:u,children:f})}}if(u=c){if(le[r]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(C(137,r,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(C(60));if(!("object"==typeof u.dangerouslySetInnerHTML&&"__html"in u.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(C(62,""))}for(E in u=c,p=this.makeStaticMarkup,f=1===this.stack.length,h="<"+e.type,u)if(me.call(u,E)){var m=u[E];if(null!=m){if("style"===E){var g,y,v,b,d=void 0,_="",S="";for(d in m)m.hasOwnProperty(d)&&(g=0===d.indexOf("--"),null!=(y=m[d]))&&(_+=S+(b=g?d:(b=d,F.hasOwnProperty(b)?F[b]:(v=b.replace(ue,"-$1").toLowerCase().replace(pe,"-ms-"),F[b]=v)))+":",S=d,_+=g=null==y||"boolean"==typeof y||""===y?"":g||"number"!=typeof y||0===y||A.hasOwnProperty(S)&&A[S]?(""+y).trim():y+"px",S=";");m=_||null}d=null;e:if(y=u,-1===(g=r).indexOf("-"))g="string"==typeof y.is;else switch(g){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":g=!1;break e;default:g=!0}g?ge.hasOwnProperty(E)||(d=J(d=E)&&null!=m?d+'="'+D(m)+'"':""):(i=E,a=m,l=s=void 0,s=k.hasOwnProperty(i)?k[i]:null,d=(l=(l="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||Z(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(l=s.type)||4===l&&!0===a?i+'=""':i+'="'+D(a=s.sanitizeURL?""+a:a)+'"'):J(i)?i+'="'+D(a)+'"':""),d&&(h+=" "+d)}}p||f&&(h+=' data-reactroot=""');var E=h;u="",se.hasOwnProperty(r)?E+="/>":(E+=">",u="</"+e.type+">");e:{if(null!=(p=c.dangerouslySetInnerHTML)){if(null!=p.__html){p=p.__html;break e}}else if("string"==typeof(p=c.children)||"number"==typeof p){p=D(p);break e}p=null}return null!=p?(c=[],fe.hasOwnProperty(r)&&"\n"===p.charAt(0)&&(E+="\n"),E+=p):c=I(c.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ae(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:r,children:c,childIndex:0,context:t,footer:u}),this.previousWasTextNode=!1,E};var be=_e,e={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function _e(e,t){if(e=x.isValidElement(e)&&(e.type!==l||(e=e.props.children,x.isValidElement(e)))?[e]:I(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:W,footer:""},0===(n=m[0])){var n,r=m,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(m=i)[0]=n+1,r=n;r<o-1;r++)m[r]=r+1;m[o-1]=0}else m[0]=m[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}N.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"2.3.0-0","description":"A rich text on top of DraftJS.","main":"dist/rich-text-editor.js","module":"dist/rich-text-editor.js","author":"Innovaccer","devDependencies":{"@babel/core":"^7.7.4","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/preset-env":"^7.7.4","@babel/preset-react":"^7.7.4","@babel/register":"^7.7.4","@innovaccer/design-system":"^2.41.3","@storybook/addon-docs":"6.5.10","@storybook/addon-essentials":"6.5.10","@storybook/react":"6.5.10","@storybook/storybook-deployer":"2.8.12","autoprefixer":"^9.7.3","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-transform-flow-strip-types":"^6.22.0","chai":"^4.2.0","cross-env":"^6.0.3","css-loader":"^3.2.1","draftjs-to-markdown":"^0.6.0","embed-video":"^2.0.4","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"^6.7.2","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha":"^6.2.2","eslint-plugin-react":"^7.17.0","file-loader":"^5.0.2","flow-bin":"^0.113.0","gulp":"^4.0.2","gulp-clean":"^0.4.0","gulp-concat":"^2.6.1","gulp-postcss":"^9.0.0","gulp-sourcemaps":"^3.0.0","install":"^0.13.0","jsdom":"^16.4.0","mini-css-extract-plugin":"^0.8.0","mocha":"^6.2.2","postcss-color-mod-function":"^3.0.3","postcss-loader":"^3.0.0","precss":"^4.0.0","prettier":"^2.5.1","react":"^16.12.0","react-addons-test-utils":"^15.6.2","react-dom":"^16.12.0","react-test-renderer":"^16.12.0","rimraf":"^3.0.0","sinon":"^7.5.0","style-loader":"^1.0.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^3.0.0","webpack":"^4.41.2","webpack-bundle-analyzer":"^4.0.0","webpack-cli":"^3.3.10","webpack-s3-plugin":"^1.2.0-rc.0"},"dependencies":{"classnames":"^2.2.6","draft-js":"^0.11.7","draftjs-to-html":"^0.9.0","draftjs-utils":"^0.10.2","html-to-draftjs":"^1.5.0","immutable":"^4.0.0-rc.12","linkify-it":"^2.2.0","prop-types":"^15.7.2","redraft":"^0.10.2"},"peerDependencies":{"@innovaccer/design-system":"^2.41.3","react":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x","react-dom":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"},"scripts":{"build:css":"cp ./node_modules/@innovaccer/design-system/css/dist/* dist/","build-css":"gulp --gulpfile config/gulpfile.js build","clean":"rimraf dist && rimraf public","build:webpack":"cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js","build":"npm run clean && npm run build-css && npm run build:webpack","test":"cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js","lint":"eslint src","lintdocs":"eslint docs/src","flow":"flow; test $? -eq 0 -o $? -eq 2","check":"npm run lint && npm run flow","storybook":"start-storybook -p 6006","build-storybook":"build-storybook","deploy-storybook":"storybook-to-ghpages","version":"./scripts/version.sh","prettier":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\""},"license":"MIT"}')},function(N,e,o){o.r(e),o.d(e,"Editor",function(){return ni}),o.d(e,"EditorPreview",function(){return wi});function L(e,t,n){return t=new RegExp(t,"g"),e.replace(t,n)}var i=o(0),g=o.n(i),e=o(1),a=o.n(e),f=o(2),h=o(4),e=o(39),j=o.n(e),e=o(93),B=o.n(e),z=o(24),e=o(5),y=o.n(e);function V(e){return(V="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)}function H(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,(e=>(e=((e,t)=>{if("object"!=V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=V(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==V(e)?e:e+""))(r.key),r)}}function K(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U=K(function e(){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){e=document.getElementById(e);e&&e.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}});function W(e){return(W="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)}function G(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,(e=>(e=((e,t)=>{if("object"!=W(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=W(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==W(e)?e:e+""))(r.key),r)}}function q(e,t,n){return t&&G(e.prototype,t),n&&G(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Y,$=q(function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),J=[],Z={onKeyDown:function(t){J.forEach(function(e){e(t)})},registerCallBack:function(e){J.push(e)},deregisterCallBack:function(t){J=J.filter(function(e){return e!==t})}},X=function(){Y=!0},Q=function(){Y=!1},ee=function(){return Y};function te(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function ne(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function s(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function u(e){e.stopPropagation()}function re(e,t,n){return e&&e.filter(function(e){return!t||0===t.length||(n?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})}function oe(e){return e[e.options[0]].icon}var ie=function(e,n){var r;return e&&void 0===n?e:(r={},ne(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=ie(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)};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})(e)}function ae(e,t,n){return(t=le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(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,le(r.key),r)}}function le(e){e=((e,t)=>{if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=l(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==l(e)?e:e+""}function ce(e,t,n){t=pe(t);var r=e,t=ue()?Reflect.construct(t,n||[],pe(e).constructor):t.apply(e,n);if(!t||"object"!=l(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fe(e,t){return(fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var c=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=ce(this,a,[].concat(r))).onClick=function(){var e=i.props;e.disabled||(0,e.onClick)(e.value)},i.handleKeyDown=function(e){var t=new Set(["Enter","Space","Spacebar"," "]),n=i.props,r=n.disabled,o=n.onClick,n=n.value;r||t.has(e.key)&&(e.preventDefault(),o(n,e))},i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&fe(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.activeClassName,o=e.active,i=e.disabled,e=e["aria-label"],r=y()(ae(ae(ae(ae({},"Editor-option",!0),"Editor-option--active",o&&!r),"".concat(r),o&&r),"Editor-option--disabled",i),n);return g.a.createElement("div",{"aria-label":e,onKeyDown:this.handleKeyDown,tabIndex:0,className:r,onClick:this.onClick,"aria-selected":o},t)}}])&&se(n.prototype,e),t&&se(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),d=(c.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string,tabIndex:a.a.number},c.defaultProps={activeClassName:""},o(3));function p(e){return(p="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)}function he(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(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,me(r.key),r)}}function me(e){e=((e,t)=>{if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=p(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==p(e)?e:e+""}function ge(e,t,n){t=ve(t);var r=e,t=ye()?Reflect.construct(t,n||[],ve(e).constructor):t.apply(e,n);if(!t||"object"!=p(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ye=function(){return!!e})()}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function be(e,t){return(be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var v=(e=>{function t(e){var i;if(this instanceof t)return(i=ge(this,t,[e])).buttonRef=null,i.listRef=null,i.handleOutsideClick=function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()},i.onChange=function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()},i.setHighlighted=function(e){i.setState({highlighted:e})},i.focusTrigger=function(){var e;null!=(e=i.buttonRef.current)&&e.focus()},i.focusTriggerOnClose=function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())},i.toggleExpansion=function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()},i.handleExpand=function(e){i.props.onExpandEvent(e)},i.handleListKeyDown=function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,r=i.props.onChange)&&r(e)},i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&be(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&(this.setState({highlighted:-1}),document.removeEventListener("keydown",this.focusTriggerOnClose),document.removeEventListener("click",this.handleOutsideClick)),!e.expanded&&t&&(document.addEventListener("keydown",this.focusTriggerOnClose),document.addEventListener("click",this.handleOutsideClick),this.setState({highlighted:0}),this.listRef.current.focus())}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,r=e.children,o=e.className,i=e.optionWrapperClassName,a=e.triggerClassName,s=e.ariaLabel,e=e.menu,l=this.state.highlighted,c=r.slice(1,r.length),o=y()(he(he({},"Editor-dropdown",!0),"Editor-dropdown--expanded",t),o);return g.a.createElement("div",{className:o},g.a.createElement(d.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(d.f,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:y()("Editor-dropdown-optionWrapper",i),onClick:u},g.a.Children.map(c,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:l===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&de(r.prototype,e),n&&de(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function m(e){return(m="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)}function _e(e,t,n){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(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,Ee(r.key),r)}}function Ee(e){e=((e,t)=>{if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=m(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==m(e)?e:e+""}function we(e,t,n){t=Ce(t);var r=e,t=xe()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n);if(!t||"object"!=m(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xe=function(){return!!e})()}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ke(e,t){return(ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}v.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,menu:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,triggerClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string};var b=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=we(this,a,[].concat(r))).onClick=function(e){var t=i.props,n=t.onSelect,r=t.onClick,o=t.value;t.disabled||(n&&n(o),r&&(e.stopPropagation(),r(o)))},i.setHighlighted=function(){i.props.setHighlighted(i.props.index)},i.resetHighlighted=function(){(0,i.props.setHighlighted)(-1)},i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ke(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.active,r=e.disabled,o=e.highlighted,i=e.className,a=e.isCheckbox,s=e.activeClassName,l=e.disabledClassName,e=e.highlightedClassName,s=y()(_e(_e(_e(_e({},"Editor-dropdown-option",!0),"Editor-dropdown-option--active ".concat(s),n&&!a),"".concat(e),o),"".concat(l),r),i);return g.a.createElement("li",{tabIndex:1,className:s,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},t)}}])&&Se(n.prototype,e),t&&Se(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);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)}function De(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,Oe(r.key),r)}}function Oe(e){e=((e,t)=>{if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=_(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==_(e)?e:e+""}function Pe(e,t,n){t=Me(t);var r=e,t=Te()?Reflect.construct(t,n||[],Me(e).constructor):t.apply(e,n);if(!t||"object"!=_(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Te=function(){return!!e})()}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}b.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string,isCheckbox:a.a.bool},b.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var Ie=(e=>{function n(){var e=this,t=n;if(e instanceof t)return Pe(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ae(r,e),r=n,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,a=e.currentState,s=i.options.length-i.max;return g.a.createElement(d.n,{tooltip:"More formatting"},g.a.createElement(v,{onChange:e.onChange,expanded:e.expanded,doExpand:e.doExpand,doCollapse:e.doCollapse,onExpandEvent:e.onExpandEvent,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(d.f,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=r.label;return g.a.createElement(b,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(d.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(d.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(d.m,{appearance:n?"white":"default"},r)))})))}},{key:"render",value:function(){var e,t,n=this.props,i=n.config,a=n.currentState,s=n.onChange,n=n.className,r=i.options.length-i.max,o=i.max,l=y()((e={},t=!0,(l=Oe(l="Editor-textDecoration"))in e?Object.defineProperty(e,l,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[l]=t,e),n);return g.a.createElement("div",{className:l},i.options.slice(0,o).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(d.n,{tooltip:o},g.a.createElement(c,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(d.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&De(r.prototype,e),t&&De(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function S(e){return(S="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)}function Re(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,(e=>(e=((e,t)=>{if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=S(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==S(e)?e:e+""))(r.key),r)}}function Fe(e,t,n){t=Le(t);var r=e,t=Ne()?Reflect.construct(t,n||[],Le(e).constructor):t.apply(e,n);if(!t||"object"!=S(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ne=function(){return!!e})()}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t){return(je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ie.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string};e=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(o=Fe(this,t,[e])).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.toggleInlineStyle=function(e){var t=o.props,n=t.editorState,t=t.onChange,e=e.toUpperCase(),r=Object(h.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=f.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},ne(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n},o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})};e=o.props,e=e.editorState;return o.state={currentStyles:e?o.changeKeys(Object(h.getSelectionInlineStyle)(e)):{}},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&je(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(h.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||Ie;return g.a.createElement(o,{config:t,currentState:n.currentStyles,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e.className})}}])&&Re(r.prototype,e),n&&Re(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function E(e){return(E="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)}function Be(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,(e=>(e=((e,t)=>{if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=E(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==E(e)?e:e+""))(r.key),r)}}function ze(e,t,n){t=He(t);var r=e,t=Ve()?Reflect.construct(t,n||[],He(e).constructor):t.apply(e,n);if(!t||"object"!=E(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ve=function(){return!!e})()}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}e.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string};var t=(e=>{function t(e){if(this instanceof t)return(e=ze(this,t,[e])).getBlockTypes=function(){return[{label:"H1",size:"xxl",displayName:"Heading 1"},{label:"H2",size:"xl",displayName:"Heading 2"},{label:"H3",size:"l",displayName:"Heading 3"},{label:"H4",size:"m",displayName:"Heading 4"}]},e.state={blockTypes:e.getBlockTypes()},e;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ke(r,e),r=t,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType;return g.a.createElement("div",{className:t.className,"aria-label":"Editor-block-control"},g.a.createElement(d.n,{tooltip:"Text style"},g.a.createElement(v,{onChange:t.onChange,expanded:t.expanded,doExpand:t.doExpand,doCollapse:t.doCollapse,onExpandEvent:t.onExpandEvent,triggerClassName:"Editor-heading-trigger"},g.a.createElement(d.f,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(b,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(d.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))}))))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&Be(r.prototype,e),n&&Be(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Ue=(t.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.string},t);function w(e){return(w="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)}function We(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,(e=>(e=((e,t)=>{if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=w(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==w(e)?e:e+""))(r.key),r)}}function Ge(e,t,n){t=Ye(t);var r=e,t=qe()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n);if(!t||"object"!=w(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qe=function(){return!!e})()}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $e(e,t){return($e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}t=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(o=Ge(this,t,[e])).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.blocksTypes=[{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"}],o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})},o.toggleBlockType=function(t){var e=o.blocksTypes.find(function(e){return e.label===t}).style,n=o.props,r=n.editorState,n=n.onChange,r=f.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(h.getSelectedBlocksType)(e):"unstyled"},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&$e(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(h.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(Ue,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&We(r.prototype,e),n&&We(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),t.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,config:a.a.object,className:a.a.string};o(202);function x(e){return(x="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)}function Je(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,(e=>(e=((e,t)=>{if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=x(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==x(e)?e:e+""))(r.key),r)}}function Ze(e,t,n){t=Qe(t);var r=e,t=Xe()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n);if(!t||"object"!=x(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xe=function(){return!!e})()}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t){return(et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tt=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=Ze(this,i,[].concat(r))).state={defaultFontSize:void 0},e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&et(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),t=t.options,e=e.onChange,r=this.props.currentState.fontSize,o=this.state.defaultFontSize,o=Number(o);r||t&&t.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(d.d,{className:y()("rdw-fontsize-dropdown",n),onChange:e,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:t.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&Je(n.prototype,e),t&&Je(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function C(e){return(C="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)}function nt(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,(e=>(e=((e,t)=>{if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=C(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==C(e)?e:e+""))(r.key),r)}}function rt(e,t,n){t=it(t);var r=e,t=ot()?Reflect.construct(t,n||[],it(e).constructor):t.apply(e,n);if(!t||"object"!=C(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ot=function(){return!!e})()}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function at(e,t){return(at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}tt.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var st=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=rt(this,n,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontSize=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(h.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(h.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&at(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(h.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontSize,o=t.component||tt,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&nt(r.prototype,e),t&&nt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);st.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},o(203);function k(e){return(k="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)}function lt(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,(e=>(e=((e,t)=>{if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=k(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==k(e)?e:e+""))(r.key),r)}}function ct(e,t,n){t=pt(t);var r=e,t=ut()?Reflect.construct(t,n||[],pt(e).constructor):t.apply(e,n);if(!t||"object"!=k(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ut=function(){return!!e})()}function pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ft(e,t){return(ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var n=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=ct(this,i,[].concat(r))).state={defaultFontFamily:void 0},e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ft(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,l=e.expanded,c=e.doCollapse,u=e.onExpandEvent,e=e.doExpand,p=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(v,{className:y()("rdw-fontfamily-dropdown",r),optionWrapperClassName:y()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:l,doExpand:e,doCollapse:c,onExpandEvent:u,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(b,{active:p===e,value:e,key:t},e)})))}}])&<(n.prototype,e),t&<(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),ht=(n.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object},n);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})(e)}function dt(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,(e=>(e=((e,t)=>{if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=D(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==D(e)?e:e+""))(r.key),r)}}function mt(e,t,n){t=yt(t);var r=e,t=gt()?Reflect.construct(t,n||[],yt(e).constructor):t.apply(e,n);if(!t||"object"!=D(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gt=function(){return!!e})()}function yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vt(e,t){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=mt(this,n,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontFamily=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(h.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(h.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&vt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(h.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontFamily,o=t.component||ht,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&dt(r.prototype,e),t&&dt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function O(e){return(O="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)}function bt(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,_t(r.key),r)}}function _t(e){e=((e,t)=>{if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=O(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==O(e)?e:e+""}function St(e,t,n){t=wt(t);var r=e,t=Et()?Reflect.construct(t,n||[],wt(e).constructor):t.apply(e,n);if(!t||"object"!=O(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Et=function(){return!!e})()}function wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Ct=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=St(this,a,[].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&xt(n,e),n=a,(e=[{key:"render",value:function(){var e,t,n=this.props,r=n.config,o=n.currentState.listType,n=n.className,i=(r.options,r.unordered),r=r.ordered,a=y()((e={},t=!0,(a=_t(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return g.a.createElement("div",{className:a},g.a.createElement(d.n,{tooltip:i.title},g.a.createElement(c,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},g.a.createElement(d.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),g.a.createElement(d.n,{tooltip:r.title},g.a.createElement(c,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},g.a.createElement(d.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&bt(n.prototype,e),t&&bt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function P(e){return(P="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)}function kt(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,(e=>(e=((e,t)=>{if("object"!=P(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=P(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==P(e)?e:e+""))(r.key),r)}}function Dt(e,t,n){t=Pt(t);var r=e,t=Ot()?Reflect.construct(t,n||[],Pt(e).constructor):t.apply(e,n);if(!t||"object"!=P(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ot=function(){return!!e})()}function Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ct.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string};var Mt=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=Dt(this,n,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){"unordered"===e?r.toggleBlockType("unordered-list-item"):"ordered"===e?r.toggleBlockType("ordered-list-item"):"indent"===e?r.adjustDepth(1):r.adjustDepth(-1)},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleBlockType=function(e){var t=r.props,n=t.onChange,t=f.RichUtils.toggleBlockType(t.editorState,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(h.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(h.getBlockBeforeSelectedBlock)(e);return!e||!Object(h.isListBlock)(t)||e.get("type")!==t.get("type")||e.get("depth")<t.get("depth")},r.isOutdentDisabled=function(){var e=r.state.currentBlock;return!e||!Object(h.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(h.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Tt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(h.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(Ct,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&kt(r.prototype,e),t&&kt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);Mt.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object,className:a.a.string},o(204);function T(e){return(T="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)}function At(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,(e=>(e=((e,t)=>{if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=T(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==T(e)?e:e+""))(r.key),r)}}function It(e,t,n){t=Ft(t);var r=e,t=Rt()?Reflect.construct(t,n||[],Ft(e).constructor):t.apply(e,n);if(!t||"object"!=T(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rt=function(){return!!e})()}function Ft(e){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Lt=(e=>{function n(){var e=this,t=n;if(e instanceof t)return It(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Nt(r,e),r=n,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,l=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:y()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(c,{value:"left",className:y()(r.className),active:"left"===l,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(c,{value:"center",className:y()(o.className),active:"center"===l,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(c,{value:"right",className:y()(i.className),active:"right"===l,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(c,{value:"justify",className:y()(a.className),active:"justify"===l,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,s=e.onChange,e=e.translations,l=t.options,c=t.left,u=t.center,p=t.right,f=t.justify,h=t.className,d=t.dropdownClassName,m=t.title;return g.a.createElement(v,{className:y()("rdw-text-align-dropdown",h),optionWrapperClassName:y()(d),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:m||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:a&&t[a]&&t[a].icon||oe(t),alt:""}),0<=l.indexOf("left")&&g.a.createElement(b,{value:"left",active:"left"===a,className:y()("rdw-text-align-dropdownOption",c.className),title:c.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("center")&&g.a.createElement(b,{value:"center",active:"center"===a,className:y()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("right")&&g.a.createElement(b,{value:"right",active:"right"===a,className:y()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:p.icon,alt:""})),0<=l.indexOf("justify")&&g.a.createElement(b,{value:"justify",active:"justify"===a,className:y()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:f.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&At(r.prototype,e),t&&At(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function jt(e){return(jt="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)}function Bt(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,(e=>(e=((e,t)=>{if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=jt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==jt(e)?e:e+""))(r.key),r)}}function zt(e,t,n){t=Ht(t);var r=e,t=Vt()?Reflect.construct(t,n||[],Ht(e).constructor):t.apply(e,n);if(!t||"object"!=jt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kt(e,t){return(Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Lt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var Ut=(e=>{function t(e){var r;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(r=zt(this,t,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addBlockAlignmentData=function(e){var t=r.props,n=t.editorState,t=t.onChange;t(r.state.currentTextAlignment!==e?Object(h.setBlockData)(n,{"text-align":e}):Object(h.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Kt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(h.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||Lt;return g.a.createElement(o,{config:t,translations:e.translations,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n.currentTextAlignment},onChange:this.addBlockAlignmentData})}}])&&Bt(r.prototype,e),n&&Bt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function Wt(e){return(Wt="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)}function Gt(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,(e=>(e=((e,t)=>{if("object"!=Wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Wt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Wt(e)?e:e+""))(r.key),r)}}function qt(e,t,n){t=$t(t);var r=e,t=Yt()?Reflect.construct(t,n||[],$t(e).constructor):t.apply(e,n);if(!t||"object"!=Wt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yt=function(){return!!e})()}function $t(e){return($t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e,t){return(Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ut.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Zt=(e=>{function t(e){var o;if(this instanceof t)return(o=qt(this,t,[e])).onChange=function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)},o.handleClick=function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.handleKeyDown=function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.renderModal=function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,r="color"===o.state.currentStyle?n:e.bgColor;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(d.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=g.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Jt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=g.a.createElement(d.n,{tooltip:"Text color"},g.a.createElement(c,{tabIndex:0,"aria-label":"Font colors",onClick:e.onToggle,active:t,activeClassName:"bg-secondary"},g.a.createElement(d.f,{name:"text_format",size:20})));return g.a.createElement("div",{className:e.className,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(d.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Gt(r.prototype,e),n&&Gt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Xt=(Zt.propTypes={expanded:a.a.bool,onToggle:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.className},Zt);function Qt(e){return(Qt="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)}function en(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,(e=>(e=((e,t)=>{if("object"!=Qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Qt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Qt(e)?e:e+""))(r.key),r)}}function tn(e,t,n){t=rn(t);var r=e,t=nn()?Reflect.construct(t,n||[],rn(e).constructor):t.apply(e,n);if(!t||"object"!=Qt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nn=function(){return!!e})()}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function on(e,t){return(on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Zt=(e=>{function r(e){var i;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");(i=tn(this,r,[e])).state={expanded:!1,currentColor:"var(--text)",currentBgColor:void 0},i.expandCollapse=function(){i.setState({expanded:!1})},i.toggleColorPicker=function(){i.setState(function(e){return{expanded:!e.expanded}})},i.toggleColor=function(t,n){var e=i.props,r=e.editorState,o=e.onChange,e=Object(h.getSelectionEntity)(r);if(e){e=r.getCurrentContent().getEntity(e).getType();if("MENTION"===e||"LINK"===e)return}i.setState(function(){return{currentColor:n?"color-".concat(n):"color-var(--text)",currentBgColor:Object(h.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(h.toggleCustomInlineStyle)(r,t,n);e&&o(e)})};var t=e.editorState,e=e.modalHandler,n={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(n.currentColor=Object(h.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(h.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}var t,n=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&on(n,e),n=r,(e=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.currentColor,o=n.currentBgColor,n=n.expanded,i=t.component||Xt,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&en(n.prototype,e),t&&en(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),r=(Zt.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string},o(94)),r=o.n(r);function an(e){return(an="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)}function sn(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,ln(r.key),r)}}function ln(e){e=((e,t)=>{if("object"!=an(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=an(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==an(e)?e:e+""}function cn(e,t,n){t=pn(t);var r=e,t=un()?Reflect.construct(t,n||[],pn(e).constructor):t.apply(e,n);if(!t||"object"!=an(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(un=function(){return!!e})()}function pn(e){return(pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fn(e,t){return(fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var M=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=cn(this,a,[].concat(o))).state={showModal:!1,editing:!1,linkTarget:"",linkTitle:"",linkTargetOption:r.props.config.defaultTargetOption},r.addLink=function(){var e=r.props.onChange,t=r.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,(n=ln(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r.updateTargetOption=function(e){r.setState({linkTargetOption:e.target.checked?"_blank":"_self"})},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&fn(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.currentState,n=t.link,t=t.selectionText;e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption}),!e.expanded&&this.props.expanded&&this.setState({showModal:!1,linkTarget:n&&n.target,linkTitle:n&&n.title||t,linkTargetOption:this.props.config.defaultTargetOption,editing:void 0!==n})}},{key:"renderAddLinkModal",value:function(){var e=this.props.onExpandEvent,t=this.state,n=t.linkTitle,r=t.linkTarget;return g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:u},g.a.createElement(d.m,{weight:"strong",size:"large"},t.editing?"Edit":"Insert a"," link"),g.a.createElement(d.g,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:r,autoComplete:"off",autoFocus:!0,onClick:u}),g.a.createElement(d.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:u}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(d.a,{onClick:e,className:"mr-4"},"Cancel"),g.a.createElement(d.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"Save")))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?g.a.createElement(b,null,g.a.createElement(d.f,{size:20,name:n,className:"mr-4"}),g.a.createElement(d.m,null,t.title)):g.a.createElement(d.n,{tooltip:"Link"},g.a.createElement(c,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(d.f,{name:n,size:20})));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(d.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&sn(n.prototype,e),t&&sn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),hn=(M.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,inDropdown:a.a.boolean},M);function dn(e){return(dn="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)}function mn(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,En(r.key),r)}}function gn(e,t,n){t=vn(t);var r=e,t=yn()?Reflect.construct(t,n||[],vn(e).constructor):t.apply(e,n);if(!t||"object"!=dn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yn=function(){return!!e})()}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e,t){return(bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Sn(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?_n(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=En(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):_n(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function En(e){e=((e,t)=>{if("object"!=dn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=dn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==dn(e)?e:e+""}function wn(e){var t=xn.match(e.target);return Sn(Sn({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var xn=r()(),M=(e=>{function n(e){var s;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(s=gn(this,n,[e])).onExpandEvent=function(){var e=!s.state.expanded;s.setState({expanded:e}),e||s.props.onCloseLinkPopover()},s.onChange=function(e,t,n,r){var o=s.props.config.linkCallback;"link"===e?(e=(o||wn)({title:t,target:n,targetOption:r}),s.addLink(e.title,e.target,e.targetOption)):s.removeLink()},s.getCurrentValues=function(){var e,t=s.props.editorState,n=s.state,n=n.currentEntity,r=t.getCurrentContent(),o={};return n&&"LINK"===r.getEntity(n).get("type")&&(o.link={},e=n&&Object(h.getEntityRange)(t,n),o.link.target=n&&r.getEntity(n).get("data").url,o.link.targetOption=n&&r.getEntity(n).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(h.getSelectionText)(t),o},s.doExpand=function(){s.setState({expanded:!0})},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.doCollapse=function(){s.setState({expanded:!1})},s.removeLink=function(){var e=s.props,t=e.editorState,e=e.onChange,n=s.state.currentEntity,r=t.getSelection();n&&(n=Object(h.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(f.RichUtils.toggleLink(t,r,null)))},s.addLink=function(e,t,n){var r=s.props,o=r.editorState,r=r.onChange,i=s.state.currentEntity,a=o.getSelection(),i=(i&&(i=Object(h.getEntityRange)(o,i),a=a.getIsBackward()?a.merge({anchorOffset:i.end,focusOffset:i.start}):a.merge({anchorOffset:i.start,focusOffset:i.end})),o.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n,targetText:e}).getLastCreatedEntityKey()),t=f.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=f.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=f.EditorState.acceptSelection(n,a),t=f.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(f.EditorState.push(n,t,"insert-characters")),s.props.onCloseLinkPopover(),s.doCollapse()};var e=s.props,t=e.editorState;return s.state={expanded:e.linkPopoverOpen,selectionText:void 0,link:void 0,currentEntity:t?Object(h.getSelectionEntity)(t):void 0},s}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&bn(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(h.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state.expanded,r=this.getCurrentValues(),o=r.link;return g.a.createElement(hn,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r.selectionText},onChange:this.onChange})}}])&&mn(r.prototype,e),t&&mn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),r=(M.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,inDropdown:a.a.boolean,linkPopoverOpen:a.a.bool},M);function Cn(e){return(Cn="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)}function kn(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,(e=>(e=((e,t)=>{if("object"!=Cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Cn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Cn(e)?e:e+""))(r.key),r)}}function Dn(e,t,n){t=Pn(t);var r=e,t=On()?Reflect.construct(t,n||[],Pn(e).constructor):t.apply(e,n);if(!t||"object"!=Cn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function On(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(On=function(){return!!e})()}function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}M=(e=>{function t(e){var i;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(i=Dn(this,t,[e])).addLink=function(){var e=i.props,t=e.editorState,n=e.onChange,e=e.mention.trigger,e=void 0===e?"@":e,r=i.state.currentEntity,o=t.getSelection(),r=(r&&(r=Object(h.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),f.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=f.EditorState.push(t,r,"insert-characters");n(f.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(h.getSelectionEntity)(e):void 0},i}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Tn(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(h.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,e=e.mention.label;return g.a.createElement(d.n,{tooltip:e||t.title},g.a.createElement(c,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(d.f,{name:n,size:20})))}}])&&kn(r.prototype,e),n&&kn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),M.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.boolean};o(210);function Mn(e){return(Mn="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)}function An(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,In(r.key),r)}}function In(e){e=((e,t)=>{if("object"!=Mn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Mn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Mn(e)?e:e+""}function Rn(e,t,n){t=Nn(t);var r=e,t=Fn()?Reflect.construct(t,n||[],Nn(e).constructor):t.apply(e,n);if(!t||"object"!=Mn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fn=function(){return!!e})()}function Nn(e){return(Nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ln(e,t){return(Ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var jn=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=Rn(this,a,[].concat(o))).state={embeddedLink:"",height:r.props.config.defaultSize.height,width:r.props.config.defaultSize.width},r.onChange=function(){var e=r.props.onChange,t=r.state;e(t.embeddedLink,t.height,t.width)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,(n=In(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ln(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props;!t.expanded&&e.expanded&&(t=(e=t.config.defaultSize).height,this.setState({embeddedLink:"",height:t,width:e.width}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:y()("rdw-embedded-modal",o),onClick:u},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(c,{className:y()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&An(n.prototype,e),t&&An(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Bn=(jn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func},jn);function zn(e){return(zn="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)}function Vn(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,(e=>(e=((e,t)=>{if("object"!=zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=zn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==zn(e)?e:e+""))(r.key),r)}}function Hn(e,t,n){t=Un(t);var r=e,t=Kn()?Reflect.construct(t,n||[],Un(e).constructor):t.apply(e,n);if(!t||"object"!=zn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kn=function(){return!!e})()}function Un(e){return(Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wn(e,t){return(Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}jn=(e=>{function i(){var a,e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Hn(this,i,[].concat(r))).state={expanded:!1},a.onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.addEmbeddedLink=function(e,t,n){var r=a.props,o=r.editorState,i=r.onChange,r=r.config.embedCallback,r=r?r(e):e,e=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:r,height:t,width:n}).getLastCreatedEntityKey();i(f.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()},a}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Wn(n,e),n=i,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Bn;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Vn(n.prototype,e),t&&Vn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};o(211);function Gn(e){return(Gn="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)}function qn(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,(e=>(e=((e,t)=>{if("object"!=Gn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Gn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Gn(e)?e:e+""))(r.key),r)}}function Yn(e,t,n){t=Jn(t);var r=e,t=$n()?Reflect.construct(t,n||[],Jn(e).constructor):t.apply(e,n);if(!t||"object"!=Gn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function $n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($n=function(){return!!e})()}function Jn(e){return(Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zn(e,t){return(Zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Xn=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=Yn(this,a,[].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Zn(n,e),n=a,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:y()("rdw-emoji-modal",t),onClick:u},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=e.expanded,i=e.onExpandEvent;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t.title||e.translations["components.controls.emoji.emoji"]},g.a.createElement(c,{className:y()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&qn(n.prototype,e),t&&qn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Qn=(Xn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object},Xn);function er(e){return(er="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)}function tr(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,(e=>(e=((e,t)=>{if("object"!=er(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=er(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==er(e)?e:e+""))(r.key),r)}}function nr(e,t,n){t=or(t);var r=e,t=rr()?Reflect.construct(t,n||[],or(e).constructor):t.apply(e,n);if(!t||"object"!=er(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rr=function(){return!!e})()}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ir(e,t){return(ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Xn=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=nr(this,a,[].concat(o))).state={expanded:!1},r.onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addEmoji=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=f.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(f.EditorState.push(n,e,"insert-characters")),r.doCollapse()},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ir(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Qn;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&tr(n.prototype,e),t&&tr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function ar(e){return(ar="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)}function sr(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,lr(r.key),r)}}function lr(e){e=((e,t)=>{if("object"!=ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ar(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ar(e)?e:e+""}function cr(e,t,n){t=pr(t);var r=e,t=ur()?Reflect.construct(t,n||[],pr(e).constructor):t.apply(e,n);if(!t||"object"!=ar(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ur=function(){return!!e})()}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fr(e,t){return(fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var hr=(e=>{function t(e){var i;if(this instanceof t)return(i=cr(this,t,[e])).inputRef=null,i.showImageUploadOption=function(){i.setState({uploadHighlighted:!0})},i.addImageFromState=function(){var e=i.state,t=e.imgSrc,e=e.alt,n=i.state,r=n.height,n=n.width,o=i.props.onChange;isNaN(r)||(r+="px"),isNaN(n)||(n+="px"),o(t,r,n,e)},i.showImageURLOption=function(){i.setState({uploadHighlighted:!1})},i.toggleShowImageLoading=function(){var e=!i.state.showImageLoading;i.setState({showImageLoading:e})},i.updateValue=function(e){var t,n;i.setState((t={},n="".concat(e.target.name),e=e.target.value,(n=lr(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},i.selectImage=function(e){e.target.files&&0<e.target.files.length&&i.uploadImage(e.target.files[0]),e.target.value=null},i.uploadImage=function(e){i.toggleShowImageLoading(),(0,i.props.config.uploadCallback)(e).then(function(e){e=e.data;i.setState({showImageLoading:!1,dragEnter:!1,imgSrc:e.link||e.url},i.addImageFromState),i.fileUpload=!1}).catch(function(){i.setState({showImageLoading:!1,dragEnter:!1})})},i.fileUploadClick=function(e,t){i.inputRef.current&&t&&t.key&&i.inputRef.current.click(),i.fileUpload=!0},i.stopPropagation=function(e){i.fileUpload?i.fileUpload=!1:(e.preventDefault(),e.stopPropagation())},i.handleButtonClick=function(){i.inputRef&&i.inputRef.current&&i.inputRef.current.click()},i.inputRef=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&fr(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.title,t=t.inputAccept;return e.inDropdown?g.a.createElement(b,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(d.f,{name:n,size:20,className:"mr-4"}),g.a.createElement(d.m,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e.expanded},g.a.createElement(d.n,{tooltip:r},g.a.createElement(c,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(d.f,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&sr(r.prototype,e),n&&sr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),dr=(hr.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,inDropdown:a.a.bool},hr);function mr(e){return(mr="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)}function gr(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,(e=>(e=((e,t)=>{if("object"!=mr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=mr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==mr(e)?e:e+""))(r.key),r)}}function yr(e,t,n){t=br(t);var r=e,t=vr()?Reflect.construct(t,n||[],br(e).constructor):t.apply(e,n);if(!t||"object"!=mr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vr=function(){return!!e})()}function br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _r(e,t){return(_r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(c,{className:y()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var hr=(e=>{function t(e){var s;if(this instanceof t)return(s=yr(this,t,[e])).addImage=function(e,t,n,r){var o=s.props,i=o.editorState,a=o.onChange,e={src:e,height:t,width:n},t=(o.config.alt&&(e.alt=r),i.getCurrentContent().createEntity("IMAGE","MUTABLE",e).getLastCreatedEntityKey());a(f.AtomicBlockUtils.insertAtomicBlock(i,t," "))},s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&_r(r,e),r=t,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config;return g.a.createElement(dr,{config:t,inDropdown:e.inDropdown,onChange:this.addImage})}}])&&gr(r.prototype,e),n&&gr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Er=(hr.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.bool},o(212),Sr.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object},Sr);function wr(e){return(wr="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)}function xr(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,(e=>(e=((e,t)=>{if("object"!=wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=wr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==wr(e)?e:e+""))(r.key),r)}}function Cr(e,t,n){t=Dr(t);var r=e,t=kr()?Reflect.construct(t,n||[],Dr(e).constructor):t.apply(e,n);if(!t||"object"!=wr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function kr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kr=function(){return!!e})()}function Dr(e){return(Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Or(e,t){return(Or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Pr=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(n=Cr(this,a,[].concat(o))).state={expanded:!1},n.onExpandEvent=function(){n.signalExpanded=!n.state.expanded},n.expandCollapse=function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1},n.removeInlineStyles=function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))},n.removeAllInlineStyles=function(n){var r=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){r=f.Modifier.removeInlineStyle(r,n.getSelection(),e)}),ne(Object(h.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=f.Modifier.removeInlineStyle(r,n.getSelection(),t))}),f.EditorState.push(n,r,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Or(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Er;return g.a.createElement(r,{config:t,translations:e.translations,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&xr(n.prototype,e),t&&xr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);Pr.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},o(213);function Tr(e){return(Tr="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)}function Mr(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,(e=>(e=((e,t)=>{if("object"!=Tr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Tr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Tr(e)?e:e+""))(r.key),r)}}function Ar(e,t,n){t=Rr(t);var r=e,t=Ir()?Reflect.construct(t,n||[],Rr(e).constructor):t.apply(e,n);if(!t||"object"!=Tr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ir(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ir=function(){return!!e})()}function Rr(e){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fr(e,t){return(Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Nr=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=Ar(this,a,[].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Fr(n,e),n=a,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,s=a.undoDisabled,a=a.redoDisabled,e=e.translations,l=t.options,c=t.undo,u=t.redo,p=t.className,f=t.dropdownClassName,h=t.title;return g.a.createElement(v,{className:y()("rdw-history-dropdown",p),optionWrapperClassName:y()(f),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:h||e["components.controls.history.history"]},g.a.createElement("img",{src:oe(t),alt:""}),0<=l.indexOf("undo")&&g.a.createElement(b,{value:"undo",onClick:this.onChange,disabled:s,className:y()("rdw-history-dropdownoption",c.className),title:c.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("redo")&&g.a.createElement(b,{value:"redo",onClick:this.onChange,disabled:a,className:y()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:y()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(c,{value:"undo",onClick:this.onChange,className:y()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(c,{value:"redo",onClick:this.onChange,className:y()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Mr(n.prototype,e),t&&Mr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Lr(e){return(Lr="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)}function jr(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,(e=>(e=((e,t)=>{if("object"!=Lr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Lr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Lr(e)?e:e+""))(r.key),r)}}function Br(e,t,n){t=Vr(t);var r=e,t=zr()?Reflect.construct(t,n||[],Vr(e).constructor):t.apply(e,n);if(!t||"object"!=Lr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function zr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zr=function(){return!!e})()}function Vr(e){return(Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hr(e,t){return(Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Nr.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var Kr=(e=>{function o(e){var r;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(r=Br(this,o,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=f.EditorState[e](n);e&&t(e)},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})};var t={expanded:!(r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},n=e.editorState,e=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),r.state=t,e.registerCallBack(r.expandCollapse),r}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Hr(n,e),n=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.undoDisabled,o=t.component||Nr;return g.a.createElement(o,{config:t,translations:e.translations,currentState:{undoDisabled:r,redoDisabled:n.redoDisabled},expanded:n.expanded,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&jr(n.prototype,e),t&&jr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Ur(e){return(Ur="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)}Kr.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Wr=["config","currentState","onChange"],Gr=["config"];function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function Yr(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function $r(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,(e=>(e=((e,t)=>{if("object"!=Ur(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ur(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Ur(e)?e:e+""))(r.key),r)}}function Jr(e,t,n){t=Xr(t);var r=e,t=Zr()?Reflect.construct(t,n||[],Xr(e).constructor):t.apply(e,n);if(!t||"object"!=Ur(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Zr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zr=function(){return!!e})()}function Xr(e){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qr(e,t){return(Qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eo=(e=>{function n(e){var t;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(t=Jr(this,n,[e])).onExpandEvent=function(){t.setState({expanded:!t.state.expanded})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.onChange=function(e){t.doCollapse(),t.props.onChange(e)};e=t.props;e.editorState;return t.state={expanded:!1},t}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Qr(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler}},{key:"renderInDropdown",value:function(){var r=this,e=this.props,o=e.config,i=Yr(e,Wr);this.state.expanded;return g.a.createElement(v,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(d.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=to[e];return g.a.createElement(e,qr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=Yr(e,Gr),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=to[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,qr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&$r(r.prototype,e),t&&$r(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),to=(eo.propTypes={onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,mention:a.a.object,linkPopoverOpen:a.a.bool,translations:a.a.object},{textDecoration:e,heading:t,fontSize:st,insert:eo,fontFamily:n,list:Mt,textAlign:Ut,colorPicker:Zt,link:r,mention:M,embedded:jn,emoji:Xn,image:hr,remove:Pr,history:Kr});function no(e){return(no="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)}function ro(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,(e=>(e=((e,t)=>{if("object"!=no(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=no(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==no(e)?e:e+""))(r.key),r)}}function oo(e,t,n){t=ao(t);var r=e,t=io()?Reflect.construct(t,n||[],ao(e).constructor):t.apply(e,n);if(!t||"object"!=no(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function io(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(io=function(){return!!e})()}function ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function so(e,t){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lo(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function co(s){var e=(e=>{function a(){var o,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(o=oo(this,a,[].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=s.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(h.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=f.Modifier.setBlockType(r,t,"unstyled"),n=f.Modifier.removeRange(n,t,"backward");s.onChange(f.EditorState.push(s.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),s.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&so(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,e=e.contentState.getEntity(e.entityKey).getData().url,n=this.state.open,t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(d.m,{appearance:"link"},t));return g.a.createElement(d.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(d.h,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(d.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(d.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&ro(n.prototype,e),t&&ro(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);return e.propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},e}function uo(e){return(uo="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)}function po(){return(po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function fo(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ho(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?fo(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=yo(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):fo(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function mo(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,yo(r.key),r)}}function go(e,t,n){return t&&mo(e.prototype,t),n&&mo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yo(e){e=((e,t)=>{if("object"!=uo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=uo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==uo(e)?e:e+""}var e=go(function e(t){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.first=function(e){return null!=e&&e.length?e[0]:void 0},this.getMentionComponent=function(){function e(e){var o=e.entityKey,t=e.children,e=e.contentState.getEntity(o).getData().value;return i.renderer?i.renderer(t,e):(e=ho(ho({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(d.c,po({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(h.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=f.Modifier.setBlockType(n,r,"unstyled"),t=f.Modifier.removeRange(t,r,"backward");e.onChange(f.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),vo=(e.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"MENTION"===n.getEntity(e).getType()},t)},e);function bo(e){return(bo="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)}function A(e,t,n){return(t=ko(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _o(e,t,n){t=Eo(t);var r=e,t=So()?Reflect.construct(t,n||[],Eo(e).constructor):t.apply(e,n);if(!t||"object"!=bo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function So(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(So=function(){return!!e})()}function Eo(e){return(Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wo(e,t){return(wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xo(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,ko(r.key),r)}}function Co(e,t,n){return t&&xo(e.prototype,t),n&&xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ko(e){e=((e,t)=>{if("object"!=bo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=bo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==bo(e)?e:e+""}function Do(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oo(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src;return g.a.createElement("iframe",{height:e.height,width:e.width,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Po=Co(function e(t){var l=this,n=(Do(this,e),this.findSuggestionEntities=function(e,t){var n,r,o,i,a,s;l.config.getEditorState()&&(n=(a=l.config).separator,r=a.trigger,o=a.getSuggestions,i=a.fetchSuggestions,(a=(0,a.getEditorState)().getSelection()).get("anchorKey")===e.get("key"))&&a.get("anchorKey")===a.get("focusKey")&&(s=n+r,(void 0===(a=(e=(e=e.getText()).substr(0,a.get("focusOffset")===e.length-1?e.length:a.get("focusOffset")+1)).lastIndexOf(n+r))||a<0)&&e[0]===r&&(a=0,s=r),0<=a)&&(i||0<re(o(),e.substr(a+s.length,e.length),l.config.caseSensitive).length)&&t(0===a?0:a+1,e.length)},this.getSuggestionComponent=function(){var e,p=this.config;return(e=(e=>{function r(){var u;Do(this,r);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(u=_o(this,r,[].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0},u.focusOption=function(e,t,n,r){t=document.querySelectorAll(t),0===t.length&&(t=document.querySelectorAll(".".concat(r))),"string"==typeof n&&(n=parseInt(n)),r="down"===e?n+1:n-1,n=r,e="down"===e?t.length:-1,n===e&&(n=0),r=t[n=-1===r&&-1===e?t.length-1:n];r&&r.scrollIntoView({block:"end"})},u.onEditorKeyDown=function(e){var t=u.state.activeOption,n={},r=null==p||null==(r=p.dropdownOptions)?void 0:r.dropdownOptionClassName,o=".Editor-dropdown-option";u.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),u.focusOption("down",o,t,r),t===u.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?(e.preventDefault(),u.focusOption("up",o,t,r),n.activeOption=t<=0?u.filteredSuggestions.length-1:Number(t)-1):"Escape"===e.key?(n.showSuggestions=!1,Q()):"Enter"===e.key&&u.addMention(),u.setState(n)},u.onOptionMouseOver=function(e){u.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<u.filteredSuggestions.length&&u.setState({activeOption:e})},u.disableMouseEvents=function(){u.setState({keyDown:!0})},u.enableMouseEvents=function(){u.setState({keyDown:!1})},u.setSuggestionReference=function(e){u.suggestion=e},u.setDropdownReference=function(e){u.dropdown=e},u.filteredSuggestions=[],u.filterSuggestions=function(e){var t=p.getSuggestions?p.getSuggestions():[];u.filteredSuggestions=re(t,e,p.caseSensitive)},u.debouncedFetchSuggestion=function(n,e){var r,o=1<arguments.length&&void 0!==e?e:500;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){return n.apply(t,e)},o)}}(function(e){p.fetchSuggestions(e).then(function(e){u.filteredSuggestions=e,u.setState({showSuggestions:0<e.length,showLoader:!1})})}),u.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);p.fetchSuggestions?(u.setState({showLoader:!0}),u.debouncedFetchSuggestion(e)):u.filterSuggestions(e)},u.addMention=function(e,t,n){var r,o,i=u.state.activeOption,a=p.getEditorState(),s=p.onChange,l=p.separator,c=p.trigger,i=u.filteredSuggestions[i]||{label:t,value:n},t=u.props.children[0].props.text.substr(1);i&&(n=a,a=s,s=l,l=c,c=e,e=t,i=(t=i).label,r=t.value,t=t.url,r=n.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(l).concat(r),value:r,url:t}).getLastCreatedEntityKey(),t=Object(h.getSelectedBlock)(n).getText(),o=n.getSelection().focusOffset,s=(t.lastIndexOf(s+l)||0)+1,l=!1," "===t[o=t.length===s+1?t.length:o]&&(l=!0),c&&(o=s+e.length+1),t=n.getSelection().merge({anchorOffset:s,focusOffset:o}),c=f.EditorState.acceptSelection(n,t),e=f.Modifier.replaceText(c.getCurrentContent(),t,"".concat(i),null,r),c=f.EditorState.push(c,e,"insert-characters"),l||(t=c.getSelection().merge({anchorOffset:s+i.length,focusOffset:s+i.length}),c=f.EditorState.acceptSelection(c,t),e=f.Modifier.insertText(c.getCurrentContent(),t," ",c.getCurrentInlineStyle(),void 0)),a(f.EditorState.push(c,e,"insert-characters")))},u.getOptionClass=function(e){var t=u.state.activeOption;return y()(A(A(A({},"Editor-dropdown-option",!0),"Editor-dropdown-option--highlight",e===t),"Editor-dropdown--keydown",u.state.keyDown))},u.renderOption=function(e,t){var n,r=p.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,u.state.activeOption,t),g.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){u.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:u.onOptionMouseOver})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return u.addMention("onMouseSelect")},"data-index":t,onMouseOver:u.onOptionMouseOver,className:u.getOptionClass(t)},o&&g.a.createElement(d.f,{name:o,className:"mr-4"}),g.a.createElement(d.m,null,i))},u.mentionPopover=function(e){var t=u.state,n=t.showLoader;return e?e(u.filteredSuggestions,u.addMention,n,t.showSuggestions,u.state.activeOption):n?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(d.j,{withImage:!1},g.a.createElement(d.k,{length:"large"}),g.a.createElement(d.k,{length:"large"}),g.a.createElement(d.k,{length:"large"}))):u.filteredSuggestions.map(function(e,t){return u.renderOption(e,t)})},u}var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wo(t,e),Co(r,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left;this.setState({style:{left:t,top:e.top+25}}),Z.registerCallBack(this.onEditorKeyDown),X(),this.updateSuggestions(this.props),this.setState({showSuggestions:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){Z.deregisterCallBack(this.onEditorKeyDown),Q(),p.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this.props.children,t=this.state.showSuggestions,n=p.dropdownOptions,n=void 0===n?{}:n,r=n.dropdownClassName,o=n.popoverRenderer,n=n.appendToBody,n=void 0===n||n,r=y()(A(A(A({},"Popover",!0),"".concat(r),void 0!==r),"Editor-mention-dropdown",!0));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:p.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,e),t&&g.a.createElement(d.l,{position:"bottom-start",open:!0,appendToBody:n,boundaryElement:this.setSuggestionReference,className:r,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents},this.mentionPopover(o)))}}])})(i.Component)).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:l.findSuggestionEntities,component:l.getSuggestionComponent()}},t.separator),r=t.trigger;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:t.getSuggestions,onChange:t.onChange,getEditorState:t.getEditorState,getWrapperRef:t.getWrapperRef,caseSensitive:t.caseSensitive,dropdownOptions:t.dropdownOptions,optionClassName:t.optionClassName,modalHandler:t.modalHandler,fetchSuggestions:t.fetchSuggestions}}),To=function(e){return[new vo(e).getMentionDecorator(),new Po(e).getSuggestionDecorator()]},Mo=(Oo.propTypes={block:a.a.object,contentState:a.a.object},Oo);function Ao(e,t,n){return Math.min(Math.max(e,t),n)}var I={east:1,north:8,south:2,west:4};function Io(e){function t(e,t){var n,r,o,i=s.current,a=l.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=u.current).startWidth=n,o.startHeight=r,o.ratio=n/r,o.currentWidth=n,o.currentHeight=r,o.startX=e.clientX,o.startY=e.clientY,o.isResizing=!0,o=(e=o.direction=t)===I.east||e===I.west,t=e===I.north||e===I.south,e=e&I.north&&e&I.west||e&I.south&&e&I.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==p&&p.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),c.current.value=document.body.style.getPropertyValue("-webkit-user-select"),c.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),a.classList.add("image-control-wrapper--resizing"),i.style.height="".concat(r,"px"),i.style.width="".concat(n,"px"),document.addEventListener("pointermove",h),document.addEventListener("pointerup",d))}var o=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,l=Object(i.useRef)(),c=Object(i.useRef)({priority:"",value:"default"}),u=Object(i.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),p=(Object(i.useEffect)(function(){return function(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d)}},[]),e),a=n||(null!==p?p.getBoundingClientRect().width-20:100),f=null!==p?p.getBoundingClientRect().height-20:100,h=function(e){var t,n=s.current,r=u.current,o=r.direction&(I.east|I.west),i=r.direction&(I.south|I.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&I.east?-o:o,t=(o=Ao(r.startWidth+o,100,a))/r.ratio,n.style.width="".concat(o,"px"),n.style.height="".concat(t,"px"),r.currentHeight=t,r.currentWidth=o):i?(t=Math.floor(r.startY-e.clientY),t=r.direction&I.south?-t:t,o=Ao(r.startHeight+t,100,f),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&I.east?-i:i,t=Ao(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},d=function(){var e,t=s.current,n=u.current,r=l.current;null!==t&&null!==r&&n.isResizing&&(t=n.currentWidth,e=n.currentHeight,n.startWidth=0,n.startHeight=0,n.ratio=0,n.startX=0,n.startY=0,n.currentWidth=0,n.currentHeight=0,n.isResizing=!1,r.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d),null!==p&&p.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",c.current.value,c.current.priority)),o(t,e))};return i.createElement("div",{ref:l},i.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,I.north|I.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,I.south|I.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,I.south|I.west)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,I.north|I.west)}}))}o(214);function Ro(e){return(Ro="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)}function Fo(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,(e=>(e=((e,t)=>{if("object"!=Ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ro(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Ro(e)?e:e+""))(r.key),r)}}function No(e,t,n){t=jo(t);var r=e,t=Lo()?Reflect.construct(t,n||[],jo(e).constructor):t.apply(e,n);if(!t||"object"!=Ro(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lo=function(){return!!e})()}function jo(e){return(jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bo(e,t){return(Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var zo=function(p){var e=(e=>{function t(e){var r;if(this instanceof t)return(r=No(this,t,[e])).imageRef=null,r.state={hovered:!1},r.setEntityAlignmentLeft=function(){r.setEntityAlignment("left")},r.setEntityAlignmentRight=function(){r.setEntityAlignment("right")},r.setEntityAlignmentCenter=function(){r.setEntityAlignment("center")},r.setEntityAlignment=function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e,alt:e}),p.onChange(f.EditorState.push(p.getEditorState(),t,"change-block-data"))},r.removeEntity=function(e){e.preventDefault(),e.stopPropagation();var e=r.props,t=e.block,e=e.contentState,t=t.getKey(),n=e.getKeyAfter(t),t=new f.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=f.Modifier.setBlockType(e,t,"unstyled"),n=f.Modifier.removeRange(n,t,"backward");p.onChange(f.EditorState.push(p.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){var e;r.state.hovered&&(e=p.getEditorState().getCurrentContent(),p.onChange(f.EditorState.push(p.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})},r.imageRef=g.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(r),r;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Bo(r,e),r=t,(e=[{key:"renderAlignmentOptions",value:function(e){return g.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(d.f,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(d.f,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(d.f,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(d.f,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=p.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(p.onChange(f.EditorState.push(p.getEditorState(),n,"")),p.getEditorState()),t=f.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");p.onChange(f.EditorState.push(e,t,"insert-characters"))}},{key:"onResizeEnd",value:function(e,t){this.setState({hovered:!1}),this.updateImageSize(e,t)}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=p.isImageAlignmentEnabled,o=p.isImageResizeEnabled,i=p.isReadOnly,a=p.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,l=e.height,c=e.width,e=e.alt,a=("center"!==e||s?a&&"right"===e&&!s?this.setEntityAlignmentRight():a&&"left"===e&&!s&&this.setEntityAlignmentLeft():this.setEntityAlignmentCenter(),document.getElementById("RichTextEditorWrapper")),s=y()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),u=y()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return g.a.createElement("div",{className:s},g.a.createElement("span",{onClick:this.toggleHovered,className:u},g.a.createElement("img",{src:t,alt:e,style:{height:l,width:c},ref:this.imageRef}),!i&&n&&g.a.createElement(g.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&g.a.createElement(Io,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&Fo(r.prototype,e),n&&Fo(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);return e.propTypes={block:a.a.object,contentState:a.a.object},e},Vo=function(n,r){return function(e){if("function"==typeof r){var t=r(e,n,n.getEditorState);if(t)return t}if("atomic"===e.getType()){t=n.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(t&&"IMAGE"===t.type)return{component:zo(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Mo,editable:!1}}}},Ho=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],eo=(t="ctrl",t=((null==(st=navigator.userAgentData)?void 0:st.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),Ko={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(eo,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(eo,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(eo,"+U)"),label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"text_fields",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:" Bulleted list"},ordered:{icon:"format_list_numbered",title:"Numbered list"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:Ho},insert:{max:3,options:["image","mention","link"],image:{icon:"insert_photo",isVisible:!0,title:"Image",alt:"",defaultSize:{height:"100px",width:"300px"},inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",uploadCallback:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t({data:{link:r.result}})},r.onerror=function(e){return n(e)},r.readAsDataURL(e)})}},link:{isVisible:!0,icon:"insert_link",linkCallback:void 0,title:"Link"},mention:{isVisible:!0,icon:"alternate_email",title:"Personalization"}},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,resizeEnabled:!1,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0}},n={title:a.a.string,label:a.a.string},Mt={isVisible:a.a.bool,title:a.a.string,alt:a.a.string,uploadCallback:a.a.func,resizeEnabled:a.a.bool,defaultSize:a.a.shape({height:a.a.string,width:a.a.string})},Ut={isVisible:a.a.bool,title:a.a.string},Zt=a.a.shape({textDecoration:a.a.shape({max:a.a.number,bold:a.a.shape(n),italic:a.a.shape(n),underline:a.a.shape(n),strikethrough:a.a.shape(n)}),colorPicker:a.a.shape({colors:a.a.arrayOf(a.a.string)}),insert:a.a.shape({max:a.a.number,image:a.a.shape(Mt),link:a.a.shape(Ut)})});o(215),o(95),o(96),o(97),o(98),o(99);o(100),o(101),o(102);function Uo(e){return(Uo="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)}function Wo(){return(Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function Go(e){return(e=>{if(Array.isArray(e))return qo(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?qo(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qo(e,t):void 0})(e)||(()=>{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 qo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yo(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yo(Object(n),!0).forEach(function(e){$o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $o(e,t,n){return(t=Zo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jo(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,Zo(r.key),r)}}function Zo(e){e=((e,t)=>{if("object"!=Uo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Uo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Uo(e)?e:e+""}function Xo(e,t,n){t=ei(t);var r=e,t=Qo()?Reflect.construct(t,n||[],ei(e).constructor):t.apply(e,n);if(!t||"object"!=Uo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Qo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qo=function(){return!!e})()}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ti(e,t){return(ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var r=(e=>{function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(a=Xo(this,o,[e])).onEditorBlur=function(){a.setState({editorFocused:!1})},a.onEditorFocus=function(e){var t=a.props.onFocus,n=(a.setState({editorFocused:!0}),a.focusHandler.isEditorFocused());t&&n&&t(e)},a.onEditorMouseDown=function(){a.focusHandler.onEditorMouseDown()},a.keyBindingFn=function(e){if("Tab"===e.key)return t=a.props.onTab,(n=Object(h.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault()),t&&t(e,n),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||ee()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=f.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(t),a.setState({editorState:f.EditorState.moveFocusToEnd(f.EditorState.createEmpty())}),!0}if("Delete"===e.key){var n=f.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return"Enter"===e.key?(t=a.state.editorState.getCurrentContent(),n=a.state.editorState.getSelection(),t=f.Modifier.insertText(t,n,"\n"),n=f.EditorState.push(a.state.editorState,t,"insert-characters"),a.setState({editorState:n}),!0):Object(f.getDefaultKeyBinding)(e)},a.onToolbarFocus=function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)},a.onWrapperBlur=function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())},a.onChange=function(e,t){var n=a.props,r=n.readOnly,n=n.onEditorStateChange;r||"atomic"===Object(h.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),s(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.onCloseLinkPopover=function(){a.setState({linkPopoverOpen:!1})},a.onEditLink=function(){a.setState(R(R({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:lo,component:co({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Go(To(R(R({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new f.CompositeDecorator(t)},a.getWrapperRef=function(){return a.wrapper},a.getEditorState=function(){return a.state?a.state.editorState:null},a.getSuggestions=function(){return a.props.mention&&a.props.mention.suggestions},a.afterChange=function(t){setTimeout(function(){var e=a.props.onContentStateChange;e&&e(Object(f.convertToRaw)(t.getCurrentContent()))})},a.isReadOnly=function(){return a.props.readOnly},a.isImageAlignmentEnabled=function(){return a.state.toolbar.image.alignmentEnabled},a.createEditorState=function(e){var t,n;return s(a.props,"editorState")?a.props.editorState&&(t=f.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=f.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(f.convertFromRaw)(a.props.contentState),t=f.EditorState.createWithContent(n,e),t=f.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(f.convertFromRaw)(n),t=f.EditorState.createWithContent(n,e),t=f.EditorState.moveSelectionToEnd(t)),t=t||f.EditorState.createEmpty(e)},a.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","wrapperClassName","editorStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],e=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},e&&0<e.length&&e.forEach(function(e){r[e]=t[e]}),r;var t,n,r},a.getStyleMap=function(e){return R(R({},Object(h.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(f.convertFromRaw)(e),t=a.state.editorState,t=f.EditorState.push(t,e,"insert-characters");return f.EditorState.moveSelectionToEnd(t)},a.focusEditor=function(){setTimeout(function(){a.editor.focus()})},a.handleKeyCommand=function(e){var t=a.state,n=t.editorState,t=t.toolbar.textDecoration;if(t&&0<=t.options.indexOf(e)){t=f.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){var t;return!!ee()||(t=a.state.editorState,!!(t=Object(h.handleNewLine)(t,e))&&(a.onChange(t),!0))},a.handlePastedTextFn=function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return t&&t.includes("<figure")?t:t&&t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(h.getSelectedBlock)(t))&&"code"===r.type?(r=f.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(f.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=j()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=f.Modifier.replaceWithFragment(n,t.getSelection(),new z.List(i.contentBlocks)),o(f.EditorState.push(t,n,"insert-characters")),!0))},a.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()},a.isEmptyListBlock=function(){var e=a.state.editorState.getCurrentContent();return!e.hasText()&&"unstyled"!==e.getBlockMap().first().getType()},a.blockRenderMap=f.DefaultDraftBlockRenderMap.merge(Object(z.Map)({"header-one":{wrapper:g.a.createElement(d.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(d.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(d.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(d.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:g.a.createElement("div",null,a.props.children)}}));var t=ie(Ko,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new U,a.focusHandler=new $,e.toolbar&&e.toolbar.insert&&(null==(n=e.toolbar.insert.image)?void 0:n.resizeEnabled)),r=e.toolbar&&e.toolbar.insert&&(null==(r=e.toolbar.insert.image)?void 0:r.nonFloatingImage),n=(a.blockRendererFn=Vo({isReadOnly:e.readOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,isImageResizeEnabled:n,nonFloatingImage:r,getEditorState:a.getEditorState,onChange:a.onChange}),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t),a.createEditorState(a.compositeDecorator));return Object(h.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ti(n,e),n=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=ie(Ko,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?f.EditorState.set(n,{decorator:this.compositeDecorator}):f.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=f.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(h.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props))}},{key:"render",value:function(){var e=this.state,t=e.editorState,r=e.toolbar,e=this.props,n=e.toolbarClassName,o=e.editorClassName,i=e.wrapperClassName,a=e.editorStyle,s=e.ariaLabel,l=e.mention,c={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:t,onChange:this.onChange},e=y()($o({},"Editor-toolbar",!0),n),n=y()($o({},"Editor-wrapper",!0),i),i=y()($o($o({},"Editor",!0),"hide-placeholder",this.isEmptyListBlock()),o);return g.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=to[e],e=r[e];return g.a.createElement(n,Wo({key:t},c,{config:e,mention:l,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:Z.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},g.a.createElement(f.Editor,Wo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:te,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&Jo(n.prototype,e),t&&Jo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),ni=(r.utils={EditorState:f.EditorState,ContentState:f.ContentState,RichUtils:f.RichUtils,convertFromRaw:f.convertFromRaw,convertToRaw:f.convertToRaw,htmlToState:function(e){var e=L(e,'<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"'),e=L(e,"<br/>",""),e=L(e,"<p> </p>",""),e=j()(e);if(e)return{contentState:e=f.ContentState.createFromBlockArray(e.contentBlocks),editorState:f.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(f.convertToRaw)(e.getCurrentContent());return B()(e,void 0,!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"left","center"===e.alt||"center"===t?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):!n||"left"!==e.alt&&"left"!==t?n?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="float:').concat(t,"; height: ").concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},r.propTypes={mention:a.a.shape({separator:a.a.string,trigger:a.a.string,chipOptions:a.a.object,dropdownOptions:a.a.shape({dropdownClassName:a.a.string,customOptionRenderer:a.a.func,popoverRenderer:a.a.func,appendToBody:a.a.bool,dropdownOptionClassName:a.a.string}),renderer:a.a.func,suggestions:a.a.shape({label:a.a.string,value:a.a.string,icon:a.a.string}),fetchSuggestions:a.a.func}),editorState:a.a.object,onEditorStateChange:a.a.func,defaultEditorState:a.a.object,onContentStateChange:a.a.func,defaultContentState:a.a.object,contentState:a.a.object,spellCheck:a.a.bool,toolbar:Zt,showToolbar:a.a.bool,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarClassName:a.a.string,editorStyle:a.a.object,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,textAlignment:a.a.oneOf(["left","right","center"]),readOnly:a.a.bool,autoFocus:a.a.bool,placeholder:a.a.string,ariaLabel:a.a.string,wrapperId:a.a.number,editorRef:a.a.func,handlePastedText:a.a.func},r.defaultProps={autoFocus:!0,showToolbar:!0},r),ri=o(50),oi=o.n(ri),ii=o(51);function ai(e){return(ai="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)}function si(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?si(Object(n),!0).forEach(function(e){li(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function li(e,t,n){return(t=(e=>(e=((e,t)=>{if("object"!=ai(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ai(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==ai(e)?e:e+""))(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ci(e){return(e=>{if(Array.isArray(e))return ui(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?ui(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ui(e,t):void 0})(e)||(()=>{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 ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pi(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function fi(e,r){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(d.i,{key:r[t]},n.map(function(e){return[e,g.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?g.a.createElement("p",null,g.a.createElement("br",null)):g.a.createElement(d.i,{key:r[t]},e.map(function(e){return[e]}))}))}function hi(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=F(F({},_i),n),r=F(F({},vi),r),o=F(F({},bi),o),r=F(F(F({},Si),r),o),o=F(F({},gi),Ei(t)),t={blocks:r,entities:n,styles:Object(ri.createStylesRenderer)(yi,o)};return oi()(e,t,!1)}function di(e){var t=e.raw;return(t=t&&hi(t,{entities:e.entities,headings:e.headings,list:e.list,colors:e.colors}))?g.a.createElement("div",{className:"Preview-wrapper"},t):null}var mi={paddingLeft:"1.5em",margin:"0px"},gi={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},yi=function(e){var t=e.children;return g.a.createElement("span",{key:e.key,style:e.style},t)},vi={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(d.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(d.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(d.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(d.e,{size:"m",key:n[t]},e)})}},bi={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:mi},pi(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:mi},pi(e,t))}},_i={LINK:function(e,t,n){n=n.key;return g.a.createElement(d.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alignment;return g.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:r||"left",display:"flex"}},g.a.createElement("img",{src:n,alt:t.alt,height:t.height,width:t.width}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Si={unstyled:function(e,t,n){t=t.keys;return fi(e,t)},atomic:function(e,t){return e[0]}},Ei=function(e){return[].concat(ci(Ho),ci(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return F(F({},e),{},li({},n,t))},{})},wi=(di.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&hi(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(ii.renderToStaticMarkup)(e)?(t=(n=o(232)).name,n=n.version,t="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(t,"/v").concat(n,"/design-system.css"),n=r?'<link rel="stylesheet" href="'.concat(t,'">'):"","".concat(n," ").concat(Object(ii.renderToStaticMarkup)(e))):""}},di.propTypes={raw:a.a.object.isRequired,colors:a.a.arrayOf(a.a.string),list:a.a.object,headings:a.a.object,entities:a.a.object},di.defaultProps={entities:{},headings:{},list:{},colors:[]},di)}]);
|
|
59
|
+
var w=e(18),x=e(0);function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e="function"==typeof Symbol&&Symbol.for,s=e?Symbol.for("react.portal"):60106,l=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,j=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,B=e?Symbol.for("react.suspense_list"):60120,z=e?Symbol.for("react.memo"):60115,V=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,K=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.scope"):60119;function g(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case l:return"Fragment";case s:return"Portal";case u:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case B:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return"Context.Consumer";case f:return"Context.Provider";case h:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case z:return g(e.type);case H:return g(e.render);case V:if(e=1===e._status?e._result:null)return g(e)}}return null}var e=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function y(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var m=new Uint16Array(16),t=0;t<15;t++)m[t]=t+1;m[15]=0;var G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,q=Object.prototype.hasOwnProperty,Y={},$={};function J(e){return q.call($,e)||!q.call(Y,e)&&(G.test(e)?$[e]=!0:void(Y[e]=!0))}function Z(e,t,n,r){if(null==t||((e,t,n,r)=>{if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return r?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}})(e,t,n,r))return 1;if(!r&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function n(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var k={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new n(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new n(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){k[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new n(e,5,!1,e.toLowerCase(),null,!1)}),/[\-:]([a-z])/g);function o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r,o);k[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),k.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){k[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function D(e){if("boolean"==typeof e||"number"==typeof e)return""+e;var t=X.exec(e=""+e);if(t){for(var n="",r=0,o=t.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}r!==o&&(n+=e.substring(r,o)),r=o+1,n+=t}e=r!==o?n+e.substring(r,o):n}return e}var Q="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},v=null,i=null,a=null,b=!1,_=!1,S=null,E=0;function O(){if(null===v)throw Error(C(321));return v}function ee(){if(0<E)throw Error(C(312));return{memoizedState:null,queue:null,next:null}}function P(){return null===a?null===i?(b=!1,i=a=ee()):(b=!0,a=i):a=null===a.next?(b=!1,a.next=ee()):(b=!0,a.next),a}function te(e,t,n,r){for(;_;)_=!1,E+=1,a=null,n=e(t,r);return i=v=null,E=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=O(),a=P(),b){var r=a.queue;if(t=r.dispatch,null===S||void 0===(n=S.get(r)))return[a.memoizedState,t];for(S.delete(r),r=a.memoizedState;r=e(r,n.action),null!==(n=n.next););return[a.memoizedState=r,t]}return e=e===ne?"function"==typeof t?t():t:void 0!==n?n(t):t,a.memoizedState=e,e=(e=a.queue={last:null,dispatch:null}).dispatch=function(e,t,n){if(!(E<25))throw Error(C(301));if(e===v)if(_=!0,e={action:n,next:null},null===S&&(S=new Map),void 0===(n=S.get(t)))S.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}.bind(null,v,e),[a.memoizedState,e]}function T(){}var M=0,oe={readContext:function(e){var t=M;return y(e,t),e[t]},useContext:function(e){O();var t=M;return y(e,t),e[t]},useMemo:function(e,t){if(v=O(),t=void 0===t?null:t,null!==(a=P())){var n=a.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!Q(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),a.memoizedState=[e,t],e},useReducer:re,useRef:function(e){v=O();var t=(a=P()).memoizedState;return null===t?a.memoizedState=e={current:e}:t},useState:function(e){return re(ne,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:T,useEffect:T,useDebugValue:T,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return O(),e},useTransition:function(){return O(),[function(e){e()},!1]}},ie="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var se={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},le=w({menuitem:!0},se),A={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ce=["Webkit","ms","Moz","O"],ue=(Object.keys(A).forEach(function(t){ce.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),A[e]=A[t]})}),/([A-Z])/g),pe=/^ms-/,I=x.Children.toArray,R=e.ReactCurrentDispatcher,fe={listing:!0,pre:!0,textarea:!0},he=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,de={},F={};var me=Object.prototype.hasOwnProperty,ge={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ye(e,t){if(void 0===e)throw Error(C(152,g(t)||"Component"))}function ve(h,d,m){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=((e,t,n,r)=>{if(r&&"object"==typeof(r=e.contextType)&&null!==r)return y(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=W;return t})(t,d,m,n),o=[],i=!1,a={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===o)return null},enqueueReplaceState:function(e,t){i=!0,o=[t]},enqueueSetState:function(e,t){if(null===o)return null;o.push(t)}};if(n){n=new t(e.props,r,a);"function"==typeof t.getDerivedStateFromProps&&null!=(l=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=w({},n.state,l))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void ye(h=n,t);if(n.props=e.props,n.context=r,n.updater=a,void 0===(a=n.state)&&(n.state=a=null),"function"==typeof n.UNSAFE_componentWillMount||"function"==typeof n.componentWillMount)if("function"==typeof n.componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&"function"!=typeof t.getDerivedStateFromProps&&n.UNSAFE_componentWillMount(),o.length){var a=o,s=i,o=null,i=!1;if(s&&1===a.length)n.state=a[0];else{for(var l=s?a[0]:n.state,c=!0,s=s?1:0;s<a.length;s++){var u=a[s];null!=(u="function"==typeof u?u.call(n,l,e.props,r):u)&&(c?(c=!1,l=w({},l,u)):w(l,u))}n.state=l}}else o=null;if(ye(h=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var p,f=n.getChildContext();for(p in f)if(!(p in e))throw Error(C(108,g(t)||"Unknown",p))}f&&(d=w({},d,f))}for(;x.isValidElement(h);){var t=h,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:h,context:d}}(e=_e.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,m[e]=m[0],m[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(y(n,r),n[r]);this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},e.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},e.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},e.read=function(e){if(this.exhausted)return null;var t=M,n=(M=this.threadID,R.current);R.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;m[i]=m[0],m[0]=i;break}var a=this.stack[this.stack.length-1];if(o||a.childIndex>=a.children.length){var s=a.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===f)this.popProvider(a.type);else if(a.type===d){this.suspenseDepth--;var l=r.pop();if(o){var o=!1,c=a.fallbackFrame;if(!c)throw Error(C(303));this.stack.push(c),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=s}else{var u=a.children[a.childIndex++],p="";try{p+=this.render(u,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(C(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=p}}return r[0]}finally{R.current=n,M=t}},e.render=function(e,t,n){if("string"==typeof e||"number"==typeof e){if(""===(n=""+e))return"";if(!this.makeStaticMarkup){if(this.previousWasTextNode)return"\x3c!-- --\x3e"+D(n);this.previousWasTextNode=!0}return D(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!x.isValidElement(e)){if(null==e||null==e.$$typeof)return e=I(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(C(257));throw Error(C(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case c:case j:case u:case B:case l:return e=I(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case d:throw Error(C(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case h:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=I(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case z:return e=[x.createElement(o.type,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case f:return n={type:e,domNamespace:n,children:o=I(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case p:o=e.type,i=e.props;var a=this.threadID;return y(o,a),o=I(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case K:throw Error(C(338));case V:switch(o=e.type,-1===(r=o)._status&&(r._status=0,i=(i=r._ctor)(),(r._result=i).then(function(e){0===r._status&&(e=e.default,r._status=1,r._result=e)},function(e){0===r._status&&(r._status=2,r._result=e)})),o._status){case 1:return e=[x.createElement(o._result,w({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw o._result;default:throw Error(C(295))}case U:throw Error(C(343))}throw Error(C(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!de.hasOwnProperty(r)){if(!he.test(r))throw Error(C(65,r));de[r]=!0}var o,i,a,s,l,c=e.props;if("input"===r)c=w({type:void 0},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=c.value?c.value:c.defaultValue,checked:null!=c.checked?c.checked:c.defaultChecked});else if("textarea"===r){if(null==(u=c.value)){var u=c.defaultValue,p=c.children;if(null!=p){if(null!=u)throw Error(C(92));if(Array.isArray(p)){if(!(p.length<=1))throw Error(C(93));p=p[0]}u=""+p}null==u&&(u="")}c=w({},c,{value:void 0,children:""+u})}else if("select"===r)this.currentSelectValue=null!=c.value?c.value:c.defaultValue,c=w({},c,{value:void 0});else if("option"===r){var p=this.currentSelectValue,f=null==(f=c.children)?f:(o="",x.Children.forEach(f,function(e){null!=e&&(o+=e)}),o);if(null!=p){var h=null!=c.value?c.value+"":f;if(u=!1,Array.isArray(p)){for(var d=0;d<p.length;d++)if(""+p[d]===h){u=!0;break}}else u=""+p===h;c=w({selected:void 0,children:void 0},c,{selected:u,children:f})}}if(u=c){if(le[r]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(C(137,r,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(C(60));if(!("object"==typeof u.dangerouslySetInnerHTML&&"__html"in u.dangerouslySetInnerHTML))throw Error(C(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(C(62,""))}for(E in u=c,p=this.makeStaticMarkup,f=1===this.stack.length,h="<"+e.type,u)if(me.call(u,E)){var m=u[E];if(null!=m){if("style"===E){var g,y,v,b,d=void 0,_="",S="";for(d in m)m.hasOwnProperty(d)&&(g=0===d.indexOf("--"),null!=(y=m[d]))&&(_+=S+(b=g?d:(b=d,F.hasOwnProperty(b)?F[b]:(v=b.replace(ue,"-$1").toLowerCase().replace(pe,"-ms-"),F[b]=v)))+":",S=d,_+=g=null==y||"boolean"==typeof y||""===y?"":g||"number"!=typeof y||0===y||A.hasOwnProperty(S)&&A[S]?(""+y).trim():y+"px",S=";");m=_||null}d=null;e:if(y=u,-1===(g=r).indexOf("-"))g="string"==typeof y.is;else switch(g){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":g=!1;break e;default:g=!0}g?ge.hasOwnProperty(E)||(d=J(d=E)&&null!=m?d+'="'+D(m)+'"':""):(i=E,a=m,l=s=void 0,s=k.hasOwnProperty(i)?k[i]:null,d=(l=(l="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||Z(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(l=s.type)||4===l&&!0===a?i+'=""':i+'="'+D(a=s.sanitizeURL?""+a:a)+'"'):J(i)?i+'="'+D(a)+'"':""),d&&(h+=" "+d)}}p||f&&(h+=' data-reactroot=""');var E=h;u="",se.hasOwnProperty(r)?E+="/>":(E+=">",u="</"+e.type+">");e:{if(null!=(p=c.dangerouslySetInnerHTML)){if(null!=p.__html){p=p.__html;break e}}else if("string"==typeof(p=c.children)||"number"==typeof p){p=D(p);break e}p=null}return null!=p?(c=[],fe.hasOwnProperty(r)&&"\n"===p.charAt(0)&&(E+="\n"),E+=p):c=I(c.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ae(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:r,children:c,childIndex:0,context:t,footer:u}),this.previousWasTextNode=!1,E};var be=_e,e={renderToString:function(e){e=new be(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new be(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(C(207))},renderToStaticNodeStream:function(){throw Error(C(208))},version:"16.14.0"};function _e(e,t){if(e=x.isValidElement(e)&&(e.type!==l||(e=e.props.children,x.isValidElement(e)))?[e]:I(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:W,footer:""},0===(n=m[0])){var n,r=m,o=2*(n=r.length);if(!(o<=65536))throw Error(C(304));var i=new Uint16Array(o);for(i.set(r),(m=i)[0]=n+1,r=n;r<o-1;r++)m[r]=r+1;m[o-1]=0}else m[0]=m[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}N.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"2.3.1-0","description":"A rich text on top of DraftJS.","main":"dist/rich-text-editor.js","module":"dist/rich-text-editor.js","author":"Innovaccer","devDependencies":{"@babel/core":"^7.7.4","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/preset-env":"^7.7.4","@babel/preset-react":"^7.7.4","@babel/register":"^7.7.4","@innovaccer/design-system":"^2.41.3","@storybook/addon-docs":"6.5.10","@storybook/addon-essentials":"6.5.10","@storybook/react":"6.5.10","@storybook/storybook-deployer":"2.8.12","autoprefixer":"^9.7.3","babel-eslint":"^10.0.3","babel-loader":"^8.0.6","babel-plugin-transform-flow-strip-types":"^6.22.0","chai":"^4.2.0","cross-env":"^6.0.3","css-loader":"^3.2.1","draftjs-to-markdown":"^0.6.0","embed-video":"^2.0.4","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"^6.7.2","eslint-config-airbnb":"^18.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha":"^6.2.2","eslint-plugin-react":"^7.17.0","file-loader":"^5.0.2","flow-bin":"^0.113.0","gulp":"^4.0.2","gulp-clean":"^0.4.0","gulp-concat":"^2.6.1","gulp-postcss":"^9.0.0","gulp-sourcemaps":"^3.0.0","install":"^0.13.0","jsdom":"^16.4.0","mini-css-extract-plugin":"^0.8.0","mocha":"^6.2.2","postcss-color-mod-function":"^3.0.3","postcss-loader":"^3.0.0","precss":"^4.0.0","prettier":"^2.5.1","react":"^16.12.0","react-addons-test-utils":"^15.6.2","react-dom":"^16.12.0","react-test-renderer":"^16.12.0","rimraf":"^3.0.0","sinon":"^7.5.0","style-loader":"^1.0.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^3.0.0","webpack":"^4.41.2","webpack-bundle-analyzer":"^4.0.0","webpack-cli":"^3.3.10","webpack-s3-plugin":"^1.2.0-rc.0"},"dependencies":{"classnames":"^2.2.6","draft-js":"^0.11.7","draftjs-to-html":"^0.9.0","draftjs-utils":"^0.10.2","html-to-draftjs":"^1.5.0","immutable":"^4.0.0-rc.12","linkify-it":"^2.2.0","prop-types":"^15.7.2","redraft":"^0.10.2"},"peerDependencies":{"@innovaccer/design-system":"^2.41.3","react":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x","react-dom":"0.13.x || 0.14.x || ^15.0.0-0 || 15.x.x || ^16.0.0-0 || ^16.x.x"},"scripts":{"build:css":"cp ./node_modules/@innovaccer/design-system/css/dist/* dist/","build-css":"gulp --gulpfile config/gulpfile.js build","clean":"rimraf dist && rimraf public","build:webpack":"cross-env NODE_ENV=production webpack --mode production --config config/webpack.config.js","build":"npm run clean && npm run build-css && npm run build:webpack","test":"cross-env BABEL_ENV=test mocha --require config/test-compiler.js config/test-setup.js src/**/*Test.js","lint":"eslint src","lintdocs":"eslint docs/src","flow":"flow; test $? -eq 0 -o $? -eq 2","check":"npm run lint && npm run flow","storybook":"start-storybook -p 6006","build-storybook":"build-storybook","deploy-storybook":"storybook-to-ghpages","version":"./scripts/version.sh","prettier":"prettier --write \\"**/*.{js,jsx,ts,tsx,json,css}\\""},"license":"MIT"}')},function(N,e,o){o.r(e),o.d(e,"Editor",function(){return ni}),o.d(e,"EditorPreview",function(){return wi});function L(e,t,n){return t=new RegExp(t,"g"),e.replace(t,n)}var i=o(0),g=o.n(i),e=o(1),a=o.n(e),d=o(2),l=o(4),e=o(39),j=o.n(e),e=o(93),B=o.n(e),z=o(24),e=o(5),y=o.n(e);function V(e){return(V="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)}function H(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,(e=>(e=((e,t)=>{if("object"!=V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=V(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==V(e)?e:e+""))(r.key),r)}}function K(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U=K(function e(){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){e=document.getElementById(e);e&&e.addEventListener("click",function(){n.editorFlag=!0}),document&&(document.addEventListener("click",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}});function W(e){return(W="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)}function G(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,(e=>(e=((e,t)=>{if("object"!=W(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=W(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==W(e)?e:e+""))(r.key),r)}}function q(e,t,n){return t&&G(e.prototype,t),n&&G(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Y,$=q(function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),J=[],Z={onKeyDown:function(t){J.forEach(function(e){e(t)})},registerCallBack:function(e){J.push(e)},deregisterCallBack:function(t){J=J.filter(function(e){return e!==t})}},X=function(){Y=!0},Q=function(){Y=!1},ee=function(){return Y};function te(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function ne(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function s(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function u(e){e.stopPropagation()}function re(e,t,n){return e&&e.filter(function(e){return!t||0===t.length||(n?0<=e.value.indexOf(t):0<=e.value.toLowerCase().indexOf(t&&t.toLowerCase()))})}function oe(e){return e[e.options[0]].icon}var ie=function(e,n){var r;return e&&void 0===n?e:(r={},ne(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=ie(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)};function c(e){return(c="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)}function ae(e,t,n){return(t=le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(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,le(r.key),r)}}function le(e){e=((e,t)=>{if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=c(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==c(e)?e:e+""}function ce(e,t,n){t=pe(t);var r=e,t=ue()?Reflect.construct(t,n||[],pe(e).constructor):t.apply(e,n);if(!t||"object"!=c(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fe(e,t){return(fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var p=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=ce(this,a,[].concat(r))).onClick=function(){var e=i.props;e.disabled||(0,e.onClick)(e.value)},i.handleKeyDown=function(e){var t=new Set(["Enter","Space","Spacebar"," "]),n=i.props,r=n.disabled,o=n.onClick,n=n.value;r||t.has(e.key)&&(e.preventDefault(),o(n,e))},i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&fe(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.activeClassName,o=e.active,i=e.disabled,e=e["aria-label"],r=y()(ae(ae(ae(ae({},"Editor-option",!0),"Editor-option--active",o&&!r),"".concat(r),o&&r),"Editor-option--disabled",i),n);return g.a.createElement("div",{"aria-label":e,onKeyDown:this.handleKeyDown,tabIndex:0,className:r,onClick:this.onClick,"aria-selected":o},t)}}])&&se(n.prototype,e),t&&se(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),m=(p.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string,tabIndex:a.a.number},p.defaultProps={activeClassName:""},o(3));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})(e)}function he(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(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,me(r.key),r)}}function me(e){e=((e,t)=>{if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=f(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==f(e)?e:e+""}function ge(e,t,n){t=ve(t);var r=e,t=ye()?Reflect.construct(t,n||[],ve(e).constructor):t.apply(e,n);if(!t||"object"!=f(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ye=function(){return!!e})()}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function be(e,t){return(be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var v=(e=>{function t(e){var i;if(this instanceof t)return(i=ge(this,t,[e])).buttonRef=null,i.listRef=null,i.handleOutsideClick=function(e){i.listRef.current&&!i.listRef.current.contains(e.target)&&i.toggleExpansion()},i.onChange=function(e){var t=i.props.onChange;t&&t(e),i.toggleExpansion()},i.setHighlighted=function(e){i.setState({highlighted:e})},i.focusTrigger=function(){var e;null!=(e=i.buttonRef.current)&&e.focus()},i.focusTriggerOnClose=function(e){"Escape"!==e.key&&"Enter"!==e.key||(i.toggleExpansion(),i.focusTrigger())},i.toggleExpansion=function(){var e=i.props,t=e.doExpand,n=e.doCollapse;(e.expanded?n:t)()},i.handleExpand=function(e){i.props.onExpandEvent(e)},i.handleListKeyDown=function(e){e.preventDefault();var t,n=i.state.highlighted,r=i.props.children[1],o=e.key;"ArrowDown"===o||"ArrowUp"===o?(t=r.length-1,i.setState(function(e){return{highlighted:"ArrowDown"===o?Math.min(e.highlighted+1,t):Math.max(e.highlighted-1,0)}})):"Enter"===o&&(e=r[n].props.value,r=i.props.onChange)&&r(e)},i.buttonRef=g.a.createRef(),i.listRef=g.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&be(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&(this.setState({highlighted:-1}),document.removeEventListener("keydown",this.focusTriggerOnClose),document.removeEventListener("click",this.handleOutsideClick)),!e.expanded&&t&&(document.addEventListener("keydown",this.focusTriggerOnClose),document.addEventListener("click",this.handleOutsideClick),this.setState({highlighted:0}),this.listRef.current.focus())}},{key:"render",value:function(){var n=this,e=this.props,t=e.expanded,r=e.children,o=e.className,i=e.optionWrapperClassName,a=e.triggerClassName,s=e.ariaLabel,e=e.menu,l=this.state.highlighted,c=r.slice(1,r.length),o=y()(he(he({},"Editor-dropdown",!0),"Editor-dropdown--expanded",t),o);return g.a.createElement("div",{className:o},g.a.createElement(m.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&g.a.createElement(m.f,{name:"keyboard_arrow_down"})),t&&g.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:y()("Editor-dropdown-optionWrapper",i),onClick:u},g.a.Children.map(c,function(e,t){return e&&g.a.cloneElement(e,{onSelect:n.onChange,highlighted:l===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&de(r.prototype,e),n&&de(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function h(e){return(h="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)}function _e(e,t,n){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(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,Ee(r.key),r)}}function Ee(e){e=((e,t)=>{if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=h(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==h(e)?e:e+""}function we(e,t,n){t=Ce(t);var r=e,t=xe()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n);if(!t||"object"!=h(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xe=function(){return!!e})()}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ke(e,t){return(ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}v.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,menu:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,triggerClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string};var b=(e=>{function a(){var i,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(i=we(this,a,[].concat(r))).onClick=function(e){var t=i.props,n=t.onSelect,r=t.onClick,o=t.value;t.disabled||(n&&n(o),r&&(e.stopPropagation(),r(o)))},i.setHighlighted=function(){i.props.setHighlighted(i.props.index)},i.resetHighlighted=function(){(0,i.props.setHighlighted)(-1)},i}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ke(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.active,r=e.disabled,o=e.highlighted,i=e.className,a=e.isCheckbox,s=e.activeClassName,l=e.disabledClassName,e=e.highlightedClassName,s=y()(_e(_e(_e(_e({},"Editor-dropdown-option",!0),"Editor-dropdown-option--active ".concat(s),n&&!a),"".concat(e),o),"".concat(l),r),i);return g.a.createElement("li",{tabIndex:1,className:s,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},t)}}])&&Se(n.prototype,e),t&&Se(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);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)}function De(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,Oe(r.key),r)}}function Oe(e){e=((e,t)=>{if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=_(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==_(e)?e:e+""}function Pe(e,t,n){t=Me(t);var r=e,t=Te()?Reflect.construct(t,n||[],Me(e).constructor):t.apply(e,n);if(!t||"object"!=_(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Te=function(){return!!e})()}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}b.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string,isCheckbox:a.a.bool},b.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var Ie=(e=>{function n(){var e=this,t=n;if(e instanceof t)return Pe(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ae(r,e),r=n,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,a=e.currentState,s=i.options.length-i.max;return g.a.createElement(m.n,{tooltip:"More formatting"},g.a.createElement(v,{onChange:e.onChange,expanded:e.expanded,doExpand:e.doExpand,doCollapse:e.doCollapse,onExpandEvent:e.onExpandEvent,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},g.a.createElement(m.f,{name:"more_horizon",size:20}),i.options.slice(i.max,i.options.length).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.icon,r=r.label;return g.a.createElement(b,{key:t,value:e,active:n,isCheckbox:1<s},1<s?g.a.createElement(m.b,{checked:n,label:r}):g.a.createElement(g.a.Fragment,null,g.a.createElement(m.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),g.a.createElement(m.m,{appearance:n?"white":"default"},r)))})))}},{key:"render",value:function(){var e,t,n=this.props,i=n.config,a=n.currentState,s=n.onChange,n=n.className,r=i.options.length-i.max,o=i.max,l=y()((e={},t=!0,(l=Oe(l="Editor-textDecoration"))in e?Object.defineProperty(e,l,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[l]=t,e),n);return g.a.createElement("div",{className:l},i.options.slice(0,o).map(function(e,t){var n=!0===a[e]||"MONOSPACE"===e&&a.CODE,r=i[e],o=r.title,r=r.icon;return g.a.createElement(m.n,{tooltip:o},g.a.createElement(p,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},g.a.createElement(m.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&De(r.prototype,e),t&&De(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function S(e){return(S="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)}function Re(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,(e=>(e=((e,t)=>{if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=S(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==S(e)?e:e+""))(r.key),r)}}function Fe(e,t,n){t=Le(t);var r=e,t=Ne()?Reflect.construct(t,n||[],Le(e).constructor):t.apply(e,n);if(!t||"object"!=S(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ne=function(){return!!e})()}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t){return(je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ie.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string};e=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(o=Fe(this,t,[e])).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.toggleInlineStyle=function(e){var t=o.props,n=t.editorState,t=t.onChange,e=e.toUpperCase(),r=Object(l.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=d.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},ne(e,function(e,t){n["CODE"===e?"monospace":e.toLowerCase()]=t}),n},o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})};e=o.props,e=e.editorState;return o.state={currentStyles:e?o.changeKeys(Object(l.getSelectionInlineStyle)(e)):{}},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&je(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(l.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||Ie;return g.a.createElement(o,{config:t,currentState:n.currentStyles,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e.className})}}])&&Re(r.prototype,e),n&&Re(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function E(e){return(E="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)}function Be(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,(e=>(e=((e,t)=>{if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=E(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==E(e)?e:e+""))(r.key),r)}}function ze(e,t,n){t=He(t);var r=e,t=Ve()?Reflect.construct(t,n||[],He(e).constructor):t.apply(e,n);if(!t||"object"!=E(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ve=function(){return!!e})()}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}e.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string};var t=(e=>{function t(e){if(this instanceof t)return(e=ze(this,t,[e])).getBlockTypes=function(){return[{label:"H1",size:"xxl",displayName:"Heading 1"},{label:"H2",size:"xl",displayName:"Heading 2"},{label:"H3",size:"l",displayName:"Heading 3"},{label:"H4",size:"m",displayName:"Heading 4"}]},e.state={blockTypes:e.getBlockTypes()},e;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ke(r,e),r=t,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType;return g.a.createElement("div",{className:t.className,"aria-label":"Editor-block-control"},g.a.createElement(m.n,{tooltip:"Text style"},g.a.createElement(v,{onChange:t.onChange,expanded:t.expanded,doExpand:t.doExpand,doCollapse:t.doCollapse,onExpandEvent:t.onExpandEvent,triggerClassName:"Editor-heading-trigger"},g.a.createElement(m.f,{name:n,size:20}),e.map(function(e,t){return g.a.createElement(b,{index:t,active:r===e.label,value:e.label,key:t},g.a.createElement(m.e,{size:e.size,className:"Editor-heading-option",appearance:r===e.label?"white":"default"},e.displayName))}))))}},{key:"render",value:function(){var t=this.props.config,e=this.state.blockTypes.filter(function(e){e=e.label;return-1<t.options.indexOf(e)});return this.renderInDropdown(e)}}])&&Be(r.prototype,e),n&&Be(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Ue=(t.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.string},t);function w(e){return(w="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)}function We(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,(e=>(e=((e,t)=>{if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=w(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==w(e)?e:e+""))(r.key),r)}}function Ge(e,t,n){t=Ye(t);var r=e,t=qe()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n);if(!t||"object"!=w(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qe=function(){return!!e})()}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $e(e,t){return($e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}t=(e=>{function t(e){var o;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(o=Ge(this,t,[e])).expandCollapse=function(){o.setState(function(e){return{expanded:!e.expanded}})},o.blocksTypes=[{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"}],o.doExpand=function(){o.setState({expanded:!0})},o.doCollapse=function(){o.setState({expanded:!1})},o.toggleBlockType=function(t){var e=o.blocksTypes.find(function(e){return e.label===t}).style,n=o.props,r=n.editorState,n=n.onChange,r=d.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(l.getSelectedBlocksType)(e):"unstyled"},o}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&$e(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(l.getSelectedBlocksType)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,o=n.currentBlockType,n=this.blocksTypes.find(function(e){return e.style===o});return g.a.createElement(Ue,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&We(r.prototype,e),n&&We(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),t.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,config:a.a.object,className:a.a.string};o(202);function x(e){return(x="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)}function Je(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,(e=>(e=((e,t)=>{if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=x(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==x(e)?e:e+""))(r.key),r)}}function Ze(e,t,n){t=Qe(t);var r=e,t=Xe()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n);if(!t||"object"!=x(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xe=function(){return!!e})()}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t){return(et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tt=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=Ze(this,i,[].concat(r))).state={defaultFontSize:void 0},e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&et(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=(e=window.getComputedStyle(e[0]).getPropertyValue("font-size")).substring(0,e.length-2),this.setState({defaultFontSize:e}))}},{key:"renderCustomTrigger",value:function(){return g.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),t=t.options,e=e.onChange,r=this.props.currentState.fontSize,o=this.state.defaultFontSize,o=Number(o);r||t&&t.indexOf(o);return g.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},g.a.createElement(m.d,{className:y()("rdw-fontsize-dropdown",n),onChange:e,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:t.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&Je(n.prototype,e),t&&Je(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function C(e){return(C="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)}function nt(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,(e=>(e=((e,t)=>{if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=C(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==C(e)?e:e+""))(r.key),r)}}function rt(e,t,n){t=it(t);var r=e,t=ot()?Reflect.construct(t,n||[],it(e).constructor):t.apply(e,n);if(!t||"object"!=C(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ot=function(){return!!e})()}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function at(e,t){return(at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}tt.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var st=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=rt(this,n,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontSize=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(l.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&at(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontSize,o=t.component||tt,n=n&&Number(n.substring(9));return g.a.createElement(o,{config:t,fontSize:!0,translations:e,currentState:{fontSize:n},onChange:this.toggleFontSize,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&nt(r.prototype,e),t&&nt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);st.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},o(203);function k(e){return(k="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)}function lt(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,(e=>(e=((e,t)=>{if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=k(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==k(e)?e:e+""))(r.key),r)}}function ct(e,t,n){t=pt(t);var r=e,t=ut()?Reflect.construct(t,n||[],pt(e).constructor):t.apply(e,n);if(!t||"object"!=k(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ut=function(){return!!e})()}function pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ft(e,t){return(ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var n=(e=>{function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=ct(this,i,[].concat(r))).state={defaultFontFamily:void 0},e}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ft(n,e),n=i,(e=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");e&&0<e.length&&(e=window.getComputedStyle(e[0]).getPropertyValue("font-family"),this.setState({defaultFontFamily:e}))}},{key:"render",value:function(){var t=this.state.defaultFontFamily,e=this.props,n=e.config,r=n.className,o=n.dropdownClassName,i=n.options,n=n.title,a=e.translations,s=e.onChange,l=e.expanded,c=e.doCollapse,u=e.onExpandEvent,e=e.doExpand,p=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return g.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},g.a.createElement(v,{className:y()("rdw-fontfamily-dropdown",r),optionWrapperClassName:y()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:l,doExpand:e,doCollapse:c,onExpandEvent:u,title:n||a["components.controls.fontfamily.fontfamily"]},g.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return g.a.createElement(b,{active:p===e,value:e,key:t},e)})))}}])&<(n.prototype,e),t&<(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),ht=(n.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object},n);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})(e)}function dt(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,(e=>(e=((e,t)=>{if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=D(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==D(e)?e:e+""))(r.key),r)}}function mt(e,t,n){t=yt(t);var r=e,t=gt()?Reflect.construct(t,n||[],yt(e).constructor):t.apply(e,n);if(!t||"object"!=D(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gt=function(){return!!e})()}function yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vt(e,t){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=mt(this,n,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleFontFamily=function(e){var t=r.props,n=t.editorState,t=t.onChange,n=Object(l.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&vt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.translations,n=this.state,r=n.expanded,n=n.currentFontFamily,o=t.component||ht,n=n&&n.substring(11);return g.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&dt(r.prototype,e),t&&dt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function O(e){return(O="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)}function bt(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,_t(r.key),r)}}function _t(e){e=((e,t)=>{if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=O(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==O(e)?e:e+""}function St(e,t,n){t=wt(t);var r=e,t=Et()?Reflect.construct(t,n||[],wt(e).constructor):t.apply(e,n);if(!t||"object"!=O(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Et=function(){return!!e})()}function wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Ct=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=St(this,a,[].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&xt(n,e),n=a,(e=[{key:"render",value:function(){var e,t,n=this.props,r=n.config,o=n.currentState.listType,n=n.className,i=(r.options,r.unordered),r=r.ordered,a=y()((e={},t=!0,(a=_t(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return g.a.createElement("div",{className:a},g.a.createElement(m.n,{tooltip:i.title},g.a.createElement(p,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},g.a.createElement(m.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),g.a.createElement(m.n,{tooltip:r.title},g.a.createElement(p,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},g.a.createElement(m.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&bt(n.prototype,e),t&&bt(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function P(e){return(P="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)}function kt(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,(e=>(e=((e,t)=>{if("object"!=P(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=P(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==P(e)?e:e+""))(r.key),r)}}function Dt(e,t,n){t=Pt(t);var r=e,t=Ot()?Reflect.construct(t,n||[],Pt(e).constructor):t.apply(e,n);if(!t||"object"!=P(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ot=function(){return!!e})()}function Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ct.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,className:a.a.string};var Mt=(e=>{function n(e){var r;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(r=Dt(this,n,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){"unordered"===e?r.toggleBlockType("unordered-list-item"):"ordered"===e?r.toggleBlockType("ordered-list-item"):"indent"===e?r.adjustDepth(1):r.adjustDepth(-1)},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.toggleBlockType=function(e){var t=r.props,n=t.onChange,t=d.RichUtils.toggleBlockType(t.editorState,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(l.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(l.getBlockBeforeSelectedBlock)(e);return!e||!Object(l.isListBlock)(t)||e.get("type")!==t.get("type")||e.get("depth")<t.get("depth")},r.isOutdentDisabled=function(){var e=r.state.currentBlock;return!e||!Object(l.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(l.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Tt(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(l.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,t=t.className,o=this.state,i=o.expanded,o=o.currentBlock;return"unordered-list-item"===o.get("type")?e="unordered":"ordered-list-item"===o.get("type")&&(e="ordered"),g.a.createElement(Ct,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&kt(r.prototype,e),t&&kt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);Mt.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object,className:a.a.string},o(204);function T(e){return(T="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)}function At(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,(e=>(e=((e,t)=>{if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=T(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==T(e)?e:e+""))(r.key),r)}}function It(e,t,n){t=Ft(t);var r=e,t=Rt()?Reflect.construct(t,n||[],Ft(e).constructor):t.apply(e,n);if(!t||"object"!=T(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rt=function(){return!!e})()}function Ft(e){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Lt=(e=>{function n(){var e=this,t=n;if(e instanceof t)return It(this,n,arguments);throw new TypeError("Cannot call a class as a function")}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Nt(r,e),r=n,(e=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,i=t.right,a=t.justify,t=t.className,s=e.onChange,l=e.currentState.textAlignment,e=e.translations;return g.a.createElement("div",{className:y()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&g.a.createElement(p,{value:"left",className:y()(r.className),active:"left"===l,onClick:s,title:r.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&g.a.createElement(p,{value:"center",className:y()(o.className),active:"center"===l,onClick:s,title:o.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&g.a.createElement(p,{value:"right",className:y()(i.className),active:"right"===l,onClick:s,title:i.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&g.a.createElement(p,{value:"justify",className:y()(a.className),active:"justify"===l,onClick:s,title:a.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:a.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState.textAlignment,s=e.onChange,e=e.translations,l=t.options,c=t.left,u=t.center,p=t.right,f=t.justify,h=t.className,d=t.dropdownClassName,m=t.title;return g.a.createElement(v,{className:y()("rdw-text-align-dropdown",h),optionWrapperClassName:y()(d),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:m||e["components.controls.textalign.textalign"]},g.a.createElement("img",{src:a&&t[a]&&t[a].icon||oe(t),alt:""}),0<=l.indexOf("left")&&g.a.createElement(b,{value:"left",active:"left"===a,className:y()("rdw-text-align-dropdownOption",c.className),title:c.title||e["components.controls.textalign.left"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("center")&&g.a.createElement(b,{value:"center",active:"center"===a,className:y()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.center"]},g.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("right")&&g.a.createElement(b,{value:"right",active:"right"===a,className:y()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.right"]},g.a.createElement("img",{src:p.icon,alt:""})),0<=l.indexOf("justify")&&g.a.createElement(b,{value:"justify",active:"justify"===a,className:y()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.justify"]},g.a.createElement("img",{src:f.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&At(r.prototype,e),t&&At(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function jt(e){return(jt="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)}function Bt(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,(e=>(e=((e,t)=>{if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=jt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==jt(e)?e:e+""))(r.key),r)}}function zt(e,t,n){t=Ht(t);var r=e,t=Vt()?Reflect.construct(t,n||[],Ht(e).constructor):t.apply(e,n);if(!t||"object"!=jt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kt(e,t){return(Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Lt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var Ut=(e=>{function t(e){var r;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(r=zt(this,t,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addBlockAlignmentData=function(e){var t=r.props,n=t.editorState,t=t.onChange;t(r.state.currentTextAlignment!==e?Object(l.setBlockData)(n,{"text-align":e}):Object(l.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Kt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(l.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.expanded,o=t.component||Lt;return g.a.createElement(o,{config:t,translations:e.translations,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n.currentTextAlignment},onChange:this.addBlockAlignmentData})}}])&&Bt(r.prototype,e),n&&Bt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);function Wt(e){return(Wt="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)}function Gt(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,(e=>(e=((e,t)=>{if("object"!=Wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Wt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Wt(e)?e:e+""))(r.key),r)}}function qt(e,t,n){t=$t(t);var r=e,t=Yt()?Reflect.construct(t,n||[],$t(e).constructor):t.apply(e,n);if(!t||"object"!=Wt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yt=function(){return!!e})()}function $t(e){return($t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e,t){return(Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Ut.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Zt=(e=>{function t(e){var o;if(this instanceof t)return(o=qt(this,t,[e])).onChange=function(e){var t=o.props,n=t.onChange;t.expanded&&n(o.state.currentStyle,e)},o.handleClick=function(e){var t=e.target.getAttribute("data-color");t&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.handleKeyDown=function(e){var t=e.target.getAttribute("data-color");t&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),o.onChange(t))},o.renderModal=function(){var e=o.props,t=e.config.colors,e=e.currentState,n=e.color,r="color"===o.state.currentStyle?n:e.bgColor;return g.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return g.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},g.a.createElement("div",{ref:0===t?o.ref:null,"data-color":e,tabIndex:0,key:t,style:{backgroundColor:e},className:"Editor-colorPicker-circle","aria-selected":r===e}),r===e&&g.a.createElement(m.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=g.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Jt(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&(this.ref.current,this.setState({currentStyle:"color"}))}},{key:"render",value:function(){var e=this.props,t=e.expanded,n=g.a.createElement(m.n,{tooltip:"Text color"},g.a.createElement(p,{tabIndex:0,"aria-label":"Font colors",onClick:e.onToggle,active:t,activeClassName:"bg-secondary"},g.a.createElement(m.f,{name:"text_format",size:20})));return g.a.createElement("div",{className:e.className,"aria-haspopup":"true","aria-expanded":t},g.a.createElement(m.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&Gt(r.prototype,e),n&&Gt(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Xt=(Zt.propTypes={expanded:a.a.bool,onToggle:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,className:a.a.className},Zt);function Qt(e){return(Qt="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)}function en(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,(e=>(e=((e,t)=>{if("object"!=Qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Qt(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Qt(e)?e:e+""))(r.key),r)}}function tn(e,t,n){t=rn(t);var r=e,t=nn()?Reflect.construct(t,n||[],rn(e).constructor):t.apply(e,n);if(!t||"object"!=Qt(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nn=function(){return!!e})()}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function on(e,t){return(on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Zt=(e=>{function r(e){var i;if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");(i=tn(this,r,[e])).state={expanded:!1,currentColor:"var(--text)",currentBgColor:void 0},i.expandCollapse=function(){i.setState({expanded:!1})},i.toggleColorPicker=function(){i.setState(function(e){return{expanded:!e.expanded}})},i.toggleColor=function(t,n){var e=i.props,r=e.editorState,o=e.onChange,e=Object(l.getSelectionEntity)(r);if(e){e=r.getCurrentContent().getEntity(e).getType();if("MENTION"===e||"LINK"===e)return}i.setState(function(){return{currentColor:n?"color-".concat(n):"color-var(--text)",currentBgColor:Object(l.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(l.toggleCustomInlineStyle)(r,t,n);e&&o(e)})};var t=e.editorState,e=e.modalHandler,n={expanded:!1,currentColor:void 0,currentBgColor:void 0};return t&&(n.currentColor=Object(l.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(l.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}var t,n=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&on(n,e),n=r,(e=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.currentColor,o=n.currentBgColor,n=n.expanded,i=t.component||Xt,r=r&&r.substring(6),o=o&&o.substring(8);return g.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&en(n.prototype,e),t&&en(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),r=(Zt.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,className:a.a.string},o(94)),r=o.n(r);function an(e){return(an="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)}function sn(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,ln(r.key),r)}}function ln(e){e=((e,t)=>{if("object"!=an(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=an(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==an(e)?e:e+""}function cn(e,t,n){t=pn(t);var r=e,t=un()?Reflect.construct(t,n||[],pn(e).constructor):t.apply(e,n);if(!t||"object"!=an(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(un=function(){return!!e})()}function pn(e){return(pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fn(e,t){return(fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var M=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=cn(this,a,[].concat(o))).state={showModal:!1,editing:!1,linkTarget:"",linkTitle:"",linkTargetOption:r.props.config.defaultTargetOption},r.addLink=function(){var e=r.props.onChange,t=r.state;e("link",t.linkTitle,t.linkTarget,t.linkTargetOption)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,(n=ln(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r.updateTargetOption=function(e){r.setState({linkTargetOption:e.target.checked?"_blank":"_self"})},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&fn(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.currentState,n=t.link,t=t.selectionText;e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption}),!e.expanded&&this.props.expanded&&this.setState({showModal:!1,linkTarget:n&&n.target,linkTitle:n&&n.title||t,linkTargetOption:this.props.config.defaultTargetOption,editing:void 0!==n})}},{key:"renderAddLinkModal",value:function(){var e=this.props.onExpandEvent,t=this.state,n=t.linkTitle,r=t.linkTarget;return g.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:u},g.a.createElement(m.m,{weight:"strong",size:"large"},t.editing?"Edit":"Insert a"," link"),g.a.createElement(m.g,{icon:"insert_link",className:"mt-4",placeholder:"Paste a link to insert",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:r,autoComplete:"off",autoFocus:!0,onClick:u}),g.a.createElement(m.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:u}),g.a.createElement("div",{className:"d-flex justify-content-end"},g.a.createElement(m.a,{onClick:e,className:"mr-4"},"Cancel"),g.a.createElement(m.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"Save")))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?g.a.createElement(b,null,g.a.createElement(m.f,{size:20,name:n,className:"mr-4"}),g.a.createElement(m.m,null,t.title)):g.a.createElement(m.n,{tooltip:"Link"},g.a.createElement(p,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},g.a.createElement(m.f,{name:n,size:20})));return g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},g.a.createElement(m.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&sn(n.prototype,e),t&&sn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),hn=(M.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,inDropdown:a.a.boolean},M);function dn(e){return(dn="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)}function mn(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,En(r.key),r)}}function gn(e,t,n){t=vn(t);var r=e,t=yn()?Reflect.construct(t,n||[],vn(e).constructor):t.apply(e,n);if(!t||"object"!=dn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yn=function(){return!!e})()}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e,t){return(bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Sn(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?_n(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=En(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):_n(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function En(e){e=((e,t)=>{if("object"!=dn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=dn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==dn(e)?e:e+""}function wn(e){var t=xn.match(e.target);return Sn(Sn({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var xn=r()(),M=(e=>{function n(e){var s;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(s=gn(this,n,[e])).onExpandEvent=function(){var e=!s.state.expanded;s.setState({expanded:e}),e||s.props.onCloseLinkPopover()},s.onChange=function(e,t,n,r){var o=s.props.config.linkCallback;"link"===e?(e=(o||wn)({title:t,target:n,targetOption:r}),s.addLink(e.title,e.target,e.targetOption)):s.removeLink()},s.getCurrentValues=function(){var e,t=s.props.editorState,n=s.state,n=n.currentEntity,r=t.getCurrentContent(),o={};return n&&"LINK"===r.getEntity(n).get("type")&&(o.link={},e=n&&Object(l.getEntityRange)(t,n),o.link.target=n&&r.getEntity(n).get("data").url,o.link.targetOption=n&&r.getEntity(n).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(l.getSelectionText)(t),o},s.doExpand=function(){s.setState({expanded:!0})},s.expandCollapse=function(){s.setState({expanded:s.signalExpanded}),s.signalExpanded=!1},s.doCollapse=function(){s.setState({expanded:!1})},s.removeLink=function(){var e=s.props,t=e.editorState,e=e.onChange,n=s.state.currentEntity,r=t.getSelection();n&&(n=Object(l.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(d.RichUtils.toggleLink(t,r,null)))},s.addLink=function(e,t,n){var r=s.props,o=r.editorState,r=r.onChange,i=s.state.currentEntity,a=o.getSelection(),i=(i&&(i=Object(l.getEntityRange)(o,i),a=a.getIsBackward()?a.merge({anchorOffset:i.end,focusOffset:i.start}):a.merge({anchorOffset:i.start,focusOffset:i.end})),o.getCurrentContent().createEntity("LINK","MUTABLE",{url:t,targetOption:n,targetText:e}).getLastCreatedEntityKey()),t=d.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=d.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=d.EditorState.acceptSelection(n,a),t=d.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(d.EditorState.push(n,t,"insert-characters")),s.props.onCloseLinkPopover(),s.doCollapse()};var e=s.props,t=e.editorState;return s.state={expanded:e.linkPopoverOpen,selectionText:void 0,link:void 0,currentEntity:t?Object(l.getSelectionEntity)(t):void 0},s}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&bn(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(n)}),e.linkPopoverOpen!==t&&t&&this.setState({expanded:t})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown,n=this.state.expanded,r=this.getCurrentValues(),o=r.link;return g.a.createElement(hn,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r.selectionText},onChange:this.onChange})}}])&&mn(r.prototype,e),t&&mn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),r=(M.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,inDropdown:a.a.boolean,linkPopoverOpen:a.a.bool},M);function Cn(e){return(Cn="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)}function kn(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,(e=>(e=((e,t)=>{if("object"!=Cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Cn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Cn(e)?e:e+""))(r.key),r)}}function Dn(e,t,n){t=Pn(t);var r=e,t=On()?Reflect.construct(t,n||[],Pn(e).constructor):t.apply(e,n);if(!t||"object"!=Cn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function On(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(On=function(){return!!e})()}function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}M=(e=>{function t(e){var i;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(i=Dn(this,t,[e])).addLink=function(){var e=i.props,t=e.editorState,n=e.onChange,e=e.mention.trigger,e=void 0===e?"@":e,r=i.state.currentEntity,o=t.getSelection(),r=(r&&(r=Object(l.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),d.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=d.EditorState.push(t,r,"insert-characters");n(d.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(l.getSelectionEntity)(e):void 0},i}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Tn(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,e=e.mention.label;return g.a.createElement(m.n,{tooltip:e||t.title},g.a.createElement(p,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},g.a.createElement(m.f,{name:n,size:20})))}}])&&kn(r.prototype,e),n&&kn(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),M.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.boolean};o(210);function Mn(e){return(Mn="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)}function An(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,In(r.key),r)}}function In(e){e=((e,t)=>{if("object"!=Mn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Mn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Mn(e)?e:e+""}function Rn(e,t,n){t=Nn(t);var r=e,t=Fn()?Reflect.construct(t,n||[],Nn(e).constructor):t.apply(e,n);if(!t||"object"!=Mn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fn=function(){return!!e})()}function Nn(e){return(Nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ln(e,t){return(Ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var jn=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=Rn(this,a,[].concat(o))).state={embeddedLink:"",height:r.props.config.defaultSize.height,width:r.props.config.defaultSize.width},r.onChange=function(){var e=r.props.onChange,t=r.state;e(t.embeddedLink,t.height,t.width)},r.updateValue=function(e){var t,n;r.setState((t={},n="".concat(e.target.name),e=e.target.value,(n=In(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Ln(n,e),n=a,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props;!t.expanded&&e.expanded&&(t=(e=t.config.defaultSize).height,this.setState({embeddedLink:"",height:t,width:e.width}))}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,e=e.width,r=this.props,o=r.config.popupClassName,i=r.doCollapse,r=r.translations;return g.a.createElement("div",{className:y()("rdw-embedded-modal",o),onClick:u},g.a.createElement("div",{className:"rdw-embedded-modal-header"},g.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],g.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),g.a.createElement("div",{className:"rdw-embedded-modal-link-section"},g.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},g.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:r["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("div",{className:"rdw-embedded-modal-size"},g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),g.a.createElement("span",null,g.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),g.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),g.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),g.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:i},r["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return g.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},g.a.createElement(p,{className:y()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},g.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&An(n.prototype,e),t&&An(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Bn=(jn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func},jn);function zn(e){return(zn="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)}function Vn(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,(e=>(e=((e,t)=>{if("object"!=zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=zn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==zn(e)?e:e+""))(r.key),r)}}function Hn(e,t,n){t=Un(t);var r=e,t=Kn()?Reflect.construct(t,n||[],Un(e).constructor):t.apply(e,n);if(!t||"object"!=zn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kn=function(){return!!e})()}function Un(e){return(Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wn(e,t){return(Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}jn=(e=>{function i(){var a,e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Hn(this,i,[].concat(r))).state={expanded:!1},a.onExpandEvent=function(){a.signalExpanded=!a.state.expanded},a.expandCollapse=function(){a.setState({expanded:a.signalExpanded}),a.signalExpanded=!1},a.doExpand=function(){a.setState({expanded:!0})},a.doCollapse=function(){a.setState({expanded:!1})},a.addEmbeddedLink=function(e,t,n){var r=a.props,o=r.editorState,i=r.onChange,r=r.config.embedCallback,r=r?r(e):e,e=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:r,height:t,width:n}).getLastCreatedEntityKey();i(d.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()},a}var t,n=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Wn(n,e),n=i,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Bn;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Vn(n.prototype,e),t&&Vn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};o(211);function Gn(e){return(Gn="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)}function qn(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,(e=>(e=((e,t)=>{if("object"!=Gn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Gn(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Gn(e)?e:e+""))(r.key),r)}}function Yn(e,t,n){t=Jn(t);var r=e,t=$n()?Reflect.construct(t,n||[],Jn(e).constructor):t.apply(e,n);if(!t||"object"!=Gn(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function $n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($n=function(){return!!e})()}function Jn(e){return(Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zn(e,t){return(Zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Xn=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=Yn(this,a,[].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Zn(n,e),n=a,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return g.a.createElement("div",{className:y()("rdw-emoji-modal",t),onClick:u},e.map(function(e,t){return g.a.createElement("span",{key:t,className:"rdw-emoji-icon",alt:"",onClick:n.onChange},e)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=e.expanded,i=e.onExpandEvent;return g.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t.title||e.translations["components.controls.emoji.emoji"]},g.a.createElement(p,{className:y()(r),value:"unordered-list-item",onClick:i},g.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&qn(n.prototype,e),t&&qn(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),Qn=(Xn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object},Xn);function er(e){return(er="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)}function tr(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,(e=>(e=((e,t)=>{if("object"!=er(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=er(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==er(e)?e:e+""))(r.key),r)}}function nr(e,t,n){t=or(t);var r=e,t=rr()?Reflect.construct(t,n||[],or(e).constructor):t.apply(e,n);if(!t||"object"!=er(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rr=function(){return!!e})()}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ir(e,t){return(ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Xn=(e=>{function a(){var r,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=nr(this,a,[].concat(o))).state={expanded:!1},r.onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})},r.addEmoji=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=d.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(d.EditorState.push(n,e,"insert-characters")),r.doCollapse()},r}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ir(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Qn;return g.a.createElement(r,{config:t,translations:e.translations,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&tr(n.prototype,e),t&&tr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function ar(e){return(ar="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)}function sr(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,lr(r.key),r)}}function lr(e){e=((e,t)=>{if("object"!=ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ar(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==ar(e)?e:e+""}function cr(e,t,n){t=pr(t);var r=e,t=ur()?Reflect.construct(t,n||[],pr(e).constructor):t.apply(e,n);if(!t||"object"!=ar(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ur=function(){return!!e})()}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fr(e,t){return(fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var hr=(e=>{function t(e){var i;if(this instanceof t)return(i=cr(this,t,[e])).inputRef=null,i.showImageUploadOption=function(){i.setState({uploadHighlighted:!0})},i.addImageFromState=function(){var e=i.state,t=e.imgSrc,e=e.alt,n=i.state,r=n.height,n=n.width,o=i.props.onChange;isNaN(r)||(r+="px"),isNaN(n)||(n+="px"),o(t,r,n,e)},i.showImageURLOption=function(){i.setState({uploadHighlighted:!1})},i.toggleShowImageLoading=function(){var e=!i.state.showImageLoading;i.setState({showImageLoading:e})},i.updateValue=function(e){var t,n;i.setState((t={},n="".concat(e.target.name),e=e.target.value,(n=lr(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},i.selectImage=function(e){e.target.files&&0<e.target.files.length&&i.uploadImage(e.target.files[0]),e.target.value=null},i.uploadImage=function(e){i.toggleShowImageLoading(),(0,i.props.config.uploadCallback)(e).then(function(e){e=e.data;i.setState({showImageLoading:!1,dragEnter:!1,imgSrc:e.link||e.url},i.addImageFromState),i.fileUpload=!1}).catch(function(){i.setState({showImageLoading:!1,dragEnter:!1})})},i.fileUploadClick=function(e,t){i.inputRef.current&&t&&t.key&&i.inputRef.current.click(),i.fileUpload=!0},i.stopPropagation=function(e){i.fileUpload?i.fileUpload=!1:(e.preventDefault(),e.stopPropagation())},i.handleButtonClick=function(){i.inputRef&&i.inputRef.current&&i.inputRef.current.click()},i.inputRef=g.a.createRef(),i.state={imgSrc:"",dragEnter:!1,uploadHighlighted:i.props.config.uploadEnabled&&!!i.props.config.uploadCallback,showImageLoading:!1,height:i.props.config.defaultSize.height,width:i.props.config.defaultSize.width,alt:""},i;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&fr(r,e),r=t,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.title,t=t.inputAccept;return e.inDropdown?g.a.createElement(b,null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(m.f,{name:n,size:20,className:"mr-4"}),g.a.createElement(m.m,null,r)),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):g.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e.expanded},g.a.createElement(m.n,{tooltip:r},g.a.createElement(p,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},g.a.createElement("span",null,g.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},g.a.createElement(m.f,{name:n,size:20}))),g.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&sr(r.prototype,e),n&&sr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),dr=(hr.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,inDropdown:a.a.bool},hr);function mr(e){return(mr="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)}function gr(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,(e=>(e=((e,t)=>{if("object"!=mr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=mr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==mr(e)?e:e+""))(r.key),r)}}function yr(e,t,n){t=br(t);var r=e,t=vr()?Reflect.construct(t,n||[],br(e).constructor):t.apply(e,n);if(!t||"object"!=mr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vr=function(){return!!e})()}function br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _r(e,t){return(_r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return g.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},g.a.createElement(p,{className:y()(o),onClick:n,title:t||e["components.controls.remove.remove"]},g.a.createElement("img",{src:r,alt:""})))}var hr=(e=>{function t(e){var s;if(this instanceof t)return(s=yr(this,t,[e])).addImage=function(e,t,n,r){var o=s.props,i=o.editorState,a=o.onChange,e={src:e,height:t,width:n},t=(o.config.alt&&(e.alt=r),i.getCurrentContent().createEntity("IMAGE","MUTABLE",e).getLastCreatedEntityKey());a(d.AtomicBlockUtils.insertAtomicBlock(i,t," "))},s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&_r(r,e),r=t,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config;return g.a.createElement(dr,{config:t,inDropdown:e.inDropdown,onChange:this.addImage})}}])&&gr(r.prototype,e),n&&gr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),Er=(hr.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,config:a.a.object,inDropdown:a.a.bool},o(212),Sr.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object},Sr);function wr(e){return(wr="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)}function xr(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,(e=>(e=((e,t)=>{if("object"!=wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=wr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==wr(e)?e:e+""))(r.key),r)}}function Cr(e,t,n){t=Dr(t);var r=e,t=kr()?Reflect.construct(t,n||[],Dr(e).constructor):t.apply(e,n);if(!t||"object"!=wr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function kr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kr=function(){return!!e})()}function Dr(e){return(Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Or(e,t){return(Or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Pr=(e=>{function a(){var n,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(n=Cr(this,a,[].concat(o))).state={expanded:!1},n.onExpandEvent=function(){n.signalExpanded=!n.state.expanded},n.expandCollapse=function(){n.setState({expanded:n.signalExpanded}),n.signalExpanded=!1},n.removeInlineStyles=function(){var e=n.props,t=e.editorState;(0,e.onChange)(n.removeAllInlineStyles(t))},n.removeAllInlineStyles=function(n){var r=n.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){r=d.Modifier.removeInlineStyle(r,n.getSelection(),e)}),ne(Object(l.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=d.Modifier.removeInlineStyle(r,n.getSelection(),t))}),d.EditorState.push(n,r,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Or(n,e),n=a,(e=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state.expanded,r=t.component||Er;return g.a.createElement(r,{config:t,translations:e.translations,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&xr(n.prototype,e),t&&xr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);Pr.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},o(213);function Tr(e){return(Tr="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)}function Mr(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,(e=>(e=((e,t)=>{if("object"!=Tr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Tr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Tr(e)?e:e+""))(r.key),r)}}function Ar(e,t,n){t=Rr(t);var r=e,t=Ir()?Reflect.construct(t,n||[],Rr(e).constructor):t.apply(e,n);if(!t||"object"!=Tr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Ir(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ir=function(){return!!e})()}function Rr(e){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fr(e,t){return(Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Nr=(e=>{function a(){var t,e=this,n=a;if(!(e instanceof n))throw new TypeError("Cannot call a class as a function");for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=Ar(this,a,[].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Fr(n,e),n=a,(e=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,i=e.doCollapse,a=e.currentState,s=a.undoDisabled,a=a.redoDisabled,e=e.translations,l=t.options,c=t.undo,u=t.redo,p=t.className,f=t.dropdownClassName,h=t.title;return g.a.createElement(v,{className:y()("rdw-history-dropdown",p),optionWrapperClassName:y()(f),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:h||e["components.controls.history.history"]},g.a.createElement("img",{src:oe(t),alt:""}),0<=l.indexOf("undo")&&g.a.createElement(b,{value:"undo",onClick:this.onChange,disabled:s,className:y()("rdw-history-dropdownoption",c.className),title:c.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("redo")&&g.a.createElement(b,{value:"redo",onClick:this.onChange,disabled:a,className:y()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:u.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,t=t.className,i=e.currentState,a=i.undoDisabled,i=i.redoDisabled,e=e.translations;return g.a.createElement("div",{className:y()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&g.a.createElement(p,{value:"undo",onClick:this.onChange,className:y()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},g.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&g.a.createElement(p,{value:"redo",onClick:this.onChange,className:y()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},g.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Mr(n.prototype,e),t&&Mr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Lr(e){return(Lr="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)}function jr(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,(e=>(e=((e,t)=>{if("object"!=Lr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Lr(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Lr(e)?e:e+""))(r.key),r)}}function Br(e,t,n){t=Vr(t);var r=e,t=zr()?Reflect.construct(t,n||[],Vr(e).constructor):t.apply(e,n);if(!t||"object"!=Lr(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function zr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zr=function(){return!!e})()}function Vr(e){return(Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hr(e,t){return(Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Nr.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var Kr=(e=>{function o(e){var r;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(r=Br(this,o,[e])).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=d.EditorState[e](n);e&&t(e)},r.doExpand=function(){r.setState({expanded:!0})},r.doCollapse=function(){r.setState({expanded:!1})};var t={expanded:!(r.expandCollapse=function(){r.setState({expanded:r.signalExpanded}),r.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},n=e.editorState,e=e.modalHandler;return n&&(t.undoDisabled=0===n.getUndoStack().size,t.redoDisabled=0===n.getRedoStack().size),r.state=t,e.registerCallBack(r.expandCollapse),r}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Hr(n,e),n=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=this.state,r=n.undoDisabled,o=t.component||Nr;return g.a.createElement(o,{config:t,translations:e.translations,currentState:{undoDisabled:r,redoDisabled:n.redoDisabled},expanded:n.expanded,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&jr(n.prototype,e),t&&jr(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);function Ur(e){return(Ur="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)}Kr.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Wr=["config","currentState","onChange"],Gr=["config"];function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function Yr(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function $r(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,(e=>(e=((e,t)=>{if("object"!=Ur(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ur(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Ur(e)?e:e+""))(r.key),r)}}function Jr(e,t,n){t=Xr(t);var r=e,t=Zr()?Reflect.construct(t,n||[],Xr(e).constructor):t.apply(e,n);if(!t||"object"!=Ur(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Zr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zr=function(){return!!e})()}function Xr(e){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qr(e,t){return(Qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eo=(e=>{function n(e){var t;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");(t=Jr(this,n,[e])).onExpandEvent=function(){t.setState({expanded:!t.state.expanded})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.onChange=function(e){t.doCollapse(),t.props.onChange(e)};e=t.props;e.editorState;return t.state={expanded:!1},t}var t,r=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Qr(r,e),r=n,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler}},{key:"renderInDropdown",value:function(){var r=this,e=this.props,o=e.config,i=Yr(e,Wr);this.state.expanded;return g.a.createElement(v,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},g.a.createElement(m.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=to[e];return g.a.createElement(e,qr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=Yr(e,Gr),e=i.max;return g.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=to[e];return(o.props.mention||"mention"!==e)&&n.isVisible?g.a.createElement(r,qr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&$r(r.prototype,e),t&&$r(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component),to=(eo.propTypes={onChange:a.a.func.isRequired,onCloseLinkPopover:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,mention:a.a.object,linkPopoverOpen:a.a.bool,translations:a.a.object},{textDecoration:e,heading:t,fontSize:st,insert:eo,fontFamily:n,list:Mt,textAlign:Ut,colorPicker:Zt,link:r,mention:M,embedded:jn,emoji:Xn,image:hr,remove:Pr,history:Kr});function no(e){return(no="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)}function ro(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,(e=>(e=((e,t)=>{if("object"!=no(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=no(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==no(e)?e:e+""))(r.key),r)}}function oo(e,t,n){t=ao(t);var r=e,t=io()?Reflect.construct(t,n||[],ao(e).constructor):t.apply(e,n);if(!t||"object"!=no(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function io(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(io=function(){return!!e})()}function ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function so(e,t){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lo(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function co(s){var e=(e=>{function a(){var o,e=this,t=a;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(o=oo(this,a,[].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=s.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(l.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=d.Modifier.setBlockType(r,t,"unstyled"),n=d.Modifier.removeRange(n,t,"backward");s.onChange(d.EditorState.push(s.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),s.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}var t,n=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&so(n,e),n=a,(e=[{key:"render",value:function(){var e=this.props,t=e.children,e=e.contentState.getEntity(e.entityKey).getData().url,n=this.state.open,t=g.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},g.a.createElement(m.m,{appearance:"link"},t));return g.a.createElement(m.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},g.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},g.a.createElement(m.h,{href:e,target:"_new",className:"Editor-link"},e),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(m.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),g.a.createElement("span",{className:"Editor-seperator"}),g.a.createElement(m.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&ro(n.prototype,e),t&&ro(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component);return e.propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},e}function uo(e){return(uo="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)}function po(){return(po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function fo(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ho(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?fo(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=yo(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):fo(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function mo(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,yo(r.key),r)}}function go(e,t,n){return t&&mo(e.prototype,t),n&&mo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yo(e){e=((e,t)=>{if("object"!=uo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=uo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==uo(e)?e:e+""}var e=go(function e(t){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.first=function(e){return null!=e&&e.length?e[0]:void 0},this.getMentionComponent=function(){function e(e){var o=e.entityKey,t=e.children,e=e.contentState.getEntity(o).getData().value;return i.renderer?i.renderer(t,e):(e=ho(ho({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),g.a.createElement(m.c,po({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(l.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=d.Modifier.setBlockType(n,r,"unstyled"),t=d.Modifier.removeRange(t,r,"backward");e.onChange(d.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),vo=(e.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"MENTION"===n.getEntity(e).getType()},t)},e);function bo(e){return(bo="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)}function A(e,t,n){return(t=ko(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _o(e,t,n){t=Eo(t);var r=e,t=So()?Reflect.construct(t,n||[],Eo(e).constructor):t.apply(e,n);if(!t||"object"!=bo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function So(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(So=function(){return!!e})()}function Eo(e){return(Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wo(e,t){return(wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xo(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,ko(r.key),r)}}function Co(e,t,n){return t&&xo(e.prototype,t),n&&xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ko(e){e=((e,t)=>{if("object"!=bo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=bo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==bo(e)?e:e+""}function Do(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oo(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src;return g.a.createElement("iframe",{height:e.height,width:e.width,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var Po=Co(function e(t){var p=this,n=(Do(this,e),this.findSuggestionEntities=function(e,t){var n,r,o,i,a,s,l,c,u;p.config.getEditorState()&&(n=(s=p.config).separator,r=s.trigger,o=s.getSuggestions,i=s.fetchSuggestions,a=s.getLastKeyPressed,(s=(0,s.getEditorState)().getSelection()).get("anchorKey")===e.get("key"))&&s.get("anchorKey")===s.get("focusKey")&&(e=e.getText(),s=s.getFocusOffset(),l=e.substr(0,"Backspace"===a()?s-1:s+1),c=-1,u="",[n,"\n"].forEach(function(e){var t=l.lastIndexOf(e+r);c<t&&(c=t,u=e+r)}),(void 0===c||c<0)&&l[0]===r&&(c=0,u=r),0<=c)&&(e=l.substr(c+u.length,l.length),i?e.trim().split(/\s+/).length<3&&t(0===c&&l[0]===r?0:c+1,l.length):0<re(o(),e,p.config.caseSensitive).length&&t(0===c&&l[0]===r?0:c+1,l.length))},this.getSuggestionComponent=function(){var e,h=this.config;return(e=(e=>{function r(){var f;Do(this,r);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(f=_o(this,r,[].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0,lastFetchedMentionText:""},f.openSuggestionDropdown=function(){X(),f.setState({showSuggestions:!0})},f.closeSuggestionDropdown=function(){Q(),f.setState({showSuggestions:!1})},f.focusOption=function(e,t,n,r){t=document.querySelectorAll(t),0===t.length&&(t=document.querySelectorAll(".".concat(r))),"string"==typeof n&&(n=parseInt(n)),r="down"===e?n+1:n-1,n=r,e="down"===e?t.length:-1,n===e&&(n=0),r=t[n=-1===r&&-1===e?t.length-1:n];r&&r.scrollIntoView({block:"end"})},f.onEditorKeyDown=function(e){var t,n,r=f.state,o=r.showSuggestions,r=r.activeOption;o&&(o={},t=null==h||null==(t=h.dropdownOptions)?void 0:t.dropdownOptionClassName,n=".Editor-dropdown-option",f.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),f.focusOption("down",n,r,t),r===f.filteredSuggestions.length-1?o.activeOption=0:o.activeOption=Number(r)+1):"ArrowUp"===e.key?(e.preventDefault(),f.focusOption("up",n,r,t),o.activeOption=r<=0?f.filteredSuggestions.length-1:Number(r)-1):"Escape"===e.key?(o.showSuggestions=!1,Q()):"Enter"===e.key&&f.addMention(),f.setState(o))},f.onOptionMouseOver=function(e){f.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<f.filteredSuggestions.length&&f.setState({activeOption:e})},f.disableMouseEvents=function(){f.setState({keyDown:!0})},f.enableMouseEvents=function(){f.setState({keyDown:!1})},f.setSuggestionReference=function(e){f.suggestion=e},f.setDropdownReference=function(e){f.dropdown=e},f.filteredSuggestions=[],f.filterSuggestions=function(e){var t=h.getSuggestions?h.getSuggestions():[];f.filteredSuggestions=re(t,e,h.caseSensitive),0===f.filteredSuggestions.length&&f.closeSuggestionDropdown()},f.debouncedFetchSuggestion=function(n,e){var r,o=1<arguments.length&&void 0!==e?e:500;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){return n.apply(t,e)},o)}}(function(t){h.fetchSuggestions(t).then(function(e){f.filteredSuggestions=e,f.setState({lastFetchedMentionText:t,showSuggestions:0<e.length,showLoader:!1}),0===e.length&&f.closeSuggestionDropdown()})}),f.updateSuggestions=function(){var e=f.state,t=e.showSuggestions,e=e.lastFetchedMentionText,n=f.getMentionText();h.fetchSuggestions?!t&&n.startsWith(e)||!t&&n===e||(f.openSuggestionDropdown(),f.setState({showLoader:!0}),f.debouncedFetchSuggestion(n)):(f.openSuggestionDropdown(),f.filterSuggestions(n))},f.getMentionText=function(){return f.props.children[0].props.text.substr(1)},f.addMention=function(e,t,n){var r,o,i,a,s,l=f.state.activeOption,c=h.getEditorState(),u=h.onChange,p=h.trigger,t=void 0!==t&&void 0!==n?{label:t,value:n}:f.filteredSuggestions[l];t&&t.label&&(n=f.suggestion,l=(e=>(e=e.closest("[data-block]"))?e.getAttribute("data-offset-key").split("-")[0]:null)(f.suggestion))&&(o=c.getCurrentContent()).getBlockForKey(l)&&(n=(e=>{for(var t=e.closest("[data-block]").querySelectorAll("span[data-offset-key]"),n=e.querySelector("[data-offset-key]").getAttribute("data-offset-key"),r=0,o=0;o<t.length;o++){var i=t[o];if(i.getAttribute("data-offset-key")===n)break;r+=i.textContent.length}return r})(n),a=f.getMentionText(),a=n+p.length+a.length,s=n,a=a,s=d.SelectionState.createEmpty(l).merge({anchorOffset:s,focusOffset:a}),a=o,p="".concat(p).concat(t.value),r=t.value,i="",a=a.createEntity("MENTION","IMMUTABLE",{text:p,value:r,url:i}).getLastCreatedEntityKey(),o=d.Modifier.replaceText(o,s,t.label,null,a),p=d.EditorState.push(c,o,"insert-characters"),r=n+t.label.length,s=s.merge({anchorOffset:r,focusOffset:r}),i=l,a=r,c=s,p=o=" "!==(o=p).getCurrentContent().getBlockForKey(i).getText()[a]?(i=d.Modifier.insertText(o.getCurrentContent(),c," ",o.getCurrentInlineStyle()),o=d.EditorState.push(o,i,"insert-characters"),i=c.merge({anchorOffset:a+1,focusOffset:a+1}),d.EditorState.forceSelection(o,i)):d.EditorState.forceSelection(o,c),u(p=o))},f.toggleSuggestionDropdownHandler=function(e){e||f.closeSuggestionDropdown()},f.getOptionClass=function(e){var t=f.state.activeOption;return y()(A(A(A({},"Editor-dropdown-option",!0),"Editor-dropdown-option--highlight",e===t),"Editor-dropdown--keydown",f.state.keyDown))},f.renderOption=function(e,t){var n,r=h.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,f.state.activeOption,t),g.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){f.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:f.onOptionMouseOver})):g.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return f.addMention("onMouseSelect")},"data-index":t,onMouseOver:f.onOptionMouseOver,className:f.getOptionClass(t)},o&&g.a.createElement(m.f,{name:o,className:"mr-4"}),g.a.createElement(m.m,null,i))},f.mentionPopover=function(e){var t=f.state,n=t.showLoader;return e?e(f.filteredSuggestions,f.addMention,n,t.showSuggestions,f.state.activeOption):n?g.a.createElement("span",{className:"Editor-dropdown-option"},g.a.createElement(m.j,{withImage:!1},g.a.createElement(m.k,{length:"large"}),g.a.createElement(m.k,{length:"large"}),g.a.createElement(m.k,{length:"large"}))):f.filteredSuggestions.map(function(e,t){return f.renderOption(e,t)})},f}var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wo(t,e),Co(r,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left;this.setState({style:{left:t,top:e.top+25}}),Z.registerCallBack(this.onEditorKeyDown),this.updateSuggestions()}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){Z.deregisterCallBack(this.onEditorKeyDown),this.closeSuggestionDropdown(),h.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this.props.children,t=this.state.showSuggestions,n=h.dropdownOptions,n=void 0===n?{}:n,r=n.dropdownClassName,o=n.popoverRenderer,n=n.appendToBody,n=void 0===n||n,r=y()(A(A(A({},"Popover",!0),"".concat(r),void 0!==r),"Editor-mention-dropdown",!0));return g.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:h.modalHandler.onSuggestionClick,"aria-haspopup":"true"},g.a.createElement("span",null,e),t&&g.a.createElement(m.l,{position:"bottom-start",open:!0,appendToBody:n,boundaryElement:this.setSuggestionReference,className:r,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents,onToggle:this.toggleSuggestionDropdownHandler},this.mentionPopover(o)))}}])})(i.Component)).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:p.findSuggestionEntities,component:p.getSuggestionComponent()}},t.separator),r=t.trigger;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:t.getSuggestions,onChange:t.onChange,getEditorState:t.getEditorState,getWrapperRef:t.getWrapperRef,caseSensitive:t.caseSensitive,dropdownOptions:t.dropdownOptions,optionClassName:t.optionClassName,modalHandler:t.modalHandler,fetchSuggestions:t.fetchSuggestions,getLastKeyPressed:t.getLastKeyPressed}}),To=function(e){return[new vo(e).getMentionDecorator(),new Po(e).getSuggestionDecorator()]},Mo=(Oo.propTypes={block:a.a.object,contentState:a.a.object},Oo);function Ao(e,t,n){return Math.min(Math.max(e,t),n)}var I={east:1,north:8,south:2,west:4};function Io(e){function t(e,t){var n,r,o,i=s.current,a=l.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=u.current).startWidth=n,o.startHeight=r,o.ratio=n/r,o.currentWidth=n,o.currentHeight=r,o.startX=e.clientX,o.startY=e.clientY,o.isResizing=!0,o=(e=o.direction=t)===I.east||e===I.west,t=e===I.north||e===I.south,e=e&I.north&&e&I.west||e&I.south&&e&I.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==p&&p.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),c.current.value=document.body.style.getPropertyValue("-webkit-user-select"),c.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),a.classList.add("image-control-wrapper--resizing"),i.style.height="".concat(r,"px"),i.style.width="".concat(n,"px"),document.addEventListener("pointermove",h),document.addEventListener("pointerup",d))}var o=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,l=Object(i.useRef)(),c=Object(i.useRef)({priority:"",value:"default"}),u=Object(i.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),p=(Object(i.useEffect)(function(){return function(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d)}},[]),e),a=n||(null!==p?p.getBoundingClientRect().width-20:100),f=null!==p?p.getBoundingClientRect().height-20:100,h=function(e){var t,n=s.current,r=u.current,o=r.direction&(I.east|I.west),i=r.direction&(I.south|I.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&I.east?-o:o,t=(o=Ao(r.startWidth+o,100,a))/r.ratio,n.style.width="".concat(o,"px"),n.style.height="".concat(t,"px"),r.currentHeight=t,r.currentWidth=o):i?(t=Math.floor(r.startY-e.clientY),t=r.direction&I.south?-t:t,o=Ao(r.startHeight+t,100,f),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&I.east?-i:i,t=Ao(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},d=function(){var e,t=s.current,n=u.current,r=l.current;null!==t&&null!==r&&n.isResizing&&(t=n.currentWidth,e=n.currentHeight,n.startWidth=0,n.startHeight=0,n.ratio=0,n.startX=0,n.startY=0,n.currentWidth=0,n.currentHeight=0,n.isResizing=!1,r.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",d),null!==p&&p.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",c.current.value,c.current.priority)),o(t,e))};return i.createElement("div",{ref:l},i.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,I.north|I.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,I.south|I.east)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,I.south|I.west)}}),i.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,I.north|I.west)}}))}o(214);function Ro(e){return(Ro="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)}function Fo(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,(e=>(e=((e,t)=>{if("object"!=Ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Ro(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==Ro(e)?e:e+""))(r.key),r)}}function No(e,t,n){t=jo(t);var r=e,t=Lo()?Reflect.construct(t,n||[],jo(e).constructor):t.apply(e,n);if(!t||"object"!=Ro(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lo=function(){return!!e})()}function jo(e){return(jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bo(e,t){return(Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var zo=function(p){var e=(e=>{function t(e){var r;if(this instanceof t)return(r=No(this,t,[e])).imageRef=null,r.state={hovered:!1},r.setEntityAlignmentLeft=function(){r.setEntityAlignment("left")},r.setEntityAlignmentRight=function(){r.setEntityAlignment("right")},r.setEntityAlignmentCenter=function(){r.setEntityAlignment("center")},r.setEntityAlignment=function(e){var t=r.props,n=t.block,t=t.contentState,n=n.getEntityAt(0);t.mergeEntityData(n,{alignment:e,alt:e}),p.onChange(d.EditorState.push(p.getEditorState(),t,"change-block-data"))},r.removeEntity=function(e){e.preventDefault(),e.stopPropagation();var e=r.props,t=e.block,e=e.contentState,t=t.getKey(),n=e.getKeyAfter(t),t=new d.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=d.Modifier.setBlockType(e,t,"unstyled"),n=d.Modifier.removeRange(n,t,"backward");p.onChange(d.EditorState.push(p.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){var e;r.state.hovered&&(e=p.getEditorState().getCurrentContent(),p.onChange(d.EditorState.push(p.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})},r.imageRef=g.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(r),r;throw new TypeError("Cannot call a class as a function")}var n,r=t;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Bo(r,e),r=t,(e=[{key:"renderAlignmentOptions",value:function(e){return g.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},g.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},g.a.createElement(m.f,{name:"format_align_left",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},g.a.createElement(m.f,{name:"format_align_center",size:20})),g.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},g.a.createElement(m.f,{name:"format_align_right",size:20})),g.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},g.a.createElement(m.f,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=p.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(p.onChange(d.EditorState.push(p.getEditorState(),n,"")),p.getEditorState()),t=d.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");p.onChange(d.EditorState.push(e,t,"insert-characters"))}},{key:"onResizeEnd",value:function(e,t){this.setState({hovered:!1}),this.updateImageSize(e,t)}},{key:"render",value:function(){var e=this.props,t=e.block,e=e.contentState,n=this.state.hovered,r=p.isImageAlignmentEnabled,o=p.isImageResizeEnabled,i=p.isReadOnly,a=p.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,l=e.height,c=e.width,e=e.alt,a=("center"!==e||s?a&&"right"===e&&!s?this.setEntityAlignmentRight():a&&"left"===e&&!s&&this.setEntityAlignmentLeft():this.setEntityAlignmentCenter(),document.getElementById("RichTextEditorWrapper")),s=y()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),u=y()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return g.a.createElement("div",{className:s},g.a.createElement("span",{onClick:this.toggleHovered,className:u},g.a.createElement("img",{src:t,alt:e,style:{height:l,width:c},ref:this.imageRef}),!i&&n&&g.a.createElement(g.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&g.a.createElement(Io,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&Fo(r.prototype,e),n&&Fo(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(i.Component);return e.propTypes={block:a.a.object,contentState:a.a.object},e},Vo=function(n,r){return function(e){if("function"==typeof r){var t=r(e,n,n.getEditorState);if(t)return t}if("atomic"===e.getType()){t=n.getEditorState().getCurrentContent().getEntity(e.getEntityAt(0));if(t&&"IMAGE"===t.type)return{component:zo(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Mo,editable:!1}}}},Ho=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],eo=(t="ctrl",t=((null==(st=navigator.userAgentData)?void 0:st.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),Ko={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(eo,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(eo,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(eo,"+U)"),label:"Underline"},strikethrough:{icon:"strikethrough_s",title:"Strikethrough",label:"Strikethrough"}},heading:{icon:"text_fields",options:["H1","H2","H3","H4"]},list:{options:["unordered","ordered"],unordered:{icon:"format_list_bulleted",title:" Bulleted list"},ordered:{icon:"format_list_numbered",title:"Numbered list"}},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",colors:Ho},insert:{max:3,options:["image","mention","link"],image:{icon:"insert_photo",isVisible:!0,title:"Image",alt:"",defaultSize:{height:"100px",width:"300px"},inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",uploadCallback:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){return t({data:{link:r.result}})},r.onerror=function(e){return n(e)},r.readAsDataURL(e)})}},link:{isVisible:!0,icon:"insert_link",linkCallback:void 0,title:"Link"},mention:{isVisible:!0,icon:"alternate_email",title:"Personalization"}},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,resizeEnabled:!1,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0}},n={title:a.a.string,label:a.a.string},Mt={isVisible:a.a.bool,title:a.a.string,alt:a.a.string,uploadCallback:a.a.func,resizeEnabled:a.a.bool,defaultSize:a.a.shape({height:a.a.string,width:a.a.string})},Ut={isVisible:a.a.bool,title:a.a.string},Zt=a.a.shape({textDecoration:a.a.shape({max:a.a.number,bold:a.a.shape(n),italic:a.a.shape(n),underline:a.a.shape(n),strikethrough:a.a.shape(n)}),colorPicker:a.a.shape({colors:a.a.arrayOf(a.a.string)}),insert:a.a.shape({max:a.a.number,image:a.a.shape(Mt),link:a.a.shape(Ut)})});o(215),o(95),o(96),o(97),o(98),o(99);o(100),o(101),o(102);function Uo(e){return(Uo="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)}function Wo(){return(Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function Go(e){return(e=>{if(Array.isArray(e))return qo(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?qo(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qo(e,t):void 0})(e)||(()=>{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 qo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yo(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yo(Object(n),!0).forEach(function(e){$o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $o(e,t,n){return(t=Zo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jo(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,Zo(r.key),r)}}function Zo(e){e=((e,t)=>{if("object"!=Uo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=Uo(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==Uo(e)?e:e+""}function Xo(e,t,n){t=ei(t);var r=e,t=Qo()?Reflect.construct(t,n||[],ei(e).constructor):t.apply(e,n);if(!t||"object"!=Uo(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function Qo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qo=function(){return!!e})()}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ti(e,t){return(ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var r=(e=>{function o(e){var a;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(a=Xo(this,o,[e])).lastKeyPressed="",a.onEditorBlur=function(){a.setState({editorFocused:!1})},a.onEditorFocus=function(e){var t=a.props.onFocus,n=(a.setState({editorFocused:!0}),a.focusHandler.isEditorFocused());t&&n&&t(e)},a.onEditorMouseDown=function(){a.focusHandler.onEditorMouseDown()},a.getLastKeyPressed=function(){return a.lastKeyPressed},a.keyBindingFn=function(e){if(a.lastKeyPressed=e.key,"Tab"===e.key)return t=a.props.onTab,(n=Object(l.changeDepth)(a.state.editorState,e.shiftKey?-1:1,4))&&n!==a.state.editorState&&(a.onChange(n),e.preventDefault()),t&&t(e,n),null;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key||ee()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=d.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(d.EditorState.moveFocusToEnd(t)),!0}if("Delete"===e.key){var n=d.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(d.getDefaultKeyBinding)(e)},a.onToolbarFocus=function(e){var t=a.props.onFocus;t&&a.focusHandler.isToolbarFocused()&&t(e)},a.onWrapperBlur=function(e){var t=a.props.onBlur;t&&a.focusHandler.isEditorBlur(e)&&t(e,a.getEditorState())},a.onChange=function(e,t){var n=a.props,r=n.readOnly,n=n.onEditorStateChange;r||"atomic"===Object(l.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(n&&n(e,a.props.wrapperId),s(a.props,"editorState")?a.afterChange(e):a.setState({editorState:e},a.afterChange(e)))},a.setWrapperReference=function(e){a.wrapper=e},a.setEditorReference=function(e){a.props.editorRef&&a.props.editorRef(e),a.editor=e},a.onCloseLinkPopover=function(){a.setState({linkPopoverOpen:!1})},a.onEditLink=function(){a.setState(R(R({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:lo,component:co({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,Go(To(R(R({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler,getLastKeyPressed:a.getLastKeyPressed})))),new d.CompositeDecorator(t)},a.getWrapperRef=function(){return a.wrapper},a.getEditorState=function(){return a.state?a.state.editorState:null},a.getSuggestions=function(){return a.props.mention&&a.props.mention.suggestions},a.afterChange=function(t){setTimeout(function(){var e=a.props.onContentStateChange;e&&e(Object(d.convertToRaw)(t.getCurrentContent()))})},a.isReadOnly=function(){return a.props.readOnly},a.isImageAlignmentEnabled=function(){return a.state.toolbar.image.alignmentEnabled},a.createEditorState=function(e){var t,n;return s(a.props,"editorState")?a.props.editorState&&(t=d.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=d.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(d.convertFromRaw)(a.props.contentState),t=d.EditorState.createWithContent(n,e),t=d.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(d.convertFromRaw)(n),t=d.EditorState.createWithContent(n,e),t=d.EditorState.moveSelectionToEnd(t)),t=t||d.EditorState.createEmpty(e)},a.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","wrapperClassName","editorStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],e=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),r={},e&&0<e.length&&e.forEach(function(e){r[e]=t[e]}),r;var t,n,r},a.getStyleMap=function(e){return R(R({},Object(l.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(d.convertFromRaw)(e),t=a.state.editorState,t=d.EditorState.push(t,e,"insert-characters");return d.EditorState.moveSelectionToEnd(t)},a.focusEditor=function(){setTimeout(function(){a.editor.focus()})},a.handleKeyCommand=function(e){var t=a.state,n=t.editorState,t=t.toolbar.textDecoration;if(t&&0<=t.options.indexOf(e)){t=d.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){var t;return!!ee()||(t=a.state.editorState,!!(t=Object(l.handleNewLine)(t,e))&&(a.onChange(t),!0))},a.handlePastedTextFn=function(e,t){var n,r,o=a.state.editorState,i=a.props.handlePastedText;return t&&t.includes("<figure")?t:t&&t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(l.getSelectedBlock)(t))&&"code"===r.type?(r=d.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(d.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=j()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=d.Modifier.replaceWithFragment(n,t.getSelection(),new z.List(i.contentBlocks)),o(d.EditorState.push(t,n,"insert-characters")),!0))},a.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?a.focusHandler.onInputMouseDown():e.preventDefault()},a.isEmptyListBlock=function(){var e=a.state.editorState.getCurrentContent();return!e.hasText()&&"unstyled"!==e.getBlockMap().first().getType()},a.blockRenderMap=d.DefaultDraftBlockRenderMap.merge(Object(z.Map)({"header-one":{wrapper:g.a.createElement(m.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:g.a.createElement(m.e,{size:"xl"},a.props.children)},"header-three":{wrapper:g.a.createElement(m.e,{size:"l"},a.props.children)},"header-four":{wrapper:g.a.createElement(m.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:g.a.createElement("div",null,a.props.children)}}));var t=ie(Ko,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new U,a.focusHandler=new $,e.toolbar&&e.toolbar.insert&&(null==(n=e.toolbar.insert.image)?void 0:n.resizeEnabled)),r=e.toolbar&&e.toolbar.insert&&(null==(r=e.toolbar.insert.image)?void 0:r.nonFloatingImage),n=(a.blockRendererFn=Vo({isReadOnly:e.readOnly,isImageAlignmentEnabled:a.isImageAlignmentEnabled,isImageResizeEnabled:n,nonFloatingImage:r,getEditorState:a.getEditorState,onChange:a.onChange}),a.editorProps=a.filterEditorProps(e),a.customStyleMap=a.getStyleMap(e),a.compositeDecorator=a.getCompositeDecorator(t),a.createEditorState(a.compositeDecorator));return Object(l.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}var t,n=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ti(n,e),n=o,(e=[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.editor.focus(),this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o;e!==this.props&&(t={},n=(r=this.props).editorState,r=r.contentState,this.state.toolbar||(o=ie(Ko,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?d.EditorState.set(n,{decorator:this.compositeDecorator}):d.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=d.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(l.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props))}},{key:"render",value:function(){var e=this.state,t=e.editorState,r=e.toolbar,e=this.props,n=e.toolbarClassName,o=e.editorClassName,i=e.wrapperClassName,a=e.editorStyle,s=e.ariaLabel,l=e.mention,c={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:t,onChange:this.onChange},e=y()($o({},"Editor-toolbar",!0),n),n=y()($o({},"Editor-wrapper",!0),i),i=y()($o($o({},"Editor",!0),"hide-placeholder",this.isEmptyListBlock()),o);return g.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&g.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=to[e],e=r[e];return g.a.createElement(n,Wo({key:t},c,{config:e,mention:l,className:"Editor-toolbar-options"}))})),g.a.createElement("div",{ref:this.setWrapperReference,className:i,style:a,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:Z.onKeyDown,onMouseDown:this.onEditorMouseDown,id:"RichTextEditorWrapper"},g.a.createElement(d.Editor,Wo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:te,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&Jo(n.prototype,e),t&&Jo(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n})(i.Component),ni=(r.utils={EditorState:d.EditorState,ContentState:d.ContentState,RichUtils:d.RichUtils,convertFromRaw:d.convertFromRaw,convertToRaw:d.convertToRaw,htmlToState:function(e){var e=L(e,'<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"'),e=L(e,"<br/>",""),e=L(e,"<p> </p>",""),e=j()(e);if(e)return{contentState:e=d.ContentState.createFromBlockArray(e.contentBlocks),editorState:d.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(d.convertToRaw)(e.getCurrentContent());return B()(e,void 0,!1,function(e){var t=e.type,e=e.data;if("IMAGE"===t)return t=e.alignment||"left","center"===e.alt||"center"===t?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):!n||"left"!==e.alt&&"left"!==t?n?'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-left:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="float:').concat(t,"; height: ").concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n '):'\n <p>\n <img src="'.concat(e.src,'" alt="').concat(e.alignment,'" style="display:block; margin-right:auto; height: ').concat(e.height,";width: ").concat(e.width,'"/>\n </p>\n ')})}},r.propTypes={mention:a.a.shape({separator:a.a.string,trigger:a.a.string,chipOptions:a.a.object,dropdownOptions:a.a.shape({dropdownClassName:a.a.string,customOptionRenderer:a.a.func,popoverRenderer:a.a.func,appendToBody:a.a.bool,dropdownOptionClassName:a.a.string}),renderer:a.a.func,suggestions:a.a.shape({label:a.a.string,value:a.a.string,icon:a.a.string}),fetchSuggestions:a.a.func}),editorState:a.a.object,onEditorStateChange:a.a.func,defaultEditorState:a.a.object,onContentStateChange:a.a.func,defaultContentState:a.a.object,contentState:a.a.object,spellCheck:a.a.bool,toolbar:Zt,showToolbar:a.a.bool,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarClassName:a.a.string,editorStyle:a.a.object,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,textAlignment:a.a.oneOf(["left","right","center"]),readOnly:a.a.bool,autoFocus:a.a.bool,placeholder:a.a.string,ariaLabel:a.a.string,wrapperId:a.a.number,editorRef:a.a.func,handlePastedText:a.a.func},r.defaultProps={autoFocus:!0,showToolbar:!0},r),ri=o(50),oi=o.n(ri),ii=o(51);function ai(e){return(ai="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)}function si(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?si(Object(n),!0).forEach(function(e){li(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function li(e,t,n){return(t=(e=>(e=((e,t)=>{if("object"!=ai(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=ai(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==ai(e)?e:e+""))(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ci(e){return(e=>{if(Array.isArray(e))return ui(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?ui(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ui(e,t):void 0})(e)||(()=>{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 ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pi(e,n){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){return g.a.createElement("li",{key:n[t]},e)}))}function fi(e,r){return g.a.createElement(g.a.Fragment,null,e.map(function(e,t){var n=1<e.length&&e[1][0];return n&&n.includes("\n")?(n=n.split("\n"),g.a.createElement(m.i,{key:r[t]},n.map(function(e){return[e,g.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?g.a.createElement("p",null,g.a.createElement("br",null)):g.a.createElement(m.i,{key:r[t]},e.map(function(e){return[e]}))}))}function hi(e,t){var n=void 0===(n=t.entities)?{}:n,r=void 0===(r=t.headings)?{}:r,o=void 0===(o=t.list)?{}:o,t=void 0===(t=t.colors)?[]:t,n=F(F({},_i),n),r=F(F({},vi),r),o=F(F({},bi),o),r=F(F(F({},Si),r),o),o=F(F({},gi),Ei(t)),t={blocks:r,entities:n,styles:Object(ri.createStylesRenderer)(yi,o)};return oi()(e,t,!1)}function di(e){var t=e.raw;return(t=t&&hi(t,{entities:e.entities,headings:e.headings,list:e.list,colors:e.colors}))?g.a.createElement("div",{className:"Preview-wrapper"},t):null}var mi={paddingLeft:"1.5em",margin:"0px"},gi={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},yi=function(e){var t=e.children;return g.a.createElement("span",{key:e.key,style:e.style},t)},vi={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return g.a.createElement(m.e,{size:"m",key:n[t]},e)})}},bi={"unordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ul",{style:mi},pi(e,t))},"ordered-list-item":function(e,t){t=t.keys;return g.a.createElement("ol",{style:mi},pi(e,t))}},_i={LINK:function(e,t,n){n=n.key;return g.a.createElement(m.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alignment;return g.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:r||"left",display:"flex"}},g.a.createElement("img",{src:n,alt:t.alt,height:t.height,width:t.width}))},MENTION:function(e,t,n){n=n.key;return g.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Si={unstyled:function(e,t,n){t=t.keys;return fi(e,t)},atomic:function(e,t){return e[0]}},Ei=function(e){return[].concat(ci(Ho),ci(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return F(F({},e),{},li({},n,t))},{})},wi=(di.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&hi(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(ii.renderToStaticMarkup)(e)?(t=(n=o(232)).name,n=n.version,t="https://s3.us-east-1.amazonaws.com/webui-assets/".concat(t,"/v").concat(n,"/design-system.css"),n=r?'<link rel="stylesheet" href="'.concat(t,'">'):"","".concat(n," ").concat(Object(ii.renderToStaticMarkup)(e))):""}},di.propTypes={raw:a.a.object.isRequired,colors:a.a.arrayOf(a.a.string),list:a.a.object,headings:a.a.object,entities:a.a.object},di.defaultProps={entities:{},headings:{},list:{},colors:[]},di)}]);
|