@innovaccer/rich-text-editor 2.1.5 → 2.1.6

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.
@@ -1,9 +1,9 @@
1
- module.exports=function(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=102)}([function(e,t){e.exports=React},function(e,t,n){e.exports=n(199)()},function(e,t,n){"use strict";var r=n(103),o=n(25),i=n(12),a=n(119),s=n(18),c=n(40),u=n(42),l=n(59),f=n(120),p=n(75),d=n(30),h=n(9),y=n(57),m=n(8),g=n(48),v=n(187),b=n(86),w=n(31),S=n(188),_=n(191),E=n(14),C=n(87),O=n(197),n=n(84);e.exports={Editor:f,EditorBlock:p,EditorState:m,CompositeDecorator:a,Entity:d,EntityInstance:y,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:c,RawDraftContentState:v,SelectionState:w,AtomicBlockUtils:r,KeyBindingUtil:g,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n,convertFromRaw:_,convertToRaw:S,genKey:E,getDefaultKeyBinding:C,getVisibleSelectionRect:O}},function(e,Ts,js){"use strict";!function(p){js.d(Ts,"a",function(){return Te}),js.d(Ts,"b",function(){return vt}),js.d(Ts,"c",function(){return mt}),js.d(Ts,"d",function(){return rn}),js.d(Ts,"e",function(){return sn}),js.d(Ts,"f",function(){return P}),js.d(Ts,"g",function(){return fn}),js.d(Ts,"h",function(){return bn}),js.d(Ts,"i",function(){return xn}),js.d(Ts,"j",function(){return M}),js.d(Ts,"k",function(){return I}),js.d(Ts,"l",function(){return ba}),js.d(Ts,"m",function(){return je}),js.d(Ts,"n",function(){return _a});var Se=js(0),m=js.n(Se),v=js(22);function b(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 _e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){Ee(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(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 w(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function S(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){w(r,t,n,o,i,"next",e)}function i(e){w(r,t,n,o,i,"throw",e)}o(void 0)})}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(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&&_(e.prototype,t),n&&_(e,n)}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(){return(Ce=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&&C(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e,t){if(null==e)return{};var n,r=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,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 G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(n){var r=function(){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 G(t)}}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,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)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(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 T(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=k(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 j(e,t){var n;return t?"number"==typeof t?(n=K(e,t),U(e,n)):t:""}function N(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=H(t,e)).hours,e=e.minutes;return(F(t)?n<=12:n<24)&&e<=60}function R(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))}Ee(n={},"hh:mm","--:--"),Ee(n,"hh:mm AM","--:-- AM");var L=n,F=function(e){return"hh:mm AM"===e},z=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},B=function(e,t){var n=e;return t?("PM"===t&&e<12?n=e+12:"AM"===t&&12===e&&(n=e-12),n):e},K=function(e,t){var t=new Date(t),n=t.getHours(),r=F(e)?z(n).hrs:n,e=F(e)?z(n).AMPM:"";return{hours:r,minutes:t.getMinutes(),seconds:t.getSeconds(),am_pm:e}},H=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,c=i.split(":");return t.split(":").forEach(function(e,t){switch(e){case"hh":n=+c[t]||0;break;case"mm":r=+c[t]||0}}),{hours:n,minutes:r,am_pm:s}},U=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+=F(e)&&t?" ".concat(t):""},q=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)})},V={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},J={"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=(Ee(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),Ee(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"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=De(e),o=(l=Oe(ie(null),2))[0],i=l[1],a=(l=Oe(Se.useState(e.open),2))[0],s=l[1],c=(l=Oe(Se.useState(e.open),2))[0],u=l[1],l=ke({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return oe(function(){return e.open&&(i(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),s(!0),u(!0)),e.open||(window.setTimeout(function(){s(!1)},120),u(!1),t()),function(){t()}},[e.open]),v.createPortal(Se.createElement("div",Ce({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var ke=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=function(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=102)}([function(e,t){e.exports=React},function(e,t,n){e.exports=n(199)()},function(e,t,n){"use strict";var r=n(103),o=n(25),i=n(12),a=n(119),s=n(18),c=n(40),u=n(42),l=n(59),f=n(120),p=n(75),d=n(30),h=n(9),y=n(57),m=n(8),g=n(48),v=n(187),b=n(86),w=n(31),S=n(188),_=n(191),E=n(14),C=n(87),O=n(197),n=n(84);e.exports={Editor:f,EditorBlock:p,EditorState:m,CompositeDecorator:a,Entity:d,EntityInstance:y,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:s,ContentState:c,RawDraftContentState:v,SelectionState:w,AtomicBlockUtils:r,KeyBindingUtil:g,Modifier:h,RichUtils:b,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:n,convertFromRaw:_,convertToRaw:S,genKey:E,getDefaultKeyBinding:C,getVisibleSelectionRect:O}},function(e,js,Is){"use strict";!function(p){Is.d(js,"a",function(){return Te}),Is.d(js,"b",function(){return bt}),Is.d(js,"c",function(){return gt}),Is.d(js,"d",function(){return on}),Is.d(js,"e",function(){return cn}),Is.d(js,"f",function(){return P}),Is.d(js,"g",function(){return pn}),Is.d(js,"h",function(){return wn}),Is.d(js,"i",function(){return kn}),Is.d(js,"j",function(){return M}),Is.d(js,"k",function(){return I}),Is.d(js,"l",function(){return wa}),Is.d(js,"m",function(){return je}),Is.d(js,"n",function(){return Ea});var Se=Is(0),m=Is.n(Se),v=Is(22);function b(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 _e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){Ee(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(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 w(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function S(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){w(r,t,n,o,i,"next",e)}function i(e){w(r,t,n,o,i,"throw",e)}o(void 0)})}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(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&&_(e.prototype,t),n&&_(e,n)}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(){return(Ce=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&&C(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e,t){if(null==e)return{};var n,r=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,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 G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(n){var r=function(){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 G(t)}}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,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)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(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 T(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=k(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 j(e,t){var n;return t?"number"==typeof t?(n=K(e,t),U(e,n)):t:""}function N(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=H(t,e)).hours,e=e.minutes;return(F(t)?n<=12:n<24)&&e<=60}function R(e){return!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!=0))}Ee(n={},"hh:mm","--:--"),Ee(n,"hh:mm AM","--:-- AM");var L=n,F=function(e){return"hh:mm AM"===e},z=function(e){return{hrs:e%12||12,AMPM:e<12?"AM":"PM"}},B=function(e,t){var n=e;return t?("PM"===t&&e<12?n=e+12:"AM"===t&&12===e&&(n=e-12),n):e},K=function(e,t){var t=new Date(t),n=t.getHours(),r=F(e)?z(n).hrs:n,e=F(e)?z(n).AMPM:"";return{hours:r,minutes:t.getMinutes(),seconds:t.getSeconds(),am_pm:e}},H=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,c=i.split(":");return t.split(":").forEach(function(e,t){switch(e){case"hh":n=+c[t]||0;break;case"mm":r=+c[t]||0}}),{hours:n,minutes:r,am_pm:s}},U=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+=F(e)&&t?" ".concat(t):""},q=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)})},V={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},J={"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=(Ee(n={},"hh:mm",[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/]),Ee(n,"hh:mm AM",[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]),n),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"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=De(e),o=(l=Oe(ie(null),2))[0],i=l[1],a=(l=Oe(Se.useState(e.open),2))[0],s=l[1],c=(l=Oe(Se.useState(e.open),2))[0],u=l[1],l=ke({Backdrop:!0,"Backdrop--open":a,"Backdrop-animation--open":c,"Backdrop-animation--close":!c},n);return oe(function(){return e.open&&(i(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),s(!0),u(!0)),e.open||(window.setTimeout(function(){s(!1)},120),u(!1),t()),function(){t()}},[e.open]),v.createPortal(Se.createElement("div",Ce({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":a},r,{className:l,style:{zIndex:e.zIndex}})),document.body)}var ke=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}),De=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?_e(_e({},e),{},Ee({},t,n[t])):_e({},e)},{})},re=function(e){function t(){return Se.createElement("span",Ce({"data-test":"DesignSystem-Avatar"},l,{className:p}),f&&Se.createElement(je,{weight:"medium",appearance:"white",className:d},f),!f&&Se.createElement(P,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?16:12,appearance:"white",className:h}))}var n=e.withTooltip,r=e.tooltipPosition,o=e.size,i=e.children,a=e.firstName,s=e.lastName,c=e.className,u=e.appearance,l=De(e),f=i?i.trim().slice(0,2):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),e=i||"".concat(a||""," ").concat(s||"")||"",i=u||["accent4","primary","accent3","alert","accent2","warning","accent1","success"][(f.charCodeAt(0)+(f.charCodeAt(1)||0))%8]||"secondary",p=ke((Ee(a={Avatar:!0},"Avatar--".concat(o),o),Ee(a,"Avatar--".concat(i),i),Ee(a,"Avatar--disabled",!f||!n),a),c),d=ke((Ee(s={},"Avatar-content--".concat(o),o),Ee(s,"Avatar-content--".concat(i),i),s)),h=ke(Ee({},"Avatar-content--".concat(i),i));return n&&f?Se.createElement(_a,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},oe=(re.displayName="Avatar",re.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},Se.useEffect),ie=Se.useState,ae=(ne.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconType"]),se={tiny:12,regular:16,large:20},ce=Se.forwardRef(function(e,t){var n,r=e.size,r=void 0===r?"regular":r,o=e.appearance,o=void 0===o?"basic":o,i=e.iconAlign,i=void 0===i?"left":i,a=e.tabIndex,a=void 0===a?0:a,s=e.largeIcon,c=e.type,u=e.children,l=e.icon,f=e.expanded,p=e.selected,d=e.loading,h=e.disabled,y=e.className,m=(e.tooltip,e.iconType),e=W(e,ae),f=ke((Ee(n={},"Button",!0),Ee(n,"Button--expanded",f),Ee(n,"Button--".concat(r),r),Ee(n,"Button--".concat(r,"Square"),!u),Ee(n,"Button--".concat(o),o),Ee(n,"Button--selected",p&&("basic"===o||"transparent"===o)),Ee(n,"Button--iconAlign-".concat(i),u&&i),Ee(n,"".concat(y),y),n)),y=ke((Ee(p={},"Button-icon",!0),Ee(p,"Button-icon--".concat(i),u&&i),p));return Se.createElement("button",Ce({"data-test":"DesignSystem-Button",ref:t,type:c,className:f,disabled:h||d,tabIndex:a},e),d?Se.createElement(Se.Fragment,null,Se.createElement(Mn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),Se.createElement(je,{className:"Button-text Button-text--hidden"},u||"")):Se.createElement(Se.Fragment,null,l&&Se.createElement("div",{className:y},Se.createElement(P,{"data-test":"DesignSystem-Button--Icon",name:l,type:m,size:s&&!u?se[r]+4:se[r]})),u&&Se.createElement("span",{className:"Button-text"},u)))}),Te=Se.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?Se.createElement(_a,{tooltip:r},Se.createElement(ce,Ce({},e,{ref:t}))):Se.createElement(ce,Ce({},e,{ref:t}))});Te.displayName="Button";function ue(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function le(e,t){return new Date(e,t+1,0).getDate()}function fe(e,t,n){if(e){var r=$(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 Y(e,t,n,r,o){if(e){var e=$(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 O(e,t){var r,o,i,a,s;return e&&t?(t=$(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 pe(e,t){var n,r,o,i,a;if(q(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]}}),y({year:r,month:o,date:i})}function de(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 he(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=e.tabIndex,e=W(e,ft);return _e({},n?{onClick:n,role:o,tabIndex:t||0,"aria-label":e["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,dt(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,tabIndex:t,"aria-label":e["aria-label"]})}function ye(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=W(e,ht);return Se.createElement(n,_e(_e({},e),{},{className:r}),t)}function me(e){function t(e){var t;return ke((Ee(t={},"Chip-icon",!0),Ee(t,"Chip-icon--".concat(e),e),Ee(t,"Chip-icon-disabled--right","right"===e&&s),Ee(t,"cursor-pointer","right"===e&&!s),Ee(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),l&&l()}function r(e){var t;return ke((Ee(t={},"disabled",s&&!u),Ee(t,"primary_dark",!s&&u),Ee(t,"primary_lighter",s&&u),Ee(t,"subtle",!s&&!u&&"right"===e),Ee(t,"inverse",!s&&!u&&"left"===e),t))}var o=e.label,i=e.icon,a=e.clearButton,s=e.disabled,c=e.className,u=e.selected,l=e.onClose,f=e.onClick,p=e.labelPrefix,d=e.iconType,e=De(e),h=ke((Ee(h={},"primary-lighter",s&&u),Ee(h,"inverse-lightest",s&&!u),Ee(h,"primary-dark",u),Ee(h,"inverse",!s&&!u),h));return Se.createElement("div",Ce({tabIndex:s?-1:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(c),onClick:function(){f&&f()}}),i&&Se.createElement(P,{"data-test":"DesignSystem-GenericChip--Icon",name:i,type:d,appearance:r("left"),className:t("left")}),"string"==typeof o?Se.createElement(Se.Fragment,null,p&&Se.createElement(je,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:h,className:"Chip-text mr-3"},p),Se.createElement(je,{"data-test":"DesignSystem-GenericChip--Text",color:h,className:"Chip-text"},o)):o,a&&Se.createElement("div",{role:"button",onClick:n,tabIndex:s?-1:0,onKeyDown:function(e){"Enter"===e.key&&n(e)},className:t("right"),"data-test":"DesignSystem-GenericChip--clearButton"},Se.createElement(P,{name:"clear",appearance:r("right"),className:"p-2"})))}function ge(){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 ve(e){switch(e.name){case"checked--regular":return m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.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 m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.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 m.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return m.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function be(e){var o=e.inputFormat,i=e.inputOptions,a=e.validators,t=e.state,s=e.setState,e=t.init,n=t.date,t=t.error,c=void 0===(r=i.placeholderChar)?"_":r,r=i.error||i.required&&t&&e,t=void 0===i.caption?"Invalid value":i.caption,u=V[o];return Se.createElement(mn,Ce({icon:"events",placeholder:o},i,{error:r,mask:u,value:n?O(o,n):e?mn.utils.getDefaultValue(u,c):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(c)&&(t=pe(o,t,a),s({date:t})),n&&n(e)},onPaste:function(e,t){var n,r=i.onPaste;s({open:!0}),t&&!t.includes(c)&&(n=pe(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(c)?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:r?t:"",validators:[function(e){return q(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function we(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}function Ie(e){return"12-Hour"===e}function Me(e){var e=e.split(":"),t=12<=(n=parseInt(e[0],10))?"PM":"AM",n=(n%12||12).toString(),n=Et(n),e=e[1];return"".concat(n.toString(),":").concat(e," ").concat(t)}function Ne(e,t,n){for(var r=[],o=we(e),i=we(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r}function Pe(e,t){return e=new Date("07/07/2022 "+e),t=new Date("07/07/2022 "+t).getTime()-e.getTime(),{hour:(e=new Date(t)).getUTCHours(),minute:e.getUTCMinutes()}}function Ae(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)}function Re(e){return(parseInt(e,10)%24).toString()}function Le(e){return/^[0-9]+$/.test(e)}function Fe(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)}function ze(e){var e=e.split(jt),t=Re(e[0]);return{hour:Et(t),min:((""!==e[1]?Ae(e[1]):"00")+"0").slice(0,2)}}function Be(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=Et(e):(i="0"+e[0],a=Ae(e[1]+"0"));break;case 3:i="0"+e[0],a=Ae(e.slice(1));break;case 4:i=t?(parseInt(o,10)%12).toString():Re(o),a=Ae(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}}function Ke(e,t){var n,r={hour:"00",min:"00"};return Le(t)?(n=Be(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?Ue(e,n):n):/^[0-9]+[ AaMmPp]+$/.test(t)?(r=function(e){e=e.split(/[\saAmMpP]/),e=Be(e[0],!0);return{hour:e.hour,min:e.min}}(t)).hour=He(r.hour,t):Fe(t)?(n=ze(t),r=parseInt(n.hour)<=12?Ue(e,n):n):/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(t)&&(e=t.replace(/[\saApPmM]/g,""),Le(e)?r=Be(e,!0):Fe(e)&&(r=ze(e)),r.hour=He(r.hour,t)),r}function He(e,t){return"12"===e&&St(t)?e="00":_t(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e}function Ue(e,t){var n="".concat(t.hour,":").concat(t.min),r=Tt(),o=Ot(r,n),r=It(e,r),e=It(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t}function We(e,t){var e=Pt(xe(e)),n=Pt(xe(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function qe(e){return void 0!==e}function Ve(e){return void 0!==e}function Ge(e,t,n){return e&&n&&""===t}function Ye(e,t,n,r){return r&&n&&0===t&&""===e}function $e(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 Ze(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Je(e){var t,n,r,o,i,a,s=e.open,c=e.endTime,u=e.interval,l=e.onChange,f=e.startTime,p=e.timeFormat,d=e.showDuration,h=e.noResultMessage,y=e.disabledSlotList,m=e.fetchTimeOptions,g=e.error,v=Oe(Se.useState(0),2),b=v[0],w=v[1],S=(v=Oe(Se.useState(!1),2))[0],_=v[1],E=(v=Oe(Se.useState(-1),2))[0],C=v[1],O=(v=Oe(Se.useState(0),2))[0],x=v[1],k=(t=(v=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,v=e.id,e=t?Ct(t):"00:00",n=n?Ct(n):Dt(t),e=xt(e,n,r),kt(e,o,v,i,t,a));return Se.useEffect(function(){void 0!==s&&_(s)},[s]),Se.useEffect(function(){var e;return S&&-1!=E&&(w(E),e=setTimeout(function(){Ze(E,k)},100)),function(){clearTimeout(e)}},[S]),Se.useEffect(function(){x(O+1)},[f,c,u,d,y]),Se.createElement(rn,{key:O,maxHeight:160,loadersCount:0,withSearch:!0,open:S,tabIndex:b,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(Ie(p)&&(e=Me(t)),k.findIndex(function(e){return e.value===t}));C(n),l&&l(e)},fetchOptions:m||function(e){n=e,t=Mt(t=k);var t,n,r=""===n?(r=Tt(),It(t,r)):Nt(t,n);return w(t=""===e&&-1!=E?E:r),Promise.resolve({options:-1===r?[]:k,count:k.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:h,staticLimit:k.length,onPopperToggle:function(){_(!S)},error:g})}function Xe(e){var t=e.validators,s=e.inputOptions,c=e.inputFormat,u=e.outputFormat,l=e.onTimeChange,n=e.time,e=e.error,f=(i=Oe(Se.useState(n),2))[0],r=i[1],o=(i=Oe(Se.useState(!1),2))[0],p=i[1],d=void 0===(i=s.placeholderChar)?"_":i,i=(Se.useEffect(function(){var e=j(c,f),e=void 0===n&&e.includes(d)?f:n;r(e)},[n]),X[c]);return Se.createElement(mn,Ce({placeholder:L[c],placeholderChar:d},s,{mask:i,value:f?j(c,f):o?mn.utils.getDefaultValue(i,d):"",validators:function(e){return q(t,e,c)},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){p(!0),l&&l(""),s.onClear&&s.onClear(e)},onBlur:function(e){var t,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=j(c,f);p(!0),l&&(r=!a||(r=d,(o=a)&&o.includes(r))?void 0:(o=a,(r=c)===(a=u)?o:(o=(r=H(r,o)).hours,t=r.minutes,r=r.am_pm,n=F(a)?z(o).AMPM:"",o=F(a)?z(o).hrs:B(o,r),U(a,{minutes:t,hours:o,am_pm:n}))),l(r)),s.onBlur&&s.onBlur(e,i)},error:e,id:"parent-TimePicker"}))}var Qe=12,et=3,tt=12,nt=3,rt=7,ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],it={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},at=Qe,st=function(e){return e-e%at},$=function(e){var t,n,r;return(e=e&&y(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:st(t),year:t,month:n,day:r,date:e}):{}},y=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?pe(t,e,n):void 0;r=e instanceof Date?e:(t=e.year,n=e.month,e=e.date,new Date(t,n,e,0,0,0))}return r},ct=function(){e(p,Se["Component"]);var f=h(p);function p(e){d(this,p),Ee(G(V=f.call(this,e)),"updateState",function(e,t,n){V.setState({year:e,month:t,date:n})}),Ee(G(V),"getDateValue",function(e,t,n){return new Date(e,t,n)}),Ee(G(V),"getNavDateInfo",function(e){var t=V.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%tt==-1?11:(t+e)%tt,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),Ee(G(V),"getInRangeError",function(){var e=V.props,t=e.rangePicker,e=e.rangeLimit,n=V.state,r=n.startDate,o=n.endDate,n=n.hoverDate;if(t&&e){var i,t=$(r),a=t.year,s=t.month,t=t.date,c=$(o),u=c.year,l=c.month,c=c.date,n=$(n),f=n.year,p=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),Y(i,"less",f,p,n+1)||Y(i,"less",u,l,c+1);if(o)return(i=new Date(o)).setDate(c-e),Y(i,"more",f,p,n-1)||Y(i,"more",a,s,t-1)}return!1}),Ee(G(V),"selectYear",function(e){return function(){V.updateState(e),V.setState({view:"month"})}}),Ee(G(V),"yearMouseOverHandler",function(e,t,n,r){var o=V.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),Ee(G(V),"selectMonth",function(e){return function(){V.updateState(V.state.yearNav,e),V.setState({view:"date"})}}),Ee(G(V),"monthMouseOverHandler",function(e,t,n,r){var o=ot,i=V.props.onMonthHover,o={value:o[e],month:o[e],year:V.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),Ee(G(V),"selectDate",function(e,t,n,r){e=V.calculateDate(e,t,n,r,!1);V.setState({currDate:e})}),Ee(G(V),"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),V.getNavDateInfo(i)),e=n.year,t=n.month;return!1===o&&(V.updateState(e,t,a),V.onNavIconClickHandler(s)()),V.getDateValue(e,t,a)}),Ee(G(V),"onNavIconClickHandler",function(s){return function(){var e=V.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=Qe,a=tt;switch(t){case"year":"prev"===s&&V.setState({yearBlockNav:n-i}),"next"===s&&V.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&V.setState({yearNav:r-1}),"next"===s&&V.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&V.setState({yearNav:r-1}),V.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&V.setState({yearNav:r+1}),V.setState({monthNav:(o+1)%a}))}}}),Ee(G(V),"renderJumpButton",function(e){var t=V.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=V.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=fe(n,"more",a)||fe(n,"equal",a)),"next"===e&&(u=fe(r,"less",a)||fe(r,"equal",a));break;case"month":"prev"===e&&(u=Y(n,"more",s-1)),"next"===e&&(u=Y(r,"less",s+1));break;case"date":"prev"===e&&(u=Y(n,"more",s,c-1)),"next"===e&&(u=Y(r,"less",s,c+1))}o=ke(Ee({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return Se.createElement(Te,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:V.onNavIconClickHandler(e)})}),Ee(G(V),"onNavHeadingClickHandler",function(n){return function(){var e=V.props.monthsInView,t=V.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&V.setState({view:"date"}),"month"===n&&V.setState({view:"year"}),"date"===n)&&V.setState({view:"month"})}}),Ee(G(V),"renderHeaderContent",function(e){function t(e){return"small"===r?Se.createElement(Se.Fragment,null,Se.createElement(je,{weight:"strong"},e),"year"!==a&&!i&&Se.createElement(P,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):Se.createElement(Se.Fragment,null,Se.createElement(sn,{size:"s"},e),"year"!==a&&!i&&Se.createElement(P,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=V.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=V.state,a=n.view,n=n.yearBlockNav,s=Qe,c=ot,u=V.getNavDateInfo(e),l=u.year,u=u.month,o=ke({"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(l));return Se.createElement("div",{className:o},"date"!==a&&Se.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler(a)},t(e)),"date"===a&&Se.createElement(Se.Fragment,null,Se.createElement("div",{onClick:V.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(c[u])),Se.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler("month")},t(l))))}),Ee(G(V),"renderBodyYear",function(){var e=Qe,u=et,t=V.props,l=t.size,f=t.rangePicker,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearBlockNav,y=t.currYear,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){var n,r,o,i,a,s=u*c+t;if(s!==h)return a=!(s=Y(p,"more",n=h+s)||Y(d,"less",n))&&!f&&n===V.state.year,r=function(){return n===y},o=ke((Ee(o={"Calendar-value":!0,"Calendar-value--active":a,"Calendar-value--disabled":s,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(l),l),Ee(o,"Calendar-value--currDateMonthYear",r()),o)),i=ke({"Calendar-value--currDate":r()&&!a,"Calendar-text":!0}),a=ke({inverse:!a&&!r()&&!s,white:a,"primary-lighter":r()&&s,primary:r(),"inverse-lightest":s}),Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:V.selectYear(n),onMouseOver:V.yearMouseOverHandler.bind(G(V),n,r(),s)},Se.createElement(je,{size:"small"===l?"small":"regular",color:a,className:i},n))}))})}),Ee(G(V),"renderBodyMonth",function(){var e=tt,u=nt,l=ot,t=V.props,f=t.size,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearNav,y=t.year,m=t.currYear,g=t.currMonth,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){function n(){return m===h&&g===r}var r=u*c+t,o=Y(p,"more",h,r)||Y(d,"less",h,r),i=!o&&y===h&&r===V.state.month,a=ke((Ee(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(f),f),Ee(a,"Calendar-value--currDateMonthYear",n()),a)),s=ke({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o}),i=ke({"Calendar-value--currDate":n()&&!i,"Calendar-text":!0});return Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:V.selectMonth(r),onMouseOver:V.monthMouseOverHandler.bind(G(V),r,n(),o)},Se.createElement(je,{size:"small"===f?"small":"regular",color:s,className:i},l[r]))}))})}),Ee(G(V),"onDateRowMouseLeaveHandler",function(){V.props.rangePicker&&V.setState({hoverDate:void 0})}),Ee(G(V),"renderBodyDate",function(e){var o=rt,i=it,t=V.props,a=t.size,s=t.firstDayOfWeek,c="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=ke({"Calendar-valueWrapper":!0}),r=(t+o+ue(s))%o;return Se.createElement(je,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),Se.createElement("div",{className:"Calendar-dateValues",onMouseLeave:V.onDateRowMouseLeaveHandler},V.renderDateValues(e)))}),Ee(G(V),"renderDateValues",function(b){function w(e){return function(){(!x||j&&I||!W)&&V.selectDate(b,e,K,H)}}function S(t){return function(){var e;x&&(e=V.getDateValue(z,B,t),j&&I||V.setState({hoverDate:e}))}}function _(e,t,n,r){var e=V.calculateDate(b,e,K,H,!0)||new Date,o=ot,i=it.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:V.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var E=rt,C=tt,e=V.props,O=e.size,x=e.rangePicker,t=e.firstDayOfWeek,k=e.disabledBefore,D=e.disabledAfter,T=e.monthsInView,a=e.onDateHover,e=V.state,j=e.startDate,I=e.endDate,M=e.hoverDate,N=e.year,P=e.month,A=e.date,R=e.currMonth,L=e.currYear,F=e.todayDate,e=V.getNavDateInfo(b),z=e.year,B=e.month,K=le(z,B-1),H=le(z,B),e=new Date(z,B).getDay()-ue(t),U=Math.abs(e),t=Math.ceil((H+U)/E),W=(6===t||1<T||(t+=1),V.getInRangeError()),q=V.props.events;return Array.from({length:t},function(e,v){return Se.createElement("div",{key:v,className:"Calendar-valueRow"},Array.from({length:E},function(e,t){function n(){var e=r<=0?L===z&&R===B-1&&F===K+r:H<r?L===z&&R===B+1&&F===r-H:L===z&&R===B&&F===r;return e}var r=E*v+t-U+1,o=r<=0||H<r,i=Y(k,"more",z,B,r)||Y(D,"less",z,B,r),a=!i&&N===z&&P===B&&A===r,s=!1,c=$(j),c=(c.year,c.month,c.date,$(I)),c=(c.year,c.month,c.date,I&&!1),u=j&&!1,l="".concat(r<=0?K+r:H<r?r-H:r),f="".concat(r<=0?0===B?B+C:(B-1)%C+1:H<r?(B+1)%C+1:B+1),p="".concat(r<=0&&B+1===1?z-1:H<r&&B+1===12?z+1:z),d="".concat(2===f.length?f:"0".concat(f),"/").concat(2===l.length?l:"0".concat(l),"/").concat(p),d=q&&"object"===Z(q)&&q.hasOwnProperty(d),h=(x&&(h=Y(j,"equal",z,B,r),y=Y(I,"equal",z,B,r),m=Y(M,"equal",z,B,r),a=!i&&(h||y),j&&I?s=!i&&(de(j,"less",l,f,p)&&de(I,"more",l,f,p)||h||y):j?s=!i&&(de(M,"more",l,f,p)||m)&&de(j,"less",l,f,p):I&&(s=!i&&(Y(M,"less",z,B,r)||m)&&Y(I,"more",z,B,r))),s&&W),y=j&&de(j,"equal",l,f,p),m=I&&de(I,"equal",l,f,p),g=j&&I&&(y||m),l=de(M,"equal",l,f,p)&&M&&j&&j<=M,f=0===t||6===t,p=s||x&&(a||g),s=ke({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":!f&&p,"Calendar-valueWrapper--inEdgeRange":p&&f,"Calendar-valueWrapper--inRangeError":h,"Calendar-valueWrapper--start":c&&!u&&6!==t||x&&y&&6!==t,"Calendar-valueWrapper--end":u&&!c&&0!==t||x&&m&&0!==t,"Calendar-valueWrapper--startEnd":c&&u,"Calendar-valueWrapper--startError":c&&h||x&&h&&y,"Calendar-valueWrapper--endError":u&&h||x&&h&&m,"Calendar-valueWrapper--dummy":o,"Calendar-valueWrapper--hoverDate":x&&l,"Calendar-valueWrapper--inStartRange":p&&0===t&&!a&&!g,"Calendar-valueWrapper--inEndRange":p&&6===t&&!a&&!g}),y=ke((Ee(f={"Calendar-value":!0,"Calendar-inRangeValue":!(c||u||a||g),"Calendar-value--start":c&&!u,"Calendar-value--end":u&&!c,"Calendar-value--startError":c&&h,"Calendar-value--endError":u&&h,"Calendar-value--active":a||g,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(O),O),Ee(f,"Calendar-value--currDateMonthYear",n()),Ee(f,"Calendar-value--currDate",n()&&!a&&!g),f)),m=ke({inverse:!(a||n()||i||g),white:a||g,"primary-lighter":n()&&i,primary:n(),"inverse-lightest":i});return Se.createElement("div",{key:"".concat(v,"-").concat(t),className:s,"data-test":"designSystem-Calendar-WrapperClass"},!o&&Se.createElement(Se.Fragment,null,Se.createElement(je,{color:m,size:"small"===O?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:y,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r),d&&V.renderEventsIndicator(O,a)),(o&&0<r&&b===T-1||o&&r<=0&&0===b)&&Se.createElement(Se.Fragment,null,Se.createElement(je,{appearance:a||g?"white":i?"disabled":n()?"link":"default",size:"small"===O?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:y,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r<=0?K+r:r-H),d&&V.renderEventsIndicator(O,a)))}))})}),Ee(G(V),"renderCalendar",function(e){var t=V.props,n=t.size,t=t.monthsInView,r=V.state.view,o=ke((Ee(o={},"Calendar",!0),Ee(o,"Calendar-".concat(r,"--").concat(n),r),Ee(o,"Calendar--".concat(n),n),o)),n=ke(Ee({},"Calendar-header--".concat(n),n)),i=ke({"Calendar-body":!0});return Se.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},Se.createElement("div",{className:n},0===e&&V.renderJumpButton("prev"),V.renderHeaderContent(e),e===t-1&&V.renderJumpButton("next")),Se.createElement("div",{className:i},"year"===r&&V.renderBodyYear(),"month"===r&&V.renderBodyMonth(),"date"===r&&V.renderBodyDate(e)))});var V,t=V.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:$(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:$(n||Date.now()).month,s=$(n),c=s.year,u=s.month,s=s.date,l=$(new Date(Date.now()));return V.state={currDate:n,startDate:r,endDate:o,yearNav:a,monthNav:e,year:c,month:u,date:s,todayDate:l.date,currMonth:l.month,currYear:l.year,view:1<i?"date":t,yearBlockNav:st(a)},V}return a(p,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(i=(n=$(this.props.date)).year,o=n.month,n=n.date,this.updateState(i,o,n),i=y(this.props.date),this.setState({currDate:i})),e.startDate!==this.props.startDate&&(o=y(this.props.startDate),this.setState({startDate:o})),e.endDate!==this.props.endDate&&(n=y(this.props.endDate),this.setState({endDate:n})),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:st(i)}),e.monthNav!==this.props.monthNav&&(o=this.props.monthNav)&&this.setState({monthNav:o}),t.currDate!==this.state.currDate&&(i=(n=this.props).rangePicker,e=n.onDateChange,n=(o=this.state).currDate,r=o.startDate,o=o.endDate,n)&&(e&&e(n),i?(this.setState({hoverDate:void 0}),r&&o?this.setState({startDate:n,endDate:void 0}):(i=(e=$(n)).year,a=e.month,e=e.date,r?Y(r,"more",i,a,e)?this.setState({startDate:n}):this.setState({endDate:n}):o&&Y(o,"less",i,a,e)?this.setState({endDate:n}):this.setState({startDate:n}))):this.setState({startDate:n})),(null==(r=t.startDate)?void 0:r.getTime())===(null==(o=this.state.startDate)?void 0:o.getTime())&&(null==(i=t.endDate)?void 0:i.getTime())===(null==(a=this.state.endDate)?void 0:a.getTime())||(e=this.props.onRangeChange,r=(n=this.state).startDate,o=n.endDate,e&&e(r,o)),t.year!==this.state.year&&void 0!==(i=this.state.year)&&1===s&&this.setState({year:i,yearBlockNav:st(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=ke((Ee(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),Ee(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=De(this.props),e=ke({"Calendar-wrapper":!0},e);return Se.createElement("div",Ce({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),ut=(Ee(ct,"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=W(e,ut),r=ke((Ee(n={Card:!0},"Card--".concat(r),r),Ee(n,"".concat(i),i),n));return Se.createElement("div",Ce({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),lt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),ft=(Se.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=W(e,lt),n=ke(Ee({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return Se.createElement("div",Ce({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role","tabIndex"]),pt={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},dt=function(e,t){return!!pt[e]&&pt[e].has(t)},P=function(e){var t,n=e.appearance,r=e.className,o=e.name,i=e.size,a=e.children,s=he(e),c=De(e),e=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type,u=n&&n.includes("_")?(t=(u=n).indexOf("_"),u.slice(0,t)+u.charAt(t+1).toUpperCase()+u.slice(t+2)):n,e=ke((Ee(t={},"material-icons",!0),Ee(t,"material-icons-rounded","rounded"===e),Ee(t,"material-icons-outlined","outlined"===e),Ee(t,"Icon",!0),Ee(t,"Icon--".concat(u),n),Ee(t,"".concat(r),r),t)),n={fontSize:"".concat(i,"px"),width:"".concat(i,"px")};return a&&Se.isValidElement(a)?Se.createElement("span",Ce({},c,{className:r}),a):Se.createElement("i",Ce({"data-test":"DesignSystem-Icon"},c,{className:e,style:n},s),o)},ht=(P.displayName="Icon",P.defaultProps={size:16,type:"rounded"},["children","componentType","className"]),yt=["appearance","size","children","weight","small","className","color"],je=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.weight,a=e.small,s=e.className,c=e.color,e=W(e,yt),n=ke((Ee(t={Text:!0},"Text--".concat(n),!c&&n),Ee(t,"Text--".concat(i),i),Ee(t,"Text--".concat(r),r),Ee(t,"color-".concat(c),c),Ee(t,"Text--small","small"===r||a),t),s);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},mt=(je.displayName="Text",je.defaultProps={appearance:"default",size:"regular"},me.displayName="GenericChip",function(e){var t,n=e.label,r=e.icon,o=e.clearButton,i=e.type,a=e.disabled,s=e.selected,c=e.onClose,u=e.onClick,l=e.name,f=e.className,p=e.labelPrefix,d=e.iconType,e=De(e),o="action"!==i&&o,h=!("selection"!==i||!s),i=ke((Ee(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),Ee(t,"Chip--".concat(i),i&&!a),Ee(t,"Chip-".concat(i,"--selected"),s&&!a),Ee(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),Ee(t,"Chip-icon--clear",o),t),f);return Se.createElement(me,Ce({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:h,icon:r,iconType:d,clearButton:o,disabled:a,className:i,onClose:function(){!a&&c&&c(l)},onClick:function(){!a&&u&&u(l)},name:l,labelPrefix:p}))}),gt=(mt.displayName="Chip",mt.defaultProps={type:"input"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"]),vt=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,c=e.disabled,u=e.onChange,l=e.name,f=e.value,p=e.className,d=e.checked,h=e.helpText,y=e.id,y=void 0===y?"".concat(l,"-").concat(a,"-").concat(ge()):y,m=W(e,gt),g=Se.useRef(null);Se.useImperativeHandle(t,function(){return g.current});var t=Oe(Se.useState(void 0===d?o:d),2),v=t[0],b=t[1],t=(Se.useEffect(function(){S(i)},[i]),Se.useEffect(function(){void 0!==d&&b(d)},[d]),ke((Ee(t={},"Checkbox",!0),Ee(t,"Checkbox--disabled",c),t),p)),p=ke((Ee(p={},"Checkbox-outerWrapper",!0),Ee(p,"Checkbox-outerWrapper--".concat(n),n),p)),e=ke((Ee(w={},"Checkbox-input",!0),Ee(w,"Checkbox-input--checked",v),Ee(w,"Checkbox-input--indeterminate",e.indeterminate),w)),s=ke((Ee(w={},"Checkbox-wrapper",!0),Ee(w,"Checkbox-wrapper--default",!s),Ee(w,"Checkbox-wrapper--error",s),w)),w=ke((Ee(w={},"Checkbox-label",!0),Ee(w,"Checkbox-label--tiny","tiny"===n),w)),S=function(e){g.current.indeterminate=e},_=ke((Ee(_={},"checked--regular",v&&"regular"===n),Ee(_,"checked--tiny",v&&"tiny"===n),Ee(_,"indeterminate--regular",i&&"regular"===n),Ee(_,"indeterminate--tiny",i&&"tiny"===n),_));return Se.createElement(Se.Fragment,null,Se.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},Se.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:p},Se.createElement("input",Ce({},m,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===d&&(b(e.target.checked),S(e.target.indeterminate)),u&&u(e)},checked:v,disabled:c,ref:g,name:l,value:f,className:e,tabIndex:r,id:y,"data-test":"DesignSystem-Checkbox-InputBox"})),Se.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},_&&Se.createElement(ve,{name:_}))),Se.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&Se.createElement("label",{htmlFor:y,className:w,"data-test":"DesignSystem-Checkbox-Label"},Se.createElement(je,{size:"tiny"===n?"small":"regular",appearance:c?"disabled":"default"},a.trim())),h&&Se.createElement(je,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:c?"disabled":"subtle"},h.trim()))))}),bt=(vt.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),x=Se.forwardRef(function(e,t){var n,r=e.size,o=e.sizeXS,i=e.sizeS,a=e.sizeM,s=e.sizeL,c=e.sizeXL,u=e.className,l=e.children,e=W(e,bt),r=ke((Ee(n={},"Col",!0),Ee(n,"Col--".concat(r),r),Ee(n,"Col--xs-".concat(o),o),Ee(n,"Col--s-".concat(i),i),Ee(n,"Col--m-".concat(a),a),Ee(n,"Col--l-".concat(s),s),Ee(n,"Col--xl-".concat(c),c),Ee(n,"".concat(u),u),n));return Se.createElement("div",Ce({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),wt=(x.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children","view"]),n=function(){e(o,Se["Component"]);var r=h(o);function o(e){d(this,o),Ee(G(s=r.call(this,e)),"getError",function(e){var t=s.props,n=t.disabledBefore,t=t.disabledAfter,n=$(n),r=n.year,o=n.month,n=n.date,t=$(t),i=t.year,a=t.month,t=t.date;return!!e&&(Y(e,"less",r,o,n)||Y(e,"more",i,a,t))}),Ee(G(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),Ee(G(s),"onToggleHandler",function(e,t){var n=s.props.inputOptions.disabled;if(!n)switch(t){case"outsideClick":s.setState({open:e});break;case"onClick":s.setState({open:!0})}});var s,t=e.inputFormat,n=e.validators,t=y(e.date,t,n),n=s.getError(t);return s.state={date:t,error:n,init:!1,open:e.open||!1},s}return a(o,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.date!==this.props.date&&(n=(r=this.props).inputFormat,r=r.validators,n=y(this.props.date,n,r),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,O(e,t)))}},{key:"renderCalendar",value:function(){var e=this,t=this.props,n=(t.date,t.open,t.position,t.inputFormat),r=(t.outputFormat,t.inputOptions,t.validators),o=(t.withInput,t.disabledBefore),i=t.disabledAfter,a=(t.onDateChange,t.closeOnSelect,t.size),s=t.showTodayDate,s=void 0===s||s,c=t.children,c=void 0===c?Se.createElement(Se.Fragment,null):c,u=t.view,t=W(t,wt),l=this.state.date,f=ot,p=new Date(Date.now()),f="".concat(f[p.getMonth()]," ").concat(p.getDate()),p=y(l,n,r),l=y(o,n,r),o=y(i,n,r),i=ke({"d-flex justify-content-center":!0,"pb-5":"small"===a,"pb-6":"large"===a,"pt-3":"large"===a&&"year"===u});return Se.createElement("div",null,Se.createElement("div",{className:"d-flex"},c,Se.createElement(ct,Ce({},t,{size:a,date:p,view:u,disabledBefore:l,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&Se.createElement("div",{className:i,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},Se.createElement(mt,{label:"Today, ".concat(f),name:"chip",type:"action",disabled:(n=!0,p&&l&&o?n=l<p&&p<o:p&&l?n=p<l:p&&o&&(n=o<p),!n),onClick:function(){return e.onDateChangeHandler(new Date)}})))}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.withInput,r=e.inputFormat,o=e.inputOptions,e=e.validators,i=this.state.open;return n?Se.createElement(ba,{trigger:Se.createElement(be,{inputFormat:r,inputOptions:o,validators:e,state:this.state,setState:this.setState.bind(this)}),triggerClass:"w-100",position:t,appendToBody:!0,open:i,onToggle:this.onToggleHandler},this.renderCalendar()):this.renderCalendar()}}]),o}(),St=(Ee(n,"defaultProps",_e(_e({},ct.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[N],inputOptions:{},closeOnSelect:!0})),function(e){return e.includes("a")||e.includes("A")}),_t=function(e){return e.includes("p")||e.includes("P")},Et=function(e){return("0"+e).slice(-2)},Ct=function(e){var t,n,r;return St(r=e)||_t(r)?(r=Oe((r=e).split(" "),2),t=r[0],r=r[1],t=t.split(":"),n=t[0],t=t[1],"12"===n&&St(r)&&(n="00"),_t(r)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)):e},Ot=function(e,t){e=we(e);return we(t)<e},xt=function(e,t,n){var r,o,i,a;return""===t||Ot(e,t)?(r=e,o=t,i=Ne("00:00","23:59",i=n),r=i.indexOf(r),a=i.indexOf(o),o=""===o?r:a+1,a=i.slice(r),r=i.slice(0,o),a.concat(r)):Ne(e,t,n)},kt=function(e,s){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"TimePicker-Option-key",u=3<arguments.length?arguments[3]:void 0,l=4<arguments.length?arguments[4]:void 0,f=5<arguments.length?arguments[5]:void 0;return e.map(function(e,t){return{label:(o=u,i=l,a=n=e,Ie(r=s)&&(a=Me(n)),o&&i&&(o=(r=Pe(i,n)).hour,i=r.minute,a+=" (".concat(o," hr ").concat(i," min)")),a),value:e,disabled:f&&(n=f,o=r=e,Ie(s)&&(o=Me(r)),!!n.includes(o)),selected:!1,optionID:c+t};var n,r,o,i,a})},Dt=function(e){return e?"":"23:59"},Tt=function(){var e=new Date;return Et(e.getHours())+":"+Et(e.getMinutes())},jt=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,It=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=Pe(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},Mt=function(e){return e.map(function(e){return e.value})},Nt=function(e,t){var n;return function(e){e=(null==(e=(e=e).match(/\d/g))?void 0:e.length)||0;return 0<e&&e<5}(t)?(t=Ke(e=e,t=t),n=t.hour,"60"===(t=t.min)&&(t="00",n=(parseInt(n,10)+1).toString()),n="".concat(n,":").concat(t),It(e,n)):-1},Pt=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},At=function(e,t){e.scrollTo(0,t)};Je.defaultProps={timeFormat:"12-Hour",interval:15},Je.displayName="TimePickerWithSearch",Xe.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},Xe.displayName="TimePickerWithInput";function Rt(a,s,c,u){var l,f=!1,p=0;function d(){l&&clearTimeout(l)}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()-p;function i(){p=Date.now(),c.apply(r,t)}f||(u&&!l&&i(),d(),void 0===u&&a<o?i():!0!==s&&(l=setTimeout(u?function(){l=void 0}:i,void 0===u?a-o:a)))}return"boolean"!=typeof s&&(u=c,c=s,s=void 0),e.cancel=function(){d(),f=!0},e}function Lt(e,t,n){return void 0===n?Rt(e,t,!1):Rt(e,n,!1!==t)}_e(_e({},Xe.defaultProps),Je.defaultProps);function Ft(e){function t(){d||i&&i(c)}var n=e.optionData,r=e.selected,o=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,c=e.index,u=e.checkboxes,l=e.menu,f=void 0===(f=e.id)?"":f,p=(n.optionType?n:e).optionType,d=n.disabled,h=d?"inverse-lightest":r&&!l?"primary-dark":"inverse",y=d?"disabled":r&&!l?"primary_dark":"default",m=Jt[p=u?"WITH_CHECKBOX":void 0===p?"DEFAULT":p],g=ke((Ee(g={},"Option",!0),Ee(g,"Option--active",s),Ee(g,"Option--selected",r&&!l),Ee(g,"Option--disabled",d),Ee(g,"OptionWrapper",!0),Ee(g,"color-".concat(h),!0),g)),v=ke((Ee(v={},"Option-checkbox",!0),Ee(v,"Option-checkbox--active",s),Ee(v,"OptionWrapper",!0),v)),b=ke((Ee(b={},"Option-text",!0),Ee(b,"Option-text--wrap",!e.truncateOption),b)),w=ke((Ee(w={},"OptionWrapper",!0),Ee(w,"OptionWrapper--disabled",d),w));return e.optionRenderer?Se.createElement("div",Ce({"data-test":"DesignSystem-DropdownOption--Custom",className:w,"data-disabled":d,onMouseEnter:t},!u&&{onClick:o}),e.optionRenderer({optionData:n,selected:r,onChange:a,active:s,index:c})):m({selected:r,index:c,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?Se.createElement(je,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:d?"inverse-lightest":r&&!l?"primary-dark":"inverse-lighter",size:"small",weight:"medium",className:"Option-subInfo"},e):(t=e.list,e=e.seperator,Se.createElement(wn,{list:void 0===t?[]:t,seperator:e,iconAppearance:n,labelAppearance:d?"disabled":r&&!l?"white":"subtle",seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"}))},optionData:n,textClassName:b,appearance:y,color:h,onClickHandler:function(e){e.stopPropagation(),d||o&&o()},onChangeHandler:function(e){e.stopPropagation(),d||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(p),className:u?v:g,id:f})}function zt(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=De(e),r=ke((Ee(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),Ee(t,"PlaceholderImage--".concat(n),n),t),o);return Se.createElement("span",Ce({},e,{className:r}))}function Bt(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return Se.createElement(I,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return Se.createElement(M,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large"}));case"WITH_META":return Se.createElement(M,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return Se.createElement(M,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large"}));case"ICON_WITH_META":return Se.createElement(M,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function Kt(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","data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement(je,{className:"mb-3",weight:"strong"},Xt[n]),Se.createElement(je,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},Qt[n]),"FAILED_TO_FETCH"===n&&Se.createElement(Te,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:function(){return r()}},"Reload")))}function Ht(i){function R(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&fe(e)}function L(){return Se.createElement(Kt,{dropdownStyle:_e(_e({},ge),{},{minHeight:p}),updateOptions:ne,errorType:oe})}function o(e,t){Q(e,t),he||null!=(e=O.current)&&e.focus(),T(g)}function F(){var e;X(),null!=(e=O.current)&&e.focus()}function z(){var e;J(),null!=(e=O.current)&&e.focus()}function B(){T(g),E&&w&&E("")}function K(e){T(g),E&&E(e.target.value)}function a(e,t){var n=i.onClearOptions,r=h.every(function(e){return e.disabled});return Se.createElement("div",{className:ve(t)},Se.createElement(je,{size:"small",appearance:"subtle"},e),t&&Se.createElement(Te,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=Ye(w,m,f,_)?e+1===D:e===D,r=-1!==y.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},Se.createElement(Ft,{optionData:t,truncateOption:V,selected:r,index:e,updateActiveOption:we,optionRenderer:Z,active:n,checkboxes:_,menu:b,onClick:function(){return be(t)},onChange:function(e){return i.onSelect(t,e.target.checked)},optionType:i.optionType,id:o}))}function U(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),c="down"===e?D+1:D-1,u="down"===e?s.length:-1;c!==u;){if("true"!==s[c].getAttribute("data-disabled")){var l=s[c];l&&(n=se.current,r=l,a=i=o=void 0,o=null==n?void 0:n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=r.offsetHeight,i.bottom>o.bottom&&n?At(n,r.offsetTop-o.height+a):i.top<o.top&&n&&At(n,r.offsetTop-a)),void 0!==l&&T(c);break}"down"===e?c++:c--}}var W,e,s,c,u=void 0===(t=i.listOptions)?[]:t,q=i.inputRef,t=void 0===(t=i.align)?"right":t,n=void 0===(n=i.optionType)?"DEFAULT":n,r=void 0===(r=i.applyButtonLabel)?"Apply":r,l=void 0===(l=i.cancelButtonLabel)?"Cancel":l,V=void 0===(d=i.truncateOption)||d,f=void 0===(d=i.withSelectAll)||d,p=void 0===(d=i.maxHeight)?200:d,d=i.customTrigger,h=i.selected,y=i.tempSelected,G=i.previousSelected,m=i.remainingOptions,g=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,w=i.searchTerm,S=i.showApplyButton,_=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,E=i.onSearchChange,Z=i.optionRenderer,J=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,C=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=De(i),se=Se.createRef(),ce=Se.createRef(),O=Se.createRef(),x=Se.createRef(),k=Se.createRef(),ue=(I=Oe(Se.useState(),2))[0],le=I[1],D=(I=Oe(Se.useState(g),2))[0],T=I[1],j=(I=Oe(Se.useState(),2))[0],fe=I[1],I=0===u.length&&!ie&&h.length<=0;Se.useEffect(function(){var e,t,n,r,o;return v&&(o=i.width,t=i.minWidth,n=i.maxWidth,r=null==(r=ce.current)?void 0:r.clientWidth,o={width:o||r,minWidth:t||(S?176:b?128:r),maxWidth:n||"100%"},requestAnimationFrame(R),le(o),te)&&0===y.length&&(e=setTimeout(function(){Ze(te,u)},100)),function(){clearTimeout(e)}},[v]),Se.useEffect(function(){g!==D&&T(g)},[g]);var M=void 0===(M=i.triggerSize)?"regular":M,N=void 0===(N=i.placeholder)?"Select":N,pe=i.icon,de=i.error,he=i.disabled,P=i.inlineLabel,A=i.triggerLabel,ye=i.iconType,me=d?d(A||N):Se.createElement(Se.Fragment,null),d=d?Se.cloneElement(me,{tabIndex:0,ref:O}):Se.createElement(Zt,{placeholder:N,triggerSize:M,open:v,icon:pe,disabled:he,inlineLabel:P,menu:b,error:de,ref:O,iconType:ye},A),ge={maxHeight:p,overflowY:"auto",overflowX:"hidden",minHeight:j},me={maxHeight:j||p,overflowY:"auto",overflowX:"hidden",minHeight:j},ve=function(e){var t;return ke((Ee(t={},"Dropdown-section",!0),Ee(t,"Dropdown-section--withClear",e),t))},N=ke(Ee({},"Dropdown",!0),C),pe=ke((Ee(M={},"Dropdown-wrapper",!0),Ee(M,"Dropdown-wrapper--wrap",!V),M)),de=ke((Ee(P={},"Option-checkbox--active",0===D),Ee(P,"Option-checkboxWrapper",!0),Ee(P,"Option-checkbox",!0),Ee(P,"OptionWrapper",!0),P)),be=function(e){i.onOptionSelect(e),null!=(e=O.current)&&e.focus()},we=function(e,t){t=_&&f&&!i.async&&!t?e+1:e;T(t)},ye=(Y||i.async)&&(!I||"NO_RECORDS_FOUND"===oe);return Se.createElement("div",Ce({},ae,{className:N,ref:ce,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?U("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?U("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(q.current===r||O.current===r)&&(e.preventDefault(),r=_?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[D])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=k.current)?void 0:t.disabled,(r===x.current&&t||r===k.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===x.current?null!=(t=k.current)&&t.focus():null!=(r=x.current)&&r.focus()))}}}),Se.createElement(ba,Ce({onToggle:o,trigger:d,triggerClass:b?"":"w-100",open:v,customStyle:ue,position:en[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),ye&&Se.createElement("div",{className:"Dropdown-inputWrapper"},Se.createElement(fn,{name:"Dropdown-search",icon:"search",value:w,placeholder:ee,autoFocus:!0,onChange:K,onClear:B,ref:q,autoComplete:"off",className:"Dropdown-input"})),(A=i.selectedSectionLabel,s=void 0===A?"Selected Items":A,A=void 0===(A=i.allItemsSectionLabel)?"All Items":A,j=void 0===(j=i.loadersCount)?10:j,C=void 0===(C=i.errorTemplate)?L:C,M=Ye(w,m,f,_),c=function(e){e=e.reduce(function(e,t){var n=t.group||"";return e[n]||(e[n]=[]),e[n].push(t),e},{});return Object.values(e).flatMap(xe)}(u),j&&ie?Se.createElement("div",{className:"Dropdown-loading"},Se.createElement("div",{className:"Dropdown-wrapper",style:me},(e=j,e=Array(j).fill("Loading"),W=_?"WITH_CHECKBOX":n,e.map(function(e,t){return Se.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},Se.createElement(Bt,{loadingType:W,optionIndex:t}))})))):I?re?Se.createElement("div",{className:"Dropdown-wrapper",style:ge,"data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement("div",{className:"Option"},Se.createElement("div",{className:"Option-subinfo"},re))):C&&C({errorType:oe}):Se.createElement("div",{className:pe,style:ge,ref:se},M&&(j=void 0===(j=i.selectAllLabel)?"Select All":j,e=i.selectAll,C=i.onSelectAll,j=j.trim()?j.trim():"Select All",M="Checkbox-option-".concat(j.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),Se.createElement("div",{className:de,onMouseEnter:function(){return we(0,!0)}},Se.createElement("label",{htmlFor:M,className:"Checkbox-label"},Se.createElement(vt,{label:j,onChange:C,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:M})))),0<h.length&&a(s,!0),h.map(H),0<h.length&&0<u.length-h.length&&!(null!=(j=u[0].group)&&j.trim())&&a(A),c.map(function(e,t){var n=0<t?c[t-1].group:h.length?s:void 0,r=e.group,o=t+h.length;return Se.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),H(e,o))}),i.async&&0<m&&(C=i.footerLabel,Se.createElement("div",{className:"Dropdown-footer"},Se.createElement(je,{size:"small",appearance:"subtle"},void 0===C?"Search for more options":C))))),S&&_&&(P=We(G,y)||i.loadingOptions,Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{ref:x,className:"mr-4",appearance:"basic",onClick:F,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},l),Se.createElement(Te,{ref:k,appearance:"primary",disabled:P,size:"tiny",onClick:z,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r)))))}function Ut(e){var t,n=e.className,r=e.iconType,e=W(e,cn),n=ke((Ee(t={},"ActionButton",!0),Ee(t,"".concat(n),n),t));return Se.createElement(P,Ce({className:n,type:r,"data-test":"DesignSystem-Input-ActionButton"},e))}function Wt(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===Z(e[r])?t:e[r];return n}function qt(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=e.info,c=W(e,gn),e=De(e),r=ke((Ee(u={Label:!0},"Label--withInput",r),Ee(u,"Label--optional",n),u),a),u=ke({"Label-text":!0,"Label--disabled":o});return Se.createElement("div",Ce({"data-test":"DesignSystem-Label"},e,{className:r}),Se.createElement(ye,Ce({"data-test":"DesignSystem-Label--Text",className:u,componentType:"label"},c),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(je,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&Se.createElement(_a,{tooltip:s},Se.createElement(P,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"}))))}function Vt(e){var t=e.label,n=e.icon,r=e.size,e=e.iconType;return Se.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",type:e,size:"regular"===r?16:12}),Se.createElement(je,{size:r,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function Gt(e){return"".concat((100*e).toFixed(2),"%")}function Yt(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var $t=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error","iconType"],Zt=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,c=e.disabled,u=e.open,l=e.inlineLabel,f=e.error,p=e.iconType,e=W(e,$t),d=c?"disabled":"default",o=o.trim(),o=a||o,h=i?s||"more_horiz":"keyboard_arrow_down",r=ke((Ee(n={},"Button",!0),Ee(n,"DropdownButton",!0),Ee(n,"DropdownButton--".concat(r),r),Ee(n,"DropdownButton--".concat(r,"Square"),i),Ee(n,"DropdownButton--placeholder",!a&&!i),Ee(n,"DropdownButton--icon",s),Ee(n,"DropdownButton--open",u),Ee(n,"DropdownButton--error",f),n)),f=ke((Ee(u={},"Text",!0),Ee(u,"Text--regular",!0),Ee(u,"DropdownButton-text",!0),u));return Se.createElement("button",Ce({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&Se.createElement("div",{className:"DropdownButton-wrapper"},l&&Se.createElement(je,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&Se.createElement(P,{appearance:d,className:"d-flex align-items-center mr-4",name:s,type:p}),o&&Se.createElement("span",{className:f},o)),Se.createElement(P,{appearance:d,name:h,type:p}))}),Jt=(Zt.displayName="DropdownButton",Ee(n={},"DEFAULT",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.color,a=e.onUpdateActiveOption,e=e.dataTest,s=o.label,c=o.disabled;return Se.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":c},Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:n,color:i,id:o.optionID},s)))}),Ee(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,c=i.label,u=i.icon,l=i.disabled,i=i.iconType,n=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",u),t));return Se.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":l},u&&Se.createElement(P,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u,type:i}),Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:r,color:s},c)))}),Ee(n,"WITH_META",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.onUpdateActiveOption,a=e.renderSubInfo,s=e.color,e=e.dataTest,c=o.subInfo,u=o.label,o=o.disabled;return Se.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:n,color:s},u),c&&a(c)))}),Ee(n,"WITH_CHECKBOX",function(e){var t=e.className,n=e.selected,r=e.optionData,o=e.onChangeHandler,i=e.onUpdateActiveOption,a=e.dataTest,e=e.id,e=void 0===e?"":e,s=r.subInfo,c=r.label,r=r.disabled;return Se.createElement("div",{className:t,onMouseEnter:i,"data-test":a,"data-disabled":r},Se.createElement(vt,{label:c,disabled:r,checked:n,onChange:o,tabIndex:-1,className:"OptionCheckbox ".concat(s?"pb-0":""),"data-test":"".concat(a,"--Checkbox"),id:e}),s&&Se.createElement("div",{className:"pl-8 ml-3"},(t=r?"disabled":"subtle",i=n?"white":"disabled","string"==typeof(c=s)?Se.createElement(je,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},c):(o=c.list,c=c.seperator,Se.createElement(wn,{list:void 0===o?[]:o,seperator:c,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),Ee(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,c=e.appearance,u=e.color,e=e.dataTest,l=a.subInfo,f=a.label,p=a.icon,a=a.disabled,n=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",p),t));return Se.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},p&&Se.createElement(P,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:p,appearance:c}),Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:r,color:u},f),l&&o(l)))}),n),I=function(e){var t,n=e.length,r=e.size,o=e.className,e=De(e),i=ke(Ee({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=ke((Ee(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),Ee(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return Se.createElement("div",Ce({},e,{className:n}),Se.createElement("span",{className:i}))},M=(I.displayName="PlaceholderParagraph",I.defaultProps={length:"medium"},zt.displayName="PlaceholderImage",zt.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=De(e),a=ke(Ee({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=ke(Ee({},"Placeholder",!0),i);return Se.createElement("div",Ce({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&Se.createElement(zt,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&Se.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Xt=(M.displayName="Placeholder",M.defaultProps={withImage:!0,imageSize:"small"},{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"}),Qt={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."},en={right:"bottom-start",left:"bottom-end"},tn=(Ht.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),nn=Se.createRef(),rn=function(){e(l,Se["Component"]);var u=h(l);function l(e){d(this,l),Ee(G(g=u.call(this,e)),"staticLimit",void 0),Ee(G(g),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),Ee(G(g),"fetchOptionsFunction",function(t){var n,e=g.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})})}),Ee(G(g),"getUnSelectedOptions",function(e,t){var n;return e.length?t?(t=g.props.selected,n=void 0===t?[]:t,e.filter(function(t){return qe(g.props.selected)?-1===n.findIndex(function(e){return e.value===t.value}):!t.selected})):e.filter(function(t){return-1===g.state.tempSelected.findIndex(function(e){return e.value===t.value})}):e}),Ee(G(g),"getSelectedOptions",function(e,t){var n=g.props.selected;return e.length?t?qe(g.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):g.state.tempSelected:[]}),Ee(G(g),"updateOptions",function(s,e){var t=g.state,c=t.searchTerm,u=t.selectAll,l=t.tempSelected,f=t.previousSelected,p=t.errorType,d=void 0===e?g.state.async:e,t=g.props,h=t.fetchOptions,y=t.withCheckbox,m=t.withSearch;(h||g.fetchOptionsFunction)(c).then(function(e){var t,n,r,o,i=e.options,a=e.count;e.scrollToIndex&&setTimeout(function(){Ze(e.scrollToIndex,i)},0),(!e.searchTerm||e.searchTerm&&e.searchTerm===g.state.searchTerm)&&(d=""===c?a>g.staticLimit:d,t=Ge(d,c,y)?g.getUnSelectedOptions(i,s):i,n=""===c?g.getSelectedOptions(i,s):[],r=""===c?a:g.state.optionsLength,o=g.getDisabledOptions(t.slice(0,g.staticLimit)),g.setState(_e(_e({},g.state),{},{errorType:h&&"NO_RECORDS_FOUND"!==p?"FAILED_TO_FETCH":p,scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:d,searchedOptionsLength:a,options:t.slice(0,g.staticLimit),tempSelected:s?n:l,previousSelected:s?n:f,selected:Ge(d,c,y)?n:[],triggerLabel:g.updateTriggerLabel(s?n:l),selectAll:!d&&s?$e(n,r,o.length):u})),d||m)&&null!=(a=nn.current)&&a.focus()})}),Ee(G(g),"updateSearchTerm",function(e){g.setState(_e(_e({},g.state),{},{loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"}))}),Ee(G(g),"updateOnPopperToggle",function(){var e,t=g.props,n=t.withCheckbox,r=t.showApplyButton,o=t.onClose,i=t.name,t=t.selected,t=void 0===t?[]:t,a=g.state,s=a.previousSelected,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(Ve(g.props.open)?g.props:g.state).open,a=g.getDisabledOptions(a).length;n&&r&&(e=qe(g.props.selected)?t:s,g.setState({tempSelected:e,selectAll:$e(e,u,a),triggerLabel:g.updateTriggerLabel(e)})),Ve(g.props.open)&&g.setState({open:d}),d&&(u=Ge(l,p,n)&&!We(g.state.selected,c),g.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u)&&g.updateOptions(!1),o&&!d&&(a=(n&&r?qe(g.props.selected)?t:s:g.state.tempSelected).map(function(e){return e.value}),g.debounceOnClose(a,i))}),Ee(G(g),"debounceOnClose",Lt(300,function(e,t){var n=g.props.onClose;n&&n(e,t)})),Ee(G(g),"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=g.props).triggerOptions,e=e.getLabel,t=(n=void 0===n?{}:n).customLabel,n=n.labelLimit,r=g.state?g.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)}),Ee(G(g),"updateSelectedOptions",function(e,t,n){var r=g.state,o=r.optionsLength,i=r.previousSelected,a=r.selected,s=r.loading,r=r.open,c=g.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,y=g.getDisabledOptions(g.state.options),m=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});g.setState(_e(_e({},g.state),{},{tempSelected:e,triggerLabel:g.updateTriggerLabel(e),selectAll:$e(e,o,y.length),open:Ve(g.props.open)||l?r:!p,previousSelected:h?e:i,selected:m?e:a,loading:!!m||s})),m&&g.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&Ve(g.props.open)&&c(!1,"optionClick")}),Ee(G(g),"isValidOption",function(e){var t=g.props,n=t.closeOnSelect,r=t.withCheckbox,o=t.open,t=t.onPopperToggle,i=g.state.tempSelected;return!(0<i.length&&!r&&i[0].value===e.value&&(g.setState(_e(_e({},g.state),{},{open:Ve(o)||!n})),!r&&n&&t&&Ve(o)&&t(!1,"optionClick"),1))}),Ee(G(g),"onOptionSelect",function(e){var t=g.props,n=t.onUpdate,r=t.selected,t=t.menu;qe(r)?n&&(g.isValidOption(e)||t)&&n("select-option",e):(g.isValidOption(e)||t)&&g.updateSelectedOptions([e],!0)}),Ee(G(g),"onSelect",function(t,e){var n=g.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;qe(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=g.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,g.updateSelectedOptions(o,!1))}),Ee(G(g),"onSelectAll",function(e){var t=g.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=g.state,i=o.tempSelected,o=o.options;qe(r)&&!t?n&&n(e.target.checked?"select-all":"deselect-all"):(r=i.slice().filter(function(e){return e.disabled}),t=e.target.checked?[].concat(xe(o.filter(function(e){return!e.disabled})),xe(r)):r,g.updateSelectedOptions(t,!1))}),Ee(G(g),"debounceSearch",Lt(g.props.searchDebounceDuration,function(){g.setState({searchInit:!1},function(){g.updateOptions(!1)})})),Ee(G(g),"reload",function(){g.setState({loading:!0},function(){g.updateOptions(!1)})}),Ee(G(g),"debounceClear",Lt(250,function(){return g.updateOptions(!1)})),Ee(G(g),"onClearOptions",function(){var e=g.props,t=e.selected,n=e.name,r=e.onUpdate,o=e.showApplyButton,e=e.onChange,i=g.state.tempSelected.filter(function(e){return e.disabled});qe(t)&&!o?r&&r("clear-all"):(g.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),g.debounceClear(),e&&!o&&e(i,n))}),Ee(G(g),"onTogglePopper",function(e){var t=g.props.onPopperToggle;t&&Ve(g.props.open)&&t(!1,e)}),Ee(G(g),"onCancelOptions",function(){var e=g.state,t=e.previousSelected,n=e.tempSelected,e=e.optionsLength,r=g.props,o=r.selected,i=r.onUpdate,a=r.onClose,r=r.name,s=!!Ve(g.props.open)&&g.state.open,c=t.map(function(e){return e.value});qe(o)?i&&i("cancel-selected",t,n):(o=g.updateTriggerLabel(t),i=g.getDisabledOptions(g.state.options),g.setState(_e(_e({},g.state),{},{tempSelected:t,selectAll:$e(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r)),g.onTogglePopper("cancelClick")}),Ee(G(g),"onApplyOptions",function(){var e=g.state,t=e.tempSelected,e=e.previousSelected,n=g.props,r=n.onChange,o=n.selected,i=n.onUpdate,a=n.onClose,n=n.name,s=!!Ve(g.props.open)&&g.state.open,c=t.map(function(e){return e.value});qe(o)?i&&i("apply-selected",e,t):(g.setState(_e(_e({},g.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n)),g.onTogglePopper("applyClick")}),Ee(G(g),"onToggleDropdown",function(e,t){var n;g.props.disabled||((n=g.props.onPopperToggle)&&Ve(g.props.open)?n(e,t):g.setState({open:e}))});var g,t=e.selected,t=void 0===t?[]:t,n=e.totalOptions,r=e.withCheckbox,o=e.loading,i=e.open,a=e.options,e=(g.staticLimit=Math.min(100,e.staticLimit),n||a.length),n="fetchOptions"in g.props||e>g.staticLimit,s=n?[]:g.getSelectedOptions(a,!0),c=g.getDisabledOptions(a);return g.state={async:n,optionsLength:e,open:i,searchInit:!1,searchedOptionsLength:e,optionsApplied:!1,options:a||[],loading:n||o,searchTerm:"",tempSelected:s,previousSelected:s,selected:Ge(n,"",r)?t:[],triggerLabel:g.updateTriggerLabel(s,e),selectAll:$e(s,e,c.length),errorType:"DEFAULT"},g}return a(l,[{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=(n=this.props).loading,i=n.fetchOptions,a=n.options,n=n.withSearch,r=this.getDisabledOptions(a=void 0===a?[]:a).length,e.loading===o)||i||(a.length>this.staticLimit?this.updateOptions(!0,!0):(i=this.getSelectedOptions(a,!0),this.setState(_e(_e({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:$e(i,this.state.optionsLength,r)})),n&&null!=(o=nn.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||Ve(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,c=e.tempSelected,u=e.selectAll,l=e.triggerLabel,f=e.previousSelected,p=e.scrollIndex,e=e.errorType,d=this.props,h=d.withSelectAll,h=void 0===h||h,d=d.withCheckbox,y=this.props,m=y.triggerOptions,m=void 0===m?{}:m,g=(y.selected,y.tabIndex),y=W(y,tn),s=s-t.length,g=g||(Ye(o,s,h,d)?0:t.findIndex(function(e){return!e.disabled}));return Se.createElement(Ht,Ce({listOptions:t,inputRef:nn,remainingOptions:s,firstEnabledOption:g,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:l,tempSelected:c,previousSelected:f,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:u,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:m.customTrigger,scrollIndex:p,updateOptions:this.reload,errorType:e},y))}}]),l}(),on=(Ee(rn,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),an={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},sn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=W(e,on),n=ke((Ee(t={Heading:!0},"Heading--".concat(r),r),Ee(t,"Heading--".concat(n),!a&&n),Ee(t,"color-".concat(a),a),t),i);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:an[r]}),o)},cn=(sn.displayName="Heading",sn.defaultProps={appearance:"default",size:"m"},["className","iconType"]),un=(Ut.displayName="ActionButton",Ut.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"]),ln={tiny:12,regular:16,large:20},fn=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,c=e.value,u=e.icon,l=e.inlineLabel,f=e.required,p=e.error,d=e.info,h=e.onChange,y=e.onClick,m=e.onClear,g=e.onBlur,v=e.onFocus,b=e.onPaste,w=e.actionIcon,S=e.className,_=e.autoFocus,E=e.disabled,C=e.readOnly,O=e.iconType,x=W(e,un),k=Se.useRef(null),D=Oe(Se.useState(!c),2),T=D[0],j=D[1],D=(Se.useImperativeHandle(t,function(){return k.current}),Se.useEffect(function(){var e;_&&null!=(e=k.current)&&e.focus({preventScroll:!0})},[]),De(e)),e=ke((Ee(t={},"Input",!0),Ee(t,"Input--".concat(n),n),Ee(t,"Input--disabled",E||C),Ee(t,"Input--error",p),t),S),S=ke((Ee(t={},"Input-input",!0),Ee(t,"Input-input--".concat(n),n),t)),T=ke((Ee(t={},"Input-icon",!0),Ee(t,"Input-icon--left",!0),Ee(t,"Input-icon--inputBlank",T),Ee(t,"Input-icon--error",p),t)),t=ke((Ee(p={},"Input-icon",!0),Ee(p,"Input-iconWrapper--right",!0),p)),p=Se.createElement("div",{className:t,tabIndex:0},Se.createElement(P,{name:"info",size:ln[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=k.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return j(!(null!=(e=k.current)&&e.value))}},l&&Se.createElement("div",{className:"Input-inlineLabel"},Se.createElement(je,{appearance:"subtle"},l)),"tiny"!==n&&u&&Se.createElement("div",{className:T},Se.createElement(P,{name:u,size:ln[n],type:O})),Se.createElement("input",Ce({"data-test":"DesignSystem-Input"},D,x,{ref:k,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:c,required:f,disabled:E,readOnly:C,onChange:h,onBlur:g,onClick:y,onFocus:v,onPaste:b,tabIndex:C?-1:void 0})),E?"":d?Se.createElement(_a,{position:"bottom",tooltip:d},p):w&&(c||i)?w:m&&(c||i)&&Se.createElement("div",{className:t},Se.createElement(P,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=k.current)&&t.focus({preventScroll:!0}),m(e)},name:"close",size:ln[n],className:"Input-icon--right"})))}),pn=(fn.displayName="Input",Object.assign(fn,{ActionButton:Ut}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown","iconType"]),dn={regular:16,large:20},hn=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,c=e.suffix,u=e.error,l=e.min,f=e.max,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,m=e.className,g=e.autoFocus,v=e.disabled,b=e.readOnly,w=e.value,S=e.showActionButton,_=void 0===S||S,S=e.onKeyDown,E=e.iconType,C=W(e,pn),O=Se.useRef(null),x=void 0===w,k=Oe(Se.useState(w||r),2),D=k[0],T=k[1],k=(Se.useImperativeHandle(t,function(){return O.current}),Se.useEffect(function(){var e;g&&null!=(e=O.current)&&e.focus({preventScroll:!0})},[]),Se.useEffect(function(){void 0!==w&&T(w)},[w]),De(e)),e=ke((Ee(t={},"MetricInput",!0),Ee(t,"MetricInput--".concat(n),n),Ee(t,"MetricInput--disabled",v||b),Ee(t,"MetricInput--error",u),t),m),t=ke((Ee(u={},"MetricInput-input",!0),Ee(u,"MetricInput-input--".concat(n),n),Ee(u,"mr-4",!c&&!_&&"regular"===n),Ee(u,"mr-6",!c&&!_&&"large"===n),u)),u=ke((Ee(m={},"MetricInput-icon",!0),Ee(m,"MetricInput-icon--".concat(n),n),m)),m=ke((Ee(m={},"mr-4","regular"===n),Ee(m,"mr-5","regular"!==n),m)),j=ke((Ee(j={},"ml-4 mr-3","regular"===n),Ee(j,"mx-5","regular"!==n),j)),I=ke((Ee(I={},"p-0",!0),Ee(I,"MetricInput-arrowIcon--".concat(n),n),Ee(I,"ml-3",!0),I)),M=function(e,t){var n=Number(D||0),r=(null==(r=n.toString().split(".")[1])?void 0:r.length)||0;v||b||!("down"===t?void 0!==l&&l<n||void 0===l:void 0!==f&&n<f||void 0===f)||(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)}(f,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)}(l,+(n="down"===t?n-1:n+1).toFixed(r))),x&&T(n),p&&(t=Object.create(e,{target:{value:{value:n}}}),p(t)))},N="large"===n?"regular":"tiny";return Se.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&Se.createElement(P,{"data-test":"DesignSystem-MetricInput--icon",name:a,type:E,size:dn[n],appearance:D?"subtle":"disabled",className:u}),s&&Se.createElement(je,{"data-test":"DesignSystem-MetricInput--prefix",className:m,size:n,appearance:"subtle"},s),Se.createElement("input",Ce({"data-test":"DesignSystem-MetricInput"},k,C,{type:"number",ref:O,name:o,defaultValue:r,placeholder:i,className:t,value:D,disabled:v,readOnly:b,onChange:function(e){x&&T(e.target.value),p&&p(e)},onBlur:h,onClick:d,onFocus:y,onKeyDown:function(e){if(_){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),M(t,"down"));case"ArrowUp":t.preventDefault(),M(t,"up")}}else e.preventDefault()}})),c&&Se.createElement(je,{"data-test":"DesignSystem-MetricInput--suffix",className:j,size:n,appearance:"subtle"},c),_&&Se.createElement("div",{className:"MetricInput-arrowIcons"},Se.createElement(Te,{icon:"keyboard_arrow_up",size:N,className:"".concat(I," mb-2"),onClick:function(e){return M(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),Se.createElement(Te,{icon:"keyboard_arrow_down",size:N,className:I,onClick:function(e){return M(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),yn=(hn.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,d=void 0===r?"_":r,r=n.validators,h=void 0===r?[]:r,r=n.clearOnEmptyBlur,o=void 0===r||r,r=n.defaultValue,y=n.mask,i=n.error,a=n.caption,R=n.required,m=n.onChange,s=n.onPaste,c=n.onBlur,u=n.onFocus,l=n.onClear,f=n.className,g=n.id,L=n.helpText,F=W(n,yn),v=Se.useCallback(function(e){return"object"===Z(y[e])},[y]),b=Se.useCallback(function(e,t){if("right"===e){for(var n=t;n<y.length;n++)if(v(n))return n;return y.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[y,v]),p=Se.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),w=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]:y.length-1;return Wt(y,d).slice(e,t+1)},[y,d]),S=Se.useMemo(function(){return w()},[w]),_=Se.useMemo(function(){return p()},[p]),E=Se.useRef(null),C=Se.useRef(),O=Se.useRef(_),x=Se.useRef(0),r=Oe(Se.useState(r||t||""),2),k=r[0],D=r[1],T=(Se.useImperativeHandle(e,function(){return E.current}),Se.useEffect(function(){D(t||"")},[t]),Se.useEffect(function(){M(x.current)},[k]),Se.useCallback(function(e){return Math.abs(e.end-e.start)},[])),j=Se.useCallback(function(){var e;return{start:(null==(e=E.current)?void 0:e.selectionStart)||0,end:(null==(e=E.current)?void 0:e.selectionEnd)||0}},[E.current]),I=Se.useCallback(function(e){var t,n;E.current&&(t=E.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),t.setSelectionRange(n,e))},[E.current]),M=Se.useCallback(function(e){return I({start:e,end:e})},[I]),N=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>=y.length||(r>=e.length?O.current={start:t,end:t}:(n=y[t],v(t)?(e[r].match(n)?o+=e[r]:o+=d,a++):o+=n,o+=N(e,i,a))),o},[y,d,v]),P=Se.useCallback(function(){O.current=j(),C.current=window.requestAnimationFrame(P)},[O.current,j]),A=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=j(),o=Math.min(O.current.start,r.start),i=r.end,a=o,s="",c=0,i=n.slice(o,i),s=N(i,o),i=k,u=(0!==i.length||"parent-TimePicker"!==g&&"parent-DatePicker"!==g||(i=S),t=s.length,r.end>O.current.end?c=t?T(O.current):0:n.length<i.length&&(c=i.length-n.length),i.split("")),l=0;l<t;l++)u[o+l]=s[l];for(var f=0;f<c;f++){var p=o+t+f;u[p]=w(p,p)}r=u.slice(0,y.length).join(""),s!==d&&""!==s&&!s.includes(d)&&q(h,r)&&(a+=t),n=b(c?"left":"right",a),1===c&&!s.length&&!v(a)&&0<n?(a=n,u[--a]=d):1!==c&&(a=n),r=u.slice(0,y.length).join("");x.current=a,r!==i&&q(h,r)?"__:__ _M"===S?(D(r.toUpperCase()),null!=m&&m(e,r.toUpperCase())):(D(r),null!=m&&m(e,r)):window.requestAnimationFrame(function(){return M(x.current)})},[O.current,h,j,N,T,w,b,v,M,D,m]),e=Se.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(D(""),t=""),null!=c&&c(e,t),C.current&&window.cancelAnimationFrame(C.current)},[o,C.current,w,D,c]),z=Se.useCallback(function(e){x.current=_.start,D(S),null!=l&&l(e)},[D,w,M,p,l]),B=Se.useCallback(function(e){C.current=window.requestAnimationFrame(P),k||(x.current=_.start,D(w())),null!=u&&u(e)},[C.current,k,P,D,I,u]),K=Se.useMemo(function(){return ke({"d-flex flex-column flex-grow-1":!0},f)},[f]);return Se.createElement("div",{className:K,"data-test":"DesignSystem-InputMask--Wrapper"},Se.createElement(fn,Ce({},F,{value:k,error:i,required:R,onFocus:B,onChange:r,onClear:k===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],A(r)&&A(o)):A(t)),o=q(h,n);r&&s&&o&&(s(e,n),D(n))},autoComplete:"off",ref:E})),Se.createElement(xs,{message:i?a:L,error:i}))}),mn=(n.displayName="InputMask",n.utils={getDefaultValue:Wt},n),gn=["required","optional","withInput","disabled","children","className","info"],vn=(qt.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=W(e,vn),i=ke((Ee(t={Link:!0},"Link--".concat(i),i),Ee(t,"Link--".concat(o),o),Ee(t,"Link--".concat(o,"-disabled"),a),t),r);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},wn=(bn.displayName="Link",bn.defaultProps={appearance:"default",size:"regular",disabled:!1},Vt.displayName="Meta",function(e){var i=e.list,t=e.seperator,n=e.className,a=e.size,e=De(e),n=ke(Ee({},"MetaList",!0),n),s=ke(Ee({},"MetaList-seperator",!0)),r=ke((Ee(r={},"MetaList-seperator",!0),Ee(r,"MetaList-seperator--left",!0),r));return Se.createElement("div",Ce({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),i.map(function(e,t){var n=e.label,r=e.icon,e=e.iconType,o=t!==i.length-1;return Se.createElement("span",{key:t,className:"MetaList-item"},Se.createElement(Vt,{size:a,label:void 0===n?"":n,icon:r,iconType:e}),o&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:s,appearance:"disabled"}))}))});wn.displayName="MetaList",wn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function Sn(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var _n=function(){e(i,Se["Component"]);var r=h(i);function i(){var o;d(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ee(G(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),Ee(G(o),"handleElement",null),Ee(G(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),Ee(G(o),"mouseEventClientOffset",function(e){return e.clientX}),Ee(G(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}),Ee(G(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=Yt(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),Ee(G(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)}),Ee(G(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),Ee(G(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))}),Ee(G(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()))}),Ee(G(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),Ee(G(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}}),Ee(G(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),Ee(G(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),Ee(G(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,e=e.isCurrentLabelHovered,a=this.state,s=a.isHandleMoving,a=a.isHandleHovered,a=s||a||e,e=this.getHandleMidpointAndOffset(this.handleElement,!0).handleMidpoint,r={left:"calc(".concat(Gt((r-t)*n)," - ").concat(e,"px)")},n=ke((Ee(t={},"Slider-handle",!0),Ee(t,"Slider-handle--disabled",o),Ee(t,"Slider-handle--active",s),Ee(t,"border-0",o),t)),s=ke((Ee(e={},"Slider-tooltip",!0),Ee(e,"Tooltip",!0),Ee(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=function(){e(n,Se["Component"]);var t=h(n);function n(e){var p;return d(this,n),Ee(G(p=t.call(this,e)),"handleElements",[]),Ee(G(p),"trackElement",null),Ee(G(p),"getLabelPrecision",function(e){var t=e.labelPrecision,e=e.stepSize;return null==t?(e=e,isFinite(e)&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0):t}),Ee(G(p),"getOffsetRatio",function(e){return Yt((e-p.props.min)*p.state.tickSizeRatio,0,1)}),Ee(G(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),Ee(G(p),"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}),Ee(G(p),"updateTickSize",function(){var e,t;null!=p.trackElement&&(e=p.trackElement.clientWidth,t=1/(p.props.max-p.props.min),p.setState({tickSize:e*t,tickSizeRatio:t}))}),Ee(G(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),Ee(G(p),"maybeHandleTrackClick",function(t){var e=t.target;!p.props.disabled&&null==e.closest(".Slider-handle")&&(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.beginHandleMovement(t)}),Ee(G(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),Ee(G(p),"getNewHandleValues",function(e,t){var n=p.getHandleValues(p.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=p.getLockedHandleIndex(t,o);return-1!==i?(Sn(n,t,i,n[i]),n):(Sn(r,t,o,e),r)}),Ee(G(p),"onReleaseHandler",function(e,t){var n=p.props.onRangeRelease,r=p.getHandleValues(p.props),o=p.getNewHandleValues(e,t);n&&n(o),r.forEach(function(e,t){e.onRelease&&e.onRelease(o[t])})}),Ee(G(p),"onChangeHandler",function(e,t){var n=p.props.onRangeChange,r=p.getHandleValues(p.props),o=r.map(function(e){return e.value}),i=p.getNewHandleValues(e,t);!function(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])}))}),Ee(G(p),"formatLabel",function(e){var t=p.props.labelRenderer,e=e.toFixed(p.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),Ee(G(p),"renderHandles",function(){var e=p.props,r=e.disabled,o=e.max,i=e.min,a=e.stepSize,s=p.getHandleValues(p.props);return 0===s.length?null:s.map(function(e,t){var e=e.value,n=p.state.hoveredLabelValue===Number(e.toFixed(p.state.labelPrecision));return Se.createElement(_n,{disabled:r,key:"".concat(t,"-").concat(s.length),max:o,min:i,onRelease:function(e){return p.onReleaseHandler(e,t)},onChange:function(e){return p.onChangeHandler(e,t)},label:p.formatLabel(e),ref:p.addHandleRef,stepSize:a,tickSize:p.state.tickSize,tickSizeRatio:p.state.tickSizeRatio,value:e,isCurrentLabelHovered:n})})}),Ee(G(p),"renderLabels",function(){for(var e,t=p.props,n=t.labelStepSize,r=t.max,o=t.min,i=t.labelRenderer,a=t.disabled,s=[],c=p.state.tickSizeRatio*n,u=p.getHandleValues(p.props).map(function(e){return e.value.toFixed(p.state.labelPrecision)}),l=o,f=0;l<r||(e=l,Math.abs(e-r)<=1e-5);l+=n,f+=c)!function(n,e){var e={left:Gt(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision)),r=ke((Ee(r={},"Slider-ticks",!0),Ee(r,"bg-dark",t),r));s.push(Se.createElement("div",{onClick:function(t){var e;p.props.disabled||(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.changeValue(n)},className:"Slider-label",key:n,style:e,onMouseOver:function(){return p.handleLabelMouseOver(n)},onMouseLeave:p.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},Se.createElement("span",{className:r}),!1!==i&&Se.createElement(je,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),Ee(G(p),"renderTrackFill",function(e,t,n){var r=Oe([p.getOffsetRatio(t.value),p.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=_e({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=ke((Ee(t={},"Slider-progress",!0),Ee(t,"Slider-progress--disabled",p.props.disabled),Ee(t,"Slider-progress--inRange",o),Ee(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return Se.createElement("div",{key:"track-".concat(e),className:n,style:r})}),Ee(G(p),"renderTracks",function(){var e=p.getHandleValues(p.props),n=(e.push({value:p.props.max}),{value:p.props.min||0}),r=[];return e.forEach(function(e,t){r.push(p.renderTrackFill(t,n,e)),n=e}),r}),Ee(G(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),Ee(G(p),"handleLabelMouseLeave",function(){p.setState({hoveredLabelValue:void 0})}),p.state={labelPrecision:p.getLabelPrecision(p.props),tickSize:0,tickSizeRatio:0},p}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],c=r(s);c<i&&(o=s,i=c)}return o}}},{key:"render",value:function(){var t=this,e=this.props,n=e.label,e=e.className,r=De(this.props),e=ke(Ee({},"Slider",!0),e),o=ke((Ee(o={},"Slider-wrapper",!0),Ee(o,"Slider-wrapper--disabled",this.props.disabled),o));return Se.createElement("div",Ce({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&Se.createElement(qt,{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}(),En=(Ee(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),Ee(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),Cn=Se.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=W(e,En),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=ke(Ee({},"OutsideClick",!0),r);return Se.createElement("div",Ce({ref:i},e,{className:t}),n)}),On=(Cn.displayName="OutsideClick",["appearance","children","className","color"]),xn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=W(e,On),n=ke((Ee(t={Text:!0},"Text--".concat(n),!i&&n),Ee(t,"color-".concat(i),i),t),o);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},kn=(xn.displayName="Paragraph",xn.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,c=e.checked,u=e.defaultChecked,l=e.className,f=e.helpText,p=e.error,e=W(e,kn),d=Se.useRef(null),t=(Se.useImperativeHandle(t,function(){return d.current}),ke((Ee(t={},"Radio",!0),Ee(t,"Radio--disabled",o),t),l)),p=ke((Ee(l={},"Radio-wrapper",!0),Ee(l,"Radio-defaultWrapper",!p),Ee(l,"Radio-errorWrapper",p),Ee(l,"Radio-wrapper--".concat(n),n),l)),l=ke((Ee(l={},"Radio-outerWrapper",!0),Ee(l,"Radio-outerWrapper--".concat(n),n),l)),h=ke(Ee({},"Radio-Label",!0)),y="".concat(a,"-").concat(r,"-").concat(ge());return Se.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},Se.createElement("div",{className:l,"data-test":"DesignSystem-Radio-OuterWrapper"},Se.createElement("input",Ce({tabIndex:0},e,{type:"radio",disabled:o,checked:c,defaultChecked:u,ref:d,name:a,value:s,onChange:i,className:"Radio-input",id:y,"data-test":"DesignSystem-Radio-Input"})),Se.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:p})),Se.createElement("div",{className:"Radio-labelWrapper"},r&&Se.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},Se.createElement(je,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&Se.createElement(je,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),Dn=(r.displayName="Radio",["className","children"]),Tn=Se.forwardRef(function(e,t){var n=e.className,r=e.children,e=W(e,Dn),n=ke(Ee({Row:!0},"".concat(n),n));return Se.createElement("div",Ce({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),jn=(Tn.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=De(e),s=ke(Ee({},"StatusHint",!0),s),t=ke((Ee(c={},"StatusHint-icon",!0),Ee(c,"StatusHint--".concat(t),t),c)),c=ke(Ee({},"ellipsis--noWrap",a));return Se.createElement("div",Ce({"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(je,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:c},n))}),In=(jn.displayName="StatusHint",jn.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=De(e),n=ke((Ee(t={Pills:!0},"Badge--".concat(n),n&&!o),Ee(t,"Badge--subtle-".concat(n),o),t),i);return Se.createElement("span",Ce({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Mn=(In.displayName="Pills",In.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=De(e),n=ke(Ee({Spinner:!0},"Spinner--".concat(n),n),r),r=ke(Ee({Circle:!0},"Circle--".concat(t),t));return Se.createElement("svg",Ce({},e,{className:n},{viewBox:"0 0 50 50"}),Se.createElement("circle",Ce({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Nn=(Mn.displayName="Spinner",Mn.defaultProps={appearance:"primary",size:"medium"},_e(_e({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",_e(_e({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),Pn=(Se.forwardRef(function(e,t){function n(e){"change"!=e.type&&"Space"!==e.key||(void 0===l&&d(!p),a&&a(e,!p))}var r=e.size,r=void 0===r?"regular":r,o=e.defaultChecked,i=e.disabled,a=e.onChange,s=e.name,c=e.value,u=e.className,l=(e.appearance,e.checked),e=W(e,Nn),f=Oe(Se.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(Se.useEffect(function(){void 0!==l&&d(l)},[l]),ke((Ee(f={},"Switch",!0),Ee(f,"Switch--disabled",i),Ee(f,"Switch--".concat(r),r),f),u)),r=ke((Ee(u={},"Switch-wrapper",!0),Ee(u,"Switch-wrapper--disabled",i),Ee(u,"Switch-wrapper--".concat(r),r),Ee(u,"Switch-wrapper--checked",p),Ee(u,"Switch-wrapper--checkedDisabled",p&&i),u));return Se.createElement("div",{className:f},Se.createElement("input",Ce({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,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"]);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,c=e.value,u=e.defaultValue,l=e.required,f=e.error,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,m=e.className,e=W(e,Pn),o=ke((Ee(n={},"Textarea",!0),Ee(n,"Textarea--resize",o),Ee(n,"Textarea--error",f),n),m);return Se.createElement("textarea",Ce({"data-test":"DesignSystem-Textarea"},e,{ref:t,name:a,rows:r,placeholder:s,className:o,value:c,defaultValue:u,required:l,disabled:i,onChange:p,onBlur:h,onClick:d,onFocus:y}))}).displayName="Textarea";function An(e){var t=Xn.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===Xn.call(e.callee)}function Rn(){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 Ln(){return Rn()&&!!Symbol.toStringTag}function Fn(e){try{return ur('"use strict"; return ('+e+").constructor;")()}catch(e){}}var zn,Bn,Kn,Hn,Un,Wn,qn,Vn,Gn,Yn=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})),$n=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})),Zn=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}),o=(ee(Zn),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zn(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Jn=ee(o),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})),Xn=Object.prototype.toString,n=(Object.keys||(zn=Object.prototype.hasOwnProperty,Bn=Object.prototype.toString,Kn=An,r=Object.prototype.propertyIsEnumerable,Hn=!r.call({toString:null},"toString"),Un=r.call(function(){},"prototype"),Wn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],qn=function(e){var t=e.constructor;return t&&t.prototype===e},Vn={$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},Gn=function(){if("undefined"!=typeof window)for(var e in window)try{if(!Vn["$"+e]&&zn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{qn(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),c=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===Bn.call(e),r=Kn(e),o=t&&"[object String]"===Bn.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Un&&n;if(o&&0<e.length&&!zn.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(r&&0<e.length)for(var c=0;c<e.length;++c)i.push(String(c));else for(var u in e)a&&"prototype"===u||!zn.call(e,u)||i.push(String(u));if(Hn)for(var l=function(e){if("undefined"==typeof window||!Gn)return qn(e);try{return qn(e)}catch(e){return!1}}(e),f=0;f<Wn.length;++f)l&&"constructor"===Wn[f]||!zn.call(e,Wn[f])||i.push(Wn[f]);return i}),c),Qn=Array.prototype.slice,er=Object.keys,tr=er?function(e){return er(e)}:n,nr=Object.keys,rr=(tr.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return An(e)?nr(Qn.call(e)):nr(e)}):Object.keys=tr,Object.keys||tr},tr),o="undefined"!=typeof Symbol&&Symbol,or=Array.prototype.slice,ir=Object.prototype.toString,ar=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==ir.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=or.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(or.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(or.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},sr=ar.call(Function.call,Object.prototype.hasOwnProperty),cr=SyntaxError,ur=Function,lr=TypeError,fr=Object.getOwnPropertyDescriptor;if(fr)try{fr({},"")}catch(wi){fr=null}function pr(){throw new lr}function dr(e,t){if("string"!=typeof e||0===e.length)throw new lr("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new lr('"allowMissing" argument must be a boolean');var n=function(e){var t=Pr(e,0,1),n=Pr(e,-1);if("%"===t&&"%"!==n)throw new cr("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new cr("invalid intrinsic syntax, expected opening `%`");var o=[];return Nr(e,Ar,function(e,t,n,r){o[o.length]=n?Nr(r,Rr,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(sr(jr,r)&&(r="%"+(n=jr[r])[0]+"%"),sr(Dr,r)){var o=Dr[r];if(void 0!==(o=o===kr?Tr(r):o)||t)return{alias:n,name:r,value:o};throw new lr("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new cr("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Mr(n,Ir([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=Pr(u,0,1),f=Pr(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new cr("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),sr(Dr,l="%"+(r+="."+u)+"%"))i=Dr[l];else if(null!=i){if(!(u in i)){if(t)return;throw new lr("base intrinsic for "+e+" exists, but the property is not available.")}i=fr&&s+1>=n.length?(c=!!(f=fr(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=sr(i,u),i[u]),c&&!a&&(Dr[l]=i)}}return i}function hr(e,t){return"function"==typeof(t=dr(e,!!t))&&-1<Fr(e,".prototype.")?Lr(t):t}function yr(e){return!(zr&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Br(e)}function mr(e){return!!yr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Br(e)&&"[object Function]"===Br(e.callee)}function gr(e,t){var n=2<arguments.length?arguments[2]:{},r=rr(t);Hr&&(r=Wr.call(r,Object.getOwnPropertySymbols(t)));for(var o,i,a,s,c=0;c<r.length;c+=1)o=e,i=r[c],a=t[r[c]],s=n[r[c]],i in o&&(!Vr(s)||!s())||(Gr?qr(o,i,{configurable:!0,enumerable:!1,value:a,writable:!0}):o[i]=a)}function vr(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!$r(e)||!$r(t))}function br(){return"function"==typeof Object.is?Object.is:vr}function wr(){if(null!=this&&this!==eo(this))throw new to("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 Sr(){if(!no)throw new oo("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=ro(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return wr}var _r,Er,Cr,Or,r=fr?function(){try{return pr}catch(e){try{return fr(arguments,"callee").get}catch(e){return pr}}}():pr,c="function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&Rn(),xr=Object.getPrototypeOf||function(e){return e.__proto__},kr={},n="undefined"==typeof Uint8Array?u:xr(Uint8Array),Dr={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?xr([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":kr,"%AsyncGenerator%":kr,"%AsyncGeneratorFunction%":kr,"%AsyncIteratorPrototype%":kr,"%Atomics%":"undefined"==typeof Atomics?u:Atomics,"%BigInt%":"undefined"==typeof BigInt?u:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?u:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?u:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?u:FinalizationRegistry,"%Function%":ur,"%GeneratorFunction%":kr,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?xr(xr([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?xr((new Map)[Symbol.iterator]()):u,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?u:Promise,"%Proxy%":"undefined"==typeof Proxy?u:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?u:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?u:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?xr((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?xr(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":cr,"%ThrowTypeError%":r,"%TypedArray%":n,"%TypeError%":lr,"%Uint8Array%":"undefined"==typeof Uint8Array?u:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?u:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?u:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?u:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?u:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?u:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?u:WeakSet},Tr=function e(t){var n,r;return"%AsyncFunction%"===t?n=Fn("async function () {}"):"%GeneratorFunction%"===t?n=Fn("function* () {}"):"%AsyncGeneratorFunction%"===t?n=Fn("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=xr(r.prototype)),Dr[t]=n},jr={"%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"]},Ir=ar.call(Function.call,Array.prototype.concat),Mr=ar.call(Function.apply,Array.prototype.splice),Nr=ar.call(Function.call,String.prototype.replace),Pr=ar.call(Function.call,String.prototype.slice),Ar=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rr=/\\(\\)?/g,Lr=t(function(e){var t=dr("%Function.prototype.apply%"),n=dr("%Function.prototype.call%"),r=dr("%Reflect.apply%",!0)||ar.call(n,t),o=dr("%Object.getOwnPropertyDescriptor%",!0),i=dr("%Object.defineProperty%",!0),a=dr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(ar,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(ar,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),Fr=(Lr.apply,Lr(dr("String.prototype.indexOf"))),zr=Ln(),Br=hr("Object.prototype.toString"),o=function(){return yr(arguments)}(),Kr=(yr.isLegacyArguments=mr,o?yr:mr),Hr="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Ur=Object.prototype.toString,Wr=Array.prototype.concat,qr=Object.defineProperty,Vr=function(e){return"function"==typeof e&&"[object Function]"===Ur.call(e)},Gr=qr&&function(){var e={};try{for(var t in qr(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),Yr=(gr.supportsDescriptors=!!Gr,gr),$r=function(e){return e!=e},c=Lr(br(),Object),Zr=(Yr(c,{getPolyfill:br,implementation:vr,shim:function(){var e=br();return Yr(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),r=Ln(),Jr=(r&&(_r=hr("Object.prototype.hasOwnProperty"),Er=hr("RegExp.prototype.exec"),Cr={},Or={toString:n=function(){throw Cr},valueOf:n},"symbol"==typeof Symbol.toPrimitive)&&(Or[Symbol.toPrimitive]=n),hr("Object.prototype.toString")),Xr=Object.getOwnPropertyDescriptor,Qr=r?function(e){if(!e||"object"!=typeof e)return!1;var t=Xr(e,"lastIndex");if(!(t&&_r(t,"value")))return!1;try{Er(e,Or)}catch(e){return e===Cr}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===Jr(e)},eo=Object,to=TypeError,no=Yr.supportsDescriptors,ro=Object.getOwnPropertyDescriptor,oo=TypeError,io=Yr.supportsDescriptors,ao=Object.getOwnPropertyDescriptor,so=Object.defineProperty,co=TypeError,uo=Object.getPrototypeOf,lo=/a/,u=Lr(wr),fo=(Yr(u,{getPolyfill:Sr,implementation:wr,shim:function(){var e,t,n;if(io&&uo)return e=Sr(),t=uo(lo),(n=ao(t,"flags"))&&n.get===e||so(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new co("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),u),po=Date.prototype.getDay,ho=Object.prototype.toString,yo=Ln(),mo=function(e){if("object"!=typeof e||null===e)return!1;if(!yo)return"[object Date]"===ho.call(e);try{return po.call(e),!0}catch(e){return!1}},go=Date.prototype.getTime;function vo(e,t,n){n=n||{};if(n.strict?!Zr(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?Zr(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(bo(i)||bo(a))return!1;if(i.prototype!==a.prototype)return!1;if(Kr(i)!==Kr(a))return!1;e=Qr(i),t=Qr(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&fo(i)===fo(a);if(mo(i)&&mo(a))return go.call(i)===go.call(a);if(e=wo(i),t=wo(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 c=rr(i),u=rr(a)}catch(e){return!1}if(c.length!==u.length)return!1;for(c.sort(),u.sort(),r=c.length-1;0<=r;r--)if(c[r]!=u[r])return!1;for(r=c.length-1;0<=r;r--)if(o=c[r],!vo(i[o],a[o],s))return!1}}return!0}function bo(e){return null==e}function wo(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 So=vo,_o="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Eo=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(_o&&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}),De=function(n){return["className","data-test"].reduce(function(e,t){return n[t]?_e(_e({},e),{},Ee({},t,n[t])):_e({},e)},{})},re=function(e){function t(){return Se.createElement("span",Ce({"data-test":"DesignSystem-Avatar"},l,{className:p}),f&&Se.createElement(je,{weight:"medium",appearance:"white",className:d},f),!f&&Se.createElement(P,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===o?16:12,appearance:"white",className:h}))}var n=e.withTooltip,r=e.tooltipPosition,o=e.size,i=e.children,a=e.firstName,s=e.lastName,c=e.className,u=e.appearance,l=De(e),f=i?i.trim().slice(0,2):"".concat(a?a.trim()[0]:"").concat(s?s.trim()[0]:""),e=i||"".concat(a||""," ").concat(s||"")||"",i=u||["accent4","primary","accent3","alert","accent2","warning","accent1","success"][(f.charCodeAt(0)+(f.charCodeAt(1)||0))%8]||"secondary",p=ke((Ee(a={Avatar:!0},"Avatar--".concat(o),o),Ee(a,"Avatar--".concat(i),i),Ee(a,"Avatar--disabled",!f||!n),a),c),d=ke((Ee(s={},"Avatar-content--".concat(o),o),Ee(s,"Avatar-content--".concat(i),i),s)),h=ke(Ee({},"Avatar-content--".concat(i),i));return n&&f?Se.createElement(Ea,{tooltip:e,position:r,triggerClass:"flex-grow-0"},t()):t()},oe=(re.displayName="Avatar",re.defaultProps={tooltipPosition:"bottom",withTooltip:!0,size:"regular"},Se.useEffect),ie=Se.useState,ae=(ne.displayName="Backdrop",["size","appearance","iconAlign","tabIndex","largeIcon","type","children","icon","expanded","selected","loading","disabled","className","tooltip","iconType"]),se={tiny:12,regular:16,large:20},ce=Se.forwardRef(function(e,t){var n,r=e.size,r=void 0===r?"regular":r,o=e.appearance,o=void 0===o?"basic":o,i=e.iconAlign,i=void 0===i?"left":i,a=e.tabIndex,a=void 0===a?0:a,s=e.largeIcon,c=e.type,u=e.children,l=e.icon,f=e.expanded,p=e.selected,d=e.loading,h=e.disabled,y=e.className,m=(e.tooltip,e.iconType),e=W(e,ae),f=ke((Ee(n={},"Button",!0),Ee(n,"Button--expanded",f),Ee(n,"Button--".concat(r),r),Ee(n,"Button--".concat(r,"Square"),!u),Ee(n,"Button--".concat(o),o),Ee(n,"Button--selected",p&&("basic"===o||"transparent"===o)),Ee(n,"Button--iconAlign-".concat(i),u&&i),Ee(n,"".concat(y),y),n)),y=ke((Ee(p={},"Button-icon",!0),Ee(p,"Button-icon--".concat(i),u&&i),p));return Se.createElement("button",Ce({"data-test":"DesignSystem-Button",ref:t,type:c,className:f,disabled:h||d,tabIndex:a},e),d?Se.createElement(Se.Fragment,null,Se.createElement(Nn,{size:"small",appearance:"basic"===o||"transparent"===o?"secondary":"white","data-test":"DesignSystem-Button--Spinner",className:"Button-spinner"}),Se.createElement(je,{className:"Button-text Button-text--hidden"},u||"")):Se.createElement(Se.Fragment,null,l&&Se.createElement("div",{className:y},Se.createElement(P,{"data-test":"DesignSystem-Button--Icon",name:l,type:m,size:s&&!u?se[r]+4:se[r]})),u&&Se.createElement("span",{className:"Button-text"},u)))}),Te=Se.forwardRef(function(e,t){var n=e.icon,r=e.tooltip,o=e.children;return n&&r&&!o?Se.createElement(Ea,{tooltip:r},Se.createElement(ce,Ce({},e,{ref:t}))):Se.createElement(ce,Ce({},e,{ref:t}))});Te.displayName="Button";function ue(e){return["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)}function le(e,t){return new Date(e,t+1,0).getDate()}function fe(e,t,n){if(e){var r=$(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 Y(e,t,n,r,o){if(e){var e=$(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 O(e,t){var r,o,i,a,s;return e&&t?(t=$(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 pe(e,t){var n,r,o,i,a;if(q(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]}}),y({year:r,month:o,date:i})}function de(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 he(e){var n=e.onClick,r=e.onKeyDown,o=void 0===(t=e.role)?"button":t,t=e.tabIndex,e=W(e,ft);return _e({},n?{onClick:n,role:o,tabIndex:t||0,"aria-label":e["aria-label"],onKeyDown:function(e){var t;r?r(e):(t=e.key,dt(o,t)&&n&&(e.preventDefault(),n(e)))}}:{role:o,tabIndex:t,"aria-label":e["aria-label"]})}function ye(e){var t=e.children,n=void 0===(n=e.componentType)?"span":n,r=e.className,e=W(e,yt);return Se.createElement(n,_e(_e({},e),{},{className:r}),t)}function me(e){function t(e){var t;return ke((Ee(t={},"Chip-icon",!0),Ee(t,"Chip-icon--".concat(e),e),Ee(t,"Chip-icon-disabled--right","right"===e&&s),Ee(t,"cursor-pointer","right"===e&&!s),Ee(t,"Chip-icon--selected","right"===e&&u),t))}function n(e){e.stopPropagation(),l&&l()}function r(e){var t;return ke((Ee(t={},"disabled",s&&!u),Ee(t,"primary_dark",!s&&u),Ee(t,"primary_lighter",s&&u),Ee(t,"subtle",!s&&!u&&"right"===e),Ee(t,"inverse",!s&&!u&&"left"===e),t))}var o=e.label,i=e.icon,a=e.clearButton,s=e.disabled,c=e.className,u=e.selected,l=e.onClose,f=e.onClick,p=e.labelPrefix,d=e.iconType,e=De(e),h=ke((Ee(h={},"primary-lighter",s&&u),Ee(h,"inverse-lightest",s&&!u),Ee(h,"primary-dark",u),Ee(h,"inverse",!s&&!u),h));return Se.createElement("div",Ce({tabIndex:s?-1:0,"data-test":"DesignSystem-GenericChip--GenericChipWrapper"},e,{className:"Chip-wrapper ".concat(c),onClick:function(){f&&f()}}),i&&Se.createElement(P,{"data-test":"DesignSystem-GenericChip--Icon",name:i,type:d,appearance:r("left"),className:t("left")}),"string"==typeof o?Se.createElement(Se.Fragment,null,p&&Se.createElement(je,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:h,className:"Chip-text mr-3"},p),Se.createElement(je,{"data-test":"DesignSystem-GenericChip--Text",color:h,className:"Chip-text"},o)):o,a&&Se.createElement("div",{role:"button",onClick:n,tabIndex:s?-1:0,onKeyDown:function(e){"Enter"===e.key&&n(e)},className:t("right"),"data-test":"DesignSystem-GenericChip--clearButton"},Se.createElement(P,{name:"clear",appearance:r("right"),className:"p-2"})))}function ge(){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 ve(e){switch(e.name){case"checked--regular":return m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.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 m.a.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.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 m.a.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return m.a.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}}function be(e){var o=e.inputFormat,i=e.inputOptions,a=e.validators,t=e.state,s=e.setState,e=t.init,n=t.date,t=t.error,c=void 0===(r=i.placeholderChar)?"_":r,r=i.error||i.required&&t&&e,t=void 0===i.caption?"Invalid value":i.caption,u=V[o];return Se.createElement(gn,Ce({icon:"events",placeholder:o},i,{error:r,mask:u,value:n?O(o,n):e?gn.utils.getDefaultValue(u,c):"",onChange:function(e,t){var n=i.onChange;s({open:!0}),t&&!t.includes(c)&&(t=pe(o,t,a),s({date:t})),n&&n(e)},onPaste:function(e,t){var n,r=i.onPaste;s({open:!0}),t&&!t.includes(c)&&(n=pe(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(c)?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:r?t:"",validators:[function(e){return q(a,e,o)}],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))}function we(e){var t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t}function Ie(e){return"12-Hour"===e}function Me(e){var e=e.split(":"),t=12<=(n=parseInt(e[0],10))?"PM":"AM",n=(n%12||12).toString(),n=Ct(n),e=e[1];return"".concat(n.toString(),":").concat(e," ").concat(t)}function Ne(e,t,n){for(var r=[],o=we(e),i=we(t);o<=i;)r.push(o.toTimeString().substring(0,5)),o.setMinutes(o.getMinutes()+n);return r}function Pe(e,t){return e=new Date("07/07/2022 "+e),t=new Date("07/07/2022 "+t).getTime()-e.getTime(),{hour:(e=new Date(t)).getUTCHours(),minute:e.getUTCMinutes()}}function Ae(e){var t=parseInt(e,10);return t<10?e:((60<t?t%60:t).toString()+"0").slice(0,2)}function Re(e){return(parseInt(e,10)%24).toString()}function Le(e){return/^[0-9]+$/.test(e)}function Fe(e){return/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e)}function ze(e){var e=e.split(It),t=Re(e[0]);return{hour:Ct(t),min:((""!==e[1]?Ae(e[1]):"00")+"0").slice(0,2)}}function Be(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=Ct(e):(i="0"+e[0],a=Ae(e[1]+"0"));break;case 3:i="0"+e[0],a=Ae(e.slice(1));break;case 4:i=t?(parseInt(o,10)%12).toString():Re(o),a=Ae(e.slice(2));break;default:a=i="-1"}return{hour:i,min:a}}function Ke(e,t){var n,r={hour:"00",min:"00"};return Le(t)?(n=Be(t),r=parseInt(n.hour)<=12&&0<parseInt(n.hour)?Ue(e,n):n):/^[0-9]+[ AaMmPp]+$/.test(t)?(r=function(e){e=e.split(/[\saAmMpP]/),e=Be(e[0],!0);return{hour:e.hour,min:e.min}}(t)).hour=He(r.hour,t):Fe(t)?(n=ze(t),r=parseInt(n.hour)<=12?Ue(e,n):n):/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(t)&&(e=t.replace(/[\saApPmM]/g,""),Le(e)?r=Be(e,!0):Fe(e)&&(r=ze(e)),r.hour=He(r.hour,t)),r}function He(e,t){return"12"===e&&_t(t)?e="00":Et(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e}function Ue(e,t){var n="".concat(t.hour,":").concat(t.min),r=jt(),o=xt(r,n),r=Mt(e,r),e=Mt(e,n);return o&&e<r&&(n=parseInt(t.hour,10)+12,t.hour=n.toString()),t}function We(e,t){var e=At(xe(e)),n=At(xe(t));return e.length===n.length&&e.every(function(e,t){return e.value===n[t].value})}function qe(e){return void 0!==e}function Ve(e){return void 0!==e}function Ge(e,t,n){return e&&n&&""===t}function Ye(e,t,n,r){return r&&n&&0===t&&""===e}function $e(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 Ze(e,t){e=t&&(null==(t=t[e])?void 0:t.optionID),(t=document.getElementById(e))&&t.scrollIntoView&&t.scrollIntoView({block:"center"})}function Je(e){var t,n,r,o,i,a,s=e.open,c=e.endTime,u=e.interval,l=e.onChange,f=e.startTime,p=e.timeFormat,d=e.showDuration,h=e.noResultMessage,y=e.disabledSlotList,m=e.fetchTimeOptions,g=e.error,v=Oe(Se.useState(0),2),b=v[0],w=v[1],S=(v=Oe(Se.useState(!1),2))[0],_=v[1],E=(v=Oe(Se.useState(-1),2))[0],C=v[1],O=(v=Oe(Se.useState(0),2))[0],x=v[1],k=(t=(v=e).startTime,n=e.endTime,r=e.interval,o=e.timeFormat,i=e.showDuration,a=e.disabledSlotList,v=e.id,e=t?Ot(t):"00:00",n=n?Ot(n):Tt(t),e=kt(e,n,r),Dt(e,o,v,i,t,a));return Se.useEffect(function(){void 0!==s&&_(s)},[s]),Se.useEffect(function(){var e;return S&&-1!=E&&(w(E),e=setTimeout(function(){Ze(E,k)},100)),function(){clearTimeout(e)}},[S]),Se.useEffect(function(){x(O+1)},[f,c,u,d,y]),Se.createElement(on,{key:O,maxHeight:160,loadersCount:0,withSearch:!0,open:S,tabIndex:b,searchPlaceholder:"Search",onChange:function(t){var e=t,n=(Ie(p)&&(e=Me(t)),k.findIndex(function(e){return e.value===t}));C(n),l&&l(e)},fetchOptions:m||function(e){n=e,t=Nt(t=k);var t,n,r=""===n?(r=jt(),Mt(t,r)):Pt(t,n);return w(t=""===e&&-1!=E?E:r),Promise.resolve({options:-1===r?[]:k,count:k.length,scrollToIndex:0===t?t+1:t,searchTerm:e})},noResultMessage:h,staticLimit:k.length,onPopperToggle:function(){_(!S)},error:g})}function Xe(e){var t=e.validators,s=e.inputOptions,c=e.inputFormat,u=e.outputFormat,l=e.onTimeChange,n=e.time,e=e.error,f=(i=Oe(Se.useState(n),2))[0],r=i[1],o=(i=Oe(Se.useState(!1),2))[0],p=i[1],d=void 0===(i=s.placeholderChar)?"_":i,i=(Se.useEffect(function(){var e=j(c,f),e=void 0===n&&e.includes(d)?f:n;r(e)},[n]),X[c]);return Se.createElement(gn,Ce({placeholder:L[c],placeholderChar:d},s,{mask:i,value:f?j(c,f):o?gn.utils.getDefaultValue(i,d):"",validators:function(e){return q(t,e,c)},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){p(!0),l&&l(""),s.onClear&&s.onClear(e)},onBlur:function(e){var t,n,r,o,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=j(c,f);p(!0),l&&(r=!a||(r=d,(o=a)&&o.includes(r))?void 0:(o=a,(r=c)===(a=u)?o:(o=(r=H(r,o)).hours,t=r.minutes,r=r.am_pm,n=F(a)?z(o).AMPM:"",o=F(a)?z(o).hrs:B(o,r),U(a,{minutes:t,hours:o,am_pm:n}))),l(r)),s.onBlur&&s.onBlur(e,i)},error:e,id:"parent-TimePicker"}))}var Qe=12,et=3,tt=12,nt=3,rt=7,ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],it={small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]},at=Qe,st=function(e){return e-e%at},$=function(e){var t,n,r;return(e=e&&y(e))?(t=e.getFullYear(),n=e.getMonth(),r=e.getDay(),e=e.getDate(),{decadeYear:st(t),year:t,month:n,day:r,date:e}):{}},y=function(e,t,n){var r;if(e)if("number"==typeof e)r=new Date(e);else{if("string"==typeof e)return t?pe(t,e,n):void 0;r=e instanceof Date?e:(t=e.year,n=e.month,e=e.date,new Date(t,n,e,0,0,0))}return r},ct=function(){e(p,Se["Component"]);var f=h(p);function p(e){d(this,p),Ee(G(V=f.call(this,e)),"updateState",function(e,t,n){V.setState({year:e,month:t,date:n})}),Ee(G(V),"getDateValue",function(e,t,n){return new Date(e,t,n)}),Ee(G(V),"getNavDateInfo",function(e){var t=V.state,n=t.yearBlockNav,r=t.yearNav,t=t.monthNav,o=(t+e)%tt==-1?11:(t+e)%tt,r=0<=e?r+(0!==e&&o<t?1:0):r-(0!==e&&t<o?1:0);return{yearBlock:n,year:r,month:o}}),Ee(G(V),"getInRangeError",function(){var e=V.props,t=e.rangePicker,e=e.rangeLimit,n=V.state,r=n.startDate,o=n.endDate,n=n.hoverDate;if(t&&e){var i,t=$(r),a=t.year,s=t.month,t=t.date,c=$(o),u=c.year,l=c.month,c=c.date,n=$(n),f=n.year,p=n.month,n=n.date;if(r)return(i=new Date(r)).setDate(t+e),Y(i,"less",f,p,n+1)||Y(i,"less",u,l,c+1);if(o)return(i=new Date(o)).setDate(c-e),Y(i,"more",f,p,n-1)||Y(i,"more",a,s,t-1)}return!1}),Ee(G(V),"selectYear",function(e){return function(){V.updateState(e),V.setState({view:"month"})}}),Ee(G(V),"yearMouseOverHandler",function(e,t,n,r){var o=V.props.onYearHover;o&&o({value:e,year:e,isCurrentYear:t,isDisabled:n},r)}),Ee(G(V),"selectMonth",function(e){return function(){V.updateState(V.state.yearNav,e),V.setState({view:"date"})}}),Ee(G(V),"monthMouseOverHandler",function(e,t,n,r){var o=ot,i=V.props.onMonthHover,o={value:o[e],month:o[e],year:V.state.year,isCurrentMonth:t,isDisabled:n};i&&i(o,r)}),Ee(G(V),"selectDate",function(e,t,n,r){e=V.calculateDate(e,t,n,r,!1);V.setState({currDate:e})}),Ee(G(V),"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),V.getNavDateInfo(i)),e=n.year,t=n.month;return!1===o&&(V.updateState(e,t,a),V.onNavIconClickHandler(s)()),V.getDateValue(e,t,a)}),Ee(G(V),"onNavIconClickHandler",function(s){return function(){var e=V.state,t=e.view,n=e.yearBlockNav,r=e.yearNav,o=e.monthNav,i=Qe,a=tt;switch(t){case"year":"prev"===s&&V.setState({yearBlockNav:n-i}),"next"===s&&V.setState({yearBlockNav:n+i});break;case"month":"prev"===s&&V.setState({yearNav:r-1}),"next"===s&&V.setState({yearNav:r+1});break;case"date":"prev"===s&&(0===o&&V.setState({yearNav:r-1}),V.setState({monthNav:(a+o-1)%a})),"next"===s&&(o===a-1&&V.setState({yearNav:r+1}),V.setState({monthNav:(o+1)%a}))}}}),Ee(G(V),"renderJumpButton",function(e){var t=V.props,n=t.disabledBefore,r=t.disabledAfter,t=t.size,o=V.state,i=o.view,a=o.yearBlockNav,s=o.yearNav,c=o.monthNav,u=!1;switch(i){case"year":"prev"===e&&(u=fe(n,"more",a)||fe(n,"equal",a)),"next"===e&&(u=fe(r,"less",a)||fe(r,"equal",a));break;case"month":"prev"===e&&(u=Y(n,"more",s-1)),"next"===e&&(u=Y(r,"less",s+1));break;case"date":"prev"===e&&(u=Y(n,"more",s,c-1)),"next"===e&&(u=Y(r,"less",s,c+1))}o=ke(Ee({"Calendar-headerIcon":!0},"Calendar-headerIcon--".concat(e),e));return Se.createElement(Te,{type:"button",className:o,appearance:"basic",icon:"arrow_".concat("next"===e?"forward":"back"),disabled:u,size:"small"===t?"tiny":"regular",onClick:V.onNavIconClickHandler(e)})}),Ee(G(V),"onNavHeadingClickHandler",function(n){return function(){var e=V.props.monthsInView,t=V.props.jumpView;(t=t&&1<e?!1:t)&&("year"===n&&V.setState({view:"date"}),"month"===n&&V.setState({view:"year"}),"date"===n)&&V.setState({view:"month"})}}),Ee(G(V),"renderHeaderContent",function(e){function t(e){return"small"===r?Se.createElement(Se.Fragment,null,Se.createElement(je,{weight:"strong"},e),"year"!==a&&!i&&Se.createElement(P,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):Se.createElement(Se.Fragment,null,Se.createElement(cn,{size:"s"},e),"year"!==a&&!i&&Se.createElement(P,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}))}var n=V.props,r=n.size,o=n.monthsInView,i=n.rangePicker,n=V.state,a=n.view,n=n.yearBlockNav,s=Qe,c=ot,u=V.getNavDateInfo(e),l=u.year,u=u.month,o=ke({"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(l));return Se.createElement("div",{className:o},"date"!==a&&Se.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler(a)},t(e)),"date"===a&&Se.createElement(Se.Fragment,null,Se.createElement("div",{onClick:V.onNavHeadingClickHandler(a),className:"d-flex justify-content-center align-items-center"},t(c[u])),Se.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:V.onNavHeadingClickHandler("month")},t(l))))}),Ee(G(V),"renderBodyYear",function(){var e=Qe,u=et,t=V.props,l=t.size,f=t.rangePicker,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearBlockNav,y=t.currYear,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){var n,r,o,i,a,s=u*c+t;if(s!==h)return a=!(s=Y(p,"more",n=h+s)||Y(d,"less",n))&&!f&&n===V.state.year,r=function(){return n===y},o=ke((Ee(o={"Calendar-value":!0,"Calendar-value--active":a,"Calendar-value--disabled":s,"Calendar-yearValue":!0},"Calendar-yearValue--".concat(l),l),Ee(o,"Calendar-value--currDateMonthYear",r()),o)),i=ke({"Calendar-value--currDate":r()&&!a,"Calendar-text":!0}),a=ke({inverse:!a&&!r()&&!s,white:a,"primary-lighter":r()&&s,primary:r(),"inverse-lightest":s}),Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--yearValue",className:o,onClick:V.selectYear(n),onMouseOver:V.yearMouseOverHandler.bind(G(V),n,r(),s)},Se.createElement(je,{size:"small"===l?"small":"regular",color:a,className:i},n))}))})}),Ee(G(V),"renderBodyMonth",function(){var e=tt,u=nt,l=ot,t=V.props,f=t.size,p=t.disabledBefore,d=t.disabledAfter,t=V.state,h=t.yearNav,y=t.year,m=t.currYear,g=t.currMonth,t=Math.ceil(e/u);return Array.from({length:t},function(e,c){return Se.createElement("div",{key:c,className:"Calendar-valueRow"},Array.from({length:u},function(e,t){function n(){return m===h&&g===r}var r=u*c+t,o=Y(p,"more",h,r)||Y(d,"less",h,r),i=!o&&y===h&&r===V.state.month,a=ke((Ee(a={"Calendar-value":!0,"Calendar-value--active":i,"Calendar-value--disabled":o,"Calendar-monthValue":!0},"Calendar-monthValue--".concat(f),f),Ee(a,"Calendar-value--currDateMonthYear",n()),a)),s=ke({inverse:!i&&!n()&&!o,white:i,"primary-lighter":n()&&o,primary:n(),"inverse-lightest":o}),i=ke({"Calendar-value--currDate":n()&&!i,"Calendar-text":!0});return Se.createElement("div",{key:"".concat(c,"-").concat(t),"data-test":"DesignSystem-Calendar--monthValue",className:a,onClick:V.selectMonth(r),onMouseOver:V.monthMouseOverHandler.bind(G(V),r,n(),o)},Se.createElement(je,{size:"small"===f?"small":"regular",color:s,className:i},l[r]))}))})}),Ee(G(V),"onDateRowMouseLeaveHandler",function(){V.props.rangePicker&&V.setState({hoverDate:void 0})}),Ee(G(V),"renderBodyDate",function(e){var o=rt,i=it,t=V.props,a=t.size,s=t.firstDayOfWeek,c="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=ke({"Calendar-valueWrapper":!0}),r=(t+o+ue(s))%o;return Se.createElement(je,{key:t,className:n,appearance:"default",weight:"strong",size:c},i[a][r])})),Se.createElement("div",{className:"Calendar-dateValues",onMouseLeave:V.onDateRowMouseLeaveHandler},V.renderDateValues(e)))}),Ee(G(V),"renderDateValues",function(b){function w(e){return function(){(!x||j&&I||!W)&&V.selectDate(b,e,K,H)}}function S(t){return function(){var e;x&&(e=V.getDateValue(z,B,t),j&&I||V.setState({hoverDate:e}))}}function _(e,t,n,r){var e=V.calculateDate(b,e,K,H,!0)||new Date,o=ot,i=it.large[e.getDay()],t={value:e.getDate(),isToday:t,isDisabled:n,todayDate:V.state.currDate,fullDate:e,date:e.getDate(),month:o[e.getMonth()],year:e.getFullYear(),dayName:i};a&&a(t,r)}var E=rt,C=tt,e=V.props,O=e.size,x=e.rangePicker,t=e.firstDayOfWeek,k=e.disabledBefore,D=e.disabledAfter,T=e.monthsInView,a=e.onDateHover,e=V.state,j=e.startDate,I=e.endDate,M=e.hoverDate,N=e.year,P=e.month,A=e.date,R=e.currMonth,L=e.currYear,F=e.todayDate,e=V.getNavDateInfo(b),z=e.year,B=e.month,K=le(z,B-1),H=le(z,B),e=new Date(z,B).getDay()-ue(t),U=Math.abs(e),t=Math.ceil((H+U)/E),W=(6===t||1<T||(t+=1),V.getInRangeError()),q=V.props.events;return Array.from({length:t},function(e,v){return Se.createElement("div",{key:v,className:"Calendar-valueRow"},Array.from({length:E},function(e,t){function n(){var e=r<=0?L===z&&R===B-1&&F===K+r:H<r?L===z&&R===B+1&&F===r-H:L===z&&R===B&&F===r;return e}var r=E*v+t-U+1,o=r<=0||H<r,i=Y(k,"more",z,B,r)||Y(D,"less",z,B,r),a=!i&&N===z&&P===B&&A===r,s=!1,c=$(j),c=(c.year,c.month,c.date,$(I)),c=(c.year,c.month,c.date,I&&!1),u=j&&!1,l="".concat(r<=0?K+r:H<r?r-H:r),f="".concat(r<=0?0===B?B+C:(B-1)%C+1:H<r?(B+1)%C+1:B+1),p="".concat(r<=0&&B+1===1?z-1:H<r&&B+1===12?z+1:z),d="".concat(2===f.length?f:"0".concat(f),"/").concat(2===l.length?l:"0".concat(l),"/").concat(p),d=q&&"object"===Z(q)&&q.hasOwnProperty(d),h=(x&&(h=Y(j,"equal",z,B,r),y=Y(I,"equal",z,B,r),m=Y(M,"equal",z,B,r),a=!i&&(h||y),j&&I?s=!i&&(de(j,"less",l,f,p)&&de(I,"more",l,f,p)||h||y):j?s=!i&&(de(M,"more",l,f,p)||m)&&de(j,"less",l,f,p):I&&(s=!i&&(Y(M,"less",z,B,r)||m)&&Y(I,"more",z,B,r))),s&&W),y=j&&de(j,"equal",l,f,p),m=I&&de(I,"equal",l,f,p),g=j&&I&&(y||m),l=de(M,"equal",l,f,p)&&M&&j&&j<=M,f=0===t||6===t,p=s||x&&(a||g),s=ke({"Calendar-valueWrapper":!0,"Calendar-valueWrapper--inRange":!f&&p,"Calendar-valueWrapper--inEdgeRange":p&&f,"Calendar-valueWrapper--inRangeError":h,"Calendar-valueWrapper--start":c&&!u&&6!==t||x&&y&&6!==t,"Calendar-valueWrapper--end":u&&!c&&0!==t||x&&m&&0!==t,"Calendar-valueWrapper--startEnd":c&&u,"Calendar-valueWrapper--startError":c&&h||x&&h&&y,"Calendar-valueWrapper--endError":u&&h||x&&h&&m,"Calendar-valueWrapper--dummy":o,"Calendar-valueWrapper--hoverDate":x&&l,"Calendar-valueWrapper--inStartRange":p&&0===t&&!a&&!g,"Calendar-valueWrapper--inEndRange":p&&6===t&&!a&&!g}),y=ke((Ee(f={"Calendar-value":!0,"Calendar-inRangeValue":!(c||u||a||g),"Calendar-value--start":c&&!u,"Calendar-value--end":u&&!c,"Calendar-value--startError":c&&h,"Calendar-value--endError":u&&h,"Calendar-value--active":a||g,"Calendar-value--disabled":i,"Calendar-dateValue":!0},"Calendar-dateValue--".concat(O),O),Ee(f,"Calendar-value--currDateMonthYear",n()),Ee(f,"Calendar-value--currDate",n()&&!a&&!g),f)),m=ke({inverse:!(a||n()||i||g),white:a||g,"primary-lighter":n()&&i,primary:n(),"inverse-lightest":i});return Se.createElement("div",{key:"".concat(v,"-").concat(t),className:s,"data-test":"designSystem-Calendar-WrapperClass"},!o&&Se.createElement(Se.Fragment,null,Se.createElement(je,{color:m,size:"small"===O?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:y,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r),d&&V.renderEventsIndicator(O,a)),(o&&0<r&&b===T-1||o&&r<=0&&0===b)&&Se.createElement(Se.Fragment,null,Se.createElement(je,{appearance:a||g?"white":i?"disabled":n()?"link":"default",size:"small"===O?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:y,onClick:w(r),onMouseOver:S(r),onMouseEnter:_.bind(G(V),r,n(),i)},r<=0?K+r:r-H),d&&V.renderEventsIndicator(O,a)))}))})}),Ee(G(V),"renderCalendar",function(e){var t=V.props,n=t.size,t=t.monthsInView,r=V.state.view,o=ke((Ee(o={},"Calendar",!0),Ee(o,"Calendar-".concat(r,"--").concat(n),r),Ee(o,"Calendar--".concat(n),n),o)),n=ke(Ee({},"Calendar-header--".concat(n),n)),i=ke({"Calendar-body":!0});return Se.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:o},Se.createElement("div",{className:n},0===e&&V.renderJumpButton("prev"),V.renderHeaderContent(e),e===t-1&&V.renderJumpButton("next")),Se.createElement("div",{className:i},"year"===r&&V.renderBodyYear(),"month"===r&&V.renderBodyMonth(),"date"===r&&V.renderBodyDate(e)))});var V,t=V.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:$(n||Date.now()).year,e=void 0!==e.monthNav?e.monthNav:$(n||Date.now()).month,s=$(n),c=s.year,u=s.month,s=s.date,l=$(new Date(Date.now()));return V.state={currDate:n,startDate:r,endDate:o,yearNav:a,monthNav:e,year:c,month:u,date:s,todayDate:l.date,currMonth:l.month,currYear:l.year,view:1<i?"date":t,yearBlockNav:st(a)},V}return a(p,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s=this.props.monthsInView;e.date!==this.props.date&&(i=(n=$(this.props.date)).year,o=n.month,n=n.date,this.updateState(i,o,n),i=y(this.props.date),this.setState({currDate:i})),e.startDate!==this.props.startDate&&(o=y(this.props.startDate),this.setState({startDate:o})),e.endDate!==this.props.endDate&&(n=y(this.props.endDate),this.setState({endDate:n})),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:st(i)}),e.monthNav!==this.props.monthNav&&(o=this.props.monthNav)&&this.setState({monthNav:o}),t.currDate!==this.state.currDate&&(i=(n=this.props).rangePicker,e=n.onDateChange,n=(o=this.state).currDate,r=o.startDate,o=o.endDate,n)&&(e&&e(n),i?(this.setState({hoverDate:void 0}),r&&o?this.setState({startDate:n,endDate:void 0}):(i=(e=$(n)).year,a=e.month,e=e.date,r?Y(r,"more",i,a,e)?this.setState({startDate:n}):this.setState({endDate:n}):o&&Y(o,"less",i,a,e)?this.setState({endDate:n}):this.setState({startDate:n}))):this.setState({startDate:n})),(null==(r=t.startDate)?void 0:r.getTime())===(null==(o=this.state.startDate)?void 0:o.getTime())&&(null==(i=t.endDate)?void 0:i.getTime())===(null==(a=this.state.endDate)?void 0:a.getTime())||(e=this.props.onRangeChange,r=(n=this.state).startDate,o=n.endDate,e&&e(r,o)),t.year!==this.state.year&&void 0!==(i=this.state.year)&&1===s&&this.setState({year:i,yearBlockNav:st(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=ke((Ee(n={"Calendar-eventsIndicator":!0},"Calendar-eventsIndicator--".concat(e),!0),Ee(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=De(this.props),e=ke({"Calendar-wrapper":!0},e);return Se.createElement("div",Ce({},r,{className:e,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:t},function(e,t){return n.renderCalendar(t)}))}}]),p}(),ut=(Ee(ct,"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=W(e,ut),r=ke((Ee(n={Card:!0},"Card--".concat(r),r),Ee(n,"".concat(i),i),n));return Se.createElement("div",Ce({"data-test":"DesignSystem-Card",ref:t},e,{className:r}),o)}),lt=(n.displayName="Card",n.defaultProps={shadow:"shadow10"},["border","children","className"]),ft=(Se.forwardRef(function(e,t){var n=e.border,r=e.children,o=e.className,e=W(e,lt),n=ke(Ee({CardSubdued:!0},"CardSubdued--".concat(n),n),o);return Se.createElement("div",Ce({"data-test":"DesignSystem-CardSubdued",ref:t},e,{className:n}),r)}).displayName="CardSubdued",["onClick","onKeyDown","role","tabIndex"]),pt={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},dt=function(e,t){return!!pt[e]&&pt[e].has(t)},ht={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"},P=function(e){var t,n=e.appearance,r=e.className,o=e.name,i=e.size,a=e.children,s=he(e),c=De(e),e=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||o&&ht[o]||"rounded",u=n&&n.includes("_")?(t=(u=n).indexOf("_"),u.slice(0,t)+u.charAt(t+1).toUpperCase()+u.slice(t+2)):n,e=ke((Ee(t={},"material-symbols",!0),Ee(t,"material-symbols-rounded","rounded"===e),Ee(t,"material-symbols-outlined","outlined"===e),Ee(t,"Icon",!0),Ee(t,"Icon--".concat(u),n),Ee(t,"".concat(r),r),t)),n={fontSize:"".concat(i,"px"),width:"".concat(i,"px")};return a&&Se.isValidElement(a)?Se.createElement("span",Ce({},c,{className:r}),a):Se.createElement("i",Ce({"data-test":"DesignSystem-Icon"},c,{className:e,style:n},s),o)},yt=(P.displayName="Icon",P.defaultProps={size:16},["children","componentType","className"]),mt=["appearance","size","children","weight","small","className","color"],je=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.weight,a=e.small,s=e.className,c=e.color,e=W(e,mt),n=ke((Ee(t={Text:!0},"Text--".concat(n),!c&&n),Ee(t,"Text--".concat(i),i),Ee(t,"Text--".concat(r),r),Ee(t,"color-".concat(c),c),Ee(t,"Text--small","small"===r||a),t),s);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Text"},e,{className:n,componentType:"span"}),o)},gt=(je.displayName="Text",je.defaultProps={appearance:"default",size:"regular"},me.displayName="GenericChip",function(e){var t,n=e.label,r=e.icon,o=e.clearButton,i=e.type,a=e.disabled,s=e.selected,c=e.onClose,u=e.onClick,l=e.name,f=e.className,p=e.labelPrefix,d=e.iconType,e=De(e),o="action"!==i&&o,h=!("selection"!==i||!s),i=ke((Ee(t={Chip:!0},"Chip-".concat(i,"--disabled"),a),Ee(t,"Chip--".concat(i),i&&!a),Ee(t,"Chip-".concat(i,"--selected"),s&&!a),Ee(t,"Chip-selection--selectedDisabled","selection"===i&&s&&a),Ee(t,"Chip-icon--clear",o),t),f);return Se.createElement(me,Ce({"data-test":"DesignSystem-Chip--GenericChip"},e,{label:n,selected:h,icon:r,iconType:d,clearButton:o,disabled:a,className:i,onClose:function(){!a&&c&&c(l)},onClick:function(){!a&&u&&u(l)},name:l,labelPrefix:p}))}),vt=(gt.displayName="Chip",gt.defaultProps={type:"input"},["size","tabIndex","defaultChecked","indeterminate","label","error","disabled","onChange","name","value","className","checked","helpText","id"]),bt=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,c=e.disabled,u=e.onChange,l=e.name,f=e.value,p=e.className,d=e.checked,h=e.helpText,y=e.id,y=void 0===y?"".concat(l,"-").concat(a,"-").concat(ge()):y,m=W(e,vt),g=Se.useRef(null);Se.useImperativeHandle(t,function(){return g.current});var t=Oe(Se.useState(void 0===d?o:d),2),v=t[0],b=t[1],t=(Se.useEffect(function(){S(i)},[i]),Se.useEffect(function(){void 0!==d&&b(d)},[d]),ke((Ee(t={},"Checkbox",!0),Ee(t,"Checkbox--disabled",c),t),p)),p=ke((Ee(p={},"Checkbox-outerWrapper",!0),Ee(p,"Checkbox-outerWrapper--".concat(n),n),p)),e=ke((Ee(w={},"Checkbox-input",!0),Ee(w,"Checkbox-input--checked",v),Ee(w,"Checkbox-input--indeterminate",e.indeterminate),w)),s=ke((Ee(w={},"Checkbox-wrapper",!0),Ee(w,"Checkbox-wrapper--default",!s),Ee(w,"Checkbox-wrapper--error",s),w)),w=ke((Ee(w={},"Checkbox-label",!0),Ee(w,"Checkbox-label--tiny","tiny"===n),w)),S=function(e){g.current.indeterminate=e},_=ke((Ee(_={},"checked--regular",v&&"regular"===n),Ee(_,"checked--tiny",v&&"tiny"===n),Ee(_,"indeterminate--regular",i&&"regular"===n),Ee(_,"indeterminate--tiny",i&&"tiny"===n),_));return Se.createElement(Se.Fragment,null,Se.createElement("div",{"data-test":"DesignSystem-Checkbox",className:t},Se.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:p},Se.createElement("input",Ce({},m,{type:"checkbox",defaultChecked:o,onChange:function(e){void 0===d&&(b(e.target.checked),S(e.target.indeterminate)),u&&u(e)},checked:v,disabled:c,ref:g,name:l,value:f,className:e,tabIndex:r,id:y,"data-test":"DesignSystem-Checkbox-InputBox"})),Se.createElement("span",{className:s,"data-test":"DesignSystem-Checkbox-Icon"},_&&Se.createElement(ve,{name:_}))),Se.createElement("div",{className:"Checkbox-labelWrapper"},a&&a.trim()&&Se.createElement("label",{htmlFor:y,className:w,"data-test":"DesignSystem-Checkbox-Label"},Se.createElement(je,{size:"tiny"===n?"small":"regular",appearance:c?"disabled":"default"},a.trim())),h&&Se.createElement(je,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:c?"disabled":"subtle"},h.trim()))))}),wt=(bt.displayName="Checkbox",["size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","children"]),x=Se.forwardRef(function(e,t){var n,r=e.size,o=e.sizeXS,i=e.sizeS,a=e.sizeM,s=e.sizeL,c=e.sizeXL,u=e.className,l=e.children,e=W(e,wt),r=ke((Ee(n={},"Col",!0),Ee(n,"Col--".concat(r),r),Ee(n,"Col--xs-".concat(o),o),Ee(n,"Col--s-".concat(i),i),Ee(n,"Col--m-".concat(a),a),Ee(n,"Col--l-".concat(s),s),Ee(n,"Col--xl-".concat(c),c),Ee(n,"".concat(u),u),n));return Se.createElement("div",Ce({ref:t,"data-test":"DesignSystem-Column"},e,{className:r}),l)}),St=(x.displayName="Column",["date","open","position","inputFormat","outputFormat","inputOptions","validators","withInput","disabledBefore","disabledAfter","onDateChange","closeOnSelect","size","showTodayDate","children","view"]),n=function(){e(o,Se["Component"]);var r=h(o);function o(e){d(this,o),Ee(G(s=r.call(this,e)),"getError",function(e){var t=s.props,n=t.disabledBefore,t=t.disabledAfter,n=$(n),r=n.year,o=n.month,n=n.date,t=$(t),i=t.year,a=t.month,t=t.date;return!!e&&(Y(e,"less",r,o,n)||Y(e,"more",i,a,t))}),Ee(G(s),"onDateChangeHandler",function(e){s.setState({init:!0,date:e}),s.props.closeOnSelect&&s.setState({open:!1})}),Ee(G(s),"onToggleHandler",function(e,t){var n=s.props.inputOptions.disabled;if(!n)switch(t){case"outsideClick":s.setState({open:e});break;case"onClick":s.setState({open:!0})}});var s,t=e.inputFormat,n=e.validators,t=y(e.date,t,n),n=s.getError(t);return s.state={date:t,error:n,init:!1,open:e.open||!1},s}return a(o,[{key:"componentDidUpdate",value:function(e,t){var n,r;e.date!==this.props.date&&(n=(r=this.props).inputFormat,r=r.validators,n=y(this.props.date,n,r),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,O(e,t)))}},{key:"renderCalendar",value:function(){var e=this,t=this.props,n=(t.date,t.open,t.position,t.inputFormat),r=(t.outputFormat,t.inputOptions,t.validators),o=(t.withInput,t.disabledBefore),i=t.disabledAfter,a=(t.onDateChange,t.closeOnSelect,t.size),s=t.showTodayDate,s=void 0===s||s,c=t.children,c=void 0===c?Se.createElement(Se.Fragment,null):c,u=t.view,t=W(t,St),l=this.state.date,f=ot,p=new Date(Date.now()),f="".concat(f[p.getMonth()]," ").concat(p.getDate()),p=y(l,n,r),l=y(o,n,r),o=y(i,n,r),i=ke({"d-flex justify-content-center":!0,"pb-5":"small"===a,"pb-6":"large"===a,"pt-3":"large"===a&&"year"===u});return Se.createElement("div",null,Se.createElement("div",{className:"d-flex"},c,Se.createElement(ct,Ce({},t,{size:a,date:p,view:u,disabledBefore:l,disabledAfter:o,onDateChange:this.onDateChangeHandler}))),s&&Se.createElement("div",{className:i,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},Se.createElement(gt,{label:"Today, ".concat(f),name:"chip",type:"action",disabled:(n=!0,p&&l&&o?n=l<p&&p<o:p&&l?n=l<p:p&&o&&(n=p<o),!n),onClick:function(){return e.onDateChangeHandler(new Date)}})))}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.withInput,r=e.inputFormat,o=e.inputOptions,e=e.validators,i=this.state.open;return n?Se.createElement(wa,{trigger:Se.createElement(be,{inputFormat:r,inputOptions:o,validators:e,state:this.state,setState:this.setState.bind(this)}),triggerClass:"w-100",position:t,appendToBody:!0,open:i,onToggle:this.onToggleHandler},this.renderCalendar()):this.renderCalendar()}}]),o}(),_t=(Ee(n,"defaultProps",_e(_e({},ct.defaultProps),{},{position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[N],inputOptions:{},closeOnSelect:!0})),function(e){return e.includes("a")||e.includes("A")}),Et=function(e){return e.includes("p")||e.includes("P")},Ct=function(e){return("0"+e).slice(-2)},Ot=function(e){var t,n,r;return _t(r=e)||Et(r)?(r=Oe((r=e).split(" "),2),t=r[0],r=r[1],t=t.split(":"),n=t[0],t=t[1],"12"===n&&_t(r)&&(n="00"),Et(r)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),"".concat(n,":").concat(t)):e},xt=function(e,t){e=we(e);return we(t)<e},kt=function(e,t,n){var r,o,i,a;return""===t||xt(e,t)?(r=e,o=t,i=Ne("00:00","23:59",i=n),r=i.indexOf(r),a=i.indexOf(o),o=""===o?r:a+1,a=i.slice(r),r=i.slice(0,o),a.concat(r)):Ne(e,t,n)},Dt=function(e,s){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"TimePicker-Option-key",u=3<arguments.length?arguments[3]:void 0,l=4<arguments.length?arguments[4]:void 0,f=5<arguments.length?arguments[5]:void 0;return e.map(function(e,t){return{label:(o=u,i=l,a=n=e,Ie(r=s)&&(a=Me(n)),o&&i&&(o=(r=Pe(i,n)).hour,i=r.minute,a+=" (".concat(o," hr ").concat(i," min)")),a),value:e,disabled:f&&(n=f,o=r=e,Ie(s)&&(o=Me(r)),!!n.includes(o)),selected:!1,optionID:c+t};var n,r,o,i,a})},Tt=function(e){return e?"":"23:59"},jt=function(){var e=new Date;return Ct(e.getHours())+":"+Ct(e.getMinutes())},It=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,Mt=function(e,t){for(var n=0,r={hour:100,mins:100},o=0;o<e.length;o++){var i=Pe(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},Nt=function(e){return e.map(function(e){return e.value})},Pt=function(e,t){var n;return function(e){e=(null==(e=(e=e).match(/\d/g))?void 0:e.length)||0;return 0<e&&e<5}(t)?(t=Ke(e=e,t=t),n=t.hour,"60"===(t=t.min)&&(t="00",n=(parseInt(n,10)+1).toString()),n="".concat(n,":").concat(t),Mt(e,n)):-1},At=function(e){return e.sort(function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})},Rt=function(e,t){e.scrollTo(0,t)};Je.defaultProps={timeFormat:"12-Hour",interval:15},Je.displayName="TimePickerWithSearch",Xe.defaultProps={inputFormat:"hh:mm AM",outputFormat:"hh:mm AM",inputOptions:{},validators:[A]},Xe.displayName="TimePickerWithInput";function Lt(a,s,c,u){var l,f=!1,p=0;function d(){l&&clearTimeout(l)}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()-p;function i(){p=Date.now(),c.apply(r,t)}f||(u&&!l&&i(),d(),void 0===u&&a<o?i():!0!==s&&(l=setTimeout(u?function(){l=void 0}:i,void 0===u?a-o:a)))}return"boolean"!=typeof s&&(u=c,c=s,s=void 0),e.cancel=function(){d(),f=!0},e}function Ft(e,t,n){return void 0===n?Lt(e,t,!1):Lt(e,n,!1!==t)}_e(_e({},Xe.defaultProps),Je.defaultProps);function zt(e){function t(){d||i&&i(c)}var n=e.optionData,r=e.selected,o=e.onClick,i=e.updateActiveOption,a=e.onChange,s=e.active,c=e.index,u=e.checkboxes,l=e.menu,f=void 0===(f=e.id)?"":f,p=(n.optionType?n:e).optionType,d=n.disabled,h=d?"inverse-lightest":r&&!l?"primary-dark":"inverse",y=d?"disabled":r&&!l?"primary_dark":"default",m=Xt[p=u?"WITH_CHECKBOX":void 0===p?"DEFAULT":p],g=ke((Ee(g={},"Option",!0),Ee(g,"Option--active",s),Ee(g,"Option--selected",r&&!l),Ee(g,"Option--disabled",d),Ee(g,"OptionWrapper",!0),Ee(g,"color-".concat(h),!0),g)),v=ke((Ee(v={},"Option-checkbox",!0),Ee(v,"Option-checkbox--active",s),Ee(v,"OptionWrapper",!0),v)),b=ke((Ee(b={},"Option-text",!0),Ee(b,"Option-text--wrap",!e.truncateOption),b)),w=ke((Ee(w={},"OptionWrapper",!0),Ee(w,"OptionWrapper--disabled",d),w));return e.optionRenderer?Se.createElement("div",Ce({"data-test":"DesignSystem-DropdownOption--Custom",className:w,"data-disabled":d,onMouseEnter:t},!u&&{onClick:o}),e.optionRenderer({optionData:n,selected:r,onChange:a,active:s,index:c})):m({selected:r,index:c,renderSubInfo:function(e){var t,n=r?"white":"disabled";return"string"==typeof e?Se.createElement(je,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:d?"inverse-lightest":r&&!l?"primary-dark":"inverse-lighter",size:"small",weight:"medium",className:"Option-subInfo"},e):(t=e.list,e=e.seperator,Se.createElement(Sn,{list:void 0===t?[]:t,seperator:e,iconAppearance:n,labelAppearance:d?"disabled":r&&!l?"white":"subtle",seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"}))},optionData:n,textClassName:b,appearance:y,color:h,onClickHandler:function(e){e.stopPropagation(),d||o&&o()},onChangeHandler:function(e){e.stopPropagation(),d||a&&a(e)},onUpdateActiveOption:t,dataTest:"DesignSystem-DropdownOption--".concat(p),className:u?v:g,id:f})}function Bt(e){var t,n=void 0===(n=e.size)?"small":n,r=e.round,o=e.className,e=De(e),r=ke((Ee(t={PlaceholderImage:!0,"Placeholder--animation":!0},"PlaceholderImage--round",r),Ee(t,"PlaceholderImage--".concat(n),n),t),o);return Se.createElement("span",Ce({},e,{className:r}))}function Kt(e){var t=e.loadingType,n=["medium","large"][(e.optionIndex+2)%2];switch(t){case"DEFAULT":return Se.createElement(I,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return Se.createElement(M,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large"}));case"WITH_META":return Se.createElement(M,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return Se.createElement(M,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large"}));case"ICON_WITH_META":return Se.createElement(M,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},Se.createElement(I,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),Se.createElement(I,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null}function Ht(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","data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement(je,{className:"mb-3",weight:"strong"},Qt[n]),Se.createElement(je,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},en[n]),"FAILED_TO_FETCH"===n&&Se.createElement(Te,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:function(){return r()}},"Reload")))}function Ut(i){function R(){var e=document.querySelector(".Dropdown-wrapper");(e=null==e?void 0:e.offsetHeight)&&fe(e)}function L(){return Se.createElement(Ht,{dropdownStyle:_e(_e({},ge),{},{minHeight:p}),updateOptions:ne,errorType:oe})}function o(e,t){Q(e,t),he||null!=(e=O.current)&&e.focus(),T(g)}function F(){var e;X(),null!=(e=O.current)&&e.focus()}function z(){var e;J(),null!=(e=O.current)&&e.focus()}function B(){T(g),E&&w&&E("")}function K(e){T(g),E&&E(e.target.value)}function a(e,t){var n=i.onClearOptions,r=h.every(function(e){return e.disabled});return Se.createElement("div",{className:ve(t)},Se.createElement(je,{size:"small",appearance:"subtle"},e),t&&Se.createElement(Te,{onClick:n,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"))}function H(t,e){var n=Ye(w,m,f,_)?e+1===D:e===D,r=-1!==y.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},Se.createElement(zt,{optionData:t,truncateOption:V,selected:r,index:e,updateActiveOption:we,optionRenderer:Z,active:n,checkboxes:_,menu:b,onClick:function(){return be(t)},onChange:function(e){return i.onSelect(t,e.target.checked)},optionType:i.optionType,id:o}))}function U(e,t){for(var n,r,o,i,a,s=document.querySelectorAll(t),c="down"===e?D+1:D-1,u="down"===e?s.length:-1;c!==u;){if("true"!==s[c].getAttribute("data-disabled")){var l=s[c];l&&(n=se.current,r=l,a=i=o=void 0,o=null==n?void 0:n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=r.offsetHeight,i.bottom>o.bottom&&n?Rt(n,r.offsetTop-o.height+a):i.top<o.top&&n&&Rt(n,r.offsetTop-a)),void 0!==l&&T(c);break}"down"===e?c++:c--}}var W,e,s,c,u=void 0===(t=i.listOptions)?[]:t,q=i.inputRef,t=void 0===(t=i.align)?"right":t,n=void 0===(n=i.optionType)?"DEFAULT":n,r=void 0===(r=i.applyButtonLabel)?"Apply":r,l=void 0===(l=i.cancelButtonLabel)?"Cancel":l,V=void 0===(d=i.truncateOption)||d,f=void 0===(d=i.withSelectAll)||d,p=void 0===(d=i.maxHeight)?200:d,d=i.customTrigger,h=i.selected,y=i.tempSelected,G=i.previousSelected,m=i.remainingOptions,g=i.firstEnabledOption,v=i.dropdownOpen,b=i.menu,w=i.searchTerm,S=i.showApplyButton,_=i.withCheckbox,Y=i.withSearch,$=i.popoverOptions,E=i.onSearchChange,Z=i.optionRenderer,J=i.applyOptions,X=i.cancelOptions,Q=i.toggleDropdown,C=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=De(i),se=Se.createRef(),ce=Se.createRef(),O=Se.createRef(),x=Se.createRef(),k=Se.createRef(),ue=(I=Oe(Se.useState(),2))[0],le=I[1],D=(I=Oe(Se.useState(g),2))[0],T=I[1],j=(I=Oe(Se.useState(),2))[0],fe=I[1],I=0===u.length&&!ie&&h.length<=0;Se.useEffect(function(){var e,t,n,r,o;return v&&(o=i.width,t=i.minWidth,n=i.maxWidth,r=null==(r=ce.current)?void 0:r.clientWidth,o={width:o||r,minWidth:t||(S?176:b?128:r),maxWidth:n||"100%"},requestAnimationFrame(R),le(o),te)&&0===y.length&&(e=setTimeout(function(){Ze(te,u)},100)),function(){clearTimeout(e)}},[v]),Se.useEffect(function(){g!==D&&T(g)},[g]);var M=void 0===(M=i.triggerSize)?"regular":M,N=void 0===(N=i.placeholder)?"Select":N,pe=i.icon,de=i.error,he=i.disabled,P=i.inlineLabel,A=i.triggerLabel,ye=i.iconType,me=d?d(A||N):Se.createElement(Se.Fragment,null),d=d?Se.cloneElement(me,{tabIndex:0,ref:O}):Se.createElement(Jt,{placeholder:N,triggerSize:M,open:v,icon:pe,disabled:he,inlineLabel:P,menu:b,error:de,ref:O,iconType:ye},A),ge={maxHeight:p,overflowY:"auto",overflowX:"hidden",minHeight:j},me={maxHeight:j||p,overflowY:"auto",overflowX:"hidden",minHeight:j},ve=function(e){var t;return ke((Ee(t={},"Dropdown-section",!0),Ee(t,"Dropdown-section--withClear",e),t))},N=ke(Ee({},"Dropdown",!0),C),pe=ke((Ee(M={},"Dropdown-wrapper",!0),Ee(M,"Dropdown-wrapper--wrap",!V),M)),de=ke((Ee(P={},"Option-checkbox--active",0===D),Ee(P,"Option-checkboxWrapper",!0),Ee(P,"Option-checkbox",!0),Ee(P,"OptionWrapper",!0),P)),be=function(e){i.onOptionSelect(e),null!=(e=O.current)&&e.focus()},we=function(e,t){t=_&&f&&!i.async&&!t?e+1:e;T(t)},ye=(Y||i.async)&&(!I||"NO_RECORDS_FOUND"===oe);return Se.createElement("div",Ce({},ae,{className:N,ref:ce,onKeyDown:function(e){var t,n=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),v?U("down",n):o(!v);break;case"ArrowUp":e.preventDefault(),v?U("up",n):o(!v);break;case"Enter":var r=document.activeElement;v&&(q.current===r||O.current===r)&&(e.preventDefault(),r=_?"".concat(n," .Checkbox-input"):n,r=document.querySelectorAll(r)[D])&&r.click(),v||o(!v);break;case"Tab":!S&&v?(e.preventDefault(),o(!1,"onClick")):(r=document.activeElement,t=null==(t=k.current)?void 0:t.disabled,(r===x.current&&t||r===k.current)&&v?(e.preventDefault(),o(!1,"onClick")):S&&v&&(e.preventDefault(),r===x.current?null!=(t=k.current)&&t.focus():null!=(r=x.current)&&r.focus()))}}}),Se.createElement(wa,Ce({onToggle:o,trigger:d,triggerClass:b?"":"w-100",open:v,customStyle:ue,position:tn[t]},$,{"data-test":"DesignSystem-Dropdown--Popover"}),ye&&Se.createElement("div",{className:"Dropdown-inputWrapper"},Se.createElement(pn,{name:"Dropdown-search",icon:"search",value:w,placeholder:ee,autoFocus:!0,onChange:K,onClear:B,ref:q,autoComplete:"off",className:"Dropdown-input"})),(A=i.selectedSectionLabel,s=void 0===A?"Selected Items":A,A=void 0===(A=i.allItemsSectionLabel)?"All Items":A,j=void 0===(j=i.loadersCount)?10:j,C=void 0===(C=i.errorTemplate)?L:C,M=Ye(w,m,f,_),c=function(e){e=e.reduce(function(e,t){var n=t.group||"";return e[n]||(e[n]=[]),e[n].push(t),e},{});return Object.values(e).flatMap(xe)}(u),j&&ie?Se.createElement("div",{className:"Dropdown-loading"},Se.createElement("div",{className:"Dropdown-wrapper",style:me},(e=j,e=Array(j).fill("Loading"),W=_?"WITH_CHECKBOX":n,e.map(function(e,t){return Se.createElement("div",{className:"Option-loading",key:"".concat(e,"-").concat(t)},Se.createElement(Kt,{loadingType:W,optionIndex:t}))})))):I?re?Se.createElement("div",{className:"Dropdown-wrapper",style:ge,"data-test":"DesignSystem-Dropdown--errorWrapper"},Se.createElement("div",{className:"Option"},Se.createElement("div",{className:"Option-subinfo"},re))):C&&C({errorType:oe}):Se.createElement("div",{className:pe,style:ge,ref:se},M&&(j=void 0===(j=i.selectAllLabel)?"Select All":j,e=i.selectAll,C=i.onSelectAll,j=j.trim()?j.trim():"Select All",M="Checkbox-option-".concat(j.toLowerCase().replace(/\s+/g,""),"-").concat((new Date).getTime()),Se.createElement("div",{className:de,onMouseEnter:function(){return we(0,!0)}},Se.createElement("label",{htmlFor:M,className:"Checkbox-label"},Se.createElement(bt,{label:j,onChange:C,checked:e.checked,indeterminate:e.indeterminate,tabIndex:-1,className:"OptionCheckbox",id:M})))),0<h.length&&a(s,!0),h.map(H),0<h.length&&0<u.length-h.length&&!(null!=(j=u[0].group)&&j.trim())&&a(A),c.map(function(e,t){var n=0<t?c[t-1].group:h.length?s:void 0,r=e.group,o=t+h.length;return Se.createElement("div",{className:"Option-checkboxWrapper",key:t},n!==r&&r&&a(r),H(e,o))}),i.async&&0<m&&(C=i.footerLabel,Se.createElement("div",{className:"Dropdown-footer"},Se.createElement(je,{size:"small",appearance:"subtle"},void 0===C?"Search for more options":C))))),S&&_&&(P=We(G,y)||i.loadingOptions,Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{ref:x,className:"mr-4",appearance:"basic",onClick:F,disabled:i.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},l),Se.createElement(Te,{ref:k,appearance:"primary",disabled:P,size:"tiny",onClick:z,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r)))))}function Wt(e){var t,n=e.className,r=e.iconType,e=W(e,un),n=ke((Ee(t={},"ActionButton",!0),Ee(t,"".concat(n),n),t));return Se.createElement(P,Ce({className:n,type:r,"data-test":"DesignSystem-Input-ActionButton"},e))}function qt(e,t){for(var n="",r=0;r<e.length;r++)n+="object"===Z(e[r])?t:e[r];return n}function Vt(e){var t=e.required,n=e.optional,r=e.withInput,o=e.disabled,i=e.children,a=e.className,s=e.info,c=W(e,vn),e=De(e),r=ke((Ee(u={Label:!0},"Label--withInput",r),Ee(u,"Label--optional",n),u),a),u=ke({"Label-text":!0,"Label--disabled":o});return Se.createElement("div",Ce({"data-test":"DesignSystem-Label"},e,{className:r}),Se.createElement(ye,Ce({"data-test":"DesignSystem-Label--Text",className:u,componentType:"label"},c),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(je,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:"Label-optionalText"},"(optional)"):null}(t,n),s&&Se.createElement(Ea,{tooltip:s},Se.createElement(P,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"}))))}function Gt(e){var t=e.label,n=e.icon,r=e.size,e=e.iconType;return Se.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:"Meta"},n&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--MetaIcon",name:n,appearance:"subtle",className:"Meta-icon",type:e,size:"regular"===r?16:12}),Se.createElement(je,{size:r,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))}function Yt(e){return"".concat((100*e).toFixed(2),"%")}function $t(e,t,n){return null==e?e:Math.min(Math.max(e,t),n)}var Zt=["triggerSize","placeholder","menu","children","icon","disabled","open","inlineLabel","error","iconType"],Jt=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,c=e.disabled,u=e.open,l=e.inlineLabel,f=e.error,p=e.iconType,e=W(e,Zt),d=c?"disabled":"default",o=o.trim(),o=a||o,h=i?s||"more_horiz":"keyboard_arrow_down",r=ke((Ee(n={},"Button",!0),Ee(n,"DropdownButton",!0),Ee(n,"DropdownButton--".concat(r),r),Ee(n,"DropdownButton--".concat(r,"Square"),i),Ee(n,"DropdownButton--placeholder",!a&&!i),Ee(n,"DropdownButton--icon",s),Ee(n,"DropdownButton--open",u),Ee(n,"DropdownButton--error",f),n)),f=ke((Ee(u={},"Text",!0),Ee(u,"Text--regular",!0),Ee(u,"DropdownButton-text",!0),u));return Se.createElement("button",Ce({ref:t,type:"button",value:a,className:r,disabled:c,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},e),!i&&Se.createElement("div",{className:"DropdownButton-wrapper"},l&&Se.createElement(je,{appearance:"subtle",className:"mr-4 white-space-nowrap"},"".concat(l.trim().charAt(0).toUpperCase()).concat(l.trim().slice(1))),s&&!l&&Se.createElement(P,{appearance:d,className:"d-flex align-items-center mr-4",name:s,type:p}),o&&Se.createElement("span",{className:f},o)),Se.createElement(P,{appearance:d,name:h,type:p}))}),Xt=(Jt.displayName="DropdownButton",Ee(n={},"DEFAULT",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.color,a=e.onUpdateActiveOption,e=e.dataTest,s=o.label,c=o.disabled;return Se.createElement("div",{className:t,onClick:r,onMouseEnter:a,"data-test":e,"data-disabled":c},Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:n,color:i,id:o.optionID},s)))}),Ee(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,c=i.label,u=i.icon,l=i.disabled,i=i.iconType,n=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",u),t));return Se.createElement("div",{className:n,onClick:o,onMouseEnter:a,"data-test":e,"data-disabled":l},u&&Se.createElement(P,{className:"Option-icon mr-4","data-test":"".concat(e,"--Icon"),name:u,type:i}),Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:r,color:s},c)))}),Ee(n,"WITH_META",function(e){var t=e.className,n=e.textClassName,r=e.onClickHandler,o=e.optionData,i=e.onUpdateActiveOption,a=e.renderSubInfo,s=e.color,e=e.dataTest,c=o.subInfo,u=o.label,o=o.disabled;return Se.createElement("div",{className:t,onClick:r,onMouseEnter:i,"data-test":e,"data-disabled":o},Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:n,color:s},u),c&&a(c)))}),Ee(n,"WITH_CHECKBOX",function(e){var t=e.className,n=e.selected,r=e.optionData,o=e.onChangeHandler,i=e.onUpdateActiveOption,a=e.dataTest,e=e.id,e=void 0===e?"":e,s=r.subInfo,c=r.label,r=r.disabled;return Se.createElement("div",{className:t,onMouseEnter:i,"data-test":a,"data-disabled":r},Se.createElement(bt,{label:c,disabled:r,checked:n,onChange:o,tabIndex:-1,className:"OptionCheckbox ".concat(s?"pb-0":""),"data-test":"".concat(a,"--Checkbox"),id:e}),s&&Se.createElement("div",{className:"pl-8 ml-3"},(t=r?"disabled":"subtle",i=n?"white":"disabled","string"==typeof(c=s)?Se.createElement(je,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},c):(o=c.list,c=c.seperator,Se.createElement(Sn,{list:void 0===o?[]:o,seperator:c,iconAppearance:i,labelAppearance:t,seperatorAppearance:i,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})))))}),Ee(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,c=e.appearance,u=e.color,e=e.dataTest,l=a.subInfo,f=a.label,p=a.icon,a=a.disabled,n=ke((Ee(t={},"".concat(n),!0),Ee(t,"Option--icon",p),t));return Se.createElement("div",{className:n,onClick:i,onMouseEnter:s,"data-test":e,"data-disabled":a},p&&Se.createElement(P,{"data-test":"".concat(e,"--Icon"),className:"Option-icon mr-4",name:p,appearance:c}),Se.createElement("div",{className:"Option-label"},Se.createElement(je,{className:r,color:u},f),l&&o(l)))}),n),I=function(e){var t,n=e.length,r=e.size,o=e.className,e=De(e),i=ke(Ee({"Placeholder--animation":!0,PlaceholderParagraph:!0},"PlaceholderParagraph--".concat(r),r)),n=ke((Ee(t={"PlaceholderParagraph-wrapper":!0},"PlaceholderParagraph-wrapper--length-".concat(n),n),Ee(t,"PlaceholderParagraph-wrapper--size-".concat(r),r),t),o);return Se.createElement("div",Ce({},e,{className:n}),Se.createElement("span",{className:i}))},M=(I.displayName="PlaceholderParagraph",I.defaultProps={length:"medium"},Bt.displayName="PlaceholderImage",Bt.defaultProps={size:"small"},function(e){var t=e.imageSize,n=e.withImage,r=e.round,o=e.children,i=e.className,e=De(e),a=ke(Ee({"Placeholder-paragraph":!0},"Placeholder-paragraph--withImage",n)),i=ke(Ee({},"Placeholder",!0),i);return Se.createElement("div",Ce({"data-test":"DesignSystem-Placeholder"},e,{className:i}),n&&Se.createElement(Bt,{round:r,size:t,"data-test":"DesignSystem-Placeholder--Image"}),o&&Se.createElement("div",{className:a,"data-test":"DesignSystem-Placeholder--Paragraph"},o))}),Qt=(M.displayName="Placeholder",M.defaultProps={withImage:!0,imageSize:"small"},{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"}),en={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."},tn={right:"bottom-start",left:"bottom-end"},nn=(Ut.displayName="DropdownList",["triggerOptions","selected","tabIndex"]),rn=Se.createRef(),on=function(){e(l,Se["Component"]);var u=h(l);function l(e){d(this,l),Ee(G(v=u.call(this,e)),"staticLimit",void 0),Ee(G(v),"getDisabledOptions",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return e.disabled})}),Ee(G(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})})}),Ee(G(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 qe(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}),Ee(G(v),"getSelectedOptions",function(e,t){var n=v.props.selected;return e.length?t?qe(v.props.selected)?void 0===n?[]:n:e.filter(function(e){return e.selected}):v.state.tempSelected:[]}),Ee(G(v),"updateOptions",function(c,e){var t=v.state,u=t.searchTerm,l=t.selectAll,f=t.tempSelected,p=t.previousSelected,d=t.errorType,h=void 0===e?v.state.async:e,t=v.props,y=t.fetchOptions,m=t.withCheckbox,g=t.withSearch;(y||v.fetchOptionsFunction)(u).then(function(e){var t,n,r,o,i,a=e.options,s=e.count;e.scrollToIndex&&setTimeout(function(){Ze(e.scrollToIndex,a)},0),(!e.searchTerm||e.searchTerm&&e.searchTerm===v.state.searchTerm)&&(h=""===u?s>v.staticLimit:h,t=Ge(h,u,m)?v.getUnSelectedOptions(a,c):a,n=""===u?v.getSelectedOptions(a,c):[],r=""===u?s:v.state.optionsLength,o=v.getDisabledOptions(t.slice(0,v.staticLimit)),i=d,i=0===r&&""===u?"DEFAULT":""!==u?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",v.setState(_e(_e({},v.state),{},{errorType:y?i:d,scrollIndex:e.scrollToIndex||0,optionsLength:r,loading:!1,async:h,searchedOptionsLength:s,options:t.slice(0,v.staticLimit),tempSelected:c?n:f,previousSelected:c?n:p,selected:Ge(h,u,m)?n:[],triggerLabel:v.updateTriggerLabel(c?n:f),selectAll:!h&&c?$e(n,r,o.length):l})),h||g)&&null!=(i=rn.current)&&i.focus()}).catch(function(){v.setState({errorType:y?"FAILED_TO_FETCH":d,loading:!1})})}),Ee(G(v),"updateSearchTerm",function(e){v.setState(_e(_e({},v.state),{},{loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"}))}),Ee(G(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,c=a.tempSelected,u=a.optionsLength,l=a.async,f=a.loading,p=a.searchTerm,a=a.options,d=(Ve(v.props.open)?v.props:v.state).open,a=v.getDisabledOptions(a).length;n&&r&&(e=qe(v.props.selected)?t:s,v.setState({tempSelected:e,selectAll:$e(e,u,a),triggerLabel:v.updateTriggerLabel(e)})),Ve(v.props.open)&&v.setState({open:d}),d&&(u=Ge(l,p,n)&&!We(v.state.selected,c),v.setState({loading:u||f||""!==p,searchInit:""!==p,searchTerm:""}),u)&&v.updateOptions(!1),o&&!d&&(a=(n&&r?qe(v.props.selected)?t:s:v.state.tempSelected).map(function(e){return e.value}),v.debounceOnClose(a,i))}),Ee(G(v),"debounceOnClose",Ft(300,function(e,t){var n=v.props.onClose;n&&n(e,t)})),Ee(G(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)}),Ee(G(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,c=v.props,u=c.onChange,l=c.withCheckbox,f=c.showApplyButton,p=c.closeOnSelect,d=c.name,c=c.onPopperToggle,h=l&&f&&n,y=v.getDisabledOptions(v.state.options),m=0===e.length&&0<a.length||e.every(function(e){return e.disabled})&&!a.every(function(e){return e.disabled});v.setState(_e(_e({},v.state),{},{tempSelected:e,triggerLabel:v.updateTriggerLabel(e),selectAll:$e(e,o,y.length),open:Ve(v.props.open)||l?r:!p,previousSelected:h?e:i,selected:m?e:a,loading:!!m||s})),m&&v.debounceClear(),!u||f&&!n||(o=e.map(function(e){return e.value}),u(t?o[0]:o,d)),!l&&p&&c&&Ve(v.props.open)&&c(!1,"optionClick")}),Ee(G(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(_e(_e({},v.state),{},{open:Ve(o)||!n})),!r&&n&&t&&Ve(o)&&t(!1,"optionClick"),1))}),Ee(G(v),"onOptionSelect",function(e){var t=v.props,n=t.onUpdate,r=t.selected,t=t.menu;qe(r)?n&&(v.isValidOption(e)||t)&&n("select-option",e):(v.isValidOption(e)||t)&&v.updateSelectedOptions([e],!0)}),Ee(G(v),"onSelect",function(t,e){var n=v.props,r=n.onUpdate,o=n.selected,n=n.showApplyButton;qe(o)&&!n?r&&r(e?"select-option":"deselect-option",t):(o=v.state.tempSelected.slice(),e||(n=o.findIndex(function(e){return e.value===t.value}),o.splice(n,1)),o=e?o.concat(t):o,v.updateSelectedOptions(o,!1))}),Ee(G(v),"onSelectAll",function(e){var t=v.props,n=t.onUpdate,r=t.selected,t=t.showApplyButton,o=v.state,i=o.tempSelected,o=o.options;qe(r)&&!t?n&&n(e.target.checked?"select-all":"deselect-all"):(r=i.slice().filter(function(e){return e.disabled}),t=e.target.checked?[].concat(xe(o.filter(function(e){return!e.disabled})),xe(r)):r,v.updateSelectedOptions(t,!1))}),Ee(G(v),"debounceSearch",Ft(v.props.searchDebounceDuration,function(){v.setState({searchInit:!1},function(){v.updateOptions(!1)})})),Ee(G(v),"reload",function(){v.setState({loading:!0},function(){v.updateOptions(!1)})}),Ee(G(v),"debounceClear",Ft(250,function(){return v.updateOptions(!1)})),Ee(G(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});qe(t)&&!o?r&&r("clear-all"):(v.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),v.debounceClear(),e&&!o&&e(i,n))}),Ee(G(v),"onTogglePopper",function(e){var t=v.props.onPopperToggle;t&&Ve(v.props.open)&&t(!1,e)}),Ee(G(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=!!Ve(v.props.open)&&v.state.open,c=t.map(function(e){return e.value});qe(o)?i&&i("cancel-selected",t,n):(o=v.updateTriggerLabel(t),i=v.getDisabledOptions(v.state.options),v.setState(_e(_e({},v.state),{},{tempSelected:t,selectAll:$e(t,e,i.length),triggerLabel:o,open:s})),a&&!s&&a(c,r)),v.onTogglePopper("cancelClick")}),Ee(G(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=!!Ve(v.props.open)&&v.state.open,c=t.map(function(e){return e.value});qe(o)?i&&i("apply-selected",e,t):(v.setState(_e(_e({},v.state),{},{previousSelected:t,optionsApplied:!0,open:s})),r&&r(c,n),a&&!s&&a(c,n)),v.onTogglePopper("applyClick")}),Ee(G(v),"onToggleDropdown",function(e,t){var n;v.props.disabled||((n=v.props.onPopperToggle)&&Ve(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),c=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:Ge(n,"",r)?t:[],triggerLabel:v.updateTriggerLabel(s,e),selectAll:$e(s,e,c.length),errorType:"DEFAULT"},v}return a(l,[{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=(n=this.props).loading,i=n.fetchOptions,a=n.options,n=n.withSearch,r=this.getDisabledOptions(a=void 0===a?[]:a).length,e.loading===o)||i||(a.length>this.staticLimit?this.updateOptions(!0,!0):(i=this.getSelectedOptions(a,!0),this.setState(_e(_e({},this.state),{},{options:a,loading:o,tempSelected:i,previousSelected:i,optionsLength:a.length,searchedOptionsLength:a.length,triggerLabel:this.updateTriggerLabel(i),selectAll:$e(i,this.state.optionsLength,r)})),n&&null!=(o=rn.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||Ve(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,c=e.tempSelected,u=e.selectAll,l=e.triggerLabel,f=e.previousSelected,p=e.scrollIndex,e=e.errorType,d=this.props,h=d.withSelectAll,h=void 0===h||h,d=d.withCheckbox,y=this.props,m=y.triggerOptions,m=void 0===m?{}:m,g=(y.selected,y.tabIndex),y=W(y,nn),s=s-t.length,g=g||(Ye(o,s,h,d)?0:t.findIndex(function(e){return!e.disabled}));return Se.createElement(Ut,Ce({listOptions:t,inputRef:rn,remainingOptions:s,firstEnabledOption:g,loadingOptions:a,async:n,searchInit:i,dropdownOpen:r,searchTerm:o,triggerLabel:l,tempSelected:c,previousSelected:f,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:u,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:m.customTrigger,scrollIndex:p,updateOptions:this.reload,errorType:e},y))}}]),l}(),an=(Ee(on,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300}),["appearance","size","children","className","color"]),sn={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},cn=function(e){var t,n=e.appearance,r=e.size,o=e.children,i=e.className,a=e.color,e=W(e,an),n=ke((Ee(t={Heading:!0},"Heading--".concat(r),r),Ee(t,"Heading--".concat(n),!a&&n),Ee(t,"color-".concat(a),a),t),i);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Heading"},e,{className:n,componentType:sn[r]}),o)},un=(cn.displayName="Heading",cn.defaultProps={appearance:"default",size:"m"},["className","iconType"]),ln=(Wt.displayName="ActionButton",Wt.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"]),fn={tiny:12,regular:16,large:20},pn=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,c=e.value,u=e.icon,l=e.inlineLabel,f=e.required,p=e.error,d=e.info,h=e.onChange,y=e.onClick,m=e.onClear,g=e.onBlur,v=e.onFocus,b=e.onPaste,w=e.actionIcon,S=e.className,_=e.autoFocus,E=e.disabled,C=e.readOnly,O=e.iconType,x=W(e,ln),k=Se.useRef(null),D=Oe(Se.useState(!c),2),T=D[0],j=D[1],D=(Se.useImperativeHandle(t,function(){return k.current}),Se.useEffect(function(){var e;_&&null!=(e=k.current)&&e.focus({preventScroll:!0})},[]),De(e)),e=ke((Ee(t={},"Input",!0),Ee(t,"Input--".concat(n),n),Ee(t,"Input--disabled",E||C),Ee(t,"Input--error",p),t),S),S=ke((Ee(t={},"Input-input",!0),Ee(t,"Input-input--".concat(n),n),t)),T=ke((Ee(t={},"Input-icon",!0),Ee(t,"Input-icon--left",!0),Ee(t,"Input-icon--inputBlank",T),Ee(t,"Input-icon--error",p),t)),t=ke((Ee(p={},"Input-icon",!0),Ee(p,"Input-iconWrapper--right",!0),p)),p=Se.createElement("div",{className:t,tabIndex:0},Se.createElement(P,{name:"info",size:fn[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=k.current)?void 0:e.focus()},role:"presentation",onBlur:function(){var e;return j(!(null!=(e=k.current)&&e.value))}},l&&Se.createElement("div",{className:"Input-inlineLabel"},Se.createElement(je,{appearance:"subtle"},l)),"tiny"!==n&&u&&Se.createElement("div",{className:T},Se.createElement(P,{name:u,size:fn[n],type:O})),Se.createElement("input",Ce({"data-test":"DesignSystem-Input"},D,x,{ref:k,name:a,type:r,defaultValue:i,placeholder:s,className:S,value:c,required:f,disabled:E,readOnly:C,onChange:h,onBlur:g,onClick:y,onFocus:v,onPaste:b,tabIndex:C?-1:void 0})),E?"":d?Se.createElement(Ea,{position:"bottom",tooltip:d},p):w&&(c||i)?w:m&&(c||i)&&Se.createElement("div",{className:t},Se.createElement(P,{"data-test":"DesignSystem-Input--closeIcon",onClick:function(e){var t;null!=(t=k.current)&&t.focus({preventScroll:!0}),m(e)},name:"close",size:fn[n],className:"Input-icon--right"})))}),dn=(pn.displayName="Input",Object.assign(pn,{ActionButton:Wt}),["size","defaultValue","name","placeholder","icon","prefix","suffix","error","min","max","onChange","onClick","onBlur","onFocus","className","autoFocus","disabled","readOnly","value","showActionButton","onKeyDown","iconType"]),hn={regular:16,large:20},yn=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,c=e.suffix,u=e.error,l=e.min,f=e.max,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,m=e.className,g=e.autoFocus,v=e.disabled,b=e.readOnly,w=e.value,S=e.showActionButton,_=void 0===S||S,S=e.onKeyDown,E=e.iconType,C=W(e,dn),O=Se.useRef(null),x=void 0===w,k=Oe(Se.useState(w||r),2),D=k[0],T=k[1],k=(Se.useImperativeHandle(t,function(){return O.current}),Se.useEffect(function(){var e;g&&null!=(e=O.current)&&e.focus({preventScroll:!0})},[]),Se.useEffect(function(){void 0!==w&&T(w)},[w]),De(e)),e=ke((Ee(t={},"MetricInput",!0),Ee(t,"MetricInput--".concat(n),n),Ee(t,"MetricInput--disabled",v||b),Ee(t,"MetricInput--error",u),t),m),t=ke((Ee(u={},"MetricInput-input",!0),Ee(u,"MetricInput-input--".concat(n),n),Ee(u,"mr-4",!c&&!_&&"regular"===n),Ee(u,"mr-6",!c&&!_&&"large"===n),u)),u=ke((Ee(m={},"MetricInput-icon",!0),Ee(m,"MetricInput-icon--".concat(n),n),m)),m=ke((Ee(m={},"mr-4","regular"===n),Ee(m,"mr-5","regular"!==n),m)),j=ke((Ee(j={},"ml-4 mr-3","regular"===n),Ee(j,"mx-5","regular"!==n),j)),I=ke((Ee(I={},"p-0",!0),Ee(I,"MetricInput-arrowIcon--".concat(n),n),Ee(I,"ml-3",!0),I)),M=function(e,t){var n=Number(D||0),r=(null==(r=n.toString().split(".")[1])?void 0:r.length)||0;v||b||!("down"===t?void 0!==l&&l<n||void 0===l:void 0!==f&&n<f||void 0===f)||(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)}(f,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)}(l,+(n="down"===t?n-1:n+1).toFixed(r))),x&&T(n),p&&(t=Object.create(e,{target:{value:{value:n}}}),p(t)))},N="large"===n?"regular":"tiny";return Se.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:e,onKeyDown:S,role:"presentation"},a&&Se.createElement(P,{"data-test":"DesignSystem-MetricInput--icon",name:a,type:E,size:hn[n],appearance:D?"subtle":"disabled",className:u}),s&&Se.createElement(je,{"data-test":"DesignSystem-MetricInput--prefix",className:m,size:n,appearance:"subtle"},s),Se.createElement("input",Ce({"data-test":"DesignSystem-MetricInput"},k,C,{type:"number",ref:O,name:o,defaultValue:r,placeholder:i,className:t,value:D,disabled:v,readOnly:b,onChange:function(e){x&&T(e.target.value),p&&p(e)},onBlur:h,onClick:d,onFocus:y,onKeyDown:function(e){if(_){var t=e;switch(t.key){case"e":case"E":return void t.preventDefault();case"ArrowDown":return void(t.preventDefault(),M(t,"down"));case"ArrowUp":t.preventDefault(),M(t,"up")}}else e.preventDefault()}})),c&&Se.createElement(je,{"data-test":"DesignSystem-MetricInput--suffix",className:j,size:n,appearance:"subtle"},c),_&&Se.createElement("div",{className:"MetricInput-arrowIcons"},Se.createElement(Te,{icon:"keyboard_arrow_up",size:N,className:"".concat(I," mb-2"),onClick:function(e){return M(e,"up")},"data-test":"DesignSystem-MetricInput--upIcon"}),Se.createElement(Te,{icon:"keyboard_arrow_down",size:N,className:I,onClick:function(e){return M(e,"down")},"data-test":"DesignSystem-MetricInput--downIcon"})))}),mn=(yn.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,d=void 0===r?"_":r,r=n.validators,h=void 0===r?[]:r,r=n.clearOnEmptyBlur,o=void 0===r||r,r=n.defaultValue,y=n.mask,i=n.error,a=n.caption,R=n.required,m=n.onChange,s=n.onPaste,c=n.onBlur,u=n.onFocus,l=n.onClear,f=n.className,g=n.id,L=n.helpText,F=W(n,mn),v=Se.useCallback(function(e){return"object"===Z(y[e])},[y]),b=Se.useCallback(function(e,t){if("right"===e){for(var n=t;n<y.length;n++)if(v(n))return n;return y.length}if("left"!==e)return t;for(var r=t;0<=r;r--)if(v(r-1))return r;return 0},[y,v]),p=Se.useCallback(function(){var e=b("right",0);return{start:e,end:e}},[b]),w=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]:y.length-1;return qt(y,d).slice(e,t+1)},[y,d]),S=Se.useMemo(function(){return w()},[w]),_=Se.useMemo(function(){return p()},[p]),E=Se.useRef(null),C=Se.useRef(),O=Se.useRef(_),x=Se.useRef(0),r=Oe(Se.useState(r||t||""),2),k=r[0],D=r[1],T=(Se.useImperativeHandle(e,function(){return E.current}),Se.useEffect(function(){D(t||"")},[t]),Se.useEffect(function(){M(x.current)},[k]),Se.useCallback(function(e){return Math.abs(e.end-e.start)},[])),j=Se.useCallback(function(){var e;return{start:(null==(e=E.current)?void 0:e.selectionStart)||0,end:(null==(e=E.current)?void 0:e.selectionEnd)||0}},[E.current]),I=Se.useCallback(function(e){var t,n;E.current&&(t=E.current,n=Math.min(e.start,e.end),e=Math.max(e.start,e.end),t.setSelectionRange(n,e))},[E.current]),M=Se.useCallback(function(e){return I({start:e,end:e})},[I]),N=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>=y.length||(r>=e.length?O.current={start:t,end:t}:(n=y[t],v(t)?(e[r].match(n)?o+=e[r]:o+=d,a++):o+=n,o+=N(e,i,a))),o},[y,d,v]),P=Se.useCallback(function(){O.current=j(),C.current=window.requestAnimationFrame(P)},[O.current,j]),A=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=j(),o=Math.min(O.current.start,r.start),i=r.end,a=o,s="",c=0,i=n.slice(o,i),s=N(i,o),i=k,u=(0!==i.length||"parent-TimePicker"!==g&&"parent-DatePicker"!==g||(i=S),t=s.length,r.end>O.current.end?c=t?T(O.current):0:n.length<i.length&&(c=i.length-n.length),i.split("")),l=0;l<t;l++)u[o+l]=s[l];for(var f=0;f<c;f++){var p=o+t+f;u[p]=w(p,p)}r=u.slice(0,y.length).join(""),s!==d&&""!==s&&!s.includes(d)&&q(h,r)&&(a+=t),n=b(c?"left":"right",a),1===c&&!s.length&&!v(a)&&0<n?(a=n,u[--a]=d):1!==c&&(a=n),r=u.slice(0,y.length).join("");x.current=a,r!==i&&q(h,r)?"__:__ _M"===S?(D(r.toUpperCase()),null!=m&&m(e,r.toUpperCase())):(D(r),null!=m&&m(e,r)):window.requestAnimationFrame(function(){return M(x.current)})},[O.current,h,j,N,T,w,b,v,M,D,m]),e=Se.useCallback(function(e){var t=e.currentTarget.value;o&&t===S&&(D(""),t=""),null!=c&&c(e,t),C.current&&window.cancelAnimationFrame(C.current)},[o,C.current,w,D,c]),z=Se.useCallback(function(e){x.current=_.start,D(S),null!=l&&l(e)},[D,w,M,p,l]),B=Se.useCallback(function(e){C.current=window.requestAnimationFrame(P),k||(x.current=_.start,D(w())),null!=u&&u(e)},[C.current,k,P,D,I,u]),K=Se.useMemo(function(){return ke({"d-flex flex-column flex-grow-1":!0},f)},[f]);return Se.createElement("div",{className:K,"data-test":"DesignSystem-InputMask--Wrapper"},Se.createElement(pn,Ce({},F,{value:k,error:i,required:R,onFocus:B,onChange:r,onClear:k===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],A(r)&&A(o)):A(t)),o=q(h,n);r&&s&&o&&(s(e,n),D(n))},autoComplete:"off",ref:E})),Se.createElement(ks,{message:i?a:L,error:i}))}),gn=(n.displayName="InputMask",n.utils={getDefaultValue:qt},n),vn=["required","optional","withInput","disabled","children","className","info"],bn=(Vt.displayName="Label",["children","className","appearance","size","disabled"]),wn=function(e){var t,n=e.children,r=e.className,o=e.appearance,i=e.size,a=e.disabled,e=W(e,bn),i=ke((Ee(t={Link:!0},"Link--".concat(i),i),Ee(t,"Link--".concat(o),o),Ee(t,"Link--".concat(o,"-disabled"),a),t),r);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Link",className:i,componentType:"a",tabIndex:a?-1:0},e),n)},Sn=(wn.displayName="Link",wn.defaultProps={appearance:"default",size:"regular",disabled:!1},Gt.displayName="Meta",function(e){var i=e.list,t=e.seperator,n=e.className,a=e.size,e=De(e),n=ke(Ee({},"MetaList",!0),n),s=ke(Ee({},"MetaList-seperator",!0)),r=ke((Ee(r={},"MetaList-seperator",!0),Ee(r,"MetaList-seperator--left",!0),r));return Se.createElement("div",Ce({"data-test":"DesignSystem-MetaList"},e,{className:n}),t&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:r,appearance:"disabled"}),i.map(function(e,t){var n=e.label,r=e.icon,e=e.iconType,o=t!==i.length-1;return Se.createElement("span",{key:t,className:"MetaList-item"},Se.createElement(Gt,{size:a,label:void 0===n?"":n,icon:r,iconType:e}),o&&Se.createElement(P,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:s,appearance:"disabled"}))}))});Sn.displayName="MetaList",Sn.defaultProps={seperatorAppearance:"disabled",iconAppearance:"subtle",labelAppearance:"subtle",size:"regular"};function _n(e,t,n,r){for(var o=t<n?1:-1,i=t;i!==n+o;i+=o)e[i]=r}var En=function(){e(i,Se["Component"]);var r=h(i);function i(){var o;d(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ee(G(o=r.call.apply(r,[this].concat(t))),"state",{isHandleMoving:!1,isHandleHovered:!1}),Ee(G(o),"handleElement",null),Ee(G(o),"refHandlers",{handle:function(e){return o.handleElement=e}}),Ee(G(o),"mouseEventClientOffset",function(e){return e.clientX}),Ee(G(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}),Ee(G(o),"changeValue",function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.props.onChange,e=$t(e,o.props.min,o.props.max);return isNaN(e)||o.props.value===e||t&&t(e),e}),Ee(G(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)}),Ee(G(o),"continueHandleMovement",function(e){var e=o.mouseEventClientOffset(e);o.state.isHandleMoving&&!o.props.disabled&&(e=o.clientToValue(e),o.changeValue(e))}),Ee(G(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))}),Ee(G(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()))}),Ee(G(o),"handleKeyUp",function(e){o.props.disabled||0<=[37,39].indexOf(e.keyCode)&&(e=o.props.onRelease)&&e(o.props.value)}),Ee(G(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}}),Ee(G(o),"handleMouseOver",function(){o.setState({isHandleHovered:!0})}),Ee(G(o),"handleMouseLeave",function(){o.setState({isHandleHovered:!1})}),Ee(G(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,e=e.isCurrentLabelHovered,a=this.state,s=a.isHandleMoving,a=a.isHandleHovered,a=s||a||e,e=this.getHandleMidpointAndOffset(this.handleElement,!0).handleMidpoint,r={left:"calc(".concat(Yt((r-t)*n)," - ").concat(e,"px)")},n=ke((Ee(t={},"Slider-handle",!0),Ee(t,"Slider-handle--disabled",o),Ee(t,"Slider-handle--active",s),Ee(t,"border-0",o),t)),s=ke((Ee(e={},"Slider-tooltip",!0),Ee(e,"Tooltip",!0),Ee(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=function(){e(n,Se["Component"]);var t=h(n);function n(e){var p;return d(this,n),Ee(G(p=t.call(this,e)),"handleElements",[]),Ee(G(p),"trackElement",null),Ee(G(p),"getLabelPrecision",function(e){var t=e.labelPrecision,e=e.stepSize;return null==t?(e=e,isFinite(e)&&Math.floor(e)!==e&&e.toString().split(".")[1].length||0):t}),Ee(G(p),"getOffsetRatio",function(e){return $t((e-p.props.min)*p.state.tickSizeRatio,0,1)}),Ee(G(p),"addHandleRef",function(e){null!=e&&p.handleElements.push(e)}),Ee(G(p),"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}),Ee(G(p),"updateTickSize",function(){var e,t;null!=p.trackElement&&(e=p.trackElement.clientWidth,t=1/(p.props.max-p.props.min),p.setState({tickSize:e*t,tickSizeRatio:t}))}),Ee(G(p),"getTrackFill",function(e,t){return void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore}),Ee(G(p),"maybeHandleTrackClick",function(t){var e=t.target;!p.props.disabled&&null==e.closest(".Slider-handle")&&(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.beginHandleMovement(t)}),Ee(G(p),"getLockedHandleIndex",function(e,t){var n=e<t?1:-1,e=e+n;return e!==t+n?e:-1}),Ee(G(p),"getNewHandleValues",function(e,t){var n=p.getHandleValues(p.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=p.getLockedHandleIndex(t,o);return-1!==i?(_n(n,t,i,n[i]),n):(_n(r,t,o,e),r)}),Ee(G(p),"onReleaseHandler",function(e,t){var n=p.props.onRangeRelease,r=p.getHandleValues(p.props),o=p.getNewHandleValues(e,t);n&&n(o),r.forEach(function(e,t){e.onRelease&&e.onRelease(o[t])})}),Ee(G(p),"onChangeHandler",function(e,t){var n=p.props.onRangeChange,r=p.getHandleValues(p.props),o=r.map(function(e){return e.value}),i=p.getNewHandleValues(e,t);!function(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])}))}),Ee(G(p),"formatLabel",function(e){var t=p.props.labelRenderer,e=e.toFixed(p.state.labelPrecision);return"function"==typeof t?t(Number(e)):e}),Ee(G(p),"renderHandles",function(){var e=p.props,r=e.disabled,o=e.max,i=e.min,a=e.stepSize,s=p.getHandleValues(p.props);return 0===s.length?null:s.map(function(e,t){var e=e.value,n=p.state.hoveredLabelValue===Number(e.toFixed(p.state.labelPrecision));return Se.createElement(En,{disabled:r,key:"".concat(t,"-").concat(s.length),max:o,min:i,onRelease:function(e){return p.onReleaseHandler(e,t)},onChange:function(e){return p.onChangeHandler(e,t)},label:p.formatLabel(e),ref:p.addHandleRef,stepSize:a,tickSize:p.state.tickSize,tickSizeRatio:p.state.tickSizeRatio,value:e,isCurrentLabelHovered:n})})}),Ee(G(p),"renderLabels",function(){for(var e,t=p.props,n=t.labelStepSize,r=t.max,o=t.min,i=t.labelRenderer,a=t.disabled,s=[],c=p.state.tickSizeRatio*n,u=p.getHandleValues(p.props).map(function(e){return e.value.toFixed(p.state.labelPrecision)}),l=o,f=0;l<r||(e=l,Math.abs(e-r)<=1e-5);l+=n,f+=c)!function(n,e){var e={left:Yt(e)},t=!a&&-1!==u.indexOf(n.toFixed(p.state.labelPrecision)),r=ke((Ee(r={},"Slider-ticks",!0),Ee(r,"bg-dark",t),r));s.push(Se.createElement("div",{onClick:function(t){var e;p.props.disabled||(e=p.nearestHandleForValue(p.handleElements,function(e){return e.mouseEventClientOffset(t)}))&&e.changeValue(n)},className:"Slider-label",key:n,style:e,onMouseOver:function(){return p.handleLabelMouseOver(n)},onMouseLeave:p.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},Se.createElement("span",{className:r}),!1!==i&&Se.createElement(je,{size:"small",appearance:t?"default":"disabled"},p.formatLabel(n))))}(l,f);return s}),Ee(G(p),"renderTrackFill",function(e,t,n){var r=Oe([p.getOffsetRatio(t.value),p.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=_e({},{width:"".concat(100-r-o,"%")}),o=p.getTrackFill(t,n),n=ke((Ee(t={},"Slider-progress",!0),Ee(t,"Slider-progress--disabled",p.props.disabled),Ee(t,"Slider-progress--inRange",o),Ee(t,"Slider-progress--inRangeDisabled",o&&p.props.disabled),t));return Se.createElement("div",{key:"track-".concat(e),className:n,style:r})}),Ee(G(p),"renderTracks",function(){var e=p.getHandleValues(p.props),n=(e.push({value:p.props.max}),{value:p.props.min||0}),r=[];return e.forEach(function(e,t){r.push(p.renderTrackFill(t,n,e)),n=e}),r}),Ee(G(p),"handleLabelMouseOver",function(e){p.setState({hoveredLabelValue:e})}),Ee(G(p),"handleLabelMouseLeave",function(){p.setState({hoveredLabelValue:void 0})}),p.state={labelPrecision:p.getLabelPrecision(p.props),tickSize:0,tickSizeRatio:0},p}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],c=r(s);c<i&&(o=s,i=c)}return o}}},{key:"render",value:function(){var t=this,e=this.props,n=e.label,e=e.className,r=De(this.props),e=ke(Ee({},"Slider",!0),e),o=ke((Ee(o={},"Slider-wrapper",!0),Ee(o,"Slider-wrapper--disabled",this.props.disabled),o));return Se.createElement("div",Ce({},r,{className:e,"data-test":"DesignSystem-MultiSlider"}),n&&Se.createElement(Vt,{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}(),Cn=(Ee(n,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),Ee(n,"Handle",function(){return null}),["children","className","onOutsideClick"]),On=Se.forwardRef(function(e,t){var n=e.children,r=e.className,o=e.onOutsideClick,e=W(e,Cn),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=ke(Ee({},"OutsideClick",!0),r);return Se.createElement("div",Ce({ref:i},e,{className:t}),n)}),xn=(On.displayName="OutsideClick",["appearance","children","className","color"]),kn=function(e){var t,n=e.appearance,r=e.children,o=e.className,i=e.color,e=W(e,xn),n=ke((Ee(t={Text:!0},"Text--".concat(n),!i&&n),Ee(t,"color-".concat(i),i),t),o);return Se.createElement(ye,Ce({"data-test":"DesignSystem-Paragraph"},e,{className:n,componentType:"p"}),r)},Dn=(kn.displayName="Paragraph",kn.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,c=e.checked,u=e.defaultChecked,l=e.className,f=e.helpText,p=e.error,e=W(e,Dn),d=Se.useRef(null),t=(Se.useImperativeHandle(t,function(){return d.current}),ke((Ee(t={},"Radio",!0),Ee(t,"Radio--disabled",o),t),l)),p=ke((Ee(l={},"Radio-wrapper",!0),Ee(l,"Radio-defaultWrapper",!p),Ee(l,"Radio-errorWrapper",p),Ee(l,"Radio-wrapper--".concat(n),n),l)),l=ke((Ee(l={},"Radio-outerWrapper",!0),Ee(l,"Radio-outerWrapper--".concat(n),n),l)),h=ke(Ee({},"Radio-Label",!0)),y="".concat(a,"-").concat(r,"-").concat(ge());return Se.createElement("div",{className:t,"data-test":"DesignSystem-Radio"},Se.createElement("div",{className:l,"data-test":"DesignSystem-Radio-OuterWrapper"},Se.createElement("input",Ce({tabIndex:0},e,{type:"radio",disabled:o,checked:c,defaultChecked:u,ref:d,name:a,value:s,onChange:i,className:"Radio-input",id:y,"data-test":"DesignSystem-Radio-Input"})),Se.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:p})),Se.createElement("div",{className:"Radio-labelWrapper"},r&&Se.createElement("label",{className:h,htmlFor:y,"data-test":"DesignSystem-Radio-Label"},Se.createElement(je,{size:"tiny"===n?"small":"regular",appearance:o?"disabled":"default"},r)),f&&Se.createElement(je,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:o?"disabled":"subtle"},f.trim())))}),Tn=(r.displayName="Radio",["className","children"]),jn=Se.forwardRef(function(e,t){var n=e.className,r=e.children,e=W(e,Tn),n=ke(Ee({Row:!0},"".concat(n),n));return Se.createElement("div",Ce({"data-test":"DesignSystem-Row",ref:t},e,{className:n}),r)}),In=(jn.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=De(e),s=ke(Ee({},"StatusHint",!0),s),t=ke((Ee(c={},"StatusHint-icon",!0),Ee(c,"StatusHint--".concat(t),t),c)),c=ke(Ee({},"ellipsis--noWrap",a));return Se.createElement("div",Ce({"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(je,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:c},n))}),Mn=(In.displayName="StatusHint",In.defaultProps={appearance:"default"},function(e){var t,n=e.appearance,r=e.children,o=e.subtle,i=e.className,e=De(e),n=ke((Ee(t={Pills:!0},"Badge--".concat(n),n&&!o),Ee(t,"Badge--subtle-".concat(n),o),t),i);return Se.createElement("span",Ce({"data-test":"DesignSystem-Pills"},e,{className:n}),r)}),Nn=(Mn.displayName="Pills",Mn.defaultProps={appearance:"secondary"},function(e){var t=e.appearance,n=e.size,r=e.className,e=De(e),n=ke(Ee({Spinner:!0},"Spinner--".concat(n),n),r),r=ke(Ee({Circle:!0},"Circle--".concat(t),t));return Se.createElement("svg",Ce({},e,{className:n},{viewBox:"0 0 50 50"}),Se.createElement("circle",Ce({className:r},{cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:"4"})))}),Pn=(Nn.displayName="Spinner",Nn.defaultProps={appearance:"primary",size:"medium"},_e(_e({},n.defaultProps),{},{defaultValue:0}),(r=o=o||{})[r.START=0]="START",r[r.END=1]="END",_e(_e({},n.defaultProps),{},{defaultValue:[0,10]}),["size","defaultChecked","disabled","onChange","name","value","className","appearance","checked"]),An=(Se.forwardRef(function(e,t){function n(e){"change"!=e.type&&"Space"!==e.key||(void 0===l&&d(!p),a&&a(e,!p))}var r=e.size,r=void 0===r?"regular":r,o=e.defaultChecked,i=e.disabled,a=e.onChange,s=e.name,c=e.value,u=e.className,l=(e.appearance,e.checked),e=W(e,Pn),f=Oe(Se.useState(void 0===l?o:l),2),p=f[0],d=f[1],f=(Se.useEffect(function(){void 0!==l&&d(l)},[l]),ke((Ee(f={},"Switch",!0),Ee(f,"Switch--disabled",i),Ee(f,"Switch--".concat(r),r),f),u)),r=ke((Ee(u={},"Switch-wrapper",!0),Ee(u,"Switch-wrapper--disabled",i),Ee(u,"Switch-wrapper--".concat(r),r),Ee(u,"Switch-wrapper--checked",p),Ee(u,"Switch-wrapper--checkedDisabled",p&&i),u));return Se.createElement("div",{className:f},Se.createElement("input",Ce({},e,{type:"checkbox",defaultChecked:o,disabled:i,onChange:n,checked:p,ref:t,name:s,value:c,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"]);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,c=e.value,u=e.defaultValue,l=e.required,f=e.error,p=e.onChange,d=e.onClick,h=e.onBlur,y=e.onFocus,m=e.className,e=W(e,An),o=ke((Ee(n={},"Textarea",!0),Ee(n,"Textarea--resize",o),Ee(n,"Textarea--error",f),n),m);return Se.createElement("textarea",Ce({"data-test":"DesignSystem-Textarea"},e,{ref:t,name:a,rows:r,placeholder:s,className:o,value:c,defaultValue:u,required:l,disabled:i,onChange:p,onBlur:h,onClick:d,onFocus:y}))}).displayName="Textarea";function Rn(e){var t=Qn.call(e);return"[object Arguments]"===t||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===Qn.call(e.callee)}function Ln(){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 Fn(){return Ln()&&!!Symbol.toStringTag}function zn(e){try{return lr('"use strict"; return ('+e+").constructor;")()}catch(e){}}var Bn,Kn,Hn,Un,Wn,qn,Vn,Gn,Yn,$n=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})),Zn=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})),Jn=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}),o=(ee(Jn),t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jn(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Xn=ee(o),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})),Qn=Object.prototype.toString,n=(Object.keys||(Bn=Object.prototype.hasOwnProperty,Kn=Object.prototype.toString,Hn=Rn,r=Object.prototype.propertyIsEnumerable,Un=!r.call({toString:null},"toString"),Wn=r.call(function(){},"prototype"),qn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Vn=function(e){var t=e.constructor;return t&&t.prototype===e},Gn={$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},Yn=function(){if("undefined"!=typeof window)for(var e in window)try{if(!Gn["$"+e]&&Bn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Vn(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),c=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===Kn.call(e),r=Hn(e),o=t&&"[object String]"===Kn.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Wn&&n;if(o&&0<e.length&&!Bn.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(r&&0<e.length)for(var c=0;c<e.length;++c)i.push(String(c));else for(var u in e)a&&"prototype"===u||!Bn.call(e,u)||i.push(String(u));if(Un)for(var l=function(e){if("undefined"==typeof window||!Yn)return Vn(e);try{return Vn(e)}catch(e){return!1}}(e),f=0;f<qn.length;++f)l&&"constructor"===qn[f]||!Bn.call(e,qn[f])||i.push(qn[f]);return i}),c),er=Array.prototype.slice,tr=Object.keys,nr=tr?function(e){return tr(e)}:n,rr=Object.keys,or=(nr.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Rn(e)?rr(er.call(e)):rr(e)}):Object.keys=nr,Object.keys||nr},nr),o="undefined"!=typeof Symbol&&Symbol,ir=Array.prototype.slice,ar=Object.prototype.toString,sr=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==ar.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,e,o=ir.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(ir.call(arguments))),Object(e)===e?e:this):n.apply(t,o.concat(ir.call(arguments)))}),n.prototype&&((e=function(){}).prototype=n.prototype,r.prototype=new e,e.prototype=null),r},cr=sr.call(Function.call,Object.prototype.hasOwnProperty),ur=SyntaxError,lr=Function,fr=TypeError,pr=Object.getOwnPropertyDescriptor;if(pr)try{pr({},"")}catch(Si){pr=null}function dr(){throw new fr}function hr(e,t){if("string"!=typeof e||0===e.length)throw new fr("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new fr('"allowMissing" argument must be a boolean');var n=function(e){var t=Ar(e,0,1),n=Ar(e,-1);if("%"===t&&"%"!==n)throw new ur("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new ur("invalid intrinsic syntax, expected opening `%`");var o=[];return Pr(e,Rr,function(e,t,n,r){o[o.length]=n?Pr(r,Lr,"$1"):t||e}),o}(e),r=0<n.length?n[0]:"",o=function(e,t){var n,r=e;if(cr(Ir,r)&&(r="%"+(n=Ir[r])[0]+"%"),cr(Tr,r)){var o=Tr[r];if(void 0!==(o=o===Dr?jr(r):o)||t)return{alias:n,name:r,value:o};throw new fr("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new ur("intrinsic "+e+" does not exist!")}("%"+r+"%",t),i=(o.name,o.value),a=!1;(o=o.alias)&&(r=o[0],Nr(n,Mr([0,1],o)));for(var s=1,c=!0;s<n.length;s+=1){var u=n[s],l=Ar(u,0,1),f=Ar(u,-1);if(('"'===l||"'"===l||"`"===l||'"'===f||"'"===f||"`"===f)&&l!==f)throw new ur("property names with quotes must have matching quotes");if("constructor"!==u&&c||(a=!0),cr(Tr,l="%"+(r+="."+u)+"%"))i=Tr[l];else if(null!=i){if(!(u in i)){if(t)return;throw new fr("base intrinsic for "+e+" exists, but the property is not available.")}i=pr&&s+1>=n.length?(c=!!(f=pr(i,u)))&&"get"in f&&!("originalValue"in f.get)?f.get:i[u]:(c=cr(i,u),i[u]),c&&!a&&(Tr[l]=i)}}return i}function yr(e,t){return"function"==typeof(t=hr(e,!!t))&&-1<zr(e,".prototype.")?Fr(t):t}function mr(e){return!(Br&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Kr(e)}function gr(e){return!!mr(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Array]"!==Kr(e)&&"[object Function]"===Kr(e.callee)}function vr(e,t){var n=2<arguments.length?arguments[2]:{},r=or(t);Ur&&(r=qr.call(r,Object.getOwnPropertySymbols(t)));for(var o,i,a,s,c=0;c<r.length;c+=1)o=e,i=r[c],a=t[r[c]],s=n[r[c]],i in o&&(!Gr(s)||!s())||(Yr?Vr(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||!(!Zr(e)||!Zr(t))}function wr(){return"function"==typeof Object.is?Object.is:br}function Sr(){if(null!=this&&this!==to(this))throw new no("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 _r(){if(!ro)throw new io("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=oo(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return Sr}var Er,Cr,Or,xr,r=pr?function(){try{return dr}catch(e){try{return pr(arguments,"callee").get}catch(e){return dr}}}():dr,c="function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&Ln(),kr=Object.getPrototypeOf||function(e){return e.__proto__},Dr={},n="undefined"==typeof Uint8Array?u:kr(Uint8Array),Tr={"%AggregateError%":"undefined"==typeof AggregateError?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?u:ArrayBuffer,"%ArrayIteratorPrototype%":c?kr([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":Dr,"%AsyncGenerator%":Dr,"%AsyncGeneratorFunction%":Dr,"%AsyncIteratorPrototype%":Dr,"%Atomics%":"undefined"==typeof Atomics?u:Atomics,"%BigInt%":"undefined"==typeof BigInt?u:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?u:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?u:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?u:FinalizationRegistry,"%Function%":lr,"%GeneratorFunction%":Dr,"%Int8Array%":"undefined"==typeof Int8Array?u:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?u:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?kr(kr([][Symbol.iterator]())):u,"%JSON%":"object"==typeof JSON?JSON:u,"%Map%":"undefined"==typeof Map?u:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?kr((new Map)[Symbol.iterator]()):u,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?u:Promise,"%Proxy%":"undefined"==typeof Proxy?u:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?u:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?u:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?kr((new Set)[Symbol.iterator]()):u,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?kr(""[Symbol.iterator]()):u,"%Symbol%":c?Symbol:u,"%SyntaxError%":ur,"%ThrowTypeError%":r,"%TypedArray%":n,"%TypeError%":fr,"%Uint8Array%":"undefined"==typeof Uint8Array?u:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?u:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?u:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?u:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?u:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?u:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?u:WeakSet},jr=function e(t){var n,r;return"%AsyncFunction%"===t?n=zn("async function () {}"):"%GeneratorFunction%"===t?n=zn("function* () {}"):"%AsyncGeneratorFunction%"===t?n=zn("async function* () {}"):"%AsyncGenerator%"===t?(r=e("%AsyncGeneratorFunction%"))&&(n=r.prototype):"%AsyncIteratorPrototype%"===t&&(r=e("%AsyncGenerator%"))&&(n=kr(r.prototype)),Tr[t]=n},Ir={"%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"]},Mr=sr.call(Function.call,Array.prototype.concat),Nr=sr.call(Function.apply,Array.prototype.splice),Pr=sr.call(Function.call,String.prototype.replace),Ar=sr.call(Function.call,String.prototype.slice),Rr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Lr=/\\(\\)?/g,Fr=t(function(e){var t=hr("%Function.prototype.apply%"),n=hr("%Function.prototype.call%"),r=hr("%Reflect.apply%",!0)||sr.call(n,t),o=hr("%Object.getOwnPropertyDescriptor%",!0),i=hr("%Object.defineProperty%",!0),a=hr("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=r(sr,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(sr,t,arguments)}i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),zr=(Fr.apply,Fr(hr("String.prototype.indexOf"))),Br=Fn(),Kr=yr("Object.prototype.toString"),o=function(){return mr(arguments)}(),Hr=(mr.isLegacyArguments=gr,o?mr:gr),Ur="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Wr=Object.prototype.toString,qr=Array.prototype.concat,Vr=Object.defineProperty,Gr=function(e){return"function"==typeof e&&"[object Function]"===Wr.call(e)},Yr=Vr&&function(){var e={};try{for(var t in Vr(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),$r=(vr.supportsDescriptors=!!Yr,vr),Zr=function(e){return e!=e},c=Fr(wr(),Object),Jr=($r(c,{getPolyfill:wr,implementation:br,shim:function(){var e=wr();return $r(Object,{is:e},{is:function(){return Object.is!==e}}),e}}),c),r=Fn(),Xr=(r&&(Er=yr("Object.prototype.hasOwnProperty"),Cr=yr("RegExp.prototype.exec"),Or={},xr={toString:n=function(){throw Or},valueOf:n},"symbol"==typeof Symbol.toPrimitive)&&(xr[Symbol.toPrimitive]=n),yr("Object.prototype.toString")),Qr=Object.getOwnPropertyDescriptor,eo=r?function(e){if(!e||"object"!=typeof e)return!1;var t=Qr(e,"lastIndex");if(!(t&&Er(t,"value")))return!1;try{Cr(e,xr)}catch(e){return e===Or}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===Xr(e)},to=Object,no=TypeError,ro=$r.supportsDescriptors,oo=Object.getOwnPropertyDescriptor,io=TypeError,ao=$r.supportsDescriptors,so=Object.getOwnPropertyDescriptor,co=Object.defineProperty,uo=TypeError,lo=Object.getPrototypeOf,fo=/a/,u=Fr(Sr),po=($r(u,{getPolyfill:_r,implementation:Sr,shim:function(){var e,t,n;if(ao&&lo)return e=_r(),t=lo(fo),(n=so(t,"flags"))&&n.get===e||co(t,"flags",{configurable:!0,enumerable:!1,get:e}),e;throw new uo("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors")}}),u),ho=Date.prototype.getDay,yo=Object.prototype.toString,mo=Fn(),go=function(e){if("object"!=typeof e||null===e)return!1;if(!mo)return"[object Date]"===yo.call(e);try{return ho.call(e),!0}catch(e){return!1}},vo=Date.prototype.getTime;function bo(e,t,n){n=n||{};if(n.strict?!Jr(e,t):e!==t){if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return n.strict?Jr(e,t):e==t;var r,o,i=e,a=t,s=n;if(typeof i!=typeof a)return!1;if(wo(i)||wo(a))return!1;if(i.prototype!==a.prototype)return!1;if(Hr(i)!==Hr(a))return!1;e=eo(i),t=eo(a);if(e!==t)return!1;if(e||t)return i.source===a.source&&po(i)===po(a);if(go(i)&&go(a))return vo.call(i)===vo.call(a);if(e=So(i),t=So(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 c=or(i),u=or(a)}catch(e){return!1}if(c.length!==u.length)return!1;for(c.sort(),u.sort(),r=c.length-1;0<=r;r--)if(c[r]!=u[r])return!1;for(r=c.length-1;0<=r;r--)if(o=c[r],!bo(i[o],a[o],s))return!1}}return!0}function wo(e){return null==e}function So(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 _o=bo,Eo="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Co=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(Eo&&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
@@ -27,7 +27,7 @@ module.exports=function(n){var r={};function o(e){var t;return(r[e]||(t=r[e]={i:
27
27
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
28
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
29
  * SOFTWARE.
30
- */var Co=_o&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Eo))}};function Oo(e){return e&&"[object Function]"==={}.toString.call(e)}function xo(e,t){return 1!==e.nodeType?[]:(e=e.ownerDocument.defaultView.getComputedStyle(e,null),t?e[t]:e)}function ko(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function Do(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=xo(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:Do(ko(e))}function To(e){return e&&e.referenceNode?e.referenceNode:e}var jo=_o&&!(!window.MSInputMethodContext||!document.documentMode),Io=_o&&/MSIE 10/.test(navigator.userAgent);function Mo(e){return 11===e?jo:10!==e&&jo||Io}function No(e){if(!e)return document.documentElement;for(var t=Mo(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===xo(n,"position")?No(n):n:(e?e.ownerDocument:document).documentElement}function Po(e){return null!==e.parentNode?Po(e.parentNode):e}function Ao(e,t){var n,r,o;return e&&e.nodeType&&t&&t.nodeType?(r=(o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)?e:t,o=o?t:e,(n=document.createRange()).setStart(r,0),n.setEnd(o,0),e!==(n=n.commonAncestorContainer)&&t!==n||r.contains(o)?"BODY"===(o=(r=n).nodeName)||"HTML"!==o&&No(r.firstElementChild)!==r?No(n):n:(o=Po(e)).host?Ao(o.host,t):Ao(e,Po(t).host)):document.documentElement}function Ro(e,t){var t="top"===(1<arguments.length&&void 0!==t?t:"top")?"scrollTop":"scrollLeft",n=e.nodeName;return("BODY"===n||"HTML"===n?(n=e.ownerDocument.documentElement,e.ownerDocument.scrollingElement||n):e)[t]}function Lo(e,t){var t="x"===t?"Left":"Top",n="Left"==t?"Right":"Bottom";return parseFloat(e["border"+t+"Width"])+parseFloat(e["border"+n+"Width"])}function Fo(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],Mo(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function zo(e){var t=e.body,e=e.documentElement,n=Mo(10)&&getComputedStyle(e);return{height:Fo("Height",t,e,n),width:Fo("Width",t,e,n)}}o=function(e,t,n){return t&&Bo(e.prototype,t),n&&Bo(e,n),e};function Bo(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 Ko(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=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};function Ho(e){return g({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Uo(e){var t={};try{Mo(10)?(t=e.getBoundingClientRect(),n=Ro(e,"top"),r=Ro(e,"left"),t.top+=n,t.left+=r,t.bottom+=n,t.right+=r):t=e.getBoundingClientRect()}catch(e){}var n={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r="HTML"===e.nodeName?zo(e.ownerDocument):{},t=r.width||e.clientWidth||n.width,r=r.height||e.clientHeight||n.height,t=e.offsetWidth-t,r=e.offsetHeight-r;return(t||r)&&(t-=Lo(e=xo(e),"x"),r-=Lo(e,"y"),n.width-=t,n.height-=r),Ho(n)}function Wo(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Mo(10),o="HTML"===t.nodeName,i=Uo(e),a=Uo(t),e=Do(e),s=xo(t),c=parseFloat(s.borderTopWidth),u=parseFloat(s.borderLeftWidth),a=(n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0)),Ho({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height}));return a.marginTop=0,a.marginLeft=0,!r&&o&&(i=parseFloat(s.marginTop),o=parseFloat(s.marginLeft),a.top-=c-i,a.bottom-=c-i,a.left-=u-o,a.right-=u-o,a.marginTop=i,a.marginLeft=o),a=(r&&!n?t.contains(e):t===e&&"BODY"!==e.nodeName)?function(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Ro(t,"top"),t=Ro(t,"left"),n=n?-1:1;return e.top+=r*n,e.bottom+=r*n,e.left+=t*n,e.right+=t*n,e}(a,t):a}function qo(e){if(!e||!e.parentElement||Mo())return document.documentElement;for(var t=e.parentElement;t&&"none"===xo(t,"transform");)t=t.parentElement;return t||document.documentElement}function Vo(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?qo(e):Ao(e,To(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=Wo(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:Ro(n),t=t?0:Ro(n,"left");return Ho({top:i-e.top+e.marginTop,left:t-e.left+e.marginLeft,width:r,height:o})}(s,o):(i=void 0,"scrollParent"===r?"BODY"===(i=Do(ko(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=Wo(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===xo(t,"position")||!!(n=ko(t))&&e(n))}(s)?a=t:(o=(r=zo(e.ownerDocument)).height,i=r.width,a.top+=t.top-t.marginTop,a.bottom=o+t.top,a.left+=t.left-t.marginLeft,a.right=i+t.left)),"number"==typeof(n=n||0));return a.left+=s?n:n.left||0,a.top+=s?n:n.top||0,a.right-=s?n:n.right||0,a.bottom-=s?n:n.bottom||0,a}function Go(e,t,n,r,o,i){var a,i=5<arguments.length&&void 0!==i?i:0;return-1===e.indexOf("auto")?e:(r=Vo(n,r,i,o),a={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},(0<(o=(i=Object.keys(a).map(function(e){return g({key:e},a[e],{area:(e=a[e]).width*e.height})}).sort(function(e,t){return t.area-e.area})).filter(function(e){var t=e.width,e=e.height;return t>=n.clientWidth&&e>=n.clientHeight})).length?o:i)[0].key+((t=e.split("-")[1])?"-"+t:""))}function Yo(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return Wo(n,r?qo(t):Ao(t,To(n)),r)}function $o(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),t=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+t,height:e.offsetHeight+n}}function Zo(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function Jo(e,t,n){n=n.split("-")[0];var e=$o(e),r={width:e.width,height:e.height},o=-1!==["right","left"].indexOf(n),i=o?"top":"left",a=o?"left":"top",s=o?"height":"width",o=o?"width":"height";return r[i]=t[i]+t[s]/2-e[s]/2,r[a]=n===a?t[a]-e[o]:t[Zo(a)],r}function Xo(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Qo(e,n,t){var r,o;return(void 0===t?e:e.slice(0,(e=e,r="name",o=t,Array.prototype.findIndex?e.findIndex(function(e){return e[r]===o}):(t=Xo(e,function(e){return e[r]===o}),e.indexOf(t))))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&Oo(t)&&(n.offsets.popper=Ho(n.offsets.popper),n.offsets.reference=Ho(n.offsets.reference),n=t(n,e))}),n}function ei(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function ti(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],o=o?""+o+n:e;if(void 0!==document.body.style[o])return o}return null}function ni(e){e=e.ownerDocument;return e?e.defaultView:window}function ri(e,t,n,r){n.updateBound=r,ni(e).addEventListener("resize",n.updateBound,{passive:!0});r=Do(e);return function e(t,n,r,o){var i="BODY"===t.nodeName,t=i?t.ownerDocument.defaultView:t;t.addEventListener(n,r,{passive:!0}),i||e(Do(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function oi(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,ni(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function ii(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ai(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&ii(r[e])&&(t="px"),n.style[e]=r[e]+t})}function si(e,t){function n(e){return e}var r=e.offsets,o=r.popper,r=r.reference,i=Math.round,a=Math.floor,r=i(r.width),s=i(o.width),c=-1!==["left","right"].indexOf(e.placement),e=-1!==e.placement.indexOf("-"),c=t?c||e||r%2==s%2?i:a:n,a=t?i:n;return{left:c(r%2==1&&s%2==1&&!e&&t?o.left-1:o.left),top:a(o.top),bottom:a(o.bottom),right:c(o.right)}}var ci=_o&&/Firefox/i.test(navigator.userAgent);function ui(e,t,n){var r,o=Xo(e,function(e){return e.name===t}),e=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});return e||(r="`"+t+"`",console.warn("`"+n+"`"+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),e}var c=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],li=c.slice(3);function fi(e,t){t=1<arguments.length&&void 0!==t&&t,e=li.indexOf(e),e=li.slice(e+1).concat(li.slice(0,e));return t?e.reverse():e}var pi="flip",di="clockwise",hi="counterclockwise";function yi(e,s,c,t){var o=[0,0],r=-1!==["right","left"].indexOf(t),t=e.split(/(\+|\-)/).map(function(e){return e.trim()}),e=t.indexOf(Xo(t,function(e){return-1!==e.search(/,|\s/)})),n=(t[e]&&-1===t[e].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),/\s*,\s*|\s+/);return(-1!==e?[t.slice(0,e).concat([t[e].split(n)[0]]),[t[e].split(n)[1]].concat(t.slice(e+1))]:[t]).map(function(e,t){var a=(1===t?!r:r)?"height":"width",n=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,n=!0,e):n?(e[e.length-1]+=t,n=!1,e):e.concat(t)},[]).map(function(e){return t=a,n=s,r=c,o=+(i=(e=e).match(/((?:\-|\+)?\d*\.?\d*)(.*)/))[1],i=i[2],o?0===i.indexOf("%")?Ho("%p"===i?n:r)[t]/100*o:"vh"===i||"vw"===i?("vh"===i?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o:e;var t,n,r,o,i})}).forEach(function(n,r){n.forEach(function(e,t){ii(e)&&(o[r]+=e*("-"===n[t-1]?-1:1))})}),o}n={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t,n,r,o=e.placement,i=o.split("-")[0];return(o=o.split("-")[1])&&(t=(n=e.offsets).reference,n=n.popper,r=(i=-1!==["bottom","top"].indexOf(i))?"width":"height",i={start:Ko({},i=i?"left":"top",t[i]),end:Ko({},i,t[i]+t[r]-n[r])},e.offsets.popper=g({},n,i[o])),e}},offset:{order:200,enabled:!0,fn:function(e,t){var t=t.offset,n=e.placement,r=(o=e.offsets).popper,o=o.reference,n=n.split("-")[0],i=void 0,i=ii(+t)?[+t,0]:yi(t,r,o,n);return"left"===n?(r.top+=i[0],r.left-=i[1]):"right"===n?(r.top+=i[0],r.left+=i[1]):"top"===n?(r.left+=i[0],r.top-=i[1]):"bottom"===n&&(r.left+=i[0],r.top+=i[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,r){var t=r.boundariesElement||No(e.instance.popper),n=(e.instance.reference===t&&(t=No(t)),ti("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Vo(e.instance.popper,e.instance.reference,r.padding,t,e.positionFixed)),t=(o.top=i,o.left=a,o[n]=s,r.boundaries=c,r.priority),u=e.offsets.popper,l={primary:function(e){var t=u[e];return u[e]<c[e]&&!r.escapeWithReference&&(t=Math.max(u[e],c[e])),Ko({},e,t)},secondary:function(e){var t="right"===e?"left":"top",n=u[t];return u[e]>c[e]&&!r.escapeWithReference&&(n=Math.min(u[t],c[e]-("right"===e?u.width:u.height))),Ko({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=g({},u,l[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=(n=e.offsets).popper,n=n.reference,r=e.placement.split("-")[0],o=Math.floor,i=(r=-1!==["top","bottom"].indexOf(r))?"right":"bottom",a=r?"left":"top",r=r?"width":"height";return t[i]<o(n[a])&&(e.offsets.popper[a]=o(n[a])-t[r]),t[a]>o(n[i])&&(e.offsets.popper[a]=o(n[i])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(ui(e.instance.modifiers,"arrow","keepTogether")){t=t.element;if("string"==typeof t){if(!(t=e.instance.popper.querySelector(t)))return e}else if(!e.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var n=e.placement.split("-")[0],r=e.offsets,o=r.popper,r=r.reference,n=-1!==["left","right"].indexOf(n),i=n?"height":"width",a=n?"Top":"Left",s=a.toLowerCase(),c=n?"left":"top",n=n?"bottom":"right",u=$o(t)[i],n=(r[n]-u<o[s]&&(e.offsets.popper[s]-=o[s]-(r[n]-u)),r[s]+u>o[n]&&(e.offsets.popper[s]+=r[s]+u-o[n]),e.offsets.popper=Ho(e.offsets.popper),r[s]+r[i]/2-u/2),r=xo(e.instance.popper),l=parseFloat(r["margin"+a]),r=parseFloat(r["border"+a+"Width"]),a=n-e.offsets.popper[s]-l-r,a=Math.max(Math.min(o[i]-u,a),0);e.arrowElement=t,e.offsets.arrow=(Ko(n={},s,Math.round(a)),Ko(n,c,""),n)}return e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(!(ei(u.instance.modifiers,"inner")||u.flipped&&u.placement===u.originalPlacement)){var f=Vo(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=Zo(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case pi:y=[p,d];break;case di:y=fi(p);break;case hi:y=fi(p,!0);break;default:y=l.behavior}y.forEach(function(e,t){if(p!==e||y.length===t+1)return u;p=u.placement.split("-")[0],d=Zo(p);var e=u.offsets.popper,n=u.offsets.reference,r=Math.floor,n="left"===p&&r(e.right)>r(n.left)||"right"===p&&r(e.left)<r(n.right)||"top"===p&&r(e.bottom)>r(n.top)||"bottom"===p&&r(e.top)<r(n.bottom),o=r(e.left)<r(f.left),i=r(e.right)>r(f.right),a=r(e.top)<r(f.top),e=r(e.bottom)>r(f.bottom),r="left"===p&&o||"right"===p&&i||"top"===p&&a||"bottom"===p&&e,s=-1!==["top","bottom"].indexOf(p),c=!!l.flipVariations&&(s&&"start"===h&&o||s&&"end"===h&&i||!s&&"start"===h&&a||!s&&"end"===h&&e),i=!!l.flipVariationsByContent&&(s&&"start"===h&&i||s&&"end"===h&&o||!s&&"start"===h&&e||!s&&"end"===h&&a),o=c||i;(n||r||o)&&(u.flipped=!0,(n||r)&&(p=y[t+1]),o&&(h="end"===(e=h)?"start":"start"===e?"end":e),u.placement=p+(h?"-"+h:""),u.offsets.popper=g({},u.offsets.popper,Jo(u.instance.popper,u.offsets.reference,u.placement)),u=Qo(u.instance.modifiers,u,"flip"))})}return u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=(o=e.offsets).popper,o=o.reference,i=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[i?"left":"top"]=o[n]-(a?r[i?"width":"height"]:0),e.placement=Zo(t),e.offsets.popper=Ho(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(ui(e.instance.modifiers,"hide","preventOverflow")){var t=e.offsets.reference,n=Xo(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=(void 0!==(i=Xo(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration)&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"),void 0!==i?i:t.gpuAcceleration),a=Uo(t=No(e.instance.popper)),o={position:o.position},s=si(e,window.devicePixelRatio<2||!ci),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=ti("transform"),u=void 0,l=void 0,l="bottom"==n?"HTML"===t.nodeName?-t.clientHeight+s.bottom:-a.height+s.bottom:s.top,u="right"==r?"HTML"===t.nodeName?-t.clientWidth+s.right:-a.width+s.right:s.left,a=(i&&c?(o[c]="translate3d("+u+"px, "+l+"px, 0)",o[n]=0,o[r]=0,o.willChange="transform"):(t="right"==r?-1:1,o[n]=l*("bottom"==n?-1:1),o[r]=u*t,o.willChange=n+", "+r),{"x-placement":e.placement});return e.attributes=g({},a,e.attributes),e.styles=g({},o,e.styles),e.arrowStyles=g({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return ai(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&ai(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=Yo(o,t,e,n.positionFixed),o=Go(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),ai(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},o(mi,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=Yo(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Go(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Jo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Qo(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e)))}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,ei(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[ti("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=ri(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return oi.call(this)}}]),r=mi;function mi(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=mi;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Co(this.update.bind(this)),this.options=g({},mi.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(g({},mi.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=g({},mi.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return g({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&Oo(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}r.Utils=("undefined"!=typeof window?window:p).PopperUtils,r.placements=c,r.Defaults=n;var gi=r,u="function"==typeof Symbol&&Symbol.for,vi=u?Symbol.for("react.element"):60103,bi=u?Symbol.for("react.portal"):60106,wi=u?Symbol.for("react.fragment"):60107,Si=u?Symbol.for("react.strict_mode"):60108,_i=u?Symbol.for("react.profiler"):60114,Ei=u?Symbol.for("react.provider"):60109,Ci=u?Symbol.for("react.context"):60110,Oi=u?Symbol.for("react.async_mode"):60111,xi=u?Symbol.for("react.concurrent_mode"):60111,ki=u?Symbol.for("react.forward_ref"):60112,Di=u?Symbol.for("react.suspense"):60113,Ti=u?Symbol.for("react.suspense_list"):60120,ji=u?Symbol.for("react.memo"):60115,Ii=u?Symbol.for("react.lazy"):60116,Mi=u?Symbol.for("react.block"):60121,Ni=u?Symbol.for("react.fundamental"):60117,Pi=u?Symbol.for("react.responder"):60118,Ai=u?Symbol.for("react.scope"):60119;
30
+ */var Oo=Eo&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Co))}};function xo(e){return e&&"[object Function]"==={}.toString.call(e)}function ko(e,t){return 1!==e.nodeType?[]:(e=e.ownerDocument.defaultView.getComputedStyle(e,null),t?e[t]:e)}function Do(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function To(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=ko(e),n=t.overflow,r=t.overflowX,t=t.overflowY;return/(auto|scroll|overlay)/.test(n+t+r)?e:To(Do(e))}function jo(e){return e&&e.referenceNode?e.referenceNode:e}var Io=Eo&&!(!window.MSInputMethodContext||!document.documentMode),Mo=Eo&&/MSIE 10/.test(navigator.userAgent);function No(e){return 11===e?Io:10!==e&&Io||Mo}function Po(e){if(!e)return document.documentElement;for(var t=No(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===ko(n,"position")?Po(n):n:(e?e.ownerDocument:document).documentElement}function Ao(e){return null!==e.parentNode?Ao(e.parentNode):e}function Ro(e,t){var n,r,o;return e&&e.nodeType&&t&&t.nodeType?(r=(o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)?e:t,o=o?t:e,(n=document.createRange()).setStart(r,0),n.setEnd(o,0),e!==(n=n.commonAncestorContainer)&&t!==n||r.contains(o)?"BODY"===(o=(r=n).nodeName)||"HTML"!==o&&Po(r.firstElementChild)!==r?Po(n):n:(o=Ao(e)).host?Ro(o.host,t):Ro(e,Ao(t).host)):document.documentElement}function Lo(e,t){var t="top"===(1<arguments.length&&void 0!==t?t:"top")?"scrollTop":"scrollLeft",n=e.nodeName;return("BODY"===n||"HTML"===n?(n=e.ownerDocument.documentElement,e.ownerDocument.scrollingElement||n):e)[t]}function Fo(e,t){var t="x"===t?"Left":"Top",n="Left"==t?"Right":"Bottom";return parseFloat(e["border"+t+"Width"])+parseFloat(e["border"+n+"Width"])}function zo(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],No(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Bo(e){var t=e.body,e=e.documentElement,n=No(10)&&getComputedStyle(e);return{height:zo("Height",t,e,n),width:zo("Width",t,e,n)}}o=function(e,t,n){return t&&Ko(e.prototype,t),n&&Ko(e,n),e};function Ko(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 Ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=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};function Uo(e){return g({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Wo(e){var t={};try{No(10)?(t=e.getBoundingClientRect(),n=Lo(e,"top"),r=Lo(e,"left"),t.top+=n,t.left+=r,t.bottom+=n,t.right+=r):t=e.getBoundingClientRect()}catch(e){}var n={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r="HTML"===e.nodeName?Bo(e.ownerDocument):{},t=r.width||e.clientWidth||n.width,r=r.height||e.clientHeight||n.height,t=e.offsetWidth-t,r=e.offsetHeight-r;return(t||r)&&(t-=Fo(e=ko(e),"x"),r-=Fo(e,"y"),n.width-=t,n.height-=r),Uo(n)}function qo(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=No(10),o="HTML"===t.nodeName,i=Wo(e),a=Wo(t),e=To(e),s=ko(t),c=parseFloat(s.borderTopWidth),u=parseFloat(s.borderLeftWidth),a=(n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0)),Uo({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height}));return a.marginTop=0,a.marginLeft=0,!r&&o&&(i=parseFloat(s.marginTop),o=parseFloat(s.marginLeft),a.top-=c-i,a.bottom-=c-i,a.left-=u-o,a.right-=u-o,a.marginTop=i,a.marginLeft=o),a=(r&&!n?t.contains(e):t===e&&"BODY"!==e.nodeName)?function(e,t,n){var n=2<arguments.length&&void 0!==n&&n,r=Lo(t,"top"),t=Lo(t,"left"),n=n?-1:1;return e.top+=r*n,e.bottom+=r*n,e.left+=t*n,e.right+=t*n,e}(a,t):a}function Vo(e){if(!e||!e.parentElement||No())return document.documentElement;for(var t=e.parentElement;t&&"none"===ko(t,"transform");)t=t.parentElement;return t||document.documentElement}function Go(e,t,n,r,o){var i,o=4<arguments.length&&void 0!==o&&o,a={top:0,left:0},s=o?Vo(e):Ro(e,jo(t)),s=("viewport"===r?a=function(e,t){var t=1<arguments.length&&void 0!==t&&t,n=e.ownerDocument.documentElement,e=qo(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),i=t?0:Lo(n),t=t?0:Lo(n,"left");return Uo({top:i-e.top+e.marginTop,left:t-e.left+e.marginLeft,width:r,height:o})}(s,o):(i=void 0,"scrollParent"===r?"BODY"===(i=To(Do(t))).nodeName&&(i=e.ownerDocument.documentElement):i="window"===r?e.ownerDocument.documentElement:r,t=qo(i,s,o),"HTML"!==i.nodeName||function e(t){var n=t.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===ko(t,"position")||!!(n=Do(t))&&e(n))}(s)?a=t:(o=(r=Bo(e.ownerDocument)).height,i=r.width,a.top+=t.top-t.marginTop,a.bottom=o+t.top,a.left+=t.left-t.marginLeft,a.right=i+t.left)),"number"==typeof(n=n||0));return a.left+=s?n:n.left||0,a.top+=s?n:n.top||0,a.right-=s?n:n.right||0,a.bottom-=s?n:n.bottom||0,a}function Yo(e,t,n,r,o,i){var a,i=5<arguments.length&&void 0!==i?i:0;return-1===e.indexOf("auto")?e:(r=Go(n,r,i,o),a={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},(0<(o=(i=Object.keys(a).map(function(e){return g({key:e},a[e],{area:(e=a[e]).width*e.height})}).sort(function(e,t){return t.area-e.area})).filter(function(e){var t=e.width,e=e.height;return t>=n.clientWidth&&e>=n.clientHeight})).length?o:i)[0].key+((t=e.split("-")[1])?"-"+t:""))}function $o(e,t,n,r){r=3<arguments.length&&void 0!==r?r:null;return qo(n,r?Vo(t):Ro(t,jo(n)),r)}function Zo(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),t=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+t,height:e.offsetHeight+n}}function Jo(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function Xo(e,t,n){n=n.split("-")[0];var e=Zo(e),r={width:e.width,height:e.height},o=-1!==["right","left"].indexOf(n),i=o?"top":"left",a=o?"left":"top",s=o?"height":"width",o=o?"width":"height";return r[i]=t[i]+t[s]/2-e[s]/2,r[a]=n===a?t[a]-e[o]:t[Jo(a)],r}function Qo(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function ei(e,n,t){var r,o;return(void 0===t?e:e.slice(0,(e=e,r="name",o=t,Array.prototype.findIndex?e.findIndex(function(e){return e[r]===o}):(t=Qo(e,function(e){return e[r]===o}),e.indexOf(t))))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var t=e.function||e.fn;e.enabled&&xo(t)&&(n.offsets.popper=Uo(n.offsets.popper),n.offsets.reference=Uo(n.offsets.reference),n=t(n,e))}),n}function ti(e,n){return e.some(function(e){var t=e.name;return e.enabled&&t===n})}function ni(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],o=o?""+o+n:e;if(void 0!==document.body.style[o])return o}return null}function ri(e){e=e.ownerDocument;return e?e.defaultView:window}function oi(e,t,n,r){n.updateBound=r,ri(e).addEventListener("resize",n.updateBound,{passive:!0});r=To(e);return function e(t,n,r,o){var i="BODY"===t.nodeName,t=i?t.ownerDocument.defaultView:t;t.addEventListener(n,r,{passive:!0}),i||e(To(t.parentNode),n,r,o),o.push(t)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function ii(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,ri(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function ai(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function si(n,r){Object.keys(r).forEach(function(e){var t="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&ai(r[e])&&(t="px"),n.style[e]=r[e]+t})}function ci(e,t){function n(e){return e}var r=e.offsets,o=r.popper,r=r.reference,i=Math.round,a=Math.floor,r=i(r.width),s=i(o.width),c=-1!==["left","right"].indexOf(e.placement),e=-1!==e.placement.indexOf("-"),c=t?c||e||r%2==s%2?i:a:n,a=t?i:n;return{left:c(r%2==1&&s%2==1&&!e&&t?o.left-1:o.left),top:a(o.top),bottom:a(o.bottom),right:c(o.right)}}var ui=Eo&&/Firefox/i.test(navigator.userAgent);function li(e,t,n){var r,o=Qo(e,function(e){return e.name===t}),e=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});return e||(r="`"+t+"`",console.warn("`"+n+"`"+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),e}var c=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],fi=c.slice(3);function pi(e,t){t=1<arguments.length&&void 0!==t&&t,e=fi.indexOf(e),e=fi.slice(e+1).concat(fi.slice(0,e));return t?e.reverse():e}var di="flip",hi="clockwise",yi="counterclockwise";function mi(e,s,c,t){var o=[0,0],r=-1!==["right","left"].indexOf(t),t=e.split(/(\+|\-)/).map(function(e){return e.trim()}),e=t.indexOf(Qo(t,function(e){return-1!==e.search(/,|\s/)})),n=(t[e]&&-1===t[e].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),/\s*,\s*|\s+/);return(-1!==e?[t.slice(0,e).concat([t[e].split(n)[0]]),[t[e].split(n)[1]].concat(t.slice(e+1))]:[t]).map(function(e,t){var a=(1===t?!r:r)?"height":"width",n=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,n=!0,e):n?(e[e.length-1]+=t,n=!1,e):e.concat(t)},[]).map(function(e){return t=a,n=s,r=c,o=+(i=(e=e).match(/((?:\-|\+)?\d*\.?\d*)(.*)/))[1],i=i[2],o?0===i.indexOf("%")?Uo("%p"===i?n:r)[t]/100*o:"vh"===i||"vw"===i?("vh"===i?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o:e;var t,n,r,o,i})}).forEach(function(n,r){n.forEach(function(e,t){ai(e)&&(o[r]+=e*("-"===n[t-1]?-1:1))})}),o}n={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t,n,r,o=e.placement,i=o.split("-")[0];return(o=o.split("-")[1])&&(t=(n=e.offsets).reference,n=n.popper,r=(i=-1!==["bottom","top"].indexOf(i))?"width":"height",i={start:Ho({},i=i?"left":"top",t[i]),end:Ho({},i,t[i]+t[r]-n[r])},e.offsets.popper=g({},n,i[o])),e}},offset:{order:200,enabled:!0,fn:function(e,t){var t=t.offset,n=e.placement,r=(o=e.offsets).popper,o=o.reference,n=n.split("-")[0],i=void 0,i=ai(+t)?[+t,0]:mi(t,r,o,n);return"left"===n?(r.top+=i[0],r.left-=i[1]):"right"===n?(r.top+=i[0],r.left+=i[1]):"top"===n?(r.left+=i[0],r.top-=i[1]):"bottom"===n&&(r.left+=i[0],r.top+=i[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,r){var t=r.boundariesElement||Po(e.instance.popper),n=(e.instance.reference===t&&(t=Po(t)),ni("transform")),o=e.instance.popper.style,i=o.top,a=o.left,s=o[n],c=(o.top="",o.left="",o[n]="",Go(e.instance.popper,e.instance.reference,r.padding,t,e.positionFixed)),t=(o.top=i,o.left=a,o[n]=s,r.boundaries=c,r.priority),u=e.offsets.popper,l={primary:function(e){var t=u[e];return u[e]<c[e]&&!r.escapeWithReference&&(t=Math.max(u[e],c[e])),Ho({},e,t)},secondary:function(e){var t="right"===e?"left":"top",n=u[t];return u[e]>c[e]&&!r.escapeWithReference&&(n=Math.min(u[t],c[e]-("right"===e?u.width:u.height))),Ho({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=g({},u,l[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=(n=e.offsets).popper,n=n.reference,r=e.placement.split("-")[0],o=Math.floor,i=(r=-1!==["top","bottom"].indexOf(r))?"right":"bottom",a=r?"left":"top",r=r?"width":"height";return t[i]<o(n[a])&&(e.offsets.popper[a]=o(n[a])-t[r]),t[a]>o(n[i])&&(e.offsets.popper[a]=o(n[i])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(li(e.instance.modifiers,"arrow","keepTogether")){t=t.element;if("string"==typeof t){if(!(t=e.instance.popper.querySelector(t)))return e}else if(!e.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var n=e.placement.split("-")[0],r=e.offsets,o=r.popper,r=r.reference,n=-1!==["left","right"].indexOf(n),i=n?"height":"width",a=n?"Top":"Left",s=a.toLowerCase(),c=n?"left":"top",n=n?"bottom":"right",u=Zo(t)[i],n=(r[n]-u<o[s]&&(e.offsets.popper[s]-=o[s]-(r[n]-u)),r[s]+u>o[n]&&(e.offsets.popper[s]+=r[s]+u-o[n]),e.offsets.popper=Uo(e.offsets.popper),r[s]+r[i]/2-u/2),r=ko(e.instance.popper),l=parseFloat(r["margin"+a]),r=parseFloat(r["border"+a+"Width"]),a=n-e.offsets.popper[s]-l-r,a=Math.max(Math.min(o[i]-u,a),0);e.arrowElement=t,e.offsets.arrow=(Ho(n={},s,Math.round(a)),Ho(n,c,""),n)}return e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,l){if(!(ti(u.instance.modifiers,"inner")||u.flipped&&u.placement===u.originalPlacement)){var f=Go(u.instance.popper,u.instance.reference,l.padding,l.boundariesElement,u.positionFixed),p=u.placement.split("-")[0],d=Jo(p),h=u.placement.split("-")[1]||"",y=[];switch(l.behavior){case di:y=[p,d];break;case hi:y=pi(p);break;case yi:y=pi(p,!0);break;default:y=l.behavior}y.forEach(function(e,t){if(p!==e||y.length===t+1)return u;p=u.placement.split("-")[0],d=Jo(p);var e=u.offsets.popper,n=u.offsets.reference,r=Math.floor,n="left"===p&&r(e.right)>r(n.left)||"right"===p&&r(e.left)<r(n.right)||"top"===p&&r(e.bottom)>r(n.top)||"bottom"===p&&r(e.top)<r(n.bottom),o=r(e.left)<r(f.left),i=r(e.right)>r(f.right),a=r(e.top)<r(f.top),e=r(e.bottom)>r(f.bottom),r="left"===p&&o||"right"===p&&i||"top"===p&&a||"bottom"===p&&e,s=-1!==["top","bottom"].indexOf(p),c=!!l.flipVariations&&(s&&"start"===h&&o||s&&"end"===h&&i||!s&&"start"===h&&a||!s&&"end"===h&&e),i=!!l.flipVariationsByContent&&(s&&"start"===h&&i||s&&"end"===h&&o||!s&&"start"===h&&e||!s&&"end"===h&&a),o=c||i;(n||r||o)&&(u.flipped=!0,(n||r)&&(p=y[t+1]),o&&(h="end"===(e=h)?"start":"start"===e?"end":e),u.placement=p+(h?"-"+h:""),u.offsets.popper=g({},u.offsets.popper,Xo(u.instance.popper,u.offsets.reference,u.placement)),u=ei(u.instance.modifiers,u,"flip"))})}return u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=(o=e.offsets).popper,o=o.reference,i=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[i?"left":"top"]=o[n]-(a?r[i?"width":"height"]:0),e.placement=Jo(t),e.offsets.popper=Uo(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(li(e.instance.modifiers,"hide","preventOverflow")){var t=e.offsets.reference,n=Qo(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=(void 0!==(i=Qo(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration)&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"),void 0!==i?i:t.gpuAcceleration),a=Wo(t=Po(e.instance.popper)),o={position:o.position},s=ci(e,window.devicePixelRatio<2||!ui),n="bottom"===n?"top":"bottom",r="right"===r?"left":"right",c=ni("transform"),u=void 0,l=void 0,l="bottom"==n?"HTML"===t.nodeName?-t.clientHeight+s.bottom:-a.height+s.bottom:s.top,u="right"==r?"HTML"===t.nodeName?-t.clientWidth+s.right:-a.width+s.right:s.left,a=(i&&c?(o[c]="translate3d("+u+"px, "+l+"px, 0)",o[n]=0,o[r]=0,o.willChange="transform"):(t="right"==r?-1:1,o[n]=l*("bottom"==n?-1:1),o[r]=u*t,o.willChange=n+", "+r),{"x-placement":e.placement});return e.attributes=g({},a,e.attributes),e.styles=g({},o,e.styles),e.arrowStyles=g({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return si(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&si(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){return o=$o(o,t,e,n.positionFixed),o=Yo(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding),t.setAttribute("x-placement",o),si(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},o(gi,[{key:"update",value:function(){return function(){var e;this.state.isDestroyed||((e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}).offsets.reference=$o(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Yo(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Xo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=ei(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e)))}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,ti(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[ni("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=oi(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return ii.call(this)}}]),r=gi;function gi(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=gi;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Oo(this.update.bind(this)),this.options=g({},gi.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(g({},gi.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=g({},gi.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return g({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&xo(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}r.Utils=("undefined"!=typeof window?window:p).PopperUtils,r.placements=c,r.Defaults=n;var vi=r,u="function"==typeof Symbol&&Symbol.for,bi=u?Symbol.for("react.element"):60103,wi=u?Symbol.for("react.portal"):60106,Si=u?Symbol.for("react.fragment"):60107,_i=u?Symbol.for("react.strict_mode"):60108,Ei=u?Symbol.for("react.profiler"):60114,Ci=u?Symbol.for("react.provider"):60109,Oi=u?Symbol.for("react.context"):60110,xi=u?Symbol.for("react.async_mode"):60111,ki=u?Symbol.for("react.concurrent_mode"):60111,Di=u?Symbol.for("react.forward_ref"):60112,Ti=u?Symbol.for("react.suspense"):60113,ji=u?Symbol.for("react.suspense_list"):60120,Ii=u?Symbol.for("react.memo"):60115,Mi=u?Symbol.for("react.lazy"):60116,Ni=u?Symbol.for("react.block"):60121,Pi=u?Symbol.for("react.fundamental"):60117,Ai=u?Symbol.for("react.responder"):60118,Ri=u?Symbol.for("react.scope"):60119;
31
31
  /** @license React v16.13.1
32
32
  * react-is.production.min.js
33
33
  *
@@ -35,7 +35,7 @@ module.exports=function(n){var r={};function o(e){var t;return(r[e]||(t=r[e]={i:
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 l(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case vi:switch(e=e.type){case Oi:case xi:case wi:case _i:case Si:case Di:return e;default:switch(e=e&&e.$$typeof){case Ci:case ki:case Ii:case ji:case Ei:return e;default:return t}}case bi:return t}}}function Ri(e){return l(e)===xi}var Li={AsyncMode:Oi,ConcurrentMode:xi,ContextConsumer:Ci,ContextProvider:Ei,Element:vi,ForwardRef:ki,Fragment:wi,Lazy:Ii,Memo:ji,Portal:bi,Profiler:_i,StrictMode:Si,Suspense:Di,isAsyncMode:function(e){return Ri(e)||l(e)===Oi},isConcurrentMode:Ri,isContextConsumer:function(e){return l(e)===Ci},isContextProvider:function(e){return l(e)===Ei},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===vi},isForwardRef:function(e){return l(e)===ki},isFragment:function(e){return l(e)===wi},isLazy:function(e){return l(e)===Ii},isMemo:function(e){return l(e)===ji},isPortal:function(e){return l(e)===bi},isProfiler:function(e){return l(e)===_i},isStrictMode:function(e){return l(e)===Si},isSuspense:function(e){return l(e)===Di},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===wi||e===xi||e===_i||e===Si||e===Di||e===Ti||"object"==typeof e&&null!==e&&(e.$$typeof===Ii||e.$$typeof===ji||e.$$typeof===Ei||e.$$typeof===Ci||e.$$typeof===ki||e.$$typeof===Ni||e.$$typeof===Pi||e.$$typeof===Ai||e.$$typeof===Mi)},typeOf:l},o=t(function(e,t){});o.AsyncMode,o.ConcurrentMode,o.ContextConsumer,o.ContextProvider,o.Element,o.ForwardRef,o.Fragment,o.Lazy,o.Memo,o.Portal,o.Profiler,o.StrictMode,o.Suspense,o.isAsyncMode,o.isConcurrentMode,o.isContextConsumer,o.isContextProvider,o.isElement,o.isForwardRef,o.isFragment,o.isLazy,o.isMemo,o.isPortal,o.isProfiler,o.isStrictMode,o.isSuspense,o.isValidElementType,o.typeOf,t(function(e){e.exports=Li}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){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 Fi(){}function zi(){}Function.call.bind(Object.prototype.hasOwnProperty),zi.resetWarningCache=Fi;function Bi(){return Q[Wi]=(Q[Wi]||0)+1}function Ki(e){return Array.isArray(e)?e[0]:e}function Hi(e,t){if("function"==typeof e)return Zi(e,t);null!=e&&(e.current=t)}var Ui=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:zi,resetWarningCache:Fi}).PropTypes=e}),Wi="__global_unique_id__",qi=function(){},Vi=t(function(e,t){t.__esModule=!0,n(m.a);var l=n(Ui),f=n(Bi);function n(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 h(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(qi);var y=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=m.a.Component),c.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},c.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):y,0!==(r|=0))&&this.emitter.set(e.value,r)},c.prototype.render=function(){return this.props.children},c);function c(){var e,t;p(this,c);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=d(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)})}}),d(t,e)}r.childContextTypes=((o={})[n]=l.default.object.isRequired,o),h(u,i=m.a.Component),u.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?y:e},u.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?y:e},u.prototype.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},u.prototype.getValue=function(){return this.context[n]?this.context[n].get():e},u.prototype.render=function(){return e=this.props.children,(Array.isArray(e)?e[0]:e)(this.state.value);var e};var i,o=u;function u(){var e,n;p(this,u);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n=d(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()})},d(n,e)}return o.contextTypes=((t={})[n]=l.default.object,t),{Provider:r,Consumer:o}},e.exports=t.default}),p=(ee(Vi),t(function(e,t){t.__esModule=!0;var n=o(m.a),r=o(Vi);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=ee(p),Gi=c(),Yi=c(),$i=function(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}Jn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return Se.createElement(Gi.Provider,{value:this.referenceNode},Se.createElement(Yi.Provider,{value:this.setReferenceNode},this.props.children))},e}(Se.Component),Zi=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)}},Ji={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Xi={},Qi=function(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&&(Hi(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:$n({},n.props.modifiers,{arrow:$n({},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?$n({position:n.state.data.offsets.popper.position},n.state.data.styles):Ji}),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:Xi}),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 gi(t,e,n.getOptions()))}),s(i(i(n)),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}Jn(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&&So(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(){Hi(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Ki(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 ea(e){var t=e.referenceElement,n=Yn(e,["referenceElement"]);return Se.createElement(Gi.Consumer,null,function(e){return Se.createElement(Qi,$n({referenceElement:void 0!==t?t:e},n))})}s(Qi,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),gi.placements;var ta=function(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){Hi(t.props.innerRef,e),Zi(t.props.setReferenceNode,e)}),t}Jn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Hi(this.props.innerRef,null)},t.render=function(){return qi(Boolean(this.props.setReferenceNode)),Ki(this.props.children)({ref:this.refHandler})},e}(Se.Component);function na(t){return Se.createElement(Yi.Consumer,null,function(e){return Se.createElement(ta,$n({setReferenceNode:e},t))})}function ra(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=De(e),t=ke({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",Ce({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=W(e,Ea);return Se.createElement(Te,Ce({type:"button"},e,{key:t}))})):Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function oa(e){var t=e.className,n=e.heading,r=e.subHeading,o=e.backButton,i=e.backIcon,a=e.backIconCallback,s=e.backButtonCallback,c=e.headingClass,e=De(e),t=ke(Ee({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=ke((Ee(u={},"OverlayHeader-subheading",!0),Ee(u,"OverlayHeader-subheading--withBackButton",o||i),u));return Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),Se.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&Se.createElement(Te,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&Se.createElement(sn,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&Se.createElement(je,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function ia(e){var t=e.children,n=e.className,e=De(e),n=ke({OverlayBody:!0},n);return Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function aa(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function sa(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 ca(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function ua(e){function t(e){switch(p(!0),e){case"first":l(1);break;case"last":l(r);break;case"prev":1<u&&l(u-1);break;case"next":u<r&&l(u+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=e.pageJumpDebounceDuration,s=De(e),c=Oe(Se.useState(e.page),2),u=c[0],l=c[1],f=(c=Oe(Se.useState(!1),2))[0],p=c[1],d=(c=Oe(Se.useState(0),2))[0],h=c[1],y=Se.useCallback(Lt(a,o),[d]),a=(Se.useEffect(function(){l(e.page)},[e.page]),ke((Ee(c={},"Pagination",!0),Ee(c,"Pagination--".concat(n),n),c),i)),d=ke((Ee(o={},"Pagination-buttonWrapper",!0),Ee(o,"Pagination-buttonWrapper--next",!0),o)),i=ke((Ee(c={},"Pagination-buttonWrapper",!0),Ee(c,"Pagination-buttonWrapper--previous",!0),c));return Se.useEffect(function(){f&&(1<=u&&u<=r?y(u):(y.cancel(),h(function(e){return e+1})))},[u]),Se.createElement("div",Ce({"data-test":"DesignSystem-Pagination"},s,{className:a}),Se.createElement("div",{className:i},Se.createElement(Te,{onClick:function(){return t("first")},disabled:u<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),Se.createElement(Te,{onClick:function(){return t("prev")},disabled:u<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&Se.createElement("div",{className:"Pagination-pageIndex"},Se.createElement(hn,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(f||p(!0),l(e))},value:"".concat(R(u)?u:""),"data-test":"DesignSystem-Pagination--Input",onKeyPress:function(e){R(e.key)||e.preventDefault()}}),Se.createElement(je,null," of ".concat(r," pages"))),Se.createElement("div",{className:d},Se.createElement(Te,{onClick:function(){return t("next")},disabled:r<=u,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),Se.createElement(Te,{onClick:function(){return t("last")},disabled:r<=u,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function la(e){function t(e){var t,n;"start"===e&&(t=(n=$(h)).year,n=n.month,d({yearNav:t,monthNav:n})),"end"===e&&(n=(t=$(y)).year,e=t.month,d({yearNav:n,monthNav:e}))}function n(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=pe(c,t,f))&&(d({startDate:r}),y&&(o=(r=$(y)).year,i=r.month,r=r.date,Y(h,"more",o,i,r))&&d({endDate:void 0}),u.onPaste)&&u.onPaste(e,t),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=pe(c,t,f))&&(d({endDate:i}),l.onPaste)&&l.onPaste(e,t)}function r(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=pe(c,t,f))&&(d({startDate:r}),y)&&(o=(r=$(y)).year,i=r.month,r=r.date,Y(h,"more",o,i,r))&&d({endDate:void 0}),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=pe(c,t,f))&&d({endDate:i})}function o(e,t,n){d({init:!0});var r,o=/\d/;"start"===n&&(r=void 0===(r=u.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(r)?d({startError:!0}):(!t||o.test(t))&&t||d({startError:!1}),t&&!t.includes(r)||d({startDate:void 0})),"end"===n&&(n=void 0===(r=l.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(n)?d({endError:!0}):(!t||o.test(t))&&t||d({endError:!1}),t&&!t.includes(n)||d({endDate:void 0}))}function i(e){d({init:!0}),"start"===e&&(d({startDate:void 0}),t("end")),"end"===e&&(d({endDate:void 0}),t("start"))}function a(e){p.open||t(e)}function s(e){return q(f,e,c)}var c=e.inputFormat,u=e.startInputOptions,l=e.endInputOptions,f=e.validators,p=e.state,d=e.setState,e=p.init,h=p.startDate,y=p.endDate,m=p.startError,g=p.endError,v=V[c],b=u.placeholderChar||"_",w=l.placeholderChar||"_",m=u.error||u.required&&m&&e,g=l.error||l.required&&g&&e,S=void 0===u.caption?"Invalid value":u.caption,_=void 0===l.caption?"Invalid value":l.caption,E=u.label,C=l.label;return Se.createElement(Tn,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},E&&Se.createElement(qt,{required:u.required,withInput:!0},E),Se.createElement(mn,Ce({icon:"events",placeholder:c},u,{mask:v,value:h?O(c,h):e?mn.utils.getDefaultValue(v,b):"",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:m,caption:m?S:"",validators:[s],clearOnEmptyBlur:!0}))),Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},C&&Se.createElement(qt,{required:l.required,withInput:!0},C),Se.createElement(mn,Ce({icon:"events",placeholder:c},l,{mask:v,value:y?O(c,y):e?mn.utils.getDefaultValue(v,w):"",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:g,caption:g?_:"",validators:[s],clearOnEmptyBlur:!0}))))}function fa(e){function i(e,t){var n=/\d/;return!(!e||!t||e.includes(h)||!t.includes(h))||!!(e&&n.test(e)&&e.includes(h))||!(e&&!n.test(e)||!e)&&null}var s=e.inputFormat,c=e.inputOptions,u=e.validators,t=e.state,l=e.setState,e=t.init,a=t.startDate,f=t.endDate,p=t.startValue,d=t.endValue,n=t.startError,t=t.endError,r=J[s],n=c.error||c.required&&(n||t)&&e,t=void 0===c.caption?"Invalid value":c.caption,o=c.label,h=void 0===(y=c.placeholderChar)?"_":y,y=mn.utils.getDefaultValue(r,h).split(" - "),m=p||y[0],y=d||y[1];return Se.createElement(Tn,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},Se.createElement(x,null,o&&Se.createElement(qt,{required:c.required,withInput:!0},o),Se.createElement(mn,Ce({icon:"events",placeholder:"".concat(s," - ").concat(s)},c,{mask:r,value:a||f||e?"".concat(m," - ").concat(y):void 0,onChange:function(e,t){var n,r,o,i;t=(t=t||"").split(" - "),i=t[0],t=t[1],p!==i&&i&&!i.includes(h)&&(n=pe(s,i,u))&&(r=d&&!d.includes(h),l({startDate:n,endDate:r?f:void 0}),f)&&(r=(n=$(f)).year,o=n.month,n=n.date,Y(a,"more",r,o,n))&&l({endDate:void 0}),d!==t&&t&&!t.includes(h)&&(r=pe(s,t,u),o=p&&!p.includes(h),r)&&l({endDate:r,startDate:o?a:void 0}),l({startValue:i,endValue:t})},onBlur:function(e,t){var n,r,o;t=t||"",l({init:!0}),t=t.split(" - "),n=t[0],t=t[1],r=i(n,t),o=i(t,n),null!==r&&null!==o&&l({startError:r,endError:o}),n&&!n.includes(h)||l({startDate:void 0}),t&&!t.includes(h)||l({endDate:void 0})},onPaste:function(e,t){var n,r,o,i,a;e=e,t=t||"",n=c.onPaste,r=t.split(" - "),o=r[0],r=r[1],i=pe(s,r,u),a=pe(s,o,u),l({startDate:a,endDate:i,startValue:o,endValue:r}),n&&n(e,t)},onClear:function(){l({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:n,caption:n?t:"",validators:[function(e){var e=Oe(e.split(" - "),2),t=e[0],e=e[1];return q(u,t,s)&&q(u,e,s)}],clearOnEmptyBlur:!0}))))}function pa(e){var t=new Date;return new Date(t.setDate(e))}function da(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 ha(e){e.preventDefault()}function ya(){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!ka(t)&&e&&e.apply(void 0,[t].concat(n)),ka(t)})}}function ma(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},e),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return _e(_e({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _e(_e({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var ga=function(){e(n,Se["Component"]);var t=h(n);function n(e){var o;return d(this,n),Ee(G(o=t.call(this,e)),"triggerRef",void 0),Ee(G(o),"popupRef",void 0),Ee(G(o),"hoverableDelay",void 0),Ee(G(o),"_timer",void 0),Ee(G(o),"_throttleWait",void 0),Ee(G(o),"offsetMapping",void 0),Ee(G(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),Ee(G(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),Ee(G(o),"getUpdatedStyle",function(e,t,n){var r=_e(_e({},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 r}),o.state={animationKeyframe:"",isOpen:o.props.open||!1,uniqueKey:"",showClosingAnimation:!1},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=Se.createRef(),o.popupRef=Se.createRef(),o.getPopperChildren=o.getPopperChildren.bind(G(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(G(o)),o.handleMouseEnter=o.handleMouseEnter.bind(G(o)),o.handleMouseLeave=o.handleMouseLeave.bind(G(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(G(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)&&(e=this.triggerRef.current,e=this.getZIndexForLayer(e),this.setState({zIndex:void 0===e?e:e+1,isOpen:!0}))}},{key:"componentWillUnmount",value:function(){this.removeBoundaryScrollHandler()}},{key:"boundaryScrollHandler",value:function(){var e=this.props,t=e.open,n=e.on,e=e.closeOnScroll;"click"===n&&e&&t&&!this._throttleWait&&(this.togglePopper("onScroll",!1),this._throttleWait=!0)}},{key:"addBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&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,n=this;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():(t(!1,"mouseLeave"),this.setState({showClosingAnimation:!0},function(){window.setTimeout(function(){n.setState({showClosingAnimation:!1,isOpen:!1})},120)})))}},{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.on,t=t.triggerClass,r="hover"===r?{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{ref:e,onClick:function(e){e.stopPropagation(),a.togglePopper("onClick")}},e=ke("PopperWrapper-trigger",t),o=function(t){var e=a.popupRef.current,n=document.body,r=parseInt(window.getComputedStyle(e).zIndex),o=!1,i=!1;return n.querySelectorAll('[data-opened="true"]').forEach(function(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(Cn,Ce({className:e,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"))}},r),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,c=a.children,u=a.open,a=a.animationClass,l=this.state,f=l.zIndex,p=l.animationKeyframe,l=l.uniqueKey,s=_e(_e({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=ke((Ee(f={},"".concat(a.open),this.state.isOpen),Ee(f,"".concat(a.close),!this.state.isOpen),f),c.props.className):(f=null==(f=this.popupRef.current)?void 0:f.offsetHeight,(null==(t=this.popupRef.current)?void 0:t.style.getPropertyValue("transform"))&&f&&i&&!p&&(t=Math.random().toString(36).substring(2,6),p=i.includes("top"),p="\n @keyframes popper-open-".concat(t," {\n from { \n max-height: 0;\n ").concat(p?"margin-top: ".concat(f,"px"):"",";\n }\n to {\n max-height: ").concat(f,"px;\n ").concat(p?"margin-top: 0px":"",";\n }\n }\n @keyframes popper-close-").concat(t," {\n from {\n max-height: ").concat(f,"px;\n ").concat(p?"margin-top: 0px":"",";\n }\n to {\n max-height: 0;\n ").concat(p?"margin-top: ".concat(f,"px"):"",";\n }\n }\n "),this.setState({animationKeyframe:p,uniqueKey:t})),f={animation:u?"popper-open-".concat(l," 120ms cubic-bezier(0, 0, 0.38, 0.9), popper-fade-in 120ms"):"popper-close-".concat(l," 120ms cubic-bezier(0.2, 0, 1, 0.9) 120ms, fadeOut 120ms 120ms")},s=_e(_e(_e({},s),f),{},{overflow:"hidden"})),{ref:r,style:s,"data-placement":i,"data-hide":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onAnimationEnd:function(){u||n.setState({isOpen:!1})}});return Se.cloneElement(c,a?_e(_e({},p),{},{className:o}):_e({},p))}},{key:"render",value:function(){var t=this,e=this.props,n=e.placement,r=e.appendToBody,o=e.hide,e=e.boundaryElement,i=this.state,a=i.animationKeyframe,i=i.isOpen;return Se.createElement($i,null,Se.createElement("style",null,a),Se.createElement(na,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&v.createPortal(Se.createElement(ea,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&Se.createElement(ea,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),va=(Ee(ga,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),ba=function(e){var t=e.position,n=e.customStyle,r=e.dark,o=e.children,i=e.onToggle,a=e.className,s=e.hideOnReferenceEscape,c=e.boundaryElement,u=void 0===c?document.body:c,c=W(e,va),l=Oe(Se.useState(!!e.open),2),f=l[0],p=l[1],l=Oe(Se.useState(!1),2),d=l[0],h=l[1],l=(Se.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),Se.useCallback(function(e){p(e)},[])),r=(Se.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),ke(Ee({Popover:!0},"Popover--dark",r),a)),a=Se.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f},o);return Se.createElement(ga,Ce({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},wa=(ba.displayName="Popover",ba.defaultProps=Object.assign({},te(ga.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),Sa={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},_a=function(e){var t=e.children,n=e.tooltip,r=W(e,wa),n=Se.createElement("div",{className:"Tooltip"},Se.createElement(je,{className:"Tooltip-text",appearance:"white"},n));return Se.createElement(ba,Ce({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(Sa[e.position]),close:"Tooltip-animation-close-".concat(Sa[e.position])},className:"Tooltip-container"}),n)},Ea=(_a.defaultProps=Object.assign({},te(ba.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),f=(ra.displayName="OverlayFooter",oa.displayName="OverlayHeader",ia.defaultProps={stickFooter:!0,withFooter:!0},ia.displayName="OverlayBody",new(function(){function e(){d(this,e),Ee(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}())),n=(Object.freeze(f),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ca(e,t,n.onOutsideClickHandler)}),n.element=aa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&f.add(this.modalRef.current);var e=sa({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=sa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&f.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&&f.isTopOverlay(this.modalRef.current)&&((n||r)&&f.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,c=r.headerOptions,u=r.header,l=r.footerOptions,f=r.seperator,p=r.footer,d=r.onClose,r=e?e-1:1e3,t=ke({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=ke((Ee(o={},"Modal-header",!0),Ee(o,"Modal-header--withSeperator",f),o)),f=ke((Ee(h={},"Modal-footer",!0),Ee(h,"Modal-footer--withSeperator",f),h)),h=ke((Ee(h={},"Row",!0),Ee(h,"Overlay-container",!0),Ee(h,"Overlay-container--open",n),h)),y=c||l||p||u,y=ke((Ee(m={},"Modal-body",!0),Ee(m,"Modal-body--withMargin",!y||!!p),Ee(m,"Modal-body--withPadding",!y||!p),m)),m=De(this.props),h=Se.createElement(Tn,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},Se.createElement(x,Ce({"data-test":"DesignSystem-Modal"},m,{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}),(c||u)&&Se.createElement("div",{className:o},Se.createElement(x,null,!u&&Se.createElement(oa,Ce({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(_a,{tooltip:"Close",position:"bottom"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),n&&s&&Se.createElement(Se.Fragment,null,c||l||p||u?Se.createElement(ia,{className:y},this.props.children):s),(!!p||!!l)&&Se.createElement(ra,Ce({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?Se.createElement(Cn,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,m=v.createPortal(e,this.element);return Se.createElement(Se.Fragment,null,m,Se.createElement(ne,{open:this.state.animate,zIndex:r}))}}]),r}()),r=(Ee(n,"defaultProps",{dimension:"medium"}),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onOutsideClickHandler",function(e){f.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)})}),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ca(e,t,n.onOutsideClickHandler)}),n.element=aa(),n.state={open:e.open,animate:e.open},n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.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=sa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&f.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,c=r.headerOptions,u=r.footer,l=r.footerOptions,f=r.onClose,r=ke({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=ke((Ee(t={},"Overlay-container",!0),Ee(t,"Overlay-container--open",n),t)),t=De(this.props),o=n?Se.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},Se.createElement("div",Ce({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),Se.createElement(Tn,{className:"justify-content-center"},Se.createElement(x,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],Se.createElement(Tn,{className:"FullscreenModal-header"},Se.createElement(x,null,!s&&Se.createElement(oa,Ce({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(_a,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),Se.createElement(ia,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&Se.createElement(ra,Ce({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=v.createPortal(o,this.element);return Se.createElement(Se.Fragment,null,e)}}]),r}()),Ca=(Ee(r,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"sidesheetRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);ca(e,t,n.onOutsideClickHandler)}),n.element=aa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&f.add(this.sidesheetRef.current);var e=sa({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=sa({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.sidesheetRef.current)):(this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&f.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&&f.isTopOverlay(this.sidesheetRef.current)&&((n||r)&&f.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,c=o.footer,u=o.seperator,l=o.stickFooter,f=o.headerOptions,p=o.footerOptions,d=o.header,h=o.onClose,o=t?t-1:1e3,i=ke({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=ke((Ee(y={},"Overlay-container",!0),Ee(y,"fade-in",n),Ee(y,"Overlay-container--open",n),Ee(y,"Overlay-container--close",!n),y)),y=ke((Ee(y={},"Sidesheet-header",!0),Ee(y,"Sidesheet-header--withSeperator",u),y)),u=ke((Ee(m={},"Sidesheet-footer",!0),Ee(m,"Sidesheet-footer--withSeperator",u),Ee(m,"Sidesheet-footer--stickToBottom",l),m)),l=ke((Ee(m={},"Sidesheet-body",!0),Ee(m,"Sidesheet-body--withMargin",!!c&&l),Ee(m,"Sidesheet-body--nextPage",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(m,"Sidesheet-body--firstPage",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),m=ke((Ee(m={},"Sidesheet-header--shiftRight",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(m,"Sidesheet-header--shiftLeft",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),g=De(this.props),n=Se.createElement(Tn,{"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(x,Ce({"data-test":"DesignSystem-Sidesheet"},g,{className:i,size:Ca[s]}),Se.createElement("div",{className:y},Se.createElement(x,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&Se.createElement(oa,Ce({headingClass:m},f)),!!d&&d),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(_a,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){h&&h(e,"IconClick")}})))),Se.createElement(ia,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:l},this.props.children),(!!c||!!p)&&Se.createElement(ra,Ce({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:r,className:u}),c))),t=a?Se.createElement(Cn,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,g=v.createPortal(t,this.element);return Se.createElement(Se.Fragment,null,g,Se.createElement(ne,{open:this.state.animate,zIndex:o}))}}]),r}(),o=(Ee(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=De(e),r=ke({"Modal-description":!0},r);return Se.createElement("div",Ce({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&Se.createElement(je,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&Se.createElement("br",null),n&&Se.createElement(je,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),Oa=(o.displayName="ModalDescription",ua.displayName="Pagination",ua.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"]),p=function(){e(c,Se["Component"]);var s=h(c);function c(e){d(this,c),Ee(G(l=s.call(this,e)),"monthsInView",void 0),Ee(G(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?O(n,e):"",endValue:t?O(n,t):""}}),Ee(G(l),"getErrors",function(e,t){function n(e){var t=(n=l.props).disabledBefore,n=n.disabledAfter,r=(t=$(t)).year,o=t.month,t=t.date,i=(n=$(n)).year,a=n.month,n=n.date;return!e||Y(e,"less",r,o,t)||Y(e,"more",i,a,n)}var r=n(e),o=n(t),t=$(t),i=t.year,a=t.month,t=t.date;return Y(e,"more",i,a,t)&&(o=r=!0),{startError:r,endError:o}}),Ee(G(l),"getInRangeError",function(){var e=l.props.rangeLimit;if(e){var t,n=l.state,r=n.startDate,n=n.endDate,o=$(r),i=o.year,a=o.month,o=o.date,s=$(n),c=s.year,u=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),Y(t,"less",c,u,s+1);if(n)return(t=new Date(n)).setDate(s-e),Y(t,"more",i,a,o-1)}return!1}),Ee(G(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?O(l.props.inputFormat,e):"",endValue:t?O(l.props.inputFormat,t):""})}),Ee(G(l),"onToggleHandler",function(e,t){var n=l.props,r=n.singleInput,o=n.inputOptions,i=n.startInputOptions,n=n.endInputOptions,r=r?o.disabled:i.disabled||n.disabled;if(!r)switch(t){case"outsideClick":l.setState({open:e});break;case"onClick":l.setState({open:!0})}});var l,t=e.inputFormat,n=e.validators,r=y(e.startDate,t,n),t=y(e.endDate,t,n),n=l.getDate(r,t),o=n.startValue,n=n.endValue,i=l.getErrors(r,t),a=i.startError,i=i.endError;return l.state={startDate:r,endDate:t,startValue:o,endValue:n,startError:a,endError:i,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},l.monthsInView=e.monthsInView||(e.withInput?2:1),l}return a(c,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;e.startDate!==this.props.startDate&&(n=(r=this.props).inputFormat,r=r.validators,r=y(this.props.startDate,n,r),n=O(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=y(this.props.endDate,n,r),n=O(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,t=t.endDate,o=(i=this.getErrors(r,t)).startError,i=i.endError,this.setState({startError:o,endError:i}),n&&(a=this.getInRangeError(),s=O(e,r),e=O(e,t),a||o||i?o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e):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.endDate,e.yearNav,e.monthNav,e.open,e.inputFormat),n=(e.outputFormat,e.startInputOptions,e.endInputOptions,e.validators),r=(e.withInput,e.position,e.disabledBefore),o=e.disabledAfter,i=(e.onRangeChange,e.rangeLimit),e=W(e,Oa),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return Se.createElement(ct,Ce({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:y(s,t,n),endDate:y(c,t,n),disabledBefore:y(r,t,n),disabledAfter:y(o,t,n),onRangeChange:this.onRangeChangeHandler,yearNav:u,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,c=t.validators,u=t.singleInput,l=t.contentAlign,t=t.children,f=this.state.open,l=ke((Ee(e={},"DateRangePicker",!0),Ee(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?Se.createElement(fa,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):Se.createElement(la,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),Se.createElement(ba,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(Ee(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:pa(t-e+1),endDate:pa(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:pa(t-e-6),endDate:pa(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:pa(e-90),endDate:pa(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),Ee(p,"defaultProps",_e(_e({},ct.defaultProps),{},{children:Se.createElement(Se.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[N],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return Se.createElement(Se.Fragment,null,e)}),xa=(c.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(/\/.*$/,""),t.some(function(e){e=e.trim().toLowerCase();return"."===e.charAt(0)?n.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e}))}),ka=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Da=function(e){return null!=e},Ta=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)}},ja=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},Ia=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},Ma=function(e,t){e="application/x-moz-file"===e.type||xa(e,t);return[e,e?null:Ta(t)]},Na=function(e,t,n){if(Da(e.size))if(Da(t)&&Da(n)){if(e.size>n)return[!1,ja(n)];if(e.size<t)return[!1,Ia(t)]}else{if(Da(t)&&e.size<t)return[!1,Ia(t)];if(Da(n)&&e.size>n)return[!1,ja(n)]}return[!0,null]},Pa=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"]]),Aa=[".DS_Store","Thumbs.db"];function Ra(){return(Ra=S(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.dataTransfer&&n.dataTransfer?function(){return Fa.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Ba(t.target.files):[]).map(function(e){return La(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function La(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=Pa.get(t))&&Object.defineProperty(e,"type",{value:t,writable:!1,configurable:!1,enumerable:!0});return 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 Fa(){return(Fa=S(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=Ba(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(Ka));case 6:return o=e.sent,e.abrupt("return",za(function n(e){return e.reduce(function(e,t){return[].concat(xe(e),xe(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",za(Ba(t.files).map(function(e){return La(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function za(e){return e.filter(function(e){return-1===Aa.indexOf(e.name)})}function Ba(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Ka(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?qa(t):Ha(e)}function Ha(e){var t=e.getAsFile();return t?(t=La(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function Ua(e){return Wa.apply(this,arguments)}function Wa(){return(Wa=S(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(t.isDirectory?qa:function(){return Va.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function qa(e){var t=e.createReader();return new Promise(function(o,i){var a=[];!function r(){t.readEntries(function(){var t=S(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(Ua)),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 Va(){return(Va=S(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=La(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ga(e){function t(){R&&setTimeout(function(){var e;!k.current||(e=k.current.files)&&e.length||(T({type:"closeDialog"}),"function"==typeof _&&_())},300)}function n(e){e.target instanceof HTMLDivElement&&x.current&&x.current.contains(e.target)||(e.preventDefault(),M.current=[])}function a(e){return p?null:e}var r,o,i,s,c,u,l,f=e.accept,p=e.disabled,d=e.maxSize,h=e.minSize,y=e.multiple,m=e.onDragEnter,g=e.onDragLeave,v=e.onDragOver,b=e.onDrop,w=e.onDropAccepted,S=e.onDropRejected,_=e.onFileDialogCancel,E=e.getFilesFromEvent,C=e.preventDropOnDocument,O=e.validator,x=Object(Se.useRef)(null),k=Object(Se.useRef)(null),D=(e=Oe(Object(Se.useReducer)(ma,Qa),2))[0],T=e[1],e=D.isFocused,R=D.isFileDialogActive,j=D.draggedFiles,L=Object(Se.useCallback)(function(){k.current&&(T({type:"openDialog"}),k.current.value="",k.current.click())},[T]),F=(Object(Se.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[k,R,_]),Object(Se.useCallback)(function(e){x.current&&x.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[x,k])),z=Object(Se.useCallback)(function(){T({type:"focus"})},[]),I=Object(Se.useCallback)(function(){T({type:"blur"})},[]),M=Object(Se.useRef)([]),B=(Object(Se.useEffect)(function(){return C&&(document.addEventListener("dragover",ha,!1),document.addEventListener("drop",n,!1)),function(){C&&(document.removeEventListener("dragover",ha),document.removeEventListener("drop",n))}},[x,C]),Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[].concat(xe(M.current),[t.target]),da(t)&&Promise.resolve(E(t)).then(function(e){ka(t)||(T({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),m&&m(t))})},[E,m])),K=Object(Se.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return da(e)&&v&&v(e),!1},[v]),H=Object(Se.useCallback)(function(e){e.preventDefault(),e.persist();var t=M.current.filter(function(e){return x.current&&x.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(M.current=t).length||(T({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),da(e)&&g&&g(e))},[x,g]),N=Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[],da(t)&&Promise.resolve(E(t)).then(function(e){var a,s;ka(t)||(a=[],s=[],e.forEach(function(e){var t=Oe(Ma(e,f),2),n=t[0],t=t[1],r=Oe(Na(e,h,d),2),o=r[0],r=r[1],i=O?O(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}))}),T({acceptedFiles:a,fileRejections:s,type:"setFiles"}),b&&b(t,a,s),0<s.length&&S&&S(t,s),0<a.length&&w&&w(t,a))}),T({type:"reset"})},[y,f,h,d,E,b,w,S]),F=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.onKeyDown,e.onFocus,e.onBlur,e.onClick,e.onDragEnterCallback),r=e.onDragOverCallback,o=e.onDragLeaveCallback,i=e.onDropCallback,e=W(e,Ja);return _e(Ee({onDragEnter:a(ya(n,B)),onDragOver:a(ya(r,K)),onDragLeave:a(ya(o,H)),onDrop:a(ya(i,N))},t,x),e)}},[x,F,z,I,B,K,H,N,p]),U=Object(Se.useCallback)(function(e){e.stopPropagation()},[]),z=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=W(e,Xa);return _e(_e({},Ee({accept:f,multiple:y,type:"file",style:{display:"none"},onChange:a(ya(n,N)),onClick:a(ya(r,U)),autoComplete:"off",tabIndex:-1},t,k)),e)}},[k,f,y,N,p]),P=0<(I=j.length)&&(A=(P={accept:f,minSize:h,maxSize:d,multiple:y,files:j}).files,r=P.accept,o=P.minSize,i=P.maxSize,!(!P.multiple&&1<A.length))&&A.every(function(e){var t=Oe(Ma(e,r),1)[0],e=Oe(Na(e,o,i),1)[0];return t&&e}),A=0<I&&!P,I=A?(s=(I={accept:f,minSize:h,maxSize:d,multiple:y,files:j}).files,c=I.accept,u=I.minSize,l=I.maxSize,!I.multiple&&1<s.length?"TOO_MANY_FILES":(I=s.every(function(e){return!Oe(Ma(e,c),1)[0]}),s=s.every(function(e){return!Oe(Na(e,u,l),1)[0]}),I?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return _e(_e({},D),{},{isDragAccept:P,isDragReject:A,getRootProps:F,getInputProps:z,rootRef:x,inputRef:k,draggedFiles:j,fileError:I,isFocused:e&&!p,open:a(L)})}function Ya(e){var t=e.accept,n=e.multiple,r=e.uploadButtonLabel,o=e.disabled,i=e.name,a=e.className,s=e.id,c=e.onChange,e=De(e),a=ke(Ee({},"FileUploaderButton",!0),a);return Se.createElement("div",Ce({},e,{className:a}),Se.createElement(Te,{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):[];c&&c(t,e)}}))}function $a(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=xe(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(xe(r.slice(0,o)),xe(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function Za(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Ja=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Xa=["refKey","onChange","onClick"],Qa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Ga.displayName="DropzoneBase",Ga.defaultProps={disabled:!1,getFilesFromEvent:function(e){return Ra.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}};_e(_e({},Ga.defaultProps),{},{type:"standard"}),Ya.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},Ya.displayName="FileUploaderButton",Object.assign({},Ya.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function es(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 ts(e,t,n,r){var o,i=xe(e),a=T(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=_e(_e({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function ns(e,t){var n=_e({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?_e(_e({},n[e.name]),t):t),null!==n[e.name]&&"object"===Z(n[e.name])||(n[e.name]={title:n[e.name]}),n}function rs(e,t){return Math.ceil(e/t)}function os(e,t){var n,r;return(e=e.filter(function(e){return e.disabled&&t||!e.disabled})).length?(n=e.some(function(e){return!e._selected}),r=e.every(function(e){return!e._selected}),{indeterminate:e=0<=e.length&&n&&!r,checked:!e&&!r}):{indeterminate:!1,checked:!1}}function is(e){return e&&!!e.length}function as(e){var t=Se.useContext(vs),n=e.isHead,r=e.firstCell,o=e.schema,i=e.data,a=e.rowIndex,s=e.colIndex,c=e.expandedState,u=e.onSelectAll,l=e.onMenuChange,f=e.onFilterChange,p=e.updateColumnSchema,d=e.reorderColumn,e=e.nestedRowData,h=t.draggable,y=t.separator,m=t.nestedRows,g=t.ref,t=t.withCheckbox,v=o.name,b=o.hidden,w=o.pinned,S=(E={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===(E=o.cellType)?"DEFAULT":E]).width,_=void 0===(_=E.minWidth)?96:_,E=void 0===(E=E.maxWidth)?800:E,C=(x=Oe(Se.useState(!1),2))[0],O=x[1],x=ke({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":C&&h,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:y),"Grid-cell--nestedRow":!n&&0===s&&m});return b?null:Se.createElement("div",{key:"".concat(a,"-").concat(s),className:x,draggable:n&&h,onDragStart:function(e){h&&(O(!0),e.dataTransfer.setData("name",v),w)&&e.dataTransfer.setData("type",w)},onDrag:function(){O(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){O(!1)},onDragEnd:function(e){e.preventDefault(),O(!1)},onDrop:function(e){var t;h&&(O(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:v,type:w||""}).type)&&d&&d(e.name,t.name)},style:{width:es({ref:g,withCheckbox:t},o.width||S),minWidth:es({ref:g,withCheckbox:t},o.minWidth||_),maxWidth:es({ref:g,withCheckbox:t},o.maxWidth||E)}},n?Se.createElement(ws,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d,setIsDragged:O}):Se.createElement(Ss,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c,nestedRowData:e}))}function ss(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?Se.createElement(M,null):Se.createElement(vt,Ce({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),Se.createElement(as,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=Se.useContext(vs),r=e.schema,o=e.onSelectAll,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,c=e.reorderColumn,u=n.withCheckbox,l=n.loading,f=n.selectAll,p=(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}),d=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(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}function cs(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},c?Se.createElement(M,null):Se.createElement(vt,{checked:!!p._selected,onChange:function(e){h(d,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:w.length+t;return"right"===r&&(n+=_.length),Se.createElement(as,{key:"".concat(d,"-").concat(n),rowIndex:d,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[m,g],nestedRowData:E})}))):null}var n,r,o,i,a=(l=Se.useContext(vs)).type,s=l.onRowClick,c=l.loading,u=l.withCheckbox,l=l.nestedRows,f=e.schema,p=e.data,d=e.rowIndex,h=e.onSelect,e=e.className,y=Se.useRef(null),m=(v=Oe(Se.useState(!1),2))[0],g=v[1],v=ke("Grid-row","Grid-row--body",{"Grid-row--selected":p._selected,"Grid-row--disabled":p.disabled}),b=Se.useCallback(function(){"resource"!==a||c||s&&s(p,d)},[p,d]),w=(S=f.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),S=S.filter(function(e){return!e.hidden&&"right"===e.pinned}),_=f.filter(function(e){return!e.hidden&&!e.pinned}),E=(f={data:p,rowIndex:d,expanded:m},C=Se.useContext(vs),n=C.schema,r=C.loading,C=C.nestedRowRenderer,o=f.data,i=f.rowIndex,f=f.expanded,C?C({data:o,schema:n,loading:r,rowIndex:i,expanded:f}):null),C=ke(e,{"Grid-rowWrapper":!0});return Se.createElement("div",{className:C},Se.createElement("div",{"data-test":"DesignSystem-Grid-row",className:v,onClick:b,ref:y},t(w,!!w.length,"left"),t(_,!w.length&&!!_.length),t(S,!1,"right")),l&&m&&Se.createElement("div",{className:"Grid-nestedRow"},E))}function us(e){var n,t,r,o,i=(d=Se.useContext(vs)).data,a=d.ref,s=d.loading,c=d.error,u=d.withPagination,l=d.page,f=d.pageSize,p=d.totalRecords,d=d.errorTemplate;return!s&&c?d?"function"==typeof d?d({}):d:null:(n=e.schema,t=e.prevPageInfo,r=e.updatePrevPageInfo,o=e.onSelect,Se.useEffect(function(){var e=a.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){t.page===l&&(e.scrollTop=t.scrollTop)}),function(){e&&r({page:l,scrollTop:e.scrollTop})}},[]),c=Math.ceil(p/f),d=u&&l===c?p-(l-1)*f:s?f:u?Math.min(p,f):p,Se.createElement("div",{className:"Grid-body"},(s&&!i.length?xe(Array(d).map(function(e){return e})):i).map(function(e,t){return t=t,e=e,Se.createElement(cs,{key:t,rowIndex:t,data:e||i[t],schema:n,onSelect:o})})))}function ls(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?Se.createElement(_a,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},Se.createElement(je,{className:"w-100 ellipsis"},e)):Se.createElement(je,{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(je,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function ps(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?Se.createElement(re,{className:"mr-5",firstName:t,lastName:n}):e?Se.createElement(re,{className:"mr-5"},e):null}function ds(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:ns(o,e.data),a=o.name,s=void 0===(s=o.cellType)?"DEFAULT":s,c=o.align,u=void 0===c?"left":c,l=o.tooltip,f=e[a],p=ke(Ee({},"GridCell",!0));switch(s){case"DEFAULT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?Se.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):ls({tooltip:l,cellData:f}));case"WITH_META_LIST":return Se.createElement("div",{className:"".concat(p," GridCell--metaList")},i?Se.createElement(Se.Fragment,null,Se.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),Se.createElement(I,{length:"large",size:"xxs"})):Se.createElement(Se.Fragment,null,ls({tooltip:l,cellData:f}),fs({cellData:f})));case"AVATAR":return i?Se.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&ps({cellData:f}));case"AVATAR_WITH_TEXT":return i?Se.createElement(M,{imageSize:"medium",round:!0},Se.createElement(I,{className:"ml-3",length:"medium"})):Se.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&ps({cellData:f}),ls({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?Se.createElement(M,{imageSize:"medium",round:!0},Se.createElement(I,{className:"ml-3",length:"medium"}),Se.createElement(I,{className:"ml-3",length:"large"})):Se.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&ps({cellData:f}),Se.createElement("div",{className:"GridCell-metaListWrapper"},ls({tooltip:l,cellData:f}),fs({cellData:f})));case"ICON":return i?Se.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--icon"),"data-test":"DesignSystem-GridCell-icon"},(t=(t={cellData:f}).cellData,n=t.title,(t=t.icon||n)?Se.createElement(P,{name:t}):null));case"STATUS_HINT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?Se.createElement(M,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},Se.createElement(I,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?Se.createElement(jn,{appearance:t},n):null))}return null}function hs(e){var t=e.options,n=e.onChange,r=(e=Oe(Se.useState(!1),2))[0],o=e[1],i=(e=Oe(Se.useState(t),2))[0],a=e[1],s=(e=Oe(Se.useState("var(--spacing-8)"),2))[0],c=e[1];return Se.useEffect(function(){a(t)},[r]),Se.createElement("div",{className:"Dropdown"},Se.createElement(ba,{open:r,onToggle:function(e){o(e)},trigger:Se.createElement(Te,{type:"button",ref:function(e){c("".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(gs(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},Se.createElement("div",{className:"Dropdown-wrapper"},Se.createElement("div",{className:"OptionWrapper"},Se.createElement(vt,{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 _e(_e({},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(ms(i,e,r))}},Se.createElement(vt,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=xe(i))[t]=_e(_e({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),Se.createElement(P,{name:"drag_handle",className:"mr-4"}))})),Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),Se.createElement(Te,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function ys(e){var t=e.loading,n=e.error,r=e.data,o=e.schema,i=e.withSearch,a=e.showHead,s=e.withPagination,c=e.page,u=e.pageSize,l=e.withCheckbox,f=e.children,p=e.updateSchema,d=void 0===(y=e.filterList)?{}:y,h=e.updateFilterList,y=void 0===(y=e.totalRecords)?0:y,m=e.onSelectAll,g=e.searchPlaceholder,v=e.selectAll,b=e.searchTerm,w=e.updateSearchTerm,S=e.dynamicColumn,_=e.allowSelectAll,E=e.showFilters,e=e.customSelectionLabel,C=(D=Oe(Se.useState(!1),2))[0],O=D[1],x=(D=Oe(Se.useState(!0),2))[0],k=D[1],D=(Se.useEffect(function(){k(!x)},[o]),Se.useEffect(function(){v&&v.checked&&m&&m(!0,C)},[C]),Se.useEffect(function(){v&&!v.checked&&O(!1)},[v]),o.filter(function(e){return e.filters})),T=o.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}}),e=e||"item",r=r.filter(function(e){return e._selected}).length,j=(c-1)*u+1,c=Math.min(c*u,y),u=n?"Showing 0 ".concat(e,"s"):l&&r?C?"Selected all ".concat(y," ").concat(e).concat(gs(y)):"Selected ".concat(r," ").concat(e).concat(gs(y)," on this page"):(s?"Showing ".concat(j,"-").concat(c," of "):"Showing ").concat(y," ").concat(e).concat(gs(y));return Se.createElement("div",{className:"Header"},Se.createElement("div",{className:"Header-content Header-content--top"},i&&Se.createElement("div",{className:"Header-search"},Se.createElement(fn,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:g,onChange:function(e){e=e.target.value;w&&w(e)},value:b,onClear:function(){return w&&w("")},disabled:t&&!is(o),autoComplete:"off"})),E&&0<D.length&&Se.createElement("div",{className:"Header-dropdown"},Se.createElement("div",{className:"Header-filters"},D.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return _e(_e({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return Se.createElement(rn,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=_e(_e({},d),{},Ee({},t,e)),h&&h(t)}})}))),f&&Se.createElement("div",{className:"Header-actions"},f)),Se.createElement("div",{className:"Header-content Header-content--bottom"},Se.createElement("div",{className:"Header-label"},!a&&l&&!t&&Se.createElement(vt,Ce({},v,{onChange:function(e){m&&m(e.target.checked)}})),t?Se.createElement(M,{withImage:!a&&l},Se.createElement(I,{length:"small",size:"s"})):Se.createElement(Se.Fragment,null,Se.createElement(qt,null,u),s&&(null==v?void 0:v.checked)&&_&&Se.createElement("div",{className:"ml-4"},C?Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return O(!1)}},"Clear Selection"):Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return O(!0)}},"Select all ".concat(y," ").concat(e,"s"))))),S&&Se.createElement("div",{className:"Header-hideColumns"},Se.createElement(hs,{options:T,onChange:function(e){e=e.map(function(t){return _e(_e({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var ms=function(e,t,n){return t===n?e:t<n?[].concat(xe(e.slice(0,t)),xe(e.slice(t+1,n+1)),[e[t]],xe(e.slice(n+1))):[].concat(xe(e.slice(0,n)),[e[t]],xe(e.slice(n,t)),xe(e.slice(t+1)))},gs=function(e){return 1<e?"s":""},n={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},vs=Se.createContext(_e(_e({},n),{},{ref:null})),bs=vs.Provider,ws=function(e){function t(){return Se.createElement(Se.Fragment,null,Se.createElement(je,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),m&&Se.createElement("div",{className:"Grid-sortingIcons"},w?"asc"===w?Se.createElement(P,{name:"arrow_upward"}):Se.createElement(P,{name:"arrow_downward"}):Se.createElement(P,{name:"unfold_more"})))}var n=Se.useContext(vs),r=e.schema,a=e.setIsDragged,o=e.colIndex,i=e.onSelectAll,s=e.onMenuChange,c=e.onFilterChange,u=e.updateColumnSchema,e=e.reorderColumn,o={schema:r,colIndex:o,onSelectAll:i,onMenuChange:s,onFilterChange:c,updateColumnSchema:u,reorderColumn:e,setIsDragged:a},l=n.loading,i=n.draggable,e=n.showMenu,f=n.sortingList,p=n.filterList,d=n.headCellTooltip,h=n.showFilters,n=n.schema,y=r.sorting,m=void 0===y||y,g=r.name,y=r.filters,v=r.pinned,n=is(n),b=f.findIndex(function(e){return e.name===g}),w=-1!==b?f[b].type:null,S=Se.createRef(),f=[{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"}],_={label:"Unpin",value:"unpin",icon:"replay"},_=("left"===v&&(b[0]=_),"right"===v&&(b[1]=_),{label:"Unsort",value:"unsort",icon:"unfold_more"}),_=("asc"===w&&(f[0]=_),"desc"===w&&(f[1]=_),[].concat(b,[{label:"Hide Column",value:"hide",icon:"cancel"}])),b=(m&&(_=[].concat(f,xe(_))),ke({"Grid-headCell":!0,"Grid-headCell--draggable":i})),f=y?y.map(function(t){return _e(_e({},t),{},{selected:p[g]&&-1!==p[g].findIndex(function(e){return e===t.value})})}):[];return Se.createElement("div",{key:g,className:b,ref:S},Se.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&m&&("asc"===w&&s(g,"sortDesc"),"desc"===w&&s(g,"unsort"),w||s(g,"sortAsc"))}},l&&!n?Se.createElement(M,{withImage:!1},Se.createElement(I,{length:"medium"})):!r.headerCellRenderer&&d?Se.createElement(_a,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!d?r.headerCellRenderer(o):t()),h&&y&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",null,Se.createElement(M,null)):Se.createElement("div",null,Se.createElement(rn,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"filter_list",appearance:"transparent"})}},options:f,align:"left",onChange:function(e){return c(g,e)},minWidth:176}))),e&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",{className:"ml-4"},Se.createElement(M,null)):Se.createElement("div",null,Se.createElement(rn,{key:"".concat(g,"-").concat(w,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return s(g,e)},minWidth:176}))),r.resizable&&Se.createElement("span",{className:"Grid-cellResize",onMouseDown:function(){function e(e){e.preventDefault(),i&&o(n,{width:e.pageX-i})}var t,n,r,o,i;t={updateColumnSchema:u},n=g,r=S.current,o=t.updateColumnSchema,i=null==r?void 0:r.getBoundingClientRect().x,window.addEventListener("mousemove",e),window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",e)}),a(!1)}}))},Ss=function(e){var t=Se.useContext(vs),n=e.data,r=e.schema,o=e.expandedState,i=e.rowIndex,a=e.colIndex,s=e.nestedRowData,e=t.size,c=t.loading,t=t.nestedRows,o=Oe(o,2),u=o[0],l=o[1],o={rowIndex:i,colIndex:a,size:e,schema:r,data:n,loading:c,expanded:u};return Se.createElement("div",{className:"Grid-cellContent"},0===a&&t&&Se.createElement(Se.Fragment,null,s?Se.createElement(P,{className:"Grid-nestedRowTrigger",name:u?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){s&&(e.stopPropagation(),l(!u))}}):Se.createElement("span",{className:"Grid-nestedRowPlaceholder"})),r.cellRenderer?r.cellRenderer(o):Se.createElement(ds,Ce({key:"".concat(i,"-").concat(a)},o)))},_s=(cs.defaultProps={data:{}},function(){e(n,Se["Component"]);var t=h(n);function n(e){var i;d(this,n),Ee(G(i=t.call(this,e)),"gridRef",null),Ee(G(i),"isHeadSyncing",!1),Ee(G(i),"isBodySyncing",!1),Ee(G(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)}}),Ee(G(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),Ee(G(i),"updateColumnSchema",function(t,e){var n=xe(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=_e(_e({},n[r]),e),i.updateRenderedSchema(n)}),Ee(G(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=ms(e,r,o);i.updateRenderedSchema(e)}),Ee(G(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),Ee(G(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),Ee(G(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":$a({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":$a({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":$a({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":Za({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":Za({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":Za({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),Ee(G(i),"onFilterChange",function(e,t){e=_e(_e({},i.props.filterList),{},Ee({},e,t));i.updateFilterList(e)}),Ee(G(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),Ee(G(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),Ee(G(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=De(this.props),n=this.state,r=n.init,n=n.prevPageInfo,o=this.props,i=o.type,a=o.size,s=o.showHead,c=o.className,u=o.page,l=o.loading,o=o.loaderSchema,l=(f=this.props.schema,l=l,o=o,f=!is(f=f)&&l?o:f),f=ke((Ee(o={Grid:"true"},"Grid--".concat(i),i),Ee(o,"Grid--".concat(a),a),o),c);return Se.createElement("div",Ce({className:f},e,{ref:function(e){t.gridRef=e}}),r&&Se.createElement(bs,{value:_e(_e({},this.props),{},{ref:this.gridRef})},s&&Se.createElement(ss,{schema:l,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(us,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),Es=(Ee(_s,"defaultProps",void 0),_s.defaultProps=n,ds.displayName="GridCell",["children"]),r={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(ys.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(sn,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},u=function(){e(i,Se["Component"]);var o=h(i);function i(e){d(this,i),Ee(G(l=o.call(this,e)),"debounceUpdate",void 0),Ee(G(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),Ee(G(l),"updateDataFn",function(){var e=l.props,t=e.fetchData,n=e.pageSize,r=e.withPagination,o=e.data,e=e.onSearch,i=l.state,a=i.async,s=i.page,c=i.sortingList,u=i.filterList,i=i.searchTerm,i=(l.onSelect(-1,!1),{page:s,pageSize:n,sortingList:c,filterList:u,searchTerm:i});l.props.withPagination||(delete i.page,delete i.pageSize),a?t&&t(i).then(function(e){var t,n;(!e.searchTerm||e.searchTerm&&e.searchTerm===l.state.searchTerm)&&(t=e.data,n=(l.state.schema.length?l.state:e).schema,l.setState({data:t,schema:n,selectAll:os(t,l.props.selectDisabledRow),totalRecords:e.count,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND"}))}).catch(function(){l.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}(a=l.state.schema,o,u),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=xe(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=ns(o[r],e),t=ns(o[r],t);return e[n.name].title.localeCompare(t[n.name].title)}:e),"desc"===n.type)&&i.reverse()}),i}(a,e&&void 0!==i.searchTerm?e(t,i.searchTerm):t,c)).length,r&&s&&n&&(o=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)}(o,s,n)),e=l.state.schema.length?l.state.schema:a,l.setState({totalRecords:u,error:!o.length,errorType:"NO_RECORDS_FOUND",selectAll:os(o,l.props.selectDisabledRow),schema:e,data:o}))}),Ee(G(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=ts(n,o,{_selected:t},l.props.selectDisabledRow),l.setState({data:i,selectAll:os(i,l.props.selectDisabledRow)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),Ee(G(l),"onSelectAll",function(e,t){var n=l.props.onSelect,r=l.state.data,o=Array.from({length:r.length},function(e,t){return t}),r=ts(r,o,{_selected:e},l.props.selectDisabledRow),i=[];r.forEach(function(e,t){e._selected&&i.push(t)}),n&&n(i,e,r.filter(function(e){return e._selected}),t),l.setState({data:r,selectAll:os(r,l.props.selectDisabledRow)})}),Ee(G(l),"onPageChange",function(e){l.setState({page:e})}),Ee(G(l),"updateSchema",function(e){l.setState({schema:e})}),Ee(G(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?xe(e):e.slice(-1),page:1})}),Ee(G(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),Ee(G(l),"updateSearchTerm",function(e){l.setState({searchTerm:e,page:1})});var l,t="fetchData"in l.props,n=e.data||[],r=e.schema||[];return l.state={async:t,data:t?[]:n,schema:t?[]:r,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:os([]),searchTerm:void 0},l.debounceUpdate=Lt(e.searchDebounceDuration,l.updateDataFn),l}return a(i,[{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,n=n.schema,this.setState({data:r=void 0===r?[]:r,schema:void 0===n?[]:n,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:r.length||0,selectAll:os([])})),e.loading!==this.props.loading&&(r=(n=this.props).data,e=n.schema,this.setState({data:n=void 0===r?[]:r,schema:void 0===e?[]:e,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:n.length||0,selectAll:os([])},function(){o.updateData()}))),t.page!==this.state.page&&(r=this.props.onPageChange)&&r(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||(e=t.searchTerm!==this.state.searchTerm,this.updateData(e))}},{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,c=e.nestedRowRenderer,u=e.withHeader,l=e.headerOptions,f=e.withCheckbox,p=e.showMenu,d=e.withPagination,h=e.paginationType,y=e.pageSize,m=e.pageJumpDebounceDuration,g=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,w=e.className,e=e.filterPosition,S=De(this.props),_=l.children,l=W(l,Es),w=w?" ".concat(w):"",E=this.state.totalRecords,C=rs(E,y);return Se.createElement("div",Ce({},S,{className:"Table".concat(w),"data-test":"DesignSystem-Table-wrapper"}),u&&Se.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},Se.createElement(ys,Ce({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:f,withPagination:d,pageSize:y,showFilters:"HEADER"===e},l),_)),Se.createElement("div",{className:"Table-grid"},Se.createElement(_s,Ce({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:f,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:p,showHead:t,type:n,size:r,headCellTooltip:o,separator:i,draggable:a,nestedRows:s,nestedRowRenderer:c,withPagination:d&&1<C,pageSize:y,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===e}))),d&&!this.state.loading&&!this.state.error&&1<C&&Se.createElement("div",{className:"Table-pagination"},Se.createElement(ua,{page:this.state.page,totalPages:rs(E,y),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:m})))}}]),i}(),Cs=(Ee(u,"defaultProps",r),Se.useState,Se.useEffect,Se.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),Os=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=De(e),n=ke(Ee({},"InlineMessage",!0),n),i=ke((Ee(i={},"InlineMessage-icon--warning","warning"===t),Ee(i,"InlineMessage-icon--small","small"===o),Ee(i,"InlineMessage-icon--regular","regular"===o),i)),a=ke(Ee({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,c="small"===o?"medium":void 0;return Se.createElement("div",Ce({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&Se.createElement(P,{"data-test":"DesignSystem-InlineMessage--Icon",name:Cs[t],appearance:t,className:i,size:s}),Se.createElement(je,{size:o,weight:c,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},xs=(Os.displayName="InlineMessage",Os.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t=e.error,e=e.message;return e?t?Se.createElement(Os,{size:"small",className:"mt-3",appearance:"alert",description:e}):Se.createElement("div",{className:"mt-3"},Se.createElement(je,{appearance:"subtle",size:"small",weight:"medium"},e)):null}),ks=(xs.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign","iconType"]),Ds={tiny:12,regular:16},o=Se.forwardRef(function(e,t){var n=e.children,r=e.type,o=e.className,i=e.disabled,a=e.tabIndex,s=e.icon,c=e.subtle,u=e.size,l=e.iconAlign,f=e.iconType,e=W(e,ks),c=ke((Ee(p={},"LinkButton",!0),Ee(p,"LinkButton--".concat(u),u),Ee(p,"LinkButton--default",!c),Ee(p,"LinkButton--subtle",c),Ee(p,"LinkButton--iconAlign-".concat(l),n&&l),Ee(p,"".concat(o),o),p)),p=ke((Ee(o={},"LinkButton-icon",!0),Ee(o,"LinkButton-icon--".concat(l),n&&l),o));return Se.createElement("button",Ce({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:c,disabled:i,tabIndex:a},e),Se.createElement(Se.Fragment,null,s&&Se.createElement("div",{className:p},Se.createElement(P,{"data-test":"DesignSystem-LinkButton--Icon",name:s,type:f,size:u&&Ds[u]})),n))});o.displayName="LinkButton",o.defaultProps={size:"regular",type:"button",iconAlign:"left"},new Map}.call(this,js(23))},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(R,e,t){"use strict";t.r(e);var u=t(0),o=t(1);function l(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 f(e){return l(e).toList()}function c(e){if(e)return f(e).get(0)}function n(e){if(e){var n=c(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=f(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function a(e){var t=u.RichUtils.tryToRemoveBlockStyle(e);return t?u.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=f(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,c=a===i.size-1?o:i.get(a).getText().length;t+=i.get(a).getText().slice(s,c)}}return t}function p(e){var t=e.getCurrentContent(),n=e.getSelection(),n=(t=u.Modifier.removeRange(t,n,"forward")).getSelectionAfter(),r=t.getBlockForKey(n.getStartKey()),t=u.Modifier.insertText(t,n,"\n",r.getInlineStyleAt(n.getStartOffset()),null);return u.EditorState.push(e,t,"insert-fragment")}function d(e){var t=u.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return a(u.EditorState.push(e,t,"split-block"))}function h(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=u.Modifier.removeRange(e.getCurrentContent(),t,"forward");return u.EditorState.push(e,t,"remove-range")}function y(e,t){t=u.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return u.EditorState.push(e,t,"change-block-data")}function m(e){var r=new o.Map({}),t=f(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==function(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 g=Object(o.Map)({code:{element:"pre"}}),v=u.DefaultDraftBlockRenderMap.merge(g);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function w(e,t,n){var r,o,i=e.getSelection(),i=i.getIsBackward()?i.getFocusKey():i.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i),c=s.getType();return"unordered-list-item"!==c&&"ordered-list-item"!==c||!(a=a.getBlockBefore(i))||a.getType()!==c||(i=s.getDepth(),1===t&&i===n)?e:(c=Math.min(a.getDepth()+1,n),r=t,o=c,i=(s=e).getSelection(),n=(a=s.getCurrentContent()).getBlockMap(),t=l(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),c=a.merge({blockMap:n,selectionBefore:i,selectionAfter:i}),u.EditorState.push(e,c,"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()?u.RichUtils.insertSoftNewline(e):p(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?w(t,-1,r):void 0:void 0:d(t)):void 0}function _(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 E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 O(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=f(e);if(0<s.size){t=function(){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)!function(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"===C(t))return t.v}return{}}function x(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=c(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 k(e,t){var n,r=c(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 D(e,t,n){j[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function T(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach(function(e){E(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},j.color,{},j.bgcolor,{},j.fontSize,{},j.fontFamily,{CODE:j.CODE,SUPERSCRIPT:j.SUPERSCRIPT,SUBSCRIPT:j.SUBSCRIPT})}var j={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 I(e,t,n){var r=e.getSelection(),o=Object.keys(j[t]).reduce(function(e,t){return u.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=u.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return u.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=u.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=u.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),D(t,e,n)),o}function M(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?D("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?D("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?D("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&D("fontFamily","fontFamily",e.substr(11))})}function N(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 P(n,c){if(n&&c&&0<c.length){var e=function(){var e=n.getSelection(),o={};if(e.isCollapsed())return c.forEach(function(e){o[e]=function(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=f(n);if(0<s.size){for(var t=0;t<s.size;t+=1)!function(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)!function(t){t===e?c.forEach(function(e){o[e]=N(s.get(n),e,t)}):c.forEach(function(e){o[e]&&o[e]!==N(s.get(n),e,t)&&(o[e]=void 0)})}(r)}(t);return{v:o}}}();if("object"===C(e))return e.v}return{}}function A(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=u.Modifier.removeInlineStyle(n,t.getSelection(),e)}),u.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return b}),t.d(e,"changeDepth",function(){return w}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return k}),t.d(e,"getCustomStyleMap",function(){return T}),t.d(e,"toggleCustomInlineStyle",function(){return I}),t.d(e,"getSelectionEntity",function(){return x}),t.d(e,"extractInlineStyle",function(){return M}),t.d(e,"removeAllInlineStyles",function(){return A}),t.d(e,"getSelectionInlineStyle",function(){return O}),t.d(e,"getSelectionCustomInlineStyle",function(){return P}),t.d(e,"getSelectedBlocksMap",function(){return l}),t.d(e,"getSelectedBlocksList",function(){return f}),t.d(e,"getSelectedBlock",function(){return c}),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 p}),t.d(e,"insertNewUnstyledBlock",function(){return d}),t.d(e,"clearEditorContent",function(){return h}),t.d(e,"setBlockData",function(){return y}),t.d(e,"getSelectedBlocksMetadata",function(){return m}),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;
38
+ */function l(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case bi:switch(e=e.type){case xi:case ki:case Si:case Ei:case _i:case Ti:return e;default:switch(e=e&&e.$$typeof){case Oi:case Di:case Mi:case Ii:case Ci:return e;default:return t}}case wi:return t}}}function Li(e){return l(e)===ki}var Fi={AsyncMode:xi,ConcurrentMode:ki,ContextConsumer:Oi,ContextProvider:Ci,Element:bi,ForwardRef:Di,Fragment:Si,Lazy:Mi,Memo:Ii,Portal:wi,Profiler:Ei,StrictMode:_i,Suspense:Ti,isAsyncMode:function(e){return Li(e)||l(e)===xi},isConcurrentMode:Li,isContextConsumer:function(e){return l(e)===Oi},isContextProvider:function(e){return l(e)===Ci},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===bi},isForwardRef:function(e){return l(e)===Di},isFragment:function(e){return l(e)===Si},isLazy:function(e){return l(e)===Mi},isMemo:function(e){return l(e)===Ii},isPortal:function(e){return l(e)===wi},isProfiler:function(e){return l(e)===Ei},isStrictMode:function(e){return l(e)===_i},isSuspense:function(e){return l(e)===Ti},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Si||e===ki||e===Ei||e===_i||e===Ti||e===ji||"object"==typeof e&&null!==e&&(e.$$typeof===Mi||e.$$typeof===Ii||e.$$typeof===Ci||e.$$typeof===Oi||e.$$typeof===Di||e.$$typeof===Pi||e.$$typeof===Ai||e.$$typeof===Ri||e.$$typeof===Ni)},typeOf:l},o=t(function(e,t){});o.AsyncMode,o.ConcurrentMode,o.ContextConsumer,o.ContextProvider,o.Element,o.ForwardRef,o.Fragment,o.Lazy,o.Memo,o.Portal,o.Profiler,o.StrictMode,o.Suspense,o.isAsyncMode,o.isConcurrentMode,o.isContextConsumer,o.isContextProvider,o.isElement,o.isForwardRef,o.isFragment,o.isLazy,o.isMemo,o.isPortal,o.isProfiler,o.isStrictMode,o.isSuspense,o.isValidElementType,o.typeOf,t(function(e){e.exports=Fi}),Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){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 zi(){}function Bi(){}Function.call.bind(Object.prototype.hasOwnProperty),Bi.resetWarningCache=zi;function Ki(){return Q[qi]=(Q[qi]||0)+1}function Hi(e){return Array.isArray(e)?e[0]:e}function Ui(e,t){if("function"==typeof e)return Ji(e,t);null!=e&&(e.current=t)}var Wi=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:Bi,resetWarningCache:zi}).PropTypes=e}),qi="__global_unique_id__",Vi=function(){},Gi=t(function(e,t){t.__esModule=!0,n(m.a);var l=n(Wi),f=n(Ki);function n(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 h(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(Vi);var y=1073741823;t.default=function(e,a){var t,s,n="__create-react-context-"+(0,f.default)()+"__",r=(h(c,s=m.a.Component),c.prototype.getChildContext=function(){var e={};return e[n]=this.emitter,e},c.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):y,0!==(r|=0))&&this.emitter.set(e.value,r)},c.prototype.render=function(){return this.props.children},c);function c(){var e,t;p(this,c);for(var n,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t=d(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)})}}),d(t,e)}r.childContextTypes=((o={})[n]=l.default.object.isRequired,o),h(u,i=m.a.Component),u.prototype.componentWillReceiveProps=function(e){e=e.observedBits;this.observedBits=null==e?y:e},u.prototype.componentDidMount=function(){this.context[n]&&this.context[n].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?y:e},u.prototype.componentWillUnmount=function(){this.context[n]&&this.context[n].off(this.onUpdate)},u.prototype.getValue=function(){return this.context[n]?this.context[n].get():e},u.prototype.render=function(){return e=this.props.children,(Array.isArray(e)?e[0]:e)(this.state.value);var e};var i,o=u;function u(){var e,n;p(this,u);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n=d(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()})},d(n,e)}return o.contextTypes=((t={})[n]=l.default.object,t),{Provider:r,Consumer:o}},e.exports=t.default}),p=(ee(Gi),t(function(e,t){t.__esModule=!0;var n=o(m.a),r=o(Gi);function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||r.default,e.exports=t.default})),c=ee(p),Yi=c(),$i=c(),Zi=function(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}Xn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return Se.createElement(Yi.Provider,{value:this.referenceNode},Se.createElement($i.Provider,{value:this.setReferenceNode},this.props.children))},e}(Se.Component),Ji=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)}},Xi={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},Qi={},ea=function(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&&(Ui(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:Zn({},n.props.modifiers,{arrow:Zn({},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?Zn({position:n.state.data.offsets.popper.position},n.state.data.styles):Xi}),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:Qi}),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}Xn(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&&_o(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(){Ui(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return Hi(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 ta(e){var t=e.referenceElement,n=$n(e,["referenceElement"]);return Se.createElement(Yi.Consumer,null,function(e){return Se.createElement(ea,Zn({referenceElement:void 0!==t?t:e},n))})}s(ea,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1}),vi.placements;var na=function(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){Ui(t.props.innerRef,e),Ji(t.props.setReferenceNode,e)}),t}Xn(e,o);var t=e.prototype;return t.componentWillUnmount=function(){Ui(this.props.innerRef,null)},t.render=function(){return Vi(Boolean(this.props.setReferenceNode)),Hi(this.props.children)({ref:this.refHandler})},e}(Se.Component);function ra(t){return Se.createElement($i.Consumer,null,function(e){return Se.createElement(na,Zn({setReferenceNode:e},t))})}function oa(e){var n=e.open,t=e.className,r=e.children,o=e.actions,e=De(e),t=ke({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",Ce({ref:i},e,{className:t}),o.map(function(e,t){e.label;e=W(e,Ca);return Se.createElement(Te,Ce({type:"button"},e,{key:t}))})):Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayFooter",ref:i},e,{className:t}),r)}function ia(e){var t=e.className,n=e.heading,r=e.subHeading,o=e.backButton,i=e.backIcon,a=e.backIconCallback,s=e.backButtonCallback,c=e.headingClass,e=De(e),t=ke(Ee({OverlayHeader:!0},"OverlayHeader--withBackButton",o||i),t),u=ke((Ee(u={},"OverlayHeader-subheading",!0),Ee(u,"OverlayHeader-subheading--withBackButton",o||i),u));return Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayHeader"},e,{className:t}),Se.createElement("div",{className:"OverlayHeader-headerWrapper"},(o||i)&&Se.createElement(Te,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:s||a}),n&&Se.createElement(cn,{className:c,"data-test":"DesignSystem-OverlayHeader--heading"},n)),r&&Se.createElement(je,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:u},r))}function aa(e){var t=e.children,n=e.className,e=De(e),n=ke({OverlayBody:!0},n);return Se.createElement("div",Ce({"data-test":"DesignSystem-OverlayBody"},e,{className:n}),t)}function sa(){var e=document.querySelector(".Overlay-wrapper");return null===e&&((e=document.createElement("div")).classList.add("Overlay-wrapper"),document.body.appendChild(e)),e}function ca(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 ua(e,t,n){"Escape"===e.key&&t&&(n(e),e.preventDefault())}function la(e){function t(e){switch(p(!0),e){case"first":l(1);break;case"last":l(r);break;case"prev":1<u&&l(u-1);break;case"next":u<r&&l(u+1)}}var n=e.type,r=e.totalPages,o=e.onPageChange,i=e.className,a=e.pageJumpDebounceDuration,s=De(e),c=Oe(Se.useState(e.page),2),u=c[0],l=c[1],f=(c=Oe(Se.useState(!1),2))[0],p=c[1],d=(c=Oe(Se.useState(0),2))[0],h=c[1],y=Se.useCallback(Ft(a,o),[d]),a=(Se.useEffect(function(){l(e.page)},[e.page]),ke((Ee(c={},"Pagination",!0),Ee(c,"Pagination--".concat(n),n),c),i)),d=ke((Ee(o={},"Pagination-buttonWrapper",!0),Ee(o,"Pagination-buttonWrapper--next",!0),o)),i=ke((Ee(c={},"Pagination-buttonWrapper",!0),Ee(c,"Pagination-buttonWrapper--previous",!0),c));return Se.useEffect(function(){f&&(1<=u&&u<=r?y(u):(y.cancel(),h(function(e){return e+1})))},[u]),Se.createElement("div",Ce({"data-test":"DesignSystem-Pagination"},s,{className:a}),Se.createElement("div",{className:i},Se.createElement(Te,{onClick:function(){return t("first")},disabled:u<=1,appearance:"transparent",icon:"first_page","data-test":"DesignSystem-Pagination--FirstButton"}),Se.createElement(Te,{onClick:function(){return t("prev")},disabled:u<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:"ml-4 mr-3"})),"jump"===n&&Se.createElement("div",{className:"Pagination-pageIndex"},Se.createElement(yn,{name:"page",className:"Pagination-MetricInput",onChange:function(e){e.preventDefault();e=+e.target.value.trim();0<=e&&e<=r&&(f||p(!0),l(e))},value:"".concat(R(u)?u:""),"data-test":"DesignSystem-Pagination--Input",onKeyPress:function(e){R(e.key)||e.preventDefault()}}),Se.createElement(je,null," of ".concat(r," pages"))),Se.createElement("div",{className:d},Se.createElement(Te,{onClick:function(){return t("next")},disabled:r<=u,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:"mr-4 ml-3"}),Se.createElement(Te,{onClick:function(){return t("last")},disabled:r<=u,appearance:"transparent",icon:"last_page","data-test":"DesignSystem-Pagination--LastButton"})))}function fa(e){function t(e){var t,n;"start"===e&&(t=(n=$(h)).year,n=n.month,d({yearNav:t,monthNav:n})),"end"===e&&(n=(t=$(y)).year,e=t.month,d({yearNav:n,monthNav:e}))}function n(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=pe(c,t,f))&&(d({startDate:r}),y&&(o=(r=$(y)).year,i=r.month,r=r.date,Y(h,"more",o,i,r))&&d({endDate:void 0}),u.onPaste)&&u.onPaste(e,t),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=pe(c,t,f))&&(d({endDate:i}),l.onPaste)&&l.onPaste(e,t)}function r(e,t,n){var r,o,i;d({open:!0}),"start"===n&&(r=u.placeholderChar||"_",t)&&!t.includes(r)&&(r=pe(c,t,f))&&(d({startDate:r}),y)&&(o=(r=$(y)).year,i=r.month,r=r.date,Y(h,"more",o,i,r))&&d({endDate:void 0}),"end"===n&&(o=l.placeholderChar||"_",t)&&!t.includes(o)&&(i=pe(c,t,f))&&d({endDate:i})}function o(e,t,n){d({init:!0});var r,o=/\d/;"start"===n&&(r=void 0===(r=u.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(r)?d({startError:!0}):(!t||o.test(t))&&t||d({startError:!1}),t&&!t.includes(r)||d({startDate:void 0})),"end"===n&&(n=void 0===(r=l.placeholderChar)?"_":r,t&&o.test(t)&&t.includes(n)?d({endError:!0}):(!t||o.test(t))&&t||d({endError:!1}),t&&!t.includes(n)||d({endDate:void 0}))}function i(e){d({init:!0}),"start"===e&&(d({startDate:void 0}),t("end")),"end"===e&&(d({endDate:void 0}),t("start"))}function a(e){p.open||t(e)}function s(e){return q(f,e,c)}var c=e.inputFormat,u=e.startInputOptions,l=e.endInputOptions,f=e.validators,p=e.state,d=e.setState,e=p.init,h=p.startDate,y=p.endDate,m=p.startError,g=p.endError,v=V[c],b=u.placeholderChar||"_",w=l.placeholderChar||"_",m=u.error||u.required&&m&&e,g=l.error||l.required&&g&&e,S=void 0===u.caption?"Invalid value":u.caption,_=void 0===l.caption?"Invalid value":l.caption,E=u.label,C=l.label;return Se.createElement(jn,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--startDate"},E&&Se.createElement(Vt,{required:u.required,withInput:!0},E),Se.createElement(gn,Ce({icon:"events",placeholder:c},u,{mask:v,value:h?O(c,h):e?gn.utils.getDefaultValue(v,b):"",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:m,caption:m?S:"",validators:[s],clearOnEmptyBlur:!0}))),Se.createElement(x,{size:"6",sizeXS:"12",className:"DateRangePicker-input DateRangePicker-input--endDate"},C&&Se.createElement(Vt,{required:l.required,withInput:!0},C),Se.createElement(gn,Ce({icon:"events",placeholder:c},l,{mask:v,value:y?O(c,y):e?gn.utils.getDefaultValue(v,w):"",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:g,caption:g?_:"",validators:[s],clearOnEmptyBlur:!0}))))}function pa(e){function i(e,t){var n=/\d/;return!(!e||!t||e.includes(h)||!t.includes(h))||!!(e&&n.test(e)&&e.includes(h))||!(e&&!n.test(e)||!e)&&null}var s=e.inputFormat,c=e.inputOptions,u=e.validators,t=e.state,l=e.setState,e=t.init,a=t.startDate,f=t.endDate,p=t.startValue,d=t.endValue,n=t.startError,t=t.endError,r=J[s],n=c.error||c.required&&(n||t)&&e,t=void 0===c.caption?"Invalid value":c.caption,o=c.label,h=void 0===(y=c.placeholderChar)?"_":y,y=gn.utils.getDefaultValue(r,h).split(" - "),m=p||y[0],y=d||y[1];return Se.createElement(jn,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},Se.createElement(x,null,o&&Se.createElement(Vt,{required:c.required,withInput:!0},o),Se.createElement(gn,Ce({icon:"events",placeholder:"".concat(s," - ").concat(s)},c,{mask:r,value:a||f||e?"".concat(m," - ").concat(y):void 0,onChange:function(e,t){var n,r,o,i;t=(t=t||"").split(" - "),i=t[0],t=t[1],p!==i&&i&&!i.includes(h)&&(n=pe(s,i,u))&&(r=d&&!d.includes(h),l({startDate:n,endDate:r?f:void 0}),f)&&(r=(n=$(f)).year,o=n.month,n=n.date,Y(a,"more",r,o,n))&&l({endDate:void 0}),d!==t&&t&&!t.includes(h)&&(r=pe(s,t,u),o=p&&!p.includes(h),r)&&l({endDate:r,startDate:o?a:void 0}),l({startValue:i,endValue:t})},onBlur:function(e,t){var n,r,o;t=t||"",l({init:!0}),t=t.split(" - "),n=t[0],t=t[1],r=i(n,t),o=i(t,n),null!==r&&null!==o&&l({startError:r,endError:o}),n&&!n.includes(h)||l({startDate:void 0}),t&&!t.includes(h)||l({endDate:void 0})},onPaste:function(e,t){var n,r,o,i,a;e=e,t=t||"",n=c.onPaste,r=t.split(" - "),o=r[0],r=r[1],i=pe(s,r,u),a=pe(s,o,u),l({startDate:a,endDate:i,startValue:o,endValue:r}),n&&n(e,t)},onClear:function(){l({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:n,caption:n?t:"",validators:[function(e){var e=Oe(e.split(" - "),2),t=e[0],e=e[1];return q(u,t,s)&&q(u,e,s)}],clearOnEmptyBlur:!0}))))}function da(e){var t=new Date;return new Date(t.setDate(e))}function ha(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 ya(e){e.preventDefault()}function ma(){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!Da(t)&&e&&e.apply(void 0,[t].concat(n)),Da(t)})}}function ga(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},e),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return _e(_e({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _e(_e({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var va=function(){e(n,Se["Component"]);var t=h(n);function n(e){var o;return d(this,n),Ee(G(o=t.call(this,e)),"triggerRef",void 0),Ee(G(o),"popupRef",void 0),Ee(G(o),"hoverableDelay",void 0),Ee(G(o),"_timer",void 0),Ee(G(o),"_throttleWait",void 0),Ee(G(o),"offsetMapping",void 0),Ee(G(o),"togglePopper",function(e,t){var n=o.props,r=n.open;(0,n.onToggle)(void 0===t?!r:t,e)}),Ee(G(o),"doesEventContainsElement",function(e,t){t=t.current;return t&&t.contains(e.target)}),Ee(G(o),"getUpdatedStyle",function(e,t,n){var r=_e(_e({},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 r}),o.state={animationKeyframe:"",isOpen:o.props.open||!1,uniqueKey:"",showClosingAnimation:!1},o.hoverableDelay=100,o.offsetMapping={small:"2px",medium:"4px",large:"8px"},o.triggerRef=Se.createRef(),o.popupRef=Se.createRef(),o.getPopperChildren=o.getPopperChildren.bind(G(o)),o.mouseMoveHandler=o.mouseMoveHandler.bind(G(o)),o.handleMouseEnter=o.handleMouseEnter.bind(G(o)),o.handleMouseLeave=o.handleMouseLeave.bind(G(o)),o.boundaryScrollHandler=o.boundaryScrollHandler.bind(G(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)&&(e=this.triggerRef.current,e=this.getZIndexForLayer(e),this.setState({zIndex:void 0===e?e:e+1,isOpen:!0}))}},{key:"componentWillUnmount",value:function(){this.removeBoundaryScrollHandler()}},{key:"boundaryScrollHandler",value:function(){var e=this.props,t=e.open,n=e.on,e=e.closeOnScroll;"click"===n&&e&&t&&!this._throttleWait&&(this.togglePopper("onScroll",!1),this._throttleWait=!0)}},{key:"addBoundaryScrollHandler",value:function(){this.props.boundaryElement&&this.props.boundaryElement.addEventListener("scroll",this.boundaryScrollHandler)}},{key:"removeBoundaryScrollHandler",value:function(){this.props.boundaryElement&&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,n=this;"hover"===this.props.on&&(e=(t=this.props).hoverable,t=t.onToggle,e?this.mouseMoveHandler():(t(!1,"mouseLeave"),this.setState({showClosingAnimation:!0},function(){window.setTimeout(function(){n.setState({showClosingAnimation:!1,isOpen:!1})},120)})))}},{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.on,t=t.triggerClass,r="hover"===r?{ref:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{ref:e,onClick:function(e){e.stopPropagation(),a.togglePopper("onClick")}},e=ke("PopperWrapper-trigger",t),o=function(t){var e=a.popupRef.current,n=document.body,r=parseInt(window.getComputedStyle(e).zIndex),o=!1,i=!1;return n.querySelectorAll('[data-opened="true"]').forEach(function(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(On,Ce({className:e,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"))}},r),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,c=a.children,u=a.open,a=a.animationClass,l=this.state,f=l.zIndex,p=l.animationKeyframe,l=l.uniqueKey,s=_e(_e({},s?this.getUpdatedStyle(o,i,s):o),{},{zIndex:f}),o="",p=(a?o=ke((Ee(f={},"".concat(a.open),this.state.isOpen),Ee(f,"".concat(a.close),!this.state.isOpen),f),c.props.className):(f=null==(f=this.popupRef.current)?void 0:f.offsetHeight,(null==(t=this.popupRef.current)?void 0:t.style.getPropertyValue("transform"))&&f&&i&&!p&&(t=Math.random().toString(36).substring(2,6),p=i.includes("top"),p="\n @keyframes popper-open-".concat(t," {\n from { \n max-height: 0;\n ").concat(p?"margin-top: ".concat(f,"px"):"",";\n }\n to {\n max-height: ").concat(f,"px;\n ").concat(p?"margin-top: 0px":"",";\n }\n }\n @keyframes popper-close-").concat(t," {\n from {\n max-height: ").concat(f,"px;\n ").concat(p?"margin-top: 0px":"",";\n }\n to {\n max-height: 0;\n ").concat(p?"margin-top: ".concat(f,"px"):"",";\n }\n }\n "),this.setState({animationKeyframe:p,uniqueKey:t})),f={animation:u?"popper-open-".concat(l," 120ms cubic-bezier(0, 0, 0.38, 0.9), popper-fade-in 120ms"):"popper-close-".concat(l," 120ms cubic-bezier(0.2, 0, 1, 0.9) 120ms, fadeOut 120ms 120ms")},s=_e(_e(_e({},s),f),{},{overflow:"hidden"})),{ref:r,style:s,"data-placement":i,"data-hide":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onAnimationEnd:function(){u||n.setState({isOpen:!1})}});return Se.cloneElement(c,a?_e(_e({},p),{},{className:o}):_e({},p))}},{key:"render",value:function(){var t=this,e=this.props,n=e.placement,r=e.appendToBody,o=e.hide,e=e.boundaryElement,i=this.state,a=i.animationKeyframe,i=i.isOpen;return Se.createElement(Zi,null,Se.createElement("style",null,a),Se.createElement(ra,{innerRef:this.triggerRef},function(e){e=e.ref;return t.getTriggerElement(e)}),i&&r&&v.createPortal(Se.createElement(ta,{placement:n,innerRef:this.popupRef,modifiers:{preventOverflow:{boundariesElement:e||document.body},hide:{enabled:o}}},this.getPopperChildren),document.body),i&&!r&&Se.createElement(ta,{placement:n,innerRef:this.popupRef},this.getPopperChildren))}}]),n}(),ba=(Ee(va,"defaultProps",{on:"click",offset:"medium",closeOnBackdropClick:!0,hoverable:!0,appendToBody:!0,style:{}}),["position","customStyle","dark","children","onToggle","className","hideOnReferenceEscape","boundaryElement"]),wa=function(e){var t=e.position,n=e.customStyle,r=e.dark,o=e.children,i=e.onToggle,a=e.className,s=e.hideOnReferenceEscape,c=e.boundaryElement,u=void 0===c?document.body:c,c=W(e,ba),l=Oe(Se.useState(!!e.open),2),f=l[0],p=l[1],l=Oe(Se.useState(!1),2),d=l[0],h=l[1],l=(Se.useEffect(function(){void 0!==e.open&&p(e.open)},[e.open]),Se.useCallback(function(e){p(e)},[])),r=(Se.useEffect(function(){d||"current"in u&&u.current&&h(!0)},[u]),ke(Ee({Popover:!0},"Popover--dark",r),a)),a=Se.createElement("div",{"data-test":"DesignSystem-Popover",className:r,"data-layer":!0,"data-opened":f},o);return Se.createElement(va,Ce({},c,{init:d,boundaryElement:"current"in u?u.current:u,open:f,hide:s,style:n,onToggle:i||l,placement:t}),a)},Sa=(wa.displayName="Popover",wa.defaultProps=Object.assign({},te(va.defaultProps,["appendToBody","trigger","hoverable","on","open","closeOnBackdropClick","offset","closeOnScroll"],!0),{offset:"large",position:"bottom",hideOnReferenceEscape:!0,customStyle:{}}),["children","tooltip"]),_a={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},Ea=function(e){var t=e.children,n=e.tooltip,r=W(e,Sa),n=Se.createElement("div",{className:"Tooltip"},Se.createElement(je,{className:"Tooltip-text",appearance:"white"},n));return Se.createElement(wa,Ce({trigger:t,on:"hover",offset:"medium"},r,{animationClass:{open:"Tooltip-animation-open-".concat(_a[e.position]),close:"Tooltip-animation-close-".concat(_a[e.position])},className:"Tooltip-container"}),n)},Ca=(Ea.defaultProps=Object.assign({},te(wa.defaultProps,["trigger","on","open","offset","onToggle","dark","customStyle","closeOnBackdropClick","hideOnReferenceEscape","closeOnScroll"]),{hoverable:!1}),["label"]),f=(oa.displayName="OverlayFooter",ia.displayName="OverlayHeader",aa.defaultProps={stickFooter:!0,withFooter:!0},aa.displayName="OverlayBody",new(function(){function e(){d(this,e),Ee(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}())),n=(Object.freeze(f),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ua(e,t,n.onOutsideClickHandler)}),n.element=sa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&f.add(this.modalRef.current);var e=ca({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=ca({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&f.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&&f.isTopOverlay(this.modalRef.current)&&((n||r)&&f.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,c=r.headerOptions,u=r.header,l=r.footerOptions,f=r.seperator,p=r.footer,d=r.onClose,r=e?e-1:1e3,t=ke({Modal:!0,"Modal--open":n,"Modal-animation--open":t,"Modal-animation--close":!t},o),o=ke((Ee(o={},"Modal-header",!0),Ee(o,"Modal-header--withSeperator",f),o)),f=ke((Ee(h={},"Modal-footer",!0),Ee(h,"Modal-footer--withSeperator",f),h)),h=ke((Ee(h={},"Row",!0),Ee(h,"Overlay-container",!0),Ee(h,"Overlay-container--open",n),h)),y=c||l||p||u,y=ke((Ee(m={},"Modal-body",!0),Ee(m,"Modal-body--withMargin",!y||!!p),Ee(m,"Modal-body--withPadding",!y||!p),m)),m=De(this.props),h=Se.createElement(jn,{"data-test":"DesignSystem-ModalContainer",className:h,"data-layer":!0,"data-opened":n,style:{zIndex:e||1001}},Se.createElement(x,Ce({"data-test":"DesignSystem-Modal"},m,{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}),(c||u)&&Se.createElement("div",{className:o},Se.createElement(x,null,!u&&Se.createElement(ia,Ce({"data-test":"DesignSystem-Modal--header"},c)),!!u&&u),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Ea,{tooltip:"Close",position:"bottom"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:function(e){d&&d(e,"IconClick")}})))),n&&s&&Se.createElement(Se.Fragment,null,c||l||p||u?Se.createElement(aa,{className:y},this.props.children):s),(!!p||!!l)&&Se.createElement(oa,Ce({"data-test":"DesignSystem-Modal--footer"},l,{open:n,className:f}),p))),e=i?Se.createElement(On,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},h):h,m=v.createPortal(e,this.element);return Se.createElement(Se.Fragment,null,m,Se.createElement(ne,{open:this.state.animate,zIndex:r}))}}]),r}()),r=(Ee(n,"defaultProps",{dimension:"medium"}),function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"modalRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onOutsideClickHandler",function(e){f.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)})}),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.modalRef.current);ua(e,t,n.onOutsideClickHandler)}),n.element=sa(),n.state={open:e.open,animate:e.open},n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.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=ca({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef}),this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&f.add(this.modalRef.current)):(this.setState({animate:!1},function(){window.setTimeout(function(){t.setState({open:!1})},120)}),this.props.closeOnEscape&&f.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,c=r.headerOptions,u=r.footer,l=r.footerOptions,f=r.onClose,r=ke({FullscreenModal:!0,"FullscreenModal-animation--open":t,"FullscreenModal-animation--close":!t},o),o=ke((Ee(t={},"Overlay-container",!0),Ee(t,"Overlay-container--open",n),t)),t=De(this.props),o=n?Se.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:o,"data-layer":!0,style:{zIndex:e}},Se.createElement("div",Ce({"data-test":"DesignSystem-FullscreenModal"},t,{className:r,ref:this.modalRef}),Se.createElement(jn,{className:"justify-content-center"},Se.createElement(x,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[i],Se.createElement(jn,{className:"FullscreenModal-header"},Se.createElement(x,null,!s&&Se.createElement(ia,Ce({"data-test":"DesignSystem-FullscreenModal--header"},c)),!!s&&s),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Ea,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:function(e){f&&f(e,"IconClick")}})))),Se.createElement(aa,{"data-test":"DesignSystem-FullscreenModal--Body",className:"FullscreenModal-body"},a),(!!u||!!l)&&Se.createElement(oa,Ce({"data-test":"DesignSystem-FullscreenModal--footer"},l,{open:n,className:"FullscreenModal-footer"}),u))))):null,e=v.createPortal(o,this.element);return Se.createElement(Se.Fragment,null,e)}}]),r}()),Oa=(Ee(r,"defaultProps",{dimension:"medium"}),{regular:"6",large:"10"}),u=function(){e(r,Se["Component"]);var t=h(r);function r(e){var n;return d(this,r),Ee(G(n=t.call(this,e)),"sidesheetRef",Se.createRef()),Ee(G(n),"element",void 0),Ee(G(n),"onCloseHandler",function(e){var t=f.isTopOverlay(n.sidesheetRef.current);ua(e,t,n.onOutsideClickHandler)}),n.element=sa(),n.state={open:e.open,animate:e.open},n.onOutsideClickHandler=n.onOutsideClickHandler.bind(G(n)),n}return a(r,[{key:"componentDidMount",value:function(){this.props.closeOnEscape&&(this.state.open&&f.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&f.add(this.sidesheetRef.current);var e=ca({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=ca({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef}),this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&f.add(this.sidesheetRef.current)):(this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&f.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&&f.isTopOverlay(this.sidesheetRef.current)&&((n||r)&&f.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,c=o.footer,u=o.seperator,l=o.stickFooter,f=o.headerOptions,p=o.footerOptions,d=o.header,h=o.onClose,o=t?t-1:1e3,i=ke({Sidesheet:!0,"Sidesheet--open":r,"Sidesheet-animation--open":n,"Sidesheet-animation--close":!n},i),n=ke((Ee(y={},"Overlay-container",!0),Ee(y,"fade-in",n),Ee(y,"Overlay-container--open",n),Ee(y,"Overlay-container--close",!n),y)),y=ke((Ee(y={},"Sidesheet-header",!0),Ee(y,"Sidesheet-header--withSeperator",u),y)),u=ke((Ee(m={},"Sidesheet-footer",!0),Ee(m,"Sidesheet-footer--withSeperator",u),Ee(m,"Sidesheet-footer--stickToBottom",l),m)),l=ke((Ee(m={},"Sidesheet-body",!0),Ee(m,"Sidesheet-body--withMargin",!!c&&l),Ee(m,"Sidesheet-body--nextPage",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(m,"Sidesheet-body--firstPage",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),m=ke((Ee(m={},"Sidesheet-header--shiftRight",(null==f?void 0:f.backButton)||(null==f?void 0:f.backIcon)),Ee(m,"Sidesheet-header--shiftLeft",!(null!=f&&f.backButton||null!=f&&f.backIcon)),m)),g=De(this.props),n=Se.createElement(jn,{"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(x,Ce({"data-test":"DesignSystem-Sidesheet"},g,{className:i,size:Oa[s]}),Se.createElement("div",{className:y},Se.createElement(x,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&Se.createElement(ia,Ce({headingClass:m},f)),!!d&&d),Se.createElement(x,{className:"flex-grow-0"},Se.createElement(Ea,{tooltip:"Close"},Se.createElement(Te,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:function(e){h&&h(e,"IconClick")}})))),Se.createElement(aa,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:l},this.props.children),(!!c||!!p)&&Se.createElement(oa,Ce({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:r,className:u}),c))),t=a?Se.createElement(On,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},n):n,g=v.createPortal(t,this.element);return Se.createElement(Se.Fragment,null,g,Se.createElement(ne,{open:this.state.animate,zIndex:o}))}}]),r}(),o=(Ee(u,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}}),function(e){var t=e.title,n=e.description,r=e.className,e=De(e),r=ke({"Modal-description":!0},r);return Se.createElement("div",Ce({"data-test":"DesignSystem-ModalDescription"},e,{className:r}),t&&Se.createElement(je,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&n&&Se.createElement("br",null),n&&Se.createElement(je,{"data-test":"DesignSystem-ModalDescription--Description"},n))}),xa=(o.displayName="ModalDescription",la.displayName="Pagination",la.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"]),p=function(){e(c,Se["Component"]);var s=h(c);function c(e){d(this,c),Ee(G(l=s.call(this,e)),"monthsInView",void 0),Ee(G(l),"getDate",function(e,t){var n=l.props.inputFormat;return{startValue:e?O(n,e):"",endValue:t?O(n,t):""}}),Ee(G(l),"getErrors",function(e,t){function n(e){var t=(n=l.props).disabledBefore,n=n.disabledAfter,r=(t=$(t)).year,o=t.month,t=t.date,i=(n=$(n)).year,a=n.month,n=n.date;return!e||Y(e,"less",r,o,t)||Y(e,"more",i,a,n)}var r=n(e),o=n(t),t=$(t),i=t.year,a=t.month,t=t.date;return Y(e,"more",i,a,t)&&(o=r=!0),{startError:r,endError:o}}),Ee(G(l),"getInRangeError",function(){var e=l.props.rangeLimit;if(e){var t,n=l.state,r=n.startDate,n=n.endDate,o=$(r),i=o.year,a=o.month,o=o.date,s=$(n),c=s.year,u=s.month,s=s.date;if(r)return(t=new Date(r)).setDate(o+e),Y(t,"less",c,u,s+1);if(n)return(t=new Date(n)).setDate(s-e),Y(t,"more",i,a,o-1)}return!1}),Ee(G(l),"onRangeChangeHandler",function(e,t){l.setState({init:!0,startDate:e,endDate:t,startValue:e?O(l.props.inputFormat,e):"",endValue:t?O(l.props.inputFormat,t):""})}),Ee(G(l),"onToggleHandler",function(e,t){var n=l.props,r=n.singleInput,o=n.inputOptions,i=n.startInputOptions,n=n.endInputOptions,r=r?o.disabled:i.disabled||n.disabled;if(!r)switch(t){case"outsideClick":l.setState({open:e});break;case"onClick":l.setState({open:!0})}});var l,t=e.inputFormat,n=e.validators,r=y(e.startDate,t,n),t=y(e.endDate,t,n),n=l.getDate(r,t),o=n.startValue,n=n.endValue,i=l.getErrors(r,t),a=i.startError,i=i.endError;return l.state={startDate:r,endDate:t,startValue:o,endValue:n,startError:a,endError:i,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},l.monthsInView=e.monthsInView||(e.withInput?2:1),l}return a(c,[{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a,s;e.startDate!==this.props.startDate&&(n=(r=this.props).inputFormat,r=r.validators,r=y(this.props.startDate,n,r),n=O(n,r),this.setState({startDate:r,startValue:n})),e.endDate!==this.props.endDate&&(n=(r=this.props).inputFormat,r=r.validators,r=y(this.props.endDate,n,r),n=O(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,t=t.endDate,o=(i=this.getErrors(r,t)).startError,i=i.endError,this.setState({startError:o,endError:i}),n&&(a=this.getInRangeError(),s=O(e,r),e=O(e,t),a||o||i?o?n(void 0,i?void 0:t,s,e):n(r,void 0,s,e):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.endDate,e.yearNav,e.monthNav,e.open,e.inputFormat),n=(e.outputFormat,e.startInputOptions,e.endInputOptions,e.validators),r=(e.withInput,e.position,e.disabledBefore),o=e.disabledAfter,i=(e.onRangeChange,e.rangeLimit),e=W(e,xa),a=this.state,s=a.startDate,c=a.endDate,u=a.yearNav,a=a.monthNav;return Se.createElement(ct,Ce({},e,{monthsInView:this.monthsInView,rangePicker:!0,startDate:y(s,t,n),endDate:y(c,t,n),disabledBefore:y(r,t,n),disabledAfter:y(o,t,n),onRangeChange:this.onRangeChangeHandler,yearNav:u,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,c=t.validators,u=t.singleInput,l=t.contentAlign,t=t.children,f=this.state.open,l=ke((Ee(e={},"DateRangePicker",!0),Ee(e,"DateRangePicker--".concat(l),l),e));return n?(e=u?Se.createElement(pa,{inputFormat:a,inputOptions:i,validators:c,state:this.state,setState:this.setState.bind(this)}):Se.createElement(fa,{inputFormat:a,startInputOptions:r,endInputOptions:o,validators:c,state:this.state,setState:this.setState.bind(this)}),Se.createElement(wa,{trigger:e,triggerClass:"w-100",className:l,position:s,appendToBody:!0,open:f,onToggle:this.onToggleHandler},t,this.renderCalendar())):this.renderCalendar()}}]),c}(),c=(Ee(p,"utils",{getCurrentWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:da(t-e+1),endDate:da(t-e+7)}},getPreviousWeek:function(){var e=new Date,t=e.getDate(),e=e.getDay();return{startDate:da(t-e-6),endDate:da(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:da(e-90),endDate:da(e)}},getCustomDates:function(){return{startDate:"",endDate:""}},getCurrentYear:function(){return(new Date).getFullYear()},getCurrentMonth:function(){return(new Date).getMonth()}}),Ee(p,"defaultProps",_e(_e({},ct.defaultProps),{},{children:Se.createElement(Se.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[N],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}})),function(e){e=e.children;return Se.createElement(Se.Fragment,null,e)}),ka=(c.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(/\/.*$/,""),t.some(function(e){e=e.trim().toLowerCase();return"."===e.charAt(0)?n.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e}))}),Da=function(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble},Ta=function(e){return null!=e},ja=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)}},Ia=function(e){return{type:"FILE_TOO_LARGE",message:"File is larger than ".concat(e," bytes")}},Ma=function(e){return{type:"FILE_TOO_SMALL",message:"File is smaller than ".concat(e," bytes")}},Na=function(e,t){e="application/x-moz-file"===e.type||ka(e,t);return[e,e?null:ja(t)]},Pa=function(e,t,n){if(Ta(e.size))if(Ta(t)&&Ta(n)){if(e.size>n)return[!1,Ia(n)];if(e.size<t)return[!1,Ma(t)]}else{if(Ta(t)&&e.size<t)return[!1,Ma(t)];if(Ta(n)&&e.size>n)return[!1,Ia(n)]}return[!0,null]},Aa=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"]]),Ra=[".DS_Store","Thumbs.db"];function La(){return(La=S(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.dataTransfer&&n.dataTransfer?function(){return za.apply(this,arguments)}(n.dataTransfer,n.type):(null!==(t=n).target&&t.target.files?Ka(t.target.files):[]).map(function(e){return Fa(e)}));case 1:case"end":return e.stop()}var t},e)}))).apply(this,arguments)}function Fa(e,t){var n,r=function(e){var t=e.name;t&&-1!==t.lastIndexOf(".")&&!e.type&&(t=t.split(".").pop().toLowerCase(),t=Aa.get(t))&&Object.defineProperty(e,"type",{value:t,writable:!1,configurable:!1,enumerable:!0});return 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 za(){return(za=S(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=Ka(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(Ha));case 6:return o=e.sent,e.abrupt("return",Ba(function n(e){return e.reduce(function(e,t){return[].concat(xe(e),xe(Array.isArray(t)?n(t):[t]))},[])}(o)));case 8:return e.abrupt("return",Ba(Ka(t.files).map(function(e){return Fa(e)})));case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ba(e){return e.filter(function(e){return-1===Ra.indexOf(e.name)})}function Ka(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Ha(e){var t;return"function"==typeof e.webkitGetAsEntry&&(t=e.webkitGetAsEntry())&&t.isDirectory?Va(t):Ua(e)}function Ua(e){var t=e.getAsFile();return t?(t=Fa(t),Promise.resolve(t)):Promise.reject("".concat(e," is not a File"))}function Wa(e){return qa.apply(this,arguments)}function qa(){return(qa=S(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(t.isDirectory?Va:function(){return Ga.apply(this,arguments)})(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Va(e){var t=e.createReader();return new Promise(function(o,i){var a=[];!function r(){t.readEntries(function(){var t=S(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(Wa)),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 Ga(){return(Ga=S(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=Fa(e,r.fullPath);t(e)},function(e){n(e)})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ya(e){function t(){R&&setTimeout(function(){var e;!k.current||(e=k.current.files)&&e.length||(T({type:"closeDialog"}),"function"==typeof _&&_())},300)}function n(e){e.target instanceof HTMLDivElement&&x.current&&x.current.contains(e.target)||(e.preventDefault(),M.current=[])}function a(e){return p?null:e}var r,o,i,s,c,u,l,f=e.accept,p=e.disabled,d=e.maxSize,h=e.minSize,y=e.multiple,m=e.onDragEnter,g=e.onDragLeave,v=e.onDragOver,b=e.onDrop,w=e.onDropAccepted,S=e.onDropRejected,_=e.onFileDialogCancel,E=e.getFilesFromEvent,C=e.preventDropOnDocument,O=e.validator,x=Object(Se.useRef)(null),k=Object(Se.useRef)(null),D=(e=Oe(Object(Se.useReducer)(ga,es),2))[0],T=e[1],e=D.isFocused,R=D.isFileDialogActive,j=D.draggedFiles,L=Object(Se.useCallback)(function(){k.current&&(T({type:"openDialog"}),k.current.value="",k.current.click())},[T]),F=(Object(Se.useEffect)(function(){return window.addEventListener("focus",t,!1),function(){window.removeEventListener("focus",t,!1)}},[k,R,_]),Object(Se.useCallback)(function(e){x.current&&x.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))},[x,k])),z=Object(Se.useCallback)(function(){T({type:"focus"})},[]),I=Object(Se.useCallback)(function(){T({type:"blur"})},[]),M=Object(Se.useRef)([]),B=(Object(Se.useEffect)(function(){return C&&(document.addEventListener("dragover",ya,!1),document.addEventListener("drop",n,!1)),function(){C&&(document.removeEventListener("dragover",ya),document.removeEventListener("drop",n))}},[x,C]),Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[].concat(xe(M.current),[t.target]),ha(t)&&Promise.resolve(E(t)).then(function(e){Da(t)||(T({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),m&&m(t))})},[E,m])),K=Object(Se.useCallback)(function(e){if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return ha(e)&&v&&v(e),!1},[v]),H=Object(Se.useCallback)(function(e){e.preventDefault(),e.persist();var t=M.current.filter(function(e){return x.current&&x.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),0<(M.current=t).length||(T({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ha(e)&&g&&g(e))},[x,g]),N=Object(Se.useCallback)(function(t){t.preventDefault(),t.persist(),M.current=[],ha(t)&&Promise.resolve(E(t)).then(function(e){var a,s;Da(t)||(a=[],s=[],e.forEach(function(e){var t=Oe(Na(e,f),2),n=t[0],t=t[1],r=Oe(Pa(e,h,d),2),o=r[0],r=r[1],i=O?O(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}))}),T({acceptedFiles:a,fileRejections:s,type:"setFiles"}),b&&b(t,a,s),0<s.length&&S&&S(t,s),0<a.length&&w&&w(t,a))}),T({type:"reset"})},[y,f,h,d,E,b,w,S]),F=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.onKeyDown,e.onFocus,e.onBlur,e.onClick,e.onDragEnterCallback),r=e.onDragOverCallback,o=e.onDragLeaveCallback,i=e.onDropCallback,e=W(e,Xa);return _e(Ee({onDragEnter:a(ma(n,B)),onDragOver:a(ma(r,K)),onDragLeave:a(ma(o,H)),onDrop:a(ma(i,N))},t,x),e)}},[x,F,z,I,B,K,H,N,p]),U=Object(Se.useCallback)(function(e){e.stopPropagation()},[]),z=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=W(e,Qa);return _e(_e({},Ee({accept:f,multiple:y,type:"file",style:{display:"none"},onChange:a(ma(n,N)),onClick:a(ma(r,U)),autoComplete:"off",tabIndex:-1},t,k)),e)}},[k,f,y,N,p]),P=0<(I=j.length)&&(A=(P={accept:f,minSize:h,maxSize:d,multiple:y,files:j}).files,r=P.accept,o=P.minSize,i=P.maxSize,!(!P.multiple&&1<A.length))&&A.every(function(e){var t=Oe(Na(e,r),1)[0],e=Oe(Pa(e,o,i),1)[0];return t&&e}),A=0<I&&!P,I=A?(s=(I={accept:f,minSize:h,maxSize:d,multiple:y,files:j}).files,c=I.accept,u=I.minSize,l=I.maxSize,!I.multiple&&1<s.length?"TOO_MANY_FILES":(I=s.every(function(e){return!Oe(Na(e,c),1)[0]}),s=s.every(function(e){return!Oe(Pa(e,u,l),1)[0]}),I?"FILE_INVALID_TYPE":s?"FILE_TOO_LARGE":"")):"";return _e(_e({},D),{},{isDragAccept:P,isDragReject:A,getRootProps:F,getInputProps:z,rootRef:x,inputRef:k,draggedFiles:j,fileError:I,isFocused:e&&!p,open:a(L)})}function $a(e){var t=e.accept,n=e.multiple,r=e.uploadButtonLabel,o=e.disabled,i=e.name,a=e.className,s=e.id,c=e.onChange,e=De(e),a=ke(Ee({},"FileUploaderButton",!0),a);return Se.createElement("div",Ce({},e,{className:a}),Se.createElement(Te,{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):[];c&&c(t,e)}}))}function Za(e,t,n){var r=e.sortingList,e=e.updateSortingList,o=(r=xe(r)).findIndex(function(e){return e.name===t});-1!==o&&(r=[].concat(xe(r.slice(0,o)),xe(r.slice(o+1)))),"unsort"!==n&&r.push({name:t,type:n}),e(r)}function Ja(e,t,n){(0,e.updateColumnSchema)(t,{pinned:"unpin"!==n?n:void 0})}var Xa=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnterCallback","onDragOverCallback","onDragLeaveCallback","onDropCallback"],Qa=["refKey","onChange","onClick"],es={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};Ya.displayName="DropzoneBase",Ya.defaultProps={disabled:!1,getFilesFromEvent:function(e){return La.apply(this,arguments)},maxSize:1/0,minSize:0,multiple:!0,preventDropOnDocument:!0,validator:function(){return null}};_e(_e({},Ya.defaultProps),{},{type:"standard"}),$a.defaultProps={uploadButtonLabel:"Upload files",disabled:!"FileUploaderFormat",multiple:!1},$a.displayName="FileUploaderButton",Object.assign({},$a.defaultProps,{title:"Upload files",sizeLabel:"Maximum size: 25 MB"});function ts(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 ns(e,t,n,r){var o,i=xe(e),a=T(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;(e[s].disabled&&r||!e[s].disabled)&&(i[s]=_e(_e({},i[s]),n))}}catch(e){a.e(e)}finally{a.f()}return i}function rs(e,t){var n=_e({},t);return e.translate&&(t=e.translate(t),n[e.name]=null!==t&&"object"===Z(t)?_e(_e({},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 is(e,t){var n,r;return(e=e.filter(function(e){return e.disabled&&t||!e.disabled})).length?(n=e.some(function(e){return!e._selected}),r=e.every(function(e){return!e._selected}),{indeterminate:e=0<=e.length&&n&&!r,checked:!e&&!r}):{indeterminate:!1,checked:!1}}function as(e){return e&&!!e.length}function ss(e){var t=Se.useContext(bs),n=e.isHead,r=e.firstCell,o=e.schema,i=e.data,a=e.rowIndex,s=e.colIndex,c=e.expandedState,u=e.onSelectAll,l=e.onMenuChange,f=e.onFilterChange,p=e.updateColumnSchema,d=e.reorderColumn,e=e.nestedRowData,h=t.draggable,y=t.separator,m=t.nestedRows,g=t.ref,t=t.withCheckbox,v=o.name,b=o.hidden,w=o.pinned,S=(E={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===(E=o.cellType)?"DEFAULT":E]).width,_=void 0===(_=E.minWidth)?96:_,E=void 0===(E=E.maxWidth)?800:E,C=(x=Oe(Se.useState(!1),2))[0],O=x[1],x=ke({"Grid-cell":!0,"Grid-cell--head":n,"Grid-cell--dragged":C&&h,"Grid-cell--body":!n,"Grid-cell--separator":!r&&(void 0!==o.separator?o.separator:y),"Grid-cell--nestedRow":!n&&0===s&&m});return b?null:Se.createElement("div",{key:"".concat(a,"-").concat(s),className:x,draggable:n&&h,onDragStart:function(e){h&&(O(!0),e.dataTransfer.setData("name",v),w)&&e.dataTransfer.setData("type",w)},onDrag:function(){O(!1)},onDragOver:function(e){return e.preventDefault()},onMouseUpCapture:function(){O(!1)},onDragEnd:function(e){e.preventDefault(),O(!1)},onDrop:function(e){var t;h&&(O(!1),(e={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")}).type===(t={name:v,type:w||""}).type)&&d&&d(e.name,t.name)},style:{width:ts({ref:g,withCheckbox:t},o.width||S),minWidth:ts({ref:g,withCheckbox:t},o.minWidth||_),maxWidth:ts({ref:g,withCheckbox:t},o.maxWidth||E)}},n?Se.createElement(Ss,{colIndex:s,schema:o,onSelectAll:u,onMenuChange:l,onFilterChange:f,updateColumnSchema:p,reorderColumn:d,setIsDragged:O}):Se.createElement(_s,{rowIndex:a,colIndex:s,data:i,schema:o,expandedState:c,nestedRowData:e}))}function cs(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--head Grid-cell--checkbox"},l?Se.createElement(M,null):Se.createElement(bt,Ce({},f,{onChange:o}))):null,e.map(function(e,t){var n="left"===r?t:p.length+t;return"right"===r&&(n+=d.length),Se.createElement(ss,{key:"".concat(n),firstCell:!t,colIndex:n,isHead:!0,schema:e,onSelectAll:o,onMenuChange:i,onFilterChange:a,updateColumnSchema:s,reorderColumn:c})}))):null}var n=Se.useContext(bs),r=e.schema,o=e.onSelectAll,i=e.onMenuChange,a=e.onFilterChange,s=e.updateColumnSchema,c=e.reorderColumn,u=n.withCheckbox,l=n.loading,f=n.selectAll,p=(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}),d=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(p,!!p.length,"left"),t(d,!p.length&&!!d.length),t(n,!1,"right")))}function us(e){function t(e,t,r){var n;return e.length?(n=ke((Ee(n={"Grid-cellGroup":!0,"Grid-cellGroup--pinned":r},"Grid-cellGroup--pinned-".concat(r),r),Ee(n,"Grid-cellGroup--main",!r),n)),Se.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},t&&u?Se.createElement("div",{className:"Grid-cell Grid-cell--body Grid-cell--checkbox",onClick:function(e){return e.stopPropagation()}},c?Se.createElement(M,null):Se.createElement(bt,{checked:!!p._selected,onChange:function(e){h(d,e.target.checked)}})):null,e.map(function(e,t){var n="left"===r?t:w.length+t;return"right"===r&&(n+=_.length),Se.createElement(ss,{key:"".concat(d,"-").concat(n),rowIndex:d,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[m,g],nestedRowData:E})}))):null}var n,r,o,i,a=(l=Se.useContext(bs)).type,s=l.onRowClick,c=l.loading,u=l.withCheckbox,l=l.nestedRows,f=e.schema,p=e.data,d=e.rowIndex,h=e.onSelect,e=e.className,y=Se.useRef(null),m=(v=Oe(Se.useState(!1),2))[0],g=v[1],v=ke("Grid-row","Grid-row--body",{"Grid-row--selected":p._selected,"Grid-row--disabled":p.disabled}),b=Se.useCallback(function(){"resource"!==a||c||s&&s(p,d)},[p,d]),w=(S=f.filter(function(e){return!e.hidden&&e.pinned})).filter(function(e){return!e.hidden&&"left"===e.pinned}),S=S.filter(function(e){return!e.hidden&&"right"===e.pinned}),_=f.filter(function(e){return!e.hidden&&!e.pinned}),E=(f={data:p,rowIndex:d,expanded:m},C=Se.useContext(bs),n=C.schema,r=C.loading,C=C.nestedRowRenderer,o=f.data,i=f.rowIndex,f=f.expanded,C?C({data:o,schema:n,loading:r,rowIndex:i,expanded:f}):null),C=ke(e,{"Grid-rowWrapper":!0});return Se.createElement("div",{className:C},Se.createElement("div",{"data-test":"DesignSystem-Grid-row",className:v,onClick:b,ref:y},t(w,!!w.length,"left"),t(_,!w.length&&!!_.length),t(S,!1,"right")),l&&m&&Se.createElement("div",{className:"Grid-nestedRow"},E))}function ls(e){var n,t,r,o,i=(d=Se.useContext(bs)).data,a=d.ref,s=d.loading,c=d.error,u=d.withPagination,l=d.page,f=d.pageSize,p=d.totalRecords,d=d.errorTemplate;return!s&&c?d?"function"==typeof d?d({}):d:null:(n=e.schema,t=e.prevPageInfo,r=e.updatePrevPageInfo,o=e.onSelect,Se.useEffect(function(){var e=a.querySelector(".Grid-body");return e&&window.requestAnimationFrame(function(){t.page===l&&(e.scrollTop=t.scrollTop)}),function(){e&&r({page:l,scrollTop:e.scrollTop})}},[]),c=Math.ceil(p/f),d=u&&l===c?p-(l-1)*f:s?f:u?Math.min(p,f):p,Se.createElement("div",{className:"Grid-body"},(s&&!i.length?xe(Array(d).map(function(e){return e})):i).map(function(e,t){return t=t,e=e,Se.createElement(us,{key:t,rowIndex:t,data:e||i[t],schema:n,onSelect:o})})))}function fs(e){var t=e.tooltip;return null!=(e=e.cellData.title)?t?Se.createElement(Ea,{tooltip:e,position:"top-start",triggerClass:"w-100 overflow-hidden"},Se.createElement(je,{className:"w-100 ellipsis"},e)):Se.createElement(je,{className:"w-100 ellipsis"},e):null}function ps(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(je,{key:t,className:"ellipsis",appearance:"subtle",size:"small"},e)})):null}function ds(e){var t=(e=e.cellData).firstName,n=e.lastName,e=e.title;return t||n?Se.createElement(re,{className:"mr-5",firstName:t,lastName:n}):e?Se.createElement(re,{className:"mr-5"},e):null}function hs(e){var t,n,r=e.size,o=e.schema,i=e.loading,e=i?{}:rs(o,e.data),a=o.name,s=void 0===(s=o.cellType)?"DEFAULT":s,c=o.align,u=void 0===c?"left":c,l=o.tooltip,f=e[a],p=ke(Ee({},"GridCell",!0));switch(s){case"DEFAULT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--default")},i?Se.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):fs({tooltip:l,cellData:f}));case"WITH_META_LIST":return Se.createElement("div",{className:"".concat(p," GridCell--metaList")},i?Se.createElement(Se.Fragment,null,Se.createElement(I,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),Se.createElement(I,{length:"large",size:"xxs"})):Se.createElement(Se.Fragment,null,fs({tooltip:l,cellData:f}),ps({cellData:f})));case"AVATAR":return i?Se.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"medium",round:!0}):Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--avatar"),"data-test":"DesignSystem-GridCell-avatar"},"tight"!==r&&ds({cellData:f}));case"AVATAR_WITH_TEXT":return i?Se.createElement(M,{imageSize:"medium",round:!0},Se.createElement(I,{className:"ml-3",length:"medium"})):Se.createElement("div",{className:"".concat(p," "),"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==r&&ds({cellData:f}),fs({tooltip:l,cellData:f}));case"AVATAR_WITH_META_LIST":return i?Se.createElement(M,{imageSize:"medium",round:!0},Se.createElement(I,{className:"ml-3",length:"medium"}),Se.createElement(I,{className:"ml-3",length:"large"})):Se.createElement("div",{className:"".concat(p," GridCell--avatarWithText"),"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==r&&ds({cellData:f}),Se.createElement("div",{className:"GridCell-metaListWrapper"},fs({tooltip:l,cellData:f}),ps({cellData:f})));case"ICON":return i?Se.createElement(M,{className:"GridCell--align-".concat(u),imageSize:"small",round:!0}):Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--icon"),"data-test":"DesignSystem-GridCell-icon"},(t=(t={cellData:f}).cellData,n=t.title,(t=t.icon||n)?Se.createElement(P,{name:t}):null));case"STATUS_HINT":return Se.createElement("div",{className:"".concat(p," GridCell--align-").concat(u," GridCell--statusHint")},i?Se.createElement(M,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},Se.createElement(I,{length:"large"})):(n=(n={cellData:f}).cellData,t=n.statusAppearance,(n=n.title)?Se.createElement(In,{appearance:t},n):null))}return null}function ys(e){var t=e.options,n=e.onChange,r=(e=Oe(Se.useState(!1),2))[0],o=e[1],i=(e=Oe(Se.useState(t),2))[0],a=e[1],s=(e=Oe(Se.useState("var(--spacing-8)"),2))[0],c=e[1];return Se.useEffect(function(){a(t)},[r]),Se.createElement("div",{className:"Dropdown"},Se.createElement(wa,{open:r,onToggle:function(e){o(e)},trigger:Se.createElement(Te,{type:"button",ref:function(e){c("".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(vs(t.length))),triggerClass:"w-100",customStyle:{width:s},className:"Header-draggableDropdown"},Se.createElement("div",{className:"Dropdown-wrapper"},Se.createElement("div",{className:"OptionWrapper"},Se.createElement(bt,{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 _e(_e({},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(gs(i,e,r))}},Se.createElement(bt,{className:"OptionCheckbox",name:e.value,label:e.label,checked:i[r].selected,onChange:function(e){return e=e,t=r,(n=xe(i))[t]=_e(_e({},n[t]),{},{selected:e.target.checked}),void a(n);var t,n}}),Se.createElement(P,{name:"drag_handle",className:"mr-4"}))})),Se.createElement("div",{className:"Dropdown-buttonWrapper"},Se.createElement(Te,{type:"button",className:"mr-4",size:"tiny",onClick:function(){o(!1)}},"Cancel"),Se.createElement(Te,{type:"button",appearance:"primary",size:"tiny",onClick:function(){o(!1),n&&n(i)}},"Apply"))))}function ms(e){var t=e.loading,n=e.error,r=e.data,o=e.schema,i=e.withSearch,a=e.showHead,s=e.withPagination,c=e.page,u=e.pageSize,l=e.withCheckbox,f=e.children,p=e.updateSchema,d=void 0===(y=e.filterList)?{}:y,h=e.updateFilterList,y=void 0===(y=e.totalRecords)?0:y,m=e.onSelectAll,g=e.searchPlaceholder,v=e.selectAll,b=e.searchTerm,w=e.updateSearchTerm,S=e.dynamicColumn,_=e.allowSelectAll,E=e.showFilters,e=e.customSelectionLabel,C=(D=Oe(Se.useState(!1),2))[0],O=D[1],x=(D=Oe(Se.useState(!0),2))[0],k=D[1],D=(Se.useEffect(function(){k(!x)},[o]),Se.useEffect(function(){v&&v.checked&&m&&m(!0,C)},[C]),Se.useEffect(function(){v&&!v.checked&&O(!1)},[v]),o.filter(function(e){return e.filters})),T=o.map(function(e){return{label:e.displayName,value:e.name,selected:!e.hidden}}),e=e||"item",r=r.filter(function(e){return e._selected}).length,j=(c-1)*u+1,c=Math.min(c*u,y),u=n?"Showing 0 ".concat(e,"s"):l&&r?C?"Selected all ".concat(y," ").concat(e).concat(vs(y)):"Selected ".concat(r," ").concat(e).concat(vs(y)," on this page"):(s?"Showing ".concat(j,"-").concat(c," of "):"Showing ").concat(y," ").concat(e).concat(vs(y));return Se.createElement("div",{className:"Header"},Se.createElement("div",{className:"Header-content Header-content--top"},i&&Se.createElement("div",{className:"Header-search"},Se.createElement(pn,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:g,onChange:function(e){e=e.target.value;w&&w(e)},value:b,onClear:function(){return w&&w("")},disabled:t&&!as(o),autoComplete:"off"})),E&&0<D.length&&Se.createElement("div",{className:"Header-dropdown"},Se.createElement("div",{className:"Header-filters"},D.map(function(e){var n=e.name,t=e.displayName,e=e.filters,e=e?e.map(function(t){return _e(_e({},t),{},{selected:d[n]&&-1!==d[n].findIndex(function(e){return e===t.value})})}):[];return Se.createElement(on,{key:n,withCheckbox:!0,showApplyButton:!0,inlineLabel:t,icon:"filter_list",options:e,onChange:function(e){var t=n;t=_e(_e({},d),{},Ee({},t,e)),h&&h(t)}})}))),f&&Se.createElement("div",{className:"Header-actions"},f)),Se.createElement("div",{className:"Header-content Header-content--bottom"},Se.createElement("div",{className:"Header-label"},!a&&l&&!t&&Se.createElement(bt,Ce({},v,{onChange:function(e){m&&m(e.target.checked)}})),t?Se.createElement(M,{withImage:!a&&l},Se.createElement(I,{length:"small",size:"s"})):Se.createElement(Se.Fragment,null,Se.createElement(Vt,null,u),s&&(null==v?void 0:v.checked)&&_&&Se.createElement("div",{className:"ml-4"},C?Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",onClick:function(){return O(!1)}},"Clear Selection"):Se.createElement(Te,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",onClick:function(){return O(!0)}},"Select all ".concat(y," ").concat(e,"s"))))),S&&Se.createElement("div",{className:"Header-hideColumns"},Se.createElement(ys,{options:T,onChange:function(e){e=e.map(function(t){return _e(_e({},o.find(function(e){return e.name===t.value})),{},{hidden:!t.selected})});p&&p(e)}}))))}var gs=function(e,t,n){return t===n?e:t<n?[].concat(xe(e.slice(0,t)),xe(e.slice(t+1,n+1)),[e[t]],xe(e.slice(n+1))):[].concat(xe(e.slice(0,n)),[e[t]],xe(e.slice(n,t)),xe(e.slice(t+1)))},vs=function(e){return 1<e?"s":""},n={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!"FileUploaderList",error:!1,sortingList:[],filterList:{},showFilters:!0},bs=Se.createContext(_e(_e({},n),{},{ref:null})),ws=bs.Provider,Ss=function(e){function t(){return Se.createElement(Se.Fragment,null,Se.createElement(je,{weight:"strong",className:"ellipsis--noWrap"},r.displayName),m&&Se.createElement("div",{className:"Grid-sortingIcons"},w?"asc"===w?Se.createElement(P,{name:"arrow_upward"}):Se.createElement(P,{name:"arrow_downward"}):Se.createElement(P,{name:"unfold_more"})))}var n=Se.useContext(bs),r=e.schema,a=e.setIsDragged,o=e.colIndex,i=e.onSelectAll,s=e.onMenuChange,c=e.onFilterChange,u=e.updateColumnSchema,e=e.reorderColumn,o={schema:r,colIndex:o,onSelectAll:i,onMenuChange:s,onFilterChange:c,updateColumnSchema:u,reorderColumn:e,setIsDragged:a},l=n.loading,i=n.draggable,e=n.showMenu,f=n.sortingList,p=n.filterList,d=n.headCellTooltip,h=n.showFilters,n=n.schema,y=r.sorting,m=void 0===y||y,g=r.name,y=r.filters,v=r.pinned,n=as(n),b=f.findIndex(function(e){return e.name===g}),w=-1!==b?f[b].type:null,S=Se.createRef(),f=[{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"}],_={label:"Unpin",value:"unpin",icon:"replay"},_=("left"===v&&(b[0]=_),"right"===v&&(b[1]=_),{label:"Unsort",value:"unsort",icon:"unfold_more"}),_=("asc"===w&&(f[0]=_),"desc"===w&&(f[1]=_),[].concat(b,[{label:"Hide Column",value:"hide",icon:"cancel"}])),b=(m&&(_=[].concat(f,xe(_))),ke({"Grid-headCell":!0,"Grid-headCell--draggable":i})),f=y?y.map(function(t){return _e(_e({},t),{},{selected:p[g]&&-1!==p[g].findIndex(function(e){return e===t.value})})}):[];return Se.createElement("div",{key:g,className:b,ref:S},Se.createElement("div",{className:"Grid-cellContent","data-test":"DesignSystem-Grid-cellContent",onClick:function(){!l&&m&&("asc"===w&&s(g,"sortDesc"),"desc"===w&&s(g,"unsort"),w||s(g,"sortAsc"))}},l&&!n?Se.createElement(M,{withImage:!1},Se.createElement(I,{length:"medium"})):!r.headerCellRenderer&&d?Se.createElement(Ea,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:r.displayName},t()):r.headerCellRenderer&&!d?r.headerCellRenderer(o):t()),h&&y&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",null,Se.createElement(M,null)):Se.createElement("div",null,Se.createElement(on,{menu:!0,showApplyButton:!0,withCheckbox:!0,triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"filter_list",appearance:"transparent"})}},options:f,align:"left",onChange:function(e){return c(g,e)},minWidth:176}))),e&&Se.createElement(Se.Fragment,null,l&&!n?Se.createElement("span",{className:"ml-4"},Se.createElement(M,null)):Se.createElement("div",null,Se.createElement(on,{key:"".concat(g,"-").concat(w,"-").concat(v),menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:function(){return Se.createElement(Te,{icon:"more_vert_filled",appearance:"transparent"})}},options:_,align:"left",onChange:function(e){return s(g,e)},minWidth:176}))),r.resizable&&Se.createElement("span",{className:"Grid-cellResize",onMouseDown:function(){function e(e){e.preventDefault(),i&&o(n,{width:e.pageX-i})}var t,n,r,o,i;t={updateColumnSchema:u},n=g,r=S.current,o=t.updateColumnSchema,i=null==r?void 0:r.getBoundingClientRect().x,window.addEventListener("mousemove",e),window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",e)}),a(!1)}}))},_s=function(e){var t=Se.useContext(bs),n=e.data,r=e.schema,o=e.expandedState,i=e.rowIndex,a=e.colIndex,s=e.nestedRowData,e=t.size,c=t.loading,t=t.nestedRows,o=Oe(o,2),u=o[0],l=o[1],o={rowIndex:i,colIndex:a,size:e,schema:r,data:n,loading:c,expanded:u};return Se.createElement("div",{className:"Grid-cellContent"},0===a&&t&&Se.createElement(Se.Fragment,null,s?Se.createElement(P,{className:"Grid-nestedRowTrigger",name:u?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:function(e){s&&(e.stopPropagation(),l(!u))}}):Se.createElement("span",{className:"Grid-nestedRowPlaceholder"})),r.cellRenderer?r.cellRenderer(o):Se.createElement(hs,Ce({key:"".concat(i,"-").concat(a)},o)))},Es=(us.defaultProps={data:{}},function(){e(n,Se["Component"]);var t=h(n);function n(e){var i;d(this,n),Ee(G(i=t.call(this,e)),"gridRef",null),Ee(G(i),"isHeadSyncing",!1),Ee(G(i),"isBodySyncing",!1),Ee(G(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)}}),Ee(G(i),"updateRenderedSchema",function(e){var t=i.props.updateSchema;t&&t(e)}),Ee(G(i),"updateColumnSchema",function(t,e){var n=xe(i.props.schema),r=n.findIndex(function(e){return e.name===t});n[r]=_e(_e({},n[r]),e),i.updateRenderedSchema(n)}),Ee(G(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=gs(e,r,o);i.updateRenderedSchema(e)}),Ee(G(i),"updateSortingList",function(e){var t=i.props.updateSortingList;t&&t(e)}),Ee(G(i),"updateFilterList",function(e){var t=i.props.updateFilterList;t&&t(e)}),Ee(G(i),"onMenuChange",function(e,t){var n,r,o=i.props.sortingList;switch(t){case"sortAsc":Za({sortingList:o,updateSortingList:i.updateSortingList},e,"asc");break;case"sortDesc":Za({sortingList:o,updateSortingList:i.updateSortingList},e,"desc");break;case"unsort":Za({sortingList:o,updateSortingList:i.updateSortingList},e,"unsort");break;case"pinLeft":Ja({updateColumnSchema:i.updateColumnSchema},e,"left");break;case"pinRight":Ja({updateColumnSchema:i.updateColumnSchema},e,"right");break;case"unpin":Ja({updateColumnSchema:i.updateColumnSchema},e,"unpin");break;case"hide":n={updateColumnSchema:i.updateColumnSchema},r=!0,(0,n.updateColumnSchema)(e,{hidden:r})}}),Ee(G(i),"onFilterChange",function(e,t){e=_e(_e({},i.props.filterList),{},Ee({},e,t));i.updateFilterList(e)}),Ee(G(i),"onSelect",function(e,t){var n=i.props.onSelect;n&&n(e,t)}),Ee(G(i),"onSelectAll",function(e){var t=i.props.onSelectAll;t&&t(e.target.checked)}),Ee(G(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=De(this.props),n=this.state,r=n.init,n=n.prevPageInfo,o=this.props,i=o.type,a=o.size,s=o.showHead,c=o.className,u=o.page,l=o.loading,o=o.loaderSchema,l=(f=this.props.schema,l=l,o=o,f=!as(f=f)&&l?o:f),f=ke((Ee(o={Grid:"true"},"Grid--".concat(i),i),Ee(o,"Grid--".concat(a),a),o),c);return Se.createElement("div",Ce({className:f},e,{ref:function(e){t.gridRef=e}}),r&&Se.createElement(ws,{value:_e(_e({},this.props),{},{ref:this.gridRef})},s&&Se.createElement(cs,{schema:l,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(ls,{key:"".concat(u),schema:l,prevPageInfo:n,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this)})))}}]),n}()),Cs=(Ee(Es,"defaultProps",void 0),Es.defaultProps=n,hs.displayName="GridCell",["children"]),r={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],schema:[],loading:!(ms.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(cn,null,{FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No results found"}[void 0===e?"DEFAULT":e])}},u=function(){e(i,Se["Component"]);var o=h(i);function i(e){d(this,i),Ee(G(l=o.call(this,e)),"debounceUpdate",void 0),Ee(G(l),"updateData",function(e){l.state.async&&l.setState({loading:!0}),e?l.debounceUpdate():l.updateDataFn()}),Ee(G(l),"updateDataFn",function(){var e=l.props,t=e.fetchData,n=e.pageSize,r=e.withPagination,o=e.data,e=e.onSearch,i=l.state,a=i.async,s=i.page,c=i.sortingList,u=i.filterList,i=i.searchTerm,i=(l.onSelect(-1,!1),{page:s,pageSize:n,sortingList:c,filterList:u,searchTerm:i});l.props.withPagination||(delete i.page,delete i.pageSize),a?t&&t(i).then(function(e){var t,n;(!e.searchTerm||e.searchTerm&&e.searchTerm===l.state.searchTerm)&&(t=e.data,n=(l.state.schema.length?l.state:e).schema,l.setState({data:t,schema:n,selectAll:is(t,l.props.selectDisabledRow),totalRecords:e.count,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND"}))}).catch(function(){l.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}(a=l.state.schema,o,u),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=xe(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=rs(o[r],e),t=rs(o[r],t);return e[n.name].title.localeCompare(t[n.name].title)}:e),"desc"===n.type)&&i.reverse()}),i}(a,e&&void 0!==i.searchTerm?e(t,i.searchTerm):t,c)).length,r&&s&&n&&(o=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)}(o,s,n)),e=l.state.schema.length?l.state.schema:a,l.setState({totalRecords:u,error:!o.length,errorType:"NO_RECORDS_FOUND",selectAll:is(o,l.props.selectDisabledRow),schema:e,data:o}))}),Ee(G(l),"onSelect",function(e,t){var n=l.state.data,r=l.props.onSelect,o=[e],i=n;0<=e&&(i=ns(n,o,{_selected:t},l.props.selectDisabledRow),l.setState({data:i,selectAll:is(i,l.props.selectDisabledRow)})),r&&r(o,t,-1===e?[]:i.filter(function(e){return e._selected}))}),Ee(G(l),"onSelectAll",function(e,t){var n=l.props.onSelect,r=l.state.data,o=Array.from({length:r.length},function(e,t){return t}),r=ns(r,o,{_selected:e},l.props.selectDisabledRow),i=[];r.forEach(function(e,t){e._selected&&i.push(t)}),n&&n(i,e,r.filter(function(e){return e._selected}),t),l.setState({data:r,selectAll:is(r,l.props.selectDisabledRow)})}),Ee(G(l),"onPageChange",function(e){l.setState({page:e})}),Ee(G(l),"updateSchema",function(e){l.setState({schema:e})}),Ee(G(l),"updateSortingList",function(e){var t=l.props.multipleSorting;l.setState({sortingList:t?xe(e):e.slice(-1),page:1})}),Ee(G(l),"updateFilterList",function(e){l.setState({filterList:e,page:1})}),Ee(G(l),"updateSearchTerm",function(e){l.setState({searchTerm:e,page:1})});var l,t="fetchData"in l.props,n=e.data||[],r=e.schema||[];return l.state={async:t,data:t?[]:n,schema:t?[]:r,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:is([]),searchTerm:void 0},l.debounceUpdate=Ft(e.searchDebounceDuration,l.updateDataFn),l}return a(i,[{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,n=n.schema,this.setState({data:r=void 0===r?[]:r,schema:void 0===n?[]:n,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:r.length||0,selectAll:is([])})),e.loading!==this.props.loading&&(r=(n=this.props).data,e=n.schema,this.setState({data:n=void 0===r?[]:r,schema:void 0===e?[]:e,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:n.length||0,selectAll:is([])},function(){o.updateData()}))),t.page!==this.state.page&&(r=this.props.onPageChange)&&r(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||(e=t.searchTerm!==this.state.searchTerm,this.updateData(e))}},{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,c=e.nestedRowRenderer,u=e.withHeader,l=e.headerOptions,f=e.withCheckbox,p=e.showMenu,d=e.withPagination,h=e.paginationType,y=e.pageSize,m=e.pageJumpDebounceDuration,g=e.onRowClick,v=e.loaderSchema,b=e.errorTemplate,w=e.className,e=e.filterPosition,S=De(this.props),_=l.children,l=W(l,Cs),w=w?" ".concat(w):"",E=this.state.totalRecords,C=os(E,y);return Se.createElement("div",Ce({},S,{className:"Table".concat(w),"data-test":"DesignSystem-Table-wrapper"}),u&&Se.createElement("div",{className:"Table-header","data-test":"DesignSystem-Table-header"},Se.createElement(ms,Ce({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:t,onSelectAll:this.onSelectAll,withCheckbox:f,withPagination:d,pageSize:y,showFilters:"HEADER"===e},l),_)),Se.createElement("div",{className:"Table-grid"},Se.createElement(Es,Ce({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:f,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:p,showHead:t,type:n,size:r,headCellTooltip:o,separator:i,draggable:a,nestedRows:s,nestedRowRenderer:c,withPagination:d&&1<C,pageSize:y,loaderSchema:v,errorTemplate:b&&b({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===e}))),d&&!this.state.loading&&!this.state.error&&1<C&&Se.createElement("div",{className:"Table-pagination"},Se.createElement(la,{page:this.state.page,totalPages:os(E,y),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:m})))}}]),i}(),Os=(Ee(u,"defaultProps",r),Se.useState,Se.useEffect,Se.useState,{success:"check_circle",info:"info",warning:"warning",alert:"error"}),xs=function(e){var t=e.appearance,n=e.className,r=e.description,o=e.size,e=De(e),n=ke(Ee({},"InlineMessage",!0),n),i=ke((Ee(i={},"InlineMessage-icon--warning","warning"===t),Ee(i,"InlineMessage-icon--small","small"===o),Ee(i,"InlineMessage-icon--regular","regular"===o),i)),a=ke(Ee({},"InlineMessage-text--".concat(t),t)),s="small"===o?14:16,c="small"===o?"medium":void 0;return Se.createElement("div",Ce({"data-test":"DesignSystem-InlineMessage"},e,{className:n}),"default"!==t&&Se.createElement(P,{"data-test":"DesignSystem-InlineMessage--Icon",name:Os[t],appearance:t,className:i,size:s}),Se.createElement(je,{size:o,weight:c,className:a,"data-test":"DesignSystem-InlineMessage--Description"},r))},o=(xs.displayName="InlineMessage",xs.defaultProps={appearance:"default",description:"",size:"regular"},function(e){var t,n=e.vertical,r=e.appearance,o=e.className,e=De(e),n=ke((Ee(t={},"Divider",!0),Ee(t,"Divider--horizontal",!n),Ee(t,"Divider--vertical",n),Ee(t,"Divider--basic",!n&&"header"!==r),Ee(t,"Divider--header",!n&&"header"===r),t),o);return Se.createElement("hr",Ce({"data-test":"DesignSystem-Divider"},e,{className:n}))}),ks=(o.displayName="Divider",o.defaultProps={appearance:"basic",vertical:!1},function(e){var t=e.error,e=e.message;return e?t?Se.createElement(xs,{size:"small",className:"mt-3",appearance:"alert",description:e}):Se.createElement("div",{className:"mt-3"},Se.createElement(je,{appearance:"subtle",size:"small",weight:"medium"},e)):null}),Ds=(ks.displayName="HelpText",["children","type","className","disabled","tabIndex","icon","subtle","size","iconAlign","iconType"]),Ts={tiny:12,regular:16},p=Se.forwardRef(function(e,t){var n=e.children,r=e.type,o=e.className,i=e.disabled,a=e.tabIndex,s=e.icon,c=e.subtle,u=e.size,l=e.iconAlign,f=e.iconType,e=W(e,Ds),c=ke((Ee(p={},"LinkButton",!0),Ee(p,"LinkButton--".concat(u),u),Ee(p,"LinkButton--default",!c),Ee(p,"LinkButton--subtle",c),Ee(p,"LinkButton--iconAlign-".concat(l),n&&l),Ee(p,"".concat(o),o),p)),p=ke((Ee(o={},"LinkButton-icon",!0),Ee(o,"LinkButton-icon--".concat(l),n&&l),o));return Se.createElement("button",Ce({ref:t,type:r,"data-test":"DesignSystem-LinkButton",className:c,disabled:i,tabIndex:a},e),Se.createElement(Se.Fragment,null,s&&Se.createElement("div",{className:p},Se.createElement(P,{"data-test":"DesignSystem-LinkButton--Icon",name:s,type:f,size:u&&Ts[u]})),n))});p.displayName="LinkButton",p.defaultProps={size:"regular",type:"button",iconAlign:"left"},new Map}.call(this,Is(23))},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(R,e,t){"use strict";t.r(e);var u=t(0),o=t(1);function l(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 f(e){return l(e).toList()}function c(e){if(e)return f(e).get(0)}function n(e){if(e){var n=c(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=f(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function a(e){var t=u.RichUtils.tryToRemoveBlockStyle(e);return t?u.EditorState.push(e,t,"change-block-type"):e}function s(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=f(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,c=a===i.size-1?o:i.get(a).getText().length;t+=i.get(a).getText().slice(s,c)}}return t}function p(e){var t=e.getCurrentContent(),n=e.getSelection(),n=(t=u.Modifier.removeRange(t,n,"forward")).getSelectionAfter(),r=t.getBlockForKey(n.getStartKey()),t=u.Modifier.insertText(t,n,"\n",r.getInlineStyleAt(n.getStartOffset()),null);return u.EditorState.push(e,t,"insert-fragment")}function d(e){var t=u.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return a(u.EditorState.push(e,t,"split-block"))}function h(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=u.Modifier.removeRange(e.getCurrentContent(),t,"forward");return u.EditorState.push(e,t,"remove-range")}function y(e,t){t=u.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return u.EditorState.push(e,t,"change-block-data")}function m(e){var r=new o.Map({}),t=f(e);if(t&&0<t.size)for(var n=0;n<t.size&&"break"!==function(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 g=Object(o.Map)({code:{element:"pre"}}),v=u.DefaultDraftBlockRenderMap.merge(g);function b(e){return!!e&&("unordered-list-item"===(e=e.getType())||"ordered-list-item"===e)}function w(e,t,n){var r,o,i=e.getSelection(),i=i.getIsBackward()?i.getFocusKey():i.getAnchorKey(),a=e.getCurrentContent(),s=a.getBlockForKey(i),c=s.getType();return"unordered-list-item"!==c&&"ordered-list-item"!==c||!(a=a.getBlockBefore(i))||a.getType()!==c||(i=s.getDepth(),1===t&&i===n)?e:(c=Math.min(a.getDepth()+1,n),r=t,o=c,i=(s=e).getSelection(),n=(a=s.getCurrentContent()).getBlockMap(),t=l(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),c=a.merge({blockMap:n,selectionBefore:i,selectionAfter:i}),u.EditorState.push(e,c,"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()?u.RichUtils.insertSoftNewline(e):p(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?w(t,-1,r):void 0:void 0:d(t)):void 0}function _(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 E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 O(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=f(e);if(0<s.size){t=function(){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)!function(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"===C(t))return t.v}return{}}function x(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=c(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 k(e,t){var n,r=c(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 D(e,t,n){j[e]["".concat(e.toLowerCase(),"-").concat(n)]=E({},"".concat(t),n)}function T(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach(function(e){E(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},j.color,{},j.bgcolor,{},j.fontSize,{},j.fontFamily,{CODE:j.CODE,SUPERSCRIPT:j.SUPERSCRIPT,SUBSCRIPT:j.SUBSCRIPT})}var j={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 I(e,t,n){var r=e.getSelection(),o=Object.keys(j[t]).reduce(function(e,t){return u.Modifier.removeInlineStyle(e,r,t)},e.getCurrentContent()),o=u.EditorState.push(e,o,"changeinline-style"),e=e.getCurrentInlineStyle();return r.isCollapsed()&&(o=e.reduce(function(e,t){return u.RichUtils.toggleInlineStyle(e,t)},o)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t?e.has(n)||(o=u.RichUtils.toggleInlineStyle(o,n)):e.has("".concat(e="bgcolor"===t?"backgroundColor":t,"-").concat(n))||(o=u.RichUtils.toggleInlineStyle(o,"".concat(t.toLowerCase(),"-").concat(n)),D(t,e,n)),o}function M(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?D("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?D("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?D("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&D("fontFamily","fontFamily",e.substr(11))})}function N(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 P(n,c){if(n&&c&&0<c.length){var e=function(){var e=n.getSelection(),o={};if(e.isCollapsed())return c.forEach(function(e){o[e]=function(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=f(n);if(0<s.size){for(var t=0;t<s.size;t+=1)!function(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)!function(t){t===e?c.forEach(function(e){o[e]=N(s.get(n),e,t)}):c.forEach(function(e){o[e]&&o[e]!==N(s.get(n),e,t)&&(o[e]=void 0)})}(r)}(t);return{v:o}}}();if("object"===C(e))return e.v}return{}}function A(t){var e=t.getCurrentInlineStyle(),n=t.getCurrentContent();return e.forEach(function(e){n=u.Modifier.removeInlineStyle(n,t.getSelection(),e)}),u.EditorState.push(t,n,"change-inline-style")}t.d(e,"isListBlock",function(){return b}),t.d(e,"changeDepth",function(){return w}),t.d(e,"handleNewLine",function(){return S}),t.d(e,"getEntityRange",function(){return k}),t.d(e,"getCustomStyleMap",function(){return T}),t.d(e,"toggleCustomInlineStyle",function(){return I}),t.d(e,"getSelectionEntity",function(){return x}),t.d(e,"extractInlineStyle",function(){return M}),t.d(e,"removeAllInlineStyles",function(){return A}),t.d(e,"getSelectionInlineStyle",function(){return O}),t.d(e,"getSelectionCustomInlineStyle",function(){return P}),t.d(e,"getSelectedBlocksMap",function(){return l}),t.d(e,"getSelectedBlocksList",function(){return f}),t.d(e,"getSelectedBlock",function(){return c}),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 p}),t.d(e,"insertNewUnstyledBlock",function(){return d}),t.d(e,"clearEditorContent",function(){return h}),t.d(e,"setBlockData",function(){return y}),t.d(e,"getSelectedBlocksMetadata",function(){return m}),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;
39
39
  /*!
40
40
  Copyright (c) 2018 Jed Watson.
41
41
  Licensed under the MIT License (MIT), see
@@ -54,4 +54,4 @@ object-assign
54
54
  *
55
55
  * This source code is licensed under the MIT license found in the
56
56
  * LICENSE file in the root directory of this source tree.
57
- */var E=e(17),C=e(0);function O(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,c=e?Symbol.for("react.fragment"):60107,u=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,F=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,z=e?Symbol.for("react.suspense_list"):60120,B=e?Symbol.for("react.memo"):60115,K=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,U=e?Symbol.for("react.fundamental"):60117,W=e?Symbol.for("react.scope"):60119;function m(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case s:return"Portal";case l:return"Profiler";case u:return"StrictMode";case h:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case p:return"Context.Provider";case d:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case B:return m(e.type);case H:return m(e.render);case K:if(e=1===e._status?e._result:null)return m(e)}}return null}var e=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function g(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var y=new Uint16Array(16),t=0;t<15;t++)y[t]=t+1;y[15]=0;var V=/^[: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]*$/,G=Object.prototype.hasOwnProperty,Y={},$={};function Z(e){return G.call($,e)||!G.call(Y,e)&&(V.test(e)?$[e]=!0:void(Y[e]=!0))}function J(e,t,n,r){if(null==t||function(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 x={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[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];x[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[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){x[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){x[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){x[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);x[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);x[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);x[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),x.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function k(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="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";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,w=!1,S=null,_=0;function D(){if(null===v)throw Error(O(321));return v}function ee(){if(0<_)throw Error(O(312));return{memoizedState:null,queue:null,next:null}}function T(){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(;w;)w=!1,_+=1,a=null,n=e(t,r);return i=v=null,_=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=D(),a=T(),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(!(_<25))throw Error(O(301));if(e===v)if(w=!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 j(){}var I=0,oe={readContext:function(e){var t=I;return g(e,t),e[t]},useContext:function(e){D();var t=I;return g(e,t),e[t]},useMemo:function(e,t){if(v=D(),t=void 0===t?null:t,null!==(a=T())){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=D();var t=(a=T()).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:j,useEffect:j,useDebugValue:j,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return D(),e},useTransition:function(){return D(),[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},ce=E({menuitem:!0},se),M={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},ue=["Webkit","ms","Moz","O"],le=(Object.keys(M).forEach(function(t){ue.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),M[e]=M[t]})}),/([A-Z])/g),fe=/^ms-/,N=C.Children.toArray,P=e.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},A={};var ye=Object.prototype.hasOwnProperty,me={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ge(e,t){if(void 0===e)throw Error(O(152,m(t)||"Component"))}function ve(d,h,y){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=function(e,t,n,r){if(r&&"object"==typeof(r=e.contextType)&&null!==r)return g(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=q;return t}(t,h,y,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!=(c=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=E({},n.state,c))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void ge(d=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 c=s?a[0]:n.state,u=!0,s=s?1:0;s<a.length;s++){var l=a[s];null!=(l="function"==typeof l?l.call(n,c,e.props,r):l)&&(u?(u=!1,c=E({},c,l)):E(c,l))}n.state=c}}else o=null;if(ge(d=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var f,p=n.getChildContext();for(f in p)if(!(f in e))throw Error(O(108,m(t)||"Unknown",f))}p&&(h=E({},h,p))}for(;C.isValidElement(d);){var t=d,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:d,context:h}}(e=we.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,y[e]=y[0],y[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(g(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=I,n=(I=this.threadID,P.current);P.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;y[i]=y[0],y[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===p)this.popProvider(a.type);else if(a.type===h){this.suspenseDepth--;var c=r.pop();if(o){var o=!1,u=a.fallbackFrame;if(!u)throw Error(O(303));this.stack.push(u),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=s}else{var l=a.children[a.childIndex++],f="";try{f+=this.render(l,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(O(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{P.current=n,I=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"+k(n);this.previousWasTextNode=!0}return k(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!C.isValidElement(e)){if(null==e||null==e.$$typeof)return e=N(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(O(257));throw Error(O(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case F:case l:case z:case c:return e=N(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:throw Error(O(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case d:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=N(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case B:return e=[C.createElement(o.type,E({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case p:return n={type:e,domNamespace:n,children:o=N(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case f:o=e.type,i=e.props;var a=this.threadID;return g(o,a),o=N(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case U:throw Error(O(338));case K: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=[C.createElement(o._result,E({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(O(295))}case W:throw Error(O(343))}throw Error(O(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!he.hasOwnProperty(r)){if(!de.test(r))throw Error(O(65,r));he[r]=!0}var o,i,a,s,c,u=e.props;if("input"===r)u=E({type:void 0},u,{defaultChecked:void 0,defaultValue:void 0,value:null!=u.value?u.value:u.defaultValue,checked:null!=u.checked?u.checked:u.defaultChecked});else if("textarea"===r){if(null==(l=u.value)){var l=u.defaultValue,f=u.children;if(null!=f){if(null!=l)throw Error(O(92));if(Array.isArray(f)){if(!(f.length<=1))throw Error(O(93));f=f[0]}l=""+f}null==l&&(l="")}u=E({},u,{value:void 0,children:""+l})}else if("select"===r)this.currentSelectValue=null!=u.value?u.value:u.defaultValue,u=E({},u,{value:void 0});else if("option"===r){var f=this.currentSelectValue,p=null==(p=u.children)?p:(o="",C.Children.forEach(p,function(e){null!=e&&(o+=e)}),o);if(null!=f){var d=null!=u.value?u.value+"":p;if(l=!1,Array.isArray(f)){for(var h=0;h<f.length;h++)if(""+f[h]===d){l=!0;break}}else l=""+f===d;u=E({selected:void 0,children:void 0},u,{selected:l,children:p})}}if(l=u){if(ce[r]&&(null!=l.children||null!=l.dangerouslySetInnerHTML))throw Error(O(137,r,""));if(null!=l.dangerouslySetInnerHTML){if(null!=l.children)throw Error(O(60));if(!("object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML))throw Error(O(61))}if(null!=l.style&&"object"!=typeof l.style)throw Error(O(62,""))}for(_ in l=u,f=this.makeStaticMarkup,p=1===this.stack.length,d="<"+e.type,l)if(ye.call(l,_)){var y=l[_];if(null!=y){if("style"===_){var m,g,v,b,h=void 0,w="",S="";for(h in y)y.hasOwnProperty(h)&&(m=0===h.indexOf("--"),null!=(g=y[h]))&&(w+=S+(b=m?h:(b=h,A.hasOwnProperty(b)?A[b]:(v=b.replace(le,"-$1").toLowerCase().replace(fe,"-ms-"),A[b]=v)))+":",S=h,w+=m=null==g||"boolean"==typeof g||""===g?"":m||"number"!=typeof g||0===g||M.hasOwnProperty(S)&&M[S]?(""+g).trim():g+"px",S=";");y=w||null}h=null;e:if(g=l,-1===(m=r).indexOf("-"))m="string"==typeof g.is;else switch(m){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":m=!1;break e;default:m=!0}m?me.hasOwnProperty(_)||(h=Z(h=_)&&null!=y?h+'="'+k(y)+'"':""):(i=_,a=y,c=s=void 0,s=x.hasOwnProperty(i)?x[i]:null,h=(c=(c="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||J(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(c=s.type)||4===c&&!0===a?i+'=""':i+'="'+k(a=s.sanitizeURL?""+a:a)+'"'):Z(i)?i+'="'+k(a)+'"':""),h&&(d+=" "+h)}}f||p&&(d+=' data-reactroot=""');var _=d;l="",se.hasOwnProperty(r)?_+="/>":(_+=">",l="</"+e.type+">");e:{if(null!=(f=u.dangerouslySetInnerHTML)){if(null!=f.__html){f=f.__html;break e}}else if("string"==typeof(f=u.children)||"number"==typeof f){f=k(f);break e}f=null}return null!=f?(u=[],pe.hasOwnProperty(r)&&"\n"===f.charAt(0)&&(_+="\n"),_+=f):u=N(u.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:u,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,_};var be=we,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(O(207))},renderToStaticNodeStream:function(){throw Error(O(208))},version:"16.14.0"};function we(e,t){if(e=C.isValidElement(e)&&(e.type!==c||(e=e.props.children,C.isValidElement(e)))?[e]:N(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:q,footer:""},0===(n=y[0])){var n,r=y,o=2*(n=r.length);if(!(o<=65536))throw Error(O(304));var i=new Uint16Array(o);for(i.set(r),(y=i)[0]=n+1,r=n;r<o-1;r++)y[r]=r+1;y[o-1]=0}else y[0]=y[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=[]}R.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"2.1.5","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.13.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.13.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(R,e,o){"use strict";o.r(e),o.d(e,"Editor",function(){return _o}),o.d(e,"EditorPreview",function(){return Uo});var y=o(0),m=o.n(y),e=o(1),d=o.n(e),h=o(2),g=o(4),e=o(39),L=o.n(e),e=o(92),F=o.n(e),z=o(24),e=o(5),v=o.n(e);function B(e){return(B="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 K(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,function(e){e=function(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===B(e)?e:String(e)}(r.key),r)}}function H(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U=H(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 q(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,function(e){e=function(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===W(e)?e:String(e)}(r.key),r)}}function V(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var G,Y=V(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}}),$=[],Z={onKeyDown:function(t){$.forEach(function(e){e(t)})},registerCallBack:function(e){$.push(e)},deregisterCallBack:function(t){$=$.filter(function(e){return e!==t})}},J=function(){G=!0},X=function(){G=!1},Q=function(){return G};function ee(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function te(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 f(e){e.stopPropagation()}function ne(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 re(e){return e[e.options[0]].icon}function oe(e,n){var r;return e&&void 0===n?e:(r={},te(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=oe(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)}function i(e){return(i="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 ie(e,t,n){(t=se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ae(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,se(r.key),r)}}function se(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}function ce(e,t){return(ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(n){var r=function(){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=le(n),t=(e=r?(e=le(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ce(t,e);var n,a=ue(s);function s(){var i,e=this,t=s;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=a.call.apply(a,[this].concat(r))).onClick=function(){var e=i.props,t=e.disabled,n=e.onClick,e=e.value;t||n(e)},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}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,i=t.active,a=t.disabled,t=t["aria-label"],o=v()((ie(e={},"Editor-option",!0),ie(e,"Editor-option--active",i&&!o),ie(e,"".concat(o),i&&o),ie(e,"Editor-option--disabled",a),e),r);return m.a.createElement("div",{"aria-label":t,onKeyDown:this.handleKeyDown,tabIndex:0,className:o,onClick:this.onClick,"aria-selected":i},n)}}])&&ae(t.prototype,e),n&&ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),b=(u.propTypes={onClick:d.a.func.isRequired,children:d.a.any,value:d.a.string,className:d.a.string,activeClassName:d.a.string,active:d.a.bool,disabled:d.a.bool,title:d.a.string,tabIndex:d.a.number},u.defaultProps={activeClassName:""},o(3));function a(e){return(a="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 fe(e,t,n){(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function pe(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,de(r.key),r)}}function de(e){e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===a(e)?e:String(e)}function he(e,t){return(he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ye(n){var r=function(){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=me(n),t=(e=r?(e=me(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e);var n,r=ye(o);function o(e){var i;if(this instanceof o)return(i=r.call(this,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=m.a.createRef(),i.listRef=m.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}return t=o,(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.onExpandEvent,e.menu),c=this.state.highlighted,u=r.slice(1,r.length),l=v()((fe(l={},"Editor-dropdown",!0),fe(l,"Editor-dropdown--expanded",t),l),o);return m.a.createElement("div",{className:l},m.a.createElement(b.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&m.a.createElement(b.f,{name:"keyboard_arrow_down"})),t&&m.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:f},m.a.Children.map(u,function(e,t){return e&&m.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&pe(t.prototype,e),n&&pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.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 ge(e,t,n){(t=be(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ve(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,be(r.key),r)}}function be(e){e=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===c(e)?e:String(e)}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(n){var r=function(){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"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}w.propTypes={children:d.a.any,onChange:d.a.func,className:d.a.string,expanded:d.a.bool,menu:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,optionWrapperClassName:d.a.string,triggerClassName:d.a.string,ariaLabel:d.a.string,title:d.a.string};var S=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&we(t,e);var n,a=Se(s);function s(){var i,e=this,t=s;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=a.call.apply(a,[this].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}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,i=t.highlighted,a=t.className,s=t.isCheckbox,c=t.activeClassName,u=t.disabledClassName,t=t.highlightedClassName,c=v()((ge(e={},"Editor-dropdown-option",!0),ge(e,"Editor-dropdown-option--active ".concat(c),r&&!s),ge(e,"".concat(t),i),ge(e,"".concat(u),o),e),a);return m.a.createElement("li",{tabIndex:1,className:c,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},n)}}])&&ve(t.prototype,e),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);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 Ee(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,Ce(r.key),r)}}function Ce(e){e=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===l(e)?e:String(e)}function Oe(e,t){return(Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(n){var r=function(){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=ke(n),t=(e=r?(e=ke(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}S.propTypes={children:d.a.any,value:d.a.any,onClick:d.a.func,onSelect:d.a.func,setHighlighted:d.a.func,index:d.a.number,disabled:d.a.bool,active:d.a.bool,highlighted:d.a.bool,className:d.a.string,activeClassName:d.a.string,disabledClassName:d.a.string,highlightedClassName:d.a.string,title:d.a.string,isCheckbox:d.a.bool},S.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var De=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e);var n,r=xe(o);function o(){var e=this,t=o;if(e instanceof t)return r.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,t=e.expanded,n=e.doExpand,r=e.onExpandEvent,o=e.doCollapse,a=e.currentState,e=e.onChange,s=i.options.length-i.max;return m.a.createElement(b.n,{tooltip:"More formatting"},m.a.createElement(w,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},m.a.createElement(b.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.title,r.label);return m.a.createElement(S,{key:t,value:e,active:n,isCheckbox:1<s},1<s?m.a.createElement(b.b,{checked:n,label:r}):m.a.createElement(m.a.Fragment,null,m.a.createElement(b.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),m.a.createElement(b.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,c=v()((e={},t=!0,(c=Ce(c="Editor-textDecoration"))in e?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return m.a.createElement("div",{className:c},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 m.a.createElement(b.n,{tooltip:o},m.a.createElement(u,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},m.a.createElement(b.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&Ee(t.prototype,e),n&&Ee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.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 Te(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,function(e){e=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===p(e)?e:String(e)}(r.key),r)}}function je(e,t){return(je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ie(n){var r=function(){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=Me(n),t=(e=r?(e=Me(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.a.string};e=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&je(t,e);var n,r=Ie(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,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(g.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=h.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},te(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})};var e=o.props,t=e.editorState;e.modalHandler;return o.state={currentStyles:t?o.changeKeys(Object(g.getSelectionInlineStyle)(t)):{}},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(g.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,n=n.currentStyles,o=t.component||De;return m.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&Te(t.prototype,e),n&&Te(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.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 Ne(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,function(e){e=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===_(e)?e:String(e)}(r.key),r)}}function Pe(e,t){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ae(n){var r=function(){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=Re(n),t=(e=r?(e=Re(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Re(e){return(Re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string};var t=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pe(t,e);var n,r=Ae(o);function o(e){if(this instanceof o)return(e=r.call(this,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")}return t=o,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType,o=t.expanded,i=t.doExpand,a=t.onExpandEvent,s=t.doCollapse,c=t.onChange,t=t.className;return m.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},m.a.createElement(b.n,{tooltip:"Text style"},m.a.createElement(w,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},m.a.createElement(b.f,{name:n,size:20}),e.map(function(e,t){return m.a.createElement(S,{index:t,active:r===e.label,value:e.label,key:t},m.a.createElement(b.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)}}])&&Ne(t.prototype,e),n&&Ne(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Le=(t.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.string},t);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 Fe(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,function(e){e=function(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===E(e)?e:String(e)}(r.key),r)}}function ze(e,t){return(ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Be(n){var r=function(){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=Ke(n),t=(e=r?(e=Ke(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===E(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ke(e){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ze(t,e);var n,r=Be(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,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=h.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(g.getSelectedBlocksType)(e):"unstyled"},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(g.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 m.a.createElement(Le,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&Fe(t.prototype,e),n&&Fe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),t.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,config:d.a.object,className:d.a.string};o(201);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 He(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,function(e){e=function(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===C(e)?e:String(e)}(r.key),r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function We(n){var r=function(){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=qe(n),t=(e=r?(e=qe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===C(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ve=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e);var n,i=We(a);function a(){var 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(e=i.call.apply(i,[this].concat(r))).state={defaultFontSize:void 0},e}return t=a,(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 m.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),r=(t.dropdownClassName,t.options),t=(t.title,e.onChange),e=(e.expanded,e.doCollapse,e.onExpandEvent,e.doExpand,e.translations,this.props.currentState.fontSize),o=this.state.defaultFontSize,o=Number(o);e||r&&r.indexOf(o);return m.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},m.a.createElement(b.d,{className:v()("rdw-fontsize-dropdown",n),onChange:t,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:r.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&He(t.prototype,e),n&&He(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.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 Ge(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,function(e){e=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===O(e)?e:String(e)}(r.key),r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $e(n){var r=function(){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=Ze(n),t=(e=r?(e=Ze(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ve.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object};var Je=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e);var n,o=$e(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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(g.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(g.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(g.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||Ve,n=n&&Number(n.substring(9));return m.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})}}])&&Ge(t.prototype,e),n&&Ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);Je.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object},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 Xe(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,function(e){e=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===x(e)?e:String(e)}(r.key),r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(n){var r=function(){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=tt(n),t=(e=r?(e=tt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===x(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var n=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qe(t,e);var n,i=et(a);function a(){var 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(e=i.call.apply(i,[this].concat(r))).state={defaultFontFamily:void 0},e}return t=a,(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,c=e.expanded,u=e.doCollapse,l=e.onExpandEvent,e=e.doExpand,f=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return m.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},m.a.createElement(w,{className:v()("rdw-fontfamily-dropdown",r),optionWrapperClassName:v()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:c,doExpand:e,doCollapse:u,onExpandEvent:l,title:n||a["components.controls.fontfamily.fontfamily"]},m.a.createElement("span",{className:"rdw-fontfamily-placeholder"},f||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return m.a.createElement(S,{active:f===e,value:e,key:t},e)})))}}])&&Xe(t.prototype,e),n&&Xe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component),nt=(n.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object},n);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 rt(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,function(e){e=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===k(e)?e:String(e)}(r.key),r)}}function ot(e,t){return(ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function it(n){var r=function(){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=at(n),t=(e=r?(e=at(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===k(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e);var n,o=it(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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(g.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(g.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(g.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||nt,n=n&&n.substring(11);return m.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);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 st(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,ct(r.key),r)}}function ct(e){e=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===D(e)?e:String(e)}function ut(e,t){return(ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lt(n){var r=function(){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=ft(n),t=(e=r?(e=ft(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===D(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var pt=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ut(t,e);var n,a=lt(s);function s(){var t,e=this,n=s;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=a.call.apply(a,[this].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}return t=s,(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=v()((e={},t=!0,(a=ct(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return m.a.createElement("div",{className:a},m.a.createElement(b.n,{tooltip:i.title},m.a.createElement(u,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},m.a.createElement(b.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),m.a.createElement(b.n,{tooltip:r.title},m.a.createElement(u,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},m.a.createElement(b.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&st(t.prototype,e),n&&st(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);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 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,function(e){e=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===T(e)?e:String(e)}(r.key),r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yt(n){var r=function(){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=mt(n),t=(e=r?(e=mt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===T(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.a.string};var gt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ht(t,e);var n,o=yt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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=t.editorState,t=h.RichUtils.toggleBlockType(t,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(g.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(g.getBlockBeforeSelectedBlock)(e);return!e||!Object(g.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(g.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(g.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(g.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"),m.a.createElement(pt,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&dt(t.prototype,e),n&&dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);gt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object,className:d.a.string},o(203);function j(e){return(j="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 vt(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,function(e){e=function(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===j(e)?e:String(e)}(r.key),r)}}function bt(e,t){return(bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(n){var r=function(){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=St(n),t=(e=r?(e=St(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _t=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e);var n,r=wt(o);function o(){var e=this,t=o;if(e instanceof t)return r.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return t=o,(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,c=e.currentState.textAlignment,e=e.translations;return m.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&m.a.createElement(u,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&m.a.createElement(u,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&m.a.createElement(u,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&m.a.createElement(u,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},m.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,c=t.options,u=t.left,l=t.center,f=t.right,p=t.justify,d=t.className,h=t.dropdownClassName,y=t.title;return m.a.createElement(w,{className:v()("rdw-text-align-dropdown",d),optionWrapperClassName:v()(h),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:y||e["components.controls.textalign.textalign"]},m.a.createElement("img",{src:a&&t[a]&&t[a].icon||re(t),alt:""}),0<=c.indexOf("left")&&m.a.createElement(S,{value:"left",active:"left"===a,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("center")&&m.a.createElement(S,{value:"center",active:"center"===a,className:v()("rdw-text-align-dropdownOption",l.className),title:l.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:l.icon,alt:""})),0<=c.indexOf("right")&&m.a.createElement(S,{value:"right",active:"right"===a,className:v()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:f.icon,alt:""})),0<=c.indexOf("justify")&&m.a.createElement(S,{value:"justify",active:"justify"===a,className:v()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.justify"]},m.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&vt(t.prototype,e),n&&vt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);function Et(e){return(Et="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 Ct(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,function(e){e=function(e,t){if("object"!==Et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Et(e)?e:String(e)}(r.key),r)}}function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xt(n){var r=function(){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=kt(n),t=(e=r?(e=kt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Et(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function kt(e){return(kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_t.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var Dt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e);var n,o=xt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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(g.setBlockData)(n,{"text-align":e}):Object(g.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(g.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,e=e.translations,n=this.state,r=n.expanded,n=n.currentTextAlignment,o=t.component||_t;return m.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function Tt(e){return(Tt="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 jt(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,function(e){e=function(e,t){if("object"!==Tt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Tt(e)?e:String(e)}(r.key),r)}}function It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mt(n){var r=function(){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=Nt(n),t=(e=r?(e=Nt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Nt(e){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dt.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Pt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&It(t,e);var n,r=Mt(i);function i(e){var o;if(this instanceof i)return(o=r.call(this,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,e=e.bgColor,r="color"===o.state.currentStyle?n:e;return m.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return m.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},m.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&&m.a.createElement(b.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=m.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}return t=i,(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=e.onToggle,e=e.className,n=m.a.createElement(b.n,{tooltip:"Text color"},m.a.createElement(u,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:"text_format",size:20})));return m.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},m.a.createElement(b.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&jt(t.prototype,e),n&&jt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),At=(Pt.propTypes={expanded:d.a.bool,onToggle:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.className},Pt);function Rt(e){return(Rt="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,function(e){e=function(e,t){if("object"!==Rt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Rt(e)?e:String(e)}(r.key),r)}}function Ft(e,t){return(Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zt(n){var r=function(){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=Bt(n),t=(e=r?(e=Bt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Bt(e){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pt=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ft(t,e);var n,r=zt(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,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(g.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(g.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(g.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(g.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(g.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}return t=o,(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||At,r=r&&r.substring(6),o=o&&o.substring(8);return m.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Lt(t.prototype,e),n&&Lt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(Pt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string},o(93)),r=o.n(r);function Kt(e){return(Kt="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 Ht(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,Ut(r.key),r)}}function Ut(e){e=function(e,t){if("object"!==Kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Kt(e)?e:String(e)}function Wt(e,t){return(Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qt(n){var r=function(){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=Vt(n),t=(e=r?(e=Vt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Kt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wt(t,e);var n,a=qt(s);function s(){var r,e=this,t=s;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=a.call.apply(a,[this].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=Ut(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}return t=s,(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,t=t.editing;return m.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:f},m.a.createElement(b.m,{weight:"strong",size:"large"},t?"Edit":"Insert a"," link"),m.a.createElement(b.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:f}),m.a.createElement(b.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:f}),m.a.createElement("div",{className:"d-flex justify-content-end"},m.a.createElement(b.a,{onClick:e,className:"mr-4"},"Cancel"),m.a.createElement(b.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"Save")))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?m.a.createElement(S,null,m.a.createElement(b.f,{size:20,name:n,className:"mr-4"}),m.a.createElement(b.m,null,t)):m.a.createElement(b.n,{tooltip:"Link"},m.a.createElement(u,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:n,size:20})));return m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},m.a.createElement(b.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Ht(t.prototype,e),n&&Ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Gt=(I.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,inDropdown:d.a.boolean},I);function Yt(e){return(Yt="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 $t(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,tn(r.key),r)}}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jt(n){var r=function(){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=Xt(n),t=(e=r?(e=Xt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Xt(e){return(Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qt(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 en(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=tn(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)):Qt(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function tn(e){e=function(e,t){if("object"!==Yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yt(e)?e:String(e)}function nn(e){var t=rn.match(e.target);return en(en({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var rn=r()(),I=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e);var n,r=Jt(o);function o(e){var s;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(s=r.call(this,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||nn)({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,r=n.currentEntity,n=(n.link,t.getCurrentContent()),o={};return r&&"LINK"===n.getEntity(r).get("type")&&(o.link={},e=r&&Object(g.getEntityRange)(t,r),o.link.target=r&&n.getEntity(r).get("data").url,o.link.targetOption=r&&n.getEntity(r).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(g.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(g.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(h.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(g.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=h.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=h.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=h.EditorState.acceptSelection(n,a),t=h.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(h.EditorState.push(n,t,"insert-characters")),s.props.onCloseLinkPopover(),s.doCollapse()};var e=s.props,t=e.editorState,e=e.linkPopoverOpen;return s.state={expanded:e,selectionText:void 0,link:void 0,currentEntity:t?Object(g.getSelectionEntity)(t):void 0},s}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(g.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,r=r.selectionText;return m.a.createElement(Gt,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&$t(t.prototype,e),n&&$t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,inDropdown:d.a.boolean,linkPopoverOpen:d.a.bool},I);function on(e){return(on="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,function(e){e=function(e,t){if("object"!==on(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===on(e)?e:String(e)}(r.key),r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(n){var r=function(){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=un(n),t=(e=r?(e=un(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===on(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sn(t,e);var n,r=cn(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,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(g.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),h.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=h.EditorState.push(t,r,"insert-characters");n(h.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(g.getSelectionEntity)(e):void 0},i}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(g.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.mention.label;e.inDropdown;return m.a.createElement(b.n,{tooltip:r||t},m.a.createElement(u,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},m.a.createElement(b.f,{name:n,size:20})))}}])&&an(t.prototype,e),n&&an(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.boolean};o(209);function ln(e){return(ln="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 fn(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,pn(r.key),r)}}function pn(e){e=function(e,t){if("object"!==ln(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ln(e)?e:String(e)}function dn(e,t){return(dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hn(n){var r=function(){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=yn(n),t=(e=r?(e=yn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ln(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dn(t,e);var n,a=hn(s);function s(){var r,e=this,t=s;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=a.call.apply(a,[this].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=pn(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}return t=s,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,t=t.config;!n&&e.expanded&&(e=(n=t.defaultSize).height,t=n.width,this.setState({embeddedLink:"",height:e,width:t}))}},{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 m.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:f},m.a.createElement("div",{className:"rdw-embedded-modal-header"},m.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],m.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),m.a.createElement("div",{className:"rdw-embedded-modal-link-section"},m.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},m.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"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("div",{className:"rdw-embedded-modal-size"},m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),m.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},m.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),m.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 m.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},m.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&fn(t.prototype,e),n&&fn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),gn=(mn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,doCollapse:d.a.func},mn);function vn(e){return(vn="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 bn(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,function(e){e=function(e,t){if("object"!==vn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===vn(e)?e:String(e)}(r.key),r)}}function wn(e,t){return(wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sn(n){var r=function(){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=_n(n),t=(e=r?(e=_n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wn(t,e);var n,i=Sn(s);function s(){var a,e=this,t=s;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=i.call.apply(i,[this].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(h.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()},a}return t=s,(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,e=e.translations,n=this.state.expanded,r=t.component||gn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&bn(t.prototype,e),n&&bn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),mn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};o(210);function En(e){return(En="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 Cn(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,function(e){e=function(e,t){if("object"!==En(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==En(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===En(e)?e:String(e)}(r.key),r)}}function On(e,t){return(On=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(n){var r=function(){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=kn(n),t=(e=r?(e=kn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===En(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&On(t,e);var n,a=xn(s);function s(){var t,e=this,n=s;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=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}return t=s,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return m.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:f},e.map(function(e,t){return m.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,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return m.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t||e["components.controls.emoji.emoji"]},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i},m.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Cn(t.prototype,e),n&&Cn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Tn=(Dn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object},Dn);function jn(e){return(jn="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 In(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,function(e){e=function(e,t){if("object"!==jn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jn(e)?e:String(e)}(r.key),r)}}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nn(n){var r=function(){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=Pn(n),t=(e=r?(e=Pn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mn(t,e);var n,a=Nn(s);function s(){var r,e=this,t=s;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=a.call.apply(a,[this].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=h.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(h.EditorState.push(n,e,"insert-characters")),r.doCollapse()},r}return t=s,(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,e=e.translations,n=this.state.expanded,r=t.component||Tn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&In(t.prototype,e),n&&In(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);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 Rn(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=function(e,t){if("object"!==An(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===An(e)?e:String(e)}function Fn(e,t){return(Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zn(n){var r=function(){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=Bn(n),t=(e=r?(e=Bn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===An(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Kn=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fn(t,e);var n,r=zn(o);function o(e){var i;if(this instanceof o)return(i=r.call(this,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=Ln(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=m.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")}return t=o,(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.className,t.title),t=t.inputAccept,o=e.expanded;return e.inDropdown?m.a.createElement(S,null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20,className:"mr-4"}),m.a.createElement(b.m,null,r)),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},m.a.createElement(b.n,{tooltip:r},m.a.createElement(u,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},m.a.createElement("span",null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20}))),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Rn(t.prototype,e),n&&Rn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Hn=(Kn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,inDropdown:d.a.bool},Kn);function Un(e){return(Un="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 Wn(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,function(e){e=function(e,t){if("object"!==Un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Un(e)?e:String(e)}(r.key),r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(n){var r=function(){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=Gn(n),t=(e=r?(e=Gn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Gn(e){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return m.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},m.a.createElement(u,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},m.a.createElement("img",{src:r,alt:""})))}var Kn=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e);var n,r=Vn(o);function o(e){var s;if(this instanceof o)return(s=r.call(this,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(h.AtomicBlockUtils.insertAtomicBlock(i,t," "))},s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown;return m.a.createElement(Hn,{config:t,inDropdown:e,onChange:this.addImage})}}])&&Wn(t.prototype,e),n&&Wn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),$n=(Kn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.bool},o(211),Yn.propTypes={onChange:d.a.func,config:d.a.object,translations:d.a.object},Yn);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 Jn(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,function(e){e=function(e,t){if("object"!==Zn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Zn(e)?e:String(e)}(r.key),r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qn(n){var r=function(){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=er(n),t=(e=r?(e=er(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Zn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e);var n,a=Qn(s);function s(){var n,e=this,t=s;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=a.call.apply(a,[this].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=h.Modifier.removeInlineStyle(r,n.getSelection(),e)}),te(Object(g.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=h.Modifier.removeInlineStyle(r,n.getSelection(),t))}),h.EditorState.push(n,r,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}return t=s,(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,e=e.translations,n=this.state.expanded,r=t.component||$n;return m.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Jn(t.prototype,e),n&&Jn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);tr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,config:d.a.object,translations:d.a.object,modalHandler:d.a.object},o(212);function nr(e){return(nr="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 rr(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,function(e){e=function(e,t){if("object"!==nr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===nr(e)?e:String(e)}(r.key),r)}}function or(e,t){return(or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(n){var r=function(){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=ar(n),t=(e=r?(e=ar(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sr=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&or(t,e);var n,a=ir(s);function s(){var t,e=this,n=s;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=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}return t=s,(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,c=t.options,u=t.undo,l=t.redo,f=t.className,p=t.dropdownClassName,d=t.title;return m.a.createElement(w,{className:v()("rdw-history-dropdown",f),optionWrapperClassName:v()(p),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:d||e["components.controls.history.history"]},m.a.createElement("img",{src:re(t),alt:""}),0<=c.indexOf("undo")&&m.a.createElement(S,{value:"undo",onClick:this.onChange,disabled:s,className:v()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("redo")&&m.a.createElement(S,{value:"redo",onClick:this.onChange,disabled:a,className:v()("rdw-history-dropdownoption",l.className),title:l.title||e["components.controls.history.redo"]},m.a.createElement("img",{src:l.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 m.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&m.a.createElement(u,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&m.a.createElement(u,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},m.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&rr(t.prototype,e),n&&rr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function cr(e){return(cr="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 ur(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,function(e){e=function(e,t){if("object"!==cr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===cr(e)?e:String(e)}(r.key),r)}}function lr(e,t){return(lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fr(n){var r=function(){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=pr(n),t=(e=r?(e=pr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===cr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}sr.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var dr=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lr(t,e);var n,o=fr(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=h.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}return t=i,(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,e=e.translations,n=this.state,r=n.undoDisabled,o=n.redoDisabled,n=n.expanded,i=t.component||sr;return m.a.createElement(i,{config:t,translations:e,currentState:{undoDisabled:r,redoDisabled:o},expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&ur(t.prototype,e),n&&ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function hr(e){return(hr="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)}dr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var yr=["config","currentState","onChange"],mr=["config"];function gr(){return(gr=Object.assign?Object.assign.bind():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 vr(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(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 br(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,function(e){e=function(e,t){if("object"!==hr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===hr(e)?e:String(e)}(r.key),r)}}function wr(e,t){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(n){var r=function(){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=_r(n),t=(e=r?(e=_r(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _r(e){return(_r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wr(t,e);var n,r=Sr(o);function o(e){var t;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(t=r.call(this,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,e.modalHandler;return t.state={expanded:!1},t}return t=o,(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=(e.currentState,e.onChange,vr(e,yr));this.state.expanded;return m.a.createElement(w,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},m.a.createElement(b.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=Cr[e];return m.a.createElement(e,gr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=vr(e,mr),e=i.max;return m.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=Cr[e];return(o.props.mention||"mention"!==e)&&n.isVisible?m.a.createElement(r,gr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&br(t.prototype,e),n&&br(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Cr=(Er.propTypes={onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,mention:d.a.object,linkPopoverOpen:d.a.bool,translations:d.a.object},{textDecoration:e,heading:t,fontSize:Je,insert:Er,fontFamily:n,list:gt,textAlign:Dt,colorPicker:Pt,link:r,mention:I,embedded:mn,emoji:Dn,image:Kn,remove:tr,history:dr});function Or(e){return(Or="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,function(e){e=function(e,t){if("object"!==Or(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Or(e)?e:String(e)}(r.key),r)}}function kr(e,t){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dr(n){var r=function(){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=Tr(n),t=(e=r?(e=Tr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Tr(e){return(Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jr(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function Ir(c){var e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e);var n,a=Dr(s);function s(){var o,e=this,t=s;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=a.call.apply(a,[this].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=c.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(g.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=h.Modifier.setBlockType(r,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");c.onChange(h.EditorState.push(c.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),c.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}return t=s,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,e=e.contentState.getEntity(n).getData().url,n=this.state.open,t=m.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},m.a.createElement(b.m,{appearance:"link"},t));return m.a.createElement(b.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},m.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},m.a.createElement(b.h,{href:e,target:"_new",className:"Editor-link"},e),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&xr(t.prototype,e),n&&xr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);return e.propTypes={entityKey:d.a.string.isRequired,children:d.a.array,contentState:d.a.object},e}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 Nr(){return(Nr=Object.assign?Object.assign.bind():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 Pr(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 Ar(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Pr(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=Fr(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)):Pr(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function Rr(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,Fr(r.key),r)}}function Lr(e,t,n){return t&&Rr(e.prototype,t),n&&Rr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fr(e){e=function(e,t){if("object"!==Mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Mr(e)?e:String(e)}var e=Lr(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=Ar(Ar({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),m.a.createElement(b.c,Nr({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(g.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=h.Modifier.setBlockType(n,r,"unstyled"),t=h.Modifier.removeRange(t,r,"backward");e.onChange(h.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:d.a.number,children:d.a.array,contentState:d.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),zr=(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 Br(e){return(Br="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 M(e,t,n){(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Kr(e,t){return(Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Hr(n){var r=function(){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=Ur(n),t=(e=r?(e=Ur(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wr(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,Vr(r.key),r)}}function qr(e,t,n){return t&&Wr(e.prototype,t),n&&Wr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){e=function(e,t){if("object"!==Br(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Br(e)?e:String(e)}function Gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yr(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return m.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var $r=qr(function e(t){var c=this,n=(Gr(this,e),this.findSuggestionEntities=function(e,t){var n,r,o,i,a,s;c.config.getEditorState()&&(n=(i=c.config).separator,r=i.trigger,o=i.getSuggestions,a=i.getEditorState,i=i.fetchSuggestions,(a=a().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<ne(o(),e.substr(a+s.length,e.length),c.config.caseSensitive).length)&&t(0===a?0:a+1,e.length)},this.getSuggestionComponent=function(){var e,f=this.config;return(e=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kr(t,e);var r=Hr(o);function o(){var l;Gr(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(l=r.call.apply(r,[this].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0},l.focusOption=function(e,t,n){var t=document.querySelectorAll(t),n=("string"==typeof n&&(n=parseInt(n)),"down"===e?n+1:n-1),r=n,e="down"===e?t.length:-1,n=(r===e&&(r=0),t[r=-1===n&&-1===e?t.length-1:r]);n&&n.scrollIntoView({block:"end"})},l.onEditorKeyDown=function(e){var t=l.state.activeOption,n={},r=".Editor-dropdown-option";l.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),l.focusOption("down",r,t),t===l.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?(e.preventDefault(),l.focusOption("up",r,t),n.activeOption=t<=0?l.filteredSuggestions.length-1:Number(t)-1):"Escape"===e.key?(n.showSuggestions=!1,X()):"Enter"===e.key&&l.addMention(),l.setState(n)},l.onOptionMouseOver=function(e){l.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<l.filteredSuggestions.length&&l.setState({activeOption:e})},l.disableMouseEvents=function(){l.setState({keyDown:!0})},l.enableMouseEvents=function(){l.setState({keyDown:!1})},l.setSuggestionReference=function(e){l.suggestion=e},l.setDropdownReference=function(e){l.dropdown=e},l.closeSuggestionDropdown=function(){l.state.showSuggestions&&l.setState({showSuggestions:!1})},l.filteredSuggestions=[],l.filterSuggestions=function(e){var t=f.getSuggestions?f.getSuggestions():[];l.filteredSuggestions=ne(t,e,f.caseSensitive)},l.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){f.fetchSuggestions(e).then(function(e){l.filteredSuggestions=e,l.setState({showSuggestions:0<e.length,showLoader:!1})})}),l.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);f.fetchSuggestions?(l.setState({showLoader:!0}),l.debouncedFetchSuggestion(e)):l.filterSuggestions(e)},l.addMention=function(e){var t,n,r,o=l.state.activeOption,i=f.getEditorState(),a=f.onChange,s=f.separator,c=f.trigger,o=l.filteredSuggestions[o],u=l.props.children[0].props.text.substr(1);o&&(i=i,a=a,s=s,c=c,e=e,u=u,t=(o=o).label,n=o.value,o=o.url,n=i.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(c).concat(n),value:n,url:o}).getLastCreatedEntityKey(),o=Object(g.getSelectedBlock)(i).getText(),r=i.getSelection().focusOffset,s=(o.lastIndexOf(s+c,r)||0)+1,c=!1," "===o[r=o.length===s+1?o.length:r]&&(c=!0),e&&(r=s+u.length+1),o=i.getSelection().merge({anchorOffset:s,focusOffset:r}),e=h.EditorState.acceptSelection(i,o),u=h.Modifier.replaceText(e.getCurrentContent(),o,"".concat(t),null,n),e=h.EditorState.push(e,u,"insert-characters"),c||(o=e.getSelection().merge({anchorOffset:s+t.length,focusOffset:s+t.length}),e=h.EditorState.acceptSelection(e,o),u=h.Modifier.insertText(e.getCurrentContent(),o," ",e.getCurrentInlineStyle(),void 0)),a(h.EditorState.push(e,u,"insert-characters")))},l.getOptionClass=function(e){var t,n=l.state.activeOption;return v()((M(t={},"Editor-dropdown-option",!0),M(t,"Editor-dropdown-option--highlight",e===n),M(t,"Editor-dropdown--keydown",l.state.keyDown),t))},l.renderOption=function(e,t){var n,r=f.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,l.state.activeOption,t),m.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){l.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:l.onOptionMouseOver})):m.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return l.addMention("onMouseSelect")},"data-index":t,onMouseOver:l.onOptionMouseOver,className:l.getOptionClass(t)},o&&m.a.createElement(b.f,{name:o,className:"mr-4"}),m.a.createElement(b.m,null,i))},l}return qr(o,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),Z.registerCallBack(this.onEditorKeyDown),J(),f.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.updateSuggestions(this.props),this.setState({showSuggestions:!0}),document.addEventListener("scroll",this.closeSuggestionDropdown,{once:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.closeSuggestionDropdown),Z.deregisterCallBack(this.onEditorKeyDown),X(),f.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e,n=this,t=this.props.children,r=this.state.showSuggestions,o=f.dropdownOptions,o=(void 0===o?{}:o).dropdownClassName,o=v()((M(e={},"Popover",!0),M(e,"".concat(o),void 0!==o),M(e,"Editor-mention-dropdown",!0),M(e,"position-fixed",!0),e));return m.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:f.modalHandler.onSuggestionClick,"aria-haspopup":"true"},m.a.createElement("span",null,t),r&&m.a.createElement("span",{className:o,style:this.state.style,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents},this.state.showLoader?m.a.createElement("span",{className:"Editor-dropdown-option"},m.a.createElement(b.j,{withImage:!1},m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}]),o}(y.Component)).propTypes={children:d.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:c.findSuggestionEntities,component:c.getSuggestionComponent()}},t.separator),r=t.trigger,o=t.getSuggestions,i=t.onChange,a=t.getEditorState,s=t.getWrapperRef,u=t.caseSensitive,l=t.optionClassName,f=t.modalHandler,p=t.dropdownOptions,t=t.fetchSuggestions;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:o,onChange:i,getEditorState:a,getWrapperRef:s,caseSensitive:u,dropdownOptions:p,optionClassName:l,modalHandler:f,fetchSuggestions:t}}),Zr=function(e){return[new zr(e).getMentionDecorator(),new $r(e).getSuggestionDecorator()]},Jr=(Yr.propTypes={block:d.a.object,contentState:d.a.object},Yr);function Xr(e,t,n){return Math.min(Math.max(e,t),n)}var N={east:1,north:8,south:2,west:4};function Qr(e){function t(e,t){var n,r,o,i=s.current,a=c.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=l.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.direction=t,o=(e=t)===N.east||e===N.west,t=e===N.north||e===N.south,e=e&N.north&&e&N.west||e&N.south&&e&N.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==f&&f.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),u.current.value=document.body.style.getPropertyValue("-webkit-user-select"),u.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",d),document.addEventListener("pointerup",h))}var i=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,c=Object(y.useRef)(),u=Object(y.useRef)({priority:"",value:"default"}),l=Object(y.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),f=(Object(y.useEffect)(function(){return function(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h)}},[]),e),a=n||(null!==f?f.getBoundingClientRect().width-20:100),p=null!==f?f.getBoundingClientRect().height-20:100,d=function(e){var t,n=s.current,r=l.current,o=r.direction&(N.east|N.west),i=r.direction&(N.south|N.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&N.east?-o:o,t=(o=Xr(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&N.south?-t:t,o=Xr(r.startHeight+t,100,p),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&N.east?-i:i,t=Xr(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},h=function e(){var t,n=s.current,r=l.current,o=c.current;null!==n&&null!==o&&r.isResizing&&(n=r.currentWidth,t=r.currentHeight,r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,o.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",e),null!==f&&f.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",u.current.value,u.current.priority)),i(n,t))};return y.createElement("div",{ref:c},y.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,N.north|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,N.south|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,N.south|N.west)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,N.north|N.west)}}))}o(213);function eo(e){return(eo="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 to(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,function(e){e=function(e,t){if("object"!==eo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===eo(e)?e:String(e)}(r.key),r)}}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ro(n){var r=function(){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=io(n),t=(e=r?(e=io(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oo(t)}}function oo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ao=function(f){var e=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&no(t,e);var n,o=ro(i);function i(e){var r;if(this instanceof i)return(r=o.call(this,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}),f.onChange(h.EditorState.push(f.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 h.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=h.Modifier.setBlockType(e,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");f.onChange(h.EditorState.push(f.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){var e;r.state.hovered&&(e=f.getEditorState().getCurrentContent(),f.onChange(h.EditorState.push(f.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})},r.imageRef=m.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(oo(r)),r;throw new TypeError("Cannot call a class as a function")}return t=i,(e=[{key:"renderAlignmentOptions",value:function(e){return m.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},m.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_left",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_center",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_right",size:20})),m.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},m.a.createElement(b.f,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=f.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(f.onChange(h.EditorState.push(f.getEditorState(),n,"")),f.getEditorState()),t=h.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");f.onChange(h.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=f.isImageAlignmentEnabled,o=f.isImageResizeEnabled,i=f.isReadOnly,a=f.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,c=e.height,u=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=v()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),l=v()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return m.a.createElement("div",{className:s},m.a.createElement("span",{onClick:this.toggleHovered,className:l},m.a.createElement("img",{src:t,alt:e,style:{height:c,width:u},ref:this.imageRef}),!i&&n&&m.a.createElement(m.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&m.a.createElement(Qr,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&to(t.prototype,e),n&&to(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);return e.propTypes={block:d.a.object,contentState:d.a.object},e},so=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:ao(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Jr,editable:!1}}}},co=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Er=(t="ctrl",t=((null==(Je=navigator.userAgentData)?void 0:Je.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),uo={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(Er,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(Er,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(Er,"+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:co},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:d.a.string,label:d.a.string},gt={isVisible:d.a.bool,title:d.a.string,alt:d.a.string,uploadCallback:d.a.func,resizeEnabled:d.a.bool,defaultSize:d.a.shape({height:d.a.string,width:d.a.string})},Dt={isVisible:d.a.bool,title:d.a.string},Pt=d.a.shape({textDecoration:d.a.shape({max:d.a.number,bold:d.a.shape(n),italic:d.a.shape(n),underline:d.a.shape(n),strikethrough:d.a.shape(n)}),colorPicker:d.a.shape({colors:d.a.arrayOf(d.a.string)}),insert:d.a.shape({max:d.a.number,image:d.a.shape(gt),link:d.a.shape(Dt)})});o(214),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function lo(e){return(lo="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(){return(fo=Object.assign?Object.assign.bind():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 po(e){return function(e){if(Array.isArray(e))return ho(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ho(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)?ho(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(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 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 P(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){mo(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 mo(e,t,n){return(t=vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function go(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,vo(r.key),r)}}function vo(e){e=function(e,t){if("object"!==lo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===lo(e)?e:String(e)}function bo(e,t){return(bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wo(n){var r=function(){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=So(n),t=(e=r?(e=So(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===lo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var r=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e);var n,o=wo(i);function i(e){var a;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(a=o.call(this,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(g.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||Q()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=h.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(t),a.setState({editorState:h.EditorState.moveFocusToEnd(h.EditorState.createEmpty())}),!0}if("Delete"===e.key){var n=h.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(h.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(g.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(P(P({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:jr,component:Ir({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,po(Zr(P(P({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new h.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(h.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=h.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=h.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(h.convertFromRaw)(a.props.contentState),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(h.convertFromRaw)(n),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)),t=t||h.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 P(P({},Object(g.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(h.convertFromRaw)(e),t=a.state.editorState,t=h.EditorState.push(t,e,"insert-characters");return h.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=h.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){var t;return!!Q()||(t=a.state.editorState,!!(t=Object(g.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.includes("<figure")?t:t.includes("DraftStyle")?null:i?i(e,t,o,a.onChange):(i=e,e=t,t=o,o=a.onChange,(r=Object(g.getSelectedBlock)(t))&&"code"===r.type?(r=h.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(h.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=L()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=h.Modifier.replaceWithFragment(n,t.getSelection(),new z.List(i.contentBlocks)),o(h.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=h.DefaultDraftBlockRenderMap.merge(Object(z.Map)({"header-one":{wrapper:m.a.createElement(b.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:m.a.createElement(b.e,{size:"xl"},a.props.children)},"header-three":{wrapper:m.a.createElement(b.e,{size:"l"},a.props.children)},"header-four":{wrapper:m.a.createElement(b.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:m.a.createElement("div",null,a.props.children)}}));var t=oe(uo,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new U,a.focusHandler=new Y,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=so({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(g.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}return t=i,(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=oe(uo,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?h.EditorState.set(n,{decorator:this.compositeDecorator}):h.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=h.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(g.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.editorFocused,e.toolbar),e=this.props,n=e.toolbarClassName,o=e.editorClassName,i=e.wrapperClassName,a=e.editorStyle,s=e.ariaLabel,c=e.mention,u={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:t,onChange:this.onChange},e=v()(mo({},"Editor-toolbar",!0),n),n=v()(mo({},"Editor-wrapper",!0),i),i=v()((mo(i={},"Editor",!0),mo(i,"hide-placeholder",this.isEmptyListBlock()),i),o);return m.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&m.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=Cr[e],e=r[e];return m.a.createElement(n,fo({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),m.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"},m.a.createElement(h.Editor,fo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:ee,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&go(t.prototype,e),n&&go(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),_o=(r.utils={EditorState:h.EditorState,ContentState:h.ContentState,RichUtils:h.RichUtils,convertFromRaw:h.convertFromRaw,convertToRaw:h.convertToRaw,htmlToState:function(e){var e=e.replaceAll('<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"').replaceAll("<br/>","").replaceAll("<p>&nbsp;</p>",""),e=L()(e);if(e)return{contentState:e=h.ContentState.createFromBlockArray(e.contentBlocks),editorState:h.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(h.convertToRaw)(e.getCurrentContent());return F()(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:d.a.shape({separator:d.a.string,trigger:d.a.string,chipOptions:d.a.object,dropdownOptions:d.a.shape({dropdownClassName:d.a.string,customOptionRenderer:d.a.func}),renderer:d.a.func,suggestions:d.a.shape({label:d.a.string,value:d.a.string,icon:d.a.string}),fetchSuggestions:d.a.func}),editorState:d.a.object,onEditorStateChange:d.a.func,defaultEditorState:d.a.object,onContentStateChange:d.a.func,defaultContentState:d.a.object,contentState:d.a.object,spellCheck:d.a.bool,toolbar:Pt,showToolbar:d.a.bool,editorClassName:d.a.string,wrapperClassName:d.a.string,toolbarClassName:d.a.string,editorStyle:d.a.object,onFocus:d.a.func,onBlur:d.a.func,onTab:d.a.func,textAlignment:d.a.oneOf(["left","right","center"]),readOnly:d.a.bool,autoFocus:d.a.bool,placeholder:d.a.string,ariaLabel:d.a.string,wrapperId:d.a.number,editorRef:d.a.func,handlePastedText:d.a.func},r.defaultProps={autoFocus:!0,showToolbar:!0},r),Eo=o(49),Co=o.n(Eo),Oo=o(50);function xo(e){return(xo="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 ko(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 A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ko(Object(n),!0).forEach(function(e){Do(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Do(e,t,n){return(t=function(e){e=function(e,t){if("object"!==xo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===xo(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function To(e){return function(e){if(Array.isArray(e))return jo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?jo(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)?jo(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jo(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 Io(e,n){return m.a.createElement(m.a.Fragment,null,e.map(function(e,t){return m.a.createElement("li",{key:n[t]},e)}))}function Mo(e,r){return m.a.createElement(m.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"),m.a.createElement(b.i,{key:r[t]},n.map(function(e){return[e,m.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?m.a.createElement("p",null,m.a.createElement("br",null)):m.a.createElement(b.i,{key:r[t]},e.map(function(e){return[e]}))}))}function No(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=A(A({},Bo),n),r=A(A({},Fo),r),o=A(A({},zo),o),r=A(A(A({},Ko),r),o),o=A(A({},Ro),Ho(t)),t={blocks:r,entities:n,styles:Object(Eo.createStylesRenderer)(Lo,o)};return Co()(e,t,!1)}function Po(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&No(t,{entities:n,headings:r,list:o,colors:e}))?m.a.createElement("div",{className:"Preview-wrapper"},t):null}var Ao={paddingLeft:"1.5em",margin:"0px"},Ro={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Lo=function(e){var t=e.children,n=e.style,e=e.key;return m.a.createElement("span",{key:e,style:n},t)},Fo={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"m",key:n[t]},e)})}},zo={"unordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ul",{style:Ao},Io(e,t))},"ordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ol",{style:Ao},Io(e,t))}},Bo={LINK:function(e,t,n){n=n.key;return m.a.createElement(b.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alt,o=t.height,i=t.width,t=t.alignment;return m.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:t||"left",display:"flex"}},m.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return m.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Ko={unstyled:function(e,t,n){t=t.keys;return Mo(e,t)},atomic:function(e,t){return e[0]}},Ho=function(e){return[].concat(To(co),To(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return A(A({},e),{},Do({},n,t))},{})},Uo=(Po.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&No(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(Oo.renderToStaticMarkup)(e)?(t=(n=o(231)).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(Oo.renderToStaticMarkup)(e))):""}},Po.propTypes={raw:d.a.object.isRequired,colors:d.a.arrayOf(d.a.string),list:d.a.object,headings:d.a.object,entities:d.a.object},Po.defaultProps={entities:{},headings:{},list:{},colors:[]},Po)}]);
57
+ */var E=e(17),C=e(0);function O(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,c=e?Symbol.for("react.fragment"):60107,u=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,F=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,z=e?Symbol.for("react.suspense_list"):60120,B=e?Symbol.for("react.memo"):60115,K=e?Symbol.for("react.lazy"):60116,H=e?Symbol.for("react.block"):60121,U=e?Symbol.for("react.fundamental"):60117,W=e?Symbol.for("react.scope"):60119;function m(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case s:return"Portal";case l:return"Profiler";case u:return"StrictMode";case h:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case p:return"Context.Provider";case d:var t=(t=e.render).displayName||t.name||"";return e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case B:return m(e.type);case H:return m(e.render);case K:if(e=1===e._status?e._result:null)return m(e)}}return null}var e=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=(e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null}),e.hasOwnProperty("ReactCurrentBatchConfig")||(e.ReactCurrentBatchConfig={suspense:null}),{});function g(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var y=new Uint16Array(16),t=0;t<15;t++)y[t]=t+1;y[15]=0;var V=/^[: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]*$/,G=Object.prototype.hasOwnProperty,Y={},$={};function Z(e){return G.call($,e)||!G.call(Y,e)&&(V.test(e)?$[e]=!0:void(Y[e]=!0))}function J(e,t,n,r){if(null==t||function(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 x={},r=("children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[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];x[t]=new n(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new n(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[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){x[e]=new n(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new n(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){x[e]=new n(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new n(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){x[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);x[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);x[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);x[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!1)}),x.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){x[e]=new n(e,1,!1,e.toLowerCase(),null,!0)});var X=/["'&<>]/;function k(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="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";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,w=!1,S=null,_=0;function D(){if(null===v)throw Error(O(321));return v}function ee(){if(0<_)throw Error(O(312));return{memoizedState:null,queue:null,next:null}}function T(){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(;w;)w=!1,_+=1,a=null,n=e(t,r);return i=v=null,_=0,a=S=null,n}function ne(e,t){return"function"==typeof t?t(e):t}function re(e,t,n){if(v=D(),a=T(),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(!(_<25))throw Error(O(301));if(e===v)if(w=!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 j(){}var I=0,oe={readContext:function(e){var t=I;return g(e,t),e[t]},useContext:function(e){D();var t=I;return g(e,t),e[t]},useMemo:function(e,t){if(v=D(),t=void 0===t?null:t,null!==(a=T())){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=D();var t=(a=T()).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:j,useEffect:j,useDebugValue:j,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return D(),e},useTransition:function(){return D(),[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},ce=E({menuitem:!0},se),M={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},ue=["Webkit","ms","Moz","O"],le=(Object.keys(M).forEach(function(t){ue.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),M[e]=M[t]})}),/([A-Z])/g),fe=/^ms-/,N=C.Children.toArray,P=e.ReactCurrentDispatcher,pe={listing:!0,pre:!0,textarea:!0},de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,he={},A={};var ye=Object.prototype.hasOwnProperty,me={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ge(e,t){if(void 0===e)throw Error(O(152,m(t)||"Component"))}function ve(d,h,y){function e(e,t){var n=t.prototype&&t.prototype.isReactComponent,r=function(e,t,n,r){if(r&&"object"==typeof(r=e.contextType)&&null!==r)return g(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=q;return t}(t,h,y,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!=(c=t.getDerivedStateFromProps.call(null,e.props,n.state))&&(n.state=E({},n.state,c))}else if(v={},n=t(e.props,r,a),null==(n=te(t,e.props,n,r))||null==n.render)return void ge(d=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 c=s?a[0]:n.state,u=!0,s=s?1:0;s<a.length;s++){var l=a[s];null!=(l="function"==typeof l?l.call(n,c,e.props,r):l)&&(u?(u=!1,c=E({},c,l)):E(c,l))}n.state=c}}else o=null;if(ge(d=n.render(),t),"function"==typeof n.getChildContext&&"object"==typeof(e=t.childContextTypes)){var f,p=n.getChildContext();for(f in p)if(!(f in e))throw Error(O(108,m(t)||"Unknown",f))}p&&(h=E({},h,p))}for(;C.isValidElement(d);){var t=d,n=t.type;if("function"!=typeof n)break;e(t,n)}return{child:d,context:h}}(e=we.prototype).destroy=function(){var e;this.exhausted||(this.exhausted=!0,this.clearProviders(),e=this.threadID,y[e]=y[0],y[0]=e)},e.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID,o=(g(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=I,n=(I=this.threadID,P.current);P.current=oe;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;y[i]=y[0],y[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===p)this.popProvider(a.type);else if(a.type===h){this.suspenseDepth--;var c=r.pop();if(o){var o=!1,u=a.fallbackFrame;if(!u)throw Error(O(303));this.stack.push(u),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=s}else{var l=a.children[a.childIndex++],f="";try{f+=this.render(l,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(O(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{P.current=n,I=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"+k(n);this.previousWasTextNode=!0}return k(n)}if(e=(t=ve(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!C.isValidElement(e)){if(null==e||null==e.$$typeof)return e=N(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";if((n=e.$$typeof)===s)throw Error(O(257));throw Error(O(258,n.toString()))}var r,o=e.type;if("string"==typeof o)return this.renderDOM(e,t,n);switch(o){case u:case F:case l:case z:case c:return e=N(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:throw Error(O(294))}if("object"==typeof o&&null!==o)switch(o.$$typeof){case d:v={};var i=o.render(e.props,e.ref),i=te(o.render,e.props,i,e.ref);return i=N(i),this.stack.push({type:null,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case B:return e=[C.createElement(o.type,E({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case p:return n={type:e,domNamespace:n,children:o=N(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case f:o=e.type,i=e.props;var a=this.threadID;return g(o,a),o=N(i.children(o[a])),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),"";case U:throw Error(O(338));case K: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=[C.createElement(o._result,E({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(O(295))}case W:throw Error(O(343))}throw Error(O(130,null==o?o:typeof o,""))},e.renderDOM=function(e,t,n){var r=e.type.toLowerCase();if(n===ie&&ae(r),!he.hasOwnProperty(r)){if(!de.test(r))throw Error(O(65,r));he[r]=!0}var o,i,a,s,c,u=e.props;if("input"===r)u=E({type:void 0},u,{defaultChecked:void 0,defaultValue:void 0,value:null!=u.value?u.value:u.defaultValue,checked:null!=u.checked?u.checked:u.defaultChecked});else if("textarea"===r){if(null==(l=u.value)){var l=u.defaultValue,f=u.children;if(null!=f){if(null!=l)throw Error(O(92));if(Array.isArray(f)){if(!(f.length<=1))throw Error(O(93));f=f[0]}l=""+f}null==l&&(l="")}u=E({},u,{value:void 0,children:""+l})}else if("select"===r)this.currentSelectValue=null!=u.value?u.value:u.defaultValue,u=E({},u,{value:void 0});else if("option"===r){var f=this.currentSelectValue,p=null==(p=u.children)?p:(o="",C.Children.forEach(p,function(e){null!=e&&(o+=e)}),o);if(null!=f){var d=null!=u.value?u.value+"":p;if(l=!1,Array.isArray(f)){for(var h=0;h<f.length;h++)if(""+f[h]===d){l=!0;break}}else l=""+f===d;u=E({selected:void 0,children:void 0},u,{selected:l,children:p})}}if(l=u){if(ce[r]&&(null!=l.children||null!=l.dangerouslySetInnerHTML))throw Error(O(137,r,""));if(null!=l.dangerouslySetInnerHTML){if(null!=l.children)throw Error(O(60));if(!("object"==typeof l.dangerouslySetInnerHTML&&"__html"in l.dangerouslySetInnerHTML))throw Error(O(61))}if(null!=l.style&&"object"!=typeof l.style)throw Error(O(62,""))}for(_ in l=u,f=this.makeStaticMarkup,p=1===this.stack.length,d="<"+e.type,l)if(ye.call(l,_)){var y=l[_];if(null!=y){if("style"===_){var m,g,v,b,h=void 0,w="",S="";for(h in y)y.hasOwnProperty(h)&&(m=0===h.indexOf("--"),null!=(g=y[h]))&&(w+=S+(b=m?h:(b=h,A.hasOwnProperty(b)?A[b]:(v=b.replace(le,"-$1").toLowerCase().replace(fe,"-ms-"),A[b]=v)))+":",S=h,w+=m=null==g||"boolean"==typeof g||""===g?"":m||"number"!=typeof g||0===g||M.hasOwnProperty(S)&&M[S]?(""+g).trim():g+"px",S=";");y=w||null}h=null;e:if(g=l,-1===(m=r).indexOf("-"))m="string"==typeof g.is;else switch(m){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":m=!1;break e;default:m=!0}m?me.hasOwnProperty(_)||(h=Z(h=_)&&null!=y?h+'="'+k(y)+'"':""):(i=_,a=y,c=s=void 0,s=x.hasOwnProperty(i)?x[i]:null,h=(c=(c="style"!==i)&&(null!==s?0===s.type:2<i.length&&("o"===i[0]||"O"===i[0])&&("n"===i[1]||"N"===i[1])))||J(i,a,s,!1)?"":null!==s?(i=s.attributeName,3===(c=s.type)||4===c&&!0===a?i+'=""':i+'="'+k(a=s.sanitizeURL?""+a:a)+'"'):Z(i)?i+'="'+k(a)+'"':""),h&&(d+=" "+h)}}f||p&&(d+=' data-reactroot=""');var _=d;l="",se.hasOwnProperty(r)?_+="/>":(_+=">",l="</"+e.type+">");e:{if(null!=(f=u.dangerouslySetInnerHTML)){if(null!=f.__html){f=f.__html;break e}}else if("string"==typeof(f=u.children)||"number"==typeof f){f=k(f);break e}f=null}return null!=f?(u=[],pe.hasOwnProperty(r)&&"\n"===f.charAt(0)&&(_+="\n"),_+=f):u=N(u.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:u,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,_};var be=we,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(O(207))},renderToStaticNodeStream:function(){throw Error(O(208))},version:"16.14.0"};function we(e,t){if(e=C.isValidElement(e)&&(e.type!==c||(e=e.props.children,C.isValidElement(e)))?[e]:N(e),e={type:null,domNamespace:ie,children:e,childIndex:0,context:q,footer:""},0===(n=y[0])){var n,r=y,o=2*(n=r.length);if(!(o<=65536))throw Error(O(304));var i=new Uint16Array(o);for(i.set(r),(y=i)[0]=n+1,r=n;r<o-1;r++)y[r]=r+1;y[o-1]=0}else y[0]=y[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=[]}R.exports=e.default||e},function(e){e.exports=JSON.parse('{"name":"@innovaccer/rich-text-editor","version":"2.1.6","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.13.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.13.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(R,e,o){"use strict";o.r(e),o.d(e,"Editor",function(){return _o}),o.d(e,"EditorPreview",function(){return Uo});var y=o(0),m=o.n(y),e=o(1),d=o.n(e),h=o(2),g=o(4),e=o(39),L=o.n(e),e=o(92),F=o.n(e),z=o(24),e=o(5),v=o.n(e);function B(e){return(B="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 K(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,function(e){e=function(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===B(e)?e:String(e)}(r.key),r)}}function H(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U=H(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 q(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,function(e){e=function(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===W(e)?e:String(e)}(r.key),r)}}function V(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var G,Y=V(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}}),$=[],Z={onKeyDown:function(t){$.forEach(function(e){e(t)})},registerCallBack:function(e){$.push(e)},deregisterCallBack:function(t){$=$.filter(function(e){return e!==t})}},J=function(){G=!0},X=function(){G=!1},Q=function(){return G};function ee(e){e=e.getData()&&e.getData().get("text-align");return e?"rdw-".concat(e,"-aligned-block"):""}function te(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 f(e){e.stopPropagation()}function ne(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 re(e){return e[e.options[0]].icon}function oe(e,n){var r;return e&&void 0===n?e:(r={},te(e,function(e,t){"[object Object]"===Object.prototype.toString.call(t)?r[e]=oe(t,n[e]):r[e]=void 0!==n[e]?n[e]:t}),r)}function i(e){return(i="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 ie(e,t,n){(t=se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ae(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,se(r.key),r)}}function se(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}function ce(e,t){return(ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(n){var r=function(){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=le(n),t=(e=r?(e=le(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ce(t,e);var n,a=ue(s);function s(){var i,e=this,t=s;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=a.call.apply(a,[this].concat(r))).onClick=function(){var e=i.props,t=e.disabled,n=e.onClick,e=e.value;t||n(e)},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}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,i=t.active,a=t.disabled,t=t["aria-label"],o=v()((ie(e={},"Editor-option",!0),ie(e,"Editor-option--active",i&&!o),ie(e,"".concat(o),i&&o),ie(e,"Editor-option--disabled",a),e),r);return m.a.createElement("div",{"aria-label":t,onKeyDown:this.handleKeyDown,tabIndex:0,className:o,onClick:this.onClick,"aria-selected":i},n)}}])&&ae(t.prototype,e),n&&ae(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),b=(u.propTypes={onClick:d.a.func.isRequired,children:d.a.any,value:d.a.string,className:d.a.string,activeClassName:d.a.string,active:d.a.bool,disabled:d.a.bool,title:d.a.string,tabIndex:d.a.number},u.defaultProps={activeClassName:""},o(3));function a(e){return(a="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 fe(e,t,n){(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function pe(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,de(r.key),r)}}function de(e){e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===a(e)?e:String(e)}function he(e,t){return(he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ye(n){var r=function(){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=me(n),t=(e=r?(e=me(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e);var n,r=ye(o);function o(e){var i;if(this instanceof o)return(i=r.call(this,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=m.a.createRef(),i.listRef=m.a.createRef(),i.state={highlighted:-1},i;throw new TypeError("Cannot call a class as a function")}return t=o,(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.onExpandEvent,e.menu),c=this.state.highlighted,u=r.slice(1,r.length),l=v()((fe(l={},"Editor-dropdown",!0),fe(l,"Editor-dropdown--expanded",t),l),o);return m.a.createElement("div",{className:l},m.a.createElement(b.a,{ref:this.buttonRef,appearance:"transparent","aria-expanded":t,"aria-label":s||"Editor-dropdown",className:a,onClick:this.handleExpand},r[0],!e&&m.a.createElement(b.f,{name:"keyboard_arrow_down"})),t&&m.a.createElement("ul",{tabIndex:1,ref:this.listRef,onKeyDown:this.handleListKeyDown,className:v()("Editor-dropdown-optionWrapper",i),onClick:f},m.a.Children.map(u,function(e,t){return e&&m.a.cloneElement(e,{onSelect:n.onChange,highlighted:c===t,setHighlighted:n.setHighlighted,highlightedClassName:"Editor-dropdown-option--highlight",index:t})})))}}])&&pe(t.prototype,e),n&&pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.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 ge(e,t,n){(t=be(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function ve(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,be(r.key),r)}}function be(e){e=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===c(e)?e:String(e)}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(n){var r=function(){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"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}w.propTypes={children:d.a.any,onChange:d.a.func,className:d.a.string,expanded:d.a.bool,menu:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,optionWrapperClassName:d.a.string,triggerClassName:d.a.string,ariaLabel:d.a.string,title:d.a.string};var S=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&we(t,e);var n,a=Se(s);function s(){var i,e=this,t=s;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=a.call.apply(a,[this].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}return t=s,(e=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,i=t.highlighted,a=t.className,s=t.isCheckbox,c=t.activeClassName,u=t.disabledClassName,t=t.highlightedClassName,c=v()((ge(e={},"Editor-dropdown-option",!0),ge(e,"Editor-dropdown-option--active ".concat(c),r&&!s),ge(e,"".concat(t),i),ge(e,"".concat(u),o),e),a);return m.a.createElement("li",{tabIndex:1,className:c,onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick},n)}}])&&ve(t.prototype,e),n&&ve(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);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 Ee(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,Ce(r.key),r)}}function Ce(e){e=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===l(e)?e:String(e)}function Oe(e,t){return(Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(n){var r=function(){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=ke(n),t=(e=r?(e=ke(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}S.propTypes={children:d.a.any,value:d.a.any,onClick:d.a.func,onSelect:d.a.func,setHighlighted:d.a.func,index:d.a.number,disabled:d.a.bool,active:d.a.bool,highlighted:d.a.bool,className:d.a.string,activeClassName:d.a.string,disabledClassName:d.a.string,highlightedClassName:d.a.string,title:d.a.string,isCheckbox:d.a.bool},S.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""};var De=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e);var n,r=xe(o);function o(){var e=this,t=o;if(e instanceof t)return r.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"renderInDropdown",value:function(){var e=this.props,i=e.config,t=e.expanded,n=e.doExpand,r=e.onExpandEvent,o=e.doCollapse,a=e.currentState,e=e.onChange,s=i.options.length-i.max;return m.a.createElement(b.n,{tooltip:"More formatting"},m.a.createElement(w,{onChange:e,expanded:t,doExpand:n,doCollapse:o,onExpandEvent:r,triggerClassName:"Editor-textDecoration-moreIcon",menu:!0},m.a.createElement(b.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.title,r.label);return m.a.createElement(S,{key:t,value:e,active:n,isCheckbox:1<s},1<s?m.a.createElement(b.b,{checked:n,label:r}):m.a.createElement(m.a.Fragment,null,m.a.createElement(b.f,{size:20,name:o,className:"mr-4",appearance:n?"white":"default"}),m.a.createElement(b.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,c=v()((e={},t=!0,(c=Ce(c="Editor-textDecoration"))in e?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e),n);return m.a.createElement("div",{className:c},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 m.a.createElement(b.n,{tooltip:o},m.a.createElement(u,{"aria-label":"".concat(e," button"),role:"button",tabIndex:0,key:t,value:e,onClick:s,active:n,className:"mr-2"},m.a.createElement(b.f,{name:r,size:20,appearance:n?"info":"default"})))}),0<r&&this.renderInDropdown())}}])&&Ee(t.prototype,e),n&&Ee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.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 Te(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,function(e){e=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===p(e)?e:String(e)}(r.key),r)}}function je(e,t){return(je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ie(n){var r=function(){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=Me(n),t=(e=r?(e=Me(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.a.string};e=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&je(t,e);var n,r=Ie(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,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(g.getSelectionEntity)(n);if(r){r=n.getCurrentContent().getEntity(r).getType();if("MENTION"===r||"LINK"===r)return}r=h.RichUtils.toggleInlineStyle(n,e);r&&t(r)},o.changeKeys=function(e){var n;if(e)return n={},te(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})};var e=o.props,t=e.editorState;e.modalHandler;return o.state={currentStyles:t?o.changeKeys(Object(g.getSelectionInlineStyle)(t)):{}},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(g.getSelectionInlineStyle)(t))})}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.className,n=this.state,r=n.expanded,n=n.currentStyles,o=t.component||De;return m.a.createElement(o,{config:t,currentState:n,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle,className:e})}}])&&Te(t.prototype,e),n&&Te(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.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 Ne(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,function(e){e=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===_(e)?e:String(e)}(r.key),r)}}function Pe(e,t){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ae(n){var r=function(){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=Re(n),t=(e=r?(e=Re(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Re(e){return(Re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string};var t=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pe(t,e);var n,r=Ae(o);function o(e){if(this instanceof o)return(e=r.call(this,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")}return t=o,(e=[{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config.icon,r=t.currentState.blockType,o=t.expanded,i=t.doExpand,a=t.onExpandEvent,s=t.doCollapse,c=t.onChange,t=t.className;return m.a.createElement("div",{className:t,"aria-label":"Editor-block-control"},m.a.createElement(b.n,{tooltip:"Text style"},m.a.createElement(w,{onChange:c,expanded:o,doExpand:i,doCollapse:s,onExpandEvent:a,triggerClassName:"Editor-heading-trigger"},m.a.createElement(b.f,{name:n,size:20}),e.map(function(e,t){return m.a.createElement(S,{index:t,active:r===e.label,value:e.label,key:t},m.a.createElement(b.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)}}])&&Ne(t.prototype,e),n&&Ne(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Le=(t.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.string},t);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 Fe(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,function(e){e=function(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===E(e)?e:String(e)}(r.key),r)}}function ze(e,t){return(ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Be(n){var r=function(){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=Ke(n),t=(e=r?(e=Ke(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===E(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ke(e){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ze(t,e);var n,r=Be(i);function i(e){var o;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(o=r.call(this,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=h.RichUtils.toggleBlockType(r,e);r&&n(r)};e=e.editorState;return o.state={expanded:!1,currentBlockType:e?Object(g.getSelectedBlocksType)(e):"unstyled"},o}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(g.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 m.a.createElement(Le,{config:t,currentState:{blockType:n&&n.label},onChange:this.toggleBlockType,expanded:r,onExpandEvent:this.expandCollapse,doExpand:this.doExpand,doCollapse:this.doCollapse,className:e})}}])&&Fe(t.prototype,e),n&&Fe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),t.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,config:d.a.object,className:d.a.string};o(201);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 He(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,function(e){e=function(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===C(e)?e:String(e)}(r.key),r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function We(n){var r=function(){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=qe(n),t=(e=r?(e=qe(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===C(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ve=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e);var n,i=We(a);function a(){var 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(e=i.call.apply(i,[this].concat(r))).state={defaultFontSize:void 0},e}return t=a,(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 m.a.createElement("div",null,"Riya")}},{key:"render",value:function(){var e=this.props,t=e.config,n=(t.icon,t.className),r=(t.dropdownClassName,t.options),t=(t.title,e.onChange),e=(e.expanded,e.doCollapse,e.onExpandEvent,e.doExpand,e.translations,this.props.currentState.fontSize),o=this.state.defaultFontSize,o=Number(o);e||r&&r.indexOf(o);return m.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},m.a.createElement(b.d,{className:v()("rdw-fontsize-dropdown",n),onChange:t,customTrigger:this.renderCustomTrigger,icon:"text_fields",placeholder:"",options:r.map(function(e){return{label:e,value:e,selected:14===e}})}))}}])&&He(t.prototype,e),n&&He(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.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 Ge(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,function(e){e=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===O(e)?e:String(e)}(r.key),r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $e(n){var r=function(){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=Ze(n),t=(e=r?(e=Ze(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ve.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object};var Je=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e);var n,o=$e(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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(g.toggleCustomInlineStyle)(n,"fontSize",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontSize:t?Object(g.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(g.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||Ve,n=n&&Number(n.substring(9));return m.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})}}])&&Ge(t.prototype,e),n&&Ge(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);Je.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object},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 Xe(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,function(e){e=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===x(e)?e:String(e)}(r.key),r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(n){var r=function(){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=tt(n),t=(e=r?(e=tt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===x(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var n=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qe(t,e);var n,i=et(a);function a(){var 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(e=i.call.apply(i,[this].concat(r))).state={defaultFontFamily:void 0},e}return t=a,(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,c=e.expanded,u=e.doCollapse,l=e.onExpandEvent,e=e.doExpand,f=this.props.currentState.fontFamily||i&&t&&i.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&t;return m.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},m.a.createElement(w,{className:v()("rdw-fontfamily-dropdown",r),optionWrapperClassName:v()("rdw-fontfamily-optionwrapper",o),onChange:s,expanded:c,doExpand:e,doCollapse:u,onExpandEvent:l,title:n||a["components.controls.fontfamily.fontfamily"]},m.a.createElement("span",{className:"rdw-fontfamily-placeholder"},f||a["components.controls.fontfamily.fontfamily"]),i.map(function(e,t){return m.a.createElement(S,{active:f===e,value:e,key:t},e)})))}}])&&Xe(t.prototype,e),n&&Xe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(y.Component),nt=(n.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doExpand:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,translations:d.a.object},n);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 rt(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,function(e){e=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===k(e)?e:String(e)}(r.key),r)}}function ot(e,t){return(ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function it(n){var r=function(){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=at(n),t=(e=r?(e=at(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===k(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function at(e){return(at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e);var n,o=it(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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(g.toggleCustomInlineStyle)(n,"fontFamily",e);n&&t(n)};var t=e.editorState,e=e.modalHandler;return r.state={expanded:void 0,currentFontFamily:t?Object(g.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(g.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||nt,n=n&&n.substring(11);return m.a.createElement(o,{translations:e,config:t,currentState:{fontFamily:n},onChange:this.toggleFontFamily,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);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 st(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,ct(r.key),r)}}function ct(e){e=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===D(e)?e:String(e)}function ut(e,t){return(ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lt(n){var r=function(){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=ft(n),t=(e=r?(e=ft(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===D(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var pt=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ut(t,e);var n,a=lt(s);function s(){var t,e=this,n=s;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=a.call.apply(a,[this].concat(o))).options=["unordered","ordered"],t.toggleBlockType=function(e){(0,t.props.onChange)(e)},t}return t=s,(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=v()((e={},t=!0,(a=ct(a="d-flex"))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e),n);return m.a.createElement("div",{className:a},m.a.createElement(b.n,{tooltip:i.title},m.a.createElement(u,{value:"unordered",onClick:this.toggleBlockType,active:"unordered"===o,className:"mr-2"},m.a.createElement(b.f,{appearance:"unordered"===o?"info":"default",name:i.icon,size:20}))),m.a.createElement(b.n,{tooltip:r.title},m.a.createElement(u,{value:"ordered",onClick:this.toggleBlockType,active:"ordered"===o},m.a.createElement(b.f,{appearance:"ordered"===o?"info":"default",name:r.icon,size:20}))))}}])&&st(t.prototype,e),n&&st(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);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 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,function(e){e=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===T(e)?e:String(e)}(r.key),r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yt(n){var r=function(){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=mt(n),t=(e=r?(e=mt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===T(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,className:d.a.string};var gt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ht(t,e);var n,o=yt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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=t.editorState,t=h.RichUtils.toggleBlockType(t,e);t&&n(t)},r.adjustDepth=function(e){var t=r.props,n=t.onChange,t=t.editorState,t=Object(g.changeDepth)(t,e,4);t&&n(t)},r.isIndentDisabled=function(){var e=r.props.editorState,t=r.state.currentBlock,e=Object(g.getBlockBeforeSelectedBlock)(e);return!e||!Object(g.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(g.isListBlock)(e)||e.get("depth")<=0};var e=r.props,t=e.editorState,e=e.modalHandler;return r.state={expanded:!1,currentBlock:t?Object(g.getSelectedBlock)(t):void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(g.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"),m.a.createElement(pt,{config:n,translations:r,currentState:{listType:e},expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,className:t})}}])&&dt(t.prototype,e),n&&dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);gt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object,className:d.a.string},o(203);function j(e){return(j="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 vt(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,function(e){e=function(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===j(e)?e:String(e)}(r.key),r)}}function bt(e,t){return(bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(n){var r=function(){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=St(n),t=(e=r?(e=St(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _t=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e);var n,r=wt(o);function o(){var e=this,t=o;if(e instanceof t)return r.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return t=o,(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,c=e.currentState.textAlignment,e=e.translations;return m.a.createElement("div",{className:v()("rdw-text-align-wrapper",t),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&m.a.createElement(u,{value:"left",className:v()(r.className),active:"left"===c,onClick:s,title:r.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&m.a.createElement(u,{value:"center",className:v()(o.className),active:"center"===c,onClick:s,title:o.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&m.a.createElement(u,{value:"right",className:v()(i.className),active:"right"===c,onClick:s,title:i.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("justify")&&m.a.createElement(u,{value:"justify",className:v()(a.className),active:"justify"===c,onClick:s,title:a.title||e["components.controls.textalign.justify"]},m.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,c=t.options,u=t.left,l=t.center,f=t.right,p=t.justify,d=t.className,h=t.dropdownClassName,y=t.title;return m.a.createElement(w,{className:v()("rdw-text-align-dropdown",d),optionWrapperClassName:v()(h),onChange:s,expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:y||e["components.controls.textalign.textalign"]},m.a.createElement("img",{src:a&&t[a]&&t[a].icon||re(t),alt:""}),0<=c.indexOf("left")&&m.a.createElement(S,{value:"left",active:"left"===a,className:v()("rdw-text-align-dropdownOption",u.className),title:u.title||e["components.controls.textalign.left"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("center")&&m.a.createElement(S,{value:"center",active:"center"===a,className:v()("rdw-text-align-dropdownOption",l.className),title:l.title||e["components.controls.textalign.center"]},m.a.createElement("img",{src:l.icon,alt:""})),0<=c.indexOf("right")&&m.a.createElement(S,{value:"right",active:"right"===a,className:v()("rdw-text-align-dropdownOption",f.className),title:f.title||e["components.controls.textalign.right"]},m.a.createElement("img",{src:f.icon,alt:""})),0<=c.indexOf("justify")&&m.a.createElement(S,{value:"justify",active:"justify"===a,className:v()("rdw-text-align-dropdownOption",p.className),title:p.title||e["components.controls.textalign.justify"]},m.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&vt(t.prototype,e),n&&vt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component);function Et(e){return(Et="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 Ct(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,function(e){e=function(e,t){if("object"!==Et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Et(e)?e:String(e)}(r.key),r)}}function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xt(n){var r=function(){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=kt(n),t=(e=r?(e=kt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Et(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function kt(e){return(kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_t.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var Dt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e);var n,o=xt(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,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(g.setBlockData)(n,{"text-align":e}):Object(g.setBlockData)(n,{"text-align":void 0}))};e=r.props.modalHandler;return r.state={currentTextAlignment:void 0},e.registerCallBack(r.expandCollapse),r}return t=i,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(g.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,e=e.translations,n=this.state,r=n.expanded,n=n.currentTextAlignment,o=t.component||_t;return m.a.createElement(o,{config:t,translations:e,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:n},onChange:this.addBlockAlignmentData})}}])&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function Tt(e){return(Tt="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 jt(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,function(e){e=function(e,t){if("object"!==Tt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Tt(e)?e:String(e)}(r.key),r)}}function It(e,t){return(It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mt(n){var r=function(){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=Nt(n),t=(e=r?(e=Nt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Nt(e){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dt.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Pt=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&It(t,e);var n,r=Mt(i);function i(e){var o;if(this instanceof i)return(o=r.call(this,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,e=e.bgColor,r="color"===o.state.currentStyle?n:e;return m.a.createElement("div",{className:"Editor-colorPicker",onClick:o.handleClick,onKeyDown:o.handleKeyDown},t.map(function(e,t){return m.a.createElement("div",{className:"Editor-colorPicker-circleWrapper"},m.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&&m.a.createElement(b.f,{name:"check",appearance:"white",className:"Editor-colorPicker-selectedCircle"}))}))},o.state={currentStyle:"color"},o.ref=m.a.createRef(),o;throw new TypeError("Cannot call a class as a function")}return t=i,(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=e.onToggle,e=e.className,n=m.a.createElement(b.n,{tooltip:"Text color"},m.a.createElement(u,{tabIndex:0,"aria-label":"Font colors",onClick:n,active:t,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:"text_format",size:20})));return m.a.createElement("div",{className:e,"aria-haspopup":"true","aria-expanded":t},m.a.createElement(b.l,{trigger:n,position:"bottom-start",open:t},this.renderModal()))}}])&&jt(t.prototype,e),n&&jt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),At=(Pt.propTypes={expanded:d.a.bool,onToggle:d.a.func,onChange:d.a.func,config:d.a.object,currentState:d.a.object,className:d.a.className},Pt);function Rt(e){return(Rt="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,function(e){e=function(e,t){if("object"!==Rt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Rt(e)?e:String(e)}(r.key),r)}}function Ft(e,t){return(Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zt(n){var r=function(){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=Bt(n),t=(e=r?(e=Bt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Bt(e){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pt=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ft(t,e);var n,r=zt(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,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(g.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(g.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR,expanded:!1}},function(){var e=Object(g.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(g.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR||"color-var(--text)",n.currentBgColor=Object(g.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR),i.state=n,e.registerCallBack(i.expandCollapse),i}return t=o,(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||At,r=r&&r.substring(6),o=o&&o.substring(8);return m.a.createElement(i,{config:t,className:e,onChange:this.toggleColor,expanded:n,onToggle:this.toggleColorPicker,currentState:{color:r,bgColor:o}})}}])&&Lt(t.prototype,e),n&&Lt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(Pt.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,className:d.a.string},o(93)),r=o.n(r);function Kt(e){return(Kt="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 Ht(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,Ut(r.key),r)}}function Ut(e){e=function(e,t){if("object"!==Kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Kt(e)?e:String(e)}function Wt(e,t){return(Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qt(n){var r=function(){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=Vt(n),t=(e=r?(e=Vt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Kt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wt(t,e);var n,a=qt(s);function s(){var r,e=this,t=s;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=a.call.apply(a,[this].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=Ut(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}return t=s,(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,t=t.editing;return m.a.createElement("div",{className:"px-6 mt-6 mb-5",onClick:f},m.a.createElement(b.m,{weight:"strong",size:"large"},t?"Edit":"Insert a"," link"),m.a.createElement(b.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:f}),m.a.createElement(b.g,{icon:"text_fields",className:"my-5",placeholder:"Text to display",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:n,autoComplete:"off",onClick:f}),m.a.createElement("div",{className:"d-flex justify-content-end"},m.a.createElement(b.a,{onClick:e,className:"mr-4"},"Cancel"),m.a.createElement(b.a,{onClick:this.addLink,disabled:!r||!n,appearance:"primary"},"Save")))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.inDropdown,o=e.onExpandEvent,e=e.expanded,t=r?m.a.createElement(S,null,m.a.createElement(b.f,{size:20,name:n,className:"mr-4"}),m.a.createElement(b.m,null,t)):m.a.createElement(b.n,{tooltip:"Link"},m.a.createElement(u,{value:"unordered-list-item",onClick:o,"aria-haspopup":"true","aria-expanded":e,active:e,activeClassName:"bg-secondary"},m.a.createElement(b.f,{name:n,size:20})));return m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e},m.a.createElement(b.l,{trigger:t,position:r?"right":"bottom",open:e,onToggle:o},this.renderAddLinkModal()))}}])&&Ht(t.prototype,e),n&&Ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Gt=(I.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,inDropdown:d.a.boolean},I);function Yt(e){return(Yt="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 $t(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,tn(r.key),r)}}function Zt(e,t){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jt(n){var r=function(){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=Xt(n),t=(e=r?(e=Xt(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Xt(e){return(Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qt(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 en(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=tn(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)):Qt(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function tn(e){e=function(e,t){if("object"!==Yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yt(e)?e:String(e)}function nn(e){var t=rn.match(e.target);return en(en({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var rn=r()(),I=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e);var n,r=Jt(o);function o(e){var s;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(s=r.call(this,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||nn)({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,r=n.currentEntity,n=(n.link,t.getCurrentContent()),o={};return r&&"LINK"===n.getEntity(r).get("type")&&(o.link={},e=r&&Object(g.getEntityRange)(t,r),o.link.target=r&&n.getEntity(r).get("data").url,o.link.targetOption=r&&n.getEntity(r).get("data").targetOption,o.link.title=e&&e.text),o.selectionText=Object(g.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(g.getEntityRange)(t,n),r=r.getIsBackward()?r.merge({anchorOffset:n.end,focusOffset:n.start}):r.merge({anchorOffset:n.start,focusOffset:n.end}),e(h.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(g.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=h.Modifier.replaceText(o.getCurrentContent(),a,"".concat(e),null,i),n=h.EditorState.push(o,t,"insert-characters");a=n.getSelection().merge({anchorOffset:a.get("anchorOffset")+e.length,focusOffset:a.get("anchorOffset")+e.length}),n=h.EditorState.acceptSelection(n,a),t=h.Modifier.insertText(n.getCurrentContent(),a," ",n.getCurrentInlineStyle(),void 0),r(h.EditorState.push(n,t,"insert-characters")),s.props.onCloseLinkPopover(),s.doCollapse()};var e=s.props,t=e.editorState,e=e.linkPopoverOpen;return s.state={expanded:e,selectionText:void 0,link:void 0,currentEntity:t?Object(g.getSelectionEntity)(t):void 0},s}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.editorState,t=t.linkPopoverOpen;n&&n!==e.editorState&&this.setState({currentEntity:Object(g.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,r=r.selectionText;return m.a.createElement(Gt,{config:t,expanded:n,inDropdown:e,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:o,selectionText:r},onChange:this.onChange})}}])&&$t(t.prototype,e),n&&$t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),r=(I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,inDropdown:d.a.boolean,linkPopoverOpen:d.a.bool},I);function on(e){return(on="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,function(e){e=function(e,t){if("object"!==on(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===on(e)?e:String(e)}(r.key),r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(n){var r=function(){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=un(n),t=(e=r?(e=un(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===on(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sn(t,e);var n,r=cn(o);function o(e){var i;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(i=r.call(this,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(g.getEntityRange)(t,r),o=o.getIsBackward()?o.merge({anchorOffset:r.end,focusOffset:r.start}):o.merge({anchorOffset:r.start,focusOffset:r.end})),h.Modifier.replaceText(t.getCurrentContent(),o,"".concat(e),t.getCurrentInlineStyle(),void 0)),o=h.EditorState.push(t,r,"insert-characters");n(h.EditorState.push(o,r,"insert-characters"))};e=i.props.editorState;return i.state={selectionText:void 0,link:void 0,currentEntity:e?Object(g.getSelectionEntity)(e):void 0},i}return t=o,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(g.getSelectionEntity)(t)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,t=t.title,r=e.mention.label;e.inDropdown;return m.a.createElement(b.n,{tooltip:r||t},m.a.createElement(u,{value:"unordered-list-item",onClick:this.addLink,className:"mr-2"},m.a.createElement(b.f,{name:n,size:20})))}}])&&an(t.prototype,e),n&&an(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),I.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.boolean};o(209);function ln(e){return(ln="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 fn(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,pn(r.key),r)}}function pn(e){e=function(e,t){if("object"!==ln(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ln(e)?e:String(e)}function dn(e,t){return(dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hn(n){var r=function(){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=yn(n),t=(e=r?(e=yn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===ln(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dn(t,e);var n,a=hn(s);function s(){var r,e=this,t=s;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=a.call.apply(a,[this].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=pn(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t))},r}return t=s,(e=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,t=t.config;!n&&e.expanded&&(e=(n=t.defaultSize).height,t=n.width,this.setState({embeddedLink:"",height:e,width:t}))}},{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 m.a.createElement("div",{className:v()("rdw-embedded-modal",o),onClick:f},m.a.createElement("div",{className:"rdw-embedded-modal-header"},m.a.createElement("span",{className:"rdw-embedded-modal-header-option"},r["components.controls.embedded.embeddedlink"],m.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),m.a.createElement("div",{className:"rdw-embedded-modal-link-section"},m.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},m.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"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("div",{className:"rdw-embedded-modal-size"},m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),m.a.createElement("span",null,m.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:e,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),m.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),m.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},m.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!e},r["generic.add"]),m.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 m.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":o,"aria-label":"rdw-embedded-control"},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i,title:t||e["components.controls.embedded.embedded"]},m.a.createElement("img",{src:n,alt:""})),o?this.rendeEmbeddedLinkModal():void 0)}}])&&fn(t.prototype,e),n&&fn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),gn=(mn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,doCollapse:d.a.func},mn);function vn(e){return(vn="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 bn(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,function(e){e=function(e,t){if("object"!==vn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===vn(e)?e:String(e)}(r.key),r)}}function wn(e,t){return(wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sn(n){var r=function(){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=_n(n),t=(e=r?(e=_n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wn(t,e);var n,i=Sn(s);function s(){var a,e=this,t=s;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=i.call.apply(i,[this].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(h.AtomicBlockUtils.insertAtomicBlock(o,e," ")),a.doCollapse()},a}return t=s,(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,e=e.translations,n=this.state.expanded,r=t.component||gn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmbeddedLink,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&bn(t.prototype,e),n&&bn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),mn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};o(210);function En(e){return(En="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 Cn(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,function(e){e=function(e,t){if("object"!==En(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==En(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===En(e)?e:String(e)}(r.key),r)}}function On(e,t){return(On=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xn(n){var r=function(){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=kn(n),t=(e=r?(e=kn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===En(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&On(t,e);var n,a=xn(s);function s(){var t,e=this,n=s;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=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e.target.innerHTML)},t}return t=s,(e=[{key:"renderEmojiModal",value:function(){var n=this,e=this.props.config,t=e.popupClassName,e=e.emojis;return m.a.createElement("div",{className:v()("rdw-emoji-modal",t),onClick:f},e.map(function(e,t){return m.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,t=t.title,o=e.expanded,i=e.onExpandEvent,e=e.translations;return m.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":o,title:t||e["components.controls.emoji.emoji"]},m.a.createElement(u,{className:v()(r),value:"unordered-list-item",onClick:i},m.a.createElement("img",{src:n,alt:""})),o?this.renderEmojiModal():void 0)}}])&&Cn(t.prototype,e),n&&Cn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component),Tn=(Dn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object},Dn);function jn(e){return(jn="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 In(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,function(e){e=function(e,t){if("object"!==jn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jn(e)?e:String(e)}(r.key),r)}}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nn(n){var r=function(){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=Pn(n),t=(e=r?(e=Pn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mn(t,e);var n,a=Nn(s);function s(){var r,e=this,t=s;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=a.call.apply(a,[this].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=h.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());t(h.EditorState.push(n,e,"insert-characters")),r.doCollapse()},r}return t=s,(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,e=e.translations,n=this.state.expanded,r=t.component||Tn;return m.a.createElement(r,{config:t,translations:e,onChange:this.addEmoji,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&In(t.prototype,e),n&&In(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);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 Rn(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=function(e,t){if("object"!==An(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===An(e)?e:String(e)}function Fn(e,t){return(Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zn(n){var r=function(){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=Bn(n),t=(e=r?(e=Bn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===An(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Dn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var Kn=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fn(t,e);var n,r=zn(o);function o(e){var i;if(this instanceof o)return(i=r.call(this,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=Ln(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=m.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")}return t=o,(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.className,t.title),t=t.inputAccept,o=e.expanded;return e.inDropdown?m.a.createElement(S,null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20,className:"mr-4"}),m.a.createElement(b.m,null,r)),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"})):m.a.createElement("div",{"aria-haspopup":"true","aria-expanded":o},m.a.createElement(b.n,{tooltip:r},m.a.createElement(u,{"aria-label":"add image",className:"mr-2",value:"unordered-list-item",onClick:this.fileUploadClick},m.a.createElement("span",null,m.a.createElement("label",{htmlFor:"file",className:"Editor-insert-imageLabel"},m.a.createElement(b.f,{name:n,size:20}))),m.a.createElement("input",{ref:this.inputRef,type:"file",id:"file",accept:t,onChange:this.selectImage,className:"Editor-insert-imageInput"}))))}}])&&Rn(t.prototype,e),n&&Rn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Hn=(Kn.propTypes={expanded:d.a.bool,onExpandEvent:d.a.func,doCollapse:d.a.func,onChange:d.a.func,config:d.a.object,translations:d.a.object,inDropdown:d.a.bool},Kn);function Un(e){return(Un="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 Wn(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,function(e){e=function(e,t){if("object"!==Un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Un(e)?e:String(e)}(r.key),r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(n){var r=function(){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=Gn(n),t=(e=r?(e=Gn(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Gn(e){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yn(e){var t=e.config,n=e.onChange,e=e.translations,r=t.icon,o=t.className,t=t.title;return m.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},m.a.createElement(u,{className:v()(o),onClick:n,title:t||e["components.controls.remove.remove"]},m.a.createElement("img",{src:r,alt:""})))}var Kn=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e);var n,r=Vn(o);function o(e){var s;if(this instanceof o)return(s=r.call(this,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(h.AtomicBlockUtils.insertAtomicBlock(i,t," "))},s.state={expanded:!1},s;throw new TypeError("Cannot call a class as a function")}return t=o,(e=[{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.config,e=e.inDropdown;return m.a.createElement(Hn,{config:t,inDropdown:e,onChange:this.addImage})}}])&&Wn(t.prototype,e),n&&Wn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),$n=(Kn.propTypes={editorState:d.a.object.isRequired,onChange:d.a.func.isRequired,config:d.a.object,inDropdown:d.a.bool},o(211),Yn.propTypes={onChange:d.a.func,config:d.a.object,translations:d.a.object},Yn);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 Jn(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,function(e){e=function(e,t){if("object"!==Zn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Zn(e)?e:String(e)}(r.key),r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qn(n){var r=function(){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=er(n),t=(e=r?(e=er(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Zn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e);var n,a=Qn(s);function s(){var n,e=this,t=s;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=a.call.apply(a,[this].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=h.Modifier.removeInlineStyle(r,n.getSelection(),e)}),te(Object(g.getSelectionCustomInlineStyle)(n,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(e,t){t&&(r=h.Modifier.removeInlineStyle(r,n.getSelection(),t))}),h.EditorState.push(n,r,"change-inline-style")},n.doExpand=function(){n.setState({expanded:!0})},n.doCollapse=function(){n.setState({expanded:!1})},n}return t=s,(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,e=e.translations,n=this.state.expanded,r=t.component||$n;return m.a.createElement(r,{config:t,translations:e,expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Jn(t.prototype,e),n&&Jn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);tr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object.isRequired,config:d.a.object,translations:d.a.object,modalHandler:d.a.object},o(212);function nr(e){return(nr="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 rr(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,function(e){e=function(e,t){if("object"!==nr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===nr(e)?e:String(e)}(r.key),r)}}function or(e,t){return(or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(n){var r=function(){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=ar(n),t=(e=r?(e=ar(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sr=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&or(t,e);var n,a=ir(s);function s(){var t,e=this,n=s;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=a.call.apply(a,[this].concat(o))).onChange=function(e){(0,t.props.onChange)(e)},t}return t=s,(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,c=t.options,u=t.undo,l=t.redo,f=t.className,p=t.dropdownClassName,d=t.title;return m.a.createElement(w,{className:v()("rdw-history-dropdown",f),optionWrapperClassName:v()(p),expanded:n,doExpand:r,doCollapse:i,onExpandEvent:o,"aria-label":"rdw-history-control",title:d||e["components.controls.history.history"]},m.a.createElement("img",{src:re(t),alt:""}),0<=c.indexOf("undo")&&m.a.createElement(S,{value:"undo",onClick:this.onChange,disabled:s,className:v()("rdw-history-dropdownoption",u.className),title:u.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:u.icon,alt:""})),0<=c.indexOf("redo")&&m.a.createElement(S,{value:"redo",onClick:this.onChange,disabled:a,className:v()("rdw-history-dropdownoption",l.className),title:l.title||e["components.controls.history.redo"]},m.a.createElement("img",{src:l.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 m.a.createElement("div",{className:v()("rdw-history-wrapper",t),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&m.a.createElement(u,{value:"undo",onClick:this.onChange,className:v()(r.className),disabled:a,title:r.title||e["components.controls.history.undo"]},m.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&m.a.createElement(u,{value:"redo",onClick:this.onChange,className:v()(o.className),disabled:i,title:o.title||e["components.controls.history.redo"]},m.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&rr(t.prototype,e),n&&rr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);function cr(e){return(cr="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 ur(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,function(e){e=function(e,t){if("object"!==cr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===cr(e)?e:String(e)}(r.key),r)}}function lr(e,t){return(lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fr(n){var r=function(){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=pr(n),t=(e=r?(e=pr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===cr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}sr.propTypes={expanded:d.a.bool,doExpand:d.a.func,doCollapse:d.a.func,onExpandEvent:d.a.func,config:d.a.object,onChange:d.a.func,currentState:d.a.object,translations:d.a.object};var dr=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lr(t,e);var n,o=fr(i);function i(e){var r;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(r=o.call(this,e)).onExpandEvent=function(){r.signalExpanded=!r.state.expanded},r.onChange=function(e){var t=r.props,n=t.editorState,t=t.onChange,e=h.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}return t=i,(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,e=e.translations,n=this.state,r=n.undoDisabled,o=n.redoDisabled,n=n.expanded,i=t.component||sr;return m.a.createElement(i,{config:t,translations:e,currentState:{undoDisabled:r,redoDisabled:o},expanded:n,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&ur(t.prototype,e),n&&ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);function hr(e){return(hr="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)}dr.propTypes={onChange:d.a.func.isRequired,editorState:d.a.object,modalHandler:d.a.object,config:d.a.object,translations:d.a.object};var yr=["config","currentState","onChange"],mr=["config"];function gr(){return(gr=Object.assign?Object.assign.bind():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 vr(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(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 br(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,function(e){e=function(e,t){if("object"!==hr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===hr(e)?e:String(e)}(r.key),r)}}function wr(e,t){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sr(n){var r=function(){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=_r(n),t=(e=r?(e=_r(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function _r(e){return(_r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wr(t,e);var n,r=Sr(o);function o(e){var t;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");(t=r.call(this,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,e.modalHandler;return t.state={expanded:!1},t}return t=o,(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=(e.currentState,e.onChange,vr(e,yr));this.state.expanded;return m.a.createElement(w,{expanded:this.state.expanded,doExpand:this.doExpand,doCollapse:this.doCollapse,onExpandEvent:this.onExpandEvent,menu:!0},m.a.createElement(b.f,{name:"more_horizon"}),o.options.slice(o.max,o.options.length).map(function(e,t){var n=o[e],e=Cr[e];return m.a.createElement(e,gr({key:t,config:n,inDropdown:!0,onChange:r.onChange},i))}))}},{key:"render",value:function(){var o=this,e=this.props,i=e.config,a=vr(e,mr),e=i.max;return m.a.createElement("div",{className:"Editor-toolbar-insert"},i.options.slice(0,e).map(function(e,t){var n=i[e],r=Cr[e];return(o.props.mention||"mention"!==e)&&n.isVisible?m.a.createElement(r,gr({key:t,config:n,inDropdown:!1},a)):null}))}}])&&br(t.prototype,e),n&&br(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(y.Component),Cr=(Er.propTypes={onChange:d.a.func.isRequired,onCloseLinkPopover:d.a.func.isRequired,editorState:d.a.object.isRequired,modalHandler:d.a.object,config:d.a.object,mention:d.a.object,linkPopoverOpen:d.a.bool,translations:d.a.object},{textDecoration:e,heading:t,fontSize:Je,insert:Er,fontFamily:n,list:gt,textAlign:Dt,colorPicker:Pt,link:r,mention:I,embedded:mn,emoji:Dn,image:Kn,remove:tr,history:dr});function Or(e){return(Or="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,function(e){e=function(e,t){if("object"!==Or(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Or(e)?e:String(e)}(r.key),r)}}function kr(e,t){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dr(n){var r=function(){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=Tr(n),t=(e=r?(e=Tr(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Tr(e){return(Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jr(e,t,n){e.findEntityRanges(function(e){e=e.getEntity();return null!==e&&"LINK"===n.getEntity(e).getType()},t)}function Ir(c){var e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e);var n,a=Dr(s);function s(){var o,e=this,t=s;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=a.call.apply(a,[this].concat(r))).state={open:!1},o.onDeleteLink=function(e){e.preventDefault(),e.stopPropagation();var e=c.getEditorState(),t=e.getSelection(),n=o.props,r=n.contentState,n=n.entityKey,e=Object(g.getEntityRange)(e,n),t=t.getIsBackward()?t.merge({anchorOffset:e.end,focusOffset:e.start}):t.merge({anchorOffset:e.start,focusOffset:e.end}),n=h.Modifier.setBlockType(r,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");c.onChange(h.EditorState.push(c.getEditorState(),n,"remove-range"))},o.onEditLink=function(e){e.preventDefault(),e.stopPropagation(),c.onEditLink(),o.setState({open:!1})},o.onToggle=function(e){o.setState({open:e})},o}return t=s,(e=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.entityKey,e=e.contentState.getEntity(n).getData().url,n=this.state.open,t=m.a.createElement("span",{contentEditable:"false",suppressContentEditableWarning:!0},m.a.createElement(b.m,{appearance:"link"},t));return m.a.createElement(b.l,{trigger:t,appendToBody:!0,open:n,onToggle:this.onToggle},m.a.createElement("div",{contentEditable:"false",suppressContentEditableWarning:!0,className:"d-flex pl-5 py-5 pr-4 align-items-center"},m.a.createElement(b.h,{href:e,target:"_new",className:"Editor-link"},e),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Edit",onClick:this.onEditLink,appearance:"transparent",icon:"edit"}),m.a.createElement("span",{className:"Editor-seperator"}),m.a.createElement(b.a,{"aria-label":"Delete",onClick:this.onDeleteLink,appearance:"transparent",icon:"delete"})))}}])&&xr(t.prototype,e),n&&xr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(y.Component);return e.propTypes={entityKey:d.a.string.isRequired,children:d.a.array,contentState:d.a.object},e}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 Nr(){return(Nr=Object.assign?Object.assign.bind():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 Pr(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 Ar(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Pr(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=Fr(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)):Pr(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function Rr(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,Fr(r.key),r)}}function Lr(e,t,n){return t&&Rr(e.prototype,t),n&&Rr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fr(e){e=function(e,t){if("object"!==Mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Mr(e)?e:String(e)}var e=Lr(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=Ar(Ar({type:"input",name:e,clearButton:!1},i.chipOptions),{},{label:t,className:"Editor-mention-chip"}),m.a.createElement(b.c,Nr({},e,{onClose:function(){var e=i.config,t=e.getEditorState(),n=t.getCurrentContent(),r=t.getSelection(),t=Object(g.getEntityRange)(t,o),r=r.getIsBackward()?r.merge({anchorOffset:t.end,focusOffset:t.start}):r.merge({anchorOffset:t.start,focusOffset:t.end+1}),t=h.Modifier.setBlockType(n,r,"unstyled"),t=h.Modifier.removeRange(t,r,"backward");e.onChange(h.EditorState.push(e.getEditorState(),t,"remove-range"))}})))}return e.propTypes={entityKey:d.a.number,children:d.a.array,contentState:d.a.object},e},this.getMentionDecorator=function(){return{strategy:i.findMentionEntities,component:i.getMentionComponent()}},this.config=t,this.chipOptions=t.chipOptions,this.renderer=t.renderer}),zr=(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 Br(e){return(Br="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 M(e,t,n){(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function Kr(e,t){return(Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Hr(n){var r=function(){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=Ur(n),t=(e=r?(e=Ur(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===Br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wr(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,Vr(r.key),r)}}function qr(e,t,n){return t&&Wr(e.prototype,t),n&&Wr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){e=function(e,t){if("object"!==Br(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Br(e)?e:String(e)}function Gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yr(e){var t=e.block,t=(e=e.contentState.getEntity(t.getEntityAt(0)).getData()).src,n=e.height,e=e.width;return m.a.createElement("iframe",{height:n,width:e,src:t,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}var $r=qr(function e(t){var c=this,n=(Gr(this,e),this.findSuggestionEntities=function(e,t){var n,r,o,i,a,s;c.config.getEditorState()&&(n=(i=c.config).separator,r=i.trigger,o=i.getSuggestions,a=i.getEditorState,i=i.fetchSuggestions,(a=a().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<ne(o(),e.substr(a+s.length,e.length),c.config.caseSensitive).length)&&t(0===a?0:a+1,e.length)},this.getSuggestionComponent=function(){var e,f=this.config;return(e=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kr(t,e);var r=Hr(o);function o(){var l;Gr(this,o);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(l=r.call.apply(r,[this].concat(t))).state={style:{left:15},activeOption:-1,showSuggestions:!0,showLoader:!1,keyDown:!0},l.focusOption=function(e,t,n){var t=document.querySelectorAll(t),n=("string"==typeof n&&(n=parseInt(n)),"down"===e?n+1:n-1),r=n,e="down"===e?t.length:-1,n=(r===e&&(r=0),t[r=-1===n&&-1===e?t.length-1:r]);n&&n.scrollIntoView({block:"end"})},l.onEditorKeyDown=function(e){var t=l.state.activeOption,n={},r=".Editor-dropdown-option";l.disableMouseEvents(),"ArrowDown"===e.key?(e.preventDefault(),l.focusOption("down",r,t),t===l.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=Number(t)+1):"ArrowUp"===e.key?(e.preventDefault(),l.focusOption("up",r,t),n.activeOption=t<=0?l.filteredSuggestions.length-1:Number(t)-1):"Escape"===e.key?(n.showSuggestions=!1,X()):"Enter"===e.key&&l.addMention(),l.setState(n)},l.onOptionMouseOver=function(e){l.enableMouseEvents();e=parseInt(e.target.getAttribute("data-index"));0<=e&&e<l.filteredSuggestions.length&&l.setState({activeOption:e})},l.disableMouseEvents=function(){l.setState({keyDown:!0})},l.enableMouseEvents=function(){l.setState({keyDown:!1})},l.setSuggestionReference=function(e){l.suggestion=e},l.setDropdownReference=function(e){l.dropdown=e},l.closeSuggestionDropdown=function(){l.state.showSuggestions&&l.setState({showSuggestions:!1})},l.filteredSuggestions=[],l.filterSuggestions=function(e){var t=f.getSuggestions?f.getSuggestions():[];l.filteredSuggestions=ne(t,e,f.caseSensitive)},l.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){f.fetchSuggestions(e).then(function(e){l.filteredSuggestions=e,l.setState({showSuggestions:0<e.length,showLoader:!1})})}),l.updateSuggestions=function(e){e=e.children[0].props.text.substr(1);f.fetchSuggestions?(l.setState({showLoader:!0}),l.debouncedFetchSuggestion(e)):l.filterSuggestions(e)},l.addMention=function(e){var t,n,r,o=l.state.activeOption,i=f.getEditorState(),a=f.onChange,s=f.separator,c=f.trigger,o=l.filteredSuggestions[o],u=l.props.children[0].props.text.substr(1);o&&(i=i,a=a,s=s,c=c,e=e,u=u,t=(o=o).label,n=o.value,o=o.url,n=i.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(c).concat(n),value:n,url:o}).getLastCreatedEntityKey(),o=Object(g.getSelectedBlock)(i).getText(),r=i.getSelection().focusOffset,s=(o.lastIndexOf(s+c,r)||0)+1,c=!1," "===o[r=o.length===s+1?o.length:r]&&(c=!0),e&&(r=s+u.length+1),o=i.getSelection().merge({anchorOffset:s,focusOffset:r}),e=h.EditorState.acceptSelection(i,o),u=h.Modifier.replaceText(e.getCurrentContent(),o,"".concat(t),null,n),e=h.EditorState.push(e,u,"insert-characters"),c||(o=e.getSelection().merge({anchorOffset:s+t.length,focusOffset:s+t.length}),e=h.EditorState.acceptSelection(e,o),u=h.Modifier.insertText(e.getCurrentContent(),o," ",e.getCurrentInlineStyle(),void 0)),a(h.EditorState.push(e,u,"insert-characters")))},l.getOptionClass=function(e){var t,n=l.state.activeOption;return v()((M(t={},"Editor-dropdown-option",!0),M(t,"Editor-dropdown-option--highlight",e===n),M(t,"Editor-dropdown--keydown",l.state.keyDown),t))},l.renderOption=function(e,t){var n,r=f.dropdownOptions,r=(void 0===r?{}:r).customOptionRenderer,o=e.icon,i=e.label;return r?(n=r(e,l.state.activeOption,t),m.a.cloneElement(n,{key:t,spellCheck:!1,onClick:function(e){l.addMention(e),n.props.onClick&&n.props.onClick()},"data-index":t,onMouseOver:l.onOptionMouseOver})):m.a.createElement("span",{key:t,spellCheck:!1,onClick:function(){return l.addMention("onMouseSelect")},"data-index":t,onMouseOver:l.onOptionMouseOver,className:l.getOptionClass(t)},o&&m.a.createElement(b.f,{name:o,className:"mr-4"}),m.a.createElement(b.m,null,i))},l}return qr(o,[{key:"componentDidMount",value:function(){var e=this.suggestion.getBoundingClientRect(),t=e.left,e=e.top+25;this.setState({style:{left:t,top:e}}),Z.registerCallBack(this.onEditorKeyDown),J(),f.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.updateSuggestions(this.props),this.setState({showSuggestions:!0}),document.addEventListener("scroll",this.closeSuggestionDropdown,{once:!0})}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.updateSuggestions(this.props),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.closeSuggestionDropdown),Z.deregisterCallBack(this.onEditorKeyDown),X(),f.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e,n=this,t=this.props.children,r=this.state.showSuggestions,o=f.dropdownOptions,o=(void 0===o?{}:o).dropdownClassName,o=v()((M(e={},"Popover",!0),M(e,"".concat(o),void 0!==o),M(e,"Editor-mention-dropdown",!0),M(e,"position-fixed",!0),e));return m.a.createElement("span",{className:"Editor-mention-suggestion",ref:this.setSuggestionReference,onClick:f.modalHandler.onSuggestionClick,"aria-haspopup":"true"},m.a.createElement("span",null,t),r&&m.a.createElement("span",{className:o,style:this.state.style,contentEditable:"false",suppressContentEditableWarning:!0,ref:this.setDropdownReference,onMouseMove:this.enableMouseEvents,onMouseLeave:this.disableMouseEvents,onScroll:this.enableMouseEvents},this.state.showLoader?m.a.createElement("span",{className:"Editor-dropdown-option"},m.a.createElement(b.j,{withImage:!1},m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}),m.a.createElement(b.k,{length:"large"}))):this.filteredSuggestions.map(function(e,t){return n.renderOption(e,t)})))}}]),o}(y.Component)).propTypes={children:d.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:c.findSuggestionEntities,component:c.getSuggestionComponent()}},t.separator),r=t.trigger,o=t.getSuggestions,i=t.onChange,a=t.getEditorState,s=t.getWrapperRef,u=t.caseSensitive,l=t.optionClassName,f=t.modalHandler,p=t.dropdownOptions,t=t.fetchSuggestions;this.config={separator:void 0===n?" ":n,trigger:void 0===r?"@":r,getSuggestions:o,onChange:i,getEditorState:a,getWrapperRef:s,caseSensitive:u,dropdownOptions:p,optionClassName:l,modalHandler:f,fetchSuggestions:t}}),Zr=function(e){return[new zr(e).getMentionDecorator(),new $r(e).getSuggestionDecorator()]},Jr=(Yr.propTypes={block:d.a.object,contentState:d.a.object},Yr);function Xr(e,t,n){return Math.min(Math.max(e,t),n)}var N={east:1,north:8,south:2,west:4};function Qr(e){function t(e,t){var n,r,o,i=s.current,a=c.current;null!==i&&null!==a&&(n=(r=i.getBoundingClientRect()).width,r=r.height,(o=l.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.direction=t,o=(e=t)===N.east||e===N.west,t=e===N.north||e===N.south,e=e&N.north&&e&N.west||e&N.south&&e&N.east,o=o?"ew":t?"ns":e?"nwse":"nesw",null!==f&&f.style.setProperty("cursor","".concat(o,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(o,"-resize"),"important"),u.current.value=document.body.style.getPropertyValue("-webkit-user-select"),u.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",d),document.addEventListener("pointerup",h))}var i=e.onResizeEnd,s=e.imageRef,n=e.maxWidth,e=e.editor,c=Object(y.useRef)(),u=Object(y.useRef)({priority:"",value:"default"}),l=Object(y.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),f=(Object(y.useEffect)(function(){return function(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h)}},[]),e),a=n||(null!==f?f.getBoundingClientRect().width-20:100),p=null!==f?f.getBoundingClientRect().height-20:100,d=function(e){var t,n=s.current,r=l.current,o=r.direction&(N.east|N.west),i=r.direction&(N.south|N.north);null!==n&&r.isResizing&&(o&&i?(o=Math.floor(r.startX-e.clientX),o=r.direction&N.east?-o:o,t=(o=Xr(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&N.south?-t:t,o=Xr(r.startHeight+t,100,p),n.style.height="".concat(o,"px"),r.currentHeight=o):(i=Math.floor(r.startX-e.clientX),i=r.direction&N.east?-i:i,t=Xr(r.startWidth+i,100,a),n.style.width="".concat(t,"px"),r.currentWidth=t))},h=function e(){var t,n=s.current,r=l.current,o=c.current;null!==n&&null!==o&&r.isResizing&&(n=r.currentWidth,t=r.currentHeight,r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,o.classList.remove("image-control-wrapper--resizing"),document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",e),null!==f&&f.style.setProperty("cursor","default"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",u.current.value,u.current.priority)),i(n,t))};return y.createElement("div",{ref:c},y.createElement("div",{className:"Editor-image-resizer Image-resizer--ne",onPointerDown:function(e){t(e,N.north|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--se",onPointerDown:function(e){t(e,N.south|N.east)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--sw",onPointerDown:function(e){t(e,N.south|N.west)}}),y.createElement("div",{className:"Editor-image-resizer Image-resizer--nw",onPointerDown:function(e){t(e,N.north|N.west)}}))}o(213);function eo(e){return(eo="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 to(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,function(e){e=function(e,t){if("object"!==eo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===eo(e)?e:String(e)}(r.key),r)}}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ro(n){var r=function(){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=io(n),t=(e=r?(e=io(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oo(t)}}function oo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ao=function(f){var e=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&no(t,e);var n,o=ro(i);function i(e){var r;if(this instanceof i)return(r=o.call(this,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}),f.onChange(h.EditorState.push(f.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 h.SelectionState({anchorKey:t,anchorOffset:0,focusKey:n,focusOffset:0}),n=h.Modifier.setBlockType(e,t,"unstyled"),n=h.Modifier.removeRange(n,t,"backward");f.onChange(h.EditorState.push(f.getEditorState(),n,"remove-range"))},r.toggleHovered=function(){var e;r.state.hovered&&(e=f.getEditorState().getCurrentContent(),f.onChange(h.EditorState.push(f.getEditorState(),e,""))),r.setState({hovered:!r.state.hovered})},r.imageRef=m.a.createRef(),r.onResizeEnd=r.onResizeEnd.bind(oo(r)),r;throw new TypeError("Cannot call a class as a function")}return t=i,(e=[{key:"renderAlignmentOptions",value:function(e){return m.a.createElement("div",{className:"Popover d-flex ".concat(e?"mt-4":"")},m.a.createElement("div",{onClick:this.setEntityAlignmentLeft,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_left",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentCenter,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_center",size:20})),m.a.createElement("div",{onClick:this.setEntityAlignmentRight,className:"Editor-image-options"},m.a.createElement(b.f,{name:"format_align_right",size:20})),m.a.createElement("div",{onClick:this.removeEntity,className:"Editor-image-options"},m.a.createElement(b.f,{name:"delete",size:20})))}},{key:"updateImageSize",value:function(e,t){var n=this.props.block.getEntityAt(0),n=f.getEditorState().getCurrentContent().mergeEntityData(n,{width:"".concat(e,"px"),height:"".concat(t,"px")}),e=(f.onChange(h.EditorState.push(f.getEditorState(),n,"")),f.getEditorState()),t=h.Modifier.replaceText(e.getCurrentContent(),e.getSelection()," ");f.onChange(h.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=f.isImageAlignmentEnabled,o=f.isImageResizeEnabled,i=f.isReadOnly,a=f.nonFloatingImage,e=e.getEntity(t.getEntityAt(0)).getData(),t=e.src,s=e.alignment,c=e.height,u=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=v()({"d-flex":!0,"justify-content-end":"right"===s,"justify-content-start":!s||"left"===s,"justify-content-center":"center"===s}),l=v()({"position-relative":!0,"Editor-image--selected":!i&&n&&o,"Editor-image":!i&&!n&&o,"ml-4":o});return m.a.createElement("div",{className:s},m.a.createElement("span",{onClick:this.toggleHovered,className:l},m.a.createElement("img",{src:t,alt:e,style:{height:c,width:u},ref:this.imageRef}),!i&&n&&m.a.createElement(m.a.Fragment,null,r()&&this.renderAlignmentOptions(o),o&&m.a.createElement(Qr,{editor:a,imageRef:this.imageRef,onResizeEnd:this.onResizeEnd}))))}}])&&to(t.prototype,e),n&&to(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component);return e.propTypes={block:d.a.object,contentState:d.a.object},e},so=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:ao(n),editable:!1};if(t&&"EMBEDDED_LINK"===t.type)return{component:Jr,editable:!1}}}},co=["var(--text)","var(--secondary)","var(--success)","var(--primary)","var(--alert)","var(--accent1)"],Er=(t="ctrl",t=((null==(Je=navigator.userAgentData)?void 0:Je.platform.toLowerCase())||"linux").includes("mac")?"cmd":t),uo={options:["heading","textDecoration","colorPicker","list","insert"],textDecoration:{max:4,options:["bold","italic","underline","strikethrough"],bold:{icon:"format_bold",title:"Bold (".concat(Er,"+B)"),label:"Bold"},italic:{icon:"format_italic",title:"Italic (".concat(Er,"+I)"),label:"Italic"},underline:{icon:"format_underlined",title:"Underline (".concat(Er,"+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:co},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:d.a.string,label:d.a.string},gt={isVisible:d.a.bool,title:d.a.string,alt:d.a.string,uploadCallback:d.a.func,resizeEnabled:d.a.bool,defaultSize:d.a.shape({height:d.a.string,width:d.a.string})},Dt={isVisible:d.a.bool,title:d.a.string},Pt=d.a.shape({textDecoration:d.a.shape({max:d.a.number,bold:d.a.shape(n),italic:d.a.shape(n),underline:d.a.shape(n),strikethrough:d.a.shape(n)}),colorPicker:d.a.shape({colors:d.a.arrayOf(d.a.string)}),insert:d.a.shape({max:d.a.number,image:d.a.shape(gt),link:d.a.shape(Dt)})});o(214),o(94),o(95),o(96),o(97),o(98);o(99),o(100),o(101);function lo(e){return(lo="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(){return(fo=Object.assign?Object.assign.bind():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 po(e){return function(e){if(Array.isArray(e))return ho(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ho(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)?ho(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(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 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 P(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){mo(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 mo(e,t,n){return(t=vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function go(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,vo(r.key),r)}}function vo(e){e=function(e,t){if("object"!==lo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===lo(e)?e:String(e)}function bo(e,t){return(bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wo(n){var r=function(){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=So(n),t=(e=r?(e=So(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===lo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var r=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e);var n,o=wo(i);function i(e){var a;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");(a=o.call(this,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(g.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||Q()&&e.preventDefault(),"Backspace"===e.key&&a.isEmptyListBlock()){var t=h.RichUtils.toggleBlockType(a.state.editorState);if(t)return a.onChange(t),a.setState({editorState:h.EditorState.moveFocusToEnd(h.EditorState.createEmpty())}),!0}if("Delete"===e.key){var n=h.RichUtils.onDelete(a.state.editorState);if(n)return a.onChange(n),!0}return Object(h.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(g.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(P(P({},a.state),{},{linkPopoverOpen:!0}))},a.getCompositeDecorator=function(e){var t=[{strategy:jr,component:Ir({focusHandler:a.focusHandler,getEditorState:a.getEditorState,onChange:a.onChange,onEditLink:a.onEditLink})}];return a.props.mention&&t.push.apply(t,po(Zr(P(P({},a.props.mention),{},{onChange:a.onChange,getEditorState:a.getEditorState,getSuggestions:a.getSuggestions,getWrapperRef:a.getWrapperRef,modalHandler:a.modalHandler})))),new h.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(h.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=h.EditorState.set(a.props.editorState,{decorator:e})):s(a.props,"defaultEditorState")?a.props.defaultEditorState&&(t=h.EditorState.set(a.props.defaultEditorState,{decorator:e})):s(a.props,"contentState")?a.props.contentState&&(n=Object(h.convertFromRaw)(a.props.contentState),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)):s(a.props,"defaultContentState")&&(n=a.props.defaultContentState)&&(n=Object(h.convertFromRaw)(n),t=h.EditorState.createWithContent(n,e),t=h.EditorState.moveSelectionToEnd(t)),t=t||h.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 P(P({},Object(g.getCustomStyleMap)()),e.customStyleMap)},a.changeEditorState=function(e){var e=Object(h.convertFromRaw)(e),t=a.state.editorState,t=h.EditorState.push(t,e,"insert-characters");return h.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=h.RichUtils.handleKeyCommand(n,e);if(t)return a.onChange(t),!0}return!1},a.handleReturn=function(e){var t;return!!Q()||(t=a.state.editorState,!!(t=Object(g.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(g.getSelectedBlock)(t))&&"code"===r.type?(r=h.Modifier.replaceText(t.getCurrentContent(),t.getSelection(),i,t.getCurrentInlineStyle()),o(h.EditorState.push(t,r,"insert-characters")),!0):!!e&&(i=L()(e),n=t.getCurrentContent(),i.entityMap.forEach(function(e,t){n=n.mergeEntityData(t,e)}),n=h.Modifier.replaceWithFragment(n,t.getSelection(),new z.List(i.contentBlocks)),o(h.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=h.DefaultDraftBlockRenderMap.merge(Object(z.Map)({"header-one":{wrapper:m.a.createElement(b.e,{size:"xxl"},a.props.children)},"header-two":{wrapper:m.a.createElement(b.e,{size:"xl"},a.props.children)},"header-three":{wrapper:m.a.createElement(b.e,{size:"l"},a.props.children)},"header-four":{wrapper:m.a.createElement(b.e,{size:"m"},a.props.children)},unstyled:{element:"p",wrapper:m.a.createElement("div",null,a.props.children)}}));var t=oe(uo,e.toolbar),n=e.wrapperId||Math.floor(1e4*Math.random()),n=(a.wrapperId="Editor-wrapper-".concat(n),a.modalHandler=new U,a.focusHandler=new Y,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=so({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(g.extractInlineStyle)(n),a.state={editorState:n,toolbar:t,editorFocused:!1,linkPopoverOpen:!1},a}return t=i,(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=oe(uo,o),t.toolbar=o),s(this.props,"editorState")&&n!==e.editorState?t.editorState=n?h.EditorState.set(n,{decorator:this.compositeDecorator}):h.EditorState.createEmpty(this.compositeDecorator):s(this.props,"contentState")&&r!==e.contentState&&(r?(o=this.changeEditorState(r))&&(t.editorState=o):t.editorState=h.EditorState.createEmpty(this.compositeDecorator)),e.editorState===n&&e.contentState===r||Object(g.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.editorFocused,e.toolbar),e=this.props,n=e.toolbarClassName,o=e.editorClassName,i=e.wrapperClassName,a=e.editorStyle,s=e.ariaLabel,c=e.mention,u={linkPopoverOpen:this.state.linkPopoverOpen,onCloseLinkPopover:this.onCloseLinkPopover,modalHandler:this.modalHandler,editorState:t,onChange:this.onChange},e=v()(mo({},"Editor-toolbar",!0),n),n=v()(mo({},"Editor-wrapper",!0),i),i=v()((mo(i={},"Editor",!0),mo(i,"hide-placeholder",this.isEmptyListBlock()),i),o);return m.a.createElement("div",{id:this.wrapperId,className:n,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur},this.props.showToolbar&&m.a.createElement("div",{className:e,onMouseDown:this.preventDefault,"aria-label":"Editor-toolbar",onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=Cr[e],e=r[e];return m.a.createElement(n,fo({key:t},u,{config:e,mention:c,className:"Editor-toolbar-options"}))})),m.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"},m.a.createElement(h.Editor,fo({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:ee,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedTextFn,ariaLabel:s,blockRenderMap:this.blockRenderMap},this.editorProps))))}}])&&go(t.prototype,e),n&&go(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(y.Component),_o=(r.utils={EditorState:h.EditorState,ContentState:h.ContentState,RichUtils:h.RichUtils,convertFromRaw:h.convertFromRaw,convertToRaw:h.convertToRaw,htmlToState:function(e){var e=e.replaceAll('<p><br/></p><p id="RichTextEditor-Image"','<p id="RichTextEditor-Image"').replaceAll("<br/>","").replaceAll("<p>&nbsp;</p>",""),e=L()(e);if(e)return{contentState:e=h.ContentState.createFromBlockArray(e.contentBlocks),editorState:h.EditorState.createWithContent(e)}},stateToHTML:function(e){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=Object(h.convertToRaw)(e.getCurrentContent());return F()(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:d.a.shape({separator:d.a.string,trigger:d.a.string,chipOptions:d.a.object,dropdownOptions:d.a.shape({dropdownClassName:d.a.string,customOptionRenderer:d.a.func}),renderer:d.a.func,suggestions:d.a.shape({label:d.a.string,value:d.a.string,icon:d.a.string}),fetchSuggestions:d.a.func}),editorState:d.a.object,onEditorStateChange:d.a.func,defaultEditorState:d.a.object,onContentStateChange:d.a.func,defaultContentState:d.a.object,contentState:d.a.object,spellCheck:d.a.bool,toolbar:Pt,showToolbar:d.a.bool,editorClassName:d.a.string,wrapperClassName:d.a.string,toolbarClassName:d.a.string,editorStyle:d.a.object,onFocus:d.a.func,onBlur:d.a.func,onTab:d.a.func,textAlignment:d.a.oneOf(["left","right","center"]),readOnly:d.a.bool,autoFocus:d.a.bool,placeholder:d.a.string,ariaLabel:d.a.string,wrapperId:d.a.number,editorRef:d.a.func,handlePastedText:d.a.func},r.defaultProps={autoFocus:!0,showToolbar:!0},r),Eo=o(49),Co=o.n(Eo),Oo=o(50);function xo(e){return(xo="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 ko(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 A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ko(Object(n),!0).forEach(function(e){Do(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Do(e,t,n){return(t=function(e){e=function(e,t){if("object"!==xo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===xo(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function To(e){return function(e){if(Array.isArray(e))return jo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?jo(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)?jo(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jo(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 Io(e,n){return m.a.createElement(m.a.Fragment,null,e.map(function(e,t){return m.a.createElement("li",{key:n[t]},e)}))}function Mo(e,r){return m.a.createElement(m.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"),m.a.createElement(b.i,{key:r[t]},n.map(function(e){return[e,m.a.createElement("br",null)]}))):e&&0===(null==(n=e[1])?void 0:n.length)?m.a.createElement("p",null,m.a.createElement("br",null)):m.a.createElement(b.i,{key:r[t]},e.map(function(e){return[e]}))}))}function No(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=A(A({},Bo),n),r=A(A({},Fo),r),o=A(A({},zo),o),r=A(A(A({},Ko),r),o),o=A(A({},Ro),Ho(t)),t={blocks:r,entities:n,styles:Object(Eo.createStylesRenderer)(Lo,o)};return Co()(e,t,!1)}function Po(e){var t=e.raw,n=e.entities,r=e.headings,o=e.list,e=e.colors;return(t=t&&No(t,{entities:n,headings:r,list:o,colors:e}))?m.a.createElement("div",{className:"Preview-wrapper"},t):null}var Ao={paddingLeft:"1.5em",margin:"0px"},Ro={BOLD:{fontWeight:"bold"},ITALIC:{fontStyle:"italic"},UNDERLINE:{textDecoration:"underline"},STRIKETHROUGH:{textDecoration:"line-through"}},Lo=function(e){var t=e.children,n=e.style,e=e.key;return m.a.createElement("span",{key:e,style:n},t)},Fo={"header-one":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"xxl",key:n[t]},e)})},"header-two":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"xl",key:n[t]},e)})},"header-three":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"l",key:n[t]},e)})},"header-four":function(e,t){var n=t.keys;return e.map(function(e,t){return m.a.createElement(b.e,{size:"m",key:n[t]},e)})}},zo={"unordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ul",{style:Ao},Io(e,t))},"ordered-list-item":function(e,t){t=t.keys;return m.a.createElement("ol",{style:Ao},Io(e,t))}},Bo={LINK:function(e,t,n){n=n.key;return m.a.createElement(b.h,{key:n,href:t.url},e)},IMAGE:function(e,t){var n=t.src,r=t.alt,o=t.height,i=t.width,t=t.alignment;return m.a.createElement("p",{id:"RichTextEditor-Image",style:{justifyContent:t||"left",display:"flex"}},m.a.createElement("img",{src:n,alt:r,height:o,width:i}))},MENTION:function(e,t,n){n=n.key;return m.a.createElement("span",{name:t.value,className:"Chip--input Chip d-inline-flex mt-3",key:n},e)}},Ko={unstyled:function(e,t,n){t=t.keys;return Mo(e,t)},atomic:function(e,t){return e[0]}},Ho=function(e){return[].concat(To(co),To(e)).reduce(function(e,t){var n="color-".concat(t),t={color:t};return A(A({},e),{},Do({},n,t))},{})},Uo=(Po.utils={convertToHTML:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=e&&No(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))&&Object(Oo.renderToStaticMarkup)(e)?(t=(n=o(231)).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(Oo.renderToStaticMarkup)(e))):""}},Po.propTypes={raw:d.a.object.isRequired,colors:d.a.arrayOf(d.a.string),list:d.a.object,headings:d.a.object,entities:d.a.object},Po.defaultProps={entities:{},headings:{},list:{},colors:[]},Po)}]);