@reltio/hierarchy 1.4.79 → 1.4.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +1 -1
- package/bundle.js.LICENSE.txt +33 -0
- package/package.json +4 -4
package/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see bundle.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@mui/icons-material/Add"),require("@mui/icons-material/ArrowDropDown"),require("@mui/icons-material/Cancel"),require("@mui/icons-material/CheckCircle"),require("@mui/icons-material/Close"),require("@mui/icons-material/CloudUpload"),require("@mui/icons-material/Done"),require("@mui/icons-material/HighlightOff"),require("@mui/icons-material/KeyboardArrowLeft"),require("@mui/icons-material/KeyboardArrowRight"),require("@mui/icons-material/MoreVert"),require("@mui/material/Avatar"),require("@mui/material/Box"),require("@mui/material/Button"),require("@mui/material/Checkbox"),require("@mui/material/Chip"),require("@mui/material/Dialog"),require("@mui/material/DialogActions"),require("@mui/material/DialogContent"),require("@mui/material/DialogTitle"),require("@mui/material/Fade"),require("@mui/material/IconButton"),require("@mui/material/LinearProgress"),require("@mui/material/Link"),require("@mui/material/Menu"),require("@mui/material/MenuItem"),require("@mui/material/Paper"),require("@mui/material/Popper"),require("@mui/material/Portal"),require("@mui/material/Snackbar"),require("@mui/material/TextField"),require("@mui/material/Toolbar"),require("@mui/material/Tooltip"),require("@mui/material/Typography"),require("@mui/material/styles"),require("@mui/styles/StylesProvider"),require("@mui/styles/createGenerateClassName"),require("@mui/styles/withStyles"),require("classnames"),require("mdm-module"),require("mdm-sdk"),require("moment"),require("prop-types"),require("ramda"),require("react"),require("react-dom"),require("react-redux"),require("ui-i18n"));else if("function"==typeof define&&define.amd)define(["@mui/icons-material/Add","@mui/icons-material/ArrowDropDown","@mui/icons-material/Cancel","@mui/icons-material/CheckCircle","@mui/icons-material/Close","@mui/icons-material/CloudUpload","@mui/icons-material/Done","@mui/icons-material/HighlightOff","@mui/icons-material/KeyboardArrowLeft","@mui/icons-material/KeyboardArrowRight","@mui/icons-material/MoreVert","@mui/material/Avatar","@mui/material/Box","@mui/material/Button","@mui/material/Checkbox","@mui/material/Chip","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogContent","@mui/material/DialogTitle","@mui/material/Fade","@mui/material/IconButton","@mui/material/LinearProgress","@mui/material/Link","@mui/material/Menu","@mui/material/MenuItem","@mui/material/Paper","@mui/material/Popper","@mui/material/Portal","@mui/material/Snackbar","@mui/material/TextField","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@mui/material/styles","@mui/styles/StylesProvider","@mui/styles/createGenerateClassName","@mui/styles/withStyles","classnames","mdm-module","mdm-sdk","moment","prop-types","ramda","react","react-dom","react-redux","ui-i18n"],t);else{var n="object"==typeof exports?t(require("@mui/icons-material/Add"),require("@mui/icons-material/ArrowDropDown"),require("@mui/icons-material/Cancel"),require("@mui/icons-material/CheckCircle"),require("@mui/icons-material/Close"),require("@mui/icons-material/CloudUpload"),require("@mui/icons-material/Done"),require("@mui/icons-material/HighlightOff"),require("@mui/icons-material/KeyboardArrowLeft"),require("@mui/icons-material/KeyboardArrowRight"),require("@mui/icons-material/MoreVert"),require("@mui/material/Avatar"),require("@mui/material/Box"),require("@mui/material/Button"),require("@mui/material/Checkbox"),require("@mui/material/Chip"),require("@mui/material/Dialog"),require("@mui/material/DialogActions"),require("@mui/material/DialogContent"),require("@mui/material/DialogTitle"),require("@mui/material/Fade"),require("@mui/material/IconButton"),require("@mui/material/LinearProgress"),require("@mui/material/Link"),require("@mui/material/Menu"),require("@mui/material/MenuItem"),require("@mui/material/Paper"),require("@mui/material/Popper"),require("@mui/material/Portal"),require("@mui/material/Snackbar"),require("@mui/material/TextField"),require("@mui/material/Toolbar"),require("@mui/material/Tooltip"),require("@mui/material/Typography"),require("@mui/material/styles"),require("@mui/styles/StylesProvider"),require("@mui/styles/createGenerateClassName"),require("@mui/styles/withStyles"),require("classnames"),require("mdm-module"),require("mdm-sdk"),require("moment"),require("prop-types"),require("ramda"),require("react"),require("react-dom"),require("react-redux"),require("ui-i18n")):t(e["@mui/icons-material/Add"],e["@mui/icons-material/ArrowDropDown"],e["@mui/icons-material/Cancel"],e["@mui/icons-material/CheckCircle"],e["@mui/icons-material/Close"],e["@mui/icons-material/CloudUpload"],e["@mui/icons-material/Done"],e["@mui/icons-material/HighlightOff"],e["@mui/icons-material/KeyboardArrowLeft"],e["@mui/icons-material/KeyboardArrowRight"],e["@mui/icons-material/MoreVert"],e["@mui/material/Avatar"],e["@mui/material/Box"],e["@mui/material/Button"],e["@mui/material/Checkbox"],e["@mui/material/Chip"],e["@mui/material/Dialog"],e["@mui/material/DialogActions"],e["@mui/material/DialogContent"],e["@mui/material/DialogTitle"],e["@mui/material/Fade"],e["@mui/material/IconButton"],e["@mui/material/LinearProgress"],e["@mui/material/Link"],e["@mui/material/Menu"],e["@mui/material/MenuItem"],e["@mui/material/Paper"],e["@mui/material/Popper"],e["@mui/material/Portal"],e["@mui/material/Snackbar"],e["@mui/material/TextField"],e["@mui/material/Toolbar"],e["@mui/material/Tooltip"],e["@mui/material/Typography"],e["@mui/material/styles"],e["@mui/styles/StylesProvider"],e["@mui/styles/createGenerateClassName"],e["@mui/styles/withStyles"],e.classnames,e["mdm-module"],e["mdm-sdk"],e.moment,e["prop-types"],e.ramda,e.react,e["react-dom"],e["react-redux"],e["ui-i18n"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(e,t,n,r,o,a,i,l,s,c,u,d,f,p,h,m,v,g,y,b,x,E,C,w,_,k,O,S,A,M,L,P,R,T,N,I,D,F,j,B,z,H,U,V,Z,K,q,W){return(()=>{var $={355:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HierarchyScreen:()=>BE});var r=n(8156),o=n.n(r);const a="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect;var i=n(4616);const l=e=>{const t=r.createContext({value:{current:e},version:{current:-1},listeners:[]});var n;return t.Provider=(n=t.Provider,e=>{const t=r.useRef(e.value),o=r.useRef(0),l=r.useRef();return l.current||(l.current={value:t,version:o,listeners:[]}),a((()=>{t.current=e.value,o.current+=1,(0,i.unstable_runWithPriority)(i.unstable_NormalPriority,(()=>{l.current.listeners.forEach((t=>{t([o.current,e.value])}))}))}),[e.value]),r.createElement(n,{value:l.current},e.children)}),delete t.Consumer,t};var s=n(2396),c=n(5751),u=n.n(c),d=n(8310),f=n.n(d),p=n(3288),h=n(1733),m=n.n(h),v=n(4176);const g=(e,t)=>{const n=r.useContext(e),{value:{current:o},version:{current:i},listeners:l}=n,s=t(o),[c,u]=r.useReducer(((e,n)=>{if(!n)return[o,s];if(n[0]<=i)return y(e[1],s)?e:[o,s];try{if(y(e[0],n[1]))return e;const r=t(n[1]);return y(e[1],r)?e:[n[1],r]}catch(e){}return[e[0],e[1]]}),[o,s]);return y(c[1],s)||u(void 0),a((()=>(l.push(u),()=>{const e=l.indexOf(u);l.splice(e,1)})),[l]),c[1]},y="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},b=l({}),x=l({}),E=l({}),C=e=>g(x,e),w=()=>C((e=>e.uiPath)),_=()=>C((e=>e.entity)),k=()=>C((e=>e.historyEvent)),O=()=>C((e=>e.metadata)),S=()=>C((e=>{var t;return null===(t=e.user)||void 0===t?void 0:t.username})),A=()=>C((e=>{var t;return null===(t=e.tenant)||void 0===t?void 0:t.id})),M=()=>C((e=>e.searchNavigationData)),L=e=>g(b,(t=>t[e]));var P=n(1461),R=n(7896),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};const N="object"===("undefined"==typeof window?"undefined":T(window))&&"object"===("undefined"==typeof document?"undefined":T(document))&&9===document.nodeType;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},I(e)}function D(e){var t=function(e){if("object"!=I(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==I(t)?t:t+""}function F(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,D(r.key),r)}}function j(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var B=n(1665),z=n(753),H={}.constructor;function U(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(U);if(e.constructor!==H)return e;var t={};for(var n in e)t[n]=U(e[n]);return t}function V(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=U(t);return r.plugins.onCreateRule(e,o,n)||(e[0],null)}var Z=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},K=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Z(e[n]," ");else t=Z(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function q(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function W(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function $(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,a=void 0===o?0:o,i=t.fallbacks;!1===n.format&&(a=-1/0);var l=q(n),s=l.linebreak,c=l.space;if(e&&a++,i)if(Array.isArray(i))for(var u=0;u<i.length;u++){var d=i[u];for(var f in d){var p=d[f];null!=p&&(r&&(r+=s),r+=W(f+":"+c+K(p)+";",a))}}else for(var h in i){var m=i[h];null!=m&&(r&&(r+=s),r+=W(h+":"+c+K(m)+";",a))}for(var v in t){var g=t[v];null!=g&&"fallbacks"!==v&&(r&&(r+=s),r+=W(v+":"+c+K(g)+";",a))}return(r||n.allowEmpty)&&e?(r&&(r=""+s+r+s),W(""+e+c+"{"+r,--a)+W("}",a)):r}var G=/([[\].#*$><+~=|^:(),"'`\s])/g,Y="undefined"!=typeof CSS&&CSS.escape,X=function(e){return Y?Y(e):e.replace(G,"\\$1")},Q=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var a=null==o||!1===o,i=e in this.style;if(a&&!i&&!r)return this;var l=a&&i;if(l?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return l?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var s=this.options.sheet;return s&&s.attached,this},e}(),J=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var a=r.selector,i=r.scoped,l=r.sheet,s=r.generateId;return a?o.selectorText=a:!1!==i&&(o.id=s((0,z.Z)((0,z.Z)(o)),l),o.selectorText="."+X(o.id)),o}(0,B.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=K(n))}return e},n.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?(0,R.Z)({},e,{allowEmpty:!0}):e;return $(this.selectorText,this.style,n)},j(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;n&&t&&(t.setSelector(n,e)||t.replaceRule(n,this))}},get:function(){return this.selectorText}}]),t}(Q),ee={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new J(e,t,n)}},te={indent:1,children:!0},ne=/@([\w-]+)/,re=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(ne);for(var o in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Se((0,R.Z)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=te);var t=q(e).linebreak;if(null==e.indent&&(e.indent=te.indent),null==e.children&&(e.children=te.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),oe=/@container|@media|@supports\s+/,ae={onCreateRule:function(e,t,n){return oe.test(e)?new re(e,t,n):null}},ie={indent:1,children:!0},le=/@keyframes\s+([\w-]+)/,se=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(le);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,i=n.generateId;for(var l in this.id=!1===o?this.name:X(i(this,a)),this.rules=new Se((0,R.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,R.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=ie);var t=q(e).linebreak;if(null==e.indent&&(e.indent=ie.indent),null==e.children&&(e.children=ie.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),ce=/@keyframes\s+/,ue=/\$([\w-]+)/g,de=function(e,t){return"string"==typeof e?e.replace(ue,(function(e,n){return n in t?t[n]:e})):e},fe=function(e,t,n){var r=e[t],o=de(r,n);o!==r&&(e[t]=o)},pe={onCreateRule:function(e,t,n){return"string"==typeof e&&ce.test(e)?new se(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&fe(e,"animation-name",n.keyframes),"animation"in e&&fe(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return de(e,r.keyframes);default:return e}}},he=function(e){function t(){return e.apply(this,arguments)||this}return(0,B.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?(0,R.Z)({},e,{allowEmpty:!0}):e;return $(this.key,this.style,n)},t}(Q),me={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new he(e,t,n):null}},ve=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=q(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=$(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return $(this.at,this.style,e)},e}(),ge=/@font-face/,ye={onCreateRule:function(e,t,n){return ge.test(e)?new ve(e,t,n):null}},be=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return $(this.key,this.style,e)},e}(),xe={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new be(e,t,n):null}},Ee=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Ce={"@charset":!0,"@import":!0,"@namespace":!0},we={onCreateRule:function(e,t,n){return e in Ce?new Ee(e,t,n):null}},_e=[ee,ae,pe,me,ye,xe,we],ke={process:!0},Oe={force:!0,process:!0},Se=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,a=r.sheet,i=r.jss,l=r.Renderer,s=r.generateId,c=r.scoped,u=(0,R.Z)({classes:this.classes,parent:o,sheet:a,jss:i,Renderer:l,generateId:s,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(u.selector="."+X(this.classes[d]));var f=V(d,t,u);if(!f)return null;this.register(f);var p=void 0===u.index?this.index.length:u.index;return this.index.splice(p,0,f),f},t.replace=function(e,t,n){var r=this.get(e),o=this.index.indexOf(r);r&&this.remove(r);var a=n;return-1!==o&&(a=(0,R.Z)({},n,{index:o})),this.add(e,t,a)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof J?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof se&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof J?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof se&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=ke);var o=this.options,a=o.jss.plugins,i=o.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var l=t.style;if(a.onUpdate(n,t,i,r),r.process&&l&&l!==t.style){for(var s in a.onProcessStyle(t.style,t,i),t.style){var c=t.style[s];c!==l[s]&&t.prop(s,c,Oe)}for(var u in l){var d=t.style[u],f=l[u];null==d&&d!==f&&t.prop(u,null,Oe)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=q(e).linebreak,a=0;a<this.index.length;a++){var i=this.index[a].toString(e);(i||r)&&(t&&(t+=o),t+=i)}return t},e}(),Ae=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,R.Z)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Se(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var o=this.rules.replace(e,t,n);return o&&this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(this.renderer&&(o?r.renderable&&this.renderer.replaceRule(r.renderable,o):this.renderer.deleteRule(r)),o):o:(this.deployed=!1,o)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Me=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Le=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,P.Z)(t,["attached"]),o=q(r).linebreak,a="",i=0;i<this.registry.length;i++){var l=this.registry[i];null!=n&&l.attached!==n||(a&&(a+=o),a+=l.toString(r))}return a},j(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Pe=new Le,Re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Te="2f1acc6c3a606b082e5eef5e54414ffb";null==Re[Te]&&(Re[Te]=0);var Ne=Re[Te]++,Ie=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",a="";return r&&(r.options.classNamePrefix&&(a=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(a||"c")+Ne+o+t:a+n.key+"-"+Ne+(o?"-"+o:"")+"-"+t}},De=function(e){var t;return function(){return t||(t=e()),t}},Fe=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},je=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=K(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var o=r?r.indexOf("!important"):-1,a=o>-1?r.substr(0,o-1):r;e.style.setProperty(t,a,o>-1?"important":"")}}catch(e){return!1}return!0},Be=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},ze=function(e,t){return e.selectorText=t,e.selectorText===t},He=De((function(){return document.querySelector("head")}));var Ue=De((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Ve=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Ze=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Ke=function(){function e(e){this.getPropertyValue=Fe,this.setProperty=je,this.removeProperty=Be,this.setSelector=ze,this.hasInsertedRules=!1,this.cssRules=[],e&&Pe.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var a=Ue();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=function(e){var t=Pe.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var o=function(e){for(var t=He(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var o=n,a=o.parentNode;a&&a.insertBefore(e,o.nextSibling)}else He().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;if("conditional"===e.type||"keyframes"===e.type){var a=Ze(n,t);if(!1===(o=Ve(n,r.toString({children:!1}),a)))return!1;this.refCssRule(e,a,o)}return this.insertRules(r.rules,o),o}var i=e.toString();if(!i)return!1;var l=Ze(n,t),s=Ve(n,i,l);return!1!==s&&(this.hasInsertedRules=!0,this.refCssRule(e,l,s),s)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ae&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),qe=0,We=function(){function e(e){this.id=qe++,this.version="10.10.0",this.plugins=new Me,this.options={id:{minify:!1},createGenerateId:Ie,Renderer:N?Ke:null,plugins:[]},this.generateId=Ie({minify:!1});for(var t=0;t<_e.length;t++)this.plugins.use(_e[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,R.Z)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Pe.index?0:Pe.index+1);var r=new Ae(e,(0,R.Z)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Pe.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=(0,R.Z)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=V(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),$e=function(e){return new We(e)},Ge="object"==typeof CSS&&null!=CSS&&"number"in CSS;function Ye(e){var t=null;for(var n in e){var r=e[n],o=typeof r;if("function"===o)t||(t={}),t[n]=r;else if("object"===o&&null!==r&&!Array.isArray(r)){var a=Ye(r);a&&(t||(t={}),t[n]=a)}}return t}function Xe(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o=(0,R.Z)({},t);return Object.keys(n).forEach((e=>{n[e]&&(o[e]=`${t[e]} ${n[e]}`)})),o}$e();const Qe={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}},Je=Qe,et=r.createContext(null);function tt(){var e;const t=r.useContext(et);return null!=(e=null==t?void 0:t.$$material)?e:t}var nt=n(5099),rt=n.n(nt);const ot="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",at=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var it=Date.now(),lt="fnValues"+it,st="fnStyle"+ ++it;var ct="@global",ut=function(){function e(e,t,n){for(var r in this.type="global",this.at=ct,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Se((0,R.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),dt=function(){function e(e,t,n){this.type="global",this.at=ct,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,(0,R.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ft=/\s*,\s*/g;function pt(e,t){for(var n=e.split(ft),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}var ht=/\s*,\s*/g,mt=/&/g,vt=/\$([\w-]+)/g;var gt=/[A-Z]/g,yt=/^ms-/,bt={};function xt(e){return"-"+e.toLowerCase()}const Et=function(e){if(bt.hasOwnProperty(e))return bt[e];var t=e.replace(gt,xt);return bt[e]=yt.test(t)?"-"+t:t};function Ct(e){var t={};for(var n in e)t[0===n.indexOf("--")?n:Et(n)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ct):t.fallbacks=Ct(e.fallbacks)),t}var wt=Ge&&CSS?CSS.px:"px",_t=Ge&&CSS?CSS.ms:"ms",kt=Ge&&CSS?CSS.percent:"%";function Ot(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(t,n)]=e[o];return r}var St=Ot({"animation-delay":_t,"animation-duration":_t,"background-position":wt,"background-position-x":wt,"background-position-y":wt,"background-size":wt,border:wt,"border-bottom":wt,"border-bottom-left-radius":wt,"border-bottom-right-radius":wt,"border-bottom-width":wt,"border-left":wt,"border-left-width":wt,"border-radius":wt,"border-right":wt,"border-right-width":wt,"border-top":wt,"border-top-left-radius":wt,"border-top-right-radius":wt,"border-top-width":wt,"border-width":wt,"border-block":wt,"border-block-end":wt,"border-block-end-width":wt,"border-block-start":wt,"border-block-start-width":wt,"border-block-width":wt,"border-inline":wt,"border-inline-end":wt,"border-inline-end-width":wt,"border-inline-start":wt,"border-inline-start-width":wt,"border-inline-width":wt,"border-start-start-radius":wt,"border-start-end-radius":wt,"border-end-start-radius":wt,"border-end-end-radius":wt,margin:wt,"margin-bottom":wt,"margin-left":wt,"margin-right":wt,"margin-top":wt,"margin-block":wt,"margin-block-end":wt,"margin-block-start":wt,"margin-inline":wt,"margin-inline-end":wt,"margin-inline-start":wt,padding:wt,"padding-bottom":wt,"padding-left":wt,"padding-right":wt,"padding-top":wt,"padding-block":wt,"padding-block-end":wt,"padding-block-start":wt,"padding-inline":wt,"padding-inline-end":wt,"padding-inline-start":wt,"mask-position-x":wt,"mask-position-y":wt,"mask-size":wt,height:wt,width:wt,"min-height":wt,"max-height":wt,"min-width":wt,"max-width":wt,bottom:wt,left:wt,top:wt,right:wt,inset:wt,"inset-block":wt,"inset-block-end":wt,"inset-block-start":wt,"inset-inline":wt,"inset-inline-end":wt,"inset-inline-start":wt,"box-shadow":wt,"text-shadow":wt,"column-gap":wt,"column-rule":wt,"column-rule-width":wt,"column-width":wt,"font-size":wt,"font-size-delta":wt,"letter-spacing":wt,"text-decoration-thickness":wt,"text-indent":wt,"text-stroke":wt,"text-stroke-width":wt,"word-spacing":wt,motion:wt,"motion-offset":wt,outline:wt,"outline-offset":wt,"outline-width":wt,perspective:wt,"perspective-origin-x":kt,"perspective-origin-y":kt,"transform-origin":kt,"transform-origin-x":kt,"transform-origin-y":kt,"transform-origin-z":kt,"transition-delay":_t,"transition-duration":_t,"vertical-align":wt,"flex-basis":wt,"shape-margin":wt,size:wt,gap:wt,grid:wt,"grid-gap":wt,"row-gap":wt,"grid-row-gap":wt,"grid-column-gap":wt,"grid-template-rows":wt,"grid-template-columns":wt,"grid-auto-rows":wt,"grid-auto-columns":wt,"box-shadow-x":wt,"box-shadow-y":wt,"box-shadow-blur":wt,"box-shadow-spread":wt,"font-line-height":wt,"text-shadow-x":wt,"text-shadow-y":wt,"text-shadow-blur":wt});function At(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=At(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=At(o,t[o],n);else for(var a in t)t[a]=At(e+"-"+a,t[a],n);else if("number"==typeof t&&!1===isNaN(t)){var i=n[e]||St[e];return!i||0===t&&i===wt?t.toString():"function"==typeof i?i(t).toString():""+t+i}return t}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Lt(e,t){if(e){if("string"==typeof e)return Mt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(e,t):void 0}}function Pt(e){return function(e){if(Array.isArray(e))return Mt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Lt(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.")}()}var Rt="",Tt="",Nt="",It="",Dt=N&&"ontouchstart"in document.documentElement;if(N){var Ft={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},jt=document.createElement("p").style;for(var Bt in Ft)if(Bt+"Transform"in jt){Rt=Bt,Tt=Ft[Bt];break}"Webkit"===Rt&&"msHyphens"in jt&&(Rt="ms",Tt=Ft.ms,It="edge"),"Webkit"===Rt&&"-apple-trailing-word"in jt&&(Nt="apple")}var zt=Rt,Ht=Tt,Ut=Nt,Vt=It,Zt=Dt,Kt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===zt?"-webkit-"+e:Ht+e)}},qt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===zt?Ht+"print-"+e:e)}},Wt=/[-\s]+(.)?/g;function $t(e,t){return t?t.toUpperCase():""}function Gt(e){return e.replace(Wt,$t)}function Yt(e){return Gt("-"+e)}var Xt,Qt={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===zt){var n="mask-image";if(Gt(n)in t)return e;if(zt+Yt(n)in t)return Ht+e}return e}},Jt={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Ut||Zt?e:Ht+e)}},en={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Ht+e)}},tn={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Ht+e)}},nn={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===zt||"ms"===zt&&"edge"!==Vt?Ht+e:e)}},rn={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===zt||"ms"===zt||"apple"===Ut?Ht+e:e)}},on={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===zt?"WebkitColumn"+Yt(e)in t&&Ht+"column-"+e:"Moz"===zt&&"page"+Yt(e)in t&&"page-"+e)}},an={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===zt)return e;var n=e.replace("-inline","");return zt+Yt(n)in t&&Ht+n}},ln={supportedProperty:function(e,t){return Gt(e)in t&&e}},sn={supportedProperty:function(e,t){var n=Yt(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:zt+n in t?Ht+e:"Webkit"!==zt&&"Webkit"+n in t&&"-webkit-"+e}},cn={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===zt?""+Ht+e:e)}},un={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===zt?Ht+"scroll-chaining":e)}},dn={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},fn={supportedProperty:function(e,t){var n=dn[e];return!!n&&zt+Yt(n)in t&&Ht+n}},pn={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},hn=Object.keys(pn),mn=function(e){return Ht+e},vn={supportedProperty:function(e,t,n){var r=n.multiple;if(hn.indexOf(e)>-1){var o=pn[e];if(!Array.isArray(o))return zt+Yt(o)in t&&Ht+o;if(!r)return!1;for(var a=0;a<o.length;a++)if(!(zt+Yt(o[0])in t))return!1;return o.map(mn)}return!1}},gn=[Kt,qt,Qt,Jt,en,tn,nn,rn,on,an,ln,sn,cn,un,fn,vn],yn=gn.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),bn=gn.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Pt(t.noPrefill)),e}),[]),xn={};if(N){Xt=document.createElement("p");var En=window.getComputedStyle(document.documentElement,"");for(var Cn in En)isNaN(Cn)||(xn[En[Cn]]=En[Cn]);bn.forEach((function(e){return delete xn[e]}))}function wn(e,t){if(void 0===t&&(t={}),!Xt)return e;if(null!=xn[e])return xn[e];"transition"!==e&&"transform"!==e||(t[e]=e in Xt.style);for(var n=0;n<yn.length&&(xn[e]=yn[n](e,Xt.style,t),!xn[e]);n++);try{Xt.style[e]=""}catch(e){return!1}return xn[e]}var _n,kn={},On={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Sn=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function An(e,t,n){return"var"===t?"var":"all"===t?"all":"all"===n?", all":(t?wn(t):", "+wn(n))||t||n}function Mn(e,t){var n=t;if(!_n||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=kn[r])return kn[r];try{_n.style[e]=n}catch(e){return kn[r]=!1,!1}if(On[e])n=n.replace(Sn,An);else if(""===_n.style[e]&&("-ms-flex"===(n=Ht+n)&&(_n.style[e]="-ms-flexbox"),_n.style[e]=n,""===_n.style[e]))return kn[r]=!1,!1;return _n.style[e]="",kn[r]=n,kn[r]}N&&(_n=document.createElement("p"));var Ln=n(2322);const Pn=$e({plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=V(e,{},n);return r[st]=t,r},onProcessStyle:function(e,t){if(lt in t||st in t)return e;var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return t[lt]=n,e},onUpdate:function(e,t,n,r){var o=t,a=o[st];a&&(o.style=a(e)||{});var i=o[lt];if(i)for(var l in i)o.prop(l,i[l](e),r)}},{onCreateRule:function(e,t,n){if(!e)return null;if(e===ct)return new ut(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,8))return new dt(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,o=r?r[ct]:null;if(o){for(var a in o)t.addRule(a,o[a],(0,R.Z)({},n,{selector:pt(a,e.selector)}));delete r[ct]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var o in r)if("@"===o[0]&&o.substr(0,7)===ct){var a=pt(o.substr(7),e.selector);t.addRule(a,r[o],(0,R.Z)({},n,{selector:a})),delete r[o]}}(e,t))}},function(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?o.selector:r}}function t(e,t){for(var n=t.split(ht),r=e.split(ht),o="",a=0;a<n.length;a++)for(var i=n[a],l=0;l<r.length;l++){var s=r[l];o&&(o+=", "),o+=-1!==s.indexOf("&")?s.replace(mt,i):i+" "+s}return o}function n(e,t,n){if(n)return(0,R.Z)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var o=(0,R.Z)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(r,o,a){if("style"!==o.type)return r;var i,l,s=o,c=s.options.parent;for(var u in r){var d=-1!==u.indexOf("&"),f="@"===u[0];if(d||f){if(i=n(s,c,i),d){var p=t(u,s.selector);l||(l=e(c,a)),p=p.replace(vt,l);var h=s.key+"-"+u;"replaceRule"in c?c.replaceRule(h,r[u],(0,R.Z)({},i,{selector:p})):c.addRule(h,r[u],(0,R.Z)({},i,{selector:p}))}else f&&c.addRule(u,{},i).addRule(s.key,r[u],{selector:s.selector});delete r[u]}}return r}}}(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ct(e[t]);return e}return Ct(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Et(t);return t===r?e:(n.prop(r,e),null)}},function(e){void 0===e&&(e={});var t=Ot(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=At(r,e[r],t);return e},onChangeValue:function(e,n){return At(n,e,t)}}}(),"undefined"==typeof window?null:function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var o=!1,a=wn(n);a&&a!==n&&(o=!0);var i=!1,l=Mn(a,K(r));l&&l!==r&&(i=!0),(o||i)&&(o&&delete t[n],t[a||n]=l||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===zt?e:"@"+Ht+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Mn(t,K(e))||e}}}(),(In=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(e,t){if("style"!==t.type)return e;for(var n={},r=Object.keys(e).sort(In),o=0;o<r.length;o++)n[r[o]]=e[r[o]];return n}})]}),Rn=function(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=""===r?"":`${r}-`;let a=0;const i=()=>(a+=1,a);return(e,a)=>{const l=a.options.name;if(l&&0===l.indexOf("Mui")&&!a.options.link&&!t){if(-1!==at.indexOf(e.key))return`Mui-${e.key}`;const t=`${o}${l}-${e.key}`;return a.options.theme[ot]&&""===r?`${t}-${i()}`:t}return`${o}${n}${i()}`}}(),Tn={disableGeneration:!1,generateClassName:Rn,jss:Pn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Nn=r.createContext(Tn);var In;let Dn=-1e9;function Fn(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function jn(e){if(!Fn(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=jn(e[n])})),t}function Bn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(Fn(t[o])&&o in e&&Fn(e[o])?r[o]=Bn(e[o],t[o],n):n.clone?r[o]=Fn(t[o])?jn(t[o]):t[o]:r[o]=t[o])})),r}function zn(e){if("string"!=typeof e)throw new Error(function(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Hn=["variant"];function Un(e){return 0===e.length}const Vn={},Zn=["name","classNamePrefix","Component","defaultTheme"];function Kn({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},a){if(n.disableGeneration)return;let i=Je.get(n.sheetsManager,r,t);i||(i={refs:0,staticSheet:null,dynamicStyles:null},Je.set(n.sheetsManager,r,t,i));const l=(0,R.Z)({},r.options,n,{theme:t,flip:"boolean"==typeof n.flip?n.flip:"rtl"===t.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;const s=n.sheetsRegistry;if(0===i.refs){let e;n.sheetsCache&&(e=Je.get(n.sheetsCache,r,t));const a=r.create(t,o);e||(e=n.jss.createStyleSheet(a,(0,R.Z)({link:!1},l)),e.attach(),n.sheetsCache&&Je.set(n.sheetsCache,r,t,e)),s&&s.add(e),i.staticSheet=e,i.dynamicStyles=Ye(a)}if(i.dynamicStyles){const t=n.jss.createStyleSheet(i.dynamicStyles,(0,R.Z)({link:!0},l));t.update(a),t.attach(),e.dynamicSheet=t,e.classes=Xe({baseClasses:i.staticSheet.classes,newClasses:t.classes}),s&&s.add(t)}else e.classes=i.staticSheet.classes;i.refs+=1}function qn(e,t={}){const{name:n,classNamePrefix:o,Component:a,defaultTheme:i=Vn}=t,l=(0,P.Z)(t,Zn),s=function(e){const t="function"==typeof e;return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const a=n.components[r].styleOverrides||{},i=n.components[r].variants||[],l=(0,R.Z)({},o);return Object.keys(a).forEach((e=>{l[e]=Bn(l[e]||{},a[e])})),i.forEach((e=>{const t=function(e){const{variant:t}=e,n=(0,P.Z)(e,Hn);let r=t||"";return Object.keys(n).sort().forEach((t=>{r+="color"===t?Un(r)?e[t]:zn(e[t]):`${Un(r)?t:zn(t)}${zn(e[t].toString())}`})),r}(e.props);l[t]=Bn(l[t]||{},e.style)})),l},options:{}}}(e),c=n||o||"makeStyles";return s.options={index:(Dn+=1,Dn),name:n,meta:c,classNamePrefix:c},(e={})=>{const t=tt()||i,o=(0,R.Z)({},r.useContext(Nn),l),c=r.useRef(),u=r.useRef();!function(a,i){const l=r.useRef([]);let d;const f=r.useMemo((()=>({})),i);l.current!==f&&(l.current=f,d=(()=>{const r={name:n,state:{},stylesCreator:s,stylesOptions:o,theme:t};return Kn(r,e),u.current=!1,c.current=r,()=>{!function({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Je.get(n.sheetsManager,r,t);o.refs-=1;const a=n.sheetsRegistry;0===o.refs&&(Je.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),a&&a.remove(e.dynamicSheet))}(r)}})()),r.useEffect((()=>()=>{d&&d()}),[f])}(0,[t,s]),r.useEffect((()=>{u.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(c.current,e),u.current=!0}));const d=function({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=Xe({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}(c.current,e.classes,a);return d}}const Wn=qn((()=>({errorBlock:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",minHeight:"58px",left:0,right:0,width:"calc(100% - 64px)",maxWidth:"1280px",margin:"0 auto",zIndex:1e4}})));function $n(){return $n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$n.apply(null,arguments)}const Gn=v.ZP.addError,Yn=e=>{let{showErrorFromStore:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["showErrorFromStore"]);const a=Wn(),i=L("errorSet"),l=C((e=>e.autoCloseInterval)),s=C((e=>e.uiError));return(0,r.useEffect)((()=>{s&&t&&(Yn.addError({title:u().text("Error"),message:s}),i(null))}),[i,s,t]),o().createElement(m(),{container:document.body},o().createElement(v.ZP,$n({classes:{errorBlock:f()(a.errorBlock,(0,p.path)(["classes","errorBlock"],n))},autoCloseInterval:l},n)))};Yn.addError=Gn;const Xn=(e,t)=>{const{title:n=u().text("Error"),message:r,defaultMessage:o}=t||{};console.warn(e),Yn.addError({title:n,message:r||(0,s.getRequestErrorMessage)(e,o)})};function Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Jn(e,t,n[t])}))}return e}function Jn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const er=l({unmaskedAttributes:{},unmaskAttributeValue:void 0,maskAttributeValue:void 0,deleteUnmaskedAttributeForRelation:void 0}),tr=({children:e})=>{const[t,n]=(0,r.useState)({}),[a,i]=(0,r.useState)({}),[l,c]=(0,r.useState)(null),u=C((e=>e.profileLastLoadedTime)),d=C((e=>e.historyMode)),f=C((e=>{var t;return null===(t=e.entity)||void 0===t?void 0:t.uri})),p=k(),h=(0,r.useRef)(t);h.current=t,(0,r.useEffect)((()=>{n({})}),[u,p]),(0,r.useEffect)((()=>{i({}),c(null)}),[f]);const m=(0,r.useCallback)((async e=>{var t;if(!e){const e=null!=l?l:await(0,s.getEntity)(f);return l||c(e),e}const n=null!==(t=a[e])&&void 0!==t?t:await(0,s.getEntityTimeSlice)(f,e);return a[e]||i((t=>Qn({},t,{[e]:n}))),n}),[f,a,l]),v=(0,r.useCallback)((async e=>{let t=await m(null==p?void 0:p.aStamp),n=(0,s.findAttributeValueByUri)(t,e);return n||(t=d===s.HistoryMode.Current?await m():await m(null==p?void 0:p.bStamp),n=(0,s.findAttributeValueByUri)(t,e),n)}),[m,null==p?void 0:p.aStamp,null==p?void 0:p.bStamp,d]),g=(0,r.useCallback)((async e=>{try{const t=h.current;if(t[e])return n((t=>Qn({},t,{[e]:Qn({},t[e],{isUnmasked:!0})}))),t[e].attributeValue;{n((t=>Qn({},t,{[e]:Qn({},t[e],{loading:!0})})));const t=p?await v(e):await(0,s.getUnmaskedAttributeValue)(e);return n((n=>Qn({},n,{[e]:{attributeValue:t,isUnmasked:!0,loading:!1}}))),t}}catch(e){return Xn(e),null}}),[p,v]),y=(0,r.useCallback)((e=>{n((t=>Qn({},t,{[e]:Qn({},t[e],{isUnmasked:!1})})))}),[]),b=(0,r.useCallback)((e=>{n((t=>{const n=Qn({},t);for(const t in n)t.startsWith(e)&&delete n[t];return n}))}),[]);return o().createElement(er.Provider,{value:{unmaskedAttributes:t,unmaskAttributeValue:g,maskAttributeValue:y,deleteUnmaskedAttributeForRelation:b}},e)},nr=o().createContext((()=>{}));nr.displayName="SnackbarContext";var rr=n(5206),or=n.n(rr),ar=n(4596),ir=n.n(ar),lr=n(9881),sr=n.n(lr),cr=n(3962),ur=n.n(cr),dr=n(3192),fr=n.n(dr);const pr={Y:"year",YY:"year",YYYY:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},hr={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},mr=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join("\n");class vr{constructor({locale:e,formats:t,instance:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=pr,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasTimezonePlugin=()=>void 0!==this.moment.tz,this.createSystemDate=e=>{const t=this.moment(e).local();return void 0===this.locale?t:t.locale(this.locale)},this.createUTCDate=e=>{const t=this.moment.utc(e);return void 0===this.locale?t:t.locale(this.locale)},this.createTZDate=(e,t)=>{if(!this.hasTimezonePlugin())throw new Error(mr);const n="default"===t?this.moment(e):this.moment.tz(e,t);return void 0===this.locale?n:n.locale(this.locale)},this.date=e=>{if(null===e)return null;const t=this.moment(e);return t.locale(this.getCurrentLocaleCode()),t},this.dateWithTimezone=(e,t)=>null===e?null:"UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),this.getTimezone=e=>{var t,n,r;if(e.isUTC())return"UTC";const o=null==(t=e._z)?void 0:t.name;return null!=(n=null!=o?o:null==(r=this.moment.defaultZone)?void 0:r.name)?n:"system"},this.setTimezone=(e,t)=>{var n,r;if("UTC"===t)return e.clone().utc();if("system"===t)return e.clone().local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(mr)}const o="default"===t?null!=(n=null==(r=this.moment.defaultZone)?void 0:r.name)?n:"system":t,a=e.clone();return a.tz(o),a},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.moment(e,!0),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.locale?this.moment(e,t,this.locale,!0):this.moment(e,t,!0),this.getCurrentLocaleCode=()=>this.locale||fr().locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(fr().localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=e=>e.match(/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g).map((e=>{const t=e[0];return"L"===t||";"===t?fr().localeData(this.getCurrentLocaleCode()).longDateFormat(e):e})).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.moment(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>{const n=e.clone();return n.locale(this.getCurrentLocaleCode()),n.format(t)},this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.moment(e).isSame(t),this.isSameYear=(e,t)=>e.isSame(t,"year"),this.isSameMonth=(e,t)=>e.isSame(t,"month"),this.isSameDay=(e,t)=>e.isSame(t,"day"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e.isAfter(t),this.isAfterYear=(e,t)=>e.isAfter(t,"year"),this.isAfterDay=(e,t)=>e.isAfter(t,"day"),this.isBefore=(e,t)=>e.isBefore(t),this.isBeforeYear=(e,t)=>e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>e.isBefore(t,"day"),this.isWithinRange=(e,[t,n])=>e.isBetween(t,n,null,"[]"),this.startOfYear=e=>e.clone().startOf("year"),this.startOfMonth=e=>e.clone().startOf("month"),this.startOfWeek=e=>e.clone().startOf("week"),this.startOfDay=e=>e.clone().startOf("day"),this.endOfYear=e=>e.clone().endOf("year"),this.endOfMonth=e=>e.clone().endOf("month"),this.endOfWeek=e=>e.clone().endOf("week"),this.endOfDay=e=>e.clone().endOf("day"),this.addYears=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"years"):e.clone().add(t,"years"),this.addMonths=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"months"):e.clone().add(t,"months"),this.addWeeks=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"weeks"):e.clone().add(t,"weeks"),this.addDays=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days"),this.addHours=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"hours"):e.clone().add(t,"hours"),this.addMinutes=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"minutes"):e.clone().add(t,"minutes"),this.addSeconds=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"seconds"):e.clone().add(t,"seconds"),this.getYear=e=>e.get("year"),this.getMonth=e=>e.get("month"),this.getDate=e=>e.get("date"),this.getHours=e=>e.get("hours"),this.getMinutes=e=>e.get("minutes"),this.getSeconds=e=>e.get("seconds"),this.getMilliseconds=e=>e.get("milliseconds"),this.setYear=(e,t)=>e.clone().year(t),this.setMonth=(e,t)=>e.clone().month(t),this.setDate=(e,t)=>e.clone().date(t),this.setHours=(e,t)=>e.clone().hours(t),this.setMinutes=(e,t)=>e.clone().minutes(t),this.setSeconds=(e,t)=>e.clone().seconds(t),this.setMilliseconds=(e,t)=>e.clone().milliseconds(t),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>e.clone().add(1,"month"),this.getPreviousMonth=e=>e.clone().subtract(1,"month"),this.getMonthArray=e=>{const t=[this.startOfYear(e)];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.mergeDateAndTime=(e,t)=>e.clone().hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>fr().weekdaysShort(!0),this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.clone().startOf("month").startOf("week"),r=t.clone().endOf("month").endOf("week");let o=0,a=n;const i=[];for(;a.isBefore(r);){const e=Math.floor(o/7);i[e]=i[e]||[],i[e].push(a),a=a.clone().add(1,"day"),o+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const n=this.moment(e).startOf("year"),r=this.moment(t).endOf("year"),o=[];let a=n;for(;a.isBefore(r);)o.push(a),a=a.clone().add(1,"year");return o},this.getMeridiemText=e=>this.is12HourCycleInCurrentLocale()?fr().localeData(this.getCurrentLocaleCode()).meridiem("am"===e?0:13,0,!1):"am"===e?"AM":"PM",this.moment=n||fr(),this.locale=e,this.formats=(0,R.Z)({},hr,t)}}var gr=n(7655);const yr=["localeText"],br=r.createContext(null),xr=function(e){var t;const{localeText:n}=e,o=(0,P.Z)(e,yr),{utils:a,localeText:i}=null!=(t=r.useContext(br))?t:{utils:void 0,localeText:void 0},l=(0,gr.useThemeProps)({props:o,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:c,dateFormats:u,dateLibInstance:d,adapterLocale:f,localeText:p}=l,h=r.useMemo((()=>(0,R.Z)({},p,i,n)),[p,i,n]),m=r.useMemo((()=>{if(!c)return a||null;const e=new c({locale:f,formats:u,instance:d});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[c,f,u,d,a]),v=r.useMemo((()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null),[m]),g=r.useMemo((()=>({utils:m,defaultDates:v,localeText:h})),[v,m,h]);return(0,Ln.jsx)(br.Provider,{value:g,children:s})};var Er=n(4756),Cr=n(2308),wr=n.n(Cr);const _r=function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}};_r('\n.AssistantLoader_root__L29wd {\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbox-sizing: border-box;\n}\n\n.AssistantLoader_indicator__L29wd {\n\twidth: var(--size);\n\theight: var(--size);\n\tdisplay: block;\n\tobject-fit: contain;\n}\n\n.AssistantLoader_dotFlashing__L29wd {\n\tposition: absolute;\n\tleft: calc(var(--size) * 1.625);\n\tbottom: 20%;\n\ttransform: translateY(50%);\n\twidth: calc(var(--size) * 0.25);\n\theight: calc(var(--size) * 0.25);\n\tborder-radius: calc(var(--size) * 0.15625);\n\tbackground-color: var(--reltio-color-primary-soft);\n\tanimation: AssistantLoader_dotFlashing__L29wd 1s infinite linear alternate;\n\tanimation-delay: 0.5s;\n}\n\n.AssistantLoader_dotFlashing__L29wd::before,\n.AssistantLoader_dotFlashing__L29wd::after {\n\tcontent: "";\n\tposition: absolute;\n\ttop: 0;\n\tdisplay: block;\n\twidth: calc(var(--size) * 0.25);\n\theight: calc(var(--size) * 0.25);\n\tborder-radius: calc(var(--size) * 0.15625);\n\tbackground-color: var(--reltio-color-primary-soft);\n\tanimation: AssistantLoader_dotFlashing__L29wd 1s infinite alternate;\n}\n\n.AssistantLoader_dotFlashing__L29wd::before {\n\tleft: calc(var(--size) * -0.375);\n\tanimation-delay: 0s;\n}\n\n.AssistantLoader_dotFlashing__L29wd::after {\n\tleft: calc(var(--size) * 0.375);\n\tanimation-delay: 1s;\n}\n\n@keyframes AssistantLoader_dotFlashing__L29wd {\n\t0% {\n\t\tbackground-color: var(--reltio-color-primary-soft);\n\t}\n\t50%,\n\t100% {\n\t\tbackground-color: color-mix(\n\t\t\tin srgb,\n\t\t\tvar(--reltio-color-primary-soft) 20%,\n\t\t\ttransparent\n\t\t);\n\t}\n}\n');const kr=(...e)=>{const t=new Set;return e.forEach((e=>{if(!e)return;t.add(e);const n=e.split("__")[0];n&&n!==e&&t.add(`reltio_${n}`)})),Array.from(t).join(" ")},Or=JSON.parse('{"root":"Button_root__L29wd","filled":"Button_filled__L29wd","outlined":"Button_outlined__L29wd","text":"Button_text__L29wd","primary":"Button_primary__L29wd","inherited":"Button_inherited__L29wd","small":"Button_small__L29wd","medium":"Button_medium__L29wd","large":"Button_large__L29wd","disabled":"Button_disabled__L29wd","fullWidth":"Button_fullWidth__L29wd"}');_r('\n.Button_root__L29wd {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tborder: 0 solid transparent;\n\tborder-radius: 9999px;\n\tcursor: pointer;\n\tfont-family: "Roboto", sans-serif;\n\tfont-size: 16px;\n\tfont-weight: 500;\n\tline-height: 1.5;\n\tletter-spacing: 0.15px;\n\ttext-align: center;\n\ttext-decoration: none;\n\twhite-space: nowrap;\n\tuser-select: none;\n\ttransition: all 200ms ease;\n\tbox-sizing: border-box;\n\tbackground: none;\n\tmargin: 0;\n\tpadding: 0;\n\n\t&:focus-visible {\n\t\toutline: 2px solid var(--reltio-color-primary);\n\t\toutline-offset: 2px;\n\t}\n\n\t&:disabled,\n\t&[aria-disabled="true"] {\n\t\topacity: 0.38;\n\t\tcursor: not-allowed;\n\t\tpointer-events: none;\n\t}\n}\n\n/* Style: Filled */\n.Button_filled__L29wd {\n\tborder: none;\n}\n\n/* Style: Outlined */\n.Button_outlined__L29wd {\n\tbackground-color: transparent;\n\tborder: 1px solid;\n}\n\n/* Style: Text */\n.Button_text__L29wd {\n\tbackground-color: transparent;\n\tborder: none;\n}\n\n/* Filled + Primary */\n.Button_filled__L29wd.Button_primary__L29wd {\n\tbackground-color: var(--reltio-color-primary);\n\tcolor: var(--reltio-color-text-forced-white);\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-primary-hover);\n\t}\n}\n\n/* Filled + Inherited */\n.Button_filled__L29wd.Button_inherited__L29wd {\n\tbackground-color: var(--reltio-color-surface-2);\n\tcolor: var(--reltio-color-text);\n}\n\n[data-theme="dark"] .Button_filled__L29wd.Button_inherited__L29wd {\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n/* Outlined + Primary */\n.Button_outlined__L29wd.Button_primary__L29wd {\n\tborder-color: var(--reltio-color-primary);\n\tcolor: var(--reltio-color-primary);\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Outlined + Inherited */\n.Button_outlined__L29wd.Button_inherited__L29wd {\n\tborder-color: currentColor;\n\tcolor: inherit;\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Text + Primary */\n.Button_text__L29wd.Button_primary__L29wd {\n\tcolor: var(--reltio-color-primary);\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Text + Inherited */\n.Button_text__L29wd.Button_inherited__L29wd {\n\tcolor: inherit;\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Size: Small */\n.Button_small__L29wd {\n\tmin-height: 32px;\n\tpadding: 8px 16px;\n\tfont-size: 0.875rem;\n}\n\n/* Size: Medium */\n.Button_medium__L29wd {\n\tmin-height: 40px;\n\tpadding: 12px 20px;\n}\n\n/* Size: Large */\n.Button_large__L29wd {\n\tmin-height: 48px;\n\tpadding: 16px 32px;\n}\n\n/* State: Disabled */\n.Button_disabled__L29wd {\n\topacity: 0.38;\n\tcursor: not-allowed;\n}\n\n/* Full Width */\n.Button_fullWidth__L29wd {\n\twidth: 100%;\n}\n');const Sr=Or,Ar=({variant:e="filled",color:t="inherited",size:n="medium",disabled:o=!1,fullWidth:a=!1,children:i,className:l,href:s,type:c="button",...u})=>{const d=(0,r.useRef)(null);(0,r.useEffect)((()=>{o&&d.current&&document.activeElement===d.current&&d.current.blur()}),[o]);const f=kr(Sr.root,Sr[e],Sr[t],Sr[n],o&&Sr.disabled,a&&Sr.fullWidth,l);return s?(0,Ln.jsx)("a",{ref:d,href:o?void 0:s,className:f,"aria-disabled":!!o||void 0,...u,children:i}):(0,Ln.jsx)("button",{ref:d,type:c,disabled:o,className:f,...u,children:i})};_r('\n.Skeleton_skeletonRoot__L29wd {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.Skeleton_row__L29wd {\n\twidth: 100%;\n\theight: 16px;\n\tbackground-color: var(--reltio-color-surface-2);\n\toverflow: hidden;\n\tposition: relative;\n}\n\n.Skeleton_row__L29wd::before {\n\tcontent: "";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbottom: 0;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n\tanimation: Skeleton_indeterminate1__L29wd 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)\n\t\tinfinite;\n}\n\n.Skeleton_row__L29wd::after {\n\tcontent: "";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbottom: 0;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n\tanimation: Skeleton_indeterminate2__L29wd 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n\tanimation-delay: 1.15s;\n}\n\n@keyframes Skeleton_indeterminate1__L29wd {\n\t0% {\n\t\tleft: -35%;\n\t\tright: 100%;\n\t}\n\t60% {\n\t\tleft: 100%;\n\t\tright: -90%;\n\t}\n\t100% {\n\t\tleft: 100%;\n\t\tright: -90%;\n\t}\n}\n\n@keyframes Skeleton_indeterminate2__L29wd {\n\t0% {\n\t\tleft: -200%;\n\t\tright: 100%;\n\t}\n\t60% {\n\t\tleft: 107%;\n\t\tright: -8%;\n\t}\n\t100% {\n\t\tleft: 107%;\n\t\tright: -8%;\n\t}\n}\n');const Mr=JSON.parse('{"root":"Icon_root__L29wd","small":"Icon_small__L29wd","medium":"Icon_medium__L29wd","large":"Icon_large__L29wd","xlarge":"Icon_xlarge__L29wd","inherited":"Icon_inherited__L29wd","primary":"Icon_primary__L29wd","secondary":"Icon_secondary__L29wd","success":"Icon_success__L29wd","warning":"Icon_warning__L29wd","error":"Icon_error__L29wd"}');_r("\n.Icon_root__L29wd {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex-shrink: 0;\n\twidth: 24px;\n\theight: 24px;\n}\n\n.Icon_small__L29wd {\n\twidth: 16px;\n\theight: 16px;\n}\n\n.Icon_medium__L29wd {\n\twidth: 24px;\n\theight: 24px;\n}\n\n.Icon_large__L29wd {\n\twidth: 32px;\n\theight: 32px;\n}\n\n.Icon_xlarge__L29wd {\n\twidth: 48px;\n\theight: 48px;\n}\n\n.Icon_inherited__L29wd {\n\tcolor: inherit;\n}\n\n.Icon_primary__L29wd {\n\tcolor: var(--reltio-color-primary);\n}\n\n.Icon_secondary__L29wd {\n\tcolor: var(--reltio-color-secondary);\n}\n\n.Icon_success__L29wd {\n\tcolor: var(--reltio-color-success);\n}\n\n.Icon_warning__L29wd {\n\tcolor: var(--reltio-color-warning);\n}\n\n.Icon_error__L29wd {\n\tcolor: var(--reltio-color-error);\n}\n");const Lr=Mr,Pr=JSON.parse('{"root":"Chat_root__L29wd","userMessage":"Chat_userMessage__L29wd","userMessageSkeletonWrapper":"Chat_userMessageSkeletonWrapper__L29wd","scrollToBottom":"Chat_scrollToBottom__L29wd","lastMessageWrapper":"Chat_lastMessageWrapper__L29wd"}');_r("\n.Chat_root__L29wd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\tbox-sizing: border-box;\n\toverflow: auto;\n\talign-items: start;\n\tpadding: 16px;\n\tgap: 16px;\n}\n\n.Chat_userMessage__L29wd {\n\tmargin-left: auto;\n\tmax-width: 80%;\n}\n\n.Chat_userMessageSkeletonWrapper__L29wd {\n\twidth: 40%;\n\tmargin-left: auto;\n}\n\n.Chat_scrollToBottom__L29wd {\n\tposition: sticky;\n\tbottom: 16px;\n\talign-self: center;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 36px;\n\theight: 36px;\n\tborder-radius: 50%;\n\tborder: none;\n\tbackground: var(--reltio-color-surface-1);\n\tbox-shadow: 0 2px 8px var(--reltio-color-shadow-2);\n\tcolor: var(--reltio-color-text-secondary);\n\tcursor: pointer;\n\ttransition: background 0.15s ease;\n\tflex-shrink: 0;\n}\n\n.Chat_scrollToBottom__L29wd:hover {\n\tbackground: var(--reltio-color-surface-2);\n}\n\n.Chat_scrollToBottom__L29wd:focus-visible {\n\toutline: 2px solid var(--reltio-color-primary-transparent-focus);\n\toutline-offset: 2px;\n}\n\n.Chat_lastMessageWrapper__L29wd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\talign-items: start;\n\tgap: 16px;\n\tmin-height: 100%;\n\twidth: 100%;\n}\n");const Rr=Pr,Tr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Ln.jsx)("svg",{className:kr(Lr.root,Lr[e],Lr[t],n),viewBox:"0 0 20 20",fill:"currentColor",...r,children:(0,Ln.jsx)("path",{d:"M8.25 14.4038V5.59625L12.6538 10L8.25 14.4038Z"})}),Nr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Ln.jsx)("svg",{className:kr(Lr.root,Lr[e],Lr[t],n),viewBox:"0 -960 960 960",fill:"currentColor",...r,children:(0,Ln.jsx)("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Ir=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Ln.jsx)("svg",{className:kr(Lr.root,Lr[e],Lr[t],n),viewBox:"0 -960 960 960",fill:"currentColor",...r,children:(0,Ln.jsx)("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})}),Dr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Ln.jsx)("svg",{className:kr(Lr.root,Lr[e],Lr[t],n),viewBox:"0 -960 960 960",fill:"currentColor",...r,children:(0,Ln.jsx)("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})}),Fr=JSON.parse('{"root":"ErrorMessage_root__L29wd","text":"ErrorMessage_text__L29wd","iconWrapper":"ErrorMessage_iconWrapper__L29wd"}');_r("\n.ErrorMessage_root__L29wd {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tgap: 8px;\n\tpadding: 12px 16px;\n\tbackground-color: var(--reltio-color-error-soft);\n\tborder: 1px solid var(--reltio-color-error);\n\tborder-radius: 8px;\n\tbox-sizing: border-box;\n}\n\n.ErrorMessage_text__L29wd {\n\tcolor: var(--reltio-color-error-font);\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tmargin: 0;\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.ErrorMessage_iconWrapper__L29wd {\n\tflex-shrink: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 20px;\n\theight: 20px;\n}\n\n.ErrorMessage_iconWrapper__L29wd svg {\n\twidth: 100%;\n\theight: 100%;\n}\n");const jr=Fr,Br=({children:e,className:t,...n})=>(0,Ln.jsxs)("div",{className:kr(jr.root,t),role:"alert","aria-live":"polite",...n,children:[(0,Ln.jsx)("span",{className:kr(jr.iconWrapper),"aria-hidden":"true",children:(0,Ln.jsx)(Nr,{size:"small",color:"error"})}),(0,Ln.jsx)("p",{className:kr(jr.text),children:e||"Something went wrong. Please try again."})]});var zr,Hr=32,Ur=9,Vr=13,Zr=10,Kr=96,qr=126,Wr=91,$r=94,Gr=62,Yr=35,Xr=37,Qr=45,Jr=61,eo=92,to=42,no=95,ro=60,oo=64,ao=93,io=33,lo=38,so=58,co=102,uo=104,fo=119,po=116,ho=112,mo=115,vo=160,go=44,yo=59,bo=63,xo=46,Eo=47,Co=39,wo=34,_o=43,ko=124,Oo=123,So=125,Ao=40,Mo=41,Lo=30,Po=31,Ro=48,To=57,No=65,Io=90,Do=97,Fo=122,jo=128,Bo=32,zo={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},Ho=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,Uo={class:"className",for:"htmlFor",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",classid:"classId",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",crossorigin:"crossOrigin",enctype:"encType",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",inputmode:"inputMode",keyparams:"keyParams",keytype:"keyType",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",novalidate:"noValidate",radiogroup:"radioGroup",readonly:"readOnly",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",viewbox:"viewBox"};function Vo(e){var t={};for(var n in e){var r=n.toLowerCase(),o=Uo[r];if(o)t[o]=e[n];else{var a=n.indexOf(":");-1!==a?t[n.slice(0,a)+n[a+1].toUpperCase()+n.slice(a+2)]=e[n]:t[n]=e[n]}}return t}var Zo=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function Ko(e){return-1===e.indexOf("&")?e:e.replace(Ho,((e,t)=>{var n=function(e){if(!zr){if(!(typeof document<"u"))return;zr=document.createElement("textarea")}var t="&"+e+";";zr.innerHTML=t;var n=zr.value;return n!==t?n:void 0}(t);if(n)return n;if("#"===t[0]){var r="x"===t[1]||"X"===t[1]?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return 0===r||r>=55296&&r<=57343||r>1114111?"�":r<=65535?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10),56320+(r-65536&1023))}return e}))}var qo=/(javascript|vbscript|data(?!:image)):/i;function Wo(e){if(qo.test(e))return null;if(-1===e.indexOf("%"))return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(qo.test(t))return null}catch{return null}return e}var $o,Go,Yo={};for($o=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],Go=0;Go<$o.length;Go++)Yo[$o[Go]]="a";for(Yo[231]=Yo[199]="c",Yo[240]=Yo[208]="d",$o=[200,201,202,203,233,232,234,235],Go=0;Go<$o.length;Go++)Yo[$o[Go]]="e";for($o=[207,239,206,238,205,237,204,236],Go=0;Go<$o.length;Go++)Yo[$o[Go]]="i";for(Yo[209]=Yo[241]="n",$o=[248,216,339,338,213,245,212,244,211,243,210,242],Go=0;Go<$o.length;Go++)Yo[$o[Go]]="o";for($o=[220,252,219,251,218,250,217,249],Go=0;Go<$o.length;Go++)Yo[$o[Go]]="u";function Xo(e){return e<jo&&!!(oa[e]&(na|ra))}function Qo(e){for(var t="",n=-1,r=0;r<e.length;r++){var o=e.charCodeAt(r);if(Xo(o))o>=No&&o<=Io?(n>=0&&(t+=e.slice(n,r),n=-1),t+=String.fromCharCode(o+Bo)):n<0&&(n=r);else if(o===Hr||o===Qr)n>=0&&(t+=e.slice(n,r),n=-1),t+="-";else{n>=0&&(t+=e.slice(n,r),n=-1);var a=Yo[o];a&&(t+=a)}}return n>=0&&(t+=e.slice(n)),t}function Jo(e,t,n){return e.startsWith(t,n)}Yo[376]=Yo[255]=Yo[221]=Yo[253]="y";var ea=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","circle","ellipse","line","path","polygon","polyline","rect","use","stop","animate","set"]);function ta(e){let t=e.toLowerCase();if(ea.has(t))return!0;let n=t.indexOf(":");return-1!==n&&(t=t.slice(n+1),ea.has(t))}var na=4,ra=8,oa=function(){let e,t=new Uint8Array(128);for(t[Ur]=33,t[Zr]=17,t[12]=1,t[Vr]=17,t[Hr]=33,e=io;e<=Eo;e++)t[e]=2;for(e=so;e<=oo;e++)t[e]=2;for(e=Wr;e<=Kr;e++)t[e]=2;for(e=Oo;e<=qr;e++)t[e]=2;for(e=Ro;e<=To;e++)t[e]=ra;for(e=No;e<=Io;e++)t[e]=64|na;for(e=Do;e<=Fo;e++)t[e]=na;return t}(),aa=(function(){let e=new Uint8Array(128);e[eo]=2,e[Wr]=4,e[to]=e[no]=e[qr]=e[Jr]=3,e[Kr]=e[ro]=e[oo]=e[ao]=e[Zr]=e[Hr]=e[io]=1,e[co]=e[uo]=e[fo]=1}(),[]);function ia(e,t,n){for(var r=e,o=t.split("."),a=0;a<o.length&&(r=r?.[o[a]],void 0!==r);)a++;return r||n}function la(...e){return e.filter(Boolean).join(" ")}var sa=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),ca=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function ua(e){return sa.has(e.toLowerCase())}function da(e){return ca.lastIndex=0,e.replace(ca,(function(e,t,n,r){return"<"+t+n+r}))}var fa=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,pa=/^<[A-Z]/,ha=["script","pre","style","textarea"],ma=new Set(ha),va=/<(?:pre|script|style|textarea)\b/i,ga=new Set(["table","thead","tbody","tfoot","tr","td","th"]),ya=new Uint8Array(128);!function(){for(var e=[Kr,to,no,qr,Jr,Wr,io,ro,eo,Po,uo,fo,co],t=0;t<e.length;t++)ya[e[t]]=1}();var ba=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function xa(e,t,n){for(var r=t,o=n;r<o&&(e.charCodeAt(r)===Hr||e.charCodeAt(r)===Ur);)r++;if(r>=o)return!1;e.charCodeAt(r)===ko&&r++;for(var a=0;r<o;){for(;r<o&&(e.charCodeAt(r)===Hr||e.charCodeAt(r)===Ur);)r++;if(r>=o)break;if(e.charCodeAt(r)===ko&&a>0){for(var i=r+1;i<o&&(e.charCodeAt(i)===Hr||e.charCodeAt(i)===Ur);)i++;if(i>=o)return!0}if(e.charCodeAt(r)===so&&r++,r>=o||e.charCodeAt(r)!==Qr)return!1;for(;r<o&&e.charCodeAt(r)===Qr;)r++;for(r<o&&e.charCodeAt(r)===so&&r++,a++;r<o&&(e.charCodeAt(r)===Hr||e.charCodeAt(r)===Ur);)r++;if(r<o){if(e.charCodeAt(r)!==ko)return!1;r++}}return a>0}function Ea(e,t){if(e.charCodeAt(t)!==ro)return null;let n=t+1,r=e.length,o=!1;e.charCodeAt(n)===Eo&&(n++,o=!0);let a=n,i=e.charCodeAt(n);if(!(i>=Do&&i<=Fo||i>=No&&i<=Io))return null;for(;n<r&&(e.charCodeAt(n)>=Do&&e.charCodeAt(n)<=Fo||e.charCodeAt(n)>=No&&e.charCodeAt(n)<=Io||e.charCodeAt(n)>=Ro&&e.charCodeAt(n)<=To||e.charCodeAt(n)===Qr);)n++;let l=e.slice(a,n);if(!l)return null;let s=n;for(;n<r&&(e.charCodeAt(n)===Hr||e.charCodeAt(n)===Ur||e.charCodeAt(n)===Zr);)n++;let c=e.slice(s,n);if(n===s&&n<r){var u=e.charCodeAt(n);if(u!==Gr&&u!==Eo)return null}let d=n,f={},p=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===Gr)return{tag:l,attrs:f,selfClosing:!1,end:n+1,rawAttrs:e.slice(d,n),whitespaceBeforeAttrs:c,isClosing:o,hasSpaceBeforeSlash:p};if(t!==Hr&&t!==Ur&&t!==Zr){if(t===Eo&&n+1<r&&e.charCodeAt(n+1)===Gr){let t=e.slice(d,n);return p=n>d&&e.charCodeAt(n-1)===Hr,{tag:l,attrs:f,selfClosing:!0,end:n+2,rawAttrs:t,whitespaceBeforeAttrs:c,isClosing:o,hasSpaceBeforeSlash:p}}var h=n,m=e.charCodeAt(n);if(!(m>=Do&&m<=Fo||m>=No&&m<=Io||m===no||m===so))return null;for(n++;n<r&&((E=e.charCodeAt(n))>=Do&&E<=Fo||E>=No&&E<=Io||E>=Ro&&E<=To||E===no||E===xo||E===so||E===Qr);)n++;for(var v=e.slice(h,n);n<r&&(e.charCodeAt(n)===Hr||e.charCodeAt(n)===Ur);)n++;if(e.charCodeAt(n)===Jr){for(n++;n<r&&(e.charCodeAt(n)===Hr||e.charCodeAt(n)===Ur);)n++;var g=e.charCodeAt(n);if(g===wo||g===Co){n++;for(var y=n;n<r&&e.charCodeAt(n)!==g;)n++;if(n>=r)return null;if(f[v]=e.slice(y,n),n++,n<r){var b=e.charCodeAt(n);if(b!==Hr&&b!==Ur&&b!==Zr&&b!==Gr&&b!==Eo)return null}}else if(g===Oo){var x=1;for(y=n,n++;n<r&&x>0;){var E;(E=e.charCodeAt(n))===Oo?x++:E===So&&x--,n++}f[v]=e.slice(y,n)}else{for(y=n;n<r;){var C=e.charCodeAt(n);if(C===Hr||C===Ur||C===Gr||C===Zr||C===wo||C===Co||C===Jr||C===ro||C===Kr)break;n++}if(n===y)return null;f[v]=e.slice(y,n)}}else f[v]=""}else n++}return null}function Ca(e,t,n){for(var r=0,o=e.length,a=!1;r<o;){for(var i=e.indexOf("\n",r),l=i<0?o:i,s=r,c=0;s<l&&c<4;)if(e.charCodeAt(s)===Hr)c++,s++;else{if(e.charCodeAt(s)!==Ur)break;c+=4,s++}if(s>=l)a=!1,r=i<0?o:i+1;else{if(c<4){var u=e.charCodeAt(s);if(u===Kr||u===qr){for(var d=u,f=0,p=s;p<l&&e.charCodeAt(p)===d;)f++,p++;if(f>=3){a=!1;for(var h=i<0?o:i+1;h<o;){for(var m=h,v=0;m<o&&v<4;){var g=e.charCodeAt(m);if(g===Hr)v++,m++;else{if(g!==Ur)break;v+=4,m++}}if(v<4&&m<o&&e.charCodeAt(m)===d){for(var y=0;m<o&&e.charCodeAt(m)===d;)y++,m++;if(y>=f){for(;m<o&&(e.charCodeAt(m)===Hr||e.charCodeAt(m)===Ur);)m++;if(m>=o||e.charCodeAt(m)===Zr){r=m>=o?o:m+1;break}}}for(;h<o&&e.charCodeAt(h)!==Zr;)h++;h<o&&h++}h>=o&&(r=o);continue}}}for(var b=s;b<l&&e.charCodeAt(b)===Gr;){++b<l&&e.charCodeAt(b)===Hr&&b++;for(var x=0;b<l&&x<4;)if(e.charCodeAt(b)===Hr)x++,b++;else{if(e.charCodeAt(b)!==Ur)break;x+=4,b++}if(x>=4)break;a=!1}if(!a&&c<4&&b<l&&e.charCodeAt(b)===Wr&&!(b+1<o&&e.charCodeAt(b+1)===$r)){var E=wa(e,b,t);if(E){r=E,a=!1;continue}}var C=e.charCodeAt(s);if(C===Yr&&c<4)a=!1;else if(c<4&&(C===Qr||C===to||C===no)){for(var w=s,_=0;w<l;){var k=e.charCodeAt(w);if(k===C)_++;else if(k!==Hr&&k!==Ur)break;w++}a=!(_>=3&&w>=l)}else a=!0;r=i<0?o:i+1}}}function wa(e,t,n){let r=e.length;if(e.charCodeAt(t)!==Wr)return null;let o=t+1<r&&e.charCodeAt(t+1)===$r,a=t+1;for(;a<r;){if((v=e.charCodeAt(a))===ao){a++;break}if(v===Wr)return null;v===eo&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==ao)return null;let i=e.slice(t+1,a-1);if(i.length>999)return null;let l=Aa(i);if(!l||a>=r||e.charCodeAt(a)!==so)return null;a++;let s=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===Hr||t===Ur)a++;else{if(t!==Zr||s)break;s=!0,a++}}if(o){let t=e.indexOf("\n",a),o=t<0?r:t,i=e.slice(a,o).trim();return n[l]={target:i,title:void 0},t<0?r:t+1}var c;if(a<r&&e.charCodeAt(a)===ro){a++;for(var u=a;a<r&&e.charCodeAt(a)!==Gr&&e.charCodeAt(a)!==Zr;)e.charCodeAt(a)===eo&&a+1<r&&a++,a++;if(a>=r||e.charCodeAt(a)!==Gr)return null;c=e.slice(u,a),a++;for(var d=e.indexOf("\n",a),f=d<0?r:d,p=a;p<f&&(e.charCodeAt(p)===Hr||e.charCodeAt(p)===Ur);)p++;if(p<f){if(p===a)return null;var h=e.charCodeAt(p);if(h!==wo&&h!==Co&&h!==Ao)return null}}else{u=a;for(var m=0;a<r;){var v;if((v=e.charCodeAt(a))===Ao)m++;else if(v===Mo){if(0===m)break;m--}else{if(v===Hr||v===Ur||v===Zr)break;v===eo&&a+1<r&&a++}a++}if(!(c=e.slice(u,a)))return null}for(;a<r&&(e.charCodeAt(a)===Hr||e.charCodeAt(a)===Ur);)a++;var g,y=e.indexOf("\n",a),b=y<0?r:y,x=!1,E=a,C=a;if(a===b&&a<r)for(C=a+1;C<r&&(e.charCodeAt(C)===Hr||e.charCodeAt(C)===Ur);)C++;if(C<r){var w=e.charCodeAt(C);if(w===wo||w===Co||w===Ao){for(var _=w===Ao?41:w,k=C+1,O=k;k<r;){var S=e.charCodeAt(k);if(S===_){for(var A=k+1;A<r&&(e.charCodeAt(A)===Hr||e.charCodeAt(A)===Ur);)A++;(A>=r||e.charCodeAt(A)===Zr)&&(g=e.slice(O,k),x=!0,E=A<r?A+1:r);break}if(S===eo&&k+1<r)k+=2;else{if(S===Zr&&k+1<r&&e.charCodeAt(k+1)===Zr)break;k++}}if(!x&&C===a)return null}}if(x)return n[l]||(n[l]={target:La(c),title:void 0!==g?Ko(La(g)):g}),E;for(;a<b&&(e.charCodeAt(a)===Hr||e.charCodeAt(a)===Ur);)a++;return a<b?null:(n[l]||(n[l]={target:La(c),title:g}),y<0?r:y+1)}var _a=1,ka=4,Oa=new Uint8Array(128);Oa[Hr]=_a,Oa[Ur]=_a,Oa[Zr]=2|_a,Oa[Vr]=2|_a,Oa[Yr]=32|ka,Oa[Gr]=32|ka,Oa[Qr]=96|ka,Oa[_o]=32|ka,Oa[to]=96|ka,Oa[no]=96|ka,Oa[Kr]=96|ka,Oa[qr]=96|ka,Oa[ro]=96|ka,Oa[Wr]=64|ka,Oa[io]=64|ka,Oa[ko]=32|ka;for(let e=Ro;e<=To;e++)Oa[e]=48;for(let e=No;e<=Io;e++)Oa[e]=8;for(let e=Do;e<=Fo;e++)Oa[e]=8;function Sa(e){if(e.indexOf("[")<0&&e.indexOf("]")<0)return!1;for(var t=0;t<e.length;t++)if(e.charCodeAt(t)!==eo){if(e.charCodeAt(t)===Wr||e.charCodeAt(t)===ao)return!0}else t++;return!1}function Aa(e){var t=e.replace(/\s+/g," ").trim();return-1!==t.indexOf("ẞ")?t.replace(/\u1E9E/g,"ss").toLowerCase():t.toLowerCase()}function Ma(e){return e<jo?Oa[e]:e===vo?_a:0}function La(e){return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1")}function Pa(e,t){var n=e.indexOf("\n",t);return n<0?e.length:n}function Ra(e,t){let n=Pa(e,t);return n<e.length?n+1:n}function Ta(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==Hr&&n!==Ur)break;t++}return t}function Na(e,t){let n=Ra(e,t);for(;n<e.length;){if(Ba(e,n,Pa(e,n)))return n;n=Ra(e,n)}return e.length}function Ia(e,t,n,r){let o=0;for(;t+o<n&&e.charCodeAt(t+o)===r;)o++;return o}Oa[eo]=ka,Oa[ao]=ka,Oa[Ao]=ka,Oa[Mo]=ka,Oa[so]=ka,Oa[wo]=ka,Oa[Co]=ka,Oa[lo]=ka,Oa[Jr]=ka,Oa[36]=ka,Oa[Xr]=ka,Oa[go]=ka,Oa[xo]=ka,Oa[Eo]=ka,Oa[yo]=ka,Oa[bo]=ka,Oa[oo]=ka,Oa[$r]=ka,Oa[Oo]=ka,Oa[So]=ka;var Da=0,Fa=0;function ja(e,t,n){for(Da=0,Fa=0;t+Fa<n;){let n=e.charCodeAt(t+Fa);if(n===Ur)Da+=4-Da%4;else{if(n!==Hr)break;Da++}Fa++}}function Ba(e,t,n){return Ta(e,t,n)>=n}function za(e,t,n,r){let o=Pa(e,t);if(ja(e,t,o),Da>3)return null;let a=t+Fa;if(e.charCodeAt(a)!==Yr)return null;let i=Ia(e,a,o,35);if(i<1||i>6||(a+=i,a<o&&e.charCodeAt(a)!==Hr&&e.charCodeAt(a)!==Ur))return null;a=Ta(e,a,o);for(var l=o;l>a&&e.charCodeAt(l-1)===Hr;)l--;for(var s=l;l>a&&e.charCodeAt(l-1)===Yr;)l--;if(l<s)if(l===a||e.charCodeAt(l-1)===Hr)for(;l>a&&e.charCodeAt(l-1)===Hr;)l--;else l=s;let c=e.slice(a,l),u=Oi(c,0,c.length,n,r),d=(r?.slugify||Qo)(c);return{node:{type:zo.heading,level:i,children:u,id:d},end:Ra(e,o)}}function Ha(e,t){let n=Pa(e,t);if(ja(e,t,n),Da>3)return null;let r=t+Fa,o=e.charCodeAt(r);if(o!==Qr&&o!==to&&o!==no)return null;let a=0;for(;r<n;){let t=e.charCodeAt(r);if(t===o)a++;else if(t!==Hr&&t!==Ur)return null;r++}return a<3?null:{node:{type:zo.breakThematic},end:Ra(e,n)}}function Ua(e,t,n){let r=Pa(e,t);if(ja(e,t,r),Da>3)return null;let o=Da,a=t+Fa,i=e.charCodeAt(a);if(i!==Kr&&i!==qr)return null;let l=Ia(e,a,r,i);if(l<3)return null;a+=l;let s=Ta(e,a,r),c=r;if(i===Kr)for(let t=s;t<r;t++)if(e.charCodeAt(t)===Kr)return null;for(;c>s&&(e.charCodeAt(c-1)===Hr||e.charCodeAt(c-1)===Ur);)c--;let u=e.slice(s,c),d="",f="",p=u.indexOf(" ");-1===p?d=u:(d=u.slice(0,p),f=u.slice(p+1).trim()),d=La(d);var h=void 0;if(f){ba.lastIndex=0;for(var m;null!==(m=ba.exec(f));)h||(h={}),h[m[1]]=void 0!==m[2]?m[2]:m[3]}let v=Ra(e,r),g=v,y=e.length;for(;g<e.length;){let t=Pa(e,g);if(ja(e,g,t),Da<4){let n=g+Fa;var b=Ia(e,n,t,i);if(b>=l&&Ba(e,n+b,t)){y=Ra(e,t);break}}g=Ra(e,t)}var x;if(0===o)x=g>v&&e.charCodeAt(g-1)===Zr?e.slice(v,g-1):e.slice(v,g);else{x="";for(var E=v;E<g;){var C=Pa(e,E);ja(e,E,C);var w=Math.min(Fa,o);x+=e.slice(E+w,C)+"\n",E=Ra(e,C)}x.length>0&&x.charCodeAt(x.length-1)===Zr&&(x=x.slice(0,-1))}return{node:{type:zo.codeBlock,lang:d||void 0,text:x,infoString:f||void 0,attrs:h},end:y}}function Va(e,t){if(ja(e,t,Pa(e,t)),Da<4)return null;let n="",r=t;for(;r<e.length;){let t=Pa(e,r);if(ja(e,r,t),Ba(e,r,t)){for(var o=0,a=Ra(e,t);a<e.length;){var i=Pa(e,a);if(!Ba(e,a,i)){if(ja(e,a,i),Da>=4){for(var l=0;l<=o;l++)n+="\n";r=a;break}break}o++,a=Ra(e,i)}if(r!==a)break;continue}if(Da<4)break;let f=0,p=0;var s=0;for(let n=r;n<t&&p<4;n++){if(e.charCodeAt(n)===Ur){var c=4-p%4;p+c>4&&(s=p+c-4),p+=c}else p++;f++}var u="";if(s>0)for(var d=0;d<s;d++)u+=" ";n+=(u+=e.slice(r+f,t))+"\n",r=Ra(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===Zr;)n=n.slice(0,-1);for(;n.length>0&&n.charCodeAt(n.length-1)===Zr;)n=n.slice(0,-1);return n?{node:{type:zo.codeBlock,text:n},end:r}:null}function Za(e,t,n,r){if(ja(e,t,Pa(e,t)),Da>3)return null;let o=t+Fa;if(e.charCodeAt(o)!==Gr)return null;let a,i="",l=t,s=!1,c=!1,u=!1;for(;l<e.length;){let t=Pa(e,l);ja(e,l,t);let n=l+Fa;if(e.charCodeAt(n)===Gr){let r=n+1;var d=Da+1,f=!1;if(r<t){var p=e.charCodeAt(r);p===Hr?(r++,d++,f=!0):p===Ur&&(f=!0)}for(var h="",m=!1,v=r;v<t;v++)if(e.charCodeAt(v)===Ur){m=!0;break}if(m){var g=d;if(f&&r<t&&e.charCodeAt(r)===Ur){for(var y=4-g%4,b=0;b<y-1;b++)h+=" ";g+=y,r++}for(var x=r;x<t;x++)if(e.charCodeAt(x)===Ur){for(var E=4-g%4,C=0;C<E;C++)h+=" ";g+=E}else h+=e[x],g++}else h=e.slice(r,t);if(!i&&!a){let n=h.match(/^\[!([A-Za-z]+)\]\s*$/);if(n){a=n[1].toUpperCase(),l=Ra(e,t);continue}}i+=h+"\n";var w=h.trimStart();w.startsWith("```")||w.startsWith("~~~")?u=!u:h.startsWith(" ")||h.startsWith("\t")?u=!0:w.length>0&&!u&&(u=!1),c=w.length>0,l=Ra(e,t)}else{if(!i||Ba(e,l,t)||!c)break;if(Da<4){var _=l+Fa,k=_<t?e.charCodeAt(_):0;if(k===Yr||k===Gr||k===Kr||k===qr||k===ro||(k===Qr||k===to||k===no)&&Ha(e,l)||(k===Qr||k===to||k===_o)&&_+1<t&&(e.charCodeAt(_+1)===Hr||e.charCodeAt(_+1)===Ur))break;if(k>=Ro&&k<=To){for(var O=_;O<t&&e.charCodeAt(O)>=Ro&&e.charCodeAt(O)<=To;)O++;if(O<t&&(e.charCodeAt(O)===xo||e.charCodeAt(O)===Mo))break}}if(u)break;i+=e.slice(l,t)+"\n",s=!0,l=Ra(e,t)}}if(!i&&!a)return null;var{inBlockQuote:S,f:A}=n;n.inBlockQuote=!0,s&&(n.f=!0);let M=Ai(i||"",n,r);n.inBlockQuote=S,n.f=A;let L={type:zo.blockQuote,children:M};return a&&(L.alert=a),{node:L,end:l}}function Ka(e,t,n){for(var r=0,o=t;o<n;o++)e.charCodeAt(o)===Ur?r+=4-r%4:r++;return r}function qa(e,t,n){if(ja(e,t,n),Da>3)return null;var r=t+Fa;if(r>=n)return null;var o=e.charCodeAt(r),a=Da,i=r;if(o===Qr||o===to||o===_o){if((i=r+1)<n&&e.charCodeAt(i)!==Hr&&e.charCodeAt(i)!==Ur&&e.charCodeAt(i)!==Zr)return null}else{if(!(o>=Ro&&o<=To))return null;for(var l=r;l<n&&l-r<9;){var s=e.charCodeAt(l);if(s<Ro||s>To)break;l++}if(!(l>r&&l<n))return null;var c=e.charCodeAt(l);if(c!==xo&&c!==Mo)return null;if((i=l+1)<n&&e.charCodeAt(i)!==Hr&&e.charCodeAt(i)!==Ur&&e.charCodeAt(i)!==Zr)return null}var u=i,d=Ka(e,t,i),f=0,p=u,h=d;if(u>=n)return{ordered:o>=Ro&&o<=To,marker:o>=Ro&&o<=To?e[l]:e[r],start:o>=Ro&&o<=To?parseInt(e.slice(r,l),10):void 0,contentStart:u,contentCol:d+1,markerCol:a,isEmpty:!0};for(;p<n&&(e.charCodeAt(p)===Hr||e.charCodeAt(p)===Ur);)e.charCodeAt(p)===Ur?h+=4-h%4:h++,p++,f++;var m=p>=n;return m||h-d>4?(h=d+1,p=u+1,f=1):0===f&&(h=d+1,p=u,f=1),{ordered:o>=Ro&&o<=To,marker:o>=Ro&&o<=To?e[l]:e[r],start:o>=Ro&&o<=To?parseInt(e.slice(r,l),10):void 0,contentStart:p,contentCol:h,markerCol:a,isEmpty:m}}var Wa=0;function $a(e,t,n,r){var o=0,a=t;for(Wa=0;a<n&&o<r;){var i=e.charCodeAt(a);if(i===Ur){var l=4-o%4;if(o+l>r){Wa=o+l-r,a++,o=r;break}o+=l}else{if(i!==Hr)break;o++}a++}return a}function Ga(e,t,n,r){var o=Pa(e,t),a=qa(e,t,o);if(!a)return null;var i=[],l=t,s=a.contentCol,c="",u=a.isEmpty,d=!1,f=!1;if(!a.isEmpty){for(var p=!1,h=a.contentStart;h<o;h++)if(e.charCodeAt(h)===Ur){p=!0;break}if(p){var m="",v=Ka(e,t,a.contentStart),g=v-a.contentCol;if(g>0)for(var y=0;y<g;y++)m+=" ";for(var b=a.contentStart;b<o;b++)if(e.charCodeAt(b)===Ur){for(var x=4-v%4,E=0;E<x;E++)m+=" ";v+=x}else m+=e[b],v++;c=m+"\n"}else c=e.slice(a.contentStart,o)+"\n"}for(l=Ra(e,o);l<e.length;){var C=Pa(e,l);ja(e,l,C);var w=e.charCodeAt(l+Fa);if(Da<s&&(w===Qr||w===to||w===no)&&Da<=3&&Ha(e,l))break;var _=qa(e,l,C);if(_&&_.ordered===a.ordered&&_.marker===a.marker&&_.markerCol<s)i.push({contentCol:s,raw:c,hasBlankAfter:d,isEmpty:u}),d&&(f=!0),s=_.contentCol,u=_.isEmpty,d=!1,c=_.isEmpty?"":e.slice(_.contentStart,C)+"\n",l=Ra(e,C);else if(Ba(e,l,C)){c+="\n",l=Ra(e,C);for(var k=!1,O=0;O<c.length;O++){var S=c.charCodeAt(O);if(S!==Zr&&S!==Vr&&S!==Hr&&S!==Ur){k=!0;break}}if(u&&!k){if(!(l<e.length))break;var A=qa(e,l,Pa(e,l));if(!A||A.ordered!==a.ordered||A.marker!==a.marker)break;d=!0}if(l<e.length){var M=Pa(e,l);ja(e,l,M);var L=e.charCodeAt(l+Fa);if((L===Qr||L===to||L===no)&&Da<=3&&Ha(e,l))break;var P=qa(e,l,M);if(P&&P.ordered===a.ordered&&P.marker===a.marker&&P.markerCol<s){d=!0;continue}if(!Ba(e,l,M)&&Da<s)break}}else{if(!(Da>=s)){for(var R=!1,T=0;T<c.length;T++){var N=c.charCodeAt(T);if(N!==Zr&&N!==Vr&&N!==Hr&&N!==Ur){R=!0;break}}if(!d&&R&&!u){var I=l+Fa,D=e.charCodeAt(I);if(D!==Yr&&D!==Gr&&D!==ro&&D!==Kr&&D!==qr&&(D!==Qr&&D!==to&&D!==no&&D!==_o||null===Ha(e,l)&&null===qa(e,l,C))&&!(D>=Ro&&D<=To&&null!==qa(e,l,C))){c+=""+e.slice(I,C)+"\n",l=Ra(e,C);continue}}break}var F=$a(e,l,C,s);if(Wa>0){for(var j="",B=s,z=0;z<Wa;z++)j+=" ",B++;for(var H=F;H<C;H++)if(e.charCodeAt(H)===Ur){for(var U=4-B%4,V=0;V<U;V++)j+=" ";B+=U}else j+=e[H],B++;c+=j+"\n"}else c+=e.slice(F,C)+"\n";l=Ra(e,C)}}if(i.push({contentCol:s,raw:c,hasBlankAfter:d,isEmpty:u}),0===i.length)return null;var Z=f;if(!Z)for(var K=0;K<i.length;K++){if(i[K].hasBlankAfter&&K<i.length-1){Z=!0;break}if(!i[K].isEmpty){for(var q=i[K].raw,W=q.length,$=0,G=!1,Y=!1,X=!1,Q=!1,J=0,ee=0,te=-1;$<W;){var ne=q.indexOf("\n",$);if(ne<0&&(ne=W),Q){ja(q,$,ne);for(var re=q.slice($+Fa,ne),oe=0;oe<re.length&&re.charCodeAt(oe)===J;)oe++;oe>=ee&&""===re.slice(oe).trim()&&(Q=!1),$=ne<W?ne+1:W}else if(Ba(q,$,ne))te>=0?X=!0:G&&(Y=!0),$=ne<W?ne+1:W;else{if(ja(q,$,ne),te>=0){if(Da>=te){$=ne<W?ne+1:W;continue}var ae=qa(q,$,ne);if(ae&&ae.markerCol<te&&ae.contentCol<=te){$=ne<W?ne+1:W;continue}if(ae){$=ne<W?ne+1:W;continue}te=-1,X&&(Y=!0,X=!1)}var ie=q.slice($+Fa,ne),le=ie.charCodeAt(0);if((le===Kr||le===qr)&&Da<=3){for(var se=0;se<ie.length&&ie.charCodeAt(se)===le;)se++;if(se>=3){if(Y&&G){Z=!0;break}Q=!0,J=le,ee=se,G=!0,$=ne<W?ne+1:W;continue}}var ce=Da<=3?qa(q,$,ne):null;if(ce&&G){if(Y){Z=!0;break}te=ce.contentCol,X=!1,$=ne<W?ne+1:W,G=!0}else{if(Y){Z=!0;break}G=!0,$=ne<W?ne+1:W}}}if(Z)break}}for(var ue=[],de=0;de<i.length;de++){for(var fe=i[de],pe=fe.raw,he=pe.length;he>0&&pe.charCodeAt(he-1)===Zr;)he--;var me,ve=he<pe.length?pe.slice(0,he):pe,ge=null;if(ve.length>=3&&ve.charCodeAt(0)===Wr){var ye=ve[1];(" "===ye||"x"===ye||"X"===ye)&&ve.charCodeAt(2)===ao&&(ge={type:zo.gfmTask,completed:"x"===ye||"X"===ye},ve=ve.slice(3))}if(fe.isEmpty&&""===ve.trim())me=[];else if(Z){var be=n.inList;n.inList=!0,me=Ai(ve,n,r),n.inList=be}else{var xe=n.inList;if(n.inList=!0,me=Ai(ve,n,r),n.inList=xe,1===me.length&&me[0].type===zo.paragraph)me=me[0].children;else{for(var Ee=[],Ce=0;Ce<me.length;Ce++)if(me[Ce].type===zo.paragraph)for(var we=me[Ce].children,_e=0;_e<we.length;_e++)Ee.push(we[_e]);else Ee.push(me[Ce]);me=Ee}}ge?ue.push([ge,{type:zo.text,text:" "},...me]):ue.push(me)}return{node:{type:a.ordered?zo.orderedList:zo.unorderedList,start:a.ordered?a.start:void 0,items:ue},end:l}}var Ya=new Set(["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]);function Xa(e,t,n){let r={};for(let[i,l]of Object.entries(e)){let e=i,s=i.toLowerCase();if("style"===s&&"string"==typeof l){let t={},n=[],o=0,a=0;for(let e=0;e<l.length;e++){let t=l.charCodeAt(e);t===Ao?o++:t===Mo?o--:t===yo&&0===o&&(n.push(l.slice(a,e)),a=e+1)}a<l.length&&n.push(l.slice(a));let i=!1;n.forEach((e=>{let n=e.indexOf(":");if(-1===n)return;let r=e.slice(0,n).trim(),o=e.slice(n+1).trim();if(r&&o){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(o))return void(i=!0);let e=-1!==r.indexOf("-")?r.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())):r;t[e]=o}})),!i&&Object.keys(t).length>0&&(r[e]=t)}else if("href"!==s&&"src"!==s||!n?.sanitizer)if(""===l)r[e]=!0;else if(l.length>=2&&l.charCodeAt(0)===Oo&&l.charCodeAt(l.length-1)===So){var o=l.slice(1,-1);if(o.length>0){var a=o.charCodeAt(0);if(a===Wr||a===Oo)try{r[e]=JSON.parse(o);continue}catch{}}if("true"===o){r[e]=!0;continue}if("false"===o){r[e]=!1;continue}if(n?.evalUnserializableExpressions)try{r[e]=(0,eval)("("+o+")");continue}catch{}r[e]=o}else r[e]=l;else{let o=n.sanitizer(l,t,s);null!==o&&(r[e]=o)}}return r}function Qa(e,t,n){let r=t.length;var o=t.charCodeAt(0);o>=No&&o<=Io&&(o+=Bo);for(let i=n;i<=e.length-r;i++){var a=e.charCodeAt(i);if(a>=No&&a<=Io&&(a+=Bo),a!==o)continue;let n=!0;for(let o=1;o<r;o++){let r=e.charCodeAt(i+o),a=t.charCodeAt(o);if(r>=No&&r<=Io&&(r+=Bo),a>=No&&a<=Io&&(a+=Bo),r!==a){n=!1;break}}if(n)return i}return-1}var Ja=-1;function ei(e,t,n){let r=n.toLowerCase(),o="<"+r,a="</"+r,i=1,l=t,s=e.length;for(Ja=-1;l<s&&i>0;){let t=Qa(e,o,l),n=Qa(e,a,l);if(-1===n)return-1;if(-1!==t&&t<n){let n=Ea(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!ta(n.tag)&&i++,l=n.end):l=t+1}else{var c=n+a.length,u=c<s?e.charCodeAt(c):62;if((u===Gr||u===Hr||u===Ur||u===Zr)&&(i--,0===i)){Ja=n;let t=n+a.length;for(;t<s&&e.charCodeAt(t)!==Gr;)t++;return t+1}l=n+1}}return-1}function ti(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var o=Pa(e,t);if(ja(e,t,o),Da>3&&!n.inHTML)return null;var a=t+Fa;if(e.charCodeAt(a)!==ro)return null;var i=e.indexOf(">",a+1);if(-1!==i&&i<o){var l=e.slice(a+1,i);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(l)||/^[^\s@]+@[^\s@]+$/.test(l))return null}var s=function(e,t){if(e.charCodeAt(t)!==ro)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===io&&e.charCodeAt(n+1)===Qr&&e.charCodeAt(n+2)===Qr)return 2;if(e.charCodeAt(n)===bo)return 3;if(e.charCodeAt(n)===io){var o=e.charCodeAt(n+1);if(o>=No&&o<=Io)return 4;if("[CDATA["===e.slice(n+1,n+8))return 5}for(var a=e.charCodeAt(n)===Eo,i=a?n+1:n,l=i;l<r;){var s=e.charCodeAt(l);if(!(s>=No&&s<=Io||s>=Do&&s<=Fo||s>=Ro&&s<=To||s===Qr))break;l++}if(l===i)return 0;var c=e.slice(i,l);if(ma.has(c.toLowerCase())){if(a)return 0;var u=e.charCodeAt(l);return u===Hr||u===Ur||u===Gr||u===Zr||l>=r?1:0}if(Ya.has(c.toLowerCase())){if(a){for(var d=l;d<r&&(e.charCodeAt(d)===Hr||e.charCodeAt(d)===Ur);)d++;return d<r&&e.charCodeAt(d)===Gr?6:0}var f=l<r?e.charCodeAt(l):-1;return f===Hr||f===Ur||f===Gr||f===Zr||f===Eo||-1===f?6:0}if(a){for(var p=l;p<r&&(e.charCodeAt(p)===Hr||e.charCodeAt(p)===Ur);)p++;if(p<r&&e.charCodeAt(p)===Gr){var h=Pa(e,t);if(""===e.slice(p+1,h).trim())return 7}}else{var m=Pa(e,t),v=Ea(e,t);if(v&&v.end<=m&&""===e.slice(v.end,m).trim())return 7}return 0}(e,a);if(s>=1&&s<=5){var c=e.length;if(1===s){for(var u=e.length,d=0;d<ha.length;d++){var f=Qa(e,"</"+ha[d]+">",a);f>=0&&f<u&&(u=f)}if(u<e.length){var p=e.indexOf(">",u);c=p>=0?Ra(e,p+1):e.length}}else{var h=2===s?"--\x3e":3===s?"?>":4===s?">":"]]>",m=e.indexOf(h,a);m>=0&&(c=Ra(e,m+h.length))}var v=e.slice(a,c);if(s>=2)return{node:{type:zo.htmlComment,text:v,raw:!0,endPos:c},end:c};var g="div",y=v.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);y&&(g=y[1]);var b,x=Ea(e,a),E={};x&&!x.isClosing&&(E=Xa(x.attrs,g,r),b=x.whitespaceBeforeAttrs+x.rawAttrs);var C=Qa(v,"</"+g.toLowerCase(),0),w=v,_="";if(x&&x.isClosing)for(w=v.slice(x.end-a);w.length>0&&w.charCodeAt(w.length-1)===Zr;)w=w.slice(0,-1);else if(x&&!x.isClosing){var k=x.end-a;if(-1!==C)for((w=v.slice(k)).charCodeAt(0)===Zr&&(w=w.slice(1));w.length>0&&w.charCodeAt(w.length-1)===Zr;)w=w.slice(0,-1);else for(w=v;w.length>0&&w.charCodeAt(w.length-1)===Zr;)w=w.slice(0,-1);-1!==C&&(_=v.slice(k,C).trim())}var O=!!x&&x.isClosing;return{node:{type:zo.htmlBlock,tag:g,attrs:E,e:b,children:[],a:w,text:_,c:!0,b:O,endPos:c,canInterruptParagraph:!0},end:c}}if(6===s||7===s){var S=Na(e,t),A=S<e.length?S:e.length,M=e.slice(a,A),L=S<e.length?Ra(e,S):e.length,P=Ea(e,a);if(P){var R=P.tag,T=R.toLowerCase();if(P.isClosing){var N=e.slice(P.end,A);return{node:{type:zo.htmlBlock,tag:R,attrs:{},children:[],a:N,text:N,c:!0,b:!0,endPos:A,canInterruptParagraph:6===s},end:L}}if(P.selfClosing||ta(R))return{node:{type:zo.htmlBlock,tag:R,attrs:Xa(P.attrs,R,r),e:P.whitespaceBeforeAttrs+P.rawAttrs,children:[],a:"",text:"",c:!1,b:!1,endPos:P.end,canInterruptParagraph:6===s},end:Ra(e,P.end)};var I=n.d||0,D=e.slice(a,A),F=-1,j=-1;if(I<10){for(var B="</"+T,z=1,H=P.end-a;H<D.length&&z>0;){var U=Qa(D,"<"+T,H),V=Qa(D,B,H);if(-1===V)break;if(-1!==U&&U<V){var Z=U+T.length+1;if(Z<D.length){var K=D.charCodeAt(Z);(K===Hr||K===Ur||K===Zr||K===Gr||K===Eo)&&z++}H=U+1}else{var q=V+B.length;if(q<D.length){var W=D.charCodeAt(q);if((W===Gr||W===Hr||W===Ur||W===Zr)&&0==--z){F=V;for(var $=q;$<D.length&&D.charCodeAt($)!==Gr;)$++;j=$+1;break}}else if(0==--z){F=V,j=D.length;break}H=V+1}}var G=!1;if(-1===F&&6===s&&!P.isClosing&&!ga.has(T)){var Y=e.slice(P.end),X=Qa(Y,B,0);if(-1!==X&&-1!==Y.slice(0,X).indexOf("\n\n")){for(var Q=P.end+X,J=Q+B.length;J<e.length&&e.charCodeAt(J)!==Gr;)J++;if(J<e.length&&e.charCodeAt(J)===Gr){var ee=J+1,te=Pa(e,ee);A=te,L=Ra(e,te),D=e.slice(a,A),M=e.slice(a,A),F=Q-a,j=ee-a,G=!0}}}}var ne=-1!==P.rawAttrs.indexOf("\n")||-1!==P.whitespaceBeforeAttrs.indexOf("\n"),re=!1;-1!==F&&(re=0===D.slice(j).trim().length);var oe=!1,ae=A,ie=L;if(-1!==F){var le=a+j,se=Pa(e,le-1);if(le<se){for(var ce=le;ce<se&&(e.charCodeAt(ce)===Hr||e.charCodeAt(ce)===Ur);)ce++;if(ce<se&&e.charCodeAt(ce)===ro){var ue=Ea(e,ce);ue&&!ue.isClosing&&(oe=!0,ae=le,ie=le,re=!0)}}if(!oe){var de=Ra(e,se);if(de<A){for(var fe=de;fe<A&&(e.charCodeAt(fe)===Hr||e.charCodeAt(fe)===Ur);)fe++;fe<A&&e.charCodeAt(fe)===ro&&Ea(e,fe)&&(oe=!0,ae=se,ie=de,re=!0)}}!oe&&n.inHTML&&(oe=!0,ae=se,ie=Ra(e,se),re=0===e.slice(le,se).trim().length)}var pe=[],he="";if(-1!==F){var me=(he=D.slice(P.end-a,F)).trim();if(me){var{inline:ve,inHTML:ge,d:ye}=n;if(n.inHTML=!0,n.d=I+1,"p"===T)n.inline=!0,pe=Oi(me,0,me.length,n,r);else{var be=-1!==he.indexOf("\n\n"),xe=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(me),Ee=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(me);be||xe||n.inHTML&&Ee||Ee?(n.inline=!1,pe=Ai(he,n,r)):(n.inline=!0,pe=Oi(me,0,me.length,n,r))}n.inline=ve,n.inHTML=ge,n.d=ye}}var Ce=!1;if(6===s&&-1!==F&&!n.inHTML&&!ne){var we=he,_e=/<[a-zA-Z][^>]*>/.test(we),ke=/\n\n/.test(we)||/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(we);_e&&!ke&&(Ce=!0)}if(n.inHTML||7===s||ne||!re||Ce){var Oe;if(-1!==F&&oe){var Se=!1;if(n.inHTML&&j<D.length){for(var Ae=j;Ae<D.length&&D.charCodeAt(Ae)!==Zr;)Ae++;var Me=D.slice(j,Ae).trim();Se=Me.length>1&&Me.charCodeAt(0)===ro&&Me.charCodeAt(1)!==Eo}Oe=Se?D.slice(P.end-a):he}else 7!==s&&!n.inHTML||-1===F?oe?Oe=e.slice(a,ae):ne?Oe=M:(Oe=D.slice(P.end-a)).charCodeAt(0)===Zr&&(Oe=Oe.slice(1)):(Oe=D.slice(P.end-a)).charCodeAt(0)===Zr&&(Oe=Oe.slice(1));return{node:{type:zo.htmlBlock,tag:R,attrs:Xa(P.attrs,R,r),e:P.whitespaceBeforeAttrs+P.rawAttrs,children:pe,a:Oe,text:Oe,c:!0,b:!1,endPos:ae,canInterruptParagraph:6===s},end:ie}}return{node:{type:zo.htmlBlock,tag:R,attrs:Xa(P.attrs,R,r),e:P.whitespaceBeforeAttrs+P.rawAttrs,children:pe,a:G?"":he,text:he,c:!1,b:!1,endPos:ae,canInterruptParagraph:6===s},end:ie}}var Le=M.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),Pe=Le?Le[2]:"div",Re=!!Le&&"/"===Le[1],Te=M;if(Re){var Ne=M.indexOf(">");-1!==Ne&&(Te=M.slice(Ne+1))}return{node:{type:zo.htmlBlock,tag:Pe,attrs:{},children:[],a:Te,text:Te,c:!0,b:Re,endPos:A,canInterruptParagraph:6===s},end:L}}var Ie=Ea(e,a);if(!Ie)return null;var De=Ie.tag,Fe=De.toLowerCase(),je=De.charCodeAt(0),Be=je>=No&&je<=Io;if(!(Be||Ya.has(Fe)||ma.has(Fe)||Fe.includes("-")))return null;if(Ie.isClosing)return{node:{type:zo.htmlSelfClosing,tag:De,attrs:{},endPos:Ie.end,b:!0,a:e.slice(a,Ie.end)},end:Ie.end};var ze=ei(e,Ie.end,De),He=[];if(-1!==ze){var Ue=Ja,Ve=e.slice(Ie.end,Ue),Ze=Ve.trim();if(Ze){var Ke=-1!==Ve.indexOf("\n\n"),qe=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ze),We=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(Ze),$e=n.inline,Ge=n.inHTML,Ye=n.d;n.inHTML=!0,n.d=(n.d||0)+1,Ke||qe||We?(n.inline=!1,He=Ai(Ve,n,r)):(n.inline=!0,He=Oi(Ze,0,Ze.length,n,r)),n.inline=$e,n.inHTML=Ge,n.d=Ye}var Xe=Pa(e,ze),Qe=e.slice(ze,Xe).trim()?ze:Ra(e,ze),Je=Be?e.slice(a,ze):e.slice(a,Qe),et=Be?ze:Qe;return{node:{type:zo.htmlBlock,tag:De,attrs:Xa(Ie.attrs,De,r),e:Ie.whitespaceBeforeAttrs+Ie.rawAttrs,children:He,a:Je,text:Be?Ve:Je,c:!0,b:!1,endPos:et,canInterruptParagraph:!1},end:Qe}}var tt=Na(e,Ie.end),nt=tt<e.length?Ra(e,tt):tt,rt=e.slice(Ie.end,tt);if(rt.trim()){var{inline:ot,inHTML:at,d:it}=n;n.inline=!1,n.inHTML=!0,n.d=(n.d||0)+1,He=Ai(rt,n,r),n.inline=ot,n.inHTML=at,n.d=it}var lt=e.slice(Ie.end,tt);return{node:{type:zo.htmlBlock,tag:De,attrs:Xa(Ie.attrs,De,r),e:Ie.whitespaceBeforeAttrs+Ie.rawAttrs,children:He,a:lt,text:rt,c:!0,b:!1,endPos:tt,canInterruptParagraph:!1},end:nt}}function ni(e,t,n){for(var r=0,o=e.length;r<o&&(e.charCodeAt(r)===Hr||e.charCodeAt(r)===Ur);)r++;for(;o>r&&(e.charCodeAt(o-1)===Hr||e.charCodeAt(o-1)===Ur);)o--;r<o&&e.charCodeAt(r)===ko&&r++,o>r&&e.charCodeAt(o-1)===ko&&(o-2<r||e.charCodeAt(o-2)!==eo)&&o--;for(var a=[],i=r,l=!1,s=[],c=r;c<o;){var u=e.charCodeAt(c);if(u===eo&&c+1<o)e.charCodeAt(c+1)===ko?(l||(l=!0,s=[]),s.push(e.slice(i,c)),s.push("|"),i=c+=2):c+=2;else if(u!==Kr)if(u!==ko)c++;else{var d=l?(s.push(e.slice(i,c)),s.join("")):e.slice(i,c);a.push(d.trim()),i=++c,l=!1,s=[]}else{for(var f=0;c<o&&e.charCodeAt(c)===Kr;)f++,c++;for(var p=!1;c<o&&!p;){for(var h=0;c<o&&e.charCodeAt(c)===Kr;)h++,c++;h===f?p=!0:0===h&&c++}}}var m=l?(s.push(e.slice(i,o)),s.join("")):e.slice(i,o);return a.push(m.trim()),a.map((function(e){var r=-1!==e.indexOf("\\|")?e.replace(/\\\|/g,"|"):e;return Oi(r,0,r.length,t,n)}))}function ri(e,t,n,r){let o=Pa(e,t);var a=e.indexOf("|",t);if(a<0||a>=o)return null;let i=Ra(e,o);if(i>=e.length)return null;let l=Pa(e,i);if(!xa(e,i,l))return null;let s=e.slice(t,o),c=e.slice(i,l);for(var u=[],d=0,f=c.length;d<f&&(c.charCodeAt(d)===Hr||c.charCodeAt(d)===Ur);)d++;for(d<f&&c.charCodeAt(d)===ko&&d++;d<f;){for(;d<f&&(c.charCodeAt(d)===Hr||c.charCodeAt(d)===Ur);)d++;if(d>=f||c.charCodeAt(d)===ko)break;var p=c.charCodeAt(d)===so;for(p&&d++;d<f&&c.charCodeAt(d)===Qr;)d++;var h=d<f&&c.charCodeAt(d)===so;for(h&&d++,u.push(p&&h?"center":h?"right":p?"left":null);d<f&&(c.charCodeAt(d)===Hr||c.charCodeAt(d)===Ur);)d++;d<f&&c.charCodeAt(d)===ko&&d++}let m=ni(s,n,r);if(u.length!==m.length)return null;let v=[],g=Ra(e,l);for(;g<e.length;){let t=Pa(e,g),o=e.slice(g,t);if(Ba(e,g,t))break;if(ja(e,g,t),Da<4){var y=e.charCodeAt(g+Fa);if(y===Gr||y===Yr||(y===Qr||y===to||y===no)&&Ha(e,g))break;if(y===Kr||y===qr){for(var b=g+Fa,x=0;b<t&&e.charCodeAt(b)===y;)x++,b++;if(x>=3)break}}v.push(ni(o,n,r)),g=Ra(e,t)}if((r.streaming||r.optimizeForStreaming)&&0===v.length)return null;for(var E=m.length,C=0;C<v.length;C++)if(v[C].length<E)for(;v[C].length<E;)v[C].push([]);else v[C].length>E&&(v[C].length=E);return{node:{type:zo.table,header:m,cells:v,align:u},end:g}}function oi(e,t,n){if(ja(e,t,Pa(e,t)),Da>3)return null;var r=t+Fa;if(e.charCodeAt(r)!==Wr)return null;if(r+1<e.length&&e.charCodeAt(r+1)===$r){var o=function(e,t,n){var r=e.length;if(e.charCodeAt(t)!==Wr||t+1>=r||e.charCodeAt(t+1)!==$r)return null;for(var o=t+2,a=o;o<r&&e.charCodeAt(o)!==ao;){if(e.charCodeAt(o)===Zr)return null;o++}if(o>=r)return null;var i=("^"+e.slice(a,o)).toLowerCase();if(++o>=r||e.charCodeAt(o)!==so)return null;for(o++;o<r&&(e.charCodeAt(o)===Hr||e.charCodeAt(o)===Ur);)o++;if(o<r&&e.charCodeAt(o)===Zr)for(o++;o<r&&(e.charCodeAt(o)===Hr||e.charCodeAt(o)===Ur);)o++;var l=e.indexOf("\n",o);l<0&&(l=r);for(var s=e.slice(o,l).trim(),c=l<r?l+1:r;c<r;){var u=Pa(e,c);if(ja(e,c,u),!(Da>=2)||Ba(e,c,u)){if(Ba(e,c,u)){var d=Ra(e,u);if(d<r&&(ja(e,d,Pa(e,d)),Da>=2)){s+="\n",c=Ra(e,u);continue}break}break}s+="\n"+e.slice(c,u),c=Ra(e,u)}return n.refs[i]||(n.refs[i]={target:s,title:void 0}),{node:{type:zo.footnote},end:c}}(e,r,n);return o||null}n.refs||(n.refs={});var a=wa(e,r,n.refs);return null===a?null:{node:{type:zo.refCollection},end:a}}function ai(e,t,n,r){let o=t,a=0,i=0,l=-1;for(;o<e.length;){let t=l>=0?l:Pa(e,o);if(l=-1,Ba(e,o,t))break;if(ja(e,o,t),Da<4&&i>0&&!n.f){let n=e.charCodeAt(o+Fa);if(n===Jr||n===Qr){let r=o+Fa;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===Hr||e.charCodeAt(r)===Ur);)r++;if(r>=t){a=n===Jr?1:2,o=Ra(e,t);break}}}i=t;let b=Ra(e,t);if(b<e.length){if(e.charCodeAt(b)===Lo){var s=Pa(e,b);o=Ra(e,s),i=s;continue}let t=Pa(e,b);if(l=t,ja(e,b,t),Da<4){let a=e.charCodeAt(b+Fa);if(a===Gr){o=b;break}if(a===Yr&&za(e,b,n,r)){o=b;break}if(a===Kr||a===qr){for(var c=b+Fa,u=0;c<t&&e.charCodeAt(c)===a;)u++,c++;if(u>=3){o=b;break}}if(a===ro){var d=b+Fa+1,f=d<t?e.charCodeAt(d):0,p=f===io||f===bo;if(p||f!==Eo){if(!p){for(var h=d;h<t&&(e.charCodeAt(h)>=No&&e.charCodeAt(h)<=Io||e.charCodeAt(h)>=Do&&e.charCodeAt(h)<=Fo||e.charCodeAt(h)>=Ro&&e.charCodeAt(h)<=To||e.charCodeAt(h)===Qr);)h++;if(h>d){var m=e.slice(d,h).toLowerCase();p=Ya.has(m)||ma.has(m)}}}else{for(var v=d+1,g=v;g<t&&(e.charCodeAt(g)>=No&&e.charCodeAt(g)<=Io||e.charCodeAt(g)>=Do&&e.charCodeAt(g)<=Fo||e.charCodeAt(g)>=Ro&&e.charCodeAt(g)<=To||e.charCodeAt(g)===Qr);)g++;g>v&&(p=Ya.has(e.slice(v,g).toLowerCase()))}if(p&&ti(e,b,n,r)){o=b;break}}if(a===Qr||a===to||a===_o){let n=b+Fa+1;if(n<t&&(e.charCodeAt(n)===Hr||e.charCodeAt(n)===Ur)&&Ta(e,n,t)<t&&!Ha(e,b)){o=b;break}}if(a>=Ro&&a<=To){let n=b+Fa;for(;n<t&&e.charCodeAt(n)>=Ro&&e.charCodeAt(n)<=To;)n++;if(n<t&&(e.charCodeAt(n)===xo||e.charCodeAt(n)===Mo)&&n-(b+Fa)==1&&49===e.charCodeAt(b+Fa)){var y=n+1;if(y<t&&(e.charCodeAt(y)===Hr||e.charCodeAt(y)===Ur)&&Ta(e,y,t)<t){o=b;break}}}if(a===ko){let n=Ra(e,t);if(n<e.length&&xa(e,n,Pa(e,n))){o=b;break}}if((a===Qr||a===to||a===no)&&Ha(e,b)){if(a!==Qr){o=b;break}let n=0,r=b+Fa;for(;r<t&&e.charCodeAt(r)===Qr;)n++,r++;for(;r<t&&(e.charCodeAt(r)===Hr||e.charCodeAt(r)===Ur);)r++;if(r<t){o=b;break}}}}o=Ra(e,t)}for(var b=a?i:o;b>t&&(e.charCodeAt(b-1)===Zr||e.charCodeAt(b-1)===Vr||e.charCodeAt(b-1)===Hr||e.charCodeAt(b-1)===Ur);)b--;for(var x=t;x<b&&(e.charCodeAt(x)===Hr||e.charCodeAt(x)===Ur);)x++;if(x>=b)return null;for(var E=!1,C=x;C<b;C++)if(e.charCodeAt(C)===Lo){E=!0;break}var w=E?e.slice(x,b).replace(/\u001E/g,""):e.slice(x,b);if(!w)return null;let _=function(e,t,n,r,o){var a=e.indexOf("\n",0);if(a<0||a>=n)return Oi(e,0,n,r,o);for(var i="",l=0,s=0;s<n;){var c=e.charCodeAt(s);if(c===Kr){var u=li(e,s,n);if(u>s){for(var d=!1,f=s;f<u;f++)if(e.charCodeAt(f)===Zr){d=!0;break}d&&(i+=e.slice(l,s),i+=e.slice(s,u).replace(/\n/g," "),l=u),s=u;continue}}if(c===ro){var p=si(e,s,n);if(p>s){s=p;continue}}if(c!==Zr)s++;else{var h=!1,m=0;if(s>0&&e.charCodeAt(s-1)===eo)h=!0,m=1;else{for(var v=0,g=s-1;g>=0&&e.charCodeAt(g)===Hr;)v++,g--;v>=2&&(h=!0,m=v)}for(h?(i+=e.slice(l,s-m),i+=""):i+=e.slice(l,s+1),s++;s<n&&e.charCodeAt(s)===Hr;)s++;l=s}}return l<n&&(i+=e.slice(l,n)),Oi(i,0,i.length,r,o)}(w,0,w.length,n,r);if(a){let e=(r?.slugify||Qo)(w);return{node:{type:zo.heading,level:a,children:_,id:e},end:o}}return{node:{type:zo.paragraph,children:_},end:o}}function ii(e,t,n){if(e.charCodeAt(t)!==Kr)return null;let r=Ia(e,t,n,96),o=t+r;for(;o<n;){let a=e.indexOf("`",o);if(a<0||a>=n)return null;let i=Ia(e,a,n,96);if(i===r){let n=e.slice(t+r,a);return n=n.replace(/\n/g," "),n.length>0&&" "===n[0]&&" "===n[n.length-1]&&n.trim().length>0&&(n=n.slice(1,-1)),{node:{type:zo.codeInline,text:n},end:a+i}}o=a+i}return null}function li(e,t,n){if(e.charCodeAt(t)!==Kr)return t;let r=Ia(e,t,n,96),o=t+r;for(;o<n;){let a=e.indexOf("`",o);if(a<0||a>=n)return t;let i=Ia(e,a,n,96);if(i===r)return a+i;o=a+i}return t}function si(e,t,n){if(e.charCodeAt(t)!==ro)return t;if(t+1<n&&e.charCodeAt(t+1)===Eo){let r=t+2;for(;r<n&&e.charCodeAt(r)!==Gr;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===io&&e.charCodeAt(t+2)===Qr&&e.charCodeAt(t+3)===Qr){let n=e.indexOf("--\x3e",t+4);return n>=0?n+3:t}let r=t+1,o=r;for(;r<n;){let t=e.charCodeAt(r);if(!(t>=No&&t<=Io||t>=Do&&t<=Fo||t>=Ro&&t<=To||t===Qr))break;r++}if(r===o)return t;let a=e.slice(o,r).toLowerCase(),i=!1;for(;r<n;){let o=e.charCodeAt(r);if(o===Gr){r++;break}if(o===Eo&&r+1<n&&e.charCodeAt(r+1)===Gr){r+=2,i=!0;break}if(o!==wo&&o!==Co){if(o===Zr)return t;r++}else{var l=o;for(r++;r<n&&e.charCodeAt(r)!==l;)r++;r<n&&r++}}if(i||ta(a))return r;let s=1;for(;r<n&&s>0;)if(e.charCodeAt(r)===ro)if(r+1<n&&e.charCodeAt(r+1)===Eo){let t=r+2,o=t;for(;o<n&&(e.charCodeAt(o)>=No&&e.charCodeAt(o)<=Io||e.charCodeAt(o)>=Do&&e.charCodeAt(o)<=Fo);)o++;if(e.slice(t,o).toLowerCase()===a){for(;o<n&&e.charCodeAt(o)!==Gr;)o++;if(o<n&&o++,s--,0===s)return o}r=o}else{let t=r+1,o=t;for(;o<n&&(e.charCodeAt(o)>=No&&e.charCodeAt(o)<=Io||e.charCodeAt(o)>=Do&&e.charCodeAt(o)<=Fo);)o++;e.slice(t,o).toLowerCase()===a&&s++,r++}else r++;return r}function ci(e,t,n,r,o){if(e.charCodeAt(t)!==qr||t+1>=n||e.charCodeAt(t+1)!==qr)return null;let a=t+2;for(;a+1<n;){let i=e.charCodeAt(a);if(i===Kr){let t=li(e,a,n);if(t>a){a=t;continue}}if(i===qr&&e.charCodeAt(a+1)===qr){let n=e.slice(t+2,a),i=Oi(n,0,n.length,r,o);return{node:{type:zo.textFormatted,tag:"del",children:i},end:a+2}}i===eo&&a+1<n&&a++,a++}return null}function ui(e,t,n,r,o){if(e.charCodeAt(t)!==Jr||t+1>=n||e.charCodeAt(t+1)!==Jr)return null;let a=t+2;for(;a+1<n;){let i=e.charCodeAt(a);if(i===Kr){let t=li(e,a,n);if(t>a){a=t;continue}}if(i===Jr&&e.charCodeAt(a+1)===Jr&&a>t+2){let n=e.slice(t+2,a),i=Oi(n,0,n.length,r,o);return{node:{type:zo.textFormatted,tag:"mark",children:i},end:a+2}}i===eo&&a+1<n&&a++,a++}return null}var di=/[\p{P}\p{S}]/u;function fi(e,t,n){return e<jo?!!(Ma(e)&ka):di.test(t[n])}function pi(e,t,n){return e<jo?!!(Ma(e)&_a):/\p{Zs}/u.test(t[n])}function hi(e,t,n){var r=e.charCodeAt(t);if(r!==to&&r!==no)return null;var o=Ia(e,t,n,r);if(0===o)return null;var a,i,l=t>0?e.charCodeAt(t-1):32,s=t+o<n?e.charCodeAt(t+o):32,c=pi(l,e,t-1),u=pi(s,e,t+o),d=t>0&&fi(l,e,t-1),f=t+o<n&&fi(s,e,t+o),p=!u&&(!f||c||d),h=!c&&(!d||u||f);return r===to?(a=p,i=h):(a=p&&(!h||d),i=h&&(!p||f)),{len:o,canOpen:a,canClose:i}}function mi(e,t,n,r,o){let a=e.charCodeAt(t)===io,i=a?t+1:t;if(e.charCodeAt(i)!==Wr)return null;var l=e.indexOf("]",i+1);if(l<0||l>=n)return null;for(var s=i+1,c=1;s<n&&c>0;){var u=e.charCodeAt(s);if(u===eo&&s+1<n)s+=2;else{if(u===Kr){var d=li(e,s,n);if(d>s){s=d;continue}}if(u===ro){var f=vi(e,s,n);if(f){s=f.end;continue}var p=si(e,s,n);if(p>s){s=p;continue}}u===Wr?c++:u===ao&&c--,s++}}if(0!==c)return null;var h=s-1,m=e.slice(i+1,h),v=s<n?e.charCodeAt(s):0,g=!1;if(v===Ao){var y=!0;for(s++;s<n&&(e.charCodeAt(s)===Hr||e.charCodeAt(s)===Zr);)s++;var b="",x=s;if(s<n&&e.charCodeAt(s)===ro){for(x=++s;x<n&&e.charCodeAt(x)!==Gr;)if(e.charCodeAt(x)===eo&&x+1<n)x+=2;else{if(e.charCodeAt(x)===Zr){y=!1;break}x++}y&&(x>=n||e.charCodeAt(x)!==Gr)&&(y=!1),y&&(b=e.slice(s,x),x++)}else if(y){for(var E=0;x<n;){var C=e.charCodeAt(x);if(C===eo&&x+1<n)x+=2;else{if(C===Ao)E++;else if(C===Mo){if(0===E)break;E--}else if(C===Hr||C===Zr)break;x++}}b=e.slice(s,x)}if(y){for(s=x;s<n&&(e.charCodeAt(s)===Hr||e.charCodeAt(s)===Zr);)s++;var w;if(s<n){var _=e.charCodeAt(s);if(_===wo||_===Co||_===Ao){for(var k=_===Ao?41:_,O=++s;s<n&&e.charCodeAt(s)!==k;)e.charCodeAt(s)===eo&&s+1<n&&s++,s++;s>=n?y=!1:(w=e.slice(O,s),s++)}}if(y){for(;s<n&&(e.charCodeAt(s)===Hr||e.charCodeAt(s)===Zr);)s++;(s>=n||e.charCodeAt(s)!==Mo)&&(y=!1)}}if(y){s++,b=La(b),void 0!==w&&(w=Ko(La(w)));var S=null===(o?.sanitizer||Wo)(b,a?"img":"a",a?"src":"href")?null:b;if(a){var A=Ei(Oi(m,0,m.length,r,o));return{node:{type:zo.image,target:S,alt:A,title:w},end:s}}var M=r.inAnchor;r.inAnchor=!0;var L=M?[{type:zo.text,text:m}]:Oi(m,0,m.length,r,o);return r.inAnchor=M,!r.inAnchor&&xi(L)?null:{node:{type:zo.link,target:S,title:w,children:L},end:s}}s=h+1,g=!0}var P="",R=s;if(g||v!==Wr){if(Sa(m))return null;P=Aa(m)}else{var T=s+1;R=T;for(var N=!1;R<n&&e.charCodeAt(R)!==ao;)if(e.charCodeAt(R)===eo&&R+1<n)R+=2;else{if(e.charCodeAt(R)===Wr){N=!0;break}R++}if(N||R>=n)return null;var I=e.slice(T,R);if(I.trim())P=Aa(I);else{if(Sa(m))return null;P=Aa(m)}R+=1}var D=r.refs[P];if(!D)return null;if(a)return{node:{type:zo.image,target:D.target,alt:Ei(Oi(m,0,m.length,r,o)),title:D.title},end:R};var F=r.inAnchor;return r.inAnchor=!0,L=F?[{type:zo.text,text:m}]:Oi(m,0,m.length,r,o),r.inAnchor=F,!r.inAnchor&&xi(L)?null:{node:{type:zo.link,target:D.target,title:D.title,children:L},end:R}}function vi(e,t,n){if(e.charCodeAt(t)!==ro)return null;for(var r=t+1;r<n;){var o=e.charCodeAt(r);if(o===Gr)break;if(o===Hr||o===Zr||o===Vr||o===ro)return null;r++}if(r>=n||e.charCodeAt(r)!==Gr)return null;var a=e.slice(t+1,r);return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/)?{node:{type:zo.link,target:a,children:[{type:zo.text,text:a}]},end:r+1}:-1!==a.indexOf("@")&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)?{node:{type:zo.link,target:"mailto:"+a,children:[{type:zo.text,text:a}]},end:r+1}:null}function gi(e,t,n,r){if(e.charCodeAt(t)!==Wr||t+1>=n||e.charCodeAt(t+1)!==$r)return null;let o=t+2;for(;o<n&&e.charCodeAt(o)!==ao&&e.charCodeAt(o)!==Zr;)o++;if(o>=n||e.charCodeAt(o)!==ao)return null;let a=e.slice(t+2,o);return a?{node:{type:zo.footnoteReference,target:"#"+Qo(a),text:a},end:o+1}:null}function yi(e,t,n,r){if(r.disableBareUrls)return null;var o="",a=!1,i=e.charCodeAt(t);if(i===uo||72===i?t+8<=n&&e.charCodeAt(t+1)===po&&e.charCodeAt(t+2)===po&&e.charCodeAt(t+3)===ho&&(e.charCodeAt(t+4)===mo&&e.charCodeAt(t+5)===so&&e.charCodeAt(t+6)===Eo&&e.charCodeAt(t+7)===Eo?o="https://":e.charCodeAt(t+4)===so&&e.charCodeAt(t+5)===Eo&&e.charCodeAt(t+6)===Eo&&(o="http://")):i===co||70===i?t+6<=n&&e.charCodeAt(t+1)===po&&e.charCodeAt(t+2)===ho&&e.charCodeAt(t+3)===so&&e.charCodeAt(t+4)===Eo&&e.charCodeAt(t+5)===Eo&&(o="ftp://"):(i===fo||87===i)&&t+4<=n&&e.charCodeAt(t+1)===fo&&e.charCodeAt(t+2)===fo&&e.charCodeAt(t+3)===xo&&(o="www.",a=!0),!o)return null;let l=t+o.length;for(;l<n;){let t=e.charCodeAt(l);if(t===Hr||t===Zr||t===Ur||t===Vr||t===ro||t===Gr)break;l++}for(var s=0,c=0,u=t;u<l;u++){var d=e.charCodeAt(u);d===Ao?s++:d===Mo&&c++}let f=l;for(;f>t+o.length;){let n=e.charCodeAt(f-1);if(n===xo||n===go||n===so||n===io||n===bo||n===Mo){if(n===Mo){if(s>=c)break;c--}f--}else{if(n!==yo)break;for(var p=f-2;p>t&&(e.charCodeAt(p)>=No&&e.charCodeAt(p)<=Io||e.charCodeAt(p)>=Do&&e.charCodeAt(p)<=Fo||e.charCodeAt(p)>=Ro&&e.charCodeAt(p)<=To);)p--;p>=t&&e.charCodeAt(p)===lo?f=p:f--}}if(f<=t+o.length)return null;var h=t+(a?4:o.length),m=e.indexOf("/",h);if((m<0||m>f)&&(m=f),a&&-1===e.indexOf(".",h))return null;for(var v=-1,g=-1,y=m-1;y>=h;y--)if(e.charCodeAt(y)===xo){if(!(v<0)){g=y;break}v=y}for(y=g>=0?g+1:h;y<m;y++)if(e.charCodeAt(y)===no)return null;var b=e.slice(t,f),x=a?"http://"+b:b;return{node:{type:zo.link,target:x,children:[{type:zo.text,text:b}]},end:f}}function bi(e,t,n,r){if(r.disableBareUrls)return null;for(var o=t,a=o;o<n&&((c=e.charCodeAt(o))>=No&&c<=Io||c>=Do&&c<=Fo||c>=Ro&&c<=To||c===xo||c===io||c===Yr||36===c||c===Xr||c===lo||c===Co||c===to||c===_o||c===Eo||c===Jr||c===bo||c===$r||c===no||c===Kr||c===Oo||c===ko||c===So||c===qr||c===Qr);)o++;if(o===a||o>=n||e.charCodeAt(o)!==oo)return null;for(var i=++o,l=-1,s=o;o<n;){var c;if((c=e.charCodeAt(o))>=No&&c<=Io||c>=Do&&c<=Fo||c>=Ro&&c<=To)o++;else if((c===Qr||c===no)&&o>i)o++;else{if(c!==xo)break;if(o===i)break;var u=e.charCodeAt(o-1);if(u===Qr||u===no||o-s>63)break;if(!(o+1<n))break;var d=e.charCodeAt(o+1);if(!(d>=No&&d<=Io||d>=Do&&d<=Fo||d>=Ro&&d<=To))break;l=o,s=o+1,o++}}if(o-s>63||l<0)return null;var f=e.charCodeAt(o-1);if(!(f>=No&&f<=Io||f>=Do&&f<=Fo||f>=Ro&&f<=To)||o<=l+1)return null;for(var p=-1,h=l-1;h>=i;h--)if(e.charCodeAt(h)===xo){p=h;break}for(h=p>=0?p+1:i;h<o;h++)if(e.charCodeAt(h)===no)return null;var m=e.slice(t,o);return{node:{type:zo.link,target:"mailto:"+m,children:[{type:zo.text,text:m}]},end:o}}function xi(e){for(var t=0;t<e.length;t++)if(e[t].type===zo.link||"children"in e[t]&&Array.isArray(e[t].children)&&xi(e[t].children))return!0;return!1}function Ei(e){for(var t="",n=0;n<e.length;n++){var r=e[n];r.type===zo.text?t+=r.text:r.type===zo.breakLine?t+=" ":r.type===zo.codeInline?t+=r.text:"children"in r&&Array.isArray(r.children)?t+=Ei(r.children):r.type===zo.image?t+=r.alt||"":r.type===zo.link&&(t+=Ei(r.children))}return t}function Ci(e){let t=e.includes("&")?Ko(e):e;return{type:zo.text,text:t}}function wi(e,t,n,r,o){if(e.charCodeAt(t)!==ro)return null;var a=t+1;if(a>=n)return null;var i=e.charCodeAt(a);if(i===io&&a+1<n&&e.charCodeAt(a+1)===Qr&&a+2<n&&e.charCodeAt(a+2)===Qr){var l=a+3;if(l<n&&e.charCodeAt(l)===Gr)return{node:{type:zo.htmlComment,text:"",endsWithGreaterThan:!0},end:l+1};if(l+1<n&&e.charCodeAt(l)===Qr&&e.charCodeAt(l+1)===Gr)return{node:{type:zo.htmlComment,text:"-",endsWithGreaterThan:!0},end:l+2};var s=e.indexOf("--\x3e",l);return-1!==s&&s<=n-3?{node:{type:zo.htmlComment,text:e.slice(t+4,s)},end:s+3}:null}if(i===bo){var c=e.indexOf("?>",a+1);return-1!==c&&c<n?{node:{type:zo.htmlSelfClosing,tag:"?",attrs:{},a:e.slice(t,c+2)},end:c+2}:null}if(i===io&&a+1<n){var u=e.charCodeAt(a+1);if(u===Wr&&"[CDATA["===e.slice(a+1,a+8)){var d=e.indexOf("]]>",a+8);return-1!==d&&d<n?{node:{type:zo.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:e.slice(t,d+3)},end:d+3}:null}if(u>=No&&u<=Io){var f=e.indexOf(">",a+2);return-1!==f&&f<n?{node:{type:zo.htmlSelfClosing,tag:"!"+e.slice(a+1,f),attrs:{},a:e.slice(t,f+1)},end:f+1}:null}}if(i===Eo){var p=a+1;if(p>=n)return null;var h=e.charCodeAt(p);if(!(h>=No&&h<=Io||h>=Do&&h<=Fo))return null;for(p++;p<n;){var m=e.charCodeAt(p);if(!(m>=No&&m<=Io||m>=Do&&m<=Fo||m>=Ro&&m<=To||m===Qr))break;p++}for(;p<n&&(e.charCodeAt(p)===Hr||e.charCodeAt(p)===Ur||e.charCodeAt(p)===Zr);)p++;if(p<n&&e.charCodeAt(p)===Gr){var v=e.slice(a+1,p).trim();return{node:{type:zo.htmlSelfClosing,tag:v,attrs:{},a:e.slice(t,p+1),b:!0},end:p+1}}return null}if(!(i>=No&&i<=Io||i>=Do&&i<=Fo))return null;var g=Ea(e,t);if(!g)return null;var y=g.tag,b=y.toLowerCase();if(g.selfClosing||ta(y))return{node:{type:zo.htmlSelfClosing,tag:y,attrs:Xa(g.attrs,y,o),a:e.slice(t,g.end)},end:g.end};var x=ma.has(b),E=ei(e.slice(0,n),g.end,y);if(-1===E)return{node:{type:zo.htmlSelfClosing,tag:y,attrs:Xa(g.attrs,y,o),a:e.slice(t,g.end)},end:g.end};var C=function(e,t,n){let r=t.length;var o=t.charCodeAt(0);o>=No&&o<=Io&&(o+=Bo);for(let i=Math.min(n,e.length-r);i>=0;i--){var a=e.charCodeAt(i);if(a>=No&&a<=Io&&(a+=Bo),a!==o)continue;let n=!0;for(let o=1;o<r;o++){let r=e.charCodeAt(i+o),a=t.charCodeAt(o);if(r>=No&&r<=Io&&(r+=Bo),a>=No&&a<=Io&&(a+=Bo),r!==a){n=!1;break}}if(n)return i}return-1}(e,"</"+b,E),w=e.slice(g.end,C),_=[];if(x)w.trim()&&(_=[{type:zo.text,text:w}]);else{var k=w.trim();if(k){var{inAnchor:O,inline:S}=r;"a"===b&&(r.inAnchor=!0),-1!==k.indexOf("\n\n")||/^#{1,6}\s/.test(k)?(r.inline=!1,_=Ai(k,r,o)):_=Oi(k,0,k.length,r,o),r.inAnchor=O,r.inline=S}}return{node:{type:zo.htmlBlock,tag:y,attrs:Xa(g.attrs,y,o),e:g.rawAttrs,children:_,text:w,c:!1},end:E}}var _i=200,ki=0;function Oi(e,t,n,r,o){if(++ki>_i)return ki--,[{type:zo.text,text:e.slice(t,n)}];let a=r;if(o.streaming||o.optimizeForStreaming){let r=function(e,t){for(var n=1,r=t+1;r<e.length;r++){var o=e.charCodeAt(r);if(o===Wr)n++;else if(o===ao&&0==--n)return r}return-1},o=e.slice(t,n),a=o;for(var i=0,l=0,s=0,c=0,u=0,d=-1,f=-1,p=-1,h=-1,m=-1,v=0;v<o.length;v++){var g=o.charCodeAt(v);g===to?v+1<o.length&&o.charCodeAt(v+1)===to?(i++,d=v,v++):(l++,f=v):g===no?v+1<o.length&&o.charCodeAt(v+1)===no?(s++,p=v,v++):(c++,h=v):g===qr&&v+1<o.length&&o.charCodeAt(v+1)===qr&&(u++,m=v,v++)}var y=[];u%2==1&&m>=0&&y.push([m,2]),s%2==1&&p>=0&&y.push([p,2]),c%2==1&&h>=0&&y.push([h,1]),i%2==1&&d>=0&&y.push([d,2]),l%2==1&&f>=0&&y.push([f,1]),y.sort((function(e,t){return t[0]-e[0]}));for(var b=0;b<y.length;b++){var x=y[b][0],E=y[b][1];o=o.slice(0,x)+o.slice(x+E)}let F=0,j=-1;for(let e=0;e<o.length;e++)o.charCodeAt(e)===Kr&&(F++,j=e);if(F%2==1&&-1!==j){let e=!1,t=-1,n=0;for(;n<o.length;)o.charCodeAt(n)===Kr&&(e?(e=!1,t=-1):(t=n,e=!0)),n++;e&&-1!==t&&(o=o.slice(0,t))}for(var C=!0;C;){C=!1;for(var w=-1,_=-1,k=-1,O=!1,S=0;S<o.length;S++)if(o.charCodeAt(S)===Wr&&(0===S||o.charCodeAt(S-1)!==eo)){var A=S>0&&o.charCodeAt(S-1)===io,M=A?S-1:S,L=r(o,S);if(-1===L)w=M,O=A,_=S+1,k=o.length;else{var P=L+1;if(P>=o.length)w=M,O=A,_=S+1,k=L;else if(o.charCodeAt(P)===Ao){var R=o.indexOf(")",P+1);-1===R?(w=M,O=A,_=S+1,k=L,S=o.length):S=R}else if(o.charCodeAt(P)===Wr){var T=o.indexOf("]",P+1);-1===T?(w=M,O=A,_=S+1,k=L,S=o.length):S=T}else S=L}}if(w>=0){var N=O?"":o.slice(_,k);o=o.slice(0,w)+N,C=!0}}let B=o.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(B&&void 0!==B.index){for(var I=0,D=0;D<B.index;D++)o.charCodeAt(D)===Kr&&I++;I%2!=1&&-1===Qa(o,"</"+B[1],0)&&(o=o.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/,"$1"))}o!==a&&(e=e.slice(0,t)+o,n=t+o.length)}let F=[];var j=[];let B=t;var z=o.disableAutoLink||o.disableBareUrls||a.inAnchor?-1:e.indexOf("@",t);for(z>=n&&(z=-1);t<n;){let r=e.charCodeAt(t),i=null;if(r===Kr)i=ii(e,t,n),i||(t+=Ia(e,t,n,Kr)-1);else if(r===to||r===no){var H=hi(e,t,n);if(H){if(H.canOpen||H.canClose){t>B&&F.push(Ci(e.slice(B,t)));var U=Ci(e.slice(t,t+H.len));j.push({idx:F.length,ch:r,len:H.len,canOpen:H.canOpen,canClose:H.canClose,active:!0}),F.push(U),B=t+=H.len;continue}t+=H.len-1}}else r===qr?i=ci(e,t,n,a,o):r===Jr?i=ui(e,t,n,a,o):r===Wr?(t+1<n&&e.charCodeAt(t+1)===$r&&(i=gi(e,t,n)),i||(i=mi(e,t,n,a,o))):r===io&&t+1<n&&e.charCodeAt(t+1)===Wr?i=mi(e,t,n,a,o):r===ro?(i=vi(e,t,n),!i&&!o.disableParsingRawHTML&&!o.ignoreHTMLBlocks&&(i=wi(e,t,n,a,o))):(r===uo||r===fo||r===co)&&!a.inAnchor&&!o.disableAutoLink&&(0===t||e.charCodeAt(t-1)!==ro)&&(i=yi(e,t,n,o));if(!i&&z>=0&&z-t<=64&&!a.inAnchor&&!o.disableAutoLink&&!o.disableBareUrls&&(r>=No&&r<=Io||r>=Do&&r<=Fo||r>=Ro&&r<=To)&&(i=bi(e,t,n,o),!i&&t>=z&&(z=e.indexOf("@",t+1))>=n&&(z=-1)),r!==Po)if(i)t>B&&F.push(Ci(e.slice(B,t))),F.push(i.node),B=t=i.end;else{if(r===eo&&t+1<n&&Ma(e.charCodeAt(t+1))&ka){t>B&&F.push(Ci(e.slice(B,t))),F.push(Ci(e[t+1])),B=t+=2;continue}if(t++,z<0||z-t>64)for(;t<n;){var V=e.charCodeAt(t);if(!(V<jo)||ya[V])break;t++}}else t>B&&F.push(Ci(e.slice(B,t))),F.push({type:zo.breakLine}),B=++t}if(n>B){let t=e.slice(B,n);(o.streaming||o.optimizeForStreaming)&&(t=t.replace(/\*\*([^*]+)$/,"$1"),t.match(/\*[^*]+$/)&&(t=t.replace(/\*([^*]+)$/,"$1")),t=t.replace(/__([^_]+)$/,"$1"),t.match(/_[^_]+$/)&&(t=t.replace(/_([^_]+)$/,"$1")),t=t.replace(/~~([^~]+)$/,"$1"),t=t.replace(/\[([^\]]+)$/,"$1"),t=t.replace(/\[([^\]]+)\]\([^)]*$/,"$1")),t&&F.push(Ci(t))}return j.length>0&&function(e,t){if(0!==t.length){for(var n=[],r=0;r<12;r++)n[r]=-1;for(var o=0;o<t.length;){var a=t[o];if(a.active&&a.canClose){for(var i=6*(a.ch===to?0:1)+a.len%3*2+(a.canOpen?1:0),l=void 0!==n[i]?n[i]:-1,s=-1,c=o-1;c>l;c--){var u=t[c];if(u.active&&u.ch===a.ch&&u.canOpen&&(!a.canOpen&&!u.canClose||(u.len+a.len)%3!=0||u.len%3==0)){s=c;break}}if(s<0)n[i]=o-1,!a.canOpen&&(a.active=!1),o++;else{var d=t[s],f=d.len>=2&&a.len>=2,p=f?2:1;d.len-=p,a.len-=p;var h=e[d.idx],m=e[a.idx];h.text=h.text.slice(0,h.text.length-p),m.text=m.text.slice(p);var v=d.idx+1,g=a.idx,y=e.slice(v,g),b={type:zo.textFormatted,tag:f?"strong":"em",children:y};e.splice(v,g-v,b);for(var x=g-v-1,E=0;E<t.length;E++)t[E].idx>d.idx&&(t[E].idx-=x);for(var C=s+1;C<o;C++)t[C].active=!1;if(0===d.len&&(d.active=!1,""===h.text)){e.splice(d.idx,1);for(var w=0;w<t.length;w++)t[w].idx>d.idx?t[w].idx--:t[w].idx===d.idx&&(t[w].idx=-1)}if(0===a.len){a.active=!1;var _=a.idx;if(""===m.text){e.splice(_,1);for(var k=0;k<t.length;k++)t[k].idx>_?t[k].idx--:t[k].idx===_&&(t[k].idx=-1)}o++}}}else o++}for(var O=0,S=0;S<e.length;S++){var A=e[S];if(A.type===zo.text){var M=A;if(""===M.text)continue;if(O>0&&e[O-1].type===zo.text){e[O-1].text+=M.text;continue}}e[O++]=A}e.length=O}}(F,j),ki--,F}var Si=500;function Ai(e,t,n){var r=t.g||0;if(r>Si)return[{type:zo.text,text:e}];if(t.g=r+1,n.streaming||n.optimizeForStreaming){var o=e.length;o>0&&e.charCodeAt(o-1)===Zr&&o--;for(var a=o;a>0&&e.charCodeAt(a-1)!==Zr;)a--;if(a>0&&e.charCodeAt(a)===ko){for(var i=!0,l=a;l<o;l++){var s=e.charCodeAt(l);if(s!==Hr&&s!==Ur&&s!==Qr&&s!==so&&s!==ko){i=!1;break}}if(i){for(var c=a-1;c>0&&e.charCodeAt(c-1)!==Zr;)c--;e.charCodeAt(c)===ko&&(e=e.slice(0,c).trimEnd())}}var u=e.trim(),d=u.lastIndexOf("\n"),f=-1===d?u:u.slice(d+1);if(f.length>0&&f.charCodeAt(0)===ko){for(var p=!1,h=!1,m=1;m<f.length;m++){var v=f.charCodeAt(m);v===ko&&(p=!0),v===Qr&&(h=!0)}p&&h&&(e=-1===d?"":e.slice(0,e.lastIndexOf(f)).trimEnd())}for(var g=-1,y=-1,b=-1,x=e.length-1;x>=0;x--)if(e.charCodeAt(x)===ro){var E=x+1<e.length?e.charCodeAt(x+1):0;if(E>=No&&E<=Io||E>=Do&&E<=Fo){for(var C=x+2;C<e.length;){var w=e.charCodeAt(C);if(!(w>=No&&w<=Io||w>=Do&&w<=Fo||w>=Ro&&w<=To))break;C++}for(var _=C;_<e.length&&e.charCodeAt(_)!==Gr;)_++;if(_<e.length){for(var k=!1,O=_+1;O<e.length;O++)if(e.charCodeAt(O)===ro){k=!0;break}k||(g=x,y=C,b=_+1)}}break}if(g>=0){for(var S=0,A=0;A<g;A++)e.charCodeAt(A)===Kr&&S++;if(S%2==0){var M=e.slice(g+1,y);-1===Qa(e,"</"+M,0)&&(e=e.slice(0,g)+e.slice(b))}}var L=e.length;if(L>0){for(var P=e.lastIndexOf("\n"),R=-1===P?0:P+1,T=L,N=R,I=0;N<T&&e.charCodeAt(N)===Hr&&I<3;)N++,I++;if(N<T){var D=e.charCodeAt(N),F=!1;if(D===to||D===Qr||D===_o){var j=N+1;if(j>=T||e.charCodeAt(j)===Hr||e.charCodeAt(j)===Ur){for(var B=j;B<T&&(e.charCodeAt(B)===Hr||e.charCodeAt(B)===Ur);)B++;B>=T&&(F=!0)}}else if(D>=Ro&&D<=To){for(var z=N;z<T&&e.charCodeAt(z)>=Ro&&e.charCodeAt(z)<=To;)z++;if(z<T&&(e.charCodeAt(z)===xo||e.charCodeAt(z)===Mo)){var H=z+1;if(H>=T||e.charCodeAt(H)===Hr||e.charCodeAt(H)===Ur){for(var U=H;U<T&&(e.charCodeAt(U)===Hr||e.charCodeAt(U)===Ur);)U++;U>=T&&(F=!0)}}}F&&(e=e.slice(0,R).trimEnd())}}}if(t.inline)return Oi(e,0,e.length,t,n);let V=[],Z=0,K=e.length;if(0===Z&&e.startsWith("---")){let t=function(e){if(!Jo(e,"---"))return null;let t=3;for(;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;if(t<e.length&&"\r"===e[t]&&t++,t>=e.length||"\n"!==e[t])return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&"\n"!==e[t]&&"\r"!==e[t];)t++;if(t>=e.length)break;let o=t;if("\r"===e[t]&&t++,t<e.length&&"\n"===e[t]&&t++,Jo(e,"---",r))return{endPos:t,hasValidYaml:n};let a=e.indexOf(":",r);-1!==a&&a<o&&(n=!0)}return null}(e);if(t&&t.hasValidYaml){if(!1!==n.preserveFrontmatter){let n=e.slice(0,t.endPos).trimEnd();V.push({type:zo.frontmatter,text:n})}Z=t.endPos}}for(;Z<K;){for(var q=e.indexOf("\n",Z),W=q<0?K:q;Z<K&&Ba(e,Z,W);)Z=W<K?W+1:W,Z<K&&(W=(q=e.indexOf("\n",Z))<0?K:q);if(Z>=K)break;e.charCodeAt(Z),ja(e,Z,W);let r=null;if(e.charCodeAt(Z)!==Lo&&Da>=4&&!t.inHTML)r=Va(e,Z);else if(e.charCodeAt(Z)!==Lo){let o=Z+Fa,a=e.charCodeAt(o);a===Yr?r=za(e,Z,t,n):a===Gr?r=Za(e,Z,t,n):a===Kr||a===qr?r=Ua(e,Z):a===Qr||a===to||a===no?(r=Ha(e,Z),!r&&(r=Ga(e,Z,t,n))):a===_o||a>=Ro&&a<=To?r=Ga(e,Z,t,n):a===ro?r=ti(e,Z,t,n):a===ko?r=ri(e,Z,t,n):a===Wr&&(r=oi(e,Z,t))}if(!r){for(var $=!1,G=Z;G<W;G++)if(e.charCodeAt(G)===ko){$=!0;break}$&&(r=ri(e,Z,t,n))}if(r||(r=ai(e,Z,t,n)),r)r.node.type!==zo.refCollection&&V.push(r.node),Z=r.end;else{var Y=e.indexOf("\n",Z);Z=Y<0?K:Y+1}}return t.g=r,V}function Mi(e,t,n,r){var o=Ea(e,t);return o?{tagName:o.tag,tagLower:o.tag.toLowerCase(),attrs:o.rawAttrs,whitespaceBeforeAttrs:o.whitespaceBeforeAttrs,isSelfClosing:o.selfClosing,hasSpaceBeforeSlash:o.hasSpaceBeforeSlash,isClosing:o.isClosing,hasNewline:o.whitespaceBeforeAttrs.includes("\n")||o.rawAttrs.includes("\n"),endPos:o.end}:null}function Li(e,t,n){ki=0,e=function(e){var t=e.indexOf("\r"),n=e.indexOf("\0");if(-1===t&&-1===n)return e;var r=e.length;aa.length=0;var o=0,a=0;for(a=-1===t?n:-1===n||t<n?t:n;a<r;a++){var i=e.charCodeAt(a);i===Vr?(o<a&&aa.push(e.slice(o,a)),a+1<r&&e.charCodeAt(a+1)===Zr&&a++,aa.push("\n"),o=a+1):0===i&&(o<a&&aa.push(e.slice(o,a)),aa.push("�"),o=a+1)}return o<r&&aa.push(e.slice(o)),aa.join("")}(e),!t.refs&&(t.refs={}),Ca(e,t.refs);let r=Ai(e,t,n);return t.refs&&Object.keys(t.refs).length>0?[{type:zo.refCollection,refs:t.refs},...r]:r}var Pi,Ri=/^\n+/;try{Pi=r.createElement("div").$$typeof}catch{Pi=Symbol.for("react.transitional.element")}function Ti(e,t,n){return{$$typeof:Pi,type:e,key:null!=n?""+n:null,ref:null,props:t,h:null}}var Ni=typeof r.createContext<"u"?r.createContext(void 0):void 0;function Ii(e,t,n,o,a,i,l,s){switch(e.type){case zo.blockQuote:{let r={key:n.key};return e.alert&&(r.className="markdown-alert-"+i(e.alert.toLowerCase(),Qo),e.children.unshift({attrs:{},children:[{type:zo.text,text:e.alert}],c:!0,type:zo.htmlBlock,tag:"header"})),o("blockquote",r,t(e.children,n))}case zo.breakLine:return o("br",{key:n.key});case zo.breakThematic:return o("hr",{key:n.key});case zo.frontmatter:return s.preserveFrontmatter?o("pre",{key:n.key},e.text):null;case zo.codeBlock:let m=e.lang?Ko(e.lang):"";return o("pre",{key:n.key},o("code",{...Vo(e.attrs||{}),className:m?`language-${m} lang-${m}`:""},e.text));case zo.codeInline:return o("code",{key:n.key},e.text);case zo.footnoteReference:return o("a",{key:n.key,href:a(e.target,"a","href")||void 0},o("sup",{key:n.key},e.text));case zo.gfmTask:return o("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"});case zo.heading:return o(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case zo.htmlBlock:{let m=e;if(s.tagfilter&&ua(m.tag)){var c="";if(m.attrs)for(var u in m.attrs)!0===(h=m.attrs[u])?c+=" "+u:null!=h&&!1!==h&&(c+=" "+u+'="'+String(h)+'"');return o("span",{key:n.key},"<"+m.tag+c+">")}if(m.a&&m.c){let c=function(e){if((e.type===zo.htmlSelfClosing||e.type===zo.htmlBlock)&&e.b)return[];if(e.type===zo.paragraph){let t=e.children;return t?t.flatMap(c):[]}return e.type===zo.text?e.text?.trim()?[e]:[]:e.type===zo.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(c)}]:[e]},u=function(e){for(var t=0;t<e.length;t++)e[t].type===zo.htmlBlock&&(e[t].c=!1),"children"in e[t]&&e[t].children&&u(e[t].children)},h=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===zo.paragraph&&r.children)for(var o=r.children,a=0;a<o.length;a++){var i=o[a];if(i.type===zo.htmlSelfClosing&&i.b&&i.tag.toLowerCase()===t){var l=e.slice(0,n);a>0&&l.push({type:zo.paragraph,children:o.slice(0,a)});var s=[];if(a+1<o.length){var c=o.slice(a+1);(c=c.filter((function(e){return!(e.type===zo.htmlSelfClosing&&e.b)}))).length>0&&(s=c)}return{found:!0,beforeClose:l,afterClose:s=s.concat(e.slice(n+1))}}}if((r.type===zo.htmlSelfClosing||r.type===zo.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}},v=m.tag.toLowerCase(),g=function(e){return ma.has(e)}(v),y=m.children&&m.children.length>0,b=/<[a-z][^>]{0,100}>/i.test(m.a);if(g){let t=m.a.replace(new RegExp("\\s*</"+v+">\\s*$","i"),"");return s.tagfilter&&(t=da(t)),b?o(e.tag,{key:n.key,...Vo(e.attrs||{}),dangerouslySetInnerHTML:{__html:t}}):o(e.tag,{key:n.key,...Vo(e.attrs||{})},t)}let x=new RegExp(`^<${m.tag}(\\s|>)`,"i").test(m.a);if(y&&!x&&s.tagfilter&&function(e){return ca.lastIndex=0,ca.test(e)}(m.a))return o(e.tag,{key:n.key,...Vo(e.attrs||{})},t(m.children,n));if(function(e){return va.test(e)}(m.a)){let t=s.tagfilter?da(m.a):m.a;return o(e.tag,{key:n.key,...Vo(e.attrs||{}),dangerouslySetInnerHTML:{__html:t}})}let E={slugify:e=>i(e,Qo),sanitizer:a,tagfilter:!0},C=m.a.replace(/>\s+</g,"><").replace(/\n+/g," ").trim();if(new RegExp(`^<${m.tag}(\\s[^>]*)?>(\\s*</${m.tag}>)?$`,"i").test(C))return m.children&&m.children.length>0?o(e.tag,{key:n.key,...Vo(e.attrs||{})},t(m.children,n)):o(e.tag,{key:n.key,...Vo(e.attrs||{})});let w=Li(C,{inline:!1,refs:l,inHTML:!1},E);u(w);let _=m.tag.toLowerCase(),k="</"+_+">",O=new RegExp(`^<${m.tag}(\\s|>)`,"i").test(C),S=C.toLowerCase().trimEnd().endsWith(k),A=O&&S;if(A&&y)return o(e.tag,{key:n.key,...Vo(e.attrs||{})},t(m.children,n));if(A)return t(w.flatMap(c),n);var d=h(w,_);if(d.found&&d.afterClose.length>0){var f=d.beforeClose.flatMap(c),p=d.afterClose.flatMap(c);return Ti(r.Fragment,{children:[o(e.tag,{key:n.key,...Vo(e.attrs||{})},t(f,n)),t(p,n)]},null)}return o(e.tag,{key:n.key,...Vo(e.attrs||{})},t(w.flatMap(c),n))}return ta(e.tag)?o(e.tag,{key:n.key,...Vo(e.attrs||{})}):o(e.tag,{key:n.key,...Vo(e.attrs||{})},e.children?t(e.children,n):"")}case zo.htmlSelfClosing:{let t=e;if(s.tagfilter&&ua(t.tag)){if(c="",t.attrs)for(var u in t.attrs){var h;!0===(h=t.attrs[u])?c+=" "+u:null!=h&&!1!==h&&(c+=" "+u+'="'+String(h)+'"')}return o("span",{key:n.key},"<"+t.tag+c+" />")}return o(e.tag,{key:n.key,...Vo(e.attrs||{})})}case zo.image:{let t=null!=e.target?a(e.target,"img","src"):null;return o("img",{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case zo.link:{let r={key:n.key};return null!=e.target&&(r.href=function(e){for(var t=!1,n=0;n<e.length;n++)if((o=e.charCodeAt(n))<=Hr||o===wo||o===Xr||o===ro||o===Gr||o===Wr||o===eo||o===ao||o===$r||o===Kr||o>=123){t=!0;break}if(!t)return e;var r="";for(n=0;n<e.length;n++){var o;if((o=e.charCodeAt(n))===Xr&&n+2<e.length){var a=e.charCodeAt(n+1),i=e.charCodeAt(n+2);if((a>=Ro&&a<=To||a>=No&&a<=70||a>=Do&&a<=co)&&(i>=Ro&&i<=To||i>=No&&i<=70||i>=Do&&i<=co)){r+=e[n]+e[n+1]+e[n+2],n+=2;continue}}r+=encodeURI(e[n])}return r}(e.target)),e.title&&(r.title=e.title),o("a",r,t(e.children,n))}case zo.table:{let r=e;return o("table",{key:n.key},o("thead",null,o("tr",null,r.header.map((function(e,a){return o("th",{key:a,style:null==r.align[a]?{}:{textAlign:r.align[a]}},t(e,n))})))),o("tbody",null,r.cells.map((function(e,a){return o("tr",{key:a},e.map((function(e,a){return o("td",{key:a,style:null==r.align[a]?{}:{textAlign:r.align[a]}},t(e,n))})))}))))}case zo.text:return e.text;case zo.textFormatted:return o(e.tag,{key:n.key},t(e.children,n));case zo.orderedList:case zo.unorderedList:{let r=e.type===zo.orderedList?"ol":"ul";return o(r,{key:n.key,start:e.type===zo.orderedList?e.start:void 0},e.items.map((function(e,r){return o("li",{key:r},t(e,n))})))}case zo.paragraph:return o("p",{key:n.key},t(e.children,n));case zo.ref:default:return null}}function Di(e="",t={}){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||Qo,o=n.sanitizer||Wo,a={};return function(e){let t=n.forceInline||!n.forceBlock&&!Zo.test(e),i={...n,slugify:e=>r(e,Qo),sanitizer:o,tagfilter:!1!==n.tagfilter};t||Ca(e,a);let l=e;if(!t){let e=l.length;for(;e>0&&("\n"===l[e-1]||"\r"===l[e-1]);)e--;l=l.slice(0,e),l=`${l.replace(Ri,"")}\n\n`}if(n.optimizeForStreaming){let e=l.lastIndexOf("<");-1!==e&&-1===l.slice(e).indexOf(">")&&(l=l.slice(0,e))}return function(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||Qo,o=n.sanitizer||Wo,a=n.createElement,i=n.overrides&&Object.keys(n.overrides).length>0,l=e=>Di(e,{...n,wrapper:null});function s(e,t,...r){var o=t||{};for(var s in o){var c=o[s];if("string"==typeof c&&c.length>0&&c.charCodeAt(0)===ro&&(fa.test(c)||pa.test(c)||Mi(c,0))){var u=l(c.trim());o[s]="innerHTML"===s&&Array.isArray(u)?u[0]:u}}var d=e;if(i){var f=ia(n.overrides,e+".props",{});d=((e,t)=>{let n=ia(t,e,void 0);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:ia(t,`${e}.component`,e):e})(e,n.overrides),o={...o,...f,className:la(o.className,f.className)||void 0}}if(!a){var p=o.key;return null!=p&&delete o.key,1===r.length?o.children=r[0]:r.length>1&&(o.children=r),Ti(d,o,p)}return a(d,o,...r)}let c={...n,slugify:e=>r(e,Qo),sanitizer:o,tagfilter:!1!==n.tagfilter},u=e[0]&&e[0].type===zo.refCollection?e[0].refs:{},d=((e,t,n,r,o,a)=>{var i=(l,s={})=>{var c=(s.renderDepth||0)+1;if(c>2500)return(e=>e.map((function(e){return"text"in e?e.text:""})))(l);s.renderDepth=c;for(var u=s.key,d=[],f=!1,p=0;p<l.length;p++){var h;if(s.key=p,e){var m=Ii.bind(null,l[p],i,s,t,n,r,o,a);h=e(m,l[p],i,s)}else h=Ii(l[p],i,s,t,n,r,o,a);var v="string"==typeof h;if(v&&f)d[d.length-1]+=h;else if(null!==h)if(Array.isArray(h))for(var g=0;g<h.length;g++)d.push(h[g]);else d.push(h);f=v}return s.key=u,s.renderDepth=c-1,d};return i})(n.renderRule,s,o,r,u,n),f=d(e,{inline:n.forceInline,refs:u}),p=[];for(let e in u)e.charCodeAt(0)===$r&&p.push({identifier:e,footnote:u[e].target});if(p.length&&f.push(s("footer",{key:"footer"},p.map((function(e){let t=e.identifier.charCodeAt(0)===$r?e.identifier.slice(1):e.identifier,n=Li(e.footnote,{inline:!0,refs:u},c);return s("div",{id:r(t,Qo),key:e.identifier},t+": ",d(n,{inline:!0,refs:u}))})))),null===n.wrapper)return f;let h,m=n.wrapper||(n.forceInline?"span":"div");if(!(f.length>1||n.forceWrapper))return 1===f.length?f[0]:null;h=f;var v=n.wrapperProps?{...n.wrapperProps}:{};return v.children=h,Ti(m,v,"outer")}(Li(t?e:l,{inline:t,refs:a},i),{...i,forceInline:t})}(e)}var Fi=({children:e,options:t,...n})=>{if(!(typeof r.useContext<"u"))return Di(e??"",{...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}});let o=r.useContext(Ni),a=r.useMemo((()=>({...o,...t,overrides:{...o?.overrides,...t?.overrides},wrapperProps:{...o?.wrapperProps,...t?.wrapperProps,...n}})),[o,t,n]),i=e??"";return r.useMemo((()=>Di(i,a)),[i,a])};class ji extends o().Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.onError?.(e,t)}render(){return this.state.error?this.props.fallback:this.props.children}}const Bi=JSON.parse('{"error":"Markdown_error__L29wd","root":"Markdown_root__L29wd","tableWrapper":"Markdown_tableWrapper__L29wd"}');_r('\n/* Error fallback when markdown fails to parse */\n.Markdown_error__L29wd {\n\twhite-space: pre-wrap;\n\tword-break: break-word;\n}\n\n/* ── Root ── */\n.Markdown_root__L29wd {\n\tword-wrap: break-word;\n\tline-height: 1.5;\n\tfont-family: "Roboto Flex", sans-serif;\n\tfont-size: 14px;\n\tfont-weight: 400;\n\tletter-spacing: 0.15px;\n\tcolor: var(--reltio-color-text);\n}\n\n/* ── Paragraphs ── */\n.Markdown_root__L29wd p {\n\tmargin: 8px 0 7px 0;\n\tline-height: 1.5;\n}\n\n.Markdown_root__L29wd p:not(:last-child) {\n\tmargin-bottom: 0.5rem;\n}\n\n/* ── Headings ── */\n.Markdown_root__L29wd h1,\n.Markdown_root__L29wd h2,\n.Markdown_root__L29wd h3,\n.Markdown_root__L29wd h4,\n.Markdown_root__L29wd h5,\n.Markdown_root__L29wd h6 {\n\tmargin: 1rem 0 0.5rem 0;\n\tfont-weight: 600;\n\tfont-family: "Libre Franklin", sans-serif;\n}\n\n.Markdown_root__L29wd h1 {\n\tfont-size: 1.5rem;\n}\n\n.Markdown_root__L29wd h2 {\n\tfont-size: 1.25rem;\n}\n\n.Markdown_root__L29wd h3 {\n\tfont-size: 1.1rem;\n}\n\n.Markdown_root__L29wd h4 {\n\tfont-size: 1rem;\n}\n\n.Markdown_root__L29wd h5 {\n\tfont-size: 0.95rem;\n}\n\n.Markdown_root__L29wd h6 {\n\tfont-size: 0.9rem;\n}\n\n/* ── Emphasis ── */\n.Markdown_root__L29wd strong {\n\tfont-weight: 600;\n}\n\n.Markdown_root__L29wd em {\n\tfont-style: italic;\n}\n\n/* ── Lists ── */\n.Markdown_root__L29wd ul,\n.Markdown_root__L29wd ol {\n\tmargin: 0.5rem 0;\n\tpadding-left: 1.5rem;\n}\n\n.Markdown_root__L29wd li {\n\tmargin: 0.25rem 0;\n}\n\n/* ── Code ── */\n.Markdown_root__L29wd pre {\n\toverflow-x: auto;\n\tmargin: 0;\n\tbackground-color: var(--reltio-color-surface-2);\n\tborder-radius: 8px;\n\tpadding: 16px;\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n.Markdown_root__L29wd code {\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n\tbackground-color: var(--reltio-color-surface-2);\n\tpadding: 0.2em 0.4em;\n\tborder-radius: 3px;\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n.Markdown_root__L29wd pre code {\n\tbackground-color: transparent;\n\tpadding: 0;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n/* ── Links ── */\n.Markdown_root__L29wd a {\n\tcolor: var(--reltio-color-primary);\n\ttext-decoration: underline;\n}\n\n.Markdown_root__L29wd a:hover {\n\ttext-decoration: none;\n}\n\n/* ── Blockquote ── */\n.Markdown_root__L29wd blockquote {\n\tborder-left: 4px solid var(--reltio-color-border-2);\n\tmargin: 1rem 0;\n\tpadding-left: 1rem;\n\tcolor: var(--reltio-color-text-secondary);\n}\n\n/* ── Tables ── */\n.Markdown_tableWrapper__L29wd {\n\twidth: 100%;\n\tborder: 1px solid var(--reltio-color-border-2);\n\tborder-radius: 16px;\n\toverflow: auto;\n}\n\n.Markdown_tableWrapper__L29wd table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\tfont-family: "Roboto Flex", sans-serif;\n\tcolor: var(--reltio-color-text);\n\tbackground-color: var(--reltio-color-surface-1);\n\tfont-size: 14px;\n}\n\n.Markdown_tableWrapper__L29wd thead {\n\tposition: sticky;\n\ttop: 0;\n\tz-index: 1;\n\tbox-shadow: 0 1px 0 var(--reltio-color-border-2);\n}\n\n.Markdown_tableWrapper__L29wd th {\n\tpadding: 16px;\n\tfont-weight: 600;\n\ttext-align: left;\n\tborder-right: 1px solid var(--reltio-color-border-2);\n\tbackground-color: var(--reltio-color-surface-2);\n}\n\n.Markdown_tableWrapper__L29wd th:last-child {\n\tborder-right: none;\n}\n\n.Markdown_tableWrapper__L29wd td {\n\tpadding: 8px 16px;\n\tborder-bottom: 1px solid var(--reltio-color-border-2);\n\tborder-right: 1px solid var(--reltio-color-border-2);\n\ttext-align: left;\n\tbackground-color: var(--reltio-color-surface-1);\n}\n\n.Markdown_tableWrapper__L29wd td:last-child {\n\tborder-right: none;\n}\n\n.Markdown_tableWrapper__L29wd tr:hover td {\n\tbackground-color: var(--reltio-color-surface-2);\n}\n\n.Markdown_tableWrapper__L29wd tr:last-child td {\n\tborder-bottom: none;\n}\n\n/* ── Strikethrough ── */\n.Markdown_root__L29wd del {\n\ttext-decoration: line-through;\n\tcolor: var(--reltio-color-text-placeholder);\n}\n\n/* ── Checkboxes ── */\n.Markdown_root__L29wd input[type="checkbox"] {\n\tmargin-right: 8px;\n\tcursor: not-allowed;\n}\n\n/* ── Horizontal rule ── */\n.Markdown_root__L29wd hr {\n\tborder: none;\n\tborder-top: 1px solid var(--reltio-color-border-2);\n\tmargin: 1.5rem 0;\n}\n');const zi=Bi,Hi=({size:e="medium",color:t="inherited",className:n,style:r,"aria-label":o})=>(0,Ln.jsxs)("svg",{className:kr(Lr.root,Lr[e],Lr[t],n),style:r,viewBox:"0 0 24 24","aria-hidden":!o,"aria-label":o,role:o?"img":void 0,children:[(0,Ln.jsx)("path",{d:"M14,15c-.26,0-.51-.1-.71-.29-.39-.39-.39-1.02,0-1.41l1.29-1.29-1.29-1.29c-.39-.39-.39-1.02,0-1.41s1.02-.39,1.41,0l2,2c.39.39.39,1.02,0,1.41l-2,2c-.2.2-.45.29-.71.29ZM10,15c-.26,0-.51-.1-.71-.29l-2-2c-.39-.39-.39-1.02,0-1.41l2-2c.39-.39,1.02-.39,1.41,0s.39,1.02,0,1.41l-1.29,1.29,1.29,1.29c.39.39.39,1.02,0,1.41-.2.2-.45.29-.71.29Z"}),(0,Ln.jsx)("path",{d:"M12,22c-1.32,0-2.61-.26-3.83-.76-1.22-.5-2.31-1.23-3.24-2.17s-1.66-2.03-2.17-3.24c-.51-1.22-.76-2.51-.76-3.83s.26-2.61.76-3.83c.5-1.22,1.23-2.31,2.17-3.24.93-.93,2.02-1.66,3.24-2.17,2.44-1.01,5.21-1.01,7.65,0,1.22.5,2.31,1.23,3.24,2.17s1.66,2.02,2.17,3.24c.51,1.22.76,2.51.76,3.83s-.26,2.61-.76,3.83c-.5,1.22-1.23,2.31-2.17,3.24-.94.93-2.03,1.66-3.25,2.17s-2.51.76-3.83.76ZM12,4c-1.06,0-2.09.21-3.06.61-.98.4-1.85.99-2.59,1.73-.75.75-1.33,1.62-1.73,2.6-.4.98-.61,2.01-.61,3.06s.21,2.09.61,3.06.99,1.85,1.73,2.6c.75.75,1.62,1.33,2.6,1.73,1.95.81,4.18.81,6.12,0,.98-.4,1.85-.99,2.6-1.73.75-.75,1.33-1.62,1.73-2.6.4-.97.61-2,.61-3.06s-.21-2.09-.61-3.06c-.4-.98-.99-1.85-1.73-2.6-.75-.75-1.62-1.33-2.6-1.73s-2.01-.61-3.06-.61Z"})]}),Ui=JSON.parse('{"root":"Details_root__L29wd","summary":"Details_summary__L29wd","icon":"Details_icon__L29wd","summaryText":"Details_summaryText__L29wd","chevron":"Details_chevron__L29wd","chevronOpen":"Details_chevronOpen__L29wd","content":"Details_content__L29wd"}');_r('\n.Details_root__L29wd {\n\tmargin: 1rem 0;\n\tbackground-color: var(--reltio-color-surface-1);\n\tborder: 0.5px solid var(--reltio-color-border-2);\n\tborder-radius: 12px;\n\toverflow: hidden;\n\tpadding: 0;\n\tfont-family: "Roboto Flex", sans-serif;\n\tfont-size: 14px;\n}\n\n.Details_summary__L29wd {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tcursor: pointer;\n\tuser-select: none;\n\tlist-style: none;\n\tcolor: var(--reltio-color-text);\n\tline-height: 1.71;\n\tpadding: 12px;\n\tmargin: 0;\n\tborder-bottom-left-radius: 0;\n\tborder-bottom-right-radius: 0;\n\toutline: none;\n\tfont-weight: 500;\n}\n\n.Details_summary__L29wd:hover {\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\tvar(--reltio-color-primary) 12%,\n\t\ttransparent\n\t);\n}\n\n.Details_summary__L29wd::-webkit-details-marker {\n\tdisplay: none;\n}\n\n.Details_summary__L29wd::marker {\n\tdisplay: none;\n}\n\n.Details_icon__L29wd {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground-color: transparent;\n\tflex-shrink: 0;\n}\n\n.Details_summaryText__L29wd {\n\tflex: 1;\n\tfont-weight: 500;\n\tletter-spacing: 0.045px;\n}\n\n.Details_chevron__L29wd {\n\tflex-shrink: 0;\n\ttransition: transform 195ms cubic-bezier(0.4, 0, 0.2, 1);\n\tcolor: var(--reltio-color-text);\n\twidth: 24px;\n\theight: 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.Details_chevronOpen__L29wd {\n\ttransform: rotate(180deg);\n}\n\n.Details_content__L29wd {\n\tpadding: 0 12px 12px 12px;\n\tcolor: var(--reltio-color-text);\n\tline-height: 1.71;\n}\n\n.Details_content__L29wd pre {\n\tmargin: 0;\n\tbackground-color: var(--reltio-color-surface-2);\n\tborder-radius: 8px;\n\tpadding: 16px;\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n.Details_content__L29wd code {\n\tcolor: var(--reltio-color-text);\n\tbackground-color: var(--reltio-color-surface-2);\n\tpadding: 0.2em 0.4em;\n\tborder-radius: 3px;\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n}\n\n[data-theme="dark"] .Details_root__L29wd {\n\tbackground-color: var(--reltio-color-surface-2);\n}\n\n[data-theme="dark"] .Details_content__L29wd pre,\n[data-theme="dark"] .Details_content__L29wd code {\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\tvar(--reltio-color-border-2) 40%,\n\t\tvar(--reltio-color-surface-2)\n\t);\n}\n\n.Details_content__L29wd p {\n\tmargin-top: 8px;\n\tmargin-bottom: 8px;\n}\n');const Vi=Ui,Zi=({open:e=!1,children:t,className:n,...a})=>{const[i,l]=(0,r.useState)(e);(0,r.useEffect)((()=>{l(e)}),[e]);let s="Details";const c=[];return o().Children.forEach(t,(e=>{o().isValidElement(e)&&"string"==typeof e.type&&"summary"===e.type?s=e.props.children:null!=e&&c.push(e)})),(0,Ln.jsxs)("details",{className:kr(Vi.root,n),onToggle:e=>{const t=e.currentTarget;l(t.open)},open:e,...a,children:[(0,Ln.jsxs)("summary",{className:kr(Vi.summary),children:[(0,Ln.jsx)("span",{className:kr(Vi.icon),"aria-hidden":"true",children:(0,Ln.jsx)(Hi,{size:"small"})}),(0,Ln.jsx)("span",{className:kr(Vi.summaryText),children:s}),(0,Ln.jsx)("span",{className:kr(Vi.chevron,i&&Vi.chevronOpen),children:i?(0,Ln.jsx)(Ir,{size:"small","aria-hidden":"true"}):(0,Ln.jsx)(Dr,{size:"small","aria-hidden":"true"})})]}),(0,Ln.jsx)("div",{className:kr(Vi.content),children:c})]})},Ki={a:({node:e,href:t,...n})=>{const r=t&&(t.startsWith("http")||t.startsWith("//"));return(0,Ln.jsx)("a",{...n,href:t,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0})},table:({node:e,...t})=>(0,Ln.jsx)("div",{className:kr(zi.tableWrapper),children:(0,Ln.jsx)("table",{...t})}),button:({node:e,...t})=>(0,Ln.jsx)(Ar,{...t,className:kr(t.className)}),details:({node:e,...t})=>(0,Ln.jsx)(Zi,{...t,children:t.children}),li:({node:e,children:t,...n})=>{const o=r.Children.toArray(t)[0];return(0,r.isValidElement)(o)&&"checkbox"===o.props?.type?(0,Ln.jsx)("li",{...n,children:(0,Ln.jsx)("label",{children:t})}):(0,Ln.jsx)("li",{...n,children:t})}},qi={Button:Ar},Wi=({children:e,className:t,style:n,...r})=>{if(null==e)return null;const o=kr(zi.root,t);return(0,Ln.jsx)("div",{className:o,style:n,...r,children:(0,Ln.jsx)(ji,{fallback:(0,Ln.jsx)("pre",{className:kr(zi.error),children:e}),children:(0,Ln.jsx)(Fi,{options:{overrides:{...Ki,...qi},tagfilter:!0,sanitizer:Wo},children:"string"==typeof e?e:String(e)})})})},$i=JSON.parse('{"assistantMessageRoot":"AssistantMessage_assistantMessageRoot__L29wd"}');_r("\n.AssistantMessage_assistantMessageRoot__L29wd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tbackground-color: transparent;\n\tpadding: 0;\n\tborder-radius: 8px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n}\n");const Gi=$i,Yi=({children:e,errorMessage:t,className:n,style:r,...o})=>{const a=(e=>{if(null==e)return null;if("string"==typeof e){const t=e.trim();return t?(0,Ln.jsx)(Br,{children:t}):null}return e})(t),i=e.trim();return(0,Ln.jsxs)("div",{className:kr(Gi.assistantMessageRoot,n),style:r,...o,children:[a&&a,!a&&i&&(0,Ln.jsx)(Wi,{children:i})]})},Xi=JSON.parse('{"userMessageRoot":"UserMessage_userMessageRoot__L29wd"}');_r('\n.UserMessage_userMessageRoot__L29wd {\n\tdisplay: inline-flex;\n\tbackground-color: var(--reltio-color-surface-2);\n\tborder: 1px solid transparent;\n\tpadding: 12px 16px;\n\tborder-radius: 12px;\n}\n\n[data-theme="dark"] .UserMessage_userMessageRoot__L29wd {\n\tborder-color: var(--reltio-color-border-2);\n}\n');const Qi=Xi,Ji=({children:e,className:t,style:n,...r})=>{const o=null!=e&&""!==String(e).trim();return(0,Ln.jsx)("div",{className:kr(Qi.userMessageRoot,t),style:n,...r,children:o&&(0,Ln.jsx)(Wi,{children:e})})},el=((0,r.memo)((({message:e})=>"user"===e.role?(0,Ln.jsx)(Ji,{className:Rr.userMessage,children:e.content}):"assistant"===e.role?(0,Ln.jsx)(Yi,{children:e.content}):(0,Ln.jsx)(Ln.Fragment,{children:e.content??null}))),JSON.parse('{"root":"TextArea_root__L29wd","inputContainer":"TextArea_inputContainer__L29wd","textarea":"TextArea_textarea__L29wd","label":"TextArea_label__L29wd","supportingText":"TextArea_supportingText__L29wd","toolbar":"TextArea_toolbar__L29wd"}'));_r('\n.TextArea_root__L29wd {\n\tfont-family: "Roboto", sans-serif;\n\tcontainer-type: inline-size;\n}\n\n.TextArea_root__L29wd[data-disabled="true"] {\n\topacity: 0.38;\n\tcursor: not-allowed;\n}\n\n.TextArea_inputContainer__L29wd {\n\tposition: relative;\n\tdisplay: grid;\n\tgrid-template-columns: 1fr;\n\tgrid-template-rows: 1fr auto;\n\tgrid-template-areas:\n\t\t"textarea"\n\t\t"toolbar";\n\tmargin: 0;\n\tbox-sizing: border-box;\n\tborder-radius: 4px;\n\toutline: 1px solid var(--reltio-color-border-3);\n\tcursor: text;\n\ttransition:\n\t\toutline-color 0.1s ease,\n\t\toutline-width 0.1s ease;\n\tbackground: var(--reltio-color-surface-1);\n}\n\n.TextArea_root__L29wd:focus-within .TextArea_inputContainer__L29wd {\n\toutline: 2px solid var(--reltio-color-primary);\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_inputContainer__L29wd {\n\toutline-color: var(--reltio-color-error);\n}\n\n.TextArea_root__L29wd[data-error="true"]:focus-within .TextArea_inputContainer__L29wd {\n\toutline: 2px solid var(--reltio-color-error);\n}\n\n.TextArea_root__L29wd[data-disabled="true"] .TextArea_inputContainer__L29wd {\n\tcursor: not-allowed;\n}\n\n.TextArea_textarea__L29wd {\n\tgrid-area: textarea;\n\tposition: relative;\n\tdisplay: block;\n\tz-index: 1;\n\tborder: none;\n\toutline: none;\n\tbackground: none;\n\twidth: 100%;\n\tmin-height: 56px;\n\tmax-height: min(500px, 50cqh);\n\tborder-radius: 4px;\n\tbox-sizing: border-box;\n\tfont-size: 16px;\n\tfont-family: "Roboto", sans-serif;\n\tline-height: 1.5;\n\tresize: none;\n\tcolor: var(--reltio-color-text);\n\tpadding: 16px;\n\toverflow-y: auto;\n\tfield-sizing: content;\n}\n\n.TextArea_textarea__L29wd::placeholder {\n\tcolor: var(--reltio-color-text-secondary);\n}\n\n.TextArea_root__L29wd:focus-within .TextArea_textarea__L29wd::placeholder {\n\tcolor: var(--reltio-color-primary);\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_textarea__L29wd::placeholder {\n\tcolor: var(--reltio-color-error);\n}\n\n.TextArea_textarea__L29wd:disabled {\n\tcursor: not-allowed;\n}\n\n.TextArea_label__L29wd {\n\tposition: absolute;\n\topacity: 0;\n\ttop: 16px;\n\tleft: 8px;\n\ttransform: translateY(-50%);\n\ttransition: all 0.2s ease;\n\tbackground-color: var(--reltio-color-surface-1);\n\tpadding: 4px 8px;\n\tborder-radius: 4px;\n\tcolor: var(--reltio-color-text-secondary);\n\tz-index: 2;\n\tfont-size: 16px;\n\tfont-family: "Roboto", sans-serif;\n\tpointer-events: none;\n}\n\n.TextArea_textarea__L29wd:not(:placeholder-shown) + .TextArea_label__L29wd {\n\ttop: -1px;\n\tfont-size: 12px;\n\topacity: 1;\n}\n\n.TextArea_textarea__L29wd:focus + .TextArea_label__L29wd {\n\ttop: -1px;\n\tfont-size: 12px;\n\topacity: 1;\n}\n\n.TextArea_root__L29wd:focus-within .TextArea_label__L29wd {\n\tcolor: var(--reltio-color-primary);\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_label__L29wd {\n\tcolor: var(--reltio-color-error);\n}\n\n.TextArea_supportingText__L29wd {\n\tfont-size: 12px;\n\tpadding: 4px 16px;\n\tcolor: var(--reltio-color-text-secondary);\n\tfont-family: "Roboto", sans-serif;\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_supportingText__L29wd {\n\tcolor: var(--reltio-color-error);\n}\n\n.TextArea_toolbar__L29wd {\n\tgrid-area: toolbar;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 12px;\n\tpadding: 8px 12px;\n}\n');const tl=el;function nl(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rl(Object(n),!0).forEach((function(t){nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function al(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(0,r.forwardRef)((({label:e,error:t,supportingText:n,toolbar:r,className:o,...a},i)=>{const l=String(a.value??a.defaultValue??"").length>0;return(0,Ln.jsxs)("div",{"data-error":t||void 0,"data-disabled":a.disabled||void 0,"data-has-value":l||void 0,className:kr(tl.root,o),children:[(0,Ln.jsxs)("label",{className:kr(tl.inputContainer),children:[(0,Ln.jsx)("textarea",{ref:i,className:kr(tl.textarea),placeholder:e||a.placeholder,"aria-invalid":t||void 0,...a}),e&&(0,Ln.jsx)("span",{className:kr(tl.label),children:e}),r&&(0,Ln.jsx)("div",{className:kr(tl.toolbar),children:r})]}),n&&(0,Ln.jsx)("div",{className:kr(tl.supportingText),children:n})]})})).displayName="TextArea";var il=n(8960);function ll(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,il.Z)(e,t)}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sl(e)}function cl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cl=function(){return!!e})()}function ul(e,t){if(t&&("object"==I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,z.Z)(e)}function dl(e){var t=cl();return function(){var n,r=sl(e);if(t){var o=sl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ul(this,n)}}var fl={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=fl.F1&&t<=fl.F12)return!1;switch(t){case fl.ALT:case fl.CAPS_LOCK:case fl.CONTEXT_MENU:case fl.CTRL:case fl.DOWN:case fl.END:case fl.ESC:case fl.HOME:case fl.INSERT:case fl.LEFT:case fl.MAC_FF_META:case fl.META:case fl.NUMLOCK:case fl.NUM_CENTER:case fl.PAGE_DOWN:case fl.PAGE_UP:case fl.PAUSE:case fl.PRINT_SCREEN:case fl.RIGHT:case fl.SHIFT:case fl.UP:case fl.WIN_KEY:case fl.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=fl.ZERO&&e<=fl.NINE)return!0;if(e>=fl.NUM_ZERO&&e<=fl.NUM_MULTIPLY)return!0;if(e>=fl.A&&e<=fl.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case fl.SPACE:case fl.QUESTION_MARK:case fl.NUM_PLUS:case fl.NUM_MINUS:case fl.NUM_PERIOD:case fl.NUM_DIVISION:case fl.SEMICOLON:case fl.DASH:case fl.EQUALS:case fl.COMMA:case fl.PERIOD:case fl.SLASH:case fl.APOSTROPHE:case fl.SINGLE_QUOTE:case fl.OPEN_SQUARE_BRACKET:case fl.BACKSLASH:case fl.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const pl=fl;var hl="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function ml(e,t){return 0===e.indexOf(t)}function vl(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:ol({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||ml(n,"aria-"))||t.data&&ml(n,"data-")||t.attr&&hl.includes(n))&&(r[n]=e[n])})),r}var gl={},yl=[];function bl(e,t){}function xl(e,t){}function El(e,t,n){t||gl[n]||(e(!1,n),gl[n]=!0)}function Cl(e,t){El(bl,e,t)}Cl.preMessage=function(e){yl.push(e)},Cl.resetWarned=function(){gl={}},Cl.noteOnce=function(e,t){El(xl,e,t)};const wl=Cl;var _l=r.createContext(null),kl=r.createContext({});function Ol(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Sl(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,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||Lt(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 Al(e,t){if(null==e)return{};var n,r,o=(0,P.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ml(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Ll=Ml()?r.useLayoutEffect:r.useEffect;const Pl=function(e,t){var n=r.useRef(!0);Ll((function(){return e(n.current)}),t),Ll((function(){return n.current=!1,function(){n.current=!0}}),[])};var Rl=Symbol.for("react.element"),Tl=Symbol.for("react.transitional.element"),Nl=Symbol.for("react.fragment");function Il(e){return e&&"object"===I(e)&&(e.$$typeof===Rl||e.$$typeof===Tl)&&e.type===Nl}function Dl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return o().Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(Dl(e)):Il(e)&&e.props?n=n.concat(Dl(e.props.children,t)):n.push(e))})),n}var Fl=n(7111),jl=n.n(Fl);function Bl(e){return e instanceof HTMLElement||e instanceof SVGElement}function zl(e){var t,n=function(e){return e&&"object"===I(e)&&Bl(e.nativeElement)?e.nativeElement:Bl(e)?e:null}(e);return n||(e instanceof o().Component?null===(t=jl().findDOMNode)||void 0===t?void 0:t.call(jl(),e):null)}var Hl=n(1818),Ul=Number(r.version.split(".")[0]),Vl=function(e,t){"function"==typeof e?e(t):"object"===I(e)&&e&&"current"in e&&(e.current=t)},Zl=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){t.forEach((function(t){Vl(t,e)}))}},Kl=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o=t,"value"in(a=r.useRef({})).current&&!function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}(a.current.condition,o)||(a.current.value=Zl.apply(void 0,t),a.current.condition=o),a.current.value;var o,a},ql=function(e){var t,n;if(!e)return!1;if(Wl(e)&&Ul>=19)return!0;var r=(0,Hl.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===Hl.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===Hl.ForwardRef)};function Wl(e){return(0,r.isValidElement)(e)&&!Il(e)}var $l=function(e){if(e&&Wl(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},Gl=r.createContext(null),Yl=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),Xl="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Ql=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Jl="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Ql):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},es=["top","right","bottom","left","width","height","size","weight"],ts="undefined"!=typeof MutationObserver,ns=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&l()}function i(){Jl(a)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(i,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Xl&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ts?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Xl&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t,r=es.some((function(e){return!!~n.indexOf(e)}));r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),rs=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},os=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Ql},as=us(0,0,0,0);function is(e){return parseFloat(e)||0}function ls(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+is(e["border-"+n+"-width"])}),0)}var ss="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof os(e).SVGGraphicsElement}:function(e){return e instanceof os(e).SVGElement&&"function"==typeof e.getBBox};function cs(e){return Xl?ss(e)?function(e){var t=e.getBBox();return us(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return as;var r=os(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],a=e["padding-"+o];t[o]=is(a)}return t}(r),a=o.left+o.right,i=o.top+o.bottom,l=is(r.width),s=is(r.height);if("border-box"===r.boxSizing&&(Math.round(l+a)!==t&&(l-=ls(r,"left","right")+a),Math.round(s+i)!==n&&(s-=ls(r,"top","bottom")+i)),!function(e){return e===os(e).document.documentElement}(e)){var c=Math.round(l+a)-t,u=Math.round(s+i)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return us(o.left,o.top,l,s)}(e):as}function us(e,t,n,r){return{x:e,y:t,width:n,height:r}}var ds=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=us(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=cs(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),fs=function(e,t){var n,r,o,a,i,l,s,c=(r=(n=t).x,o=n.y,a=n.width,i=n.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(l.prototype),rs(s,{x:r,y:o,width:a,height:i,top:o,right:r+a,bottom:i+o,left:r}),s);rs(this,{target:e,contentRect:c})},ps=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Yl,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof os(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new ds(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof os(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new fs(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),hs="undefined"!=typeof WeakMap?new WeakMap:new Yl,ms=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ns.getInstance(),r=new ps(t,n,this);hs.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){ms.prototype[e]=function(){var t;return(t=hs.get(this))[e].apply(t,arguments)}}));const vs=void 0!==Ql.ResizeObserver?Ql.ResizeObserver:ms;var gs=new Map,ys=new vs((function(e){e.forEach((function(e){var t,n=e.target;null===(t=gs.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))})),bs=function(e){ll(n,e);var t=dl(n);function n(){return al(this,n),t.apply(this,arguments)}return j(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);function xs(e,t){var n=e.children,o=e.disabled,a=r.useRef(null),i=r.useRef(null),l=r.useContext(Gl),s="function"==typeof n,c=s?n(a):n,u=r.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!s&&r.isValidElement(c)&&ql(c),f=d?$l(c):null,p=Kl(f,a),h=function(){var e;return zl(a.current)||(a.current&&"object"===I(a.current)?zl(null===(e=a.current)||void 0===e?void 0:e.nativeElement):null)||zl(i.current)};r.useImperativeHandle(t,(function(){return h()}));var m=r.useRef(e);m.current=e;var v=r.useCallback((function(e){var t=m.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),a=o.width,i=o.height,s=e.offsetWidth,c=e.offsetHeight,d=Math.floor(a),f=Math.floor(i);if(u.current.width!==d||u.current.height!==f||u.current.offsetWidth!==s||u.current.offsetHeight!==c){var p={width:d,height:f,offsetWidth:s,offsetHeight:c};u.current=p;var h=s===Math.round(a)?a:s,v=c===Math.round(i)?i:c,g=ol(ol({},p),{},{offsetWidth:h,offsetHeight:v});null==l||l(g,e,r),n&&Promise.resolve().then((function(){n(g,e)}))}}),[]);return r.useEffect((function(){var e,t,n=h();return n&&!o&&(e=n,t=v,gs.has(e)||(gs.set(e,new Set),ys.observe(e)),gs.get(e).add(t)),function(){return function(e,t){gs.has(e)&&(gs.get(e).delete(t),gs.get(e).size||(ys.unobserve(e),gs.delete(e)))}(n,v)}}),[a.current,o]),r.createElement(bs,{ref:i},d?r.cloneElement(c,{ref:p}):c)}const Es=r.forwardRef(xs);function Cs(e,t){var n=e.children;return("function"==typeof n?[n]:Dl(n)).map((function(n,o){var a=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return r.createElement(Es,(0,R.Z)({},e,{key:a,ref:0===o?t:void 0}),n)}))}var ws=r.forwardRef(Cs);ws.Collection=function(e){var t=e.children,n=e.onBatchResize,o=r.useRef(0),a=r.useRef([]),i=r.useContext(Gl),l=r.useCallback((function(e,t,r){o.current+=1;var l=o.current;a.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){l===o.current&&(null==n||n(a.current),a.current=[])})),null==i||i(e,t,r)}),[n,i]);return r.createElement(Gl.Provider,{value:l},t)};const _s=ws;function ks(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}function Os(e){var t=r.useRef(!1),n=Sl(r.useState(e),2),o=n[0],a=n[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[o,function(e,n){n&&t.current||a(e)}]}"undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;var Ss=r.forwardRef((function(e,t){var n=e.height,o=e.offsetY,a=e.offsetX,i=e.children,l=e.prefixCls,s=e.onInnerResize,c=e.innerProps,u=e.rtl,d=e.extra,p={},h={display:"flex",flexDirection:"column"};return void 0!==o&&(p={height:n,position:"relative",overflow:"hidden"},h=ol(ol({},h),{},nl(nl(nl(nl(nl({transform:"translateY(".concat(o,"px)")},u?"marginRight":"marginLeft",-a),"position","absolute"),"left",0),"right",0),"top",0))),r.createElement("div",{style:p},r.createElement(_s,{onResize:function(e){e.offsetHeight&&s&&s()}},r.createElement("div",(0,R.Z)({style:h,className:f()(nl({},"".concat(l,"-holder-inner"),l)),ref:t},c),i,d)))}));Ss.displayName="Filler";const As=Ss;function Ms(e){var t=e.children,n=e.setRef,o=r.useCallback((function(e){n(e)}),[]);return r.cloneElement(t,{ref:o})}var Ls=function(e){return+setTimeout(e,16)},Ps=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(Ls=function(e){return window.requestAnimationFrame(e)},Ps=function(e){return window.cancelAnimationFrame(e)});var Rs=0,Ts=new Map;function Ns(e){Ts.delete(e)}var Is=function(e){var t=Rs+=1;return function n(r){if(0===r)Ns(t),e();else{var o=Ls((function(){n(r-1)}));Ts.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};Is.cancel=function(e){var t=Ts.get(e);return Ns(e),Ps(t)};const Ds=Is,Fs="object"===("undefined"==typeof navigator?"undefined":I(navigator))&&/Firefox/i.test(navigator.userAgent),js=function(e,t,n,o){var a=(0,r.useRef)(!1),i=(0,r.useRef)(null),l=(0,r.useRef)({top:e,bottom:t,left:n,right:o});return l.current.top=e,l.current.bottom=t,l.current.left=n,l.current.right=o,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e?t<0&&l.current.left||t>0&&l.current.right:t<0&&l.current.top||t>0&&l.current.bottom;return n&&r?(clearTimeout(i.current),a.current=!1):r&&!a.current||(clearTimeout(i.current),a.current=!0,i.current=setTimeout((function(){a.current=!1}),50)),!a.current&&r}};var Bs=function(){function e(){al(this,e),nl(this,"maps",void 0),nl(this,"id",0),nl(this,"diffRecords",new Map),this.maps=Object.create(null)}return j(e,[{key:"set",value:function(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();const zs=Bs;function Hs(e){var t=parseFloat(e);return isNaN(t)?0:t}var Us=14/15;function Vs(e){return Math.floor(Math.pow(e,.5))}function Zs(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var Ks=r.forwardRef((function(e,t){var n=e.prefixCls,o=e.rtl,a=e.scrollOffset,i=e.scrollRange,l=e.onStartMove,s=e.onStopMove,c=e.onScroll,u=e.horizontal,d=e.spinSize,p=e.containerSize,h=e.style,m=e.thumbStyle,v=e.showScrollBar,g=Sl(r.useState(!1),2),y=g[0],b=g[1],x=Sl(r.useState(null),2),E=x[0],C=x[1],w=Sl(r.useState(null),2),_=w[0],k=w[1],O=!o,S=r.useRef(),A=r.useRef(),M=Sl(r.useState(v),2),L=M[0],P=M[1],R=r.useRef(),T=function(){!0!==v&&!1!==v&&(clearTimeout(R.current),P(!0),R.current=setTimeout((function(){P(!1)}),3e3))},N=i-p||0,I=p-d||0,D=r.useMemo((function(){return 0===a||0===N?0:a/N*I}),[a,N,I]),F=r.useRef({top:D,dragging:y,pageY:E,startTop:_});F.current={top:D,dragging:y,pageY:E,startTop:_};var j=function(e){b(!0),C(Zs(e,u)),k(F.current.top),l(),e.stopPropagation(),e.preventDefault()};r.useEffect((function(){var e=function(e){e.preventDefault()},t=S.current,n=A.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",j,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",j)}}),[]);var B=r.useRef();B.current=N;var z=r.useRef();z.current=I,r.useEffect((function(){if(y){var e,t=function(t){var n=F.current,r=n.dragging,o=n.pageY,a=n.startTop;Ds.cancel(e);var i=S.current.getBoundingClientRect(),l=p/(u?i.width:i.height);if(r){var s=(Zs(t,u)-o)*l,d=a;!O&&u?d-=s:d+=s;var f=B.current,h=z.current,m=h?d/h:0,v=Math.ceil(m*f);v=Math.max(v,0),v=Math.min(v,f),e=Ds((function(){c(v,u)}))}},n=function(){b(!1),s()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Ds.cancel(e)}}}),[y]),r.useEffect((function(){return T(),function(){clearTimeout(R.current)}}),[a]),r.useImperativeHandle(t,(function(){return{delayHidden:T}}));var H="".concat(n,"-scrollbar"),U={position:"absolute",visibility:L?null:"hidden"},V={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return u?(Object.assign(U,{height:8,left:0,right:0,bottom:0}),Object.assign(V,nl({height:"100%",width:d},O?"left":"right",D))):(Object.assign(U,nl({width:8,top:0,bottom:0},O?"right":"left",0)),Object.assign(V,{width:"100%",height:d,top:D})),r.createElement("div",{ref:S,className:f()(H,nl(nl(nl({},"".concat(H,"-horizontal"),u),"".concat(H,"-vertical"),!u),"".concat(H,"-visible"),L)),style:ol(ol({},U),h),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:T},r.createElement("div",{ref:A,className:f()("".concat(H,"-thumb"),nl({},"".concat(H,"-thumb-moving"),y)),style:ol(ol({},V),m),onMouseDown:j}))}));const qs=Ks;var Ws=20;function $s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*e;return isNaN(t)&&(t=0),t=Math.max(t,Ws),Math.floor(t)}var Gs=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ys=[],Xs={overflowY:"auto",overflowAnchor:"none"};function Qs(e,t){var n=e.prefixCls,o=void 0===n?"rc-virtual-list":n,a=e.className,i=e.height,l=e.itemHeight,s=e.fullHeight,c=void 0===s||s,u=e.style,d=e.data,p=e.children,h=e.itemKey,m=e.virtual,v=e.direction,g=e.scrollWidth,y=e.component,b=void 0===y?"div":y,x=e.onScroll,E=e.onVirtualScroll,C=e.onVisibleChange,w=e.innerProps,_=e.extraRender,k=e.styles,O=e.showScrollBar,S=void 0===O?"optional":O,A=Al(e,Gs),M=r.useCallback((function(e){return"function"==typeof h?h(e):null==e?void 0:e[h]}),[h]),L=function(e){var t=Sl(r.useState(0),2),n=t[0],o=t[1],a=(0,r.useRef)(new Map),i=(0,r.useRef)(new zs),l=(0,r.useRef)(0);function s(){l.current+=1}function c(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];s();var t=function(){var e=!1;a.current.forEach((function(t,n){if(t&&t.offsetParent){var r=t.offsetHeight,o=getComputedStyle(t),a=o.marginTop,l=o.marginBottom,s=r+Hs(a)+Hs(l);i.current.get(n)!==s&&(i.current.set(n,s),e=!0)}})),e&&o((function(e){return e+1}))};if(e)t();else{l.current+=1;var n=l.current;Promise.resolve().then((function(){n===l.current&&t()}))}}return(0,r.useEffect)((function(){return s}),[]),[function(t,n){var r=e(t);a.current.get(r);n?(a.current.set(r,n),c()):a.current.delete(r)},c,i.current,n]}(M),P=Sl(L,4),T=P[0],N=P[1],D=P[2],F=P[3],j=!(!1===m||!i||!l),B=r.useMemo((function(){return Object.values(D.maps).reduce((function(e,t){return e+t}),0)}),[D.id,D.maps]),z=j&&d&&(Math.max(l*d.length,B)>i||!!g),H="rtl"===v,U=f()(o,nl({},"".concat(o,"-rtl"),H),a),V=d||Ys,Z=(0,r.useRef)(),K=(0,r.useRef)(),q=(0,r.useRef)(),W=Sl((0,r.useState)(0),2),$=W[0],G=W[1],Y=Sl((0,r.useState)(0),2),X=Y[0],Q=Y[1],J=Sl((0,r.useState)(!1),2),ee=J[0],te=J[1],ne=function(){te(!0)},re=function(){te(!1)},oe={getKey:M};function ae(e){G((function(t){var n=function(e){var t=e;return Number.isNaN(Ce.current)||(t=Math.min(t,Ce.current)),t=Math.max(t,0)}("function"==typeof e?e(t):e);return Z.current.scrollTop=n,n}))}var ie=(0,r.useRef)({start:0,end:V.length}),le=(0,r.useRef)(),se=Sl(function(e,t,n){var o=Sl(r.useState(e),2),a=o[0],i=o[1],l=Sl(r.useState(null),2),s=l[0],c=l[1];return r.useEffect((function(){var r=function(e,t,n){var r,o,a=e.length,i=t.length;if(0===a&&0===i)return null;a<i?(r=e,o=t):(r=t,o=e);var l={__EMPTY_ITEM__:!0};function s(e){return void 0!==e?n(e):l}for(var c=null,u=1!==Math.abs(a-i),d=0;d<o.length;d+=1){var f=s(r[d]);if(f!==s(o[d])){c=d,u=u||f!==s(o[d+1]);break}}return null===c?null:{index:c,multiple:u}}(a||[],e||[],t);void 0!==(null==r?void 0:r.index)&&(null==n||n(r.index),c(e[r.index])),i(e)}),[e]),[s]}(V,M),1)[0];le.current=se;var ce=r.useMemo((function(){if(!j)return{scrollHeight:void 0,start:0,end:V.length-1,offset:void 0};var e;if(!z)return{scrollHeight:(null===(e=K.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:V.length-1,offset:void 0};for(var t,n,r,o=0,a=V.length,s=0;s<a;s+=1){var c=V[s],u=M(c),d=D.get(u),f=o+(void 0===d?l:d);f>=$&&void 0===t&&(t=s,n=o),f>$+i&&void 0===r&&(r=s),o=f}return void 0===t&&(t=0,n=0,r=Math.ceil(i/l)),void 0===r&&(r=V.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,V.length-1),offset:n}}),[z,j,$,V,F,i]),ue=ce.scrollHeight,de=ce.start,fe=ce.end,pe=ce.offset;ie.current.start=de,ie.current.end=fe,r.useLayoutEffect((function(){var e=D.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),r=V[de];if(r&&void 0===n&&M(r)===t){var o=D.get(t)-l;ae((function(e){return e+o}))}}D.resetRecord()}),[ue]);var he=Sl(r.useState({width:0,height:i}),2),me=he[0],ve=he[1],ge=(0,r.useRef)(),ye=(0,r.useRef)(),be=r.useMemo((function(){return $s(me.width,g)}),[me.width,g]),xe=r.useMemo((function(){return $s(me.height,ue)}),[me.height,ue]),Ee=ue-i,Ce=(0,r.useRef)(Ee);Ce.current=Ee;var we=$<=0,_e=$>=Ee,ke=X<=0,Oe=X>=g,Se=js(we,_e,ke,Oe),Ae=function(){return{x:H?-X:X,y:$}},Me=(0,r.useRef)(Ae()),Le=ks((function(e){if(E){var t=ol(ol({},Ae()),e);Me.current.x===t.x&&Me.current.y===t.y||(E(t),Me.current=t)}}));function Pe(e,t){var n=e;t?((0,Fl.flushSync)((function(){Q(n)})),Le()):ae(n)}var Re=function(e){var t=e,n=g?g-me.width:0;return t=Math.max(t,0),Math.min(t,n)},Te=ks((function(e,t){t?((0,Fl.flushSync)((function(){Q((function(t){return Re(t+(H?-e:e))}))})),Le()):ae((function(t){return t+e}))})),Ne=Sl(function(e,t,n,o,a,i,l){var s=(0,r.useRef)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(!1),f=js(t,n,o,a),p=(0,r.useRef)(null),h=(0,r.useRef)(null);return[function(t){if(e){Ds.cancel(h.current),h.current=Ds((function(){p.current=null}),2);var n=t.deltaX,r=t.deltaY,o=t.shiftKey,a=n,m=r;("sx"===p.current||!p.current&&o&&r&&!n)&&(a=r,m=0,p.current="sx");var v=Math.abs(a),g=Math.abs(m);null===p.current&&(p.current=i&&v>g?"x":"y"),"y"===p.current?function(e,t){if(Ds.cancel(c.current),!f(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,s.current+=t,u.current=t,Fs||n.preventDefault(),c.current=Ds((function(){var e=d.current?10:1;l(s.current*e,!1),s.current=0})))}}(t,m):function(e,t){l(t,!0),Fs||e.preventDefault()}(t,a)}},function(t){e&&(d.current=t.detail===u.current)}]}(j,we,_e,ke,Oe,!!g,Te),2),Ie=Ne[0],De=Ne[1];!function(e,t,n){var o,a=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useRef)(0),s=(0,r.useRef)(null),c=(0,r.useRef)(null),u=function(e){if(a.current){var t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,s=l.current-r,u=Math.abs(o)>Math.abs(s);u?i.current=t:l.current=r;var d=n(u,u?o:s,!1,e);d&&e.preventDefault(),clearInterval(c.current),d&&(c.current=setInterval((function(){u?o*=Us:s*=Us;var e=Math.floor(u?o:s);(!n(u,e,!0)||Math.abs(e)<=.1)&&clearInterval(c.current)}),16))}},d=function(){a.current=!1,o()},f=function(e){o(),1!==e.touches.length||a.current||(a.current=!0,i.current=Math.ceil(e.touches[0].pageX),l.current=Math.ceil(e.touches[0].pageY),s.current=e.target,s.current.addEventListener("touchmove",u,{passive:!1}),s.current.addEventListener("touchend",d,{passive:!0}))};o=function(){s.current&&(s.current.removeEventListener("touchmove",u),s.current.removeEventListener("touchend",d))},Pl((function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",f),o(),clearInterval(c.current)}}),[e])}(j,Z,(function(e,t,n,r){var o=r;return!(Se(e,t,n)||o&&o._virtualHandled||(o&&(o._virtualHandled=!0),Ie({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),0))})),function(e,t){r.useEffect((function(){var n=t.current;if(e&&n){var r,o,a=!1,i=function(){Ds.cancel(r)},l=function e(){i(),r=Ds((function(){var t;t=o,ae((function(e){return e+t})),e()}))},s=function(){a=!1,i()},c=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,a=!0)}},u=function(e){if(a){var t=Zs(e,!1),r=n.getBoundingClientRect(),s=r.top,c=r.bottom;t<=s?(o=-Vs(s-t),l()):t>=c?(o=Vs(t-c),l()):i()}};return n.addEventListener("mousedown",c),n.ownerDocument.addEventListener("mouseup",s),n.ownerDocument.addEventListener("mousemove",u),n.ownerDocument.addEventListener("dragend",s),function(){n.removeEventListener("mousedown",c),n.ownerDocument.removeEventListener("mouseup",s),n.ownerDocument.removeEventListener("mousemove",u),n.ownerDocument.removeEventListener("dragend",s),i()}}}),[e])}(z,Z),Pl((function(){function e(e){var t=we&&e.detail<0,n=_e&&e.detail>0;!j||t||n||e.preventDefault()}var t=Z.current;return t.addEventListener("wheel",Ie,{passive:!1}),t.addEventListener("DOMMouseScroll",De,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",Ie),t.removeEventListener("DOMMouseScroll",De),t.removeEventListener("MozMousePixelScroll",e)}}),[j,we,_e]),Pl((function(){if(g){var e=Re(X);Q(e),Le({x:e})}}),[me.width,g]);var Fe=function(){var e,t;null===(e=ge.current)||void 0===e||e.delayHidden(),null===(t=ye.current)||void 0===t||t.delayHidden()},je=function(e,t,n,o,a,i,l,s){var c=r.useRef(),u=Sl(r.useState(null),2),d=u[0],f=u[1];return Pl((function(){if(d&&d.times<10){if(!e.current)return void f((function(e){return ol({},e)}));i();var r=d.targetAlign,s=d.originAlign,c=d.index,u=d.offset,p=e.current.clientHeight,h=!1,m=r,v=null;if(p){for(var g=r||s,y=0,b=0,x=0,E=Math.min(t.length-1,c),C=0;C<=E;C+=1){var w=a(t[C]);b=y;var _=n.get(w);y=x=b+(void 0===_?o:_)}for(var k="top"===g?u:p-u,O=E;O>=0;O-=1){var S=a(t[O]),A=n.get(S);if(void 0===A){h=!0;break}if((k-=A)<=0)break}switch(g){case"top":v=b-u;break;case"bottom":v=x-p+u;break;default:var M=e.current.scrollTop;b<M?m="top":x>M+p&&(m="bottom")}null!==v&&l(v),v!==d.lastTop&&(h=!0)}h&&f(ol(ol({},d),{},{times:d.times+1,targetAlign:m,lastTop:v}))}}),[d,e.current]),function(e){if(null!=e){if(Ds.cancel(c.current),"number"==typeof e)l(e);else if(e&&"object"===I(e)){var n,r=e.align;n="index"in e?e.index:t.findIndex((function(t){return a(t)===e.key}));var o=e.offset;f({times:0,index:n,offset:void 0===o?0:o,originAlign:r})}}else s()}}(Z,V,D,l,M,(function(){return N(!0)}),ae,Fe);r.useImperativeHandle(t,(function(){return{nativeElement:q.current,getScrollInfo:Ae,scrollTo:function(e){var t;(t=e)&&"object"===I(t)&&("left"in t||"top"in t)?(void 0!==e.left&&Q(Re(e.left)),je(e.top)):je(e)}}})),Pl((function(){if(C){var e=V.slice(de,fe+1);C(e,V)}}),[de,fe,V]);var Be=function(e,t,n,o){var a=Sl(r.useMemo((function(){return[new Map,[]]}),[e,n.id,o]),2),i=a[0],l=a[1];return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,s=i.get(r),c=i.get(a);if(void 0===s||void 0===c)for(var u=e.length,d=l.length;d<u;d+=1){var f,p=e[d],h=t(p);i.set(h,d);var m=null!==(f=n.get(h))&&void 0!==f?f:o;if(l[d]=(l[d-1]||0)+m,h===r&&(s=d),h===a&&(c=d),void 0!==s&&void 0!==c)break}return{top:l[s-1]||0,bottom:l[c]}}}(V,M,D,l),ze=null==_?void 0:_({start:de,end:fe,virtual:z,offsetX:X,offsetY:pe,rtl:H,getSize:Be}),He=function(e,t,n,o,a,i,l,s){var c=s.getKey;return e.slice(t,n+1).map((function(e,n){var s=l(e,t+n,{style:{width:o},offsetX:a}),u=c(e);return r.createElement(Ms,{key:u,setRef:function(t){return i(e,t)}},s)}))}(V,de,fe,g,X,T,p,oe),Ue=null;i&&(Ue=ol(nl({},c?"height":"maxHeight",i),Xs),j&&(Ue.overflowY="hidden",g&&(Ue.overflowX="hidden"),ee&&(Ue.pointerEvents="none")));var Ve={};return H&&(Ve.dir="rtl"),r.createElement("div",(0,R.Z)({ref:q,style:ol(ol({},u),{},{position:"relative"}),className:U},Ve,A),r.createElement(_s,{onResize:function(e){ve({width:e.offsetWidth,height:e.offsetHeight})}},r.createElement(b,{className:"".concat(o,"-holder"),style:Ue,ref:Z,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==$&&ae(t),null==x||x(e),Le()},onMouseEnter:Fe},r.createElement(As,{prefixCls:o,height:ue,offsetX:X,offsetY:pe,scrollWidth:g,onInnerResize:N,ref:K,innerProps:w,rtl:H,extra:ze},He))),z&&ue>i&&r.createElement(qs,{ref:ge,prefixCls:o,scrollOffset:$,scrollRange:ue,rtl:H,onScroll:Pe,onStartMove:ne,onStopMove:re,spinSize:xe,containerSize:me.height,style:null==k?void 0:k.verticalScrollBar,thumbStyle:null==k?void 0:k.verticalScrollBarThumb,showScrollBar:S}),z&&g>me.width&&r.createElement(qs,{ref:ye,prefixCls:o,scrollOffset:X,scrollRange:g,rtl:H,onScroll:Pe,onStartMove:ne,onStopMove:re,spinSize:be,containerSize:me.width,horizontal:!0,style:null==k?void 0:k.horizontalScrollBar,thumbStyle:null==k?void 0:k.horizontalScrollBarThumb,showScrollBar:S}))}var Js=r.forwardRef(Qs);Js.displayName="List";const ec=Js;var tc=r.createContext({}),nc=function(e){ll(n,e);var t=dl(n);function n(){return al(this,n),t.apply(this,arguments)}return j(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);const rc=nc;var oc="none",ac="appear",ic="enter",lc="leave",sc="none",cc="prepare",uc="start",dc="active",fc="end",pc="prepared";function hc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var mc,vc,gc,yc=(mc=Ml(),vc="undefined"!=typeof window?window:{},gc={animationend:hc("Animation","AnimationEnd"),transitionend:hc("Transition","TransitionEnd")},mc&&("AnimationEvent"in vc||delete gc.animationend.animation,"TransitionEvent"in vc||delete gc.transitionend.transition),gc),bc={};if(Ml()){var xc=document.createElement("div");bc=xc.style}var Ec={};function Cc(e){if(Ec[e])return Ec[e];var t=yc[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in bc)return Ec[e]=t[a],Ec[e]}return""}var wc=Cc("animationend"),_c=Cc("transitionend"),kc=!(!wc||!_c),Oc=wc||"animationend",Sc=_c||"transitionend";function Ac(e,t){return e?"object"===I(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}const Mc=Ml()?r.useLayoutEffect:r.useEffect;var Lc=[cc,uc,dc,fc],Pc=[cc,pc],Rc=!1;function Tc(e){return e===dc||e===fc}function Nc(e,t,n,o){var a,i,l,s=o.motionEnter,c=void 0===s||s,u=o.motionAppear,d=void 0===u||u,f=o.motionLeave,p=void 0===f||f,h=o.motionDeadline,m=o.motionLeaveImmediately,v=o.onAppearPrepare,g=o.onEnterPrepare,y=o.onLeavePrepare,b=o.onAppearStart,x=o.onEnterStart,E=o.onLeaveStart,C=o.onAppearActive,w=o.onEnterActive,_=o.onLeaveActive,k=o.onAppearEnd,O=o.onEnterEnd,S=o.onLeaveEnd,A=o.onVisibleChanged,M=Sl(Os(),2),L=M[0],P=M[1],R=(a=oc,i=Sl(r.useReducer((function(e){return e+1}),0),2)[1],l=r.useRef(a),[ks((function(){return l.current})),ks((function(e){l.current="function"==typeof e?e(l.current):e,i()}))]),T=Sl(R,2),N=T[0],I=T[1],D=Sl(Os(null),2),F=D[0],j=D[1],B=N(),z=(0,r.useRef)(!1),H=(0,r.useRef)(null);function U(){return n()}var V=(0,r.useRef)(!1);function Z(){I(oc),j(null,!0)}var K=ks((function(e){var t=N();if(t!==oc){var n=U();if(!e||e.deadline||e.target===n){var r,o=V.current;t===ac&&o?r=null==k?void 0:k(n,e):t===ic&&o?r=null==O?void 0:O(n,e):t===lc&&o&&(r=null==S?void 0:S(n,e)),o&&!1!==r&&Z()}}})),q=Sl(function(e){var t=(0,r.useRef)();function n(t){t&&(t.removeEventListener(Sc,e),t.removeEventListener(Oc,e))}return r.useEffect((function(){return function(){n(t.current)}}),[]),[function(r){t.current&&t.current!==r&&n(t.current),r&&r!==t.current&&(r.addEventListener(Sc,e),r.addEventListener(Oc,e),t.current=r)},n]}(K),1)[0],W=function(e){switch(e){case ac:return nl(nl(nl({},cc,v),uc,b),dc,C);case ic:return nl(nl(nl({},cc,g),uc,x),dc,w);case lc:return nl(nl(nl({},cc,y),uc,E),dc,_);default:return{}}},$=r.useMemo((function(){return W(B)}),[B]),G=Sl(function(e,t,n){var o=Sl(Os(sc),2),a=o[0],i=o[1],l=function(){var e=r.useRef(null);function t(){Ds.cancel(e.current)}return r.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var a=Ds((function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)}));e.current=a},t]}(),s=Sl(l,2),c=s[0],u=s[1],d=t?Pc:Lc;return Mc((function(){if(a!==sc&&a!==fc){var e=d.indexOf(a),t=d[e+1],r=n(a);r===Rc?i(t,!0):t&&c((function(e){function n(){e.isCanceled()||i(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,a]),r.useEffect((function(){return function(){u()}}),[]),[function(){i(cc,!0)},a]}(B,!e,(function(e){if(e===cc){var t=$[cc];return t?t(U()):Rc}var n;return X in $&&j((null===(n=$[X])||void 0===n?void 0:n.call($,U(),null))||null),X===dc&&B!==oc&&(q(U()),h>0&&(clearTimeout(H.current),H.current=setTimeout((function(){K({deadline:!0})}),h))),X===pc&&Z(),true})),2),Y=G[0],X=G[1],Q=Tc(X);V.current=Q;var J=(0,r.useRef)(null);Mc((function(){if(!z.current||J.current!==t){P(t);var n,r=z.current;z.current=!0,!r&&t&&d&&(n=ac),r&&t&&c&&(n=ic),(r&&!t&&p||!r&&m&&!t&&p)&&(n=lc);var o=W(n);n&&(e||o[cc])?(I(n),Y()):I(oc),J.current=t}}),[t]),(0,r.useEffect)((function(){(B===ac&&!d||B===ic&&!c||B===lc&&!p)&&I(oc)}),[d,c,p]),(0,r.useEffect)((function(){return function(){z.current=!1,clearTimeout(H.current)}}),[]);var ee=r.useRef(!1);(0,r.useEffect)((function(){L&&(ee.current=!0),void 0!==L&&B===oc&&((ee.current||L)&&(null==A||A(L)),ee.current=!0)}),[L,B]);var te=F;return $[cc]&&X===uc&&(te=ol({transition:"none"},te)),[B,X,te,null!=L?L:t]}const Ic=function(e){var t=e;"object"===I(e)&&(t=e.transitionSupport);var n=r.forwardRef((function(e,n){var o=e.visible,a=void 0===o||o,i=e.removeOnLeave,l=void 0===i||i,s=e.forceRender,c=e.children,u=e.motionName,d=e.leavedClassName,p=e.eventProps,h=function(e,n){return!(!e.motionName||!t||!1===n)}(e,r.useContext(tc).motion),m=(0,r.useRef)(),v=(0,r.useRef)(),g=Sl(Nc(h,a,(function(){try{return m.current instanceof HTMLElement?m.current:zl(v.current)}catch(e){return null}}),e),4),y=g[0],b=g[1],x=g[2],E=g[3],C=r.useRef(E);E&&(C.current=!0);var w,_=r.useCallback((function(e){m.current=e,Vl(n,e)}),[n]),k=ol(ol({},p),{},{visible:a});if(c)if(y===oc)w=E?c(ol({},k),_):!l&&C.current&&d?c(ol(ol({},k),{},{className:d}),_):s||!l&&!d?c(ol(ol({},k),{},{style:{display:"none"}}),_):null;else{var O;b===cc?O="prepare":Tc(b)?O="active":b===uc&&(O="start");var S=Ac(u,"".concat(y,"-").concat(O));w=c(ol(ol({},k),{},{className:f()(Ac(u,y),nl(nl({},S,S&&O),u,"string"==typeof u)),style:x}),_)}else w=null;return r.isValidElement(w)&&ql(w)&&($l(w)||(w=r.cloneElement(w,{ref:_}))),r.createElement(rc,{ref:v},w)}));return n.displayName="CSSMotion",n}(kc);var Dc="add",Fc="keep",jc="remove",Bc="removed";function zc(e){var t;return ol(ol({},t=e&&"object"===I(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function Hc(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(zc)}var Uc=["component","children","onVisibleChanged","onAllRemoved"],Vc=["status"],Zc=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ic,t=function(t){ll(o,t);var n=dl(o);function o(){var e;al(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return e=n.call.apply(n,[this].concat(r)),nl((0,z.Z)(e),"state",{keyEntities:[]}),nl((0,z.Z)(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:ol(ol({},e),{},{status:Bc})}))}}),(function(){var t=e.state.keyEntities.filter((function(e){return e.status!==Bc})).length;0===t&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return j(o,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,a=o.component,i=o.children,l=o.onVisibleChanged,s=(o.onAllRemoved,Al(o,Uc)),c=a||r.Fragment,u={};return Zc.forEach((function(e){u[e]=s[e],delete s[e]})),delete s.keys,r.createElement(c,s,n.map((function(n,o){var a=n.status,s=Al(n,Vc),c=a===Dc||a===Fc;return r.createElement(e,(0,R.Z)({},u,{key:s.key,visible:c,eventProps:s,onVisibleChanged:function(e){null==l||l(e,{key:s.key}),e||t.removeKey(s.key)}}),(function(e,t){return i(ol(ol({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,o=Hc(n),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,a=Hc(e),i=Hc(t);a.forEach((function(e){for(var t=!1,a=r;a<o;a+=1){var l=i[a];if(l.key===e.key){r<a&&(n=n.concat(i.slice(r,a).map((function(e){return ol(ol({},e),{},{status:Dc})}))),r=a),n.push(ol(ol({},l),{},{status:Fc})),r+=1,t=!0;break}}t||n.push(ol(ol({},e),{},{status:jc}))})),r<o&&(n=n.concat(i.slice(r).map((function(e){return ol(ol({},e),{},{status:Dc})}))));var l={};n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1}));var s=Object.keys(l).filter((function(e){return l[e]>1}));return s.forEach((function(e){n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==jc})),n.forEach((function(t){t.key===e&&(t.status=Fc)}))})),n}(r,o);return{keyEntities:a.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==Bc||e.status!==jc}))}}}]),o}(r.Component);nl(t,"defaultProps",{component:"div"})}(kc);const Kc=Ic;var qc=function(e){for(var t=e.prefixCls,n=e.level,o=e.isStart,a=e.isEnd,i="".concat(t,"-indent-unit"),l=[],s=0;s<n;s+=1)l.push(r.createElement("span",{key:s,className:f()(i,nl(nl({},"".concat(i,"-start"),o[s]),"".concat(i,"-end"),a[s]))}));return r.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},l)};const Wc=r.memo(qc);function $c(e,t){return e[t]}var Gc=["children"];function Yc(e,t){return"".concat(e,"-").concat(t)}function Xc(e,t){return null!=e?e:t}function Qc(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function Jc(e,t,n){var r=Qc(n),o=r._title,a=r.key,i=r.children,l=new Set(!0===t?[]:t),s=[];return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(c,u){for(var d,f=Yc(r?r.pos:"0",u),p=Xc(c[a],f),h=0;h<o.length;h+=1){var m=o[h];if(void 0!==c[m]){d=c[m];break}}var v,g,y,b=Object.assign((v=c,g=[].concat(Pt(o),[a,i]),y=Object.assign({},v),Array.isArray(g)&&g.forEach((function(e){delete y[e]})),y),{title:d,key:p,parent:r,pos:f,children:null,data:c,isStart:[].concat(Pt(r?r.isStart:[]),[0===u]),isEnd:[].concat(Pt(r?r.isEnd:[]),[u===n.length-1])});return s.push(b),!0===t||l.has(p)?b.children=e(c[i]||[],b):b.children=[],b}))}(e),s}function eu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,i=t.childrenPropName,l=t.fieldNames,s=a||(arguments.length>2?arguments[2]:void 0),c={},u={},d={posEntities:c,keyEntities:u};return n&&(d=n(d)||d),function(e,t,n){var o,a=("object"===I(n)?n:{externalGetKey:n})||{},i=a.childrenPropName,l=a.externalGetKey,s=Qc(a.fieldNames),f=s.key,p=s.children,h=i||p;l?"string"==typeof l?o=function(e){return e[l]}:"function"==typeof l&&(o=function(e){return l(e)}):o=function(e,t){return Xc(e[f],t)},function t(n,a,i,l){var s=n?n[h]:e,f=n?Yc(i.pos,a):"0",p=n?[].concat(Pt(l),[n]):[];if(n){var m=o(n,f);!function(e){var t=e.node,n=e.index,o=e.pos,a=e.key,i=e.parentPos,l=e.level,s={node:t,nodes:e.nodes,index:n,key:a,pos:o,level:l},f=Xc(a,o);c[o]=s,u[f]=s,s.parent=c[i],s.parent&&(s.parent.children=s.parent.children||[],s.parent.children.push(s)),r&&r(s,d)}({node:n,index:a,pos:f,key:m,parentPos:i.node?i.pos:null,level:i.level+1,nodes:p})}s&&s.forEach((function(e,r){t(e,r,{node:n,pos:f,level:i?i.level+1:-1},p)}))}(null)}(e,0,{externalGetKey:s,childrenPropName:i,fieldNames:l}),o&&o(d),d}function tu(e,t){var n=t.expandedKeys,r=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,c=t.dropPosition,u=$c(t.keyEntities,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==o.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==i.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(u?u.pos:""),dragOver:s===e&&0===c,dragOverGapTop:s===e&&-1===c,dragOverGapBottom:s===e&&1===c}}function nu(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,a=e.loaded,i=e.loading,l=e.halfChecked,s=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.pos,f=e.active,p=e.eventKey,h=ol(ol({},t),{},{expanded:n,selected:r,checked:o,loaded:a,loading:i,halfChecked:l,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,key:p});return"props"in h||Object.defineProperty(h,"props",{get:function(){return wl(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),h}var ru=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ou="open",au="close",iu=function(e){var t,n,r,a=e.eventKey,i=e.className,l=e.style,s=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.isLeaf,p=e.isStart,h=e.isEnd,m=e.expanded,v=e.selected,g=e.checked,y=e.halfChecked,b=e.loading,x=e.domRef,E=e.active,C=e.data,w=e.onMouseMove,_=e.selectable,k=Al(e,ru),O=o().useContext(_l),S=o().useContext(kl),A=o().useRef(null),M=Sl(o().useState(!1),2),L=M[0],P=M[1],T=!!(O.disabled||e.disabled||null!==(t=S.nodeDisabled)&&void 0!==t&&t.call(S,C)),N=o().useMemo((function(){return!(!O.checkable||!1===e.checkable)&&O.checkable}),[O.checkable,e.checkable]),I=function(t){T||N&&!e.disableCheckbox&&O.onNodeCheck(t,nu(e),!g)},D=o().useMemo((function(){return"boolean"==typeof _?_:O.selectable}),[_,O.selectable]),F=function(t){O.onNodeClick(t,nu(e)),D?function(t){T||O.onNodeSelect(t,nu(e))}(t):I(t)},j=function(t){O.onNodeDoubleClick(t,nu(e))},B=function(t){O.onNodeMouseEnter(t,nu(e))},z=function(t){O.onNodeMouseLeave(t,nu(e))},H=function(t){O.onNodeContextMenu(t,nu(e))},U=o().useMemo((function(){return!(!O.draggable||O.draggable.nodeDraggable&&!O.draggable.nodeDraggable(C))}),[O.draggable,C]),V=function(t){b||O.onNodeExpand(t,nu(e))},Z=o().useMemo((function(){var e=($c(O.keyEntities,a)||{}).children;return Boolean((e||[]).length)}),[O.keyEntities,a]),K=o().useMemo((function(){return!1!==d&&(d||!O.loadData&&!Z||O.loadData&&e.loaded&&!Z)}),[d,O.loadData,Z,e.loaded]);o().useEffect((function(){b||"function"!=typeof O.loadData||!m||K||e.loaded||O.onNodeLoad(nu(e))}),[b,O.loadData,O.onNodeLoad,m,K,e]);var q=o().useMemo((function(){var e;return null!==(e=O.draggable)&&void 0!==e&&e.icon?o().createElement("span",{className:"".concat(O.prefixCls,"-draggable-icon")},O.draggable.icon):null}),[O.draggable]),W=function(t){var n=e.switcherIcon||O.switcherIcon;return"function"==typeof n?n(ol(ol({},e),{},{isLeaf:t})):n},$=o().useMemo((function(){if(!N)return null;var t="boolean"!=typeof N?N:null;return o().createElement("span",{className:f()("".concat(O.prefixCls,"-checkbox"),nl(nl(nl({},"".concat(O.prefixCls,"-checkbox-checked"),g),"".concat(O.prefixCls,"-checkbox-indeterminate"),!g&&y),"".concat(O.prefixCls,"-checkbox-disabled"),T||e.disableCheckbox)),onClick:I,role:"checkbox","aria-checked":y?"mixed":g,"aria-disabled":T||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)}),[N,g,y,T,e.disableCheckbox,e.title]),G=o().useMemo((function(){return K?null:m?ou:au}),[K,m]),Y=o().useMemo((function(){return o().createElement("span",{className:f()("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__").concat(G||"docu"),nl({},"".concat(O.prefixCls,"-icon_loading"),b))})}),[O.prefixCls,G,b]),X=o().useMemo((function(){var t=Boolean(O.draggable);return!e.disabled&&t&&O.dragOverNodeKey===a?O.dropIndicatorRender({dropPosition:O.dropPosition,dropLevelOffset:O.dropLevelOffset,indent:O.indent,prefixCls:O.prefixCls,direction:O.direction}):null}),[O.dropPosition,O.dropLevelOffset,O.indent,O.prefixCls,O.direction,O.draggable,O.dragOverNodeKey,O.dropIndicatorRender]),Q=o().useMemo((function(){var t,n,r=e.title,a=void 0===r?"---":r,i="".concat(O.prefixCls,"-node-content-wrapper");if(O.showIcon){var l=e.icon||O.icon;t=l?o().createElement("span",{className:f()("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__customize"))},"function"==typeof l?l(e):l):Y}else O.loadData&&b&&(t=Y);return n="function"==typeof a?a(C):O.titleRender?O.titleRender(C):a,o().createElement("span",{ref:A,title:"string"==typeof a?a:"",className:f()(i,"".concat(i,"-").concat(G||"normal"),nl({},"".concat(O.prefixCls,"-node-selected"),!T&&(v||L))),onMouseEnter:B,onMouseLeave:z,onContextMenu:H,onClick:F,onDoubleClick:j},t,o().createElement("span",{className:"".concat(O.prefixCls,"-title")},n),X)}),[O.prefixCls,O.showIcon,e,O.icon,Y,O.titleRender,C,G,B,z,H,F,j]),J=vl(k,{aria:!0,data:!0}),ee=($c(O.keyEntities,a)||{}).level,te=h[h.length-1],ne=!T&&U,re=O.draggingNodeKey===a,oe=void 0!==_?{"aria-selected":!!_}:void 0;return o().createElement("div",(0,R.Z)({ref:x,role:"treeitem","aria-expanded":d?void 0:m,className:f()(i,"".concat(O.prefixCls,"-treenode"),(r={},nl(nl(nl(nl(nl(nl(nl(nl(nl(nl(r,"".concat(O.prefixCls,"-treenode-disabled"),T),"".concat(O.prefixCls,"-treenode-switcher-").concat(m?"open":"close"),!d),"".concat(O.prefixCls,"-treenode-checkbox-checked"),g),"".concat(O.prefixCls,"-treenode-checkbox-indeterminate"),y),"".concat(O.prefixCls,"-treenode-selected"),v),"".concat(O.prefixCls,"-treenode-loading"),b),"".concat(O.prefixCls,"-treenode-active"),E),"".concat(O.prefixCls,"-treenode-leaf-last"),te),"".concat(O.prefixCls,"-treenode-draggable"),U),"dragging",re),nl(nl(nl(nl(nl(nl(nl(r,"drop-target",O.dropTargetKey===a),"drop-container",O.dropContainerKey===a),"drag-over",!T&&s),"drag-over-gap-top",!T&&c),"drag-over-gap-bottom",!T&&u),"filter-node",null===(n=O.filterTreeNode)||void 0===n?void 0:n.call(O,nu(e))),"".concat(O.prefixCls,"-treenode-leaf"),K))),style:l,draggable:ne,onDragStart:ne?function(t){t.stopPropagation(),P(!0),O.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:U?function(t){t.preventDefault(),t.stopPropagation(),O.onNodeDragEnter(t,e)}:void 0,onDragOver:U?function(t){t.preventDefault(),t.stopPropagation(),O.onNodeDragOver(t,e)}:void 0,onDragLeave:U?function(t){t.stopPropagation(),O.onNodeDragLeave(t,e)}:void 0,onDrop:U?function(t){t.preventDefault(),t.stopPropagation(),P(!1),O.onNodeDrop(t,e)}:void 0,onDragEnd:U?function(t){t.stopPropagation(),P(!1),O.onNodeDragEnd(t,e)}:void 0,onMouseMove:w},oe,J),o().createElement(Wc,{prefixCls:O.prefixCls,level:ee,isStart:p,isEnd:h}),q,function(){if(K){var e=W(!0);return!1!==e?o().createElement("span",{className:f()("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher-noop"))},e):null}var t=W(!1);return!1!==t?o().createElement("span",{onClick:V,className:f()("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher_").concat(m?ou:au))},t):null}(),$,Q)};iu.isTreeNode=1;const lu=iu;var su=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],cu=r.forwardRef((function(e,t){var n=e.className,o=e.style,a=e.motion,i=e.motionNodes,l=e.motionType,s=e.onMotionStart,c=e.onMotionEnd,u=e.active,d=e.treeNodeRequiredProps,p=Al(e,su),h=Sl(r.useState(!0),2),m=h[0],v=h[1],g=r.useContext(_l).prefixCls,y=i&&"hide"!==l;Pl((function(){i&&y!==m&&v(y)}),[i]);var b=r.useRef(!1),x=function(){i&&!b.current&&(b.current=!0,c())};return function(e,t){var n=Sl(r.useState(!1),2),o=n[0],a=n[1];Pl((function(){if(o)return e(),function(){t()}}),[o]),Pl((function(){return a(!0),function(){a(!1)}}),[])}((function(){i&&s()}),x),i?r.createElement(Kc,(0,R.Z)({ref:t,visible:m},a,{motionAppear:"show"===l,onVisibleChanged:function(e){y===e&&x()}}),(function(e,t){var n=e.className,o=e.style;return r.createElement("div",{ref:t,className:f()("".concat(g,"-treenode-motion"),n),style:o},i.map((function(e){var t=Object.assign({},(Ol(e.data),e.data)),n=e.title,o=e.key,a=e.isStart,i=e.isEnd;delete t.children;var l=tu(o,d);return r.createElement(lu,(0,R.Z)({},t,l,{title:n,active:u,data:e.data,key:o,isStart:a,isEnd:i}))})))})):r.createElement(lu,(0,R.Z)({domRef:t,className:n,style:o},p,{active:u}))}));const uu=cu;function du(e,t,n){var r=e.findIndex((function(e){return e.key===n})),o=e[r+1],a=t.findIndex((function(e){return e.key===n}));if(o){var i=t.findIndex((function(e){return e.key===o.key}));return t.slice(a+1,i)}return t.slice(a+1)}var fu=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],pu={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},hu=function(){},mu="RC_TREE_MOTION_".concat(Math.random()),vu={key:mu},gu={key:mu,level:0,index:0,pos:"0",node:vu,nodes:[vu]},yu={parent:null,children:[],pos:gu.pos,data:vu,title:null,key:mu,isStart:[],isEnd:[]};function bu(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function xu(e){return Xc(e.key,e.pos)}var Eu=r.forwardRef((function(e,t){var n=e.prefixCls,o=e.data,a=(e.selectable,e.checkable,e.expandedKeys),i=e.selectedKeys,l=e.checkedKeys,s=e.loadedKeys,c=e.loadingKeys,u=e.halfCheckedKeys,d=e.keyEntities,f=e.disabled,p=e.dragging,h=e.dragOverNodeKey,m=e.dropPosition,v=e.motion,g=e.height,y=e.itemHeight,b=e.virtual,x=e.scrollWidth,E=e.focusable,C=e.activeItem,w=e.focused,_=e.tabIndex,k=e.onKeyDown,O=e.onFocus,S=e.onBlur,A=e.onActiveChange,M=e.onListChangeStart,L=e.onListChangeEnd,P=Al(e,fu),T=r.useRef(null),N=r.useRef(null);r.useImperativeHandle(t,(function(){return{scrollTo:function(e){T.current.scrollTo(e)},getIndentWidth:function(){return N.current.offsetWidth}}}));var I=Sl(r.useState(a),2),D=I[0],F=I[1],j=Sl(r.useState(o),2),B=j[0],z=j[1],H=Sl(r.useState(o),2),U=H[0],V=H[1],Z=Sl(r.useState([]),2),K=Z[0],q=Z[1],W=Sl(r.useState(null),2),$=W[0],G=W[1],Y=r.useRef(o);function X(){var e=Y.current;z(e),V(e),q([]),G(null),L()}Y.current=o,Pl((function(){F(a);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function o(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n<r?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}(D,a);if(null!==e.key)if(e.add){var t=B.findIndex((function(t){return t.key===e.key})),n=bu(du(B,o,e.key),b,g,y),r=B.slice();r.splice(t+1,0,yu),V(r),q(n),G("show")}else{var i=o.findIndex((function(t){return t.key===e.key})),l=bu(du(o,B,e.key),b,g,y),s=o.slice();s.splice(i+1,0,yu),V(s),q(l),G("hide")}else B!==o&&(z(o),V(o))}),[a,o]),r.useEffect((function(){p||X()}),[p]);var Q=v?U:o,J={expandedKeys:a,selectedKeys:i,loadedKeys:s,loadingKeys:c,checkedKeys:l,halfCheckedKeys:u,dragOverNodeKey:h,dropPosition:m,keyEntities:d};return r.createElement(r.Fragment,null,w&&C&&r.createElement("span",{style:pu,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(C)),r.createElement("div",null,r.createElement("input",{style:pu,disabled:!1===E||f,tabIndex:!1!==E?_:null,onKeyDown:k,onFocus:O,onBlur:S,value:"",onChange:hu,"aria-label":"for screen reader"})),r.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},r.createElement("div",{className:"".concat(n,"-indent")},r.createElement("div",{ref:N,className:"".concat(n,"-indent-unit")}))),r.createElement(ec,(0,R.Z)({},P,{data:Q,itemKey:xu,height:g,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:"".concat(n,"-list"),ref:T,role:"tree",onVisibleChange:function(e){e.every((function(e){return xu(e)!==mu}))&&X()}}),(function(e){var t=e.pos,n=Object.assign({},(Ol(e.data),e.data)),o=e.title,a=e.key,i=e.isStart,l=e.isEnd,s=Xc(a,t);delete n.key,delete n.children;var c=tu(s,J);return r.createElement(uu,(0,R.Z)({},n,c,{title:o,active:!!C&&a===C.key,pos:t,data:e.data,isStart:i,isEnd:l,motion:v,motionNodes:a===mu?K:null,motionType:$,onMotionStart:M,onMotionEnd:X,treeNodeRequiredProps:J,onMouseMove:function(){A(null)}}))})))}));const Cu=Eu;function wu(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function _u(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function ku(e){return e.split("-")}function Ou(e,t){var n=[];return function e(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var r=t.key,o=t.children;n.push(r),e(o)}))}($c(t,e).children),n}function Su(e){if(e.parent){var t=ku(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Au(e,t,n,r,o,a,i,l,s,c){var u,d=e.clientX,f=e.clientY,p=e.target.getBoundingClientRect(),h=p.top,m=p.height,v=(("rtl"===c?-1:1)*(((null==o?void 0:o.x)||0)-d)-12)/r,g=s.filter((function(e){var t;return null===(t=l[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),y=$c(l,n.eventKey);if(f<h+m/2){var b=i.findIndex((function(e){return e.key===y.key})),x=i[b<=0?0:b-1].key;y=$c(l,x)}var E=y.key,C=y,w=y.key,_=0,k=0;if(!g.includes(E))for(var O=0;O<v&&Su(y);O+=1)y=y.parent,k+=1;var S,A=t.data,M=y.node,L=!0;return S=ku(y.pos),0===Number(S[S.length-1])&&0===y.level&&f<h+m/2&&a({dragNode:A,dropNode:M,dropPosition:-1})&&y.key===n.eventKey?_=-1:(C.children||[]).length&&g.includes(w)?a({dragNode:A,dropNode:M,dropPosition:0})?_=0:L=!1:0===k?v>-1.5?a({dragNode:A,dropNode:M,dropPosition:1})?_=1:L=!1:a({dragNode:A,dropNode:M,dropPosition:0})?_=0:a({dragNode:A,dropNode:M,dropPosition:1})?_=1:L=!1:a({dragNode:A,dropNode:M,dropPosition:1})?_=1:L=!1,{dropPosition:_,dropLevelOffset:k,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:w,dropContainerKey:0===_?null:(null===(u=y.parent)||void 0===u?void 0:u.key)||null,dropAllowed:L}}function Mu(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function Lu(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==I(e))return wl(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function Pu(e,t){var n=new Set;function r(e){if(!n.has(e)){var o=$c(t,e);if(o){n.add(e);var a=o.parent;o.node.disabled||a&&r(a.key)}}}return(e||[]).forEach((function(e){r(e)})),Pt(n)}function Ru(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function Tu(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,o=t.checkable;return!(!n&&!r)||!1===o}function Nu(e,t,n,r){var o,a=[];o=r||Tu;var i,l=new Set(e.filter((function(e){var t=!!$c(n,e);return t||a.push(e),t}))),s=new Map,c=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,o=s.get(r);o||(o=new Set,s.set(r,o)),o.add(t),c=Math.max(c,r)})),wl(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),i=!0===t?function(e,t,n,r){for(var o=new Set(e),a=new Set,i=0;i<=n;i+=1)(t.get(i)||new Set).forEach((function(e){var t=e.key,n=e.node,a=e.children,i=void 0===a?[]:a;o.has(t)&&!r(n)&&i.filter((function(e){return!r(e.node)})).forEach((function(e){o.add(e.key)}))}));for(var l=new Set,s=n;s>=0;s-=1)(t.get(s)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);i&&!n&&(i=!1),s||!n&&!a.has(t)||(s=!0)})),i&&o.add(t.key),s&&a.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Ru(a,o))}}(l,s,c,o):function(e,t,n,r,o){for(var a=new Set(e),i=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,l=void 0===r?[]:r;a.has(t)||i.has(t)||o(n)||l.filter((function(e){return!o(e.node)})).forEach((function(e){a.delete(e.key)}))}));i=new Set;for(var s=new Set,c=r;c>=0;c-=1)(n.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!o(n)&&e.parent&&!s.has(e.parent.key))if(o(e.parent.node))s.add(t.key);else{var r=!0,l=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);r&&!n&&(r=!1),l||!n&&!i.has(t)||(l=!0)})),r||a.delete(t.key),l&&i.add(t.key),s.add(t.key)}}));return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Ru(i,a))}}(l,t.halfCheckedKeys,s,c,o),i}var Iu=function(e){ll(n,e);var t=dl(n);function n(){var e;al(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),nl((0,z.Z)(e),"destroyed",!1),nl((0,z.Z)(e),"delayedDragEnterLogic",void 0),nl((0,z.Z)(e),"loadingRetryTimes",{}),nl((0,z.Z)(e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Qc()}),nl((0,z.Z)(e),"dragStartMousePosition",null),nl((0,z.Z)(e),"dragNodeProps",null),nl((0,z.Z)(e),"currentMouseOverDroppableNodeKey",null),nl((0,z.Z)(e),"listRef",r.createRef()),nl((0,z.Z)(e),"onNodeDragStart",(function(t,n){var r=e.state,o=r.expandedKeys,a=r.keyEntities,i=e.props.onDragStart,l=n.eventKey;e.dragNodeProps=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var s=wu(o,l);e.setState({draggingNodeKey:l,dragChildrenKeys:Ou(l,a),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(s),window.addEventListener("dragend",e.onWindowDragEnd),null==i||i({event:t,node:nu(n)})})),nl((0,z.Z)(e),"onNodeDragEnter",(function(t,n){var r=e.state,o=r.expandedKeys,a=r.keyEntities,i=r.dragChildrenKeys,l=r.flattenNodes,s=r.indent,c=e.props,u=c.onDragEnter,d=c.onExpand,f=c.allowDrop,p=c.direction,h=n.pos,m=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==m&&(e.currentMouseOverDroppableNodeKey=m),e.dragNodeProps){var v=Au(t,e.dragNodeProps,n,s,e.dragStartMousePosition,f,l,a,o,p),g=v.dropPosition,y=v.dropLevelOffset,b=v.dropTargetKey,x=v.dropContainerKey,E=v.dropTargetPos,C=v.dropAllowed,w=v.dragOverNodeKey;!i.includes(b)&&C?(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[h]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var r=Pt(o),i=$c(a,n.eventKey);i&&(i.children||[]).length&&(r=_u(o,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(r),null==d||d(r,{node:nu(n),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),e.dragNodeProps.eventKey!==b||0!==y?(e.setState({dragOverNodeKey:w,dropPosition:g,dropLevelOffset:y,dropTargetKey:b,dropContainerKey:x,dropTargetPos:E,dropAllowed:C}),null==u||u({event:t,node:nu(n),expandedKeys:o})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),nl((0,z.Z)(e),"onNodeDragOver",(function(t,n){var r=e.state,o=r.dragChildrenKeys,a=r.flattenNodes,i=r.keyEntities,l=r.expandedKeys,s=r.indent,c=e.props,u=c.onDragOver,d=c.allowDrop,f=c.direction;if(e.dragNodeProps){var p=Au(t,e.dragNodeProps,n,s,e.dragStartMousePosition,d,a,i,l,f),h=p.dropPosition,m=p.dropLevelOffset,v=p.dropTargetKey,g=p.dropContainerKey,y=p.dropTargetPos,b=p.dropAllowed,x=p.dragOverNodeKey;!o.includes(v)&&b&&(e.dragNodeProps.eventKey===v&&0===m?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():h===e.state.dropPosition&&m===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&g===e.state.dropContainerKey&&y===e.state.dropTargetPos&&b===e.state.dropAllowed&&x===e.state.dragOverNodeKey||e.setState({dropPosition:h,dropLevelOffset:m,dropTargetKey:v,dropContainerKey:g,dropTargetPos:y,dropAllowed:b,dragOverNodeKey:x}),null==u||u({event:t,node:nu(n)}))}})),nl((0,z.Z)(e),"onNodeDragLeave",(function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var r=e.props.onDragLeave;null==r||r({event:t,node:nu(n)})})),nl((0,z.Z)(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),nl((0,z.Z)(e),"onNodeDragEnd",(function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==r||r({event:t,node:nu(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),nl((0,z.Z)(e),"onNodeDrop",(function(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.state,i=a.dragChildrenKeys,l=a.dropPosition,s=a.dropTargetKey,c=a.dropTargetPos;if(a.dropAllowed){var u=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==s){var d=ol(ol({},tu(s,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===s,data:$c(e.state.keyEntities,s).node}),f=i.includes(s);wl(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=ku(c),h={event:t,node:nu(d),dragNode:e.dragNodeProps?nu(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(i),dropToGap:0!==l,dropPosition:l+Number(p[p.length-1])};o||null==u||u(h),e.dragNodeProps=null}}})),nl((0,z.Z)(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),nl((0,z.Z)(e),"triggerExpandActionExpand",(function(t,n){var r=e.state,o=r.expandedKeys,a=r.flattenNodes,i=n.expanded,l=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var s=a.filter((function(e){return e.key===l}))[0],c=nu(ol(ol({},tu(l,e.getTreeNodeRequiredProps())),{},{data:s.data}));e.setExpandedKeys(i?wu(o,l):_u(o,l)),e.onNodeExpand(t,c)}})),nl((0,z.Z)(e),"onNodeClick",(function(t,n){var r=e.props,o=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==o||o(t,n)})),nl((0,z.Z)(e),"onNodeDoubleClick",(function(t,n){var r=e.props,o=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==o||o(t,n)})),nl((0,z.Z)(e),"onNodeSelect",(function(t,n){var r=e.state.selectedKeys,o=e.state,a=o.keyEntities,i=o.fieldNames,l=e.props,s=l.onSelect,c=l.multiple,u=n.selected,d=n[i.key],f=!u,p=(r=f?c?_u(r,d):[d]:wu(r,d)).map((function(e){var t=$c(a,e);return t?t.node:null})).filter(Boolean);e.setUncontrolledState({selectedKeys:r}),null==s||s(r,{event:"select",selected:f,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})})),nl((0,z.Z)(e),"onNodeCheck",(function(t,n,r){var o,a=e.state,i=a.keyEntities,l=a.checkedKeys,s=a.halfCheckedKeys,c=e.props,u=c.checkStrictly,d=c.onCheck,f=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(u){var h=r?_u(l,f):wu(l,f);o={checked:h,halfChecked:wu(s,f)},p.checkedNodes=h.map((function(e){return $c(i,e)})).filter(Boolean).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:h})}else{var m=Nu([].concat(Pt(l),[f]),!0,i),v=m.checkedKeys,g=m.halfCheckedKeys;if(!r){var y=new Set(v);y.delete(f);var b=Nu(Array.from(y),{checked:!1,halfCheckedKeys:g},i);v=b.checkedKeys,g=b.halfCheckedKeys}o=v,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=g,v.forEach((function(e){var t=$c(i,e);if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:v},!1,{halfCheckedKeys:g})}null==d||d(o,p)})),nl((0,z.Z)(e),"onNodeLoad",(function(t){var n,r=t.key,o=$c(e.state.keyEntities,r);if(null==o||null===(n=o.children)||void 0===n||!n.length){var a=new Promise((function(n,o){e.setState((function(a){var i=a.loadedKeys,l=void 0===i?[]:i,s=a.loadingKeys,c=void 0===s?[]:s,u=e.props,d=u.loadData,f=u.onLoad;return!d||l.includes(r)||c.includes(r)?null:(d(t).then((function(){var o=_u(e.state.loadedKeys,r);null==f||f(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState((function(e){return{loadingKeys:wu(e.loadingKeys,r)}})),n()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:wu(e.loadingKeys,r)}})),e.loadingRetryTimes[r]=(e.loadingRetryTimes[r]||0)+1,e.loadingRetryTimes[r]>=10){var a=e.state.loadedKeys;wl(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:_u(a,r)}),n()}o(t)})),{loadingKeys:_u(c,r)})}))}));return a.catch((function(){})),a}})),nl((0,z.Z)(e),"onNodeMouseEnter",(function(t,n){var r=e.props.onMouseEnter;null==r||r({event:t,node:n})})),nl((0,z.Z)(e),"onNodeMouseLeave",(function(t,n){var r=e.props.onMouseLeave;null==r||r({event:t,node:n})})),nl((0,z.Z)(e),"onNodeContextMenu",(function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))})),nl((0,z.Z)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t||t.apply(void 0,r)})),nl((0,z.Z)(e),"onBlur",(function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t||t.apply(void 0,r)})),nl((0,z.Z)(e),"getTreeNodeRequiredProps",(function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}})),nl((0,z.Z)(e),"setExpandedKeys",(function(t){var n=e.state,r=Jc(n.treeData,t,n.fieldNames);e.setUncontrolledState({expandedKeys:t,flattenNodes:r},!0)})),nl((0,z.Z)(e),"onNodeExpand",(function(t,n){var r=e.state.expandedKeys,o=e.state,a=o.listChanging,i=o.fieldNames,l=e.props,s=l.onExpand,c=l.loadData,u=n.expanded,d=n[i.key];if(!a){var f=r.includes(d),p=!u;if(wl(u&&f||!u&&!f,"Expand state not sync with index check"),r=p?_u(r,d):wu(r,d),e.setExpandedKeys(r),null==s||s(r,{node:n,expanded:p,nativeEvent:t.nativeEvent}),p&&c){var h=e.onNodeLoad(n);h&&h.then((function(){var t=Jc(e.state.treeData,r,i);e.setUncontrolledState({flattenNodes:t})})).catch((function(){var t=wu(e.state.expandedKeys,d);e.setExpandedKeys(t)}))}}})),nl((0,z.Z)(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),nl((0,z.Z)(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),nl((0,z.Z)(e),"onActiveChange",(function(t){var n=e.state.activeKey,r=e.props,o=r.onActiveChange,a=r.itemScrollOffset,i=void 0===a?0:a;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:i}),null==o||o(t))})),nl((0,z.Z)(e),"getActiveItem",(function(){var t=e.state,n=t.activeKey,r=t.flattenNodes;return null===n?null:r.find((function(e){return e.key===n}))||null})),nl((0,z.Z)(e),"offsetActiveKey",(function(t){var n=e.state,r=n.flattenNodes,o=n.activeKey,a=r.findIndex((function(e){return e.key===o}));-1===a&&t<0&&(a=r.length);var i=r[a=(a+t+r.length)%r.length];if(i){var l=i.key;e.onActiveChange(l)}else e.onActiveChange(null)})),nl((0,z.Z)(e),"onKeyDown",(function(t){var n=e.state,r=n.activeKey,o=n.expandedKeys,a=n.checkedKeys,i=n.fieldNames,l=e.props,s=l.onKeyDown,c=l.checkable,u=l.selectable;switch(t.which){case pl.UP:e.offsetActiveKey(-1),t.preventDefault();break;case pl.DOWN:e.offsetActiveKey(1),t.preventDefault()}var d=e.getActiveItem();if(d&&d.data){var f=e.getTreeNodeRequiredProps(),p=!1===d.data.isLeaf||!!(d.data[i.children]||[]).length,h=nu(ol(ol({},tu(r,f)),{},{data:d.data,active:!0}));switch(t.which){case pl.LEFT:p&&o.includes(r)?e.onNodeExpand({},h):d.parent&&e.onActiveChange(d.parent.key),t.preventDefault();break;case pl.RIGHT:p&&!o.includes(r)?e.onNodeExpand({},h):d.children&&d.children.length&&e.onActiveChange(d.children[0].key),t.preventDefault();break;case pl.ENTER:case pl.SPACE:!c||h.disabled||!1===h.checkable||h.disableCheckbox?c||!u||h.disabled||!1===h.selectable||e.onNodeSelect({},h):e.onNodeCheck({},h,!a.includes(r))}}null==s||s(t)})),nl((0,z.Z)(e),"setUncontrolledState",(function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var o=!1,a=!0,i={};Object.keys(t).forEach((function(n){e.props.hasOwnProperty(n)?a=!1:(o=!0,i[n]=t[n])})),!o||n&&!a||e.setState(ol(ol({},i),r))}})),nl((0,z.Z)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return j(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,r=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:r}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,o=t.flattenNodes,a=t.keyEntities,i=t.draggingNodeKey,l=t.activeKey,s=t.dropLevelOffset,c=t.dropContainerKey,u=t.dropTargetKey,d=t.dropPosition,p=t.dragOverNodeKey,h=t.indent,m=this.props,v=m.prefixCls,g=m.className,y=m.style,b=m.showLine,x=m.focusable,E=m.tabIndex,C=void 0===E?0:E,w=m.selectable,_=m.showIcon,k=m.icon,O=m.switcherIcon,S=m.draggable,A=m.checkable,M=m.checkStrictly,L=m.disabled,P=m.motion,T=m.loadData,N=m.filterTreeNode,D=m.height,F=m.itemHeight,j=m.scrollWidth,B=m.virtual,z=m.titleRender,H=m.dropIndicatorRender,U=m.onContextMenu,V=m.onScroll,Z=m.direction,K=m.rootClassName,q=m.rootStyle,W=vl(this.props,{aria:!0,data:!0});S&&(e="object"===I(S)?S:"function"==typeof S?{nodeDraggable:S}:{});var $={prefixCls:v,selectable:w,showIcon:_,icon:k,switcherIcon:O,draggable:e,draggingNodeKey:i,checkable:A,checkStrictly:M,disabled:L,keyEntities:a,dropLevelOffset:s,dropContainerKey:c,dropTargetKey:u,dropPosition:d,dragOverNodeKey:p,indent:h,direction:Z,dropIndicatorRender:H,loadData:T,filterTreeNode:N,titleRender:z,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return r.createElement(_l.Provider,{value:$},r.createElement("div",{className:f()(v,g,K,nl(nl(nl({},"".concat(v,"-show-line"),b),"".concat(v,"-focused"),n),"".concat(v,"-active-focused"),null!==l)),style:q},r.createElement(Cu,(0,R.Z)({ref:this.listRef,prefixCls:v,style:y,data:o,disabled:L,selectable:w,checkable:!!A,motion:P,dragging:null!==i,height:D,itemHeight:F,virtual:B,focusable:x,focused:n,tabIndex:C,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:U,onScroll:V,scrollWidth:j},this.getTreeNodeRequiredProps(),W))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=t.prevProps,o={prevProps:e};function a(t){return!r&&e.hasOwnProperty(t)||r&&r[t]!==e[t]}var i=t.fieldNames;if(a("fieldNames")&&(i=Qc(e.fieldNames),o.fieldNames=i),a("treeData")?n=e.treeData:a("children")&&(wl(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=function e(t){return Dl(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return wl(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,a=ol({key:n},Al(r,Gc)),i=e(o);return i.length&&(a.children=i),a})).filter((function(e){return e}))}(e.children)),n){o.treeData=n;var l=eu(n,{fieldNames:i});o.keyEntities=ol(nl({},mu,gu),l.keyEntities)}var s,c=o.keyEntities||t.keyEntities;if(a("expandedKeys")||r&&a("autoExpandParent"))o.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?Pu(e.expandedKeys,c):e.expandedKeys;else if(!r&&e.defaultExpandAll){var u=ol({},c);delete u[mu];var d=[];Object.keys(u).forEach((function(e){var t=u[e];t.children&&t.children.length&&d.push(t.key)})),o.expandedKeys=d}else!r&&e.defaultExpandedKeys&&(o.expandedKeys=e.autoExpandParent||e.defaultExpandParent?Pu(e.defaultExpandedKeys,c):e.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,n||o.expandedKeys){var f=Jc(n||t.treeData,o.expandedKeys||t.expandedKeys,i);o.flattenNodes=f}if(e.selectable&&(a("selectedKeys")?o.selectedKeys=Mu(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(o.selectedKeys=Mu(e.defaultSelectedKeys,e))),e.checkable&&(a("checkedKeys")?s=Lu(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?s=Lu(e.defaultCheckedKeys)||{}:n&&(s=Lu(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),s)){var p=s,h=p.checkedKeys,m=void 0===h?[]:h,v=p.halfCheckedKeys,g=void 0===v?[]:v;if(!e.checkStrictly){var y=Nu(m,!0,c);m=y.checkedKeys,g=y.halfCheckedKeys}o.checkedKeys=m,o.halfCheckedKeys=g}return a("loadedKeys")&&(o.loadedKeys=e.loadedKeys),o}}]),n}(r.Component);nl(Iu,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:a.top=0,a.left=-n*r;break;case 1:a.bottom=0,a.left=-n*r;break;case 0:a.bottom=0,a.left=r}return o().createElement("div",{style:a})},allowDrop:function(){return!0},expandAction:!1}),nl(Iu,"TreeNode",lu);const Du=Iu,Fu=JSON.parse('{"levelLines":"TreeLevelLines_levelLines__L29wd","levelLine":"TreeLevelLines_levelLine__L29wd","showLine":"TreeLevelLines_showLine__L29wd","lastLevelLine":"TreeLevelLines_lastLevelLine__L29wd","horizontalLine":"TreeLevelLines_horizontalLine__L29wd"}');_r('\n.TreeLevelLines_levelLines__L29wd {\n\tposition: absolute;\n\tdisplay: flex;\n\tpadding-left: 0;\n\tcursor: initial;\n\tbottom: 0;\n\ttop: 0;\n\tz-index: 0;\n}\n\n.TreeLevelLines_levelLine__L29wd {\n\tpadding-left: 16px;\n\theight: 100%;\n\tposition: relative;\n}\n\n.TreeLevelLines_showLine__L29wd::after {\n\tcontent: "";\n\tposition: absolute;\n\theight: 100%;\n\twidth: 1px;\n\tleft: 14px;\n\ttop: 0;\n\tbottom: 0;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n}\n\n.TreeLevelLines_lastLevelLine__L29wd::after {\n\theight: 50%;\n}\n\n.TreeLevelLines_lastLevelLine__L29wd {\n\tpadding-left: 29px;\n}\n\n.TreeLevelLines_horizontalLine__L29wd::before {\n\tcontent: "";\n\theight: 1px;\n\twidth: 5px;\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 14px;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n}\n');const ju=Fu,Bu=(0,r.memo)((({needDrawLine:e=!1,isLastLevelLine:t=!1,drawHorizontalLine:n=!1})=>(0,Ln.jsx)("div",{className:kr(ju.levelLine,e&&ju.showLine,t&&ju.lastLevelLine,n&&ju.horizontalLine)}))),zu=(0,r.memo)((({levelLines:e,isLast:t=!1})=>{const n=e,r=0===n.length,o=n.length+2;return r?null:(0,Ln.jsxs)("div",{className:kr(ju.levelLines),children:[n.map(((e,t)=>(0,Ln.jsx)(Bu,{needDrawLine:e},`${t}-${e}`))),(0,Ln.jsx)(Bu,{needDrawLine:!0,drawHorizontalLine:!0,isLastLevelLine:t},o)]})}));Bu.displayName="LevelLine",zu.displayName="TreeLevelLines";const Hu=JSON.parse('{"wrapper":"TreeNode_wrapper__L29wd","indent":"TreeNode_indent__L29wd","toggle":"TreeNode_toggle__L29wd","chevron":"TreeNode_chevron__L29wd","expanded":"TreeNode_expanded__L29wd","spinner":"TreeNode_spinner__L29wd","spin":"TreeNode_spin__L29wd","actions":"TreeNode_actions__L29wd"}');_r("\n.TreeNode_wrapper__L29wd {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 1.5;\n\tpadding: 2px 4px;\n\tposition: relative;\n\tz-index: 1;\n}\n\n.TreeNode_indent__L29wd {\n\tdisplay: inline-block;\n\twidth: calc(var(--depth, 1) * 16px);\n\tflex: 0 0 auto;\n}\n\n.TreeNode_toggle__L29wd {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 26px;\n\theight: 26px;\n\tborder: none;\n\tbackground: none;\n\tcolor: var(--reltio-color-text-secondary);\n\tcursor: pointer;\n}\n\n.TreeNode_chevron__L29wd {\n\ttransition: transform 0.2s ease;\n}\n\n.TreeNode_expanded__L29wd {\n\ttransform: rotate(90deg);\n}\n\n.TreeNode_spinner__L29wd {\n\tdisplay: inline-block;\n\twidth: 10px;\n\theight: 10px;\n\tborder-radius: 50%;\n\tborder: 2px solid currentColor;\n\tborder-top-color: transparent;\n\tanimation: TreeNode_spin__L29wd 0.8s linear infinite;\n}\n\n@keyframes TreeNode_spin__L29wd {\n\tfrom {\n\t\ttransform: rotate(0deg);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n}\n\n.TreeNode_actions__L29wd {\n\tmargin-left: auto;\n\topacity: 0;\n\ttransition: opacity 0.12s ease;\n}\n\n.TreeNode_wrapper__L29wd:hover .TreeNode_actions__L29wd {\n\topacity: 1;\n}\n");const Uu=Hu,Vu=(0,r.memo)((({id:e,node:t,depth:n,isLeaf:o,isExpanded:a,levelLines:i,isLast:l,onToggle:s,LabelComponent:c})=>{const u=(0,r.useCallback)((n=>{n.stopPropagation(),s(e,a,t)}),[s,e,a,t]);return(0,Ln.jsxs)("div",{className:kr(Uu.wrapper),"data-depth":n,children:[(0,Ln.jsx)(zu,{levelLines:i,isLast:l}),(0,Ln.jsx)("span",{className:kr(Uu.indent),style:{"--depth":`${n}`}}),o?(0,Ln.jsx)("span",{className:kr(Uu.toggle),"aria-hidden":"true"}):t.isLoading?(0,Ln.jsx)("span",{className:kr(Uu.toggle),"aria-hidden":"true",children:(0,Ln.jsx)("span",{className:kr(Uu.spinner)})}):(0,Ln.jsx)("button",{type:"button",className:kr(Uu.toggle),"aria-label":a?"Collapse":"Expand",onClick:u,children:(0,Ln.jsx)(Tr,{size:"small",className:kr(Uu.chevron,a&&Uu.expanded)})}),c?(0,Ln.jsx)(c,{data:t}):t.label]})}));Vu.displayName="TreeNode";const Zu=(e,t=1,n)=>e.map((e=>({key:e.id,title:null,isLeaf:!e.children,data:{raw:e,depth:t,parentId:n},children:e.children?Zu(e.children,t+1,e.id):void 0}))),Ku=JSON.parse('{"root":"TreeList_root__L29wd","rc-tree-treenode":"TreeList_rc-tree-treenode__L29wd"}');_r("\n.TreeList_root__L29wd {\n\tdisplay: block;\n\toverflow: auto;\n\tfont-family: system-ui, sans-serif;\n\tfont-size: 14px;\n\tcolor: var(--reltio-color-text);\n\tbackground: transparent;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n.TreeList_rc-tree-treenode__L29wd {\n\tlist-style: none;\n}\n");const qu=Ku,Wu=(0,r.memo)((({data:e,LabelComponent:t,expandedKeys:n,onExpand:o})=>{const a=(0,r.useMemo)((()=>e.map((e=>e.id))),[e]),i=void 0!==n,[l,s]=(0,r.useState)((()=>i?new Set:new Set(a))),c=(0,r.useMemo)((()=>Zu(e)),[e]),u=(0,r.useMemo)((()=>(e=>{const t={},n=(e,r=[],o=0)=>{for(let a=0;a<e.length;a++){const i=e[a],l=a===e.length-1;if(t[i.key]=[r,l],i.children?.length){const e=0===o?[...r,!1]:[...r,!l];n(i.children,e,o+1)}}};return n(e),t})(c)),[c]),d=(0,r.useMemo)((()=>i?new Set(n??[]):l),[n,l,i]),f=(0,r.useMemo)((()=>Array.from(d)),[d]),p=(0,r.useCallback)(((e,t)=>{o?.(e,t),i||s(new Set(e))}),[i,o]),h=(0,r.useCallback)(((e,t,n)=>{const r=new Set(d);t?r.delete(e):r.add(e),p(Array.from(r),n)}),[d,p]),m=(0,r.useCallback)((e=>{const n=e.data.raw,r=!!e.isLeaf,o=d.has(e.key),[a,i]=u[e.key]??[[],!1];return(0,Ln.jsx)(Vu,{id:e.key,node:n,depth:e.data.depth,isLeaf:r,isExpanded:o,levelLines:a,isLast:i,onToggle:h,LabelComponent:t})}),[d,u,t,h]);return(0,Ln.jsx)("div",{className:kr(qu.root),children:(0,Ln.jsx)(Du,{treeData:c,expandAction:!1,virtual:!1,selectable:!1,expandedKeys:f,showIcon:!1,titleRender:m})})}));Wu.displayName="TreeList";var $u=n(7517),Gu=n.n($u),Yu=n(8759),Xu=n.n(Yu),Qu=n(3627),Ju=n.n(Qu),ed=n(5743),td=n.n(ed);const nd=({entity:e,avatarClassName:t,imageClassName:n})=>{const r=O(),a=C((e=>e.absoluteImagePath))||"",i=(0,s.getEntityImage)(r,a,e),l=(0,s.getAbsoluteImageUrl)(a,(0,s.getEntityTypeImage)(r,e.type)),c=e=>{e.target.onError=null,e.target.src=(0,s.svg2Url)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return o().createElement(td(),{className:f()(t,n),src:i,imgProps:{onError:c}},o().createElement("img",{className:n,src:l,alt:"fallback entity avatar",onError:c}))};var rd=n(4073),od=n.n(rd),ad=n(2436),id=n.n(ad),ld=function(e,t){return ld=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ld(e,t)};"function"==typeof SuppressedError&&SuppressedError;var sd=function(e){return"function"==typeof e},cd=function(){return"undefined"==typeof window},ud=function(e){return e instanceof Element||e instanceof HTMLDocument},dd=function(e){function t(t){var n=e.call(this,t)||this;n.cancelHandler=function(){n.resizeHandler&&n.resizeHandler.cancel&&(n.resizeHandler.cancel(),n.resizeHandler=null)},n.attachObserver=function(){var e=n.props,t=e.targetRef,r=e.observerOptions;if(!cd()){t&&t.current&&(n.targetRef.current=t.current);var o=n.getElement();o&&(n.observableElement&&n.observableElement===o||(n.observableElement=o,n.resizeObserver.observe(o,r)))}},n.getElement=function(){var e=n.props,t=e.querySelector,r=e.targetDomEl;if(cd())return null;if(t)return document.querySelector(t);if(r&&ud(r))return r;if(n.targetRef&&ud(n.targetRef.current))return n.targetRef.current;var o=(0,Fl.findDOMNode)(n);if(!o)return null;switch(n.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return o;default:return o.parentElement}},n.createResizeHandler=function(e){var t=n.props,r=t.handleWidth,o=void 0===r||r,a=t.handleHeight,i=void 0===a||a,l=t.onResize;(o||i)&&e.forEach((function(e){var t=e&&e.contentRect||{},r=t.width,a=t.height;!n.skipOnMount&&!cd()&&function(e){var t=e.width,r=e.height;n.state.width===t&&n.state.height===r||n.state.width===t&&!i||n.state.height===r&&!o||(null==l||l(t,r),n.setState({width:t,height:r}))}({width:r,height:a}),n.skipOnMount=!1}))},n.getRenderType=function(){var e=n.props,t=e.render,o=e.children;return sd(t)?"renderProp":sd(o)?"childFunction":(0,r.isValidElement)(o)?"child":Array.isArray(o)?"childArray":"parent"};var o=t.skipOnMount,a=t.refreshMode,i=t.refreshRate,l=void 0===i?1e3:i,s=t.refreshOptions;return n.state={width:void 0,height:void 0},n.sizeRef={current:n.state},n.skipOnMount=o,n.targetRef=(0,r.createRef)(),n.observableElement=null,cd()||(n.resizeHandler=function(e,t,n,r){switch(t){case"debounce":return od()(e,n,r);case"throttle":return id()(e,n,r);default:return e}}(n.createResizeHandler,a,l,s),n.resizeObserver=new window.ResizeObserver(n.resizeHandler)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ld(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.attachObserver()},t.prototype.componentDidUpdate=function(){this.attachObserver(),this.sizeRef.current=this.state},t.prototype.componentWillUnmount=function(){cd()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},t.prototype.render=function(){var e=this.props,t=e.render,n=e.children,a=e.nodeType,i=void 0===a?"div":a,l=this.state,s={width:l.width,height:l.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return null==t?void 0:t(s);case"childFunction":return null==n?void 0:n(s);case"child":var c=n;if(c.type&&"string"==typeof c.type){var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(s,["targetRef"]);return(0,r.cloneElement)(c,u)}return(0,r.cloneElement)(c,s);case"childArray":return n.map((function(e){return!!e&&(0,r.cloneElement)(e,s)}));default:return o().createElement(i,null)}},t}(r.PureComponent);const fd=qn((e=>({tooltip:e.tooltip,popper:{zIndex:1e4}})));function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(null,arguments)}function hd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){md(e,t,n[t])}))}return e}function md(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vd=e=>{let{children:t,value:n="",className:a,showOnExceededWidth:i=!0,showOnExceededHeight:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","value","className","showOnExceededWidth","showOnExceededHeight"]);const c=fd(),u=(0,r.useRef)(),[d,f]=(0,r.useState)(!1),p=()=>f(((e,t,n)=>e&&(t&&e.clientWidth<e.scrollWidth||n&&e.clientHeight<e.scrollHeight))(u.current,i,l));return(0,r.useEffect)(p,[l,i,n]),o().createElement(o().Fragment,null,o().createElement(dd,{handleWidth:i,handleHeight:l,onResize:p,refreshMode:"debounce",refreshRate:100}),o().createElement(Ju(),pd({ref:u,title:d?n:"",classes:hd({},c,{tooltip:a})},s),t))},gd={primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},success:{main:"#3B873E"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)",hint:"rgba(0,0,0,0.38)"},divider:"rgba(0,0,0,0.38)",SnackbarContent:{color:"#FFF",bg:"#121212"}},yd=(gd.primary,gd.secondary,qn({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 7px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"16px",marginRight:"16px",flexShrink:0}})),bd=({entity:e,className:t,size:n="small"})=>{const r=yd(),a=O(),i=(0,s.getEntityType)(a,e.type),l=(i?(0,s.getPropWithInheritance)(a,i,"typeColor"):null)||gd.primary.main,c=(0,s.getEntityTypeLabel)(a,e);return o().createElement(vd,{value:c,placement:"top"},o().createElement(Xu(),{style:{backgroundColor:l,color:s.utils.Colors.getColor(l)?"#FFFFFF":"#212121"},className:f()(r[`entityType-${n}`],r["entityType-overflow"],t),component:"div"},c))};var xd=n(6062),Ed=n.n(xd),Cd=n(1552);Ed()(Cd.Z,{insert:"head",singleton:!1});const wd=Cd.Z.locals||{},_d=({entity:e,children:t,className:n,classes:a,renderLabel:i=p.identity})=>{const l=O(),c=C((e=>e.showEntityId)),d=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,s.getEntityId)(e))}),[e]);if((0,p.isNil)(e))return null;const h=(0,s.getLabel)(e.label),m=e.secondaryLabel,v=(0,s.getBusinessCardAttributesText)(l,e),g=(0,s.isActiveObject)(e),y=e.uri,b=(0,s.getEntityId)(e);return o().createElement("div",{className:f()(wd.profileBandWrapper,n),"data-reltio-id":"reltio-profile-band"},o().createElement("div",{className:f()(wd.profileBand,null==a?void 0:a.profileBand,{[wd.inactive]:!g}),"data-entity-uri":y},o().createElement(nd,{key:e.uri,entity:e,avatarClassName:wd.profileIcon,imageClassName:wd.imageProfileIcon}),o().createElement("div",{className:wd.profileInfo},o().createElement("div",null,o().createElement(Xu(),{variant:"h6",className:wd.label},i(h)),m&&o().createElement(Xu(),{variant:"subtitle2",className:wd.secondaryLabel},m),v&&o().createElement(Xu(),{variant:"subtitle1",className:wd.businessCard},v)),o().createElement("div",{className:wd.specialInfo},o().createElement("div",{className:wd.entityType},o().createElement(bd,{entity:e,size:"medium"}),!(0,s.isTempUri)(y)&&c&&o().createElement(Ju(),{title:u().text("Copy to clipboard")},o().createElement(Xu(),{display:"inline",variant:"body2",className:wd.entityId,onClick:d},u().text("Entity ID"),": ",b))))),t&&o().createElement("div",null,t)))};var kd=n(2004),Od=n.n(kd),Sd=n(4179),Ad=n.n(Sd),Md=n(866),Ld=n.n(Md);const Pd=o().createContext({profileBand:{}});Pd.displayName="LabelsContext";const Rd=qn((e=>({tooltip:e.tooltip,wrapper:{lineHeight:0}})));function Td(){return Td=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Td.apply(null,arguments)}const Nd=e=>{const t=(0,r.forwardRef)(((t,n)=>{let{tooltipTitle:r,tooltipPlacement:a,showForDisabled:i=!1,tooltipClassName:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["tooltipTitle","tooltipPlacement","showForDisabled","tooltipClassName"]);const c=Rd();return r?o().createElement(Ju(),{ref:n,title:r,placement:a||"bottom",disableFocusListener:!0,disableTouchListener:!0,classes:{tooltip:f()(c.tooltip,l)},PopperProps:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}},(t=>t?o().createElement("span",{ref:n,className:c.wrapper},o().createElement(e,s)):o().createElement(e,Td({ref:n},s)))(i)):o().createElement(e,Td({ref:n},s))}));return t.displayName="WithTooltip",t};var Id=n(9233),Dd=n.n(Id);const Fd={XXS:"XXS",XS:"XS",S:"S",M:"M",MPlus:"MPlus",L:"L",XL:"XL"},jd=qn({rootAll:{padding:"0"},rootXXS:{height:"16px",width:"16px"},iconXXS:{fontSize:"16px"},rootXS:{height:"20px",width:"20px"},iconXS:{fontSize:"20px"},rootS:{height:"24px",width:"24px"},iconS:{fontSize:"24px"},rootM:{height:"30px",width:"30px"},rootMPlus:{height:"36px",width:"36px"},rootL:{height:"40px",width:"40px"},rootXL:{height:"48px",width:"48px"},disabled:{fillOpacity:.5}});function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bd.apply(null,arguments)}function zd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Hd(e,t,n[t])}))}return e}function Hd(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ud=(0,r.forwardRef)(((e,t)=>{const{className:n,onClick:r,icon:a,size:i=Fd.XS,iconClassName:l,classes:s={}}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","onClick","icon","size","iconClassName","classes"]),u=jd();return o().createElement(Dd(),Bd({ref:t,classes:zd({root:`${u[`root${i}`]} ${u.rootAll}`,disabled:u.disabled},s),onClick:r,className:n},c,{size:"large"}),a&&o().createElement(a,{classes:{root:u[`icon${i}`]},className:l}))}));Ud.displayName="SmallIconButton";const Vd=Nd(Ud),Zd=qn({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),Kd=Nd(Od()),qd=({className:e,total:t=0,onPrev:n,onNext:a,onSearchResultsClick:i,isPrevDisabled:l,isNextDisabled:c})=>{var d;const h=Zd(),m=(0,r.useContext)(Pd),{OPEN_RESULTS:v,SEARCH_RESULT:g,SEARCH_RESULTS:y,NEXT_PROFILE:b,PREVIOUS_PROFILE:x}=(0,p.mergeRight)({OPEN_RESULTS:u().text("Go to search results"),SEARCH_RESULT:u().text("Search result"),SEARCH_RESULTS:u().text("Search results"),PREVIOUS_PROFILE:u().text("Go to previous profile"),NEXT_PROFILE:u().text("Go to next profile")},null!==(d=null==m?void 0:m.profileBand)&&void 0!==d?d:{});return o().createElement("div",{className:f()(h.container,e)},o().createElement(Kd,{className:h.link,component:"button",variant:"caption",onClick:i,underline:"none",tooltipTitle:v},(0,s.formatNumberAsMetric)(t,1e6)," ",1===t?g:y),o().createElement(Vd,{size:"L",icon:Ad(),"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:x,onClick:n,disabled:l,showForDisabled:!0}),o().createElement(Vd,{size:"L",icon:Ld(),"data-reltio-id":"reltio-next-profile-button",tooltipTitle:b,onClick:a,disabled:c,showForDisabled:!0}))},Wd=(0,r.createContext)(null);Wd.displayName="ActionsHookContext";const $d=o().createContext({isLoading:!1,isEmptyState:!1,updateEntityLoadingState:p.identity,updateEntitiesNavigationLoadingState:p.identity,resetLoadingState:p.identity}),Gd=new Promise((()=>{})),Yd=({cancelPrevious:e=!0,cancelOnUnmount:t=!0}={})=>{const n=(0,r.useRef)(p.identity),o=()=>n.current();return(0,r.useEffect)((()=>()=>{t&&o()}),[]),(0,r.useCallback)((t=>(e&&o(),new Promise(((e,r)=>{n.current=()=>r("canceled"),t.then(e,r)})).catch((function(e){if("canceled"===e)return Gd;throw e})))),[])};function Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Qd(e,t,n[t])}))}return e}function Qd(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Jd{constructor({data:{query:e,sortField:t,sortOrder:n},tenant:r,searchTenant:o,apiPath:a,dtssPath:i,globalSearchRequestOptions:l}){this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=(e=[],t={})=>{const n=[this.getQueryFilter(),...e],r=Xd({},this.globalSearchRequestOptions,{sort:this.sortField,order:this.sortOrder,select:"uri,label,type",scoreEnabled:!1},t);return this.isDT()?(0,s.getFilteredEntitiesFromDataTenant)({filters:n,options:r,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.getFilteredEntities)({filters:n,options:r})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.getTotalFromDataTenant)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.getTotals)({filters:e,options:t})).then((e=>e.total))},this.query=e,this.sortField=t,this.sortOrder=n,this.tenant=r,this.searchTenant=o,this.apiPath=a,this.dtssPath=i,this.globalSearchRequestOptions=l}}class ef{constructor({data:e,tenant:t,apiPath:n}){this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=(e=[],t={})=>{const n=[{rawFilter:this.searchBody.filter},...e];return(0,s.getGraphSearchEntities)({apiPath:this.apiPath,tenant:this.tenant,searchBody:Xd({},this.searchBody,{filter:e.length?(0,s.buildFilterQueryString)()(n):this.searchBody.filter}),options:t})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.getEntityId)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.getGraphSearchCount)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=e,this.tenant=t,this.apiPath=n}}const tf=(e,t)=>(0,p.pipe)((0,p.map)((0,p.prop)("uri")),(0,p.reject)((e=>t.includes(e))))(e),nf=()=>{const e=Yd(),t=Yd(),n=Yd(),o=(w="searchNavigationListener",g(E,(e=>e[w]))),a=L("updateSearchNavigationDataFields"),i=L("openEntity"),l=L("openPerspective"),{uri:c,index:u,total:d,tenant:f,cache:p}=M()||{},{type:h,data:m}=C((e=>e.searchProviderData))||{},v=A(),y=C((e=>e.apiPath)),b=C((e=>e.dtssPath)),x=(_=["ovOnly"],C((e=>(0,s.getGlobalSearchRequestOptions)({activityFilter:e.activityFilter,globalFilter:e.globalFilter,searchOptions:e.searchOptions},_))));var w,_;const{updateEntitiesNavigationLoadingState:k}=(0,r.useContext)($d),[O,S]=(0,r.useState)(!1),P=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new Jd(t);case"graphsearch":return new ef(t)}})(h,{data:m,tenant:v,searchTenant:f,apiPath:y,dtssPath:b,globalSearchRequestOptions:x})),[h,m,v,f,y,b,x]),R=(0,r.useCallback)((e=>{a(e)}),[a]),T=(0,r.useCallback)((e=>{const t=v!==f?(0,s.getEntityUriForLink)({uri:e,dataTenant:f}):e;i({uri:t,source:"navigation"})}),[i,v,f]),N=(0,r.useCallback)((()=>{l(h)}),[l,h]);(0,r.useEffect)((()=>{0!==d&&u>=d?R({index:d-1}):u<0&&R({index:0})}),[d,u,R]);const I=(()=>{const e=(0,r.useContext)(Wd);if(!e)throw new Error("ActionsHookContext must be provided");return e})();(0,r.useEffect)((()=>{const e=I(o);return()=>e()}),[I,R,o]);const D=(0,r.useCallback)(((e,r,o)=>{S(!0),t(P.requestTotal()).then((e=>R({total:e}))).catch((e=>{console.warn("Failed to load total count of entities",e)}));const a=o+1;return n(P.requestEntities(15,a)).then((t=>{if(t){if(t.length){const n=tf(t,e);if(n.length>0)return R({cache:e.concat(n),uri:n[0],index:a+t.length-n.length}),void T(n[0]);if(o+t.length<r-1)return D(e,r-t.length,o+t.length)}R({index:a})}})).finally((()=>{S(!1)}))}),[P,R,T]),F=(0,r.useCallback)(((e,r)=>{S(!0),t(P.requestTotal()).then((e=>R({total:e}))).catch((e=>{console.warn("Failed to load total count of entities",e)}));const o=r-1,a=Math.max(0,r-15),i=15+Math.min(0,r-15);return n(P.requestEntities(i,a)).then((t=>{if(t){if(t.length){const n=tf(t,e);if(n.length>0)return R({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void T(n[n.length-1]);if(r-t.length>0)return F(e,r-t.length)}R({index:0})}})).finally((()=>{S(!1)}))}),[P,R,T]),j=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const a=t[n];return S(!0),e(P.checkEntity(a)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),j(e,n,r-1,o)}R({index:o+1,uri:a,cache:t,total:r}),T(a)})).finally((()=>{S(!1)}))}return o>=r-1?(R({cache:t,total:r,index:r-1}),Promise.resolve()):D(t,r,o)}),[P,R,T,D]),B=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const a=t[n];return S(!0),e(P.checkEntity(a)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),B(e,n-1,r-1,o-1)}R({index:o-1,uri:a,cache:t,total:r}),T(a)})).finally((()=>{S(!1)}))}return o<=0?(R({index:0,cache:t,total:r}),Promise.resolve()):F(t,o)}),[P,R,T,F]),z=(0,r.useCallback)((()=>{if(p&&c){const e=p.indexOf(c)-1;B(p,e,d,u).catch((e=>{console.warn("Can't load previous page of search",e)}))}}),[B,p,c,d,u]),H=(0,r.useCallback)((()=>{if(p&&c){const e=p.indexOf(c)+1;j(p,e,d,u).catch((e=>{console.warn("Can't load next page of search",e)}))}}),[j,p,c,d,u]);return(0,r.useEffect)((()=>{k(O)}),[k,O]),(0,r.useEffect)((()=>()=>k(!1)),[]),{total:d,onPrev:z,onNext:H,onSearchResultsClick:N,isPrevDisabled:O||u<=0,isNextDisabled:O||u>=d-1}},rf=({className:e})=>{const{total:t,onPrev:n,onNext:r,onSearchResultsClick:a,isPrevDisabled:i,isNextDisabled:l}=nf();return(()=>{const{cache:e}=M()||{},t=C((e=>e.mode)),n=_();return(0,s.isViewMode)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(qd,{className:e,total:t,onPrev:n,onNext:r,onSearchResultsClick:a,isPrevDisabled:i,isNextDisabled:l}):null},of=(e,t)=>{const n=(0,r.useRef)(!1);(0,r.useEffect)((()=>{n.current?e():n.current=!0}),t)},af=o().createContext([]);function lf(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}af.displayName="RelatedObjectUrisContext";const sf=function(e,t){var n;void 0===t&&(t=lf);var r,o=[],a=!1;return function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];return a&&n===this&&t(i,o)||(r=e.apply(this,i),a=!0,n=this,o=i),r}}(((e,t)=>(0,s.getAllUsersForTenant)({tenant:e,servicesPath:t}))),cf=o().createContext([]);cf.displayName="UsersContext";const uf={comments:[],commentsMap:null,currentComment:null,updateCommentState:p.identity,clearCommentState:p.identity,getCommentState:()=>({}),getComment:p.identity,getComments:()=>new Promise(p.identity),getCommentsCount:p.identity,createComment:()=>new Promise(p.identity),editComment:()=>new Promise(p.identity),createReply:()=>new Promise(p.identity),resolveThread:p.identity,reOpenThread:p.identity,clearCurrentComment:p.identity,deleteComment:p.identity,sending:!1,loading:!1,pageToken:null,deleteReply:p.identity,editReply:()=>new Promise(p.identity),totalCommentsCount:null},df=o().createContext(uf);df.displayName="CollaborationContext";const ff=({collaboration:e,children:t})=>{const n=(()=>{const[e,t]=(0,r.useState)([]),n=A(),o=C((e=>e.servicesPath)),a=e=>{console.warn("Users error",e),t([])};return(0,r.useEffect)((()=>{sf(n,o).then((e=>t(e))).catch(a)}),[n,o]),e})();return o().createElement(df.Provider,{value:e},o().createElement(cf.Provider,{value:n},t))};function pf(){return pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pf.apply(null,arguments)}const hf=e=>o().createElement("svg",pf({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgCommentBubble"},e),o().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),mf=qn((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}}})));function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vf.apply(null,arguments)}const gf=o().forwardRef(((e,t)=>{let{children:n,tooltipTitle:r,icon:a,onClick:i,className:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","tooltipTitle","icon","onClick","className"]);const c=mf();return o().createElement(Ju(),{title:r},o().createElement("div",vf({ref:t,className:f()(c.root,l),onClick:i},s),o().createElement(a,{className:c.icon}),n))}));gf.displayName="BasicCommentButton";const yf=qn({childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}),bf=o().forwardRef((({children:e,onClick:t},n)=>{const r=yf();return o().createElement(gf,{ref:n,tooltipTitle:u().text("Show comment"),icon:hf,onClick:t,"data-reltio-id":"reltio-comment-button"},o().createElement("div",{className:r.childrenWrapper},e))}));function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xf.apply(null,arguments)}bf.displayName="CommentButton";const Ef=e=>o().createElement("svg",xf({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgAddComment"},e),o().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),Cf=({className:e,onClick:t})=>o().createElement(gf,{className:e,onClick:t,tooltipTitle:u().text("Add comment"),icon:Ef});var wf=n(1574),_f=n.n(wf),kf=n(9272),Of=n.n(kf),Sf=n(4436),Af=n.n(Sf),Mf=n(4511),Lf=n.n(Mf),Pf=n(5788),Rf=n.n(Pf);const Tf=({anchorEl:e,leftBackdropRef:t,rightBackdropRef:n,topBackdropRef:r,bottomBackdropRef:o,rafIdRef:a,lastResizeTimestamp:i=0})=>{if(e){if(Date.now()-i>100&&r.current&&t.current&&n.current&&o.current){const a=e.getBoundingClientRect();r.current.style.top="0",r.current.style.left="0",r.current.style.right="0",r.current.style.height=a.top+"px",t.current.style.top="0",t.current.style.left="0",t.current.style.width=a.left+"px",t.current.style.bottom="0",n.current.style.top="0",n.current.style.left=a.right+"px",n.current.style.right="0",n.current.style.bottom="0",o.current.style.top=a.bottom+"px",o.current.style.left="0",o.current.style.right="0",o.current.style.bottom="0",i=Date.now()}a.current=requestAnimationFrame((()=>Tf({anchorEl:e,leftBackdropRef:t,rightBackdropRef:n,topBackdropRef:r,bottomBackdropRef:o,rafIdRef:a,lastResizeTimestamp:i})))}},Nf=qn({backdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:10},popper:{zIndex:1300}});function If(){return If=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},If.apply(null,arguments)}const Df=(0,r.forwardRef)(((e,t)=>{var n;let{open:a,anchorEl:i,className:l,modal:s=!0,excludeAnchorFromBackdrop:c=!0,onClose:u=p.identity}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["open","anchorEl","className","modal","excludeAnchorFromBackdrop","onClose"]);const h=Nf(),v=(0,r.useRef)(),g=(0,r.useRef)(),y=(0,r.useRef)(),b=(0,r.useRef)(),x=(0,r.useRef)(),E=tt();return(0,r.useEffect)((()=>{if(a&&s)return Tf({anchorEl:i,leftBackdropRef:v,rightBackdropRef:g,topBackdropRef:y,bottomBackdropRef:b,rafIdRef:x}),()=>cancelAnimationFrame(x.current)}),[i,a,s]),o().createElement(o().Fragment,null,s&&a&&o().createElement(m(),{container:document.body},c?o().createElement(o().Fragment,null,o().createElement("div",{ref:y,className:h.backdrop,onClick:u}),o().createElement("div",{ref:g,className:h.backdrop,onClick:u}),o().createElement("div",{ref:b,className:h.backdrop,onClick:u}),o().createElement("div",{ref:v,className:h.backdrop,onClick:u})):o().createElement("div",{className:h.backdrop,onClick:u})),o().createElement(Rf(),If({"data-mui-color-scheme":null==E||null===(n=E.palette)||void 0===n?void 0:n.mode,open:a,anchorEl:i},d,{className:f()(l,h.popper),ref:t})))}));Df.displayName="Popper";const Ff=qn((e=>{const t=e.palette.background.paper;return{paper:{backgroundColor:t,maxWidth:1e3},popper:{'&[data-popper-placement*="bottom"] $arrow':{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},'&[data-popper-placement*="top"] $arrow':{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},'&[data-popper-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},'&[data-popper-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}}));function jf(){return jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jf.apply(null,arguments)}const Bf=e=>{let{children:t,className:n,classes:a,transition:i}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className","classes","transition"]);const s=Ff(),c=i?Lf():o().Fragment,[u,d]=(0,r.useState)(null);return o().createElement(Df,jf({className:f()(s.popper,n),modifiers:[{name:"preventOverflow",enabled:!0,options:{rootBoundary:"viewport",padding:14,altAxis:!0}},{name:"arrow",enabled:!0,options:{element:u,padding:4}}],transition:i,excludeAnchorFromBackdrop:!1},l),(({TransitionProps:e})=>o().createElement(c,e,o().createElement(Af(),{className:f()(s.paper,null==a?void 0:a.root)},o().createElement("span",{className:f()(s.arrow,null==a?void 0:a.arrow),ref:d}),t))))};var zf=n(8515),Hf=n.n(zf),Uf=n(3526),Vf=n.n(Uf),Zf=n(2811),Kf=n.n(Zf),qf=n(3222),Wf=n.n(qf);const $f=qn((e=>({menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),Gf=Nd(Wf()),Yf=(0,r.forwardRef)((({item:e,onMenuClose:t=p.identity},n)=>{const r=$f(),{disabled:a,text:i,tooltip:l,onClick:s,id:c="",selectable:u,selected:d}=e;return o().createElement(Gf,{tooltipTitle:l,showForDisabled:!0,classes:{root:r.menuItem},onClick:e=>{t(e),s(e)},disabled:a,ref:n,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${c}`},u&&o().createElement(Kf(),{checked:d,color:"primary"}),o().createElement(Xu(),{classes:{root:r.menuText}},i))}));Yf.displayName="DefaultMenuItemRenderer";const Xf=qn((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,gr.alpha)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,gr.alpha)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"}})));function Qf(){return Qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qf.apply(null,arguments)}function Jf({className:e,menuId:t,buttonComponent:n=or(),buttonContent:a,menuItems:i=[],buttonProps:l={},popoverProps:s={},onMenuOpen:c=p.identity,onMenuClose:u=p.identity,MenuItemRenderer:d=Yf}){const h=n,m=Xf(),v=(0,r.useRef)(),[g,y]=(0,r.useState)(!1);of((()=>{g?c():u()}),[g]);const b=(0,r.useCallback)((e=>{null==e||e.stopPropagation(),y((e=>!e))}),[]);return o().createElement(o().Fragment,null,o().createElement(h,Qf({"data-reltio-id":"drop-down-menu-button",ref:v,className:f()(m.buttonRoot,{[m.selected]:g},e),onClick:b,"aria-pressed":g,"aria-controls":g?t:void 0,"aria-haspopup":"true"},l),a),o().createElement(Vf(),Qf({id:t,variant:"menu",open:g,autoFocus:!1,classes:{paper:m.paper},anchorEl:v.current,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,MenuListProps:{autoFocusItem:g}},s),i.map(((e,t)=>o().createElement(d,{item:e,key:t,onMenuClose:b})))))}const ep=(e,t)=>{(0,r.useEffect)((()=>{if(t){var n,r,o,a;const t=null===(n=e.current)||void 0===n||null===(r=n.value)||void 0===r?void 0:r.length;null===(o=e.current)||void 0===o||o.focus(),null===(a=e.current)||void 0===a||a.setSelectionRange(t,t)}}),[e,t])},tp=(e,t)=>{const n=e.relatedObjectUris.indexOf(t);if(n>=0)return e.relatedObjectUris[1-n]},np=e=>`${u().date(e,"LT")} ${u().date(e,"LL")}`,rp=e=>`comment/${e.commentId}`,op=(e,t)=>`comment/${e.commentId}/reply/${t.replyId}`,ap=(e,t)=>{let n=e;for(const e of t)n=n.split(`+${e}`).join(`@[${e}](${e})`);return n},ip=o().createContext({});ip.displayName="EntitiesMapContext";const lp=o().createContext({generateEntityUrl:s.generateEntityUrlForOldMode,generatePivotingUrl:s.generatePivotingUrlForOldMode,generateTagUrl:s.generateTagUrlForOldMode,generateSegmentUrl:s.generateSegmentUrl});lp.displayName="UrlGeneratorsContext";const sp=e=>e.ctrlKey||e.metaKey;function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cp.apply(null,arguments)}const up=(0,r.forwardRef)(((e,t)=>{let{value:n,children:a,screen:i,className:l,shouldOpenInNewTab:s=!1,disabled:c=!1}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","children","screen","className","shouldOpenInNewTab","disabled"]);const{generateEntityUrl:d}=(0,r.useContext)(lp),f=w(),p=L("openEntity"),h=(0,r.useCallback)((e=>{sp(e)||(p({uri:n,screen:i}),e.preventDefault()),e.stopPropagation()}),[p,i,n]);return c||!n?o().createElement("span",cp({ref:t,className:l},u),a):o().createElement("a",cp({ref:t,href:d({uiPath:f,uri:n,screen:i}),onClick:s?void 0:h,target:s?"_blank":"_self",rel:"noreferrer",className:l},u),a)}));up.displayName="EntityUriLink";const dp=qn((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none",whiteSpace:"break-spaces"}})));function fp(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pp=({comment:e,className:t})=>{const n=dp(),a=(0,r.useContext)(ip),i=O(),l=_();return o().createElement(_f(),{className:t},(()=>{switch(e.objectType){case s.CollaborationObjectTypes.ENTITY_ATTRIBUTE:{const t=(0,s.getAttributeTypeUriByValueUri)(e.objectId,l.type),r=(0,s.findAttributeTypeByUri)(i,t);return o().createElement(o().Fragment,null,o().createElement(Xu(),{className:n.title},u().text("Selected attribute:")),o().createElement(Xu(),{className:n.label},null==r?void 0:r.label))}case s.CollaborationObjectTypes.RELATION_ATTRIBUTE:{const t=e.relatedObjectUris.find((0,p.startsWith)("configuration/relationTypes")),r=t&&(0,s.getAttributeTypeUriByValueUri)(e.objectId,t),a=r&&(0,s.findAttributeTypeByUri)(i,r);return o().createElement(o().Fragment,null,o().createElement(Xu(),{className:n.title},u().text("Selected attribute:")),o().createElement(Xu(),{className:n.label},null==a?void 0:a.label))}case s.CollaborationObjectTypes.ENTITY:return o().createElement(o().Fragment,null,o().createElement(Xu(),{className:n.title},u().text("Selected profile:")),o().createElement(up,{className:f()(n.label,n.link),value:(0,s.getEntityUriForLink)(l)},(0,s.getLabel)(l.label)));case s.CollaborationObjectTypes.RELATION:{const t=tp(e,l.uri),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){fp(e,t,n[t])}))}return e}({},a[t]||{},{uri:t});return o().createElement(o().Fragment,null,o().createElement(Xu(),{className:n.title},u().text("Selected relation:")),o().createElement(Xu(),{className:n.label},o().createElement(up,{className:n.link,value:(0,s.getEntityUriForLink)(l)},(0,s.getLabel)(l.label)),t&&o().createElement(o().Fragment,null,` ${u().text("to")} `,o().createElement(up,{className:n.link,value:(0,s.getEntityUriForLink)(r)},r.label?(0,s.getLabel)(r.label):(0,s.getEntityId)(r)))))}case s.CollaborationObjectTypes.POTENTIAL_MATCH:{var t;const r=tp(e,l.uri),i={uri:r,label:null===(t=a[r])||void 0===t?void 0:t.label};return o().createElement(o().Fragment,null,o().createElement(Xu(),{className:n.title},u().text("Selected potential match:")),o().createElement(Xu(),{className:n.label},o().createElement(up,{className:n.link,value:(0,s.getEntityUriForLink)(l)},(0,s.getLabel)(l.label)),r&&o().createElement(o().Fragment,null,` ${u().text("and")} `,o().createElement(up,{className:n.link,value:(0,s.getEntityUriForLink)(i)},i.label?(0,s.getLabel)(i.label):(0,s.getEntityId)(i)))))}default:return null}})())},hp=qn((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),mp=({comment:e,className:t})=>{const n=hp(),a=(0,r.useContext)(cf);return o().createElement(Xu(),{className:f()(n.root,t)},((e,t,n=e=>e,r="+")=>{const o=[];let a="",i=!1;for(let l=0;l<=e.length;l++){const s=e[l],c=e[l+1],u=l===e.length-1;a+=s,s===r&&0===l&&(i=!0),i&&t.includes(a.slice(r.length))&&(i=!1,o.push(n(a)),a=""),c===r&&(i=!0,o.push(a),a=""),u&&o.push(a)}return o})(e.content,e.namedUsers,(e=>{const t=a.find((t=>t.username===e.slice(1)));return t?o().createElement(Od(),{href:`mailto:${t.email}`,underline:"hover"},e):e})).map(((e,t)=>o().createElement(r.Fragment,{key:t},e))))},vp=qn((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gp.apply(null,arguments)}const yp=e=>{let{className:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","children"]);const a=vp();return o().createElement(td(),gp({},r,{className:f()(a.root,t)}),n.split(".").map((e=>e[0].toUpperCase())).join(""))};var bp=n(7677),xp=n.n(bp),Ep=function(e){return e===Object(e)?Object.keys(e):[]},Cp=function(e){return e===Object(e)?Object.values(e):[]};function wp(e,t){var n=Object.assign({},e);return Op(e)&&Op(t)&&Ep(t).forEach((function(r){Op(t[r])&&r in e?n[r]=wp(e[r],t[r]):Object.assign(n,nl({},r,t[r]))})),n}var _p=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return wp(e,t)}),e)},kp=function(e,t){var n=Object.assign({},e);if(t)for(var r=0;r<t.length;r++)delete n[t[r]];return n},Op=function(e){return!(e!==Object(e)||e instanceof Date||Array.isArray(e))},Sp=function(e){return"&"===e[0]},Ap=function(e){return!Sp(e)},Mp=function(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))},Lp=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Ep(e),r={},o=0,a=n.length;o<a;o+=1){var i=n[o];("[object Object]"!==Object.prototype.toString.call(e[i])||":"===i[0]||"@"===i[0]||t.indexOf(i)>=0)&&(r[i]=e[i])}return r},Pp=function(e,t){for(var n=t.map(Mp),r=Ep(e),o={},a=0,i=r.length;a<i;a+=1){var l=r[a];(t.indexOf(l)>=0||n.indexOf(Mp(l))>=0)&&(o[l]=e[l])}return o},Rp=function e(t,n){for(var r=_p.apply(void 0,[{},kp(t,n)].concat(Pt(Cp(Pp(t,n))))),o=Ep(r).filter(Sp),a=0,i=o.length;a<i;a+=1){var l=o[a],s=e(r[l],n);n.indexOf(l)>=0?(delete r[l],r=_p({},r,s)):r[l]=s}return r};function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Np(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(n),!0).forEach((function(t){nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ip=["animationName"];const Dp=function(e){var t=e.style,n=e.className;return Np(Np({},t?{style:Lp(t,Ip)}:{}),n?{className:n}:{})};var Fp=(0,r.createContext)(Dp);Fp.Provider;const jp=function(e){if(!e)return[];if("string"==typeof e)return[e];if(!Array.isArray(e)){var t=e;return Ep(e).reduce((function(e,n){return e.concat(t[n]?[n]:[])}),[])}return e};var Bp={};function zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zp(Object(n),!0).forEach((function(t){nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Up=function e(t){var n=t.style,r=t.className,o=t.classNames,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dp,i=r||function(e){var t=e&&Ep(e)[0];return t&&t.split("__")[0].split("--")[0]}(o)||(null==n?void 0:n.className),l="function"==typeof n?n:function(e){return function(t,n){var r,o=n||Bp;e.memoize=e.memoize||new WeakMap,e.memoize.has(o)?r=e.memoize.get(o):(r={},e.memoize.set(o,r));var a=jp(t).join(" ");return a in r?r[a]:r[a]=e(t||[],n)}}((function(t,r){var l=jp(t);xp()(Array.isArray(l),"First parameter must be a string, an array of strings, a plain object with boolean values, or a falsy value."),xp()(!r||Op(r),"Optional second parameter must be a plain object.");var s=l.filter(Sp),c=l.filter(Ap),u=c.length>0?function(e){return Cp(Pp(e,c))}:function(e){return[e]},d=function(){return u(Rp(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s))},f=function(e,t,n){if(e){var r=e.split(" ")[0],o=[].concat(Pt(0===t.length?n.map((function(e){return"".concat(r,"--").concat(e.substring(1))})):[]),Pt(t.map((function(e){return"".concat(r,"__").concat(e)}))));return 0===t.length?[e].concat(Pt(o)):o}}(i,c,s);return e(Hp(Hp(Hp({},(n||r)&&{style:_p.apply(void 0,[{}].concat(Pt(d(r)),Pt(d(n))))}),f&&{className:f.join(" ")}),o&&{classNames:o}),a)})),s=Hp({},"function"==typeof n?n:{style:n}),c=Pt(new Set([].concat(Pt(s.className?s.className.split(" "):[]),Pt(i?i.split(" "):[])))),u=o?(c.map((function(e){return o[e]}))||[]).filter(Boolean):c,d=a(Hp(Hp({},s),u.length>0?{className:u.join(" ")}:{}));return Object.assign(l,d),l},Vp=function(e,t,n){var o=t.style,a=t.className,i=t.classNames,l=(0,r.useContext)(Fp);return(0,r.useMemo)((function(){return Up({style:o,className:a,classNames:i},l)}),[o,a,i,l])(n,e)};function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zp(Object(n),!0).forEach((function(t){nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qp=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},Wp="__id__",$p="__display__",Gp=function(e,t){xp()("id"===t||"display"===t,'Second arg must be either "id" or "display", got: "'.concat(t,'"'));var n=e.indexOf($p),r=e.indexOf(Wp);return n<0&&(n=null),r<0&&(r=null),xp()(null!==n||null!==r,"The markup '".concat(e,"' does not contain either of the placeholders '__id__' or '__display__'")),null!==n&&null!==r?"id"===t&&r<=n||"display"===t&&n<=r?0:1:0},Yp=function(e){var t=0;return e.indexOf("__id__")>=0&&t++,e.indexOf("__display__")>=0&&t++,t},Xp=function(){},Qp=function(e,t,n){for(var r,o,a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xp,l=(r=t.map((function(e){return e.regex})),o=/^\/(.+)\/(\w+)?$/,new RegExp(r.map((function(e){var t=Sl(o.exec(e.toString()),3),n=t[1],r=t[2];return xp()(!r,"RegExp flags are not supported. Change /".concat(n,"/").concat(r," into /").concat(n,"/")),"(".concat(n,")")})).join("|"),"g")),s=2,c=t.map((function(e){var t=e.markup,n=s;return s+=Yp(t)+1,n})),u=0,d=0;null!==(a=l.exec(e));){var f=c.find((function(e){return!!a[e]})),p=c.indexOf(f),h=t[p],m=h.markup,v=h.displayTransform,g=f+Gp(m,"id"),y=f+Gp(m,"display"),b=a[g],x=v(b,a[y]),E=e.substring(u,a.index);i(E,u,d),d+=E.length,n(a[0],a.index,d,b,x,p,u),d+=x.length,u=l.lastIndex}u<e.length&&i(e.substring(u),u,d)},Jp=function(e,t){var n="";return Qp(e,t,(function(e,t,r,o,a){n+=a}),(function(e){n+=e})),n},eh=function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"START";return"number"!=typeof n?n:(Qp(e,t,(function(e,t,a,i,l,s,c){void 0===r&&a+l.length>n&&(r="NULL"===o?null:t+("END"===o?e.length:0))}),(function(e,t,o){void 0===r&&o+e.length>=n&&(r=t+n-o)})),void 0===r?e.length:r)},th=function(e,t,n,r){return e.substring(0,t)+r+e.substring(n)},nh=function(e,t){var n=[];return Qp(e,t,(function(e,t,r,o,a,i,l){n.push({id:o,display:a,childIndex:i,index:t,plainTextIndex:r})})),n},rh=function(e,t){return"".concat(e,"-").concat(t)},oh=function(e){return Object.values(e).reduce((function(e,t){return e+t.results.length}),0)},ah=function(e){var t=qp(e),n=e[e.indexOf($p)+11],r=e[e.indexOf(Wp)+6];return new RegExp(t.replace($p,"([^".concat(qp(n||""),"]+?)")).replace(Wp,"([^".concat(qp(r||""),"]+?)")))},ih=function(e){return r.Children.toArray(e).map((function(e){var t=e.props,n=t.markup,r=t.regex,o=t.displayTransform;return{markup:n,regex:r?lh(r,n):ah(n),displayTransform:o||function(e,t){return t||e}}}))},lh=function(e,t){var n=new RegExp(e.toString()+"|").exec("").length-1,r=Yp(t);return xp()(n===r,"Number of capturing groups in RegExp ".concat(e.toString()," (").concat(n,") does not match the number of placeholders in the markup '").concat(t,"' (").concat(r,")")),e},sh=[{base:"A",letters:/(A|Ⓐ|A|À|Á|Â|Ầ|Ấ|Ẫ|Ẩ|Ã|Ā|Ă|Ằ|Ắ|Ẵ|Ẳ|Ȧ|Ǡ|Ä|Ǟ|Ả|Å|Ǻ|Ǎ|Ȁ|Ȃ|Ạ|Ậ|Ặ|Ḁ|Ą|Ⱥ|Ɐ|[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F])/g},{base:"AA",letters:/(Ꜳ|[\uA732])/g},{base:"AE",letters:/(Æ|Ǽ|Ǣ|[\u00C6\u01FC\u01E2])/g},{base:"AO",letters:/(Ꜵ|[\uA734])/g},{base:"AU",letters:/(Ꜷ|[\uA736])/g},{base:"AV",letters:/(Ꜹ|Ꜻ|[\uA738\uA73A])/g},{base:"AY",letters:/(Ꜽ|[\uA73C])/g},{base:"B",letters:/(B|Ⓑ|B|Ḃ|Ḅ|Ḇ|Ƀ|Ƃ|Ɓ|[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181])/g},{base:"C",letters:/(C|Ⓒ|C|Ć|Ĉ|Ċ|Č|Ç|Ḉ|Ƈ|Ȼ|Ꜿ|[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E])/g},{base:"D",letters:/(D|Ⓓ|D|Ḋ|Ď|Ḍ|Ḑ|Ḓ|Ḏ|Đ|Ƌ|Ɗ|Ɖ|Ꝺ|Ð|[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779\u00D0])/g},{base:"DZ",letters:/(DZ|DŽ|[\u01F1\u01C4])/g},{base:"Dz",letters:/(Dz|Dž|[\u01F2\u01C5])/g},{base:"E",letters:/(E|Ⓔ|E|È|É|Ê|Ề|Ế|Ễ|Ể|Ẽ|Ē|Ḕ|Ḗ|Ĕ|Ė|Ë|Ẻ|Ě|Ȅ|Ȇ|Ẹ|Ệ|Ȩ|Ḝ|Ę|Ḙ|Ḛ|Ɛ|Ǝ|[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E])/g},{base:"F",letters:/(F|Ⓕ|F|Ḟ|Ƒ|Ꝼ|[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B])/g},{base:"G",letters:/(G|Ⓖ|G|Ǵ|Ĝ|Ḡ|Ğ|Ġ|Ǧ|Ģ|Ǥ|Ɠ|Ꞡ|Ᵹ|Ꝿ|[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E])/g},{base:"H",letters:/(H|Ⓗ|H|Ĥ|Ḣ|Ḧ|Ȟ|Ḥ|Ḩ|Ḫ|Ħ|Ⱨ|Ⱶ|Ɥ|[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D])/g},{base:"I",letters:/(I|Ⓘ|I|Ì|Í|Î|Ĩ|Ī|Ĭ|İ|Ï|Ḯ|Ỉ|Ǐ|Ȉ|Ȋ|Ị|Į|Ḭ|Ɨ|[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197])/g},{base:"J",letters:/(J|Ⓙ|J|Ĵ|Ɉ|[\u004A\u24BF\uFF2A\u0134\u0248])/g},{base:"K",letters:/(K|Ⓚ|K|Ḱ|Ǩ|Ḳ|Ķ|Ḵ|Ƙ|Ⱪ|Ꝁ|Ꝃ|Ꝅ|Ꞣ|[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2])/g},{base:"L",letters:/(L|Ⓛ|L|Ŀ|Ĺ|Ľ|Ḷ|Ḹ|Ļ|Ḽ|Ḻ|Ł|Ƚ|Ɫ|Ⱡ|Ꝉ|Ꝇ|Ꞁ|[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780])/g},{base:"LJ",letters:/(LJ|[\u01C7])/g},{base:"Lj",letters:/(Lj|[\u01C8])/g},{base:"M",letters:/(M|Ⓜ|M|Ḿ|Ṁ|Ṃ|Ɱ|Ɯ|[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C])/g},{base:"N",letters:/(N|Ⓝ|N|Ǹ|Ń|Ñ|Ṅ|Ň|Ṇ|Ņ|Ṋ|Ṉ|Ƞ|Ɲ|Ꞑ|Ꞥ|Ŋ|[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4\u014A])/g},{base:"NJ",letters:/(NJ|[\u01CA])/g},{base:"Nj",letters:/(Nj|[\u01CB])/g},{base:"O",letters:/(O|Ⓞ|O|Ò|Ó|Ô|Ồ|Ố|Ỗ|Ổ|Õ|Ṍ|Ȭ|Ṏ|Ō|Ṑ|Ṓ|Ŏ|Ȯ|Ȱ|Ö|Ȫ|Ỏ|Ő|Ǒ|Ȍ|Ȏ|Ơ|Ờ|Ớ|Ỡ|Ở|Ợ|Ọ|Ộ|Ǫ|Ǭ|Ø|Ǿ|Ɔ|Ɵ|Ꝋ|Ꝍ|[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C])/g},{base:"OE",letters:/(Œ|[\u0152])/g},{base:"OI",letters:/(Ƣ|[\u01A2])/g},{base:"OO",letters:/(Ꝏ|[\uA74E])/g},{base:"OU",letters:/(Ȣ|[\u0222])/g},{base:"P",letters:/(P|Ⓟ|P|Ṕ|Ṗ|Ƥ|Ᵽ|Ꝑ|Ꝓ|Ꝕ|[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754])/g},{base:"Q",letters:/(Q|Ⓠ|Q|Ꝗ|Ꝙ|Ɋ|[\u0051\u24C6\uFF31\uA756\uA758\u024A])/g},{base:"R",letters:/(R|Ⓡ|R|Ŕ|Ṙ|Ř|Ȑ|Ȓ|Ṛ|Ṝ|Ŗ|Ṟ|Ɍ|Ɽ|Ꝛ|Ꞧ|Ꞃ|[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782])/g},{base:"S",letters:/(S|Ⓢ|S|ẞ|Ś|Ṥ|Ŝ|Ṡ|Š|Ṧ|Ṣ|Ṩ|Ș|Ş|Ȿ|Ꞩ|Ꞅ|[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784])/g},{base:"T",letters:/(T|Ⓣ|T|Ṫ|Ť|Ṭ|Ț|Ţ|Ṱ|Ṯ|Ŧ|Ƭ|Ʈ|Ⱦ|Ꞇ|[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786])/g},{base:"TH",letters:/(Þ|[\u00DE])/g},{base:"TZ",letters:/(Ꜩ|[\uA728])/g},{base:"U",letters:/(U|Ⓤ|U|Ù|Ú|Û|Ũ|Ṹ|Ū|Ṻ|Ŭ|Ü|Ǜ|Ǘ|Ǖ|Ǚ|Ủ|Ů|Ű|Ǔ|Ȕ|Ȗ|Ư|Ừ|Ứ|Ữ|Ử|Ự|Ụ|Ṳ|Ų|Ṷ|Ṵ|Ʉ|[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244])/g},{base:"V",letters:/(V|Ⓥ|V|Ṽ|Ṿ|Ʋ|Ꝟ|Ʌ|[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245])/g},{base:"VY",letters:/(Ꝡ|[\uA760])/g},{base:"W",letters:/(W|Ⓦ|W|Ẁ|Ẃ|Ŵ|Ẇ|Ẅ|Ẉ|Ⱳ|[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72])/g},{base:"X",letters:/(X|Ⓧ|X|Ẋ|Ẍ|[\u0058\u24CD\uFF38\u1E8A\u1E8C])/g},{base:"Y",letters:/(Y|Ⓨ|Y|Ỳ|Ý|Ŷ|Ỹ|Ȳ|Ẏ|Ÿ|Ỷ|Ỵ|Ƴ|Ɏ|Ỿ|[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE])/g},{base:"Z",letters:/(Z|Ⓩ|Z|Ź|Ẑ|Ż|Ž|Ẓ|Ẕ|Ƶ|Ȥ|Ɀ|Ⱬ|Ꝣ|[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762])/g},{base:"a",letters:/(a|ⓐ|a|ẚ|à|á|â|ầ|ấ|ẫ|ẩ|ã|ā|ă|ằ|ắ|ẵ|ẳ|ȧ|ǡ|ä|ǟ|ả|å|ǻ|ǎ|ȁ|ȃ|ạ|ậ|ặ|ḁ|ą|ⱥ|ɐ|[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250])/g},{base:"aa",letters:/(ꜳ|[\uA733])/g},{base:"ae",letters:/(æ|ǽ|ǣ|[\u00E6\u01FD\u01E3])/g},{base:"ao",letters:/(ꜵ|[\uA735])/g},{base:"au",letters:/(ꜷ|[\uA737])/g},{base:"av",letters:/(ꜹ|ꜻ|[\uA739\uA73B])/g},{base:"ay",letters:/(ꜽ|[\uA73D])/g},{base:"b",letters:/(b|ⓑ|b|ḃ|ḅ|ḇ|ƀ|ƃ|ɓ|[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253])/g},{base:"c",letters:/(c|ⓒ|c|ć|ĉ|ċ|č|ç|ḉ|ƈ|ȼ|ꜿ|ↄ|[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184])/g},{base:"d",letters:/(d|ⓓ|d|ḋ|ď|ḍ|ḑ|ḓ|ḏ|đ|ƌ|ɖ|ɗ|ꝺ|ð|[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u00F0])/g},{base:"dz",letters:/(dz|dž|[\u01F3\u01C6])/g},{base:"e",letters:/(e|ⓔ|e|è|é|ê|ề|ế|ễ|ể|ẽ|ē|ḕ|ḗ|ĕ|ė|ë|ẻ|ě|ȅ|ȇ|ẹ|ệ|ȩ|ḝ|ę|ḙ|ḛ|ɇ|ɛ|ǝ|[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD])/g},{base:"f",letters:/(f|ⓕ|f|ḟ|ƒ|ꝼ|[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C])/g},{base:"g",letters:/(g|ⓖ|g|ǵ|ĝ|ḡ|ğ|ġ|ǧ|ģ|ǥ|ɠ|ꞡ|ᵹ|ꝿ|[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F])/g},{base:"h",letters:/(h|ⓗ|h|ĥ|ḣ|ḧ|ȟ|ḥ|ḩ|ḫ|ẖ|ħ|ⱨ|ⱶ|ɥ|[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265])/g},{base:"hv",letters:/(ƕ|[\u0195])/g},{base:"i",letters:/(i|ⓘ|i|ì|í|î|ĩ|ī|ĭ|ï|ḯ|ỉ|ǐ|ȉ|ȋ|ị|į|ḭ|ɨ|ı|[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131])/g},{base:"ij",letters:/(ij|[\u0133])/g},{base:"j",letters:/(j|ⓙ|j|ĵ|ǰ|ɉ|[\u006A\u24D9\uFF4A\u0135\u01F0\u0249])/g},{base:"k",letters:/(k|ⓚ|k|ḱ|ǩ|ḳ|ķ|ḵ|ƙ|ⱪ|ꝁ|ꝃ|ꝅ|ꞣ|[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3])/g},{base:"l",letters:/(l|ⓛ|l|ŀ|ĺ|ľ|ḷ|ḹ|ļ|ḽ|ḻ|ł|ƚ|ɫ|ⱡ|ꝉ|ꞁ|ꝇ|[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747])/g},{base:"lj",letters:/(lj|[\u01C9])/g},{base:"m",letters:/(m|ⓜ|m|ḿ|ṁ|ṃ|ɱ|ɯ|[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F])/g},{base:"n",letters:/(n|ⓝ|n|ǹ|ń|ñ|ṅ|ň|ṇ|ņ|ṋ|ṉ|ƞ|ɲ|ʼn|ꞑ|ꞥ|ŋ|[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u014B])/g},{base:"nj",letters:/(nj|[\u01CC])/g},{base:"o",letters:/(o|ⓞ|o|ò|ó|ô|ồ|ố|ỗ|ổ|õ|ṍ|ȭ|ṏ|ō|ṑ|ṓ|ŏ|ȯ|ȱ|ö|ȫ|ỏ|ő|ǒ|ȍ|ȏ|ơ|ờ|ớ|ỡ|ở|ợ|ọ|ộ|ǫ|ǭ|ø|ǿ|ɔ|ꝋ|ꝍ|ɵ|[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275])/g},{base:"oe",letters:/(œ|[\u0153])/g},{base:"oi",letters:/(ƣ|[\u01A3])/g},{base:"ou",letters:/(ȣ|[\u0223])/g},{base:"oo",letters:/(ꝏ|[\uA74F])/g},{base:"p",letters:/(p|ⓟ|p|ṕ|ṗ|ƥ|ᵽ|ꝑ|ꝓ|ꝕ|[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755])/g},{base:"q",letters:/(q|ⓠ|q|ɋ|ꝗ|ꝙ|[\u0071\u24E0\uFF51\u024B\uA757\uA759])/g},{base:"r",letters:/(r|ⓡ|r|ŕ|ṙ|ř|ȑ|ȓ|ṛ|ṝ|ŗ|ṟ|ɍ|ɽ|ꝛ|ꞧ|ꞃ|[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783])/g},{base:"s",letters:/(s|ⓢ|s|ś|ṥ|ŝ|ṡ|š|ṧ|ṣ|ṩ|ș|ş|ȿ|ꞩ|ꞅ|ẛ|ſ|[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F])/g},{base:"ss",letters:/(ß|[\u00DF])/g},{base:"t",letters:/(t|ⓣ|t|ṫ|ẗ|ť|ṭ|ț|ţ|ṱ|ṯ|ŧ|ƭ|ʈ|ⱦ|ꞇ|[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787])/g},{base:"th",letters:/(þ|[\u00FE])/g},{base:"tz",letters:/(ꜩ|[\uA729])/g},{base:"u",letters:/(u|ⓤ|u|ù|ú|û|ũ|ṹ|ū|ṻ|ŭ|ü|ǜ|ǘ|ǖ|ǚ|ủ|ů|ű|ǔ|ȕ|ȗ|ư|ừ|ứ|ữ|ử|ự|ụ|ṳ|ų|ṷ|ṵ|ʉ|[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289])/g},{base:"v",letters:/(v|ⓥ|v|ṽ|ṿ|ʋ|ꝟ|ʌ|[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C])/g},{base:"vy",letters:/(ꝡ|[\uA761])/g},{base:"w",letters:/(w|ⓦ|w|ẁ|ẃ|ŵ|ẇ|ẅ|ẘ|ẉ|ⱳ|[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73])/g},{base:"x",letters:/(x|ⓧ|x|ẋ|ẍ|[\u0078\u24E7\uFF58\u1E8B\u1E8D])/g},{base:"y",letters:/(y|ⓨ|y|ỳ|ý|ŷ|ỹ|ȳ|ẏ|ÿ|ỷ|ẙ|ỵ|ƴ|ɏ|ỿ|[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF])/g},{base:"z",letters:/(z|ⓩ|z|ź|ẑ|ż|ž|ẓ|ẕ|ƶ|ȥ|ɀ|ⱬ|ꝣ|[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763])/g}],ch=function(e){return function(e){var t=e;return sh.forEach((function(e){t=t.replace(e.letters,e.base)})),t}(e).toLowerCase()},uh=function(e,t,n){return n?ch(e).indexOf(ch(t)):e.toLowerCase().indexOf(t.toLowerCase())},dh=function(e){return"number"==typeof e},fh=function(e){return e===Object(e)?Object.keys(e):[]},ph=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=(t=[]).concat.apply(t,r);return Object.keys(e).reduce((function(t,n){return e.hasOwnProperty(n)&&!a.includes(n)&&void 0!==e[n]&&(t[n]=e[n]),t}),{})};function hh(e,t){return function(n){var r=function(r){var a=r.style,i=r.className,l=r.classNames,s=Al(r,["style","className","classNames"]),c=t?t(s):void 0,u=Vp(e,{style:a,className:i,classNames:l},c);return o().createElement(n,(0,R.Z)({},s,{style:u}))},a=n.displayName||n.name||"Component";return r.displayName="defaultStyle(".concat(a,")"),r}}var mh=function(e){function t(){var e;return al(this,t),e=ul(this,sl(t).apply(this,arguments)),nl((0,z.Z)(e),"setCaretElement",(function(t){e.caretElement=t})),e.state={left:void 0,top:void 0},e}return ll(t,e),j(t,[{key:"componentDidMount",value:function(){this.notifyCaretPosition()}},{key:"componentDidUpdate",value:function(){this.notifyCaretPosition()}},{key:"notifyCaretPosition",value:function(){if(this.caretElement){var e=this.caretElement,t=e.offsetLeft,n=e.offsetTop;if(this.state.left!==t||this.state.top!==n){var r={left:t,top:n};this.setState(r),this.props.onCaretPositionChange(r)}}}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.selectionStart,a=n.selectionEnd,i=n.value,l=n.style,s=n.children,c=n.containerRef,u=ih(s);r===a&&(e=eh(i,u,r,"START"));var d=[],f={},p=d,h=0;return Qp(i,u,(function(e,n,r,o,a,i,l){var s=function(e,t){return e.hasOwnProperty(t)?e[t]++:e[t]=0,t+"_"+e[t]}(f,o);p.push(t.getMentionComponentForMatch(o,a,i,s))}),(function(n,r,o){if(dh(e)&&e>=r&&e<=r+n.length){var a=e-r;p.push(t.renderSubstring(n.substring(0,a),h)),p=[t.renderSubstring(n.substring(a),h)]}else p.push(t.renderSubstring(n,h));h++})),p.push(" "),p!==d&&d.push(this.renderHighlighterCaret(p)),o().createElement("div",(0,R.Z)({},l,{ref:c}),d)}},{key:"renderSubstring",value:function(e,t){return o().createElement("span",(0,R.Z)({},this.props.style("substring"),{key:t}),e)}},{key:"getMentionComponentForMatch",value:function(e,t,n,a){var i={id:e,display:t,key:a},l=r.Children.toArray(this.props.children)[n];return o().cloneElement(l,i)}},{key:"renderHighlighterCaret",value:function(e){return o().createElement("span",(0,R.Z)({},this.props.style("caret"),{ref:this.setCaretElement,key:"caret"}),e)}}]),t}(r.Component);nl(mh,"propTypes",{selectionStart:rt().number,selectionEnd:rt().number,value:rt().string.isRequired,onCaretPositionChange:rt().func.isRequired,containerRef:rt().oneOfType([rt().func,rt().shape({current:"undefined"==typeof Element?rt().any:rt().instanceOf(Element)})]),children:rt().oneOfType([rt().element,rt().arrayOf(rt().element)]).isRequired}),nl(mh,"defaultProps",{value:""});var vh=hh({position:"relative",boxSizing:"border-box",width:"100%",color:"transparent",overflow:"hidden",whiteSpace:"pre-wrap",wordWrap:"break-word",border:"1px solid transparent",textAlign:"start","&singleLine":{whiteSpace:"pre",wordWrap:null},substring:{visibility:"hidden"}},(function(e){return{"&singleLine":e.singleLine}}))(mh),gh=function(e){function t(){return al(this,t),ul(this,sl(t).apply(this,arguments))}return ll(t,e),j(t,[{key:"render",value:function(){var e=ph(this.props,["style","classNames","className"],fh(t.propTypes));return o().createElement("li",(0,R.Z)({id:this.props.id,role:"option","aria-selected":this.props.focused},e,this.props.style),this.renderContent())}},{key:"renderContent",value:function(){var e=this.props,t=e.query,n=e.renderSuggestion,r=e.suggestion,o=e.index,a=e.focused,i=this.getDisplay(),l=this.renderHighlightedDisplay(i,t);return n?n(r,t,l,o,a):l}},{key:"getDisplay",value:function(){var e=this.props.suggestion;if("string"==typeof e)return e;var t=e.id,n=e.display;return void 0!==t&&n?n:t}},{key:"renderHighlightedDisplay",value:function(e){var t=this.props,n=t.ignoreAccents,r=t.query,a=t.style,i=uh(e,r,n);return-1===i?o().createElement("span",a("display"),e):o().createElement("span",a("display"),e.substring(0,i),o().createElement("b",a("highlight"),e.substring(i,i+r.length)),e.substring(i+r.length))}}]),t}(r.Component);nl(gh,"propTypes",{id:rt().string.isRequired,query:rt().string.isRequired,index:rt().number.isRequired,ignoreAccents:rt().bool,suggestion:rt().oneOfType([rt().string,rt().shape({id:rt().oneOfType([rt().string,rt().number]).isRequired,display:rt().string})]).isRequired,renderSuggestion:rt().func,focused:rt().bool});var yh=hh({cursor:"pointer"},(function(e){return{"&focused":e.focused}}))(gh);function bh(){var e=Vp(),t=e("spinner");return o().createElement("div",e,o().createElement("div",t,o().createElement("div",t(["element","element1"])),o().createElement("div",t(["element","element2"])),o().createElement("div",t(["element","element3"])),o().createElement("div",t(["element","element4"])),o().createElement("div",t(["element","element5"]))))}var xh=function(e){function t(){var e,n;al(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ul(this,(e=sl(t)).call.apply(e,[this].concat(o))),nl((0,z.Z)(n),"handleMouseEnter",(function(e,t){n.props.onMouseEnter&&n.props.onMouseEnter(e)})),nl((0,z.Z)(n),"select",(function(e,t){n.props.onSelect(e,t)})),nl((0,z.Z)(n),"setUlElement",(function(e){n.ulElement=e})),n}return ll(t,e),j(t,[{key:"componentDidUpdate",value:function(){if(this.ulElement&&!(this.ulElement.offsetHeight>=this.ulElement.scrollHeight)&&this.props.scrollFocusedIntoView){var e=this.ulElement.scrollTop,t=this.ulElement.children[this.props.focusIndex].getBoundingClientRect(),n=t.top,r=t.bottom,o=this.ulElement.getBoundingClientRect().top;r=r-o+e,(n=n-o+e)<e?this.ulElement.scrollTop=n:r>this.ulElement.offsetHeight&&(this.ulElement.scrollTop=r-this.ulElement.offsetHeight)}}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.a11ySuggestionsListLabel,r=e.isOpened,a=e.style,i=e.onMouseDown,l=e.containerRef,s=e.position,c=e.left,u=e.top;return r?o().createElement("div",(0,R.Z)({},function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return Kp(Kp(Kp({},e),"function"==typeof t?t:{}),{},{style:Kp(Kp({},e.style),"function"==typeof t?t.style:t)})}),{})}({position:s||"absolute",left:c,top:u},a),{onMouseDown:i,ref:l}),o().createElement("ul",(0,R.Z)({ref:this.setUlElement,id:t,role:"listbox","aria-label":n},a("list")),this.renderSuggestions()),this.renderLoadingIndicator()):null}},{key:"renderSuggestions",value:function(){var e=this;return Object.values(this.props.suggestions).reduce((function(t,n){var r=n.results,o=n.queryInfo;return[].concat(Pt(t),Pt(r.map((function(n,r){return e.renderSuggestion(n,o,t.length+r)}))))}),[])}},{key:"renderSuggestion",value:function(e,t,n){var a=this,i=n===this.props.focusIndex,l=t.childIndex,s=t.query,c=r.Children.toArray(this.props.children)[l].props.renderSuggestion,u=this.props.ignoreAccents;return o().createElement(yh,{style:this.props.style("item"),key:"".concat(l,"-").concat(Eh(e)),id:rh(this.props.id,n),query:s,index:n,ignoreAccents:u,renderSuggestion:c,suggestion:e,focused:i,onClick:function(){return a.select(e,t)},onMouseEnter:function(){return a.handleMouseEnter(n)}})}},{key:"renderLoadingIndicator",value:function(){if(this.props.isLoading)return o().createElement(bh,{style:this.props.style("loadingIndicator")})}}]),t}(r.Component);nl(xh,"propTypes",{id:rt().string.isRequired,suggestions:rt().object.isRequired,a11ySuggestionsListLabel:rt().string,focusIndex:rt().number,position:rt().string,left:rt().number,top:rt().number,scrollFocusedIntoView:rt().bool,isLoading:rt().bool,isOpened:rt().bool.isRequired,onSelect:rt().func,ignoreAccents:rt().bool,containerRef:rt().oneOfType([rt().func,rt().shape({current:"undefined"==typeof Element?rt().any:rt().instanceOf(Element)})]),children:rt().oneOfType([rt().element,rt().arrayOf(rt().element)]).isRequired}),nl(xh,"defaultProps",{suggestions:{},onSelect:function(){return null}});var Eh=function(e){return"string"==typeof e?e:e.id},Ch=hh({zIndex:1,backgroundColor:"white",marginTop:14,minWidth:100,list:{margin:0,padding:0,listStyleType:"none"}})(xh);function wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wh(n,!0).forEach((function(t){nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kh={TAB:9,RETURN:13,ESC:27,UP:38,DOWN:40},Oh=!1,Sh={singleLine:rt().bool,allowSpaceInQuery:rt().bool,allowSuggestionsAboveCursor:rt().bool,forceSuggestionsAboveCursor:rt().bool,ignoreAccents:rt().bool,a11ySuggestionsListLabel:rt().string,value:rt().string,onKeyDown:rt().func,onSelect:rt().func,onBlur:rt().func,onChange:rt().func,suggestionsPortalHost:"undefined"==typeof Element?rt().any:rt().PropTypes.instanceOf(Element),inputRef:rt().oneOfType([rt().func,rt().shape({current:"undefined"==typeof Element?rt().any:rt().instanceOf(Element)})]),children:rt().oneOfType([rt().element,rt().arrayOf(rt().element)]).isRequired},Ah=function(e){function t(e){var n;return al(this,t),n=ul(this,sl(t).call(this,e)),nl((0,z.Z)(n),"setContainerElement",(function(e){n.containerElement=e})),nl((0,z.Z)(n),"getInputProps",(function(){var e=n.props,t=e.readOnly,r=e.disabled,o=e.style;return _h({},ph(n.props,["style","classNames","className"],fh(Sh)),{},o("input"),{value:n.getPlainText()},!t&&!r&&{onChange:n.handleChange,onSelect:n.handleSelect,onKeyDown:n.handleKeyDown,onBlur:n.handleBlur,onCompositionStart:n.handleCompositionStart,onCompositionEnd:n.handleCompositionEnd,onScroll:n.updateHighlighterScroll},{},n.isOpened()&&{role:"combobox","aria-controls":n.uuidSuggestionsOverlay,"aria-expanded":!0,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":rh(n.uuidSuggestionsOverlay,n.state.focusIndex)})})),nl((0,z.Z)(n),"renderControl",(function(){var e=n.props,t=e.singleLine,r=e.style,a=n.getInputProps();return o().createElement("div",r("control"),n.renderHighlighter(),t?n.renderInput(a):n.renderTextarea(a))})),nl((0,z.Z)(n),"renderInput",(function(e){return o().createElement("input",(0,R.Z)({type:"text",ref:n.setInputRef},e))})),nl((0,z.Z)(n),"renderTextarea",(function(e){return o().createElement("textarea",(0,R.Z)({ref:n.setInputRef},e))})),nl((0,z.Z)(n),"setInputRef",(function(e){n.inputElement=e;var t=n.props.inputRef;"function"==typeof t?t(e):t&&(t.current=e)})),nl((0,z.Z)(n),"setSuggestionsElement",(function(e){n.suggestionsElement=e})),nl((0,z.Z)(n),"renderSuggestionsOverlay",(function(){if(!dh(n.state.selectionStart))return null;var e=n.state.suggestionsPosition,t=e.position,r=e.left,a=e.top,i=o().createElement(Ch,{id:n.uuidSuggestionsOverlay,style:n.props.style("suggestions"),position:t,left:r,top:a,focusIndex:n.state.focusIndex,scrollFocusedIntoView:n.state.scrollFocusedIntoView,containerRef:n.setSuggestionsElement,suggestions:n.state.suggestions,onSelect:n.addMention,onMouseDown:n.handleSuggestionsMouseDown,onMouseEnter:n.handleSuggestionsMouseEnter,isLoading:n.isLoading(),isOpened:n.isOpened(),ignoreAccents:n.props.ignoreAccents,a11ySuggestionsListLabel:n.props.a11ySuggestionsListLabel},n.props.children);return n.props.suggestionsPortalHost?jl().createPortal(i,n.props.suggestionsPortalHost):i})),nl((0,z.Z)(n),"renderHighlighter",(function(){var e=n.state,t=e.selectionStart,r=e.selectionEnd,a=n.props,i=a.singleLine,l=a.children,s=a.value,c=a.style;return o().createElement(vh,{containerRef:n.setHighlighterElement,style:c("highlighter"),value:s,singleLine:i,selectionStart:t,selectionEnd:r,onCaretPositionChange:n.handleCaretPositionChange},l)})),nl((0,z.Z)(n),"setHighlighterElement",(function(e){n.highlighterElement=e})),nl((0,z.Z)(n),"handleCaretPositionChange",(function(e){n.setState({caretPosition:e})})),nl((0,z.Z)(n),"getPlainText",(function(){return Jp(n.props.value||"",ih(n.props.children))})),nl((0,z.Z)(n),"executeOnChange",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a,i;return n.props.onChange?(a=n.props).onChange.apply(a,[e].concat(r)):n.props.valueLink?(i=n.props.valueLink).requestChange.apply(i,[e.target.value].concat(r)):void 0})),nl((0,z.Z)(n),"handleChange",(function(e){if(Oh=!1,(document.activeElement&&document.activeElement.contentDocument||document).activeElement===e.target){var t=n.props.value||"",r=ih(n.props.children),o=e.target.value,a=function(e,t,n,r){var o=n.selectionStartBefore,a=n.selectionEndBefore,i=n.selectionEndAfter,l=Jp(e,r),s=l.length-t.length;"undefined"===o&&(o=i+s),"undefined"===a&&(a=o),o===a&&a===i&&l.length===t.length&&(o-=1);var c=t.slice(o,i),u=Math.min(o,i),d=a;o===i&&(d=Math.max(a,o+s));var f=eh(e,r,u,"START"),p=eh(e,r,d,"END"),h=eh(e,r,u,"NULL"),m=eh(e,r,d,"NULL"),v=null===h||null===m,g=th(e,f,p,c);if(!v){var y=Jp(g,r);if(y!==t){for(u=0;t[u]===y[u];)u++;c=t.slice(u,i),d=l.lastIndexOf(t.substring(i)),f=eh(e,r,u,"START"),p=eh(e,r,d,"END"),g=th(e,f,p,c)}}return g}(t,o,{selectionStartBefore:n.state.selectionStart,selectionEndBefore:n.state.selectionEnd,selectionEndAfter:e.target.selectionEnd},r);o=Jp(a,r);var i=e.target.selectionStart,l=e.target.selectionEnd,s=!1,c=function(e,t,n){var r=n,o=!1;if(Qp(e,t,(function(e,t,a,i,l,s,c){a<=n&&a+l.length>n&&(r=a,o=!0)})),o)return r}(t,r,i);void 0!==c&&n.state.selectionEnd>c&&(l=i=c,s=!0),n.setState({selectionStart:i,selectionEnd:l,setSelectionAfterMentionChange:s});var u=nh(a,r),d={target:{value:a}};n.executeOnChange(d,a,o,u)}})),nl((0,z.Z)(n),"handleSelect",(function(e){if(n.setState({selectionStart:e.target.selectionStart,selectionEnd:e.target.selectionEnd}),!Oh){var t=n.inputElement;e.target.selectionStart===e.target.selectionEnd?n.updateMentionsQueries(t.value,e.target.selectionStart):n.clearSuggestions(),n.updateHighlighterScroll(),n.props.onSelect(e)}})),nl((0,z.Z)(n),"handleKeyDown",(function(e){if(0!==oh(n.state.suggestions)&&n.suggestionsElement)switch(Object.values(kh).indexOf(e.keyCode)>=0&&(e.preventDefault(),e.stopPropagation()),e.keyCode){case kh.ESC:return void n.clearSuggestions();case kh.DOWN:return void n.shiftFocus(1);case kh.UP:return void n.shiftFocus(-1);case kh.RETURN:case kh.TAB:return void n.selectFocused();default:return}else n.props.onKeyDown(e)})),nl((0,z.Z)(n),"shiftFocus",(function(e){var t=oh(n.state.suggestions);n.setState({focusIndex:(t+n.state.focusIndex+e)%t,scrollFocusedIntoView:!0})})),nl((0,z.Z)(n),"selectFocused",(function(){var e=n.state,t=e.suggestions,r=e.focusIndex,o=Object.values(t).reduce((function(e,t){var n=t.results,r=t.queryInfo;return[].concat(Pt(e),Pt(n.map((function(e){return{result:e,queryInfo:r}}))))}),[])[r],a=o.result,i=o.queryInfo;n.addMention(a,i),n.setState({focusIndex:0})})),nl((0,z.Z)(n),"handleBlur",(function(e){var t=n._suggestionsMouseDown;n._suggestionsMouseDown=!1,t||n.setState({selectionStart:null,selectionEnd:null}),window.setTimeout((function(){n.updateHighlighterScroll()}),1),n.props.onBlur(e,t)})),nl((0,z.Z)(n),"handleSuggestionsMouseDown",(function(e){n._suggestionsMouseDown=!0})),nl((0,z.Z)(n),"handleSuggestionsMouseEnter",(function(e){n.setState({focusIndex:e,scrollFocusedIntoView:!1})})),nl((0,z.Z)(n),"updateSuggestionsPosition",(function(){var e=n.state.caretPosition,t=n.props,r=t.suggestionsPortalHost,o=t.allowSuggestionsAboveCursor,a=t.forceSuggestionsAboveCursor;if(e&&n.suggestionsElement){var i=n.suggestionsElement,l=n.highlighterElement,s=l.getBoundingClientRect(),c=Mh(l,"font-size"),u={left:s.left+e.left,top:s.top+e.top+c},d=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(i){var f={};if(r){f.position="fixed";var p=u.left,h=u.top;p-=Mh(i,"margin-left"),h-=Mh(i,"margin-top"),p-=l.scrollLeft,h-=l.scrollTop;var m=Math.max(document.documentElement.clientWidth,window.innerWidth||0);p+i.offsetWidth>m?f.left=Math.max(0,m-i.offsetWidth):f.left=p,o&&h+i.offsetHeight>d&&i.offsetHeight<h-c||a?f.top=Math.max(0,h-i.offsetHeight-c):f.top=h}else{var v=e.left-l.scrollLeft,g=e.top-l.scrollTop;v+i.offsetWidth>n.containerElement.offsetWidth?f.right=0:f.left=v,o&&u.top-l.scrollTop+i.offsetHeight>d&&i.offsetHeight<s.top-c-l.scrollTop?f.top=g-i.offsetHeight-c:f.top=g}f.left===n.state.suggestionsPosition.left&&f.top===n.state.suggestionsPosition.top&&f.position===n.state.suggestionsPosition.position||n.setState({suggestionsPosition:f})}}})),nl((0,z.Z)(n),"updateHighlighterScroll",(function(){var e=n.inputElement,t=n.highlighterElement;e&&t&&(t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop,t.height=e.height)})),nl((0,z.Z)(n),"handleCompositionStart",(function(){Oh=!0})),nl((0,z.Z)(n),"handleCompositionEnd",(function(){Oh=!1})),nl((0,z.Z)(n),"setSelection",(function(e,t){if(null!==e&&null!==t){var r=n.inputElement;if(r.setSelectionRange)r.setSelectionRange(e,t);else if(r.createTextRange){var o=r.createTextRange();o.collapse(!0),o.moveEnd("character",t),o.moveStart("character",e),o.select()}}})),nl((0,z.Z)(n),"updateMentionsQueries",(function(e,t){n._queryId++,n.suggestions={},n.setState({suggestions:{}});var r=n.props.value||"",a=n.props.children,i=ih(a),l=eh(r,i,t,"NULL");if(null!==l){var s=function(e,t){var n=nh(e,t),r=n[n.length-1];return r?r.plainTextIndex+r.display.length:0}(r.substring(0,l),i),c=e.substring(s,t);o().Children.forEach(a,(function(t,r){if(t){var o=function(e){if(e instanceof RegExp)return e;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowSpaceInQuery,n=qp(e);return new RegExp("(?:^|\\s)(".concat(n,"([^").concat(t?"":"\\s").concat(n,"]*))$"))}(t.props.trigger,n.props),a=c.match(o);if(a){var i=s+c.indexOf(a[1],a.index);n.queryData(a[2],r,i,i+a[1].length,e)}}}))}})),nl((0,z.Z)(n),"clearSuggestions",(function(){n._queryId++,n.suggestions={},n.setState({suggestions:{},focusIndex:0})})),nl((0,z.Z)(n),"queryData",(function(e,t,o,a,i){var l=n.props,s=l.children,c=l.ignoreAccents,u=function(e,t){return e instanceof Array?function(n,r){for(var o=[],a=0,i=e.length;a<i;++a){var l=e[a].display||e[a].id;uh(l,n,t)>=0&&o.push(e[a])}return o}:e}(r.Children.toArray(s)[t].props.data,c),d=u(e,n.updateSuggestions.bind(null,n._queryId,t,e,o,a,i));d instanceof Array&&n.updateSuggestions(n._queryId,t,e,o,a,i,d)})),nl((0,z.Z)(n),"updateSuggestions",(function(e,t,r,o,a,i,l){if(e===n._queryId){n.suggestions=_h({},n.suggestions,nl({},t,{queryInfo:{childIndex:t,query:r,querySequenceStart:o,querySequenceEnd:a,plainTextValue:i},results:l}));var s=n.state.focusIndex,c=oh(n.suggestions);n.setState({suggestions:n.suggestions,focusIndex:s>=c?Math.max(c-1,0):s})}})),nl((0,z.Z)(n),"addMention",(function(e,t){var o=e.id,a=e.display,i=t.childIndex,l=t.querySequenceStart,s=t.querySequenceEnd,c=t.plainTextValue,u=n.props.value||"",d=ih(n.props.children),f=r.Children.toArray(n.props.children)[i].props,p=f.markup,h=f.displayTransform,m=f.appendSpaceOnAdd,v=f.onAdd,g=eh(u,d,l,"START"),y=g+s-l,b=function(e,t,n){return e.replace(Wp,t).replace($p,n)}(p,o,a);m&&(b+=" ");var x=th(u,g,y,b);n.inputElement.focus();var E=h(o,a);m&&(E+=" ");var C=l+E.length;n.setState({selectionStart:C,selectionEnd:C,setSelectionAfterMentionChange:!0});var w={target:{value:x}},_=nh(x,d),k=th(c,l,s,E);n.executeOnChange(w,x,k,_),v&&v(o,a,g,y),n.clearSuggestions()})),nl((0,z.Z)(n),"isLoading",(function(){var e=!1;return o().Children.forEach(n.props.children,(function(t){e=e||t&&t.props.isLoading})),e})),nl((0,z.Z)(n),"isOpened",(function(){return dh(n.state.selectionStart)&&(0!==oh(n.state.suggestions)||n.isLoading())})),nl((0,z.Z)(n),"_queryId",0),n.suggestions={},n.uuidSuggestionsOverlay=Math.random().toString(16).substring(2),n.handleCopy=n.handleCopy.bind((0,z.Z)(n)),n.handleCut=n.handleCut.bind((0,z.Z)(n)),n.handlePaste=n.handlePaste.bind((0,z.Z)(n)),n.state={focusIndex:0,selectionStart:null,selectionEnd:null,suggestions:{},caretPosition:null,suggestionsPosition:{}},n}return ll(t,e),j(t,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.updateSuggestionsPosition()}},{key:"componentDidUpdate",value:function(e,t){t.suggestionsPosition===this.state.suggestionsPosition&&this.updateSuggestionsPosition(),this.state.setSelectionAfterMentionChange&&(this.setState({setSelectionAfterMentionChange:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)}},{key:"render",value:function(){return o().createElement("div",(0,R.Z)({ref:this.setContainerElement},this.props.style),this.renderControl(),this.renderSuggestionsOverlay())}},{key:"handlePaste",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault();var t=this.state,n=t.selectionStart,r=t.selectionEnd,o=this.props,a=o.value,i=o.children,l=ih(i),s=eh(a,l,n,"START"),c=eh(a,l,r,"END"),u=e.clipboardData.getData("text/react-mentions"),d=e.clipboardData.getData("text/plain"),f=th(a,s,c,u||d).replace(/\r/g,""),p=Jp(f,l),h={target:_h({},e.target,{value:f})};this.executeOnChange(h,f,p,nh(f,l))}}},{key:"saveSelectionToClipboard",value:function(e){var t=this.state,n=t.selectionStart,r=t.selectionEnd,o=this.props,a=o.children,i=o.value,l=ih(a),s=eh(i,l,n,"START"),c=eh(i,l,r,"END");e.clipboardData.setData("text/plain",e.target.value.slice(n,r)),e.clipboardData.setData("text/react-mentions",i.slice(s,c))}},{key:"supportsClipboardActions",value:function(e){return!!e.clipboardData}},{key:"handleCopy",value:function(e){e.target===this.inputElement&&this.supportsClipboardActions(e)&&(e.preventDefault(),this.saveSelectionToClipboard(e))}},{key:"handleCut",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault(),this.saveSelectionToClipboard(e);var t=this.state,n=t.selectionStart,r=t.selectionEnd,o=this.props,a=o.children,i=o.value,l=ih(a),s=eh(i,l,n,"START"),c=eh(i,l,r,"END"),u=[i.slice(0,s),i.slice(c)].join(""),d=Jp(u,l),f={target:_h({},e.target,{value:d})};this.executeOnChange(f,u,d,nh(i,l))}}}]),t}(o().Component);nl(Ah,"propTypes",Sh),nl(Ah,"defaultProps",{ignoreAccents:!1,singleLine:!1,allowSuggestionsAboveCursor:!1,onKeyDown:function(){return null},onSelect:function(){return null},onBlur:function(){return null}});var Mh=function(e,t){var n=parseFloat(window.getComputedStyle(e,null).getPropertyValue(t));return isFinite(n)?n:0},Lh=hh({position:"relative",overflowY:"visible",input:{display:"block",width:"100%",position:"absolute",margin:0,top:0,left:0,boxSizing:"border-box",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit"},"&multiLine":{input:_h({height:"100%",bottom:0,overflow:"hidden",resize:"none"},"undefined"!=typeof navigator&&/iPhone|iPad|iPod/i.test(navigator.userAgent)?{marginTop:1,marginLeft:-3}:null)}},(function(e){var t=e.singleLine;return{"&singleLine":t,"&multiLine":!t}}))(Ah),Ph={fontWeight:"inherit"},Rh=function(e){var t=e.display,n=e.style,r=e.className,a=e.classNames,i=Vp(Ph,{style:n,className:r,classNames:a});return o().createElement("strong",i,t)};Rh.propTypes={onAdd:rt().func,onRemove:rt().func,renderSuggestion:rt().func,trigger:rt().oneOfType([rt().string,rt().instanceOf(RegExp)]),markup:rt().string,displayTransform:rt().func,allowSpaceInQuery:rt().bool,isLoading:rt().bool},Rh.defaultProps={trigger:"@",markup:"@[__display__](__id__)",displayTransform:function(e,t){return t||e},onAdd:function(){return null},onRemove:function(){return null},renderSuggestion:null,isLoading:!1,appendSpaceOnAdd:!1};const Th=qn((e=>({root:{backgroundColor:"#fff",fontFamily:"Roboto"},mentionsControl:{fontSize:"13px"},mentionsHighlighter:{padding:"10px 22px",border:"1px solid transparent !important","&::before":{content:({placeholder:e})=>e&&`"${e}"`}},mentionsInput:{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,overflow:"auto !important"},mentionsSuggestions:{padding:"8px 0",zIndex:"1301!important",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)"},mentionsSuggestionsList:{maxHeight:"200px",overflowY:"scroll"},mentionsSuggestionsItem:{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover":{backgroundColor:"rgba(0,0,0,0.04)"}},mentionsSuggestionsItemFocused:{backgroundColor:"rgba(0,0,0,0.04)"},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function Nh(){return Nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nh.apply(null,arguments)}const Ih="mentionsTextArea",Dh=e=>{let{onChange:t,className:n,value:a,placeholder:i}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["onChange","className","value","placeholder"]);const s=Th({placeholder:a?"":i}),c=(0,r.useContext)(cf);return o().createElement("div",{className:f()(s.root,n)},o().createElement(Lh,Nh({},l,{value:a,placeholder:i,onChange:(e,n,r,o)=>{t(n,r,(0,p.uniq)(o.map((({display:e})=>e.slice(1)))))},className:Ih,suggestionsPortalHost:document.body,allowSuggestionsAboveCursor:!0,classNames:{[`${Ih}__input`]:s.mentionsInput,[`${Ih}__highlighter`]:s.mentionsHighlighter,[`${Ih}__control`]:s.mentionsControl,[`${Ih}__suggestions`]:s.mentionsSuggestions,[`${Ih}__suggestions__list`]:s.mentionsSuggestionsList,[`${Ih}__suggestions__item`]:s.mentionsSuggestionsItem,[`${Ih}__suggestions__item--focused`]:s.mentionsSuggestionsItemFocused}}),o().createElement(Rh,{trigger:"+",data:c.map((({username:e})=>({id:e,display:e}))),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:s.mention})))},Fh=qn({root:({isEditing:e})=>({padding:e?"6px 6px 6px 0":" 6px 6px 6px 8px",borderRadius:"4px",backgroundColor:e?"transparent":"rgba(0,114,206,0.06)"}),textField:({isEditing:e})=>({width:e?"100%":"calc(100% - 40px)"}),form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:({isEditing:e})=>({marginLeft:e?"0":"40px",marginTop:"8px"}),button:{"& + $button":{marginLeft:"8px"}}}),jh=e=>{switch(e){case"open":return u().text("Reply...");case"resolved":return u().text("Adding a comment will re-open this");default:return""}},Bh=({inputRef:e,className:t,uri:n,relatedObjectUris:a,objectType:i,popperRef:l,comment:s,reply:c,isEditingComment:d,isEditingReply:h,onCancel:m})=>{const v=d||h,g=Fh({isEditing:v}),[y,b]=(0,r.useState)(!1),{createReply:x,createComment:E,sending:C,editComment:w,editReply:_,getCommentState:k,updateCommentState:O,clearCommentState:A}=(0,r.useContext)(df),M=S(),L=(({comment:e,reply:t,isEditingComment:n,isEditingReply:r})=>(0,p.isNil)(e)?"comment/new":n?rp(e):r?op(e,t):(e=>`comment/${e.commentId}/reply/new`)(e))({comment:s,reply:c,isEditingComment:d,isEditingReply:h}),P=(({comment:e,reply:t,isEditingComment:n,isEditingReply:r})=>{const o=n?e:r?t:null,{content:a="",namedUsers:i=[]}=o||{};return{value:ap(a,i),plainTextValue:a,mentions:i}})({comment:s,reply:c,isEditingComment:d,isEditingReply:h}),{value:R=P.value,plainTextValue:T=P.plainTextValue,mentions:N=P.mentions}=k(n,L),I=""!==P.value.trim(),D=""!==R.trim(),F=y||D||I,j=null==s?void 0:s.status,B=()=>{null==m||m(),A(n,L)};(0,r.useEffect)((()=>{l&&l.current.forceUpdate()}),[l,F]);const z=v?"small":"medium";return o().createElement(_f(),{className:f()(g.root,t)},o().createElement("form",{onSubmit:e=>(e.preventDefault(),(0,p.cond)([[(0,p.always)(!s),()=>E({content:T,namedUsers:N,objectType:i,uri:n,relatedObjectUris:a})],[(0,p.always)(d),()=>w({content:T,namedUsers:N,commentId:s.commentId,objectType:i,replies:s.replies,relatedObjectUris:a,uri:n})],[(0,p.always)(h),()=>_({content:T,namedUsers:N,commentId:s.commentId,replyId:c.replyId})],[p.T,()=>x({content:T,namedUsers:N,commentId:s.commentId,action:"open"===s.status?"none":"reopen",uri:n})]])().then(B).catch(console.log)),className:g.form},o().createElement(_f(),{className:g.main},!v&&o().createElement(yp,{classes:{root:g.avatar}},M),o().createElement(Dh,{className:g.textField,disabled:C,onChange:(e,t,r)=>O(n,L,{value:e,plainTextValue:t,mentions:r}),inputRef:e,value:R,onFocus:()=>b(!0),onBlur:()=>b(!1),placeholder:jh(j)})),F&&o().createElement(_f(),{className:g.buttons},o().createElement(or(),{className:g.button,variant:"contained",color:"primary",disabled:!D||C,type:"submit",size:z},((e,t,n)=>t||n?u().text("Edit"):"open"===e||"resolved"===e?u().text("Reply"):u().text("Comment"))(j,d,h)),o().createElement(or(),{disabled:C,onClick:()=>B(),className:g.button,variant:"outlined",color:"primary",size:z},u().text("Cancel")))))},zh=qn((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px",overflowWrap:"break-word"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),Hh=({onReply:e,className:t,uri:n,comment:a,relatedObjectUris:i,objectType:l})=>{const s=zh(),c=(0,r.useRef)(),d=S(),{commentId:f,createdBy:p,createdTime:h,status:m}=a,v="resolved"===m,g=p===d,{resolveThread:y,reOpenThread:b,sending:x,deleteComment:E,updateCommentState:C,getCommentState:w}=(0,r.useContext)(df),_=rp(a),{isEditing:k}=w(n,_),O=(0,r.useCallback)((e=>C(n,_,{isEditing:e})),[_,C,n]);ep(c,k);const A=(0,r.useMemo)((()=>v?[{text:u().text("Delete"),onClick:()=>E({uri:n,commentId:f})}]:[{text:u().text("Edit"),onClick:()=>O(!0)},{text:u().text("Delete"),onClick:()=>E({uri:n,commentId:f})}]),[f,E,v,O,n]),M=o().createElement(Bh,{inputRef:c,uri:n,relatedObjectUris:i,objectType:l,onCancel:()=>O(!1),isEditingComment:k,comment:a});return o().createElement(_f(),{className:t},o().createElement(_f(),{className:s.header},o().createElement(yp,{classes:{root:s.avatar}},p),o().createElement(_f(),{width:"100%"},o().createElement(Xu(),{className:s.username},p)),o().createElement(Xu(),{className:s.createdAt},np(h)),g&&o().createElement(Jf,{buttonComponent:Vd,buttonProps:{icon:Hf(),tooltipTitle:u().text("Open menu")},popoverProps:{PopoverClasses:{root:s.dropdownMenu}},menuItems:A,menuId:"collaboration-comment-menu"})),o().createElement(_f(),{className:s.body},o().createElement(pp,{comment:a,className:s.commentTarget}),k?M:o().createElement(mp,{comment:a,className:s.message}),o().createElement(_f(),{className:s.buttons},o().createElement(Od(),{className:s.button,onClick:e,component:"button",underline:"hover"},u().text("Reply")),!v&&o().createElement(Od(),{disabled:x,className:s.button,onClick:()=>{y({commentId:f,uri:n})},component:"button",underline:"hover"},u().text("Resolve")),v&&o().createElement(Od(),{disabled:x,className:s.button,onClick:()=>{b({commentId:f,uri:n})},component:"button",underline:"hover"},u().text("Re-open")))))},Uh=qn((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},replyArea:{width:"calc(100% - 60px)"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),Vh=({className:e,reply:t,uri:n,comment:a,popperRef:i})=>{const l=(0,r.useRef)(),s=S(),{createdBy:c,action:d,createdTime:p}=t,h=c===s&&"resolved"!==a.status,{deleteReply:m,updateCommentState:v,getCommentState:g}=(0,r.useContext)(df),y=op(a,t),{isEditing:b}=g(n,y),x=(0,r.useCallback)((e=>v(n,y,{isEditing:e})),[y,v,n]);ep(l,b);const E=Uh(),C=(0,r.useMemo)((()=>[{text:u().text("Edit"),onClick:()=>x(!0)},{text:u().text("Delete"),onClick:()=>m({uri:n,commentId:a.commentId,reply:t})}]),[m,n,a.commentId,t,x]),w=o().createElement(Bh,{inputRef:l,popperRef:i,uri:n,onCancel:()=>x(!1),isEditingReply:b,reply:t,comment:a});return o().createElement(_f(),{className:f()(E.root,e)},o().createElement(yp,{classes:{root:E.avatar}},c),o().createElement(_f(),{className:E.replyArea},o().createElement(_f(),{className:E.header},o().createElement(Xu(),{className:E.username},c),"resolve"===d&&o().createElement(Xu(),{className:E.marked},u().text("Marked as resolved")),"reopen"===d&&o().createElement(Xu(),{className:E.marked},u().text("Re-opened"))),"resolve"!==d&&(b?w:o().createElement(mp,{className:E.message,comment:t})),o().createElement(Xu(),{className:E.createdAt},np(p))),h&&o().createElement(Jf,{buttonComponent:Vd,buttonProps:{icon:Hf(),tooltipTitle:u().text("Open menu")},menuItems:C,menuId:"collaboration-comment-menu"}))},Zh=qn((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),Kh=({uri:e,relatedObjectUris:t,objectType:n,classes:a,popperRef:i,messagesRef:l,comment:s})=>{const c=(0,r.useRef)(),u=Zh({classes:a}),d=o().createElement(Bh,{className:u.sendMessageArea,inputRef:c,popperRef:i,uri:e,relatedObjectUris:t,objectType:n,comment:s});return o().createElement(_f(),{className:u.root},s&&o().createElement(o().Fragment,null,o().createElement("div",{className:u.messages,ref:l},o().createElement(Hh,{comment:s,uri:e,onReply:()=>{c.current.focus()},className:u.comment,relatedObjectUris:t,objectType:n}),o().createElement(_f(),{className:u.replies},s.replies.map((t=>o().createElement(Vh,{key:t.replyId,className:u.repliedComment,reply:t,uri:e,comment:s}))))),d),!s&&d)},qh=(0,r.memo)(Kh),Wh=qn((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:({hasScroll:e})=>({marginLeft:"16px",marginRight:e?"2px":"8px"}),replies:({hasScroll:e})=>({marginLeft:"8px",marginRight:e?"2px":"8px"}),sendMessageArea:({hasScroll:e,scrollWidth:t})=>({marginLeft:"8px",marginRight:e?t+2:"8px"}),messages:{maxHeight:"400px",overflowY:"auto"}}))),$h=({uri:e,relatedObjectUris:t,objectType:n,anchorEl:a,onClose:i,open:l,comment:s})=>{const[c,d]=(0,r.useState)(0),f=Wh({scrollWidth:c,hasScroll:0!==c}),p=(0,r.useRef)(null),{resolveThread:h,loading:m,sending:v}=(0,r.useContext)(df),g=1+(null==s?void 0:s.replies.length);return o().createElement(Bf,{popperRef:p,anchorEl:a,open:l,placement:"right-start",onClose:i,className:f.popper},o().createElement(_f(),{className:f.header},o().createElement(_f(),{className:f.headerInfo},o().createElement(Xu(),{className:f.title},u().text("Comments")),s&&!m&&o().createElement(Xu(),{className:f.counter},u().number(g)," ",1===g?u().text("item"):u().text("items"))),s&&!m&&o().createElement(Vd,{className:f.resolveButton,size:"S",onClick:()=>{h({commentId:s.commentId,uri:e})},disabled:v,showForDisabled:!0,tooltipTitle:u().text("Resolve"),icon:Of(),color:"primary"})),!m&&o().createElement(qh,{popperRef:p,messagesRef:e=>{e&&d(e.offsetWidth-e.clientWidth)},classes:{root:f.collaborationItem,replies:f.replies,sendMessageArea:f.sendMessageArea,messages:f.messages,comment:f.comment},uri:e,relatedObjectUris:t,objectType:n,comment:s}))},Gh="commentsContainerVisibilityArea",Yh=qn((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},[`.${Gh}:hover &`]:{visibility:"visible"}},showAlways:{}}))),Xh=({className:e,uri:t,objectType:n,relatedObjectUris:a,onChangePopupVisibility:i,allowOnlyOneComment:l=!1,showAlways:s=!1})=>{const c=Yh(),[u,d]=(0,r.useState)(null),[p,h]=(0,r.useState)(!1),m=p&&Boolean(u),{currentComment:v,commentsMap:g,getComment:y,clearCurrentComment:b,objectTypes:x}=(0,r.useContext)(df),E=!!g&&(!x||x.includes(n)),C=((null==g?void 0:g[t])||[]).filter((({status:e})=>"resolved"!==e)).reverse(),w=!l||l&&0===C.length,_=null===v&&m;of((()=>{i&&i(m)}),[m]);const k=(0,r.useContext)(af),O=(0,r.useMemo)((()=>k?[...a,...k]:a),[k,a]);return E&&o().createElement("div",{"data-reltio-id":"comments-container",className:f()(c.root,e)},w&&o().createElement(Cf,{className:f()(c.addButton,{[c.showAlways]:s||_}),onClick:e=>{d(e.currentTarget),h(!0)}}),C.map((({replies:e,commentId:t})=>o().createElement(bf,{ref:t===(null==v?void 0:v.commentId)?d:null,key:t,onClick:()=>(e=>{y(e),h(!0)})(t)},1+e))),o().createElement($h,{anchorEl:u,open:m,onClose:()=>{d(null),b(),h(!1)},uri:t,relatedObjectUris:O,objectType:n,comment:v}))};function Qh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Jh(e,t,n[t])}))}return e}function Jh(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const em=(e,t)=>t.filter((t=>t.replyId!==e)),tm=(e,t)=>{const n=e.replies.findIndex((({replyId:e})=>e===t.replyId)),r=[...e.replies];return r[n]=t,r},nm=[],rm=e=>console.warn("Collaboration error",e),om=qn({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),am=()=>{const e=om(),t=L("clearHistoryEvent"),n=k();return n?o().createElement("div",{className:e.root},o().createElement(Xu(),{component:"div"},u().text("You are viewing a historic slice:")," ",o().createElement("span",{className:e.slice},u().date(n.aStamp,"llll"))),o().createElement(or(),{className:e.cancelButton,variant:"contained",color:"primary",onClick:t},u().text("Cancel"))):null};var im=n(3628);Ed()(im.Z,{insert:"head",singleton:!1});const lm=im.Z.locals||{},sm=(0,r.memo)((({entity:e,className:t,historySlice:n,children:a})=>{const i=(({objectIds:e=nm,objectTypes:t,enabled:n=!0,needsTotalCount:o=!1})=>{const a=_(),i=A(),l=C((e=>e.collaborationPath)),c=C((e=>e.isCollaborationEnabled))&&n,[u,d]=(0,r.useState)(null),[f,h]=(0,r.useState)([]),[m,v]=(0,r.useState)(null),[g,y]=(0,r.useState)(null),[b,x]=(0,r.useState)(null),[E,w]=(0,r.useState)(!1),[k,O]=(0,r.useState)(!1),[S,M]=(0,r.useState)({}),L=(0,r.useCallback)((e=>{v((t=>Qh({},t,e)))}),[]),P=null==a?void 0:a.uri,R=c&&P&&!(0,s.isTempUri)(P),T=(0,r.useCallback)(((e,t=!1)=>{R?(0,p.pipe)(s.getCommentsCount,(0,p.andThen)((0,p.map)((0,p.props)(["objectId","comments"]))),(0,p.andThen)(p.fromPairs),(0,p.andThen)(t?v:L),(0,p.otherwise)((e=>{console.warn("Collaboration error",e),v(null)})))({uris:e,tenant:i,collaborationPath:l}):v(null)}),[L,l,R,i]),N=(0,r.useCallback)((()=>{if(R){const e=e=>{console.warn("Collaboration error",e),y(null)};(0,p.pipe)(s.getTotalCommentsCount,(0,p.andThen)((0,p.prop)("total")),(0,p.andThen)(y),(0,p.otherwise)(e))({relatedObjectUri:P,collaborationPath:l,tenant:i})}else y(null)}),[R,l,P,i]);(0,r.useEffect)((()=>{o&&N()}),[N,o]),(0,r.useEffect)((()=>{T(e,!0)}),[e,T]);const I=(0,r.useCallback)(((e,t)=>{(0,s.getComments)({collaborationPath:l,tenant:i,relatedObjectUri:e,pageToken:t}).then((({items:e,nextPageToken:n})=>{h((n=>t?(0,p.uniqBy)((0,p.prop)("commentId"),[...n,...e]):e)),d(n)})).catch(rm)}),[l,i]),D=(0,r.useCallback)((e=>{O(!0),(0,s.getComment)({collaborationPath:l,tenant:i,commentId:e}).then(x).catch(rm).finally((()=>O(!1)))}),[l,i]),F=(0,r.useCallback)((({content:e,namedUsers:t,objectType:n,uri:r,relatedObjectUris:o})=>{w(!0);const a={objectId:r,content:e,relatedObjectUris:o,objectType:n,visibility:"public",namedUsers:t,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,s.createComment)({collaborationPath:l,tenant:i,data:a}).then((([e])=>((e,t)=>{x(e),v((n=>Qh({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),h((t=>[e,...t])),y((e=>(e||0)+1))})(e,r))).catch(rm).finally((()=>w(!1)))}),[l,i]),j=(0,r.useCallback)((({content:e,namedUsers:t,objectType:n,uri:r,relatedObjectUris:o,commentId:a,replies:c})=>{w(!0);const u={objectId:r,content:e,relatedObjectUris:o,objectType:n,visibility:"public",namedUsers:t,commentId:a,replies:c};return(0,s.updateComment)({collaborationPath:l,tenant:i,data:u}).then((e=>(e=>{x(e),h((0,p.map)((0,p.when)((0,p.propEq)("commentId",e.commentId),(0,p.always)(e))))})(Qh({},e,{replies:c})))).catch(rm).finally((()=>w(!1)))}),[l,i]),B=(0,r.useCallback)((({uri:e,commentId:t})=>{w(!0),(0,s.deleteComment)({collaborationPath:l,tenant:i,commentId:t}).then((()=>((e,t)=>{let n,r;x(null),v((n=>{var o,a;r=null==n||null===(o=n[t])||void 0===o||null===(a=o.find((t=>t.commentId===e)))||void 0===a?void 0:a.replies;const i=n[t]||[];return Qh({},n,{[t]:i.filter((t=>t.commentId!==e))})})),h((t=>{var r;return n=null===(r=t.find((t=>t.commentId===e)))||void 0===r?void 0:r.replies.length,t.filter((t=>t.commentId!==e))})),y((e=>{var t,o;return Math.max((e||0)-(1+(null!==(t=null!==(o=n)&&void 0!==o?o:r)&&void 0!==t?t:0)),0)}))})(t,e))).catch(rm).finally((()=>w(!1)))}),[l,i]),z=(0,r.useCallback)(((e,t,n,r)=>{const o="resolve"===e.action?"resolved":"open",{replyId:a}=e;x("resolved"===o?e=>{if(e)return null}:t=>{if(t)return Qh({},t,{replies:r?em(a,t.replies):[...t.replies,e]})}),v((e=>Qh({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?Qh({},e,{status:o,replies:r?e.replies-1:e.replies+1}):e))}))),h((t=>t.map((t=>t.commentId===n?Qh({},t,{status:o,replies:r?em(e.replyId,t.replies):[...t.replies,e]}):t)))),y(r?e=>Math.max((e||0)-1,0):e=>(e||0)+1)}),[]),H=(0,r.useCallback)((({uri:e,commentId:t,reply:n})=>{w(!0),(0,s.deleteReply)({collaborationPath:l,tenant:i,commentId:t,replyId:n.replyId}).then((()=>z(n,e,t,!0))).catch(rm).finally((()=>w(!1)))}),[l,z,i]),U=(0,r.useCallback)(((e,t)=>{x((t=>{if(t)return Qh({},t,{replies:tm(t,e)})})),h((n=>n.map((n=>n.commentId===t?Qh({},n,{replies:tm(n,e)}):n))))}),[]),V=(0,r.useCallback)((({content:e,namedUsers:t,commentId:n,replyId:r})=>{w(!0);const o={content:e,namedUsers:t};return(0,s.updateReply)({collaborationPath:l,tenant:i,commentId:n,replyId:r,data:o}).then((e=>U(e,n))).catch(rm).finally((()=>w(!1)))}),[l,i,U]),Z=(0,r.useCallback)((({content:e,namedUsers:t,commentId:n,action:r,uri:o})=>{w(!0);const a={content:e,action:r,namedUsers:t};return(0,s.createReply)({collaborationPath:l,tenant:i,commentId:n,data:a}).then((([e])=>z(e,o,n))).catch(rm).finally((()=>w(!1)))}),[l,i,z]),K=(0,r.useCallback)((({commentId:e,uri:t})=>{Z({content:"",namedUsers:[],commentId:e,action:"resolve",uri:t})}),[Z]),q=(0,r.useCallback)((({commentId:e,uri:t})=>{Z({content:"",namedUsers:[],commentId:e,action:"reopen",uri:t})}),[Z]),W=(0,r.useCallback)((()=>{x(null)}),[]),$=(0,r.useCallback)(((e,t)=>(0,p.pathOr)({},[e,t],S)),[S]),G=(0,r.useCallback)(((e,t)=>M((0,p.dissocPath)([e,t]))),[]),Y=(0,r.useCallback)(((e,t,n)=>{M((r=>{const o=[e,t],a=(0,p.path)(o,r);return(0,p.assocPath)(o,(0,p.mergeRight)(a,n),r)}))}),[]);return(0,r.useMemo)((()=>({clearCurrentComment:W,comments:f,commentsMap:m,getCommentState:$,updateCommentState:Y,clearCommentState:G,createComment:F,createReply:Z,currentComment:b,deleteComment:B,editComment:j,getComment:D,getComments:I,getCommentsCount:T,loading:k,objectTypes:t,pageToken:u,reOpenThread:q,resolveThread:K,sending:E,deleteReply:H,editReply:V,totalCommentsCount:g})),[W,f,m,$,Y,G,F,Z,b,B,j,D,I,T,k,t,u,q,K,E,H,V,g])})({objectIds:(0,r.useMemo)((()=>(0,s.getProfileBandObjectIdsForCollaboration)(e)),[e])}),l=(0,s.getEntityUriForLink)(e);return o().createElement(ff,{collaboration:i},o().createElement(_d,{className:f()(t,Gh),entity:(null==n?void 0:n.aEntity)||e},n?o().createElement(am,null):o().createElement(o().Fragment,null,a?o().createElement("div",{className:f()(lm.profileBandNavigation,lm.navigationRow)},o().createElement(rf,null),a):o().createElement(rf,{className:lm.profileBandNavigation}),o().createElement(Xh,{className:lm.comments,uri:l,relatedObjectUris:(0,s.createRelatedObjectUris)(s.CollaborationObjectTypes.ENTITY,{entityUri:l}),objectType:s.CollaborationObjectTypes.ENTITY}))))}));sm.displayName="ScreenProfileBand";const cm=(0,r.memo)((({entity:e,onOpenDataImport:t})=>o().createElement(sm,{entity:e},o().createElement(or(),{variant:"text",color:"primary",onClick:t,startIcon:o().createElement(Gu(),null),title:u().text("Import data")},u().text("Import")))));cm.displayName="HierarchyProfileBand";var um=n(9681),dm=n.n(um);const fm=qn({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,zIndex:10,backgroundColor:"rgba(255, 255, 255, 0.37)"},transparent:{backgroundColor:"transparent"},relativePosition:{position:"relative"}}),pm=({transparent:e=!1,relativePosition:t=!1,className:n})=>{const r=fm();return o().createElement("div",{"data-reltio-id":"reltio-linear-load-indicator",className:f()(r.loadingOverlay,n,{[r.transparent]:e,[r.relativePosition]:t})},o().createElement(dm(),{color:"primary"}))};function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hm.apply(null,arguments)}function mm(){return mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mm.apply(null,arguments)}function vm(){return vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vm.apply(null,arguments)}function gm(){return gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gm.apply(null,arguments)}function ym(){return ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ym.apply(null,arguments)}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bm.apply(null,arguments)}const xm=qn((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"10px",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box","&$root_small":{minHeight:"160px"},"& $text":{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px",letterSpacing:"0.25px",textAlign:"center"},"& $secondaryText":{color:e.palette.text.secondary,fontSize:"15px",fontWeight:300,lineHeight:"18px",letterSpacing:"0.11px",textAlign:"center",paddingTop:"3px"}},root_small:{},small:{width:"88px",height:"88px"},embedded:{flexShrink:0,width:"190px",height:"190px",padding:"8px"},full:{width:"256px",height:"256px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:500,marginTop:"16px"},text:{},secondaryText:{},button:{minHeight:36,minWidth:64,maxWidth:500,padding:"10px 16px",borderRadius:"2px",boxShadow:"0 0 2px 0 rgba(0,0,0,0.12), 0 2px 2px 0 rgba(0,0,0,0.24), 0 0 8px 0 rgba(0,0,0,0.12), 0 8px 8px 0 rgba(0,0,0,0.24)",fontSize:"14px",fontWeight:500,lineHeight:"16px",marginTop:"24px"}})));function Em(){return Em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Em.apply(null,arguments)}let Cm=function(e){return e.full="full",e.embedded="embedded",e.small="small",e}({});const wm={SEARCH_RESULTS:e=>o().createElement("svg",hm({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgEmptySearchResults"},e),o().createElement("defs",null,o().createElement("radialGradient",{cx:"50%",cy:"100%",fx:"50%",fy:"100%",r:"81.681%",gradientTransform:"matrix(.98998 0 0 .612 .005 .388)",id:"EmptySearchResults_svg__c"},o().createElement("stop",{stopColor:"#00BFFF",stopOpacity:.5,offset:"0%"}),o().createElement("stop",{stopColor:"#9EE8FF",stopOpacity:0,offset:"100%"})),o().createElement("radialGradient",{cx:"50%",cy:"111.651%",fx:"50%",fy:"111.651%",r:"87.693%",gradientTransform:"matrix(0 -.97693 .7263 0 -.31 1.605)",id:"EmptySearchResults_svg__f"},o().createElement("stop",{stopColor:"#91F8E5",stopOpacity:.6,offset:"0%"}),o().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),o().createElement("radialGradient",{cx:"50%",cy:"103.659%",fx:"50%",fy:"103.659%",r:"90.207%",gradientTransform:"matrix(0 -1 2.23905 0 -1.821 1.537)",id:"EmptySearchResults_svg__g"},o().createElement("stop",{stopColor:"#FFF",offset:"0%"}),o().createElement("stop",{stopColor:"#73FAFF",stopOpacity:.21,offset:"59.38%"}),o().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),o().createElement("linearGradient",{x1:"50%",y1:"170.771%",x2:"50%",y2:"10.303%",id:"EmptySearchResults_svg__e"},o().createElement("stop",{stopColor:"#91F8E5",offset:"0%"}),o().createElement("stop",{stopColor:"#99FCFF",stopOpacity:0,offset:"100%"})),o().createElement("filter",{x:"-25.9%",y:"-26.2%",width:"151.8%",height:"152.3%",filterUnits:"objectBoundingBox",id:"EmptySearchResults_svg__d"},o().createElement("feGaussianBlur",{stdDeviation:15,in:"SourceGraphic"})),o().createElement("circle",{id:"EmptySearchResults_svg__a",cx:128,cy:128,r:128})),o().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"EmptySearchResults_svg__b",fill:"#fff"},o().createElement("use",{xlinkHref:"#EmptySearchResults_svg__a"})),o().createElement("use",{fillOpacity:.2,fill:"#A792CD",xlinkHref:"#EmptySearchResults_svg__a"}),o().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},o().createElement("g",{transform:"translate(56 34)"},o().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},o().createElement("path",{d:"M0 6.99C0 3.13 3.137 0 7 0h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H7c-3.866 0-7-3.143-7-6.99V6.99z"}),o().createElement("path",{d:"M13 25.99c0-3.86 3.137-6.99 7-6.99h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H20c-3.866 0-7-3.143-7-6.99V25.99z",opacity:.4})),o().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 45.833)"},o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),o().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),o().createElement("path",{d:"M35.365.861h69.768a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),o().createElement("path",{d:"M34.274 15.048h126.164a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),o().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),o().createElement("rect",{fill:"#645F6D",opacity:.5,x:21.756,y:17.46,width:87.022,height:12.004,rx:6.002}),o().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 87.302)"},o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),o().createElement("rect",{fill:"#E3EBF4",x:0,y:1.091,width:20.668,height:20.734,rx:10.334}),o().createElement("path",{d:"M35.365.861h82.647a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),o().createElement("path",{d:"M34.274 15.048H174.58a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),o().createElement("path",{d:"M33.182 24.869h113.119a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),o().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 128.77)"},o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),o().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),o().createElement("path",{d:"M35.365.861h110.929a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),o().createElement("path",{d:"M34.274 15.048h92.443a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),o().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})))),o().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},o().createElement("path",{fill:"#446275",d:"M72.246 84.033l8.66 5-35.5 61.488-8.66-5-12.556-24.729-51.307-29.622 20.431-35.388 50.648 29.242z"}),o().createElement("path",{d:"M62.906 120.21l-80.091-46.24 10.5-18.188 50.647 29.242 28.284-.99 8.66 5-18 31.176z",fillOpacity:.2,fill:"#FFF"}),o().createElement("path",{d:"M27.566 75.558L3.877 109.065l-5.013-2.895 26.045-32.146 2.657 1.534zm9.467 5.466L13.345 114.53l-5.014-2.895L34.377 79.49l2.656 1.534zm8.158 4.71l-22.32 34.297-5.013-2.895L43.903 84.99l1.288.744z",fill:"#527585"}),o().createElement("path",{d:"M11.524 90.544l13.385-16.52 2.657 1.534-12.174 17.22-3.868-2.234zm9.467 5.467L34.377 79.49l2.656 1.534-12.174 17.22-3.868-2.233zm9.527 5.5L43.903 84.99l1.288.744-11.47 17.626-3.203-1.85z",fill:"#76A2B5",opacity:.6}),o().createElement("path",{d:"M.355 59.848l-23.689 33.507-5.013-2.895 26.045-32.146 2.657 1.534zm9.468 5.466L-13.866 98.82l-5.013-2.895L7.166 63.78l2.657 1.534zm8.158 4.71L-4.34 104.32l-5.014-2.895L16.692 69.28l1.289.744z",fillOpacity:.1,fill:"#000"}),o().createElement("g",null,o().createElement("path",{fill:"url(#EmptySearchResults_svg__c)",opacity:.993,filter:"url(#EmptySearchResults_svg__d)",d:"M.63 0h173.74L123 172H52z",transform:"rotate(120 90.404 138.861)"}),o().createElement("path",{fill:"url(#EmptySearchResults_svg__e)",opacity:.3,d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),o().createElement("path",{fill:"url(#EmptySearchResults_svg__f)",opacity:.3,d:"M4 2h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),o().createElement("path",{fill:"url(#EmptySearchResults_svg__g)",d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),o().createElement("path",{fill:"#FFF",opacity:.196,d:"M212.363 205.344l-1 1.732L60.418 124.52l4.977-8.62z"})),o().createElement("path",{fill:"#76A2B5",d:"M73.112 84.533l-35.5 61.488-.866-.5 35.5-61.488z"}),o().createElement("path",{fill:"#F3F3F3",d:"M80.906 89.033l-35.5 61.488-.866-.5 35.5-61.488z"}),o().createElement("path",{fill:"#538196",d:"M55.112 115.71l-17.5 30.311-.866-.5 17.5-30.31z"})))),SELECT_ATTRIBUTES:e=>o().createElement("svg",mm({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgSelectAttributes"},e),o().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),o().createElement("mask",{id:"SelectAttributes_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},o().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),o().createElement("g",{mask:"url(#SelectAttributes_svg__a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#SelectAttributes_svg__paint0_linear_0_19219)"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#SelectAttributes_svg__paint1_linear_0_19219)"}),o().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),o().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2V140.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),o().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),o().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zM148 37a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"SelectAttributes_svg__paint0_linear_0_19219",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),o().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"SelectAttributes_svg__paint1_linear_0_19219",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})))),NO_DATA:e=>o().createElement("svg",vm({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgNoData"},e),o().createElement("defs",null,o().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__b"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:0,offset:"0%"}),o().createElement("stop",{stopColor:"#F4F4F4",offset:"100%"})),o().createElement("linearGradient",{x1:"69.573%",y1:"86.747%",x2:"38.144%",y2:"33.403%",id:"NoData_svg__d"},o().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),o().createElement("stop",{stopColor:"#000",offset:"100%"})),o().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__e"},o().createElement("stop",{stopColor:"#EEFBFF",offset:"0%"}),o().createElement("stop",{stopColor:"#0072CE",offset:"100%"})),o().createElement("filter",{x:"-7.7%",y:"-7.5%",width:"115.3%",height:"115%",filterUnits:"objectBoundingBox",id:"NoData_svg__f"},o().createElement("feOffset",{dx:0,dy:2,in:"SourceAlpha",result:"shadowOffsetOuter1"}),o().createElement("feGaussianBlur",{stdDeviation:2,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),o().createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0",type:"matrix",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),o().createElement("feMerge",null,o().createElement("feMergeNode",{in:"shadowMatrixOuter1"}),o().createElement("feMergeNode",{in:"SourceGraphic"}))),o().createElement("circle",{id:"NoData_svg__a",cx:128,cy:128,r:128})),o().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"NoData_svg__c",fill:"#fff"},o().createElement("use",{xlinkHref:"#NoData_svg__a"})),o().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#NoData_svg__a"}),o().createElement("path",{fill:"url(#NoData_svg__b)",mask:"url(#NoData_svg__c)",d:"M0 9h256v247H0z"}),o().createElement("g",{mask:"url(#NoData_svg__c)"},o().createElement("g",{transform:"translate(29 37)"},o().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},o().createElement("path",{fillOpacity:.8,opacity:.5,d:"M14.565 8h228.144v176.476H14.565z"}),o().createElement("path",{d:"M0 8.01C0 3.586 3.576 0 7.997 0h223.838a7.997 7.997 0 017.997 8.01v152.401c0 4.424-3.577 8.01-7.997 8.01H7.997A7.997 7.997 0 010 160.411V8.01z"})),o().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 42.105)"},o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),o().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),o().createElement("path",{d:"M32.488.791h64.093a3.509 3.509 0 110 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),o().createElement("path",{d:"M31.486 13.824h115.902a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),o().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),o().createElement("rect",{fill:"#645F6D",opacity:.5,x:19.986,y:16.04,width:79.944,height:11.028,rx:5.514}),o().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 80.2)"},o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),o().createElement("rect",{fill:"#E3EBF4",x:0,y:1.003,width:18.987,height:19.048,rx:9.493}),o().createElement("path",{d:"M32.488.791h75.925a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),o().createElement("path",{d:"M31.486 13.824h128.893a2.506 2.506 0 110 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),o().createElement("path",{d:"M30.483 22.846h103.918a1.504 1.504 0 010 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),o().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 118.296)"},o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),o().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),o().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),o().createElement("path",{d:"M32.488.791h101.906a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),o().createElement("path",{d:"M31.486 13.824h84.924a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),o().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})))),o().createElement("g",{mask:"url(#NoData_svg__c)"},o().createElement("path",{d:"M154.445 45.134v154.072H36.625V45.134h.811C35.508 62.52 41.07 80.609 54.12 93.944c22.74 23.235 59.61 23.235 82.352 0 13.05-13.335 18.612-31.424 16.683-48.81h1.29z",fill:"url(#NoData_svg__d)",opacity:.1,transform:"rotate(-30 291.014 34.548)"}),o().createElement("path",{d:"M27.473 93.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"url(#NoData_svg__e)",opacity:.2,transform:"translate(70 86)"}),o().createElement("g",{filter:"url(#NoData_svg__f)",strokeWidth:1,fill:"none",transform:"translate(70 86)"},o().createElement("path",{d:"M59.697 0c32.97 0 59.697 26.746 59.697 59.738 0 15.185-5.662 29.047-14.988 39.587l51.204 51.24a89.336 89.336 0 01-10.097 9.392l-51.38-51.416c-9.73 6.888-21.61 10.936-34.436 10.936C26.727 119.477 0 92.73 0 59.738 0 26.746 26.727 0 59.697 0zm0 17.756c-23.17 0-41.953 18.796-41.953 41.982s18.783 41.982 41.953 41.982 41.953-18.796 41.953-41.982-18.783-41.982-41.953-41.982z",fill:"#B5C8C9"}),o().createElement("path",{d:"M21.508 105.656C8.365 94.698 0 78.196 0 59.738 0 26.746 26.727 0 59.697 0c18.444 0 34.935 8.37 45.885 21.523l-9.794 9.8c-8.408-10.68-21.45-17.537-36.091-17.537-25.361 0-45.92 20.573-45.92 45.952 0 14.652 6.852 27.702 17.525 36.117l-9.794 9.8z",fillOpacity:.4,fill:"#FFF"})),o().createElement("path",{d:"M97.473 179.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"#D9F5FF",opacity:.4,style:{mixBlendMode:"soft-light"}}),o().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.87,fill:"#000",style:{mixBlendMode:"overlay"}}),o().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.38,fill:"#3C74B4"})))),ERROR:e=>o().createElement("svg",gm({width:88,height:88,viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgError"},e),o().createElement("mask",{id:"Error_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:88,height:88},o().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#fff"})),o().createElement("g",{mask:"url(#Error_svg__a)"},o().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#CAC4D5",fillOpacity:.3}),o().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M19.987 6.73l49.449 6.072a.687.687 0 01.596.767l-7.845 63.888a.688.688 0 01-.766.6L7.214 71.4a.688.688 0 01-.599-.763l.408-3.326L19.987 6.73z",fill:"#fff"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M1.267 25.921l45.86-19.466a.687.687 0 01.9.366l25.15 59.251a.61.61 0 01-.386.84L22.34 82.765a.719.719 0 01-.887-.445l-20.185-56.4z",fill:"#fff"}),o().createElement("path",{d:"M65.631 9.23H11.017a.688.688 0 00-.687.687v64.37c0 .38.307.687.687.687h54.614c.38 0 .688-.308.688-.687V9.917a.688.688 0 00-.688-.688z",fill:"#F9F9F9"}),o().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.95l3.105-1.666 7.31-4.025 8.852 3.472 7.89-5.223 8.036-2.628 8.113 5.193 3.352-10.255v16.967H14.935l-.05-1.835z",fill:"#9C6CF0"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 32.331l3.105-3.761 7.31 4.31 8.852 1.656 7.89-2.205 8.036 1.827 8.113-12.643 3.352.742V36.36H14.935l-.05-4.029z",fill:"#FA82AA"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.946l3.105.432 7.31 1.01 8.852-5.117 7.89 3.675 8.036 1.839 8.113-1.839 3.352.811v1.028H14.935l-.05-1.839z",fill:"#4DBEE9"}),o().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M61.543 35.288l-.05 1.497H14.885v-5.239l3.352-.276 8.114 4.697 8.036-.679 7.889.82 8.852-.616 7.31-1.601 3.105 1.397z",fill:"#4DBEE9"}),o().createElement("path",{d:"M21.036 40.178h-5.09a.636.636 0 000 1.272h5.09a.636.636 0 100-1.272z",fill:"#ACACAC"}),o().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM25.914 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM39.91 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM21.248 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM35.245 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM30.58 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM44.577 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272z",fill:"#BDBDBD"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.272-1.273zM25.914 62.658c.702 0 1.272.57 1.272 1.273v5.09a1.272 1.272 0 11-2.545 0v-5.09c0-.703.57-1.273 1.273-1.273zM39.91 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.273-1.273zM21.248 66.477c.702 0 1.272.57 1.272 1.272v1.273a1.273 1.273 0 01-2.545 0v-1.273c0-.703.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),o().createElement("path",{d:"M36.518 65.628a1.272 1.272 0 00-2.545 0v3.393a1.272 1.272 0 102.545 0v-3.393zM31.852 62.234a1.272 1.272 0 10-2.545 0v6.787a1.272 1.272 0 102.545 0v-6.787z",fill:"#4DBEE9"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.577 60.962c.702 0 1.272.57 1.272 1.272v6.787a1.273 1.273 0 01-2.545 0v-6.787c0-.702.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),o().createElement("path",{d:"M18.915 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#9C6CF0"}),o().createElement("path",{opacity:.5,d:"M34.185 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),o().createElement("path",{opacity:.3,d:"M49.454 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),o().createElement("path",{opacity:.8,d:"M26.55 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#FB6597"}),o().createElement("path",{d:"M41.82 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),o().createElement("path",{opacity:.2,d:"M57.09 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),o().createElement("path",{opacity:.5,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM31.851 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 110-.849zM47.121 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 010-.849zM24.217 19.818h4.665a.424.424 0 010 .849h-4.665a.424.424 0 010-.849zM39.486 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM54.756 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849z",fill:"#ACACAC"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.946 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM15.946 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM15.946 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM23.58 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM23.58 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM23.58 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM49.454 43.571h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 46.116h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 48.661h11.028a.636.636 0 010 1.273H49.454a.636.636 0 110-1.273zM31.215 43.571h15.27a.636.636 0 110 1.273h-15.27a.636.636 0 010-1.273zM31.215 46.116h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM31.215 48.661h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM15.946 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM23.58 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM49.454 51.206h11.028a.636.636 0 010 1.272H49.454a.636.636 0 110-1.272zM31.215 51.206h15.27a.636.636 0 110 1.272h-15.27a.636.636 0 010-1.272z",fill:"#E9E9E9"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 55.872h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 110-1.273z",fill:"#ACACAC"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 59.69h11.029a.636.636 0 010 1.272H49.878a.636.636 0 110-1.273zM49.878 62.234h11.029a.636.636 0 010 1.273H49.878a.636.636 0 010-1.273zM49.878 64.78h11.029a.636.636 0 010 1.272H49.878a.636.636 0 010-1.273z",fill:"#E9E9E9"}),o().createElement("path",{d:"M54.968 67.324h-5.09a.636.636 0 000 1.273h5.09a.636.636 0 000-1.273z",fill:"#E9E9E9"}),o().createElement("g",{filter:"url(#Error_svg__filter0_d)"},o().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#000"})),o().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#F25252"}),o().createElement("path",{opacity:.15,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 34.719c12.34 0 22.344 10.003 22.344 22.343S69.746 79.406 57.406 79.406c-12.34 0-22.343-10.003-22.343-22.344 0-12.34 10.003-22.343 22.343-22.343zm-.172 2.406c-10.916 0-19.765 8.85-19.765 19.766 0 10.916 8.85 19.765 19.765 19.765C68.151 76.656 77 67.806 77 56.891c0-10.917-8.85-19.766-19.766-19.766z",fill:"#F25252"}),o().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 38.844c10.062 0 18.219 8.157 18.219 18.218 0 10.062-8.157 18.22-18.219 18.22-10.062 0-18.218-8.158-18.218-18.22 0-10.061 8.156-18.218 18.218-18.218zm0 2.043c-8.933 0-16.175 7.242-16.175 16.175 0 8.934 7.242 16.176 16.175 16.176 8.934 0 16.176-7.242 16.176-16.175 0-8.934-7.242-16.176-16.176-16.176z",fill:"#F25252"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 26.469C74.303 26.469 88 40.166 88 57.062c0 16.897-13.697 30.594-30.594 30.594-16.896 0-30.593-13.697-30.593-30.594 0-16.896 13.697-30.593 30.593-30.593zm-.172 3.437c-14.903 0-26.984 12.082-26.984 26.985 0 14.903 12.081 26.984 26.984 26.984 14.903 0 26.985-12.081 26.985-26.984 0-14.903-12.082-26.985-26.985-26.985z",fill:"#F25252"}),o().createElement("path",{d:"M57.406 71.844c8.164 0 14.782-6.618 14.782-14.781 0-8.164-6.618-14.782-14.782-14.782-8.163 0-14.781 6.618-14.781 14.782 0 8.163 6.618 14.78 14.781 14.78z",fill:"#FF6A6A"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M58.298 46.448L75.18 63.331l-9.114 12.078h-2.029l-7.582-7.582 1.006-3.178.837-18.2z",fill:"url(#Error_svg__paint0_linear)"}),o().createElement("g",{filter:"url(#Error_svg__filter1_d)"},o().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#000"})),o().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#fff"}),o().createElement("g",{filter:"url(#Error_svg__filter2_d)"},o().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#000"})),o().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#fff"})),o().createElement("defs",null,o().createElement("filter",{id:"Error_svg__filter0_d",x:36.219,y:37.875,width:42.375,height:42.375,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),o().createElement("feOffset",{dy:2}),o().createElement("feGaussianBlur",{stdDeviation:2}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),o().createElement("filter",{id:"Error_svg__filter1_d",x:51.688,y:62.625,width:11.438,height:11.438,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),o().createElement("feOffset",{dy:2}),o().createElement("feGaussianBlur",{stdDeviation:2}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),o().createElement("filter",{id:"Error_svg__filter2_d",x:51.688,y:44.063,width:11.438,height:23.813,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),o().createElement("feOffset",{dy:2}),o().createElement("feGaussianBlur",{stdDeviation:2}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),o().createElement("linearGradient",{id:"Error_svg__paint0_linear",x1:68.438,y1:71.571,x2:60.119,y2:58.801,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:0}),o().createElement("stop",{offset:1})))),LOADING:e=>o().createElement("svg",Em({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgEmptyLoading"},e),o().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.03}),o().createElement("mask",{id:"EmptyLoading_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},o().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),o().createElement("g",{mask:"url(#EmptyLoading_svg__a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#EmptyLoading_svg__paint0_linear_2978_41880)"}),o().createElement("g",{fillRule:"evenodd",clipRule:"evenodd"},o().createElement("path",{d:"M40.755 44.17C40.755 38.002 45.76 33 51.92 33h251.675c6.167 0 11.166 5.001 11.166 11.17v160.596H40.755V44.171z",fill:"#5E7282"}),o().createElement("path",{d:"M50.371 43.106h255.685V195.71H50.371V43.106z",fill:"url(#EmptyLoading_svg__paint1_linear_2978_41880)"}),o().createElement("path",{d:"M15.545 208.914c2.321.469 4.723.716 7.183.716H338.75c.22 0 .439-.002.658-.006-7.061 8.445-17.67 13.816-29.524 13.816H45.655c-12.111 0-22.916-5.597-29.968-14.349l-.142-.177z",fill:"#BDCBD8"}),o().createElement("path",{d:"M339.015 204.883v4.966H15v-4.966h324.015z",fill:"#D4DCDF"}),o().createElement("path",{d:"M201.107 213.991h-45.221a11.176 11.176 0 01-11.046-9.449h67.314a11.172 11.172 0 01-11.047 9.449z",fill:"url(#EmptyLoading_svg__paint2_linear_2978_41880)"})),o().createElement("g",{filter:"url(#EmptyLoading_svg__filter0_d_2978_41880)"},o().createElement("rect",{x:81.703,y:99,width:170,height:26,rx:8,fill:"#D1E6FF"}),o().createElement("rect",{x:84.703,y:102,width:164,height:20,rx:5,stroke:"#fff",strokeWidth:6})),o().createElement("g",{filter:"url(#EmptyLoading_svg__filter1_d_2978_41880)"},o().createElement("mask",{id:"EmptyLoading_svg__b",fill:"#fff"},o().createElement("rect",{x:81,y:105,width:108,height:14,rx:2})),o().createElement("rect",{x:81,y:105,width:108,height:14,rx:2,fill:"#61A3F1"}),o().createElement("rect",{x:81,y:105,width:108,height:14,rx:2,stroke:"#4A90E2",strokeWidth:8,mask:"url(#EmptyLoading_svg__b)"})),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M122.703 74a3 3 0 013-3h81.625a3 3 0 010 6h-81.625a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M146.703 86a3 3 0 013-3h34a3 3 0 110 6h-34a3 3 0 01-3-3zM136.703 139a3 3 0 013-3h54a3 3 0 110 6h-54a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M112.703 151a3 3 0 013-3h103a3 3 0 110 6h-103a3 3 0 01-3-3zM124.703 163a3 3 0 013-3h79a3 3 0 110 6h-79a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("g",{filter:"url(#EmptyLoading_svg__filter2_ddd_2978_41880)"},o().createElement("path",{fill:"#A0C1D7",d:"M70.703 64h11v8h-11z"}),o().createElement("rect",{x:62,y:59,width:28,height:8,rx:1,fill:"#BDD4E3"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.23 160.5c20.704 20.703 54.27 20.703 74.973 0 20.703-20.703 20.703-54.27 0-74.973-20.703-20.703-54.27-20.703-74.973 0-20.703 20.703-20.703 54.27 0 74.973z",fill:"#BDD4E3"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M113.427 85.988c20.463 20.652 20.404 53.981-.175 74.561-20.432 20.431-53.432 20.635-74.115.613l-.446-.439 74.736-74.735z",fill:"#A0C1D7"}),o().createElement("path",{opacity:.144,fillRule:"evenodd",clipRule:"evenodd",d:"M75.037 175.385c29.402 0 53.236-23.834 53.236-53.236a54.67 54.67 0 00-.106-3.399L100.45 91.037l-55.142 58.396 25.814 25.811c1.293.094 2.598.141 3.915.141z",fill:"url(#EmptyLoading_svg__paint3_linear_2978_41880)"}),o().createElement("circle",{cx:75.94,cy:123.237,r:44.723,fill:"#91B0C2"}),o().createElement("g",{filter:"url(#EmptyLoading_svg__filter3_d_2978_41880)"},o().createElement("circle",{r:42.793,transform:"matrix(-1 0 0 1 75.94 123.237)",fill:"#F7F4FF"})),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M105.043 175.309l-10.298.861-20.313-20.152.863-2.292-9.973-9.982 18.679-6.882h-4.308l-8.943-8.951 4.545-10.532L94.35 90.74l37.888 37.162c-.343 20.088-11.146 37.627-27.195 47.407z",fill:"url(#EmptyLoading_svg__paint4_linear_2978_41880)"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.703 123a8 8 0 0112.362-6.707l14.477-25.145A36.828 36.828 0 0075.703 86c-20.434 0-37 16.565-37 37h29z",fill:"url(#EmptyLoading_svg__paint5_angular_2978_41880)"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M94.297 90.6l.24.138s-12.45 35.125-12.811 35.752a6.92 6.92 0 01-11.985-6.92c.361-.626 24.556-28.97 24.556-28.97z",fill:"#323232"}),o().createElement("circle",{cx:75.94,cy:123.237,r:2.896,fill:"#EEEBF6"}),o().createElement("circle",{cx:96.211,cy:148.655,r:2.574,fill:"#A0C3D7"}),o().createElement("circle",{cx:107.15,cy:131.924,r:2.574,fill:"#A0C3D7"}),o().createElement("rect",{x:62.427,y:135.592,width:27.027,height:10.039,rx:3,fill:"#A0C3D7"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M85.914 170.534H75.112l-21.605-21.472 2.126-2.775v-1.01L42.8 132.523l2.853-2.529 40.261 40.54z",fill:"url(#EmptyLoading_svg__paint6_linear_2978_41880)"}),o().createElement("path",{opacity:.02,fillRule:"evenodd",clipRule:"evenodd",d:"M96.362 136.555h-4.988l-38.126-38.01 2.853-2.53 40.261 40.54z",fill:"url(#EmptyLoading_svg__paint7_linear_2978_41880)"}),o().createElement("path",{opacity:.02,fillRule:"evenodd",clipRule:"evenodd",d:"M116.746 129.006h-4.988L73.632 90.995l2.853-2.53 40.261 40.541z",fill:"url(#EmptyLoading_svg__paint8_linear_2978_41880)"}),o().createElement("path",{opacity:.02,fillRule:"evenodd",clipRule:"evenodd",d:"M85.793 152.41h-4.988l-38.126-38.011 2.852-2.53 40.262 40.541z",fill:"url(#EmptyLoading_svg__paint9_linear_2978_41880)"}),o().createElement("circle",{cx:75.618,cy:155.734,r:2.574,fill:"#A0C3D7"}),o().createElement("circle",{cx:55.026,cy:148.655,r:2.574,fill:"#A0C3D7"}),o().createElement("circle",{cx:44.73,cy:131.924,r:2.574,fill:"#A0C3D7"}),o().createElement("g",{fill:"#A0C3D7"},o().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 96.21 97.363)"}),o().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 107.149 114.094)"}),o().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 75.618 90.284)"}),o().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 55.026 97.363)"}),o().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 44.73 114.094)"})))),o().createElement("defs",null,o().createElement("linearGradient",{id:"EmptyLoading_svg__paint0_linear_2978_41880",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),o().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint1_linear_2978_41880",x1:178.214,y1:43.106,x2:178.214,y2:195.709,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#F2F9FB"}),o().createElement("stop",{offset:1,stopColor:"#fff"})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint2_linear_2978_41880",x1:178.497,y1:204.542,x2:178.497,y2:213.991,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#90AABF"}),o().createElement("stop",{offset:1,stopColor:"#869DAE"})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint3_linear_2978_41880",x1:154.275,y1:146.574,x2:96.683,y2:91.352,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint4_linear_2978_41880",x1:60.762,y1:143.327,x2:114.747,y2:176.019,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.87}),o().createElement("stop",{offset:1,stopOpacity:.01})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint6_linear_2978_41880",x1:90.287,y1:154.267,x2:68.53,y2:131.301,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint7_linear_2978_41880",x1:100.735,y1:120.288,x2:78.978,y2:97.322,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint8_linear_2978_41880",x1:121.119,y1:112.739,x2:99.362,y2:89.773,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})),o().createElement("linearGradient",{id:"EmptyLoading_svg__paint9_linear_2978_41880",x1:90.166,y1:136.143,x2:68.409,y2:113.177,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})),o().createElement("filter",{id:"EmptyLoading_svg__filter0_d_2978_41880",x:77.703,y:96,width:178,height:34,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feOffset",{dy:1}),o().createElement("feGaussianBlur",{stdDeviation:2}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2978_41880",result:"shape"})),o().createElement("filter",{id:"EmptyLoading_svg__filter1_d_2978_41880",x:77,y:102,width:116,height:22,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feOffset",{dy:1}),o().createElement("feGaussianBlur",{stdDeviation:2}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2978_41880",result:"shape"})),o().createElement("filter",{id:"EmptyLoading_svg__filter2_ddd_2978_41880",x:-13.297,y:28,width:181.534,height:189.17,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feMorphology",{radius:4,operator:"erode",in:"SourceAlpha",result:"effect1_dropShadow_2978_41880"}),o().createElement("feOffset",{dy:7}),o().createElement("feGaussianBlur",{stdDeviation:4}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.600156 0 0 0 0 0.745337 0 0 0 0 0.8625 0 0 0 0.1 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feMorphology",{radius:4,operator:"dilate",in:"SourceAlpha",result:"effect2_dropShadow_2978_41880"}),o().createElement("feOffset",{dy:5}),o().createElement("feGaussianBlur",{stdDeviation:16}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0.447059 0 0 0 0 0.807843 0 0 0 0.06 0"}),o().createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_2978_41880",result:"effect2_dropShadow_2978_41880"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feMorphology",{radius:2,operator:"dilate",in:"SourceAlpha",result:"effect3_dropShadow_2978_41880"}),o().createElement("feOffset",{dy:12}),o().createElement("feGaussianBlur",{stdDeviation:8.5}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0.447059 0 0 0 0 0.807843 0 0 0 0.06 0"}),o().createElement("feBlend",{mode:"normal",in2:"effect2_dropShadow_2978_41880",result:"effect3_dropShadow_2978_41880"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow_2978_41880",result:"shape"})),o().createElement("filter",{id:"EmptyLoading_svg__filter3_d_2978_41880",x:29.148,y:78.444,width:93.585,height:93.585,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feOffset",{dy:2}),o().createElement("feGaussianBlur",{stdDeviation:2}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2978_41880",result:"shape"})),o().createElement("radialGradient",{id:"EmptyLoading_svg__paint5_angular_2978_41880",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-56.035 152.55 -12.515) scale(43.4058 65.5062)"},o().createElement("stop",{stopColor:"#CFE8FF"}),o().createElement("stop",{offset:.599,stopColor:"#D1F2F9",stopOpacity:0})))),NO_LOGS:e=>o().createElement("svg",ym({width:80,height:81,viewBox:"0 0 80 81",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgNoLogs"},e),o().createElement("circle",{cx:40,cy:40.5,r:40,fill:"#0072CE",fillOpacity:.1}),o().createElement("mask",{id:"NoLogs_svg__a",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:81},o().createElement("circle",{cx:40,cy:40.5,r:40,fill:"#fff"})),o().createElement("g",{mask:"url(#NoLogs_svg__a)",fillRule:"evenodd",clipRule:"evenodd"},o().createElement("path",{d:"M-5 3.313h80V80.5H-5V3.312z",fill:"url(#NoLogs_svg__paint0_linear_8548_48660)"}),o().createElement("path",{opacity:.05,d:"M58.675 18.27L77 36.596v46.522H29.182L16.25 70.84V18.27h42.425z",fill:"url(#NoLogs_svg__paint1_linear_8548_48660)"}),o().createElement("path",{opacity:.06,d:"M14.688 18.625h63.124c1.209 0 2.188.98 2.188 2.188v49.062c0 1.208-.98 2.188-2.188 2.188H14.688a2.188 2.188 0 01-2.188-2.188V20.812c0-1.208.98-2.187 2.188-2.187z",fill:"#000"}),o().createElement("path",{d:"M15.625 18h62.813C79.3 18 80 18.7 80 19.563v49.062c0 .863-.7 1.563-1.563 1.563H15.626c-.863 0-1.563-.7-1.563-1.563V19.562c0-.862.7-1.562 1.563-1.562z",fill:"#fff"}),o().createElement("path",{opacity:.8,d:"M18.526 25.017c0-.518.42-.938.938-.938h13.008a.937.937 0 110 1.875H19.463a.937.937 0 01-.938-.937z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,d:"M55.58 25.017c0-.518.419-.938.937-.938H76.58a.938.938 0 010 1.875H56.517a.937.937 0 01-.938-.937z",fill:"#979797"}),o().createElement("path",{opacity:.8,d:"M18.526 47.753c0-.517.42-.937.938-.937h13.008a.938.938 0 010 1.875H19.463a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,d:"M55.58 47.753c0-.517.419-.937.937-.937H76.58a.938.938 0 010 1.875H56.517a.937.937 0 01-.938-.938z",fill:"#979797"}),o().createElement("path",{opacity:.8,d:"M18.526 56.174c0-.517.42-.937.938-.937h25.508a.937.937 0 110 1.875H19.463a.937.937 0 01-.938-.938zM18.526 63.753c0-.517.42-.937.938-.937h19.611a.938.938 0 010 1.875H19.464a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,d:"M55.58 56.174c0-.517.419-.937.937-.937h23.189a.938.938 0 010 1.875h-23.19a.937.937 0 01-.937-.938zM55.58 63.753c0-.517.419-.937.937-.937h23.189a.938.938 0 010 1.875h-23.19a.937.937 0 01-.937-.938z",fill:"#979797"}),o().createElement("path",{opacity:.8,d:"M18.526 32.174c0-.517.42-.937.938-.937h25.508a.937.937 0 110 1.875H19.463a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,d:"M55.58 32.174c0-.517.419-.937.937-.937H76.58a.938.938 0 010 1.875H56.517a.937.937 0 01-.938-.938z",fill:"#979797"}),o().createElement("path",{opacity:.8,d:"M18.526 39.753c0-.517.42-.937.938-.937h25.508a.938.938 0 010 1.875H19.463a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,d:"M55.58 39.753c0-.517.419-.937.937-.937h23.189a.938.938 0 010 1.875h-23.19a.937.937 0 01-.937-.938z",fill:"#979797"}),o().createElement("path",{opacity:.6,d:"M15.625 7.375H73.75c1.035 0 1.875.84 1.875 1.875v5.625c0 1.036-.84 1.875-1.875 1.875H15.625a1.875 1.875 0 01-1.875-1.875V9.25c0-1.036.84-1.875 1.875-1.875z",fill:"#fff"}),o().createElement("path",{opacity:.2,d:"M18.125 12.063c0-1.036.84-1.876 1.875-1.876h21.875a1.875 1.875 0 010 3.75H20a1.875 1.875 0 01-1.875-1.874zM55.158 12.079c0-1.047.848-1.895 1.895-1.895H72.21a1.895 1.895 0 110 3.79H57.052a1.895 1.895 0 01-1.894-1.895z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"NoLogs_svg__paint0_linear_8548_48660",x1:-5,y1:3.313,x2:-5,y2:80.5,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),o().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"NoLogs_svg__paint1_linear_8548_48660",x1:83.162,y1:57.097,x2:48.401,y2:24.776,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})))),NO_ACTIVATIONS:e=>o().createElement("svg",bm({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgNoActivations"},e),o().createElement("circle",{cx:100,cy:100,r:100,fill:"#0072CE",fillOpacity:.1}),o().createElement("mask",{id:"NoActivation_svg__a",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:200,height:200},o().createElement("circle",{cx:100,cy:100,r:100,fill:"#fff"})),o().createElement("g",{mask:"url(#NoActivation_svg__a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-12.5 7.031h200V200h-200V7.031z",fill:"url(#NoActivation_svg__paint0_linear_8548_48982)"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M146.688 44.426L192.5 90.237v116.306H72.956l-32.331-30.697V44.426h106.063z",fill:"url(#NoActivation_svg__paint1_linear_8548_48982)"}),o().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M36.719 45.313H194.53A5.468 5.468 0 01200 50.78v122.657a5.468 5.468 0 01-5.469 5.468H36.719a5.468 5.468 0 01-5.469-5.468V50.781a5.469 5.469 0 015.469-5.468z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.063 43.75h157.031A3.906 3.906 0 01200 47.656v122.656a3.907 3.907 0 01-3.906 3.907H39.063a3.907 3.907 0 01-3.907-3.907V47.656a3.906 3.906 0 013.907-3.906z",fill:"#fff"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M82.325 56.746a2.344 2.344 0 012.343-2.344h32.52a2.343 2.343 0 010 4.688h-32.52a2.344 2.344 0 01-2.343-2.344z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M82.031 66.121a2.344 2.344 0 012.344-2.344h50.16a2.344 2.344 0 110 4.688h-50.16a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M82.325 127.344A2.344 2.344 0 0184.668 125h32.52a2.344 2.344 0 010 4.688h-32.52a2.344 2.344 0 01-2.343-2.344z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M82.031 136.719a2.344 2.344 0 012.344-2.344h50.16a2.343 2.343 0 110 4.687h-50.16a2.343 2.343 0 01-2.344-2.343z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M82.325 150.781a2.343 2.343 0 012.343-2.343h63.77a2.343 2.343 0 010 4.687h-63.77a2.344 2.344 0 01-2.343-2.344z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M82.031 160.156a2.344 2.344 0 012.344-2.344h57.973a2.343 2.343 0 010 4.688H84.375a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M108.106 80.469a2.344 2.344 0 012.344-2.344h63.769a2.344 2.344 0 010 4.688H110.45a2.344 2.344 0 01-2.344-2.344z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M107.812 89.844a2.344 2.344 0 012.344-2.344h50.16a2.344 2.344 0 110 4.688h-50.16a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),o().createElement("circle",{cx:52.344,cy:61.719,r:7.031,fill:"#B6C7DB"}),o().createElement("circle",{cx:52.344,cy:61.719,r:7.031,fill:"#B6C7DB"}),o().createElement("circle",{cx:93.75,cy:82.813,r:4.688,fill:"#B6C7DB"}),o().createElement("circle",{cx:93.75,cy:106.25,r:4.688,fill:"#B6C7DB"}),o().createElement("circle",{cx:52.344,cy:132.031,r:7.031,fill:"#B6C7DB"}),o().createElement("circle",{cx:52.344,cy:155.469,r:7.031,fill:"#B6C7DB"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M108.106 103.906a2.344 2.344 0 012.344-2.344h63.769a2.344 2.344 0 010 4.688H110.45a2.343 2.343 0 01-2.344-2.344z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M107.812 113.281a2.344 2.344 0 012.344-2.343h57.973a2.344 2.344 0 010 4.687h-57.973a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M72.277 84.375v-6.25h-1.563v31.535h8.734v-1.562h-7.171v-22.16h7.17v-1.563h-7.17z",fill:"#2B98F0"}),o().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M74.274 60.156l-2.762 2.762-2.762-2.762h5.524z",fill:"#000"}),o().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M39.063 17.188h145.312a4.687 4.687 0 014.687 4.687v14.063a4.687 4.687 0 01-4.687 4.687H39.062a4.688 4.688 0 01-4.687-4.688V21.876a4.688 4.688 0 014.688-4.688z",fill:"#fff"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M45.313 28.906A4.687 4.687 0 0150 24.22h54.688a4.688 4.688 0 010 9.375H50a4.688 4.688 0 01-4.688-4.688zM115.625 28.906a4.688 4.688 0 014.688-4.687h7.812a4.687 4.687 0 010 9.375h-7.813a4.688 4.688 0 01-4.687-4.688z",fill:"#979797"})),o().createElement("g",{filter:"url(#NoActivation_svg__filter0_d_8548_48982)"},o().createElement("path",{d:"M130.469 168.75c21.573 0 39.062-17.489 39.062-39.062 0-21.574-17.489-39.063-39.062-39.063-21.574 0-39.063 17.489-39.063 39.063 0 21.573 17.489 39.062 39.063 39.062z",fill:"#000"})),o().createElement("path",{d:"M130.469 168.75c21.573 0 39.062-17.489 39.062-39.062 0-21.574-17.489-39.063-39.062-39.063-21.574 0-39.063 17.489-39.063 39.063 0 21.573 17.489 39.062 39.063 39.062z",fill:"#93D204"}),o().createElement("path",{opacity:.15,fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 78.906c28.045 0 50.781 22.736 50.781 50.781 0 28.046-22.736 50.782-50.781 50.782-28.046 0-50.781-22.736-50.781-50.782 0-28.045 22.735-50.78 50.781-50.78zm-.391 5.469c-24.81 0-44.922 20.112-44.922 44.922s20.112 44.922 44.922 44.922S175 154.107 175 129.297s-20.112-44.922-44.922-44.922z",fill:"#A9F300"}),o().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 88.281c22.868 0 41.406 18.538 41.406 41.406 0 22.869-18.538 41.407-41.406 41.407s-41.406-18.538-41.406-41.407c0-22.868 18.538-41.406 41.406-41.406zm0 4.644c-20.304 0-36.763 16.459-36.763 36.762 0 20.304 16.459 36.763 36.763 36.763 20.303 0 36.762-16.459 36.762-36.763 0-20.303-16.459-36.762-36.762-36.762z",fill:"#A9F300"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 60.156c38.401 0 69.531 31.13 69.531 69.532 0 38.401-31.13 69.531-69.531 69.531-38.401 0-69.531-31.13-69.531-69.531 0-38.401 31.13-69.532 69.531-69.532zm-.391 7.813c-33.87 0-61.328 27.457-61.328 61.328 0 33.87 27.457 61.328 61.328 61.328s61.328-27.458 61.328-61.328c0-33.87-27.457-61.328-61.328-61.328z",fill:"#A9F300"}),o().createElement("path",{d:"M130.469 163.281c18.553 0 33.593-15.04 33.593-33.593 0-18.554-15.04-33.594-33.593-33.594-18.554 0-33.594 15.04-33.594 33.594 0 18.553 15.04 33.593 33.594 33.593z",fill:"#A5E418"}),o().createElement("path",{opacity:.05,d:"M182.031 146.094l-34.375-34.375-5.344 2.343-11.719-11.718-.905 22.656-13.282-13.281-7.031 10.156v23.437l36.719 36.719 35.937-35.937z",fill:"url(#NoActivation_svg__paint2_linear_8548_48982)"}),o().createElement("g",{filter:"url(#NoActivation_svg__filter1_d_8548_48982)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 102.344a3.907 3.907 0 00-3.907 3.906v17.969a3.907 3.907 0 007.813 0V106.25a3.906 3.906 0 00-3.906-3.906zm17.996 9.347a3.907 3.907 0 00-5.524 5.524 18.186 18.186 0 013.943 19.825 18.187 18.187 0 01-26.912 8.163 18.182 18.182 0 01-7.735-18.674 18.194 18.194 0 014.978-9.314 3.905 3.905 0 10-5.524-5.524 26.008 26.008 0 00-5.637 28.338 26 26 0 0024.024 16.053 25.999 25.999 0 0024.024-16.053 26.007 26.007 0 00-5.637-28.338z",fill:"#fff"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"NoActivation_svg__paint0_linear_8548_48982",x1:-12.5,y1:7.031,x2:-12.5,y2:200,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),o().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"NoActivation_svg__paint1_linear_8548_48982",x1:207.904,y1:141.493,x2:121.002,y2:60.688,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})),o().createElement("linearGradient",{id:"NoActivation_svg__paint2_linear_8548_48982",x1:123.438,y1:112.109,x2:172.656,y2:161.328,gradientUnits:"userSpaceOnUse"},o().createElement("stop",null),o().createElement("stop",{offset:1,stopOpacity:0})),o().createElement("filter",{id:"NoActivation_svg__filter0_d_8548_48982",x:88.281,y:89.063,width:84.375,height:84.375,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feOffset",{dy:1.563}),o().createElement("feGaussianBlur",{stdDeviation:1.563}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_8548_48982"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_8548_48982",result:"shape"})),o().createElement("filter",{id:"NoActivation_svg__filter1_d_8548_48982",x:100.95,y:100.781,width:58.257,height:59.988,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),o().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o().createElement("feOffset",{dy:1.563}),o().createElement("feGaussianBlur",{stdDeviation:1.563}),o().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),o().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_8548_48982"}),o().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_8548_48982",result:"shape"}))))},_m=({variant:e=Cm.full,LogoRenderer:t=wm.SEARCH_RESULTS,text:n,secondaryText:r,buttonTitle:a,onClick:i=p.identity,access:l,children:s})=>{const c=xm(),u=l&&a;return o().createElement("div",{className:f()(c.root,c[`root_${e}`])},o().createElement(t,{className:c[`${e}`]}),o().createElement("div",{className:c.textBox},o().createElement(Xu(),{variant:"h5",classes:{h5:c.text}},n),r&&o().createElement(Xu(),{variant:"subtitle1",classes:{subtitle1:c.secondaryText}},r)),s,u&&o().createElement(or(),{className:c.button,variant:"contained",color:"primary",onClick:i},a))};function km(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Om(e,t,n[t])}))}return e}function Om(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Sm=qn((e=>({basicViewPaper:km({display:"flex",flexDirection:"column"},e.basicView)})));function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Am.apply(null,arguments)}const Mm=(0,r.forwardRef)(((e,t)=>{let{children:n,className:r}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const i=Sm();return o().createElement(Af(),Am({ref:t,className:r,classes:{root:i.basicViewPaper}},a),n)}));Mm.displayName="BasicView";const Lm=o().createContext(void 0);function Pm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Rm(e,t,n[t])}))}return e}function Rm(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Lm.displayName="PageRequestsAbortingContext";let Tm=1;const Nm=e=>{var t,n;if(null==e||!e.entityId)return null;const r=(null===(t=e.children)||void 0===t?void 0:t.length)>0||e.hasMoreChildren;return Pm({id:Tm++,entityId:e.entityId,label:e.label,entityType:e.entityType,pending:e.hasMoreChildren,hasManyParents:e.hasManyParents,selected:e.selected,connectionId:e.connectionId,isLoading:!1},r?{children:(null!==(n=e.children)&&void 0!==n?n:[]).map(Nm).filter(Boolean)}:{})},Im=(e=[],t=[])=>(0,p.reduce)(((e,t)=>(0,p.any)((0,p.eqProps)("id",t),e)?e:(0,p.append)(t,e)),[...e],t),Dm=(e,t)=>t&&0!==e.length?e.reduce(((e,n)=>{var r;const o=n.entityId===t?[[n]]:[],a=(null!==(r=n.children)&&void 0!==r?r:[]).reduce(((e,r)=>{const o=(0,s.getPathByCondition)((({entityId:e})=>e===t),r);return o.length>0&&e.push([n,...o]),e}),[]);return e.push(...o,...a),e}),[]):[],Fm=(e,t,n)=>e.map((e=>(0,s.mapTree)(e,{nodeProcessing:e=>t(e)?n(e):e})));var jm=n(251),Bm=n.n(jm),zm=n(4635),Hm=n.n(zm),Um=n(6177),Vm=n.n(Um),Zm=n(480),Km=n.n(Zm),qm=n(5340);Ed()(qm.Z,{insert:"head",singleton:!1});const Wm=qm.Z.locals||{},$m=(0,r.memo)((({children:e,onFileDrop:t,className:n})=>{const[a,i]=(0,r.useState)(!1),l=(0,r.useCallback)((e=>"Files"===e),[]),s=(0,r.useCallback)((e=>{e.preventDefault();const t=e.dataTransfer.types[0],n=l(t);e.dataTransfer.dropEffect=n?"copy":"none",i(n)}),[l]),c=(0,r.useCallback)((e=>{e.preventDefault();const t=e.dataTransfer.types[0];i(l(t))}),[l]),d=(0,r.useCallback)((e=>{e.preventDefault();const t=e.relatedTarget;(!t||e.currentTarget.contains(t))&&t||i(!1)}),[]),p=(0,r.useCallback)((e=>{var n,r;e.preventDefault(),i(!1);const o=e.dataTransfer.types[0];if(!l(o))return;const a=null!==(n=null===(r=e.dataTransfer.files)||void 0===r?void 0:r[0])&&void 0!==n?n:null;a&&t(a)}),[l,t]);return o().createElement("div",{className:f()(Wm.root,n,{[Wm.active]:a}),role:"button",tabIndex:0,"aria-label":u().text("Drop files here"),onDragOver:s,onDragEnter:c,onDragLeave:d,onDrop:p},e)}));$m.displayName="FileDropZone";var Gm=n(4294),Ym=n.n(Gm),Xm=n(4664);Ed()(Xm.Z,{insert:"head",singleton:!1});const Qm=Xm.Z.locals||{},Jm=({error:e,onClose:t})=>o().createElement(ir(),{open:Boolean(e),onClose:t,message:e,action:o().createElement(Vd,{className:Qm.closeIcon,tooltipTitle:u().text("Close"),icon:Ym(),onClick:t})});function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ev.apply(null,arguments)}const tv=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ev({width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"80",cy:"80",r:"80",fill:"#A792CD",fillOpacity:".3"}),o().createElement("mask",{id:"svg1626345856a",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},o().createElement("circle",{cx:"80",cy:"80",r:"80",fill:"#fff"})),o().createElement("g",{mask:"url(#svg1626345856a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-1.875 67.908c0 20.45 16.498 37.022 36.886 37.022h79.91c17.001 0 30.75-13.816 30.75-30.83 0-16.298-12.609-29.637-28.57-30.76-4.259-21.165-22.87-37.09-45.203-37.09-17.773 0-33.198 10.106-40.91 24.874C12.51 33.132-1.876 48.852-1.876 67.908z",fill:"#C5F1FF"}),o().createElement("ellipse",{cx:"35.23",cy:"68.133",rx:"35.31",ry:"35.831",fill:"url(#paint0_linear_1770_144249)"}),o().createElement("ellipse",{cx:"71.686",cy:"52.317",rx:"40.354",ry:"40.949",fill:"url(#paint1_linear_1770_144249)"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51.014 76.25a2.5 2.5 0 012.5-2.5h103.361a2.5 2.5 0 012.5 2.5v64.375a2.5 2.5 0 01-2.5 2.5H53.514a2.5 2.5 0 01-2.5-2.5V76.25z",fill:"#fff",fillOpacity:".8"}),o().createElement("path",{opacity:".5",fillRule:"evenodd",clipRule:"evenodd",d:"M61.25 68.75a2.5 2.5 0 012.5-2.5h103.361a2.5 2.5 0 012.5 2.5v64.375a2.5 2.5 0 01-2.5 2.5H63.75a2.5 2.5 0 01-2.5-2.5V68.75z",fill:"#fff",fillOpacity:".8"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M127.659 87.033a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 87.033a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 110 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 87.033a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658zM110.435 87.033a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658zM127.659 97.658A2.658 2.658 0 01130.317 95h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 97.658A2.658 2.658 0 0161.992 95h21.492a2.658 2.658 0 110 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 97.658A2.658 2.658 0 0195.867 95h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658z",fill:"#979797"}),o().createElement("path",{opacity:".743",fillRule:"evenodd",clipRule:"evenodd",d:"M110.435 97.658A2.657 2.657 0 01113.092 95h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658z",fill:"#F9578C"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M127.659 108.283a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658z",fill:"#F9BF51"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M59.334 108.283a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 010 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 108.283a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658z",fill:"#979797"}),o().createElement("path",{opacity:".743",fillRule:"evenodd",clipRule:"evenodd",d:"M110.435 108.283a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658z",fill:"#80B8E4"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M127.659 118.908a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 118.908a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 010 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 118.908a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658zM110.435 118.908a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658zM127.659 129.533a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 129.533a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 010 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 129.533a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658z",fill:"#979797"}),o().createElement("path",{opacity:".743",fillRule:"evenodd",clipRule:"evenodd",d:"M110.435 129.533a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658z",fill:"#F9BF51"}),o().createElement("path",{opacity:".1",fillRule:"evenodd",clipRule:"evenodd",d:"M45.188 73.873l22.115 22.115-6.147 11.044 41.907 41.907 36.642-33.517v-3.56l-40.981-40.98H53.905l-8.718 2.99z",fill:"url(#paint2_linear_1770_144249)"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M84.975 74.162v33.264H61.292V74.162H44.374l28.708-28.537 28.709 28.537H84.975z",fill:"url(#paint3_linear_1770_144249)"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear_1770_144249",x1:"-.08",y1:"32.302",x2:"-.08",y2:"103.963",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#fff"}),o().createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".01"})),o().createElement("linearGradient",{id:"paint1_linear_1770_144249",x1:"31.332",y1:"11.368",x2:"31.332",y2:"93.267",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#fff"}),o().createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".01"})),o().createElement("linearGradient",{id:"paint2_linear_1770_144249",x1:"149.291",y1:"117.618",x2:"108.037",y2:"68.037",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"})),o().createElement("linearGradient",{id:"paint3_linear_1770_144249",x1:"44.375",y1:"45.625",x2:"44.375",y2:"107.426",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#45C0EB"}),o().createElement("stop",{offset:"1",stopColor:"#2193D3"}))))},nv="hierarchy-import-template.csv",rv=[".csv",".json"],ov=e=>{const{visibleNames:t,remainingCount:n}=(e=>{const t=e.slice(0,3),n=Math.max(e.length-3,0);return{visibleNames:t.map((e=>`"${e}"`)).join(", "),remainingCount:n}})(e);return n>0?`${t} +${n}`:t};var av=n(1631);Ed()(av.Z,{insert:"head",singleton:!1});const iv=av.Z.locals||{},lv=({isOpen:e,onClose:t,onSuccess:n,onLoadingChange:a,templateUrl:i})=>{const[l,c]=(0,r.useState)(null),d=(0,r.useRef)(null),{selectedFile:p,isUploading:h,setFile:m,downloadTemplate:v,uploadHierarchyFile:g}=(({isOpen:e,onClose:t,onSuccess:n,onLoadingChange:o,templateUrl:a})=>{const[i,l]=(0,r.useState)(null),[c,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(void 0),h=(0,r.useContext)(nr);(0,r.useEffect)((()=>{e||(l(null),p(void 0))}),[e]),(0,r.useEffect)((()=>{if(!e)return;const t=null==a?void 0:a.trim();p({url:t||"https://reltio-ui-files.s3.amazonaws.com/hierarchy/hierarchy-import.csv",fileName:nv})}),[a,e]),(0,r.useEffect)((()=>{o(c)}),[c,o]);const m=(0,r.useCallback)((e=>{l(e)}),[]),v=(0,r.useCallback)((()=>{var e;if(!f)return;const t=document.createElement("a");t.href=f.url,t.download=null!==(e=f.fileName)&&void 0!==e?e:nv,document.body.appendChild(t),t.click(),document.body.removeChild(t)}),[f]),g=(0,r.useCallback)((async()=>{if(i&&!c){d(!0);try{var e,r;const o=await(0,s.importHierarchy)({file:i}),a=Object.keys(null!==(e=o.createdInstances)&&void 0!==e?e:{}),l=null!==(r=o.failedHierarchies)&&void 0!==r?r:[],{successMessage:c,errorMessage:d}=((e,t)=>{const n=e.length>0,r=t.length>0;let o,a;if(n){const t=ov(e);o=u().text("The hierarchy ${names} has been successfully imported!",{names:t})}if(r){const e=ov(t);a=u().text("The import of ${names} has encountered an error. Please try again.",{names:e})}return{successMessage:o,errorMessage:a}})(a,l);c&&h(c),d&&Xn(d,{message:d}),await n(o),t()}catch(e){Xn(e,{defaultMessage:u().text("Failed to upload file")})}finally{d(!1)}}}),[c,t,i,h,n]);return{selectedFile:i,isUploading:c,setFile:m,downloadTemplate:v,uploadHierarchyFile:g}})({isOpen:e,onClose:t,onSuccess:n,templateUrl:i,onLoadingChange:a}),y=(0,r.useCallback)((()=>{d.current&&(d.current.value="",d.current.click())}),[d]),b=(0,r.useCallback)((e=>{if(!(e=>{if(!e)return!1;const t=e.name.toLowerCase();return rv.some((e=>t.endsWith(e)))})(e))return c(u().text("File format is not supported.")),void m(null);c(null),m(e)}),[m]),x=(0,r.useCallback)((e=>{var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];n&&b(n)}),[b]);return o().createElement(Bm(),{open:e,onClose:t,fullWidth:!0,classes:{paper:iv.dialog}},o().createElement(Hm(),{classes:{root:iv.dialogTitle}},u().text("Import hierarchy")),o().createElement(Km(),{classes:{root:iv.dialogContent}},o().createElement("div",{className:iv.templateSection},o().createElement("div",{className:iv.templateInfo},o().createElement(Xu(),{variant:"subtitle2"},u().text("Download template")),o().createElement(Xu(),{className:iv.templateDescription},u().text("Download the template, enter your hierarchy data, and upload the completed file."))),o().createElement(or(),{variant:"outlined",color:"primary",onClick:v},u().text("Download template"))),o().createElement(Xu(),{variant:"subtitle2"},u().text("Select file")),o().createElement($m,{className:iv.dropZone,onFileDrop:b},o().createElement("div",{className:f()(iv.root,iv.root_embedded)},o().createElement(tv,{className:iv.embedded}),o().createElement("div",{className:iv.textBox},o().createElement(Xu(),{variant:"h5",classes:{h5:iv.text}},u().text("Drop files here"))))),o().createElement("div",{className:iv.orDivider},o().createElement("span",{className:iv.dividerLine}),o().createElement(Xu(),{className:iv.orText},u().text("OR")),o().createElement("span",{className:iv.dividerLine})),o().createElement("div",{className:iv.fileRow},o().createElement(Xu(),{className:f()(iv.fileName,p&&iv.fileNameSelected)},p?p.name:u().text("No file selected")),o().createElement(or(),{variant:"outlined",color:"primary",onClick:y},u().text("Browse"))),o().createElement("input",{ref:d,type:"file",accept:".csv,.json","aria-label":u().text("Select hierarchy file"),className:iv.fileInput,onChange:x})),h&&o().createElement(pm,null),o().createElement(Vm(),{classes:{root:iv.dialogActions}},o().createElement(or(),{onClick:t,disabled:h},u().text("Cancel")),o().createElement(or(),{onClick:g,color:"primary",disabled:!p||h},u().text("Import hierarchy"))),o().createElement(Jm,{error:l,onClose:()=>c(null)}))};var sv=n(6038),cv=n.n(sv);const uv=qn({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",minWidth:"20px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dv.apply(null,arguments)}const fv=e=>{let{title:t="",children:n=null,classes:r={}}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","children","classes"]);const i=uv();return o().createElement(cv(),dv({className:r.root,classes:{root:i.toolbar}},a),t&&o().createElement(Xu(),{className:r.title,classes:{root:i.title},variant:"h6"},u().text(t)),n)};var pv=n(8282),hv=n.n(pv);const mv=qn((e=>({expanded:{transform:"rotate(180deg)"},disabled:{color:`${e.palette.text.disabled} !important`}})));function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vv.apply(null,arguments)}const gv=e=>{const{selectProps:{classes:t,menuIsOpen:n,isDisabled:r},innerProps:a}=e,i=mv();return o().createElement(hv(),vv({"data-reltio-id":"select-dropdown-indicator"},a,{className:f()(t.dropdownIndicator,{[i.expanded]:n},{[i.disabled]:r})}))};gv.propTypes={innerProps:rt().object.isRequired,selectProps:rt().shape({classes:rt().shape({dropdownIndicator:rt().string}).isRequired,menuIsOpen:rt().bool.isRequired,isDisabled:rt().bool}).isRequired};var yv=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),bv=Math.abs,xv=String.fromCharCode,Ev=Object.assign;function Cv(e){return e.trim()}function wv(e,t,n){return e.replace(t,n)}function _v(e,t){return e.indexOf(t)}function kv(e,t){return 0|e.charCodeAt(t)}function Ov(e,t,n){return e.slice(t,n)}function Sv(e){return e.length}function Av(e){return e.length}function Mv(e,t){return t.push(e),e}var Lv=1,Pv=1,Rv=0,Tv=0,Nv=0,Iv="";function Dv(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Lv,column:Pv,length:i,return:""}}function Fv(e,t){return Ev(Dv("",null,null,"",null,null,0),e,{length:-e.length},t)}function jv(){return Nv=Tv>0?kv(Iv,--Tv):0,Pv--,10===Nv&&(Pv=1,Lv--),Nv}function Bv(){return Nv=Tv<Rv?kv(Iv,Tv++):0,Pv++,10===Nv&&(Pv=1,Lv++),Nv}function zv(){return kv(Iv,Tv)}function Hv(){return Tv}function Uv(e,t){return Ov(Iv,e,t)}function Vv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zv(e){return Lv=Pv=1,Rv=Sv(Iv=e),Tv=0,[]}function Kv(e){return Iv="",e}function qv(e){return Cv(Uv(Tv-1,Gv(91===e?e+2:40===e?e+1:e)))}function Wv(e){for(;(Nv=zv())&&Nv<33;)Bv();return Vv(e)>2||Vv(Nv)>3?"":" "}function $v(e,t){for(;--t&&Bv()&&!(Nv<48||Nv>102||Nv>57&&Nv<65||Nv>70&&Nv<97););return Uv(e,Hv()+(t<6&&32==zv()&&32==Bv()))}function Gv(e){for(;Bv();)switch(Nv){case e:return Tv;case 34:case 39:34!==e&&39!==e&&Gv(Nv);break;case 40:41===e&&Gv(e);break;case 92:Bv()}return Tv}function Yv(e,t){for(;Bv()&&e+Nv!==57&&(e+Nv!==84||47!==zv()););return"/*"+Uv(t,Tv-1)+"*"+xv(47===e?e:Bv())}function Xv(e){for(;!Vv(zv());)Bv();return Uv(e,Tv)}var Qv="-ms-",Jv="-moz-",eg="-webkit-",tg="comm",ng="rule",rg="decl",og="@keyframes";function ag(e,t){for(var n="",r=Av(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ig(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case rg:return e.return=e.return||e.value;case tg:return"";case og:return e.return=e.value+"{"+ag(e.children,r)+"}";case ng:e.value=e.props.join(",")}return Sv(n=ag(e.children,r))?e.return=e.value+"{"+n+"}":""}function lg(e){return Kv(sg("",null,null,null,[""],e=Zv(e),0,[0],e))}function sg(e,t,n,r,o,a,i,l,s){for(var c=0,u=0,d=i,f=0,p=0,h=0,m=1,v=1,g=1,y=0,b="",x=o,E=a,C=r,w=b;v;)switch(h=y,y=Bv()){case 40:if(108!=h&&58==kv(w,d-1)){-1!=_v(w+=wv(qv(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:w+=qv(y);break;case 9:case 10:case 13:case 32:w+=Wv(h);break;case 92:w+=$v(Hv()-1,7);continue;case 47:switch(zv()){case 42:case 47:Mv(ug(Yv(Bv(),Hv()),t,n),s);break;default:w+="/"}break;case 123*m:l[c++]=Sv(w)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+u:-1==g&&(w=wv(w,/\f/g,"")),p>0&&Sv(w)-d&&Mv(p>32?dg(w+";",r,n,d-1):dg(wv(w," ","")+";",r,n,d-2),s);break;case 59:w+=";";default:if(Mv(C=cg(w,t,n,c,u,o,l,b,x=[],E=[],d),a),123===y)if(0===u)sg(w,t,C,C,x,a,d,l,E);else switch(99===f&&110===kv(w,3)?100:f){case 100:case 108:case 109:case 115:sg(e,C,C,r&&Mv(cg(e,C,C,0,0,o,l,b,o,x=[],d),E),o,E,d,l,r?x:E);break;default:sg(w,C,C,C,[""],E,0,l,E)}}c=u=p=0,m=g=1,b=w="",d=i;break;case 58:d=1+Sv(w),p=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==jv())continue;switch(w+=xv(y),y*m){case 38:g=u>0?1:(w+="\f",-1);break;case 44:l[c++]=(Sv(w)-1)*g,g=1;break;case 64:45===zv()&&(w+=qv(Bv())),f=zv(),u=d=Sv(b=w+=Xv(Hv())),y++;break;case 45:45===h&&2==Sv(w)&&(m=0)}}return a}function cg(e,t,n,r,o,a,i,l,s,c,u){for(var d=o-1,f=0===o?a:[""],p=Av(f),h=0,m=0,v=0;h<r;++h)for(var g=0,y=Ov(e,d+1,d=bv(m=i[h])),b=e;g<p;++g)(b=Cv(m>0?f[g]+" "+y:wv(y,/&\f/g,f[g])))&&(s[v++]=b);return Dv(e,t,n,0===o?ng:l,s,c,u)}function ug(e,t,n){return Dv(e,t,n,tg,xv(Nv),Ov(e,2,-2),0)}function dg(e,t,n,r){return Dv(e,t,n,rg,Ov(e,0,r),Ov(e,r+1,-1),r)}var fg=function(e,t,n){for(var r=0,o=0;r=o,o=zv(),38===r&&12===o&&(t[n]=1),!Vv(o);)Bv();return Uv(e,Tv)},pg=new WeakMap,hg=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||pg.get(n))&&!r){pg.set(e,!0);for(var o=[],a=function(e,t){return Kv(function(e,t){var n=-1,r=44;do{switch(Vv(r)){case 0:38===r&&12===zv()&&(t[n]=1),e[n]+=fg(Tv-1,t,n);break;case 2:e[n]+=qv(r);break;case 4:if(44===r){e[++n]=58===zv()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=xv(r)}}while(r=Bv());return e}(Zv(e),t))}(t,o),i=n.props,l=0,s=0;l<a.length;l++)for(var c=0;c<i.length;c++,s++)e.props[s]=o[l]?a[l].replace(/&\f/g,i[c]):i[c]+" "+a[l]}}},mg=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function vg(e,t){switch(function(e,t){return 45^kv(e,0)?(((t<<2^kv(e,0))<<2^kv(e,1))<<2^kv(e,2))<<2^kv(e,3):0}(e,t)){case 5103:return eg+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return eg+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return eg+e+Jv+e+Qv+e+e;case 6828:case 4268:return eg+e+Qv+e+e;case 6165:return eg+e+Qv+"flex-"+e+e;case 5187:return eg+e+wv(e,/(\w+).+(:[^]+)/,eg+"box-$1$2"+Qv+"flex-$1$2")+e;case 5443:return eg+e+Qv+"flex-item-"+wv(e,/flex-|-self/,"")+e;case 4675:return eg+e+Qv+"flex-line-pack"+wv(e,/align-content|flex-|-self/,"")+e;case 5548:return eg+e+Qv+wv(e,"shrink","negative")+e;case 5292:return eg+e+Qv+wv(e,"basis","preferred-size")+e;case 6060:return eg+"box-"+wv(e,"-grow","")+eg+e+Qv+wv(e,"grow","positive")+e;case 4554:return eg+wv(e,/([^-])(transform)/g,"$1"+eg+"$2")+e;case 6187:return wv(wv(wv(e,/(zoom-|grab)/,eg+"$1"),/(image-set)/,eg+"$1"),e,"")+e;case 5495:case 3959:return wv(e,/(image-set\([^]*)/,eg+"$1$`$1");case 4968:return wv(wv(e,/(.+:)(flex-)?(.*)/,eg+"box-pack:$3"+Qv+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+eg+e+e;case 4095:case 3583:case 4068:case 2532:return wv(e,/(.+)-inline(.+)/,eg+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Sv(e)-1-t>6)switch(kv(e,t+1)){case 109:if(45!==kv(e,t+4))break;case 102:return wv(e,/(.+:)(.+)-([^]+)/,"$1"+eg+"$2-$3$1"+Jv+(108==kv(e,t+3)?"$3":"$2-$3"))+e;case 115:return~_v(e,"stretch")?vg(wv(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==kv(e,t+1))break;case 6444:switch(kv(e,Sv(e)-3-(~_v(e,"!important")&&10))){case 107:return wv(e,":",":"+eg)+e;case 101:return wv(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+eg+(45===kv(e,14)?"inline-":"")+"box$3$1"+eg+"$2$3$1"+Qv+"$2box$3")+e}break;case 5936:switch(kv(e,t+11)){case 114:return eg+e+Qv+wv(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return eg+e+Qv+wv(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return eg+e+Qv+wv(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return eg+e+Qv+e+e}return e}var gg=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case rg:e.return=vg(e.value,e.length);break;case og:return ag([Fv(e,{value:wv(e.value,"@","@"+eg)})],r);case ng:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ag([Fv(e,{props:[wv(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ag([Fv(e,{props:[wv(t,/:(plac\w+)/,":"+eg+"input-$1")]}),Fv(e,{props:[wv(t,/:(plac\w+)/,":-moz-$1")]}),Fv(e,{props:[wv(t,/:(plac\w+)/,Qv+"input-$1")]})],r)}return""}))}}],yg=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,a=e.stylisPlugins||gg,i={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;l.push(e)}));var s,c,u,d,f=[ig,(d=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(c=[hg,mg].concat(a,f),u=Av(c),function(e,t,n,r){for(var o="",a=0;a<u;a++)o+=c[a](e,t,n,r)||"";return o});o=function(e,t,n,r){s=n,ag(lg(e?e+"{"+t.styles+"}":t.styles),p),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new yv({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return h.sheet.hydrate(l),h},bg=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},xg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Eg(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Cg=/[A-Z]|^ms/g,wg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_g=function(e){return 45===e.charCodeAt(1)},kg=function(e){return null!=e&&"boolean"!=typeof e},Og=Eg((function(e){return _g(e)?e:e.replace(Cg,"-$&").toLowerCase()})),Sg=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(wg,(function(e,t,n){return Mg={name:t,styles:n,next:Mg},t}))}return 1===xg[e]||_g(e)||"number"!=typeof t||0===t?t:t+"px"};function Ag(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Mg={name:n.name,styles:n.styles,next:Mg},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Mg={name:r.name,styles:r.styles,next:Mg},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ag(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=a+"{"+t[i]+"}":kg(i)&&(r+=Og(a)+":"+Sg(a,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=Ag(e,t,i);switch(a){case"animation":case"animationName":r+=Og(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var s=0;s<i.length;s++)kg(i[s])&&(r+=Og(a)+":"+Sg(a,i[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Mg,a=n(e);return Mg=o,Ag(e,t,a)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var Mg,Lg=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Pg=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Mg=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=Ag(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=Ag(n,t,e[i]),r&&(o+=a[i]);Lg.lastIndex=0;for(var l,s="";null!==(l=Lg.exec(o));)s+="-"+l[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+s;return{name:c,styles:o,next:Mg}},Rg=!!r.useInsertionEffect&&r.useInsertionEffect,Tg=Rg||function(e){return e()},Ng=(Rg||r.useLayoutEffect,{}.hasOwnProperty),Ig=r.createContext("undefined"!=typeof HTMLElement?yg({key:"css"}):null);Ig.Provider;var Dg=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(Ig);return e(t,o,n)}))},Fg=r.createContext({}),jg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Bg=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return bg(t,n,r),Tg((function(){return function(e,t,n){bg(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},zg=Dg((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var a=e[jg],i=[o],l="";"string"==typeof e.className?l=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,i,e.className):null!=e.className&&(l=e.className+" ");var s=Pg(i,void 0,r.useContext(Fg));l+=t.key+"-"+s.name;var c={};for(var u in e)Ng.call(e,u)&&"css"!==u&&u!==jg&&(c[u]=e[u]);return c.ref=n,c.className=l,r.createElement(r.Fragment,null,r.createElement(Bg,{cache:t,serialized:s,isStringTag:"string"==typeof a}),r.createElement(a,c))})),Hg=zg,Ug=(n(3463),function(e,t){var n=arguments;if(null==t||!Ng.call(t,"css"))return r.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=Hg,a[1]=function(e,t){var n={};for(var r in t)Ng.call(t,r)&&(n[r]=t[r]);return n[jg]=e,n}(e,t);for(var i=2;i<o;i++)a[i]=n[i];return r.createElement.apply(null,a)});function Vg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pg(t)}const Zg=Math.min,Kg=Math.max,qg=Math.round,Wg=Math.floor,$g=e=>({x:e,y:e});function Gg(e){return Qg(e)?(e.nodeName||"").toLowerCase():"#document"}function Yg(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Xg(e){var t;return null==(t=(Qg(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qg(e){return e instanceof Node||e instanceof Yg(e).Node}function Jg(e){return e instanceof Element||e instanceof Yg(e).Element}function ey(e){return e instanceof HTMLElement||e instanceof Yg(e).HTMLElement}function ty(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Yg(e).ShadowRoot)}function ny(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ry(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ry(e){return Yg(e).getComputedStyle(e)}function oy(e){const t=function(e){if("html"===Gg(e))return e;const t=e.assignedSlot||e.parentNode||ty(e)&&e.host||Xg(e);return ty(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(Gg(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:ey(t)&&ny(t)?t:oy(t)}function ay(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=oy(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Yg(o);if(a){const e=iy(i);return t.concat(i,i.visualViewport||[],ny(o)?o:[],e&&n?ay(e):[])}return t.concat(o,ay(o,[],n))}function iy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ly(e){return Jg(e)?e:e.contextElement}function sy(e){const t=ly(e);if(!ey(t))return $g(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=function(e){const t=ry(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ey(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=qg(n)!==a||qg(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}(t);let i=(a?qg(n.width):n.width)/r,l=(a?qg(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const cy=$g(0);function uy(e){const t=Yg(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:cy}function dy(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=ly(e);let i=$g(1);t&&(r?Jg(r)&&(i=sy(r)):i=sy(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Yg(e))&&t}(a,n,r)?uy(a):$g(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=Yg(a),t=r&&Jg(r)?Yg(r):r;let n=e,o=iy(n);for(;o&&r&&t!==n;){const e=sy(o),t=o.getBoundingClientRect(),r=ry(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=a,c+=i,n=Yg(o),o=iy(n)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:u,height:d,x:s,y:c})}const fy=r.useLayoutEffect;var py=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],hy=function(){};function my(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function vy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&a.push("".concat(my(e,i)));return a.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var gy=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===I(e)&&null!==e?[e]:[];var t},yy=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,ol({},Al(e,py))},by=function(e,t,n){var r=e.cx,o=e.getStyles,a=e.getClassNames,i=e.className;return{css:o(t,e),className:r(null!=n?n:{},a(t,e),i)}};function xy(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ey(e){return xy(e)?window.pageYOffset:e.scrollTop}function Cy(e,t){xy(e)?window.scrollTo(0,t):e.scrollTop=t}function wy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:hy,o=Ey(e),a=t-o,i=0;!function t(){var l=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(i+=10,o,a,n);Cy(e,l),i<n?window.requestAnimationFrame(t):r(e)}()}function _y(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Cy(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Cy(e,Math.max(t.offsetTop-o,0))}function ky(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Oy=!1,Sy={get passive(){return Oy=!0}},Ay="undefined"!=typeof window?window:{};Ay.addEventListener&&Ay.removeEventListener&&(Ay.addEventListener("p",hy,Sy),Ay.removeEventListener("p",hy,!1));var My=Oy;function Ly(e){return null!=e}function Py(e,t,n){return e?t:n}var Ry=["children","innerProps"],Ty=["children","innerProps"];var Ny,Iy=function(e){return"auto"===e?"bottom":e},Dy=(0,r.createContext)(null),Fy=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,s=e.theme,c=((0,r.useContext)(Dy)||{}).setPortalPlacement,u=(0,r.useRef)(null),d=Sl((0,r.useState)(o),2),f=d[0],p=d[1],h=Sl((0,r.useState)(null),2),m=h[0],v=h[1],g=s.spacing.controlHeight;return fy((function(){var e=u.current;if(e){var t="fixed"===i,r=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=s.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,p=d.height,h=d.top,m=n.offsetParent.getBoundingClientRect().top,v=i?window.innerHeight:function(e){return xy(e)?window.innerHeight:e.clientHeight}(s),g=Ey(s),y=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),x=m-b,E=v-h,C=x+g,w=u-g-h,_=f-v+g+y,k=g+h-b,O=160;switch(o){case"auto":case"bottom":if(E>=p)return{placement:"bottom",maxHeight:t};if(w>=p&&!i)return a&&wy(s,_,O),{placement:"bottom",maxHeight:t};if(!i&&w>=r||i&&E>=r)return a&&wy(s,_,O),{placement:"bottom",maxHeight:i?E-y:w-y};if("auto"===o||i){var S=t,A=i?x:C;return A>=r&&(S=Math.min(A-y-l,t)),{placement:"top",maxHeight:S}}if("bottom"===o)return a&&Cy(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(C>=p&&!i)return a&&wy(s,k,O),{placement:"top",maxHeight:t};if(!i&&C>=r||i&&x>=r){var M=t;return(!i&&C>=r||i&&x>=r)&&(M=i?x-b:C-b),a&&wy(s,k,O),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:g});p(r.maxHeight),v(r.placement),null==c||c(r.placement)}}),[o,a,i,l,n,c,g]),t({ref:u,placerProps:ol(ol({},e),{},{placement:m||Iy(a),maxHeight:f})})},jy=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return ol({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},By=jy,zy=jy,Hy=["size"],Uy=["innerProps","isRtl","size"],Vy={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Zy=function(e){var t=e.size,n=Al(e,Hy);return Ug("svg",(0,R.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Vy},n))},Ky=function(e){return Ug(Zy,(0,R.Z)({size:20},e),Ug("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},qy=function(e){return Ug(Zy,(0,R.Z)({size:20},e),Ug("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Wy=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return ol({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*o,":hover":{color:n?a.neutral80:a.neutral40}})},$y=Wy,Gy=Wy,Yy=function(){var e=Vg.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Ny||(Ny=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),Xy=function(e){var t=e.delay,n=e.offset;return Ug("span",{css:Vg({animation:"".concat(Yy," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Qy=["data"],Jy=["innerRef","isDisabled","isHidden","inputClassName"],eb={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},tb={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ol({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},eb)},nb=function(e){return ol({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},eb)},rb=function(e){var t=e.children,n=e.innerProps;return Ug("div",n,t)},ob={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ug(Ky,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,a=e.innerProps,i=e.menuIsOpen;return Ug("div",(0,R.Z)({ref:o},by(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),a,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ug(qy,null))},DownChevron:qy,CrossIcon:Ky,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,a=e.Heading,i=e.headingProps,l=e.innerProps,s=e.label,c=e.theme,u=e.selectProps;return Ug("div",(0,R.Z)({},by(e,"group",{group:!0}),l),Ug(a,(0,R.Z)({},i,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),s),Ug("div",null,t))},GroupHeading:function(e){var t=yy(e);t.data;var n=Al(t,Qy);return Ug("div",(0,R.Z)({},by(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ug("span",(0,R.Z)({},t,by(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=yy(e),o=r.innerRef,a=r.isDisabled,i=r.isHidden,l=r.inputClassName,s=Al(r,Jy);return Ug("div",(0,R.Z)({},by(e,"input",{"input-container":!0}),{"data-value":n||""}),Ug("input",(0,R.Z)({className:t({input:!0},l),ref:o,style:nb(i),disabled:a},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,a=Al(e,Uy);return Ug("div",(0,R.Z)({},by(ol(ol({},a),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ug(Xy,{delay:0,offset:n}),Ug(Xy,{delay:160,offset:!0}),Ug(Xy,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Ug("div",(0,R.Z)({},by(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,a=e.innerProps,i=e.menuPlacement,l=e.menuPosition,s=(0,r.useRef)(null),c=(0,r.useRef)(null),u=Sl((0,r.useState)(Iy(i)),2),d=u[0],f=u[1],p=(0,r.useMemo)((function(){return{setPortalPlacement:f}}),[]),h=Sl((0,r.useState)(null),2),m=h[0],v=h[1],g=(0,r.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||v({offset:n,rect:e})}}),[o,l,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);fy((function(){g()}),[g]);var y=(0,r.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),o&&s.current&&(c.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ly(e),u=o||a?[...c?ay(c):[],...ay(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=Xg(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-Wg(u)+"px "+-Wg(o.clientWidth-(c+d))+"px "+-Wg(o.clientHeight-(u+f))+"px "+-Wg(c)+"px",threshold:Kg(0,Zg(1,s))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!s&&h.observe(c),h.observe(t));let m=s?dy(e):null;return s&&function t(){const r=dy(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(f)}}(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);fy((function(){y()}),[y]);var b=(0,r.useCallback)((function(e){s.current=e,y()}),[y]);if(!t&&"fixed"!==l||!m)return null;var x=Ug("div",(0,R.Z)({ref:b},by(ol(ol({},e),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),a),n);return Ug(Dy.Provider,{value:p},t?(0,Fl.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=Al(e,Ty);return Ug("div",(0,R.Z)({},by(ol(ol({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=Al(e,Ry);return Ug("div",(0,R.Z)({},by(ol(ol({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,a=e.isDisabled,i=e.removeProps,l=e.selectProps,s=n.Container,c=n.Label,u=n.Remove;return Ug(s,{data:r,innerProps:ol(ol({},by(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},Ug(c,{data:r,innerProps:ol({},by(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Ug(u,{data:r,innerProps:ol(ol({},by(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:l}))},MultiValueContainer:rb,MultiValueLabel:rb,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ug("div",(0,R.Z)({role:"button"},n),t||Ug(Ky,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.innerRef,i=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:a,"aria-disabled":n},i),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ug("div",(0,R.Z)({},by(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ug("div",(0,R.Z)({},by(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Ug("div",(0,R.Z)({},by(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},ab=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ib(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||ab(r)&&ab(o)))return!1;var r,o;return!0}for(var lb={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},sb=function(e){return Ug("span",(0,R.Z)({css:lb},e))},cb={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,a=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,l=e.isDisabled,s=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(a," focused, ").concat(u(i,n),".");if("menu"===t&&c){var d=l?" disabled":"",f="".concat(s?" selected":"").concat(d);return"".concat(a).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ub=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,a=e.focusableOptions,i=e.isFocused,l=e.selectValue,s=e.selectProps,c=e.id,u=e.isAppleDevice,d=s.ariaLiveMessages,f=s.getOptionLabel,p=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,g=s.menuIsOpen,y=s.options,b=s.screenReaderStatus,x=s.tabSelectsValue,E=s.isLoading,C=s["aria-label"],w=s["aria-live"],_=(0,r.useMemo)((function(){return ol(ol({},cb),d||{})}),[d]),k=(0,r.useMemo)((function(){var e,n="";if(t&&_.onChange){var r=t.option,o=t.options,a=t.removedValue,i=t.removedValues,s=t.value,c=a||r||(e=s,Array.isArray(e)?null:e),u=c?f(c):"",d=o||i||void 0,p=d?d.map(f):[],h=ol({isDisabled:c&&m(c,l),label:u,labels:p},t);n=_.onChange(h)}return n}),[t,_,m,l,f]),O=(0,r.useMemo)((function(){var e="",t=n||o,r=!!(n&&l&&l.includes(n));if(t&&_.onFocus){var i={focused:t,label:f(t),isDisabled:m(t,l),isSelected:r,options:a,context:t===n?"menu":"value",selectValue:l,isAppleDevice:u};e=_.onFocus(i)}return e}),[n,o,f,m,_,a,l,u]),S=(0,r.useMemo)((function(){var e="";if(g&&y.length&&!E&&_.onFilter){var t=b({count:a.length});e=_.onFilter({inputValue:p,resultsMessage:t})}return e}),[a,p,g,_,y,b,E]),A="initial-input-focus"===(null==t?void 0:t.action),M=(0,r.useMemo)((function(){var e="";if(_.guidance){var t=o?"value":g?"menu":"input";e=_.guidance({"aria-label":C,context:t,isDisabled:n&&m(n,l),isMulti:h,isSearchable:v,tabSelectsValue:x,isInitialFocus:A})}return e}),[C,n,o,h,m,v,g,_,l,x,A]),L=Ug(r.Fragment,null,Ug("span",{id:"aria-selection"},k),Ug("span",{id:"aria-focused"},O),Ug("span",{id:"aria-results"},S),Ug("span",{id:"aria-guidance"},M));return Ug(r.Fragment,null,Ug(sb,{id:c},A&&L),Ug(sb,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!A&&L))},db=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],fb=new RegExp("["+db.map((function(e){return e.letters})).join("")+"]","g"),pb={},hb=0;hb<db.length;hb++)for(var mb=db[hb],vb=0;vb<mb.letters.length;vb++)pb[mb.letters[vb]]=mb.base;var gb=function(e){return e.replace(fb,(function(e){return pb[e]}))},yb=function(e,t){void 0===t&&(t=ib);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}(gb),bb=function(e){return e.replace(/^\s+|\s+$/g,"")},xb=function(e){return"".concat(e.label," ").concat(e.value)},Eb=["innerRef"];function Cb(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=Sl(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=Sl(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(Al(e,Eb),"onExited","in","enter","exit","appear");return Ug("input",(0,R.Z)({ref:t},n,{css:Vg({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var wb=["boxSizing","height","overflow","paddingRight","position"],_b={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function kb(e){e.preventDefault()}function Ob(e){e.stopPropagation()}function Sb(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ab(){return"ontouchstart"in window||navigator.maxTouchPoints}var Mb=!("undefined"==typeof window||!window.document||!window.document.createElement),Lb=0,Pb={capture:!1,passive:!1},Rb=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Tb={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Nb(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,a=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,a=e.onTopArrive,i=e.onTopLeave,l=(0,r.useRef)(!1),s=(0,r.useRef)(!1),c=(0,r.useRef)(0),u=(0,r.useRef)(null),d=(0,r.useCallback)((function(e,t){if(null!==u.current){var r=u.current,c=r.scrollTop,d=r.scrollHeight,f=r.clientHeight,p=u.current,h=t>0,m=d-f-c,v=!1;m>t&&l.current&&(o&&o(e),l.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!l.current&&n(e),p.scrollTop=d,v=!0,l.current=!0):!h&&-t>c&&(a&&!s.current&&a(e),p.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,o,a,i]),f=(0,r.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,r.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),h=(0,r.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=(0,r.useCallback)((function(e){if(e){var t=!!My&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),v=(0,r.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return(0,r.useEffect)((function(){if(t){var e=u.current;return m(e),function(){v(e)}}}),[t,m,v]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,a=(0,r.useRef)({}),i=(0,r.useRef)(null),l=(0,r.useCallback)((function(e){if(Mb){var t=document.body,n=t&&t.style;if(o&&wb.forEach((function(e){var t=n&&n[e];a.current[e]=t})),o&&Lb<1){var r=parseInt(a.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,l=window.innerWidth-i+r||0;Object.keys(_b).forEach((function(e){var t=_b[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&Ab()&&(t.addEventListener("touchmove",kb,Pb),e&&(e.addEventListener("touchstart",Sb,Pb),e.addEventListener("touchmove",Ob,Pb))),Lb+=1}}),[o]),s=(0,r.useCallback)((function(e){if(Mb){var t=document.body,n=t&&t.style;Lb=Math.max(Lb-1,0),o&&Lb<1&&wb.forEach((function(e){var t=a.current[e];n&&(n[e]=t)})),t&&Ab()&&(t.removeEventListener("touchmove",kb,Pb),e&&(e.removeEventListener("touchstart",Sb,Pb),e.removeEventListener("touchmove",Ob,Pb)))}}),[o]);return(0,r.useEffect)((function(){if(t){var e=i.current;return l(e),function(){s(e)}}}),[t,l,s]),function(e){i.current=e}}({isEnabled:n});return Ug(r.Fragment,null,n&&Ug("div",{onClick:Rb,css:Tb}),t((function(e){a(e),i(e)})))}var Ib={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Db=function(e){var t=e.name,n=e.onFocus;return Ug("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Ib,value:"",onChange:function(){}})};function Fb(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function jb(){return Fb(/^Mac/i)}var Bb={clearIndicator:Gy,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,a=o.colors,i=o.borderRadius;return ol({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},dropdownIndicator:$y,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return ol({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return ol({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,a=o.spacing,i=o.colors;return ol(ol({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},tb),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,a=o.colors,i=o.spacing.baseUnit;return ol({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*i})},loadingMessage:zy,menu:function(e,t){var n,r=e.placement,o=e.theme,a=o.borderRadius,i=o.spacing,l=o.colors;return ol((nl(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),nl(n,"position","absolute"),nl(n,"width","100%"),nl(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return ol({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,a=n.colors;return ol({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,a=e.cropWithEllipsis;return ol({overflow:"hidden",textOverflow:a||void 0===a?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,a=n.colors,i=e.isFocused;return ol({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},noOptionsMessage:By,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.theme,i=a.spacing,l=a.colors;return ol({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return ol({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,a=r.colors;return ol({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,a=e.selectProps.controlShouldRenderValue;return ol({alignItems:"center",display:r&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},zb={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Hb={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ky(),captureMenuScroll:!ky(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=ol({ignoreCase:!0,ignoreAccents:!0,stringify:xb,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,l=n.matchFrom,s=i?bb(t):t,c=i?bb(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=yb(s),c=gb(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ub(e,t,n,r){return{type:"option",data:t,isDisabled:Yb(e,t,n),isSelected:Xb(e,t,n),label:$b(e,t),value:Gb(e,t),index:r}}function Vb(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Ub(e,n,t,r)})).filter((function(t){return qb(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=Ub(e,n,t,r);return qb(e,a)?a:void 0})).filter(Ly)}function Zb(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Pt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Kb(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,Pt(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function qb(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,l=t.value;return(!Jb(e)||!a)&&Qb(e,{label:i,value:l,data:o},r)}var Wb=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},$b=function(e,t){return e.getOptionLabel(t)},Gb=function(e,t){return e.getOptionValue(t)};function Yb(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Xb(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Gb(e,t);return n.some((function(t){return Gb(e,t)===r}))}function Qb(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Jb=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ex=1,tx=function(e){ll(n,e);var t=dl(n);function n(e){var r;if(al(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=jb()||Fb(/^iPhone/i)||Fb(/^iPad/i)||jb()&&navigator.maxTouchPoints>1,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,a=o.closeMenuOnSelect,i=o.isMulti,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),a&&(r.setState({inputIsHiddenAfterUpdate:!i}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,a=t.name,i=r.state.selectValue,l=o&&r.isOptionSelected(e,i),s=r.isOptionDisabled(e,i);if(l){var c=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:a});o?r.setValue([].concat(Pt(i),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),a=n.filter((function(e){return r.getOptionValue(e)!==o})),i=Py(t,a,a[0]||null);r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Py(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),a=Py(e,o,o[0]||null);r.onChange(a,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Wb(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Kb(Vb(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vy.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return $b(r.props,e)},r.getOptionValue=function(e){return Gb(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=Bb[e](t,n);o.boxSizing="border-box";var a=r.props.styles[e];return a?a(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,ol(ol({},ob),e.components);var e},r.buildCategorizedOptions=function(){return Vb(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Zb(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:ol({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&xy(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),a=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Jb(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,l=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,v=p.selectValue;if(!(s||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||f&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):l&&a&&r.clearValue();break;case" ":if(i)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++ex),r.state.selectValue=gy(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),i=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=a[i],r.state.focusedOptionId=Wb(o,a[i])}return r}return j(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&_y(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(_y(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var l=a.indexOf(r[0]);l>-1&&(i=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i],focusedOptionId:this.getFocusedOptionId(a[i])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o<a&&(i=o+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(zb):ol(ol({},zb),this.props.theme):zb}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,a=this.selectOption,i=this.setValue,l=this.props,s=l.isMulti,c=l.isRtl,u=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:c,options:u,selectOption:a,selectProps:l,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Yb(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Xb(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Qb(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,a=e.inputValue,i=e.tabIndex,l=e.form,s=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),v=ol(ol(ol({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(u,(0,R.Z)({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:l,type:"text",value:a},v)):r.createElement(Cb,(0,R.Z)({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:hy,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:l,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,a=t.MultiValueLabel,i=t.MultiValueRemove,l=t.SingleValue,s=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,m=u.placeholder,v=this.state,g=v.selectValue,y=v.focusedValue,b=v.isFocused;if(!this.hasValue()||!d)return h?null:r.createElement(s,(0,R.Z)({},c,{key:"placeholder",isDisabled:f,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return g.map((function(t,l){var s=t===y,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,(0,R.Z)({},c,{components:{Container:o,Label:a,Remove:i},isFocused:s,isDisabled:f,key:u,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var x=g[0];return r.createElement(l,(0,R.Z)({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,a=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||a)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,(0,R.Z)({},t,{innerProps:l,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,a=n.isLoading,i=this.state.isFocused;return e&&a?r.createElement(e,(0,R.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,a=this.props.isDisabled,i=this.state.isFocused;return r.createElement(n,(0,R.Z)({},o,{isDisabled:a,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,(0,R.Z)({},t,{innerProps:a,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,a=t.Menu,i=t.MenuList,l=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,g=p.loadingMessage,y=p.minMenuHeight,b=p.maxMenuHeight,x=p.menuIsOpen,E=p.menuPlacement,C=p.menuPosition,w=p.menuPortalTarget,_=p.menuShouldBlockScroll,k=p.menuShouldScrollIntoView,O=p.noOptionsMessage,S=p.onMenuScrollToTop,A=p.onMenuScrollToBottom;if(!x)return null;var M,L=function(t,n){var o=t.type,a=t.data,i=t.isDisabled,l=t.isSelected,s=t.label,c=t.value,p=f===a,h=i?void 0:function(){return e.onOptionHover(a)},m=i?void 0:function(){return e.selectOption(a)},v="".concat(e.getElementId("option"),"-").concat(n),g={id:v,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:l};return r.createElement(u,(0,R.Z)({},d,{innerProps:g,data:a,isDisabled:i,isSelected:l,key:v,label:s,type:o,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map((function(t){if("group"===t.type){var a=t.data,i=t.options,l=t.index,s="".concat(e.getElementId("group"),"-").concat(l),c="".concat(s,"-heading");return r.createElement(n,(0,R.Z)({},d,{key:s,data:a,options:i,Heading:o,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return L(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return L(t,"".concat(t.index))}));else if(v){var P=g({inputValue:m});if(null===P)return null;M=r.createElement(s,d,P)}else{var T=O({inputValue:m});if(null===T)return null;M=r.createElement(c,d,T)}var N={minMenuHeight:y,maxMenuHeight:b,menuPlacement:E,menuPosition:C,menuShouldScrollIntoView:k},I=r.createElement(Fy,(0,R.Z)({},d,N),(function(t){var n=t.ref,o=t.placerProps,l=o.placement,s=o.maxHeight;return r.createElement(a,(0,R.Z)({},d,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:l}),r.createElement(Nb,{captureEnabled:h,onTopArrive:S,onBottomArrive:A,lockEnabled:_},(function(t){return r.createElement(i,(0,R.Z)({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:f}),M)})))}));return w||"fixed"===C?r.createElement(l,(0,R.Z)({},d,{appendTo:w,controlElement:this.controlRef,menuPlacement:E,menuPosition:C}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,a=t.isMulti,i=t.name,l=t.required,s=this.state.selectValue;if(l&&!this.hasValue()&&!o)return r.createElement(Db,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(a){if(n){var c=s.map((function(t){return e.getOptionValue(t)})).join(n);return r.createElement("input",{name:i,type:"hidden",value:c})}var u=s.length>0?s.map((function(t,n){return r.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):r.createElement("input",{name:i,type:"hidden",value:""});return r.createElement("div",null,u)}var d=s[0]?this.getOptionValue(s[0]):"";return r.createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,a=t.focusedValue,i=t.isFocused,l=t.selectValue,s=this.getFocusableOptions();return r.createElement(ub,(0,R.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:a,isFocused:i,selectValue:l,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,a=e.ValueContainer,i=this.props,l=i.className,s=i.id,c=i.isDisabled,u=i.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return r.createElement(o,(0,R.Z)({},f,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),r.createElement(t,(0,R.Z)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),r.createElement(a,(0,R.Z)({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,(0,R.Z)({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,i=t.isFocused,l=t.prevWasFocused,s=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=gy(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var v=d?function(e,t){return Zb(Vb(e,t))}(e,h):[],g=d?Kb(Vb(e,h),"".concat(s,"-option")):[],y=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:h,focusedOption:b,focusedOptionId:Wb(g,b),focusableOptionsWithIds:g,focusedValue:y,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},E=a,C=i&&l;return i&&!C&&(E={value:Py(p,h,h[0]||null),options:h,action:"initial-input-focus"},C=!l),"initial-input-focus"===(null==a?void 0:a.action)&&(E=null),ol(ol(ol({},m),x),{},{prevProps:e,ariaSelection:E,prevWasFocused:C})}}]),n}(r.Component);tx.defaultProps=Hb;var nx=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function rx(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,a=void 0!==o&&o,i=e.defaultValue,l=void 0===i?null:i,s=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,h=e.value,m=Al(e,nx),v=Sl((0,r.useState)(void 0!==s?s:n),2),g=v[0],y=v[1],b=Sl((0,r.useState)(void 0!==c?c:a),2),x=b[0],E=b[1],C=Sl((0,r.useState)(void 0!==h?h:l),2),w=C[0],_=C[1],k=(0,r.useCallback)((function(e,t){"function"==typeof u&&u(e,t),_(e)}),[u]),O=(0,r.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),y(void 0!==n?n:e)}),[d]),S=(0,r.useCallback)((function(){"function"==typeof p&&p(),E(!0)}),[p]),A=(0,r.useCallback)((function(){"function"==typeof f&&f(),E(!1)}),[f]),M=void 0!==s?s:g,L=void 0!==c?c:x,P=void 0!==h?h:w;return ol(ol({},m),{},{inputValue:M,menuIsOpen:L,onChange:k,onInputChange:O,onMenuClose:A,onMenuOpen:S,value:P})}var ox=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],ax=(0,r.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,a=void 0!==o&&o,i=e.loadOptions;e.options;var l=e.isLoading,s=void 0!==l&&l,c=e.onInputChange,u=e.filterOption,d=void 0===u?null:u,f=Al(e,ox),p=f.inputValue,h=(0,r.useRef)(void 0),m=(0,r.useRef)(!1),v=Sl((0,r.useState)(Array.isArray(n)?n:void 0),2),g=v[0],y=v[1],b=Sl((0,r.useState)(void 0!==p?p:""),2),x=b[0],E=b[1],C=Sl((0,r.useState)(!0===n),2),w=C[0],_=C[1],k=Sl((0,r.useState)(void 0),2),O=k[0],S=k[1],A=Sl((0,r.useState)([]),2),M=A[0],L=A[1],P=Sl((0,r.useState)(!1),2),R=P[0],T=P[1],N=Sl((0,r.useState)({}),2),I=N[0],D=N[1],F=Sl((0,r.useState)(void 0),2),j=F[0],B=F[1],z=Sl((0,r.useState)(void 0),2),H=z[0],U=z[1];a!==H&&(D({}),U(a)),n!==j&&(y(Array.isArray(n)?n:void 0),B(n)),(0,r.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var V=(0,r.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,r.useEffect)((function(){!0===n&&V(x,(function(e){m.current&&(y(e||[]),_(!!h.current))}))}),[]);var Z=(0,r.useCallback)((function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,c);if(!n)return h.current=void 0,E(""),S(""),L([]),_(!1),void T(!1);if(a&&I[n])E(n),S(n),L(I[n]),_(!1),T(!1);else{var r=h.current={};E(n),_(!0),T(!O),V(n,(function(e){m&&r===h.current&&(h.current=void 0,_(!1),S(n),L(e||[]),T(!1),D(e?ol(ol({},I),{},nl({},n,e)):I))}))}}),[a,V,O,I,c]),K=R?[]:x&&O?M:g||[];return ol(ol({},f),{},{options:K,isLoading:w||s,onInputChange:Z,filterOption:d})}(e),o=rx(n);return r.createElement(tx,(0,R.Z)({ref:t},o))})),ix=ax,lx=n(518),sx=n.n(lx);function cx(){return cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cx.apply(null,arguments)}var ux=n(7290),dx=n.n(ux);function fx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){px(e,t,n[t])}))}return e}function px(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hx.apply(null,arguments)}const mx=o().forwardRef(((e,t)=>o().createElement("div",hx({ref:t},e))));function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vx.apply(null,arguments)}function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gx.apply(null,arguments)}mx.displayName="InputComponent";var yx=n(6091),bx=n.n(yx),xx=n(5635),Ex=n.n(xx);function Cx(){return Cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cx.apply(null,arguments)}const wx=e=>{const{children:t,selectProps:n,removeProps:r}=e;return o().createElement(bx(),{tabIndex:-1,label:t,className:n.classes.multiValue,classes:{label:n.classes.multiValue__label},onDelete:r.onClick,deleteIcon:o().createElement(Ex(),Cx({},e.removeProps,{style:{height:"18px",width:"18px",color:"rgba(0,0,0,0.38)",marginRight:"8px"}}))})};function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_x.apply(null,arguments)}wx.propTypes={children:rt().node,isFocused:rt().bool.isRequired,removeProps:rt().shape({onClick:rt().func.isRequired,onMouseDown:rt().func.isRequired,onTouchEnd:rt().func.isRequired}).isRequired,selectProps:rt().object.isRequired};const kx=e=>{const{innerProps:t,innerRef:n,children:r,isFocused:a,isSelected:i,label:l,selectProps:{classes:s}}=e;return o().createElement(Wf(),_x({className:f()(s.option,{[s["option--selected"]]:i}),ref:n,selected:a,component:"div"},t),o().createElement(vd,{value:l},o().createElement("div",{className:s["option--item"]},r)))};function Ox(){return Ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ox.apply(null,arguments)}kx.propTypes={children:rt().node,innerProps:rt().shape({id:rt().string.isRequired,key:rt().string,onClick:rt().func.isRequired,onMouseMove:rt().func.isRequired,onMouseOver:rt().func.isRequired,tabIndex:rt().number.isRequired}).isRequired,innerRef:rt().oneOfType([rt().oneOf([null]),rt().func,rt().shape({current:rt().any.isRequired})]),isFocused:rt().bool.isRequired,isSelected:rt().bool.isRequired,label:rt().string,selectProps:rt().shape({classes:rt().shape({option:rt().string,"option--selected":rt().string})})};const Sx={ClearIndicator:e=>{const{innerProps:t,selectProps:{classes:n}}=e;return o().createElement(Dd(),cx({},t,{className:n.clearIndicator,size:"large"}),o().createElement(sx(),null))},Control:e=>{const{children:t,innerProps:n,innerRef:r,selectProps:{classes:a,TextFieldProps:i={}}}=e;return o().createElement(dx(),hx({variant:"standard",fullWidth:!0},i,{InputProps:fx({inputComponent:mx},i.InputProps,{inputProps:fx({className:a.control,ref:r,children:t},n,i.inputProps)})}))},DropdownIndicator:e=>{const{innerProps:t,selectProps:{classes:n}}=e;return o().createElement(Dd(),vx({},t,{className:n.dropdownIndicator,size:"large"}),o().createElement(hv(),null))},GroupHeading:e=>{const{children:t,selectProps:{classes:n}}=e;return o().createElement(Xu(),{variant:"subtitle2",className:f()(n.groupHeading)},t)},Menu:e=>{const{selectProps:{classes:t},innerProps:n,innerRef:r,getStyles:a,children:i}=e;return o().createElement(Af(),gx({ref:r,style:a("menu",e),className:t.menu},n),i)},MultiValue:wx,NoOptionsMessage:e=>{const{selectProps:{classes:t},children:n}=e;return o().createElement(Xu(),{color:"textSecondary",className:t.noOptionsMessage},n)},Option:kx,Placeholder:e=>{const{selectProps:{classes:t},children:n}=e;return o().createElement(Xu(),{color:"textSecondary",className:t.placeholder},n)},SingleValue:e=>{const{selectProps:{classes:t},innerProps:n,children:r}=e;return o().createElement(Xu(),Ox({className:t.singleValue},n),r)},ValueContainer:e=>{const{selectProps:{classes:t},children:n,isMulti:r}=e;return o().createElement("div",{className:f()(t.valueContainer,{[t["valueContainer--multi"]]:r})},n)}};function Ax(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mx=qn((e=>({control:{display:"flex","&&":{padding:0},height:"auto"},valueContainer:{display:"flex",flexWrap:"nowrap",flex:1,alignItems:"center",overflow:"hidden",marginLeft:e.spacing(1)},"valueContainer--multi":{flexWrap:"wrap"},multiValue:{margin:e.spacing(.5,.5),maxWidth:"calc(100% - 8px)"},multiValue__label:{paddingRight:0,marginRight:12,maxWidth:"100%",overflow:"hidden"},noOptionsMessage:{padding:e.spacing(1,2)},singleValue:{fontSize:16,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},placeholder:{position:"absolute",left:6,bottom:10,fontSize:16},menu:{zIndex:40,marginTop:e.spacing(1)},clearIndicator:{},dropdownIndicator:{},groupHeading:{paddingLeft:"28px"},option:{fontWeight:400},"option--selected":{fontWeight:400},"option--item":{display:"block",width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"pre"}})));function Lx(){return Lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lx.apply(null,arguments)}function Px(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Rx(e,t,n[t])}))}return e}function Rx(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tx=e=>{function t(t){const{components:n,classes:r,error:a,TextFieldProps:i,innerRef:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["components","classes","error","TextFieldProps","innerRef"]),c=Mx(),u=Px({},Sx,n),d=((e,t)=>(0,p.union)(Object.keys(e),Object.keys(t)).reduce(((n,r)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Ax(e,t,n[t])}))}return e}({},n,{[r]:f()(e[r],t[r])})),{}))(c,r);return o().createElement(e,Lx({ref:l,components:u,classes:d,TextFieldProps:Px({},i,{error:a})},s))}return t.displayName=`withMuiSkin(${e.displayName||e.name})`,t.defaultProps={components:{},classes:{}},t},Nx=Tx(ix),Ix=Tx((0,r.forwardRef)((function(e,t){var n=rx(e);return r.createElement(tx,(0,R.Z)({ref:t},n))}))),Dx=()=>null;var Fx=n(1884),jx=n.n(Fx);const Bx=o().createContext(null);Bx.displayName="PopupBoundariesContext";const zx=qn({popper:{borderRadius:"4px",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",backgroundColor:"#FFFFFF",margin:0,zIndex:1e4}});function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hx.apply(null,arguments)}const Ux=e=>{const{selectProps:{inputRef:t,menuIsOpen:n,inputValue:a},innerRef:i,children:l,innerProps:s}=e,[c,u]=(0,r.useState)("id");(0,r.useEffect)((()=>{u(((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))())}),[a]);const d=zx(),f=(0,r.useContext)(Bx),h=Boolean(null==f?void 0:f.element),m=h?f.element.clientWidth:window.innerWidth;return o().createElement(Df,{anchorEl:t.current,open:n,className:d.popper,key:c,modifiers:[{name:"preventOverflow",enabled:!0,options:{altAxis:!0,altBoundary:!0,tether:!1,boundary:h?f.element:document.body,padding:5}}],placement:"bottom-start"},o().createElement(Af(),Hx({ref:i,style:{minWidth:Math.min((0,p.prop)("clientWidth",t.current),m),maxWidth:Math.min(521,m)}},s),l))};Ux.propTypes={children:rt().oneOfType([rt().element,rt().array]).isRequired,selectProps:rt().shape({inputRef:rt().object.isRequired,menuIsOpen:rt().bool.isRequired,inputValue:rt().string}).isRequired,innerRef:rt().oneOfType([rt().oneOf([null]),rt().func,rt().shape({current:rt().any})]).isRequired,innerProps:rt().object.isRequired};const Vx=qn((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),Zx=e=>{const{selectProps:{onCreate:t,createLabel:n,inputValue:r,components:a,canCreateOption:i},children:l}=e,s=Vx();return o().createElement(Ux,e,l,n&&!(0,p.prop)("Group",a)&&i()&&o().createElement("span",{className:s.addLabel,onClick:()=>t(r)},o().createElement(jx(),{className:s.addIcon}),n))},Kx=qn({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"17px"}});function qx(){return qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qx.apply(null,arguments)}const Wx=e=>{const{selectProps:{menuIsOpen:t},innerProps:n,children:r}=e,a=Kx();return!t&&o().createElement(Xu(),qx({className:a.singleValue},n),r)};function $x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Gx(e,t,n[t])}))}return e}function Gx(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Wx.propTypes={children:rt().node,innerProps:rt().object};const Yx=qn({control:{height:"auto"},dropdownIndicator:{boxSizing:"content-box",transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),Xx={menu:e=>$x({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>$x({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>$x({},e,{padding:"0 0 8px 0"}),input:e=>$x({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>$x({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},Qx={menuList:e=>$x({},e,{padding:0})},Jx={input:e=>$x({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eE.apply(null,arguments)}function tE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){nE(e,t,n[t])}))}return e}function nE(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rE=e=>{let{value:t,label:n,options:a,getOptions:i,createLabel:l,height:c=46,onChange:u=p.identity,onCreate:d,canCreateOption:h=()=>Boolean(d),onClear:m=p.identity,components:v={},textFieldInputRef:g,TextFieldProps:y,classes:b={}}=e,x=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","options","getOptions","createLabel","height","onChange","onCreate","canCreateOption","onClear","components","textFieldInputRef","TextFieldProps","classes"]);const E=Yx({height:c}),[C,w]=(0,r.useState)(!1),_=(0,r.useRef)(null),k=i?Nx:Ix,O=(0,p.prop)("ClearIndicator",v)?{}:{IndicatorSeparator:Dx,ClearIndicator:Dx},S=d?(e,t)=>{d(e,t),w(!1)}:void 0,A=(0,p.prop)("Group",v)?Qx:{},M=(0,p.isEmpty)(n)?Jx:{},L=tE({},Xx,A,M),P=tE({},E,b);return o().createElement(k,eE({placeholder:"",defaultOptions:!0},x,{value:(0,p.defaultTo)(null,t),loadOptions:i,options:a,cacheOptions:!0,onChange:u,onCreate:S,onClear:m,createLabel:l,canCreateOption:h,classes:P,styles:L,components:tE({DropdownIndicator:gv,LoadingIndicator:Dx,SingleValue:Wx,Menu:Zx},O,v),menuPlacement:"auto",TextFieldProps:tE({},y,{label:n,variant:"filled",size:"small",classes:tE({},(0,p.prop)("classes",y),{root:f()(E.formControl,(0,p.path)(["classes","root"],y))}),inputProps:tE({},(0,p.prop)("inputProps",y)),InputProps:tE({},(0,p.prop)("InputProps",y),{classes:tE({},(0,p.path)(["InputProps","classes"],y),{root:f()(E.filledInputRoot,(0,p.path)(["InputProps","classes","root"],y)),underline:f()({[E.filledInputUnderline]:(0,s.isEmptyValue)(t)},(0,p.path)(["InputProps","classes","underline"],y)),focused:f()("focused",(0,p.path)(["InputProps","classes","focused"],y))})}),InputLabelProps:tE({},(0,p.prop)("InputLabelProps",y),{classes:tE({},(0,p.path)(["InputLabelProps","classes"],y),{root:f()(E.inputLabel,(0,p.path)(["InputLabelProps","classes","root"],y)),shrink:f()("shrink",(0,p.path)(["InputLabelProps","classes","shrink"],y))}),shrink:!(0,s.isEmptyValue)(t)||void 0}),ref:g||_}),inputRef:g||_,menuIsOpen:C,onMenuOpen:()=>w(!0),onMenuClose:()=>w(!1)}))};var oE=n(2614);Ed()(oE.Z,{insert:"head",singleton:!1});const aE=oE.Z.locals||{},iE=({hierarchyOptions:e,instanceId:t,onChange:n})=>{const a=(0,r.useMemo)((()=>e.map((({value:e,label:t})=>({value:e,label:t})))),[e]),i=(0,r.useMemo)((()=>a.find((e=>e.value===t))||a[0]),[a,t]),l=(0,r.useCallback)((e=>n(e.value)),[n]);return o().createElement(rE,{classes:{valueContainer:aE.valueContainer},className:aE.hierarchyTypeSelector,height:42,label:u().text("Hierarchy type"),value:i,options:a,onChange:l,TextFieldProps:{InputProps:{disableUnderline:!1,classes:{root:aE.filledInputRoot}}}})};var lE=n(3110);Ed()(lE.Z,{insert:"head",singleton:!1});const sE=lE.Z.locals||{},cE=({title:e,instanceId:t,onInstanceIdChange:n,hierarchyOptions:r,hasHierarchy:a})=>o().createElement("div",{className:sE.headerContainer},o().createElement(fv,{className:sE.header},o().createElement(iE,{instanceId:t,onChange:n,hierarchyOptions:r})),a&&o().createElement(fv,{title:e,className:sE.header})),uE=(0,r.memo)(cE);var dE=n(9367),fE=n.n(dE);const pE=qn({link:{textDecoration:"inherit",color:"inherit","&:visited":{textDecoration:"inherit",color:"inherit"}}}),hE=({to:e,children:t,onClick:n})=>{const r=pE();return o().createElement("a",{href:e,onClick:t=>{sp(t)&&e||!n||(n(),t.stopPropagation(),t.preventDefault())},className:r.link},t)},mE=qn((e=>({image:{width:"40px",height:"40px"},info:{marginLeft:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"pre",fontWeight:400,fontSize:"13px",lineHeight:"15px",color:e.palette.primary.main},secondaryLabel:{marginTop:"4px",fontWeight:400,fontSize:"10px",lineHeight:"12px",color:e.palette.text.secondary,whiteSpace:"pre",overflow:"hidden",textOverflow:"ellipsis"},link:{textDecoration:"none"},thirdRow:{display:"flex",overflow:"hidden",alignItems:"center",marginTop:"auto",paddingTop:"4px"},entityId:{display:"flex",overflow:"hidden",alignItems:"baseline",whiteSpace:"nowrap",fontWeight:400,fontSize:"12px",lineHeight:"16px"},entityIdLabel:{color:e.palette.text.secondary},entityIdValue:{marginLeft:"8px",color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis","&[aria-describedby]":{cursor:"pointer","&:hover":{textDecoration:"underline"}}}}))),vE=({entity:e,classes:t={},disableEntityLink:n=!1})=>{const a=mE(),{secondaryLabel:i,label:l}=t,c=(0,s.getLabel)(e.label),{secondaryLabel:d}=e,p=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,s.getEntityId)(e))}),[e]);return o().createElement(o().Fragment,null,o().createElement(nd,{entity:e,imageClassName:a.image}),o().createElement("div",{className:a.info},o().createElement(up,{value:(0,s.getEntityUriForLink)(e),className:a.link,disabled:n},o().createElement(vd,{value:c,placement:"top",showOnExceededHeight:!0},o().createElement("div",{className:f()(a.label,l)},c))),d&&o().createElement(vd,{value:d,placement:"top",showOnExceededHeight:!0},o().createElement("div",{className:f()(a.secondaryLabel,i)},d)),o().createElement("div",{className:a.thirdRow},o().createElement(bd,{entity:e,size:"medium"}),o().createElement("div",{className:a.entityId,onClick:p},o().createElement("div",{className:a.entityIdLabel},u().text("ID:")),o().createElement(vd,{value:`Copy to clipboard ${(0,s.getEntityId)(e)}`,placement:"top"},o().createElement("div",{className:a.entityIdValue},(0,s.getEntityId)(e)))))))},gE=qn({"@keyframes keyframes-wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},wave:{overflow:"hidden",position:"relative","&:after":{top:"0",left:"0",right:"0",bottom:"0",content:'""',position:"absolute",animation:"$keyframes-wave 1.6s linear 0.5s infinite",transform:"translateX(-100%)",background:"linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);"}},avatar:{flex:"none",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.11)"},info:{marginLeft:"12px",flex:"auto"},label:{width:"40%",height:"15px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},secondaryLabel:{marginTop:"4px",width:"100%",height:"12px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},thirdRow:{marginTop:"4px",width:"60%",height:"24px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"}}),yE=()=>{const e=gE();return o().createElement(o().Fragment,null,o().createElement("div",{"data-reltio-id":"profile-card-placeholder-avatar",className:f()(e.avatar,e.wave)}),o().createElement("div",{"data-reltio-id":"profile-card-placeholder-info",className:e.info},o().createElement("div",{className:f()(e.label,e.wave)}),o().createElement("div",{className:f()(e.secondaryLabel,e.wave)}),o().createElement("div",{className:f()(e.thirdRow,e.wave)})))},bE=qn({container:{display:"flex",padding:"16px",overflow:"hidden"}});function xE(){return xE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xE.apply(null,arguments)}const EE=e=>{let{entity:t,classes:n={},variant:r="normal",disableEntityLink:a=!1}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["entity","classes","variant","disableEntityLink"]);const l=bE(),{container:s}=n;return o().createElement("div",xE({className:f()(l.container,s)},i),"normal"===r?o().createElement(vE,{entity:t,classes:n,disableEntityLink:a}):o().createElement(yE,null))},CE=(0,r.memo)(EE),wE=qn((e=>({link:{cursor:"pointer",color:e.palette.primary.main,lineHeight:"15px",wordBreak:"break-word",whiteSpace:"break-spaces"},selected:{fontWeight:"bold"},popper:{maxWidth:"345px",minWidth:"200px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}}))),_E=({title:e,isSelected:t,entityUri:n,anchorEl:a,withEntityDetails:i=!0,classNames:l})=>{const c=wE(),{generateEntityUrl:u}=(0,r.useContext)(lp),d=L("openEntity"),p=w(),{isLoading:h,entityDetails:m,showEntityDetails:v,hideEntityDetails:g}=(e=>{const[t,n]=(0,r.useState)(null),[o,a]=(0,r.useState)(!1),i=Yd(),l=(0,r.useCallback)((()=>i(Promise.resolve())),[i]),c=O(),u=C((e=>e.showMasking)),d=(0,r.useMemo)((()=>(0,s.addGetEntityMaskingOptions)(c,{showMasking:u,showAccess:!1})),[c,u]),f=(0,r.useCallback)((0,s.debounce)((()=>{a(!0),i((0,s.getEntity)(e,d)).then(n).catch((e=>{console.warn("Failed to load entity",e)})).finally((()=>a(!1)))}),1e3),[e,i,d]),p=(0,r.useCallback)((()=>{l(),f.cancel(),a(!1),n(null)}),[f,l]);return(0,r.useEffect)((()=>()=>f.cancel()),[]),{isLoading:o,entityDetails:t,showEntityDetails:f,hideEntityDetails:p}})(n),y=u({uiPath:p,uri:n}),b=Boolean(a)&&(Boolean(m)||h),x=(0,r.useCallback)((()=>{d({uri:n})}),[d,n]);return o().createElement(o().Fragment,null,o().createElement("span",{"data-reltio-id":"reltio-hierarchy-node-title",className:f()(c.link,{[c.selected]:t},l),onMouseEnter:i?v:void 0,onMouseLeave:i?g:void 0},o().createElement(hE,{to:y,onClick:x},e)),o().createElement(Df,{anchorEl:a,className:c.popper,open:b,modal:!1,placement:"top-start"},o().createElement(CE,{entity:m,variant:h?"loading":"normal"})))};var kE=n(4055);function OE(){return OE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OE.apply(null,arguments)}const SE=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",OE({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"8",cy:"8",r:"7.2",fill:"#0072CE",fillOpacity:".25"}),o().createElement("path",{d:"M7.021 8.746l-.693.693c-.324-.33-.64-.76-.838-1.359l.837-.213c.142.402.358.692.694 1.016zM7.556 6L5.777 4.222 4 6h1.343c.009.36.035.684.084.963l.837-.214c-.031-.22-.055-.48-.058-.749h1.35zM12 6l-1.778-1.778L8.444 6H9.78c-.052 1.636-.576 2.08-1.137 2.571-.337.294-.68.608-.945.977a3.518 3.518 0 00-.56-.617l-.689.69c.435.397.728.724.728 1.468v2.022h.863V11.09c0-.858.306-1.124.836-1.602.646-.569 1.459-1.29 1.51-3.487h1.615z",fill:"#0072CE"}))};var AE=n(3872);Ed()(AE.Z,{insert:"head",singleton:!1});const ME=AE.Z.locals||{},LE=({data:e,entityId:t})=>{var n;const{label:a,hasManyParents:i,entityId:l}=e,c=t===l,u=(0,r.useRef)(null),d=(0,Er.useSelector)(wr().selectors.getAbsoluteImagePath),p=(0,Er.useSelector)(wr().selectors.getMetadata),h=(0,s.createEntityUriFromEntityId)(l),m=(0,r.useMemo)((()=>(({entityType:e,metadata:t,absoluteImagePath:n})=>{if(!e||!t||!n)return;const r=(0,s.getEntityType)(t,e),o=r?(0,s.getPropWithInheritance)(t,r,"typeGraphIcon"):null;if("string"!=typeof o||!o)return;const a=(0,s.getAbsoluteImageUrl)(n,o);return null!=a?a:void 0})({entityType:e.entityType,metadata:p,absoluteImagePath:d})),[d,e.entityType,p]);return o().createElement("div",{className:ME.container,"data-reltio-id":"hierarchy-tree-list-item",ref:u},o().createElement(td(),{className:ME.icon,src:null!=m?m:kE}),o().createElement(_E,{classNames:f()(ME.label,{[ME.currentEntity]:c}),title:(0,s.getLabel)(a),entityUri:h,isSelected:c,anchorEl:null!==(n=u.current)&&void 0!==n?n:void 0}),c&&o().createElement(fE(),{className:ME.icon,color:"primary"}),i&&o().createElement(SE,{className:ME.icon}))},PE=(0,r.memo)(LE);var RE=n(734);Ed()(RE.Z,{insert:"head",singleton:!1});const TE=RE.Z.locals||{},NE=({onImportHierarchy:e})=>o().createElement(_m,{LogoRenderer:wm.SELECT_ATTRIBUTES,text:u().text("Create your first hierarchy"),secondaryText:u().text("Create a hierarchy to define how this profile relates to other entities and visualise its structure."),variant:Cm.embedded},o().createElement("div",{className:TE.creationButtons},o().createElement(or(),{variant:"contained",color:"primary",onClick:e},u().text("Import Hierarchy"))));var IE=n(5670);Ed()(IE.Z,{insert:"head",singleton:!1});const DE=IE.Z.locals||{},FE=({config:e,instanceId:t,onInstanceIdChange:n})=>{const a=(0,Er.useSelector)(wr().selectors.getEntity),i=(0,s.getEntityId)(a),[l,c]=(0,r.useState)([]),{importTemplateUrl:d}=e,{hierarchyOptions:f,selectedInstanceId:h,hierarchyTitle:m,hierarchies:v,isLoading:g,errorMessage:y,reloadHierarchyList:b}=(({instanceId:e,onInstanceIdChange:t})=>{var n;const o=(0,Er.useSelector)(wr().selectors.getEntity),a=(0,Er.useSelector)(wr().selectors.getMetadata),i=(0,r.useContext)(Lm),l=Yd(),[c,d]=(0,r.useState)(null),[f,h]=(0,r.useState)(void 0),[m,v]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[b,x]=(0,r.useState)(null),E=(0,s.getEntityId)(o),C=null==o?void 0:o.type,w=(0,r.useMemo)((()=>{var e;if(f!==E)return[];const t=C?(0,s.getHierarchyTypesForEntityType)(a,C):null!==(e=null==a?void 0:a.hierarchyTypes)&&void 0!==e?e:[];return(({hierarchies:e=[],allowedHierarchyTypes:t})=>{const n=(0,p.fromPairs)(t.map((({uri:e,label:t})=>[e,null!=t?t:e]))),r=(0,p.map)((({uri:e})=>e),t),o=e.filter((({type:e})=>(0,p.includes)(e,r))),a=o.reduce(((e,{type:t})=>{var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e}),{});return o.map((({type:e,name:t,hierarchyId:r,singleInstanceId:o})=>{var i;const l=null!==(i=n[e])&&void 0!==i?i:e;return{value:o,label:a[e]>1?`${l} (${t||r||o})`:l,typeUri:e}}))})({hierarchies:null!=c?c:[],allowedHierarchyTypes:t})}),[C,a,c,f,E]),_=(0,r.useMemo)((()=>{var t,n,r,o;return null!==(t=null!==(n=null===(r=w.find((({value:t})=>t===e)))||void 0===r?void 0:r.value)&&void 0!==n?n:null===(o=w[0])||void 0===o?void 0:o.value)&&void 0!==t?t:null}),[w,e]),k=(0,r.useMemo)((()=>null==c?void 0:c.find((({singleInstanceId:e})=>e===_))),[c,_]),O=null!==(n=null==k?void 0:k.name)&&void 0!==n?n:u().text("Hierarchy"),S=(0,r.useCallback)((async()=>{if(!E)return null;y(!0),x(null);try{const e=await l((0,s.getHierarchyList)({entityId:E,signal:i}));return d(null!=e?e:[]),h(E),v(!0),null!=e?e:[]}catch(t){var e;if((0,s.isAbortError)(t))return;return console.warn("Failed to load hierarchy list",t),x(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:u().text("Failed to load hierarchy list")),null}finally{y(!1)}}),[E,l]);return(0,r.useEffect)((()=>{S()}),[S]),(0,r.useEffect)((()=>{m&&(v(!1),_&&_!==e&&t(_))}),[_,e,t,m]),{hierarchyOptions:w,selectedInstanceId:_,hierarchyTitle:O,hierarchies:c,reloadHierarchyList:S,isLoading:g,errorMessage:b}})({instanceId:t,onInstanceIdChange:n}),{treeData:x,isLoading:E,errorMessage:C,loadNodeChildren:w}=(({entityId:e,selectedInstanceId:t,setExpandedKeys:n,activenessDate:o})=>{const a=(0,r.useContext)(Lm),i=Yd(),l=Yd({cancelPrevious:!1}),[c,d]=(0,r.useState)([]),[f,h]=(0,r.useState)(!1),[m,v]=(0,r.useState)(null),g=(0,Er.useSelector)(wr().selectors.getMetadata),y=(0,Er.useSelector)(wr().selectors.getShowMasking)&&(0,s.hasAttributeMasking)(g),b=(0,r.useMemo)((()=>(0,p.isNil)(o)?void 0:new Date(o).toISOString()),[o]),x=(0,r.useMemo)((()=>Dm(c,e)),[e,c]),E=(0,r.useCallback)((async()=>{if(e&&t){h(!0),v(null);try{var r;const o=await i((0,s.getHierarchy)({instanceId:t,entityId:e,date:b,sendMasked:y,signal:a})),l=Nm(o),c=l?[l]:[];d(c);const u=Dm(c,e),f=u.length>0?u.flatMap((e=>e.map((({id:e})=>e)))):null!==(r=c[0])&&void 0!==r&&r.id?[c[0].id]:[];n(f)}catch(e){var o;if((0,s.isAbortError)(e))return;console.warn("Failed to load hierarchy tree",e),v(null!==(o=null==e?void 0:e.message)&&void 0!==o?o:u().text("Failed to load hierarchy"))}finally{h(!1)}}}),[b,e,t,i,y,n]),C=(0,r.useCallback)(((e,t)=>{d((n=>((e,t,n)=>Fm(e,(e=>e.id===t),(e=>e.isLoading===n?e:Pm({},e,{isLoading:n}))))(n,e,t)))}),[d]),w=(0,r.useCallback)(((e,t)=>{d((n=>((e,t,n)=>Fm(e,(e=>e.id===t),(e=>Pm({},e,{children:Im(e.children,n),pending:!1,isLoading:!1}))))(n,e,t)))}),[d]),_=(0,r.useCallback)((async e=>{const{entityId:n,id:r,label:o}=e;if(!t||!n)return!0;C(r,!0);try{var i;const e=await l((0,s.getHierarchyChildren)({instanceId:t,entityId:n,date:b,sendMasked:y,signal:a})),o=null!==(i=null==e?void 0:e.map(Nm).filter(Boolean))&&void 0!==i?i:[];return o.length>0?w(r,o):C(r,!1),!0}catch(e){if(C(r,!1),(0,s.isAbortError)(e))return;return console.warn("Failed to load hierarchy children view",e),Xn(e,{message:u().text("Failed to load children for node ${label}",{label:o})}),!1}}),[b,t,l,y,C,a,w]),k=(0,r.useCallback)((async e=>{await _(e)||n((t=>t.filter((t=>t!==e.id))))}),[_,n]);return(0,r.useEffect)((()=>{d([]),v(null),E()}),[E,t]),(0,r.useEffect)((()=>{if(!x.length)return;const e=x.map((e=>e[e.length-1])).filter((e=>Boolean(e))).filter((e=>e.pending&&!e.isLoading));e.forEach(k)}),[x,k]),{treeData:c,isLoading:f,errorMessage:m,pathToCurrentEntity:x,reload:E,updateChildren:w,setNodeLoading:C,loadNodeChildren:k}})({entityId:i,selectedInstanceId:h,setExpandedKeys:c}),{isOpen:_,open:k,close:O,setIsUploading:S}=(()=>{const[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1);return{isOpen:e,isUploading:n,open:(0,r.useCallback)((()=>{t(!0)}),[]),close:(0,r.useCallback)((()=>{t(!1)}),[]),setIsUploading:o}})(),A=(0,r.useCallback)((async(e,t)=>{c(e),t.pending&&!t.isLoading&&await w(t)}),[w]),M=(0,r.useCallback)((async e=>{const t=await b();if(null==t||!t.length)return;const r=e.createdInstances;if(!r||0===Object.keys(r).length)return;const o=Object.values(r).reduce(((e,t)=>e.concat(t)),[]),a=t.find((({singleInstanceId:e})=>o.includes(e)));a&&n(a.singleInstanceId)}),[n,b]),L=(0,r.useCallback)((({data:e})=>o().createElement(PE,{data:e,entityId:i})),[i]),P=g||E,R=null!=y?y:C,T=!P&&0===(null==v?void 0:v.length)&&0===(null==x?void 0:x.length)&&!R,N=(0,r.useMemo)((()=>P?o().createElement(o().Fragment,null,o().createElement(pm,null),o().createElement(_m,{LogoRenderer:wm.LOADING,text:u().text("Loading ..."),variant:Cm.embedded})):R?o().createElement(_m,{LogoRenderer:wm.ERROR,text:R,variant:Cm.embedded}):T?o().createElement(NE,{onImportHierarchy:k}):o().createElement("div",{className:DE.hierarchyTreeContainer},o().createElement(Wu,{data:x,LabelComponent:L,expandedKeys:l,onExpand:A}))),[P,R,T,x,l,A,L,k]);return o().createElement(Mm,{className:DE.hierarchyView},o().createElement(cm,{entity:a,onOpenDataImport:k}),o().createElement("div",{className:DE.hierarchyContainer},o().createElement(uE,{title:m,instanceId:h,onInstanceIdChange:n,hierarchyOptions:f,hasHierarchy:!T&&!P}),N),o().createElement(lv,{isOpen:_,onClose:O,onSuccess:M,templateUrl:d,onLoadingChange:S}))},jE=sr()({productionPrefix:"hierarchy",disableGlobal:!0,seed:"hier"}),BE=({config:e,instanceId:t,onInstanceIdChange:n})=>{const{SnackbarRenderer:a,showSnackbarMessage:i}=(({anchorOrigin:e={vertical:"bottom",horizontal:"center"},showDismiss:t,dismissTitle:n=u().text("Dismiss"),autoHideDuration:a=3e5,onDismissClick:i=p.identity}={})=>{const[l,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),[f,h]=(0,r.useState)(null),v=(0,r.useCallback)((()=>{s(!1),d(""),h(null)}),[]),g=(0,r.useCallback)(((e,t)=>{"clickaway"!==t&&v()}),[v]),y=(0,r.useCallback)((e=>{"object"==typeof e&&"message"in e&&"action"in e?(d(e.message),h(e.action)):(d(e),h(null)),s(!0)}),[]),b=(0,r.useCallback)((()=>{v(),i()}),[v,i]),x=(0,r.useCallback)((()=>{v(),null==f||f.onClick()}),[v,f]);return{SnackbarRenderer:(0,r.useCallback)((()=>o().createElement(m(),{container:document.body},o().createElement(ir(),{open:l,anchorOrigin:e,autoHideDuration:a,onClose:g,message:c,style:{maxWidth:500},action:t||f?o().createElement(o().Fragment,null,t&&o().createElement(or(),{color:"primary",onClick:b},n),f&&o().createElement(or(),{color:"primary",onClick:x},f.label)):void 0}))),[l,v,c,f]),showSnackbarMessage:y}})({autoHideDuration:15e3});return o().createElement(ur(),{generateClassName:jE},o().createElement(xr,{dateAdapter:vr},o().createElement(tr,null,o().createElement(nr.Provider,{value:i},o().createElement(FE,{instanceId:t,onInstanceIdChange:n,config:e}),o().createElement(a,null)))))}},4664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".ErrorSnackbar-closeIcon--i8bgi{color:#fff}",""]),i.locals={closeIcon:"ErrorSnackbar-closeIcon--i8bgi"};const l=i},5340:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".FileDropZone-root--MRBNT{cursor:pointer}.FileDropZone-active--CRRp6{background-color:rgba(0,114,206,.12)}",""]),i.locals={root:"FileDropZone-root--MRBNT",active:"FileDropZone-active--CRRp6"};const l=i},1552:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,'.ProfileBand-profileBandWrapper--SO4U7{box-shadow:0 1px 0 rgba(0,0,0,.12);flex-shrink:0;margin-bottom:1px}.ProfileBand-profileBand--arzRh{align-items:flex-start;background-color:#fff;display:flex;padding:16px 12px 16px 16px}.ProfileBand-profileBand--arzRh:after{content:"";font-size:0;min-height:inherit}.ProfileBand-inactive--DCQSZ{background:var(--mui-inactiveBackground)}.ProfileBand-profileIcon--sQyrJ{margin-right:12px}.ProfileBand-imageProfileIcon--ARcZw{height:48px;width:48px}.ProfileBand-profileInfo--kSnV3{display:flex;flex:1 1 50%;flex-direction:column}.ProfileBand-label--Sigpt{color:var(--mui-palette-text-primary);letter-spacing:.25px;line-height:1.2;white-space:break-spaces;word-break:break-word}.ProfileBand-label--Sigpt+.ProfileBand-specialInfo--bjxGx{margin-top:4px}.ProfileBand-secondaryLabel--tYf1j{color:var(--mui-palette-text-primary);display:inline-flex;font-size:14px;font-weight:400;line-height:16px;margin-top:2px;white-space:break-spaces}.ProfileBand-secondaryLabel--tYf1j+.ProfileBand-businessCard--sjn5N{margin-left:12px}.ProfileBand-businessCard--sjn5N{color:var(--mui-palette-text-secondary);display:inline-flex;font-size:14px;line-height:1.2;margin-top:4px;white-space:break-spaces}.ProfileBand-specialInfo--bjxGx{justify-content:space-between;margin-top:8px;width:100%}.ProfileBand-entityType--ndiVA,.ProfileBand-specialInfo--bjxGx{display:flex;flex-wrap:wrap}.ProfileBand-entityId--piIyT{color:var(--mui-palette-text-secondary);cursor:pointer;font-size:13px;white-space:nowrap}.ProfileBand-entityId--piIyT:hover{text-decoration:underline}',""]),i.locals={profileBandWrapper:"ProfileBand-profileBandWrapper--SO4U7",profileBand:"ProfileBand-profileBand--arzRh",inactive:"ProfileBand-inactive--DCQSZ",profileIcon:"ProfileBand-profileIcon--sQyrJ",imageProfileIcon:"ProfileBand-imageProfileIcon--ARcZw",profileInfo:"ProfileBand-profileInfo--kSnV3",label:"ProfileBand-label--Sigpt",specialInfo:"ProfileBand-specialInfo--bjxGx",secondaryLabel:"ProfileBand-secondaryLabel--tYf1j",businessCard:"ProfileBand-businessCard--sjn5N",entityType:"ProfileBand-entityType--ndiVA",entityId:"ProfileBand-entityId--piIyT"};const l=i},3628:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".ScreenProfileBand-profileBandNavigation--MVoc2{margin-bottom:10px}.ScreenProfileBand-navigationRow--0_3OP{align-items:center;display:flex;gap:8px}.ScreenProfileBand-comments--F3Q0N{display:flex;justify-content:flex-end}",""]),i.locals={profileBandNavigation:"ScreenProfileBand-profileBandNavigation--MVoc2",navigationRow:"ScreenProfileBand-navigationRow--0_3OP",comments:"ScreenProfileBand-comments--F3Q0N"};const l=i},734:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".HierarchyCreationScreen-creationButtons--BrOQz{align-items:center;display:flex;flex-direction:column;gap:16px;margin:24px 0}",""]),i.locals={creationButtons:"HierarchyCreationScreen-creationButtons--BrOQz"};const l=i},3110:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".HierarchyHeader-headerContainer--i8NFh{display:flex;flex-direction:column;margin-bottom:6px}.HierarchyHeader-header--qNYQr{align-items:center;box-shadow:0 1px 0 rgba(0,0,0,.12);display:flex;font-size:16px;justify-content:space-between}",""]),i.locals={headerContainer:"HierarchyHeader-headerContainer--i8NFh",header:"HierarchyHeader-header--qNYQr"};const l=i},3872:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".HierarchyTreeListItem-container--rAVHe{align-items:center;display:inline-flex;gap:8px;line-height:20px}.HierarchyTreeListItem-icon--G7Zhm{height:16px;width:16px}.HierarchyTreeListItem-label--IsA3m{align-items:center;color:var(--mui-palette-text-primary);display:inline-flex}.HierarchyTreeListItem-label--IsA3m:hover{color:var(--mui-palette-primary-main)}.HierarchyTreeListItem-currentEntity--qozy7{font-weight:600}",""]),i.locals={container:"HierarchyTreeListItem-container--rAVHe",icon:"HierarchyTreeListItem-icon--G7Zhm",label:"HierarchyTreeListItem-label--IsA3m",currentEntity:"HierarchyTreeListItem-currentEntity--qozy7"};const l=i},2614:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".HierarchyTypeSelector-hierarchyTypeSelector--EFdYu{min-width:200px;opacity:1}.HierarchyTypeSelector-filledInputRoot--tjx3E{border-radius:4px}.HierarchyTypeSelector-valueContainer--x4SaZ{margin-left:16px;width:auto}",""]),i.locals={hierarchyTypeSelector:"HierarchyTypeSelector-hierarchyTypeSelector--EFdYu",filledInputRoot:"HierarchyTypeSelector-filledInputRoot--tjx3E",valueContainer:"HierarchyTypeSelector-valueContainer--x4SaZ"};const l=i},1631:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".ImportHierarchyDialog-dialog--KNElF{width:600px}.ImportHierarchyDialog-dialogTitle--nRzF9{padding:16px 13px}.ImportHierarchyDialog-dialogContent--_RCJB{padding:20px 16px}.ImportHierarchyDialog-dialogActions--Dp5tZ{padding:40px 16px 10px 8px}.ImportHierarchyDialog-templateSection--RY8sL{align-items:center;background:var(--mui-palette-background-default);border-radius:6px;display:flex;justify-content:space-between;margin-bottom:16px;padding:16px}.ImportHierarchyDialog-templateInfo--YsnOJ{display:flex;flex-direction:column;gap:6px;max-width:334px}.ImportHierarchyDialog-templateDescription--r_Vor{color:var(--mui-palette-text-secondary);font-size:13px}.ImportHierarchyDialog-dropZone--xjrJo{flex-direction:column;gap:8px;padding-top:15px}.ImportHierarchyDialog-dropZone--xjrJo,.ImportHierarchyDialog-root--lCoU8{align-items:center;display:flex;justify-content:center}.ImportHierarchyDialog-root--lCoU8{box-sizing:border-box;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;height:100%;overflow:auto;padding:10px}.ImportHierarchyDialog-root--lCoU8,.ImportHierarchyDialog-root_embedded--gFubi{min-height:190px}.ImportHierarchyDialog-embedded--zWomL{flex-shrink:0;height:160px;width:160px}.ImportHierarchyDialog-textBox--fwubx{align-items:center;display:flex;flex-direction:column;margin-top:16px;max-width:500px}.ImportHierarchyDialog-text--wLm6G{color:var(--mui-palette-text-secondary);font-size:20px;font-weight:400;letter-spacing:.25px}.ImportHierarchyDialog-orDivider--_v4ci{align-items:center;display:flex;gap:12px;margin:24px 0}.ImportHierarchyDialog-dividerLine--xYGql{background:var(--mui-palette-divider);flex:1;height:1px}.ImportHierarchyDialog-orText--G1wqU{color:var(--mui-palette-text-secondary);font-size:12px;letter-spacing:1px}.ImportHierarchyDialog-fileRow--CaeI6{align-items:center;display:flex;gap:12px}.ImportHierarchyDialog-fileInput--xlMyv{display:none}.ImportHierarchyDialog-fileName--aRNwg{background:rgba(0,0,0,.03);border-radius:4px;color:var(--mui-palette-text-secondary);flex:1;font-size:14px;padding:10px 12px}.ImportHierarchyDialog-fileNameSelected--J74TU{color:var(--mui-palette-text-primary)}",""]),i.locals={dialog:"ImportHierarchyDialog-dialog--KNElF",dialogTitle:"ImportHierarchyDialog-dialogTitle--nRzF9",dialogContent:"ImportHierarchyDialog-dialogContent--_RCJB",dialogActions:"ImportHierarchyDialog-dialogActions--Dp5tZ",templateSection:"ImportHierarchyDialog-templateSection--RY8sL",templateInfo:"ImportHierarchyDialog-templateInfo--YsnOJ",templateDescription:"ImportHierarchyDialog-templateDescription--r_Vor",dropZone:"ImportHierarchyDialog-dropZone--xjrJo",root:"ImportHierarchyDialog-root--lCoU8",root_embedded:"ImportHierarchyDialog-root_embedded--gFubi",embedded:"ImportHierarchyDialog-embedded--zWomL",textBox:"ImportHierarchyDialog-textBox--fwubx",text:"ImportHierarchyDialog-text--wLm6G",orDivider:"ImportHierarchyDialog-orDivider--_v4ci",dividerLine:"ImportHierarchyDialog-dividerLine--xYGql",orText:"ImportHierarchyDialog-orText--G1wqU",fileRow:"ImportHierarchyDialog-fileRow--CaeI6",fileInput:"ImportHierarchyDialog-fileInput--xlMyv",fileName:"ImportHierarchyDialog-fileName--aRNwg",fileNameSelected:"ImportHierarchyDialog-fileNameSelected--J74TU"};const l=i},5670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),o=n.n(r),a=n(2609),i=n.n(a)()(o());i.push([e.id,".InternalHierarchyScreen-hierarchyView--iHF8w{background-color:var(--mui-palette-background-default);bottom:0;left:0;position:absolute;right:0;top:0}.InternalHierarchyScreen-hierarchyContainer--l1Wff,.InternalHierarchyScreen-hierarchyView--iHF8w{display:flex;flex-direction:column;overflow:hidden}.InternalHierarchyScreen-hierarchyContainer--l1Wff{background-color:var(--mui-palette-background-paper);border-radius:4px;box-shadow:1px 4px 4px 1px rgba(0,0,0,.25);flex:1 1 auto;margin:20px 16px 10px;min-height:0}.InternalHierarchyScreen-hierarchyTreeContainer--I28Q7{flex:1 1 auto;overflow:auto;padding:16px 0;width:100%}",""]),i.locals={hierarchyView:"InternalHierarchyScreen-hierarchyView--iHF8w",hierarchyContainer:"InternalHierarchyScreen-hierarchyContainer--l1Wff",hierarchyTreeContainer:"InternalHierarchyScreen-hierarchyTreeContainer--I28Q7"};const l=i},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(i[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&i[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},9601:e=>{"use strict";e.exports=function(e){return e[1]}},3463:(e,t,n)=>{"use strict";var r=n(8570),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),m=s(n),v=0;v<i.length;++v){var g=i[v];if(!(a[g]||r&&r[g]||m&&m[g]||l&&l[g])){var y=f(n,g);try{c(t,g,y)}catch(e){}}}}return t}},7677:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},857:(e,t,n)=>{var r=n(7772).Symbol;e.exports=r},3366:(e,t,n)=>{var r=n(857),o=n(2107),a=n(7157),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},1704:(e,t,n)=>{var r=n(2153),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2107:(e,t,n)=>{var r=n(857),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[l]=n:delete e[l]),o}},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},2153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},4073:(e,t,n)=>{var r=n(9259),o=n(1100),a=n(7642),i=Math.max,l=Math.min;e.exports=function(e,t,n){var s,c,u,d,f,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=c;return s=c=void 0,h=t,d=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||v&&e-h>=u}function x(){var e=o();if(b(e))return E(e);f=setTimeout(x,function(e){var n=t-(e-p);return v?l(n,u-(e-h)):n}(e))}function E(e){return f=void 0,g&&s?y(e):(s=c=void 0,d)}function C(){var e=o(),n=b(e);if(s=arguments,c=this,p=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(x,t),m?y(e):d}(p);if(v)return clearTimeout(f),f=setTimeout(x,t),y(p)}return void 0===f&&(f=setTimeout(x,t)),d}return t=a(t)||0,r(n)&&(m=!!n.leading,u=(v="maxWait"in n)?i(a(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=p=c=f=void 0},C.flush=function(){return void 0===f?d:E(o())},C}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),o=n(5125);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1100:(e,t,n)=>{var r=n(7772);e.exports=function(){return r.Date.now()}},2436:(e,t,n)=>{var r=n(4073),o=n(9259);e.exports=function(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),r(e,t,{leading:a,maxWait:t,trailing:i})}},7642:(e,t,n)=>{var r=n(1704),o=n(9259),a=n(4795),i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}},7320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in a=Object(arguments[s]))n.call(a,c)&&(l[c]=a[c]);if(t){i=t(a);for(var u=0;u<i.length;u++)r.call(a,i[u])&&(l[i[u]]=a[i[u]])}}return l}},7467:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.ForwardRef=u,t.isMemo=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case i:case a:case d:case f:return e;default:switch(e=e&&e.$$typeof){case c:case s:case u:case h:case p:case l:return e;default:return t}}case r:return t}}}(e)===p}},1818:(e,t,n)=>{"use strict";e.exports=n(7467)},4660:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(8156)),a=r(n(5099)),i=r(n(3627)),l=r(n(9233)),s=r(n(4294)),c=r(n(5751)),u=r(n(8310));function d(e){var t=e.classes,n=e.title,r=e.message;return o.default.createElement("div",null,o.default.createElement("span",{className:t.errorTitle},n),o.default.createElement("span",{className:t.errorMessage},r))}d.defaultProps={title:c.default.text("Error:"),message:c.default.text("Something was wrong"),classes:{}},d.propTypes={title:a.default.string,message:a.default.string,classes:a.default.object};var f=function(e){var t,n=e.error,r=e.onClose,a=e.style,f=e.classes,p=e.className,h=c.default.text("Close");if(o.default.isValidElement(n))t=n;else{var m=n||{},v=m.title,g=m.message;t=o.default.createElement(d,{classes:f,title:v,message:g})}return o.default.createElement("div",{className:(0,u.default)(f.errorBlock,p),style:a,"data-reltio-id":"error-message"},o.default.createElement("div",{className:f.descriptionBlock},t),o.default.createElement("div",{className:f.closeIconContainer},o.default.createElement(i.default,{title:h,placement:"bottom"},o.default.createElement(l.default,{onClick:r,"aria-label":h,size:"large"},o.default.createElement(s.default,null)))))};f.propTypes={id:a.default.oneOfType([a.default.string,a.default.number]),error:a.default.oneOfType([a.default.node,a.default.shape({title:a.default.string,message:a.default.string})]),style:a.default.object,onClose:a.default.func,className:a.default.oneOfType([a.default.string,a.default.object]),classes:a.default.object},f.defaultProps={classes:{}};var p=f;t.default=p},4176:(e,t,n)=>{"use strict";var r=n(1600),o=n(7425);t.ZP=void 0;var a=r(n(3100)),i=r(n(8870)),l=r(n(5297)),s=r(n(8230)),c=r(n(421)),u=r(n(1147)),d=r(n(6290)),f=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(8156)),p=r(n(5099)),h=n(7420),m=r(n(4660)),v=r(n(1230)),g=r(n(1444));function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}var b=function(e){(0,s.default)(o,e);var t,n,r=(t=o,n=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}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function o(e){var t;return(0,a.default)(this,o),t=r.call(this,e),(0,d.default)((0,l.default)(t),"processAutoCloseInterval",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.autoCloseInterval&&(t.timer&&(clearTimeout(t.timer),t.timer=null),e&&(t.timer=setTimeout((function(){t.handleCloseErrorMessage()}),t.autoCloseInterval)))})),o.$$instance=(0,l.default)(t),t.handleCloseErrorMessage=t.handleCloseErrorMessage.bind((0,l.default)(t)),t.state={errors:[]},t}return(0,i.default)(o,[{key:"handleCloseErrorMessage",value:function(){var e=this.state.errors,t=e.length;this.setState({errors:e.slice(0,t-1)}),this.processAutoCloseInterval(t>1)}},{key:"autoCloseInterval",get:function(){return 1e3*(this.props.autoCloseInterval||0)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.classes,r=this.state.errors,o=r.length,a=r[o-1];return f.default.createElement(h.TransitionGroup,null,Boolean(o)&&f.default.createElement(h.CSSTransition,{key:"errorMessage".concat(o),classNames:{enter:n.errorContainerEnter,enterActive:n.errorContainerEnterActive,exit:n.errorContainerExit,exitActive:n.errorContainerExitActive,appear:n.errorContainerEnter,appearActive:n.errorContainerEnterActive},timeout:{enter:600,exit:300}},f.default.createElement(m.default,{classes:n,onClose:this.handleCloseErrorMessage,error:a,className:t})))}}],[{key:"addError",value:function(e){o.$$instance&&(o.$$instance.setState({errors:o.$$instance.state.errors.concat(e)}),o.$$instance.processAutoCloseInterval())}}]),o}(f.PureComponent);b.propTypes={className:p.default.oneOfType([p.default.string,p.default.object]),classes:p.default.object,autoCloseInterval:p.default.number},b.defaultProps={classes:{}};var x=(0,v.default)(g.default)(b);t.ZP=x},1444:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(6290)),a="#FFFFFF";t.default=function(e){var t;return{errorContainer:{zIndex:2},errorContainerEnter:{opacity:0},errorContainerEnterActive:{opacity:1,transition:"opacity 600ms ease-in"},errorContainerExit:{opacity:1},errorContainerExitActive:{opacity:0,transition:"opacity 300ms ease-in"},errorBlock:(t={zIndex:2,color:a,position:"absolute",display:"flex",left:346,top:64,right:90,background:"linear-gradient(180deg, ".concat("#E54C4C"," 0%, ").concat("#F16262"," 100%)"),minHeight:48,justifyContent:"space-between",alignItems:"baseline",boxShadow:"0 0 24px 0 rgba(0,0,0,0.22)"},(0,o.default)(t,e.breakpoints.down("md"),{left:0,right:0}),(0,o.default)(t,e.breakpoints.down("lg"),{left:288,right:32}),(0,o.default)(t,e.breakpoints.down("xl"),{left:336,right:80}),(0,o.default)(t,e.breakpoints.up("xl"),{left:456,right:200}),t),descriptionBlock:{fontSize:13,padding:"20px 32px",alignSelf:"center",overflow:"hidden",textOverflow:"ellipsis"},errorTitle:{fontWeight:"bold",marginRight:7},errorMessage:{},closeIconContainer:{position:"relative","& button":{color:a,marginTop:5}}}}},6866:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case m:case s:return e;default:return t}}case o:return t}}}function C(e){return E(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=a,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||E(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===l||e===i||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=E},8570:(e,t,n)=>{"use strict";e.exports=n(6866)},7420:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CSSTransition:()=>_,ReplaceTransition:()=>T,SwitchTransition:()=>U,Transition:()=>E,TransitionGroup:()=>P,config:()=>d});var r=n(7896),o=n(1461),a=n(1665);function i(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}n(5099);var l=n(8156),s=n.n(l),c=n(7111),u=n.n(c);const d={disabled:!1},f=s().createContext(null);var p=function(e){return e.scrollTop},h="unmounted",m="exited",v="entering",g="entered",y="exiting",b=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=m,r.appearStatus=v):o=g:o=t.unmountOnExit||t.mountOnEnter?h:m,r.state={status:o},r.nextCallback=null,r}(0,a.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===h?{status:m}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==v&&n!==g&&(t=v):n!==v&&n!==g||(t=y)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===v){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:u().findDOMNode(this);n&&p(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===m&&this.setState({status:h})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[u().findDOMNode(this),r],a=o[0],i=o[1],l=this.getTimeouts(),s=r?l.appear:l.enter;!e&&!n||d.disabled?this.safeSetState({status:g},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,i),this.safeSetState({status:v},(function(){t.props.onEntering(a,i),t.onTransitionEnd(s,(function(){t.safeSetState({status:g},(function(){t.props.onEntered(a,i)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:u().findDOMNode(this);t&&!d.disabled?(this.props.onExit(r),this.safeSetState({status:y},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:m},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:m},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:u().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],i=o[1];this.props.addEndListener(a,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===h)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,o.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s().createElement(f.Provider,{value:null},"function"==typeof n?n(e,r):s().cloneElement(s().Children.only(n),r))},t}(s().Component);function x(){}b.contextType=f,b.propTypes={},b.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:x,onEntering:x,onEntered:x,onExit:x,onExiting:x,onExited:x},b.UNMOUNTED=h,b.EXITED=m,b.ENTERING=v,b.ENTERED=g,b.EXITING=y;const E=b;var C=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=i(n.className,r):n.setAttribute("class",i(n.className&&n.className.baseVal||"",r)));var n,r}))},w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1];t.removeClasses(o,"exit"),t.addClass(o,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.addClass(o,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.removeClasses(o,a),t.addClass(o,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}(0,a.Z)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&p(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,a=n.done;this.appliedClasses[t]={},r&&C(e,r),o&&C(e,o),a&&C(e,a)},n.render=function(){var e=this.props,t=(e.classNames,(0,o.Z)(e,["classNames"]));return s().createElement(E,(0,r.Z)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(s().Component);w.defaultProps={classNames:""},w.propTypes={};const _=w;var k=n(753);function O(e,t){var n=Object.create(null);return e&&l.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,l.isValidElement)(e)?t(e):e}(e)})),n}function S(e,t,n){return null!=n[t]?n[t]:e.props[t]}function A(e,t,n){var r=O(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var l={};for(var s in t){if(o[s])for(r=0;r<o[s].length;r++){var c=o[s][r];l[o[s][r]]=n(c)}l[s]=n(s)}for(r=0;r<a.length;r++)l[a[r]]=n(a[r]);return l}(t,r);return Object.keys(o).forEach((function(a){var i=o[a];if((0,l.isValidElement)(i)){var s=a in t,c=a in r,u=t[a],d=(0,l.isValidElement)(u)&&!u.props.in;!c||s&&!d?c||!s||d?c&&s&&(0,l.isValidElement)(u)&&(o[a]=(0,l.cloneElement)(i,{onExited:n.bind(null,i),in:u.props.in,exit:S(i,"exit",e),enter:S(i,"enter",e)})):o[a]=(0,l.cloneElement)(i,{in:!1}):o[a]=(0,l.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:S(i,"exit",e),enter:S(i,"enter",e)})}})),o}var M=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},L=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind((0,k.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}(0,a.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,O(n.children,(function(e){return(0,l.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:S(e,"appear",n),enter:S(e,"enter",n),exit:S(e,"exit",n)})}))):A(e,o,a),firstRender:!1}},n.handleExited=function(e,t){var n=O(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,r.Z)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,o.Z)(e,["component","childFactory"]),a=this.state.contextValue,i=M(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?s().createElement(f.Provider,{value:a},i):s().createElement(f.Provider,{value:a},s().createElement(t,r,i))},t}(s().Component);L.propTypes={},L.defaultProps={component:"div",childFactory:function(e){return e}};const P=L;var R=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}(0,a.Z)(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,a=s().Children.toArray(o)[t];if(a.props[e]&&(r=a.props)[e].apply(r,n),this.props[e]){var i=a.props.nodeRef?void 0:u().findDOMNode(this);this.props[e](i)}},n.render=function(){var e=this.props,t=e.children,n=e.in,r=(0,o.Z)(e,["children","in"]),a=s().Children.toArray(t),i=a[0],l=a[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,s().createElement(P,r,n?s().cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):s().cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(s().Component);R.propTypes={};const T=R;var N,I,D="out-in",F="in-out",j=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},B=((N={})[D]=function(e){var t=e.current,n=e.changeState;return s().cloneElement(t,{in:!1,onExited:j(t,"onExited",(function(){n(v,null)}))})},N[F]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,s().cloneElement(r,{in:!0,onEntered:j(r,"onEntered",(function(){n(v)}))})]},N),z=((I={})[D]=function(e){var t=e.children,n=e.changeState;return s().cloneElement(t,{in:!0,onEntered:j(t,"onEntered",(function(){n(g,s().cloneElement(t,{in:!0}))}))})},I[F]=function(e){var t=e.current,n=e.children,r=e.changeState;return[s().cloneElement(t,{in:!1,onExited:j(t,"onExited",(function(){r(g,s().cloneElement(n,{in:!0}))}))}),s().cloneElement(n,{in:!0})]},I),H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:g,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}(0,a.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===v&&e.mode===F?{status:v}:!t.current||((n=t.current)===(r=e.children)||s().isValidElement(n)&&s().isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:s().cloneElement(e.children,{in:!0})}:{status:y};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,a=o.status,i=o.current,l={children:n,current:i,changeState:this.changeState,status:a};switch(a){case v:e=z[r](l);break;case y:e=B[r](l);break;case g:e=i}return s().createElement(f.Provider,{value:{isMounting:!this.appeared}},e)},t}(s().Component);H.propTypes={},H.defaultProps={mode:D};const U=H},1837:(e,t,n)=>{"use strict";n(7320);var r=n(8156),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),t.Fragment=a("react.fragment")}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:i.current}}t.jsx=c,t.jsxs=c},2322:(e,t,n)=>{"use strict";e.exports=n(1837)},6475:(e,t)=>{"use strict";var n,r,o,a,i;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,s=null,c=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(c,0),e}},u=Date.now();t.unstable_now=function(){return Date.now()-u},n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(c,0))},r=function(e,t){s=setTimeout(e,t)},o=function(){clearTimeout(s)},a=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,f=window.Date,p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var v=f.now();t.unstable_now=function(){return f.now()-v}}var g=!1,y=null,b=-1,x=5,E=0;a=function(){return t.unstable_now()>=E},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<e?Math.floor(1e3/e):5};var C=new MessageChannel,w=C.port2;C.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();E=e+x;try{y(!0,e)?w.postMessage(null):(g=!1,y=null)}catch(e){throw w.postMessage(null),e}}else g=!1},n=function(e){y=e,g||(g=!0,w.postMessage(null))},r=function(e,n){b=p((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function _(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<S(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var a=2*(r+1)-1,i=e[a],l=a+1,s=e[l];if(void 0!==i&&0>S(i,n))void 0!==s&&0>S(s,i)?(e[r]=s,e[l]=n,r=l):(e[r]=i,e[a]=n,r=a);else{if(!(void 0!==s&&0>S(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],M=[],L=1,P=null,R=3,T=!1,N=!1,I=!1;function D(e){for(var t=k(M);null!==t;){if(null===t.callback)O(M);else{if(!(t.startTime<=e))break;O(M),t.sortIndex=t.expirationTime,_(A,t)}t=k(M)}}function F(e){if(I=!1,D(e),!N)if(null!==k(A))N=!0,n(j);else{var t=k(M);null!==t&&r(F,t.startTime-e)}}function j(e,n){N=!1,I&&(I=!1,o()),T=!0;var i=R;try{for(D(n),P=k(A);null!==P&&(!(P.expirationTime>n)||e&&!a());){var l=P.callback;if(null!==l){P.callback=null,R=P.priorityLevel;var s=l(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?P.callback=s:P===k(A)&&O(A),D(n)}else O(A);P=k(A)}if(null!==P)var c=!0;else{var u=k(M);null!==u&&r(F,u.startTime-n),c=!1}return c}finally{P=null,R=i,T=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||T||(N=!0,n(j))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(A)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,a,i){var l=t.unstable_now();if("object"==typeof i&&null!==i){var s=i.delay;s="number"==typeof s&&0<s?l+s:l,i="number"==typeof i.timeout?i.timeout:B(e)}else i=B(e),s=l;return e={id:L++,callback:a,priorityLevel:e,startTime:s,expirationTime:i=s+i,sortIndex:-1},s>l?(e.sortIndex=s,_(M,e),null===k(A)&&e===k(M)&&(I?o():I=!0,r(F,s-l))):(e.sortIndex=i,_(A,e),N||T||(N=!0,n(j))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=k(A);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},6062:(e,t,n)=>{"use strict";var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function i(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],o=0;o<e.length;o++){var l=e[o],s=t.base?l[0]+t.base:l[0],c=n[s]||0,u="".concat(s," ").concat(c);n[s]=c+1;var d=i(u),f={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:m(f,t),references:1}),r.push(u)}return r}function s(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t,n){var r=n.css,o=n.media,a=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,h=0;function m(e,t){var n,r,o;if(t.singleton){var a=h++;n=p||(p=s(t)),r=d.bind(null,n,a,!1),o=d.bind(null,n,a,!0)}else n=s(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=i(n[r]);a[o].references--}for(var s=l(e,t),c=0;c<n.length;c++){var u=i(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=s}}}},4055:(e,t,n)=>{"use strict";e.exports=n.p+"5271a9e7b6651c852e93.png"},1884:t=>{"use strict";t.exports=e},8282:e=>{"use strict";e.exports=t},5635:e=>{"use strict";e.exports=n},9367:e=>{"use strict";e.exports=r},4294:e=>{"use strict";e.exports=o},7517:e=>{"use strict";e.exports=a},9272:e=>{"use strict";e.exports=i},518:e=>{"use strict";e.exports=l},4179:e=>{"use strict";e.exports=s},866:e=>{"use strict";e.exports=c},8515:e=>{"use strict";e.exports=u},5743:e=>{"use strict";e.exports=d},1574:e=>{"use strict";e.exports=f},5206:e=>{"use strict";e.exports=p},2811:e=>{"use strict";e.exports=h},6091:e=>{"use strict";e.exports=m},251:e=>{"use strict";e.exports=v},6177:e=>{"use strict";e.exports=g},480:e=>{"use strict";e.exports=y},4635:e=>{"use strict";e.exports=b},4511:e=>{"use strict";e.exports=x},9233:e=>{"use strict";e.exports=E},9681:e=>{"use strict";e.exports=C},2004:e=>{"use strict";e.exports=w},3526:e=>{"use strict";e.exports=_},3222:e=>{"use strict";e.exports=k},4436:e=>{"use strict";e.exports=O},5788:e=>{"use strict";e.exports=S},1733:e=>{"use strict";e.exports=A},4596:e=>{"use strict";e.exports=M},7290:e=>{"use strict";e.exports=L},6038:e=>{"use strict";e.exports=P},3627:e=>{"use strict";e.exports=R},8759:e=>{"use strict";e.exports=T},7655:e=>{"use strict";e.exports=N},3962:e=>{"use strict";e.exports=I},9881:e=>{"use strict";e.exports=D},1230:e=>{"use strict";e.exports=F},8310:e=>{"use strict";e.exports=j},2308:e=>{"use strict";e.exports=B},2396:e=>{"use strict";e.exports=z},3192:e=>{"use strict";e.exports=H},5099:e=>{"use strict";e.exports=U},3288:e=>{"use strict";e.exports=V},8156:e=>{"use strict";e.exports=Z},7111:e=>{"use strict";e.exports=K},4756:e=>{"use strict";e.exports=q},5751:e=>{"use strict";e.exports=W},5297: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.__esModule=!0,e.exports.default=e.exports},3100:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},8870:(e,t,n)=>{var r=n(7739);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},6290:(e,t,n)=>{var r=n(7739);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},1147:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8230:(e,t,n)=>{var r=n(8560);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},1600:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},421:(e,t,n)=>{var r=n(7425).default,o=n(5297);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},8560:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8064:(e,t,n)=>{var r=n(7425).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},7739:(e,t,n)=>{var r=n(7425).default,o=n(8064);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(n){return e.exports=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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},753:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>r})},7896:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{Z:()=>r})},1665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8960);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.Z)(e,t)}},1461:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{Z:()=>r})},8960:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:()=>r})}},G={};function Y(e){var t=G[e];if(void 0!==t)return t.exports;var n=G[e]={id:e,exports:{}};return $[e](n,n.exports,Y),n.exports}return Y.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Y.d(t,{a:t}),t},Y.d=(e,t)=>{for(var n in t)Y.o(t,n)&&!Y.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),Y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Y.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;Y.g.importScripts&&(e=Y.g.location+"");var t=Y.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),Y.p=e})(),Y(355)})()}));
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@mui/icons-material/Add"),require("@mui/icons-material/ArrowDropDown"),require("@mui/icons-material/ArrowRight"),require("@mui/icons-material/BrokenImage"),require("@mui/icons-material/Business"),require("@mui/icons-material/Cancel"),require("@mui/icons-material/Check"),require("@mui/icons-material/CheckCircle"),require("@mui/icons-material/CheckCircleOutline"),require("@mui/icons-material/ChevronRight"),require("@mui/icons-material/Clear"),require("@mui/icons-material/Close"),require("@mui/icons-material/CloudUpload"),require("@mui/icons-material/Delete"),require("@mui/icons-material/Done"),require("@mui/icons-material/Edit"),require("@mui/icons-material/HighlightOff"),require("@mui/icons-material/KeyboardArrowDown"),require("@mui/icons-material/KeyboardArrowLeft"),require("@mui/icons-material/KeyboardArrowRight"),require("@mui/icons-material/KeyboardArrowUp"),require("@mui/icons-material/Link"),require("@mui/icons-material/LocalOffer"),require("@mui/icons-material/MoreVert"),require("@mui/icons-material/NavigateBefore"),require("@mui/icons-material/NavigateNext"),require("@mui/icons-material/RadioButtonUnchecked"),require("@mui/icons-material/Search"),require("@mui/icons-material/ViewCompact"),require("@mui/icons-material/Visibility"),require("@mui/icons-material/VisibilityOff"),require("@mui/material"),require("@mui/material/AppBar"),require("@mui/material/Autocomplete"),require("@mui/material/Avatar"),require("@mui/material/Box"),require("@mui/material/Button"),require("@mui/material/ButtonBase"),require("@mui/material/ButtonGroup"),require("@mui/material/Checkbox"),require("@mui/material/Chip"),require("@mui/material/CircularProgress"),require("@mui/material/Dialog"),require("@mui/material/DialogActions"),require("@mui/material/DialogContent"),require("@mui/material/DialogTitle"),require("@mui/material/Divider"),require("@mui/material/Fade"),require("@mui/material/FormControl"),require("@mui/material/FormControlLabel"),require("@mui/material/FormHelperText"),require("@mui/material/FormLabel"),require("@mui/material/Grid"),require("@mui/material/Grow"),require("@mui/material/IconButton"),require("@mui/material/Input"),require("@mui/material/InputAdornment"),require("@mui/material/InputBase"),require("@mui/material/LinearProgress"),require("@mui/material/Link"),require("@mui/material/List"),require("@mui/material/ListItem"),require("@mui/material/ListItemButton"),require("@mui/material/ListItemIcon"),require("@mui/material/ListItemText"),require("@mui/material/Menu"),require("@mui/material/MenuItem"),require("@mui/material/MenuList"),require("@mui/material/Paper"),require("@mui/material/Popover"),require("@mui/material/Popper"),require("@mui/material/Portal"),require("@mui/material/Radio"),require("@mui/material/RadioGroup"),require("@mui/material/Snackbar"),require("@mui/material/Tab"),require("@mui/material/Tabs"),require("@mui/material/TextField"),require("@mui/material/Toolbar"),require("@mui/material/Tooltip"),require("@mui/material/Typography"),require("@mui/material/Unstable_TrapFocus"),require("@mui/material/colors"),require("@mui/material/styles"),require("@mui/material/useMediaQuery"),require("@mui/material/utils"),require("@mui/styles/StylesProvider"),require("@mui/styles/createGenerateClassName"),require("@mui/styles/withStyles"),require("classnames"),require("mdm-module"),require("mdm-sdk"),require("moment"),require("prop-types"),require("ramda"),require("react"),require("react-dom"),require("react-redux"),require("ui-i18n"));else if("function"==typeof define&&define.amd)define(["@mui/icons-material/Add","@mui/icons-material/ArrowDropDown","@mui/icons-material/ArrowRight","@mui/icons-material/BrokenImage","@mui/icons-material/Business","@mui/icons-material/Cancel","@mui/icons-material/Check","@mui/icons-material/CheckCircle","@mui/icons-material/CheckCircleOutline","@mui/icons-material/ChevronRight","@mui/icons-material/Clear","@mui/icons-material/Close","@mui/icons-material/CloudUpload","@mui/icons-material/Delete","@mui/icons-material/Done","@mui/icons-material/Edit","@mui/icons-material/HighlightOff","@mui/icons-material/KeyboardArrowDown","@mui/icons-material/KeyboardArrowLeft","@mui/icons-material/KeyboardArrowRight","@mui/icons-material/KeyboardArrowUp","@mui/icons-material/Link","@mui/icons-material/LocalOffer","@mui/icons-material/MoreVert","@mui/icons-material/NavigateBefore","@mui/icons-material/NavigateNext","@mui/icons-material/RadioButtonUnchecked","@mui/icons-material/Search","@mui/icons-material/ViewCompact","@mui/icons-material/Visibility","@mui/icons-material/VisibilityOff","@mui/material","@mui/material/AppBar","@mui/material/Autocomplete","@mui/material/Avatar","@mui/material/Box","@mui/material/Button","@mui/material/ButtonBase","@mui/material/ButtonGroup","@mui/material/Checkbox","@mui/material/Chip","@mui/material/CircularProgress","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogContent","@mui/material/DialogTitle","@mui/material/Divider","@mui/material/Fade","@mui/material/FormControl","@mui/material/FormControlLabel","@mui/material/FormHelperText","@mui/material/FormLabel","@mui/material/Grid","@mui/material/Grow","@mui/material/IconButton","@mui/material/Input","@mui/material/InputAdornment","@mui/material/InputBase","@mui/material/LinearProgress","@mui/material/Link","@mui/material/List","@mui/material/ListItem","@mui/material/ListItemButton","@mui/material/ListItemIcon","@mui/material/ListItemText","@mui/material/Menu","@mui/material/MenuItem","@mui/material/MenuList","@mui/material/Paper","@mui/material/Popover","@mui/material/Popper","@mui/material/Portal","@mui/material/Radio","@mui/material/RadioGroup","@mui/material/Snackbar","@mui/material/Tab","@mui/material/Tabs","@mui/material/TextField","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@mui/material/Unstable_TrapFocus","@mui/material/colors","@mui/material/styles","@mui/material/useMediaQuery","@mui/material/utils","@mui/styles/StylesProvider","@mui/styles/createGenerateClassName","@mui/styles/withStyles","classnames","mdm-module","mdm-sdk","moment","prop-types","ramda","react","react-dom","react-redux","ui-i18n"],t);else{var n="object"==typeof exports?t(require("@mui/icons-material/Add"),require("@mui/icons-material/ArrowDropDown"),require("@mui/icons-material/ArrowRight"),require("@mui/icons-material/BrokenImage"),require("@mui/icons-material/Business"),require("@mui/icons-material/Cancel"),require("@mui/icons-material/Check"),require("@mui/icons-material/CheckCircle"),require("@mui/icons-material/CheckCircleOutline"),require("@mui/icons-material/ChevronRight"),require("@mui/icons-material/Clear"),require("@mui/icons-material/Close"),require("@mui/icons-material/CloudUpload"),require("@mui/icons-material/Delete"),require("@mui/icons-material/Done"),require("@mui/icons-material/Edit"),require("@mui/icons-material/HighlightOff"),require("@mui/icons-material/KeyboardArrowDown"),require("@mui/icons-material/KeyboardArrowLeft"),require("@mui/icons-material/KeyboardArrowRight"),require("@mui/icons-material/KeyboardArrowUp"),require("@mui/icons-material/Link"),require("@mui/icons-material/LocalOffer"),require("@mui/icons-material/MoreVert"),require("@mui/icons-material/NavigateBefore"),require("@mui/icons-material/NavigateNext"),require("@mui/icons-material/RadioButtonUnchecked"),require("@mui/icons-material/Search"),require("@mui/icons-material/ViewCompact"),require("@mui/icons-material/Visibility"),require("@mui/icons-material/VisibilityOff"),require("@mui/material"),require("@mui/material/AppBar"),require("@mui/material/Autocomplete"),require("@mui/material/Avatar"),require("@mui/material/Box"),require("@mui/material/Button"),require("@mui/material/ButtonBase"),require("@mui/material/ButtonGroup"),require("@mui/material/Checkbox"),require("@mui/material/Chip"),require("@mui/material/CircularProgress"),require("@mui/material/Dialog"),require("@mui/material/DialogActions"),require("@mui/material/DialogContent"),require("@mui/material/DialogTitle"),require("@mui/material/Divider"),require("@mui/material/Fade"),require("@mui/material/FormControl"),require("@mui/material/FormControlLabel"),require("@mui/material/FormHelperText"),require("@mui/material/FormLabel"),require("@mui/material/Grid"),require("@mui/material/Grow"),require("@mui/material/IconButton"),require("@mui/material/Input"),require("@mui/material/InputAdornment"),require("@mui/material/InputBase"),require("@mui/material/LinearProgress"),require("@mui/material/Link"),require("@mui/material/List"),require("@mui/material/ListItem"),require("@mui/material/ListItemButton"),require("@mui/material/ListItemIcon"),require("@mui/material/ListItemText"),require("@mui/material/Menu"),require("@mui/material/MenuItem"),require("@mui/material/MenuList"),require("@mui/material/Paper"),require("@mui/material/Popover"),require("@mui/material/Popper"),require("@mui/material/Portal"),require("@mui/material/Radio"),require("@mui/material/RadioGroup"),require("@mui/material/Snackbar"),require("@mui/material/Tab"),require("@mui/material/Tabs"),require("@mui/material/TextField"),require("@mui/material/Toolbar"),require("@mui/material/Tooltip"),require("@mui/material/Typography"),require("@mui/material/Unstable_TrapFocus"),require("@mui/material/colors"),require("@mui/material/styles"),require("@mui/material/useMediaQuery"),require("@mui/material/utils"),require("@mui/styles/StylesProvider"),require("@mui/styles/createGenerateClassName"),require("@mui/styles/withStyles"),require("classnames"),require("mdm-module"),require("mdm-sdk"),require("moment"),require("prop-types"),require("ramda"),require("react"),require("react-dom"),require("react-redux"),require("ui-i18n")):t(e["@mui/icons-material/Add"],e["@mui/icons-material/ArrowDropDown"],e["@mui/icons-material/ArrowRight"],e["@mui/icons-material/BrokenImage"],e["@mui/icons-material/Business"],e["@mui/icons-material/Cancel"],e["@mui/icons-material/Check"],e["@mui/icons-material/CheckCircle"],e["@mui/icons-material/CheckCircleOutline"],e["@mui/icons-material/ChevronRight"],e["@mui/icons-material/Clear"],e["@mui/icons-material/Close"],e["@mui/icons-material/CloudUpload"],e["@mui/icons-material/Delete"],e["@mui/icons-material/Done"],e["@mui/icons-material/Edit"],e["@mui/icons-material/HighlightOff"],e["@mui/icons-material/KeyboardArrowDown"],e["@mui/icons-material/KeyboardArrowLeft"],e["@mui/icons-material/KeyboardArrowRight"],e["@mui/icons-material/KeyboardArrowUp"],e["@mui/icons-material/Link"],e["@mui/icons-material/LocalOffer"],e["@mui/icons-material/MoreVert"],e["@mui/icons-material/NavigateBefore"],e["@mui/icons-material/NavigateNext"],e["@mui/icons-material/RadioButtonUnchecked"],e["@mui/icons-material/Search"],e["@mui/icons-material/ViewCompact"],e["@mui/icons-material/Visibility"],e["@mui/icons-material/VisibilityOff"],e["@mui/material"],e["@mui/material/AppBar"],e["@mui/material/Autocomplete"],e["@mui/material/Avatar"],e["@mui/material/Box"],e["@mui/material/Button"],e["@mui/material/ButtonBase"],e["@mui/material/ButtonGroup"],e["@mui/material/Checkbox"],e["@mui/material/Chip"],e["@mui/material/CircularProgress"],e["@mui/material/Dialog"],e["@mui/material/DialogActions"],e["@mui/material/DialogContent"],e["@mui/material/DialogTitle"],e["@mui/material/Divider"],e["@mui/material/Fade"],e["@mui/material/FormControl"],e["@mui/material/FormControlLabel"],e["@mui/material/FormHelperText"],e["@mui/material/FormLabel"],e["@mui/material/Grid"],e["@mui/material/Grow"],e["@mui/material/IconButton"],e["@mui/material/Input"],e["@mui/material/InputAdornment"],e["@mui/material/InputBase"],e["@mui/material/LinearProgress"],e["@mui/material/Link"],e["@mui/material/List"],e["@mui/material/ListItem"],e["@mui/material/ListItemButton"],e["@mui/material/ListItemIcon"],e["@mui/material/ListItemText"],e["@mui/material/Menu"],e["@mui/material/MenuItem"],e["@mui/material/MenuList"],e["@mui/material/Paper"],e["@mui/material/Popover"],e["@mui/material/Popper"],e["@mui/material/Portal"],e["@mui/material/Radio"],e["@mui/material/RadioGroup"],e["@mui/material/Snackbar"],e["@mui/material/Tab"],e["@mui/material/Tabs"],e["@mui/material/TextField"],e["@mui/material/Toolbar"],e["@mui/material/Tooltip"],e["@mui/material/Typography"],e["@mui/material/Unstable_TrapFocus"],e["@mui/material/colors"],e["@mui/material/styles"],e["@mui/material/useMediaQuery"],e["@mui/material/utils"],e["@mui/styles/StylesProvider"],e["@mui/styles/createGenerateClassName"],e["@mui/styles/withStyles"],e.classnames,e["mdm-module"],e["mdm-sdk"],e.moment,e["prop-types"],e.ramda,e.react,e["react-dom"],e["react-redux"],e["ui-i18n"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(e,t,n,r,a,o,i,l,s,u,c,d,p,f,m,h,g,v,y,b,x,w,E,C,S,O,k,A,P,T,D,M,_,I,N,R,L,j,F,V,B,H,z,U,Z,W,q,$,K,G,Y,X,Q,J,ee,te,ne,re,ae,oe,ie,le,se,ue,ce,de,pe,fe,me,he,ge,ve,ye,be,xe,we,Ee,Ce,Se,Oe,ke,Ae,Pe,Te,De,Me,_e,Ie,Ne,Re,Le,je,Fe,Ve,Be,He,ze,Ue,Ze){return(()=>{var We={3562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}},1429:(e,t,n)=>{"use strict";t.Z=function({controlled:e,default:t,name:n,state:a="value"}){const{current:o}=r.useRef(void 0!==e),[i,l]=r.useState(t);return[o?e:i,r.useCallback((e=>{o||l(e)}),[])]};var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(8156));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}},4713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(8156));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}var o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;t.default=o},8682:(e,t,n)=>{"use strict";var r=n(1600);t.Z=function(e){const t=a.useRef(e);return(0,o.default)((()=>{t.current=e})),a.useCallback(((...e)=>(0,t.current)(...e)),[])};var a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(8156)),o=r(n(4713));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}},7676:(e,t,n)=>{"use strict";var r=n(1600);t.Z=function(...e){return a.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{(0,o.default)(e,t)}))}),e)};var a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(8156)),o=r(n(3562));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}},5849:(e,t,n)=>{"use strict";t.Z=function(e){if(void 0!==i){const t=i();return null!=e?e:t}return function(e){const[t,n]=r.useState(e),a=e||t;return r.useEffect((()=>{null==t&&(o+=1,n(`mui-${o}`))}),[t]),a}(e)};var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(8156));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}let o=0;const i=r["useId".toString()]},6661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HierarchyScreen:()=>MH});var r=n(8156),a=n.n(r);const o="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect;var i=n(4616);const l=e=>{const t=r.createContext({value:{current:e},version:{current:-1},listeners:[]});var n;return t.Provider=(n=t.Provider,e=>{const t=r.useRef(e.value),a=r.useRef(0),l=r.useRef();return l.current||(l.current={value:t,version:a,listeners:[]}),o((()=>{t.current=e.value,a.current+=1,(0,i.unstable_runWithPriority)(i.unstable_NormalPriority,(()=>{l.current.listeners.forEach((t=>{t([a.current,e.value])}))}))}),[e.value]),r.createElement(n,{value:l.current},e.children)}),delete t.Consumer,t};var s=n(2396),u=n(5751),c=n.n(u),d=n(8310),p=n.n(d),f=n(3288),m=n(1733),h=n.n(m),g=n(4176);const v=(e,t)=>{const n=r.useContext(e),{value:{current:a},version:{current:i},listeners:l}=n,s=t(a),[u,c]=r.useReducer(((e,n)=>{if(!n)return[a,s];if(n[0]<=i)return y(e[1],s)?e:[a,s];try{if(y(e[0],n[1]))return e;const r=t(n[1]);return y(e[1],r)?e:[n[1],r]}catch(e){}return[e[0],e[1]]}),[a,s]);return y(u[1],s)||c(void 0),o((()=>(l.push(c),()=>{const e=l.indexOf(c);l.splice(e,1)})),[l]),u[1]},y="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},b=l({}),x=l({}),w=l({});function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){C(e,t,n[t])}))}return e}function C(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const S={},O=({dependentLookups:e,metadata:t,modifiedEntities:n,entityUri:r,relations:a,attributeValue:o,attributeType:i,hiddenAttributes:l=[]})=>{if(!(0,s.isDependentLookupAttrType)(i)||l.includes(i.uri))return null;const u=i.uri,d=(0,s.getDependentLookupsStructureNode)(e,u);if(d){const i=o.uri,{parents:u,missedParentsAttributeTypes:h}=(({dependentLookups:e,metadata:t,modifiedEntities:n,entityUri:r,relations:a,node:o,valueUri:i,hiddenAttributes:l})=>{var u;const c=o.parents.filter((e=>!l.includes(e))).flatMap((t=>{const n=(0,s.getDependentLookupsStructureNode)(e,t);return n.values.map((e=>E({},e,{type:t,dependentLookupCode:n.attrType.dependentLookupCode})))})),d=(0,s.getAllRelationsToAddAndEdit)(a),p=(0,s.filterRelatedParentValuesForDependentLookupValueUri)({parentValues:c,valueUri:i,entityUri:r,modifiedEntities:n,connections:d}),m=(0,f.pipe)(s.getAttributeValuePath,(0,f.defaultTo)([]),(0,f.map)((0,f.pipe)((0,f.path)(["valueType","uri"]),s.getBaseUri)),(0,f.prepend)(null===(u=n[r])||void 0===u?void 0:u.type),(0,f.reject)(f.isNil),f.uniq)({entityUri:r,entitiesMap:n,connections:d,metadata:t},i),h=o.parents.filter((e=>!l.includes(e))).filter((e=>m.some((0,s.areOneHierarchyUris)(e)))).map((t=>(0,s.getDependentLookupsStructureNode)(e,t).attrType)).filter((e=>!p.some((({type:t,value:n})=>n&&t===e.uri)))),g=Object.values(p.reduce(((e,t)=>{var n;const r=(e=>`${e.type}_${(0,s.getParentUri)(e.uri)}`)(t);return E({},e,{[r]:{type:t.dependentLookupCode,codeValues:(0,f.uniq)([t.value,...(null===(n=e[r])||void 0===n?void 0:n.codeValues)||[]]).filter(Boolean).sort()}})}),{})).filter((e=>!!e.codeValues.length));return{parents:g,missedParentsAttributeTypes:h}})({dependentLookups:e,metadata:t,modifiedEntities:n,entityUri:r,relations:a,valueUri:i,node:d,hiddenAttributes:l}),{isBlocked:g=!1}=(0,s.getDependentLookupEditorState)(e,i)||{},v=(p=h).length?c().text("Please select value for ${labels} ${attributes}.",{labels:(m=p.map((0,f.pipe)((0,f.prop)("label"),(e=>`'${e}'`))),m.reduce(((e,t,n)=>[e,t].join(n===m.length-1?` ${c().text("and")} `:", ")))),attributes:1===p.length?c().text("attribute"):c().text("attributes")}):"",y=!(null!=o&&o.lookupCode||null!=o&&o.value),b=y&&g&&c().text("Populating values...")||y&&v||"",x={parents:v?null:u,disabled:!!v&&y||g,placeholder:b};return b&&(x.value=null),((e,t)=>{const n=S[e];return(0,f.equals)(t,n)?n:((0,f.equals)(null==n?void 0:n.parents,t.parents)&&(t.parents=n.parents),S[e]=t,t)})(i,x)}var p,m},k=e=>v(x,e),A=()=>k((e=>e.absoluteImagePath)),P=()=>k((e=>e.uiPath)),T=()=>k((e=>e.attributesPresentation)),D=()=>k((e=>e.maxValuesInResponse)),M=()=>k((e=>e.entity)),_=()=>k((e=>{var t;return null===(t=e.entity)||void 0===t?void 0:t.uri})),I=()=>k((e=>e.mode)),N=()=>k((e=>(0,s.isViewMode)(e.mode))),R=()=>k((e=>e.historyEvent)),L=()=>k((e=>e.metadata)),j=()=>k((e=>{var t;return null===(t=e.user)||void 0===t?void 0:t.username})),F=()=>k((e=>{var t;return null===(t=e.tenant)||void 0===t?void 0:t.id})),V=()=>k((e=>e.searchNavigationData)),B=e=>k((t=>((e,t)=>t&&e[t])(t.modifiedEntities,e))),H=e=>k((t=>(0,s.getGlobalSearchRequestOptions)({activityFilter:t.activityFilter,globalFilter:t.globalFilter,searchOptions:t.searchOptions},e))),z=e=>v(b,(t=>t[e])),U=[],Z=()=>k((e=>e.controlAttributes||U)),W=()=>k((e=>e.showMasking));var q=n(1461),$=n(7896),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};const G="object"===("undefined"==typeof window?"undefined":K(window))&&"object"===("undefined"==typeof document?"undefined":K(document))&&9===document.nodeType;function Y(e){return Y="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},Y(e)}function X(e){var t=function(e){if("object"!=Y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:t+""}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,X(r.key),r)}}function J(e,t,n){return t&&Q(e.prototype,t),n&&Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var ee=n(1665),te=n(753),ne={}.constructor;function re(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(re);if(e.constructor!==ne)return e;var t={};for(var n in e)t[n]=re(e[n]);return t}function ae(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,a=re(t);return r.plugins.onCreateRule(e,a,n)||(e[0],null)}var oe=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},ie=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=oe(e[n]," ");else t=oe(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function le(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function se(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function ue(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var a=n.indent,o=void 0===a?0:a,i=t.fallbacks;!1===n.format&&(o=-1/0);var l=le(n),s=l.linebreak,u=l.space;if(e&&o++,i)if(Array.isArray(i))for(var c=0;c<i.length;c++){var d=i[c];for(var p in d){var f=d[p];null!=f&&(r&&(r+=s),r+=se(p+":"+u+ie(f)+";",o))}}else for(var m in i){var h=i[m];null!=h&&(r&&(r+=s),r+=se(m+":"+u+ie(h)+";",o))}for(var g in t){var v=t[g];null!=v&&"fallbacks"!==g&&(r&&(r+=s),r+=se(g+":"+u+ie(v)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+s+r+s),se(""+e+u+"{"+r,--o)+se("}",o)):r}var ce=/([[\].#*$><+~=|^:(),"'`\s])/g,de="undefined"!=typeof CSS&&CSS.escape,pe=function(e){return de?de(e):e.replace(ce,"\\$1")},fe=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,a=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:a&&(this.renderer=new a)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var a=t;n&&!1===n.process||(a=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==a||!1===a,i=e in this.style;if(o&&!i&&!r)return this;var l=o&&i;if(l?delete this.style[e]:this.style[e]=a,this.renderable&&this.renderer)return l?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,a),this;var s=this.options.sheet;return s&&s.attached,this},e}(),me=function(e){function t(t,n,r){var a;a=e.call(this,t,n,r)||this;var o=r.selector,i=r.scoped,l=r.sheet,s=r.generateId;return o?a.selectorText=o:!1!==i&&(a.id=s((0,te.Z)((0,te.Z)(a)),l),a.selectorText="."+pe(a.id)),a}(0,ee.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=ie(n))}return e},n.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?(0,$.Z)({},e,{allowEmpty:!0}):e;return ue(this.selectorText,this.style,n)},J(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;n&&t&&(t.setSelector(n,e)||t.replaceRule(n,this))}},get:function(){return this.selectorText}}]),t}(fe),he={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new me(e,t,n)}},ge={indent:1,children:!0},ve=/@([\w-]+)/,ye=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(ve);for(var a in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new ze((0,$.Z)({},n,{parent:this})),t)this.rules.add(a,t[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=ge);var t=le(e).linebreak;if(null==e.indent&&(e.indent=ge.indent),null==e.children&&(e.children=ge.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),be=/@container|@media|@supports\s+/,xe={onCreateRule:function(e,t,n){return be.test(e)?new ye(e,t,n):null}},we={indent:1,children:!0},Ee=/@keyframes\s+([\w-]+)/,Ce=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(Ee);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var a=n.scoped,o=n.sheet,i=n.generateId;for(var l in this.id=!1===a?this.name:pe(i(this,o)),this.rules=new ze((0,$.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,$.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=we);var t=le(e).linebreak;if(null==e.indent&&(e.indent=we.indent),null==e.children&&(e.children=we.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),Se=/@keyframes\s+/,Oe=/\$([\w-]+)/g,ke=function(e,t){return"string"==typeof e?e.replace(Oe,(function(e,n){return n in t?t[n]:e})):e},Ae=function(e,t,n){var r=e[t],a=ke(r,n);a!==r&&(e[t]=a)},Pe={onCreateRule:function(e,t,n){return"string"==typeof e&&Se.test(e)?new Ce(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&Ae(e,"animation-name",n.keyframes),"animation"in e&&Ae(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return ke(e,r.keyframes);default:return e}}},Te=function(e){function t(){return e.apply(this,arguments)||this}return(0,ee.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?(0,$.Z)({},e,{allowEmpty:!0}):e;return ue(this.key,this.style,n)},t}(fe),De={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new Te(e,t,n):null}},Me=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=le(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=ue(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return ue(this.at,this.style,e)},e}(),_e=/@font-face/,Ie={onCreateRule:function(e,t,n){return _e.test(e)?new Me(e,t,n):null}},Ne=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return ue(this.key,this.style,e)},e}(),Re={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Ne(e,t,n):null}},Le=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),je={"@charset":!0,"@import":!0,"@namespace":!0},Fe={onCreateRule:function(e,t,n){return e in je?new Le(e,t,n):null}},Ve=[he,xe,Pe,De,Ie,Re,Fe],Be={process:!0},He={force:!0,process:!0},ze=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,a=r.parent,o=r.sheet,i=r.jss,l=r.Renderer,s=r.generateId,u=r.scoped,c=(0,$.Z)({classes:this.classes,parent:a,sheet:o,jss:i,Renderer:l,generateId:s,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+pe(this.classes[d]));var p=ae(d,t,c);if(!p)return null;this.register(p);var f=void 0===c.index?this.index.length:c.index;return this.index.splice(f,0,p),p},t.replace=function(e,t,n){var r=this.get(e),a=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==a&&(o=(0,$.Z)({},n,{index:a})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof me?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Ce&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof me?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Ce&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Be);var a=this.options,o=a.jss.plugins,i=a.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var l=t.style;if(o.onUpdate(n,t,i,r),r.process&&l&&l!==t.style){for(var s in o.onProcessStyle(t.style,t,i),t.style){var u=t.style[s];u!==l[s]&&t.prop(s,u,He)}for(var c in l){var d=t.style[c],p=l[c];null==d&&d!==p&&t.prop(c,null,He)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,a=le(e).linebreak,o=0;o<this.index.length;o++){var i=this.index[o].toString(e);(i||r)&&(t&&(t+=a),t+=i)}return t},e}(),Ue=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,$.Z)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new ze(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var a=this.rules.add(e,t,n);return a?(this.options.jss.plugins.onProcessRule(a),this.attached?this.deployed?(r?r.push(a):(this.insertRule(a),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),a):a:(this.deployed=!1,a)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var a=this.rules.replace(e,t,n);return a&&this.options.jss.plugins.onProcessRule(a),this.attached?this.deployed?(this.renderer&&(a?r.renderable&&this.renderer.replaceRule(r.renderable,a):this.renderer.deleteRule(r)),a):a:(this.deployed=!1,a)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var a=this.addRule(r,e[r],t);a&&n.push(a)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Ze=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var a=this.registry.onCreateRule[r](e,t,n);if(a)return a}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var a=0;a<this.registry.onUpdate.length;a++)this.registry.onUpdate[a](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,a=0;a<this.registry.onChangeValue.length;a++)r=this.registry.onChangeValue[a](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),We=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,q.Z)(t,["attached"]),a=le(r).linebreak,o="",i=0;i<this.registry.length;i++){var l=this.registry[i];null!=n&&l.attached!==n||(o&&(o+=a),o+=l.toString(r))}return o},J(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),qe=new We,$e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Ke="2f1acc6c3a606b082e5eef5e54414ffb";null==$e[Ke]&&($e[Ke]=0);var Ge=$e[Ke]++,Ye=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var a="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(a=String(r.options.jss.id))),e.minify?""+(o||"c")+Ge+a+t:o+n.key+"-"+Ge+(a?"-"+a:"")+"-"+t}},Xe=function(e){var t;return function(){return t||(t=e()),t}},Qe=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},Je=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=ie(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var a=r?r.indexOf("!important"):-1,o=a>-1?r.substr(0,a-1):r;e.style.setProperty(t,o,a>-1?"important":"")}}catch(e){return!1}return!0},et=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},tt=function(e,t){return e.selectorText=t,e.selectorText===t},nt=Xe((function(){return document.querySelector("head")}));var rt=Xe((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),at=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},ot=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},it=function(){function e(e){this.getPropertyValue=Qe,this.setProperty=Je,this.removeProperty=et,this.setSelector=tt,this.hasInsertedRules=!1,this.cssRules=[],e&&qe.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,a=t.element;this.element=a||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=rt();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=function(e){var t=qe.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var a=function(e){for(var t=nt(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(a)return{parent:a.parentNode,node:a.nextSibling}}return!1}(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var a=n,o=a.parentNode;o&&o.insertBefore(e,a.nextSibling)}else nt().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,a=n;if("conditional"===e.type||"keyframes"===e.type){var o=ot(n,t);if(!1===(a=at(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,a)}return this.insertRules(r.rules,a),a}var i=e.toString();if(!i)return!1;var l=ot(n,t),s=at(n,i,l);return!1!==s&&(this.hasInsertedRules=!0,this.refCssRule(e,l,s),s)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ue&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),lt=0,st=function(){function e(e){this.id=lt++,this.version="10.10.0",this.plugins=new Ze,this.options={id:{minify:!1},createGenerateId:Ye,Renderer:G?it:null,plugins:[]},this.generateId=Ye({minify:!1});for(var t=0;t<Ve.length;t++)this.plugins.use(Ve[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,$.Z)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===qe.index?0:qe.index+1);var r=new Ue(e,(0,$.Z)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),qe.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=(0,$.Z)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var a=ae(e,t,r);return a&&this.plugins.onProcessRule(a),a},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),ut=function(e){return new st(e)},ct="object"==typeof CSS&&null!=CSS&&"number"in CSS;function dt(e){var t=null;for(var n in e){var r=e[n],a=typeof r;if("function"===a)t||(t={}),t[n]=r;else if("object"===a&&null!==r&&!Array.isArray(r)){var o=dt(r);o&&(t||(t={}),t[n]=o)}}return t}function pt(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const a=(0,$.Z)({},t);return Object.keys(n).forEach((e=>{n[e]&&(a[e]=`${t[e]} ${n[e]}`)})),a}ut();const ft={set:(e,t,n,r)=>{let a=e.get(t);a||(a=new Map,e.set(t,a)),a.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}},mt=ft,ht=r.createContext(null);function gt(){var e;const t=r.useContext(ht);return null!=(e=null==t?void 0:t.$$material)?e:t}var vt=n(5099),yt=n.n(vt);const bt="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",xt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var wt=Date.now(),Et="fnValues"+wt,Ct="fnStyle"+ ++wt;var St="@global",Ot=function(){function e(e,t,n){for(var r in this.type="global",this.at=St,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new ze((0,$.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),kt=function(){function e(e,t,n){this.type="global",this.at=St,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,(0,$.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),At=/\s*,\s*/g;function Pt(e,t){for(var n=e.split(At),r="",a=0;a<n.length;a++)r+=t+" "+n[a].trim(),n[a+1]&&(r+=", ");return r}var Tt=/\s*,\s*/g,Dt=/&/g,Mt=/\$([\w-]+)/g;var _t=/[A-Z]/g,It=/^ms-/,Nt={};function Rt(e){return"-"+e.toLowerCase()}const Lt=function(e){if(Nt.hasOwnProperty(e))return Nt[e];var t=e.replace(_t,Rt);return Nt[e]=It.test(t)?"-"+t:t};function jt(e){var t={};for(var n in e)t[0===n.indexOf("--")?n:Lt(n)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(jt):t.fallbacks=jt(e.fallbacks)),t}var Ft=ct&&CSS?CSS.px:"px",Vt=ct&&CSS?CSS.ms:"ms",Bt=ct&&CSS?CSS.percent:"%";function Ht(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var a in e)r[a]=e[a],r[a.replace(t,n)]=e[a];return r}var zt=Ht({"animation-delay":Vt,"animation-duration":Vt,"background-position":Ft,"background-position-x":Ft,"background-position-y":Ft,"background-size":Ft,border:Ft,"border-bottom":Ft,"border-bottom-left-radius":Ft,"border-bottom-right-radius":Ft,"border-bottom-width":Ft,"border-left":Ft,"border-left-width":Ft,"border-radius":Ft,"border-right":Ft,"border-right-width":Ft,"border-top":Ft,"border-top-left-radius":Ft,"border-top-right-radius":Ft,"border-top-width":Ft,"border-width":Ft,"border-block":Ft,"border-block-end":Ft,"border-block-end-width":Ft,"border-block-start":Ft,"border-block-start-width":Ft,"border-block-width":Ft,"border-inline":Ft,"border-inline-end":Ft,"border-inline-end-width":Ft,"border-inline-start":Ft,"border-inline-start-width":Ft,"border-inline-width":Ft,"border-start-start-radius":Ft,"border-start-end-radius":Ft,"border-end-start-radius":Ft,"border-end-end-radius":Ft,margin:Ft,"margin-bottom":Ft,"margin-left":Ft,"margin-right":Ft,"margin-top":Ft,"margin-block":Ft,"margin-block-end":Ft,"margin-block-start":Ft,"margin-inline":Ft,"margin-inline-end":Ft,"margin-inline-start":Ft,padding:Ft,"padding-bottom":Ft,"padding-left":Ft,"padding-right":Ft,"padding-top":Ft,"padding-block":Ft,"padding-block-end":Ft,"padding-block-start":Ft,"padding-inline":Ft,"padding-inline-end":Ft,"padding-inline-start":Ft,"mask-position-x":Ft,"mask-position-y":Ft,"mask-size":Ft,height:Ft,width:Ft,"min-height":Ft,"max-height":Ft,"min-width":Ft,"max-width":Ft,bottom:Ft,left:Ft,top:Ft,right:Ft,inset:Ft,"inset-block":Ft,"inset-block-end":Ft,"inset-block-start":Ft,"inset-inline":Ft,"inset-inline-end":Ft,"inset-inline-start":Ft,"box-shadow":Ft,"text-shadow":Ft,"column-gap":Ft,"column-rule":Ft,"column-rule-width":Ft,"column-width":Ft,"font-size":Ft,"font-size-delta":Ft,"letter-spacing":Ft,"text-decoration-thickness":Ft,"text-indent":Ft,"text-stroke":Ft,"text-stroke-width":Ft,"word-spacing":Ft,motion:Ft,"motion-offset":Ft,outline:Ft,"outline-offset":Ft,"outline-width":Ft,perspective:Ft,"perspective-origin-x":Bt,"perspective-origin-y":Bt,"transform-origin":Bt,"transform-origin-x":Bt,"transform-origin-y":Bt,"transform-origin-z":Bt,"transition-delay":Vt,"transition-duration":Vt,"vertical-align":Ft,"flex-basis":Ft,"shape-margin":Ft,size:Ft,gap:Ft,grid:Ft,"grid-gap":Ft,"row-gap":Ft,"grid-row-gap":Ft,"grid-column-gap":Ft,"grid-template-rows":Ft,"grid-template-columns":Ft,"grid-auto-rows":Ft,"grid-auto-columns":Ft,"box-shadow-x":Ft,"box-shadow-y":Ft,"box-shadow-blur":Ft,"box-shadow-spread":Ft,"font-line-height":Ft,"text-shadow-x":Ft,"text-shadow-y":Ft,"text-shadow-blur":Ft});function Ut(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ut(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var a in t)t[a]=Ut(a,t[a],n);else for(var o in t)t[o]=Ut(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var i=n[e]||zt[e];return!i||0===t&&i===Ft?t.toString():"function"==typeof i?i(t).toString():""+t+i}return t}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Wt(e,t){if(e){if("string"==typeof e)return Zt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(e,t):void 0}}function qt(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wt(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.")}()}var $t="",Kt="",Gt="",Yt="",Xt=G&&"ontouchstart"in document.documentElement;if(G){var Qt={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Jt=document.createElement("p").style;for(var en in Qt)if(en+"Transform"in Jt){$t=en,Kt=Qt[en];break}"Webkit"===$t&&"msHyphens"in Jt&&($t="ms",Kt=Qt.ms,Yt="edge"),"Webkit"===$t&&"-apple-trailing-word"in Jt&&(Gt="apple")}var tn=$t,nn=Kt,rn=Gt,an=Yt,on=Xt,ln={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===tn?"-webkit-"+e:nn+e)}},sn={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===tn?nn+"print-"+e:e)}},un=/[-\s]+(.)?/g;function cn(e,t){return t?t.toUpperCase():""}function dn(e){return e.replace(un,cn)}function pn(e){return dn("-"+e)}var fn,mn={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===tn){var n="mask-image";if(dn(n)in t)return e;if(tn+pn(n)in t)return nn+e}return e}},hn={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==rn||on?e:nn+e)}},gn={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:nn+e)}},vn={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:nn+e)}},yn={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===tn||"ms"===tn&&"edge"!==an?nn+e:e)}},bn={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===tn||"ms"===tn||"apple"===rn?nn+e:e)}},xn={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===tn?"WebkitColumn"+pn(e)in t&&nn+"column-"+e:"Moz"===tn&&"page"+pn(e)in t&&"page-"+e)}},wn={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===tn)return e;var n=e.replace("-inline","");return tn+pn(n)in t&&nn+n}},En={supportedProperty:function(e,t){return dn(e)in t&&e}},Cn={supportedProperty:function(e,t){var n=pn(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:tn+n in t?nn+e:"Webkit"!==tn&&"Webkit"+n in t&&"-webkit-"+e}},Sn={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===tn?""+nn+e:e)}},On={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===tn?nn+"scroll-chaining":e)}},kn={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},An={supportedProperty:function(e,t){var n=kn[e];return!!n&&tn+pn(n)in t&&nn+n}},Pn={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Tn=Object.keys(Pn),Dn=function(e){return nn+e},Mn={supportedProperty:function(e,t,n){var r=n.multiple;if(Tn.indexOf(e)>-1){var a=Pn[e];if(!Array.isArray(a))return tn+pn(a)in t&&nn+a;if(!r)return!1;for(var o=0;o<a.length;o++)if(!(tn+pn(a[0])in t))return!1;return a.map(Dn)}return!1}},_n=[ln,sn,mn,hn,gn,vn,yn,bn,xn,wn,En,Cn,Sn,On,An,Mn],In=_n.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Nn=_n.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,qt(t.noPrefill)),e}),[]),Rn={};if(G){fn=document.createElement("p");var Ln=window.getComputedStyle(document.documentElement,"");for(var jn in Ln)isNaN(jn)||(Rn[Ln[jn]]=Ln[jn]);Nn.forEach((function(e){return delete Rn[e]}))}function Fn(e,t){if(void 0===t&&(t={}),!fn)return e;if(null!=Rn[e])return Rn[e];"transition"!==e&&"transform"!==e||(t[e]=e in fn.style);for(var n=0;n<In.length&&(Rn[e]=In[n](e,fn.style,t),!Rn[e]);n++);try{fn.style[e]=""}catch(e){return!1}return Rn[e]}var Vn,Bn={},Hn={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},zn=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Un(e,t,n){return"var"===t?"var":"all"===t?"all":"all"===n?", all":(t?Fn(t):", "+Fn(n))||t||n}function Zn(e,t){var n=t;if(!Vn||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Bn[r])return Bn[r];try{Vn.style[e]=n}catch(e){return Bn[r]=!1,!1}if(Hn[e])n=n.replace(zn,Un);else if(""===Vn.style[e]&&("-ms-flex"===(n=nn+n)&&(Vn.style[e]="-ms-flexbox"),Vn.style[e]=n,""===Vn.style[e]))return Bn[r]=!1,!1;return Vn.style[e]="",Bn[r]=n,Bn[r]}G&&(Vn=document.createElement("p"));var Wn=n(2322);const qn=ut({plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=ae(e,{},n);return r[Ct]=t,r},onProcessStyle:function(e,t){if(Et in t||Ct in t)return e;var n={};for(var r in e){var a=e[r];"function"==typeof a&&(delete e[r],n[r]=a)}return t[Et]=n,e},onUpdate:function(e,t,n,r){var a=t,o=a[Ct];o&&(a.style=o(e)||{});var i=a[Et];if(i)for(var l in i)a.prop(l,i[l](e),r)}},{onCreateRule:function(e,t,n){if(!e)return null;if(e===St)return new Ot(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,8))return new kt(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,a=r?r[St]:null;if(a){for(var o in a)t.addRule(o,a[o],(0,$.Z)({},n,{selector:Pt(o,e.selector)}));delete r[St]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var a in r)if("@"===a[0]&&a.substr(0,7)===St){var o=Pt(a.substr(7),e.selector);t.addRule(o,r[a],(0,$.Z)({},n,{selector:o})),delete r[a]}}(e,t))}},function(){function e(e,t){return function(n,r){var a=e.getRule(r)||t&&t.getRule(r);return a?a.selector:r}}function t(e,t){for(var n=t.split(Tt),r=e.split(Tt),a="",o=0;o<n.length;o++)for(var i=n[o],l=0;l<r.length;l++){var s=r[l];a&&(a+=", "),a+=-1!==s.indexOf("&")?s.replace(Dt,i):i+" "+s}return a}function n(e,t,n){if(n)return(0,$.Z)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var a=(0,$.Z)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete a.name,a}return{onProcessStyle:function(r,a,o){if("style"!==a.type)return r;var i,l,s=a,u=s.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),p="@"===c[0];if(d||p){if(i=n(s,u,i),d){var f=t(c,s.selector);l||(l=e(u,o)),f=f.replace(Mt,l);var m=s.key+"-"+c;"replaceRule"in u?u.replaceRule(m,r[c],(0,$.Z)({},i,{selector:f})):u.addRule(m,r[c],(0,$.Z)({},i,{selector:f}))}else p&&u.addRule(c,{},i).addRule(s.key,r[c],{selector:s.selector});delete r[c]}}return r}}}(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=jt(e[t]);return e}return jt(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Lt(t);return t===r?e:(n.prop(r,e),null)}},function(e){void 0===e&&(e={});var t=Ht(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Ut(r,e[r],t);return e},onChangeValue:function(e,n){return Ut(n,e,t)}}}(),"undefined"==typeof window?null:function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var a=!1,o=Fn(n);o&&o!==n&&(a=!0);var i=!1,l=Zn(o,ie(r));l&&l!==r&&(i=!0),(a||i)&&(a&&delete t[n],t[o||n]=l||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===tn?e:"@"+nn+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Zn(t,ie(e))||e}}}(),(Yn=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(e,t){if("style"!==t.type)return e;for(var n={},r=Object.keys(e).sort(Yn),a=0;a<r.length;a++)n[r[a]]=e[r[a]];return n}})]}),$n=function(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,a=""===r?"":`${r}-`;let o=0;const i=()=>(o+=1,o);return(e,o)=>{const l=o.options.name;if(l&&0===l.indexOf("Mui")&&!o.options.link&&!t){if(-1!==xt.indexOf(e.key))return`Mui-${e.key}`;const t=`${a}${l}-${e.key}`;return o.options.theme[bt]&&""===r?`${t}-${i()}`:t}return`${a}${n}${i()}`}}(),Kn={disableGeneration:!1,generateClassName:$n,jss:qn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Gn=r.createContext(Kn);var Yn;let Xn=-1e9;function Qn(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Jn(e){if(!Qn(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=Jn(e[n])})),t}function er(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Qn(e)&&Qn(t)&&Object.keys(t).forEach((a=>{"__proto__"!==a&&(Qn(t[a])&&a in e&&Qn(e[a])?r[a]=er(e[a],t[a],n):n.clone?r[a]=Qn(t[a])?Jn(t[a]):t[a]:r[a]=t[a])})),r}function tr(e){if("string"!=typeof e)throw new Error(function(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}(7));return e.charAt(0).toUpperCase()+e.slice(1)}const nr=["variant"];function rr(e){return 0===e.length}const ar={},or=["name","classNamePrefix","Component","defaultTheme"];function ir({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:a},o){if(n.disableGeneration)return;let i=mt.get(n.sheetsManager,r,t);i||(i={refs:0,staticSheet:null,dynamicStyles:null},mt.set(n.sheetsManager,r,t,i));const l=(0,$.Z)({},r.options,n,{theme:t,flip:"boolean"==typeof n.flip?n.flip:"rtl"===t.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;const s=n.sheetsRegistry;if(0===i.refs){let e;n.sheetsCache&&(e=mt.get(n.sheetsCache,r,t));const o=r.create(t,a);e||(e=n.jss.createStyleSheet(o,(0,$.Z)({link:!1},l)),e.attach(),n.sheetsCache&&mt.set(n.sheetsCache,r,t,e)),s&&s.add(e),i.staticSheet=e,i.dynamicStyles=dt(o)}if(i.dynamicStyles){const t=n.jss.createStyleSheet(i.dynamicStyles,(0,$.Z)({link:!0},l));t.update(o),t.attach(),e.dynamicSheet=t,e.classes=pt({baseClasses:i.staticSheet.classes,newClasses:t.classes}),s&&s.add(t)}else e.classes=i.staticSheet.classes;i.refs+=1}function lr(e,t={}){const{name:n,classNamePrefix:a,Component:o,defaultTheme:i=ar}=t,l=(0,q.Z)(t,or),s=function(e){const t="function"==typeof e;return{create:(n,r)=>{let a;try{a=t?e(n):e}catch(e){throw e}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return a;const o=n.components[r].styleOverrides||{},i=n.components[r].variants||[],l=(0,$.Z)({},a);return Object.keys(o).forEach((e=>{l[e]=er(l[e]||{},o[e])})),i.forEach((e=>{const t=function(e){const{variant:t}=e,n=(0,q.Z)(e,nr);let r=t||"";return Object.keys(n).sort().forEach((t=>{r+="color"===t?rr(r)?e[t]:tr(e[t]):`${rr(r)?t:tr(t)}${tr(e[t].toString())}`})),r}(e.props);l[t]=er(l[t]||{},e.style)})),l},options:{}}}(e),u=n||a||"makeStyles";return s.options={index:(Xn+=1,Xn),name:n,meta:u,classNamePrefix:u},(e={})=>{const t=gt()||i,a=(0,$.Z)({},r.useContext(Gn),l),u=r.useRef(),c=r.useRef();!function(o,i){const l=r.useRef([]);let d;const p=r.useMemo((()=>({})),i);l.current!==p&&(l.current=p,d=(()=>{const r={name:n,state:{},stylesCreator:s,stylesOptions:a,theme:t};return ir(r,e),c.current=!1,u.current=r,()=>{!function({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const a=mt.get(n.sheetsManager,r,t);a.refs-=1;const o=n.sheetsRegistry;0===a.refs&&(mt.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(a.staticSheet),o&&o.remove(a.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),o&&o.remove(e.dynamicSheet))}(r)}})()),r.useEffect((()=>()=>{d&&d()}),[p])}(0,[t,s]),r.useEffect((()=>{c.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(u.current,e),c.current=!0}));const d=function({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let a=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,a=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,a=!0),a&&(e.cacheClasses.value=pt({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}(u.current,e.classes,o);return d}}const sr=lr((()=>({errorBlock:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",minHeight:"58px",left:0,right:0,width:"calc(100% - 64px)",maxWidth:"1280px",margin:"0 auto",zIndex:1e4}})));function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ur.apply(null,arguments)}const cr=g.ZP.addError,dr=e=>{let{showErrorFromStore:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["showErrorFromStore"]);const o=sr(),i=z("errorSet"),l=k((e=>e.autoCloseInterval)),s=k((e=>e.uiError));return(0,r.useEffect)((()=>{s&&t&&(dr.addError({title:c().text("Error"),message:s}),i(null))}),[i,s,t]),a().createElement(h(),{container:document.body},a().createElement(g.ZP,ur({classes:{errorBlock:p()(o.errorBlock,(0,f.path)(["classes","errorBlock"],n))},autoCloseInterval:l},n)))};dr.addError=cr;const pr=(e,t)=>{const{title:n=c().text("Error"),message:r,defaultMessage:a}=t||{};console.warn(e),dr.addError({title:n,message:r||(0,s.getRequestErrorMessage)(e,a)})};function fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){mr(e,t,n[t])}))}return e}function mr(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const hr=l({unmaskedAttributes:{},unmaskAttributeValue:void 0,maskAttributeValue:void 0,deleteUnmaskedAttributeForRelation:void 0}),gr=({children:e})=>{const[t,n]=(0,r.useState)({}),[o,i]=(0,r.useState)({}),[l,u]=(0,r.useState)(null),c=k((e=>e.profileLastLoadedTime)),d=k((e=>e.historyMode)),p=_(),f=R(),m=(0,r.useRef)(t);m.current=t,(0,r.useEffect)((()=>{n({})}),[c,f]),(0,r.useEffect)((()=>{i({}),u(null)}),[p]);const h=(0,r.useCallback)((async e=>{var t;if(!e){const e=null!=l?l:await(0,s.getEntity)(p);return l||u(e),e}const n=null!==(t=o[e])&&void 0!==t?t:await(0,s.getEntityTimeSlice)(p,e);return o[e]||i((t=>fr({},t,{[e]:n}))),n}),[p,o,l]),g=(0,r.useCallback)((async e=>{let t=await h(null==f?void 0:f.aStamp),n=(0,s.findAttributeValueByUri)(t,e);return n||(t=d===s.HistoryMode.Current?await h():await h(null==f?void 0:f.bStamp),n=(0,s.findAttributeValueByUri)(t,e),n)}),[h,null==f?void 0:f.aStamp,null==f?void 0:f.bStamp,d]),v=(0,r.useCallback)((async e=>{try{const t=m.current;if(t[e])return n((t=>fr({},t,{[e]:fr({},t[e],{isUnmasked:!0})}))),t[e].attributeValue;{n((t=>fr({},t,{[e]:fr({},t[e],{loading:!0})})));const t=f?await g(e):await(0,s.getUnmaskedAttributeValue)(e);return n((n=>fr({},n,{[e]:{attributeValue:t,isUnmasked:!0,loading:!1}}))),t}}catch(e){return pr(e),null}}),[f,g]),y=(0,r.useCallback)((e=>{n((t=>fr({},t,{[e]:fr({},t[e],{isUnmasked:!1})})))}),[]),b=(0,r.useCallback)((e=>{n((t=>{const n=fr({},t);for(const t in n)t.startsWith(e)&&delete n[t];return n}))}),[]);return a().createElement(hr.Provider,{value:{unmaskedAttributes:t,unmaskAttributeValue:v,maskAttributeValue:y,deleteUnmaskedAttributeForRelation:b}},e)},vr=a().createContext((()=>{}));vr.displayName="SnackbarContext";var yr=n(5206),br=n.n(yr),xr=n(4596),wr=n.n(xr),Er=n(9881),Cr=n.n(Er),Sr=n(3962),Or=n.n(Sr),kr=n(3192),Ar=n.n(kr);const Pr={Y:"year",YY:"year",YYYY:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Tr={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Dr=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join("\n");class Mr{constructor({locale:e,formats:t,instance:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=Pr,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasTimezonePlugin=()=>void 0!==this.moment.tz,this.createSystemDate=e=>{const t=this.moment(e).local();return void 0===this.locale?t:t.locale(this.locale)},this.createUTCDate=e=>{const t=this.moment.utc(e);return void 0===this.locale?t:t.locale(this.locale)},this.createTZDate=(e,t)=>{if(!this.hasTimezonePlugin())throw new Error(Dr);const n="default"===t?this.moment(e):this.moment.tz(e,t);return void 0===this.locale?n:n.locale(this.locale)},this.date=e=>{if(null===e)return null;const t=this.moment(e);return t.locale(this.getCurrentLocaleCode()),t},this.dateWithTimezone=(e,t)=>null===e?null:"UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),this.getTimezone=e=>{var t,n,r;if(e.isUTC())return"UTC";const a=null==(t=e._z)?void 0:t.name;return null!=(n=null!=a?a:null==(r=this.moment.defaultZone)?void 0:r.name)?n:"system"},this.setTimezone=(e,t)=>{var n,r;if("UTC"===t)return e.clone().utc();if("system"===t)return e.clone().local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(Dr)}const a="default"===t?null!=(n=null==(r=this.moment.defaultZone)?void 0:r.name)?n:"system":t,o=e.clone();return o.tz(a),o},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.moment(e,!0),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.locale?this.moment(e,t,this.locale,!0):this.moment(e,t,!0),this.getCurrentLocaleCode=()=>this.locale||Ar().locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(Ar().localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=e=>e.match(/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g).map((e=>{const t=e[0];return"L"===t||";"===t?Ar().localeData(this.getCurrentLocaleCode()).longDateFormat(e):e})).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.moment(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>{const n=e.clone();return n.locale(this.getCurrentLocaleCode()),n.format(t)},this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.moment(e).isSame(t),this.isSameYear=(e,t)=>e.isSame(t,"year"),this.isSameMonth=(e,t)=>e.isSame(t,"month"),this.isSameDay=(e,t)=>e.isSame(t,"day"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e.isAfter(t),this.isAfterYear=(e,t)=>e.isAfter(t,"year"),this.isAfterDay=(e,t)=>e.isAfter(t,"day"),this.isBefore=(e,t)=>e.isBefore(t),this.isBeforeYear=(e,t)=>e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>e.isBefore(t,"day"),this.isWithinRange=(e,[t,n])=>e.isBetween(t,n,null,"[]"),this.startOfYear=e=>e.clone().startOf("year"),this.startOfMonth=e=>e.clone().startOf("month"),this.startOfWeek=e=>e.clone().startOf("week"),this.startOfDay=e=>e.clone().startOf("day"),this.endOfYear=e=>e.clone().endOf("year"),this.endOfMonth=e=>e.clone().endOf("month"),this.endOfWeek=e=>e.clone().endOf("week"),this.endOfDay=e=>e.clone().endOf("day"),this.addYears=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"years"):e.clone().add(t,"years"),this.addMonths=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"months"):e.clone().add(t,"months"),this.addWeeks=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"weeks"):e.clone().add(t,"weeks"),this.addDays=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days"),this.addHours=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"hours"):e.clone().add(t,"hours"),this.addMinutes=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"minutes"):e.clone().add(t,"minutes"),this.addSeconds=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"seconds"):e.clone().add(t,"seconds"),this.getYear=e=>e.get("year"),this.getMonth=e=>e.get("month"),this.getDate=e=>e.get("date"),this.getHours=e=>e.get("hours"),this.getMinutes=e=>e.get("minutes"),this.getSeconds=e=>e.get("seconds"),this.getMilliseconds=e=>e.get("milliseconds"),this.setYear=(e,t)=>e.clone().year(t),this.setMonth=(e,t)=>e.clone().month(t),this.setDate=(e,t)=>e.clone().date(t),this.setHours=(e,t)=>e.clone().hours(t),this.setMinutes=(e,t)=>e.clone().minutes(t),this.setSeconds=(e,t)=>e.clone().seconds(t),this.setMilliseconds=(e,t)=>e.clone().milliseconds(t),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>e.clone().add(1,"month"),this.getPreviousMonth=e=>e.clone().subtract(1,"month"),this.getMonthArray=e=>{const t=[this.startOfYear(e)];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.mergeDateAndTime=(e,t)=>e.clone().hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>Ar().weekdaysShort(!0),this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.clone().startOf("month").startOf("week"),r=t.clone().endOf("month").endOf("week");let a=0,o=n;const i=[];for(;o.isBefore(r);){const e=Math.floor(a/7);i[e]=i[e]||[],i[e].push(o),o=o.clone().add(1,"day"),a+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const n=this.moment(e).startOf("year"),r=this.moment(t).endOf("year"),a=[];let o=n;for(;o.isBefore(r);)a.push(o),o=o.clone().add(1,"year");return a},this.getMeridiemText=e=>this.is12HourCycleInCurrentLocale()?Ar().localeData(this.getCurrentLocaleCode()).meridiem("am"===e?0:13,0,!1):"am"===e?"AM":"PM",this.moment=n||Ar(),this.locale=e,this.formats=(0,$.Z)({},Tr,t)}}var _r=n(7655);const Ir=["localeText"],Nr=r.createContext(null),Rr=function(e){var t;const{localeText:n}=e,a=(0,q.Z)(e,Ir),{utils:o,localeText:i}=null!=(t=r.useContext(Nr))?t:{utils:void 0,localeText:void 0},l=(0,_r.useThemeProps)({props:a,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:u,dateFormats:c,dateLibInstance:d,adapterLocale:p,localeText:f}=l,m=r.useMemo((()=>(0,$.Z)({},f,i,n)),[f,i,n]),h=r.useMemo((()=>{if(!u)return o||null;const e=new u({locale:p,formats:c,instance:d});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[u,p,c,d,o]),g=r.useMemo((()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null),[h]),v=r.useMemo((()=>({utils:h,defaultDates:g,localeText:m})),[g,h,m]);return(0,Wn.jsx)(Nr.Provider,{value:v,children:s})};var Lr=n(4756),jr=n(2308),Fr=n.n(jr);const Vr=function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}};Vr('\n.AssistantLoader_root__L29wd {\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbox-sizing: border-box;\n}\n\n.AssistantLoader_indicator__L29wd {\n\twidth: var(--size);\n\theight: var(--size);\n\tdisplay: block;\n\tobject-fit: contain;\n}\n\n.AssistantLoader_dotFlashing__L29wd {\n\tposition: absolute;\n\tleft: calc(var(--size) * 1.625);\n\tbottom: 20%;\n\ttransform: translateY(50%);\n\twidth: calc(var(--size) * 0.25);\n\theight: calc(var(--size) * 0.25);\n\tborder-radius: calc(var(--size) * 0.15625);\n\tbackground-color: var(--reltio-color-primary-soft);\n\tanimation: AssistantLoader_dotFlashing__L29wd 1s infinite linear alternate;\n\tanimation-delay: 0.5s;\n}\n\n.AssistantLoader_dotFlashing__L29wd::before,\n.AssistantLoader_dotFlashing__L29wd::after {\n\tcontent: "";\n\tposition: absolute;\n\ttop: 0;\n\tdisplay: block;\n\twidth: calc(var(--size) * 0.25);\n\theight: calc(var(--size) * 0.25);\n\tborder-radius: calc(var(--size) * 0.15625);\n\tbackground-color: var(--reltio-color-primary-soft);\n\tanimation: AssistantLoader_dotFlashing__L29wd 1s infinite alternate;\n}\n\n.AssistantLoader_dotFlashing__L29wd::before {\n\tleft: calc(var(--size) * -0.375);\n\tanimation-delay: 0s;\n}\n\n.AssistantLoader_dotFlashing__L29wd::after {\n\tleft: calc(var(--size) * 0.375);\n\tanimation-delay: 1s;\n}\n\n@keyframes AssistantLoader_dotFlashing__L29wd {\n\t0% {\n\t\tbackground-color: var(--reltio-color-primary-soft);\n\t}\n\t50%,\n\t100% {\n\t\tbackground-color: color-mix(\n\t\t\tin srgb,\n\t\t\tvar(--reltio-color-primary-soft) 20%,\n\t\t\ttransparent\n\t\t);\n\t}\n}\n');const Br=(...e)=>{const t=new Set;return e.forEach((e=>{if(!e)return;t.add(e);const n=e.split("__")[0];n&&n!==e&&t.add(`reltio_${n}`)})),Array.from(t).join(" ")},Hr=JSON.parse('{"root":"Button_root__L29wd","filled":"Button_filled__L29wd","outlined":"Button_outlined__L29wd","text":"Button_text__L29wd","primary":"Button_primary__L29wd","inherited":"Button_inherited__L29wd","small":"Button_small__L29wd","medium":"Button_medium__L29wd","large":"Button_large__L29wd","disabled":"Button_disabled__L29wd","fullWidth":"Button_fullWidth__L29wd"}');Vr('\n.Button_root__L29wd {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tborder: 0 solid transparent;\n\tborder-radius: 9999px;\n\tcursor: pointer;\n\tfont-family: "Roboto", sans-serif;\n\tfont-size: 16px;\n\tfont-weight: 500;\n\tline-height: 1.5;\n\tletter-spacing: 0.15px;\n\ttext-align: center;\n\ttext-decoration: none;\n\twhite-space: nowrap;\n\tuser-select: none;\n\ttransition: all 200ms ease;\n\tbox-sizing: border-box;\n\tbackground: none;\n\tmargin: 0;\n\tpadding: 0;\n\n\t&:focus-visible {\n\t\toutline: 2px solid var(--reltio-color-primary);\n\t\toutline-offset: 2px;\n\t}\n\n\t&:disabled,\n\t&[aria-disabled="true"] {\n\t\topacity: 0.38;\n\t\tcursor: not-allowed;\n\t\tpointer-events: none;\n\t}\n}\n\n/* Style: Filled */\n.Button_filled__L29wd {\n\tborder: none;\n}\n\n/* Style: Outlined */\n.Button_outlined__L29wd {\n\tbackground-color: transparent;\n\tborder: 1px solid;\n}\n\n/* Style: Text */\n.Button_text__L29wd {\n\tbackground-color: transparent;\n\tborder: none;\n}\n\n/* Filled + Primary */\n.Button_filled__L29wd.Button_primary__L29wd {\n\tbackground-color: var(--reltio-color-primary);\n\tcolor: var(--reltio-color-text-forced-white);\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-primary-hover);\n\t}\n}\n\n/* Filled + Inherited */\n.Button_filled__L29wd.Button_inherited__L29wd {\n\tbackground-color: var(--reltio-color-surface-2);\n\tcolor: var(--reltio-color-text);\n}\n\n[data-theme="dark"] .Button_filled__L29wd.Button_inherited__L29wd {\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n/* Outlined + Primary */\n.Button_outlined__L29wd.Button_primary__L29wd {\n\tborder-color: var(--reltio-color-primary);\n\tcolor: var(--reltio-color-primary);\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Outlined + Inherited */\n.Button_outlined__L29wd.Button_inherited__L29wd {\n\tborder-color: currentColor;\n\tcolor: inherit;\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Text + Primary */\n.Button_text__L29wd.Button_primary__L29wd {\n\tcolor: var(--reltio-color-primary);\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Text + Inherited */\n.Button_text__L29wd.Button_inherited__L29wd {\n\tcolor: inherit;\n\n\t&:hover {\n\t\tbackground-color: var(--reltio-color-surface-2);\n\t}\n}\n\n/* Size: Small */\n.Button_small__L29wd {\n\tmin-height: 32px;\n\tpadding: 8px 16px;\n\tfont-size: 0.875rem;\n}\n\n/* Size: Medium */\n.Button_medium__L29wd {\n\tmin-height: 40px;\n\tpadding: 12px 20px;\n}\n\n/* Size: Large */\n.Button_large__L29wd {\n\tmin-height: 48px;\n\tpadding: 16px 32px;\n}\n\n/* State: Disabled */\n.Button_disabled__L29wd {\n\topacity: 0.38;\n\tcursor: not-allowed;\n}\n\n/* Full Width */\n.Button_fullWidth__L29wd {\n\twidth: 100%;\n}\n');const zr=Hr,Ur=({variant:e="filled",color:t="inherited",size:n="medium",disabled:a=!1,fullWidth:o=!1,children:i,className:l,href:s,type:u="button",...c})=>{const d=(0,r.useRef)(null);(0,r.useEffect)((()=>{a&&d.current&&document.activeElement===d.current&&d.current.blur()}),[a]);const p=Br(zr.root,zr[e],zr[t],zr[n],a&&zr.disabled,o&&zr.fullWidth,l);return s?(0,Wn.jsx)("a",{ref:d,href:a?void 0:s,className:p,"aria-disabled":!!a||void 0,...c,children:i}):(0,Wn.jsx)("button",{ref:d,type:u,disabled:a,className:p,...c,children:i})};Vr('\n.Skeleton_skeletonRoot__L29wd {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.Skeleton_row__L29wd {\n\twidth: 100%;\n\theight: 16px;\n\tbackground-color: var(--reltio-color-surface-2);\n\toverflow: hidden;\n\tposition: relative;\n}\n\n.Skeleton_row__L29wd::before {\n\tcontent: "";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbottom: 0;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n\tanimation: Skeleton_indeterminate1__L29wd 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)\n\t\tinfinite;\n}\n\n.Skeleton_row__L29wd::after {\n\tcontent: "";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbottom: 0;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n\tanimation: Skeleton_indeterminate2__L29wd 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n\tanimation-delay: 1.15s;\n}\n\n@keyframes Skeleton_indeterminate1__L29wd {\n\t0% {\n\t\tleft: -35%;\n\t\tright: 100%;\n\t}\n\t60% {\n\t\tleft: 100%;\n\t\tright: -90%;\n\t}\n\t100% {\n\t\tleft: 100%;\n\t\tright: -90%;\n\t}\n}\n\n@keyframes Skeleton_indeterminate2__L29wd {\n\t0% {\n\t\tleft: -200%;\n\t\tright: 100%;\n\t}\n\t60% {\n\t\tleft: 107%;\n\t\tright: -8%;\n\t}\n\t100% {\n\t\tleft: 107%;\n\t\tright: -8%;\n\t}\n}\n');const Zr=JSON.parse('{"root":"Icon_root__L29wd","small":"Icon_small__L29wd","medium":"Icon_medium__L29wd","large":"Icon_large__L29wd","xlarge":"Icon_xlarge__L29wd","inherited":"Icon_inherited__L29wd","primary":"Icon_primary__L29wd","secondary":"Icon_secondary__L29wd","success":"Icon_success__L29wd","warning":"Icon_warning__L29wd","error":"Icon_error__L29wd"}');Vr("\n.Icon_root__L29wd {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex-shrink: 0;\n\twidth: 24px;\n\theight: 24px;\n}\n\n.Icon_small__L29wd {\n\twidth: 16px;\n\theight: 16px;\n}\n\n.Icon_medium__L29wd {\n\twidth: 24px;\n\theight: 24px;\n}\n\n.Icon_large__L29wd {\n\twidth: 32px;\n\theight: 32px;\n}\n\n.Icon_xlarge__L29wd {\n\twidth: 48px;\n\theight: 48px;\n}\n\n.Icon_inherited__L29wd {\n\tcolor: inherit;\n}\n\n.Icon_primary__L29wd {\n\tcolor: var(--reltio-color-primary);\n}\n\n.Icon_secondary__L29wd {\n\tcolor: var(--reltio-color-secondary);\n}\n\n.Icon_success__L29wd {\n\tcolor: var(--reltio-color-success);\n}\n\n.Icon_warning__L29wd {\n\tcolor: var(--reltio-color-warning);\n}\n\n.Icon_error__L29wd {\n\tcolor: var(--reltio-color-error);\n}\n");const Wr=Zr,qr=JSON.parse('{"root":"Chat_root__L29wd","userMessage":"Chat_userMessage__L29wd","userMessageSkeletonWrapper":"Chat_userMessageSkeletonWrapper__L29wd","scrollToBottom":"Chat_scrollToBottom__L29wd","lastMessageWrapper":"Chat_lastMessageWrapper__L29wd"}');Vr("\n.Chat_root__L29wd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\tbox-sizing: border-box;\n\toverflow: auto;\n\talign-items: start;\n\tpadding: 16px;\n\tgap: 16px;\n}\n\n.Chat_userMessage__L29wd {\n\tmargin-left: auto;\n\tmax-width: 80%;\n}\n\n.Chat_userMessageSkeletonWrapper__L29wd {\n\twidth: 40%;\n\tmargin-left: auto;\n}\n\n.Chat_scrollToBottom__L29wd {\n\tposition: sticky;\n\tbottom: 16px;\n\talign-self: center;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 36px;\n\theight: 36px;\n\tborder-radius: 50%;\n\tborder: none;\n\tbackground: var(--reltio-color-surface-1);\n\tbox-shadow: 0 2px 8px var(--reltio-color-shadow-2);\n\tcolor: var(--reltio-color-text-secondary);\n\tcursor: pointer;\n\ttransition: background 0.15s ease;\n\tflex-shrink: 0;\n}\n\n.Chat_scrollToBottom__L29wd:hover {\n\tbackground: var(--reltio-color-surface-2);\n}\n\n.Chat_scrollToBottom__L29wd:focus-visible {\n\toutline: 2px solid var(--reltio-color-primary-transparent-focus);\n\toutline-offset: 2px;\n}\n\n.Chat_lastMessageWrapper__L29wd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\talign-items: start;\n\tgap: 16px;\n\tmin-height: 100%;\n\twidth: 100%;\n}\n");const $r=qr,Kr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Wn.jsx)("svg",{className:Br(Wr.root,Wr[e],Wr[t],n),viewBox:"0 0 20 20",fill:"currentColor",...r,children:(0,Wn.jsx)("path",{d:"M8.25 14.4038V5.59625L12.6538 10L8.25 14.4038Z"})}),Gr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Wn.jsx)("svg",{className:Br(Wr.root,Wr[e],Wr[t],n),viewBox:"0 -960 960 960",fill:"currentColor",...r,children:(0,Wn.jsx)("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Yr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Wn.jsx)("svg",{className:Br(Wr.root,Wr[e],Wr[t],n),viewBox:"0 -960 960 960",fill:"currentColor",...r,children:(0,Wn.jsx)("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})}),Xr=({size:e="medium",color:t="inherited",className:n,...r})=>(0,Wn.jsx)("svg",{className:Br(Wr.root,Wr[e],Wr[t],n),viewBox:"0 -960 960 960",fill:"currentColor",...r,children:(0,Wn.jsx)("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})}),Qr=JSON.parse('{"root":"ErrorMessage_root__L29wd","text":"ErrorMessage_text__L29wd","iconWrapper":"ErrorMessage_iconWrapper__L29wd"}');Vr("\n.ErrorMessage_root__L29wd {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tgap: 8px;\n\tpadding: 12px 16px;\n\tbackground-color: var(--reltio-color-error-soft);\n\tborder: 1px solid var(--reltio-color-error);\n\tborder-radius: 8px;\n\tbox-sizing: border-box;\n}\n\n.ErrorMessage_text__L29wd {\n\tcolor: var(--reltio-color-error-font);\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tmargin: 0;\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.ErrorMessage_iconWrapper__L29wd {\n\tflex-shrink: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 20px;\n\theight: 20px;\n}\n\n.ErrorMessage_iconWrapper__L29wd svg {\n\twidth: 100%;\n\theight: 100%;\n}\n");const Jr=Qr,ea=({children:e,className:t,...n})=>(0,Wn.jsxs)("div",{className:Br(Jr.root,t),role:"alert","aria-live":"polite",...n,children:[(0,Wn.jsx)("span",{className:Br(Jr.iconWrapper),"aria-hidden":"true",children:(0,Wn.jsx)(Gr,{size:"small",color:"error"})}),(0,Wn.jsx)("p",{className:Br(Jr.text),children:e||"Something went wrong. Please try again."})]});var ta,na=32,ra=9,aa=13,oa=10,ia=96,la=126,sa=91,ua=94,ca=62,da=35,pa=37,fa=45,ma=61,ha=92,ga=42,va=95,ya=60,ba=64,xa=93,wa=33,Ea=38,Ca=58,Sa=102,Oa=104,ka=119,Aa=116,Pa=112,Ta=115,Da=160,Ma=44,_a=59,Ia=63,Na=46,Ra=47,La=39,ja=34,Fa=43,Va=124,Ba=123,Ha=125,za=40,Ua=41,Za=30,Wa=31,qa=48,$a=57,Ka=65,Ga=90,Ya=97,Xa=122,Qa=128,Ja=32,eo={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},to=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,no={class:"className",for:"htmlFor",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",classid:"classId",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",crossorigin:"crossOrigin",enctype:"encType",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",inputmode:"inputMode",keyparams:"keyParams",keytype:"keyType",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",novalidate:"noValidate",radiogroup:"radioGroup",readonly:"readOnly",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",viewbox:"viewBox"};function ro(e){var t={};for(var n in e){var r=n.toLowerCase(),a=no[r];if(a)t[a]=e[n];else{var o=n.indexOf(":");-1!==o?t[n.slice(0,o)+n[o+1].toUpperCase()+n.slice(o+2)]=e[n]:t[n]=e[n]}}return t}var ao=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function oo(e){return-1===e.indexOf("&")?e:e.replace(to,((e,t)=>{var n=function(e){if(!ta){if(!(typeof document<"u"))return;ta=document.createElement("textarea")}var t="&"+e+";";ta.innerHTML=t;var n=ta.value;return n!==t?n:void 0}(t);if(n)return n;if("#"===t[0]){var r="x"===t[1]||"X"===t[1]?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return 0===r||r>=55296&&r<=57343||r>1114111?"�":r<=65535?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10),56320+(r-65536&1023))}return e}))}var io=/(javascript|vbscript|data(?!:image)):/i;function lo(e){if(io.test(e))return null;if(-1===e.indexOf("%"))return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(io.test(t))return null}catch{return null}return e}var so,uo,co={};for(so=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],uo=0;uo<so.length;uo++)co[so[uo]]="a";for(co[231]=co[199]="c",co[240]=co[208]="d",so=[200,201,202,203,233,232,234,235],uo=0;uo<so.length;uo++)co[so[uo]]="e";for(so=[207,239,206,238,205,237,204,236],uo=0;uo<so.length;uo++)co[so[uo]]="i";for(co[209]=co[241]="n",so=[248,216,339,338,213,245,212,244,211,243,210,242],uo=0;uo<so.length;uo++)co[so[uo]]="o";for(so=[220,252,219,251,218,250,217,249],uo=0;uo<so.length;uo++)co[so[uo]]="u";function po(e){return e<Qa&&!!(bo[e]&(vo|yo))}function fo(e){for(var t="",n=-1,r=0;r<e.length;r++){var a=e.charCodeAt(r);if(po(a))a>=Ka&&a<=Ga?(n>=0&&(t+=e.slice(n,r),n=-1),t+=String.fromCharCode(a+Ja)):n<0&&(n=r);else if(a===na||a===fa)n>=0&&(t+=e.slice(n,r),n=-1),t+="-";else{n>=0&&(t+=e.slice(n,r),n=-1);var o=co[a];o&&(t+=o)}}return n>=0&&(t+=e.slice(n)),t}function mo(e,t,n){return e.startsWith(t,n)}co[376]=co[255]=co[221]=co[253]="y";var ho=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","circle","ellipse","line","path","polygon","polyline","rect","use","stop","animate","set"]);function go(e){let t=e.toLowerCase();if(ho.has(t))return!0;let n=t.indexOf(":");return-1!==n&&(t=t.slice(n+1),ho.has(t))}var vo=4,yo=8,bo=function(){let e,t=new Uint8Array(128);for(t[ra]=33,t[oa]=17,t[12]=1,t[aa]=17,t[na]=33,e=wa;e<=Ra;e++)t[e]=2;for(e=Ca;e<=ba;e++)t[e]=2;for(e=sa;e<=ia;e++)t[e]=2;for(e=Ba;e<=la;e++)t[e]=2;for(e=qa;e<=$a;e++)t[e]=yo;for(e=Ka;e<=Ga;e++)t[e]=64|vo;for(e=Ya;e<=Xa;e++)t[e]=vo;return t}(),xo=(function(){let e=new Uint8Array(128);e[ha]=2,e[sa]=4,e[ga]=e[va]=e[la]=e[ma]=3,e[ia]=e[ya]=e[ba]=e[xa]=e[oa]=e[na]=e[wa]=1,e[Sa]=e[Oa]=e[ka]=1}(),[]);function wo(e,t,n){for(var r=e,a=t.split("."),o=0;o<a.length&&(r=r?.[a[o]],void 0!==r);)o++;return r||n}function Eo(...e){return e.filter(Boolean).join(" ")}var Co=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),So=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function Oo(e){return Co.has(e.toLowerCase())}function ko(e){return So.lastIndex=0,e.replace(So,(function(e,t,n,r){return"<"+t+n+r}))}var Ao=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,Po=/^<[A-Z]/,To=["script","pre","style","textarea"],Do=new Set(To),Mo=/<(?:pre|script|style|textarea)\b/i,_o=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Io=new Uint8Array(128);!function(){for(var e=[ia,ga,va,la,ma,sa,wa,ya,ha,Wa,Oa,ka,Sa],t=0;t<e.length;t++)Io[e[t]]=1}();var No=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function Ro(e,t,n){for(var r=t,a=n;r<a&&(e.charCodeAt(r)===na||e.charCodeAt(r)===ra);)r++;if(r>=a)return!1;e.charCodeAt(r)===Va&&r++;for(var o=0;r<a;){for(;r<a&&(e.charCodeAt(r)===na||e.charCodeAt(r)===ra);)r++;if(r>=a)break;if(e.charCodeAt(r)===Va&&o>0){for(var i=r+1;i<a&&(e.charCodeAt(i)===na||e.charCodeAt(i)===ra);)i++;if(i>=a)return!0}if(e.charCodeAt(r)===Ca&&r++,r>=a||e.charCodeAt(r)!==fa)return!1;for(;r<a&&e.charCodeAt(r)===fa;)r++;for(r<a&&e.charCodeAt(r)===Ca&&r++,o++;r<a&&(e.charCodeAt(r)===na||e.charCodeAt(r)===ra);)r++;if(r<a){if(e.charCodeAt(r)!==Va)return!1;r++}}return o>0}function Lo(e,t){if(e.charCodeAt(t)!==ya)return null;let n=t+1,r=e.length,a=!1;e.charCodeAt(n)===Ra&&(n++,a=!0);let o=n,i=e.charCodeAt(n);if(!(i>=Ya&&i<=Xa||i>=Ka&&i<=Ga))return null;for(;n<r&&(e.charCodeAt(n)>=Ya&&e.charCodeAt(n)<=Xa||e.charCodeAt(n)>=Ka&&e.charCodeAt(n)<=Ga||e.charCodeAt(n)>=qa&&e.charCodeAt(n)<=$a||e.charCodeAt(n)===fa);)n++;let l=e.slice(o,n);if(!l)return null;let s=n;for(;n<r&&(e.charCodeAt(n)===na||e.charCodeAt(n)===ra||e.charCodeAt(n)===oa);)n++;let u=e.slice(s,n);if(n===s&&n<r){var c=e.charCodeAt(n);if(c!==ca&&c!==Ra)return null}let d=n,p={},f=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===ca)return{tag:l,attrs:p,selfClosing:!1,end:n+1,rawAttrs:e.slice(d,n),whitespaceBeforeAttrs:u,isClosing:a,hasSpaceBeforeSlash:f};if(t!==na&&t!==ra&&t!==oa){if(t===Ra&&n+1<r&&e.charCodeAt(n+1)===ca){let t=e.slice(d,n);return f=n>d&&e.charCodeAt(n-1)===na,{tag:l,attrs:p,selfClosing:!0,end:n+2,rawAttrs:t,whitespaceBeforeAttrs:u,isClosing:a,hasSpaceBeforeSlash:f}}var m=n,h=e.charCodeAt(n);if(!(h>=Ya&&h<=Xa||h>=Ka&&h<=Ga||h===va||h===Ca))return null;for(n++;n<r&&((w=e.charCodeAt(n))>=Ya&&w<=Xa||w>=Ka&&w<=Ga||w>=qa&&w<=$a||w===va||w===Na||w===Ca||w===fa);)n++;for(var g=e.slice(m,n);n<r&&(e.charCodeAt(n)===na||e.charCodeAt(n)===ra);)n++;if(e.charCodeAt(n)===ma){for(n++;n<r&&(e.charCodeAt(n)===na||e.charCodeAt(n)===ra);)n++;var v=e.charCodeAt(n);if(v===ja||v===La){n++;for(var y=n;n<r&&e.charCodeAt(n)!==v;)n++;if(n>=r)return null;if(p[g]=e.slice(y,n),n++,n<r){var b=e.charCodeAt(n);if(b!==na&&b!==ra&&b!==oa&&b!==ca&&b!==Ra)return null}}else if(v===Ba){var x=1;for(y=n,n++;n<r&&x>0;){var w;(w=e.charCodeAt(n))===Ba?x++:w===Ha&&x--,n++}p[g]=e.slice(y,n)}else{for(y=n;n<r;){var E=e.charCodeAt(n);if(E===na||E===ra||E===ca||E===oa||E===ja||E===La||E===ma||E===ya||E===ia)break;n++}if(n===y)return null;p[g]=e.slice(y,n)}}else p[g]=""}else n++}return null}function jo(e,t,n){for(var r=0,a=e.length,o=!1;r<a;){for(var i=e.indexOf("\n",r),l=i<0?a:i,s=r,u=0;s<l&&u<4;)if(e.charCodeAt(s)===na)u++,s++;else{if(e.charCodeAt(s)!==ra)break;u+=4,s++}if(s>=l)o=!1,r=i<0?a:i+1;else{if(u<4){var c=e.charCodeAt(s);if(c===ia||c===la){for(var d=c,p=0,f=s;f<l&&e.charCodeAt(f)===d;)p++,f++;if(p>=3){o=!1;for(var m=i<0?a:i+1;m<a;){for(var h=m,g=0;h<a&&g<4;){var v=e.charCodeAt(h);if(v===na)g++,h++;else{if(v!==ra)break;g+=4,h++}}if(g<4&&h<a&&e.charCodeAt(h)===d){for(var y=0;h<a&&e.charCodeAt(h)===d;)y++,h++;if(y>=p){for(;h<a&&(e.charCodeAt(h)===na||e.charCodeAt(h)===ra);)h++;if(h>=a||e.charCodeAt(h)===oa){r=h>=a?a:h+1;break}}}for(;m<a&&e.charCodeAt(m)!==oa;)m++;m<a&&m++}m>=a&&(r=a);continue}}}for(var b=s;b<l&&e.charCodeAt(b)===ca;){++b<l&&e.charCodeAt(b)===na&&b++;for(var x=0;b<l&&x<4;)if(e.charCodeAt(b)===na)x++,b++;else{if(e.charCodeAt(b)!==ra)break;x+=4,b++}if(x>=4)break;o=!1}if(!o&&u<4&&b<l&&e.charCodeAt(b)===sa&&!(b+1<a&&e.charCodeAt(b+1)===ua)){var w=Fo(e,b,t);if(w){r=w,o=!1;continue}}var E=e.charCodeAt(s);if(E===da&&u<4)o=!1;else if(u<4&&(E===fa||E===ga||E===va)){for(var C=s,S=0;C<l;){var O=e.charCodeAt(C);if(O===E)S++;else if(O!==na&&O!==ra)break;C++}o=!(S>=3&&C>=l)}else o=!0;r=i<0?a:i+1}}}function Fo(e,t,n){let r=e.length;if(e.charCodeAt(t)!==sa)return null;let a=t+1<r&&e.charCodeAt(t+1)===ua,o=t+1;for(;o<r;){if((g=e.charCodeAt(o))===xa){o++;break}if(g===sa)return null;g===ha&&o+1<r&&o++,o++}if(o>r||e.charCodeAt(o-1)!==xa)return null;let i=e.slice(t+1,o-1);if(i.length>999)return null;let l=Uo(i);if(!l||o>=r||e.charCodeAt(o)!==Ca)return null;o++;let s=!1;for(;o<r;){let t=e.charCodeAt(o);if(t===na||t===ra)o++;else{if(t!==oa||s)break;s=!0,o++}}if(a){let t=e.indexOf("\n",o),a=t<0?r:t,i=e.slice(o,a).trim();return n[l]={target:i,title:void 0},t<0?r:t+1}var u;if(o<r&&e.charCodeAt(o)===ya){o++;for(var c=o;o<r&&e.charCodeAt(o)!==ca&&e.charCodeAt(o)!==oa;)e.charCodeAt(o)===ha&&o+1<r&&o++,o++;if(o>=r||e.charCodeAt(o)!==ca)return null;u=e.slice(c,o),o++;for(var d=e.indexOf("\n",o),p=d<0?r:d,f=o;f<p&&(e.charCodeAt(f)===na||e.charCodeAt(f)===ra);)f++;if(f<p){if(f===o)return null;var m=e.charCodeAt(f);if(m!==ja&&m!==La&&m!==za)return null}}else{c=o;for(var h=0;o<r;){var g;if((g=e.charCodeAt(o))===za)h++;else if(g===Ua){if(0===h)break;h--}else{if(g===na||g===ra||g===oa)break;g===ha&&o+1<r&&o++}o++}if(!(u=e.slice(c,o)))return null}for(;o<r&&(e.charCodeAt(o)===na||e.charCodeAt(o)===ra);)o++;var v,y=e.indexOf("\n",o),b=y<0?r:y,x=!1,w=o,E=o;if(o===b&&o<r)for(E=o+1;E<r&&(e.charCodeAt(E)===na||e.charCodeAt(E)===ra);)E++;if(E<r){var C=e.charCodeAt(E);if(C===ja||C===La||C===za){for(var S=C===za?41:C,O=E+1,k=O;O<r;){var A=e.charCodeAt(O);if(A===S){for(var P=O+1;P<r&&(e.charCodeAt(P)===na||e.charCodeAt(P)===ra);)P++;(P>=r||e.charCodeAt(P)===oa)&&(v=e.slice(k,O),x=!0,w=P<r?P+1:r);break}if(A===ha&&O+1<r)O+=2;else{if(A===oa&&O+1<r&&e.charCodeAt(O+1)===oa)break;O++}}if(!x&&E===o)return null}}if(x)return n[l]||(n[l]={target:Wo(u),title:void 0!==v?oo(Wo(v)):v}),w;for(;o<b&&(e.charCodeAt(o)===na||e.charCodeAt(o)===ra);)o++;return o<b?null:(n[l]||(n[l]={target:Wo(u),title:v}),y<0?r:y+1)}var Vo=1,Bo=4,Ho=new Uint8Array(128);Ho[na]=Vo,Ho[ra]=Vo,Ho[oa]=2|Vo,Ho[aa]=2|Vo,Ho[da]=32|Bo,Ho[ca]=32|Bo,Ho[fa]=96|Bo,Ho[Fa]=32|Bo,Ho[ga]=96|Bo,Ho[va]=96|Bo,Ho[ia]=96|Bo,Ho[la]=96|Bo,Ho[ya]=96|Bo,Ho[sa]=64|Bo,Ho[wa]=64|Bo,Ho[Va]=32|Bo;for(let e=qa;e<=$a;e++)Ho[e]=48;for(let e=Ka;e<=Ga;e++)Ho[e]=8;for(let e=Ya;e<=Xa;e++)Ho[e]=8;function zo(e){if(e.indexOf("[")<0&&e.indexOf("]")<0)return!1;for(var t=0;t<e.length;t++)if(e.charCodeAt(t)!==ha){if(e.charCodeAt(t)===sa||e.charCodeAt(t)===xa)return!0}else t++;return!1}function Uo(e){var t=e.replace(/\s+/g," ").trim();return-1!==t.indexOf("ẞ")?t.replace(/\u1E9E/g,"ss").toLowerCase():t.toLowerCase()}function Zo(e){return e<Qa?Ho[e]:e===Da?Vo:0}function Wo(e){return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1")}function qo(e,t){var n=e.indexOf("\n",t);return n<0?e.length:n}function $o(e,t){let n=qo(e,t);return n<e.length?n+1:n}function Ko(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==na&&n!==ra)break;t++}return t}function Go(e,t){let n=$o(e,t);for(;n<e.length;){if(ei(e,n,qo(e,n)))return n;n=$o(e,n)}return e.length}function Yo(e,t,n,r){let a=0;for(;t+a<n&&e.charCodeAt(t+a)===r;)a++;return a}Ho[ha]=Bo,Ho[xa]=Bo,Ho[za]=Bo,Ho[Ua]=Bo,Ho[Ca]=Bo,Ho[ja]=Bo,Ho[La]=Bo,Ho[Ea]=Bo,Ho[ma]=Bo,Ho[36]=Bo,Ho[pa]=Bo,Ho[Ma]=Bo,Ho[Na]=Bo,Ho[Ra]=Bo,Ho[_a]=Bo,Ho[Ia]=Bo,Ho[ba]=Bo,Ho[ua]=Bo,Ho[Ba]=Bo,Ho[Ha]=Bo;var Xo=0,Qo=0;function Jo(e,t,n){for(Xo=0,Qo=0;t+Qo<n;){let n=e.charCodeAt(t+Qo);if(n===ra)Xo+=4-Xo%4;else{if(n!==na)break;Xo++}Qo++}}function ei(e,t,n){return Ko(e,t,n)>=n}function ti(e,t,n,r){let a=qo(e,t);if(Jo(e,t,a),Xo>3)return null;let o=t+Qo;if(e.charCodeAt(o)!==da)return null;let i=Yo(e,o,a,35);if(i<1||i>6||(o+=i,o<a&&e.charCodeAt(o)!==na&&e.charCodeAt(o)!==ra))return null;o=Ko(e,o,a);for(var l=a;l>o&&e.charCodeAt(l-1)===na;)l--;for(var s=l;l>o&&e.charCodeAt(l-1)===da;)l--;if(l<s)if(l===o||e.charCodeAt(l-1)===na)for(;l>o&&e.charCodeAt(l-1)===na;)l--;else l=s;let u=e.slice(o,l),c=Hi(u,0,u.length,n,r),d=(r?.slugify||fo)(u);return{node:{type:eo.heading,level:i,children:c,id:d},end:$o(e,a)}}function ni(e,t){let n=qo(e,t);if(Jo(e,t,n),Xo>3)return null;let r=t+Qo,a=e.charCodeAt(r);if(a!==fa&&a!==ga&&a!==va)return null;let o=0;for(;r<n;){let t=e.charCodeAt(r);if(t===a)o++;else if(t!==na&&t!==ra)return null;r++}return o<3?null:{node:{type:eo.breakThematic},end:$o(e,n)}}function ri(e,t,n){let r=qo(e,t);if(Jo(e,t,r),Xo>3)return null;let a=Xo,o=t+Qo,i=e.charCodeAt(o);if(i!==ia&&i!==la)return null;let l=Yo(e,o,r,i);if(l<3)return null;o+=l;let s=Ko(e,o,r),u=r;if(i===ia)for(let t=s;t<r;t++)if(e.charCodeAt(t)===ia)return null;for(;u>s&&(e.charCodeAt(u-1)===na||e.charCodeAt(u-1)===ra);)u--;let c=e.slice(s,u),d="",p="",f=c.indexOf(" ");-1===f?d=c:(d=c.slice(0,f),p=c.slice(f+1).trim()),d=Wo(d);var m=void 0;if(p){No.lastIndex=0;for(var h;null!==(h=No.exec(p));)m||(m={}),m[h[1]]=void 0!==h[2]?h[2]:h[3]}let g=$o(e,r),v=g,y=e.length;for(;v<e.length;){let t=qo(e,v);if(Jo(e,v,t),Xo<4){let n=v+Qo;var b=Yo(e,n,t,i);if(b>=l&&ei(e,n+b,t)){y=$o(e,t);break}}v=$o(e,t)}var x;if(0===a)x=v>g&&e.charCodeAt(v-1)===oa?e.slice(g,v-1):e.slice(g,v);else{x="";for(var w=g;w<v;){var E=qo(e,w);Jo(e,w,E);var C=Math.min(Qo,a);x+=e.slice(w+C,E)+"\n",w=$o(e,E)}x.length>0&&x.charCodeAt(x.length-1)===oa&&(x=x.slice(0,-1))}return{node:{type:eo.codeBlock,lang:d||void 0,text:x,infoString:p||void 0,attrs:m},end:y}}function ai(e,t){if(Jo(e,t,qo(e,t)),Xo<4)return null;let n="",r=t;for(;r<e.length;){let t=qo(e,r);if(Jo(e,r,t),ei(e,r,t)){for(var a=0,o=$o(e,t);o<e.length;){var i=qo(e,o);if(!ei(e,o,i)){if(Jo(e,o,i),Xo>=4){for(var l=0;l<=a;l++)n+="\n";r=o;break}break}a++,o=$o(e,i)}if(r!==o)break;continue}if(Xo<4)break;let p=0,f=0;var s=0;for(let n=r;n<t&&f<4;n++){if(e.charCodeAt(n)===ra){var u=4-f%4;f+u>4&&(s=f+u-4),f+=u}else f++;p++}var c="";if(s>0)for(var d=0;d<s;d++)c+=" ";n+=(c+=e.slice(r+p,t))+"\n",r=$o(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===oa;)n=n.slice(0,-1);for(;n.length>0&&n.charCodeAt(n.length-1)===oa;)n=n.slice(0,-1);return n?{node:{type:eo.codeBlock,text:n},end:r}:null}function oi(e,t,n,r){if(Jo(e,t,qo(e,t)),Xo>3)return null;let a=t+Qo;if(e.charCodeAt(a)!==ca)return null;let o,i="",l=t,s=!1,u=!1,c=!1;for(;l<e.length;){let t=qo(e,l);Jo(e,l,t);let n=l+Qo;if(e.charCodeAt(n)===ca){let r=n+1;var d=Xo+1,p=!1;if(r<t){var f=e.charCodeAt(r);f===na?(r++,d++,p=!0):f===ra&&(p=!0)}for(var m="",h=!1,g=r;g<t;g++)if(e.charCodeAt(g)===ra){h=!0;break}if(h){var v=d;if(p&&r<t&&e.charCodeAt(r)===ra){for(var y=4-v%4,b=0;b<y-1;b++)m+=" ";v+=y,r++}for(var x=r;x<t;x++)if(e.charCodeAt(x)===ra){for(var w=4-v%4,E=0;E<w;E++)m+=" ";v+=w}else m+=e[x],v++}else m=e.slice(r,t);if(!i&&!o){let n=m.match(/^\[!([A-Za-z]+)\]\s*$/);if(n){o=n[1].toUpperCase(),l=$o(e,t);continue}}i+=m+"\n";var C=m.trimStart();C.startsWith("```")||C.startsWith("~~~")?c=!c:m.startsWith(" ")||m.startsWith("\t")?c=!0:C.length>0&&!c&&(c=!1),u=C.length>0,l=$o(e,t)}else{if(!i||ei(e,l,t)||!u)break;if(Xo<4){var S=l+Qo,O=S<t?e.charCodeAt(S):0;if(O===da||O===ca||O===ia||O===la||O===ya||(O===fa||O===ga||O===va)&&ni(e,l)||(O===fa||O===ga||O===Fa)&&S+1<t&&(e.charCodeAt(S+1)===na||e.charCodeAt(S+1)===ra))break;if(O>=qa&&O<=$a){for(var k=S;k<t&&e.charCodeAt(k)>=qa&&e.charCodeAt(k)<=$a;)k++;if(k<t&&(e.charCodeAt(k)===Na||e.charCodeAt(k)===Ua))break}}if(c)break;i+=e.slice(l,t)+"\n",s=!0,l=$o(e,t)}}if(!i&&!o)return null;var{inBlockQuote:A,f:P}=n;n.inBlockQuote=!0,s&&(n.f=!0);let T=Ui(i||"",n,r);n.inBlockQuote=A,n.f=P;let D={type:eo.blockQuote,children:T};return o&&(D.alert=o),{node:D,end:l}}function ii(e,t,n){for(var r=0,a=t;a<n;a++)e.charCodeAt(a)===ra?r+=4-r%4:r++;return r}function li(e,t,n){if(Jo(e,t,n),Xo>3)return null;var r=t+Qo;if(r>=n)return null;var a=e.charCodeAt(r),o=Xo,i=r;if(a===fa||a===ga||a===Fa){if((i=r+1)<n&&e.charCodeAt(i)!==na&&e.charCodeAt(i)!==ra&&e.charCodeAt(i)!==oa)return null}else{if(!(a>=qa&&a<=$a))return null;for(var l=r;l<n&&l-r<9;){var s=e.charCodeAt(l);if(s<qa||s>$a)break;l++}if(!(l>r&&l<n))return null;var u=e.charCodeAt(l);if(u!==Na&&u!==Ua)return null;if((i=l+1)<n&&e.charCodeAt(i)!==na&&e.charCodeAt(i)!==ra&&e.charCodeAt(i)!==oa)return null}var c=i,d=ii(e,t,i),p=0,f=c,m=d;if(c>=n)return{ordered:a>=qa&&a<=$a,marker:a>=qa&&a<=$a?e[l]:e[r],start:a>=qa&&a<=$a?parseInt(e.slice(r,l),10):void 0,contentStart:c,contentCol:d+1,markerCol:o,isEmpty:!0};for(;f<n&&(e.charCodeAt(f)===na||e.charCodeAt(f)===ra);)e.charCodeAt(f)===ra?m+=4-m%4:m++,f++,p++;var h=f>=n;return h||m-d>4?(m=d+1,f=c+1,p=1):0===p&&(m=d+1,f=c,p=1),{ordered:a>=qa&&a<=$a,marker:a>=qa&&a<=$a?e[l]:e[r],start:a>=qa&&a<=$a?parseInt(e.slice(r,l),10):void 0,contentStart:f,contentCol:m,markerCol:o,isEmpty:h}}var si=0;function ui(e,t,n,r){var a=0,o=t;for(si=0;o<n&&a<r;){var i=e.charCodeAt(o);if(i===ra){var l=4-a%4;if(a+l>r){si=a+l-r,o++,a=r;break}a+=l}else{if(i!==na)break;a++}o++}return o}function ci(e,t,n,r){var a=qo(e,t),o=li(e,t,a);if(!o)return null;var i=[],l=t,s=o.contentCol,u="",c=o.isEmpty,d=!1,p=!1;if(!o.isEmpty){for(var f=!1,m=o.contentStart;m<a;m++)if(e.charCodeAt(m)===ra){f=!0;break}if(f){var h="",g=ii(e,t,o.contentStart),v=g-o.contentCol;if(v>0)for(var y=0;y<v;y++)h+=" ";for(var b=o.contentStart;b<a;b++)if(e.charCodeAt(b)===ra){for(var x=4-g%4,w=0;w<x;w++)h+=" ";g+=x}else h+=e[b],g++;u=h+"\n"}else u=e.slice(o.contentStart,a)+"\n"}for(l=$o(e,a);l<e.length;){var E=qo(e,l);Jo(e,l,E);var C=e.charCodeAt(l+Qo);if(Xo<s&&(C===fa||C===ga||C===va)&&Xo<=3&&ni(e,l))break;var S=li(e,l,E);if(S&&S.ordered===o.ordered&&S.marker===o.marker&&S.markerCol<s)i.push({contentCol:s,raw:u,hasBlankAfter:d,isEmpty:c}),d&&(p=!0),s=S.contentCol,c=S.isEmpty,d=!1,u=S.isEmpty?"":e.slice(S.contentStart,E)+"\n",l=$o(e,E);else if(ei(e,l,E)){u+="\n",l=$o(e,E);for(var O=!1,k=0;k<u.length;k++){var A=u.charCodeAt(k);if(A!==oa&&A!==aa&&A!==na&&A!==ra){O=!0;break}}if(c&&!O){if(!(l<e.length))break;var P=li(e,l,qo(e,l));if(!P||P.ordered!==o.ordered||P.marker!==o.marker)break;d=!0}if(l<e.length){var T=qo(e,l);Jo(e,l,T);var D=e.charCodeAt(l+Qo);if((D===fa||D===ga||D===va)&&Xo<=3&&ni(e,l))break;var M=li(e,l,T);if(M&&M.ordered===o.ordered&&M.marker===o.marker&&M.markerCol<s){d=!0;continue}if(!ei(e,l,T)&&Xo<s)break}}else{if(!(Xo>=s)){for(var _=!1,I=0;I<u.length;I++){var N=u.charCodeAt(I);if(N!==oa&&N!==aa&&N!==na&&N!==ra){_=!0;break}}if(!d&&_&&!c){var R=l+Qo,L=e.charCodeAt(R);if(L!==da&&L!==ca&&L!==ya&&L!==ia&&L!==la&&(L!==fa&&L!==ga&&L!==va&&L!==Fa||null===ni(e,l)&&null===li(e,l,E))&&!(L>=qa&&L<=$a&&null!==li(e,l,E))){u+=""+e.slice(R,E)+"\n",l=$o(e,E);continue}}break}var j=ui(e,l,E,s);if(si>0){for(var F="",V=s,B=0;B<si;B++)F+=" ",V++;for(var H=j;H<E;H++)if(e.charCodeAt(H)===ra){for(var z=4-V%4,U=0;U<z;U++)F+=" ";V+=z}else F+=e[H],V++;u+=F+"\n"}else u+=e.slice(j,E)+"\n";l=$o(e,E)}}if(i.push({contentCol:s,raw:u,hasBlankAfter:d,isEmpty:c}),0===i.length)return null;var Z=p;if(!Z)for(var W=0;W<i.length;W++){if(i[W].hasBlankAfter&&W<i.length-1){Z=!0;break}if(!i[W].isEmpty){for(var q=i[W].raw,$=q.length,K=0,G=!1,Y=!1,X=!1,Q=!1,J=0,ee=0,te=-1;K<$;){var ne=q.indexOf("\n",K);if(ne<0&&(ne=$),Q){Jo(q,K,ne);for(var re=q.slice(K+Qo,ne),ae=0;ae<re.length&&re.charCodeAt(ae)===J;)ae++;ae>=ee&&""===re.slice(ae).trim()&&(Q=!1),K=ne<$?ne+1:$}else if(ei(q,K,ne))te>=0?X=!0:G&&(Y=!0),K=ne<$?ne+1:$;else{if(Jo(q,K,ne),te>=0){if(Xo>=te){K=ne<$?ne+1:$;continue}var oe=li(q,K,ne);if(oe&&oe.markerCol<te&&oe.contentCol<=te){K=ne<$?ne+1:$;continue}if(oe){K=ne<$?ne+1:$;continue}te=-1,X&&(Y=!0,X=!1)}var ie=q.slice(K+Qo,ne),le=ie.charCodeAt(0);if((le===ia||le===la)&&Xo<=3){for(var se=0;se<ie.length&&ie.charCodeAt(se)===le;)se++;if(se>=3){if(Y&&G){Z=!0;break}Q=!0,J=le,ee=se,G=!0,K=ne<$?ne+1:$;continue}}var ue=Xo<=3?li(q,K,ne):null;if(ue&&G){if(Y){Z=!0;break}te=ue.contentCol,X=!1,K=ne<$?ne+1:$,G=!0}else{if(Y){Z=!0;break}G=!0,K=ne<$?ne+1:$}}}if(Z)break}}for(var ce=[],de=0;de<i.length;de++){for(var pe=i[de],fe=pe.raw,me=fe.length;me>0&&fe.charCodeAt(me-1)===oa;)me--;var he,ge=me<fe.length?fe.slice(0,me):fe,ve=null;if(ge.length>=3&&ge.charCodeAt(0)===sa){var ye=ge[1];(" "===ye||"x"===ye||"X"===ye)&&ge.charCodeAt(2)===xa&&(ve={type:eo.gfmTask,completed:"x"===ye||"X"===ye},ge=ge.slice(3))}if(pe.isEmpty&&""===ge.trim())he=[];else if(Z){var be=n.inList;n.inList=!0,he=Ui(ge,n,r),n.inList=be}else{var xe=n.inList;if(n.inList=!0,he=Ui(ge,n,r),n.inList=xe,1===he.length&&he[0].type===eo.paragraph)he=he[0].children;else{for(var we=[],Ee=0;Ee<he.length;Ee++)if(he[Ee].type===eo.paragraph)for(var Ce=he[Ee].children,Se=0;Se<Ce.length;Se++)we.push(Ce[Se]);else we.push(he[Ee]);he=we}}ve?ce.push([ve,{type:eo.text,text:" "},...he]):ce.push(he)}return{node:{type:o.ordered?eo.orderedList:eo.unorderedList,start:o.ordered?o.start:void 0,items:ce},end:l}}var di=new Set(["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]);function pi(e,t,n){let r={};for(let[i,l]of Object.entries(e)){let e=i,s=i.toLowerCase();if("style"===s&&"string"==typeof l){let t={},n=[],a=0,o=0;for(let e=0;e<l.length;e++){let t=l.charCodeAt(e);t===za?a++:t===Ua?a--:t===_a&&0===a&&(n.push(l.slice(o,e)),o=e+1)}o<l.length&&n.push(l.slice(o));let i=!1;n.forEach((e=>{let n=e.indexOf(":");if(-1===n)return;let r=e.slice(0,n).trim(),a=e.slice(n+1).trim();if(r&&a){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(a))return void(i=!0);let e=-1!==r.indexOf("-")?r.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())):r;t[e]=a}})),!i&&Object.keys(t).length>0&&(r[e]=t)}else if("href"!==s&&"src"!==s||!n?.sanitizer)if(""===l)r[e]=!0;else if(l.length>=2&&l.charCodeAt(0)===Ba&&l.charCodeAt(l.length-1)===Ha){var a=l.slice(1,-1);if(a.length>0){var o=a.charCodeAt(0);if(o===sa||o===Ba)try{r[e]=JSON.parse(a);continue}catch{}}if("true"===a){r[e]=!0;continue}if("false"===a){r[e]=!1;continue}if(n?.evalUnserializableExpressions)try{r[e]=(0,eval)("("+a+")");continue}catch{}r[e]=a}else r[e]=l;else{let a=n.sanitizer(l,t,s);null!==a&&(r[e]=a)}}return r}function fi(e,t,n){let r=t.length;var a=t.charCodeAt(0);a>=Ka&&a<=Ga&&(a+=Ja);for(let i=n;i<=e.length-r;i++){var o=e.charCodeAt(i);if(o>=Ka&&o<=Ga&&(o+=Ja),o!==a)continue;let n=!0;for(let a=1;a<r;a++){let r=e.charCodeAt(i+a),o=t.charCodeAt(a);if(r>=Ka&&r<=Ga&&(r+=Ja),o>=Ka&&o<=Ga&&(o+=Ja),r!==o){n=!1;break}}if(n)return i}return-1}var mi=-1;function hi(e,t,n){let r=n.toLowerCase(),a="<"+r,o="</"+r,i=1,l=t,s=e.length;for(mi=-1;l<s&&i>0;){let t=fi(e,a,l),n=fi(e,o,l);if(-1===n)return-1;if(-1!==t&&t<n){let n=Lo(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!go(n.tag)&&i++,l=n.end):l=t+1}else{var u=n+o.length,c=u<s?e.charCodeAt(u):62;if((c===ca||c===na||c===ra||c===oa)&&(i--,0===i)){mi=n;let t=n+o.length;for(;t<s&&e.charCodeAt(t)!==ca;)t++;return t+1}l=n+1}}return-1}function gi(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var a=qo(e,t);if(Jo(e,t,a),Xo>3&&!n.inHTML)return null;var o=t+Qo;if(e.charCodeAt(o)!==ya)return null;var i=e.indexOf(">",o+1);if(-1!==i&&i<a){var l=e.slice(o+1,i);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(l)||/^[^\s@]+@[^\s@]+$/.test(l))return null}var s=function(e,t){if(e.charCodeAt(t)!==ya)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===wa&&e.charCodeAt(n+1)===fa&&e.charCodeAt(n+2)===fa)return 2;if(e.charCodeAt(n)===Ia)return 3;if(e.charCodeAt(n)===wa){var a=e.charCodeAt(n+1);if(a>=Ka&&a<=Ga)return 4;if("[CDATA["===e.slice(n+1,n+8))return 5}for(var o=e.charCodeAt(n)===Ra,i=o?n+1:n,l=i;l<r;){var s=e.charCodeAt(l);if(!(s>=Ka&&s<=Ga||s>=Ya&&s<=Xa||s>=qa&&s<=$a||s===fa))break;l++}if(l===i)return 0;var u=e.slice(i,l);if(Do.has(u.toLowerCase())){if(o)return 0;var c=e.charCodeAt(l);return c===na||c===ra||c===ca||c===oa||l>=r?1:0}if(di.has(u.toLowerCase())){if(o){for(var d=l;d<r&&(e.charCodeAt(d)===na||e.charCodeAt(d)===ra);)d++;return d<r&&e.charCodeAt(d)===ca?6:0}var p=l<r?e.charCodeAt(l):-1;return p===na||p===ra||p===ca||p===oa||p===Ra||-1===p?6:0}if(o){for(var f=l;f<r&&(e.charCodeAt(f)===na||e.charCodeAt(f)===ra);)f++;if(f<r&&e.charCodeAt(f)===ca){var m=qo(e,t);if(""===e.slice(f+1,m).trim())return 7}}else{var h=qo(e,t),g=Lo(e,t);if(g&&g.end<=h&&""===e.slice(g.end,h).trim())return 7}return 0}(e,o);if(s>=1&&s<=5){var u=e.length;if(1===s){for(var c=e.length,d=0;d<To.length;d++){var p=fi(e,"</"+To[d]+">",o);p>=0&&p<c&&(c=p)}if(c<e.length){var f=e.indexOf(">",c);u=f>=0?$o(e,f+1):e.length}}else{var m=2===s?"--\x3e":3===s?"?>":4===s?">":"]]>",h=e.indexOf(m,o);h>=0&&(u=$o(e,h+m.length))}var g=e.slice(o,u);if(s>=2)return{node:{type:eo.htmlComment,text:g,raw:!0,endPos:u},end:u};var v="div",y=g.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);y&&(v=y[1]);var b,x=Lo(e,o),w={};x&&!x.isClosing&&(w=pi(x.attrs,v,r),b=x.whitespaceBeforeAttrs+x.rawAttrs);var E=fi(g,"</"+v.toLowerCase(),0),C=g,S="";if(x&&x.isClosing)for(C=g.slice(x.end-o);C.length>0&&C.charCodeAt(C.length-1)===oa;)C=C.slice(0,-1);else if(x&&!x.isClosing){var O=x.end-o;if(-1!==E)for((C=g.slice(O)).charCodeAt(0)===oa&&(C=C.slice(1));C.length>0&&C.charCodeAt(C.length-1)===oa;)C=C.slice(0,-1);else for(C=g;C.length>0&&C.charCodeAt(C.length-1)===oa;)C=C.slice(0,-1);-1!==E&&(S=g.slice(O,E).trim())}var k=!!x&&x.isClosing;return{node:{type:eo.htmlBlock,tag:v,attrs:w,e:b,children:[],a:C,text:S,c:!0,b:k,endPos:u,canInterruptParagraph:!0},end:u}}if(6===s||7===s){var A=Go(e,t),P=A<e.length?A:e.length,T=e.slice(o,P),D=A<e.length?$o(e,A):e.length,M=Lo(e,o);if(M){var _=M.tag,I=_.toLowerCase();if(M.isClosing){var N=e.slice(M.end,P);return{node:{type:eo.htmlBlock,tag:_,attrs:{},children:[],a:N,text:N,c:!0,b:!0,endPos:P,canInterruptParagraph:6===s},end:D}}if(M.selfClosing||go(_))return{node:{type:eo.htmlBlock,tag:_,attrs:pi(M.attrs,_,r),e:M.whitespaceBeforeAttrs+M.rawAttrs,children:[],a:"",text:"",c:!1,b:!1,endPos:M.end,canInterruptParagraph:6===s},end:$o(e,M.end)};var R=n.d||0,L=e.slice(o,P),j=-1,F=-1;if(R<10){for(var V="</"+I,B=1,H=M.end-o;H<L.length&&B>0;){var z=fi(L,"<"+I,H),U=fi(L,V,H);if(-1===U)break;if(-1!==z&&z<U){var Z=z+I.length+1;if(Z<L.length){var W=L.charCodeAt(Z);(W===na||W===ra||W===oa||W===ca||W===Ra)&&B++}H=z+1}else{var q=U+V.length;if(q<L.length){var $=L.charCodeAt(q);if(($===ca||$===na||$===ra||$===oa)&&0==--B){j=U;for(var K=q;K<L.length&&L.charCodeAt(K)!==ca;)K++;F=K+1;break}}else if(0==--B){j=U,F=L.length;break}H=U+1}}var G=!1;if(-1===j&&6===s&&!M.isClosing&&!_o.has(I)){var Y=e.slice(M.end),X=fi(Y,V,0);if(-1!==X&&-1!==Y.slice(0,X).indexOf("\n\n")){for(var Q=M.end+X,J=Q+V.length;J<e.length&&e.charCodeAt(J)!==ca;)J++;if(J<e.length&&e.charCodeAt(J)===ca){var ee=J+1,te=qo(e,ee);P=te,D=$o(e,te),L=e.slice(o,P),T=e.slice(o,P),j=Q-o,F=ee-o,G=!0}}}}var ne=-1!==M.rawAttrs.indexOf("\n")||-1!==M.whitespaceBeforeAttrs.indexOf("\n"),re=!1;-1!==j&&(re=0===L.slice(F).trim().length);var ae=!1,oe=P,ie=D;if(-1!==j){var le=o+F,se=qo(e,le-1);if(le<se){for(var ue=le;ue<se&&(e.charCodeAt(ue)===na||e.charCodeAt(ue)===ra);)ue++;if(ue<se&&e.charCodeAt(ue)===ya){var ce=Lo(e,ue);ce&&!ce.isClosing&&(ae=!0,oe=le,ie=le,re=!0)}}if(!ae){var de=$o(e,se);if(de<P){for(var pe=de;pe<P&&(e.charCodeAt(pe)===na||e.charCodeAt(pe)===ra);)pe++;pe<P&&e.charCodeAt(pe)===ya&&Lo(e,pe)&&(ae=!0,oe=se,ie=de,re=!0)}}!ae&&n.inHTML&&(ae=!0,oe=se,ie=$o(e,se),re=0===e.slice(le,se).trim().length)}var fe=[],me="";if(-1!==j){var he=(me=L.slice(M.end-o,j)).trim();if(he){var{inline:ge,inHTML:ve,d:ye}=n;if(n.inHTML=!0,n.d=R+1,"p"===I)n.inline=!0,fe=Hi(he,0,he.length,n,r);else{var be=-1!==me.indexOf("\n\n"),xe=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(he),we=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(he);be||xe||n.inHTML&&we||we?(n.inline=!1,fe=Ui(me,n,r)):(n.inline=!0,fe=Hi(he,0,he.length,n,r))}n.inline=ge,n.inHTML=ve,n.d=ye}}var Ee=!1;if(6===s&&-1!==j&&!n.inHTML&&!ne){var Ce=me,Se=/<[a-zA-Z][^>]*>/.test(Ce),Oe=/\n\n/.test(Ce)||/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ce);Se&&!Oe&&(Ee=!0)}if(n.inHTML||7===s||ne||!re||Ee){var ke;if(-1!==j&&ae){var Ae=!1;if(n.inHTML&&F<L.length){for(var Pe=F;Pe<L.length&&L.charCodeAt(Pe)!==oa;)Pe++;var Te=L.slice(F,Pe).trim();Ae=Te.length>1&&Te.charCodeAt(0)===ya&&Te.charCodeAt(1)!==Ra}ke=Ae?L.slice(M.end-o):me}else 7!==s&&!n.inHTML||-1===j?ae?ke=e.slice(o,oe):ne?ke=T:(ke=L.slice(M.end-o)).charCodeAt(0)===oa&&(ke=ke.slice(1)):(ke=L.slice(M.end-o)).charCodeAt(0)===oa&&(ke=ke.slice(1));return{node:{type:eo.htmlBlock,tag:_,attrs:pi(M.attrs,_,r),e:M.whitespaceBeforeAttrs+M.rawAttrs,children:fe,a:ke,text:ke,c:!0,b:!1,endPos:oe,canInterruptParagraph:6===s},end:ie}}return{node:{type:eo.htmlBlock,tag:_,attrs:pi(M.attrs,_,r),e:M.whitespaceBeforeAttrs+M.rawAttrs,children:fe,a:G?"":me,text:me,c:!1,b:!1,endPos:oe,canInterruptParagraph:6===s},end:ie}}var De=T.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),Me=De?De[2]:"div",_e=!!De&&"/"===De[1],Ie=T;if(_e){var Ne=T.indexOf(">");-1!==Ne&&(Ie=T.slice(Ne+1))}return{node:{type:eo.htmlBlock,tag:Me,attrs:{},children:[],a:Ie,text:Ie,c:!0,b:_e,endPos:P,canInterruptParagraph:6===s},end:D}}var Re=Lo(e,o);if(!Re)return null;var Le=Re.tag,je=Le.toLowerCase(),Fe=Le.charCodeAt(0),Ve=Fe>=Ka&&Fe<=Ga;if(!(Ve||di.has(je)||Do.has(je)||je.includes("-")))return null;if(Re.isClosing)return{node:{type:eo.htmlSelfClosing,tag:Le,attrs:{},endPos:Re.end,b:!0,a:e.slice(o,Re.end)},end:Re.end};var Be=hi(e,Re.end,Le),He=[];if(-1!==Be){var ze=mi,Ue=e.slice(Re.end,ze),Ze=Ue.trim();if(Ze){var We=-1!==Ue.indexOf("\n\n"),qe=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ze),$e=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(Ze),Ke=n.inline,Ge=n.inHTML,Ye=n.d;n.inHTML=!0,n.d=(n.d||0)+1,We||qe||$e?(n.inline=!1,He=Ui(Ue,n,r)):(n.inline=!0,He=Hi(Ze,0,Ze.length,n,r)),n.inline=Ke,n.inHTML=Ge,n.d=Ye}var Xe=qo(e,Be),Qe=e.slice(Be,Xe).trim()?Be:$o(e,Be),Je=Ve?e.slice(o,Be):e.slice(o,Qe),et=Ve?Be:Qe;return{node:{type:eo.htmlBlock,tag:Le,attrs:pi(Re.attrs,Le,r),e:Re.whitespaceBeforeAttrs+Re.rawAttrs,children:He,a:Je,text:Ve?Ue:Je,c:!0,b:!1,endPos:et,canInterruptParagraph:!1},end:Qe}}var tt=Go(e,Re.end),nt=tt<e.length?$o(e,tt):tt,rt=e.slice(Re.end,tt);if(rt.trim()){var{inline:at,inHTML:ot,d:it}=n;n.inline=!1,n.inHTML=!0,n.d=(n.d||0)+1,He=Ui(rt,n,r),n.inline=at,n.inHTML=ot,n.d=it}var lt=e.slice(Re.end,tt);return{node:{type:eo.htmlBlock,tag:Le,attrs:pi(Re.attrs,Le,r),e:Re.whitespaceBeforeAttrs+Re.rawAttrs,children:He,a:lt,text:rt,c:!0,b:!1,endPos:tt,canInterruptParagraph:!1},end:nt}}function vi(e,t,n){for(var r=0,a=e.length;r<a&&(e.charCodeAt(r)===na||e.charCodeAt(r)===ra);)r++;for(;a>r&&(e.charCodeAt(a-1)===na||e.charCodeAt(a-1)===ra);)a--;r<a&&e.charCodeAt(r)===Va&&r++,a>r&&e.charCodeAt(a-1)===Va&&(a-2<r||e.charCodeAt(a-2)!==ha)&&a--;for(var o=[],i=r,l=!1,s=[],u=r;u<a;){var c=e.charCodeAt(u);if(c===ha&&u+1<a)e.charCodeAt(u+1)===Va?(l||(l=!0,s=[]),s.push(e.slice(i,u)),s.push("|"),i=u+=2):u+=2;else if(c!==ia)if(c!==Va)u++;else{var d=l?(s.push(e.slice(i,u)),s.join("")):e.slice(i,u);o.push(d.trim()),i=++u,l=!1,s=[]}else{for(var p=0;u<a&&e.charCodeAt(u)===ia;)p++,u++;for(var f=!1;u<a&&!f;){for(var m=0;u<a&&e.charCodeAt(u)===ia;)m++,u++;m===p?f=!0:0===m&&u++}}}var h=l?(s.push(e.slice(i,a)),s.join("")):e.slice(i,a);return o.push(h.trim()),o.map((function(e){var r=-1!==e.indexOf("\\|")?e.replace(/\\\|/g,"|"):e;return Hi(r,0,r.length,t,n)}))}function yi(e,t,n,r){let a=qo(e,t);var o=e.indexOf("|",t);if(o<0||o>=a)return null;let i=$o(e,a);if(i>=e.length)return null;let l=qo(e,i);if(!Ro(e,i,l))return null;let s=e.slice(t,a),u=e.slice(i,l);for(var c=[],d=0,p=u.length;d<p&&(u.charCodeAt(d)===na||u.charCodeAt(d)===ra);)d++;for(d<p&&u.charCodeAt(d)===Va&&d++;d<p;){for(;d<p&&(u.charCodeAt(d)===na||u.charCodeAt(d)===ra);)d++;if(d>=p||u.charCodeAt(d)===Va)break;var f=u.charCodeAt(d)===Ca;for(f&&d++;d<p&&u.charCodeAt(d)===fa;)d++;var m=d<p&&u.charCodeAt(d)===Ca;for(m&&d++,c.push(f&&m?"center":m?"right":f?"left":null);d<p&&(u.charCodeAt(d)===na||u.charCodeAt(d)===ra);)d++;d<p&&u.charCodeAt(d)===Va&&d++}let h=vi(s,n,r);if(c.length!==h.length)return null;let g=[],v=$o(e,l);for(;v<e.length;){let t=qo(e,v),a=e.slice(v,t);if(ei(e,v,t))break;if(Jo(e,v,t),Xo<4){var y=e.charCodeAt(v+Qo);if(y===ca||y===da||(y===fa||y===ga||y===va)&&ni(e,v))break;if(y===ia||y===la){for(var b=v+Qo,x=0;b<t&&e.charCodeAt(b)===y;)x++,b++;if(x>=3)break}}g.push(vi(a,n,r)),v=$o(e,t)}if((r.streaming||r.optimizeForStreaming)&&0===g.length)return null;for(var w=h.length,E=0;E<g.length;E++)if(g[E].length<w)for(;g[E].length<w;)g[E].push([]);else g[E].length>w&&(g[E].length=w);return{node:{type:eo.table,header:h,cells:g,align:c},end:v}}function bi(e,t,n){if(Jo(e,t,qo(e,t)),Xo>3)return null;var r=t+Qo;if(e.charCodeAt(r)!==sa)return null;if(r+1<e.length&&e.charCodeAt(r+1)===ua){var a=function(e,t,n){var r=e.length;if(e.charCodeAt(t)!==sa||t+1>=r||e.charCodeAt(t+1)!==ua)return null;for(var a=t+2,o=a;a<r&&e.charCodeAt(a)!==xa;){if(e.charCodeAt(a)===oa)return null;a++}if(a>=r)return null;var i=("^"+e.slice(o,a)).toLowerCase();if(++a>=r||e.charCodeAt(a)!==Ca)return null;for(a++;a<r&&(e.charCodeAt(a)===na||e.charCodeAt(a)===ra);)a++;if(a<r&&e.charCodeAt(a)===oa)for(a++;a<r&&(e.charCodeAt(a)===na||e.charCodeAt(a)===ra);)a++;var l=e.indexOf("\n",a);l<0&&(l=r);for(var s=e.slice(a,l).trim(),u=l<r?l+1:r;u<r;){var c=qo(e,u);if(Jo(e,u,c),!(Xo>=2)||ei(e,u,c)){if(ei(e,u,c)){var d=$o(e,c);if(d<r&&(Jo(e,d,qo(e,d)),Xo>=2)){s+="\n",u=$o(e,c);continue}break}break}s+="\n"+e.slice(u,c),u=$o(e,c)}return n.refs[i]||(n.refs[i]={target:s,title:void 0}),{node:{type:eo.footnote},end:u}}(e,r,n);return a||null}n.refs||(n.refs={});var o=Fo(e,r,n.refs);return null===o?null:{node:{type:eo.refCollection},end:o}}function xi(e,t,n,r){let a=t,o=0,i=0,l=-1;for(;a<e.length;){let t=l>=0?l:qo(e,a);if(l=-1,ei(e,a,t))break;if(Jo(e,a,t),Xo<4&&i>0&&!n.f){let n=e.charCodeAt(a+Qo);if(n===ma||n===fa){let r=a+Qo;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===na||e.charCodeAt(r)===ra);)r++;if(r>=t){o=n===ma?1:2,a=$o(e,t);break}}}i=t;let b=$o(e,t);if(b<e.length){if(e.charCodeAt(b)===Za){var s=qo(e,b);a=$o(e,s),i=s;continue}let t=qo(e,b);if(l=t,Jo(e,b,t),Xo<4){let o=e.charCodeAt(b+Qo);if(o===ca){a=b;break}if(o===da&&ti(e,b,n,r)){a=b;break}if(o===ia||o===la){for(var u=b+Qo,c=0;u<t&&e.charCodeAt(u)===o;)c++,u++;if(c>=3){a=b;break}}if(o===ya){var d=b+Qo+1,p=d<t?e.charCodeAt(d):0,f=p===wa||p===Ia;if(f||p!==Ra){if(!f){for(var m=d;m<t&&(e.charCodeAt(m)>=Ka&&e.charCodeAt(m)<=Ga||e.charCodeAt(m)>=Ya&&e.charCodeAt(m)<=Xa||e.charCodeAt(m)>=qa&&e.charCodeAt(m)<=$a||e.charCodeAt(m)===fa);)m++;if(m>d){var h=e.slice(d,m).toLowerCase();f=di.has(h)||Do.has(h)}}}else{for(var g=d+1,v=g;v<t&&(e.charCodeAt(v)>=Ka&&e.charCodeAt(v)<=Ga||e.charCodeAt(v)>=Ya&&e.charCodeAt(v)<=Xa||e.charCodeAt(v)>=qa&&e.charCodeAt(v)<=$a||e.charCodeAt(v)===fa);)v++;v>g&&(f=di.has(e.slice(g,v).toLowerCase()))}if(f&&gi(e,b,n,r)){a=b;break}}if(o===fa||o===ga||o===Fa){let n=b+Qo+1;if(n<t&&(e.charCodeAt(n)===na||e.charCodeAt(n)===ra)&&Ko(e,n,t)<t&&!ni(e,b)){a=b;break}}if(o>=qa&&o<=$a){let n=b+Qo;for(;n<t&&e.charCodeAt(n)>=qa&&e.charCodeAt(n)<=$a;)n++;if(n<t&&(e.charCodeAt(n)===Na||e.charCodeAt(n)===Ua)&&n-(b+Qo)==1&&49===e.charCodeAt(b+Qo)){var y=n+1;if(y<t&&(e.charCodeAt(y)===na||e.charCodeAt(y)===ra)&&Ko(e,y,t)<t){a=b;break}}}if(o===Va){let n=$o(e,t);if(n<e.length&&Ro(e,n,qo(e,n))){a=b;break}}if((o===fa||o===ga||o===va)&&ni(e,b)){if(o!==fa){a=b;break}let n=0,r=b+Qo;for(;r<t&&e.charCodeAt(r)===fa;)n++,r++;for(;r<t&&(e.charCodeAt(r)===na||e.charCodeAt(r)===ra);)r++;if(r<t){a=b;break}}}}a=$o(e,t)}for(var b=o?i:a;b>t&&(e.charCodeAt(b-1)===oa||e.charCodeAt(b-1)===aa||e.charCodeAt(b-1)===na||e.charCodeAt(b-1)===ra);)b--;for(var x=t;x<b&&(e.charCodeAt(x)===na||e.charCodeAt(x)===ra);)x++;if(x>=b)return null;for(var w=!1,E=x;E<b;E++)if(e.charCodeAt(E)===Za){w=!0;break}var C=w?e.slice(x,b).replace(/\u001E/g,""):e.slice(x,b);if(!C)return null;let S=function(e,t,n,r,a){var o=e.indexOf("\n",0);if(o<0||o>=n)return Hi(e,0,n,r,a);for(var i="",l=0,s=0;s<n;){var u=e.charCodeAt(s);if(u===ia){var c=Ei(e,s,n);if(c>s){for(var d=!1,p=s;p<c;p++)if(e.charCodeAt(p)===oa){d=!0;break}d&&(i+=e.slice(l,s),i+=e.slice(s,c).replace(/\n/g," "),l=c),s=c;continue}}if(u===ya){var f=Ci(e,s,n);if(f>s){s=f;continue}}if(u!==oa)s++;else{var m=!1,h=0;if(s>0&&e.charCodeAt(s-1)===ha)m=!0,h=1;else{for(var g=0,v=s-1;v>=0&&e.charCodeAt(v)===na;)g++,v--;g>=2&&(m=!0,h=g)}for(m?(i+=e.slice(l,s-h),i+=""):i+=e.slice(l,s+1),s++;s<n&&e.charCodeAt(s)===na;)s++;l=s}}return l<n&&(i+=e.slice(l,n)),Hi(i,0,i.length,r,a)}(C,0,C.length,n,r);if(o){let e=(r?.slugify||fo)(C);return{node:{type:eo.heading,level:o,children:S,id:e},end:a}}return{node:{type:eo.paragraph,children:S},end:a}}function wi(e,t,n){if(e.charCodeAt(t)!==ia)return null;let r=Yo(e,t,n,96),a=t+r;for(;a<n;){let o=e.indexOf("`",a);if(o<0||o>=n)return null;let i=Yo(e,o,n,96);if(i===r){let n=e.slice(t+r,o);return n=n.replace(/\n/g," "),n.length>0&&" "===n[0]&&" "===n[n.length-1]&&n.trim().length>0&&(n=n.slice(1,-1)),{node:{type:eo.codeInline,text:n},end:o+i}}a=o+i}return null}function Ei(e,t,n){if(e.charCodeAt(t)!==ia)return t;let r=Yo(e,t,n,96),a=t+r;for(;a<n;){let o=e.indexOf("`",a);if(o<0||o>=n)return t;let i=Yo(e,o,n,96);if(i===r)return o+i;a=o+i}return t}function Ci(e,t,n){if(e.charCodeAt(t)!==ya)return t;if(t+1<n&&e.charCodeAt(t+1)===Ra){let r=t+2;for(;r<n&&e.charCodeAt(r)!==ca;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===wa&&e.charCodeAt(t+2)===fa&&e.charCodeAt(t+3)===fa){let n=e.indexOf("--\x3e",t+4);return n>=0?n+3:t}let r=t+1,a=r;for(;r<n;){let t=e.charCodeAt(r);if(!(t>=Ka&&t<=Ga||t>=Ya&&t<=Xa||t>=qa&&t<=$a||t===fa))break;r++}if(r===a)return t;let o=e.slice(a,r).toLowerCase(),i=!1;for(;r<n;){let a=e.charCodeAt(r);if(a===ca){r++;break}if(a===Ra&&r+1<n&&e.charCodeAt(r+1)===ca){r+=2,i=!0;break}if(a!==ja&&a!==La){if(a===oa)return t;r++}else{var l=a;for(r++;r<n&&e.charCodeAt(r)!==l;)r++;r<n&&r++}}if(i||go(o))return r;let s=1;for(;r<n&&s>0;)if(e.charCodeAt(r)===ya)if(r+1<n&&e.charCodeAt(r+1)===Ra){let t=r+2,a=t;for(;a<n&&(e.charCodeAt(a)>=Ka&&e.charCodeAt(a)<=Ga||e.charCodeAt(a)>=Ya&&e.charCodeAt(a)<=Xa);)a++;if(e.slice(t,a).toLowerCase()===o){for(;a<n&&e.charCodeAt(a)!==ca;)a++;if(a<n&&a++,s--,0===s)return a}r=a}else{let t=r+1,a=t;for(;a<n&&(e.charCodeAt(a)>=Ka&&e.charCodeAt(a)<=Ga||e.charCodeAt(a)>=Ya&&e.charCodeAt(a)<=Xa);)a++;e.slice(t,a).toLowerCase()===o&&s++,r++}else r++;return r}function Si(e,t,n,r,a){if(e.charCodeAt(t)!==la||t+1>=n||e.charCodeAt(t+1)!==la)return null;let o=t+2;for(;o+1<n;){let i=e.charCodeAt(o);if(i===ia){let t=Ei(e,o,n);if(t>o){o=t;continue}}if(i===la&&e.charCodeAt(o+1)===la){let n=e.slice(t+2,o),i=Hi(n,0,n.length,r,a);return{node:{type:eo.textFormatted,tag:"del",children:i},end:o+2}}i===ha&&o+1<n&&o++,o++}return null}function Oi(e,t,n,r,a){if(e.charCodeAt(t)!==ma||t+1>=n||e.charCodeAt(t+1)!==ma)return null;let o=t+2;for(;o+1<n;){let i=e.charCodeAt(o);if(i===ia){let t=Ei(e,o,n);if(t>o){o=t;continue}}if(i===ma&&e.charCodeAt(o+1)===ma&&o>t+2){let n=e.slice(t+2,o),i=Hi(n,0,n.length,r,a);return{node:{type:eo.textFormatted,tag:"mark",children:i},end:o+2}}i===ha&&o+1<n&&o++,o++}return null}var ki=/[\p{P}\p{S}]/u;function Ai(e,t,n){return e<Qa?!!(Zo(e)&Bo):ki.test(t[n])}function Pi(e,t,n){return e<Qa?!!(Zo(e)&Vo):/\p{Zs}/u.test(t[n])}function Ti(e,t,n){var r=e.charCodeAt(t);if(r!==ga&&r!==va)return null;var a=Yo(e,t,n,r);if(0===a)return null;var o,i,l=t>0?e.charCodeAt(t-1):32,s=t+a<n?e.charCodeAt(t+a):32,u=Pi(l,e,t-1),c=Pi(s,e,t+a),d=t>0&&Ai(l,e,t-1),p=t+a<n&&Ai(s,e,t+a),f=!c&&(!p||u||d),m=!u&&(!d||c||p);return r===ga?(o=f,i=m):(o=f&&(!m||d),i=m&&(!f||p)),{len:a,canOpen:o,canClose:i}}function Di(e,t,n,r,a){let o=e.charCodeAt(t)===wa,i=o?t+1:t;if(e.charCodeAt(i)!==sa)return null;var l=e.indexOf("]",i+1);if(l<0||l>=n)return null;for(var s=i+1,u=1;s<n&&u>0;){var c=e.charCodeAt(s);if(c===ha&&s+1<n)s+=2;else{if(c===ia){var d=Ei(e,s,n);if(d>s){s=d;continue}}if(c===ya){var p=Mi(e,s,n);if(p){s=p.end;continue}var f=Ci(e,s,n);if(f>s){s=f;continue}}c===sa?u++:c===xa&&u--,s++}}if(0!==u)return null;var m=s-1,h=e.slice(i+1,m),g=s<n?e.charCodeAt(s):0,v=!1;if(g===za){var y=!0;for(s++;s<n&&(e.charCodeAt(s)===na||e.charCodeAt(s)===oa);)s++;var b="",x=s;if(s<n&&e.charCodeAt(s)===ya){for(x=++s;x<n&&e.charCodeAt(x)!==ca;)if(e.charCodeAt(x)===ha&&x+1<n)x+=2;else{if(e.charCodeAt(x)===oa){y=!1;break}x++}y&&(x>=n||e.charCodeAt(x)!==ca)&&(y=!1),y&&(b=e.slice(s,x),x++)}else if(y){for(var w=0;x<n;){var E=e.charCodeAt(x);if(E===ha&&x+1<n)x+=2;else{if(E===za)w++;else if(E===Ua){if(0===w)break;w--}else if(E===na||E===oa)break;x++}}b=e.slice(s,x)}if(y){for(s=x;s<n&&(e.charCodeAt(s)===na||e.charCodeAt(s)===oa);)s++;var C;if(s<n){var S=e.charCodeAt(s);if(S===ja||S===La||S===za){for(var O=S===za?41:S,k=++s;s<n&&e.charCodeAt(s)!==O;)e.charCodeAt(s)===ha&&s+1<n&&s++,s++;s>=n?y=!1:(C=e.slice(k,s),s++)}}if(y){for(;s<n&&(e.charCodeAt(s)===na||e.charCodeAt(s)===oa);)s++;(s>=n||e.charCodeAt(s)!==Ua)&&(y=!1)}}if(y){s++,b=Wo(b),void 0!==C&&(C=oo(Wo(C)));var A=null===(a?.sanitizer||lo)(b,o?"img":"a",o?"src":"href")?null:b;if(o){var P=Li(Hi(h,0,h.length,r,a));return{node:{type:eo.image,target:A,alt:P,title:C},end:s}}var T=r.inAnchor;r.inAnchor=!0;var D=T?[{type:eo.text,text:h}]:Hi(h,0,h.length,r,a);return r.inAnchor=T,!r.inAnchor&&Ri(D)?null:{node:{type:eo.link,target:A,title:C,children:D},end:s}}s=m+1,v=!0}var M="",_=s;if(v||g!==sa){if(zo(h))return null;M=Uo(h)}else{var I=s+1;_=I;for(var N=!1;_<n&&e.charCodeAt(_)!==xa;)if(e.charCodeAt(_)===ha&&_+1<n)_+=2;else{if(e.charCodeAt(_)===sa){N=!0;break}_++}if(N||_>=n)return null;var R=e.slice(I,_);if(R.trim())M=Uo(R);else{if(zo(h))return null;M=Uo(h)}_+=1}var L=r.refs[M];if(!L)return null;if(o)return{node:{type:eo.image,target:L.target,alt:Li(Hi(h,0,h.length,r,a)),title:L.title},end:_};var j=r.inAnchor;return r.inAnchor=!0,D=j?[{type:eo.text,text:h}]:Hi(h,0,h.length,r,a),r.inAnchor=j,!r.inAnchor&&Ri(D)?null:{node:{type:eo.link,target:L.target,title:L.title,children:D},end:_}}function Mi(e,t,n){if(e.charCodeAt(t)!==ya)return null;for(var r=t+1;r<n;){var a=e.charCodeAt(r);if(a===ca)break;if(a===na||a===oa||a===aa||a===ya)return null;r++}if(r>=n||e.charCodeAt(r)!==ca)return null;var o=e.slice(t+1,r);return o.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/)?{node:{type:eo.link,target:o,children:[{type:eo.text,text:o}]},end:r+1}:-1!==o.indexOf("@")&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(o)?{node:{type:eo.link,target:"mailto:"+o,children:[{type:eo.text,text:o}]},end:r+1}:null}function _i(e,t,n,r){if(e.charCodeAt(t)!==sa||t+1>=n||e.charCodeAt(t+1)!==ua)return null;let a=t+2;for(;a<n&&e.charCodeAt(a)!==xa&&e.charCodeAt(a)!==oa;)a++;if(a>=n||e.charCodeAt(a)!==xa)return null;let o=e.slice(t+2,a);return o?{node:{type:eo.footnoteReference,target:"#"+fo(o),text:o},end:a+1}:null}function Ii(e,t,n,r){if(r.disableBareUrls)return null;var a="",o=!1,i=e.charCodeAt(t);if(i===Oa||72===i?t+8<=n&&e.charCodeAt(t+1)===Aa&&e.charCodeAt(t+2)===Aa&&e.charCodeAt(t+3)===Pa&&(e.charCodeAt(t+4)===Ta&&e.charCodeAt(t+5)===Ca&&e.charCodeAt(t+6)===Ra&&e.charCodeAt(t+7)===Ra?a="https://":e.charCodeAt(t+4)===Ca&&e.charCodeAt(t+5)===Ra&&e.charCodeAt(t+6)===Ra&&(a="http://")):i===Sa||70===i?t+6<=n&&e.charCodeAt(t+1)===Aa&&e.charCodeAt(t+2)===Pa&&e.charCodeAt(t+3)===Ca&&e.charCodeAt(t+4)===Ra&&e.charCodeAt(t+5)===Ra&&(a="ftp://"):(i===ka||87===i)&&t+4<=n&&e.charCodeAt(t+1)===ka&&e.charCodeAt(t+2)===ka&&e.charCodeAt(t+3)===Na&&(a="www.",o=!0),!a)return null;let l=t+a.length;for(;l<n;){let t=e.charCodeAt(l);if(t===na||t===oa||t===ra||t===aa||t===ya||t===ca)break;l++}for(var s=0,u=0,c=t;c<l;c++){var d=e.charCodeAt(c);d===za?s++:d===Ua&&u++}let p=l;for(;p>t+a.length;){let n=e.charCodeAt(p-1);if(n===Na||n===Ma||n===Ca||n===wa||n===Ia||n===Ua){if(n===Ua){if(s>=u)break;u--}p--}else{if(n!==_a)break;for(var f=p-2;f>t&&(e.charCodeAt(f)>=Ka&&e.charCodeAt(f)<=Ga||e.charCodeAt(f)>=Ya&&e.charCodeAt(f)<=Xa||e.charCodeAt(f)>=qa&&e.charCodeAt(f)<=$a);)f--;f>=t&&e.charCodeAt(f)===Ea?p=f:p--}}if(p<=t+a.length)return null;var m=t+(o?4:a.length),h=e.indexOf("/",m);if((h<0||h>p)&&(h=p),o&&-1===e.indexOf(".",m))return null;for(var g=-1,v=-1,y=h-1;y>=m;y--)if(e.charCodeAt(y)===Na){if(!(g<0)){v=y;break}g=y}for(y=v>=0?v+1:m;y<h;y++)if(e.charCodeAt(y)===va)return null;var b=e.slice(t,p),x=o?"http://"+b:b;return{node:{type:eo.link,target:x,children:[{type:eo.text,text:b}]},end:p}}function Ni(e,t,n,r){if(r.disableBareUrls)return null;for(var a=t,o=a;a<n&&((u=e.charCodeAt(a))>=Ka&&u<=Ga||u>=Ya&&u<=Xa||u>=qa&&u<=$a||u===Na||u===wa||u===da||36===u||u===pa||u===Ea||u===La||u===ga||u===Fa||u===Ra||u===ma||u===Ia||u===ua||u===va||u===ia||u===Ba||u===Va||u===Ha||u===la||u===fa);)a++;if(a===o||a>=n||e.charCodeAt(a)!==ba)return null;for(var i=++a,l=-1,s=a;a<n;){var u;if((u=e.charCodeAt(a))>=Ka&&u<=Ga||u>=Ya&&u<=Xa||u>=qa&&u<=$a)a++;else if((u===fa||u===va)&&a>i)a++;else{if(u!==Na)break;if(a===i)break;var c=e.charCodeAt(a-1);if(c===fa||c===va||a-s>63)break;if(!(a+1<n))break;var d=e.charCodeAt(a+1);if(!(d>=Ka&&d<=Ga||d>=Ya&&d<=Xa||d>=qa&&d<=$a))break;l=a,s=a+1,a++}}if(a-s>63||l<0)return null;var p=e.charCodeAt(a-1);if(!(p>=Ka&&p<=Ga||p>=Ya&&p<=Xa||p>=qa&&p<=$a)||a<=l+1)return null;for(var f=-1,m=l-1;m>=i;m--)if(e.charCodeAt(m)===Na){f=m;break}for(m=f>=0?f+1:i;m<a;m++)if(e.charCodeAt(m)===va)return null;var h=e.slice(t,a);return{node:{type:eo.link,target:"mailto:"+h,children:[{type:eo.text,text:h}]},end:a}}function Ri(e){for(var t=0;t<e.length;t++)if(e[t].type===eo.link||"children"in e[t]&&Array.isArray(e[t].children)&&Ri(e[t].children))return!0;return!1}function Li(e){for(var t="",n=0;n<e.length;n++){var r=e[n];r.type===eo.text?t+=r.text:r.type===eo.breakLine?t+=" ":r.type===eo.codeInline?t+=r.text:"children"in r&&Array.isArray(r.children)?t+=Li(r.children):r.type===eo.image?t+=r.alt||"":r.type===eo.link&&(t+=Li(r.children))}return t}function ji(e){let t=e.includes("&")?oo(e):e;return{type:eo.text,text:t}}function Fi(e,t,n,r,a){if(e.charCodeAt(t)!==ya)return null;var o=t+1;if(o>=n)return null;var i=e.charCodeAt(o);if(i===wa&&o+1<n&&e.charCodeAt(o+1)===fa&&o+2<n&&e.charCodeAt(o+2)===fa){var l=o+3;if(l<n&&e.charCodeAt(l)===ca)return{node:{type:eo.htmlComment,text:"",endsWithGreaterThan:!0},end:l+1};if(l+1<n&&e.charCodeAt(l)===fa&&e.charCodeAt(l+1)===ca)return{node:{type:eo.htmlComment,text:"-",endsWithGreaterThan:!0},end:l+2};var s=e.indexOf("--\x3e",l);return-1!==s&&s<=n-3?{node:{type:eo.htmlComment,text:e.slice(t+4,s)},end:s+3}:null}if(i===Ia){var u=e.indexOf("?>",o+1);return-1!==u&&u<n?{node:{type:eo.htmlSelfClosing,tag:"?",attrs:{},a:e.slice(t,u+2)},end:u+2}:null}if(i===wa&&o+1<n){var c=e.charCodeAt(o+1);if(c===sa&&"[CDATA["===e.slice(o+1,o+8)){var d=e.indexOf("]]>",o+8);return-1!==d&&d<n?{node:{type:eo.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:e.slice(t,d+3)},end:d+3}:null}if(c>=Ka&&c<=Ga){var p=e.indexOf(">",o+2);return-1!==p&&p<n?{node:{type:eo.htmlSelfClosing,tag:"!"+e.slice(o+1,p),attrs:{},a:e.slice(t,p+1)},end:p+1}:null}}if(i===Ra){var f=o+1;if(f>=n)return null;var m=e.charCodeAt(f);if(!(m>=Ka&&m<=Ga||m>=Ya&&m<=Xa))return null;for(f++;f<n;){var h=e.charCodeAt(f);if(!(h>=Ka&&h<=Ga||h>=Ya&&h<=Xa||h>=qa&&h<=$a||h===fa))break;f++}for(;f<n&&(e.charCodeAt(f)===na||e.charCodeAt(f)===ra||e.charCodeAt(f)===oa);)f++;if(f<n&&e.charCodeAt(f)===ca){var g=e.slice(o+1,f).trim();return{node:{type:eo.htmlSelfClosing,tag:g,attrs:{},a:e.slice(t,f+1),b:!0},end:f+1}}return null}if(!(i>=Ka&&i<=Ga||i>=Ya&&i<=Xa))return null;var v=Lo(e,t);if(!v)return null;var y=v.tag,b=y.toLowerCase();if(v.selfClosing||go(y))return{node:{type:eo.htmlSelfClosing,tag:y,attrs:pi(v.attrs,y,a),a:e.slice(t,v.end)},end:v.end};var x=Do.has(b),w=hi(e.slice(0,n),v.end,y);if(-1===w)return{node:{type:eo.htmlSelfClosing,tag:y,attrs:pi(v.attrs,y,a),a:e.slice(t,v.end)},end:v.end};var E=function(e,t,n){let r=t.length;var a=t.charCodeAt(0);a>=Ka&&a<=Ga&&(a+=Ja);for(let i=Math.min(n,e.length-r);i>=0;i--){var o=e.charCodeAt(i);if(o>=Ka&&o<=Ga&&(o+=Ja),o!==a)continue;let n=!0;for(let a=1;a<r;a++){let r=e.charCodeAt(i+a),o=t.charCodeAt(a);if(r>=Ka&&r<=Ga&&(r+=Ja),o>=Ka&&o<=Ga&&(o+=Ja),r!==o){n=!1;break}}if(n)return i}return-1}(e,"</"+b,w),C=e.slice(v.end,E),S=[];if(x)C.trim()&&(S=[{type:eo.text,text:C}]);else{var O=C.trim();if(O){var{inAnchor:k,inline:A}=r;"a"===b&&(r.inAnchor=!0),-1!==O.indexOf("\n\n")||/^#{1,6}\s/.test(O)?(r.inline=!1,S=Ui(O,r,a)):S=Hi(O,0,O.length,r,a),r.inAnchor=k,r.inline=A}}return{node:{type:eo.htmlBlock,tag:y,attrs:pi(v.attrs,y,a),e:v.rawAttrs,children:S,text:C,c:!1},end:w}}var Vi=200,Bi=0;function Hi(e,t,n,r,a){if(++Bi>Vi)return Bi--,[{type:eo.text,text:e.slice(t,n)}];let o=r;if(a.streaming||a.optimizeForStreaming){let r=function(e,t){for(var n=1,r=t+1;r<e.length;r++){var a=e.charCodeAt(r);if(a===sa)n++;else if(a===xa&&0==--n)return r}return-1},a=e.slice(t,n),o=a;for(var i=0,l=0,s=0,u=0,c=0,d=-1,p=-1,f=-1,m=-1,h=-1,g=0;g<a.length;g++){var v=a.charCodeAt(g);v===ga?g+1<a.length&&a.charCodeAt(g+1)===ga?(i++,d=g,g++):(l++,p=g):v===va?g+1<a.length&&a.charCodeAt(g+1)===va?(s++,f=g,g++):(u++,m=g):v===la&&g+1<a.length&&a.charCodeAt(g+1)===la&&(c++,h=g,g++)}var y=[];c%2==1&&h>=0&&y.push([h,2]),s%2==1&&f>=0&&y.push([f,2]),u%2==1&&m>=0&&y.push([m,1]),i%2==1&&d>=0&&y.push([d,2]),l%2==1&&p>=0&&y.push([p,1]),y.sort((function(e,t){return t[0]-e[0]}));for(var b=0;b<y.length;b++){var x=y[b][0],w=y[b][1];a=a.slice(0,x)+a.slice(x+w)}let j=0,F=-1;for(let e=0;e<a.length;e++)a.charCodeAt(e)===ia&&(j++,F=e);if(j%2==1&&-1!==F){let e=!1,t=-1,n=0;for(;n<a.length;)a.charCodeAt(n)===ia&&(e?(e=!1,t=-1):(t=n,e=!0)),n++;e&&-1!==t&&(a=a.slice(0,t))}for(var E=!0;E;){E=!1;for(var C=-1,S=-1,O=-1,k=!1,A=0;A<a.length;A++)if(a.charCodeAt(A)===sa&&(0===A||a.charCodeAt(A-1)!==ha)){var P=A>0&&a.charCodeAt(A-1)===wa,T=P?A-1:A,D=r(a,A);if(-1===D)C=T,k=P,S=A+1,O=a.length;else{var M=D+1;if(M>=a.length)C=T,k=P,S=A+1,O=D;else if(a.charCodeAt(M)===za){var _=a.indexOf(")",M+1);-1===_?(C=T,k=P,S=A+1,O=D,A=a.length):A=_}else if(a.charCodeAt(M)===sa){var I=a.indexOf("]",M+1);-1===I?(C=T,k=P,S=A+1,O=D,A=a.length):A=I}else A=D}}if(C>=0){var N=k?"":a.slice(S,O);a=a.slice(0,C)+N,E=!0}}let V=a.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(V&&void 0!==V.index){for(var R=0,L=0;L<V.index;L++)a.charCodeAt(L)===ia&&R++;R%2!=1&&-1===fi(a,"</"+V[1],0)&&(a=a.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/,"$1"))}a!==o&&(e=e.slice(0,t)+a,n=t+a.length)}let j=[];var F=[];let V=t;var B=a.disableAutoLink||a.disableBareUrls||o.inAnchor?-1:e.indexOf("@",t);for(B>=n&&(B=-1);t<n;){let r=e.charCodeAt(t),i=null;if(r===ia)i=wi(e,t,n),i||(t+=Yo(e,t,n,ia)-1);else if(r===ga||r===va){var H=Ti(e,t,n);if(H){if(H.canOpen||H.canClose){t>V&&j.push(ji(e.slice(V,t)));var z=ji(e.slice(t,t+H.len));F.push({idx:j.length,ch:r,len:H.len,canOpen:H.canOpen,canClose:H.canClose,active:!0}),j.push(z),V=t+=H.len;continue}t+=H.len-1}}else r===la?i=Si(e,t,n,o,a):r===ma?i=Oi(e,t,n,o,a):r===sa?(t+1<n&&e.charCodeAt(t+1)===ua&&(i=_i(e,t,n)),i||(i=Di(e,t,n,o,a))):r===wa&&t+1<n&&e.charCodeAt(t+1)===sa?i=Di(e,t,n,o,a):r===ya?(i=Mi(e,t,n),!i&&!a.disableParsingRawHTML&&!a.ignoreHTMLBlocks&&(i=Fi(e,t,n,o,a))):(r===Oa||r===ka||r===Sa)&&!o.inAnchor&&!a.disableAutoLink&&(0===t||e.charCodeAt(t-1)!==ya)&&(i=Ii(e,t,n,a));if(!i&&B>=0&&B-t<=64&&!o.inAnchor&&!a.disableAutoLink&&!a.disableBareUrls&&(r>=Ka&&r<=Ga||r>=Ya&&r<=Xa||r>=qa&&r<=$a)&&(i=Ni(e,t,n,a),!i&&t>=B&&(B=e.indexOf("@",t+1))>=n&&(B=-1)),r!==Wa)if(i)t>V&&j.push(ji(e.slice(V,t))),j.push(i.node),V=t=i.end;else{if(r===ha&&t+1<n&&Zo(e.charCodeAt(t+1))&Bo){t>V&&j.push(ji(e.slice(V,t))),j.push(ji(e[t+1])),V=t+=2;continue}if(t++,B<0||B-t>64)for(;t<n;){var U=e.charCodeAt(t);if(!(U<Qa)||Io[U])break;t++}}else t>V&&j.push(ji(e.slice(V,t))),j.push({type:eo.breakLine}),V=++t}if(n>V){let t=e.slice(V,n);(a.streaming||a.optimizeForStreaming)&&(t=t.replace(/\*\*([^*]+)$/,"$1"),t.match(/\*[^*]+$/)&&(t=t.replace(/\*([^*]+)$/,"$1")),t=t.replace(/__([^_]+)$/,"$1"),t.match(/_[^_]+$/)&&(t=t.replace(/_([^_]+)$/,"$1")),t=t.replace(/~~([^~]+)$/,"$1"),t=t.replace(/\[([^\]]+)$/,"$1"),t=t.replace(/\[([^\]]+)\]\([^)]*$/,"$1")),t&&j.push(ji(t))}return F.length>0&&function(e,t){if(0!==t.length){for(var n=[],r=0;r<12;r++)n[r]=-1;for(var a=0;a<t.length;){var o=t[a];if(o.active&&o.canClose){for(var i=6*(o.ch===ga?0:1)+o.len%3*2+(o.canOpen?1:0),l=void 0!==n[i]?n[i]:-1,s=-1,u=a-1;u>l;u--){var c=t[u];if(c.active&&c.ch===o.ch&&c.canOpen&&(!o.canOpen&&!c.canClose||(c.len+o.len)%3!=0||c.len%3==0)){s=u;break}}if(s<0)n[i]=a-1,!o.canOpen&&(o.active=!1),a++;else{var d=t[s],p=d.len>=2&&o.len>=2,f=p?2:1;d.len-=f,o.len-=f;var m=e[d.idx],h=e[o.idx];m.text=m.text.slice(0,m.text.length-f),h.text=h.text.slice(f);var g=d.idx+1,v=o.idx,y=e.slice(g,v),b={type:eo.textFormatted,tag:p?"strong":"em",children:y};e.splice(g,v-g,b);for(var x=v-g-1,w=0;w<t.length;w++)t[w].idx>d.idx&&(t[w].idx-=x);for(var E=s+1;E<a;E++)t[E].active=!1;if(0===d.len&&(d.active=!1,""===m.text)){e.splice(d.idx,1);for(var C=0;C<t.length;C++)t[C].idx>d.idx?t[C].idx--:t[C].idx===d.idx&&(t[C].idx=-1)}if(0===o.len){o.active=!1;var S=o.idx;if(""===h.text){e.splice(S,1);for(var O=0;O<t.length;O++)t[O].idx>S?t[O].idx--:t[O].idx===S&&(t[O].idx=-1)}a++}}}else a++}for(var k=0,A=0;A<e.length;A++){var P=e[A];if(P.type===eo.text){var T=P;if(""===T.text)continue;if(k>0&&e[k-1].type===eo.text){e[k-1].text+=T.text;continue}}e[k++]=P}e.length=k}}(j,F),Bi--,j}var zi=500;function Ui(e,t,n){var r=t.g||0;if(r>zi)return[{type:eo.text,text:e}];if(t.g=r+1,n.streaming||n.optimizeForStreaming){var a=e.length;a>0&&e.charCodeAt(a-1)===oa&&a--;for(var o=a;o>0&&e.charCodeAt(o-1)!==oa;)o--;if(o>0&&e.charCodeAt(o)===Va){for(var i=!0,l=o;l<a;l++){var s=e.charCodeAt(l);if(s!==na&&s!==ra&&s!==fa&&s!==Ca&&s!==Va){i=!1;break}}if(i){for(var u=o-1;u>0&&e.charCodeAt(u-1)!==oa;)u--;e.charCodeAt(u)===Va&&(e=e.slice(0,u).trimEnd())}}var c=e.trim(),d=c.lastIndexOf("\n"),p=-1===d?c:c.slice(d+1);if(p.length>0&&p.charCodeAt(0)===Va){for(var f=!1,m=!1,h=1;h<p.length;h++){var g=p.charCodeAt(h);g===Va&&(f=!0),g===fa&&(m=!0)}f&&m&&(e=-1===d?"":e.slice(0,e.lastIndexOf(p)).trimEnd())}for(var v=-1,y=-1,b=-1,x=e.length-1;x>=0;x--)if(e.charCodeAt(x)===ya){var w=x+1<e.length?e.charCodeAt(x+1):0;if(w>=Ka&&w<=Ga||w>=Ya&&w<=Xa){for(var E=x+2;E<e.length;){var C=e.charCodeAt(E);if(!(C>=Ka&&C<=Ga||C>=Ya&&C<=Xa||C>=qa&&C<=$a))break;E++}for(var S=E;S<e.length&&e.charCodeAt(S)!==ca;)S++;if(S<e.length){for(var O=!1,k=S+1;k<e.length;k++)if(e.charCodeAt(k)===ya){O=!0;break}O||(v=x,y=E,b=S+1)}}break}if(v>=0){for(var A=0,P=0;P<v;P++)e.charCodeAt(P)===ia&&A++;if(A%2==0){var T=e.slice(v+1,y);-1===fi(e,"</"+T,0)&&(e=e.slice(0,v)+e.slice(b))}}var D=e.length;if(D>0){for(var M=e.lastIndexOf("\n"),_=-1===M?0:M+1,I=D,N=_,R=0;N<I&&e.charCodeAt(N)===na&&R<3;)N++,R++;if(N<I){var L=e.charCodeAt(N),j=!1;if(L===ga||L===fa||L===Fa){var F=N+1;if(F>=I||e.charCodeAt(F)===na||e.charCodeAt(F)===ra){for(var V=F;V<I&&(e.charCodeAt(V)===na||e.charCodeAt(V)===ra);)V++;V>=I&&(j=!0)}}else if(L>=qa&&L<=$a){for(var B=N;B<I&&e.charCodeAt(B)>=qa&&e.charCodeAt(B)<=$a;)B++;if(B<I&&(e.charCodeAt(B)===Na||e.charCodeAt(B)===Ua)){var H=B+1;if(H>=I||e.charCodeAt(H)===na||e.charCodeAt(H)===ra){for(var z=H;z<I&&(e.charCodeAt(z)===na||e.charCodeAt(z)===ra);)z++;z>=I&&(j=!0)}}}j&&(e=e.slice(0,_).trimEnd())}}}if(t.inline)return Hi(e,0,e.length,t,n);let U=[],Z=0,W=e.length;if(0===Z&&e.startsWith("---")){let t=function(e){if(!mo(e,"---"))return null;let t=3;for(;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;if(t<e.length&&"\r"===e[t]&&t++,t>=e.length||"\n"!==e[t])return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&"\n"!==e[t]&&"\r"!==e[t];)t++;if(t>=e.length)break;let a=t;if("\r"===e[t]&&t++,t<e.length&&"\n"===e[t]&&t++,mo(e,"---",r))return{endPos:t,hasValidYaml:n};let o=e.indexOf(":",r);-1!==o&&o<a&&(n=!0)}return null}(e);if(t&&t.hasValidYaml){if(!1!==n.preserveFrontmatter){let n=e.slice(0,t.endPos).trimEnd();U.push({type:eo.frontmatter,text:n})}Z=t.endPos}}for(;Z<W;){for(var q=e.indexOf("\n",Z),$=q<0?W:q;Z<W&&ei(e,Z,$);)Z=$<W?$+1:$,Z<W&&($=(q=e.indexOf("\n",Z))<0?W:q);if(Z>=W)break;e.charCodeAt(Z),Jo(e,Z,$);let r=null;if(e.charCodeAt(Z)!==Za&&Xo>=4&&!t.inHTML)r=ai(e,Z);else if(e.charCodeAt(Z)!==Za){let a=Z+Qo,o=e.charCodeAt(a);o===da?r=ti(e,Z,t,n):o===ca?r=oi(e,Z,t,n):o===ia||o===la?r=ri(e,Z):o===fa||o===ga||o===va?(r=ni(e,Z),!r&&(r=ci(e,Z,t,n))):o===Fa||o>=qa&&o<=$a?r=ci(e,Z,t,n):o===ya?r=gi(e,Z,t,n):o===Va?r=yi(e,Z,t,n):o===sa&&(r=bi(e,Z,t))}if(!r){for(var K=!1,G=Z;G<$;G++)if(e.charCodeAt(G)===Va){K=!0;break}K&&(r=yi(e,Z,t,n))}if(r||(r=xi(e,Z,t,n)),r)r.node.type!==eo.refCollection&&U.push(r.node),Z=r.end;else{var Y=e.indexOf("\n",Z);Z=Y<0?W:Y+1}}return t.g=r,U}function Zi(e,t,n,r){var a=Lo(e,t);return a?{tagName:a.tag,tagLower:a.tag.toLowerCase(),attrs:a.rawAttrs,whitespaceBeforeAttrs:a.whitespaceBeforeAttrs,isSelfClosing:a.selfClosing,hasSpaceBeforeSlash:a.hasSpaceBeforeSlash,isClosing:a.isClosing,hasNewline:a.whitespaceBeforeAttrs.includes("\n")||a.rawAttrs.includes("\n"),endPos:a.end}:null}function Wi(e,t,n){Bi=0,e=function(e){var t=e.indexOf("\r"),n=e.indexOf("\0");if(-1===t&&-1===n)return e;var r=e.length;xo.length=0;var a=0,o=0;for(o=-1===t?n:-1===n||t<n?t:n;o<r;o++){var i=e.charCodeAt(o);i===aa?(a<o&&xo.push(e.slice(a,o)),o+1<r&&e.charCodeAt(o+1)===oa&&o++,xo.push("\n"),a=o+1):0===i&&(a<o&&xo.push(e.slice(a,o)),xo.push("�"),a=o+1)}return a<r&&xo.push(e.slice(a)),xo.join("")}(e),!t.refs&&(t.refs={}),jo(e,t.refs);let r=Ui(e,t,n);return t.refs&&Object.keys(t.refs).length>0?[{type:eo.refCollection,refs:t.refs},...r]:r}var qi,$i=/^\n+/;try{qi=r.createElement("div").$$typeof}catch{qi=Symbol.for("react.transitional.element")}function Ki(e,t,n){return{$$typeof:qi,type:e,key:null!=n?""+n:null,ref:null,props:t,h:null}}var Gi=typeof r.createContext<"u"?r.createContext(void 0):void 0;function Yi(e,t,n,a,o,i,l,s){switch(e.type){case eo.blockQuote:{let r={key:n.key};return e.alert&&(r.className="markdown-alert-"+i(e.alert.toLowerCase(),fo),e.children.unshift({attrs:{},children:[{type:eo.text,text:e.alert}],c:!0,type:eo.htmlBlock,tag:"header"})),a("blockquote",r,t(e.children,n))}case eo.breakLine:return a("br",{key:n.key});case eo.breakThematic:return a("hr",{key:n.key});case eo.frontmatter:return s.preserveFrontmatter?a("pre",{key:n.key},e.text):null;case eo.codeBlock:let h=e.lang?oo(e.lang):"";return a("pre",{key:n.key},a("code",{...ro(e.attrs||{}),className:h?`language-${h} lang-${h}`:""},e.text));case eo.codeInline:return a("code",{key:n.key},e.text);case eo.footnoteReference:return a("a",{key:n.key,href:o(e.target,"a","href")||void 0},a("sup",{key:n.key},e.text));case eo.gfmTask:return a("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"});case eo.heading:return a(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case eo.htmlBlock:{let h=e;if(s.tagfilter&&Oo(h.tag)){var u="";if(h.attrs)for(var c in h.attrs)!0===(m=h.attrs[c])?u+=" "+c:null!=m&&!1!==m&&(u+=" "+c+'="'+String(m)+'"');return a("span",{key:n.key},"<"+h.tag+u+">")}if(h.a&&h.c){let u=function(e){if((e.type===eo.htmlSelfClosing||e.type===eo.htmlBlock)&&e.b)return[];if(e.type===eo.paragraph){let t=e.children;return t?t.flatMap(u):[]}return e.type===eo.text?e.text?.trim()?[e]:[]:e.type===eo.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(u)}]:[e]},c=function(e){for(var t=0;t<e.length;t++)e[t].type===eo.htmlBlock&&(e[t].c=!1),"children"in e[t]&&e[t].children&&c(e[t].children)},m=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===eo.paragraph&&r.children)for(var a=r.children,o=0;o<a.length;o++){var i=a[o];if(i.type===eo.htmlSelfClosing&&i.b&&i.tag.toLowerCase()===t){var l=e.slice(0,n);o>0&&l.push({type:eo.paragraph,children:a.slice(0,o)});var s=[];if(o+1<a.length){var u=a.slice(o+1);(u=u.filter((function(e){return!(e.type===eo.htmlSelfClosing&&e.b)}))).length>0&&(s=u)}return{found:!0,beforeClose:l,afterClose:s=s.concat(e.slice(n+1))}}}if((r.type===eo.htmlSelfClosing||r.type===eo.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}},g=h.tag.toLowerCase(),v=function(e){return Do.has(e)}(g),y=h.children&&h.children.length>0,b=/<[a-z][^>]{0,100}>/i.test(h.a);if(v){let t=h.a.replace(new RegExp("\\s*</"+g+">\\s*$","i"),"");return s.tagfilter&&(t=ko(t)),b?a(e.tag,{key:n.key,...ro(e.attrs||{}),dangerouslySetInnerHTML:{__html:t}}):a(e.tag,{key:n.key,...ro(e.attrs||{})},t)}let x=new RegExp(`^<${h.tag}(\\s|>)`,"i").test(h.a);if(y&&!x&&s.tagfilter&&function(e){return So.lastIndex=0,So.test(e)}(h.a))return a(e.tag,{key:n.key,...ro(e.attrs||{})},t(h.children,n));if(function(e){return Mo.test(e)}(h.a)){let t=s.tagfilter?ko(h.a):h.a;return a(e.tag,{key:n.key,...ro(e.attrs||{}),dangerouslySetInnerHTML:{__html:t}})}let w={slugify:e=>i(e,fo),sanitizer:o,tagfilter:!0},E=h.a.replace(/>\s+</g,"><").replace(/\n+/g," ").trim();if(new RegExp(`^<${h.tag}(\\s[^>]*)?>(\\s*</${h.tag}>)?$`,"i").test(E))return h.children&&h.children.length>0?a(e.tag,{key:n.key,...ro(e.attrs||{})},t(h.children,n)):a(e.tag,{key:n.key,...ro(e.attrs||{})});let C=Wi(E,{inline:!1,refs:l,inHTML:!1},w);c(C);let S=h.tag.toLowerCase(),O="</"+S+">",k=new RegExp(`^<${h.tag}(\\s|>)`,"i").test(E),A=E.toLowerCase().trimEnd().endsWith(O),P=k&&A;if(P&&y)return a(e.tag,{key:n.key,...ro(e.attrs||{})},t(h.children,n));if(P)return t(C.flatMap(u),n);var d=m(C,S);if(d.found&&d.afterClose.length>0){var p=d.beforeClose.flatMap(u),f=d.afterClose.flatMap(u);return Ki(r.Fragment,{children:[a(e.tag,{key:n.key,...ro(e.attrs||{})},t(p,n)),t(f,n)]},null)}return a(e.tag,{key:n.key,...ro(e.attrs||{})},t(C.flatMap(u),n))}return go(e.tag)?a(e.tag,{key:n.key,...ro(e.attrs||{})}):a(e.tag,{key:n.key,...ro(e.attrs||{})},e.children?t(e.children,n):"")}case eo.htmlSelfClosing:{let t=e;if(s.tagfilter&&Oo(t.tag)){if(u="",t.attrs)for(var c in t.attrs){var m;!0===(m=t.attrs[c])?u+=" "+c:null!=m&&!1!==m&&(u+=" "+c+'="'+String(m)+'"')}return a("span",{key:n.key},"<"+t.tag+u+" />")}return a(e.tag,{key:n.key,...ro(e.attrs||{})})}case eo.image:{let t=null!=e.target?o(e.target,"img","src"):null;return a("img",{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case eo.link:{let r={key:n.key};return null!=e.target&&(r.href=function(e){for(var t=!1,n=0;n<e.length;n++)if((a=e.charCodeAt(n))<=na||a===ja||a===pa||a===ya||a===ca||a===sa||a===ha||a===xa||a===ua||a===ia||a>=123){t=!0;break}if(!t)return e;var r="";for(n=0;n<e.length;n++){var a;if((a=e.charCodeAt(n))===pa&&n+2<e.length){var o=e.charCodeAt(n+1),i=e.charCodeAt(n+2);if((o>=qa&&o<=$a||o>=Ka&&o<=70||o>=Ya&&o<=Sa)&&(i>=qa&&i<=$a||i>=Ka&&i<=70||i>=Ya&&i<=Sa)){r+=e[n]+e[n+1]+e[n+2],n+=2;continue}}r+=encodeURI(e[n])}return r}(e.target)),e.title&&(r.title=e.title),a("a",r,t(e.children,n))}case eo.table:{let r=e;return a("table",{key:n.key},a("thead",null,a("tr",null,r.header.map((function(e,o){return a("th",{key:o,style:null==r.align[o]?{}:{textAlign:r.align[o]}},t(e,n))})))),a("tbody",null,r.cells.map((function(e,o){return a("tr",{key:o},e.map((function(e,o){return a("td",{key:o,style:null==r.align[o]?{}:{textAlign:r.align[o]}},t(e,n))})))}))))}case eo.text:return e.text;case eo.textFormatted:return a(e.tag,{key:n.key},t(e.children,n));case eo.orderedList:case eo.unorderedList:{let r=e.type===eo.orderedList?"ol":"ul";return a(r,{key:n.key,start:e.type===eo.orderedList?e.start:void 0},e.items.map((function(e,r){return a("li",{key:r},t(e,n))})))}case eo.paragraph:return a("p",{key:n.key},t(e.children,n));case eo.ref:default:return null}}function Xi(e="",t={}){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||fo,a=n.sanitizer||lo,o={};return function(e){let t=n.forceInline||!n.forceBlock&&!ao.test(e),i={...n,slugify:e=>r(e,fo),sanitizer:a,tagfilter:!1!==n.tagfilter};t||jo(e,o);let l=e;if(!t){let e=l.length;for(;e>0&&("\n"===l[e-1]||"\r"===l[e-1]);)e--;l=l.slice(0,e),l=`${l.replace($i,"")}\n\n`}if(n.optimizeForStreaming){let e=l.lastIndexOf("<");-1!==e&&-1===l.slice(e).indexOf(">")&&(l=l.slice(0,e))}return function(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||fo,a=n.sanitizer||lo,o=n.createElement,i=n.overrides&&Object.keys(n.overrides).length>0,l=e=>Xi(e,{...n,wrapper:null});function s(e,t,...r){var a=t||{};for(var s in a){var u=a[s];if("string"==typeof u&&u.length>0&&u.charCodeAt(0)===ya&&(Ao.test(u)||Po.test(u)||Zi(u,0))){var c=l(u.trim());a[s]="innerHTML"===s&&Array.isArray(c)?c[0]:c}}var d=e;if(i){var p=wo(n.overrides,e+".props",{});d=((e,t)=>{let n=wo(t,e,void 0);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:wo(t,`${e}.component`,e):e})(e,n.overrides),a={...a,...p,className:Eo(a.className,p.className)||void 0}}if(!o){var f=a.key;return null!=f&&delete a.key,1===r.length?a.children=r[0]:r.length>1&&(a.children=r),Ki(d,a,f)}return o(d,a,...r)}let u={...n,slugify:e=>r(e,fo),sanitizer:a,tagfilter:!1!==n.tagfilter},c=e[0]&&e[0].type===eo.refCollection?e[0].refs:{},d=((e,t,n,r,a,o)=>{var i=(l,s={})=>{var u=(s.renderDepth||0)+1;if(u>2500)return(e=>e.map((function(e){return"text"in e?e.text:""})))(l);s.renderDepth=u;for(var c=s.key,d=[],p=!1,f=0;f<l.length;f++){var m;if(s.key=f,e){var h=Yi.bind(null,l[f],i,s,t,n,r,a,o);m=e(h,l[f],i,s)}else m=Yi(l[f],i,s,t,n,r,a,o);var g="string"==typeof m;if(g&&p)d[d.length-1]+=m;else if(null!==m)if(Array.isArray(m))for(var v=0;v<m.length;v++)d.push(m[v]);else d.push(m);p=g}return s.key=c,s.renderDepth=u-1,d};return i})(n.renderRule,s,a,r,c,n),p=d(e,{inline:n.forceInline,refs:c}),f=[];for(let e in c)e.charCodeAt(0)===ua&&f.push({identifier:e,footnote:c[e].target});if(f.length&&p.push(s("footer",{key:"footer"},f.map((function(e){let t=e.identifier.charCodeAt(0)===ua?e.identifier.slice(1):e.identifier,n=Wi(e.footnote,{inline:!0,refs:c},u);return s("div",{id:r(t,fo),key:e.identifier},t+": ",d(n,{inline:!0,refs:c}))})))),null===n.wrapper)return p;let m,h=n.wrapper||(n.forceInline?"span":"div");if(!(p.length>1||n.forceWrapper))return 1===p.length?p[0]:null;m=p;var g=n.wrapperProps?{...n.wrapperProps}:{};return g.children=m,Ki(h,g,"outer")}(Wi(t?e:l,{inline:t,refs:o},i),{...i,forceInline:t})}(e)}var Qi=({children:e,options:t,...n})=>{if(!(typeof r.useContext<"u"))return Xi(e??"",{...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}});let a=r.useContext(Gi),o=r.useMemo((()=>({...a,...t,overrides:{...a?.overrides,...t?.overrides},wrapperProps:{...a?.wrapperProps,...t?.wrapperProps,...n}})),[a,t,n]),i=e??"";return r.useMemo((()=>Xi(i,o)),[i,o])};class Ji extends a().Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.onError?.(e,t)}render(){return this.state.error?this.props.fallback:this.props.children}}const el=JSON.parse('{"error":"Markdown_error__L29wd","root":"Markdown_root__L29wd","tableWrapper":"Markdown_tableWrapper__L29wd"}');Vr('\n/* Error fallback when markdown fails to parse */\n.Markdown_error__L29wd {\n\twhite-space: pre-wrap;\n\tword-break: break-word;\n}\n\n/* ── Root ── */\n.Markdown_root__L29wd {\n\tword-wrap: break-word;\n\tline-height: 1.5;\n\tfont-family: "Roboto Flex", sans-serif;\n\tfont-size: 14px;\n\tfont-weight: 400;\n\tletter-spacing: 0.15px;\n\tcolor: var(--reltio-color-text);\n}\n\n/* ── Paragraphs ── */\n.Markdown_root__L29wd p {\n\tmargin: 8px 0 7px 0;\n\tline-height: 1.5;\n}\n\n.Markdown_root__L29wd p:not(:last-child) {\n\tmargin-bottom: 0.5rem;\n}\n\n/* ── Headings ── */\n.Markdown_root__L29wd h1,\n.Markdown_root__L29wd h2,\n.Markdown_root__L29wd h3,\n.Markdown_root__L29wd h4,\n.Markdown_root__L29wd h5,\n.Markdown_root__L29wd h6 {\n\tmargin: 1rem 0 0.5rem 0;\n\tfont-weight: 600;\n\tfont-family: "Libre Franklin", sans-serif;\n}\n\n.Markdown_root__L29wd h1 {\n\tfont-size: 1.5rem;\n}\n\n.Markdown_root__L29wd h2 {\n\tfont-size: 1.25rem;\n}\n\n.Markdown_root__L29wd h3 {\n\tfont-size: 1.1rem;\n}\n\n.Markdown_root__L29wd h4 {\n\tfont-size: 1rem;\n}\n\n.Markdown_root__L29wd h5 {\n\tfont-size: 0.95rem;\n}\n\n.Markdown_root__L29wd h6 {\n\tfont-size: 0.9rem;\n}\n\n/* ── Emphasis ── */\n.Markdown_root__L29wd strong {\n\tfont-weight: 600;\n}\n\n.Markdown_root__L29wd em {\n\tfont-style: italic;\n}\n\n/* ── Lists ── */\n.Markdown_root__L29wd ul,\n.Markdown_root__L29wd ol {\n\tmargin: 0.5rem 0;\n\tpadding-left: 1.5rem;\n}\n\n.Markdown_root__L29wd li {\n\tmargin: 0.25rem 0;\n}\n\n/* ── Code ── */\n.Markdown_root__L29wd pre {\n\toverflow-x: auto;\n\tmargin: 0;\n\tbackground-color: var(--reltio-color-surface-2);\n\tborder-radius: 8px;\n\tpadding: 16px;\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n.Markdown_root__L29wd code {\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n\tbackground-color: var(--reltio-color-surface-2);\n\tpadding: 0.2em 0.4em;\n\tborder-radius: 3px;\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n.Markdown_root__L29wd pre code {\n\tbackground-color: transparent;\n\tpadding: 0;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n/* ── Links ── */\n.Markdown_root__L29wd a {\n\tcolor: var(--reltio-color-primary);\n\ttext-decoration: underline;\n}\n\n.Markdown_root__L29wd a:hover {\n\ttext-decoration: none;\n}\n\n/* ── Blockquote ── */\n.Markdown_root__L29wd blockquote {\n\tborder-left: 4px solid var(--reltio-color-border-2);\n\tmargin: 1rem 0;\n\tpadding-left: 1rem;\n\tcolor: var(--reltio-color-text-secondary);\n}\n\n/* ── Tables ── */\n.Markdown_tableWrapper__L29wd {\n\twidth: 100%;\n\tborder: 1px solid var(--reltio-color-border-2);\n\tborder-radius: 16px;\n\toverflow: auto;\n}\n\n.Markdown_tableWrapper__L29wd table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\tfont-family: "Roboto Flex", sans-serif;\n\tcolor: var(--reltio-color-text);\n\tbackground-color: var(--reltio-color-surface-1);\n\tfont-size: 14px;\n}\n\n.Markdown_tableWrapper__L29wd thead {\n\tposition: sticky;\n\ttop: 0;\n\tz-index: 1;\n\tbox-shadow: 0 1px 0 var(--reltio-color-border-2);\n}\n\n.Markdown_tableWrapper__L29wd th {\n\tpadding: 16px;\n\tfont-weight: 600;\n\ttext-align: left;\n\tborder-right: 1px solid var(--reltio-color-border-2);\n\tbackground-color: var(--reltio-color-surface-2);\n}\n\n.Markdown_tableWrapper__L29wd th:last-child {\n\tborder-right: none;\n}\n\n.Markdown_tableWrapper__L29wd td {\n\tpadding: 8px 16px;\n\tborder-bottom: 1px solid var(--reltio-color-border-2);\n\tborder-right: 1px solid var(--reltio-color-border-2);\n\ttext-align: left;\n\tbackground-color: var(--reltio-color-surface-1);\n}\n\n.Markdown_tableWrapper__L29wd td:last-child {\n\tborder-right: none;\n}\n\n.Markdown_tableWrapper__L29wd tr:hover td {\n\tbackground-color: var(--reltio-color-surface-2);\n}\n\n.Markdown_tableWrapper__L29wd tr:last-child td {\n\tborder-bottom: none;\n}\n\n/* ── Strikethrough ── */\n.Markdown_root__L29wd del {\n\ttext-decoration: line-through;\n\tcolor: var(--reltio-color-text-placeholder);\n}\n\n/* ── Checkboxes ── */\n.Markdown_root__L29wd input[type="checkbox"] {\n\tmargin-right: 8px;\n\tcursor: not-allowed;\n}\n\n/* ── Horizontal rule ── */\n.Markdown_root__L29wd hr {\n\tborder: none;\n\tborder-top: 1px solid var(--reltio-color-border-2);\n\tmargin: 1.5rem 0;\n}\n');const tl=el,nl=({size:e="medium",color:t="inherited",className:n,style:r,"aria-label":a})=>(0,Wn.jsxs)("svg",{className:Br(Wr.root,Wr[e],Wr[t],n),style:r,viewBox:"0 0 24 24","aria-hidden":!a,"aria-label":a,role:a?"img":void 0,children:[(0,Wn.jsx)("path",{d:"M14,15c-.26,0-.51-.1-.71-.29-.39-.39-.39-1.02,0-1.41l1.29-1.29-1.29-1.29c-.39-.39-.39-1.02,0-1.41s1.02-.39,1.41,0l2,2c.39.39.39,1.02,0,1.41l-2,2c-.2.2-.45.29-.71.29ZM10,15c-.26,0-.51-.1-.71-.29l-2-2c-.39-.39-.39-1.02,0-1.41l2-2c.39-.39,1.02-.39,1.41,0s.39,1.02,0,1.41l-1.29,1.29,1.29,1.29c.39.39.39,1.02,0,1.41-.2.2-.45.29-.71.29Z"}),(0,Wn.jsx)("path",{d:"M12,22c-1.32,0-2.61-.26-3.83-.76-1.22-.5-2.31-1.23-3.24-2.17s-1.66-2.03-2.17-3.24c-.51-1.22-.76-2.51-.76-3.83s.26-2.61.76-3.83c.5-1.22,1.23-2.31,2.17-3.24.93-.93,2.02-1.66,3.24-2.17,2.44-1.01,5.21-1.01,7.65,0,1.22.5,2.31,1.23,3.24,2.17s1.66,2.02,2.17,3.24c.51,1.22.76,2.51.76,3.83s-.26,2.61-.76,3.83c-.5,1.22-1.23,2.31-2.17,3.24-.94.93-2.03,1.66-3.25,2.17s-2.51.76-3.83.76ZM12,4c-1.06,0-2.09.21-3.06.61-.98.4-1.85.99-2.59,1.73-.75.75-1.33,1.62-1.73,2.6-.4.98-.61,2.01-.61,3.06s.21,2.09.61,3.06.99,1.85,1.73,2.6c.75.75,1.62,1.33,2.6,1.73,1.95.81,4.18.81,6.12,0,.98-.4,1.85-.99,2.6-1.73.75-.75,1.33-1.62,1.73-2.6.4-.97.61-2,.61-3.06s-.21-2.09-.61-3.06c-.4-.98-.99-1.85-1.73-2.6-.75-.75-1.62-1.33-2.6-1.73s-2.01-.61-3.06-.61Z"})]}),rl=JSON.parse('{"root":"Details_root__L29wd","summary":"Details_summary__L29wd","icon":"Details_icon__L29wd","summaryText":"Details_summaryText__L29wd","chevron":"Details_chevron__L29wd","chevronOpen":"Details_chevronOpen__L29wd","content":"Details_content__L29wd"}');Vr('\n.Details_root__L29wd {\n\tmargin: 1rem 0;\n\tbackground-color: var(--reltio-color-surface-1);\n\tborder: 0.5px solid var(--reltio-color-border-2);\n\tborder-radius: 12px;\n\toverflow: hidden;\n\tpadding: 0;\n\tfont-family: "Roboto Flex", sans-serif;\n\tfont-size: 14px;\n}\n\n.Details_summary__L29wd {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tcursor: pointer;\n\tuser-select: none;\n\tlist-style: none;\n\tcolor: var(--reltio-color-text);\n\tline-height: 1.71;\n\tpadding: 12px;\n\tmargin: 0;\n\tborder-bottom-left-radius: 0;\n\tborder-bottom-right-radius: 0;\n\toutline: none;\n\tfont-weight: 500;\n}\n\n.Details_summary__L29wd:hover {\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\tvar(--reltio-color-primary) 12%,\n\t\ttransparent\n\t);\n}\n\n.Details_summary__L29wd::-webkit-details-marker {\n\tdisplay: none;\n}\n\n.Details_summary__L29wd::marker {\n\tdisplay: none;\n}\n\n.Details_icon__L29wd {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground-color: transparent;\n\tflex-shrink: 0;\n}\n\n.Details_summaryText__L29wd {\n\tflex: 1;\n\tfont-weight: 500;\n\tletter-spacing: 0.045px;\n}\n\n.Details_chevron__L29wd {\n\tflex-shrink: 0;\n\ttransition: transform 195ms cubic-bezier(0.4, 0, 0.2, 1);\n\tcolor: var(--reltio-color-text);\n\twidth: 24px;\n\theight: 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.Details_chevronOpen__L29wd {\n\ttransform: rotate(180deg);\n}\n\n.Details_content__L29wd {\n\tpadding: 0 12px 12px 12px;\n\tcolor: var(--reltio-color-text);\n\tline-height: 1.71;\n}\n\n.Details_content__L29wd pre {\n\tmargin: 0;\n\tbackground-color: var(--reltio-color-surface-2);\n\tborder-radius: 8px;\n\tpadding: 16px;\n\tborder: 1px solid var(--reltio-color-border-2);\n}\n\n.Details_content__L29wd code {\n\tcolor: var(--reltio-color-text);\n\tbackground-color: var(--reltio-color-surface-2);\n\tpadding: 0.2em 0.4em;\n\tborder-radius: 3px;\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n}\n\n[data-theme="dark"] .Details_root__L29wd {\n\tbackground-color: var(--reltio-color-surface-2);\n}\n\n[data-theme="dark"] .Details_content__L29wd pre,\n[data-theme="dark"] .Details_content__L29wd code {\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\tvar(--reltio-color-border-2) 40%,\n\t\tvar(--reltio-color-surface-2)\n\t);\n}\n\n.Details_content__L29wd p {\n\tmargin-top: 8px;\n\tmargin-bottom: 8px;\n}\n');const al=rl,ol=({open:e=!1,children:t,className:n,...o})=>{const[i,l]=(0,r.useState)(e);(0,r.useEffect)((()=>{l(e)}),[e]);let s="Details";const u=[];return a().Children.forEach(t,(e=>{a().isValidElement(e)&&"string"==typeof e.type&&"summary"===e.type?s=e.props.children:null!=e&&u.push(e)})),(0,Wn.jsxs)("details",{className:Br(al.root,n),onToggle:e=>{const t=e.currentTarget;l(t.open)},open:e,...o,children:[(0,Wn.jsxs)("summary",{className:Br(al.summary),children:[(0,Wn.jsx)("span",{className:Br(al.icon),"aria-hidden":"true",children:(0,Wn.jsx)(nl,{size:"small"})}),(0,Wn.jsx)("span",{className:Br(al.summaryText),children:s}),(0,Wn.jsx)("span",{className:Br(al.chevron,i&&al.chevronOpen),children:i?(0,Wn.jsx)(Yr,{size:"small","aria-hidden":"true"}):(0,Wn.jsx)(Xr,{size:"small","aria-hidden":"true"})})]}),(0,Wn.jsx)("div",{className:Br(al.content),children:u})]})},il={a:({node:e,href:t,...n})=>{const r=t&&(t.startsWith("http")||t.startsWith("//"));return(0,Wn.jsx)("a",{...n,href:t,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0})},table:({node:e,...t})=>(0,Wn.jsx)("div",{className:Br(tl.tableWrapper),children:(0,Wn.jsx)("table",{...t})}),button:({node:e,...t})=>(0,Wn.jsx)(Ur,{...t,className:Br(t.className)}),details:({node:e,...t})=>(0,Wn.jsx)(ol,{...t,children:t.children}),li:({node:e,children:t,...n})=>{const a=r.Children.toArray(t)[0];return(0,r.isValidElement)(a)&&"checkbox"===a.props?.type?(0,Wn.jsx)("li",{...n,children:(0,Wn.jsx)("label",{children:t})}):(0,Wn.jsx)("li",{...n,children:t})}},ll={Button:Ur},sl=({children:e,className:t,style:n,...r})=>{if(null==e)return null;const a=Br(tl.root,t);return(0,Wn.jsx)("div",{className:a,style:n,...r,children:(0,Wn.jsx)(Ji,{fallback:(0,Wn.jsx)("pre",{className:Br(tl.error),children:e}),children:(0,Wn.jsx)(Qi,{options:{overrides:{...il,...ll},tagfilter:!0,sanitizer:lo},children:"string"==typeof e?e:String(e)})})})},ul=JSON.parse('{"assistantMessageRoot":"AssistantMessage_assistantMessageRoot__L29wd"}');Vr("\n.AssistantMessage_assistantMessageRoot__L29wd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tbackground-color: transparent;\n\tpadding: 0;\n\tborder-radius: 8px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n}\n");const cl=ul,dl=({children:e,errorMessage:t,className:n,style:r,...a})=>{const o=(e=>{if(null==e)return null;if("string"==typeof e){const t=e.trim();return t?(0,Wn.jsx)(ea,{children:t}):null}return e})(t),i=e.trim();return(0,Wn.jsxs)("div",{className:Br(cl.assistantMessageRoot,n),style:r,...a,children:[o&&o,!o&&i&&(0,Wn.jsx)(sl,{children:i})]})},pl=JSON.parse('{"userMessageRoot":"UserMessage_userMessageRoot__L29wd"}');Vr('\n.UserMessage_userMessageRoot__L29wd {\n\tdisplay: inline-flex;\n\tbackground-color: var(--reltio-color-surface-2);\n\tborder: 1px solid transparent;\n\tpadding: 12px 16px;\n\tborder-radius: 12px;\n}\n\n[data-theme="dark"] .UserMessage_userMessageRoot__L29wd {\n\tborder-color: var(--reltio-color-border-2);\n}\n');const fl=pl,ml=({children:e,className:t,style:n,...r})=>{const a=null!=e&&""!==String(e).trim();return(0,Wn.jsx)("div",{className:Br(fl.userMessageRoot,t),style:n,...r,children:a&&(0,Wn.jsx)(sl,{children:e})})},hl=((0,r.memo)((({message:e})=>"user"===e.role?(0,Wn.jsx)(ml,{className:$r.userMessage,children:e.content}):"assistant"===e.role?(0,Wn.jsx)(dl,{children:e.content}):(0,Wn.jsx)(Wn.Fragment,{children:e.content??null}))),JSON.parse('{"root":"TextArea_root__L29wd","inputContainer":"TextArea_inputContainer__L29wd","textarea":"TextArea_textarea__L29wd","label":"TextArea_label__L29wd","supportingText":"TextArea_supportingText__L29wd","toolbar":"TextArea_toolbar__L29wd"}'));Vr('\n.TextArea_root__L29wd {\n\tfont-family: "Roboto", sans-serif;\n\tcontainer-type: inline-size;\n}\n\n.TextArea_root__L29wd[data-disabled="true"] {\n\topacity: 0.38;\n\tcursor: not-allowed;\n}\n\n.TextArea_inputContainer__L29wd {\n\tposition: relative;\n\tdisplay: grid;\n\tgrid-template-columns: 1fr;\n\tgrid-template-rows: 1fr auto;\n\tgrid-template-areas:\n\t\t"textarea"\n\t\t"toolbar";\n\tmargin: 0;\n\tbox-sizing: border-box;\n\tborder-radius: 4px;\n\toutline: 1px solid var(--reltio-color-border-3);\n\tcursor: text;\n\ttransition:\n\t\toutline-color 0.1s ease,\n\t\toutline-width 0.1s ease;\n\tbackground: var(--reltio-color-surface-1);\n}\n\n.TextArea_root__L29wd:focus-within .TextArea_inputContainer__L29wd {\n\toutline: 2px solid var(--reltio-color-primary);\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_inputContainer__L29wd {\n\toutline-color: var(--reltio-color-error);\n}\n\n.TextArea_root__L29wd[data-error="true"]:focus-within .TextArea_inputContainer__L29wd {\n\toutline: 2px solid var(--reltio-color-error);\n}\n\n.TextArea_root__L29wd[data-disabled="true"] .TextArea_inputContainer__L29wd {\n\tcursor: not-allowed;\n}\n\n.TextArea_textarea__L29wd {\n\tgrid-area: textarea;\n\tposition: relative;\n\tdisplay: block;\n\tz-index: 1;\n\tborder: none;\n\toutline: none;\n\tbackground: none;\n\twidth: 100%;\n\tmin-height: 56px;\n\tmax-height: min(500px, 50cqh);\n\tborder-radius: 4px;\n\tbox-sizing: border-box;\n\tfont-size: 16px;\n\tfont-family: "Roboto", sans-serif;\n\tline-height: 1.5;\n\tresize: none;\n\tcolor: var(--reltio-color-text);\n\tpadding: 16px;\n\toverflow-y: auto;\n\tfield-sizing: content;\n}\n\n.TextArea_textarea__L29wd::placeholder {\n\tcolor: var(--reltio-color-text-secondary);\n}\n\n.TextArea_root__L29wd:focus-within .TextArea_textarea__L29wd::placeholder {\n\tcolor: var(--reltio-color-primary);\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_textarea__L29wd::placeholder {\n\tcolor: var(--reltio-color-error);\n}\n\n.TextArea_textarea__L29wd:disabled {\n\tcursor: not-allowed;\n}\n\n.TextArea_label__L29wd {\n\tposition: absolute;\n\topacity: 0;\n\ttop: 16px;\n\tleft: 8px;\n\ttransform: translateY(-50%);\n\ttransition: all 0.2s ease;\n\tbackground-color: var(--reltio-color-surface-1);\n\tpadding: 4px 8px;\n\tborder-radius: 4px;\n\tcolor: var(--reltio-color-text-secondary);\n\tz-index: 2;\n\tfont-size: 16px;\n\tfont-family: "Roboto", sans-serif;\n\tpointer-events: none;\n}\n\n.TextArea_textarea__L29wd:not(:placeholder-shown) + .TextArea_label__L29wd {\n\ttop: -1px;\n\tfont-size: 12px;\n\topacity: 1;\n}\n\n.TextArea_textarea__L29wd:focus + .TextArea_label__L29wd {\n\ttop: -1px;\n\tfont-size: 12px;\n\topacity: 1;\n}\n\n.TextArea_root__L29wd:focus-within .TextArea_label__L29wd {\n\tcolor: var(--reltio-color-primary);\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_label__L29wd {\n\tcolor: var(--reltio-color-error);\n}\n\n.TextArea_supportingText__L29wd {\n\tfont-size: 12px;\n\tpadding: 4px 16px;\n\tcolor: var(--reltio-color-text-secondary);\n\tfont-family: "Roboto", sans-serif;\n}\n\n.TextArea_root__L29wd[data-error="true"] .TextArea_supportingText__L29wd {\n\tcolor: var(--reltio-color-error);\n}\n\n.TextArea_toolbar__L29wd {\n\tgrid-area: toolbar;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 12px;\n\tpadding: 8px 12px;\n}\n');const gl=hl;function vl(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yl(Object(n),!0).forEach((function(t){vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(0,r.forwardRef)((({label:e,error:t,supportingText:n,toolbar:r,className:a,...o},i)=>{const l=String(o.value??o.defaultValue??"").length>0;return(0,Wn.jsxs)("div",{"data-error":t||void 0,"data-disabled":o.disabled||void 0,"data-has-value":l||void 0,className:Br(gl.root,a),children:[(0,Wn.jsxs)("label",{className:Br(gl.inputContainer),children:[(0,Wn.jsx)("textarea",{ref:i,className:Br(gl.textarea),placeholder:e||o.placeholder,"aria-invalid":t||void 0,...o}),e&&(0,Wn.jsx)("span",{className:Br(gl.label),children:e}),r&&(0,Wn.jsx)("div",{className:Br(gl.toolbar),children:r})]}),n&&(0,Wn.jsx)("div",{className:Br(gl.supportingText),children:n})]})})).displayName="TextArea";var wl=n(8960);function El(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,wl.Z)(e,t)}function Cl(e){return Cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cl(e)}function Sl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Sl=function(){return!!e})()}function Ol(e,t){if(t&&("object"==Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,te.Z)(e)}function kl(e){var t=Sl();return function(){var n,r=Cl(e);if(t){var a=Cl(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ol(this,n)}}var Al={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Al.F1&&t<=Al.F12)return!1;switch(t){case Al.ALT:case Al.CAPS_LOCK:case Al.CONTEXT_MENU:case Al.CTRL:case Al.DOWN:case Al.END:case Al.ESC:case Al.HOME:case Al.INSERT:case Al.LEFT:case Al.MAC_FF_META:case Al.META:case Al.NUMLOCK:case Al.NUM_CENTER:case Al.PAGE_DOWN:case Al.PAGE_UP:case Al.PAUSE:case Al.PRINT_SCREEN:case Al.RIGHT:case Al.SHIFT:case Al.UP:case Al.WIN_KEY:case Al.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Al.ZERO&&e<=Al.NINE)return!0;if(e>=Al.NUM_ZERO&&e<=Al.NUM_MULTIPLY)return!0;if(e>=Al.A&&e<=Al.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Al.SPACE:case Al.QUESTION_MARK:case Al.NUM_PLUS:case Al.NUM_MINUS:case Al.NUM_PERIOD:case Al.NUM_DIVISION:case Al.SEMICOLON:case Al.DASH:case Al.EQUALS:case Al.COMMA:case Al.PERIOD:case Al.SLASH:case Al.APOSTROPHE:case Al.SINGLE_QUOTE:case Al.OPEN_SQUARE_BRACKET:case Al.BACKSLASH:case Al.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const Pl=Al;var Tl="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function Dl(e,t){return 0===e.indexOf(t)}function Ml(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:bl({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||Dl(n,"aria-"))||t.data&&Dl(n,"data-")||t.attr&&Tl.includes(n))&&(r[n]=e[n])})),r}var _l={},Il=[];function Nl(e,t){}function Rl(e,t){}function Ll(e,t,n){t||_l[n]||(e(!1,n),_l[n]=!0)}function jl(e,t){Ll(Nl,e,t)}jl.preMessage=function(e){Il.push(e)},jl.resetWarned=function(){_l={}},jl.noteOnce=function(e,t){Ll(Rl,e,t)};const Fl=jl;var Vl=r.createContext(null),Bl=r.createContext({});function Hl(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function zl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,a=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||Wt(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 Ul(e,t){if(null==e)return{};var n,r,a=(0,q.Z)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Zl(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Wl=Zl()?r.useLayoutEffect:r.useEffect;const ql=function(e,t){var n=r.useRef(!0);Wl((function(){return e(n.current)}),t),Wl((function(){return n.current=!1,function(){n.current=!0}}),[])};var $l=Symbol.for("react.element"),Kl=Symbol.for("react.transitional.element"),Gl=Symbol.for("react.fragment");function Yl(e){return e&&"object"===Y(e)&&(e.$$typeof===$l||e.$$typeof===Kl)&&e.type===Gl}function Xl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return a().Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(Xl(e)):Yl(e)&&e.props?n=n.concat(Xl(e.props.children,t)):n.push(e))})),n}var Ql=n(7111),Jl=n.n(Ql);function es(e){return e instanceof HTMLElement||e instanceof SVGElement}function ts(e){var t,n=function(e){return e&&"object"===Y(e)&&es(e.nativeElement)?e.nativeElement:es(e)?e:null}(e);return n||(e instanceof a().Component?null===(t=Jl().findDOMNode)||void 0===t?void 0:t.call(Jl(),e):null)}var ns=n(1818),rs=Number(r.version.split(".")[0]),as=function(e,t){"function"==typeof e?e(t):"object"===Y(e)&&e&&"current"in e&&(e.current=t)},os=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){t.forEach((function(t){as(t,e)}))}},is=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a=t,"value"in(o=r.useRef({})).current&&!function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}(o.current.condition,a)||(o.current.value=os.apply(void 0,t),o.current.condition=a),o.current.value;var a,o},ls=function(e){var t,n;if(!e)return!1;if(ss(e)&&rs>=19)return!0;var r=(0,ns.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===ns.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===ns.ForwardRef)};function ss(e){return(0,r.isValidElement)(e)&&!Yl(e)}var us=function(e){if(e&&ss(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},cs=r.createContext(null),ds=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),ps="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,fs=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),ms="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(fs):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},hs=["top","right","bottom","left","width","height","size","weight"],gs="undefined"!=typeof MutationObserver,vs=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function o(){n&&(n=!1,e()),r&&l()}function i(){ms(o)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(i,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){ps&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gs?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){ps&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t,r=hs.some((function(e){return!!~n.indexOf(e)}));r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),ys=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},bs=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||fs},xs=Os(0,0,0,0);function ws(e){return parseFloat(e)||0}function Es(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+ws(e["border-"+n+"-width"])}),0)}var Cs="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof bs(e).SVGGraphicsElement}:function(e){return e instanceof bs(e).SVGElement&&"function"==typeof e.getBBox};function Ss(e){return ps?Cs(e)?function(e){var t=e.getBBox();return Os(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return xs;var r=bs(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=ws(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,l=ws(r.width),s=ws(r.height);if("border-box"===r.boxSizing&&(Math.round(l+o)!==t&&(l-=Es(r,"left","right")+o),Math.round(s+i)!==n&&(s-=Es(r,"top","bottom")+i)),!function(e){return e===bs(e).document.documentElement}(e)){var u=Math.round(l+o)-t,c=Math.round(s+i)-n;1!==Math.abs(u)&&(l-=u),1!==Math.abs(c)&&(s-=c)}return Os(a.left,a.top,l,s)}(e):xs}function Os(e,t,n,r){return{x:e,y:t,width:n,height:r}}var ks=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Os(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Ss(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),As=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,a=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,i=Object.create(o.prototype);return ys(i,{x:t,y:n,width:r,height:a,top:n,right:t+r,bottom:a+n,left:t}),i}(t);ys(this,{target:e,contentRect:n})},Ps=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new ds,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof bs(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new ks(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof bs(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new As(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Ts="undefined"!=typeof WeakMap?new WeakMap:new ds,Ds=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=vs.getInstance(),r=new Ps(t,n,this);Ts.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){Ds.prototype[e]=function(){var t;return(t=Ts.get(this))[e].apply(t,arguments)}}));const Ms=void 0!==fs.ResizeObserver?fs.ResizeObserver:Ds;var _s=new Map,Is=new Ms((function(e){e.forEach((function(e){var t,n=e.target;null===(t=_s.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))})),Ns=function(e){El(n,e);var t=kl(n);function n(){return xl(this,n),t.apply(this,arguments)}return J(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);function Rs(e,t){var n=e.children,a=e.disabled,o=r.useRef(null),i=r.useRef(null),l=r.useContext(cs),s="function"==typeof n,u=s?n(o):n,c=r.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!s&&r.isValidElement(u)&&ls(u),p=d?us(u):null,f=is(p,o),m=function(){var e;return ts(o.current)||(o.current&&"object"===Y(o.current)?ts(null===(e=o.current)||void 0===e?void 0:e.nativeElement):null)||ts(i.current)};r.useImperativeHandle(t,(function(){return m()}));var h=r.useRef(e);h.current=e;var g=r.useCallback((function(e){var t=h.current,n=t.onResize,r=t.data,a=e.getBoundingClientRect(),o=a.width,i=a.height,s=e.offsetWidth,u=e.offsetHeight,d=Math.floor(o),p=Math.floor(i);if(c.current.width!==d||c.current.height!==p||c.current.offsetWidth!==s||c.current.offsetHeight!==u){var f={width:d,height:p,offsetWidth:s,offsetHeight:u};c.current=f;var m=s===Math.round(o)?o:s,g=u===Math.round(i)?i:u,v=bl(bl({},f),{},{offsetWidth:m,offsetHeight:g});null==l||l(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return r.useEffect((function(){var e,t,n=m();return n&&!a&&(e=n,t=g,_s.has(e)||(_s.set(e,new Set),Is.observe(e)),_s.get(e).add(t)),function(){return function(e,t){_s.has(e)&&(_s.get(e).delete(t),_s.get(e).size||(Is.unobserve(e),_s.delete(e)))}(n,g)}}),[o.current,a]),r.createElement(Ns,{ref:i},d?r.cloneElement(u,{ref:f}):u)}const Ls=r.forwardRef(Rs);function js(e,t){var n=e.children;return("function"==typeof n?[n]:Xl(n)).map((function(n,a){var o=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(a);return r.createElement(Ls,(0,$.Z)({},e,{key:o,ref:0===a?t:void 0}),n)}))}var Fs=r.forwardRef(js);Fs.Collection=function(e){var t=e.children,n=e.onBatchResize,a=r.useRef(0),o=r.useRef([]),i=r.useContext(cs),l=r.useCallback((function(e,t,r){a.current+=1;var l=a.current;o.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){l===a.current&&(null==n||n(o.current),o.current=[])})),null==i||i(e,t,r)}),[n,i]);return r.createElement(cs.Provider,{value:l},t)};const Vs=Fs;function Bs(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}function Hs(e){var t=r.useRef(!1),n=zl(r.useState(e),2),a=n[0],o=n[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||o(e)}]}"undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;var zs=r.forwardRef((function(e,t){var n=e.height,a=e.offsetY,o=e.offsetX,i=e.children,l=e.prefixCls,s=e.onInnerResize,u=e.innerProps,c=e.rtl,d=e.extra,f={},m={display:"flex",flexDirection:"column"};return void 0!==a&&(f={height:n,position:"relative",overflow:"hidden"},m=bl(bl({},m),{},vl(vl(vl(vl(vl({transform:"translateY(".concat(a,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),r.createElement("div",{style:f},r.createElement(Vs,{onResize:function(e){e.offsetHeight&&s&&s()}},r.createElement("div",(0,$.Z)({style:m,className:p()(vl({},"".concat(l,"-holder-inner"),l)),ref:t},u),i,d)))}));zs.displayName="Filler";const Us=zs;function Zs(e){var t=e.children,n=e.setRef,a=r.useCallback((function(e){n(e)}),[]);return r.cloneElement(t,{ref:a})}var Ws=function(e){return+setTimeout(e,16)},qs=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(Ws=function(e){return window.requestAnimationFrame(e)},qs=function(e){return window.cancelAnimationFrame(e)});var $s=0,Ks=new Map;function Gs(e){Ks.delete(e)}var Ys=function(e){var t=$s+=1;return function n(r){if(0===r)Gs(t),e();else{var a=Ws((function(){n(r-1)}));Ks.set(t,a)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};Ys.cancel=function(e){var t=Ks.get(e);return Gs(e),qs(t)};const Xs=Ys,Qs="object"===("undefined"==typeof navigator?"undefined":Y(navigator))&&/Firefox/i.test(navigator.userAgent),Js=function(e,t,n,a){var o=(0,r.useRef)(!1),i=(0,r.useRef)(null),l=(0,r.useRef)({top:e,bottom:t,left:n,right:a});return l.current.top=e,l.current.bottom=t,l.current.left=n,l.current.right=a,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e?t<0&&l.current.left||t>0&&l.current.right:t<0&&l.current.top||t>0&&l.current.bottom;return n&&r?(clearTimeout(i.current),o.current=!1):r&&!o.current||(clearTimeout(i.current),o.current=!0,i.current=setTimeout((function(){o.current=!1}),50)),!o.current&&r}};var eu=function(){function e(){xl(this,e),vl(this,"maps",void 0),vl(this,"id",0),vl(this,"diffRecords",new Map),this.maps=Object.create(null)}return J(e,[{key:"set",value:function(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();const tu=eu;function nu(e){var t=parseFloat(e);return isNaN(t)?0:t}var ru=14/15;function au(e){return Math.floor(Math.pow(e,.5))}function ou(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var iu=r.forwardRef((function(e,t){var n=e.prefixCls,a=e.rtl,o=e.scrollOffset,i=e.scrollRange,l=e.onStartMove,s=e.onStopMove,u=e.onScroll,c=e.horizontal,d=e.spinSize,f=e.containerSize,m=e.style,h=e.thumbStyle,g=e.showScrollBar,v=zl(r.useState(!1),2),y=v[0],b=v[1],x=zl(r.useState(null),2),w=x[0],E=x[1],C=zl(r.useState(null),2),S=C[0],O=C[1],k=!a,A=r.useRef(),P=r.useRef(),T=zl(r.useState(g),2),D=T[0],M=T[1],_=r.useRef(),I=function(){!0!==g&&!1!==g&&(clearTimeout(_.current),M(!0),_.current=setTimeout((function(){M(!1)}),3e3))},N=i-f||0,R=f-d||0,L=r.useMemo((function(){return 0===o||0===N?0:o/N*R}),[o,N,R]),j=r.useRef({top:L,dragging:y,pageY:w,startTop:S});j.current={top:L,dragging:y,pageY:w,startTop:S};var F=function(e){b(!0),E(ou(e,c)),O(j.current.top),l(),e.stopPropagation(),e.preventDefault()};r.useEffect((function(){var e=function(e){e.preventDefault()},t=A.current,n=P.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",F,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",F)}}),[]);var V=r.useRef();V.current=N;var B=r.useRef();B.current=R,r.useEffect((function(){if(y){var e,t=function(t){var n=j.current,r=n.dragging,a=n.pageY,o=n.startTop;Xs.cancel(e);var i=A.current.getBoundingClientRect(),l=f/(c?i.width:i.height);if(r){var s=(ou(t,c)-a)*l,d=o;!k&&c?d-=s:d+=s;var p=V.current,m=B.current,h=m?d/m:0,g=Math.ceil(h*p);g=Math.max(g,0),g=Math.min(g,p),e=Xs((function(){u(g,c)}))}},n=function(){b(!1),s()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Xs.cancel(e)}}}),[y]),r.useEffect((function(){return I(),function(){clearTimeout(_.current)}}),[o]),r.useImperativeHandle(t,(function(){return{delayHidden:I}}));var H="".concat(n,"-scrollbar"),z={position:"absolute",visibility:D?null:"hidden"},U={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(z,{height:8,left:0,right:0,bottom:0}),Object.assign(U,vl({height:"100%",width:d},k?"left":"right",L))):(Object.assign(z,vl({width:8,top:0,bottom:0},k?"right":"left",0)),Object.assign(U,{width:"100%",height:d,top:L})),r.createElement("div",{ref:A,className:p()(H,vl(vl(vl({},"".concat(H,"-horizontal"),c),"".concat(H,"-vertical"),!c),"".concat(H,"-visible"),D)),style:bl(bl({},z),m),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:I},r.createElement("div",{ref:P,className:p()("".concat(H,"-thumb"),vl({},"".concat(H,"-thumb-moving"),y)),style:bl(bl({},U),h),onMouseDown:F}))}));const lu=iu;var su=20;function uu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*e;return isNaN(t)&&(t=0),t=Math.max(t,su),Math.floor(t)}var cu=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],du=[],pu={overflowY:"auto",overflowAnchor:"none"};function fu(e,t){var n=e.prefixCls,a=void 0===n?"rc-virtual-list":n,o=e.className,i=e.height,l=e.itemHeight,s=e.fullHeight,u=void 0===s||s,c=e.style,d=e.data,f=e.children,m=e.itemKey,h=e.virtual,g=e.direction,v=e.scrollWidth,y=e.component,b=void 0===y?"div":y,x=e.onScroll,w=e.onVirtualScroll,E=e.onVisibleChange,C=e.innerProps,S=e.extraRender,O=e.styles,k=e.showScrollBar,A=void 0===k?"optional":k,P=Ul(e,cu),T=r.useCallback((function(e){return"function"==typeof m?m(e):null==e?void 0:e[m]}),[m]),D=function(e){var t=zl(r.useState(0),2),n=t[0],a=t[1],o=(0,r.useRef)(new Map),i=(0,r.useRef)(new tu),l=(0,r.useRef)(0);function s(){l.current+=1}function u(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];s();var t=function(){var e=!1;o.current.forEach((function(t,n){if(t&&t.offsetParent){var r=t.offsetHeight,a=getComputedStyle(t),o=a.marginTop,l=a.marginBottom,s=r+nu(o)+nu(l);i.current.get(n)!==s&&(i.current.set(n,s),e=!0)}})),e&&a((function(e){return e+1}))};if(e)t();else{l.current+=1;var n=l.current;Promise.resolve().then((function(){n===l.current&&t()}))}}return(0,r.useEffect)((function(){return s}),[]),[function(t,n){var r=e(t);o.current.get(r);n?(o.current.set(r,n),u()):o.current.delete(r)},u,i.current,n]}(T),M=zl(D,4),_=M[0],I=M[1],N=M[2],R=M[3],L=!(!1===h||!i||!l),j=r.useMemo((function(){return Object.values(N.maps).reduce((function(e,t){return e+t}),0)}),[N.id,N.maps]),F=L&&d&&(Math.max(l*d.length,j)>i||!!v),V="rtl"===g,B=p()(a,vl({},"".concat(a,"-rtl"),V),o),H=d||du,z=(0,r.useRef)(),U=(0,r.useRef)(),Z=(0,r.useRef)(),W=zl((0,r.useState)(0),2),q=W[0],K=W[1],G=zl((0,r.useState)(0),2),X=G[0],Q=G[1],J=zl((0,r.useState)(!1),2),ee=J[0],te=J[1],ne=function(){te(!0)},re=function(){te(!1)},ae={getKey:T};function oe(e){K((function(t){var n=function(e){var t=e;return Number.isNaN(Ee.current)||(t=Math.min(t,Ee.current)),t=Math.max(t,0)}("function"==typeof e?e(t):e);return z.current.scrollTop=n,n}))}var ie=(0,r.useRef)({start:0,end:H.length}),le=(0,r.useRef)(),se=zl(function(e,t,n){var a=zl(r.useState(e),2),o=a[0],i=a[1],l=zl(r.useState(null),2),s=l[0],u=l[1];return r.useEffect((function(){var r=function(e,t,n){var r,a,o=e.length,i=t.length;if(0===o&&0===i)return null;o<i?(r=e,a=t):(r=t,a=e);var l={__EMPTY_ITEM__:!0};function s(e){return void 0!==e?n(e):l}for(var u=null,c=1!==Math.abs(o-i),d=0;d<a.length;d+=1){var p=s(r[d]);if(p!==s(a[d])){u=d,c=c||p!==s(a[d+1]);break}}return null===u?null:{index:u,multiple:c}}(o||[],e||[],t);void 0!==(null==r?void 0:r.index)&&(null==n||n(r.index),u(e[r.index])),i(e)}),[e]),[s]}(H,T),1)[0];le.current=se;var ue=r.useMemo((function(){if(!L)return{scrollHeight:void 0,start:0,end:H.length-1,offset:void 0};var e;if(!F)return{scrollHeight:(null===(e=U.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:H.length-1,offset:void 0};for(var t,n,r,a=0,o=H.length,s=0;s<o;s+=1){var u=H[s],c=T(u),d=N.get(c),p=a+(void 0===d?l:d);p>=q&&void 0===t&&(t=s,n=a),p>q+i&&void 0===r&&(r=s),a=p}return void 0===t&&(t=0,n=0,r=Math.ceil(i/l)),void 0===r&&(r=H.length-1),{scrollHeight:a,start:t,end:r=Math.min(r+1,H.length-1),offset:n}}),[F,L,q,H,R,i]),ce=ue.scrollHeight,de=ue.start,pe=ue.end,fe=ue.offset;ie.current.start=de,ie.current.end=pe,r.useLayoutEffect((function(){var e=N.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),r=H[de];if(r&&void 0===n&&T(r)===t){var a=N.get(t)-l;oe((function(e){return e+a}))}}N.resetRecord()}),[ce]);var me=zl(r.useState({width:0,height:i}),2),he=me[0],ge=me[1],ve=(0,r.useRef)(),ye=(0,r.useRef)(),be=r.useMemo((function(){return uu(he.width,v)}),[he.width,v]),xe=r.useMemo((function(){return uu(he.height,ce)}),[he.height,ce]),we=ce-i,Ee=(0,r.useRef)(we);Ee.current=we;var Ce=q<=0,Se=q>=we,Oe=X<=0,ke=X>=v,Ae=Js(Ce,Se,Oe,ke),Pe=function(){return{x:V?-X:X,y:q}},Te=(0,r.useRef)(Pe()),De=Bs((function(e){if(w){var t=bl(bl({},Pe()),e);Te.current.x===t.x&&Te.current.y===t.y||(w(t),Te.current=t)}}));function Me(e,t){var n=e;t?((0,Ql.flushSync)((function(){Q(n)})),De()):oe(n)}var _e=function(e){var t=e,n=v?v-he.width:0;return t=Math.max(t,0),Math.min(t,n)},Ie=Bs((function(e,t){t?((0,Ql.flushSync)((function(){Q((function(t){return _e(t+(V?-e:e))}))})),De()):oe((function(t){return t+e}))})),Ne=zl(function(e,t,n,a,o,i,l){var s=(0,r.useRef)(0),u=(0,r.useRef)(null),c=(0,r.useRef)(null),d=(0,r.useRef)(!1),p=Js(t,n,a,o),f=(0,r.useRef)(null),m=(0,r.useRef)(null);return[function(t){if(e){Xs.cancel(m.current),m.current=Xs((function(){f.current=null}),2);var n=t.deltaX,r=t.deltaY,a=t.shiftKey,o=n,h=r;("sx"===f.current||!f.current&&a&&r&&!n)&&(o=r,h=0,f.current="sx");var g=Math.abs(o),v=Math.abs(h);null===f.current&&(f.current=i&&g>v?"x":"y"),"y"===f.current?function(e,t){if(Xs.cancel(u.current),!p(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,s.current+=t,c.current=t,Qs||n.preventDefault(),u.current=Xs((function(){var e=d.current?10:1;l(s.current*e,!1),s.current=0})))}}(t,h):function(e,t){l(t,!0),Qs||e.preventDefault()}(t,o)}},function(t){e&&(d.current=t.detail===c.current)}]}(L,Ce,Se,Oe,ke,!!v,Ie),2),Re=Ne[0],Le=Ne[1];!function(e,t,n){var a,o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useRef)(0),s=(0,r.useRef)(null),u=(0,r.useRef)(null),c=function(e){if(o.current){var t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),a=i.current-t,s=l.current-r,c=Math.abs(a)>Math.abs(s);c?i.current=t:l.current=r;var d=n(c,c?a:s,!1,e);d&&e.preventDefault(),clearInterval(u.current),d&&(u.current=setInterval((function(){c?a*=ru:s*=ru;var e=Math.floor(c?a:s);(!n(c,e,!0)||Math.abs(e)<=.1)&&clearInterval(u.current)}),16))}},d=function(){o.current=!1,a()},p=function(e){a(),1!==e.touches.length||o.current||(o.current=!0,i.current=Math.ceil(e.touches[0].pageX),l.current=Math.ceil(e.touches[0].pageY),s.current=e.target,s.current.addEventListener("touchmove",c,{passive:!1}),s.current.addEventListener("touchend",d,{passive:!0}))};a=function(){s.current&&(s.current.removeEventListener("touchmove",c),s.current.removeEventListener("touchend",d))},ql((function(){return e&&t.current.addEventListener("touchstart",p,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",p),a(),clearInterval(u.current)}}),[e])}(L,z,(function(e,t,n,r){var a=r;return!(Ae(e,t,n)||a&&a._virtualHandled||(a&&(a._virtualHandled=!0),Re({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),0))})),function(e,t){r.useEffect((function(){var n=t.current;if(e&&n){var r,a,o=!1,i=function(){Xs.cancel(r)},l=function e(){i(),r=Xs((function(){var t;t=a,oe((function(e){return e+t})),e()}))},s=function(){o=!1,i()},u=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,o=!0)}},c=function(e){if(o){var t=ou(e,!1),r=n.getBoundingClientRect(),s=r.top,u=r.bottom;t<=s?(a=-au(s-t),l()):t>=u?(a=au(t-u),l()):i()}};return n.addEventListener("mousedown",u),n.ownerDocument.addEventListener("mouseup",s),n.ownerDocument.addEventListener("mousemove",c),n.ownerDocument.addEventListener("dragend",s),function(){n.removeEventListener("mousedown",u),n.ownerDocument.removeEventListener("mouseup",s),n.ownerDocument.removeEventListener("mousemove",c),n.ownerDocument.removeEventListener("dragend",s),i()}}}),[e])}(F,z),ql((function(){function e(e){var t=Ce&&e.detail<0,n=Se&&e.detail>0;!L||t||n||e.preventDefault()}var t=z.current;return t.addEventListener("wheel",Re,{passive:!1}),t.addEventListener("DOMMouseScroll",Le,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",Re),t.removeEventListener("DOMMouseScroll",Le),t.removeEventListener("MozMousePixelScroll",e)}}),[L,Ce,Se]),ql((function(){if(v){var e=_e(X);Q(e),De({x:e})}}),[he.width,v]);var je=function(){var e,t;null===(e=ve.current)||void 0===e||e.delayHidden(),null===(t=ye.current)||void 0===t||t.delayHidden()},Fe=function(e,t,n,a,o,i,l,s){var u=r.useRef(),c=zl(r.useState(null),2),d=c[0],p=c[1];return ql((function(){if(d&&d.times<10){if(!e.current)return void p((function(e){return bl({},e)}));i();var r=d.targetAlign,s=d.originAlign,u=d.index,c=d.offset,f=e.current.clientHeight,m=!1,h=r,g=null;if(f){for(var v=r||s,y=0,b=0,x=0,w=Math.min(t.length-1,u),E=0;E<=w;E+=1){var C=o(t[E]);b=y;var S=n.get(C);y=x=b+(void 0===S?a:S)}for(var O="top"===v?c:f-c,k=w;k>=0;k-=1){var A=o(t[k]),P=n.get(A);if(void 0===P){m=!0;break}if((O-=P)<=0)break}switch(v){case"top":g=b-c;break;case"bottom":g=x-f+c;break;default:var T=e.current.scrollTop;b<T?h="top":x>T+f&&(h="bottom")}null!==g&&l(g),g!==d.lastTop&&(m=!0)}m&&p(bl(bl({},d),{},{times:d.times+1,targetAlign:h,lastTop:g}))}}),[d,e.current]),function(e){if(null!=e){if(Xs.cancel(u.current),"number"==typeof e)l(e);else if(e&&"object"===Y(e)){var n,r=e.align;n="index"in e?e.index:t.findIndex((function(t){return o(t)===e.key}));var a=e.offset;p({times:0,index:n,offset:void 0===a?0:a,originAlign:r})}}else s()}}(z,H,N,l,T,(function(){return I(!0)}),oe,je);r.useImperativeHandle(t,(function(){return{nativeElement:Z.current,getScrollInfo:Pe,scrollTo:function(e){var t;(t=e)&&"object"===Y(t)&&("left"in t||"top"in t)?(void 0!==e.left&&Q(_e(e.left)),Fe(e.top)):Fe(e)}}})),ql((function(){if(E){var e=H.slice(de,pe+1);E(e,H)}}),[de,pe,H]);var Ve=function(e,t,n,a){var o=zl(r.useMemo((function(){return[new Map,[]]}),[e,n.id,a]),2),i=o[0],l=o[1];return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,s=i.get(r),u=i.get(o);if(void 0===s||void 0===u)for(var c=e.length,d=l.length;d<c;d+=1){var p,f=e[d],m=t(f);i.set(m,d);var h=null!==(p=n.get(m))&&void 0!==p?p:a;if(l[d]=(l[d-1]||0)+h,m===r&&(s=d),m===o&&(u=d),void 0!==s&&void 0!==u)break}return{top:l[s-1]||0,bottom:l[u]}}}(H,T,N,l),Be=null==S?void 0:S({start:de,end:pe,virtual:F,offsetX:X,offsetY:fe,rtl:V,getSize:Ve}),He=function(e,t,n,a,o,i,l,s){var u=s.getKey;return e.slice(t,n+1).map((function(e,n){var s=l(e,t+n,{style:{width:a},offsetX:o}),c=u(e);return r.createElement(Zs,{key:c,setRef:function(t){return i(e,t)}},s)}))}(H,de,pe,v,X,_,f,ae),ze=null;i&&(ze=bl(vl({},u?"height":"maxHeight",i),pu),L&&(ze.overflowY="hidden",v&&(ze.overflowX="hidden"),ee&&(ze.pointerEvents="none")));var Ue={};return V&&(Ue.dir="rtl"),r.createElement("div",(0,$.Z)({ref:Z,style:bl(bl({},c),{},{position:"relative"}),className:B},Ue,P),r.createElement(Vs,{onResize:function(e){ge({width:e.offsetWidth,height:e.offsetHeight})}},r.createElement(b,{className:"".concat(a,"-holder"),style:ze,ref:z,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==q&&oe(t),null==x||x(e),De()},onMouseEnter:je},r.createElement(Us,{prefixCls:a,height:ce,offsetX:X,offsetY:fe,scrollWidth:v,onInnerResize:I,ref:U,innerProps:C,rtl:V,extra:Be},He))),F&&ce>i&&r.createElement(lu,{ref:ve,prefixCls:a,scrollOffset:q,scrollRange:ce,rtl:V,onScroll:Me,onStartMove:ne,onStopMove:re,spinSize:xe,containerSize:he.height,style:null==O?void 0:O.verticalScrollBar,thumbStyle:null==O?void 0:O.verticalScrollBarThumb,showScrollBar:A}),F&&v>he.width&&r.createElement(lu,{ref:ye,prefixCls:a,scrollOffset:X,scrollRange:v,rtl:V,onScroll:Me,onStartMove:ne,onStopMove:re,spinSize:be,containerSize:he.width,horizontal:!0,style:null==O?void 0:O.horizontalScrollBar,thumbStyle:null==O?void 0:O.horizontalScrollBarThumb,showScrollBar:A}))}var mu=r.forwardRef(fu);mu.displayName="List";const hu=mu;var gu=r.createContext({}),vu=function(e){El(n,e);var t=kl(n);function n(){return xl(this,n),t.apply(this,arguments)}return J(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);const yu=vu;var bu="none",xu="appear",wu="enter",Eu="leave",Cu="none",Su="prepare",Ou="start",ku="active",Au="end",Pu="prepared";function Tu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var Du,Mu,_u,Iu=(Du=Zl(),Mu="undefined"!=typeof window?window:{},_u={animationend:Tu("Animation","AnimationEnd"),transitionend:Tu("Transition","TransitionEnd")},Du&&("AnimationEvent"in Mu||delete _u.animationend.animation,"TransitionEvent"in Mu||delete _u.transitionend.transition),_u),Nu={};if(Zl()){var Ru=document.createElement("div");Nu=Ru.style}var Lu={};function ju(e){if(Lu[e])return Lu[e];var t=Iu[e];if(t)for(var n=Object.keys(t),r=n.length,a=0;a<r;a+=1){var o=n[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in Nu)return Lu[e]=t[o],Lu[e]}return""}var Fu=ju("animationend"),Vu=ju("transitionend"),Bu=!(!Fu||!Vu),Hu=Fu||"animationend",zu=Vu||"transitionend";function Uu(e,t){return e?"object"===Y(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}const Zu=Zl()?r.useLayoutEffect:r.useEffect;var Wu=[Su,Ou,ku,Au],qu=[Su,Pu],$u=!1;function Ku(e){return e===ku||e===Au}function Gu(e,t,n,a){var o=a.motionEnter,i=void 0===o||o,l=a.motionAppear,s=void 0===l||l,u=a.motionLeave,c=void 0===u||u,d=a.motionDeadline,p=a.motionLeaveImmediately,f=a.onAppearPrepare,m=a.onEnterPrepare,h=a.onLeavePrepare,g=a.onAppearStart,v=a.onEnterStart,y=a.onLeaveStart,b=a.onAppearActive,x=a.onEnterActive,w=a.onLeaveActive,E=a.onAppearEnd,C=a.onEnterEnd,S=a.onLeaveEnd,O=a.onVisibleChanged,k=zl(Hs(),2),A=k[0],P=k[1],T=function(e){var t=zl(r.useReducer((function(e){return e+1}),0),2)[1],n=r.useRef(e);return[Bs((function(){return n.current})),Bs((function(e){n.current="function"==typeof e?e(n.current):e,t()}))]}(bu),D=zl(T,2),M=D[0],_=D[1],I=zl(Hs(null),2),N=I[0],R=I[1],L=M(),j=(0,r.useRef)(!1),F=(0,r.useRef)(null);function V(){return n()}var B=(0,r.useRef)(!1);function H(){_(bu),R(null,!0)}var z=Bs((function(e){var t=M();if(t!==bu){var n=V();if(!e||e.deadline||e.target===n){var r,a=B.current;t===xu&&a?r=null==E?void 0:E(n,e):t===wu&&a?r=null==C?void 0:C(n,e):t===Eu&&a&&(r=null==S?void 0:S(n,e)),a&&!1!==r&&H()}}})),U=zl(function(e){var t=(0,r.useRef)();function n(t){t&&(t.removeEventListener(zu,e),t.removeEventListener(Hu,e))}return r.useEffect((function(){return function(){n(t.current)}}),[]),[function(r){t.current&&t.current!==r&&n(t.current),r&&r!==t.current&&(r.addEventListener(zu,e),r.addEventListener(Hu,e),t.current=r)},n]}(z),1)[0],Z=function(e){switch(e){case xu:return vl(vl(vl({},Su,f),Ou,g),ku,b);case wu:return vl(vl(vl({},Su,m),Ou,v),ku,x);case Eu:return vl(vl(vl({},Su,h),Ou,y),ku,w);default:return{}}},W=r.useMemo((function(){return Z(L)}),[L]),q=zl(function(e,t,n){var a=zl(Hs(Cu),2),o=a[0],i=a[1],l=function(){var e=r.useRef(null);function t(){Xs.cancel(e.current)}return r.useEffect((function(){return function(){t()}}),[]),[function n(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var o=Xs((function(){a<=1?r({isCanceled:function(){return o!==e.current}}):n(r,a-1)}));e.current=o},t]}(),s=zl(l,2),u=s[0],c=s[1],d=t?qu:Wu;return Zu((function(){if(o!==Cu&&o!==Au){var e=d.indexOf(o),t=d[e+1],r=n(o);r===$u?i(t,!0):t&&u((function(e){function n(){e.isCanceled()||i(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,o]),r.useEffect((function(){return function(){c()}}),[]),[function(){i(Su,!0)},o]}(L,!e,(function(e){if(e===Su){var t=W[Su];return t?t(V()):$u}var n;return K in W&&R((null===(n=W[K])||void 0===n?void 0:n.call(W,V(),null))||null),K===ku&&L!==bu&&(U(V()),d>0&&(clearTimeout(F.current),F.current=setTimeout((function(){z({deadline:!0})}),d))),K===Pu&&H(),true})),2),$=q[0],K=q[1],G=Ku(K);B.current=G;var Y=(0,r.useRef)(null);Zu((function(){if(!j.current||Y.current!==t){P(t);var n,r=j.current;j.current=!0,!r&&t&&s&&(n=xu),r&&t&&i&&(n=wu),(r&&!t&&c||!r&&p&&!t&&c)&&(n=Eu);var a=Z(n);n&&(e||a[Su])?(_(n),$()):_(bu),Y.current=t}}),[t]),(0,r.useEffect)((function(){(L===xu&&!s||L===wu&&!i||L===Eu&&!c)&&_(bu)}),[s,i,c]),(0,r.useEffect)((function(){return function(){j.current=!1,clearTimeout(F.current)}}),[]);var X=r.useRef(!1);(0,r.useEffect)((function(){A&&(X.current=!0),void 0!==A&&L===bu&&((X.current||A)&&(null==O||O(A)),X.current=!0)}),[A,L]);var Q=N;return W[Su]&&K===Ou&&(Q=bl({transition:"none"},Q)),[L,K,Q,null!=A?A:t]}const Yu=function(e){var t=e;"object"===Y(e)&&(t=e.transitionSupport);var n=r.forwardRef((function(e,n){var a=e.visible,o=void 0===a||a,i=e.removeOnLeave,l=void 0===i||i,s=e.forceRender,u=e.children,c=e.motionName,d=e.leavedClassName,f=e.eventProps,m=function(e,n){return!(!e.motionName||!t||!1===n)}(e,r.useContext(gu).motion),h=(0,r.useRef)(),g=(0,r.useRef)(),v=zl(Gu(m,o,(function(){try{return h.current instanceof HTMLElement?h.current:ts(g.current)}catch(e){return null}}),e),4),y=v[0],b=v[1],x=v[2],w=v[3],E=r.useRef(w);w&&(E.current=!0);var C,S=r.useCallback((function(e){h.current=e,as(n,e)}),[n]),O=bl(bl({},f),{},{visible:o});if(u)if(y===bu)C=w?u(bl({},O),S):!l&&E.current&&d?u(bl(bl({},O),{},{className:d}),S):s||!l&&!d?u(bl(bl({},O),{},{style:{display:"none"}}),S):null;else{var k;b===Su?k="prepare":Ku(b)?k="active":b===Ou&&(k="start");var A=Uu(c,"".concat(y,"-").concat(k));C=u(bl(bl({},O),{},{className:p()(Uu(c,y),vl(vl({},A,A&&k),c,"string"==typeof c)),style:x}),S)}else C=null;return r.isValidElement(C)&&ls(C)&&(us(C)||(C=r.cloneElement(C,{ref:S}))),r.createElement(yu,{ref:g},C)}));return n.displayName="CSSMotion",n}(Bu);var Xu="add",Qu="keep",Ju="remove",ec="removed";function tc(e){var t;return bl(bl({},t=e&&"object"===Y(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function nc(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(tc)}var rc=["component","children","onVisibleChanged","onAllRemoved"],ac=["status"],oc=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yu,t=function(t){El(a,t);var n=kl(a);function a(){var e;xl(this,a);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e=n.call.apply(n,[this].concat(r)),vl((0,te.Z)(e),"state",{keyEntities:[]}),vl((0,te.Z)(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:bl(bl({},e),{},{status:ec})}))}}),(function(){var t=e.state.keyEntities.filter((function(e){return e.status!==ec})).length;0===t&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return J(a,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,a=this.props,o=a.component,i=a.children,l=a.onVisibleChanged,s=(a.onAllRemoved,Ul(a,rc)),u=o||r.Fragment,c={};return oc.forEach((function(e){c[e]=s[e],delete s[e]})),delete s.keys,r.createElement(u,s,n.map((function(n,a){var o=n.status,s=Ul(n,ac),u=o===Xu||o===Qu;return r.createElement(e,(0,$.Z)({},c,{key:s.key,visible:u,eventProps:s,onVisibleChanged:function(e){null==l||l(e,{key:s.key}),e||t.removeKey(s.key)}}),(function(e,t){return i(bl(bl({},e),{},{index:a}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,a=nc(n),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,a=t.length,o=nc(e),i=nc(t);o.forEach((function(e){for(var t=!1,o=r;o<a;o+=1){var l=i[o];if(l.key===e.key){r<o&&(n=n.concat(i.slice(r,o).map((function(e){return bl(bl({},e),{},{status:Xu})}))),r=o),n.push(bl(bl({},l),{},{status:Qu})),r+=1,t=!0;break}}t||n.push(bl(bl({},e),{},{status:Ju}))})),r<a&&(n=n.concat(i.slice(r).map((function(e){return bl(bl({},e),{},{status:Xu})}))));var l={};n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1}));var s=Object.keys(l).filter((function(e){return l[e]>1}));return s.forEach((function(e){n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==Ju})),n.forEach((function(t){t.key===e&&(t.status=Qu)}))})),n}(r,a);return{keyEntities:o.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==ec||e.status!==Ju}))}}}]),a}(r.Component);vl(t,"defaultProps",{component:"div"})}(Bu);const ic=Yu;var lc=function(e){for(var t=e.prefixCls,n=e.level,a=e.isStart,o=e.isEnd,i="".concat(t,"-indent-unit"),l=[],s=0;s<n;s+=1)l.push(r.createElement("span",{key:s,className:p()(i,vl(vl({},"".concat(i,"-start"),a[s]),"".concat(i,"-end"),o[s]))}));return r.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},l)};const sc=r.memo(lc);function uc(e,t){return e[t]}var cc=["children"];function dc(e,t){return"".concat(e,"-").concat(t)}function pc(e,t){return null!=e?e:t}function fc(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function mc(e,t,n){var r=fc(n),a=r._title,o=r.key,i=r.children,l=new Set(!0===t?[]:t),s=[];return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(u,c){for(var d,p=dc(r?r.pos:"0",c),f=pc(u[o],p),m=0;m<a.length;m+=1){var h=a[m];if(void 0!==u[h]){d=u[h];break}}var g,v,y,b=Object.assign((g=u,v=[].concat(qt(a),[o,i]),y=Object.assign({},g),Array.isArray(v)&&v.forEach((function(e){delete y[e]})),y),{title:d,key:f,parent:r,pos:p,children:null,data:u,isStart:[].concat(qt(r?r.isStart:[]),[0===c]),isEnd:[].concat(qt(r?r.isEnd:[]),[c===n.length-1])});return s.push(b),!0===t||l.has(f)?b.children=e(u[i]||[],b):b.children=[],b}))}(e),s}function hc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,a=t.onProcessFinished,o=t.externalGetKey,i=t.childrenPropName,l=t.fieldNames,s=o||(arguments.length>2?arguments[2]:void 0),u={},c={},d={posEntities:u,keyEntities:c};return n&&(d=n(d)||d),function(e,t,n){var a,o=("object"===Y(n)?n:{externalGetKey:n})||{},i=o.childrenPropName,l=o.externalGetKey,s=fc(o.fieldNames),p=s.key,f=s.children,m=i||f;l?"string"==typeof l?a=function(e){return e[l]}:"function"==typeof l&&(a=function(e){return l(e)}):a=function(e,t){return pc(e[p],t)},function t(n,o,i,l){var s=n?n[m]:e,p=n?dc(i.pos,o):"0",f=n?[].concat(qt(l),[n]):[];if(n){var h=a(n,p);!function(e){var t=e.node,n=e.index,a=e.pos,o=e.key,i=e.parentPos,l=e.level,s={node:t,nodes:e.nodes,index:n,key:o,pos:a,level:l},p=pc(o,a);u[a]=s,c[p]=s,s.parent=u[i],s.parent&&(s.parent.children=s.parent.children||[],s.parent.children.push(s)),r&&r(s,d)}({node:n,index:o,pos:p,key:h,parentPos:i.node?i.pos:null,level:i.level+1,nodes:f})}s&&s.forEach((function(e,r){t(e,r,{node:n,pos:p,level:i?i.level+1:-1},f)}))}(null)}(e,0,{externalGetKey:s,childrenPropName:i,fieldNames:l}),a&&a(d),d}function gc(e,t){var n=t.expandedKeys,r=t.selectedKeys,a=t.loadedKeys,o=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,u=t.dropPosition,c=uc(t.keyEntities,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==a.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==i.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(c?c.pos:""),dragOver:s===e&&0===u,dragOverGapTop:s===e&&-1===u,dragOverGapBottom:s===e&&1===u}}function vc(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,i=e.loading,l=e.halfChecked,s=e.dragOver,u=e.dragOverGapTop,c=e.dragOverGapBottom,d=e.pos,p=e.active,f=e.eventKey,m=bl(bl({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:i,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:d,active:p,key:f});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Fl(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var yc=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],bc="open",xc="close",wc=function(e){var t,n,r,o=e.eventKey,i=e.className,l=e.style,s=e.dragOver,u=e.dragOverGapTop,c=e.dragOverGapBottom,d=e.isLeaf,f=e.isStart,m=e.isEnd,h=e.expanded,g=e.selected,v=e.checked,y=e.halfChecked,b=e.loading,x=e.domRef,w=e.active,E=e.data,C=e.onMouseMove,S=e.selectable,O=Ul(e,yc),k=a().useContext(Vl),A=a().useContext(Bl),P=a().useRef(null),T=zl(a().useState(!1),2),D=T[0],M=T[1],_=!!(k.disabled||e.disabled||null!==(t=A.nodeDisabled)&&void 0!==t&&t.call(A,E)),I=a().useMemo((function(){return!(!k.checkable||!1===e.checkable)&&k.checkable}),[k.checkable,e.checkable]),N=function(t){_||I&&!e.disableCheckbox&&k.onNodeCheck(t,vc(e),!v)},R=a().useMemo((function(){return"boolean"==typeof S?S:k.selectable}),[S,k.selectable]),L=function(t){k.onNodeClick(t,vc(e)),R?function(t){_||k.onNodeSelect(t,vc(e))}(t):N(t)},j=function(t){k.onNodeDoubleClick(t,vc(e))},F=function(t){k.onNodeMouseEnter(t,vc(e))},V=function(t){k.onNodeMouseLeave(t,vc(e))},B=function(t){k.onNodeContextMenu(t,vc(e))},H=a().useMemo((function(){return!(!k.draggable||k.draggable.nodeDraggable&&!k.draggable.nodeDraggable(E))}),[k.draggable,E]),z=function(t){b||k.onNodeExpand(t,vc(e))},U=a().useMemo((function(){var e=(uc(k.keyEntities,o)||{}).children;return Boolean((e||[]).length)}),[k.keyEntities,o]),Z=a().useMemo((function(){return!1!==d&&(d||!k.loadData&&!U||k.loadData&&e.loaded&&!U)}),[d,k.loadData,U,e.loaded]);a().useEffect((function(){b||"function"!=typeof k.loadData||!h||Z||e.loaded||k.onNodeLoad(vc(e))}),[b,k.loadData,k.onNodeLoad,h,Z,e]);var W=a().useMemo((function(){var e;return null!==(e=k.draggable)&&void 0!==e&&e.icon?a().createElement("span",{className:"".concat(k.prefixCls,"-draggable-icon")},k.draggable.icon):null}),[k.draggable]),q=function(t){var n=e.switcherIcon||k.switcherIcon;return"function"==typeof n?n(bl(bl({},e),{},{isLeaf:t})):n},K=a().useMemo((function(){if(!I)return null;var t="boolean"!=typeof I?I:null;return a().createElement("span",{className:p()("".concat(k.prefixCls,"-checkbox"),vl(vl(vl({},"".concat(k.prefixCls,"-checkbox-checked"),v),"".concat(k.prefixCls,"-checkbox-indeterminate"),!v&&y),"".concat(k.prefixCls,"-checkbox-disabled"),_||e.disableCheckbox)),onClick:N,role:"checkbox","aria-checked":y?"mixed":v,"aria-disabled":_||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)}),[I,v,y,_,e.disableCheckbox,e.title]),G=a().useMemo((function(){return Z?null:h?bc:xc}),[Z,h]),Y=a().useMemo((function(){return a().createElement("span",{className:p()("".concat(k.prefixCls,"-iconEle"),"".concat(k.prefixCls,"-icon__").concat(G||"docu"),vl({},"".concat(k.prefixCls,"-icon_loading"),b))})}),[k.prefixCls,G,b]),X=a().useMemo((function(){var t=Boolean(k.draggable);return!e.disabled&&t&&k.dragOverNodeKey===o?k.dropIndicatorRender({dropPosition:k.dropPosition,dropLevelOffset:k.dropLevelOffset,indent:k.indent,prefixCls:k.prefixCls,direction:k.direction}):null}),[k.dropPosition,k.dropLevelOffset,k.indent,k.prefixCls,k.direction,k.draggable,k.dragOverNodeKey,k.dropIndicatorRender]),Q=a().useMemo((function(){var t,n,r=e.title,o=void 0===r?"---":r,i="".concat(k.prefixCls,"-node-content-wrapper");if(k.showIcon){var l=e.icon||k.icon;t=l?a().createElement("span",{className:p()("".concat(k.prefixCls,"-iconEle"),"".concat(k.prefixCls,"-icon__customize"))},"function"==typeof l?l(e):l):Y}else k.loadData&&b&&(t=Y);return n="function"==typeof o?o(E):k.titleRender?k.titleRender(E):o,a().createElement("span",{ref:P,title:"string"==typeof o?o:"",className:p()(i,"".concat(i,"-").concat(G||"normal"),vl({},"".concat(k.prefixCls,"-node-selected"),!_&&(g||D))),onMouseEnter:F,onMouseLeave:V,onContextMenu:B,onClick:L,onDoubleClick:j},t,a().createElement("span",{className:"".concat(k.prefixCls,"-title")},n),X)}),[k.prefixCls,k.showIcon,e,k.icon,Y,k.titleRender,E,G,F,V,B,L,j]),J=Ml(O,{aria:!0,data:!0}),ee=(uc(k.keyEntities,o)||{}).level,te=m[m.length-1],ne=!_&&H,re=k.draggingNodeKey===o,ae=void 0!==S?{"aria-selected":!!S}:void 0;return a().createElement("div",(0,$.Z)({ref:x,role:"treeitem","aria-expanded":d?void 0:h,className:p()(i,"".concat(k.prefixCls,"-treenode"),(r={},vl(vl(vl(vl(vl(vl(vl(vl(vl(vl(r,"".concat(k.prefixCls,"-treenode-disabled"),_),"".concat(k.prefixCls,"-treenode-switcher-").concat(h?"open":"close"),!d),"".concat(k.prefixCls,"-treenode-checkbox-checked"),v),"".concat(k.prefixCls,"-treenode-checkbox-indeterminate"),y),"".concat(k.prefixCls,"-treenode-selected"),g),"".concat(k.prefixCls,"-treenode-loading"),b),"".concat(k.prefixCls,"-treenode-active"),w),"".concat(k.prefixCls,"-treenode-leaf-last"),te),"".concat(k.prefixCls,"-treenode-draggable"),H),"dragging",re),vl(vl(vl(vl(vl(vl(vl(r,"drop-target",k.dropTargetKey===o),"drop-container",k.dropContainerKey===o),"drag-over",!_&&s),"drag-over-gap-top",!_&&u),"drag-over-gap-bottom",!_&&c),"filter-node",null===(n=k.filterTreeNode)||void 0===n?void 0:n.call(k,vc(e))),"".concat(k.prefixCls,"-treenode-leaf"),Z))),style:l,draggable:ne,onDragStart:ne?function(t){t.stopPropagation(),M(!0),k.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:H?function(t){t.preventDefault(),t.stopPropagation(),k.onNodeDragEnter(t,e)}:void 0,onDragOver:H?function(t){t.preventDefault(),t.stopPropagation(),k.onNodeDragOver(t,e)}:void 0,onDragLeave:H?function(t){t.stopPropagation(),k.onNodeDragLeave(t,e)}:void 0,onDrop:H?function(t){t.preventDefault(),t.stopPropagation(),M(!1),k.onNodeDrop(t,e)}:void 0,onDragEnd:H?function(t){t.stopPropagation(),M(!1),k.onNodeDragEnd(t,e)}:void 0,onMouseMove:C},ae,J),a().createElement(sc,{prefixCls:k.prefixCls,level:ee,isStart:f,isEnd:m}),W,function(){if(Z){var e=q(!0);return!1!==e?a().createElement("span",{className:p()("".concat(k.prefixCls,"-switcher"),"".concat(k.prefixCls,"-switcher-noop"))},e):null}var t=q(!1);return!1!==t?a().createElement("span",{onClick:z,className:p()("".concat(k.prefixCls,"-switcher"),"".concat(k.prefixCls,"-switcher_").concat(h?bc:xc))},t):null}(),K,Q)};wc.isTreeNode=1;const Ec=wc;var Cc=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Sc=r.forwardRef((function(e,t){var n=e.className,a=e.style,o=e.motion,i=e.motionNodes,l=e.motionType,s=e.onMotionStart,u=e.onMotionEnd,c=e.active,d=e.treeNodeRequiredProps,f=Ul(e,Cc),m=zl(r.useState(!0),2),h=m[0],g=m[1],v=r.useContext(Vl).prefixCls,y=i&&"hide"!==l;ql((function(){i&&y!==h&&g(y)}),[i]);var b=r.useRef(!1),x=function(){i&&!b.current&&(b.current=!0,u())};return function(e,t){var n=zl(r.useState(!1),2),a=n[0],o=n[1];ql((function(){if(a)return e(),function(){t()}}),[a]),ql((function(){return o(!0),function(){o(!1)}}),[])}((function(){i&&s()}),x),i?r.createElement(ic,(0,$.Z)({ref:t,visible:h},o,{motionAppear:"show"===l,onVisibleChanged:function(e){y===e&&x()}}),(function(e,t){var n=e.className,a=e.style;return r.createElement("div",{ref:t,className:p()("".concat(v,"-treenode-motion"),n),style:a},i.map((function(e){var t=Object.assign({},(Hl(e.data),e.data)),n=e.title,a=e.key,o=e.isStart,i=e.isEnd;delete t.children;var l=gc(a,d);return r.createElement(Ec,(0,$.Z)({},t,l,{title:n,active:c,data:e.data,key:a,isStart:o,isEnd:i}))})))})):r.createElement(Ec,(0,$.Z)({domRef:t,className:n,style:a},f,{active:c}))}));const Oc=Sc;function kc(e,t,n){var r=e.findIndex((function(e){return e.key===n})),a=e[r+1],o=t.findIndex((function(e){return e.key===n}));if(a){var i=t.findIndex((function(e){return e.key===a.key}));return t.slice(o+1,i)}return t.slice(o+1)}var Ac=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Pc={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Tc=function(){},Dc="RC_TREE_MOTION_".concat(Math.random()),Mc={key:Dc},_c={key:Dc,level:0,index:0,pos:"0",node:Mc,nodes:[Mc]},Ic={parent:null,children:[],pos:_c.pos,data:Mc,title:null,key:Dc,isStart:[],isEnd:[]};function Nc(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function Rc(e){return pc(e.key,e.pos)}var Lc=r.forwardRef((function(e,t){var n=e.prefixCls,a=e.data,o=(e.selectable,e.checkable,e.expandedKeys),i=e.selectedKeys,l=e.checkedKeys,s=e.loadedKeys,u=e.loadingKeys,c=e.halfCheckedKeys,d=e.keyEntities,p=e.disabled,f=e.dragging,m=e.dragOverNodeKey,h=e.dropPosition,g=e.motion,v=e.height,y=e.itemHeight,b=e.virtual,x=e.scrollWidth,w=e.focusable,E=e.activeItem,C=e.focused,S=e.tabIndex,O=e.onKeyDown,k=e.onFocus,A=e.onBlur,P=e.onActiveChange,T=e.onListChangeStart,D=e.onListChangeEnd,M=Ul(e,Ac),_=r.useRef(null),I=r.useRef(null);r.useImperativeHandle(t,(function(){return{scrollTo:function(e){_.current.scrollTo(e)},getIndentWidth:function(){return I.current.offsetWidth}}}));var N=zl(r.useState(o),2),R=N[0],L=N[1],j=zl(r.useState(a),2),F=j[0],V=j[1],B=zl(r.useState(a),2),H=B[0],z=B[1],U=zl(r.useState([]),2),Z=U[0],W=U[1],q=zl(r.useState(null),2),K=q[0],G=q[1],Y=r.useRef(a);function X(){var e=Y.current;V(e),z(e),W([]),G(null),D()}Y.current=a,ql((function(){L(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function a(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n<r?{add:!0,key:a(e,t)}:{add:!1,key:a(t,e)}}(R,o);if(null!==e.key)if(e.add){var t=F.findIndex((function(t){return t.key===e.key})),n=Nc(kc(F,a,e.key),b,v,y),r=F.slice();r.splice(t+1,0,Ic),z(r),W(n),G("show")}else{var i=a.findIndex((function(t){return t.key===e.key})),l=Nc(kc(a,F,e.key),b,v,y),s=a.slice();s.splice(i+1,0,Ic),z(s),W(l),G("hide")}else F!==a&&(V(a),z(a))}),[o,a]),r.useEffect((function(){f||X()}),[f]);var Q=g?H:a,J={expandedKeys:o,selectedKeys:i,loadedKeys:s,loadingKeys:u,checkedKeys:l,halfCheckedKeys:c,dragOverNodeKey:m,dropPosition:h,keyEntities:d};return r.createElement(r.Fragment,null,C&&E&&r.createElement("span",{style:Pc,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(E)),r.createElement("div",null,r.createElement("input",{style:Pc,disabled:!1===w||p,tabIndex:!1!==w?S:null,onKeyDown:O,onFocus:k,onBlur:A,value:"",onChange:Tc,"aria-label":"for screen reader"})),r.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},r.createElement("div",{className:"".concat(n,"-indent")},r.createElement("div",{ref:I,className:"".concat(n,"-indent-unit")}))),r.createElement(hu,(0,$.Z)({},M,{data:Q,itemKey:Rc,height:v,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:x,prefixCls:"".concat(n,"-list"),ref:_,role:"tree",onVisibleChange:function(e){e.every((function(e){return Rc(e)!==Dc}))&&X()}}),(function(e){var t=e.pos,n=Object.assign({},(Hl(e.data),e.data)),a=e.title,o=e.key,i=e.isStart,l=e.isEnd,s=pc(o,t);delete n.key,delete n.children;var u=gc(s,J);return r.createElement(Oc,(0,$.Z)({},n,u,{title:a,active:!!E&&o===E.key,pos:t,data:e.data,isStart:i,isEnd:l,motion:g,motionNodes:o===Dc?Z:null,motionType:K,onMotionStart:T,onMotionEnd:X,treeNodeRequiredProps:J,onMouseMove:function(){P(null)}}))})))}));const jc=Lc;function Fc(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Vc(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function Bc(e){return e.split("-")}function Hc(e,t){var n=[];return function e(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var r=t.key,a=t.children;n.push(r),e(a)}))}(uc(t,e).children),n}function zc(e){if(e.parent){var t=Bc(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Uc(e,t,n,r,a,o,i,l,s,u){var c,d=e.clientX,p=e.clientY,f=e.target.getBoundingClientRect(),m=f.top,h=f.height,g=(("rtl"===u?-1:1)*(((null==a?void 0:a.x)||0)-d)-12)/r,v=s.filter((function(e){var t;return null===(t=l[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),y=uc(l,n.eventKey);if(p<m+h/2){var b=i.findIndex((function(e){return e.key===y.key})),x=i[b<=0?0:b-1].key;y=uc(l,x)}var w=y.key,E=y,C=y.key,S=0,O=0;if(!v.includes(w))for(var k=0;k<g&&zc(y);k+=1)y=y.parent,O+=1;var A,P=t.data,T=y.node,D=!0;return A=Bc(y.pos),0===Number(A[A.length-1])&&0===y.level&&p<m+h/2&&o({dragNode:P,dropNode:T,dropPosition:-1})&&y.key===n.eventKey?S=-1:(E.children||[]).length&&v.includes(C)?o({dragNode:P,dropNode:T,dropPosition:0})?S=0:D=!1:0===O?g>-1.5?o({dragNode:P,dropNode:T,dropPosition:1})?S=1:D=!1:o({dragNode:P,dropNode:T,dropPosition:0})?S=0:o({dragNode:P,dropNode:T,dropPosition:1})?S=1:D=!1:o({dragNode:P,dropNode:T,dropPosition:1})?S=1:D=!1,{dropPosition:S,dropLevelOffset:O,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:C,dropContainerKey:0===S?null:(null===(c=y.parent)||void 0===c?void 0:c.key)||null,dropAllowed:D}}function Zc(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function Wc(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Y(e))return Fl(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function qc(e,t){var n=new Set;function r(e){if(!n.has(e)){var a=uc(t,e);if(a){n.add(e);var o=a.parent;a.node.disabled||o&&r(o.key)}}}return(e||[]).forEach((function(e){r(e)})),qt(n)}function $c(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function Kc(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,a=t.checkable;return!(!n&&!r)||!1===a}function Gc(e,t,n,r){var a,o=[];a=r||Kc;var i,l=new Set(e.filter((function(e){var t=!!uc(n,e);return t||o.push(e),t}))),s=new Map,u=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,a=s.get(r);a||(a=new Set,s.set(r,a)),a.add(t),u=Math.max(u,r)})),Fl(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),i=!0===t?function(e,t,n,r){for(var a=new Set(e),o=new Set,i=0;i<=n;i+=1)(t.get(i)||new Set).forEach((function(e){var t=e.key,n=e.node,o=e.children,i=void 0===o?[]:o;a.has(t)&&!r(n)&&i.filter((function(e){return!r(e.node)})).forEach((function(e){a.add(e.key)}))}));for(var l=new Set,s=n;s>=0;s-=1)(t.get(s)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from($c(o,a))}}(l,s,u,a):function(e,t,n,r,a){for(var o=new Set(e),i=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,l=void 0===r?[]:r;o.has(t)||i.has(t)||a(n)||l.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}));i=new Set;for(var s=new Set,u=r;u>=0;u-=1)(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!s.has(e.parent.key))if(a(e.parent.node))s.add(t.key);else{var r=!0,l=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),l||!n&&!i.has(t)||(l=!0)})),r||o.delete(t.key),l&&i.add(t.key),s.add(t.key)}}));return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from($c(i,o))}}(l,t.halfCheckedKeys,s,u,a),i}var Yc=function(e){El(n,e);var t=kl(n);function n(){var e;xl(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),vl((0,te.Z)(e),"destroyed",!1),vl((0,te.Z)(e),"delayedDragEnterLogic",void 0),vl((0,te.Z)(e),"loadingRetryTimes",{}),vl((0,te.Z)(e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:fc()}),vl((0,te.Z)(e),"dragStartMousePosition",null),vl((0,te.Z)(e),"dragNodeProps",null),vl((0,te.Z)(e),"currentMouseOverDroppableNodeKey",null),vl((0,te.Z)(e),"listRef",r.createRef()),vl((0,te.Z)(e),"onNodeDragStart",(function(t,n){var r=e.state,a=r.expandedKeys,o=r.keyEntities,i=e.props.onDragStart,l=n.eventKey;e.dragNodeProps=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var s=Fc(a,l);e.setState({draggingNodeKey:l,dragChildrenKeys:Hc(l,o),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(s),window.addEventListener("dragend",e.onWindowDragEnd),null==i||i({event:t,node:vc(n)})})),vl((0,te.Z)(e),"onNodeDragEnter",(function(t,n){var r=e.state,a=r.expandedKeys,o=r.keyEntities,i=r.dragChildrenKeys,l=r.flattenNodes,s=r.indent,u=e.props,c=u.onDragEnter,d=u.onExpand,p=u.allowDrop,f=u.direction,m=n.pos,h=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==h&&(e.currentMouseOverDroppableNodeKey=h),e.dragNodeProps){var g=Uc(t,e.dragNodeProps,n,s,e.dragStartMousePosition,p,l,o,a,f),v=g.dropPosition,y=g.dropLevelOffset,b=g.dropTargetKey,x=g.dropContainerKey,w=g.dropTargetPos,E=g.dropAllowed,C=g.dragOverNodeKey;!i.includes(b)&&E?(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var r=qt(a),i=uc(o,n.eventKey);i&&(i.children||[]).length&&(r=Vc(a,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(r),null==d||d(r,{node:vc(n),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),e.dragNodeProps.eventKey!==b||0!==y?(e.setState({dragOverNodeKey:C,dropPosition:v,dropLevelOffset:y,dropTargetKey:b,dropContainerKey:x,dropTargetPos:w,dropAllowed:E}),null==c||c({event:t,node:vc(n),expandedKeys:a})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),vl((0,te.Z)(e),"onNodeDragOver",(function(t,n){var r=e.state,a=r.dragChildrenKeys,o=r.flattenNodes,i=r.keyEntities,l=r.expandedKeys,s=r.indent,u=e.props,c=u.onDragOver,d=u.allowDrop,p=u.direction;if(e.dragNodeProps){var f=Uc(t,e.dragNodeProps,n,s,e.dragStartMousePosition,d,o,i,l,p),m=f.dropPosition,h=f.dropLevelOffset,g=f.dropTargetKey,v=f.dropContainerKey,y=f.dropTargetPos,b=f.dropAllowed,x=f.dragOverNodeKey;!a.includes(g)&&b&&(e.dragNodeProps.eventKey===g&&0===h?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&h===e.state.dropLevelOffset&&g===e.state.dropTargetKey&&v===e.state.dropContainerKey&&y===e.state.dropTargetPos&&b===e.state.dropAllowed&&x===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:h,dropTargetKey:g,dropContainerKey:v,dropTargetPos:y,dropAllowed:b,dragOverNodeKey:x}),null==c||c({event:t,node:vc(n)}))}})),vl((0,te.Z)(e),"onNodeDragLeave",(function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var r=e.props.onDragLeave;null==r||r({event:t,node:vc(n)})})),vl((0,te.Z)(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),vl((0,te.Z)(e),"onNodeDragEnd",(function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==r||r({event:t,node:vc(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),vl((0,te.Z)(e),"onNodeDrop",(function(t,n){var r,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.state,i=o.dragChildrenKeys,l=o.dropPosition,s=o.dropTargetKey,u=o.dropTargetPos;if(o.dropAllowed){var c=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==s){var d=bl(bl({},gc(s,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===s,data:uc(e.state.keyEntities,s).node}),p=i.includes(s);Fl(!p,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var f=Bc(u),m={event:t,node:vc(d),dragNode:e.dragNodeProps?vc(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(i),dropToGap:0!==l,dropPosition:l+Number(f[f.length-1])};a||null==c||c(m),e.dragNodeProps=null}}})),vl((0,te.Z)(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),vl((0,te.Z)(e),"triggerExpandActionExpand",(function(t,n){var r=e.state,a=r.expandedKeys,o=r.flattenNodes,i=n.expanded,l=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var s=o.filter((function(e){return e.key===l}))[0],u=vc(bl(bl({},gc(l,e.getTreeNodeRequiredProps())),{},{data:s.data}));e.setExpandedKeys(i?Fc(a,l):Vc(a,l)),e.onNodeExpand(t,u)}})),vl((0,te.Z)(e),"onNodeClick",(function(t,n){var r=e.props,a=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==a||a(t,n)})),vl((0,te.Z)(e),"onNodeDoubleClick",(function(t,n){var r=e.props,a=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==a||a(t,n)})),vl((0,te.Z)(e),"onNodeSelect",(function(t,n){var r=e.state.selectedKeys,a=e.state,o=a.keyEntities,i=a.fieldNames,l=e.props,s=l.onSelect,u=l.multiple,c=n.selected,d=n[i.key],p=!c,f=(r=p?u?Vc(r,d):[d]:Fc(r,d)).map((function(e){var t=uc(o,e);return t?t.node:null})).filter(Boolean);e.setUncontrolledState({selectedKeys:r}),null==s||s(r,{event:"select",selected:p,node:n,selectedNodes:f,nativeEvent:t.nativeEvent})})),vl((0,te.Z)(e),"onNodeCheck",(function(t,n,r){var a,o=e.state,i=o.keyEntities,l=o.checkedKeys,s=o.halfCheckedKeys,u=e.props,c=u.checkStrictly,d=u.onCheck,p=n.key,f={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(c){var m=r?Vc(l,p):Fc(l,p);a={checked:m,halfChecked:Fc(s,p)},f.checkedNodes=m.map((function(e){return uc(i,e)})).filter(Boolean).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:m})}else{var h=Gc([].concat(qt(l),[p]),!0,i),g=h.checkedKeys,v=h.halfCheckedKeys;if(!r){var y=new Set(g);y.delete(p);var b=Gc(Array.from(y),{checked:!1,halfCheckedKeys:v},i);g=b.checkedKeys,v=b.halfCheckedKeys}a=g,f.checkedNodes=[],f.checkedNodesPositions=[],f.halfCheckedKeys=v,g.forEach((function(e){var t=uc(i,e);if(t){var n=t.node,r=t.pos;f.checkedNodes.push(n),f.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:v})}null==d||d(a,f)})),vl((0,te.Z)(e),"onNodeLoad",(function(t){var n,r=t.key,a=uc(e.state.keyEntities,r);if(null==a||null===(n=a.children)||void 0===n||!n.length){var o=new Promise((function(n,a){e.setState((function(o){var i=o.loadedKeys,l=void 0===i?[]:i,s=o.loadingKeys,u=void 0===s?[]:s,c=e.props,d=c.loadData,p=c.onLoad;return!d||l.includes(r)||u.includes(r)?null:(d(t).then((function(){var a=Vc(e.state.loadedKeys,r);null==p||p(a,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:a}),e.setState((function(e){return{loadingKeys:Fc(e.loadingKeys,r)}})),n()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:Fc(e.loadingKeys,r)}})),e.loadingRetryTimes[r]=(e.loadingRetryTimes[r]||0)+1,e.loadingRetryTimes[r]>=10){var o=e.state.loadedKeys;Fl(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:Vc(o,r)}),n()}a(t)})),{loadingKeys:Vc(u,r)})}))}));return o.catch((function(){})),o}})),vl((0,te.Z)(e),"onNodeMouseEnter",(function(t,n){var r=e.props.onMouseEnter;null==r||r({event:t,node:n})})),vl((0,te.Z)(e),"onNodeMouseLeave",(function(t,n){var r=e.props.onMouseLeave;null==r||r({event:t,node:n})})),vl((0,te.Z)(e),"onNodeContextMenu",(function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))})),vl((0,te.Z)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];null==t||t.apply(void 0,r)})),vl((0,te.Z)(e),"onBlur",(function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];null==t||t.apply(void 0,r)})),vl((0,te.Z)(e),"getTreeNodeRequiredProps",(function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}})),vl((0,te.Z)(e),"setExpandedKeys",(function(t){var n=e.state,r=mc(n.treeData,t,n.fieldNames);e.setUncontrolledState({expandedKeys:t,flattenNodes:r},!0)})),vl((0,te.Z)(e),"onNodeExpand",(function(t,n){var r=e.state.expandedKeys,a=e.state,o=a.listChanging,i=a.fieldNames,l=e.props,s=l.onExpand,u=l.loadData,c=n.expanded,d=n[i.key];if(!o){var p=r.includes(d),f=!c;if(Fl(c&&p||!c&&!p,"Expand state not sync with index check"),r=f?Vc(r,d):Fc(r,d),e.setExpandedKeys(r),null==s||s(r,{node:n,expanded:f,nativeEvent:t.nativeEvent}),f&&u){var m=e.onNodeLoad(n);m&&m.then((function(){var t=mc(e.state.treeData,r,i);e.setUncontrolledState({flattenNodes:t})})).catch((function(){var t=Fc(e.state.expandedKeys,d);e.setExpandedKeys(t)}))}}})),vl((0,te.Z)(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),vl((0,te.Z)(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),vl((0,te.Z)(e),"onActiveChange",(function(t){var n=e.state.activeKey,r=e.props,a=r.onActiveChange,o=r.itemScrollOffset,i=void 0===o?0:o;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:i}),null==a||a(t))})),vl((0,te.Z)(e),"getActiveItem",(function(){var t=e.state,n=t.activeKey,r=t.flattenNodes;return null===n?null:r.find((function(e){return e.key===n}))||null})),vl((0,te.Z)(e),"offsetActiveKey",(function(t){var n=e.state,r=n.flattenNodes,a=n.activeKey,o=r.findIndex((function(e){return e.key===a}));-1===o&&t<0&&(o=r.length);var i=r[o=(o+t+r.length)%r.length];if(i){var l=i.key;e.onActiveChange(l)}else e.onActiveChange(null)})),vl((0,te.Z)(e),"onKeyDown",(function(t){var n=e.state,r=n.activeKey,a=n.expandedKeys,o=n.checkedKeys,i=n.fieldNames,l=e.props,s=l.onKeyDown,u=l.checkable,c=l.selectable;switch(t.which){case Pl.UP:e.offsetActiveKey(-1),t.preventDefault();break;case Pl.DOWN:e.offsetActiveKey(1),t.preventDefault()}var d=e.getActiveItem();if(d&&d.data){var p=e.getTreeNodeRequiredProps(),f=!1===d.data.isLeaf||!!(d.data[i.children]||[]).length,m=vc(bl(bl({},gc(r,p)),{},{data:d.data,active:!0}));switch(t.which){case Pl.LEFT:f&&a.includes(r)?e.onNodeExpand({},m):d.parent&&e.onActiveChange(d.parent.key),t.preventDefault();break;case Pl.RIGHT:f&&!a.includes(r)?e.onNodeExpand({},m):d.children&&d.children.length&&e.onActiveChange(d.children[0].key),t.preventDefault();break;case Pl.ENTER:case Pl.SPACE:!u||m.disabled||!1===m.checkable||m.disableCheckbox?u||!c||m.disabled||!1===m.selectable||e.onNodeSelect({},m):e.onNodeCheck({},m,!o.includes(r))}}null==s||s(t)})),vl((0,te.Z)(e),"setUncontrolledState",(function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var a=!1,o=!0,i={};Object.keys(t).forEach((function(n){e.props.hasOwnProperty(n)?o=!1:(a=!0,i[n]=t[n])})),!a||n&&!o||e.setState(bl(bl({},i),r))}})),vl((0,te.Z)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return J(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,r=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:r}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,a=t.flattenNodes,o=t.keyEntities,i=t.draggingNodeKey,l=t.activeKey,s=t.dropLevelOffset,u=t.dropContainerKey,c=t.dropTargetKey,d=t.dropPosition,f=t.dragOverNodeKey,m=t.indent,h=this.props,g=h.prefixCls,v=h.className,y=h.style,b=h.showLine,x=h.focusable,w=h.tabIndex,E=void 0===w?0:w,C=h.selectable,S=h.showIcon,O=h.icon,k=h.switcherIcon,A=h.draggable,P=h.checkable,T=h.checkStrictly,D=h.disabled,M=h.motion,_=h.loadData,I=h.filterTreeNode,N=h.height,R=h.itemHeight,L=h.scrollWidth,j=h.virtual,F=h.titleRender,V=h.dropIndicatorRender,B=h.onContextMenu,H=h.onScroll,z=h.direction,U=h.rootClassName,Z=h.rootStyle,W=Ml(this.props,{aria:!0,data:!0});A&&(e="object"===Y(A)?A:"function"==typeof A?{nodeDraggable:A}:{});var q={prefixCls:g,selectable:C,showIcon:S,icon:O,switcherIcon:k,draggable:e,draggingNodeKey:i,checkable:P,checkStrictly:T,disabled:D,keyEntities:o,dropLevelOffset:s,dropContainerKey:u,dropTargetKey:c,dropPosition:d,dragOverNodeKey:f,indent:m,direction:z,dropIndicatorRender:V,loadData:_,filterTreeNode:I,titleRender:F,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return r.createElement(Vl.Provider,{value:q},r.createElement("div",{className:p()(g,v,U,vl(vl(vl({},"".concat(g,"-show-line"),b),"".concat(g,"-focused"),n),"".concat(g,"-active-focused"),null!==l)),style:Z},r.createElement(jc,(0,$.Z)({ref:this.listRef,prefixCls:g,style:y,data:a,disabled:D,selectable:C,checkable:!!P,motion:M,dragging:null!==i,height:N,itemHeight:R,virtual:j,focusable:x,focused:n,tabIndex:E,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:B,onScroll:H,scrollWidth:L},this.getTreeNodeRequiredProps(),W))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=t.prevProps,a={prevProps:e};function o(t){return!r&&e.hasOwnProperty(t)||r&&r[t]!==e[t]}var i=t.fieldNames;if(o("fieldNames")&&(i=fc(e.fieldNames),a.fieldNames=i),o("treeData")?n=e.treeData:o("children")&&(Fl(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=function e(t){return Xl(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return Fl(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,a=r.children,o=bl({key:n},Ul(r,cc)),i=e(a);return i.length&&(o.children=i),o})).filter((function(e){return e}))}(e.children)),n){a.treeData=n;var l=hc(n,{fieldNames:i});a.keyEntities=bl(vl({},Dc,_c),l.keyEntities)}var s,u=a.keyEntities||t.keyEntities;if(o("expandedKeys")||r&&o("autoExpandParent"))a.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?qc(e.expandedKeys,u):e.expandedKeys;else if(!r&&e.defaultExpandAll){var c=bl({},u);delete c[Dc];var d=[];Object.keys(c).forEach((function(e){var t=c[e];t.children&&t.children.length&&d.push(t.key)})),a.expandedKeys=d}else!r&&e.defaultExpandedKeys&&(a.expandedKeys=e.autoExpandParent||e.defaultExpandParent?qc(e.defaultExpandedKeys,u):e.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,n||a.expandedKeys){var p=mc(n||t.treeData,a.expandedKeys||t.expandedKeys,i);a.flattenNodes=p}if(e.selectable&&(o("selectedKeys")?a.selectedKeys=Zc(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(a.selectedKeys=Zc(e.defaultSelectedKeys,e))),e.checkable&&(o("checkedKeys")?s=Wc(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?s=Wc(e.defaultCheckedKeys)||{}:n&&(s=Wc(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),s)){var f=s,m=f.checkedKeys,h=void 0===m?[]:m,g=f.halfCheckedKeys,v=void 0===g?[]:g;if(!e.checkStrictly){var y=Gc(h,!0,u);h=y.checkedKeys,v=y.halfCheckedKeys}a.checkedKeys=h,a.halfCheckedKeys=v}return o("loadedKeys")&&(a.loadedKeys=e.loadedKeys),a}}]),n}(r.Component);vl(Yc,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-n*r;break;case 1:o.bottom=0,o.left=-n*r;break;case 0:o.bottom=0,o.left=r}return a().createElement("div",{style:o})},allowDrop:function(){return!0},expandAction:!1}),vl(Yc,"TreeNode",Ec);const Xc=Yc,Qc=JSON.parse('{"levelLines":"TreeLevelLines_levelLines__L29wd","levelLine":"TreeLevelLines_levelLine__L29wd","showLine":"TreeLevelLines_showLine__L29wd","lastLevelLine":"TreeLevelLines_lastLevelLine__L29wd","horizontalLine":"TreeLevelLines_horizontalLine__L29wd"}');Vr('\n.TreeLevelLines_levelLines__L29wd {\n\tposition: absolute;\n\tdisplay: flex;\n\tpadding-left: 0;\n\tcursor: initial;\n\tbottom: 0;\n\ttop: 0;\n\tz-index: 0;\n}\n\n.TreeLevelLines_levelLine__L29wd {\n\tpadding-left: 16px;\n\theight: 100%;\n\tposition: relative;\n}\n\n.TreeLevelLines_showLine__L29wd::after {\n\tcontent: "";\n\tposition: absolute;\n\theight: 100%;\n\twidth: 1px;\n\tleft: 14px;\n\ttop: 0;\n\tbottom: 0;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n}\n\n.TreeLevelLines_lastLevelLine__L29wd::after {\n\theight: 50%;\n}\n\n.TreeLevelLines_lastLevelLine__L29wd {\n\tpadding-left: 29px;\n}\n\n.TreeLevelLines_horizontalLine__L29wd::before {\n\tcontent: "";\n\theight: 1px;\n\twidth: 5px;\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 14px;\n\tbackground-color: var(--reltio-color-bg-transparent-1);\n}\n');const Jc=Qc,ed=(0,r.memo)((({needDrawLine:e=!1,isLastLevelLine:t=!1,drawHorizontalLine:n=!1})=>(0,Wn.jsx)("div",{className:Br(Jc.levelLine,e&&Jc.showLine,t&&Jc.lastLevelLine,n&&Jc.horizontalLine)}))),td=(0,r.memo)((({levelLines:e,isLast:t=!1})=>{const n=e,r=0===n.length,a=n.length+2;return r?null:(0,Wn.jsxs)("div",{className:Br(Jc.levelLines),children:[n.map(((e,t)=>(0,Wn.jsx)(ed,{needDrawLine:e},`${t}-${e}`))),(0,Wn.jsx)(ed,{needDrawLine:!0,drawHorizontalLine:!0,isLastLevelLine:t},a)]})}));ed.displayName="LevelLine",td.displayName="TreeLevelLines";const nd=JSON.parse('{"wrapper":"TreeNode_wrapper__L29wd","indent":"TreeNode_indent__L29wd","toggle":"TreeNode_toggle__L29wd","chevron":"TreeNode_chevron__L29wd","expanded":"TreeNode_expanded__L29wd","spinner":"TreeNode_spinner__L29wd","spin":"TreeNode_spin__L29wd","actions":"TreeNode_actions__L29wd"}');Vr("\n.TreeNode_wrapper__L29wd {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 1.5;\n\tpadding: 2px 4px;\n\tposition: relative;\n\tz-index: 1;\n}\n\n.TreeNode_indent__L29wd {\n\tdisplay: inline-block;\n\twidth: calc(var(--depth, 1) * 16px);\n\tflex: 0 0 auto;\n}\n\n.TreeNode_toggle__L29wd {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 26px;\n\theight: 26px;\n\tborder: none;\n\tbackground: none;\n\tcolor: var(--reltio-color-text-secondary);\n\tcursor: pointer;\n}\n\n.TreeNode_chevron__L29wd {\n\ttransition: transform 0.2s ease;\n}\n\n.TreeNode_expanded__L29wd {\n\ttransform: rotate(90deg);\n}\n\n.TreeNode_spinner__L29wd {\n\tdisplay: inline-block;\n\twidth: 10px;\n\theight: 10px;\n\tborder-radius: 50%;\n\tborder: 2px solid currentColor;\n\tborder-top-color: transparent;\n\tanimation: TreeNode_spin__L29wd 0.8s linear infinite;\n}\n\n@keyframes TreeNode_spin__L29wd {\n\tfrom {\n\t\ttransform: rotate(0deg);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n}\n\n.TreeNode_actions__L29wd {\n\tmargin-left: auto;\n\topacity: 0;\n\ttransition: opacity 0.12s ease;\n}\n\n.TreeNode_wrapper__L29wd:hover .TreeNode_actions__L29wd {\n\topacity: 1;\n}\n");const rd=nd,ad=(0,r.memo)((({id:e,node:t,depth:n,isLeaf:a,isExpanded:o,levelLines:i,isLast:l,onToggle:s,LabelComponent:u})=>{const c=(0,r.useCallback)((n=>{n.stopPropagation(),s(e,o,t)}),[s,e,o,t]);return(0,Wn.jsxs)("div",{className:Br(rd.wrapper),"data-depth":n,children:[(0,Wn.jsx)(td,{levelLines:i,isLast:l}),(0,Wn.jsx)("span",{className:Br(rd.indent),style:{"--depth":`${n}`}}),a?(0,Wn.jsx)("span",{className:Br(rd.toggle),"aria-hidden":"true"}):t.isLoading?(0,Wn.jsx)("span",{className:Br(rd.toggle),"aria-hidden":"true",children:(0,Wn.jsx)("span",{className:Br(rd.spinner)})}):(0,Wn.jsx)("button",{type:"button",className:Br(rd.toggle),"aria-label":o?"Collapse":"Expand",onClick:c,children:(0,Wn.jsx)(Kr,{size:"small",className:Br(rd.chevron,o&&rd.expanded)})}),u?(0,Wn.jsx)(u,{data:t}):t.label]})}));ad.displayName="TreeNode";const od=(e,t=1,n)=>e.map((e=>({key:e.id,title:null,isLeaf:!e.children,data:{raw:e,depth:t,parentId:n},children:e.children?od(e.children,t+1,e.id):void 0}))),id=JSON.parse('{"root":"TreeList_root__L29wd","rc-tree-treenode":"TreeList_rc-tree-treenode__L29wd"}');Vr("\n.TreeList_root__L29wd {\n\tdisplay: block;\n\toverflow: auto;\n\tfont-family: system-ui, sans-serif;\n\tfont-size: 14px;\n\tcolor: var(--reltio-color-text);\n\tbackground: transparent;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n.TreeList_rc-tree-treenode__L29wd {\n\tlist-style: none;\n}\n");const ld=id,sd=(0,r.memo)((({data:e,LabelComponent:t,expandedKeys:n,onExpand:a})=>{const o=(0,r.useMemo)((()=>e.map((e=>e.id))),[e]),i=void 0!==n,[l,s]=(0,r.useState)((()=>i?new Set:new Set(o))),u=(0,r.useMemo)((()=>od(e)),[e]),c=(0,r.useMemo)((()=>(e=>{const t={},n=(e,r=[],a=0)=>{for(let o=0;o<e.length;o++){const i=e[o],l=o===e.length-1;if(t[i.key]=[r,l],i.children?.length){const e=0===a?[...r,!1]:[...r,!l];n(i.children,e,a+1)}}};return n(e),t})(u)),[u]),d=(0,r.useMemo)((()=>i?new Set(n??[]):l),[n,l,i]),p=(0,r.useMemo)((()=>Array.from(d)),[d]),f=(0,r.useCallback)(((e,t)=>{a?.(e,t),i||s(new Set(e))}),[i,a]),m=(0,r.useCallback)(((e,t,n)=>{const r=new Set(d);t?r.delete(e):r.add(e),f(Array.from(r),n)}),[d,f]),h=(0,r.useCallback)((e=>{const n=e.data.raw,r=!!e.isLeaf,a=d.has(e.key),[o,i]=c[e.key]??[[],!1];return(0,Wn.jsx)(ad,{id:e.key,node:n,depth:e.data.depth,isLeaf:r,isExpanded:a,levelLines:o,isLast:i,onToggle:m,LabelComponent:t})}),[d,c,t,m]);return(0,Wn.jsx)("div",{className:Br(ld.root),children:(0,Wn.jsx)(Xc,{treeData:u,expandAction:!1,virtual:!1,selectable:!1,expandedKeys:p,showIcon:!1,titleRender:h})})}));sd.displayName="TreeList";var ud=n(4492),cd=n.n(ud),dd=n(7517),pd=n.n(dd),fd=n(1884),md=n.n(fd),hd=n(8759),gd=n.n(hd),vd=n(3627),yd=n.n(vd),bd=n(5743),xd=n.n(bd);const wd=({entity:e,avatarClassName:t,imageClassName:n})=>{const r=L(),o=A()||"",i=(0,s.getEntityImage)(r,o,e),l=(0,s.getAbsoluteImageUrl)(o,(0,s.getEntityTypeImage)(r,e.type)),u=e=>{e.target.onError=null,e.target.src=(0,s.svg2Url)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(xd(),{className:p()(t,n),src:i,imgProps:{onError:u}},a().createElement("img",{className:n,src:l,alt:"fallback entity avatar",onError:u}))};var Ed=n(4073),Cd=n.n(Ed),Sd=n(2436),Od=n.n(Sd),kd=function(e,t){return kd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},kd(e,t)};"function"==typeof SuppressedError&&SuppressedError;var Ad=function(e){return"function"==typeof e},Pd=function(){return"undefined"==typeof window},Td=function(e){return e instanceof Element||e instanceof HTMLDocument},Dd=function(e){function t(t){var n=e.call(this,t)||this;n.cancelHandler=function(){n.resizeHandler&&n.resizeHandler.cancel&&(n.resizeHandler.cancel(),n.resizeHandler=null)},n.attachObserver=function(){var e=n.props,t=e.targetRef,r=e.observerOptions;if(!Pd()){t&&t.current&&(n.targetRef.current=t.current);var a=n.getElement();a&&(n.observableElement&&n.observableElement===a||(n.observableElement=a,n.resizeObserver.observe(a,r)))}},n.getElement=function(){var e=n.props,t=e.querySelector,r=e.targetDomEl;if(Pd())return null;if(t)return document.querySelector(t);if(r&&Td(r))return r;if(n.targetRef&&Td(n.targetRef.current))return n.targetRef.current;var a=(0,Ql.findDOMNode)(n);if(!a)return null;switch(n.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return a;default:return a.parentElement}},n.createResizeHandler=function(e){var t=n.props,r=t.handleWidth,a=void 0===r||r,o=t.handleHeight,i=void 0===o||o,l=t.onResize;(a||i)&&e.forEach((function(e){var t=e&&e.contentRect||{},r=t.width,o=t.height;!n.skipOnMount&&!Pd()&&function(e){var t=e.width,r=e.height;n.state.width===t&&n.state.height===r||n.state.width===t&&!i||n.state.height===r&&!a||(null==l||l(t,r),n.setState({width:t,height:r}))}({width:r,height:o}),n.skipOnMount=!1}))},n.getRenderType=function(){var e=n.props,t=e.render,a=e.children;return Ad(t)?"renderProp":Ad(a)?"childFunction":(0,r.isValidElement)(a)?"child":Array.isArray(a)?"childArray":"parent"};var a=t.skipOnMount,o=t.refreshMode,i=t.refreshRate,l=void 0===i?1e3:i,s=t.refreshOptions;return n.state={width:void 0,height:void 0},n.sizeRef={current:n.state},n.skipOnMount=a,n.targetRef=(0,r.createRef)(),n.observableElement=null,Pd()||(n.resizeHandler=function(e,t,n,r){switch(t){case"debounce":return Cd()(e,n,r);case"throttle":return Od()(e,n,r);default:return e}}(n.createResizeHandler,o,l,s),n.resizeObserver=new window.ResizeObserver(n.resizeHandler)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}kd(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.attachObserver()},t.prototype.componentDidUpdate=function(){this.attachObserver(),this.sizeRef.current=this.state},t.prototype.componentWillUnmount=function(){Pd()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},t.prototype.render=function(){var e=this.props,t=e.render,n=e.children,o=e.nodeType,i=void 0===o?"div":o,l=this.state,s={width:l.width,height:l.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return null==t?void 0:t(s);case"childFunction":return null==n?void 0:n(s);case"child":var u=n;if(u.type&&"string"==typeof u.type){var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(s,["targetRef"]);return(0,r.cloneElement)(u,c)}return(0,r.cloneElement)(u,s);case"childArray":return n.map((function(e){return!!e&&(0,r.cloneElement)(e,s)}));default:return a().createElement(i,null)}},t}(r.PureComponent);const Md=lr((e=>({tooltip:e.tooltip,popper:{zIndex:1e4}})));function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(null,arguments)}function Id(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Nd(e,t,n[t])}))}return e}function Nd(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Rd=e=>{let{children:t,value:n="",className:o,showOnExceededWidth:i=!0,showOnExceededHeight:l}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","value","className","showOnExceededWidth","showOnExceededHeight"]);const u=Md(),c=(0,r.useRef)(),[d,p]=(0,r.useState)(!1),f=()=>p(((e,t,n)=>e&&(t&&e.clientWidth<e.scrollWidth||n&&e.clientHeight<e.scrollHeight))(c.current,i,l));return(0,r.useEffect)(f,[l,i,n]),a().createElement(a().Fragment,null,a().createElement(Dd,{handleWidth:i,handleHeight:l,onResize:f,refreshMode:"debounce",refreshRate:100}),a().createElement(yd(),_d({ref:c,title:d?n:"",classes:Id({},u,{tooltip:o})},s),t))},Ld={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},success:{main:"#3B873E"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)",hint:"rgba(0,0,0,0.38)"},divider:"rgba(0,0,0,0.38)",SnackbarContent:{color:"#FFF",bg:"#121212"}},components:{MuiButton:{defaultProps:{color:"inherit"}},MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:{whiteSpace:"break-spaces"}}},MuiTab:{styleOverrides:{root:{maxWidth:"264px"}}},MuiDialogTitle:{styleOverrides:{root:{"&&+.MuiDialogContent-root":{paddingTop:"13px"}}}},MuiFilledInput:{styleOverrides:{root:{lineHeight:"1.1876em",backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},input:{"&.MuiSelect-select":{minHeight:"1.1876em"}}}},MuiTablePagination:{styleOverrides:{select:{"&.MuiInputBase-input":{minHeight:"1.1876em"}}}},MuiInputBase:{styleOverrides:{root:{"& .MuiInputAdornment-root":{color:"rgba(0,0,0,0.87)"}},input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"},"&.Mui-disabled":{WebkitTextFillColor:"inherit"}}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:"rgba(0, 0, 0, 0.08)","&.Mui-focusVisible":{backgroundColor:"rgba(0, 0, 0, 0.08)"},"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.08)"}}}}}},breakpoints:{values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},tooltip:{borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.54)"},inactiveBackground:"repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #e9e9e9 15px, #e9e9e9 16px)",inactiveSelectedBackground:"repeating-linear-gradient(45deg, #DBE9F4, #DBE9F4 14px, #CCDAE5 15px, #CCDAE5 16px)",inactiveSelectedHoverBackground:"repeating-linear-gradient(45deg, #D4E2ED, #D4E2ED 14px, #C6D4DF 15px, #C6D4DF 16px)",inactiveHoverBackground:"repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 14px, #e2e2e2 15px, #e2e2e2 16px)",inactive:{opacity:.7},basicView:{boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",borderRadius:"3px",backgroundColor:"#FFFFFF"},suggested:"rgb(237, 246, 251)"},jd={palette:{mode:"dark",primary:Ld.palette.primary,secondary:Ld.palette.secondary}},Fd=lr({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 7px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"16px",marginRight:"16px",flexShrink:0}}),Vd=({entity:e,className:t,size:n="small"})=>{const r=Fd(),o=L(),i=(0,s.getEntityType)(o,e.type),l=(i?(0,s.getPropWithInheritance)(o,i,"typeColor"):null)||Ld.palette.primary.main,u=(0,s.getEntityTypeLabel)(o,e);return a().createElement(Rd,{value:u,placement:"top"},a().createElement(gd(),{style:{backgroundColor:l,color:s.utils.Colors.getColor(l)?"#FFFFFF":"#212121"},className:p()(r[`entityType-${n}`],r["entityType-overflow"],t),component:"div"},u))};var Bd=n(6062),Hd=n.n(Bd),zd=n(1552);Hd()(zd.Z,{insert:"head",singleton:!1});const Ud=zd.Z.locals||{},Zd=({entity:e,children:t,className:n,classes:o,renderLabel:i=f.identity})=>{const l=L(),u=k((e=>e.showEntityId)),d=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,s.getEntityId)(e))}),[e]);if((0,f.isNil)(e))return null;const m=(0,s.getLabel)(e.label),h=e.secondaryLabel,g=(0,s.getBusinessCardAttributesText)(l,e),v=(0,s.isActiveObject)(e),y=e.uri,b=(0,s.getEntityId)(e);return a().createElement("div",{className:p()(Ud.profileBandWrapper,n),"data-reltio-id":"reltio-profile-band"},a().createElement("div",{className:p()(Ud.profileBand,null==o?void 0:o.profileBand,{[Ud.inactive]:!v}),"data-entity-uri":y},a().createElement(wd,{key:e.uri,entity:e,avatarClassName:Ud.profileIcon,imageClassName:Ud.imageProfileIcon}),a().createElement("div",{className:Ud.profileInfo},a().createElement("div",null,a().createElement(gd(),{variant:"h6",className:Ud.label},i(m)),h&&a().createElement(gd(),{variant:"subtitle2",className:Ud.secondaryLabel},h),g&&a().createElement(gd(),{variant:"subtitle1",className:Ud.businessCard},g)),a().createElement("div",{className:Ud.specialInfo},a().createElement("div",{className:Ud.entityType},a().createElement(Vd,{entity:e,size:"medium"}),!(0,s.isTempUri)(y)&&u&&a().createElement(yd(),{title:c().text("Copy to clipboard")},a().createElement(gd(),{display:"inline",variant:"body2",className:Ud.entityId,onClick:d},c().text("Entity ID"),": ",b))))),t&&a().createElement("div",null,t)))};var Wd=n(2004),qd=n.n(Wd),$d=n(4179),Kd=n.n($d),Gd=n(866),Yd=n.n(Gd);const Xd=a().createContext({profileBand:{}});Xd.displayName="LabelsContext";const Qd=lr((e=>({tooltip:e.tooltip,wrapper:{lineHeight:0}})));function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jd.apply(null,arguments)}const ep=e=>{const t=(0,r.forwardRef)(((t,n)=>{let{tooltipTitle:r,tooltipPlacement:o,showForDisabled:i=!1,tooltipClassName:l}=t,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["tooltipTitle","tooltipPlacement","showForDisabled","tooltipClassName"]);const u=Qd();return r?a().createElement(yd(),{ref:n,title:r,placement:o||"bottom",disableFocusListener:!0,disableTouchListener:!0,classes:{tooltip:p()(u.tooltip,l)},PopperProps:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}},(t=>t?a().createElement("span",{ref:n,className:u.wrapper},a().createElement(e,s)):a().createElement(e,Jd({ref:n},s)))(i)):a().createElement(e,Jd({ref:n},s))}));return t.displayName="WithTooltip",t};var tp=n(9233),np=n.n(tp);const rp={XXS:"XXS",XS:"XS",S:"S",M:"M",MPlus:"MPlus",L:"L",XL:"XL"},ap=lr({rootAll:{padding:"0"},rootXXS:{height:"16px",width:"16px"},iconXXS:{fontSize:"16px"},rootXS:{height:"20px",width:"20px"},iconXS:{fontSize:"20px"},rootS:{height:"24px",width:"24px"},iconS:{fontSize:"24px"},rootM:{height:"30px",width:"30px"},rootMPlus:{height:"36px",width:"36px"},rootL:{height:"40px",width:"40px"},rootXL:{height:"48px",width:"48px"},disabled:{fillOpacity:.5}});function op(){return op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},op.apply(null,arguments)}function ip(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){lp(e,t,n[t])}))}return e}function lp(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sp=(0,r.forwardRef)(((e,t)=>{const{className:n,onClick:r,icon:o,size:i=rp.XS,iconClassName:l,classes:s={}}=e,u=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","onClick","icon","size","iconClassName","classes"]),c=ap();return a().createElement(np(),op({ref:t,classes:ip({root:`${c[`root${i}`]} ${c.rootAll}`,disabled:c.disabled},s),onClick:r,className:n},u,{size:"large"}),o&&a().createElement(o,{classes:{root:c[`icon${i}`]},className:l}))}));sp.displayName="SmallIconButton";const up=ep(sp),cp=lr({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),dp=ep(qd()),pp=({className:e,total:t=0,onPrev:n,onNext:o,onSearchResultsClick:i,isPrevDisabled:l,isNextDisabled:u})=>{var d;const m=cp(),h=(0,r.useContext)(Xd),{OPEN_RESULTS:g,SEARCH_RESULT:v,SEARCH_RESULTS:y,NEXT_PROFILE:b,PREVIOUS_PROFILE:x}=(0,f.mergeRight)({OPEN_RESULTS:c().text("Go to search results"),SEARCH_RESULT:c().text("Search result"),SEARCH_RESULTS:c().text("Search results"),PREVIOUS_PROFILE:c().text("Go to previous profile"),NEXT_PROFILE:c().text("Go to next profile")},null!==(d=null==h?void 0:h.profileBand)&&void 0!==d?d:{});return a().createElement("div",{className:p()(m.container,e)},a().createElement(dp,{className:m.link,component:"button",variant:"caption",onClick:i,underline:"none",tooltipTitle:g},(0,s.formatNumberAsMetric)(t,1e6)," ",1===t?v:y),a().createElement(up,{size:"L",icon:Kd(),"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:x,onClick:n,disabled:l,showForDisabled:!0}),a().createElement(up,{size:"L",icon:Yd(),"data-reltio-id":"reltio-next-profile-button",tooltipTitle:b,onClick:o,disabled:u,showForDisabled:!0}))},fp=(0,r.createContext)(null);fp.displayName="ActionsHookContext";const mp=a().createContext({isLoading:!1,isEmptyState:!1,updateEntityLoadingState:f.identity,updateEntitiesNavigationLoadingState:f.identity,resetLoadingState:f.identity}),hp=new Promise((()=>{})),gp=({cancelPrevious:e=!0,cancelOnUnmount:t=!0}={})=>{const n=(0,r.useRef)(f.identity),a=()=>n.current();return(0,r.useEffect)((()=>()=>{t&&a()}),[]),(0,r.useCallback)((t=>(e&&a(),new Promise(((e,r)=>{n.current=()=>r("canceled"),t.then(e,r)})).catch((function(e){if("canceled"===e)return hp;throw e})))),[])};function vp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){yp(e,t,n[t])}))}return e}function yp(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class bp{constructor({data:{query:e,sortField:t,sortOrder:n},tenant:r,searchTenant:a,apiPath:o,dtssPath:i,globalSearchRequestOptions:l}){this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=(e=[],t={})=>{const n=[this.getQueryFilter(),...e],r=vp({},this.globalSearchRequestOptions,{sort:this.sortField,order:this.sortOrder,select:"uri,label,type",scoreEnabled:!1},t);return this.isDT()?(0,s.getFilteredEntitiesFromDataTenant)({filters:n,options:r,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.getFilteredEntities)({filters:n,options:r})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.getTotalFromDataTenant)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.getTotals)({filters:e,options:t})).then((e=>e.total))},this.query=e,this.sortField=t,this.sortOrder=n,this.tenant=r,this.searchTenant=a,this.apiPath=o,this.dtssPath=i,this.globalSearchRequestOptions=l}}class xp{constructor({data:e,tenant:t,apiPath:n}){this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=(e=[],t={})=>{const n=[{rawFilter:this.searchBody.filter},...e];return(0,s.getGraphSearchEntities)({apiPath:this.apiPath,tenant:this.tenant,searchBody:vp({},this.searchBody,{filter:e.length?(0,s.buildFilterQueryString)()(n):this.searchBody.filter}),options:t})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.getEntityId)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.getGraphSearchCount)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=e,this.tenant=t,this.apiPath=n}}const wp=(e,t)=>(0,f.pipe)((0,f.map)((0,f.prop)("uri")),(0,f.reject)((e=>t.includes(e))))(e),Ep=()=>{const e=gp(),t=gp(),n=gp(),a=(D="searchNavigationListener",v(w,(e=>e[D]))),o=z("updateSearchNavigationDataFields"),i=z("openEntity"),l=z("openPerspective"),{uri:u,index:c,total:d,tenant:p,cache:f}=V()||{},{type:m,data:h}=k((e=>e.searchProviderData))||{},g=F(),y=k((e=>e.apiPath)),b=k((e=>e.dtssPath)),x=H(["ovOnly"]),{updateEntitiesNavigationLoadingState:E}=(0,r.useContext)(mp),[C,S]=(0,r.useState)(!1),O=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new bp(t);case"graphsearch":return new xp(t)}})(m,{data:h,tenant:g,searchTenant:p,apiPath:y,dtssPath:b,globalSearchRequestOptions:x})),[m,h,g,p,y,b,x]),A=(0,r.useCallback)((e=>{o(e)}),[o]),P=(0,r.useCallback)((e=>{const t=g!==p?(0,s.getEntityUriForLink)({uri:e,dataTenant:p}):e;i({uri:t,source:"navigation"})}),[i,g,p]),T=(0,r.useCallback)((()=>{l(m)}),[l,m]);var D;(0,r.useEffect)((()=>{0!==d&&c>=d?A({index:d-1}):c<0&&A({index:0})}),[d,c,A]);const M=(()=>{const e=(0,r.useContext)(fp);if(!e)throw new Error("ActionsHookContext must be provided");return e})();(0,r.useEffect)((()=>{const e=M(a);return()=>e()}),[M,A,a]);const _=(0,r.useCallback)(((e,r,a)=>{S(!0),t(O.requestTotal()).then((e=>A({total:e}))).catch((e=>{console.warn("Failed to load total count of entities",e)}));const o=a+1;return n(O.requestEntities(15,o)).then((t=>{if(t){if(t.length){const n=wp(t,e);if(n.length>0)return A({cache:e.concat(n),uri:n[0],index:o+t.length-n.length}),void P(n[0]);if(a+t.length<r-1)return _(e,r-t.length,a+t.length)}A({index:o})}})).finally((()=>{S(!1)}))}),[O,A,P]),I=(0,r.useCallback)(((e,r)=>{S(!0),t(O.requestTotal()).then((e=>A({total:e}))).catch((e=>{console.warn("Failed to load total count of entities",e)}));const a=r-1,o=Math.max(0,r-15),i=15+Math.min(0,r-15);return n(O.requestEntities(i,o)).then((t=>{if(t){if(t.length){const n=wp(t,e);if(n.length>0)return A({cache:n.concat(e),uri:n[n.length-1],index:a-(t.length-n.length)}),void P(n[n.length-1]);if(r-t.length>0)return I(e,r-t.length)}A({index:0})}})).finally((()=>{S(!1)}))}),[O,A,P]),N=(0,r.useCallback)(((t,n,r,a)=>{if(n<t.length){const o=t[n];return S(!0),e(O.checkEntity(o)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),N(e,n,r-1,a)}A({index:a+1,uri:o,cache:t,total:r}),P(o)})).finally((()=>{S(!1)}))}return a>=r-1?(A({cache:t,total:r,index:r-1}),Promise.resolve()):_(t,r,a)}),[O,A,P,_]),R=(0,r.useCallback)(((t,n,r,a)=>{if(n>-1){const o=t[n];return S(!0),e(O.checkEntity(o)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),R(e,n-1,r-1,a-1)}A({index:a-1,uri:o,cache:t,total:r}),P(o)})).finally((()=>{S(!1)}))}return a<=0?(A({index:0,cache:t,total:r}),Promise.resolve()):I(t,a)}),[O,A,P,I]),L=(0,r.useCallback)((()=>{if(f&&u){const e=f.indexOf(u)-1;R(f,e,d,c).catch((e=>{console.warn("Can't load previous page of search",e)}))}}),[R,f,u,d,c]),j=(0,r.useCallback)((()=>{if(f&&u){const e=f.indexOf(u)+1;N(f,e,d,c).catch((e=>{console.warn("Can't load next page of search",e)}))}}),[N,f,u,d,c]);return(0,r.useEffect)((()=>{E(C)}),[E,C]),(0,r.useEffect)((()=>()=>E(!1)),[]),{total:d,onPrev:L,onNext:j,onSearchResultsClick:T,isPrevDisabled:C||c<=0,isNextDisabled:C||c>=d-1}},Cp=({className:e})=>{const{total:t,onPrev:n,onNext:r,onSearchResultsClick:o,isPrevDisabled:i,isNextDisabled:l}=Ep(),u=(()=>{const{cache:e}=V()||{},t=I(),n=M();return(0,s.isViewMode)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})();return u?a().createElement(pp,{className:e,total:t,onPrev:n,onNext:r,onSearchResultsClick:o,isPrevDisabled:i,isNextDisabled:l}):null},Sp=(e,t)=>{const n=(0,r.useRef)(!1);(0,r.useEffect)((()=>{n.current?e():n.current=!0}),t)},Op=a().createContext([]);function kp(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}Op.displayName="RelatedObjectUrisContext";const Ap=function(e,t){var n;void 0===t&&(t=kp);var r,a=[],o=!1;return function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];return o&&n===this&&t(i,a)||(r=e.apply(this,i),o=!0,n=this,a=i),r}},Pp=Ap(((e,t)=>(0,s.getAllUsersForTenant)({tenant:e,servicesPath:t}))),Tp=a().createContext([]);Tp.displayName="UsersContext";const Dp={comments:[],commentsMap:null,currentComment:null,updateCommentState:f.identity,clearCommentState:f.identity,getCommentState:()=>({}),getComment:f.identity,getComments:()=>new Promise(f.identity),getCommentsCount:f.identity,createComment:()=>new Promise(f.identity),editComment:()=>new Promise(f.identity),createReply:()=>new Promise(f.identity),resolveThread:f.identity,reOpenThread:f.identity,clearCurrentComment:f.identity,deleteComment:f.identity,sending:!1,loading:!1,pageToken:null,deleteReply:f.identity,editReply:()=>new Promise(f.identity),totalCommentsCount:null},Mp=a().createContext(Dp);Mp.displayName="CollaborationContext";const _p=({collaboration:e,children:t})=>{const n=(()=>{const[e,t]=(0,r.useState)([]),n=F(),a=k((e=>e.servicesPath)),o=e=>{console.warn("Users error",e),t([])};return(0,r.useEffect)((()=>{Pp(n,a).then((e=>t(e))).catch(o)}),[n,a]),e})();return a().createElement(Mp.Provider,{value:e},a().createElement(Tp.Provider,{value:n},t))};function Ip(){return Ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ip.apply(null,arguments)}const Np=e=>a().createElement("svg",Ip({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgCommentBubble"},e),a().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),Rp=lr((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}}})));function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lp.apply(null,arguments)}const jp=a().forwardRef(((e,t)=>{let{children:n,tooltipTitle:r,icon:o,onClick:i,className:l}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","tooltipTitle","icon","onClick","className"]);const u=Rp();return a().createElement(yd(),{title:r},a().createElement("div",Lp({ref:t,className:p()(u.root,l),onClick:i},s),a().createElement(o,{className:u.icon}),n))}));jp.displayName="BasicCommentButton";const Fp=lr({childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}),Vp=a().forwardRef((({children:e,onClick:t},n)=>{const r=Fp();return a().createElement(jp,{ref:n,tooltipTitle:c().text("Show comment"),icon:Np,onClick:t,"data-reltio-id":"reltio-comment-button"},a().createElement("div",{className:r.childrenWrapper},e))}));function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bp.apply(null,arguments)}Vp.displayName="CommentButton";const Hp=e=>a().createElement("svg",Bp({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgAddComment"},e),a().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),zp=({className:e,onClick:t})=>a().createElement(jp,{className:e,onClick:t,tooltipTitle:c().text("Add comment"),icon:Hp});var Up=n(1574),Zp=n.n(Up),Wp=n(9272),qp=n.n(Wp),$p=n(4436),Kp=n.n($p),Gp=n(4511),Yp=n.n(Gp),Xp=n(5788),Qp=n.n(Xp);const Jp=({anchorEl:e,leftBackdropRef:t,rightBackdropRef:n,topBackdropRef:r,bottomBackdropRef:a,rafIdRef:o,lastResizeTimestamp:i=0})=>{if(e){if(Date.now()-i>100&&r.current&&t.current&&n.current&&a.current){const o=e.getBoundingClientRect();r.current.style.top="0",r.current.style.left="0",r.current.style.right="0",r.current.style.height=o.top+"px",t.current.style.top="0",t.current.style.left="0",t.current.style.width=o.left+"px",t.current.style.bottom="0",n.current.style.top="0",n.current.style.left=o.right+"px",n.current.style.right="0",n.current.style.bottom="0",a.current.style.top=o.bottom+"px",a.current.style.left="0",a.current.style.right="0",a.current.style.bottom="0",i=Date.now()}o.current=requestAnimationFrame((()=>Jp({anchorEl:e,leftBackdropRef:t,rightBackdropRef:n,topBackdropRef:r,bottomBackdropRef:a,rafIdRef:o,lastResizeTimestamp:i})))}},ef=lr({backdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:10},popper:{zIndex:1300}});function tf(){return tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tf.apply(null,arguments)}const nf=(0,r.forwardRef)(((e,t)=>{var n;let{open:o,anchorEl:i,className:l,modal:s=!0,excludeAnchorFromBackdrop:u=!0,onClose:c=f.identity}=e,d=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["open","anchorEl","className","modal","excludeAnchorFromBackdrop","onClose"]);const m=ef(),g=(0,r.useRef)(),v=(0,r.useRef)(),y=(0,r.useRef)(),b=(0,r.useRef)(),x=(0,r.useRef)(),w=gt();return(0,r.useEffect)((()=>{if(o&&s)return Jp({anchorEl:i,leftBackdropRef:g,rightBackdropRef:v,topBackdropRef:y,bottomBackdropRef:b,rafIdRef:x}),()=>cancelAnimationFrame(x.current)}),[i,o,s]),a().createElement(a().Fragment,null,s&&o&&a().createElement(h(),{container:document.body},u?a().createElement(a().Fragment,null,a().createElement("div",{ref:y,className:m.backdrop,onClick:c}),a().createElement("div",{ref:v,className:m.backdrop,onClick:c}),a().createElement("div",{ref:b,className:m.backdrop,onClick:c}),a().createElement("div",{ref:g,className:m.backdrop,onClick:c})):a().createElement("div",{className:m.backdrop,onClick:c})),a().createElement(Qp(),tf({"data-mui-color-scheme":null==w||null===(n=w.palette)||void 0===n?void 0:n.mode,open:o,anchorEl:i},d,{className:p()(l,m.popper),ref:t})))}));nf.displayName="Popper";const rf=lr((e=>{const t=e.palette.background.paper;return{paper:{backgroundColor:t,maxWidth:1e3},popper:{'&[data-popper-placement*="bottom"] $arrow':{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},'&[data-popper-placement*="top"] $arrow':{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},'&[data-popper-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},'&[data-popper-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}}));function af(){return af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},af.apply(null,arguments)}const of=e=>{let{children:t,className:n,classes:o,transition:i}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className","classes","transition"]);const s=rf(),u=i?Yp():a().Fragment,[c,d]=(0,r.useState)(null);return a().createElement(nf,af({className:p()(s.popper,n),modifiers:[{name:"preventOverflow",enabled:!0,options:{rootBoundary:"viewport",padding:14,altAxis:!0}},{name:"arrow",enabled:!0,options:{element:c,padding:4}}],transition:i,excludeAnchorFromBackdrop:!1},l),(({TransitionProps:e})=>a().createElement(u,e,a().createElement(Kp(),{className:p()(s.paper,null==o?void 0:o.root)},a().createElement("span",{className:p()(s.arrow,null==o?void 0:o.arrow),ref:d}),t))))};var lf=n(8515),sf=n.n(lf),uf=n(3526),cf=n.n(uf),df=n(2811),pf=n.n(df),ff=n(3222),mf=n.n(ff);const hf=lr((e=>({menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),gf=ep(mf()),vf=(0,r.forwardRef)((({item:e,onMenuClose:t=f.identity},n)=>{const r=hf(),{disabled:o,text:i,tooltip:l,onClick:s,id:u="",selectable:c,selected:d}=e;return a().createElement(gf,{tooltipTitle:l,showForDisabled:!0,classes:{root:r.menuItem},onClick:e=>{t(e),s(e)},disabled:o,ref:n,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${u}`},c&&a().createElement(pf(),{checked:d,color:"primary"}),a().createElement(gd(),{classes:{root:r.menuText}},i))}));vf.displayName="DefaultMenuItemRenderer";const yf=lr((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,_r.alpha)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,_r.alpha)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"}})));function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bf.apply(null,arguments)}function xf({className:e,menuId:t,buttonComponent:n=br(),buttonContent:o,menuItems:i=[],buttonProps:l={},popoverProps:s={},onMenuOpen:u=f.identity,onMenuClose:c=f.identity,MenuItemRenderer:d=vf}){const m=n,h=yf(),g=(0,r.useRef)(),[v,y]=(0,r.useState)(!1);Sp((()=>{v?u():c()}),[v]);const b=(0,r.useCallback)((e=>{null==e||e.stopPropagation(),y((e=>!e))}),[]);return a().createElement(a().Fragment,null,a().createElement(m,bf({"data-reltio-id":"drop-down-menu-button",ref:g,className:p()(h.buttonRoot,{[h.selected]:v},e),onClick:b,"aria-pressed":v,"aria-controls":v?t:void 0,"aria-haspopup":"true"},l),o),a().createElement(cf(),bf({id:t,variant:"menu",open:v,autoFocus:!1,classes:{paper:h.paper},anchorEl:g.current,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,MenuListProps:{autoFocusItem:v}},s),i.map(((e,t)=>a().createElement(d,{item:e,key:t,onMenuClose:b})))))}const wf=(e,t)=>{(0,r.useEffect)((()=>{if(t){var n,r,a,o;const t=null===(n=e.current)||void 0===n||null===(r=n.value)||void 0===r?void 0:r.length;null===(a=e.current)||void 0===a||a.focus(),null===(o=e.current)||void 0===o||o.setSelectionRange(t,t)}}),[e,t])},Ef=(e,t)=>{const n=e.relatedObjectUris.indexOf(t);if(n>=0)return e.relatedObjectUris[1-n]},Cf=e=>`${c().date(e,"LT")} ${c().date(e,"LL")}`,Sf=e=>`comment/${e.commentId}`,Of=(e,t)=>`comment/${e.commentId}/reply/${t.replyId}`,kf=(e,t)=>{let n=e;for(const e of t)n=n.split(`+${e}`).join(`@[${e}](${e})`);return n},Af=a().createContext({});Af.displayName="EntitiesMapContext";const Pf=a().createContext({generateEntityUrl:s.generateEntityUrlForOldMode,generatePivotingUrl:s.generatePivotingUrlForOldMode,generateTagUrl:s.generateTagUrlForOldMode,generateSegmentUrl:s.generateSegmentUrl});Pf.displayName="UrlGeneratorsContext";const Tf=e=>e.target.value,Df=e=>e.target.checked,Mf=e=>e.ctrlKey||e.metaKey;function _f(){return _f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_f.apply(null,arguments)}const If=(0,r.forwardRef)(((e,t)=>{let{value:n,children:o,screen:i,className:l,shouldOpenInNewTab:s=!1,disabled:u=!1}=e,c=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","children","screen","className","shouldOpenInNewTab","disabled"]);const{generateEntityUrl:d}=(0,r.useContext)(Pf),p=P(),f=z("openEntity"),m=(0,r.useCallback)((e=>{Mf(e)||(f({uri:n,screen:i}),e.preventDefault()),e.stopPropagation()}),[f,i,n]);return u||!n?a().createElement("span",_f({ref:t,className:l},c),o):a().createElement("a",_f({ref:t,href:d({uiPath:p,uri:n,screen:i}),onClick:s?void 0:m,target:s?"_blank":"_self",rel:"noreferrer",className:l},c),o)}));If.displayName="EntityUriLink";const Nf=lr((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none",whiteSpace:"break-spaces"}})));function Rf(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Lf=({comment:e,className:t})=>{const n=Nf(),o=(0,r.useContext)(Af),i=L(),l=M();return a().createElement(Zp(),{className:t},(()=>{switch(e.objectType){case s.CollaborationObjectTypes.ENTITY_ATTRIBUTE:{const t=(0,s.getAttributeTypeUriByValueUri)(e.objectId,l.type),r=(0,s.findAttributeTypeByUri)(i,t);return a().createElement(a().Fragment,null,a().createElement(gd(),{className:n.title},c().text("Selected attribute:")),a().createElement(gd(),{className:n.label},null==r?void 0:r.label))}case s.CollaborationObjectTypes.RELATION_ATTRIBUTE:{const t=e.relatedObjectUris.find((0,f.startsWith)("configuration/relationTypes")),r=t&&(0,s.getAttributeTypeUriByValueUri)(e.objectId,t),o=r&&(0,s.findAttributeTypeByUri)(i,r);return a().createElement(a().Fragment,null,a().createElement(gd(),{className:n.title},c().text("Selected attribute:")),a().createElement(gd(),{className:n.label},null==o?void 0:o.label))}case s.CollaborationObjectTypes.ENTITY:return a().createElement(a().Fragment,null,a().createElement(gd(),{className:n.title},c().text("Selected profile:")),a().createElement(If,{className:p()(n.label,n.link),value:(0,s.getEntityUriForLink)(l)},(0,s.getLabel)(l.label)));case s.CollaborationObjectTypes.RELATION:{const t=Ef(e,l.uri),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Rf(e,t,n[t])}))}return e}({},o[t]||{},{uri:t});return a().createElement(a().Fragment,null,a().createElement(gd(),{className:n.title},c().text("Selected relation:")),a().createElement(gd(),{className:n.label},a().createElement(If,{className:n.link,value:(0,s.getEntityUriForLink)(l)},(0,s.getLabel)(l.label)),t&&a().createElement(a().Fragment,null,` ${c().text("to")} `,a().createElement(If,{className:n.link,value:(0,s.getEntityUriForLink)(r)},r.label?(0,s.getLabel)(r.label):(0,s.getEntityId)(r)))))}case s.CollaborationObjectTypes.POTENTIAL_MATCH:{var t;const r=Ef(e,l.uri),i={uri:r,label:null===(t=o[r])||void 0===t?void 0:t.label};return a().createElement(a().Fragment,null,a().createElement(gd(),{className:n.title},c().text("Selected potential match:")),a().createElement(gd(),{className:n.label},a().createElement(If,{className:n.link,value:(0,s.getEntityUriForLink)(l)},(0,s.getLabel)(l.label)),r&&a().createElement(a().Fragment,null,` ${c().text("and")} `,a().createElement(If,{className:n.link,value:(0,s.getEntityUriForLink)(i)},i.label?(0,s.getLabel)(i.label):(0,s.getEntityId)(i)))))}default:return null}})())},jf=lr((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),Ff=({comment:e,className:t})=>{const n=jf(),o=(0,r.useContext)(Tp);return a().createElement(gd(),{className:p()(n.root,t)},((e,t,n=e=>e,r="+")=>{const a=[];let o="",i=!1;for(let l=0;l<=e.length;l++){const s=e[l],u=e[l+1],c=l===e.length-1;o+=s,s===r&&0===l&&(i=!0),i&&t.includes(o.slice(r.length))&&(i=!1,a.push(n(o)),o=""),u===r&&(i=!0,a.push(o),o=""),c&&a.push(o)}return a})(e.content,e.namedUsers,(e=>{const t=o.find((t=>t.username===e.slice(1)));return t?a().createElement(qd(),{href:`mailto:${t.email}`,underline:"hover"},e):e})).map(((e,t)=>a().createElement(r.Fragment,{key:t},e))))},Vf=lr((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function Bf(){return Bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bf.apply(null,arguments)}const Hf=e=>{let{className:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","children"]);const o=Vf();return a().createElement(xd(),Bf({},r,{className:p()(o.root,t)}),n.split(".").map((e=>e[0].toUpperCase())).join(""))};var zf=n(7677),Uf=n.n(zf),Zf=function(e){return e===Object(e)?Object.keys(e):[]},Wf=function(e){return e===Object(e)?Object.values(e):[]};function qf(e,t){var n=Object.assign({},e);return Gf(e)&&Gf(t)&&Zf(t).forEach((function(r){Gf(t[r])&&r in e?n[r]=qf(e[r],t[r]):Object.assign(n,vl({},r,t[r]))})),n}var $f=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return qf(e,t)}),e)},Kf=function(e,t){var n=Object.assign({},e);if(t)for(var r=0;r<t.length;r++)delete n[t[r]];return n},Gf=function(e){return!(e!==Object(e)||e instanceof Date||Array.isArray(e))},Yf=function(e){return"&"===e[0]},Xf=function(e){return!Yf(e)},Qf=function(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))},Jf=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Zf(e),r={},a=0,o=n.length;a<o;a+=1){var i=n[a];("[object Object]"!==Object.prototype.toString.call(e[i])||":"===i[0]||"@"===i[0]||t.indexOf(i)>=0)&&(r[i]=e[i])}return r},em=function(e,t){for(var n=t.map(Qf),r=Zf(e),a={},o=0,i=r.length;o<i;o+=1){var l=r[o];(t.indexOf(l)>=0||n.indexOf(Qf(l))>=0)&&(a[l]=e[l])}return a},tm=function e(t,n){for(var r=$f.apply(void 0,[{},Kf(t,n)].concat(qt(Wf(em(t,n))))),a=Zf(r).filter(Yf),o=0,i=a.length;o<i;o+=1){var l=a[o],s=e(r[l],n);n.indexOf(l)>=0?(delete r[l],r=$f({},r,s)):r[l]=s}return r};function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(n),!0).forEach((function(t){vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var am=["animationName"];const om=function(e){var t=e.style,n=e.className;return rm(rm({},t?{style:Jf(t,am)}:{}),n?{className:n}:{})};var im=(0,r.createContext)(om);im.Provider;const lm=function(e){if(!e)return[];if("string"==typeof e)return[e];if(!Array.isArray(e)){var t=e;return Zf(e).reduce((function(e,n){return e.concat(t[n]?[n]:[])}),[])}return e};var sm={};function um(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?um(Object(n),!0).forEach((function(t){vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):um(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const dm=function e(t){var n=t.style,r=t.className,a=t.classNames,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:om,i=r||function(e){var t=e&&Zf(e)[0];return t&&t.split("__")[0].split("--")[0]}(a)||(null==n?void 0:n.className),l="function"==typeof n?n:function(e){return function(t,n){var r,a=n||sm;e.memoize=e.memoize||new WeakMap,e.memoize.has(a)?r=e.memoize.get(a):(r={},e.memoize.set(a,r));var o=lm(t).join(" ");return o in r?r[o]:r[o]=e(t||[],n)}}((function(t,r){var l=lm(t);Uf()(Array.isArray(l),"First parameter must be a string, an array of strings, a plain object with boolean values, or a falsy value."),Uf()(!r||Gf(r),"Optional second parameter must be a plain object.");var s=l.filter(Yf),u=l.filter(Xf),c=u.length>0?function(e){return Wf(em(e,u))}:function(e){return[e]},d=function(){return c(tm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s))},p=function(e,t,n){if(e){var r=e.split(" ")[0],a=[].concat(qt(0===t.length?n.map((function(e){return"".concat(r,"--").concat(e.substring(1))})):[]),qt(t.map((function(e){return"".concat(r,"__").concat(e)}))));return 0===t.length?[e].concat(qt(a)):a}}(i,u,s);return e(cm(cm(cm({},(n||r)&&{style:$f.apply(void 0,[{}].concat(qt(d(r)),qt(d(n))))}),p&&{className:p.join(" ")}),a&&{classNames:a}),o)})),s=cm({},"function"==typeof n?n:{style:n}),u=qt(new Set([].concat(qt(s.className?s.className.split(" "):[]),qt(i?i.split(" "):[])))),c=a?(u.map((function(e){return a[e]}))||[]).filter(Boolean):u,d=o(cm(cm({},s),c.length>0?{className:c.join(" ")}:{}));return Object.assign(l,d),l},pm=function(e,t,n){var a=t.style,o=t.className,i=t.classNames,l=(0,r.useContext)(im);return(0,r.useMemo)((function(){return dm({style:a,className:o,classNames:i},l)}),[a,o,i,l])(n,e)};function fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fm(Object(n),!0).forEach((function(t){vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hm=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},gm="__id__",vm="__display__",ym=function(e,t){Uf()("id"===t||"display"===t,'Second arg must be either "id" or "display", got: "'.concat(t,'"'));var n=e.indexOf(vm),r=e.indexOf(gm);return n<0&&(n=null),r<0&&(r=null),Uf()(null!==n||null!==r,"The markup '".concat(e,"' does not contain either of the placeholders '__id__' or '__display__'")),null!==n&&null!==r?"id"===t&&r<=n||"display"===t&&n<=r?0:1:0},bm=function(e){var t=0;return e.indexOf("__id__")>=0&&t++,e.indexOf("__display__")>=0&&t++,t},xm=function(){},wm=function(e,t,n){for(var r,a,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xm,l=(r=t.map((function(e){return e.regex})),a=/^\/(.+)\/(\w+)?$/,new RegExp(r.map((function(e){var t=zl(a.exec(e.toString()),3),n=t[1],r=t[2];return Uf()(!r,"RegExp flags are not supported. Change /".concat(n,"/").concat(r," into /").concat(n,"/")),"(".concat(n,")")})).join("|"),"g")),s=2,u=t.map((function(e){var t=e.markup,n=s;return s+=bm(t)+1,n})),c=0,d=0;null!==(o=l.exec(e));){var p=u.find((function(e){return!!o[e]})),f=u.indexOf(p),m=t[f],h=m.markup,g=m.displayTransform,v=p+ym(h,"id"),y=p+ym(h,"display"),b=o[v],x=g(b,o[y]),w=e.substring(c,o.index);i(w,c,d),d+=w.length,n(o[0],o.index,d,b,x,f,c),d+=x.length,c=l.lastIndex}c<e.length&&i(e.substring(c),c,d)},Em=function(e,t){var n="";return wm(e,t,(function(e,t,r,a,o){n+=o}),(function(e){n+=e})),n},Cm=function(e,t,n){var r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"START";return"number"!=typeof n?n:(wm(e,t,(function(e,t,o,i,l,s,u){void 0===r&&o+l.length>n&&(r="NULL"===a?null:t+("END"===a?e.length:0))}),(function(e,t,a){void 0===r&&a+e.length>=n&&(r=t+n-a)})),void 0===r?e.length:r)},Sm=function(e,t,n,r){return e.substring(0,t)+r+e.substring(n)},Om=function(e,t){var n=[];return wm(e,t,(function(e,t,r,a,o,i,l){n.push({id:a,display:o,childIndex:i,index:t,plainTextIndex:r})})),n},km=function(e,t){return"".concat(e,"-").concat(t)},Am=function(e){return Object.values(e).reduce((function(e,t){return e+t.results.length}),0)},Pm=function(e){var t=hm(e),n=e[e.indexOf(vm)+11],r=e[e.indexOf(gm)+6];return new RegExp(t.replace(vm,"([^".concat(hm(n||""),"]+?)")).replace(gm,"([^".concat(hm(r||""),"]+?)")))},Tm=function(e){return r.Children.toArray(e).map((function(e){var t=e.props,n=t.markup,r=t.regex,a=t.displayTransform;return{markup:n,regex:r?Dm(r,n):Pm(n),displayTransform:a||function(e,t){return t||e}}}))},Dm=function(e,t){var n=new RegExp(e.toString()+"|").exec("").length-1,r=bm(t);return Uf()(n===r,"Number of capturing groups in RegExp ".concat(e.toString()," (").concat(n,") does not match the number of placeholders in the markup '").concat(t,"' (").concat(r,")")),e},Mm=[{base:"A",letters:/(A|Ⓐ|A|À|Á|Â|Ầ|Ấ|Ẫ|Ẩ|Ã|Ā|Ă|Ằ|Ắ|Ẵ|Ẳ|Ȧ|Ǡ|Ä|Ǟ|Ả|Å|Ǻ|Ǎ|Ȁ|Ȃ|Ạ|Ậ|Ặ|Ḁ|Ą|Ⱥ|Ɐ|[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F])/g},{base:"AA",letters:/(Ꜳ|[\uA732])/g},{base:"AE",letters:/(Æ|Ǽ|Ǣ|[\u00C6\u01FC\u01E2])/g},{base:"AO",letters:/(Ꜵ|[\uA734])/g},{base:"AU",letters:/(Ꜷ|[\uA736])/g},{base:"AV",letters:/(Ꜹ|Ꜻ|[\uA738\uA73A])/g},{base:"AY",letters:/(Ꜽ|[\uA73C])/g},{base:"B",letters:/(B|Ⓑ|B|Ḃ|Ḅ|Ḇ|Ƀ|Ƃ|Ɓ|[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181])/g},{base:"C",letters:/(C|Ⓒ|C|Ć|Ĉ|Ċ|Č|Ç|Ḉ|Ƈ|Ȼ|Ꜿ|[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E])/g},{base:"D",letters:/(D|Ⓓ|D|Ḋ|Ď|Ḍ|Ḑ|Ḓ|Ḏ|Đ|Ƌ|Ɗ|Ɖ|Ꝺ|Ð|[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779\u00D0])/g},{base:"DZ",letters:/(DZ|DŽ|[\u01F1\u01C4])/g},{base:"Dz",letters:/(Dz|Dž|[\u01F2\u01C5])/g},{base:"E",letters:/(E|Ⓔ|E|È|É|Ê|Ề|Ế|Ễ|Ể|Ẽ|Ē|Ḕ|Ḗ|Ĕ|Ė|Ë|Ẻ|Ě|Ȅ|Ȇ|Ẹ|Ệ|Ȩ|Ḝ|Ę|Ḙ|Ḛ|Ɛ|Ǝ|[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E])/g},{base:"F",letters:/(F|Ⓕ|F|Ḟ|Ƒ|Ꝼ|[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B])/g},{base:"G",letters:/(G|Ⓖ|G|Ǵ|Ĝ|Ḡ|Ğ|Ġ|Ǧ|Ģ|Ǥ|Ɠ|Ꞡ|Ᵹ|Ꝿ|[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E])/g},{base:"H",letters:/(H|Ⓗ|H|Ĥ|Ḣ|Ḧ|Ȟ|Ḥ|Ḩ|Ḫ|Ħ|Ⱨ|Ⱶ|Ɥ|[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D])/g},{base:"I",letters:/(I|Ⓘ|I|Ì|Í|Î|Ĩ|Ī|Ĭ|İ|Ï|Ḯ|Ỉ|Ǐ|Ȉ|Ȋ|Ị|Į|Ḭ|Ɨ|[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197])/g},{base:"J",letters:/(J|Ⓙ|J|Ĵ|Ɉ|[\u004A\u24BF\uFF2A\u0134\u0248])/g},{base:"K",letters:/(K|Ⓚ|K|Ḱ|Ǩ|Ḳ|Ķ|Ḵ|Ƙ|Ⱪ|Ꝁ|Ꝃ|Ꝅ|Ꞣ|[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2])/g},{base:"L",letters:/(L|Ⓛ|L|Ŀ|Ĺ|Ľ|Ḷ|Ḹ|Ļ|Ḽ|Ḻ|Ł|Ƚ|Ɫ|Ⱡ|Ꝉ|Ꝇ|Ꞁ|[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780])/g},{base:"LJ",letters:/(LJ|[\u01C7])/g},{base:"Lj",letters:/(Lj|[\u01C8])/g},{base:"M",letters:/(M|Ⓜ|M|Ḿ|Ṁ|Ṃ|Ɱ|Ɯ|[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C])/g},{base:"N",letters:/(N|Ⓝ|N|Ǹ|Ń|Ñ|Ṅ|Ň|Ṇ|Ņ|Ṋ|Ṉ|Ƞ|Ɲ|Ꞑ|Ꞥ|Ŋ|[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4\u014A])/g},{base:"NJ",letters:/(NJ|[\u01CA])/g},{base:"Nj",letters:/(Nj|[\u01CB])/g},{base:"O",letters:/(O|Ⓞ|O|Ò|Ó|Ô|Ồ|Ố|Ỗ|Ổ|Õ|Ṍ|Ȭ|Ṏ|Ō|Ṑ|Ṓ|Ŏ|Ȯ|Ȱ|Ö|Ȫ|Ỏ|Ő|Ǒ|Ȍ|Ȏ|Ơ|Ờ|Ớ|Ỡ|Ở|Ợ|Ọ|Ộ|Ǫ|Ǭ|Ø|Ǿ|Ɔ|Ɵ|Ꝋ|Ꝍ|[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C])/g},{base:"OE",letters:/(Œ|[\u0152])/g},{base:"OI",letters:/(Ƣ|[\u01A2])/g},{base:"OO",letters:/(Ꝏ|[\uA74E])/g},{base:"OU",letters:/(Ȣ|[\u0222])/g},{base:"P",letters:/(P|Ⓟ|P|Ṕ|Ṗ|Ƥ|Ᵽ|Ꝑ|Ꝓ|Ꝕ|[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754])/g},{base:"Q",letters:/(Q|Ⓠ|Q|Ꝗ|Ꝙ|Ɋ|[\u0051\u24C6\uFF31\uA756\uA758\u024A])/g},{base:"R",letters:/(R|Ⓡ|R|Ŕ|Ṙ|Ř|Ȑ|Ȓ|Ṛ|Ṝ|Ŗ|Ṟ|Ɍ|Ɽ|Ꝛ|Ꞧ|Ꞃ|[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782])/g},{base:"S",letters:/(S|Ⓢ|S|ẞ|Ś|Ṥ|Ŝ|Ṡ|Š|Ṧ|Ṣ|Ṩ|Ș|Ş|Ȿ|Ꞩ|Ꞅ|[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784])/g},{base:"T",letters:/(T|Ⓣ|T|Ṫ|Ť|Ṭ|Ț|Ţ|Ṱ|Ṯ|Ŧ|Ƭ|Ʈ|Ⱦ|Ꞇ|[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786])/g},{base:"TH",letters:/(Þ|[\u00DE])/g},{base:"TZ",letters:/(Ꜩ|[\uA728])/g},{base:"U",letters:/(U|Ⓤ|U|Ù|Ú|Û|Ũ|Ṹ|Ū|Ṻ|Ŭ|Ü|Ǜ|Ǘ|Ǖ|Ǚ|Ủ|Ů|Ű|Ǔ|Ȕ|Ȗ|Ư|Ừ|Ứ|Ữ|Ử|Ự|Ụ|Ṳ|Ų|Ṷ|Ṵ|Ʉ|[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244])/g},{base:"V",letters:/(V|Ⓥ|V|Ṽ|Ṿ|Ʋ|Ꝟ|Ʌ|[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245])/g},{base:"VY",letters:/(Ꝡ|[\uA760])/g},{base:"W",letters:/(W|Ⓦ|W|Ẁ|Ẃ|Ŵ|Ẇ|Ẅ|Ẉ|Ⱳ|[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72])/g},{base:"X",letters:/(X|Ⓧ|X|Ẋ|Ẍ|[\u0058\u24CD\uFF38\u1E8A\u1E8C])/g},{base:"Y",letters:/(Y|Ⓨ|Y|Ỳ|Ý|Ŷ|Ỹ|Ȳ|Ẏ|Ÿ|Ỷ|Ỵ|Ƴ|Ɏ|Ỿ|[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE])/g},{base:"Z",letters:/(Z|Ⓩ|Z|Ź|Ẑ|Ż|Ž|Ẓ|Ẕ|Ƶ|Ȥ|Ɀ|Ⱬ|Ꝣ|[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762])/g},{base:"a",letters:/(a|ⓐ|a|ẚ|à|á|â|ầ|ấ|ẫ|ẩ|ã|ā|ă|ằ|ắ|ẵ|ẳ|ȧ|ǡ|ä|ǟ|ả|å|ǻ|ǎ|ȁ|ȃ|ạ|ậ|ặ|ḁ|ą|ⱥ|ɐ|[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250])/g},{base:"aa",letters:/(ꜳ|[\uA733])/g},{base:"ae",letters:/(æ|ǽ|ǣ|[\u00E6\u01FD\u01E3])/g},{base:"ao",letters:/(ꜵ|[\uA735])/g},{base:"au",letters:/(ꜷ|[\uA737])/g},{base:"av",letters:/(ꜹ|ꜻ|[\uA739\uA73B])/g},{base:"ay",letters:/(ꜽ|[\uA73D])/g},{base:"b",letters:/(b|ⓑ|b|ḃ|ḅ|ḇ|ƀ|ƃ|ɓ|[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253])/g},{base:"c",letters:/(c|ⓒ|c|ć|ĉ|ċ|č|ç|ḉ|ƈ|ȼ|ꜿ|ↄ|[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184])/g},{base:"d",letters:/(d|ⓓ|d|ḋ|ď|ḍ|ḑ|ḓ|ḏ|đ|ƌ|ɖ|ɗ|ꝺ|ð|[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u00F0])/g},{base:"dz",letters:/(dz|dž|[\u01F3\u01C6])/g},{base:"e",letters:/(e|ⓔ|e|è|é|ê|ề|ế|ễ|ể|ẽ|ē|ḕ|ḗ|ĕ|ė|ë|ẻ|ě|ȅ|ȇ|ẹ|ệ|ȩ|ḝ|ę|ḙ|ḛ|ɇ|ɛ|ǝ|[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD])/g},{base:"f",letters:/(f|ⓕ|f|ḟ|ƒ|ꝼ|[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C])/g},{base:"g",letters:/(g|ⓖ|g|ǵ|ĝ|ḡ|ğ|ġ|ǧ|ģ|ǥ|ɠ|ꞡ|ᵹ|ꝿ|[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F])/g},{base:"h",letters:/(h|ⓗ|h|ĥ|ḣ|ḧ|ȟ|ḥ|ḩ|ḫ|ẖ|ħ|ⱨ|ⱶ|ɥ|[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265])/g},{base:"hv",letters:/(ƕ|[\u0195])/g},{base:"i",letters:/(i|ⓘ|i|ì|í|î|ĩ|ī|ĭ|ï|ḯ|ỉ|ǐ|ȉ|ȋ|ị|į|ḭ|ɨ|ı|[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131])/g},{base:"ij",letters:/(ij|[\u0133])/g},{base:"j",letters:/(j|ⓙ|j|ĵ|ǰ|ɉ|[\u006A\u24D9\uFF4A\u0135\u01F0\u0249])/g},{base:"k",letters:/(k|ⓚ|k|ḱ|ǩ|ḳ|ķ|ḵ|ƙ|ⱪ|ꝁ|ꝃ|ꝅ|ꞣ|[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3])/g},{base:"l",letters:/(l|ⓛ|l|ŀ|ĺ|ľ|ḷ|ḹ|ļ|ḽ|ḻ|ł|ƚ|ɫ|ⱡ|ꝉ|ꞁ|ꝇ|[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747])/g},{base:"lj",letters:/(lj|[\u01C9])/g},{base:"m",letters:/(m|ⓜ|m|ḿ|ṁ|ṃ|ɱ|ɯ|[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F])/g},{base:"n",letters:/(n|ⓝ|n|ǹ|ń|ñ|ṅ|ň|ṇ|ņ|ṋ|ṉ|ƞ|ɲ|ʼn|ꞑ|ꞥ|ŋ|[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u014B])/g},{base:"nj",letters:/(nj|[\u01CC])/g},{base:"o",letters:/(o|ⓞ|o|ò|ó|ô|ồ|ố|ỗ|ổ|õ|ṍ|ȭ|ṏ|ō|ṑ|ṓ|ŏ|ȯ|ȱ|ö|ȫ|ỏ|ő|ǒ|ȍ|ȏ|ơ|ờ|ớ|ỡ|ở|ợ|ọ|ộ|ǫ|ǭ|ø|ǿ|ɔ|ꝋ|ꝍ|ɵ|[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275])/g},{base:"oe",letters:/(œ|[\u0153])/g},{base:"oi",letters:/(ƣ|[\u01A3])/g},{base:"ou",letters:/(ȣ|[\u0223])/g},{base:"oo",letters:/(ꝏ|[\uA74F])/g},{base:"p",letters:/(p|ⓟ|p|ṕ|ṗ|ƥ|ᵽ|ꝑ|ꝓ|ꝕ|[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755])/g},{base:"q",letters:/(q|ⓠ|q|ɋ|ꝗ|ꝙ|[\u0071\u24E0\uFF51\u024B\uA757\uA759])/g},{base:"r",letters:/(r|ⓡ|r|ŕ|ṙ|ř|ȑ|ȓ|ṛ|ṝ|ŗ|ṟ|ɍ|ɽ|ꝛ|ꞧ|ꞃ|[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783])/g},{base:"s",letters:/(s|ⓢ|s|ś|ṥ|ŝ|ṡ|š|ṧ|ṣ|ṩ|ș|ş|ȿ|ꞩ|ꞅ|ẛ|ſ|[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F])/g},{base:"ss",letters:/(ß|[\u00DF])/g},{base:"t",letters:/(t|ⓣ|t|ṫ|ẗ|ť|ṭ|ț|ţ|ṱ|ṯ|ŧ|ƭ|ʈ|ⱦ|ꞇ|[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787])/g},{base:"th",letters:/(þ|[\u00FE])/g},{base:"tz",letters:/(ꜩ|[\uA729])/g},{base:"u",letters:/(u|ⓤ|u|ù|ú|û|ũ|ṹ|ū|ṻ|ŭ|ü|ǜ|ǘ|ǖ|ǚ|ủ|ů|ű|ǔ|ȕ|ȗ|ư|ừ|ứ|ữ|ử|ự|ụ|ṳ|ų|ṷ|ṵ|ʉ|[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289])/g},{base:"v",letters:/(v|ⓥ|v|ṽ|ṿ|ʋ|ꝟ|ʌ|[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C])/g},{base:"vy",letters:/(ꝡ|[\uA761])/g},{base:"w",letters:/(w|ⓦ|w|ẁ|ẃ|ŵ|ẇ|ẅ|ẘ|ẉ|ⱳ|[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73])/g},{base:"x",letters:/(x|ⓧ|x|ẋ|ẍ|[\u0078\u24E7\uFF58\u1E8B\u1E8D])/g},{base:"y",letters:/(y|ⓨ|y|ỳ|ý|ŷ|ỹ|ȳ|ẏ|ÿ|ỷ|ẙ|ỵ|ƴ|ɏ|ỿ|[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF])/g},{base:"z",letters:/(z|ⓩ|z|ź|ẑ|ż|ž|ẓ|ẕ|ƶ|ȥ|ɀ|ⱬ|ꝣ|[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763])/g}],_m=function(e){return function(e){var t=e;return Mm.forEach((function(e){t=t.replace(e.letters,e.base)})),t}(e).toLowerCase()},Im=function(e,t,n){return n?_m(e).indexOf(_m(t)):e.toLowerCase().indexOf(t.toLowerCase())},Nm=function(e){return"number"==typeof e},Rm=function(e){return e===Object(e)?Object.keys(e):[]},Lm=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var o=(t=[]).concat.apply(t,r);return Object.keys(e).reduce((function(t,n){return e.hasOwnProperty(n)&&!o.includes(n)&&void 0!==e[n]&&(t[n]=e[n]),t}),{})};function jm(e,t){return function(n){var r=function(r){var o=r.style,i=r.className,l=r.classNames,s=Ul(r,["style","className","classNames"]),u=t?t(s):void 0,c=pm(e,{style:o,className:i,classNames:l},u);return a().createElement(n,(0,$.Z)({},s,{style:c}))},o=n.displayName||n.name||"Component";return r.displayName="defaultStyle(".concat(o,")"),r}}var Fm=function(e){function t(){var e;return xl(this,t),e=Ol(this,Cl(t).apply(this,arguments)),vl((0,te.Z)(e),"setCaretElement",(function(t){e.caretElement=t})),e.state={left:void 0,top:void 0},e}return El(t,e),J(t,[{key:"componentDidMount",value:function(){this.notifyCaretPosition()}},{key:"componentDidUpdate",value:function(){this.notifyCaretPosition()}},{key:"notifyCaretPosition",value:function(){if(this.caretElement){var e=this.caretElement,t=e.offsetLeft,n=e.offsetTop;if(this.state.left!==t||this.state.top!==n){var r={left:t,top:n};this.setState(r),this.props.onCaretPositionChange(r)}}}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.selectionStart,o=n.selectionEnd,i=n.value,l=n.style,s=n.children,u=n.containerRef,c=Tm(s);r===o&&(e=Cm(i,c,r,"START"));var d=[],p={},f=d,m=0;return wm(i,c,(function(e,n,r,a,o,i,l){var s=function(e,t){return e.hasOwnProperty(t)?e[t]++:e[t]=0,t+"_"+e[t]}(p,a);f.push(t.getMentionComponentForMatch(a,o,i,s))}),(function(n,r,a){if(Nm(e)&&e>=r&&e<=r+n.length){var o=e-r;f.push(t.renderSubstring(n.substring(0,o),m)),f=[t.renderSubstring(n.substring(o),m)]}else f.push(t.renderSubstring(n,m));m++})),f.push(" "),f!==d&&d.push(this.renderHighlighterCaret(f)),a().createElement("div",(0,$.Z)({},l,{ref:u}),d)}},{key:"renderSubstring",value:function(e,t){return a().createElement("span",(0,$.Z)({},this.props.style("substring"),{key:t}),e)}},{key:"getMentionComponentForMatch",value:function(e,t,n,o){var i={id:e,display:t,key:o},l=r.Children.toArray(this.props.children)[n];return a().cloneElement(l,i)}},{key:"renderHighlighterCaret",value:function(e){return a().createElement("span",(0,$.Z)({},this.props.style("caret"),{ref:this.setCaretElement,key:"caret"}),e)}}]),t}(r.Component);vl(Fm,"propTypes",{selectionStart:yt().number,selectionEnd:yt().number,value:yt().string.isRequired,onCaretPositionChange:yt().func.isRequired,containerRef:yt().oneOfType([yt().func,yt().shape({current:"undefined"==typeof Element?yt().any:yt().instanceOf(Element)})]),children:yt().oneOfType([yt().element,yt().arrayOf(yt().element)]).isRequired}),vl(Fm,"defaultProps",{value:""});var Vm=jm({position:"relative",boxSizing:"border-box",width:"100%",color:"transparent",overflow:"hidden",whiteSpace:"pre-wrap",wordWrap:"break-word",border:"1px solid transparent",textAlign:"start","&singleLine":{whiteSpace:"pre",wordWrap:null},substring:{visibility:"hidden"}},(function(e){return{"&singleLine":e.singleLine}}))(Fm),Bm=function(e){function t(){return xl(this,t),Ol(this,Cl(t).apply(this,arguments))}return El(t,e),J(t,[{key:"render",value:function(){var e=Lm(this.props,["style","classNames","className"],Rm(t.propTypes));return a().createElement("li",(0,$.Z)({id:this.props.id,role:"option","aria-selected":this.props.focused},e,this.props.style),this.renderContent())}},{key:"renderContent",value:function(){var e=this.props,t=e.query,n=e.renderSuggestion,r=e.suggestion,a=e.index,o=e.focused,i=this.getDisplay(),l=this.renderHighlightedDisplay(i,t);return n?n(r,t,l,a,o):l}},{key:"getDisplay",value:function(){var e=this.props.suggestion;if("string"==typeof e)return e;var t=e.id,n=e.display;return void 0!==t&&n?n:t}},{key:"renderHighlightedDisplay",value:function(e){var t=this.props,n=t.ignoreAccents,r=t.query,o=t.style,i=Im(e,r,n);return-1===i?a().createElement("span",o("display"),e):a().createElement("span",o("display"),e.substring(0,i),a().createElement("b",o("highlight"),e.substring(i,i+r.length)),e.substring(i+r.length))}}]),t}(r.Component);vl(Bm,"propTypes",{id:yt().string.isRequired,query:yt().string.isRequired,index:yt().number.isRequired,ignoreAccents:yt().bool,suggestion:yt().oneOfType([yt().string,yt().shape({id:yt().oneOfType([yt().string,yt().number]).isRequired,display:yt().string})]).isRequired,renderSuggestion:yt().func,focused:yt().bool});var Hm=jm({cursor:"pointer"},(function(e){return{"&focused":e.focused}}))(Bm);function zm(){var e=pm(),t=e("spinner");return a().createElement("div",e,a().createElement("div",t,a().createElement("div",t(["element","element1"])),a().createElement("div",t(["element","element2"])),a().createElement("div",t(["element","element3"])),a().createElement("div",t(["element","element4"])),a().createElement("div",t(["element","element5"]))))}var Um=function(e){function t(){var e,n;xl(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Ol(this,(e=Cl(t)).call.apply(e,[this].concat(a))),vl((0,te.Z)(n),"handleMouseEnter",(function(e,t){n.props.onMouseEnter&&n.props.onMouseEnter(e)})),vl((0,te.Z)(n),"select",(function(e,t){n.props.onSelect(e,t)})),vl((0,te.Z)(n),"setUlElement",(function(e){n.ulElement=e})),n}return El(t,e),J(t,[{key:"componentDidUpdate",value:function(){if(this.ulElement&&!(this.ulElement.offsetHeight>=this.ulElement.scrollHeight)&&this.props.scrollFocusedIntoView){var e=this.ulElement.scrollTop,t=this.ulElement.children[this.props.focusIndex].getBoundingClientRect(),n=t.top,r=t.bottom,a=this.ulElement.getBoundingClientRect().top;r=r-a+e,(n=n-a+e)<e?this.ulElement.scrollTop=n:r>this.ulElement.offsetHeight&&(this.ulElement.scrollTop=r-this.ulElement.offsetHeight)}}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.a11ySuggestionsListLabel,r=e.isOpened,o=e.style,i=e.onMouseDown,l=e.containerRef,s=e.position,u=e.left,c=e.top;return r?a().createElement("div",(0,$.Z)({},function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return mm(mm(mm({},e),"function"==typeof t?t:{}),{},{style:mm(mm({},e.style),"function"==typeof t?t.style:t)})}),{})}({position:s||"absolute",left:u,top:c},o),{onMouseDown:i,ref:l}),a().createElement("ul",(0,$.Z)({ref:this.setUlElement,id:t,role:"listbox","aria-label":n},o("list")),this.renderSuggestions()),this.renderLoadingIndicator()):null}},{key:"renderSuggestions",value:function(){var e=this;return Object.values(this.props.suggestions).reduce((function(t,n){var r=n.results,a=n.queryInfo;return[].concat(qt(t),qt(r.map((function(n,r){return e.renderSuggestion(n,a,t.length+r)}))))}),[])}},{key:"renderSuggestion",value:function(e,t,n){var o=this,i=n===this.props.focusIndex,l=t.childIndex,s=t.query,u=r.Children.toArray(this.props.children)[l].props.renderSuggestion,c=this.props.ignoreAccents;return a().createElement(Hm,{style:this.props.style("item"),key:"".concat(l,"-").concat(Zm(e)),id:km(this.props.id,n),query:s,index:n,ignoreAccents:c,renderSuggestion:u,suggestion:e,focused:i,onClick:function(){return o.select(e,t)},onMouseEnter:function(){return o.handleMouseEnter(n)}})}},{key:"renderLoadingIndicator",value:function(){if(this.props.isLoading)return a().createElement(zm,{style:this.props.style("loadingIndicator")})}}]),t}(r.Component);vl(Um,"propTypes",{id:yt().string.isRequired,suggestions:yt().object.isRequired,a11ySuggestionsListLabel:yt().string,focusIndex:yt().number,position:yt().string,left:yt().number,top:yt().number,scrollFocusedIntoView:yt().bool,isLoading:yt().bool,isOpened:yt().bool.isRequired,onSelect:yt().func,ignoreAccents:yt().bool,containerRef:yt().oneOfType([yt().func,yt().shape({current:"undefined"==typeof Element?yt().any:yt().instanceOf(Element)})]),children:yt().oneOfType([yt().element,yt().arrayOf(yt().element)]).isRequired}),vl(Um,"defaultProps",{suggestions:{},onSelect:function(){return null}});var Zm=function(e){return"string"==typeof e?e:e.id},Wm=jm({zIndex:1,backgroundColor:"white",marginTop:14,minWidth:100,list:{margin:0,padding:0,listStyleType:"none"}})(Um);function qm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qm(n,!0).forEach((function(t){vl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qm(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Km={TAB:9,RETURN:13,ESC:27,UP:38,DOWN:40},Gm=!1,Ym={singleLine:yt().bool,allowSpaceInQuery:yt().bool,allowSuggestionsAboveCursor:yt().bool,forceSuggestionsAboveCursor:yt().bool,ignoreAccents:yt().bool,a11ySuggestionsListLabel:yt().string,value:yt().string,onKeyDown:yt().func,onSelect:yt().func,onBlur:yt().func,onChange:yt().func,suggestionsPortalHost:"undefined"==typeof Element?yt().any:yt().PropTypes.instanceOf(Element),inputRef:yt().oneOfType([yt().func,yt().shape({current:"undefined"==typeof Element?yt().any:yt().instanceOf(Element)})]),children:yt().oneOfType([yt().element,yt().arrayOf(yt().element)]).isRequired},Xm=function(e){function t(e){var n;return xl(this,t),n=Ol(this,Cl(t).call(this,e)),vl((0,te.Z)(n),"setContainerElement",(function(e){n.containerElement=e})),vl((0,te.Z)(n),"getInputProps",(function(){var e=n.props,t=e.readOnly,r=e.disabled,a=e.style;return $m({},Lm(n.props,["style","classNames","className"],Rm(Ym)),{},a("input"),{value:n.getPlainText()},!t&&!r&&{onChange:n.handleChange,onSelect:n.handleSelect,onKeyDown:n.handleKeyDown,onBlur:n.handleBlur,onCompositionStart:n.handleCompositionStart,onCompositionEnd:n.handleCompositionEnd,onScroll:n.updateHighlighterScroll},{},n.isOpened()&&{role:"combobox","aria-controls":n.uuidSuggestionsOverlay,"aria-expanded":!0,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":km(n.uuidSuggestionsOverlay,n.state.focusIndex)})})),vl((0,te.Z)(n),"renderControl",(function(){var e=n.props,t=e.singleLine,r=e.style,o=n.getInputProps();return a().createElement("div",r("control"),n.renderHighlighter(),t?n.renderInput(o):n.renderTextarea(o))})),vl((0,te.Z)(n),"renderInput",(function(e){return a().createElement("input",(0,$.Z)({type:"text",ref:n.setInputRef},e))})),vl((0,te.Z)(n),"renderTextarea",(function(e){return a().createElement("textarea",(0,$.Z)({ref:n.setInputRef},e))})),vl((0,te.Z)(n),"setInputRef",(function(e){n.inputElement=e;var t=n.props.inputRef;"function"==typeof t?t(e):t&&(t.current=e)})),vl((0,te.Z)(n),"setSuggestionsElement",(function(e){n.suggestionsElement=e})),vl((0,te.Z)(n),"renderSuggestionsOverlay",(function(){if(!Nm(n.state.selectionStart))return null;var e=n.state.suggestionsPosition,t=e.position,r=e.left,o=e.top,i=a().createElement(Wm,{id:n.uuidSuggestionsOverlay,style:n.props.style("suggestions"),position:t,left:r,top:o,focusIndex:n.state.focusIndex,scrollFocusedIntoView:n.state.scrollFocusedIntoView,containerRef:n.setSuggestionsElement,suggestions:n.state.suggestions,onSelect:n.addMention,onMouseDown:n.handleSuggestionsMouseDown,onMouseEnter:n.handleSuggestionsMouseEnter,isLoading:n.isLoading(),isOpened:n.isOpened(),ignoreAccents:n.props.ignoreAccents,a11ySuggestionsListLabel:n.props.a11ySuggestionsListLabel},n.props.children);return n.props.suggestionsPortalHost?Jl().createPortal(i,n.props.suggestionsPortalHost):i})),vl((0,te.Z)(n),"renderHighlighter",(function(){var e=n.state,t=e.selectionStart,r=e.selectionEnd,o=n.props,i=o.singleLine,l=o.children,s=o.value,u=o.style;return a().createElement(Vm,{containerRef:n.setHighlighterElement,style:u("highlighter"),value:s,singleLine:i,selectionStart:t,selectionEnd:r,onCaretPositionChange:n.handleCaretPositionChange},l)})),vl((0,te.Z)(n),"setHighlighterElement",(function(e){n.highlighterElement=e})),vl((0,te.Z)(n),"handleCaretPositionChange",(function(e){n.setState({caretPosition:e})})),vl((0,te.Z)(n),"getPlainText",(function(){return Em(n.props.value||"",Tm(n.props.children))})),vl((0,te.Z)(n),"executeOnChange",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var o,i;return n.props.onChange?(o=n.props).onChange.apply(o,[e].concat(r)):n.props.valueLink?(i=n.props.valueLink).requestChange.apply(i,[e.target.value].concat(r)):void 0})),vl((0,te.Z)(n),"handleChange",(function(e){if(Gm=!1,(document.activeElement&&document.activeElement.contentDocument||document).activeElement===e.target){var t=n.props.value||"",r=Tm(n.props.children),a=e.target.value,o=function(e,t,n,r){var a=n.selectionStartBefore,o=n.selectionEndBefore,i=n.selectionEndAfter,l=Em(e,r),s=l.length-t.length;"undefined"===a&&(a=i+s),"undefined"===o&&(o=a),a===o&&o===i&&l.length===t.length&&(a-=1);var u=t.slice(a,i),c=Math.min(a,i),d=o;a===i&&(d=Math.max(o,a+s));var p=Cm(e,r,c,"START"),f=Cm(e,r,d,"END"),m=Cm(e,r,c,"NULL"),h=Cm(e,r,d,"NULL"),g=null===m||null===h,v=Sm(e,p,f,u);if(!g){var y=Em(v,r);if(y!==t){for(c=0;t[c]===y[c];)c++;u=t.slice(c,i),d=l.lastIndexOf(t.substring(i)),p=Cm(e,r,c,"START"),f=Cm(e,r,d,"END"),v=Sm(e,p,f,u)}}return v}(t,a,{selectionStartBefore:n.state.selectionStart,selectionEndBefore:n.state.selectionEnd,selectionEndAfter:e.target.selectionEnd},r);a=Em(o,r);var i=e.target.selectionStart,l=e.target.selectionEnd,s=!1,u=function(e,t,n){var r=n,a=!1;if(wm(e,t,(function(e,t,o,i,l,s,u){o<=n&&o+l.length>n&&(r=o,a=!0)})),a)return r}(t,r,i);void 0!==u&&n.state.selectionEnd>u&&(l=i=u,s=!0),n.setState({selectionStart:i,selectionEnd:l,setSelectionAfterMentionChange:s});var c=Om(o,r),d={target:{value:o}};n.executeOnChange(d,o,a,c)}})),vl((0,te.Z)(n),"handleSelect",(function(e){if(n.setState({selectionStart:e.target.selectionStart,selectionEnd:e.target.selectionEnd}),!Gm){var t=n.inputElement;e.target.selectionStart===e.target.selectionEnd?n.updateMentionsQueries(t.value,e.target.selectionStart):n.clearSuggestions(),n.updateHighlighterScroll(),n.props.onSelect(e)}})),vl((0,te.Z)(n),"handleKeyDown",(function(e){if(0!==Am(n.state.suggestions)&&n.suggestionsElement)switch(Object.values(Km).indexOf(e.keyCode)>=0&&(e.preventDefault(),e.stopPropagation()),e.keyCode){case Km.ESC:return void n.clearSuggestions();case Km.DOWN:return void n.shiftFocus(1);case Km.UP:return void n.shiftFocus(-1);case Km.RETURN:case Km.TAB:return void n.selectFocused();default:return}else n.props.onKeyDown(e)})),vl((0,te.Z)(n),"shiftFocus",(function(e){var t=Am(n.state.suggestions);n.setState({focusIndex:(t+n.state.focusIndex+e)%t,scrollFocusedIntoView:!0})})),vl((0,te.Z)(n),"selectFocused",(function(){var e=n.state,t=e.suggestions,r=e.focusIndex,a=Object.values(t).reduce((function(e,t){var n=t.results,r=t.queryInfo;return[].concat(qt(e),qt(n.map((function(e){return{result:e,queryInfo:r}}))))}),[])[r],o=a.result,i=a.queryInfo;n.addMention(o,i),n.setState({focusIndex:0})})),vl((0,te.Z)(n),"handleBlur",(function(e){var t=n._suggestionsMouseDown;n._suggestionsMouseDown=!1,t||n.setState({selectionStart:null,selectionEnd:null}),window.setTimeout((function(){n.updateHighlighterScroll()}),1),n.props.onBlur(e,t)})),vl((0,te.Z)(n),"handleSuggestionsMouseDown",(function(e){n._suggestionsMouseDown=!0})),vl((0,te.Z)(n),"handleSuggestionsMouseEnter",(function(e){n.setState({focusIndex:e,scrollFocusedIntoView:!1})})),vl((0,te.Z)(n),"updateSuggestionsPosition",(function(){var e=n.state.caretPosition,t=n.props,r=t.suggestionsPortalHost,a=t.allowSuggestionsAboveCursor,o=t.forceSuggestionsAboveCursor;if(e&&n.suggestionsElement){var i=n.suggestionsElement,l=n.highlighterElement,s=l.getBoundingClientRect(),u=Qm(l,"font-size"),c={left:s.left+e.left,top:s.top+e.top+u},d=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(i){var p={};if(r){p.position="fixed";var f=c.left,m=c.top;f-=Qm(i,"margin-left"),m-=Qm(i,"margin-top"),f-=l.scrollLeft,m-=l.scrollTop;var h=Math.max(document.documentElement.clientWidth,window.innerWidth||0);f+i.offsetWidth>h?p.left=Math.max(0,h-i.offsetWidth):p.left=f,a&&m+i.offsetHeight>d&&i.offsetHeight<m-u||o?p.top=Math.max(0,m-i.offsetHeight-u):p.top=m}else{var g=e.left-l.scrollLeft,v=e.top-l.scrollTop;g+i.offsetWidth>n.containerElement.offsetWidth?p.right=0:p.left=g,a&&c.top-l.scrollTop+i.offsetHeight>d&&i.offsetHeight<s.top-u-l.scrollTop?p.top=v-i.offsetHeight-u:p.top=v}p.left===n.state.suggestionsPosition.left&&p.top===n.state.suggestionsPosition.top&&p.position===n.state.suggestionsPosition.position||n.setState({suggestionsPosition:p})}}})),vl((0,te.Z)(n),"updateHighlighterScroll",(function(){var e=n.inputElement,t=n.highlighterElement;e&&t&&(t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop,t.height=e.height)})),vl((0,te.Z)(n),"handleCompositionStart",(function(){Gm=!0})),vl((0,te.Z)(n),"handleCompositionEnd",(function(){Gm=!1})),vl((0,te.Z)(n),"setSelection",(function(e,t){if(null!==e&&null!==t){var r=n.inputElement;if(r.setSelectionRange)r.setSelectionRange(e,t);else if(r.createTextRange){var a=r.createTextRange();a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",e),a.select()}}})),vl((0,te.Z)(n),"updateMentionsQueries",(function(e,t){n._queryId++,n.suggestions={},n.setState({suggestions:{}});var r=n.props.value||"",o=n.props.children,i=Tm(o),l=Cm(r,i,t,"NULL");if(null!==l){var s=function(e,t){var n=Om(e,t),r=n[n.length-1];return r?r.plainTextIndex+r.display.length:0}(r.substring(0,l),i),u=e.substring(s,t);a().Children.forEach(o,(function(t,r){if(t){var a=function(e){if(e instanceof RegExp)return e;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowSpaceInQuery,n=hm(e);return new RegExp("(?:^|\\s)(".concat(n,"([^").concat(t?"":"\\s").concat(n,"]*))$"))}(t.props.trigger,n.props),o=u.match(a);if(o){var i=s+u.indexOf(o[1],o.index);n.queryData(o[2],r,i,i+o[1].length,e)}}}))}})),vl((0,te.Z)(n),"clearSuggestions",(function(){n._queryId++,n.suggestions={},n.setState({suggestions:{},focusIndex:0})})),vl((0,te.Z)(n),"queryData",(function(e,t,a,o,i){var l=n.props,s=l.children,u=l.ignoreAccents,c=function(e,t){return e instanceof Array?function(n,r){for(var a=[],o=0,i=e.length;o<i;++o){var l=e[o].display||e[o].id;Im(l,n,t)>=0&&a.push(e[o])}return a}:e}(r.Children.toArray(s)[t].props.data,u),d=c(e,n.updateSuggestions.bind(null,n._queryId,t,e,a,o,i));d instanceof Array&&n.updateSuggestions(n._queryId,t,e,a,o,i,d)})),vl((0,te.Z)(n),"updateSuggestions",(function(e,t,r,a,o,i,l){if(e===n._queryId){n.suggestions=$m({},n.suggestions,vl({},t,{queryInfo:{childIndex:t,query:r,querySequenceStart:a,querySequenceEnd:o,plainTextValue:i},results:l}));var s=n.state.focusIndex,u=Am(n.suggestions);n.setState({suggestions:n.suggestions,focusIndex:s>=u?Math.max(u-1,0):s})}})),vl((0,te.Z)(n),"addMention",(function(e,t){var a=e.id,o=e.display,i=t.childIndex,l=t.querySequenceStart,s=t.querySequenceEnd,u=t.plainTextValue,c=n.props.value||"",d=Tm(n.props.children),p=r.Children.toArray(n.props.children)[i].props,f=p.markup,m=p.displayTransform,h=p.appendSpaceOnAdd,g=p.onAdd,v=Cm(c,d,l,"START"),y=v+s-l,b=function(e,t,n){return e.replace(gm,t).replace(vm,n)}(f,a,o);h&&(b+=" ");var x=Sm(c,v,y,b);n.inputElement.focus();var w=m(a,o);h&&(w+=" ");var E=l+w.length;n.setState({selectionStart:E,selectionEnd:E,setSelectionAfterMentionChange:!0});var C={target:{value:x}},S=Om(x,d),O=Sm(u,l,s,w);n.executeOnChange(C,x,O,S),g&&g(a,o,v,y),n.clearSuggestions()})),vl((0,te.Z)(n),"isLoading",(function(){var e=!1;return a().Children.forEach(n.props.children,(function(t){e=e||t&&t.props.isLoading})),e})),vl((0,te.Z)(n),"isOpened",(function(){return Nm(n.state.selectionStart)&&(0!==Am(n.state.suggestions)||n.isLoading())})),vl((0,te.Z)(n),"_queryId",0),n.suggestions={},n.uuidSuggestionsOverlay=Math.random().toString(16).substring(2),n.handleCopy=n.handleCopy.bind((0,te.Z)(n)),n.handleCut=n.handleCut.bind((0,te.Z)(n)),n.handlePaste=n.handlePaste.bind((0,te.Z)(n)),n.state={focusIndex:0,selectionStart:null,selectionEnd:null,suggestions:{},caretPosition:null,suggestionsPosition:{}},n}return El(t,e),J(t,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.updateSuggestionsPosition()}},{key:"componentDidUpdate",value:function(e,t){t.suggestionsPosition===this.state.suggestionsPosition&&this.updateSuggestionsPosition(),this.state.setSelectionAfterMentionChange&&(this.setState({setSelectionAfterMentionChange:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)}},{key:"render",value:function(){return a().createElement("div",(0,$.Z)({ref:this.setContainerElement},this.props.style),this.renderControl(),this.renderSuggestionsOverlay())}},{key:"handlePaste",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault();var t=this.state,n=t.selectionStart,r=t.selectionEnd,a=this.props,o=a.value,i=a.children,l=Tm(i),s=Cm(o,l,n,"START"),u=Cm(o,l,r,"END"),c=e.clipboardData.getData("text/react-mentions"),d=e.clipboardData.getData("text/plain"),p=Sm(o,s,u,c||d).replace(/\r/g,""),f=Em(p,l),m={target:$m({},e.target,{value:p})};this.executeOnChange(m,p,f,Om(p,l))}}},{key:"saveSelectionToClipboard",value:function(e){var t=this.state,n=t.selectionStart,r=t.selectionEnd,a=this.props,o=a.children,i=a.value,l=Tm(o),s=Cm(i,l,n,"START"),u=Cm(i,l,r,"END");e.clipboardData.setData("text/plain",e.target.value.slice(n,r)),e.clipboardData.setData("text/react-mentions",i.slice(s,u))}},{key:"supportsClipboardActions",value:function(e){return!!e.clipboardData}},{key:"handleCopy",value:function(e){e.target===this.inputElement&&this.supportsClipboardActions(e)&&(e.preventDefault(),this.saveSelectionToClipboard(e))}},{key:"handleCut",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault(),this.saveSelectionToClipboard(e);var t=this.state,n=t.selectionStart,r=t.selectionEnd,a=this.props,o=a.children,i=a.value,l=Tm(o),s=Cm(i,l,n,"START"),u=Cm(i,l,r,"END"),c=[i.slice(0,s),i.slice(u)].join(""),d=Em(c,l),p={target:$m({},e.target,{value:d})};this.executeOnChange(p,c,d,Om(i,l))}}}]),t}(a().Component);vl(Xm,"propTypes",Ym),vl(Xm,"defaultProps",{ignoreAccents:!1,singleLine:!1,allowSuggestionsAboveCursor:!1,onKeyDown:function(){return null},onSelect:function(){return null},onBlur:function(){return null}});var Qm=function(e,t){var n=parseFloat(window.getComputedStyle(e,null).getPropertyValue(t));return isFinite(n)?n:0},Jm=jm({position:"relative",overflowY:"visible",input:{display:"block",width:"100%",position:"absolute",margin:0,top:0,left:0,boxSizing:"border-box",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit"},"&multiLine":{input:$m({height:"100%",bottom:0,overflow:"hidden",resize:"none"},"undefined"!=typeof navigator&&/iPhone|iPad|iPod/i.test(navigator.userAgent)?{marginTop:1,marginLeft:-3}:null)}},(function(e){var t=e.singleLine;return{"&singleLine":t,"&multiLine":!t}}))(Xm),eh={fontWeight:"inherit"},th=function(e){var t=e.display,n=e.style,r=e.className,o=e.classNames,i=pm(eh,{style:n,className:r,classNames:o});return a().createElement("strong",i,t)};th.propTypes={onAdd:yt().func,onRemove:yt().func,renderSuggestion:yt().func,trigger:yt().oneOfType([yt().string,yt().instanceOf(RegExp)]),markup:yt().string,displayTransform:yt().func,allowSpaceInQuery:yt().bool,isLoading:yt().bool},th.defaultProps={trigger:"@",markup:"@[__display__](__id__)",displayTransform:function(e,t){return t||e},onAdd:function(){return null},onRemove:function(){return null},renderSuggestion:null,isLoading:!1,appendSpaceOnAdd:!1};const nh=lr((e=>({root:{backgroundColor:"#fff",fontFamily:"Roboto"},mentionsControl:{fontSize:"13px"},mentionsHighlighter:{padding:"10px 22px",border:"1px solid transparent !important","&::before":{content:({placeholder:e})=>e&&`"${e}"`}},mentionsInput:{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,overflow:"auto !important"},mentionsSuggestions:{padding:"8px 0",zIndex:"1301!important",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)"},mentionsSuggestionsList:{maxHeight:"200px",overflowY:"scroll"},mentionsSuggestionsItem:{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover":{backgroundColor:"rgba(0,0,0,0.04)"}},mentionsSuggestionsItemFocused:{backgroundColor:"rgba(0,0,0,0.04)"},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function rh(){return rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rh.apply(null,arguments)}const ah="mentionsTextArea",oh=e=>{let{onChange:t,className:n,value:o,placeholder:i}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["onChange","className","value","placeholder"]);const s=nh({placeholder:o?"":i}),u=(0,r.useContext)(Tp);return a().createElement("div",{className:p()(s.root,n)},a().createElement(Jm,rh({},l,{value:o,placeholder:i,onChange:(e,n,r,a)=>{t(n,r,(0,f.uniq)(a.map((({display:e})=>e.slice(1)))))},className:ah,suggestionsPortalHost:document.body,allowSuggestionsAboveCursor:!0,classNames:{[`${ah}__input`]:s.mentionsInput,[`${ah}__highlighter`]:s.mentionsHighlighter,[`${ah}__control`]:s.mentionsControl,[`${ah}__suggestions`]:s.mentionsSuggestions,[`${ah}__suggestions__list`]:s.mentionsSuggestionsList,[`${ah}__suggestions__item`]:s.mentionsSuggestionsItem,[`${ah}__suggestions__item--focused`]:s.mentionsSuggestionsItemFocused}}),a().createElement(th,{trigger:"+",data:u.map((({username:e})=>({id:e,display:e}))),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:s.mention})))},ih=lr({root:({isEditing:e})=>({padding:e?"6px 6px 6px 0":" 6px 6px 6px 8px",borderRadius:"4px",backgroundColor:e?"transparent":"rgba(0,114,206,0.06)"}),textField:({isEditing:e})=>({width:e?"100%":"calc(100% - 40px)"}),form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:({isEditing:e})=>({marginLeft:e?"0":"40px",marginTop:"8px"}),button:{"& + $button":{marginLeft:"8px"}}}),lh=e=>{switch(e){case"open":return c().text("Reply...");case"resolved":return c().text("Adding a comment will re-open this");default:return""}},sh=({inputRef:e,className:t,uri:n,relatedObjectUris:o,objectType:i,popperRef:l,comment:s,reply:u,isEditingComment:d,isEditingReply:m,onCancel:h})=>{const g=d||m,v=ih({isEditing:g}),[y,b]=(0,r.useState)(!1),{createReply:x,createComment:w,sending:E,editComment:C,editReply:S,getCommentState:O,updateCommentState:k,clearCommentState:A}=(0,r.useContext)(Mp),P=j(),T=(({comment:e,reply:t,isEditingComment:n,isEditingReply:r})=>(0,f.isNil)(e)?"comment/new":n?Sf(e):r?Of(e,t):(e=>`comment/${e.commentId}/reply/new`)(e))({comment:s,reply:u,isEditingComment:d,isEditingReply:m}),D=(({comment:e,reply:t,isEditingComment:n,isEditingReply:r})=>{const a=n?e:r?t:null,{content:o="",namedUsers:i=[]}=a||{};return{value:kf(o,i),plainTextValue:o,mentions:i}})({comment:s,reply:u,isEditingComment:d,isEditingReply:m}),{value:M=D.value,plainTextValue:_=D.plainTextValue,mentions:I=D.mentions}=O(n,T),N=""!==D.value.trim(),R=""!==M.trim(),L=y||R||N,F=null==s?void 0:s.status,V=()=>{null==h||h(),A(n,T)};(0,r.useEffect)((()=>{l&&l.current.forceUpdate()}),[l,L]);const B=g?"small":"medium";return a().createElement(Zp(),{className:p()(v.root,t)},a().createElement("form",{onSubmit:e=>(e.preventDefault(),(0,f.cond)([[(0,f.always)(!s),()=>w({content:_,namedUsers:I,objectType:i,uri:n,relatedObjectUris:o})],[(0,f.always)(d),()=>C({content:_,namedUsers:I,commentId:s.commentId,objectType:i,replies:s.replies,relatedObjectUris:o,uri:n})],[(0,f.always)(m),()=>S({content:_,namedUsers:I,commentId:s.commentId,replyId:u.replyId})],[f.T,()=>x({content:_,namedUsers:I,commentId:s.commentId,action:"open"===s.status?"none":"reopen",uri:n})]])().then(V).catch(console.log)),className:v.form},a().createElement(Zp(),{className:v.main},!g&&a().createElement(Hf,{classes:{root:v.avatar}},P),a().createElement(oh,{className:v.textField,disabled:E,onChange:(e,t,r)=>k(n,T,{value:e,plainTextValue:t,mentions:r}),inputRef:e,value:M,onFocus:()=>b(!0),onBlur:()=>b(!1),placeholder:lh(F)})),L&&a().createElement(Zp(),{className:v.buttons},a().createElement(br(),{className:v.button,variant:"contained",color:"primary",disabled:!R||E,type:"submit",size:B},((e,t,n)=>t||n?c().text("Edit"):"open"===e||"resolved"===e?c().text("Reply"):c().text("Comment"))(F,d,m)),a().createElement(br(),{disabled:E,onClick:()=>V(),className:v.button,variant:"outlined",color:"primary",size:B},c().text("Cancel")))))},uh=lr((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px",overflowWrap:"break-word"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),ch=({onReply:e,className:t,uri:n,comment:o,relatedObjectUris:i,objectType:l})=>{const s=uh(),u=(0,r.useRef)(),d=j(),{commentId:p,createdBy:f,createdTime:m,status:h}=o,g="resolved"===h,v=f===d,{resolveThread:y,reOpenThread:b,sending:x,deleteComment:w,updateCommentState:E,getCommentState:C}=(0,r.useContext)(Mp),S=Sf(o),{isEditing:O}=C(n,S),k=(0,r.useCallback)((e=>E(n,S,{isEditing:e})),[S,E,n]);wf(u,O);const A=(0,r.useMemo)((()=>g?[{text:c().text("Delete"),onClick:()=>w({uri:n,commentId:p})}]:[{text:c().text("Edit"),onClick:()=>k(!0)},{text:c().text("Delete"),onClick:()=>w({uri:n,commentId:p})}]),[p,w,g,k,n]),P=a().createElement(sh,{inputRef:u,uri:n,relatedObjectUris:i,objectType:l,onCancel:()=>k(!1),isEditingComment:O,comment:o});return a().createElement(Zp(),{className:t},a().createElement(Zp(),{className:s.header},a().createElement(Hf,{classes:{root:s.avatar}},f),a().createElement(Zp(),{width:"100%"},a().createElement(gd(),{className:s.username},f)),a().createElement(gd(),{className:s.createdAt},Cf(m)),v&&a().createElement(xf,{buttonComponent:up,buttonProps:{icon:sf(),tooltipTitle:c().text("Open menu")},popoverProps:{PopoverClasses:{root:s.dropdownMenu}},menuItems:A,menuId:"collaboration-comment-menu"})),a().createElement(Zp(),{className:s.body},a().createElement(Lf,{comment:o,className:s.commentTarget}),O?P:a().createElement(Ff,{comment:o,className:s.message}),a().createElement(Zp(),{className:s.buttons},a().createElement(qd(),{className:s.button,onClick:e,component:"button",underline:"hover"},c().text("Reply")),!g&&a().createElement(qd(),{disabled:x,className:s.button,onClick:()=>{y({commentId:p,uri:n})},component:"button",underline:"hover"},c().text("Resolve")),g&&a().createElement(qd(),{disabled:x,className:s.button,onClick:()=>{b({commentId:p,uri:n})},component:"button",underline:"hover"},c().text("Re-open")))))},dh=lr((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},replyArea:{width:"calc(100% - 60px)"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),ph=({className:e,reply:t,uri:n,comment:o,popperRef:i})=>{const l=(0,r.useRef)(),s=j(),{createdBy:u,action:d,createdTime:f}=t,m=u===s&&"resolved"!==o.status,{deleteReply:h,updateCommentState:g,getCommentState:v}=(0,r.useContext)(Mp),y=Of(o,t),{isEditing:b}=v(n,y),x=(0,r.useCallback)((e=>g(n,y,{isEditing:e})),[y,g,n]);wf(l,b);const w=dh(),E=(0,r.useMemo)((()=>[{text:c().text("Edit"),onClick:()=>x(!0)},{text:c().text("Delete"),onClick:()=>h({uri:n,commentId:o.commentId,reply:t})}]),[h,n,o.commentId,t,x]),C=a().createElement(sh,{inputRef:l,popperRef:i,uri:n,onCancel:()=>x(!1),isEditingReply:b,reply:t,comment:o});return a().createElement(Zp(),{className:p()(w.root,e)},a().createElement(Hf,{classes:{root:w.avatar}},u),a().createElement(Zp(),{className:w.replyArea},a().createElement(Zp(),{className:w.header},a().createElement(gd(),{className:w.username},u),"resolve"===d&&a().createElement(gd(),{className:w.marked},c().text("Marked as resolved")),"reopen"===d&&a().createElement(gd(),{className:w.marked},c().text("Re-opened"))),"resolve"!==d&&(b?C:a().createElement(Ff,{className:w.message,comment:t})),a().createElement(gd(),{className:w.createdAt},Cf(f))),m&&a().createElement(xf,{buttonComponent:up,buttonProps:{icon:sf(),tooltipTitle:c().text("Open menu")},menuItems:E,menuId:"collaboration-comment-menu"}))},fh=lr((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),mh=({uri:e,relatedObjectUris:t,objectType:n,classes:o,popperRef:i,messagesRef:l,comment:s})=>{const u=(0,r.useRef)(),c=fh({classes:o}),d=a().createElement(sh,{className:c.sendMessageArea,inputRef:u,popperRef:i,uri:e,relatedObjectUris:t,objectType:n,comment:s});return a().createElement(Zp(),{className:c.root},s&&a().createElement(a().Fragment,null,a().createElement("div",{className:c.messages,ref:l},a().createElement(ch,{comment:s,uri:e,onReply:()=>{u.current.focus()},className:c.comment,relatedObjectUris:t,objectType:n}),a().createElement(Zp(),{className:c.replies},s.replies.map((t=>a().createElement(ph,{key:t.replyId,className:c.repliedComment,reply:t,uri:e,comment:s}))))),d),!s&&d)},hh=(0,r.memo)(mh),gh=lr((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:({hasScroll:e})=>({marginLeft:"16px",marginRight:e?"2px":"8px"}),replies:({hasScroll:e})=>({marginLeft:"8px",marginRight:e?"2px":"8px"}),sendMessageArea:({hasScroll:e,scrollWidth:t})=>({marginLeft:"8px",marginRight:e?t+2:"8px"}),messages:{maxHeight:"400px",overflowY:"auto"}}))),vh=({uri:e,relatedObjectUris:t,objectType:n,anchorEl:o,onClose:i,open:l,comment:s})=>{const[u,d]=(0,r.useState)(0),p=gh({scrollWidth:u,hasScroll:0!==u}),f=(0,r.useRef)(null),{resolveThread:m,loading:h,sending:g}=(0,r.useContext)(Mp),v=1+(null==s?void 0:s.replies.length);return a().createElement(of,{popperRef:f,anchorEl:o,open:l,placement:"right-start",onClose:i,className:p.popper},a().createElement(Zp(),{className:p.header},a().createElement(Zp(),{className:p.headerInfo},a().createElement(gd(),{className:p.title},c().text("Comments")),s&&!h&&a().createElement(gd(),{className:p.counter},c().number(v)," ",1===v?c().text("item"):c().text("items"))),s&&!h&&a().createElement(up,{className:p.resolveButton,size:"S",onClick:()=>{m({commentId:s.commentId,uri:e})},disabled:g,showForDisabled:!0,tooltipTitle:c().text("Resolve"),icon:qp(),color:"primary"})),!h&&a().createElement(hh,{popperRef:f,messagesRef:e=>{e&&d(e.offsetWidth-e.clientWidth)},classes:{root:p.collaborationItem,replies:p.replies,sendMessageArea:p.sendMessageArea,messages:p.messages,comment:p.comment},uri:e,relatedObjectUris:t,objectType:n,comment:s}))},yh="commentsContainerVisibilityArea",bh=lr((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},[`.${yh}:hover &`]:{visibility:"visible"}},showAlways:{}}))),xh=({className:e,uri:t,objectType:n,relatedObjectUris:o,onChangePopupVisibility:i,allowOnlyOneComment:l=!1,showAlways:s=!1})=>{const u=bh(),[c,d]=(0,r.useState)(null),[f,m]=(0,r.useState)(!1),h=f&&Boolean(c),{currentComment:g,commentsMap:v,getComment:y,clearCurrentComment:b,objectTypes:x}=(0,r.useContext)(Mp),w=!!v&&(!x||x.includes(n)),E=((null==v?void 0:v[t])||[]).filter((({status:e})=>"resolved"!==e)).reverse(),C=!l||l&&0===E.length,S=null===g&&h;Sp((()=>{i&&i(h)}),[h]);const O=(0,r.useContext)(Op),k=(0,r.useMemo)((()=>O?[...o,...O]:o),[O,o]);return w&&a().createElement("div",{"data-reltio-id":"comments-container",className:p()(u.root,e)},C&&a().createElement(zp,{className:p()(u.addButton,{[u.showAlways]:s||S}),onClick:e=>{d(e.currentTarget),m(!0)}}),E.map((({replies:e,commentId:t})=>a().createElement(Vp,{ref:t===(null==g?void 0:g.commentId)?d:null,key:t,onClick:()=>(e=>{y(e),m(!0)})(t)},1+e))),a().createElement(vh,{anchorEl:c,open:h,onClose:()=>{d(null),b(),m(!1)},uri:t,relatedObjectUris:k,objectType:n,comment:g}))};function wh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Eh(e,t,n[t])}))}return e}function Eh(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ch=(e,t)=>t.filter((t=>t.replyId!==e)),Sh=(e,t)=>{const n=e.replies.findIndex((({replyId:e})=>e===t.replyId)),r=[...e.replies];return r[n]=t,r},Oh=[],kh=e=>console.warn("Collaboration error",e),Ah=lr({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),Ph=()=>{const e=Ah(),t=z("clearHistoryEvent"),n=R();return n?a().createElement("div",{className:e.root},a().createElement(gd(),{component:"div"},c().text("You are viewing a historic slice:")," ",a().createElement("span",{className:e.slice},c().date(n.aStamp,"llll"))),a().createElement(br(),{className:e.cancelButton,variant:"contained",color:"primary",onClick:t},c().text("Cancel"))):null};var Th=n(3628);Hd()(Th.Z,{insert:"head",singleton:!1});const Dh=Th.Z.locals||{},Mh=(0,r.memo)((({entity:e,className:t,historySlice:n,children:o})=>{const i=(({objectIds:e=Oh,objectTypes:t,enabled:n=!0,needsTotalCount:a=!1})=>{const o=M(),i=F(),l=k((e=>e.collaborationPath)),u=k((e=>e.isCollaborationEnabled))&&n,[c,d]=(0,r.useState)(null),[p,m]=(0,r.useState)([]),[h,g]=(0,r.useState)(null),[v,y]=(0,r.useState)(null),[b,x]=(0,r.useState)(null),[w,E]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!1),[O,A]=(0,r.useState)({}),P=(0,r.useCallback)((e=>{g((t=>wh({},t,e)))}),[]),T=null==o?void 0:o.uri,D=u&&T&&!(0,s.isTempUri)(T),_=(0,r.useCallback)(((e,t=!1)=>{D?(0,f.pipe)(s.getCommentsCount,(0,f.andThen)((0,f.map)((0,f.props)(["objectId","comments"]))),(0,f.andThen)(f.fromPairs),(0,f.andThen)(t?g:P),(0,f.otherwise)((e=>{console.warn("Collaboration error",e),g(null)})))({uris:e,tenant:i,collaborationPath:l}):g(null)}),[P,l,D,i]),I=(0,r.useCallback)((()=>{if(D){const e=e=>{console.warn("Collaboration error",e),y(null)};(0,f.pipe)(s.getTotalCommentsCount,(0,f.andThen)((0,f.prop)("total")),(0,f.andThen)(y),(0,f.otherwise)(e))({relatedObjectUri:T,collaborationPath:l,tenant:i})}else y(null)}),[D,l,T,i]);(0,r.useEffect)((()=>{a&&I()}),[I,a]),(0,r.useEffect)((()=>{_(e,!0)}),[e,_]);const N=(0,r.useCallback)(((e,t)=>{(0,s.getComments)({collaborationPath:l,tenant:i,relatedObjectUri:e,pageToken:t}).then((({items:e,nextPageToken:n})=>{m((n=>t?(0,f.uniqBy)((0,f.prop)("commentId"),[...n,...e]):e)),d(n)})).catch(kh)}),[l,i]),R=(0,r.useCallback)((e=>{S(!0),(0,s.getComment)({collaborationPath:l,tenant:i,commentId:e}).then(x).catch(kh).finally((()=>S(!1)))}),[l,i]),L=(0,r.useCallback)((({content:e,namedUsers:t,objectType:n,uri:r,relatedObjectUris:a})=>{E(!0);const o={objectId:r,content:e,relatedObjectUris:a,objectType:n,visibility:"public",namedUsers:t,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,s.createComment)({collaborationPath:l,tenant:i,data:o}).then((([e])=>((e,t)=>{x(e),g((n=>wh({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),m((t=>[e,...t])),y((e=>(e||0)+1))})(e,r))).catch(kh).finally((()=>E(!1)))}),[l,i]),j=(0,r.useCallback)((({content:e,namedUsers:t,objectType:n,uri:r,relatedObjectUris:a,commentId:o,replies:u})=>{E(!0);const c={objectId:r,content:e,relatedObjectUris:a,objectType:n,visibility:"public",namedUsers:t,commentId:o,replies:u};return(0,s.updateComment)({collaborationPath:l,tenant:i,data:c}).then((e=>(e=>{x(e),m((0,f.map)((0,f.when)((0,f.propEq)("commentId",e.commentId),(0,f.always)(e))))})(wh({},e,{replies:u})))).catch(kh).finally((()=>E(!1)))}),[l,i]),V=(0,r.useCallback)((({uri:e,commentId:t})=>{E(!0),(0,s.deleteComment)({collaborationPath:l,tenant:i,commentId:t}).then((()=>((e,t)=>{let n,r;x(null),g((n=>{var a,o;r=null==n||null===(a=n[t])||void 0===a||null===(o=a.find((t=>t.commentId===e)))||void 0===o?void 0:o.replies;const i=n[t]||[];return wh({},n,{[t]:i.filter((t=>t.commentId!==e))})})),m((t=>{var r;return n=null===(r=t.find((t=>t.commentId===e)))||void 0===r?void 0:r.replies.length,t.filter((t=>t.commentId!==e))})),y((e=>{var t,a;return Math.max((e||0)-(1+(null!==(t=null!==(a=n)&&void 0!==a?a:r)&&void 0!==t?t:0)),0)}))})(t,e))).catch(kh).finally((()=>E(!1)))}),[l,i]),B=(0,r.useCallback)(((e,t,n,r)=>{const a="resolve"===e.action?"resolved":"open",{replyId:o}=e;x("resolved"===a?e=>{if(e)return null}:t=>{if(t)return wh({},t,{replies:r?Ch(o,t.replies):[...t.replies,e]})}),g((e=>wh({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?wh({},e,{status:a,replies:r?e.replies-1:e.replies+1}):e))}))),m((t=>t.map((t=>t.commentId===n?wh({},t,{status:a,replies:r?Ch(e.replyId,t.replies):[...t.replies,e]}):t)))),y(r?e=>Math.max((e||0)-1,0):e=>(e||0)+1)}),[]),H=(0,r.useCallback)((({uri:e,commentId:t,reply:n})=>{E(!0),(0,s.deleteReply)({collaborationPath:l,tenant:i,commentId:t,replyId:n.replyId}).then((()=>B(n,e,t,!0))).catch(kh).finally((()=>E(!1)))}),[l,B,i]),z=(0,r.useCallback)(((e,t)=>{x((t=>{if(t)return wh({},t,{replies:Sh(t,e)})})),m((n=>n.map((n=>n.commentId===t?wh({},n,{replies:Sh(n,e)}):n))))}),[]),U=(0,r.useCallback)((({content:e,namedUsers:t,commentId:n,replyId:r})=>{E(!0);const a={content:e,namedUsers:t};return(0,s.updateReply)({collaborationPath:l,tenant:i,commentId:n,replyId:r,data:a}).then((e=>z(e,n))).catch(kh).finally((()=>E(!1)))}),[l,i,z]),Z=(0,r.useCallback)((({content:e,namedUsers:t,commentId:n,action:r,uri:a})=>{E(!0);const o={content:e,action:r,namedUsers:t};return(0,s.createReply)({collaborationPath:l,tenant:i,commentId:n,data:o}).then((([e])=>B(e,a,n))).catch(kh).finally((()=>E(!1)))}),[l,i,B]),W=(0,r.useCallback)((({commentId:e,uri:t})=>{Z({content:"",namedUsers:[],commentId:e,action:"resolve",uri:t})}),[Z]),q=(0,r.useCallback)((({commentId:e,uri:t})=>{Z({content:"",namedUsers:[],commentId:e,action:"reopen",uri:t})}),[Z]),$=(0,r.useCallback)((()=>{x(null)}),[]),K=(0,r.useCallback)(((e,t)=>(0,f.pathOr)({},[e,t],O)),[O]),G=(0,r.useCallback)(((e,t)=>A((0,f.dissocPath)([e,t]))),[]),Y=(0,r.useCallback)(((e,t,n)=>{A((r=>{const a=[e,t],o=(0,f.path)(a,r);return(0,f.assocPath)(a,(0,f.mergeRight)(o,n),r)}))}),[]);return(0,r.useMemo)((()=>({clearCurrentComment:$,comments:p,commentsMap:h,getCommentState:K,updateCommentState:Y,clearCommentState:G,createComment:L,createReply:Z,currentComment:b,deleteComment:V,editComment:j,getComment:R,getComments:N,getCommentsCount:_,loading:C,objectTypes:t,pageToken:c,reOpenThread:q,resolveThread:W,sending:w,deleteReply:H,editReply:U,totalCommentsCount:v})),[$,p,h,K,Y,G,L,Z,b,V,j,R,N,_,C,t,c,q,W,w,H,U,v])})({objectIds:(0,r.useMemo)((()=>(0,s.getProfileBandObjectIdsForCollaboration)(e)),[e])}),l=(0,s.getEntityUriForLink)(e);return a().createElement(_p,{collaboration:i},a().createElement(Zd,{className:p()(t,yh),entity:(null==n?void 0:n.aEntity)||e},n?a().createElement(Ph,null):a().createElement(a().Fragment,null,o?a().createElement("div",{className:p()(Dh.profileBandNavigation,Dh.navigationRow)},a().createElement(Cp,null),o):a().createElement(Cp,{className:Dh.profileBandNavigation}),a().createElement(xh,{className:Dh.comments,uri:l,relatedObjectUris:(0,s.createRelatedObjectUris)(s.CollaborationObjectTypes.ENTITY,{entityUri:l}),objectType:s.CollaborationObjectTypes.ENTITY}))))}));Mh.displayName="ScreenProfileBand";var _h=n(6791),Ih=n.n(_h),Nh=n(5746),Rh=n.n(Nh);const Lh=(0,r.forwardRef)((({item:e,onMenuClose:t=f.identity},n)=>{const{text:o,icon:i,onClick:l}=e,s=(0,r.useCallback)((()=>{t(),l()}),[t,l]);return a().createElement(mf(),{onClick:s,ref:n},a().createElement(Ih(),null,i),a().createElement(Rh(),null,o))}));Lh.displayName="MenuItemRenderer";const jh=(0,r.memo)((({entity:e,onOpenDataImport:t,onCreateHierarchy:n})=>{const o=(0,r.useMemo)((()=>[{text:c().text("Create"),icon:a().createElement(cd(),{fontSize:"small"}),onClick:n},{text:c().text("Import from file"),icon:a().createElement(pd(),{fontSize:"small"}),onClick:t}]),[n,t]);return a().createElement(Mh,{entity:e},a().createElement(xf,{menuId:"hierarchy-new-menu",buttonComponent:br(),buttonProps:{variant:"text",color:"primary",startIcon:a().createElement(md(),null)},buttonContent:c().text("New Hierarchy"),menuItems:o,MenuItemRenderer:Lh}))}));jh.displayName="HierarchyProfileBand";var Fh=n(9681),Vh=n.n(Fh);const Bh=lr({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,zIndex:10,backgroundColor:"rgba(255, 255, 255, 0.37)"},transparent:{backgroundColor:"transparent"},relativePosition:{position:"relative"}}),Hh=({transparent:e=!1,relativePosition:t=!1,className:n})=>{const r=Bh();return a().createElement("div",{"data-reltio-id":"reltio-linear-load-indicator",className:p()(r.loadingOverlay,n,{[r.transparent]:e,[r.relativePosition]:t})},a().createElement(Vh(),{color:"primary"}))};function zh(){return zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zh.apply(null,arguments)}function Uh(){return Uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uh.apply(null,arguments)}function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zh.apply(null,arguments)}function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wh.apply(null,arguments)}function qh(){return qh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qh.apply(null,arguments)}function $h(){return $h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$h.apply(null,arguments)}const Kh=lr((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"10px",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box","&$root_small":{minHeight:"160px"},"& $text":{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px",letterSpacing:"0.25px",textAlign:"center"},"& $secondaryText":{color:e.palette.text.secondary,fontSize:"15px",fontWeight:300,lineHeight:"18px",letterSpacing:"0.11px",textAlign:"center",paddingTop:"3px"}},root_small:{},small:{width:"88px",height:"88px"},embedded:{flexShrink:0,width:"190px",height:"190px",padding:"8px"},full:{width:"256px",height:"256px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:500,marginTop:"16px"},text:{},secondaryText:{},button:{minHeight:36,minWidth:64,maxWidth:500,padding:"10px 16px",borderRadius:"2px",boxShadow:"0 0 2px 0 rgba(0,0,0,0.12), 0 2px 2px 0 rgba(0,0,0,0.24), 0 0 8px 0 rgba(0,0,0,0.12), 0 8px 8px 0 rgba(0,0,0,0.24)",fontSize:"14px",fontWeight:500,lineHeight:"16px",marginTop:"24px"}})));function Gh(){return Gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gh.apply(null,arguments)}let Yh=function(e){return e.full="full",e.embedded="embedded",e.small="small",e}({});const Xh={SEARCH_RESULTS:e=>a().createElement("svg",zh({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgEmptySearchResults"},e),a().createElement("defs",null,a().createElement("radialGradient",{cx:"50%",cy:"100%",fx:"50%",fy:"100%",r:"81.681%",gradientTransform:"matrix(.98998 0 0 .612 .005 .388)",id:"EmptySearchResults_svg__c"},a().createElement("stop",{stopColor:"#00BFFF",stopOpacity:.5,offset:"0%"}),a().createElement("stop",{stopColor:"#9EE8FF",stopOpacity:0,offset:"100%"})),a().createElement("radialGradient",{cx:"50%",cy:"111.651%",fx:"50%",fy:"111.651%",r:"87.693%",gradientTransform:"matrix(0 -.97693 .7263 0 -.31 1.605)",id:"EmptySearchResults_svg__f"},a().createElement("stop",{stopColor:"#91F8E5",stopOpacity:.6,offset:"0%"}),a().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),a().createElement("radialGradient",{cx:"50%",cy:"103.659%",fx:"50%",fy:"103.659%",r:"90.207%",gradientTransform:"matrix(0 -1 2.23905 0 -1.821 1.537)",id:"EmptySearchResults_svg__g"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#73FAFF",stopOpacity:.21,offset:"59.38%"}),a().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"170.771%",x2:"50%",y2:"10.303%",id:"EmptySearchResults_svg__e"},a().createElement("stop",{stopColor:"#91F8E5",offset:"0%"}),a().createElement("stop",{stopColor:"#99FCFF",stopOpacity:0,offset:"100%"})),a().createElement("filter",{x:"-25.9%",y:"-26.2%",width:"151.8%",height:"152.3%",filterUnits:"objectBoundingBox",id:"EmptySearchResults_svg__d"},a().createElement("feGaussianBlur",{stdDeviation:15,in:"SourceGraphic"})),a().createElement("circle",{id:"EmptySearchResults_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"EmptySearchResults_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#EmptySearchResults_svg__a"})),a().createElement("use",{fillOpacity:.2,fill:"#A792CD",xlinkHref:"#EmptySearchResults_svg__a"}),a().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},a().createElement("g",{transform:"translate(56 34)"},a().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},a().createElement("path",{d:"M0 6.99C0 3.13 3.137 0 7 0h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H7c-3.866 0-7-3.143-7-6.99V6.99z"}),a().createElement("path",{d:"M13 25.99c0-3.86 3.137-6.99 7-6.99h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H20c-3.866 0-7-3.143-7-6.99V25.99z",opacity:.4})),a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 45.833)"},a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),a().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),a().createElement("path",{d:"M35.365.861h69.768a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),a().createElement("path",{d:"M34.274 15.048h126.164a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),a().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),a().createElement("rect",{fill:"#645F6D",opacity:.5,x:21.756,y:17.46,width:87.022,height:12.004,rx:6.002}),a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 87.302)"},a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),a().createElement("rect",{fill:"#E3EBF4",x:0,y:1.091,width:20.668,height:20.734,rx:10.334}),a().createElement("path",{d:"M35.365.861h82.647a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),a().createElement("path",{d:"M34.274 15.048H174.58a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),a().createElement("path",{d:"M33.182 24.869h113.119a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 128.77)"},a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),a().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),a().createElement("path",{d:"M35.365.861h110.929a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),a().createElement("path",{d:"M34.274 15.048h92.443a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),a().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})))),a().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},a().createElement("path",{fill:"#446275",d:"M72.246 84.033l8.66 5-35.5 61.488-8.66-5-12.556-24.729-51.307-29.622 20.431-35.388 50.648 29.242z"}),a().createElement("path",{d:"M62.906 120.21l-80.091-46.24 10.5-18.188 50.647 29.242 28.284-.99 8.66 5-18 31.176z",fillOpacity:.2,fill:"#FFF"}),a().createElement("path",{d:"M27.566 75.558L3.877 109.065l-5.013-2.895 26.045-32.146 2.657 1.534zm9.467 5.466L13.345 114.53l-5.014-2.895L34.377 79.49l2.656 1.534zm8.158 4.71l-22.32 34.297-5.013-2.895L43.903 84.99l1.288.744z",fill:"#527585"}),a().createElement("path",{d:"M11.524 90.544l13.385-16.52 2.657 1.534-12.174 17.22-3.868-2.234zm9.467 5.467L34.377 79.49l2.656 1.534-12.174 17.22-3.868-2.233zm9.527 5.5L43.903 84.99l1.288.744-11.47 17.626-3.203-1.85z",fill:"#76A2B5",opacity:.6}),a().createElement("path",{d:"M.355 59.848l-23.689 33.507-5.013-2.895 26.045-32.146 2.657 1.534zm9.468 5.466L-13.866 98.82l-5.013-2.895L7.166 63.78l2.657 1.534zm8.158 4.71L-4.34 104.32l-5.014-2.895L16.692 69.28l1.289.744z",fillOpacity:.1,fill:"#000"}),a().createElement("g",null,a().createElement("path",{fill:"url(#EmptySearchResults_svg__c)",opacity:.993,filter:"url(#EmptySearchResults_svg__d)",d:"M.63 0h173.74L123 172H52z",transform:"rotate(120 90.404 138.861)"}),a().createElement("path",{fill:"url(#EmptySearchResults_svg__e)",opacity:.3,d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),a().createElement("path",{fill:"url(#EmptySearchResults_svg__f)",opacity:.3,d:"M4 2h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),a().createElement("path",{fill:"url(#EmptySearchResults_svg__g)",d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),a().createElement("path",{fill:"#FFF",opacity:.196,d:"M212.363 205.344l-1 1.732L60.418 124.52l4.977-8.62z"})),a().createElement("path",{fill:"#76A2B5",d:"M73.112 84.533l-35.5 61.488-.866-.5 35.5-61.488z"}),a().createElement("path",{fill:"#F3F3F3",d:"M80.906 89.033l-35.5 61.488-.866-.5 35.5-61.488z"}),a().createElement("path",{fill:"#538196",d:"M55.112 115.71l-17.5 30.311-.866-.5 17.5-30.31z"})))),SELECT_ATTRIBUTES:e=>a().createElement("svg",Uh({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgSelectAttributes"},e),a().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),a().createElement("mask",{id:"SelectAttributes_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},a().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),a().createElement("g",{mask:"url(#SelectAttributes_svg__a)"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#SelectAttributes_svg__paint0_linear_0_19219)"}),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#SelectAttributes_svg__paint1_linear_0_19219)"}),a().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),a().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),a().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),a().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),a().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),a().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2V140.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),a().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),a().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zM148 37a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),a().createElement("defs",null,a().createElement("linearGradient",{id:"SelectAttributes_svg__paint0_linear_0_19219",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),a().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),a().createElement("linearGradient",{id:"SelectAttributes_svg__paint1_linear_0_19219",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})))),NO_DATA:e=>a().createElement("svg",Zh({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgNoData"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__b"},a().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#F4F4F4",offset:"100%"})),a().createElement("linearGradient",{x1:"69.573%",y1:"86.747%",x2:"38.144%",y2:"33.403%",id:"NoData_svg__d"},a().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#000",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__e"},a().createElement("stop",{stopColor:"#EEFBFF",offset:"0%"}),a().createElement("stop",{stopColor:"#0072CE",offset:"100%"})),a().createElement("filter",{x:"-7.7%",y:"-7.5%",width:"115.3%",height:"115%",filterUnits:"objectBoundingBox",id:"NoData_svg__f"},a().createElement("feOffset",{dx:0,dy:2,in:"SourceAlpha",result:"shadowOffsetOuter1"}),a().createElement("feGaussianBlur",{stdDeviation:2,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),a().createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0",type:"matrix",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),a().createElement("feMerge",null,a().createElement("feMergeNode",{in:"shadowMatrixOuter1"}),a().createElement("feMergeNode",{in:"SourceGraphic"}))),a().createElement("circle",{id:"NoData_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"NoData_svg__c",fill:"#fff"},a().createElement("use",{xlinkHref:"#NoData_svg__a"})),a().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#NoData_svg__a"}),a().createElement("path",{fill:"url(#NoData_svg__b)",mask:"url(#NoData_svg__c)",d:"M0 9h256v247H0z"}),a().createElement("g",{mask:"url(#NoData_svg__c)"},a().createElement("g",{transform:"translate(29 37)"},a().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},a().createElement("path",{fillOpacity:.8,opacity:.5,d:"M14.565 8h228.144v176.476H14.565z"}),a().createElement("path",{d:"M0 8.01C0 3.586 3.576 0 7.997 0h223.838a7.997 7.997 0 017.997 8.01v152.401c0 4.424-3.577 8.01-7.997 8.01H7.997A7.997 7.997 0 010 160.411V8.01z"})),a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 42.105)"},a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),a().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),a().createElement("path",{d:"M32.488.791h64.093a3.509 3.509 0 110 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),a().createElement("path",{d:"M31.486 13.824h115.902a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),a().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),a().createElement("rect",{fill:"#645F6D",opacity:.5,x:19.986,y:16.04,width:79.944,height:11.028,rx:5.514}),a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 80.2)"},a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),a().createElement("rect",{fill:"#E3EBF4",x:0,y:1.003,width:18.987,height:19.048,rx:9.493}),a().createElement("path",{d:"M32.488.791h75.925a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),a().createElement("path",{d:"M31.486 13.824h128.893a2.506 2.506 0 110 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),a().createElement("path",{d:"M30.483 22.846h103.918a1.504 1.504 0 010 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 118.296)"},a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),a().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),a().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),a().createElement("path",{d:"M32.488.791h101.906a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),a().createElement("path",{d:"M31.486 13.824h84.924a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),a().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})))),a().createElement("g",{mask:"url(#NoData_svg__c)"},a().createElement("path",{d:"M154.445 45.134v154.072H36.625V45.134h.811C35.508 62.52 41.07 80.609 54.12 93.944c22.74 23.235 59.61 23.235 82.352 0 13.05-13.335 18.612-31.424 16.683-48.81h1.29z",fill:"url(#NoData_svg__d)",opacity:.1,transform:"rotate(-30 291.014 34.548)"}),a().createElement("path",{d:"M27.473 93.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"url(#NoData_svg__e)",opacity:.2,transform:"translate(70 86)"}),a().createElement("g",{filter:"url(#NoData_svg__f)",strokeWidth:1,fill:"none",transform:"translate(70 86)"},a().createElement("path",{d:"M59.697 0c32.97 0 59.697 26.746 59.697 59.738 0 15.185-5.662 29.047-14.988 39.587l51.204 51.24a89.336 89.336 0 01-10.097 9.392l-51.38-51.416c-9.73 6.888-21.61 10.936-34.436 10.936C26.727 119.477 0 92.73 0 59.738 0 26.746 26.727 0 59.697 0zm0 17.756c-23.17 0-41.953 18.796-41.953 41.982s18.783 41.982 41.953 41.982 41.953-18.796 41.953-41.982-18.783-41.982-41.953-41.982z",fill:"#B5C8C9"}),a().createElement("path",{d:"M21.508 105.656C8.365 94.698 0 78.196 0 59.738 0 26.746 26.727 0 59.697 0c18.444 0 34.935 8.37 45.885 21.523l-9.794 9.8c-8.408-10.68-21.45-17.537-36.091-17.537-25.361 0-45.92 20.573-45.92 45.952 0 14.652 6.852 27.702 17.525 36.117l-9.794 9.8z",fillOpacity:.4,fill:"#FFF"})),a().createElement("path",{d:"M97.473 179.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"#D9F5FF",opacity:.4,style:{mixBlendMode:"soft-light"}}),a().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.87,fill:"#000",style:{mixBlendMode:"overlay"}}),a().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.38,fill:"#3C74B4"})))),ERROR:e=>a().createElement("svg",Wh({width:88,height:88,viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgError"},e),a().createElement("mask",{id:"Error_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:88,height:88},a().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#fff"})),a().createElement("g",{mask:"url(#Error_svg__a)"},a().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#CAC4D5",fillOpacity:.3}),a().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M19.987 6.73l49.449 6.072a.687.687 0 01.596.767l-7.845 63.888a.688.688 0 01-.766.6L7.214 71.4a.688.688 0 01-.599-.763l.408-3.326L19.987 6.73z",fill:"#fff"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M1.267 25.921l45.86-19.466a.687.687 0 01.9.366l25.15 59.251a.61.61 0 01-.386.84L22.34 82.765a.719.719 0 01-.887-.445l-20.185-56.4z",fill:"#fff"}),a().createElement("path",{d:"M65.631 9.23H11.017a.688.688 0 00-.687.687v64.37c0 .38.307.687.687.687h54.614c.38 0 .688-.308.688-.687V9.917a.688.688 0 00-.688-.688z",fill:"#F9F9F9"}),a().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.95l3.105-1.666 7.31-4.025 8.852 3.472 7.89-5.223 8.036-2.628 8.113 5.193 3.352-10.255v16.967H14.935l-.05-1.835z",fill:"#9C6CF0"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 32.331l3.105-3.761 7.31 4.31 8.852 1.656 7.89-2.205 8.036 1.827 8.113-12.643 3.352.742V36.36H14.935l-.05-4.029z",fill:"#FA82AA"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.946l3.105.432 7.31 1.01 8.852-5.117 7.89 3.675 8.036 1.839 8.113-1.839 3.352.811v1.028H14.935l-.05-1.839z",fill:"#4DBEE9"}),a().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M61.543 35.288l-.05 1.497H14.885v-5.239l3.352-.276 8.114 4.697 8.036-.679 7.889.82 8.852-.616 7.31-1.601 3.105 1.397z",fill:"#4DBEE9"}),a().createElement("path",{d:"M21.036 40.178h-5.09a.636.636 0 000 1.272h5.09a.636.636 0 100-1.272z",fill:"#ACACAC"}),a().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM25.914 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM39.91 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM21.248 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM35.245 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM30.58 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM44.577 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272z",fill:"#BDBDBD"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.272-1.273zM25.914 62.658c.702 0 1.272.57 1.272 1.273v5.09a1.272 1.272 0 11-2.545 0v-5.09c0-.703.57-1.273 1.273-1.273zM39.91 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.273-1.273zM21.248 66.477c.702 0 1.272.57 1.272 1.272v1.273a1.273 1.273 0 01-2.545 0v-1.273c0-.703.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),a().createElement("path",{d:"M36.518 65.628a1.272 1.272 0 00-2.545 0v3.393a1.272 1.272 0 102.545 0v-3.393zM31.852 62.234a1.272 1.272 0 10-2.545 0v6.787a1.272 1.272 0 102.545 0v-6.787z",fill:"#4DBEE9"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.577 60.962c.702 0 1.272.57 1.272 1.272v6.787a1.273 1.273 0 01-2.545 0v-6.787c0-.702.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),a().createElement("path",{d:"M18.915 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#9C6CF0"}),a().createElement("path",{opacity:.5,d:"M34.185 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),a().createElement("path",{opacity:.3,d:"M49.454 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),a().createElement("path",{opacity:.8,d:"M26.55 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#FB6597"}),a().createElement("path",{d:"M41.82 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),a().createElement("path",{opacity:.2,d:"M57.09 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),a().createElement("path",{opacity:.5,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM31.851 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 110-.849zM47.121 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 010-.849zM24.217 19.818h4.665a.424.424 0 010 .849h-4.665a.424.424 0 010-.849zM39.486 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM54.756 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849z",fill:"#ACACAC"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.946 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM15.946 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM15.946 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM23.58 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM23.58 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM23.58 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM49.454 43.571h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 46.116h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 48.661h11.028a.636.636 0 010 1.273H49.454a.636.636 0 110-1.273zM31.215 43.571h15.27a.636.636 0 110 1.273h-15.27a.636.636 0 010-1.273zM31.215 46.116h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM31.215 48.661h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM15.946 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM23.58 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM49.454 51.206h11.028a.636.636 0 010 1.272H49.454a.636.636 0 110-1.272zM31.215 51.206h15.27a.636.636 0 110 1.272h-15.27a.636.636 0 010-1.272z",fill:"#E9E9E9"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 55.872h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 110-1.273z",fill:"#ACACAC"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 59.69h11.029a.636.636 0 010 1.272H49.878a.636.636 0 110-1.273zM49.878 62.234h11.029a.636.636 0 010 1.273H49.878a.636.636 0 010-1.273zM49.878 64.78h11.029a.636.636 0 010 1.272H49.878a.636.636 0 010-1.273z",fill:"#E9E9E9"}),a().createElement("path",{d:"M54.968 67.324h-5.09a.636.636 0 000 1.273h5.09a.636.636 0 000-1.273z",fill:"#E9E9E9"}),a().createElement("g",{filter:"url(#Error_svg__filter0_d)"},a().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#000"})),a().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#F25252"}),a().createElement("path",{opacity:.15,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 34.719c12.34 0 22.344 10.003 22.344 22.343S69.746 79.406 57.406 79.406c-12.34 0-22.343-10.003-22.343-22.344 0-12.34 10.003-22.343 22.343-22.343zm-.172 2.406c-10.916 0-19.765 8.85-19.765 19.766 0 10.916 8.85 19.765 19.765 19.765C68.151 76.656 77 67.806 77 56.891c0-10.917-8.85-19.766-19.766-19.766z",fill:"#F25252"}),a().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 38.844c10.062 0 18.219 8.157 18.219 18.218 0 10.062-8.157 18.22-18.219 18.22-10.062 0-18.218-8.158-18.218-18.22 0-10.061 8.156-18.218 18.218-18.218zm0 2.043c-8.933 0-16.175 7.242-16.175 16.175 0 8.934 7.242 16.176 16.175 16.176 8.934 0 16.176-7.242 16.176-16.175 0-8.934-7.242-16.176-16.176-16.176z",fill:"#F25252"}),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 26.469C74.303 26.469 88 40.166 88 57.062c0 16.897-13.697 30.594-30.594 30.594-16.896 0-30.593-13.697-30.593-30.594 0-16.896 13.697-30.593 30.593-30.593zm-.172 3.437c-14.903 0-26.984 12.082-26.984 26.985 0 14.903 12.081 26.984 26.984 26.984 14.903 0 26.985-12.081 26.985-26.984 0-14.903-12.082-26.985-26.985-26.985z",fill:"#F25252"}),a().createElement("path",{d:"M57.406 71.844c8.164 0 14.782-6.618 14.782-14.781 0-8.164-6.618-14.782-14.782-14.782-8.163 0-14.781 6.618-14.781 14.782 0 8.163 6.618 14.78 14.781 14.78z",fill:"#FF6A6A"}),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M58.298 46.448L75.18 63.331l-9.114 12.078h-2.029l-7.582-7.582 1.006-3.178.837-18.2z",fill:"url(#Error_svg__paint0_linear)"}),a().createElement("g",{filter:"url(#Error_svg__filter1_d)"},a().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#000"})),a().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#fff"}),a().createElement("g",{filter:"url(#Error_svg__filter2_d)"},a().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#000"})),a().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#fff"})),a().createElement("defs",null,a().createElement("filter",{id:"Error_svg__filter0_d",x:36.219,y:37.875,width:42.375,height:42.375,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a().createElement("feOffset",{dy:2}),a().createElement("feGaussianBlur",{stdDeviation:2}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),a().createElement("filter",{id:"Error_svg__filter1_d",x:51.688,y:62.625,width:11.438,height:11.438,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a().createElement("feOffset",{dy:2}),a().createElement("feGaussianBlur",{stdDeviation:2}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),a().createElement("filter",{id:"Error_svg__filter2_d",x:51.688,y:44.063,width:11.438,height:23.813,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a().createElement("feOffset",{dy:2}),a().createElement("feGaussianBlur",{stdDeviation:2}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),a().createElement("linearGradient",{id:"Error_svg__paint0_linear",x1:68.438,y1:71.571,x2:60.119,y2:58.801,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:0}),a().createElement("stop",{offset:1})))),LOADING:e=>a().createElement("svg",Gh({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgEmptyLoading"},e),a().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.03}),a().createElement("mask",{id:"EmptyLoading_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},a().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),a().createElement("g",{mask:"url(#EmptyLoading_svg__a)"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#EmptyLoading_svg__paint0_linear_2978_41880)"}),a().createElement("g",{fillRule:"evenodd",clipRule:"evenodd"},a().createElement("path",{d:"M40.755 44.17C40.755 38.002 45.76 33 51.92 33h251.675c6.167 0 11.166 5.001 11.166 11.17v160.596H40.755V44.171z",fill:"#5E7282"}),a().createElement("path",{d:"M50.371 43.106h255.685V195.71H50.371V43.106z",fill:"url(#EmptyLoading_svg__paint1_linear_2978_41880)"}),a().createElement("path",{d:"M15.545 208.914c2.321.469 4.723.716 7.183.716H338.75c.22 0 .439-.002.658-.006-7.061 8.445-17.67 13.816-29.524 13.816H45.655c-12.111 0-22.916-5.597-29.968-14.349l-.142-.177z",fill:"#BDCBD8"}),a().createElement("path",{d:"M339.015 204.883v4.966H15v-4.966h324.015z",fill:"#D4DCDF"}),a().createElement("path",{d:"M201.107 213.991h-45.221a11.176 11.176 0 01-11.046-9.449h67.314a11.172 11.172 0 01-11.047 9.449z",fill:"url(#EmptyLoading_svg__paint2_linear_2978_41880)"})),a().createElement("g",{filter:"url(#EmptyLoading_svg__filter0_d_2978_41880)"},a().createElement("rect",{x:81.703,y:99,width:170,height:26,rx:8,fill:"#D1E6FF"}),a().createElement("rect",{x:84.703,y:102,width:164,height:20,rx:5,stroke:"#fff",strokeWidth:6})),a().createElement("g",{filter:"url(#EmptyLoading_svg__filter1_d_2978_41880)"},a().createElement("mask",{id:"EmptyLoading_svg__b",fill:"#fff"},a().createElement("rect",{x:81,y:105,width:108,height:14,rx:2})),a().createElement("rect",{x:81,y:105,width:108,height:14,rx:2,fill:"#61A3F1"}),a().createElement("rect",{x:81,y:105,width:108,height:14,rx:2,stroke:"#4A90E2",strokeWidth:8,mask:"url(#EmptyLoading_svg__b)"})),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M122.703 74a3 3 0 013-3h81.625a3 3 0 010 6h-81.625a3 3 0 01-3-3z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M146.703 86a3 3 0 013-3h34a3 3 0 110 6h-34a3 3 0 01-3-3zM136.703 139a3 3 0 013-3h54a3 3 0 110 6h-54a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M112.703 151a3 3 0 013-3h103a3 3 0 110 6h-103a3 3 0 01-3-3zM124.703 163a3 3 0 013-3h79a3 3 0 110 6h-79a3 3 0 01-3-3z",fill:"#979797"}),a().createElement("g",{filter:"url(#EmptyLoading_svg__filter2_ddd_2978_41880)"},a().createElement("path",{fill:"#A0C1D7",d:"M70.703 64h11v8h-11z"}),a().createElement("rect",{x:62,y:59,width:28,height:8,rx:1,fill:"#BDD4E3"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.23 160.5c20.704 20.703 54.27 20.703 74.973 0 20.703-20.703 20.703-54.27 0-74.973-20.703-20.703-54.27-20.703-74.973 0-20.703 20.703-20.703 54.27 0 74.973z",fill:"#BDD4E3"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M113.427 85.988c20.463 20.652 20.404 53.981-.175 74.561-20.432 20.431-53.432 20.635-74.115.613l-.446-.439 74.736-74.735z",fill:"#A0C1D7"}),a().createElement("path",{opacity:.144,fillRule:"evenodd",clipRule:"evenodd",d:"M75.037 175.385c29.402 0 53.236-23.834 53.236-53.236a54.67 54.67 0 00-.106-3.399L100.45 91.037l-55.142 58.396 25.814 25.811c1.293.094 2.598.141 3.915.141z",fill:"url(#EmptyLoading_svg__paint3_linear_2978_41880)"}),a().createElement("circle",{cx:75.94,cy:123.237,r:44.723,fill:"#91B0C2"}),a().createElement("g",{filter:"url(#EmptyLoading_svg__filter3_d_2978_41880)"},a().createElement("circle",{r:42.793,transform:"matrix(-1 0 0 1 75.94 123.237)",fill:"#F7F4FF"})),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M105.043 175.309l-10.298.861-20.313-20.152.863-2.292-9.973-9.982 18.679-6.882h-4.308l-8.943-8.951 4.545-10.532L94.35 90.74l37.888 37.162c-.343 20.088-11.146 37.627-27.195 47.407z",fill:"url(#EmptyLoading_svg__paint4_linear_2978_41880)"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.703 123a8 8 0 0112.362-6.707l14.477-25.145A36.828 36.828 0 0075.703 86c-20.434 0-37 16.565-37 37h29z",fill:"url(#EmptyLoading_svg__paint5_angular_2978_41880)"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M94.297 90.6l.24.138s-12.45 35.125-12.811 35.752a6.92 6.92 0 01-11.985-6.92c.361-.626 24.556-28.97 24.556-28.97z",fill:"#323232"}),a().createElement("circle",{cx:75.94,cy:123.237,r:2.896,fill:"#EEEBF6"}),a().createElement("circle",{cx:96.211,cy:148.655,r:2.574,fill:"#A0C3D7"}),a().createElement("circle",{cx:107.15,cy:131.924,r:2.574,fill:"#A0C3D7"}),a().createElement("rect",{x:62.427,y:135.592,width:27.027,height:10.039,rx:3,fill:"#A0C3D7"}),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M85.914 170.534H75.112l-21.605-21.472 2.126-2.775v-1.01L42.8 132.523l2.853-2.529 40.261 40.54z",fill:"url(#EmptyLoading_svg__paint6_linear_2978_41880)"}),a().createElement("path",{opacity:.02,fillRule:"evenodd",clipRule:"evenodd",d:"M96.362 136.555h-4.988l-38.126-38.01 2.853-2.53 40.261 40.54z",fill:"url(#EmptyLoading_svg__paint7_linear_2978_41880)"}),a().createElement("path",{opacity:.02,fillRule:"evenodd",clipRule:"evenodd",d:"M116.746 129.006h-4.988L73.632 90.995l2.853-2.53 40.261 40.541z",fill:"url(#EmptyLoading_svg__paint8_linear_2978_41880)"}),a().createElement("path",{opacity:.02,fillRule:"evenodd",clipRule:"evenodd",d:"M85.793 152.41h-4.988l-38.126-38.011 2.852-2.53 40.262 40.541z",fill:"url(#EmptyLoading_svg__paint9_linear_2978_41880)"}),a().createElement("circle",{cx:75.618,cy:155.734,r:2.574,fill:"#A0C3D7"}),a().createElement("circle",{cx:55.026,cy:148.655,r:2.574,fill:"#A0C3D7"}),a().createElement("circle",{cx:44.73,cy:131.924,r:2.574,fill:"#A0C3D7"}),a().createElement("g",{fill:"#A0C3D7"},a().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 96.21 97.363)"}),a().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 107.149 114.094)"}),a().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 75.618 90.284)"}),a().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 55.026 97.363)"}),a().createElement("circle",{r:2.574,transform:"matrix(1 0 0 -1 44.73 114.094)"})))),a().createElement("defs",null,a().createElement("linearGradient",{id:"EmptyLoading_svg__paint0_linear_2978_41880",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),a().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint1_linear_2978_41880",x1:178.214,y1:43.106,x2:178.214,y2:195.709,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#F2F9FB"}),a().createElement("stop",{offset:1,stopColor:"#fff"})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint2_linear_2978_41880",x1:178.497,y1:204.542,x2:178.497,y2:213.991,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#90AABF"}),a().createElement("stop",{offset:1,stopColor:"#869DAE"})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint3_linear_2978_41880",x1:154.275,y1:146.574,x2:96.683,y2:91.352,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint4_linear_2978_41880",x1:60.762,y1:143.327,x2:114.747,y2:176.019,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.87}),a().createElement("stop",{offset:1,stopOpacity:.01})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint6_linear_2978_41880",x1:90.287,y1:154.267,x2:68.53,y2:131.301,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint7_linear_2978_41880",x1:100.735,y1:120.288,x2:78.978,y2:97.322,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint8_linear_2978_41880",x1:121.119,y1:112.739,x2:99.362,y2:89.773,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})),a().createElement("linearGradient",{id:"EmptyLoading_svg__paint9_linear_2978_41880",x1:90.166,y1:136.143,x2:68.409,y2:113.177,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})),a().createElement("filter",{id:"EmptyLoading_svg__filter0_d_2978_41880",x:77.703,y:96,width:178,height:34,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feOffset",{dy:1}),a().createElement("feGaussianBlur",{stdDeviation:2}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2978_41880",result:"shape"})),a().createElement("filter",{id:"EmptyLoading_svg__filter1_d_2978_41880",x:77,y:102,width:116,height:22,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feOffset",{dy:1}),a().createElement("feGaussianBlur",{stdDeviation:2}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2978_41880",result:"shape"})),a().createElement("filter",{id:"EmptyLoading_svg__filter2_ddd_2978_41880",x:-13.297,y:28,width:181.534,height:189.17,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feMorphology",{radius:4,operator:"erode",in:"SourceAlpha",result:"effect1_dropShadow_2978_41880"}),a().createElement("feOffset",{dy:7}),a().createElement("feGaussianBlur",{stdDeviation:4}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.600156 0 0 0 0 0.745337 0 0 0 0 0.8625 0 0 0 0.1 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feMorphology",{radius:4,operator:"dilate",in:"SourceAlpha",result:"effect2_dropShadow_2978_41880"}),a().createElement("feOffset",{dy:5}),a().createElement("feGaussianBlur",{stdDeviation:16}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0.447059 0 0 0 0 0.807843 0 0 0 0.06 0"}),a().createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_2978_41880",result:"effect2_dropShadow_2978_41880"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feMorphology",{radius:2,operator:"dilate",in:"SourceAlpha",result:"effect3_dropShadow_2978_41880"}),a().createElement("feOffset",{dy:12}),a().createElement("feGaussianBlur",{stdDeviation:8.5}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0.447059 0 0 0 0 0.807843 0 0 0 0.06 0"}),a().createElement("feBlend",{mode:"normal",in2:"effect2_dropShadow_2978_41880",result:"effect3_dropShadow_2978_41880"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow_2978_41880",result:"shape"})),a().createElement("filter",{id:"EmptyLoading_svg__filter3_d_2978_41880",x:29.148,y:78.444,width:93.585,height:93.585,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feOffset",{dy:2}),a().createElement("feGaussianBlur",{stdDeviation:2}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2978_41880"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2978_41880",result:"shape"})),a().createElement("radialGradient",{id:"EmptyLoading_svg__paint5_angular_2978_41880",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-56.035 152.55 -12.515) scale(43.4058 65.5062)"},a().createElement("stop",{stopColor:"#CFE8FF"}),a().createElement("stop",{offset:.599,stopColor:"#D1F2F9",stopOpacity:0})))),NO_LOGS:e=>a().createElement("svg",qh({width:80,height:81,viewBox:"0 0 80 81",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgNoLogs"},e),a().createElement("circle",{cx:40,cy:40.5,r:40,fill:"#0072CE",fillOpacity:.1}),a().createElement("mask",{id:"NoLogs_svg__a",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:81},a().createElement("circle",{cx:40,cy:40.5,r:40,fill:"#fff"})),a().createElement("g",{mask:"url(#NoLogs_svg__a)",fillRule:"evenodd",clipRule:"evenodd"},a().createElement("path",{d:"M-5 3.313h80V80.5H-5V3.312z",fill:"url(#NoLogs_svg__paint0_linear_8548_48660)"}),a().createElement("path",{opacity:.05,d:"M58.675 18.27L77 36.596v46.522H29.182L16.25 70.84V18.27h42.425z",fill:"url(#NoLogs_svg__paint1_linear_8548_48660)"}),a().createElement("path",{opacity:.06,d:"M14.688 18.625h63.124c1.209 0 2.188.98 2.188 2.188v49.062c0 1.208-.98 2.188-2.188 2.188H14.688a2.188 2.188 0 01-2.188-2.188V20.812c0-1.208.98-2.187 2.188-2.187z",fill:"#000"}),a().createElement("path",{d:"M15.625 18h62.813C79.3 18 80 18.7 80 19.563v49.062c0 .863-.7 1.563-1.563 1.563H15.626c-.863 0-1.563-.7-1.563-1.563V19.562c0-.862.7-1.562 1.563-1.562z",fill:"#fff"}),a().createElement("path",{opacity:.8,d:"M18.526 25.017c0-.518.42-.938.938-.938h13.008a.937.937 0 110 1.875H19.463a.937.937 0 01-.938-.937z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,d:"M55.58 25.017c0-.518.419-.938.937-.938H76.58a.938.938 0 010 1.875H56.517a.937.937 0 01-.938-.937z",fill:"#979797"}),a().createElement("path",{opacity:.8,d:"M18.526 47.753c0-.517.42-.937.938-.937h13.008a.938.938 0 010 1.875H19.463a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,d:"M55.58 47.753c0-.517.419-.937.937-.937H76.58a.938.938 0 010 1.875H56.517a.937.937 0 01-.938-.938z",fill:"#979797"}),a().createElement("path",{opacity:.8,d:"M18.526 56.174c0-.517.42-.937.938-.937h25.508a.937.937 0 110 1.875H19.463a.937.937 0 01-.938-.938zM18.526 63.753c0-.517.42-.937.938-.937h19.611a.938.938 0 010 1.875H19.464a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,d:"M55.58 56.174c0-.517.419-.937.937-.937h23.189a.938.938 0 010 1.875h-23.19a.937.937 0 01-.937-.938zM55.58 63.753c0-.517.419-.937.937-.937h23.189a.938.938 0 010 1.875h-23.19a.937.937 0 01-.937-.938z",fill:"#979797"}),a().createElement("path",{opacity:.8,d:"M18.526 32.174c0-.517.42-.937.938-.937h25.508a.937.937 0 110 1.875H19.463a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,d:"M55.58 32.174c0-.517.419-.937.937-.937H76.58a.938.938 0 010 1.875H56.517a.937.937 0 01-.938-.938z",fill:"#979797"}),a().createElement("path",{opacity:.8,d:"M18.526 39.753c0-.517.42-.937.938-.937h25.508a.938.938 0 010 1.875H19.463a.937.937 0 01-.938-.938z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,d:"M55.58 39.753c0-.517.419-.937.937-.937h23.189a.938.938 0 010 1.875h-23.19a.937.937 0 01-.937-.938z",fill:"#979797"}),a().createElement("path",{opacity:.6,d:"M15.625 7.375H73.75c1.035 0 1.875.84 1.875 1.875v5.625c0 1.036-.84 1.875-1.875 1.875H15.625a1.875 1.875 0 01-1.875-1.875V9.25c0-1.036.84-1.875 1.875-1.875z",fill:"#fff"}),a().createElement("path",{opacity:.2,d:"M18.125 12.063c0-1.036.84-1.876 1.875-1.876h21.875a1.875 1.875 0 010 3.75H20a1.875 1.875 0 01-1.875-1.874zM55.158 12.079c0-1.047.848-1.895 1.895-1.895H72.21a1.895 1.895 0 110 3.79H57.052a1.895 1.895 0 01-1.894-1.895z",fill:"#979797"})),a().createElement("defs",null,a().createElement("linearGradient",{id:"NoLogs_svg__paint0_linear_8548_48660",x1:-5,y1:3.313,x2:-5,y2:80.5,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),a().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),a().createElement("linearGradient",{id:"NoLogs_svg__paint1_linear_8548_48660",x1:83.162,y1:57.097,x2:48.401,y2:24.776,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})))),NO_ACTIVATIONS:e=>a().createElement("svg",$h({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgNoActivations"},e),a().createElement("circle",{cx:100,cy:100,r:100,fill:"#0072CE",fillOpacity:.1}),a().createElement("mask",{id:"NoActivation_svg__a",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:200,height:200},a().createElement("circle",{cx:100,cy:100,r:100,fill:"#fff"})),a().createElement("g",{mask:"url(#NoActivation_svg__a)"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-12.5 7.031h200V200h-200V7.031z",fill:"url(#NoActivation_svg__paint0_linear_8548_48982)"}),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M146.688 44.426L192.5 90.237v116.306H72.956l-32.331-30.697V44.426h106.063z",fill:"url(#NoActivation_svg__paint1_linear_8548_48982)"}),a().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M36.719 45.313H194.53A5.468 5.468 0 01200 50.78v122.657a5.468 5.468 0 01-5.469 5.468H36.719a5.468 5.468 0 01-5.469-5.468V50.781a5.469 5.469 0 015.469-5.468z",fill:"#000"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.063 43.75h157.031A3.906 3.906 0 01200 47.656v122.656a3.907 3.907 0 01-3.906 3.907H39.063a3.907 3.907 0 01-3.907-3.907V47.656a3.906 3.906 0 013.907-3.906z",fill:"#fff"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M82.325 56.746a2.344 2.344 0 012.343-2.344h32.52a2.343 2.343 0 010 4.688h-32.52a2.344 2.344 0 01-2.343-2.344z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M82.031 66.121a2.344 2.344 0 012.344-2.344h50.16a2.344 2.344 0 110 4.688h-50.16a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M82.325 127.344A2.344 2.344 0 0184.668 125h32.52a2.344 2.344 0 010 4.688h-32.52a2.344 2.344 0 01-2.343-2.344z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M82.031 136.719a2.344 2.344 0 012.344-2.344h50.16a2.343 2.343 0 110 4.687h-50.16a2.343 2.343 0 01-2.344-2.343z",fill:"#979797"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M82.325 150.781a2.343 2.343 0 012.343-2.343h63.77a2.343 2.343 0 010 4.687h-63.77a2.344 2.344 0 01-2.343-2.344z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M82.031 160.156a2.344 2.344 0 012.344-2.344h57.973a2.343 2.343 0 010 4.688H84.375a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M108.106 80.469a2.344 2.344 0 012.344-2.344h63.769a2.344 2.344 0 010 4.688H110.45a2.344 2.344 0 01-2.344-2.344z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M107.812 89.844a2.344 2.344 0 012.344-2.344h50.16a2.344 2.344 0 110 4.688h-50.16a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),a().createElement("circle",{cx:52.344,cy:61.719,r:7.031,fill:"#B6C7DB"}),a().createElement("circle",{cx:52.344,cy:61.719,r:7.031,fill:"#B6C7DB"}),a().createElement("circle",{cx:93.75,cy:82.813,r:4.688,fill:"#B6C7DB"}),a().createElement("circle",{cx:93.75,cy:106.25,r:4.688,fill:"#B6C7DB"}),a().createElement("circle",{cx:52.344,cy:132.031,r:7.031,fill:"#B6C7DB"}),a().createElement("circle",{cx:52.344,cy:155.469,r:7.031,fill:"#B6C7DB"}),a().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M108.106 103.906a2.344 2.344 0 012.344-2.344h63.769a2.344 2.344 0 010 4.688H110.45a2.343 2.343 0 01-2.344-2.344z",fill:"#B6C7DB"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M107.812 113.281a2.344 2.344 0 012.344-2.343h57.973a2.344 2.344 0 010 4.687h-57.973a2.344 2.344 0 01-2.344-2.344z",fill:"#979797"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M72.277 84.375v-6.25h-1.563v31.535h8.734v-1.562h-7.171v-22.16h7.17v-1.563h-7.17z",fill:"#2B98F0"}),a().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M74.274 60.156l-2.762 2.762-2.762-2.762h5.524z",fill:"#000"}),a().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M39.063 17.188h145.312a4.687 4.687 0 014.687 4.687v14.063a4.687 4.687 0 01-4.687 4.687H39.062a4.688 4.688 0 01-4.687-4.688V21.876a4.688 4.688 0 014.688-4.688z",fill:"#fff"}),a().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M45.313 28.906A4.687 4.687 0 0150 24.22h54.688a4.688 4.688 0 010 9.375H50a4.688 4.688 0 01-4.688-4.688zM115.625 28.906a4.688 4.688 0 014.688-4.687h7.812a4.687 4.687 0 010 9.375h-7.813a4.688 4.688 0 01-4.687-4.688z",fill:"#979797"})),a().createElement("g",{filter:"url(#NoActivation_svg__filter0_d_8548_48982)"},a().createElement("path",{d:"M130.469 168.75c21.573 0 39.062-17.489 39.062-39.062 0-21.574-17.489-39.063-39.062-39.063-21.574 0-39.063 17.489-39.063 39.063 0 21.573 17.489 39.062 39.063 39.062z",fill:"#000"})),a().createElement("path",{d:"M130.469 168.75c21.573 0 39.062-17.489 39.062-39.062 0-21.574-17.489-39.063-39.062-39.063-21.574 0-39.063 17.489-39.063 39.063 0 21.573 17.489 39.062 39.063 39.062z",fill:"#93D204"}),a().createElement("path",{opacity:.15,fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 78.906c28.045 0 50.781 22.736 50.781 50.781 0 28.046-22.736 50.782-50.781 50.782-28.046 0-50.781-22.736-50.781-50.782 0-28.045 22.735-50.78 50.781-50.78zm-.391 5.469c-24.81 0-44.922 20.112-44.922 44.922s20.112 44.922 44.922 44.922S175 154.107 175 129.297s-20.112-44.922-44.922-44.922z",fill:"#A9F300"}),a().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 88.281c22.868 0 41.406 18.538 41.406 41.406 0 22.869-18.538 41.407-41.406 41.407s-41.406-18.538-41.406-41.407c0-22.868 18.538-41.406 41.406-41.406zm0 4.644c-20.304 0-36.763 16.459-36.763 36.762 0 20.304 16.459 36.763 36.763 36.763 20.303 0 36.762-16.459 36.762-36.763 0-20.303-16.459-36.762-36.762-36.762z",fill:"#A9F300"}),a().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 60.156c38.401 0 69.531 31.13 69.531 69.532 0 38.401-31.13 69.531-69.531 69.531-38.401 0-69.531-31.13-69.531-69.531 0-38.401 31.13-69.532 69.531-69.532zm-.391 7.813c-33.87 0-61.328 27.457-61.328 61.328 0 33.87 27.457 61.328 61.328 61.328s61.328-27.458 61.328-61.328c0-33.87-27.457-61.328-61.328-61.328z",fill:"#A9F300"}),a().createElement("path",{d:"M130.469 163.281c18.553 0 33.593-15.04 33.593-33.593 0-18.554-15.04-33.594-33.593-33.594-18.554 0-33.594 15.04-33.594 33.594 0 18.553 15.04 33.593 33.594 33.593z",fill:"#A5E418"}),a().createElement("path",{opacity:.05,d:"M182.031 146.094l-34.375-34.375-5.344 2.343-11.719-11.718-.905 22.656-13.282-13.281-7.031 10.156v23.437l36.719 36.719 35.937-35.937z",fill:"url(#NoActivation_svg__paint2_linear_8548_48982)"}),a().createElement("g",{filter:"url(#NoActivation_svg__filter1_d_8548_48982)"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.469 102.344a3.907 3.907 0 00-3.907 3.906v17.969a3.907 3.907 0 007.813 0V106.25a3.906 3.906 0 00-3.906-3.906zm17.996 9.347a3.907 3.907 0 00-5.524 5.524 18.186 18.186 0 013.943 19.825 18.187 18.187 0 01-26.912 8.163 18.182 18.182 0 01-7.735-18.674 18.194 18.194 0 014.978-9.314 3.905 3.905 0 10-5.524-5.524 26.008 26.008 0 00-5.637 28.338 26 26 0 0024.024 16.053 25.999 25.999 0 0024.024-16.053 26.007 26.007 0 00-5.637-28.338z",fill:"#fff"})),a().createElement("defs",null,a().createElement("linearGradient",{id:"NoActivation_svg__paint0_linear_8548_48982",x1:-12.5,y1:7.031,x2:-12.5,y2:200,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),a().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),a().createElement("linearGradient",{id:"NoActivation_svg__paint1_linear_8548_48982",x1:207.904,y1:141.493,x2:121.002,y2:60.688,gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:.01}),a().createElement("stop",{offset:1})),a().createElement("linearGradient",{id:"NoActivation_svg__paint2_linear_8548_48982",x1:123.438,y1:112.109,x2:172.656,y2:161.328,gradientUnits:"userSpaceOnUse"},a().createElement("stop",null),a().createElement("stop",{offset:1,stopOpacity:0})),a().createElement("filter",{id:"NoActivation_svg__filter0_d_8548_48982",x:88.281,y:89.063,width:84.375,height:84.375,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feOffset",{dy:1.563}),a().createElement("feGaussianBlur",{stdDeviation:1.563}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_8548_48982"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_8548_48982",result:"shape"})),a().createElement("filter",{id:"NoActivation_svg__filter1_d_8548_48982",x:100.95,y:100.781,width:58.257,height:59.988,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a().createElement("feOffset",{dy:1.563}),a().createElement("feGaussianBlur",{stdDeviation:1.563}),a().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),a().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_8548_48982"}),a().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_8548_48982",result:"shape"}))))},Qh=({variant:e=Yh.full,LogoRenderer:t=Xh.SEARCH_RESULTS,text:n,secondaryText:r,buttonTitle:o,onClick:i=f.identity,access:l,children:s})=>{const u=Kh(),c=l&&o;return a().createElement("div",{className:p()(u.root,u[`root_${e}`])},a().createElement(t,{className:u[`${e}`]}),a().createElement("div",{className:u.textBox},a().createElement(gd(),{variant:"h5",classes:{h5:u.text}},n),r&&a().createElement(gd(),{variant:"subtitle1",classes:{subtitle1:u.secondaryText}},r)),s,c&&a().createElement(br(),{className:u.button,variant:"contained",color:"primary",onClick:i},o))};function Jh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){eg(e,t,n[t])}))}return e}function eg(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tg=lr((e=>({basicViewPaper:Jh({display:"flex",flexDirection:"column"},e.basicView)})));function ng(){return ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ng.apply(null,arguments)}const rg=(0,r.forwardRef)(((e,t)=>{let{children:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const i=tg();return a().createElement(Kp(),ng({ref:t,className:r,classes:{root:i.basicViewPaper}},o),n)}));rg.displayName="BasicView";const ag=a().createContext(void 0);function og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){ig(e,t,n[t])}))}return e}function ig(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ag.displayName="PageRequestsAbortingContext";let lg=1;const sg=e=>{var t,n;if(null==e||!e.entityId)return null;const r=(null===(t=e.children)||void 0===t?void 0:t.length)>0||e.hasMoreChildren;return og({id:lg++,entityId:e.entityId,label:e.label,entityType:e.entityType,pending:e.hasMoreChildren,hasManyParents:e.hasManyParents,selected:e.selected,connectionId:e.connectionId,isLoading:!1},r?{children:(null!==(n=e.children)&&void 0!==n?n:[]).map(sg).filter(Boolean)}:{})},ug=(e=[],t=[])=>(0,f.reduce)(((e,t)=>(0,f.any)((0,f.eqProps)("id",t),e)?e:(0,f.append)(t,e)),[...e],t),cg=(e,t)=>t&&0!==e.length?e.reduce(((e,n)=>{var r;const a=n.entityId===t?[[n]]:[],o=(null!==(r=n.children)&&void 0!==r?r:[]).reduce(((e,r)=>{const a=(0,s.getPathByCondition)((({entityId:e})=>e===t),r);return a.length>0&&e.push([n,...a]),e}),[]);return e.push(...a,...o),e}),[]):[],dg=(e,t,n)=>e.map((e=>(0,s.mapTree)(e,{nodeProcessing:e=>t(e)?n(e):e})));var pg=n(251),fg=n.n(pg),mg=n(4635),hg=n.n(mg),gg=n(6177),vg=n.n(gg),yg=n(480),bg=n.n(yg),xg=n(5340);Hd()(xg.Z,{insert:"head",singleton:!1});const wg=xg.Z.locals||{},Eg=(0,r.memo)((({children:e,onFileDrop:t,className:n})=>{const[o,i]=(0,r.useState)(!1),l=(0,r.useCallback)((e=>"Files"===e),[]),s=(0,r.useCallback)((e=>{e.preventDefault();const t=e.dataTransfer.types[0],n=l(t);e.dataTransfer.dropEffect=n?"copy":"none",i(n)}),[l]),u=(0,r.useCallback)((e=>{e.preventDefault();const t=e.dataTransfer.types[0];i(l(t))}),[l]),d=(0,r.useCallback)((e=>{e.preventDefault();const t=e.relatedTarget;(!t||e.currentTarget.contains(t))&&t||i(!1)}),[]),f=(0,r.useCallback)((e=>{var n,r;e.preventDefault(),i(!1);const a=e.dataTransfer.types[0];if(!l(a))return;const o=null!==(n=null===(r=e.dataTransfer.files)||void 0===r?void 0:r[0])&&void 0!==n?n:null;o&&t(o)}),[l,t]);return a().createElement("div",{className:p()(wg.root,n,{[wg.active]:o}),role:"button",tabIndex:0,"aria-label":c().text("Drop files here"),onDragOver:s,onDragEnter:u,onDragLeave:d,onDrop:f},e)}));Eg.displayName="FileDropZone";var Cg=n(4294),Sg=n.n(Cg),Og=n(4664);Hd()(Og.Z,{insert:"head",singleton:!1});const kg=Og.Z.locals||{},Ag=({error:e,onClose:t})=>a().createElement(wr(),{open:Boolean(e),onClose:t,message:e,action:a().createElement(up,{className:kg.closeIcon,tooltipTitle:c().text("Close"),icon:Sg(),onClick:t})});function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pg.apply(null,arguments)}const Tg=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",Pg({width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),a().createElement("circle",{cx:"80",cy:"80",r:"80",fill:"#A792CD",fillOpacity:".3"}),a().createElement("mask",{id:"svg1626345856a",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},a().createElement("circle",{cx:"80",cy:"80",r:"80",fill:"#fff"})),a().createElement("g",{mask:"url(#svg1626345856a)"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-1.875 67.908c0 20.45 16.498 37.022 36.886 37.022h79.91c17.001 0 30.75-13.816 30.75-30.83 0-16.298-12.609-29.637-28.57-30.76-4.259-21.165-22.87-37.09-45.203-37.09-17.773 0-33.198 10.106-40.91 24.874C12.51 33.132-1.876 48.852-1.876 67.908z",fill:"#C5F1FF"}),a().createElement("ellipse",{cx:"35.23",cy:"68.133",rx:"35.31",ry:"35.831",fill:"url(#paint0_linear_1770_144249)"}),a().createElement("ellipse",{cx:"71.686",cy:"52.317",rx:"40.354",ry:"40.949",fill:"url(#paint1_linear_1770_144249)"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51.014 76.25a2.5 2.5 0 012.5-2.5h103.361a2.5 2.5 0 012.5 2.5v64.375a2.5 2.5 0 01-2.5 2.5H53.514a2.5 2.5 0 01-2.5-2.5V76.25z",fill:"#fff",fillOpacity:".8"}),a().createElement("path",{opacity:".5",fillRule:"evenodd",clipRule:"evenodd",d:"M61.25 68.75a2.5 2.5 0 012.5-2.5h103.361a2.5 2.5 0 012.5 2.5v64.375a2.5 2.5 0 01-2.5 2.5H63.75a2.5 2.5 0 01-2.5-2.5V68.75z",fill:"#fff",fillOpacity:".8"}),a().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M127.659 87.033a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 87.033a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 110 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 87.033a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658zM110.435 87.033a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658zM127.659 97.658A2.658 2.658 0 01130.317 95h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 97.658A2.658 2.658 0 0161.992 95h21.492a2.658 2.658 0 110 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 97.658A2.658 2.658 0 0195.867 95h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658z",fill:"#979797"}),a().createElement("path",{opacity:".743",fillRule:"evenodd",clipRule:"evenodd",d:"M110.435 97.658A2.657 2.657 0 01113.092 95h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658z",fill:"#F9578C"}),a().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M127.659 108.283a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658z",fill:"#F9BF51"}),a().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M59.334 108.283a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 010 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 108.283a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658z",fill:"#979797"}),a().createElement("path",{opacity:".743",fillRule:"evenodd",clipRule:"evenodd",d:"M110.435 108.283a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658z",fill:"#80B8E4"}),a().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M127.659 118.908a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 118.908a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 010 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 118.908a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658zM110.435 118.908a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658zM127.659 129.533a2.658 2.658 0 012.658-2.658h17.227a2.658 2.658 0 110 5.316h-17.227a2.658 2.658 0 01-2.658-2.658zM59.334 129.533a2.658 2.658 0 012.658-2.658h21.492a2.658 2.658 0 010 5.316H61.992a2.658 2.658 0 01-2.658-2.658zM93.209 129.533a2.658 2.658 0 012.658-2.658h6.26a2.658 2.658 0 110 5.316h-6.26a2.658 2.658 0 01-2.658-2.658z",fill:"#979797"}),a().createElement("path",{opacity:".743",fillRule:"evenodd",clipRule:"evenodd",d:"M110.435 129.533a2.657 2.657 0 012.657-2.658h6.261a2.658 2.658 0 110 5.316h-6.261a2.657 2.657 0 01-2.657-2.658z",fill:"#F9BF51"}),a().createElement("path",{opacity:".1",fillRule:"evenodd",clipRule:"evenodd",d:"M45.188 73.873l22.115 22.115-6.147 11.044 41.907 41.907 36.642-33.517v-3.56l-40.981-40.98H53.905l-8.718 2.99z",fill:"url(#paint2_linear_1770_144249)"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M84.975 74.162v33.264H61.292V74.162H44.374l28.708-28.537 28.709 28.537H84.975z",fill:"url(#paint3_linear_1770_144249)"})),a().createElement("defs",null,a().createElement("linearGradient",{id:"paint0_linear_1770_144249",x1:"-.08",y1:"32.302",x2:"-.08",y2:"103.963",gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#fff"}),a().createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".01"})),a().createElement("linearGradient",{id:"paint1_linear_1770_144249",x1:"31.332",y1:"11.368",x2:"31.332",y2:"93.267",gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#fff"}),a().createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".01"})),a().createElement("linearGradient",{id:"paint2_linear_1770_144249",x1:"149.291",y1:"117.618",x2:"108.037",y2:"68.037",gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopOpacity:".01"}),a().createElement("stop",{offset:"1"})),a().createElement("linearGradient",{id:"paint3_linear_1770_144249",x1:"44.375",y1:"45.625",x2:"44.375",y2:"107.426",gradientUnits:"userSpaceOnUse"},a().createElement("stop",{stopColor:"#45C0EB"}),a().createElement("stop",{offset:"1",stopColor:"#2193D3"}))))},Dg="hierarchy-import-template.csv",Mg=[".csv",".json"],_g=e=>{const{visibleNames:t,remainingCount:n}=(e=>{const t=e.slice(0,3),n=Math.max(e.length-3,0);return{visibleNames:t.map((e=>`"${e}"`)).join(", "),remainingCount:n}})(e);return n>0?`${t} +${n}`:t};var Ig=n(1631);Hd()(Ig.Z,{insert:"head",singleton:!1});const Ng=Ig.Z.locals||{},Rg=({isOpen:e,onClose:t,onSuccess:n,onLoadingChange:o,templateUrl:i})=>{const[l,u]=(0,r.useState)(null),d=(0,r.useRef)(null),{selectedFile:f,isUploading:m,setFile:h,downloadTemplate:g,uploadHierarchyFile:v}=(({isOpen:e,onClose:t,onSuccess:n,onLoadingChange:a,templateUrl:o})=>{const[i,l]=(0,r.useState)(null),[u,d]=(0,r.useState)(!1),[p,f]=(0,r.useState)(void 0),m=(0,r.useContext)(vr);(0,r.useEffect)((()=>{e||(l(null),f(void 0))}),[e]),(0,r.useEffect)((()=>{if(!e)return;const t=null==o?void 0:o.trim();f({url:t||"https://reltio-ui-files.s3.amazonaws.com/hierarchy/hierarchy-import.csv",fileName:Dg})}),[o,e]),(0,r.useEffect)((()=>{a(u)}),[u,a]);const h=(0,r.useCallback)((e=>{l(e)}),[]),g=(0,r.useCallback)((()=>{var e;if(!p)return;const t=document.createElement("a");t.href=p.url,t.download=null!==(e=p.fileName)&&void 0!==e?e:Dg,document.body.appendChild(t),t.click(),document.body.removeChild(t)}),[p]),v=(0,r.useCallback)((async()=>{if(i&&!u){d(!0);try{var e,r;const a=await(0,s.importHierarchy)({file:i}),o=Object.keys(null!==(e=a.createdInstances)&&void 0!==e?e:{}),l=null!==(r=a.failedHierarchies)&&void 0!==r?r:[],{successMessage:u,errorMessage:d}=((e,t)=>{const n=e.length>0,r=t.length>0;let a,o;if(n){const t=_g(e);a=c().text("The hierarchy ${names} has been successfully imported!",{names:t})}if(r){const e=_g(t);o=c().text("The import of ${names} has encountered an error. Please try again.",{names:e})}return{successMessage:a,errorMessage:o}})(o,l);u&&m(u),d&&pr(d,{message:d}),await n(a),t()}catch(e){pr(e,{defaultMessage:c().text("Failed to upload file")})}finally{d(!1)}}}),[u,t,i,m,n]);return{selectedFile:i,isUploading:u,setFile:h,downloadTemplate:g,uploadHierarchyFile:v}})({isOpen:e,onClose:t,onSuccess:n,templateUrl:i,onLoadingChange:o}),y=(0,r.useCallback)((()=>{d.current&&(d.current.value="",d.current.click())}),[d]),b=(0,r.useCallback)((e=>{if(!(e=>{if(!e)return!1;const t=e.name.toLowerCase();return Mg.some((e=>t.endsWith(e)))})(e))return u(c().text("File format is not supported.")),void h(null);u(null),h(e)}),[h]),x=(0,r.useCallback)((e=>{var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];n&&b(n)}),[b]);return a().createElement(fg(),{open:e,onClose:t,fullWidth:!0,classes:{paper:Ng.dialog}},a().createElement(hg(),{classes:{root:Ng.dialogTitle}},c().text("Import hierarchy")),a().createElement(bg(),{classes:{root:Ng.dialogContent}},a().createElement("div",{className:Ng.templateSection},a().createElement("div",{className:Ng.templateInfo},a().createElement(gd(),{variant:"subtitle2"},c().text("Download template")),a().createElement(gd(),{className:Ng.templateDescription},c().text("Download the template, enter your hierarchy data, and upload the completed file."))),a().createElement(br(),{variant:"outlined",color:"primary",onClick:g},c().text("Download template"))),a().createElement(gd(),{variant:"subtitle2"},c().text("Select file")),a().createElement(Eg,{className:Ng.dropZone,onFileDrop:b},a().createElement("div",{className:p()(Ng.root,Ng.root_embedded)},a().createElement(Tg,{className:Ng.embedded}),a().createElement("div",{className:Ng.textBox},a().createElement(gd(),{variant:"h5",classes:{h5:Ng.text}},c().text("Drop files here"))))),a().createElement("div",{className:Ng.orDivider},a().createElement("span",{className:Ng.dividerLine}),a().createElement(gd(),{className:Ng.orText},c().text("OR")),a().createElement("span",{className:Ng.dividerLine})),a().createElement("div",{className:Ng.fileRow},a().createElement(gd(),{className:p()(Ng.fileName,f&&Ng.fileNameSelected)},f?f.name:c().text("No file selected")),a().createElement(br(),{variant:"outlined",color:"primary",onClick:y},c().text("Browse"))),a().createElement("input",{ref:d,type:"file",accept:".csv,.json","aria-label":c().text("Select hierarchy file"),className:Ng.fileInput,onChange:x})),m&&a().createElement(Hh,null),a().createElement(vg(),{classes:{root:Ng.dialogActions}},a().createElement(br(),{onClick:t,disabled:m},c().text("Cancel")),a().createElement(br(),{onClick:v,color:"primary",disabled:!f||m},c().text("Import hierarchy"))),a().createElement(Ag,{error:l,onClose:()=>u(null)}))};var Lg=n(6038),jg=n.n(Lg);const Fg=lr({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",minWidth:"20px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vg.apply(null,arguments)}const Bg=e=>{let{title:t="",children:n=null,classes:r={}}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["title","children","classes"]);const i=Fg();return a().createElement(jg(),Vg({className:r.root,classes:{root:i.toolbar}},o),t&&a().createElement(gd(),{className:r.title,classes:{root:i.title},variant:"h6"},c().text(t)),n)};var Hg=n(8282),zg=n.n(Hg);const Ug=lr((e=>({expanded:{transform:"rotate(180deg)"},disabled:{color:`${e.palette.text.disabled} !important`}})));function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zg.apply(null,arguments)}const Wg=e=>{const{selectProps:{classes:t,menuIsOpen:n,isDisabled:r},innerProps:o}=e,i=Ug();return a().createElement(zg(),Zg({"data-reltio-id":"select-dropdown-indicator"},o,{className:p()(t.dropdownIndicator,{[i.expanded]:n},{[i.disabled]:r})}))};Wg.propTypes={innerProps:yt().object.isRequired,selectProps:yt().shape({classes:yt().shape({dropdownIndicator:yt().string}).isRequired,menuIsOpen:yt().bool.isRequired,isDisabled:yt().bool}).isRequired};var qg=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),$g=Math.abs,Kg=String.fromCharCode,Gg=Object.assign;function Yg(e){return e.trim()}function Xg(e,t,n){return e.replace(t,n)}function Qg(e,t){return e.indexOf(t)}function Jg(e,t){return 0|e.charCodeAt(t)}function ev(e,t,n){return e.slice(t,n)}function tv(e){return e.length}function nv(e){return e.length}function rv(e,t){return t.push(e),e}var av=1,ov=1,iv=0,lv=0,sv=0,uv="";function cv(e,t,n,r,a,o,i){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:av,column:ov,length:i,return:""}}function dv(e,t){return Gg(cv("",null,null,"",null,null,0),e,{length:-e.length},t)}function pv(){return sv=lv>0?Jg(uv,--lv):0,ov--,10===sv&&(ov=1,av--),sv}function fv(){return sv=lv<iv?Jg(uv,lv++):0,ov++,10===sv&&(ov=1,av++),sv}function mv(){return Jg(uv,lv)}function hv(){return lv}function gv(e,t){return ev(uv,e,t)}function vv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yv(e){return av=ov=1,iv=tv(uv=e),lv=0,[]}function bv(e){return uv="",e}function xv(e){return Yg(gv(lv-1,Cv(91===e?e+2:40===e?e+1:e)))}function wv(e){for(;(sv=mv())&&sv<33;)fv();return vv(e)>2||vv(sv)>3?"":" "}function Ev(e,t){for(;--t&&fv()&&!(sv<48||sv>102||sv>57&&sv<65||sv>70&&sv<97););return gv(e,hv()+(t<6&&32==mv()&&32==fv()))}function Cv(e){for(;fv();)switch(sv){case e:return lv;case 34:case 39:34!==e&&39!==e&&Cv(sv);break;case 40:41===e&&Cv(e);break;case 92:fv()}return lv}function Sv(e,t){for(;fv()&&e+sv!==57&&(e+sv!==84||47!==mv()););return"/*"+gv(t,lv-1)+"*"+Kg(47===e?e:fv())}function Ov(e){for(;!vv(mv());)fv();return gv(e,lv)}var kv="-ms-",Av="-moz-",Pv="-webkit-",Tv="comm",Dv="rule",Mv="decl",_v="@keyframes";function Iv(e,t){for(var n="",r=nv(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function Nv(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Mv:return e.return=e.return||e.value;case Tv:return"";case _v:return e.return=e.value+"{"+Iv(e.children,r)+"}";case Dv:e.value=e.props.join(",")}return tv(n=Iv(e.children,r))?e.return=e.value+"{"+n+"}":""}function Rv(e){return bv(Lv("",null,null,null,[""],e=yv(e),0,[0],e))}function Lv(e,t,n,r,a,o,i,l,s){for(var u=0,c=0,d=i,p=0,f=0,m=0,h=1,g=1,v=1,y=0,b="",x=a,w=o,E=r,C=b;g;)switch(m=y,y=fv()){case 40:if(108!=m&&58==Jg(C,d-1)){-1!=Qg(C+=Xg(xv(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=xv(y);break;case 9:case 10:case 13:case 32:C+=wv(m);break;case 92:C+=Ev(hv()-1,7);continue;case 47:switch(mv()){case 42:case 47:rv(Fv(Sv(fv(),hv()),t,n),s);break;default:C+="/"}break;case 123*h:l[u++]=tv(C)*v;case 125*h:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Xg(C,/\f/g,"")),f>0&&tv(C)-d&&rv(f>32?Vv(C+";",r,n,d-1):Vv(Xg(C," ","")+";",r,n,d-2),s);break;case 59:C+=";";default:if(rv(E=jv(C,t,n,u,c,a,l,b,x=[],w=[],d),o),123===y)if(0===c)Lv(C,t,E,E,x,o,d,l,w);else switch(99===p&&110===Jg(C,3)?100:p){case 100:case 108:case 109:case 115:Lv(e,E,E,r&&rv(jv(e,E,E,0,0,a,l,b,a,x=[],d),w),a,w,d,l,r?x:w);break;default:Lv(C,E,E,E,[""],w,0,l,w)}}u=c=f=0,h=v=1,b=C="",d=i;break;case 58:d=1+tv(C),f=m;default:if(h<1)if(123==y)--h;else if(125==y&&0==h++&&125==pv())continue;switch(C+=Kg(y),y*h){case 38:v=c>0?1:(C+="\f",-1);break;case 44:l[u++]=(tv(C)-1)*v,v=1;break;case 64:45===mv()&&(C+=xv(fv())),p=mv(),c=d=tv(b=C+=Ov(hv())),y++;break;case 45:45===m&&2==tv(C)&&(h=0)}}return o}function jv(e,t,n,r,a,o,i,l,s,u,c){for(var d=a-1,p=0===a?o:[""],f=nv(p),m=0,h=0,g=0;m<r;++m)for(var v=0,y=ev(e,d+1,d=$g(h=i[m])),b=e;v<f;++v)(b=Yg(h>0?p[v]+" "+y:Xg(y,/&\f/g,p[v])))&&(s[g++]=b);return cv(e,t,n,0===a?Dv:l,s,u,c)}function Fv(e,t,n){return cv(e,t,n,Tv,Kg(sv),ev(e,2,-2),0)}function Vv(e,t,n,r){return cv(e,t,n,Mv,ev(e,0,r),ev(e,r+1,-1),r)}var Bv=function(e,t,n){for(var r=0,a=0;r=a,a=mv(),38===r&&12===a&&(t[n]=1),!vv(a);)fv();return gv(e,lv)},Hv=new WeakMap,zv=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Hv.get(n))&&!r){Hv.set(e,!0);for(var a=[],o=function(e,t){return bv(function(e,t){var n=-1,r=44;do{switch(vv(r)){case 0:38===r&&12===mv()&&(t[n]=1),e[n]+=Bv(lv-1,t,n);break;case 2:e[n]+=xv(r);break;case 4:if(44===r){e[++n]=58===mv()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Kg(r)}}while(r=fv());return e}(yv(e),t))}(t,a),i=n.props,l=0,s=0;l<o.length;l++)for(var u=0;u<i.length;u++,s++)e.props[s]=a[l]?o[l].replace(/&\f/g,i[u]):i[u]+" "+o[l]}}},Uv=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Zv(e,t){switch(function(e,t){return 45^Jg(e,0)?(((t<<2^Jg(e,0))<<2^Jg(e,1))<<2^Jg(e,2))<<2^Jg(e,3):0}(e,t)){case 5103:return Pv+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Pv+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Pv+e+Av+e+kv+e+e;case 6828:case 4268:return Pv+e+kv+e+e;case 6165:return Pv+e+kv+"flex-"+e+e;case 5187:return Pv+e+Xg(e,/(\w+).+(:[^]+)/,Pv+"box-$1$2"+kv+"flex-$1$2")+e;case 5443:return Pv+e+kv+"flex-item-"+Xg(e,/flex-|-self/,"")+e;case 4675:return Pv+e+kv+"flex-line-pack"+Xg(e,/align-content|flex-|-self/,"")+e;case 5548:return Pv+e+kv+Xg(e,"shrink","negative")+e;case 5292:return Pv+e+kv+Xg(e,"basis","preferred-size")+e;case 6060:return Pv+"box-"+Xg(e,"-grow","")+Pv+e+kv+Xg(e,"grow","positive")+e;case 4554:return Pv+Xg(e,/([^-])(transform)/g,"$1"+Pv+"$2")+e;case 6187:return Xg(Xg(Xg(e,/(zoom-|grab)/,Pv+"$1"),/(image-set)/,Pv+"$1"),e,"")+e;case 5495:case 3959:return Xg(e,/(image-set\([^]*)/,Pv+"$1$`$1");case 4968:return Xg(Xg(e,/(.+:)(flex-)?(.*)/,Pv+"box-pack:$3"+kv+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Pv+e+e;case 4095:case 3583:case 4068:case 2532:return Xg(e,/(.+)-inline(.+)/,Pv+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(tv(e)-1-t>6)switch(Jg(e,t+1)){case 109:if(45!==Jg(e,t+4))break;case 102:return Xg(e,/(.+:)(.+)-([^]+)/,"$1"+Pv+"$2-$3$1"+Av+(108==Jg(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Qg(e,"stretch")?Zv(Xg(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Jg(e,t+1))break;case 6444:switch(Jg(e,tv(e)-3-(~Qg(e,"!important")&&10))){case 107:return Xg(e,":",":"+Pv)+e;case 101:return Xg(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Pv+(45===Jg(e,14)?"inline-":"")+"box$3$1"+Pv+"$2$3$1"+kv+"$2box$3")+e}break;case 5936:switch(Jg(e,t+11)){case 114:return Pv+e+kv+Xg(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Pv+e+kv+Xg(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Pv+e+kv+Xg(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Pv+e+kv+e+e}return e}var Wv=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Mv:e.return=Zv(e.value,e.length);break;case _v:return Iv([dv(e,{value:Xg(e.value,"@","@"+Pv)})],r);case Dv:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Iv([dv(e,{props:[Xg(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Iv([dv(e,{props:[Xg(t,/:(plac\w+)/,":"+Pv+"input-$1")]}),dv(e,{props:[Xg(t,/:(plac\w+)/,":-moz-$1")]}),dv(e,{props:[Xg(t,/:(plac\w+)/,kv+"input-$1")]})],r)}return""}))}}],qv=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,a,o=e.stylisPlugins||Wv,i={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;l.push(e)}));var s,u,c,d,p=[Nv,(d=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(u=[zv,Uv].concat(o,p),c=nv(u),function(e,t,n,r){for(var a="",o=0;o<c;o++)a+=u[o](e,t,n,r)||"";return a});a=function(e,t,n,r){s=n,Iv(Rv(e?e+"{"+t.styles+"}":t.styles),f),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new qg({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:a};return m.sheet.hydrate(l),m},$v=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Kv={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Gv(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Yv=/[A-Z]|^ms/g,Xv=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qv=function(e){return 45===e.charCodeAt(1)},Jv=function(e){return null!=e&&"boolean"!=typeof e},ey=Gv((function(e){return Qv(e)?e:e.replace(Yv,"-$&").toLowerCase()})),ty=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Xv,(function(e,t,n){return ry={name:t,styles:n,next:ry},t}))}return 1===Kv[e]||Qv(e)||"number"!=typeof t||0===t?t:t+"px"};function ny(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ry={name:n.name,styles:n.styles,next:ry},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ry={name:r.name,styles:r.styles,next:ry},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=ny(e,t,n[a])+";";else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=o+"{"+t[i]+"}":Jv(i)&&(r+=ey(o)+":"+ty(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=ny(e,t,i);switch(o){case"animation":case"animationName":r+=ey(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var s=0;s<i.length;s++)Jv(i[s])&&(r+=ey(o)+":"+ty(o,i[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=ry,o=n(e);return ry=a,ny(e,t,o)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var ry,ay=/label:\s*([^\s;\n{]+)\s*(;|$)/g,oy=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";ry=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=ny(n,t,o)):a+=o[0];for(var i=1;i<e.length;i++)a+=ny(n,t,e[i]),r&&(a+=o[i]);ay.lastIndex=0;for(var l,s="";null!==(l=ay.exec(a));)s+="-"+l[1];var u=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(a)+s;return{name:u,styles:a,next:ry}},iy=!!r.useInsertionEffect&&r.useInsertionEffect,ly=iy||function(e){return e()},sy=(iy||r.useLayoutEffect,{}.hasOwnProperty),uy=r.createContext("undefined"!=typeof HTMLElement?qv({key:"css"}):null);uy.Provider;var cy=function(e){return(0,r.forwardRef)((function(t,n){var a=(0,r.useContext)(uy);return e(t,a,n)}))},dy=r.createContext({}),py="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fy=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return $v(t,n,r),ly((function(){return function(e,t,n){$v(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}(t,n,r)})),null},my=cy((function(e,t,n){var a=e.css;"string"==typeof a&&void 0!==t.registered[a]&&(a=t.registered[a]);var o=e[py],i=[a],l="";"string"==typeof e.className?l=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,i,e.className):null!=e.className&&(l=e.className+" ");var s=oy(i,void 0,r.useContext(dy));l+=t.key+"-"+s.name;var u={};for(var c in e)sy.call(e,c)&&"css"!==c&&c!==py&&(u[c]=e[c]);return u.ref=n,u.className=l,r.createElement(r.Fragment,null,r.createElement(fy,{cache:t,serialized:s,isStringTag:"string"==typeof o}),r.createElement(o,u))})),hy=my,gy=(n(3463),function(e,t){var n=arguments;if(null==t||!sy.call(t,"css"))return r.createElement.apply(void 0,n);var a=n.length,o=new Array(a);o[0]=hy,o[1]=function(e,t){var n={};for(var r in t)sy.call(t,r)&&(n[r]=t[r]);return n[py]=e,n}(e,t);for(var i=2;i<a;i++)o[i]=n[i];return r.createElement.apply(null,o)});function vy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return oy(t)}const yy=Math.min,by=Math.max,xy=Math.round,wy=Math.floor,Ey=e=>({x:e,y:e});function Cy(e){return ky(e)?(e.nodeName||"").toLowerCase():"#document"}function Sy(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Oy(e){var t;return null==(t=(ky(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ky(e){return e instanceof Node||e instanceof Sy(e).Node}function Ay(e){return e instanceof Element||e instanceof Sy(e).Element}function Py(e){return e instanceof HTMLElement||e instanceof Sy(e).HTMLElement}function Ty(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Sy(e).ShadowRoot)}function Dy(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=My(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function My(e){return Sy(e).getComputedStyle(e)}function _y(e){const t=function(e){if("html"===Cy(e))return e;const t=e.assignedSlot||e.parentNode||Ty(e)&&e.host||Oy(e);return Ty(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(Cy(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:Py(t)&&Dy(t)?t:_y(t)}function Iy(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=_y(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=Sy(a);if(o){const e=Ny(i);return t.concat(i,i.visualViewport||[],Dy(a)?a:[],e&&n?Iy(e):[])}return t.concat(a,Iy(a,[],n))}function Ny(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ry(e){return Ay(e)?e:e.contextElement}function Ly(e){const t=Ry(e);if(!Py(t))return Ey(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=function(e){const t=My(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Py(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=xy(n)!==o||xy(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}(t);let i=(o?xy(n.width):n.width)/r,l=(o?xy(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const jy=Ey(0);function Fy(e){const t=Sy(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:jy}function Vy(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=Ry(e);let i=Ey(1);t&&(r?Ay(r)&&(i=Ly(r)):i=Ly(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Sy(e))&&t}(o,n,r)?Fy(o):Ey(0);let s=(a.left+l.x)/i.x,u=(a.top+l.y)/i.y,c=a.width/i.x,d=a.height/i.y;if(o){const e=Sy(o),t=r&&Ay(r)?Sy(r):r;let n=e,a=Ny(n);for(;a&&r&&t!==n;){const e=Ly(a),t=a.getBoundingClientRect(),r=My(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,d*=e.y,s+=o,u+=i,n=Sy(a),a=Ny(n)}}return function(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}({width:c,height:d,x:s,y:u})}const By=r.useLayoutEffect;var Hy=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],zy=function(){};function Uy(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Zy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&o.push("".concat(Uy(e,i)));return o.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Wy=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===Y(e)&&null!==e?[e]:[];var t},qy=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,bl({},Ul(e,Hy))},$y=function(e,t,n){var r=e.cx,a=e.getStyles,o=e.getClassNames,i=e.className;return{css:a(t,e),className:r(null!=n?n:{},o(t,e),i)}};function Ky(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Gy(e){return Ky(e)?window.pageYOffset:e.scrollTop}function Yy(e,t){Ky(e)?window.scrollTo(0,t):e.scrollTop=t}function Xy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:zy,a=Gy(e),o=t-a,i=0;!function t(){var l=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(i+=10,a,o,n);Yy(e,l),i<n?window.requestAnimationFrame(t):r(e)}()}function Qy(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=t.offsetHeight/3;r.bottom+a>n.bottom?Yy(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+a,e.scrollHeight)):r.top-a<n.top&&Yy(e,Math.max(t.offsetTop-a,0))}function Jy(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var eb=!1,tb={get passive(){return eb=!0}},nb="undefined"!=typeof window?window:{};nb.addEventListener&&nb.removeEventListener&&(nb.addEventListener("p",zy,tb),nb.removeEventListener("p",zy,!1));var rb=eb;function ab(e){return null!=e}function ob(e,t,n){return e?t:n}var ib=["children","innerProps"],lb=["children","innerProps"];var sb,ub=function(e){return"auto"===e?"bottom":e},cb=(0,r.createContext)(null),db=function(e){var t=e.children,n=e.minMenuHeight,a=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,s=e.theme,u=((0,r.useContext)(cb)||{}).setPortalPlacement,c=(0,r.useRef)(null),d=zl((0,r.useState)(a),2),p=d[0],f=d[1],m=zl((0,r.useState)(null),2),h=m[0],g=m[1],v=s.spacing.controlHeight;return By((function(){var e=c.current;if(e){var t="fixed"===i,r=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,a=e.placement,o=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return a;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=s.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,f=d.height,m=d.top,h=n.offsetParent.getBoundingClientRect().top,g=i?window.innerHeight:function(e){return Ky(e)?window.innerHeight:e.clientHeight}(s),v=Gy(s),y=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),x=h-b,w=g-m,E=x+v,C=c-v-m,S=p-g+v+y,O=v+m-b,k=160;switch(a){case"auto":case"bottom":if(w>=f)return{placement:"bottom",maxHeight:t};if(C>=f&&!i)return o&&Xy(s,S,k),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&w>=r)return o&&Xy(s,S,k),{placement:"bottom",maxHeight:i?w-y:C-y};if("auto"===a||i){var A=t,P=i?x:E;return P>=r&&(A=Math.min(P-y-l,t)),{placement:"top",maxHeight:A}}if("bottom"===a)return o&&Yy(s,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=f)return{placement:"top",maxHeight:t};if(E>=f&&!i)return o&&Xy(s,O,k),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&x>=r){var T=t;return(!i&&E>=r||i&&x>=r)&&(T=i?x-b:E-b),o&&Xy(s,O,k),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return u}({maxHeight:a,menuEl:e,minHeight:n,placement:o,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:v});f(r.maxHeight),g(r.placement),null==u||u(r.placement)}}),[a,o,i,l,n,u,v]),t({ref:c,placerProps:bl(bl({},e),{},{placement:h||ub(o),maxHeight:p})})},pb=function(e,t){var n=e.theme,r=n.spacing.baseUnit,a=n.colors;return bl({textAlign:"center"},t?{}:{color:a.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},fb=pb,mb=pb,hb=["size"],gb=["innerProps","isRtl","size"],vb={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},yb=function(e){var t=e.size,n=Ul(e,hb);return gy("svg",(0,$.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:vb},n))},bb=function(e){return gy(yb,(0,$.Z)({size:20},e),gy("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},xb=function(e){return gy(yb,(0,$.Z)({size:20},e),gy("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},wb=function(e,t){var n=e.isFocused,r=e.theme,a=r.spacing.baseUnit,o=r.colors;return bl({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*a,":hover":{color:n?o.neutral80:o.neutral40}})},Eb=wb,Cb=wb,Sb=function(){var e=vy.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(sb||(sb=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),Ob=function(e){var t=e.delay,n=e.offset;return gy("span",{css:vy({animation:"".concat(Sb," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},kb=["data"],Ab=["innerRef","isDisabled","isHidden","inputClassName"],Pb={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Tb={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":bl({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Pb)},Db=function(e){return bl({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Pb)},Mb=function(e){var t=e.children,n=e.innerProps;return gy("div",n,t)},_b={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||gy(bb,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,a=e.innerRef,o=e.innerProps,i=e.menuIsOpen;return gy("div",(0,$.Z)({ref:a},$y(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),o,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||gy(xb,null))},DownChevron:xb,CrossIcon:bb,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,a=e.getClassNames,o=e.Heading,i=e.headingProps,l=e.innerProps,s=e.label,u=e.theme,c=e.selectProps;return gy("div",(0,$.Z)({},$y(e,"group",{group:!0}),l),gy(o,(0,$.Z)({},i,{selectProps:c,theme:u,getStyles:r,getClassNames:a,cx:n}),s),gy("div",null,t))},GroupHeading:function(e){var t=qy(e);t.data;var n=Ul(t,kb);return gy("div",(0,$.Z)({},$y(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return gy("span",(0,$.Z)({},t,$y(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=qy(e),a=r.innerRef,o=r.isDisabled,i=r.isHidden,l=r.inputClassName,s=Ul(r,Ab);return gy("div",(0,$.Z)({},$y(e,"input",{"input-container":!0}),{"data-value":n||""}),gy("input",(0,$.Z)({className:t({input:!0},l),ref:a,style:Db(i),disabled:o},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,a=void 0===r?4:r,o=Ul(e,gb);return gy("div",(0,$.Z)({},$y(bl(bl({},o),{},{innerProps:t,isRtl:n,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),gy(Ob,{delay:0,offset:n}),gy(Ob,{delay:160,offset:!0}),gy(Ob,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,a=e.isMulti;return gy("div",(0,$.Z)({},$y(e,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,a=e.controlElement,o=e.innerProps,i=e.menuPlacement,l=e.menuPosition,s=(0,r.useRef)(null),u=(0,r.useRef)(null),c=zl((0,r.useState)(ub(i)),2),d=c[0],p=c[1],f=(0,r.useMemo)((function(){return{setPortalPlacement:p}}),[]),m=zl((0,r.useState)(null),2),h=m[0],g=m[1],v=(0,r.useCallback)((function(){if(a){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(a),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null==h?void 0:h.offset)&&e.left===(null==h?void 0:h.rect.left)&&e.width===(null==h?void 0:h.rect.width)||g({offset:n,rect:e})}}),[a,l,d,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);By((function(){v()}),[v]);var y=(0,r.useCallback)((function(){"function"==typeof u.current&&(u.current(),u.current=null),a&&s.current&&(u.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=Ry(e),c=a||o?[...u?Iy(u):[],...Iy(t)]:[];c.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=u&&l?function(e,t){let n,r=null;const a=Oy(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();const{left:u,top:c,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const f={rootMargin:-wy(c)+"px "+-wy(a.clientWidth-(u+d))+"px "+-wy(a.clientHeight-(c+p))+"px "+-wy(u)+"px",threshold:by(0,yy(1,s))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==s){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}m=!1}try{r=new IntersectionObserver(h,{...f,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(h,f)}r.observe(e)}(!0),o}(u,n):null;let p,f=-1,m=null;i&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),u&&!s&&m.observe(u),m.observe(t));let h=s?Vy(e):null;return s&&function t(){const r=Vy(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n(),h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(p)}}(a,s.current,v,{elementResize:"ResizeObserver"in window}))}),[a,v]);By((function(){y()}),[y]);var b=(0,r.useCallback)((function(e){s.current=e,y()}),[y]);if(!t&&"fixed"!==l||!h)return null;var x=gy("div",(0,$.Z)({ref:b},$y(bl(bl({},e),{},{offset:h.offset,position:l,rect:h.rect}),"menuPortal",{"menu-portal":!0}),o),n);return gy(cb.Provider,{value:f},t?(0,Ql.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,a=Ul(e,lb);return gy("div",(0,$.Z)({},$y(bl(bl({},a),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,a=Ul(e,ib);return gy("div",(0,$.Z)({},$y(bl(bl({},a),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,a=e.innerProps,o=e.isDisabled,i=e.removeProps,l=e.selectProps,s=n.Container,u=n.Label,c=n.Remove;return gy(s,{data:r,innerProps:bl(bl({},$y(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),a),selectProps:l},gy(u,{data:r,innerProps:bl({},$y(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),gy(c,{data:r,innerProps:bl(bl({},$y(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:l}))},MultiValueContainer:Mb,MultiValueLabel:Mb,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return gy("div",(0,$.Z)({role:"button"},n),t||gy(bb,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,a=e.isSelected,o=e.innerRef,i=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":a}),{ref:o,"aria-disabled":n},i),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,a=e.isRtl;return gy("div",(0,$.Z)({},$y(e,"container",{"--is-disabled":r,"--is-rtl":a}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return gy("div",(0,$.Z)({},$y(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,a=e.hasValue;return gy("div",(0,$.Z)({},$y(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":a}),n),t)}},Ib=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Nb(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(a=t[n])||Ib(r)&&Ib(a)))return!1;var r,a;return!0}for(var Rb={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Lb=function(e){return gy("span",(0,$.Z)({css:Rb},e))},jb={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,a=e.context,o=e.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,a=e.labels,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,a=e.label,o=void 0===a?"":a,i=e.selectValue,l=e.isDisabled,s=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(o," focused, ").concat(c(i,n),".");if("menu"===t&&u){var d=l?" disabled":"",p="".concat(s?" selected":"").concat(d);return"".concat(o).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Fb=function(e){var t=e.ariaSelection,n=e.focusedOption,a=e.focusedValue,o=e.focusableOptions,i=e.isFocused,l=e.selectValue,s=e.selectProps,u=e.id,c=e.isAppleDevice,d=s.ariaLiveMessages,p=s.getOptionLabel,f=s.inputValue,m=s.isMulti,h=s.isOptionDisabled,g=s.isSearchable,v=s.menuIsOpen,y=s.options,b=s.screenReaderStatus,x=s.tabSelectsValue,w=s.isLoading,E=s["aria-label"],C=s["aria-live"],S=(0,r.useMemo)((function(){return bl(bl({},jb),d||{})}),[d]),O=(0,r.useMemo)((function(){var e,n="";if(t&&S.onChange){var r=t.option,a=t.options,o=t.removedValue,i=t.removedValues,s=t.value,u=o||r||(e=s,Array.isArray(e)?null:e),c=u?p(u):"",d=a||i||void 0,f=d?d.map(p):[],m=bl({isDisabled:u&&h(u,l),label:c,labels:f},t);n=S.onChange(m)}return n}),[t,S,h,l,p]),k=(0,r.useMemo)((function(){var e="",t=n||a,r=!!(n&&l&&l.includes(n));if(t&&S.onFocus){var i={focused:t,label:p(t),isDisabled:h(t,l),isSelected:r,options:o,context:t===n?"menu":"value",selectValue:l,isAppleDevice:c};e=S.onFocus(i)}return e}),[n,a,p,h,S,o,l,c]),A=(0,r.useMemo)((function(){var e="";if(v&&y.length&&!w&&S.onFilter){var t=b({count:o.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e}),[o,f,v,S,y,b,w]),P="initial-input-focus"===(null==t?void 0:t.action),T=(0,r.useMemo)((function(){var e="";if(S.guidance){var t=a?"value":v?"menu":"input";e=S.guidance({"aria-label":E,context:t,isDisabled:n&&h(n,l),isMulti:m,isSearchable:g,tabSelectsValue:x,isInitialFocus:P})}return e}),[E,n,a,m,h,g,v,S,l,x,P]),D=gy(r.Fragment,null,gy("span",{id:"aria-selection"},O),gy("span",{id:"aria-focused"},k),gy("span",{id:"aria-results"},A),gy("span",{id:"aria-guidance"},T));return gy(r.Fragment,null,gy(Lb,{id:u},P&&D),gy(Lb,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!P&&D))},Vb=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Bb=new RegExp("["+Vb.map((function(e){return e.letters})).join("")+"]","g"),Hb={},zb=0;zb<Vb.length;zb++)for(var Ub=Vb[zb],Zb=0;Zb<Ub.letters.length;Zb++)Hb[Ub.letters[Zb]]=Ub.base;var Wb=function(e){return e.replace(Bb,(function(e){return Hb[e]}))},qb=function(e,t){void 0===t&&(t=Nb);var n=null;function r(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}(Wb),$b=function(e){return e.replace(/^\s+|\s+$/g,"")},Kb=function(e){return"".concat(e.label," ").concat(e.value)},Gb=["innerRef"];function Yb(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=Object.entries(e).filter((function(e){var t=zl(e,1)[0];return!n.includes(t)}));return a.reduce((function(e,t){var n=zl(t,2),r=n[0],a=n[1];return e[r]=a,e}),{})}(Ul(e,Gb),"onExited","in","enter","exit","appear");return gy("input",(0,$.Z)({ref:t},n,{css:vy({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Xb=["boxSizing","height","overflow","paddingRight","position"],Qb={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jb(e){e.preventDefault()}function ex(e){e.stopPropagation()}function tx(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function nx(){return"ontouchstart"in window||navigator.maxTouchPoints}var rx=!("undefined"==typeof window||!window.document||!window.document.createElement),ax=0,ox={capture:!1,passive:!1},ix=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},lx={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function sx(e){var t=e.children,n=e.lockEnabled,a=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,a=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,l=(0,r.useRef)(!1),s=(0,r.useRef)(!1),u=(0,r.useRef)(0),c=(0,r.useRef)(null),d=(0,r.useCallback)((function(e,t){if(null!==c.current){var r=c.current,u=r.scrollTop,d=r.scrollHeight,p=r.clientHeight,f=c.current,m=t>0,h=d-p-u,g=!1;h>t&&l.current&&(a&&a(e),l.current=!1),m&&s.current&&(i&&i(e),s.current=!1),m&&t>h?(n&&!l.current&&n(e),f.scrollTop=d,g=!0,l.current=!0):!m&&-t>u&&(o&&!s.current&&o(e),f.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,a,o,i]),p=(0,r.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,r.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),m=(0,r.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;d(e,t)}),[d]),h=(0,r.useCallback)((function(e){if(e){var t=!!rb&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",m,t)}}),[m,f,p]),g=(0,r.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",m,!1))}),[m,f,p]);return(0,r.useEffect)((function(){if(t){var e=c.current;return h(e),function(){g(e)}}}),[t,h,g]),function(e){c.current=e}}({isEnabled:void 0===a||a,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,a=void 0===n||n,o=(0,r.useRef)({}),i=(0,r.useRef)(null),l=(0,r.useCallback)((function(e){if(rx){var t=document.body,n=t&&t.style;if(a&&Xb.forEach((function(e){var t=n&&n[e];o.current[e]=t})),a&&ax<1){var r=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,l=window.innerWidth-i+r||0;Object.keys(Qb).forEach((function(e){var t=Qb[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&nx()&&(t.addEventListener("touchmove",Jb,ox),e&&(e.addEventListener("touchstart",tx,ox),e.addEventListener("touchmove",ex,ox))),ax+=1}}),[a]),s=(0,r.useCallback)((function(e){if(rx){var t=document.body,n=t&&t.style;ax=Math.max(ax-1,0),a&&ax<1&&Xb.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&nx()&&(t.removeEventListener("touchmove",Jb,ox),e&&(e.removeEventListener("touchstart",tx,ox),e.removeEventListener("touchmove",ex,ox)))}}),[a]);return(0,r.useEffect)((function(){if(t){var e=i.current;return l(e),function(){s(e)}}}),[t,l,s]),function(e){i.current=e}}({isEnabled:n});return gy(r.Fragment,null,n&&gy("div",{onClick:ix,css:lx}),t((function(e){o(e),i(e)})))}var ux={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},cx=function(e){var t=e.name,n=e.onFocus;return gy("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:ux,value:"",onChange:function(){}})};function dx(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function px(){return dx(/^Mac/i)}var fx={clearIndicator:Cb,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,a=e.theme,o=a.colors,i=a.borderRadius;return bl({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},dropdownIndicator:Eb,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,a=n.spacing;return bl({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*a.baseUnit,paddingRight:3*a.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,a=r.spacing.baseUnit,o=r.colors;return bl({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*a,marginTop:2*a})},input:function(e,t){var n=e.isDisabled,r=e.value,a=e.theme,o=a.spacing,i=a.colors;return bl(bl({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Tb),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:i.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,a=e.theme,o=a.colors,i=a.spacing.baseUnit;return bl({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*i})},loadingMessage:mb,menu:function(e,t){var n,r=e.placement,a=e.theme,o=a.borderRadius,i=a.spacing,l=a.colors;return bl((vl(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),vl(n,"position","absolute"),vl(n,"width","100%"),vl(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return bl({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,a=n.borderRadius,o=n.colors;return bl({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:a/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,a=n.colors,o=e.cropWithEllipsis;return bl({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,a=n.borderRadius,o=n.colors,i=e.isFocused;return bl({alignItems:"center",display:"flex"},t?{}:{borderRadius:a/2,backgroundColor:i?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:fb,option:function(e,t){var n=e.isDisabled,r=e.isFocused,a=e.isSelected,o=e.theme,i=o.spacing,l=o.colors;return bl({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:a?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),":active":{backgroundColor:n?void 0:a?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,a=n.colors;return bl({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:a.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,a=r.spacing,o=r.colors;return bl({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,a=e.hasValue,o=e.selectProps.controlShouldRenderValue;return bl({alignItems:"center",display:r&&a&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},mx={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},hx={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Jy(),captureMenuScroll:!Jy(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=bl({ignoreCase:!0,ignoreAccents:!0,stringify:Kb,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,a=n.ignoreAccents,o=n.stringify,i=n.trim,l=n.matchFrom,s=i?$b(t):t,u=i?$b(o(e)):o(e);return r&&(s=s.toLowerCase(),u=u.toLowerCase()),a&&(s=qb(s),u=Wb(u)),"start"===l?u.substr(0,s.length)===s:u.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function gx(e,t,n,r){return{type:"option",data:t,isDisabled:Sx(e,t,n),isSelected:Ox(e,t,n),label:Ex(e,t),value:Cx(e,t),index:r}}function vx(e,t){return e.options.map((function(n,r){if("options"in n){var a=n.options.map((function(n,r){return gx(e,n,t,r)})).filter((function(t){return xx(e,t)}));return a.length>0?{type:"group",data:n,options:a,index:r}:void 0}var o=gx(e,n,t,r);return xx(e,o)?o:void 0})).filter(ab)}function yx(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,qt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function bx(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,qt(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function xx(e,t){var n=e.inputValue,r=void 0===n?"":n,a=t.data,o=t.isSelected,i=t.label,l=t.value;return(!Ax(e)||!o)&&kx(e,{label:i,value:l,data:a},r)}var wx=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},Ex=function(e,t){return e.getOptionLabel(t)},Cx=function(e,t){return e.getOptionValue(t)};function Sx(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Ox(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Cx(e,t);return n.some((function(t){return Cx(e,t)===r}))}function kx(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Ax=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Px=1,Tx=function(e){El(n,e);var t=kl(n);function n(e){var r;if(xl(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=px()||dx(/^iPhone/i)||dx(/^iPad/i)||px()&&navigator.maxTouchPoints>1,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,a=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),a(e,t)},r.setValue=function(e,t,n){var a=r.props,o=a.closeMenuOnSelect,i=a.isMulti,l=a.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),o&&(r.setState({inputIsHiddenAfterUpdate:!i}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,a=t.isMulti,o=t.name,i=r.state.selectValue,l=a&&r.isOptionSelected(e,i),s=r.isOptionDisabled(e,i);if(l){var u=r.getOptionValue(e);r.setValue(i.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:o});a?r.setValue([].concat(qt(i),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,a=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==a})),i=ob(t,o,o[0]||null);r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(ob(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],a=t.slice(0,t.length-1),o=ob(e,a,a[0]||null);r.onChange(o,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return wx(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return bx(vx(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zy.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Ex(r.props,e)},r.getOptionValue=function(e){return Cx(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,a=fx[e](t,n);a.boxSizing="border-box";var o=r.props.styles[e];return o?o(a,t):a},r.getClassNames=function(e,t){var n,a;return null===(n=(a=r.props.classNames)[e])||void 0===n?void 0:n.call(a,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,bl(bl({},_b),e.components);var e},r.buildCategorizedOptions=function(){return vx(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return yx(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:bl({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,a=t.menuIsOpen;r.focusInput(),a?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Ky(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var a=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=a>5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Ax(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,a=t.backspaceRemovesValue,o=t.escapeClearsValue,i=t.inputValue,l=t.isClearable,s=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,g=f.selectValue;if(!(s||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(h)r.removeValue(h);else{if(!a)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!m||p&&r.isOptionSelected(m,g))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(u){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):l&&o&&r.clearValue();break;case" ":if(i)return;if(!u){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Px),r.state.selectValue=Wy(e.value),e.menuIsOpen&&r.state.selectValue.length){var a=r.getFocusableOptionsWithIds(),o=r.buildFocusableOptions(),i=o.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=a,r.state.focusedOption=o[i],r.state.focusedOptionId=wx(a,o[i])}return r}return J(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Qy(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,a=this.state.isFocused;(a&&!n&&e.isDisabled||a&&r&&!e.menuIsOpen)&&this.focusInput(),a&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):a||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Qy(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,a=n.isFocused,o=this.buildFocusableOptions(),i="first"===e?0:o.length-1;if(!this.props.isMulti){var l=o.indexOf(r[0]);l>-1&&(i=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[i],focusedOptionId:this.getFocusedOptionId(o[i])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=n.indexOf(r);r||(a=-1);var o=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===a?0:-1===a?o:a-1;break;case"next":a>-1&&a<o&&(i=a+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var a=0,o=r.indexOf(n);n||(o=-1),"up"===e?a=o>0?o-1:r.length-1:"down"===e?a=(o+1)%r.length:"pageup"===e?(a=o-t)<0&&(a=0):"pagedown"===e?(a=o+t)>r.length-1&&(a=r.length-1):"last"===e&&(a=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[a],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[a])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(mx):bl(bl({},mx),this.props.theme):mx}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,a=this.getValue,o=this.selectOption,i=this.setValue,l=this.props,s=l.isMulti,u=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:a,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:c,selectOption:o,selectProps:l,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Sx(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Ox(this.props,e,t)}},{key:"filterOption",value:function(e,t){return kx(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,a=e.inputId,o=e.inputValue,i=e.tabIndex,l=e.form,s=e.menuIsOpen,u=e.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,m=this.commonProps,h=a||this.getElementId("input"),g=bl(bl(bl({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(c,(0,$.Z)({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:l,type:"text",value:o},g)):r.createElement(Yb,(0,$.Z)({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:zy,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:l,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,a=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,l=t.SingleValue,s=t.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,p=c.isDisabled,f=c.isMulti,m=c.inputValue,h=c.placeholder,g=this.state,v=g.selectValue,y=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return m?null:r.createElement(s,(0,$.Z)({},u,{key:"placeholder",isDisabled:p,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return v.map((function(t,l){var s=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,(0,$.Z)({},u,{components:{Container:a,Label:o,Remove:i},isFocused:s,isDisabled:p,key:c,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var x=v[0];return r.createElement(l,(0,$.Z)({},u,{data:x,isDisabled:p}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,a=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||a||!this.hasValue()||o)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,(0,$.Z)({},t,{innerProps:l,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,a=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?r.createElement(e,(0,$.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:a,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var a=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return r.createElement(n,(0,$.Z)({},a,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,a=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,(0,$.Z)({},t,{innerProps:o,isDisabled:n,isFocused:a}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,a=t.GroupHeading,o=t.Menu,i=t.MenuList,l=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,m=f.captureMenuScroll,h=f.inputValue,g=f.isLoading,v=f.loadingMessage,y=f.minMenuHeight,b=f.maxMenuHeight,x=f.menuIsOpen,w=f.menuPlacement,E=f.menuPosition,C=f.menuPortalTarget,S=f.menuShouldBlockScroll,O=f.menuShouldScrollIntoView,k=f.noOptionsMessage,A=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!x)return null;var T,D=function(t,n){var a=t.type,o=t.data,i=t.isDisabled,l=t.isSelected,s=t.label,u=t.value,f=p===o,m=i?void 0:function(){return e.onOptionHover(o)},h=i?void 0:function(){return e.selectOption(o)},g="".concat(e.getElementId("option"),"-").concat(n),v={id:g,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:l};return r.createElement(c,(0,$.Z)({},d,{innerProps:v,data:o,isDisabled:i,isSelected:l,key:g,label:s,type:a,value:u,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,l=t.index,s="".concat(e.getElementId("group"),"-").concat(l),u="".concat(s,"-heading");return r.createElement(n,(0,$.Z)({},d,{key:s,data:o,options:i,Heading:a,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return D(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return D(t,"".concat(t.index))}));else if(g){var M=v({inputValue:h});if(null===M)return null;T=r.createElement(s,d,M)}else{var _=k({inputValue:h});if(null===_)return null;T=r.createElement(u,d,_)}var I={minMenuHeight:y,maxMenuHeight:b,menuPlacement:w,menuPosition:E,menuShouldScrollIntoView:O},N=r.createElement(db,(0,$.Z)({},d,I),(function(t){var n=t.ref,a=t.placerProps,l=a.placement,s=a.maxHeight;return r.createElement(o,(0,$.Z)({},d,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:l}),r.createElement(sx,{captureEnabled:m,onTopArrive:A,onBottomArrive:P,lockEnabled:S},(function(t){return r.createElement(i,(0,$.Z)({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:s,focusedOption:p}),T)})))}));return C||"fixed"===E?r.createElement(l,(0,$.Z)({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:E}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,a=t.isDisabled,o=t.isMulti,i=t.name,l=t.required,s=this.state.selectValue;if(l&&!this.hasValue()&&!a)return r.createElement(cx,{name:i,onFocus:this.onValueInputFocus});if(i&&!a){if(o){if(n){var u=s.map((function(t){return e.getOptionValue(t)})).join(n);return r.createElement("input",{name:i,type:"hidden",value:u})}var c=s.length>0?s.map((function(t,n){return r.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):r.createElement("input",{name:i,type:"hidden",value:""});return r.createElement("div",null,c)}var d=s[0]?this.getOptionValue(s[0]):"";return r.createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,a=t.focusedOption,o=t.focusedValue,i=t.isFocused,l=t.selectValue,s=this.getFocusableOptions();return r.createElement(Fb,(0,$.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:a,focusedValue:o,isFocused:i,selectValue:l,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,a=e.SelectContainer,o=e.ValueContainer,i=this.props,l=i.className,s=i.id,u=i.isDisabled,c=i.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return r.createElement(a,(0,$.Z)({},p,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),r.createElement(t,(0,$.Z)({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),r.createElement(o,(0,$.Z)({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,(0,$.Z)({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,a=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,i=t.isFocused,l=t.prevWasFocused,s=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=Wy(c),h={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return yx(vx(e,t))}(e,m):[],v=d?bx(vx(e,m),"".concat(s,"-option")):[],y=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,m):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);h={selectValue:m,focusedOption:b,focusedOptionId:wx(v,b),focusableOptionsWithIds:v,focusedValue:y,clearFocusValueOnUpdate:!1}}var x=null!=a&&e!==n?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},w=o,E=i&&l;return i&&!E&&(w={value:ob(f,m,m[0]||null),options:m,action:"initial-input-focus"},E=!l),"initial-input-focus"===(null==o?void 0:o.action)&&(w=null),bl(bl(bl({},h),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:E})}}]),n}(r.Component);Tx.defaultProps=hx;var Dx=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Mx(e){var t=e.defaultInputValue,n=void 0===t?"":t,a=e.defaultMenuIsOpen,o=void 0!==a&&a,i=e.defaultValue,l=void 0===i?null:i,s=e.inputValue,u=e.menuIsOpen,c=e.onChange,d=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,m=e.value,h=Ul(e,Dx),g=zl((0,r.useState)(void 0!==s?s:n),2),v=g[0],y=g[1],b=zl((0,r.useState)(void 0!==u?u:o),2),x=b[0],w=b[1],E=zl((0,r.useState)(void 0!==m?m:l),2),C=E[0],S=E[1],O=(0,r.useCallback)((function(e,t){"function"==typeof c&&c(e,t),S(e)}),[c]),k=(0,r.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),y(void 0!==n?n:e)}),[d]),A=(0,r.useCallback)((function(){"function"==typeof f&&f(),w(!0)}),[f]),P=(0,r.useCallback)((function(){"function"==typeof p&&p(),w(!1)}),[p]),T=void 0!==s?s:v,D=void 0!==u?u:x,M=void 0!==m?m:C;return bl(bl({},h),{},{inputValue:T,menuIsOpen:D,onChange:O,onInputChange:k,onMenuClose:P,onMenuOpen:A,value:M})}var _x=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],Ix=(0,r.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,a=e.cacheOptions,o=void 0!==a&&a,i=e.loadOptions;e.options;var l=e.isLoading,s=void 0!==l&&l,u=e.onInputChange,c=e.filterOption,d=void 0===c?null:c,p=Ul(e,_x),f=p.inputValue,m=(0,r.useRef)(void 0),h=(0,r.useRef)(!1),g=zl((0,r.useState)(Array.isArray(n)?n:void 0),2),v=g[0],y=g[1],b=zl((0,r.useState)(void 0!==f?f:""),2),x=b[0],w=b[1],E=zl((0,r.useState)(!0===n),2),C=E[0],S=E[1],O=zl((0,r.useState)(void 0),2),k=O[0],A=O[1],P=zl((0,r.useState)([]),2),T=P[0],D=P[1],M=zl((0,r.useState)(!1),2),_=M[0],I=M[1],N=zl((0,r.useState)({}),2),R=N[0],L=N[1],j=zl((0,r.useState)(void 0),2),F=j[0],V=j[1],B=zl((0,r.useState)(void 0),2),H=B[0],z=B[1];o!==H&&(L({}),z(o)),n!==F&&(y(Array.isArray(n)?n:void 0),V(n)),(0,r.useEffect)((function(){return h.current=!0,function(){h.current=!1}}),[]);var U=(0,r.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,r.useEffect)((function(){!0===n&&U(x,(function(e){h.current&&(y(e||[]),S(!!m.current))}))}),[]);var Z=(0,r.useCallback)((function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,u);if(!n)return m.current=void 0,w(""),A(""),D([]),S(!1),void I(!1);if(o&&R[n])w(n),A(n),D(R[n]),S(!1),I(!1);else{var r=m.current={};w(n),S(!0),I(!k),U(n,(function(e){h&&r===m.current&&(m.current=void 0,S(!1),A(n),D(e||[]),I(!1),L(e?bl(bl({},R),{},vl({},n,e)):R))}))}}),[o,U,k,R,u]),W=_?[]:x&&k?T:v||[];return bl(bl({},p),{},{options:W,isLoading:C||s,onInputChange:Z,filterOption:d})}(e),a=Mx(n);return r.createElement(Tx,(0,$.Z)({ref:t},a))})),Nx=Ix,Rx=n(518),Lx=n.n(Rx);function jx(){return jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jx.apply(null,arguments)}var Fx=n(7290),Vx=n.n(Fx);function Bx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Hx(e,t,n[t])}))}return e}function Hx(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zx.apply(null,arguments)}const Ux=a().forwardRef(((e,t)=>a().createElement("div",zx({ref:t},e))));function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zx.apply(null,arguments)}function Wx(){return Wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wx.apply(null,arguments)}Ux.displayName="InputComponent";var qx=n(6091),$x=n.n(qx),Kx=n(5635),Gx=n.n(Kx);function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yx.apply(null,arguments)}const Xx=e=>{const{children:t,selectProps:n,removeProps:r}=e;return a().createElement($x(),{tabIndex:-1,label:t,className:n.classes.multiValue,classes:{label:n.classes.multiValue__label},onDelete:r.onClick,deleteIcon:a().createElement(Gx(),Yx({},e.removeProps,{style:{height:"18px",width:"18px",color:"rgba(0,0,0,0.38)",marginRight:"8px"}}))})};function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qx.apply(null,arguments)}Xx.propTypes={children:yt().node,isFocused:yt().bool.isRequired,removeProps:yt().shape({onClick:yt().func.isRequired,onMouseDown:yt().func.isRequired,onTouchEnd:yt().func.isRequired}).isRequired,selectProps:yt().object.isRequired};const Jx=e=>{const{innerProps:t,innerRef:n,children:r,isFocused:o,isSelected:i,label:l,selectProps:{classes:s}}=e;return a().createElement(mf(),Qx({className:p()(s.option,{[s["option--selected"]]:i}),ref:n,selected:o,component:"div"},t),a().createElement(Rd,{value:l},a().createElement("div",{className:s["option--item"]},r)))};function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ew.apply(null,arguments)}Jx.propTypes={children:yt().node,innerProps:yt().shape({id:yt().string.isRequired,key:yt().string,onClick:yt().func.isRequired,onMouseMove:yt().func.isRequired,onMouseOver:yt().func.isRequired,tabIndex:yt().number.isRequired}).isRequired,innerRef:yt().oneOfType([yt().oneOf([null]),yt().func,yt().shape({current:yt().any.isRequired})]),isFocused:yt().bool.isRequired,isSelected:yt().bool.isRequired,label:yt().string,selectProps:yt().shape({classes:yt().shape({option:yt().string,"option--selected":yt().string})})};const tw={ClearIndicator:e=>{const{innerProps:t,selectProps:{classes:n}}=e;return a().createElement(np(),jx({},t,{className:n.clearIndicator,size:"large"}),a().createElement(Lx(),null))},Control:e=>{const{children:t,innerProps:n,innerRef:r,selectProps:{classes:o,TextFieldProps:i={}}}=e;return a().createElement(Vx(),zx({variant:"standard",fullWidth:!0},i,{InputProps:Bx({inputComponent:Ux},i.InputProps,{inputProps:Bx({className:o.control,ref:r,children:t},n,i.inputProps)})}))},DropdownIndicator:e=>{const{innerProps:t,selectProps:{classes:n}}=e;return a().createElement(np(),Zx({},t,{className:n.dropdownIndicator,size:"large"}),a().createElement(zg(),null))},GroupHeading:e=>{const{children:t,selectProps:{classes:n}}=e;return a().createElement(gd(),{variant:"subtitle2",className:p()(n.groupHeading)},t)},Menu:e=>{const{selectProps:{classes:t},innerProps:n,innerRef:r,getStyles:o,children:i}=e;return a().createElement(Kp(),Wx({ref:r,style:o("menu",e),className:t.menu},n),i)},MultiValue:Xx,NoOptionsMessage:e=>{const{selectProps:{classes:t},children:n}=e;return a().createElement(gd(),{color:"textSecondary",className:t.noOptionsMessage},n)},Option:Jx,Placeholder:e=>{const{selectProps:{classes:t},children:n}=e;return a().createElement(gd(),{color:"textSecondary",className:t.placeholder},n)},SingleValue:e=>{const{selectProps:{classes:t},innerProps:n,children:r}=e;return a().createElement(gd(),ew({className:t.singleValue},n),r)},ValueContainer:e=>{const{selectProps:{classes:t},children:n,isMulti:r}=e;return a().createElement("div",{className:p()(t.valueContainer,{[t["valueContainer--multi"]]:r})},n)}};function nw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rw=(e,t)=>(0,f.union)(Object.keys(e),Object.keys(t)).reduce(((n,r)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){nw(e,t,n[t])}))}return e}({},n,{[r]:p()(e[r],t[r])})),{}),aw=lr((e=>({control:{display:"flex","&&":{padding:0},height:"auto"},valueContainer:{display:"flex",flexWrap:"nowrap",flex:1,alignItems:"center",overflow:"hidden",marginLeft:e.spacing(1)},"valueContainer--multi":{flexWrap:"wrap"},multiValue:{margin:e.spacing(.5,.5),maxWidth:"calc(100% - 8px)"},multiValue__label:{paddingRight:0,marginRight:12,maxWidth:"100%",overflow:"hidden"},noOptionsMessage:{padding:e.spacing(1,2)},singleValue:{fontSize:16,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},placeholder:{position:"absolute",left:6,bottom:10,fontSize:16},menu:{zIndex:40,marginTop:e.spacing(1)},clearIndicator:{},dropdownIndicator:{},groupHeading:{paddingLeft:"28px"},option:{fontWeight:400},"option--selected":{fontWeight:400},"option--item":{display:"block",width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"pre"}})));function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ow.apply(null,arguments)}function iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){lw(e,t,n[t])}))}return e}function lw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sw=e=>{function t(t){const{components:n,classes:r,error:o,TextFieldProps:i,innerRef:l}=t,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["components","classes","error","TextFieldProps","innerRef"]),u=aw(),c=iw({},tw,n),d=rw(u,r);return a().createElement(e,ow({ref:l,components:c,classes:d,TextFieldProps:iw({},i,{error:o})},s))}return t.displayName=`withMuiSkin(${e.displayName||e.name})`,t.defaultProps={components:{},classes:{}},t},uw=sw(Nx),cw=sw((0,r.forwardRef)((function(e,t){var n=Mx(e);return r.createElement(Tx,(0,$.Z)({ref:t},n))}))),dw=()=>null,pw=a().createContext(null);pw.displayName="PopupBoundariesContext";const fw=lr({popper:{borderRadius:"4px",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",backgroundColor:"#FFFFFF",margin:0,zIndex:1e4}});function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mw.apply(null,arguments)}const hw=e=>{const{selectProps:{inputRef:t,menuIsOpen:n,inputValue:o},innerRef:i,children:l,innerProps:s}=e,[u,c]=(0,r.useState)("id");(0,r.useEffect)((()=>{c(((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))())}),[o]);const d=fw(),p=(0,r.useContext)(pw),m=Boolean(null==p?void 0:p.element),h=m?p.element.clientWidth:window.innerWidth;return a().createElement(nf,{anchorEl:t.current,open:n,className:d.popper,key:u,modifiers:[{name:"preventOverflow",enabled:!0,options:{altAxis:!0,altBoundary:!0,tether:!1,boundary:m?p.element:document.body,padding:5}}],placement:"bottom-start"},a().createElement(Kp(),mw({ref:i,style:{minWidth:Math.min((0,f.prop)("clientWidth",t.current),h),maxWidth:Math.min(521,h)}},s),l))};hw.propTypes={children:yt().oneOfType([yt().element,yt().array]).isRequired,selectProps:yt().shape({inputRef:yt().object.isRequired,menuIsOpen:yt().bool.isRequired,inputValue:yt().string}).isRequired,innerRef:yt().oneOfType([yt().oneOf([null]),yt().func,yt().shape({current:yt().any})]).isRequired,innerProps:yt().object.isRequired};const gw=lr((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),vw=e=>{const{selectProps:{onCreate:t,createLabel:n,inputValue:r,components:o,canCreateOption:i},children:l}=e,s=gw();return a().createElement(hw,e,l,n&&!(0,f.prop)("Group",o)&&i()&&a().createElement("span",{className:s.addLabel,onClick:()=>t(r)},a().createElement(md(),{className:s.addIcon}),n))},yw=lr({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"17px"}});function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bw.apply(null,arguments)}const xw=e=>{const{selectProps:{menuIsOpen:t},innerProps:n,children:r}=e,o=yw();return!t&&a().createElement(gd(),bw({className:o.singleValue},n),r)};function ww(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Ew(e,t,n[t])}))}return e}function Ew(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}xw.propTypes={children:yt().node,innerProps:yt().object};const Cw=lr({control:{height:"auto"},dropdownIndicator:{boxSizing:"content-box",transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),Sw={menu:e=>ww({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>ww({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>ww({},e,{padding:"0 0 8px 0"}),input:e=>ww({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>ww({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},Ow={menuList:e=>ww({},e,{padding:0})},kw={input:e=>ww({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Aw.apply(null,arguments)}function Pw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Tw(e,t,n[t])}))}return e}function Tw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dw=e=>{let{value:t,label:n,options:o,getOptions:i,createLabel:l,height:u=46,onChange:c=f.identity,onCreate:d,canCreateOption:m=()=>Boolean(d),onClear:h=f.identity,components:g={},textFieldInputRef:v,TextFieldProps:y,classes:b={},required:x}=e,w=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","label","options","getOptions","createLabel","height","onChange","onCreate","canCreateOption","onClear","components","textFieldInputRef","TextFieldProps","classes","required"]);const E=Cw({height:u}),[C,S]=(0,r.useState)(!1),O=(0,r.useRef)(null),k=i?uw:cw,A=(0,f.prop)("ClearIndicator",g)?{}:{IndicatorSeparator:dw,ClearIndicator:dw},P=d?(e,t)=>{d(e,t),S(!1)}:void 0,T=(0,f.prop)("Group",g)?Ow:{},D=(0,f.isEmpty)(n)?kw:{},M=Pw({},Sw,T,D),_=Pw({},E,b);return a().createElement(k,Aw({placeholder:"",defaultOptions:!0},w,{value:(0,f.defaultTo)(null,t),loadOptions:i,options:o,cacheOptions:!0,onChange:c,onCreate:P,onClear:h,createLabel:l,canCreateOption:m,classes:_,styles:M,components:Pw({DropdownIndicator:Wg,LoadingIndicator:dw,SingleValue:xw,Menu:vw},A,g),menuPlacement:"auto",TextFieldProps:Pw({},y,{label:n,variant:"filled",size:"small",required:x,classes:Pw({},(0,f.prop)("classes",y),{root:p()(E.formControl,(0,f.path)(["classes","root"],y))}),inputProps:Pw({},(0,f.prop)("inputProps",y)),InputProps:Pw({},(0,f.prop)("InputProps",y),{classes:Pw({},(0,f.path)(["InputProps","classes"],y),{root:p()(E.filledInputRoot,(0,f.path)(["InputProps","classes","root"],y)),underline:p()({[E.filledInputUnderline]:(0,s.isEmptyValue)(t)},(0,f.path)(["InputProps","classes","underline"],y)),focused:p()("focused",(0,f.path)(["InputProps","classes","focused"],y))})}),InputLabelProps:Pw({},(0,f.prop)("InputLabelProps",y),{classes:Pw({},(0,f.path)(["InputLabelProps","classes"],y),{root:p()(E.inputLabel,(0,f.path)(["InputLabelProps","classes","root"],y)),shrink:p()("shrink",(0,f.path)(["InputLabelProps","classes","shrink"],y))}),shrink:!(0,s.isEmptyValue)(t)||void 0}),ref:v||O}),inputRef:v||O,menuIsOpen:C,onMenuOpen:()=>S(!0),onMenuClose:()=>S(!1)}))};var Mw=n(2614);Hd()(Mw.Z,{insert:"head",singleton:!1});const _w=Mw.Z.locals||{},Iw=({hierarchyOptions:e,instanceId:t,onChange:n})=>{const o=(0,r.useMemo)((()=>e.map((({value:e,label:t})=>({value:e,label:t})))),[e]),i=(0,r.useMemo)((()=>o.find((e=>e.value===t))||o[0]),[o,t]),l=(0,r.useCallback)((e=>n(e.value)),[n]);return a().createElement(Dw,{classes:{valueContainer:_w.valueContainer},className:_w.hierarchyTypeSelector,height:42,label:c().text("Hierarchy type"),value:i,options:o,onChange:l,TextFieldProps:{InputProps:{disableUnderline:!1,classes:{root:_w.filledInputRoot}}}})};var Nw=n(3110);Hd()(Nw.Z,{insert:"head",singleton:!1});const Rw=Nw.Z.locals||{},Lw=({title:e,instanceId:t,onInstanceIdChange:n,hierarchyOptions:r,hasHierarchy:o})=>a().createElement("div",{className:Rw.headerContainer},a().createElement(Bg,{className:Rw.header},a().createElement(Iw,{instanceId:t,onChange:n,hierarchyOptions:r})),o&&a().createElement(Bg,{title:e,className:Rw.header})),jw=(0,r.memo)(Lw);var Fw=n(9367),Vw=n.n(Fw);const Bw=lr({link:{textDecoration:"inherit",color:"inherit","&:visited":{textDecoration:"inherit",color:"inherit"}}}),Hw=({to:e,children:t,onClick:n})=>{const r=Bw();return a().createElement("a",{href:e,onClick:t=>{Mf(t)&&e||!n||(n(),t.stopPropagation(),t.preventDefault())},className:r.link},t)},zw=lr((e=>({image:{width:"40px",height:"40px"},info:{marginLeft:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"pre",fontWeight:400,fontSize:"13px",lineHeight:"15px",color:e.palette.primary.main},secondaryLabel:{marginTop:"4px",fontWeight:400,fontSize:"10px",lineHeight:"12px",color:e.palette.text.secondary,whiteSpace:"pre",overflow:"hidden",textOverflow:"ellipsis"},link:{textDecoration:"none"},thirdRow:{display:"flex",overflow:"hidden",alignItems:"center",marginTop:"auto",paddingTop:"4px"},entityId:{display:"flex",overflow:"hidden",alignItems:"baseline",whiteSpace:"nowrap",fontWeight:400,fontSize:"12px",lineHeight:"16px"},entityIdLabel:{color:e.palette.text.secondary},entityIdValue:{marginLeft:"8px",color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis","&[aria-describedby]":{cursor:"pointer","&:hover":{textDecoration:"underline"}}}}))),Uw=({entity:e,classes:t={},disableEntityLink:n=!1})=>{const o=zw(),{secondaryLabel:i,label:l}=t,u=(0,s.getLabel)(e.label),{secondaryLabel:d}=e,f=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,s.getEntityId)(e))}),[e]);return a().createElement(a().Fragment,null,a().createElement(wd,{entity:e,imageClassName:o.image}),a().createElement("div",{className:o.info},a().createElement(If,{value:(0,s.getEntityUriForLink)(e),className:o.link,disabled:n},a().createElement(Rd,{value:u,placement:"top",showOnExceededHeight:!0},a().createElement("div",{className:p()(o.label,l)},u))),d&&a().createElement(Rd,{value:d,placement:"top",showOnExceededHeight:!0},a().createElement("div",{className:p()(o.secondaryLabel,i)},d)),a().createElement("div",{className:o.thirdRow},a().createElement(Vd,{entity:e,size:"medium"}),a().createElement("div",{className:o.entityId,onClick:f},a().createElement("div",{className:o.entityIdLabel},c().text("ID:")),a().createElement(Rd,{value:`Copy to clipboard ${(0,s.getEntityId)(e)}`,placement:"top"},a().createElement("div",{className:o.entityIdValue},(0,s.getEntityId)(e)))))))},Zw=lr({"@keyframes keyframes-wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},wave:{overflow:"hidden",position:"relative","&:after":{top:"0",left:"0",right:"0",bottom:"0",content:'""',position:"absolute",animation:"$keyframes-wave 1.6s linear 0.5s infinite",transform:"translateX(-100%)",background:"linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);"}},avatar:{flex:"none",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.11)"},info:{marginLeft:"12px",flex:"auto"},label:{width:"40%",height:"15px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},secondaryLabel:{marginTop:"4px",width:"100%",height:"12px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},thirdRow:{marginTop:"4px",width:"60%",height:"24px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"}}),Ww=()=>{const e=Zw();return a().createElement(a().Fragment,null,a().createElement("div",{"data-reltio-id":"profile-card-placeholder-avatar",className:p()(e.avatar,e.wave)}),a().createElement("div",{"data-reltio-id":"profile-card-placeholder-info",className:e.info},a().createElement("div",{className:p()(e.label,e.wave)}),a().createElement("div",{className:p()(e.secondaryLabel,e.wave)}),a().createElement("div",{className:p()(e.thirdRow,e.wave)})))},qw=lr({container:{display:"flex",padding:"16px",overflow:"hidden"}});function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$w.apply(null,arguments)}const Kw=e=>{let{entity:t,classes:n={},variant:r="normal",disableEntityLink:o=!1}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","classes","variant","disableEntityLink"]);const l=qw(),{container:s}=n;return a().createElement("div",$w({className:p()(l.container,s)},i),"normal"===r?a().createElement(Uw,{entity:t,classes:n,disableEntityLink:o}):a().createElement(Ww,null))},Gw=(0,r.memo)(Kw),Yw=lr((e=>({link:{cursor:"pointer",color:e.palette.primary.main,lineHeight:"15px",wordBreak:"break-word",whiteSpace:"break-spaces"},selected:{fontWeight:"bold"},popper:{maxWidth:"345px",minWidth:"200px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}}))),Xw=({title:e,isSelected:t,entityUri:n,anchorEl:o,withEntityDetails:i=!0,classNames:l})=>{const u=Yw(),{generateEntityUrl:c}=(0,r.useContext)(Pf),d=z("openEntity"),f=P(),{isLoading:m,entityDetails:h,showEntityDetails:g,hideEntityDetails:v}=(e=>{const[t,n]=(0,r.useState)(null),[a,o]=(0,r.useState)(!1),i=gp(),l=(0,r.useCallback)((()=>i(Promise.resolve())),[i]),u=L(),c=W(),d=(0,r.useMemo)((()=>(0,s.addGetEntityMaskingOptions)(u,{showMasking:c,showAccess:!1})),[u,c]),p=(0,r.useCallback)((0,s.debounce)((()=>{o(!0),i((0,s.getEntity)(e,d)).then(n).catch((e=>{console.warn("Failed to load entity",e)})).finally((()=>o(!1)))}),1e3),[e,i,d]),f=(0,r.useCallback)((()=>{l(),p.cancel(),o(!1),n(null)}),[p,l]);return(0,r.useEffect)((()=>()=>p.cancel()),[]),{isLoading:a,entityDetails:t,showEntityDetails:p,hideEntityDetails:f}})(n),y=c({uiPath:f,uri:n}),b=Boolean(o)&&(Boolean(h)||m),x=(0,r.useCallback)((()=>{d({uri:n})}),[d,n]);return a().createElement(a().Fragment,null,a().createElement("span",{"data-reltio-id":"reltio-hierarchy-node-title",className:p()(u.link,{[u.selected]:t},l),onMouseEnter:i?g:void 0,onMouseLeave:i?v:void 0},a().createElement(Hw,{to:y,onClick:x},e)),a().createElement(nf,{anchorEl:o,className:u.popper,open:b,modal:!1,placement:"top-start"},a().createElement(Gw,{entity:h,variant:m?"loading":"normal"})))};var Qw=n(4055);function Jw(){return Jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jw.apply(null,arguments)}const eE=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",Jw({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),a().createElement("circle",{cx:"8",cy:"8",r:"7.2",fill:"#0072CE",fillOpacity:".25"}),a().createElement("path",{d:"M7.021 8.746l-.693.693c-.324-.33-.64-.76-.838-1.359l.837-.213c.142.402.358.692.694 1.016zM7.556 6L5.777 4.222 4 6h1.343c.009.36.035.684.084.963l.837-.214c-.031-.22-.055-.48-.058-.749h1.35zM12 6l-1.778-1.778L8.444 6H9.78c-.052 1.636-.576 2.08-1.137 2.571-.337.294-.68.608-.945.977a3.518 3.518 0 00-.56-.617l-.689.69c.435.397.728.724.728 1.468v2.022h.863V11.09c0-.858.306-1.124.836-1.602.646-.569 1.459-1.29 1.51-3.487h1.615z",fill:"#0072CE"}))};var tE=n(3872);Hd()(tE.Z,{insert:"head",singleton:!1});const nE=tE.Z.locals||{},rE=({data:e,entityId:t})=>{var n;const{label:o,hasManyParents:i,entityId:l}=e,u=t===l,c=(0,r.useRef)(null),d=(0,Lr.useSelector)(Fr().selectors.getAbsoluteImagePath),f=(0,Lr.useSelector)(Fr().selectors.getMetadata),m=(0,s.createEntityUriFromEntityId)(l),h=(0,r.useMemo)((()=>(({entityType:e,metadata:t,absoluteImagePath:n})=>{if(!e||!t||!n)return;const r=(0,s.getEntityType)(t,e),a=r?(0,s.getPropWithInheritance)(t,r,"typeGraphIcon"):null;if("string"!=typeof a||!a)return;const o=(0,s.getAbsoluteImageUrl)(n,a);return null!=o?o:void 0})({entityType:e.entityType,metadata:f,absoluteImagePath:d})),[d,e.entityType,f]);return a().createElement("div",{className:nE.container,"data-reltio-id":"hierarchy-tree-list-item",ref:c},a().createElement(xd(),{className:nE.icon,src:null!=h?h:Qw}),a().createElement(Xw,{classNames:p()(nE.label,{[nE.currentEntity]:u}),title:(0,s.getLabel)(o),entityUri:m,isSelected:u,anchorEl:null!==(n=c.current)&&void 0!==n?n:void 0}),u&&a().createElement(Vw(),{className:nE.icon,color:"primary"}),i&&a().createElement(eE,{className:nE.icon}))},aE=(0,r.memo)(rE);var oE=n(734);Hd()(oE.Z,{insert:"head",singleton:!1});const iE=oE.Z.locals||{},lE=({onImportHierarchy:e,onCreateHierarchy:t})=>a().createElement(Qh,{LogoRenderer:Xh.SELECT_ATTRIBUTES,text:c().text("Create your first hierarchy"),secondaryText:c().text("Create a hierarchy to define how this profile relates to other entities and visualise its structure."),variant:Yh.embedded},a().createElement("div",{className:iE.creationButtons},a().createElement(br(),{variant:"contained",color:"primary",onClick:e},c().text("Import Hierarchy")),a().createElement("span",{className:iE.orText},c().text("OR")),a().createElement(br(),{variant:"text",color:"primary",onClick:t},c().text("Create Hierarchy"))));var sE=n(4927),uE=n.n(sE),cE=n(3707),dE=n.n(cE),pE=n(9844),fE=n.n(pE),mE=n(485),hE=n.n(mE),gE=n(4496),vE=n.n(gE),yE=n(8018);function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bE.apply(null,arguments)}const xE=e=>{const t=A()||"";return a().createElement(yE.ZP,bE({},e,{storagePath:(n=t,n.endsWith("/")?n:n+"/")}));var n},wE=lr({entityContainer:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0,"&.focused":{backgroundColor:"rgba(0,0,0,0.04)"}},entityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.87)",cursor:"pointer",lineHeight:"15px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"pre"},emptyEntityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.6)",lineHeight:"15px",marginLeft:"16px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",cursor:"default"},entityAvatar:{transform:"scale(0.5)",marginLeft:"8px",marginRight:"11px"},entitySecondaryLabel:{color:"rgba(0,0,0,0.6)"}});function EE(){return EE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EE.apply(null,arguments)}const CE=({innerRef:e,innerProps:t,selectOption:n,data:r,isFocused:o})=>{const i=wE(),{uri:l,entityType:s,label:u,secondaryLabel:d}=r;return""!==l?a().createElement(mf(),EE({className:p()(i.entityContainer,{focused:o}),ref:e,key:l,onClick:()=>n({label:u,uri:l,entityType:s})},t),a().createElement(xE,{className:i.entityAvatar,entityType:s}),a().createElement(Rd,{value:`${u}${d?", "+d:""}`},a().createElement("span",{className:i.entityLabel},u,d&&a().createElement("span",{className:i.entitySecondaryLabel},", ",d)))):a().createElement(mf(),EE({className:i.entityContainer,ref:e,key:l},t,{disabled:!0}),a().createElement("span",{className:i.emptyEntityLabel},c().text("No results found")))},SE=lr((e=>({singleValue:{color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",paddingTop:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},linkValue:{cursor:"pointer",color:e.palette.primary.main,textDecoration:"none",pointerEvents:"all"}}))),OE=({selectProps:{currentEntityType:e,menuIsOpen:t,disableLinkClick:n},children:o,data:i})=>{const l=SE(),u=z("openEntity"),d=P(),{generateEntityUrl:f}=(0,r.useContext)(Pf),m=(0,s.isTempUri)(i.entityUri)?{className:l.singleValue,component:"span"}:{className:p()(l.singleValue,l.linkValue),onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),n?e.preventDefault():Mf(e)||(u({uri:i.entityUri}),e.preventDefault())},href:f({uiPath:d,uri:i.entityUri}),component:"a"};return t?null:a().createElement(gd(),m,(0,s.isTempUri)(i.entityUri)?c().text(`New ${e.label} will be created`):(0,s.getLabel)(o))};var kE=n(4058),AE=n.n(kE);const PE=lr({clearIcon:{cursor:"pointer",height:"20px",width:"20px"}}),TE=e=>{const{selectProps:{onClear:t}}=e,n=PE();return a().createElement(np(),{onClick:t,size:"large"},a().createElement(AE(),{className:n.clearIcon}))};TE.propTypes={selectProps:yt().object.isRequired};const DE=lr((e=>({addLabel:{color:e.palette.primary.main,display:"flex",fontWeight:"500",cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},groupHeading:{fontSize:"13px",height:"36px",padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),{Group:ME}=_b,_E=e=>{const t=DE(),{selectProps:{inputValue:n,onCreate:r,canCreateOption:o},data:i,children:l}=e;return a().createElement(ME,e,a().createElement("div",{className:t.groupHeading},a().createElement("span",null,i.label),r&&o(i.entityType)&&a().createElement("span",{onClick:()=>r(n,i.entityType),className:t.addLabel},a().createElement(md(),{className:t.addIcon}),n?c().text('Create "${name}" as new ${entityTypeLabel}',{name:n,entityTypeLabel:i.label}):c().text("Create new ${entityTypeLabel}",{entityTypeLabel:i.label}))),l)},IE="1px solid #AFD4E9",NE=lr({decorator:{marginLeft:8,borderLeft:IE,"&:last-child":{borderLeft:"none","&:before":{borderLeft:IE}},"&:before":{top:0,height:14,width:5,borderBottom:IE,content:'""',display:"block",left:"0"},"&$plain":{"&:before":{width:0}}},plain:{},wrapper:{marginLeft:16,marginTop:-8}}),RE=({className:e,children:t,plain:n=!1,enabled:r=!1})=>{const o=NE();return r?a().createElement("div",{"data-reltio-id":"branch-decorator",className:p()(o.decorator,{[o.plain]:n},e)},a().createElement("div",{className:o.wrapper},t)):a().createElement(a().Fragment,null,t)},LE=lr((e=>({caption:{display:"flex",color:e.palette.error.main,fontSize:"12px",lineHeight:"16px"}}))),jE=({className:e,message:t})=>{const n=LE();return t?a().createElement(gd(),{"data-reltio-id":"error-message",variant:"caption",className:p()(n.caption,e)},t):null},FE=lr({mark:{color:"red"}}),VE=()=>{const e=FE();return a().createElement("span",{className:e.mark},"*")},BE=lr({label:{color:"rgba(0,0,0,0.6)",fontSize:"13px",lineHeight:"16px"}});function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HE.apply(null,arguments)}const zE=e=>{let{label:t,isRequired:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["label","isRequired","className"]);const i=BE();return a().createElement(gd(),HE({className:p()(i.label,r),component:"span"},o),t,n&&a().createElement(VE,null))},UE=a().createContext("");UE.displayName="SearchValueContext";const ZE=lr({highlight:{fontWeight:600}}),WE=({text:e,highlight:t,className:n,multiTerm:r=!1})=>{const o=ZE();if(!e||!t)return a().createElement(a().Fragment,null,e);const i=new RegExp(/\s+/),l=(0,f.pipe)(f.trim,(0,f.split)(i),(0,f.map)(f.toLower),(0,f.sort)(f.ascend),f.reverse),s=r?l(t):[(0,f.toLower)(t)],u=s.map((e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))),c=e.split(new RegExp(`(${u.join("|")})`,"gi"));return a().createElement("span",null,c.map(((e,t)=>s.includes(e.toLocaleLowerCase())?a().createElement("span",{key:t,className:n||o.highlight},e):e)))},qE=lr({highlightedText:{background:"rgb(255, 235, 203)"}}),$E=({text:e})=>{const t=qE(),n=(0,r.useContext)(UE);return a().createElement(WE,{text:e,highlight:n,className:t.highlightedText,multiTerm:!0})},KE=({value:e=null,dataTypeDefinition:t,rich:n=!0})=>{const r=Ar().localeData().longDateFormat("L"),o=Ar().localeData().longDateFormat("LTS"),i=T(),l=k((e=>e.dateMask))||r,u=k((e=>e.dateTimeMask))||r+" "+o,c=(0,s.formatDataTypeValue)({attributesPresentation:i,dataTypeDefinition:t,dateMask:l,dateTimeMask:u},e);return n&&(0,s.isAttributeValueLink)(t,e)?a().createElement(qd(),{target:"_blank",href:(0,s.addProtocolToLink)(c),underline:"none"},a().createElement($E,{text:c})):a().createElement($E,{text:c})};KE.propTypes={value:yt().any,dataTypeDefinition:yt().object,rich:yt().bool};const GE=a().createContext(null);GE.displayName="EntityContext";const YE=lr((e=>({container:{height:"16px",borderColor:(0,_r.alpha)(e.palette.primary.main,.54)},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px",color:e.palette.primary.main}}))),XE=ep($x()),QE=({className:e,attributeType:t,nonOvValues:n=[],nonOvTotal:o})=>{const i=YE(),l=z("openEntity"),u=((e,t,n)=>{var r;const a=null==t||null===(r=t[0])||void 0===r?void 0:r.uri,o=a?(0,s.getEntityUriFromAttributeUri)(a):null;if(o&&(0,s.isEntityUri)(o)){const t=(0,s.getEntityUriFromAttributeUri)(n.uri);if(!e||e.type===t)return{uri:o,type:t};const r=(0,s.getParentUri)(a),i=(0,s.findAttributeValueByUri)(e,r);return{uri:(0,s.getReferencedEntityUriFromAttrValue)(i),type:t}}return e?{uri:e.uri,type:e.type}:null})((0,r.useContext)(GE),n,t),c=(d=null==u?void 0:u.type,k((e=>(0,s.checkProfileScreenIsEnabled)(e.uiConfigProfile,s.ScreenType.Sources,d))));var d;const f=(0,r.useCallback)((()=>{l({uri:u.uri,screen:"sources"})}),[l,u]);if(!o)return null;const m=n.length?n.map(((e,n)=>a().createElement("div",{"data-reltio-id":"non-ov-value",key:n},(0,s.isComplexAttribute)(t)?(0,s.getLabel)(e.label):a().createElement(KE,{value:(0,s.getAttributeValue)(e),dataTypeDefinition:(0,s.getAttrDataTypeDefinition)(t),rich:!1})))):null;return a().createElement(XE,{"data-reltio-id":"ov-icon",tooltipTitle:m,tooltipPlacement:"bottom",label:`+ ${o}`,variant:"outlined",onClick:null!=u&&u.uri&&c?f:void 0,classes:{root:p()(i.container,e),label:i.label}})};var JE=n(6800),eC=n.n(JE);const tC=lr({link:{display:"flex",marginTop:4},icon:{fontSize:"1rem"}}),nC=({onClick:e})=>{const t=tC();return a().createElement(qd(),{"data-reltio-id":"show-less",component:"button",variant:"caption",className:t.link,onClick:e,underline:"none"},a().createElement(eC(),{className:t.icon}),c().text("Show less"))};var rC=n(3062),aC=n.n(rC);const oC=lr({link:{display:"flex",marginTop:4},icon:{fontSize:"1rem"}}),iC=({moreNumber:e,valueNumber:t,onClick:n})=>{const r=oC();return a().createElement(qd(),{"data-reltio-id":"show-more",component:"button",variant:"caption",className:r.link,onClick:n,underline:"none"},a().createElement(aC(),{className:r.icon}),e&&t?c().text("Show ${moreNumber} more of remaining ${valueNumber} value",{moreNumber:e,valueNumber:t}):c().text("Show more"))};var lC=n(6826),sC=n.n(lC);const uC={variant:"filled",size:"small",InputProps:{hiddenLabel:!0}};function cC(){return cC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cC.apply(null,arguments)}const dC=e=>{let{value:t,onChange:n=f.identity}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","onChange"]);return a().createElement(pf(),cC({},r,{checked:t,onChange:(0,f.pipe)(Df,n)}))},pC=lr((e=>({editors:{width:"fit-content"},checkboxPrimary:{color:e.palette.divider},label:{color:e.palette.text.secondary},isCrossedOut:{position:"relative","&:before":{content:"''",position:"absolute",height:"1px",background:e.palette.text.secondary,top:"50%",left:"-3px",right:"13px"}}}))),fC=({value:e,onChange:t,className:n,isCrossedOut:r,disabled:o})=>{const i=pC();return a().createElement("div",{className:n},a().createElement("div",{className:p()(i.editors,{[i.isCrossedOut]:r})},a().createElement(fE(),{classes:{label:i.label},control:a().createElement(dC,{classes:{root:i.checkboxPrimary},color:"primary",value:!(0,f.isNil)(e)&&!!e,onChange:t,disabled:o}),label:c().text("Yes")}),a().createElement(fE(),{classes:{label:i.label},control:a().createElement(dC,{classes:{root:i.checkboxPrimary},color:"primary",value:!(0,f.isNil)(e)&&!e,onChange:t&&(0,f.pipe)(f.not,t),disabled:o}),label:c().text("No")})))};var mC=n(3290),hC=n.n(mC);function gC(e,t){return"function"==typeof e?e(t):e}const vC=(e,t)=>e.length===t.length&&t.every((t=>e.includes(t))),yC=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const a=null!=n?n:r;let o;if(null!=e)o=e;else if(a.includes(t))o=t;else{if(!(a.length>0))throw new Error("MUI: The `views` prop must contain at least one view");o=a[0]}return{views:a,openTo:o}},bC=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:a,isDateDisabled:o,utils:i})=>{const l=i.startOfDay(i.date());n&&i.isBefore(a,l)&&(a=l),t&&i.isAfter(r,l)&&(r=l);let s=e,u=e;for(i.isBefore(e,a)&&(s=a,u=null),i.isAfter(e,r)&&(u&&(u=r),s=null);s||u;){if(s&&i.isAfter(s,r)&&(s=null),u&&i.isBefore(u,a)&&(u=null),s){if(!o(s))return s;s=i.addDays(s,1)}if(u){if(!o(u))return u;u=i.addDays(u,-1)}}return null},xC=(e,t,n,r)=>e.isBefore(t,n)?n:e.isAfter(t,r)?r:t,wC=(e,t,n)=>null!=t&&e.isValid(t)?t:n,EC=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},CC=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},SC=(e,t)=>"date"===t?e.startOfDay(e.date()):e.date(),OC=["year","month","day"],kC=e=>OC.includes(e),AC=(e,{format:t,views:n},r)=>{if(null!=t)return t;const a=e.formats;return vC(n,["year"])?a.year:vC(n,["month"])?a.month:vC(n,["day"])?a.dayOfMonth:vC(n,["month","year"])?`${a.month} ${a.year}`:vC(n,["day","month"])?`${a.month} ${a.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?a.normalDateWithWeekday:a.normalDate:a.keyboardDate},PC=["hours","minutes","seconds"],TC=e=>PC.includes(e),DC=e=>PC.includes(e)||"meridiem"===e,MC=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,_C=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,IC=(e,t,n,r)=>{const a=_C(r.getHours(e),t,n);return r.setHours(e,a)},NC=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),RC=(e,t)=>(n,r)=>e?t.isAfter(n,r):NC(n,t)>NC(r,t),LC=(e,{format:t,views:n,ampm:r})=>{if(null!=t)return t;const a=e.formats;return vC(n,["hours"])?r?`${a.hours12h} ${a.meridiem}`:a.hours24h:vC(n,["minutes"])?a.minutes:vC(n,["seconds"])?a.seconds:vC(n,["minutes","seconds"])?`${a.minutes}:${a.seconds}`:vC(n,["hours","minutes","seconds"])?r?`${a.hours12h}:${a.minutes}:${a.seconds} ${a.meridiem}`:`${a.hours24h}:${a.minutes}:${a.seconds}`:r?`${a.hours12h}:${a.minutes} ${a.meridiem}`:`${a.hours24h}:${a.minutes}`},jC={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},FC=(e,t,n)=>{if(t===jC.year)return e.startOfYear(n);if(t===jC.month)return e.startOfMonth(n);if(t===jC.day)return e.startOfDay(n);let r=n;return t<jC.minutes&&(r=e.setMinutes(r,0)),t<jC.seconds&&(r=e.setSeconds(r,0)),t<jC.milliseconds&&(r=e.setMilliseconds(r,0)),r},VC=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},BC=(e,t)=>{const n=[],r=e.date(),a=e.startOfWeek(r),o=e.endOfWeek(r);let i=a;for(;e.isBefore(i,o);)n.push(i),i=e.addDays(i,1);return n.map((n=>e.formatByString(n,t)))},HC=(e,t,n)=>{switch(t){case"month":return EC(e,e.date()).map((t=>e.formatByString(t,n)));case"weekDay":return BC(e,n);case"meridiem":{const t=e.date();return[e.startOfDay(t),e.endOfDay(t)].map((t=>e.formatByString(t,n)))}default:return[]}},zC=(e,t,n)=>{let r=t;for(r=Number(r).toString();r.length<n;)r=`0${r}`;return r},UC=(e,t,n,r)=>{if("day"===r.type&&"digit-with-letter"===r.contentType){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,r.format)}const a=t.toString();return r.hasLeadingZerosInInput?zC(0,a,r.maxLength):a},ZC=(e,t)=>{let n=e.value||e.placeholder;const r="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(n=Number(n).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!r&&1===n.length&&(n=`${n}`),"input-rtl"===t&&(n=`${n}`),n},WC=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),qC=(e,t)=>{let n=0,r=t?1:0;const a=[];for(let o=0;o<e.length;o+=1){const i=e[o],l=ZC(i,t?"input-rtl":"input-ltr"),s=`${i.startSeparator}${l}${i.endSeparator}`,u=WC(s).length,c=s.length,d=WC(l),p=r+l.indexOf(d[0])+i.startSeparator.length,f=p+d.length;a.push((0,$.Z)({},i,{start:n,end:n+u,startInInput:p,endInInput:f})),n+=u,r+=c}return a},$C=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(),r).length});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType});case"day":return t.fieldDayPlaceholder();case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType});case"hours":return t.fieldHoursPlaceholder();case"minutes":return t.fieldMinutesPlaceholder();case"seconds":return t.fieldSecondsPlaceholder();case"meridiem":return t.fieldMeridiemPlaceholder();default:return r}},KC=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),GC=(e,t)=>4===e.formatByString(e.date(),t).length,YC=(e,t,n,r)=>{if("digit"!==t)return!1;switch(n){case"year":return GC(e,r)?"0001"===e.formatByString(e.setYear(e.date(),1),r):"01"===e.formatByString(e.setYear(e.date(),2001),r);case"month":return e.formatByString(e.startOfYear(e.date()),r).length>1;case"day":return e.formatByString(e.startOfMonth(e.date()),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(e.date()),r).length>1;case"hours":return e.formatByString(e.setHours(e.date(),1),r).length>1;case"minutes":case"seconds":return e.formatByString(e.setMinutes(e.date(),1),r).length>1;default:throw new Error("Invalid section type")}},XC=(e,t,n,r,a,o,i)=>{let l="";const s=[],u=e.date(),c=n=>{if(""===n)return null;const a=VC(e,n),i=YC(e,a.contentType,a.type,n),c=o?i:"digit"===a.contentType,d=null!=r&&e.isValid(r);let p=d?e.formatByString(r,n):"",f=null;if(c)if(i)f=""===p?e.formatByString(u,n).length:p.length;else{if(null==a.maxLength)throw new Error(`MUI: The token ${n} should have a 'maxDigitNumber' property on it's adapter`);f=a.maxLength,d&&(p=zC(0,p,f))}return s.push((0,$.Z)({},a,{format:n,maxLength:f,value:p,placeholder:$C(e,t,a,n),hasLeadingZeros:i,hasLeadingZerosInFormat:i,hasLeadingZerosInInput:c,startSeparator:0===s.length?l:"",endSeparator:"",modified:!1})),null};let d=10,p=n,f=e.expandFormat(n);for(;f!==p;)if(p=f,f=e.expandFormat(p),d-=1,d<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const m=f,h=((e,t)=>{const n=[],{start:r,end:a}=e.escapedCharacters,o=new RegExp(`(\\${r}[^\\${a}]*\\${a})+`,"g");let i=null;for(;i=o.exec(t);)n.push({start:i.index,end:o.lastIndex-1});return n})(e,m),g=new RegExp(`^(${Object.keys(e.formatTokenMap).join("|")})`);let v="";for(let e=0;e<m.length;e+=1){const t=h.find((t=>t.start<=e&&t.end>=e)),n=m[e],r=null!=t,a=`${v}${m.slice(e)}`;!r&&n.match(/([A-Za-z]+)/)&&g.test(a)?v+=n:r&&(null==t?void 0:t.start)===e||(null==t?void 0:t.end)===e||(c(v),v="",0===s.length?l+=n:s[s.length-1].endSeparator+=n)}return c(v),s.map((e=>{const t=e=>{let t=e;return i&&null!==t&&t.includes(" ")&&(t=`${t}`),"spacious"===a&&["/",".","-"].includes(t)&&(t=` ${t} `),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e}))},QC=(e,t)=>{const n=t.some((e=>"day"===e.type)),r=[],a=[];for(let e=0;e<t.length;e+=1){const o=t[e];n&&"weekDay"===o.type||(r.push(o.format),a.push(ZC(o,"non-input")))}const o=r.join(" "),i=a.join(" ");return e.parse(i,o)},JC={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},eS=(e,t,n,r,a)=>[...n].sort(((e,t)=>JC[e.type]-JC[t.type])).reduce(((n,r)=>!a||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const r=BC(e,t.format),a=e.formatByString(n,t.format),o=r.indexOf(a),i=r.indexOf(t.value)-o;return e.addDays(n,i)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,a=e.getHours(r);return t&&a>=12?e.addHours(r,-12):!t&&a<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n),r),tS=["value","referenceDate"],nS={emptyValue:null,getTodayValue:SC,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,q.Z)(e,tS);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,valueType:n,granularity:r})=>{var a;let o=FC(t,r,SC(t,n));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=FC(t,r,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=FC(t,r,e.maxDate));const i=RC(null!=(a=e.disableIgnoringDatePartForTimeValidation)&&a,t);return null!=e.minTime&&i(e.minTime,o)&&(o=FC(t,r,e.disableIgnoringDatePartForTimeValidation?e.minTime:CC(t,o,e.minTime))),null!=e.maxTime&&i(o,e.maxTime)&&(o=FC(t,r,e.disableIgnoringDatePartForTimeValidation?e.maxTime:CC(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null==t?null:e.getTimezone(t)},rS={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r,a)=>!e.isValid(t)&&n?n:qC(a(t),r),getValueStrFromSections:(e,t)=>{const n=e.map((e=>{const n=ZC(e,t?"input-rtl":"input-ltr");return`${e.startSeparator}${n}${e.endSeparator}`})).join("");return t?`${n}`:n},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},aS={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},oS=aS;var iS;iS=aS,(0,$.Z)({},iS);const lS=()=>{const e=r.useContext(Nr);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=r.useMemo((()=>(0,$.Z)({},oS,e.localeText)),[e.localeText]);return r.useMemo((()=>(0,$.Z)({},e,{localeText:t})),[e,t])},sS=()=>lS().utils,uS=()=>lS().defaultDates,cS=()=>lS().localeText,dS=()=>{const e=sS();return r.useRef(e.date()).current};function pS(e,t,n=void 0){const r={};return Object.keys(e).forEach((a=>{r[a]=e[a].reduce(((e,r)=>{if(r){const a=t(r);""!==a&&e.push(a),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}function fS(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fS(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const mS=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fS(e))&&(r&&(r+=" "),r+=t);return r};var hS=n(3643),gS=n.n(hS);const vS=e=>e,yS=(()=>{let e=vS;return{configure(t){e=t},generate:t=>e(t),reset(){e=vS}}})(),bS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function xS(e,t,n="Mui"){const r=bS[t];return r?`${n}-${r}`:`${yS.generate(e)}-${t}`}function wS(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=xS(e,t,n)})),r}function ES(e){return xS("MuiPickersToolbar",e)}const CS=wS("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"]),SS=(0,_r.styled)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>(0,$.Z)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}))),OS=(0,_r.styled)(gS(),{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((({ownerState:e})=>(0,$.Z)({flex:1},!e.isLandscape&&{alignItems:"center"}))),kS=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiPickersToolbar"}),{children:r,className:a,isLandscape:o,landscapeDirection:i="column",toolbarTitle:l,hidden:s,titleId:u}=n,c=n,d=(e=>{const{classes:t,isLandscape:n}=e;return pS({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},ES,t)})(c);return s?null:(0,Wn.jsxs)(SS,{ref:t,className:mS(d.root,a),ownerState:c,children:[(0,Wn.jsx)(gd(),{color:"text.secondary",variant:"overline",id:u,children:l}),(0,Wn.jsx)(OS,{container:!0,justifyContent:o?"flex-start":"space-between",className:d.content,ownerState:c,direction:o?i:"row",alignItems:o?"flex-start":"flex-end",children:r})]})}));function AS(e){return xS("MuiDatePickerToolbar",e)}wS("MuiDatePickerToolbar",["root","title"]);const PS=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views"],TS=(0,_r.styled)(kS,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),DS=(0,_r.styled)(gd(),{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})((({ownerState:e})=>(0,$.Z)({},e.isLandscape&&{margin:"auto 16px auto auto"}))),MS=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiDatePickerToolbar"}),{value:a,isLandscape:o,toolbarFormat:i,toolbarPlaceholder:l="––",views:s}=n,u=(0,q.Z)(n,PS),c=sS(),d=cS(),p=(e=>{const{classes:t}=e;return pS({root:["root"],title:["title"]},AS,t)})(n),f=r.useMemo((()=>{if(!a)return l;const e=AC(c,{format:i,views:s},!0);return c.formatByString(a,e)}),[a,i,l,c,s]),m=n;return(0,Wn.jsx)(TS,(0,$.Z)({ref:t,toolbarTitle:d.datePickerToolbarTitle,isLandscape:o,className:p.root},u,{children:(0,Wn.jsx)(DS,{variant:"h4",align:o?"left":"center",ownerState:m,className:p.title,children:f})}))})),_S=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>(0,$.Z)({},t,{[`${n.slice(0,1).toLowerCase()}${n.slice(1)}`]:e[n]})),{})};function IS(e,t){var n,a,o,i;const l=sS(),s=uS(),u=(0,_r.useThemeProps)({props:e,name:t}),c=r.useMemo((()=>{var e;return null==(null==(e=u.localeText)?void 0:e.toolbarTitle)?u.localeText:(0,$.Z)({},u.localeText,{datePickerToolbarTitle:u.localeText.toolbarTitle})}),[u.localeText]),d=null!=(n=u.slots)?n:_S(u.components);return(0,$.Z)({},u,{localeText:c},yC({views:u.views,openTo:u.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:null!=(a=u.disableFuture)&&a,disablePast:null!=(o=u.disablePast)&&o,minDate:wC(l,u.minDate,s.minDate),maxDate:wC(l,u.maxDate,s.maxDate),slots:(0,$.Z)({toolbar:MS},d),slotProps:null!=(i=u.slotProps)?i:u.componentsProps})}const NS=({props:e,value:t,adapter:n})=>{if(null===t)return null;const r=n.utils.date(),a=wC(n.utils,e.minDate,n.defaultDates.minDate),o=wC(n.utils,e.maxDate,n.defaultDates.maxDate);switch(!0){case!n.utils.isValid(t):return"invalidDate";case Boolean(e.shouldDisableDate&&e.shouldDisableDate(t)):return"shouldDisableDate";case Boolean(e.shouldDisableMonth&&e.shouldDisableMonth(t)):return"shouldDisableMonth";case Boolean(e.shouldDisableYear&&e.shouldDisableYear(t)):return"shouldDisableYear";case Boolean(e.disableFuture&&n.utils.isAfterDay(t,r)):return"disableFuture";case Boolean(e.disablePast&&n.utils.isBeforeDay(t,r)):return"disablePast";case Boolean(a&&n.utils.isBeforeDay(t,a)):return"minDate";case Boolean(o&&n.utils.isAfterDay(t,o)):return"maxDate";default:return null}};function RS(...e){return r.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)}))}),e)}function LS(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}const jS=["elementType","externalSlotProps","ownerState"];function FS(e){var t;const{elementType:n,externalSlotProps:r,ownerState:a}=e,o=(0,q.Z)(e,jS),i=gC(r,a),{props:l,internalRef:s}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:a,className:o}=e;if(!t){const e=mS(null==a?void 0:a.className,null==r?void 0:r.className,o,null==n?void 0:n.className),t=(0,$.Z)({},null==n?void 0:n.style,null==a?void 0:a.style,null==r?void 0:r.style),i=(0,$.Z)({},n,a,r);return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const i=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}((0,$.Z)({},a,r)),l=LS(r),s=LS(a),u=t(i),c=mS(null==u?void 0:u.className,null==n?void 0:n.className,o,null==a?void 0:a.className,null==r?void 0:r.className),d=(0,$.Z)({},null==u?void 0:u.style,null==n?void 0:n.style,null==a?void 0:a.style,null==r?void 0:r.style),p=(0,$.Z)({},u,n,s,l);return c.length>0&&(p.className=c),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:u.ref}}((0,$.Z)({},o,{externalSlotProps:i})),u=RS(s,null==i?void 0:i.ref,null==(t=e.additionalProps)?void 0:t.ref),c=function(e,t,n){return void 0===e||"string"==typeof e?t:(0,$.Z)({},t,{ownerState:(0,$.Z)({},t.ownerState,n)})}(n,(0,$.Z)({},l,{ref:u}),a);return c}var VS=n(8214),BS=n.n(VS),HS=n(7676),zS=n(5849),US=n(9308),ZS=n.n(US),WS=n(3893),qS=n.n(WS);const $S="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function KS(e){const t=r.useRef(e);return $S((()=>{t.current=e})),r.useCallback(((...e)=>(0,t.current)(...e)),[])}function GS(e){return e&&e.ownerDocument||document}function YS(e){return xS("MuiPickersPopper",e)}wS("MuiPickersPopper",["root","paper"]);const XS=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?XS(t.shadowRoot):t:null},QS="@media (pointer: fine)",JS=(0,_r.styled)(Qp(),{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({zIndex:e.zIndex.modal}))),eO=(0,_r.styled)(Kp(),{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({ownerState:e})=>(0,$.Z)({transformOrigin:"top center",outline:0},"top"===e.placement&&{transformOrigin:"bottom center"})));function tO(e){var t,n,a,o;const i=(0,_r.useThemeProps)({props:e,name:"MuiPickersPopper"}),{anchorEl:l,children:s,containerRef:u=null,shouldRestoreFocus:c,onBlur:d,onDismiss:p,open:f,role:m,placement:h,slots:g,slotProps:v}=i;r.useEffect((()=>{function e(e){!f||"Escape"!==e.key&&"Esc"!==e.key||p()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[p,f]);const y=r.useRef(null);r.useEffect((()=>{"tooltip"===m||c&&!c()||(f?y.current=XS(document):y.current&&y.current instanceof HTMLElement&&setTimeout((()=>{y.current instanceof HTMLElement&&y.current.focus()})))}),[f,m,c]);const[b,x,w]=function(e,t){const n=r.useRef(!1),a=r.useRef(!1),o=r.useRef(null),i=r.useRef(!1);r.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),i.current=!1};function t(){i.current=!0}}),[e]);const l=KS((e=>{if(!i.current)return;const r=a.current;a.current=!1;const l=GS(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,l))return;if(n.current)return void(n.current=!1);let s;s=e.composedPath?e.composedPath().indexOf(o.current)>-1:!l.documentElement.contains(e.target)||o.current.contains(e.target),s||r||t(e)})),s=()=>{a.current=!0};return r.useEffect((()=>{if(e){const e=GS(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",l),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",l),e.removeEventListener("touchmove",t)}}}),[e,l]),r.useEffect((()=>{if(e){const e=GS(o.current);return e.addEventListener("click",l),()=>{e.removeEventListener("click",l),a.current=!1}}}),[e,l]),[o,s,s]}(f,null!=d?d:p),E=RS(r.useRef(null),u),C=RS(E,b),S=i,O=(e=>{const{classes:t}=e;return pS({root:["root"],paper:["paper"]},YS,t)})(S),k=null!=(t=null==g?void 0:g.desktopTransition)?t:ZS(),A=null!=(n=null==g?void 0:g.desktopTrapFocus)?n:qS(),P=null!=(a=null==g?void 0:g.desktopPaper)?a:eO,T=FS({elementType:P,externalSlotProps:null==v?void 0:v.desktopPaper,additionalProps:{tabIndex:-1,elevation:8,ref:C},className:O.paper,ownerState:{}}),D=null!=(o=null==g?void 0:g.popper)?o:JS,M=FS({elementType:D,externalSlotProps:null==v?void 0:v.popper,additionalProps:{transition:!0,role:m,open:f,anchorEl:l,placement:h,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),p())}},className:O.root,ownerState:i});return(0,Wn.jsx)(D,(0,$.Z)({},M,{children:({TransitionProps:e,placement:t})=>(0,Wn.jsx)(A,(0,$.Z)({open:f,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===m,isEnabled:()=>!0},null==v?void 0:v.desktopTrapFocus,{children:(0,Wn.jsx)(k,(0,$.Z)({},e,null==v?void 0:v.desktopTransition,{children:(0,Wn.jsx)(P,(0,$.Z)({},T,{onClick:e=>{var t;x(e),null==(t=T.onClick)||t.call(T,e)},onTouchStart:e=>{var t;w(e),null==(t=T.onTouchStart)||t.call(T,e)},ownerState:(0,$.Z)({},S,{placement:t}),children:s}))}))}))}))}function nO({controlled:e,default:t,name:n,state:a="value"}){const{current:o}=r.useRef(void 0!==e),[i,l]=r.useState(t);return[o?e:i,r.useCallback((e=>{o||l(e)}),[])]}var rO=n(8682);function aO(e,t,n,a){const{value:o,onError:i}=e,l=lS(),s=r.useRef(a),u=t({adapter:l,value:o,props:e});return r.useEffect((()=>{i&&!n(u,s.current)&&i(u,o),s.current=u}),[n,i,s,u,o]),u}var oO=n(4713);function iO({onChange:e,onViewChange:t,openTo:n,view:a,views:o,autoFocus:i,focusedView:l,onFocusedViewChange:s}){var u,c;const d=r.useRef(n),p=r.useRef(o),f=r.useRef(o.includes(n)?n:o[0]),[m,h]=nO({name:"useViews",state:"view",controlled:a,default:f.current}),g=r.useRef(i?m:null),[v,y]=nO({name:"useViews",state:"focusedView",controlled:l,default:g.current});r.useEffect((()=>{(d.current&&d.current!==n||p.current&&p.current.some((e=>!o.includes(e))))&&(h(o.includes(n)?n:o[0]),p.current=o,d.current=n)}),[n,h,m,o]);const b=o.indexOf(m),x=null!=(u=o[b-1])?u:null,w=null!=(c=o[b+1])?c:null,E=(0,rO.Z)(((e,t)=>{y(t?e:t=>e===t?null:t),null==s||s(e,t)})),C=(0,rO.Z)((e=>{e!==m&&(h(e),E(e,!0),t&&t(e))})),S=(0,rO.Z)((()=>{w&&C(w),E(w,!0)})),O=(0,rO.Z)(((t,n,r)=>{const a="finish"===n,i=r?o.indexOf(r)<o.length-1:Boolean(w);e(t,a&&i?"partial":n),a&&S()})),k=(0,rO.Z)(((t,n,r)=>{e(t,n?"partial":"finish",r),n&&(C(n),E(n,!0))}));return{view:m,setView:C,focusedView:v,setFocusedView:E,nextView:w,previousView:x,defaultView:f.current,goToNextView:S,setValueAndGoToNextView:O,setValueAndGoToView:k}}const lO=["className","sx"];function sO(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const uO=(cO=["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."],Array.isArray(cO)&&cO.join("\n"),({props:e,valueManager:t,valueType:n,wrapperVariant:a,inputRef:o,additionalViewProps:i,validator:l,autoFocusView:s})=>{const u=(({props:e,valueManager:t,valueType:n,wrapperVariant:a,validator:o})=>{const{onAccept:i,onChange:l,value:s,defaultValue:u,closeOnSelect:c="desktop"===a,selectedSections:d,onSelectedSectionsChange:p}=e,{current:f}=r.useRef(u),{current:m}=r.useRef(void 0!==s),h=sS(),g=lS(),[v,y]=nO({controlled:d,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:b,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{const a=r.useRef("boolean"==typeof e).current,[o,i]=r.useState(!1);return r.useEffect((()=>{if(a){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}}),[a,e]),{isOpen:o,setIsOpen:r.useCallback((e=>{a||i(e),e&&t&&t(),!e&&n&&n()}),[a,t,n])}})(e),[w,E]=r.useState((()=>{let e;return e=void 0!==s?s:void 0!==f?f:t.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}));aO((0,$.Z)({},e,{value:w.draft}),o,t.isSameError,t.defaultErrorState);const C=(0,rO.Z)((n=>{const r={action:n,dateState:w,hasChanged:e=>!t.areValuesEqual(h,n.value,e),isControlled:m,closeOnSelect:c},a=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:a}=e,o=!a&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!o||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):"setValueFromView"===t.name&&"shallow"!==t.selectionState&&(!!o||n(r.lastPublishedValue)))})(r),s=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:a,closeOnSelect:o}=e,i=!a&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):!("setValueFromView"!==t.name||"finish"!==t.selectionState||!o)&&(!!i||n(r.lastCommittedValue))})(r),u=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||"setValueFromView"===t.name&&"finish"===t.selectionState&&n})(r);if(E((e=>(0,$.Z)({},e,{draft:n.value,lastPublishedValue:a?n.value:e.lastPublishedValue,lastCommittedValue:s?n.value:e.lastCommittedValue,hasBeenModifiedSinceMount:!0}))),a&&l){const t={validationError:"setValueFromField"===n.name?n.context.validationError:o({adapter:g,value:n.value,props:(0,$.Z)({},e,{value:n.value})})};l(n.value,t)}s&&i&&i(n.value),u&&x(!1)}));if(void 0!==s&&(void 0===w.lastControlledValue||!t.areValuesEqual(h,w.lastControlledValue,s))){const e=t.areValuesEqual(h,w.draft,s);E((t=>(0,$.Z)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:s,lastPublishedValue:s,draft:s,hasBeenModifiedSinceMount:!0})))}const S=(0,rO.Z)((()=>{C({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),O=(0,rO.Z)((()=>{C({value:w.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),k=(0,rO.Z)((()=>{C({value:w.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),A=(0,rO.Z)((()=>{C({value:w.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),P=(0,rO.Z)((()=>{C({value:t.getTodayValue(h,n),name:"setValueFromAction",pickerAction:"today"})})),T=(0,rO.Z)((()=>x(!0))),D=(0,rO.Z)((()=>x(!1))),M=(0,rO.Z)(((e,t="partial")=>C({name:"setValueFromView",value:e,selectionState:t}))),_=(0,rO.Z)(((e,t)=>C({name:"setValueFromField",value:e,context:t}))),I=(0,rO.Z)((e=>{y(e),null==p||p(e)})),N={onClear:S,onAccept:O,onDismiss:k,onCancel:A,onSetToday:P,onOpen:T,onClose:D},R={value:w.draft,onChange:_,selectedSections:v,onSelectedSectionsChange:I},L=r.useMemo((()=>t.cleanValue(h,w.draft)),[h,t,w.draft]);return{open:b,fieldProps:R,viewProps:{value:L,onChange:M,onClose:D,open:b,onSelectedSectionsChange:I},layoutProps:(0,$.Z)({},N,{value:L,onChange:M,isValid:n=>{const r=o({adapter:g,value:n,props:(0,$.Z)({},e,{value:n})});return!t.hasError(r)}}),actions:N}})({props:e,valueManager:t,valueType:n,wrapperVariant:a,validator:l}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,inputRef:a,autoFocusView:o})=>{const{onChange:i,open:l,onSelectedSectionsChange:s,onClose:u}=t,{views:c,openTo:d,onViewChange:p,disableOpenPicker:f,viewRenderers:m}=e,h=(0,q.Z)(e,lO),{view:g,setView:v,defaultView:y,focusedView:b,setFocusedView:x,setValueAndGoToNextView:w}=iO({view:void 0,views:c,openTo:d,onChange:i,onViewChange:p,autoFocus:o}),{hasUIView:E,viewModeLookup:C}=r.useMemo((()=>c.reduce(((e,t)=>{let n;return n=f?"field":null!=m[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[f,m,c]),S=r.useMemo((()=>c.reduce(((e,t)=>null!=m[t]&&TC(t)?e+1:e),0)),[m,c]),O=C[g],k=(0,rO.Z)((()=>"UI"===O)),[A,P]=r.useState("UI"===O?g:null);return A!==g&&"UI"===C[g]&&P(g),(0,oO.default)((()=>{"field"===O&&l&&(u(),s("hours"),setTimeout((()=>{null==a||a.current.focus()})))}),[g]),(0,oO.default)((()=>{if(!l)return;let e=g;"field"===O&&null!=A&&(e=A),e!==y&&"UI"===C[e]&&"UI"===C[y]&&(e=y),e!==g&&v(e),x(e,!0)}),[l]),{hasUIView:E,shouldRestoreFocus:k,layoutProps:{views:c,view:A,onViewChange:v},renderCurrentView:()=>{if(null==A)return null;const e=m[A];return null==e?null:e((0,$.Z)({},h,n,t,{views:c,onChange:w,view:A,onViewChange:v,focusedView:b,onFocusedViewChange:x,showViewSwitcher:S>1,timeViewsCount:S}))}}})({props:e,inputRef:o,additionalViewProps:i,autoFocusView:s,propsFromPickerValue:u.viewProps}),d=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:a})=>{const{orientation:o}=e,i=((e,t)=>{const[n,a]=r.useState(sO);return $S((()=>{const e=()=>{a(sO())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),o=e,i=["hours","minutes","seconds"],!(Array.isArray(i)?i.every((e=>-1!==o.indexOf(e))):-1!==o.indexOf(i))&&"landscape"===(t||n);var o,i})(n.views,o);return{layoutProps:(0,$.Z)({},n,t,{isLandscape:i,wrapperVariant:a,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:a,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:d.layoutProps}});var cO;function dO(e){return xS("MuiPickersLayout",e)}const pO=wS("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]),fO=["onAccept","onClear","onCancel","onSetToday","actions"];function mO(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:a,actions:o}=e,i=(0,q.Z)(e,fO),l=cS();if(null==o||0===o.length)return null;const s=null==o?void 0:o.map((e=>{switch(e){case"clear":return(0,Wn.jsx)(br(),{onClick:n,children:l.clearButtonLabel},e);case"cancel":return(0,Wn.jsx)(br(),{onClick:r,children:l.cancelButtonLabel},e);case"accept":return(0,Wn.jsx)(br(),{onClick:t,children:l.okButtonLabel},e);case"today":return(0,Wn.jsx)(br(),{onClick:a,children:l.todayButtonLabel},e);default:return null}}));return(0,Wn.jsx)(vg(),(0,$.Z)({},i,{children:s}))}var hO=n(4437),gO=n.n(hO),vO=n(5106),yO=n.n(vO);const bO=48,xO=["items","isLandscape","onChange","isValid"];function wO(e){const{items:t,onChange:n,isValid:r}=e,a=(0,q.Z)(e,xO);if(null==t||0===t.length)return null;const o=t.map((e=>{const t=e.getValue({isValid:r});return{label:e.label,onClick:()=>{n(t)},disabled:!r(t)}}));return(0,Wn.jsx)(gO(),(0,$.Z)({dense:!0,sx:[{maxHeight:358,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:o.map((e=>(0,Wn.jsx)(yO(),{children:(0,Wn.jsx)($x(),(0,$.Z)({},e))},e.label)))}))}const EO=(0,_r.styled)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${pO.toolbar}`]:t.isLandscape?{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${pO.shortcuts}`]:t.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"},[`& .${pO.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}})));EO.propTypes={as:yt().elementType,ownerState:yt().shape({isLandscape:yt().bool.isRequired}).isRequired,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object])};const CO=(0,_r.styled)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),SO=function(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiPickersLayout"}),{toolbar:n,content:a,tabs:o,actionBar:i,shortcuts:l}=(e=>{var t,n;const{wrapperVariant:r,onAccept:a,onClear:o,onCancel:i,onSetToday:l,view:s,views:u,onViewChange:c,value:d,onChange:p,isValid:f,isLandscape:m,disabled:h,readOnly:g,children:v,components:y,componentsProps:b,slots:x,slotProps:w}=e,E=null!=x?x:_S(y),C=null!=w?w:b,S=(e=>{const{classes:t,isLandscape:n}=e;return pS({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},dO,t)})(e),O=null!=(t=null==E?void 0:E.actionBar)?t:mO,k=FS({elementType:O,externalSlotProps:null==C?void 0:C.actionBar,additionalProps:{onAccept:a,onClear:o,onCancel:i,onSetToday:l,actions:"desktop"===r?[]:["cancel","accept"],className:S.actionBar},ownerState:(0,$.Z)({},e,{wrapperVariant:r})}),A=(0,Wn.jsx)(O,(0,$.Z)({},k)),P=null==E?void 0:E.toolbar,T=FS({elementType:P,externalSlotProps:null==C?void 0:C.toolbar,additionalProps:{isLandscape:m,onChange:p,value:d,view:s,onViewChange:c,views:u,disabled:h,readOnly:g,className:S.toolbar},ownerState:(0,$.Z)({},e,{wrapperVariant:r})}),D=function(e){return null!==e.view}(T)&&P?(0,Wn.jsx)(P,(0,$.Z)({},T)):null,M=v,_=null==E?void 0:E.tabs,I=s&&_?(0,Wn.jsx)(_,(0,$.Z)({view:s,onViewChange:c},null==C?void 0:C.tabs)):null,N=null!=(n=null==E?void 0:E.shortcuts)?n:wO,R=FS({elementType:N,externalSlotProps:null==C?void 0:C.shortcuts,additionalProps:{isValid:f,isLandscape:m,onChange:p,className:S.shortcuts},ownerState:{isValid:f,isLandscape:m,onChange:p,className:S.shortcuts,wrapperVariant:r}});return{toolbar:D,content:M,tabs:I,actionBar:A,shortcuts:s&&N?(0,Wn.jsx)(N,(0,$.Z)({},R)):null}})(t),{sx:s,className:u,isLandscape:c,ref:d,wrapperVariant:p}=t,f=t,m=(e=>{const{isLandscape:t,classes:n}=e;return pS({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},dO,n)})(f);return(0,Wn.jsxs)(EO,{ref:d,sx:s,className:mS(u,m.root),ownerState:f,children:[c?l:n,c?n:l,(0,Wn.jsx)(CO,{className:m.contentWrapper,children:"desktop"===p?(0,Wn.jsxs)(r.Fragment,{children:[a,o]}):(0,Wn.jsxs)(r.Fragment,{children:[o,a]})}),i]})},OO=["props","getOpenDialogAriaText"],kO=["ownerState"],AO=["ownerState"],PO=e=>{var t,n,a,o,i;let{props:l,getOpenDialogAriaText:s}=e,u=(0,q.Z)(e,OO);const{slots:c,slotProps:d,className:p,sx:f,format:m,formatDensity:h,label:g,inputRef:v,readOnly:y,disabled:b,autoFocus:x,localeText:w}=l,E=sS(),C=r.useRef(null),S=r.useRef(null),O=(0,zS.Z)(),k=null!=(t=null==d||null==(n=d.toolbar)?void 0:n.hidden)&&t,{open:A,actions:P,hasUIView:T,layoutProps:D,renderCurrentView:M,shouldRestoreFocus:_,fieldProps:I}=uO((0,$.Z)({},u,{props:l,inputRef:C,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),N=null!=(a=c.inputAdornment)?a:BS(),R=FS({elementType:N,externalSlotProps:null==d?void 0:d.inputAdornment,additionalProps:{position:"end"},ownerState:l}),L=(0,q.Z)(R,kO),j=null!=(o=c.openPickerButton)?o:np(),F=FS({elementType:j,externalSlotProps:null==d?void 0:d.openPickerButton,additionalProps:{disabled:b||y,onClick:P.onOpen,"aria-label":s(I.value,E),edge:L.position},ownerState:l}),V=(0,q.Z)(F,AO),B=c.openPickerIcon,H=c.field,z=FS({elementType:H,externalSlotProps:null==d?void 0:d.field,additionalProps:(0,$.Z)({},I,k&&{id:O},{readOnly:y,disabled:b,className:p,sx:f,format:m,formatDensity:h,label:g,autoFocus:x&&!l.open,focused:!!A||void 0}),ownerState:l});T&&(z.InputProps=(0,$.Z)({},z.InputProps,{ref:S,[`${L.position}Adornment`]:(0,Wn.jsx)(N,(0,$.Z)({},L,{children:(0,Wn.jsx)(j,(0,$.Z)({},V,{children:(0,Wn.jsx)(B,(0,$.Z)({},null==d?void 0:d.openPickerIcon))}))}))}));const U=(0,$.Z)({textField:c.textField},z.slots),Z=null!=(i=c.layout)?i:SO,W=(0,HS.Z)(C,z.inputRef,v);let K=O;k&&(K=g?`${O}-label`:void 0);const G=(0,$.Z)({},d,{toolbar:(0,$.Z)({},null==d?void 0:d.toolbar,{titleId:O}),popper:(0,$.Z)({"aria-labelledby":K},null==d?void 0:d.popper)});return{renderPicker:()=>(0,Wn.jsxs)(Rr,{localeText:w,children:[(0,Wn.jsx)(H,(0,$.Z)({},z,{slots:U,slotProps:G,inputRef:W})),(0,Wn.jsx)(tO,(0,$.Z)({role:"dialog",placement:"bottom-start",anchorEl:S.current},P,{open:A,slots:c,slotProps:G,shouldRestoreFocus:_,children:(0,Wn.jsx)(Z,(0,$.Z)({},D,null==G?void 0:G.layout,{slots:c,slotProps:G,children:M()}))}))]})}};var TO=n(8157);const DO=(0,TO.createSvgIcon)((0,Wn.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),MO=(0,TO.createSvgIcon)((0,Wn.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),_O=(0,TO.createSvgIcon)((0,Wn.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),IO=(0,TO.createSvgIcon)((0,Wn.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),NO=((0,TO.createSvgIcon)((0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,Wn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,TO.createSvgIcon)((0,Wn.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange")),RO=(0,TO.createSvgIcon)((0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,Wn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");var LO=n(1429);const jO=e=>null!=e.saveQuery,FO=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error"],VO=e=>{const t=sS(),{state:n,selectedSectionIndexes:a,setSelectedSections:o,clearValue:i,clearActiveSection:l,updateSectionValue:s,updateValueFromValueStr:u,setTempAndroidValueStr:c,sectionsValueBoundaries:d,placeholder:p}=(e=>{var t;const n=sS(),a=cS(),o=lS(),i="rtl"===(0,_r.useTheme)().direction,{valueManager:l,fieldValueManager:s,valueType:u,validator:c,internalProps:d,internalProps:{value:p,defaultValue:f,referenceDate:m,onChange:h,format:g,formatDensity:v="dense",selectedSections:y,onSelectedSectionsChange:b,shouldRespectLeadingZeros:x=!1}}=e,w=r.useRef(f),E=null!=(t=null!=p?p:w.current)?t:l.emptyValue,C=r.useMemo((()=>(e=>{const t=e.date(),n=e.endOfYear(t),{maxDaysInMonth:r,longestMonth:a}=EC(e,t).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:GC(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(n)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):r,longestMonth:a}),weekDay:({format:t,contentType:n})=>{if("digit"===n){const n=BC(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:r})=>{const a=e.getHours(n);return e.formatByString(e.endOfDay(t),r)!==a.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(t),r))}:{minimum:0,maximum:a}},minutes:()=>({minimum:0,maximum:e.getMinutes(n)}),seconds:()=>({minimum:0,maximum:e.getSeconds(n)}),meridiem:()=>({minimum:0,maximum:0})}})(n)),[n]),S=r.useCallback(((e,t=null)=>s.getSectionsFromValue(n,e,t,i,(e=>XC(n,a,g,e,v,x,i)))),[s,g,a,i,x,n,v]),O=r.useMemo((()=>s.getValueStrFromSections(S(l.emptyValue),i)),[s,S,l.emptyValue,i]),[k,A]=r.useState((()=>{const e=S(E),t={sections:e,value:E,referenceValue:l.emptyValue,tempValueStrAndroid:null},r=(e=>Math.max(...e.map((e=>{var t;return null!=(t=jC[e.type])?t:1}))))(e),a=l.getInitialReferenceValue({referenceDate:m,value:E,valueType:u,utils:n,props:d,granularity:r});return(0,$.Z)({},t,{referenceValue:a})})),[P,T]=(0,LO.Z)({controlled:y,default:null,name:"useField",state:"selectedSectionIndexes"}),D=e=>{T(e),null==b||b(e),A((e=>(0,$.Z)({},e,{selectedSectionQuery:null})))},M=r.useMemo((()=>{if(null==P)return null;if("all"===P)return{startIndex:0,endIndex:k.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"==typeof P)return{startIndex:P,endIndex:P};if("string"==typeof P){const e=k.sections.findIndex((e=>e.type===P));return{startIndex:e,endIndex:e}}return P}),[P,k.sections]),_=({value:e,referenceValue:t,sections:n})=>{if(A((r=>(0,$.Z)({},r,{sections:n,value:e,referenceValue:t,tempValueStrAndroid:null}))),h){const t={validationError:c({adapter:o,value:e,props:(0,$.Z)({},d,{value:e})})};h(e,t)}},I=(e,t)=>{const n=[...k.sections];return n[e]=(0,$.Z)({},n[e],{value:t,modified:!0}),qC(n,i)};return r.useEffect((()=>{let e=!1;e=!l.areValuesEqual(n,k.value,E)||l.getTimezone(n,k.value)!==l.getTimezone(n,E),e&&A((e=>(0,$.Z)({},e,{value:E,referenceValue:s.updateReferenceValue(n,E,e.referenceValue),sections:S(E)})))}),[E]),r.useEffect((()=>{const e=S(k.value);A((t=>(0,$.Z)({},t,{sections:e})))}),[g,n.locale]),{state:k,selectedSectionIndexes:M,setSelectedSections:D,clearValue:()=>{l.areValuesEqual(n,k.value,l.emptyValue)||_({value:l.emptyValue,referenceValue:k.referenceValue,sections:S(l.emptyValue)})},clearActiveSection:()=>{if(null==M)return;const e=k.sections[M.startIndex];if(""===e.value)return;const t=s.getActiveDateManager(n,k,e),r=1===t.getSections(k.sections).filter((e=>""!==e.value)).length,a=I(M.startIndex,""),o=r?null:n.date(new Date("")),i=t.getNewValuesFromNewActiveDate(o);(null!=o&&!n.isValid(o))!=(null!=t.date&&!n.isValid(t.date))?_((0,$.Z)({},i,{sections:a})):A((e=>(0,$.Z)({},e,i,{sections:a,tempValueStrAndroid:null})))},updateSectionValue:({activeSection:e,newSectionValue:t,shouldGoToNextSection:r})=>{r&&M&&M.startIndex<k.sections.length-1?D(M.startIndex+1):M&&M.startIndex!==M.endIndex&&D(M.startIndex);const a=s.getActiveDateManager(n,k,e),o=I(M.startIndex,t),i=a.getSections(o);let l,u,c=QC(n,i),d=!1;if(!n.isValid(c)){const e=((e,t,n)=>{if(!t.every((e=>"weekDay"===e.type||""!==e.value))||!t.some((e=>"day"===e.type)))return null;const r=t.map((t=>{if("day"!==t.type)return t;const r=n.day({currentDate:null,format:t.format,contentType:t.contentType});return(0,$.Z)({},t,{value:UC(e,r.minimum,r,t)})})),a=QC(e,r);return null!=a&&e.isValid(a)?t.map((e=>{if("day"!==e.type)return e;const t=n.day({currentDate:a,format:e.format,contentType:e.contentType});return Number(e.value)<=t.maximum?e:(0,$.Z)({},e,{value:t.maximum.toString()})})):null})(n,i,C);null!=e&&(d=!0,c=QC(n,e))}if(null!=c&&n.isValid(c)){const e=eS(n,c,i,a.referenceDate,!0);l=a.getNewValuesFromNewActiveDate(e),u=!0}else l=a.getNewValuesFromNewActiveDate(c),u=(null!=c&&!n.isValid(c))!=(null!=a.date&&!n.isValid(a.date));const p=d?S(l.value,k.sections):o;return u?_((0,$.Z)({},l,{sections:p})):A((e=>(0,$.Z)({},e,l,{sections:p,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const t=s.parseValueStr(e,k.referenceValue,((e,t)=>{const r=n.parse(e,g);if(null==r||!n.isValid(r))return null;const o=XC(n,a,g,r,v,x,i);return eS(n,r,o,t,!1)})),r=s.updateReferenceValue(n,t,k.referenceValue);_({value:t,referenceValue:r,sections:S(t,k.sections)})},setTempAndroidValueStr:e=>A((t=>(0,$.Z)({},t,{tempValueStrAndroid:e}))),sectionsValueBoundaries:C,placeholder:O}})(e),{inputRef:f,internalProps:m,internalProps:{readOnly:h=!1,unstableFieldRef:g},forwardedProps:{onClick:v,onKeyDown:y,onFocus:b,onBlur:x,onMouseUp:w,onPaste:E,error:C},fieldValueManager:S,valueManager:O,validator:k}=e,A=(0,q.Z)(e.forwardedProps,FO),{applyCharacterEditing:P,resetCharacterQuery:T}=(({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,setTempAndroidValueStr:a})=>{const o=sS(),[i,l]=r.useState(null),s=(0,rO.Z)((()=>l(null)));r.useEffect((()=>{var t;null!=i&&(null==(t=e[i.sectionIndex])?void 0:t.type)!==i.sectionType&&s()}),[e,i,s]),r.useEffect((()=>{if(null!=i){const e=setTimeout((()=>s()),5e3);return()=>{window.clearTimeout(e)}}return()=>{}}),[i,s]);const u=({keyPressed:t,sectionIndex:n},r,a)=>{const o=t.toLowerCase(),u=e[n];if(null!=i&&(!a||a(i.value))&&i.sectionIndex===n){const e=`${i.value}${o}`,t=r(e,u);if(!jO(t))return l({sectionIndex:n,value:e,sectionType:u.type}),t}const c=r(o,u);return jO(c)&&!c.saveQuery?(s(),null):(l({sectionIndex:n,value:o,sectionType:u.type}),jO(c)?null:c)},c=(0,rO.Z)((r=>{const i=e[r.sectionIndex],l=Number.isNaN(Number(r.keyPressed))?(e=>{const t=(e,t,n)=>{const r=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,r,a)=>{const i=e=>HC(o,n.type,e);if("letter"===n.contentType)return t(n.format,i(n.format),e);if(r&&null!=a&&"letter"===VC(o,r).contentType){const n=i(r),o=t(0,n,e);return jO(o)?{saveQuery:!1}:(0,$.Z)({},o,{sectionValue:a(o.sectionValue,n)})}return{saveQuery:!1}};return u(e,((e,t)=>{switch(t.type){case"month":{const r=e=>KC(o,e,o.formats.month,t.format);return n(e,t,o.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,o.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(r):(e=>{const t=(e,t)=>{const r=Number(`${e}`),a=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(r>a.maximum)return{saveQuery:!1};if(r<a.minimum)return{saveQuery:!0};const i=Number(`${e}0`)>a.maximum||e.length===a.maximum.toString().length;return{sectionValue:UC(o,r,a,t),shouldGoToNextSection:i}};return u(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const r=YC(o,"digit","month","MM"),a=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(jO(a))return a;const i=KC(o,a.sectionValue,"MM",n.format);return(0,$.Z)({},a,{sectionValue:i})}if("weekDay"===n.type){const r=t(e,n);if(jO(r))return r;const a=BC(o,n.format)[Number(r.sectionValue)-1];return(0,$.Z)({},r,{sectionValue:a})}return{saveQuery:!1}}),(e=>!Number.isNaN(Number(e))))})(r);null==l?a(null):t({activeSection:i,newSectionValue:l.sectionValue,shouldGoToNextSection:l.shouldGoToNextSection})}));return{applyCharacterEditing:c,resetCharacterQuery:s}})({sections:n.sections,updateSectionValue:s,sectionsValueBoundaries:d,setTempAndroidValueStr:c}),D=r.useRef(null),M=(0,HS.Z)(f,D),_=r.useRef(void 0),I="rtl"===(0,_r.useTheme)().direction,N=r.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const a=0===r?null:r-1,o=r===e.length-1?null:r+1;n[r]={leftIndex:a,rightIndex:o}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},a={};let o=0,i=0,l=e.length-1;for(;l>=0;){i=e.findIndex(((e,t)=>{var n;return t>=o&&(null==(n=e.endSeparator)?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===i&&(i=e.length-1);for(let e=i;e>=o;e-=1)a[e]=l,r[l]=e,l-=1;o=i+1}return e.forEach(((t,o)=>{const i=a[o],l=0===i?null:r[i-1],s=i===e.length-1?null:r[i+1];n[o]={leftIndex:l,rightIndex:s}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(n.sections,I)),[n.sections,I]),R=()=>{var e;if(h)return void o(null);const t=null!=(e=D.current.selectionStart)?e:0;let r;r=t<=n.sections[0].startInInput||t>=n.sections[n.sections.length-1].endInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>t));const a=-1===r?n.sections.length-1:r-1;o(a)},L=(0,rO.Z)(((...e)=>{null==v||v(...e),R()})),j=(0,rO.Z)((e=>{null==w||w(e),e.preventDefault()})),F=(0,rO.Z)(((...e)=>{null==b||b(...e);const t=D.current;clearTimeout(_.current),_.current=setTimeout((()=>{t&&t===D.current&&(null!=a||h||(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?o("all"):R()))}))})),V=(0,rO.Z)(((...e)=>{null==x||x(...e),o(null)})),B=(0,rO.Z)((e=>{if(null==E||E(e),h)return void e.preventDefault();const t=e.clipboardData.getData("text");if(a&&a.startIndex===a.endIndex){const r=n.sections[a.startIndex],o=/^[a-zA-Z]+$/.test(t),i=/^[0-9]+$/.test(t),l=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===r.contentType&&o||"digit"===r.contentType&&i||"digit-with-letter"===r.contentType&&l)return;if(o||i)return void e.preventDefault()}e.preventDefault(),u(t)})),H=(0,rO.Z)((e=>{if(h)return;const t=e.target.value,r=WC(t);if(null==a)return void u(r);let o;if(0===a.startIndex&&a.endIndex===n.sections.length-1&&1===r.length)o=r;else{const e=WC(S.getValueStrFromSections(n.sections,I));let t=-1,i=-1;for(let n=0;n<e.length;n+=1)-1===t&&e[n]!==r[n]&&(t=n),-1===i&&e[e.length-n-1]!==r[r.length-n-1]&&(i=n);const l=n.sections[a.startIndex];if(t<l.start||e.length-i-1>l.end)return;const s=r.length-e.length+l.end-WC(l.endSeparator||"").length;o=r.slice(l.start+WC(l.startSeparator||"").length,s)}navigator.userAgent.toLowerCase().indexOf("android")>-1&&0===o.length?c(t):P({keyPressed:o,sectionIndex:a.startIndex})})),z=(0,rO.Z)((e=>{switch(null==y||y(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),o("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==a)o(N.startIndex);else if(a.startIndex!==a.endIndex)o(a.endIndex);else{const e=N.neighbors[a.startIndex].rightIndex;null!==e&&o(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==a)o(N.endIndex);else if(a.startIndex!==a.endIndex)o(a.startIndex);else{const e=N.neighbors[a.startIndex].leftIndex;null!==e&&o(e)}break;case["Backspace","Delete"].includes(e.key):if(e.preventDefault(),h)break;null==a||0===a.startIndex&&a.endIndex===n.sections.length-1?i():l(),T();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),h||null==a)break;const r=n.sections[a.startIndex],o=S.getActiveDateManager(t,n,r),i=((e,t,n,r,a)=>{const o=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(n),i="Home"===n,l="End"===n,s=""===t.value||i||l;return"digit"===t.contentType||"digit-with-letter"===t.contentType?(()=>{const n=r[t.type]({currentDate:a,format:t.format,contentType:t.contentType}),u=r=>UC(e,r,n,t);if(s)return"year"!==t.type||l||i?u(o>0||i?n.minimum:n.maximum):e.formatByString(e.date(),t.format);const c=parseInt(t.value,10)+o;return c>n.maximum?u(n.minimum):c<n.minimum?u(n.maximum):u(c)})():(()=>{const n=HC(e,t.type,t.format);if(0===n.length)return t.value;if(s)return o>0||i?n[0]:n[n.length-1];const r=n.indexOf(t.value);return n[(r+n.length+o)%n.length]})()})(t,r,e.key,d,o.date);s({activeSection:r,newSectionValue:i,shouldGoToNextSection:!1});break}}}));(0,oO.default)((()=>{if(null==a)return void(D.current.scrollLeft&&(D.current.scrollLeft=0));const e=n.sections[a.startIndex],t=n.sections[a.endIndex];let r=e.startInInput,o=t.endInInput;if(a.shouldSelectBoundarySelectors&&(r-=e.startSeparator.length,o+=t.endSeparator.length),r!==D.current.selectionStart||o!==D.current.selectionEnd){const e=D.current.scrollTop;D.current&&D.current===XS(document)&&D.current.setSelectionRange(r,o),D.current.scrollTop=e}}));const U=aO((0,$.Z)({},m,{value:n.value}),k,O.isSameError,O.defaultErrorState),Z=r.useMemo((()=>void 0!==C?C:O.hasError(U)),[O,U,C]);r.useEffect((()=>(D.current&&D.current===document.activeElement&&o("all"),()=>window.clearTimeout(_.current))),[]),r.useEffect((()=>{null!=n.tempValueStrAndroid&&null!=a&&(T(),l())}),[n.tempValueStrAndroid]);const W=r.useMemo((()=>{var e;return null!=(e=n.tempValueStrAndroid)?e:S.getValueStrFromSections(n.sections,I)}),[n.sections,S,n.tempValueStrAndroid,I]),K=r.useMemo((()=>null==a||"letter"===n.sections[a.startIndex].contentType?"text":"tel"),[a,n.sections]),G=!(D.current&&D.current===XS(document))&&O.areValuesEqual(t,n.value,O.emptyValue);return r.useImperativeHandle(g,(()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var e,t;const r=null!=(e=D.current.selectionStart)?e:0,a=null!=(t=D.current.selectionEnd)?t:0;if(0===r&&0===a)return null;const o=r<=n.sections[0].startInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>r));return-1===o?n.sections.length-1:o-1},setSelectedSections:e=>o(e)}))),(0,$.Z)({placeholder:p,autoComplete:"off"},A,{value:G?"":W,inputMode:K,readOnly:h,onClick:L,onFocus:F,onBlur:V,onPaste:B,onChange:H,onKeyDown:z,onMouseUp:j,error:Z,ref:M})},BO=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],HO=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],zO=["minDateTime","maxDateTime"],UO=[...BO,...HO,...zO],ZO=e=>UO.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}),WO=["value","defaultValue","referenceDate","format","formatDensity","onChange","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],qO=(e,t)=>{const n=(0,$.Z)({},e),r={},a=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return WO.forEach(a),"date"===t?BO.forEach(a):"time"===t?HO.forEach(a):"date-time"===t&&(BO.forEach(a),HO.forEach(a),zO.forEach(a)),{forwardedProps:n,internalProps:r}},$O=["components","componentsProps","slots","slotProps","InputProps","inputProps"],KO=["inputRef"],GO=["ref","onPaste","inputMode","readOnly"],YO=r.forwardRef((function(e,t){var n,r,a;const o=(0,_r.useThemeProps)({props:e,name:"MuiDateField"}),{components:i,componentsProps:l,slots:s,slotProps:u,InputProps:c,inputProps:d}=o,p=(0,q.Z)(o,$O),f=o,m=null!=(n=null!=(r=null==s?void 0:s.textField)?r:null==i?void 0:i.TextField)?n:Vx(),h=FS({elementType:m,externalSlotProps:null!=(a=null==u?void 0:u.textField)?a:null==l?void 0:l.textField,externalForwardedProps:p,ownerState:f}),{inputRef:g}=h,v=(0,q.Z)(h,KO);v.inputProps=(0,$.Z)({},v.inputProps,d),v.InputProps=(0,$.Z)({},v.InputProps,c);const y=(({props:e,inputRef:t})=>{const n=(e=>{var t,n,r;const a=sS(),o=uS();return(0,$.Z)({},e,{disablePast:null!=(t=e.disablePast)&&t,disableFuture:null!=(n=e.disableFuture)&&n,format:null!=(r=e.format)?r:a.formats.keyboardDate,minDate:wC(a,e.minDate,o.minDate),maxDate:wC(a,e.maxDate,o.maxDate)})})(e),{forwardedProps:r,internalProps:a}=qO(n,"date");return VO({inputRef:t,forwardedProps:r,internalProps:a,valueManager:nS,fieldValueManager:rS,validator:NS,valueType:"date"})})({props:v,inputRef:g}),{ref:b,onPaste:x,inputMode:w,readOnly:E}=y,C=(0,q.Z)(y,GO);return(0,Wn.jsx)(m,(0,$.Z)({ref:t},C,{InputProps:(0,$.Z)({},C.InputProps,{readOnly:E}),inputProps:(0,$.Z)({},C.inputProps,{inputMode:w,onPaste:x,ref:b})}))}));let XO=0;const QO=r["useId".toString()];function JO(e){if(void 0!==QO){const t=QO();return null!=e?e:t}return function(e){const[t,n]=r.useState(e),a=e||t;return r.useEffect((()=>{null==t&&(XO+=1,n(`mui-${XO}`))}),[t]),a}(e)}const ek=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:a,maxDate:o,disableFuture:i,disablePast:l})=>{const s=lS();return r.useCallback((r=>null!==NS({adapter:s,value:r,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:a,maxDate:o,disableFuture:i,disablePast:l}})),[s,e,t,n,a,o,i,l])};var tk=n(1310);const nk=e=>xS("MuiPickersFadeTransitionGroup",e),rk=(wS("MuiPickersFadeTransitionGroup",["root"]),e=>{const{classes:t}=e;return pS({root:["root"]},nk,t)}),ak=500,ok=(0,_r.styled)(tk.Z,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ik(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:a,transKey:o}=t,i=rk(t);return a?n:(0,Wn.jsx)(ok,{className:mS(i.root,r),children:(0,Wn.jsx)(Yp(),{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:ak,enter:ak/2,exit:0},children:n},o)})}var lk=n(3888),sk=n.n(lk);function uk(e){return xS("MuiPickersDay",e)}const ck=wS("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),dk=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],pk=({theme:e,ownerState:t})=>(0,$.Z)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,_r.alpha)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,_r.alpha)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${ck.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${ck.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${ck.disabled}:not(.${ck.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${ck.disabled}&.${ck.selected}`]:{opacity:.6}},!t.disableMargin&&{margin:"0 2px"},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:(e.vars||e).palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${ck.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}),fk=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},mk=(0,_r.styled)(sk(),{name:"MuiPickersDay",slot:"Root",overridesResolver:fk})(pk),hk=(0,_r.styled)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:fk})((({theme:e,ownerState:t})=>(0,$.Z)({},pk({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"}))),gk=()=>{},vk=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiPickersDay"}),{autoFocus:a=!1,className:o,day:i,disabled:l=!1,disableHighlightToday:s=!1,disableMargin:u=!1,isAnimating:c,onClick:d,onDaySelect:p,onFocus:f=gk,onBlur:m=gk,onKeyDown:h=gk,onMouseDown:g=gk,onMouseEnter:v=gk,outsideCurrentMonth:y,selected:b=!1,showDaysOutsideCurrentMonth:x=!1,children:w,today:E=!1}=n,C=(0,q.Z)(n,dk),S=(0,$.Z)({},n,{autoFocus:a,disabled:l,disableHighlightToday:s,disableMargin:u,selected:b,showDaysOutsideCurrentMonth:x,today:E}),O=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:a,disabled:o,outsideCurrentMonth:i,showDaysOutsideCurrentMonth:l,classes:s}=e;return pS({root:["root",t&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&a&&"today",i&&l&&"dayOutsideMonth",i&&!l&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},uk,s)})(S),k=sS(),A=r.useRef(null),P=RS(A,t);return $S((()=>{!a||l||c||y||A.current.focus()}),[a,l,c,y]),y&&!x?(0,Wn.jsx)(hk,{className:mS(O.root,O.hiddenDaySpacingFiller,o),ownerState:S,role:C.role}):(0,Wn.jsx)(mk,(0,$.Z)({className:mS(O.root,o),ref:P,centerRipple:!0,disabled:l,tabIndex:b?0:-1,onKeyDown:e=>h(e,i),onFocus:e=>f(e,i),onBlur:e=>m(e,i),onMouseEnter:e=>v(e,i),onClick:e=>{l||p(i),y&&e.currentTarget.focus(),d&&d(e)},onMouseDown:e=>{g(e),y&&e.preventDefault()}},C,{ownerState:S,children:w||k.format(i,"dayOfMonth")}))})),yk=r.memo(vk);var bk=n(5564);const xk=e=>xS("MuiPickersSlideTransition",e),wk=wS("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Ek=["children","className","reduceAnimations","slideDirection","transKey","classes"],Ck=(0,_r.styled)(tk.Z,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${wk["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${wk["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${wk.slideEnterActive}`]:t.slideEnterActive},{[`.${wk.slideExit}`]:t.slideExit},{[`.${wk["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${wk["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((({theme:e})=>{const t=e.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${wk["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${wk["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${wk.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${wk.slideExit}`]:{transform:"translate(0%)"},[`& .${wk["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${wk["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}})),Sk=e=>xS("MuiDayCalendar",e),Ok=(wS("MuiDayCalendar",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),kk=["ownerState"],Ak=e=>e.charAt(0).toUpperCase(),Pk=(0,_r.styled)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Tk=(0,_r.styled)(gd(),{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary}))),Dk=(0,_r.styled)(gd(),{name:"MuiDayPicker",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled}))),Mk=(0,_r.styled)(gd(),{name:"MuiDayPicker",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((({theme:e})=>(0,$.Z)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"}))),_k=(0,_r.styled)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Ik=(0,_r.styled)((function(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:a,reduceAnimations:o,transKey:i}=t,l=(0,q.Z)(t,Ek),s=(e=>{const{classes:t,slideDirection:n}=e;return pS({root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]},xk,t)})(t);if(o)return(0,Wn.jsx)("div",{className:mS(s.root,a),children:n});const u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return(0,Wn.jsx)(Ck,{className:mS(s.root,a),childFactory:e=>r.cloneElement(e,{classNames:u}),role:"presentation",children:(0,Wn.jsx)(bk.Z,(0,$.Z)({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:u},l,{children:n}),i)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Nk=(0,_r.styled)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Rk=(0,_r.styled)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function Lk(e){var t,n,a;let{parentProps:o,day:i,focusableDay:l,selectedDays:s,isDateDisabled:u,currentMonthNumber:c,isViewFocused:d}=e,p=(0,q.Z)(e,Ok);const f=sS(),m=dS(),{disabled:h,disableHighlightToday:g,isMonthSwitchingAnimating:v,showDaysOutsideCurrentMonth:y,components:b,componentsProps:x,slots:w,slotProps:E}=o,C=null!==l&&f.isSameDay(i,l),S=s.some((e=>f.isSameDay(e,i))),O=f.isSameDay(i,m),k=null!=(t=null!=(n=null==w?void 0:w.day)?n:null==b?void 0:b.Day)?t:yk,A=FS({elementType:k,externalSlotProps:null!=(a=null==E?void 0:E.day)?a:null==x?void 0:x.day,additionalProps:(0,$.Z)({disableHighlightToday:g,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:v,"data-timestamp":f.toJsDate(i).valueOf()},p),ownerState:(0,$.Z)({},o,{day:i,selected:S})}),P=(0,q.Z)(A,kk),T=r.useMemo((()=>h||u(i)),[h,u,i]),D=r.useMemo((()=>f.getMonth(i)!==c),[f,i,c]),M=r.useMemo((()=>{const e=f.startOfMonth(f.setMonth(i,c));return y?f.isSameDay(i,f.startOfWeek(e)):f.isSameDay(i,e)}),[c,i,y,f]),_=r.useMemo((()=>{const e=f.endOfMonth(f.setMonth(i,c));return y?f.isSameDay(i,f.endOfWeek(e)):f.isSameDay(i,e)}),[c,i,y,f]);return(0,Wn.jsx)(k,(0,$.Z)({},P,{day:i,disabled:T,autoFocus:d&&C,today:O,outsideCurrentMonth:D,isFirstVisibleCell:M,isLastVisibleCell:_,selected:S,tabIndex:C?0:-1,"aria-selected":S,"aria-current":O?"date":void 0}))}function jk(e){const t=dS(),n=sS(),a=(0,_r.useThemeProps)({props:e,name:"MuiDayCalendar"}),o=(e=>{const{classes:t}=e;return pS({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Sk,t)})(a),i="rtl"===(0,_r.useTheme)().direction,{onFocusedDayChange:l,className:s,currentMonth:u,selectedDays:c,focusedDay:d,loading:p,onSelectedDaysChange:f,onMonthSwitchingAnimationEnd:m,readOnly:h,reduceAnimations:g,renderLoading:v=()=>(0,Wn.jsx)("span",{children:"..."}),slideDirection:y,TransitionProps:b,disablePast:x,disableFuture:w,minDate:E,maxDate:C,shouldDisableDate:S,shouldDisableMonth:O,shouldDisableYear:k,dayOfWeekFormatter:A=Ak,hasFocus:P,onFocusedViewChange:T,gridLabelId:D,displayWeekNumber:M,fixedWeekNumber:_,autoFocus:I}=a,N=ek({shouldDisableDate:S,shouldDisableMonth:O,shouldDisableYear:k,minDate:E,maxDate:C,disablePast:x,disableFuture:w}),R=cS(),[L,j]=nO({name:"DayCalendar",state:"hasFocus",controlled:P,default:null!=I&&I}),[F,V]=r.useState((()=>d||t)),B=(0,rO.Z)((e=>{h||f(e)})),H=e=>{N(e)||(l(e),V(e),null==T||T(!0),j(!0))},z=(0,rO.Z)(((e,t)=>{switch(e.key){case"ArrowUp":H(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":H(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,i?1:-1),a=n.addMonths(t,i?1:-1),o=bC({utils:n,date:r,minDate:i?r:n.startOfMonth(a),maxDate:i?n.endOfMonth(a):r,isDateDisabled:N});H(o||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,i?-1:1),a=n.addMonths(t,i?-1:1),o=bC({utils:n,date:r,minDate:i?n.startOfMonth(a):r,maxDate:i?r:n.endOfMonth(a),isDateDisabled:N});H(o||r),e.preventDefault();break}case"Home":H(n.startOfWeek(t)),e.preventDefault();break;case"End":H(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":H(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":H(n.addMonths(t,-1)),e.preventDefault()}})),U=(0,rO.Z)(((e,t)=>H(t))),Z=(0,rO.Z)(((e,t)=>{L&&n.isSameDay(F,t)&&(null==T||T(!1))})),W=n.getMonth(u),q=r.useMemo((()=>c.filter((e=>!!e)).map((e=>n.startOfDay(e)))),[n,c]),K=W,G=r.useMemo((()=>r.createRef()),[K]),Y=n.startOfWeek(t),X=r.useMemo((()=>{const e=n.startOfMonth(u),t=n.endOfMonth(u);return N(F)||n.isAfterDay(F,t)||n.isBeforeDay(F,e)?bC({utils:n,date:F,minDate:e,maxDate:t,disablePast:x,disableFuture:w,isDateDisabled:N}):F}),[u,w,x,F,N,n]),Q=r.useMemo((()=>{const e=n.getWeekArray(u);let t=n.addMonths(u,1);for(;_&&e.length<_;){const r=n.getWeekArray(t),a=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(a?1:0).forEach((t=>{e.length<_&&e.push(t)})),t=n.addMonths(t,1)}return e}),[u,_,n]);return(0,Wn.jsxs)("div",{role:"grid","aria-labelledby":D,children:[(0,Wn.jsxs)(Pk,{role:"row",className:o.header,children:[M&&(0,Wn.jsx)(Dk,{variant:"caption",role:"columnheader","aria-label":R.calendarWeekNumberHeaderLabel,className:o.weekNumberLabel,children:R.calendarWeekNumberHeaderText}),n.getWeekdays().map(((e,t)=>{var r;return(0,Wn.jsx)(Tk,{variant:"caption",role:"columnheader","aria-label":n.format(n.addDays(Y,t),"weekday"),className:o.weekDayLabel,children:null!=(r=null==A?void 0:A(e))?r:e},e+t.toString())}))]}),p?(0,Wn.jsx)(_k,{className:o.loadingContainer,children:v()}):(0,Wn.jsx)(Ik,(0,$.Z)({transKey:K,onExited:m,reduceAnimations:g,slideDirection:y,className:mS(s,o.slideTransition)},b,{nodeRef:G,children:(0,Wn.jsx)(Nk,{ref:G,role:"rowgroup",className:o.monthContainer,children:Q.map(((e,t)=>(0,Wn.jsxs)(Rk,{role:"row",className:o.weekContainer,"aria-rowindex":t+1,children:[M&&(0,Wn.jsx)(Mk,{className:o.weekNumber,role:"rowheader","aria-label":R.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:R.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map(((e,t)=>(0,Wn.jsx)(Lk,{parentProps:a,day:e,selectedDays:q,focusableDay:X,onKeyDown:z,onFocus:U,onBlur:Z,onDaySelect:B,isDateDisabled:N,currentMonthNumber:W,isViewFocused:L,"aria-colindex":t+1},e.toString())))]},`week-${e[0]}`)))})}))]})}const Fk=["values","unit","step"],Vk={borderRadius:4},Bk={xs:0,sm:600,md:900,lg:1200,xl:1536},Hk={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Bk[e]}px)`};function zk(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Hk;return t.reduce(((r,a,o)=>(r[e.up(e.keys[o])]=n(t[o]),r)),{})}if("object"==typeof t){const e=r.breakpoints||Hk;return Object.keys(t).reduce(((r,a)=>{if(-1!==Object.keys(e.values||Bk).indexOf(a))r[e.up(a)]=n(t[a],a);else{const e=a;r[e]=t[e]}return r}),{})}return n(t)}function Uk(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Zk(e,t,n,r=n){let a;return a="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Uk(e,n)||r,t&&(a=t(a,r,e)),a}const Wk=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:a}=e,o=e=>{if(null==e[t])return null;const o=e[t],i=Uk(e.theme,r)||{};return zk(e,o,(e=>{let r=Zk(i,a,e);return e===r&&"string"==typeof e&&(r=Zk(i,a,`${t}${"default"===e?"":tr(e)}`,e)),!1===n?r:{[n]:r}}))};return o.propTypes={},o.filterProps=[t],o},qk=function(e,t){return t?er(e,t,{clone:!1}):e},$k={m:"margin",p:"padding"},Kk={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Gk={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Yk=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Gk[e])return[e];e=Gk[e]}const[t,n]=e.split(""),r=$k[t],a=Kk[n]||"";return Array.isArray(a)?a.map((e=>r+e)):[r+a]})(t)),e[t])}(),Xk=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Qk=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Jk=[...Xk,...Qk];function eA(e,t,n,r){var a;const o=null!=(a=Uk(e,t,!1))?a:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>{}}function tA(e){return eA(e,"spacing",8)}function nA(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function rA(e,t){const n=tA(e.theme);return Object.keys(e).map((r=>function(e,t,n,r){if(-1===t.indexOf(n))return null;const a=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=nA(t,n),e)),{})}(Yk(n),r);return zk(e,e[n],a)}(e,t,r,n))).reduce(qk,{})}function aA(e){return rA(e,Xk)}function oA(e){return rA(e,Qk)}function iA(e){return rA(e,Jk)}aA.propTypes={},aA.filterProps=Xk,oA.propTypes={},oA.filterProps=Qk,iA.propTypes={},iA.filterProps=Jk;const lA=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?qk(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};function sA(e){return"number"!=typeof e?e:`${e}px solid`}const uA=Wk({prop:"border",themeKey:"borders",transform:sA}),cA=Wk({prop:"borderTop",themeKey:"borders",transform:sA}),dA=Wk({prop:"borderRight",themeKey:"borders",transform:sA}),pA=Wk({prop:"borderBottom",themeKey:"borders",transform:sA}),fA=Wk({prop:"borderLeft",themeKey:"borders",transform:sA}),mA=Wk({prop:"borderColor",themeKey:"palette"}),hA=Wk({prop:"borderTopColor",themeKey:"palette"}),gA=Wk({prop:"borderRightColor",themeKey:"palette"}),vA=Wk({prop:"borderBottomColor",themeKey:"palette"}),yA=Wk({prop:"borderLeftColor",themeKey:"palette"}),bA=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=eA(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:nA(t,e)});return zk(e,e.borderRadius,n)}return null};bA.propTypes={},bA.filterProps=["borderRadius"],lA(uA,cA,dA,pA,fA,mA,hA,gA,vA,yA,bA);const xA=e=>{if(void 0!==e.gap&&null!==e.gap){const t=eA(e.theme,"spacing",8),n=e=>({gap:nA(t,e)});return zk(e,e.gap,n)}return null};xA.propTypes={},xA.filterProps=["gap"];const wA=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=eA(e.theme,"spacing",8),n=e=>({columnGap:nA(t,e)});return zk(e,e.columnGap,n)}return null};wA.propTypes={},wA.filterProps=["columnGap"];const EA=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=eA(e.theme,"spacing",8),n=e=>({rowGap:nA(t,e)});return zk(e,e.rowGap,n)}return null};function CA(e,t){return"grey"===t?t:e}function SA(e){return e<=1&&0!==e?100*e+"%":e}EA.propTypes={},EA.filterProps=["rowGap"],lA(xA,wA,EA,Wk({prop:"gridColumn"}),Wk({prop:"gridRow"}),Wk({prop:"gridAutoFlow"}),Wk({prop:"gridAutoColumns"}),Wk({prop:"gridAutoRows"}),Wk({prop:"gridTemplateColumns"}),Wk({prop:"gridTemplateRows"}),Wk({prop:"gridTemplateAreas"}),Wk({prop:"gridArea"})),lA(Wk({prop:"color",themeKey:"palette",transform:CA}),Wk({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:CA}),Wk({prop:"backgroundColor",themeKey:"palette",transform:CA}));const OA=Wk({prop:"width",transform:SA}),kA=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,a;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(a=r.values)?void 0:a[t])||Bk[t]||SA(t)}};return zk(e,e.maxWidth,t)}return null};kA.filterProps=["maxWidth"];const AA=Wk({prop:"minWidth",transform:SA}),PA=Wk({prop:"height",transform:SA}),TA=Wk({prop:"maxHeight",transform:SA}),DA=Wk({prop:"minHeight",transform:SA}),MA=(Wk({prop:"size",cssProperty:"width",transform:SA}),Wk({prop:"size",cssProperty:"height",transform:SA}),lA(OA,kA,AA,PA,TA,DA,Wk({prop:"boxSizing"})),{border:{themeKey:"borders",transform:sA},borderTop:{themeKey:"borders",transform:sA},borderRight:{themeKey:"borders",transform:sA},borderBottom:{themeKey:"borders",transform:sA},borderLeft:{themeKey:"borders",transform:sA},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:bA},color:{themeKey:"palette",transform:CA},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:CA},backgroundColor:{themeKey:"palette",transform:CA},p:{style:oA},pt:{style:oA},pr:{style:oA},pb:{style:oA},pl:{style:oA},px:{style:oA},py:{style:oA},padding:{style:oA},paddingTop:{style:oA},paddingRight:{style:oA},paddingBottom:{style:oA},paddingLeft:{style:oA},paddingX:{style:oA},paddingY:{style:oA},paddingInline:{style:oA},paddingInlineStart:{style:oA},paddingInlineEnd:{style:oA},paddingBlock:{style:oA},paddingBlockStart:{style:oA},paddingBlockEnd:{style:oA},m:{style:aA},mt:{style:aA},mr:{style:aA},mb:{style:aA},ml:{style:aA},mx:{style:aA},my:{style:aA},margin:{style:aA},marginTop:{style:aA},marginRight:{style:aA},marginBottom:{style:aA},marginLeft:{style:aA},marginX:{style:aA},marginY:{style:aA},marginInline:{style:aA},marginInlineStart:{style:aA},marginInlineEnd:{style:aA},marginBlock:{style:aA},marginBlockStart:{style:aA},marginBlockEnd:{style:aA},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xA},rowGap:{style:EA},columnGap:{style:wA},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:SA},maxWidth:{style:kA},minWidth:{transform:SA},height:{transform:SA},maxHeight:{transform:SA},minHeight:{transform:SA},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),_A=function(){function e(e,t,n,r){const a={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:i=e,themeKey:l,transform:s,style:u}=o;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const c=Uk(n,l)||{};return u?u(a):zk(a,t,(t=>{let n=Zk(c,s,t);return t===n&&"string"==typeof t&&(n=Zk(c,s,`${e}${"default"===t?"":tr(t)}`,t)),!1===i?n:{[i]:n}}))}return function t(n){var r;const{sx:a,theme:o={}}=n||{};if(!a)return null;const i=null!=(r=o.unstable_sxConfig)?r:MA;function l(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const a=function(e={}){var t;const n=null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return n||{}}(o.breakpoints),l=Object.keys(a);let s=a;return Object.keys(r).forEach((n=>{const a="function"==typeof(l=r[n])?l(o):l;var l;if(null!=a)if("object"==typeof a)if(i[n])s=qk(s,e(n,a,o,i));else{const e=zk({theme:o},a,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,a)?s=qk(s,e):s[n]=t({sx:a,theme:o})}else s=qk(s,e(n,a,o,i))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(l,s)}return Array.isArray(a)?a.map(l):l(a)}}();_A.filterProps=["sx"];const IA=_A,NA=["breakpoints","palette","spacing","shape"],RA=function(e={},...t){const{breakpoints:n={},palette:r={},spacing:a,shape:o={}}=e,i=(0,q.Z)(e,NA),l=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,a=(0,q.Z)(e,Fk),o=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,$.Z)({},e,{[t.key]:t.val})),{})})(t),i=Object.keys(o);function l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,a){const o=i.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[i[o]]?t[i[o]]:a)-r/100}${n})`}return(0,$.Z)({keys:i,values:o,up:l,down:s,between:u,only:function(e){return i.indexOf(e)+1<i.length?u(e,i[i.indexOf(e)+1]):l(e)},not:function(e){const t=i.indexOf(e);return 0===t?l(i[1]):t===i.length-1?s(i[t]):u(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},a)}(n),s=function(e=8){if(e.mui)return e;const t=tA({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(a);let u=er({breakpoints:l,direction:"ltr",components:{},palette:(0,$.Z)({mode:"light"},r),spacing:s,shape:(0,$.Z)({},Vk,o)},i);return u=t.reduce(((e,t)=>er(e,t)),u),u.unstable_sxConfig=(0,$.Z)({},MA,null==i?void 0:i.unstable_sxConfig),u.unstable_sx=function(e){return IA({sx:e,theme:this})},u}(),LA=function(e=RA){return function(e=null){const t=r.useContext(dy);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}(e)};function jA(e){return xS("MuiPickersMonth",e)}const FA=wS("MuiPickersMonth",["root","monthButton","disabled","selected"]),VA=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","monthsPerRow"],BA=(0,_r.styled)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})((({ownerState:e})=>({flexBasis:3===e.monthsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"}))),HA=(0,_r.styled)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${FA.disabled}`]:t.disabled},{[`&.${FA.selected}`]:t.selected}]})((({theme:e})=>(0,$.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,_r.alpha)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,_r.alpha)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${FA.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${FA.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}}))),zA=r.memo((function(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,children:a,disabled:o,value:i,tabIndex:l,onClick:s,onKeyDown:u,onFocus:c,onBlur:d,"aria-current":p}=t,f=(0,q.Z)(t,VA),m=r.useRef(null),h=(e=>{const{disabled:t,selected:n,classes:r}=e;return pS({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},jA,r)})(t);return $S((()=>{var e;n&&(null==(e=m.current)||e.focus())}),[n]),(0,Wn.jsx)(BA,(0,$.Z)({className:h.root,ownerState:t},f,{children:(0,Wn.jsx)(HA,{ref:m,disabled:o,type:"button",tabIndex:o?-1:l,"aria-current":p,onClick:e=>s(e,i),onKeyDown:e=>u(e,i),onFocus:e=>c(e,i),onBlur:e=>d(e,i),className:h.monthButton,ownerState:t,children:a})}))}));function UA(e){return xS("MuiMonthCalendar",e)}wS("MuiMonthCalendar",["root"]);const ZA=["className","value","defaultValue","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow"],WA=(0,_r.styled)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320}),qA=r.forwardRef((function(e,t){const n=dS(),a=LA(),o=sS(),i=function(e){const t=sS(),n=uS(),r=(0,_r.useThemeProps)({props:e,name:"MuiMonthCalendar"});return(0,$.Z)({disableFuture:!1,disablePast:!1},r,{minDate:wC(t,r.minDate,n.minDate),maxDate:wC(t,r.maxDate,n.maxDate)})}(e),{className:l,value:s,defaultValue:u,disabled:c,disableFuture:d,disablePast:p,maxDate:f,minDate:m,onChange:h,shouldDisableMonth:g,readOnly:v,disableHighlightToday:y,autoFocus:b=!1,onMonthFocus:x,hasFocus:w,onFocusedViewChange:E,monthsPerRow:C=3}=i,S=(0,q.Z)(i,ZA),O=i,k=(e=>{const{classes:t}=e;return pS({root:["root"]},UA,t)})(O),[A,P]=nO({name:"MonthCalendar",state:"value",controlled:s,default:null!=u?u:null}),T=r.useMemo((()=>o.getMonth(n)),[o,n]),D=r.useMemo((()=>null!=A?A:o.startOfMonth(n)),[n,o,A]),M=r.useMemo((()=>null!=A?o.getMonth(A):y?null:o.getMonth(n)),[n,A,o,y]),[_,I]=r.useState((()=>M||T)),[N,R]=nO({name:"MonthCalendar",state:"hasFocus",controlled:w,default:null!=b&&b}),L=KS((e=>{R(e),E&&E(e)})),j=r.useCallback((e=>{const t=o.startOfMonth(p&&o.isAfter(n,m)?n:m),r=o.startOfMonth(d&&o.isBefore(n,f)?n:f);return!!o.isBefore(e,t)||!!o.isAfter(e,r)||!!g&&g(e)}),[d,p,f,m,n,g,o]),F=KS(((e,t)=>{if(v)return;const n=o.setMonth(D,t);P(n),null==h||h(n)})),V=KS((e=>{j(o.setMonth(D,e))||(I(e),L(!0),x&&x(e))}));r.useEffect((()=>{I((e=>null!==M&&e!==M?M:e))}),[M]);const B=KS(((e,t)=>{const n=12;switch(e.key){case"ArrowUp":V((n+t-3)%n),e.preventDefault();break;case"ArrowDown":V((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":V((n+t+("ltr"===a.direction?-1:1))%n),e.preventDefault();break;case"ArrowRight":V((n+t+("ltr"===a.direction?1:-1))%n),e.preventDefault()}})),H=KS(((e,t)=>{V(t)})),z=KS(((e,t)=>{_===t&&L(!1)}));return(0,Wn.jsx)(WA,(0,$.Z)({ref:t,className:mS(k.root,l),ownerState:O},S,{children:EC(o,D).map((e=>{const t=o.getMonth(e),n=o.format(e,"monthShort"),r=t===M,a=c||j(e);return(0,Wn.jsx)(zA,{selected:r,value:t,onClick:F,onKeyDown:B,autoFocus:N&&t===_,disabled:a,tabIndex:t===_?0:-1,onFocus:H,onBlur:z,"aria-current":T===t?"date":void 0,monthsPerRow:C,children:n},n)}))}))}));function $A(e){return xS("MuiPickersYear",e)}const KA=wS("MuiPickersYear",["root","yearButton","selected","disabled"]),GA=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],YA=(0,_r.styled)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})((({ownerState:e})=>({flexBasis:3===e.yearsPerRow?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"}))),XA=(0,_r.styled)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${KA.disabled}`]:t.disabled},{[`&.${KA.selected}`]:t.selected}]})((({theme:e})=>(0,$.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,_r.alpha)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,_r.alpha)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${KA.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${KA.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}}))),QA=r.memo((function(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:a,children:o,disabled:i,value:l,tabIndex:s,onClick:u,onKeyDown:c,onFocus:d,onBlur:p,"aria-current":f}=t,m=(0,q.Z)(t,GA),h=r.useRef(null),g=(e=>{const{disabled:t,selected:n,classes:r}=e;return pS({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},$A,r)})(t);return r.useEffect((()=>{n&&h.current.focus()}),[n]),(0,Wn.jsx)(YA,(0,$.Z)({className:mS(g.root,a),ownerState:t},m,{children:(0,Wn.jsx)(XA,{ref:h,disabled:i,type:"button",tabIndex:i?-1:s,"aria-current":f,onClick:e=>u(e,l),onKeyDown:e=>c(e,l),onFocus:e=>d(e,l),onBlur:e=>p(e,l),className:g.yearButton,ownerState:t,children:o})}))}));function JA(e){return xS("MuiYearCalendar",e)}wS("MuiYearCalendar",["root"]);const eP=["autoFocus","className","value","defaultValue","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow"],tP=(0,_r.styled)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:304}),nP=r.forwardRef((function(e,t){const n=dS(),a=LA(),o=sS(),i=function(e){const t=sS(),n=uS(),r=(0,_r.useThemeProps)({props:e,name:"MuiYearCalendar"});return(0,$.Z)({disablePast:!1,disableFuture:!1},r,{minDate:wC(t,r.minDate,n.minDate),maxDate:wC(t,r.maxDate,n.maxDate)})}(e),{autoFocus:l,className:s,value:u,defaultValue:c,disabled:d,disableFuture:p,disablePast:f,maxDate:m,minDate:h,onChange:g,readOnly:v,shouldDisableYear:y,disableHighlightToday:b,onYearFocus:x,hasFocus:w,onFocusedViewChange:E,yearsPerRow:C=3}=i,S=(0,q.Z)(i,eP),O=i,k=(e=>{const{classes:t}=e;return pS({root:["root"]},JA,t)})(O),[A,P]=nO({name:"YearCalendar",state:"value",controlled:u,default:null!=c?c:null}),T=r.useMemo((()=>null!=A?A:o.startOfYear(n)),[n,o,A]),D=r.useMemo((()=>o.getYear(n)),[o,n]),M=r.useMemo((()=>null!=A?o.getYear(A):b?null:o.getYear(n)),[n,A,o,b]),[_,I]=r.useState((()=>M||D)),[N,R]=nO({name:"YearCalendar",state:"hasFocus",controlled:w,default:null!=l&&l}),L=KS((e=>{R(e),E&&E(e)})),j=r.useCallback((e=>!!(f&&o.isBeforeYear(e,n)||p&&o.isAfterYear(e,n)||h&&o.isBeforeYear(e,h)||m&&o.isAfterYear(e,m)||y&&y(e))),[p,f,m,h,n,y,o]),F=KS(((e,t)=>{if(v)return;const n=o.setYear(T,t);P(n),null==g||g(n)})),V=KS((e=>{j(o.setYear(T,e))||(I(e),L(!0),null==x||x(e))}));r.useEffect((()=>{I((e=>null!==M&&e!==M?M:e))}),[M]);const B=KS(((e,t)=>{switch(e.key){case"ArrowUp":V(t-C),e.preventDefault();break;case"ArrowDown":V(t+C),e.preventDefault();break;case"ArrowLeft":V(t+("ltr"===a.direction?-1:1)),e.preventDefault();break;case"ArrowRight":V(t+("ltr"===a.direction?1:-1)),e.preventDefault()}})),H=KS(((e,t)=>{V(t)})),z=KS(((e,t)=>{_===t&&L(!1)})),U=r.useRef(null),Z=RS(t,U);return r.useEffect((()=>{if(l||null===U.current)return;const e=U.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,r=U.current.clientHeight,a=U.current.scrollTop,o=n+t;t>r||n<a||(U.current.scrollTop=o-r/2-t/2)}),[l]),(0,Wn.jsx)(tP,(0,$.Z)({ref:Z,className:mS(k.root,s),ownerState:O},S,{children:o.getYearRange(h,m).map((e=>{const t=o.getYear(e),n=t===M,r=d||j(e);return(0,Wn.jsx)(QA,{selected:n,value:t,onClick:F,onKeyDown:B,autoFocus:N&&t===_,disabled:r,tabIndex:t===_?0:-1,onFocus:H,onBlur:z,"aria-current":D===t?"date":void 0,yearsPerRow:C,children:o.format(e,"year")},o.format(e,"year"))}))}))}));function rP(e){return xS("MuiPickersArrowSwitcher",e)}wS("MuiPickersArrowSwitcher",["root","spacer","button"]);const aP=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],oP=["ownerState"],iP=["ownerState"],lP=(0,_r.styled)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),sP=(0,_r.styled)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),uP=(0,_r.styled)(np(),{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((({ownerState:e})=>(0,$.Z)({},e.hidden&&{visibility:"hidden"}))),cP=r.forwardRef((function(e,t){var n,r,a,o;const i="rtl"===(0,_r.useTheme)().direction,l=(0,_r.useThemeProps)({props:e,name:"MuiPickersArrowSwitcher"}),{children:s,className:u,slots:c,slotProps:d,isNextDisabled:p,isNextHidden:f,onGoToNext:m,nextLabel:h,isPreviousDisabled:g,isPreviousHidden:v,onGoToPrevious:y,previousLabel:b}=l,x=(0,q.Z)(l,aP),w=l,E=(e=>{const{classes:t}=e;return pS({root:["root"],spacer:["spacer"],button:["button"]},rP,t)})(w),C={isDisabled:p,isHidden:f,goTo:m,label:h},S={isDisabled:g,isHidden:v,goTo:y,label:b},[O,k]=i?[C,S]:[S,C],A=null!=(n=null==c?void 0:c.previousIconButton)?n:uP,P=FS({elementType:A,externalSlotProps:null==d?void 0:d.previousIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"end",onClick:O.goTo},ownerState:(0,$.Z)({},w,{hidden:O.isHidden}),className:E.button}),T=null!=(r=null==c?void 0:c.nextIconButton)?r:uP,D=FS({elementType:T,externalSlotProps:null==d?void 0:d.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:(0,$.Z)({},w,{hidden:k.isHidden}),className:E.button}),M=null!=(a=null==c?void 0:c.leftArrowIcon)?a:MO,_=FS({elementType:M,externalSlotProps:null==d?void 0:d.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),I=(0,q.Z)(_,oP),N=null!=(o=null==c?void 0:c.rightArrowIcon)?o:_O,R=FS({elementType:N,externalSlotProps:null==d?void 0:d.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),L=(0,q.Z)(R,iP);return(0,Wn.jsxs)(lP,(0,$.Z)({ref:t,className:mS(E.root,u),ownerState:w},x,{children:[(0,Wn.jsx)(A,(0,$.Z)({},P,{children:i?(0,Wn.jsx)(N,(0,$.Z)({},L)):(0,Wn.jsx)(M,(0,$.Z)({},I))})),s?(0,Wn.jsx)(gd(),{variant:"subtitle1",component:"span",children:s}):(0,Wn.jsx)(sP,{className:E.spacer,ownerState:w}),(0,Wn.jsx)(T,(0,$.Z)({},D,{children:i?(0,Wn.jsx)(M,(0,$.Z)({},I)):(0,Wn.jsx)(N,(0,$.Z)({},L))}))]}))}));function dP(e,t,n,a){const o=sS();return{meridiemMode:MC(e,o),handleMeridiemChange:r.useCallback((r=>{const i=null==e?null:IC(e,r,Boolean(t),o);n(i,null!=a?a:"partial")}),[t,e,n,a,o])}}const pP=e=>xS("MuiPickersCalendarHeader",e),fP=wS("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),mP=["ownerState"],hP=(0,_r.styled)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),gP=(0,_r.styled)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>(0,$.Z)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium}))),vP=(0,_r.styled)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),yP=(0,_r.styled)(np(),{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})((({ownerState:e})=>(0,$.Z)({marginRight:"auto"},"year"===e.view&&{[`.${fP.switchViewIcon}`]:{transform:"rotate(180deg)"}}))),bP=(0,_r.styled)(DO,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})));function xP(e){var t,n;const a=cS(),o=sS(),i=(0,_r.useThemeProps)({props:e,name:"MuiPickersCalendarHeader"}),{slots:l,slotProps:s,currentMonth:u,disabled:c,disableFuture:d,disablePast:p,maxDate:f,minDate:m,onMonthChange:h,onViewChange:g,view:v,reduceAnimations:y,views:b,labelId:x}=i,w=i,E=(e=>{const{classes:t}=e;return pS({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},pP,t)})(i),C=null!=(t=null==l?void 0:l.switchViewButton)?t:yP,S=FS({elementType:C,externalSlotProps:null==s?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":a.calendarViewSwitchingButtonAriaLabel(v)},ownerState:w,className:E.switchViewButton}),O=null!=(n=null==l?void 0:l.switchViewIcon)?n:bP,k=FS({elementType:O,externalSlotProps:null==s?void 0:s.switchViewIcon,ownerState:void 0,className:E.switchViewIcon}),A=(0,q.Z)(k,mP),P=function(e,{disableFuture:t,maxDate:n}){const a=sS();return r.useMemo((()=>{const r=a.date(),o=a.startOfMonth(t&&a.isBefore(r,n)?r:n);return!a.isAfter(o,e)}),[t,n,e,a])}(u,{disableFuture:d,maxDate:f}),T=function(e,{disablePast:t,minDate:n}){const a=sS();return r.useMemo((()=>{const r=a.date(),o=a.startOfMonth(t&&a.isAfter(r,n)?r:n);return!a.isBefore(o,e)}),[t,n,e,a])}(u,{disablePast:p,minDate:m});return 1===b.length&&"year"===b[0]?null:(0,Wn.jsxs)(hP,{ownerState:w,className:E.root,children:[(0,Wn.jsxs)(gP,{role:"presentation",onClick:()=>{if(1!==b.length&&g&&!c)if(2===b.length)g(b.find((e=>e!==v))||b[0]);else{const e=0!==b.indexOf(v)?0:1;g(b[e])}},ownerState:w,"aria-live":"polite",className:E.labelContainer,children:[(0,Wn.jsx)(ik,{reduceAnimations:y,transKey:o.format(u,"monthAndYear"),children:(0,Wn.jsx)(vP,{id:x,ownerState:w,className:E.label,children:o.format(u,"monthAndYear")})}),b.length>1&&!c&&(0,Wn.jsx)(C,(0,$.Z)({},S,{children:(0,Wn.jsx)(O,(0,$.Z)({},A))}))]}),(0,Wn.jsx)(Yp(),{in:"day"===v,children:(0,Wn.jsx)(cP,{slots:l,slotProps:s,onGoToPrevious:()=>h(o.addMonths(u,-1),"right"),isPreviousDisabled:T,previousLabel:a.previousMonth,onGoToNext:()=>h(o.addMonths(u,1),"left"),isNextDisabled:P,nextLabel:a.nextMonth})})]})}const wP=(0,_r.styled)("div")({overflow:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"}),EP="undefined"!=typeof navigator&&/(android)/i.test(navigator.userAgent),CP=e=>xS("MuiDateCalendar",e),SP=(wS("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow"]),OP=(0,_r.styled)(wP,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),kP=(0,_r.styled)(ik,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),AP=r.forwardRef((function(e,t){const n=sS(),a=JO(),o=function(e){const t=sS(),n=uS(),r=(0,_r.useThemeProps)({props:e,name:"MuiDateCalendar"});return(0,$.Z)({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:EP,renderLoading:()=>(0,Wn.jsx)("span",{children:"..."})},r,{minDate:wC(t,r.minDate,n.minDate),maxDate:wC(t,r.maxDate,n.maxDate)})}(e),{autoFocus:i,onViewChange:l,value:s,defaultValue:u,disableFuture:c,disablePast:d,defaultCalendarMonth:p,onChange:f,onYearChange:m,onMonthChange:h,reduceAnimations:g,shouldDisableDate:v,shouldDisableMonth:y,shouldDisableYear:b,view:x,views:w,openTo:E,className:C,disabled:S,readOnly:O,minDate:k,maxDate:A,disableHighlightToday:P,focusedView:T,onFocusedViewChange:D,showDaysOutsideCurrentMonth:M,fixedWeekNumber:_,dayOfWeekFormatter:I,components:N,componentsProps:R,slots:L,slotProps:j,loading:F,renderLoading:V,displayWeekNumber:B,yearsPerRow:H,monthsPerRow:z}=o,U=(0,q.Z)(o,SP),[Z,W]=nO({name:"DateCalendar",state:"value",controlled:s,default:null!=u?u:null}),K=KS(((e,t)=>{W(e),null==f||f(e,t)})),{view:G,setView:Y,focusedView:X,setFocusedView:Q,goToNextView:J,setValueAndGoToNextView:ee}=iO({view:x,views:w,openTo:E,onChange:K,onViewChange:l,autoFocus:i,focusedView:T,onFocusedViewChange:D}),{calendarState:te,changeFocusedDay:ne,changeMonth:re,handleChangeMonth:ae,isDateDisabled:oe,onMonthSwitchingAnimationEnd:ie}=(({value:e,defaultCalendarMonth:t,disableFuture:n,disablePast:a,disableSwitchToMonthOnDayFocus:o=!1,maxDate:i,minDate:l,onMonthChange:s,reduceAnimations:u,shouldDisableDate:c})=>{var d;const p=dS(),f=sS(),m=r.useRef(((e,t,n)=>(r,a)=>{switch(a.type){case"changeMonth":return(0,$.Z)({},r,{slideDirection:a.direction,currentMonth:a.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,$.Z)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=a.focusedDay&&n.isSameDay(a.focusedDay,r.focusedDay))return r;const o=null!=a.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,a.focusedDay);return(0,$.Z)({},r,{focusedDay:a.focusedDay,isMonthSwitchingAnimating:o&&!e&&!a.withoutMonthSwitchingAnimation,currentMonth:o?n.startOfMonth(a.focusedDay):r.currentMonth,slideDirection:null!=a.focusedDay&&n.isAfterDay(a.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(u),o,f)).current,[h,g]=r.useReducer(m,{isMonthSwitchingAnimating:!1,focusedDay:e||p,currentMonth:f.startOfMonth(null!=(d=null!=e?e:t)?d:xC(f,p,l,i)),slideDirection:"left"}),v=r.useCallback((e=>{g((0,$.Z)({type:"changeMonth"},e)),s&&s(e.newMonth)}),[s]),y=r.useCallback((e=>{const t=e;f.isSameMonth(t,h.currentMonth)||v({newMonth:f.startOfMonth(t),direction:f.isAfterDay(t,h.currentMonth)?"left":"right"})}),[h.currentMonth,v,f]),b=ek({shouldDisableDate:c,minDate:l,maxDate:i,disableFuture:n,disablePast:a}),x=r.useCallback((()=>{g({type:"finishMonthSwitchingAnimation"})}),[]),w=(0,rO.Z)(((e,t)=>{b(e)||g({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{calendarState:h,changeMonth:y,changeFocusedDay:w,isDateDisabled:b,onMonthSwitchingAnimationEnd:x,handleChangeMonth:v}})({value:Z,defaultCalendarMonth:p,reduceAnimations:g,onMonthChange:h,minDate:k,maxDate:A,shouldDisableDate:v,disablePast:d,disableFuture:c}),le=KS((e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),a=oe(e)?bC({utils:n,date:e,minDate:n.isBefore(k,t)?t:k,maxDate:n.isAfter(A,r)?r:A,disablePast:d,disableFuture:c,isDateDisabled:oe}):e;a?(ee(a,"finish"),null==h||h(t)):(J(),re(t)),ne(a,!0)})),se=KS((e=>{const t=n.startOfYear(e),r=n.endOfYear(e),a=oe(e)?bC({utils:n,date:e,minDate:n.isBefore(k,t)?t:k,maxDate:n.isAfter(A,r)?r:A,disablePast:d,disableFuture:c,isDateDisabled:oe}):e;a?(ee(a,"finish"),null==m||m(a)):(J(),re(t)),ne(a,!0)})),ue=KS((e=>K(Z&&e?CC(n,e,Z):e,"finish")));r.useEffect((()=>{null!=Z&&n.isValid(Z)&&re(Z)}),[Z]);const ce=o,de=(e=>{const{classes:t}=e;return pS({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},CP,t)})(ce),pe={disablePast:d,disableFuture:c,maxDate:A,minDate:k},fe=S&&Z||k,me=S&&Z||A,he={disableHighlightToday:P,readOnly:O,disabled:S},ge=`${a}-grid-label`,ve=null!==X,ye=r.useRef(G);r.useEffect((()=>{ye.current!==G&&(X===ye.current&&Q(G,!0),ye.current=G)}),[X,Q,G]);const be=r.useMemo((()=>[Z]),[Z]);return(0,Wn.jsxs)(OP,(0,$.Z)({ref:t,className:mS(de.root,C),ownerState:ce},U,{children:[(0,Wn.jsx)(xP,{views:w,view:G,currentMonth:te.currentMonth,onViewChange:Y,onMonthChange:(e,t)=>ae({newMonth:e,direction:t}),minDate:fe,maxDate:me,disabled:S,disablePast:d,disableFuture:c,reduceAnimations:g,labelId:ge,slots:L,slotProps:j}),(0,Wn.jsx)(kP,{reduceAnimations:g,className:de.viewTransitionContainer,transKey:G,ownerState:ce,children:(0,Wn.jsxs)("div",{children:["year"===G&&(0,Wn.jsx)(nP,(0,$.Z)({},pe,he,{value:Z,onChange:se,shouldDisableYear:b,hasFocus:ve,onFocusedViewChange:e=>Q("year",e),yearsPerRow:H})),"month"===G&&(0,Wn.jsx)(qA,(0,$.Z)({},pe,he,{hasFocus:ve,className:C,value:Z,onChange:le,shouldDisableMonth:y,onFocusedViewChange:e=>Q("month",e),monthsPerRow:z})),"day"===G&&(0,Wn.jsx)(jk,(0,$.Z)({},te,pe,he,{onMonthSwitchingAnimationEnd:ie,onFocusedDayChange:ne,reduceAnimations:g,selectedDays:be,onSelectedDaysChange:ue,shouldDisableDate:v,shouldDisableMonth:y,shouldDisableYear:b,hasFocus:ve,onFocusedViewChange:e=>Q("day",e),gridLabelId:ge,showDaysOutsideCurrentMonth:M,fixedWeekNumber:_,dayOfWeekFormatter:I,displayWeekNumber:B,components:N,componentsProps:R,slots:L,slotProps:j,loading:F,renderLoading:V}))]})})]}))})),PP=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:a,value:o,defaultValue:i,onChange:l,className:s,classes:u,disableFuture:c,disablePast:d,minDate:p,maxDate:f,shouldDisableDate:m,shouldDisableMonth:h,shouldDisableYear:g,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsPerRow:w,defaultCalendarMonth:E,components:C,componentsProps:S,slots:O,slotProps:k,loading:A,renderLoading:P,disableHighlightToday:T,readOnly:D,disabled:M,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:I,sx:N,autoFocus:R,fixedWeekNumber:L,displayWeekNumber:j})=>(0,Wn.jsx)(AP,{view:e,onViewChange:t,views:n.filter(kC),focusedView:r&&kC(r)?r:null,onFocusedViewChange:a,value:o,defaultValue:i,onChange:l,className:s,classes:u,disableFuture:c,disablePast:d,minDate:p,maxDate:f,shouldDisableDate:m,shouldDisableMonth:h,shouldDisableYear:g,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsPerRow:w,defaultCalendarMonth:E,components:C,componentsProps:S,slots:O,slotProps:k,loading:A,renderLoading:P,disableHighlightToday:T,readOnly:D,disabled:M,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:I,sx:N,autoFocus:R,fixedWeekNumber:L,displayWeekNumber:j}),TP=r.forwardRef((function(e,t){var n,r;const a=cS(),o=sS(),i=IS(e,"MuiDesktopDatePicker"),l=(0,$.Z)({day:PP,month:PP,year:PP},i.viewRenderers),s=(0,$.Z)({},i,{viewRenderers:l,format:AC(o,i,!1),yearsPerRow:null!=(n=i.yearsPerRow)?n:4,slots:(0,$.Z)({openPickerIcon:IO,field:YO},i.slots),slotProps:(0,$.Z)({},i.slotProps,{field:e=>{var n;return(0,$.Z)({},gC(null==(n=i.slotProps)?void 0:n.field,e),ZO(i),{ref:t})},toolbar:(0,$.Z)({hidden:!0},null==(r=i.slotProps)?void 0:r.toolbar)})}),{renderPicker:u}=PO({props:s,valueManager:nS,valueType:"date",getOpenDialogAriaText:a.openDatePickerDialogue,validator:NS});return u()}));TP.propTypes={autoFocus:yt().bool,className:yt().string,closeOnSelect:yt().bool,components:yt().object,componentsProps:yt().object,dayOfWeekFormatter:yt().func,defaultCalendarMonth:yt().any,defaultValue:yt().any,disabled:yt().bool,disableFuture:yt().bool,disableHighlightToday:yt().bool,disableOpenPicker:yt().bool,disablePast:yt().bool,displayWeekNumber:yt().bool,fixedWeekNumber:yt().number,format:yt().string,formatDensity:yt().oneOf(["dense","spacious"]),inputRef:yt().oneOfType([yt().func,yt().shape({current:yt().object})]),label:yt().node,loading:yt().bool,localeText:yt().object,maxDate:yt().any,minDate:yt().any,monthsPerRow:yt().oneOf([3,4]),onAccept:yt().func,onChange:yt().func,onClose:yt().func,onError:yt().func,onMonthChange:yt().func,onOpen:yt().func,onSelectedSectionsChange:yt().func,onViewChange:yt().func,onYearChange:yt().func,open:yt().bool,openTo:yt().oneOf(["day","month","year"]),orientation:yt().oneOf(["landscape","portrait"]),readOnly:yt().bool,reduceAnimations:yt().bool,renderLoading:yt().func,selectedSections:yt().oneOfType([yt().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),yt().number,yt().shape({endIndex:yt().number.isRequired,startIndex:yt().number.isRequired})]),shouldDisableDate:yt().func,shouldDisableMonth:yt().func,shouldDisableYear:yt().func,showDaysOutsideCurrentMonth:yt().bool,slotProps:yt().object,slots:yt().object,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object]),value:yt().any,view:yt().oneOf(["day","month","year"]),viewRenderers:yt().shape({day:yt().func,month:yt().func,year:yt().func}),views:yt().arrayOf(yt().oneOf(["day","month","year"]).isRequired),yearsPerRow:yt().oneOf([3,4])};const DP=(0,_r.styled)(fg())({[`& .${pg.dialogClasses.container}`]:{outline:0},[`& .${pg.dialogClasses.paper}`]:{outline:0,minWidth:320}}),MP=(0,_r.styled)(bg())({"&:first-of-type":{padding:0}});function _P(e){var t,n;const{children:r,onDismiss:a,open:o,slots:i,slotProps:l}=e,s=null!=(t=null==i?void 0:i.dialog)?t:DP,u=null!=(n=null==i?void 0:i.mobileTransition)?n:Yp();return(0,Wn.jsx)(s,(0,$.Z)({open:o,onClose:a},null==l?void 0:l.dialog,{TransitionComponent:u,TransitionProps:null==l?void 0:l.mobileTransition,PaperComponent:null==i?void 0:i.mobilePaper,PaperProps:null==l?void 0:l.mobilePaper,children:(0,Wn.jsx)(MP,{children:r})}))}const IP=["props","getOpenDialogAriaText"],NP=e=>{var t,n,a;let{props:o,getOpenDialogAriaText:i}=e,l=(0,q.Z)(e,IP);const{slots:s,slotProps:u,className:c,sx:d,format:p,formatDensity:f,label:m,inputRef:h,readOnly:g,disabled:v,localeText:y}=o,b=sS(),x=r.useRef(null),w=(0,zS.Z)(),E=null!=(t=null==u||null==(n=u.toolbar)?void 0:n.hidden)&&t,{open:C,actions:S,layoutProps:O,renderCurrentView:k,fieldProps:A}=uO((0,$.Z)({},l,{props:o,inputRef:x,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),P=s.field,T=FS({elementType:P,externalSlotProps:null==u?void 0:u.field,additionalProps:(0,$.Z)({},A,E&&{id:w},!(v||g)&&{onClick:S.onOpen,onKeyDown:(D=S.onOpen,e=>{"Enter"!==e.key&&" "!==e.key||(D(e),e.preventDefault(),e.stopPropagation())})},{readOnly:null==g||g,disabled:v,className:c,sx:d,format:p,formatDensity:f,label:m}),ownerState:o});var D;T.inputProps=(0,$.Z)({},T.inputProps,{"aria-label":i(A.value,b)});const M=(0,$.Z)({textField:s.textField},T.slots),_=null!=(a=s.layout)?a:SO,I=(0,HS.Z)(x,T.inputRef,h);let N=w;E&&(N=m?`${w}-label`:void 0);const R=(0,$.Z)({},u,{toolbar:(0,$.Z)({},null==u?void 0:u.toolbar,{titleId:w}),mobilePaper:(0,$.Z)({"aria-labelledby":N},null==u?void 0:u.mobilePaper)});return{renderPicker:()=>(0,Wn.jsxs)(Rr,{localeText:y,children:[(0,Wn.jsx)(P,(0,$.Z)({},T,{slots:M,slotProps:R,inputRef:I})),(0,Wn.jsx)(_P,(0,$.Z)({},S,{open:C,slots:s,slotProps:R,children:(0,Wn.jsx)(_,(0,$.Z)({},O,null==R?void 0:R.layout,{slots:s,slotProps:R,children:k()}))}))]})}},RP=r.forwardRef((function(e,t){var n;const r=cS(),a=sS(),o=IS(e,"MuiMobileDatePicker"),i=(0,$.Z)({day:PP,month:PP,year:PP},o.viewRenderers),l=(0,$.Z)({},o,{viewRenderers:i,format:AC(a,o,!1),slots:(0,$.Z)({field:YO},o.slots),slotProps:(0,$.Z)({},o.slotProps,{field:e=>{var n;return(0,$.Z)({},gC(null==(n=o.slotProps)?void 0:n.field,e),ZO(o),{ref:t})},toolbar:(0,$.Z)({hidden:!1},null==(n=o.slotProps)?void 0:n.toolbar)})}),{renderPicker:s}=NP({props:l,valueManager:nS,valueType:"date",getOpenDialogAriaText:r.openDatePickerDialogue,validator:NS});return s()}));RP.propTypes={autoFocus:yt().bool,className:yt().string,closeOnSelect:yt().bool,components:yt().object,componentsProps:yt().object,dayOfWeekFormatter:yt().func,defaultCalendarMonth:yt().any,defaultValue:yt().any,disabled:yt().bool,disableFuture:yt().bool,disableHighlightToday:yt().bool,disableOpenPicker:yt().bool,disablePast:yt().bool,displayWeekNumber:yt().bool,fixedWeekNumber:yt().number,format:yt().string,formatDensity:yt().oneOf(["dense","spacious"]),inputRef:yt().oneOfType([yt().func,yt().shape({current:yt().object})]),label:yt().node,loading:yt().bool,localeText:yt().object,maxDate:yt().any,minDate:yt().any,monthsPerRow:yt().oneOf([3,4]),onAccept:yt().func,onChange:yt().func,onClose:yt().func,onError:yt().func,onMonthChange:yt().func,onOpen:yt().func,onSelectedSectionsChange:yt().func,onViewChange:yt().func,onYearChange:yt().func,open:yt().bool,openTo:yt().oneOf(["day","month","year"]),orientation:yt().oneOf(["landscape","portrait"]),readOnly:yt().bool,reduceAnimations:yt().bool,renderLoading:yt().func,selectedSections:yt().oneOfType([yt().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),yt().number,yt().shape({endIndex:yt().number.isRequired,startIndex:yt().number.isRequired})]),shouldDisableDate:yt().func,shouldDisableMonth:yt().func,shouldDisableYear:yt().func,showDaysOutsideCurrentMonth:yt().bool,slotProps:yt().object,slots:yt().object,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object]),value:yt().any,view:yt().oneOf(["day","month","year"]),viewRenderers:yt().shape({day:yt().func,month:yt().func,year:yt().func}),views:yt().arrayOf(yt().oneOf(["day","month","year"]).isRequired),yearsPerRow:yt().oneOf([3,4])};const LP=["desktopModeMediaQuery"],jP=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=QS}=n,a=(0,q.Z)(n,LP);return hC()(r,{defaultMatches:!0})?(0,Wn.jsx)(TP,(0,$.Z)({ref:t},a)):(0,Wn.jsx)(RP,(0,$.Z)({ref:t},a))})),FP=new Date(1900,0,1,0,0,0,0),VP=new Date(9999,11,31,23,59,59,999),BP=new Date(2099,11,31,23,59,59,999),HP=e=>["minDate","maxDate"].includes(e),{isValidMomentDateOrNull:zP,isDateInRange:UP,momentToDate:ZP}=s.utils.dates,WP=({minDate:e,maxDate:t,value:n,onChange:a})=>{const[o,i]=(0,r.useState)(null),[l,u]=(0,r.useState)(null),d=(0,r.useMemo)((()=>s.utils.dates.clearDateTime((0,f.isNil)(e)?FP:e)),[e]),p=(0,r.useMemo)((()=>s.utils.dates.clearDateTime((0,f.isNil)(t)?VP:t)),[t]),m=(0,r.useMemo)((()=>(0,f.isNil)(n)?null:Ar()(n)),[n]),h=(0,r.useMemo)((()=>(e=>{const t=Ar()(e).isBefore(FP)?FP:e;return Ar()(t)})(d)),[d]),g=(0,r.useMemo)((()=>(e=>{const t=Ar()(e).isAfter(BP)?BP:e;return Ar()(t)})(p)),[p]),v=(0,r.useMemo)((()=>(e=>{switch(e){case"maxDate":return c().text("Date should not be after maximal date");case"minDate":return c().text("Date should not be before minimal date");case"invalidDate":return c().text("Invalid Date Format");default:return""}})(o)),[o]),y=(0,r.useCallback)((e=>{HP(e)||i(e)}),[]),b=(0,r.useCallback)((e=>{u(e),zP(e)&&UP(d,p)(e)&&a(ZP(e))}),[d,p,a]),x=(0,r.useCallback)((0,s.debounce)(b,0),[b]);return(0,r.useEffect)((()=>{u((e=>{const t=Ar()(e).isSame(m),n=!zP(m)&&!zP(e);return t||n?e:m}))}),[m]),(0,r.useEffect)((()=>{null!=l&&l.isAfter(p)?i("maxDate"):null!=l&&l.isBefore(d)?i("minDate"):i((e=>HP(e)?null:e))}),[l,p,d]),{errorMessage:v,editorValue:l,editorMinDate:h,editorMaxDate:g,onChange:x,onError:y}},qP=lr({adornedEnd:{paddingRight:4,marginLeft:"-10px"},inputRoot:{fontSize:"14px",letterSpacing:0,lineHeight:"16px",overflow:"hidden"},isCrossedOut:{textDecoration:"line-through"}});function $P(){return $P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$P.apply(null,arguments)}function KP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){GP(e,t,n[t])}))}return e}function GP(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const YP=e=>{var t;let{minDate:n,maxDate:o,value:i,format:l,label:u,onChange:c,slotProps:d,isCrossedOut:m}=e,h=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["minDate","maxDate","value","format","label","onChange","slotProps","isCrossedOut"]);const g=qP(),v=(0,r.useMemo)((()=>(0,f.isNil)(i)?null:s.utils.dates.clearDateTime(i)),[i]),{errorMessage:y,editorValue:b,editorMaxDate:x,editorMinDate:w,onError:E,onChange:C}=WP({minDate:n,maxDate:o,value:v,onChange:c}),S=gt(),O={textField:{size:"small",variant:"filled",helperText:y,error:Boolean(y),InputProps:{classes:{root:p()(g.inputRoot,{[g.isCrossedOut]:m})},disableUnderline:(0,f.isNil)(b)},InputLabelProps:{shrink:!(0,f.isNil)(u)}},popper:{placement:"bottom-start","data-mui-color-scheme":null==S||null===(t=S.palette)||void 0===t?void 0:t.mode,modifiers:[{name:"viewHeightModifier",enabled:!0,phase:"beforeWrite",fn:({state:e})=>{e.styles.popper.height="358px",e.placement.includes("top-start")&&(e.styles.popper=KP({},e.styles.popper,{display:"flex",alignItems:"flex-end"})),e.placement.includes("bottom")&&(e.styles.popper=KP({},e.styles.popper,{display:"block"}))}}]},inputAdornment:{position:"end",className:g.adornedEnd}},k=(0,f.mergeDeepLeft)(d,O);return a().createElement(jP,$P({format:l||Ar().localeData().longDateFormat("L"),slotProps:k,views:["year","month","day"],label:u,value:b,minDate:w,maxDate:x,onError:E,onChange:C,reduceAnimations:!0},h))};var XP=n(9659),QP=n.n(XP);const JP=lr({root:{height:"28px",backgroundColor:"rgba(43, 152, 240, 0.12)",maxWidth:"calc(100% - 4px)",margin:"2px","& $deleteIcon":{height:18,width:18,color:"rgba(0,0,0,0.38)",marginRight:"8px"}},deleteIcon:{},label:{overflow:"hidden"}}),eT=lr((e=>({container:{display:"flex",alignItems:"center",width:"100%"},label:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre"},count:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginLeft:8}})));function tT(){return tT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tT.apply(null,arguments)}const nT=e=>{let{classes:t={},label:n,count:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["classes","label","count"]);const i=JP(),l=eT();return a().createElement($x(),tT({classes:rw(t,i),label:a().createElement("div",{className:l.container},a().createElement(Rd,{value:n},a().createElement("div",{className:l.label},n)),r&&a().createElement("div",{className:l.count},r))},o))},rT=lr({multiSelect:{padding:"3px 48px 3px 8px !important",minHeight:"34px !important"},chips:{display:"flex",flexWrap:"wrap"},isCrossedOut:{textDecoration:"line-through"}});function aT(){return aT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aT.apply(null,arguments)}function oT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){iT(e,t,n[t])}))}return e}function iT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lT=()=>"",sT=e=>{let{multiple:t,value:n,children:r,getValueLabel:o=lT,getValuePlaceholder:i=f.identity,onChange:l=f.identity,fullWidth:s,TextFieldProps:u,MenuProps:c,classes:d,isCrossedOut:m}=e,h=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["multiple","value","children","getValueLabel","getValuePlaceholder","onChange","fullWidth","TextFieldProps","MenuProps","classes","isCrossedOut"]);const g=rT();return a().createElement(Vx(),aT({variant:"standard",select:!0,fullWidth:s},u,{value:(0,f.defaultTo)(t?[]:"",n),onChange:(0,f.pipe)(Tf,l),SelectProps:oT({},h,{MenuProps:oT({anchorOrigin:{vertical:"bottom",horizontal:"center"}},c),classes:oT({},d,{select:p()({[g.multiSelect]:t,[g.isCrossedOut]:m},(0,f.prop)("root",d),(0,f.prop)("select",d))}),multiple:t,renderValue:e=>t?a().createElement("div",{className:g.chips},e.map(((t,n)=>a().createElement(nT,{key:t,label:o(t)||i(t),onMouseDown:e=>e.stopPropagation(),onDelete:()=>l((0,f.remove)(n,1,e))})))):o(e)||i(e)})}),r)};function uT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cT=(0,f.has)("values"),dT=(0,f.curry)(((e,t)=>cT(t)?[{label:t.label,depth:e,isGroup:!0},...(0,f.chain)(dT(e+1),t.values)]:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){uT(e,t,n[t])}))}return e}({},t,{depth:e}))),pT=(0,f.chain)(dT(0)),fT=(0,f.curry)(((e,t)=>e.find((({isGroup:e,value:n})=>!e&&n===t)))),mT=lr({root:{paddingRight:"48px !important"},icon:{right:"12px"},checkIcon:{transform:"scale(.7)",marginLeft:"-25px",position:"absolute"},emptyLabel:{padding:"4px 16px"}});function hT(){return hT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hT.apply(null,arguments)}function gT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){vT(e,t,n[t])}))}return e}function vT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yT=e=>{let{value:t,entries:n,classes:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","entries","classes"]);const i=pT(n),l=(0,f.isNil)(t)?[]:(0,s.wrapInArrayIfNeeded)(t),u=mT();return a().createElement(sT,hT({MenuProps:{disableAutoFocusItem:!0},classes:gT({},r,{root:p()(u.root,(0,f.prop)("root",r)),icon:p()(u.icon,(0,f.prop)("icon",r))})},o,{value:t,getValueLabel:(0,f.pipe)(fT(i),(0,f.prop)("label"))}),i.length>0?i.map((({value:e,label:t,depth:n,isGroup:r},o)=>a().createElement(mf(),{key:o,disabled:r,value:e,style:{paddingLeft:25*(n+1)+"px"}},l.includes(e)&&a().createElement(QP(),{className:u.checkIcon}),t||e.toString()))):a().createElement(mf(),{className:u.emptyLabel,disabled:!0},c().text("No results found")))},bT=(0,f.curry)(((e,t)=>{const[n,...r]=t.split(e);return[n,r.join(e)]})),xT=(0,f.useWith)(f.path,[bT(".")]),wT=(0,f.ascend)((0,f.prop)("label"));function ET(){return ET=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ET.apply(null,arguments)}function CT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ST=e=>{let{multiple:t,value:n,lookupCode:o,lookups:i,onChange:l,getLookups:u}=e,c=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["multiple","value","lookupCode","lookups","onChange","getLookups"]);const d=e=>({lookupCode:e,value:(0,f.path)([o,e,"displayName"],i)});(0,r.useEffect)((()=>{var e;u&&(null===(e=u())||void 0===e||e.catch((()=>{})))}),[u]);const p=((e,t)=>{const n=e=>{const{parent:r}=xT(e,t)||{};return r?n(r).concat(e):[e]},r=([e,n])=>{const r=xT(e,t),[,o]=bT(".",e),i=(0,s.getLookupLabel)(o,null==r?void 0:r.displayName);return r===n?{label:i,value:o}:{label:i,values:a(n)}},a=e=>Object.entries(e).map(r).sort(wT),o=Object.entries(t[e]||[]).reduce(((t,[r,a])=>(0,f.assocPath)(n(`${e}.${r}`),a,t)),{});return a(o)})(o,i),m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){CT(e,t,n[t])}))}return e}({},c,{multiple:t,entries:p});return n=(0,f.defaultTo)(t?[]:{},n),t?a().createElement(yT,ET({},m,{value:(0,f.pluck)("lookupCode",n),getValuePlaceholder:e=>n.find((0,f.propEq)("lookupCode",e)).value,onChange:(0,f.pipe)((0,f.map)(d),l)})):a().createElement(yT,ET({},m,{value:(0,f.prop)("lookupCode",n),getValuePlaceholder:(0,f.always)((0,f.prop)("value",n)),onChange:(0,f.pipe)(d,l)}))};function OT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){kT(e,t,n[t])}))}return e}function kT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const AT={gridArea:"1/1",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit",color:"inherit",margin:0,padding:0,border:"none",outline:"none"},PT=lr({autosizeInputContainer:{display:"grid"},autosizeInputRuler:OT({},AT,{visibility:"hidden"}),autosizeInput:OT({},AT)});function TT(){return TT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TT.apply(null,arguments)}const DT=(0,r.forwardRef)(((e,t)=>{let{value:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","className"]);const i=PT();return a().createElement("div",{className:p()(i.autosizeInputContainer,r)},a().createElement("span",{className:i.autosizeInputRuler},n.replace(/ /g," ")),a().createElement("input",TT({className:i.autosizeInput,value:n,ref:t,size:1,type:"text"},o)))}));function MT(){return MT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MT.apply(null,arguments)}DT.displayName="AutosizeInput";const _T=(0,r.forwardRef)(((e,t)=>{const{CustomInputComponent:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["CustomInputComponent"]);return n?a().createElement(n,MT({},r,{ref:t,customInput:DT})):a().createElement(DT,MT({},r,{ref:t}))}));_T.displayName="AutosizeInputWrapper";const IT=lr({inputRoot:{flexWrap:"wrap",paddingLeft:"8px"},autosizeInput:{width:"auto",marginLeft:"5px",overflow:"hidden","& input":{background:"0px center",border:0,fontSize:"inherit",outline:0,padding:0,color:"inherit"}},isCrossedOut:{textDecoration:"line-through"}});function NT(){return NT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NT.apply(null,arguments)}function RT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){LT(e,t,n[t])}))}return e}function LT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jT(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const FT=c().text("Press Enter to add. You may enter multiple values"),VT=(0,f.pipe)(f.trim,f.isEmpty),BT=e=>{let{values:t=[],InputProps:n={},inputProps:o={},classes:i={},isCrossedOut:l,onChange:u=f.identity,getValueLabel:c=f.identity}=e,d=jT(e,["values","InputProps","inputProps","classes","isCrossedOut","onChange","getValueLabel"]);const m=IT(),h=n.classes||{},{root:g}=h,v=jT(h,["root"]),[y,b]=(0,r.useState)(""),[x,w]=(0,r.useState)(!1),E=(0,s.wrapInArrayIfNeeded)(t),C=E.length>0,S=e=>u((0,f.remove)(e,1,E)),O=()=>{var e;VT(y)||(e=y,u((0,f.uniq)([...E,e])),b(""))},k=!C&&x?FT:"";return a().createElement(yd(),{title:k},a().createElement(Vx(),NT({variant:"standard"},d,{classes:{root:i.root},value:y,onChange:(0,f.pipe)(Tf,b),InputProps:RT({},n,{startAdornment:E.map(((e,t)=>a().createElement(nT,{key:e,label:c(e),onDelete:()=>S(t)}))),inputComponent:_T,classes:RT({root:p()(m.inputRoot,g,{[m.isCrossedOut]:l}),input:p()(m.autosizeInput,v.input)},v)}),inputProps:RT({},o,{CustomInputComponent:n.inputComponent}),onKeyPress:(0,f.when)((0,f.propEq)("key","Enter"),O),onKeyDown:(0,f.when)((0,f.propEq)("key","Backspace"),(()=>{""===y&&C&&S(-1)})),onFocus:()=>w(!0),onBlur:(0,f.pipe)(O,(()=>w(!1)))})))},HT=lr({isCrossedOut:{textDecoration:"line-through"}});function zT(){return zT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zT.apply(null,arguments)}function UT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){ZT(e,t,n[t])}))}return e}function ZT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const WT=e=>{var t;let{value:n,onChange:o=f.identity,multiline:i,InputProps:l,isCrossedOut:s}=e,u=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","onChange","multiline","InputProps","isCrossedOut"]);const c=HT(),[d,m]=(0,r.useState)("");(0,r.useEffect)((()=>{m((0,f.isNil)(n)?"":n)}),[n]);const h=()=>{d!==n&&o(d)};return a().createElement(Vx(),zT({variant:"standard"},u,{InputProps:UT({},l,{classes:UT({},null==l?void 0:l.classes,{root:p()(null==l||null===(t=l.classes)||void 0===t?void 0:t.root,{[c.isCrossedOut]:s})})}),multiline:i,value:d,onKeyPress:(0,f.when)((0,f.propEq)("key","Enter"),(()=>{i||h()})),onBlur:h,onChange:(0,f.pipe)(Tf,m)}))};function qT(){return qT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qT.apply(null,arguments)}const $T=e=>{let{multiple:t=!1,value:n,getValueLabel:r,multiline:o=!1}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["multiple","value","getValueLabel","multiline"]);return t?a().createElement(BT,qT({},i,{values:n,getValueLabel:r})):a().createElement(WT,qT({},i,{value:n,multiline:o}))};function KT(){}function GT(e){return!!(e||"").match(/\d/)}function YT(e){return null==e}function XT(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function QT(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,a=(e=e.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNagation:n,addNegation:r}}function JT(e,t,n){for(var r="",a=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||a;return r}function eD(e,t){return Array(t+1).join(e)}function tD(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function nD(e,t,n){return Math.min(Math.max(e,t),n)}function rD(e){return Math.max(e.selectionStart,e.selectionEnd)}var aD={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:KT,onChange:KT,onKeyDown:KT,onMouseUp:KT,onFocus:KT,onBlur:KT,isAllowed:function(){return!0}},oD=function(e){function t(t){e.call(this,t);var n=t.defaultValue;this.validateProps();var r=this.formatValueProp(n);this.state={value:r,numAsString:this.removeFormatting(r),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this,n=t.props,r=t.state,a=t.focusedElm,o=r.value,i=r.numAsString;if(void 0===i&&(i=""),e!==n){this.validateProps();var l=this.formatNumString(i),s=YT(n.value)?l:this.formatValueProp(),u=this.removeFormatting(s),c=parseFloat(u),d=parseFloat(i);(isNaN(c)&&isNaN(d)||c===d)&&l===o&&(null!==a||s===o)||this.updateValue({formattedValue:s,numAsString:u,input:a,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,n=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var o=(e=(e.match(r)||[]).join("").replace(n,".")).indexOf(".");return-1!==o&&(e=e.substring(0,o)+"."+e.substring(o+1,e.length).replace(new RegExp(XT(n),"g"),"")),a&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var n=this.props,r=n.format,a=n.decimalScale,o=n.customNumerals,i=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(o?o.join(""):"")+"]"+(!i||0===a||t||r?"":"|"+XT(i)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"==typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,n){tD(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===n&&tD(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,n){var r=this.props,a=r.prefix,o=r.suffix,i=r.format;if(""===e)return 0;if(t=nD(t,0,e.length),!i){var l="-"===e[0];return nD(t,a.length+(l?1:0),e.length-o.length)}if("function"==typeof i)return t;if("#"===i[t]&>(e[t]))return t;if("#"===i[t-1]&>(e[t-1]))return t;var s=i.indexOf("#");t=nD(t,s,i.lastIndexOf("#")+1);for(var u=i.substring(t,i.length).indexOf("#"),c=t,d=t+(-1===u?0:u);c>s&&("#"!==i[c]||!GT(e[c]));)c-=1;return!GT(e[d])||"left"===n&&t!==s||t-c<d-t?GT(e[c])?c+1:c:d},t.prototype.getCaretPosition=function(e,t,n){var r,a,o=this.props.format,i=this.state.value,l=this.getNumberRegex(!0),s=(e.match(l)||[]).join(""),u=(t.match(l)||[]).join("");for(r=0,a=0;a<n;a++){var c=e[a]||"",d=t[r]||"";if((c.match(l)||c===d)&&("0"!==c||!d.match(l)||"0"===d||s.length===u.length)){for(;c!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof o||i||(r=t.length),this.correctCaretPosition(t,r)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,n=t.format,r=t.prefix,a=t.suffix;if(!n&&e){var o="-"===e[0];o&&(e=e.substring(1,e.length));var i=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(a);e=a&&-1!==i&&i===e.length-a.length?e.substring(0,i):e,o&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",a=0,o=t.length;a<=o;a++){var i=t[a]||"",l=a===o?e.length:e.indexOf(i,n);if(-1===l){r=e;break}r+=e.substring(n,l),n=l+i.length}return(r.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=function(e){for(var t=this.props.format,n=0,r=t.split(""),a=0,o=t.length;a<o;a++)"#"===t[a]&&(r[a]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")},t.prototype.formatAsNumber=function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix,o=t.suffix,i=t.allowNegative,l=t.thousandsGroupStyle,s=this.getSeparators(),u=s.thousandSeparator,c=s.decimalSeparator,d=-1!==e.indexOf(".")||n&&r,p=QT(e,i),f=p.beforeDecimal,m=p.afterDecimal,h=p.addNegation;return void 0!==n&&(m=JT(m,n,r)),u&&(f=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),a=e.search(/[1-9]/);return a=-1===a?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}(f,u,l)),a&&(f=a+f),o&&(m+=o),h&&(f="-"+f),f+(d&&c||"")+m},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,n=t.format,r=t.allowEmptyFormatting,a=t.customNumerals,o=e;if(a&&10===a.length){var i=new RegExp("["+a.join("")+"]","g");o=e.replace(i,(function(e){return a.indexOf(e).toString()}))}return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,n=t.format,r=t.decimalScale,a=t.fixedDecimalScale,o=t.allowEmptyFormatting,i=this.props,l=i.value,s=i.isNumericString,u=!(l=YT(l)?e:l)&&0!==l;return u&&o&&(l=""),u&&!o?"":("number"==typeof l&&(l=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var n=e.split(/[eE]/g),r=n[0],a=n[1];if(!(a=Number(a)))return t+r;var o=1+a,i=(r=r.replace(".","")).length;return o<0?r="0."+eD("0",Math.abs(o))+r:o>=i?r+=eD("0",o-i):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}(l),s=!0),"Infinity"===l&&s&&(l=""),s&&!n&&"number"==typeof r&&(l=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,a=QT(e),o=a.beforeDecimal,i=a.afterDecimal,l=a.hasNagation,s=parseFloat("0."+(i||"0")),u=(i.length<=t?"0."+i:s.toFixed(t)).split(".");return(l?"-":"")+o.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0])+(r?".":"")+JT(u[1]||"",Math.min(t,i.length),n)}(l,r,a)),s?this.formatNumString(l):this.formatInput(l))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var n=this.props,r=n.format,a=n.prefix,o=n.suffix,i=n.decimalScale,l=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<a.length||e>=t.length-o.length||i&&l&&t[e]===s))},t.prototype.correctInputValue=function(e,t,n){var r=this,a=this.props,o=a.format,i=a.allowNegative,l=a.prefix,s=a.suffix,u=a.decimalScale,c=this.getSeparators(),d=c.allowedDecimalSeparators,p=c.decimalSeparator,f=this.state.numAsString||"",m=this.selectionBeforeInput,h=m.selectionStart,g=m.selectionEnd,v=function(e,t){for(var n=0,r=0,a=e.length,o=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[o-1-r]&&o-r>n&&a-r>n;)r++;return{start:n,end:a-r}}(t,n),y=v.start,b=v.end;if(!o&&y===b&&-1!==d.indexOf(n[h])){var x=0===u?"":p;return n.substr(0,h)+x+n.substr(h+1,n.length)}var w=o?0:l.length,E=t.length-(o?0:s.length);if(n.length>t.length||!n.length||y===b||0===h&&g===t.length||0===y&&b===t.length||h===w&&g===E)return n;var C=t.substr(y,b-y);if([].concat(C).find((function(e,n){return r.isCharacterAFormat(n+y,t)}))){var S=t.substr(y),O={},k=[];[].concat(S).forEach((function(e,n){r.isCharacterAFormat(n+y,t)?O[n]=e:n>C.length-1&&k.push(e)})),Object.keys(O).forEach((function(e){k.length>e?k.splice(e,0,O[e]):k.push(O[e])})),n=t.substr(0,y)+k.join("")}if(!o){var A=this.removeFormatting(n),P=QT(A,i),T=P.beforeDecimal,D=P.afterDecimal,M=P.addNegation,_=e<n.indexOf(p)+1;if(A.length<f.length&&_&&""===T&&!parseFloat(D))return M?"-":""}return n},t.prototype.updateValue=function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var a=e.source,o=e.event,i=e.numAsString,l=e.caretPos,s=this.props.onValueChange,u=this.state.value;if(n){if(void 0===l&&r){var c=e.inputValue||n.value,d=rD(n);n.value=t,l=this.getCaretPosition(c,t,d)}n.value=t,r&&this.setPatchedCaretPosition(n,l,t)}void 0===i&&(i=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:i}),s(this.getValueObject(t,i),{event:o,source:a}))},t.prototype.onChange=function(e){var t=e.target,n=t.value,r=this.state,a=this.props,o=a.isAllowed,i=r.value||"",l=rD(t);n=this.correctInputValue(l,i,n);var s=this.formatInput(n)||"",u=this.removeFormatting(s),c=o(this.getValueObject(s,u));c||(s=i),this.updateValue({formattedValue:s,numAsString:u,inputValue:n,input:t,event:e,source:"event"}),c&&a.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,n=this.state,r=t.format,a=t.onBlur,o=t.allowLeadingZeros,i=n.numAsString,l=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!r){isNaN(parseFloat(i))&&(i=""),o||(i=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return(t?"-":"")+r+(a?"."+a:"")}(i));var s=this.formatNumString(i);if(s!==l)return this.updateValue({formattedValue:s,numAsString:i,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void a(e)}a(e)},t.prototype.onKeyDown=function(e){var t,n=e.target,r=e.key,a=n.selectionStart,o=n.selectionEnd,i=n.value;void 0===i&&(i="");var l=this.props,s=l.decimalScale,u=l.fixedDecimalScale,c=l.prefix,d=l.suffix,p=l.format,f=l.onKeyDown,m=void 0!==s&&u,h=this.getNumberRegex(!1,m),g=new RegExp("-"),v="string"==typeof p;if(this.selectionBeforeInput={selectionStart:a,selectionEnd:o},"ArrowLeft"===r||"Backspace"===r?t=a-1:"ArrowRight"===r?t=a+1:"Delete"===r&&(t=a),void 0!==t&&a===o){var y=t,b=v?p.indexOf("#"):c.length,x=v?p.lastIndexOf("#")+1:i.length-d.length;if("ArrowLeft"===r||"ArrowRight"===r){var w="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(i,t,w)}else if("Delete"!==r||h.test(i[t])||g.test(i[t])){if("Backspace"===r&&!h.test(i[t]))if(a<=b+1&&"-"===i[0]&&void 0===p){var E=i.substring(1);this.updateValue({formattedValue:E,caretPos:y,input:n,event:e,source:"event"})}else if(!g.test(i[t])){for(;!h.test(i[y-1])&&y>b;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!h.test(i[y])&&y<x;)y++;(y!==t||t<b||t>x)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,i),f(e)}else f(e)},t.prototype.onMouseUp=function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,a=t.value;if(void 0===a&&(a=""),n===r){var o=this.correctCaretPosition(a,n);o!==n&&this.setPatchedCaretPosition(t,o,a)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,a=n.selectionEnd,o=n.value;void 0===o&&(o="");var i=t.correctCaretPosition(o,r);i===r||0===r&&a===o.length||t.setPatchedCaretPosition(n,i,o),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,n=e.displayType,r=e.customInput,o=e.renderText,i=e.getInputRef,l=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),u=this.state,c=u.value,d=u.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(l)?"numeric":void 0,p=Object.assign({inputMode:d},s,{type:t,value:c,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===n)return o?o(c,s)||null:a().createElement("span",Object.assign({},s,{ref:i}),c);if(r){var f=r;return a().createElement(f,Object.assign({},p,{ref:i}))}return a().createElement("input",Object.assign({},p,{ref:i}))},t}(a().Component);oD.defaultProps=aD;const iD=oD,lD=e=>({2:"lakh",3:"thousand",4:"wan"}[e]);function sD(){return sD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sD.apply(null,arguments)}function uD(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const cD=a().forwardRef(((e,t)=>{let{onChange:n,integer:r,customInput:o,format:i,value:l}=e,u=uD(e,["onChange","integer","customInput","format","value"]);const c=i||{},{strategy:d,groupSize:p}=c,f=uD(c,["strategy","groupSize"]);return a().createElement(iD,sD({},u,{value:(0,s.applyPresentationStrategyToValue)(d,l),thousandsGroupStyle:lD(p)},f,{getInputRef:t,isNumericString:!0,onValueChange:e=>{n({target:{value:(0,s.revertPresentationStrategyForValue)(d,e.value)}})},decimalScale:r?0:void 0,customInput:o}))}));function dD(){return dD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dD.apply(null,arguments)}function pD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){fD(e,t,n[t])}))}return e}function fD(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}cD.displayName="NumberFormat";const mD=e=>{let{integer:t,format:n,inputProps:r,InputProps:o}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["integer","format","inputProps","InputProps"]);return a().createElement($T,dD({},i,{inputProps:pD({integer:t,format:n},r),InputProps:pD({},o,{inputComponent:cD}),getValueLabel:(0,s.formatNumber)(n)}))};function hD(e){return xS("MuiTimeClock",e)}wS("MuiTimeClock",["root","arrowSwitcher"]);const gD=220,vD=gD/2,yD=gD/2,bD=vD-vD,xD=0-yD,wD=(e,t,n)=>{const r=t-vD,a=n-yD;let o=(Math.atan2(bD,xD)-Math.atan2(r,a))*(180/Math.PI);o=Math.round(o/e)*e,o%=360;const i=r**2+a**2;return{value:Math.floor(o/e)||0,distance:Math.sqrt(i)}};function ED(e){return xS("MuiClockPointer",e)}wS("MuiClockPointer",["root","thumb"]);const CD=["className","hasSelected","isInner","type","viewValue"],SD=e=>{const{classes:t}=e;return pS({root:["root"],thumb:["thumb"]},ED,t)},OD=(0,_r.styled)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>(0,$.Z)({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])}))),kD=(0,_r.styled)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e,ownerState:t})=>(0,$.Z)({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:(e.vars||e).palette.primary.main})));function AD(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiClockPointer"}),{className:n,isInner:a,type:o,viewValue:i}=t,l=(0,q.Z)(t,CD),s=r.useRef(o);r.useEffect((()=>{s.current=o}),[o]);const u=(0,$.Z)({},t,{shouldAnimate:s.current!==o}),c=SD(u);return(0,Wn.jsx)(OD,(0,$.Z)({style:(()=>{let e=360/("hours"===o?12:60)*i;return"hours"===o&&i>12&&(e-=360),{height:Math.round((a?.26:.4)*gD),transform:`rotateZ(${e}deg)`}})(),className:mS(n,c.root),ownerState:u},l,{children:(0,Wn.jsx)(kD,{ownerState:u,className:c.thumb})}))}function PD(e){return xS("MuiClock",e)}wS("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const TD=(0,_r.styled)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),DD=(0,_r.styled)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),MD=(0,_r.styled)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),_D=(0,_r.styled)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((({ownerState:e})=>(0,$.Z)({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}))),ID=(0,_r.styled)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),ND=(0,_r.styled)(np(),{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e,ownerState:t})=>(0,$.Z)({zIndex:1,position:"absolute",bottom:8,left:8},"am"===t.meridiemMode&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}))),RD=(0,_r.styled)(np(),{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e,ownerState:t})=>(0,$.Z)({zIndex:1,position:"absolute",bottom:8,right:8},"pm"===t.meridiemMode&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}})));function LD(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:a,autoFocus:o,children:i,value:l,handleMeridiemChange:s,isTimeDisabled:u,meridiemMode:c,minutesStep:d=1,onChange:p,selectedId:f,type:m,viewValue:h,disabled:g,readOnly:v,className:y}=t,b=t,x=sS(),w=cS(),E=r.useRef(!1),C=(e=>{const{classes:t}=e;return pS({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},PD,t)})(b),S=u(h,m),O=!n&&"hours"===m&&(h<1||h>12),k=(e,t)=>{g||v||u(e,m)||p(e,t)},A=(e,t)=>{let{offsetX:r,offsetY:a}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,a=e.changedTouches[0].clientY-t.top}const o="seconds"===m||"minutes"===m?((e,t,n=1)=>{const r=6*n;let{value:a}=wD(r,e,t);return a=a*n%60,a})(r,a,d):((e,t,n)=>{const{value:r,distance:a}=wD(30,e,t);let o=r||12;return n?o%=12:a<gD/2-36&&(o+=12,o%=24),o})(r,a,Boolean(n));k(o,t)},P=r.useMemo((()=>"hours"===m||h%5==0),[m,h]),T="minutes"===m?d:1,D=r.useRef(null);return $S((()=>{o&&D.current.focus()}),[o]),(0,Wn.jsxs)(TD,{className:mS(y,C.root),children:[(0,Wn.jsxs)(DD,{className:C.clock,children:[(0,Wn.jsx)(_D,{onTouchMove:e=>{E.current=!0,A(e,"shallow")},onTouchEnd:e=>{E.current&&(A(e,"finish"),E.current=!1)},onMouseUp:e=>{E.current&&(E.current=!1),A(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&A(e.nativeEvent,"shallow")},ownerState:{disabled:g},className:C.squareMask}),!S&&(0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)(ID,{className:C.pin}),null!=l&&(0,Wn.jsx)(AD,{type:m,viewValue:h,isInner:O,hasSelected:P})]}),(0,Wn.jsx)(MD,{"aria-activedescendant":f,"aria-label":w.clockLabelText(m,l,x),ref:D,role:"listbox",onKeyDown:e=>{if(!E.current)switch(e.key){case"Home":k(0,"partial"),e.preventDefault();break;case"End":k("minutes"===m?59:23,"partial"),e.preventDefault();break;case"ArrowUp":k(h+T,"partial"),e.preventDefault();break;case"ArrowDown":k(h-T,"partial"),e.preventDefault()}},tabIndex:0,className:C.wrapper,children:i})]}),n&&a&&(0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)(ND,{onClick:v?void 0:()=>s("am"),disabled:g||null===c,ownerState:b,className:C.amButton,children:(0,Wn.jsx)(gd(),{variant:"caption",children:"AM"})}),(0,Wn.jsx)(RD,{disabled:g||null===c,onClick:v?void 0:()=>s("pm"),ownerState:b,className:C.pmButton,children:(0,Wn.jsx)(gd(),{variant:"caption",children:"PM"})})]})]})}function jD(e){return xS("MuiClockNumber",e)}const FD=wS("MuiClockNumber",["root","selected","disabled"]),VD=["className","disabled","index","inner","label","selected"],BD=(0,_r.styled)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${FD.disabled}`]:t.disabled},{[`&.${FD.selected}`]:t.selected}]})((({theme:e,ownerState:t})=>(0,$.Z)({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${FD.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${FD.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled}},t.inner&&(0,$.Z)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary}))));function HD(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:a,inner:o,label:i,selected:l}=t,s=(0,q.Z)(t,VD),u=t,c=(e=>{const{classes:t,selected:n,disabled:r}=e;return pS({root:["root",n&&"selected",r&&"disabled"]},jD,t)})(u),d=a%12/12*Math.PI*2-Math.PI/2,p=(gD-36-2)/2*(o?.65:1),f=Math.round(Math.cos(d)*p),m=Math.round(Math.sin(d)*p);return(0,Wn.jsx)(BD,(0,$.Z)({className:mS(n,c.root),"aria-disabled":!!r||void 0,"aria-selected":!!l||void 0,role:"option",style:{transform:`translate(${f}px, ${m+(gD-36)/2}px`},ownerState:u},s,{children:i}))}const zD=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:a,utils:o})=>{const i=t?o.getHours(t):null,l=[],s=e?12:23,u=t=>null!==i&&(e?12===t?12===i||0===i:i===t||i-12===t:i===t);for(let t=e?1:0;t<=s;t+=1){let i=t.toString();0===t&&(i="00");const s=!e&&(0===t||t>12);i=o.formatNumber(i);const c=u(t);l.push((0,Wn.jsx)(HD,{id:c?a:void 0,index:t,inner:s,selected:c,disabled:r(t),label:i,"aria-label":n(i)},t))}return l},UD=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:a})=>{const o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map((([e,o],i)=>{const l=e===t;return(0,Wn.jsx)(HD,{label:o,id:l?a:void 0,index:i+1,inner:!1,disabled:n(e),selected:l,"aria-label":r(o)},e)}))},ZD=["ampm","ampmInClock","autoFocus","components","componentsProps","slots","slotProps","value","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","showViewSwitcher","onChange","defaultValue","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly"],WD=(0,_r.styled)(wP,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),qD=(0,_r.styled)(cP,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),$D=r.forwardRef((function(e,t){const n=cS(),a=dS(),o=sS(),i=(0,_r.useThemeProps)({props:e,name:"MuiTimeClock"}),{ampm:l=o.is12HourCycleInCurrentLocale(),ampmInClock:s=!1,autoFocus:u,components:c,componentsProps:d,slots:p,slotProps:f,value:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:v,disableFuture:y,disablePast:b,minutesStep:x=1,shouldDisableClock:w,shouldDisableTime:E,showViewSwitcher:C,onChange:S,defaultValue:O,view:k,views:A=["hours","minutes"],openTo:P,onViewChange:T,focusedView:D,onFocusedViewChange:M,className:_,disabled:I,readOnly:N}=i,R=(0,q.Z)(i,ZD),L=null!=p?p:_S(c),j=null!=f?f:d,[F,V]=nO({name:"DateCalendar",state:"value",controlled:m,default:null!=O?O:null}),B=(0,rO.Z)(((e,t)=>{V(e),null==S||S(e,t)})),{view:H,setView:z,previousView:U,nextView:Z,setValueAndGoToNextView:W}=iO({view:k,views:A,openTo:P,onViewChange:T,onChange:B,focusedView:D,onFocusedViewChange:M}),K=r.useMemo((()=>F||o.setSeconds(o.setMinutes(o.setHours(a,0),0),0)),[F,a,o]),{meridiemMode:G,handleMeridiemChange:Y}=dP(K,l,W),X=r.useCallback(((e,t)=>{const n=RC(h,o),r="hours"===t||"minutes"===t&&A.includes("seconds"),i=({start:e,end:t})=>!(v&&n(v,t)||g&&n(e,g)||y&&n(e,a)||b&&n(a,r?t:e)),s=(e,n=1)=>{if(e%n!=0)return!1;if(null!=w&&w(e,t))return!1;if(E)switch(t){case"hours":return!E(o.setHours(K,e),"hours");case"minutes":return!E(o.setMinutes(K,e),"minutes");case"seconds":return!E(o.setSeconds(K,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=_C(e,G,l),n=o.setHours(K,t);return!i({start:o.setSeconds(o.setMinutes(n,0),0),end:o.setSeconds(o.setMinutes(n,59),59)})||!s(t)}case"minutes":{const t=o.setMinutes(K,e);return!i({start:o.setSeconds(t,0),end:o.setSeconds(t,59)})||!s(e,x)}case"seconds":{const t=o.setSeconds(K,e);return!i({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[l,K,h,g,G,v,x,w,E,o,y,b,a,A]),Q=JO(),J=r.useMemo((()=>{switch(H){case"hours":{const e=(e,t)=>{const n=_C(e,G,l);W(o.setHours(K,n),t)};return{onChange:e,viewValue:o.getHours(K),children:zD({value:F,utils:o,ampm:l,onChange:e,getClockNumberText:n.hoursClockNumberText,isDisabled:e=>I||X(e,"hours"),selectedId:Q})}}case"minutes":{const e=o.getMinutes(K),t=(e,t)=>{W(o.setMinutes(K,e),t)};return{viewValue:e,onChange:t,children:UD({utils:o,value:e,onChange:t,getClockNumberText:n.minutesClockNumberText,isDisabled:e=>I||X(e,"minutes"),selectedId:Q})}}case"seconds":{const e=o.getSeconds(K),t=(e,t)=>{W(o.setSeconds(K,e),t)};return{viewValue:e,onChange:t,children:UD({utils:o,value:e,onChange:t,getClockNumberText:n.secondsClockNumberText,isDisabled:e=>I||X(e,"seconds"),selectedId:Q})}}default:throw new Error("You must provide the type for ClockView")}}),[H,o,F,l,n.hoursClockNumberText,n.minutesClockNumberText,n.secondsClockNumberText,G,W,K,X,Q,I]),ee=i,te=(e=>{const{classes:t}=e;return pS({root:["root"],arrowSwitcher:["arrowSwitcher"]},hD,t)})(ee);return(0,Wn.jsxs)(WD,(0,$.Z)({ref:t,className:mS(te.root,_),ownerState:ee},R,{children:[(0,Wn.jsx)(LD,(0,$.Z)({autoFocus:null!=u?u:!!D,ampmInClock:s&&A.includes("hours"),value:F,type:H,ampm:l,minutesStep:x,isTimeDisabled:X,meridiemMode:G,handleMeridiemChange:Y,selectedId:Q,disabled:I,readOnly:N},J)),C&&(0,Wn.jsx)(qD,{className:te.arrowSwitcher,slots:L,slotProps:j,onGoToPrevious:()=>z(U),isPreviousDisabled:!U,previousLabel:n.openPreviousView,onGoToNext:()=>z(Z),isNextDisabled:!Z,nextLabel:n.openNextView,ownerState:ee})]}))})),KD=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:a,value:o,defaultValue:i,onChange:l,className:s,classes:u,disableFuture:c,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,ampmInClock:y,components:b,componentsProps:x,slots:w,slotProps:E,readOnly:C,disabled:S,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:P})=>(0,Wn.jsx)($D,{view:e,onViewChange:t,focusedView:n&&TC(n)?n:null,onFocusedViewChange:r,views:a.filter(TC),value:o,defaultValue:i,onChange:l,className:s,classes:u,disableFuture:c,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,ampmInClock:y,components:b,componentsProps:x,slots:w,slotProps:E,readOnly:C,disabled:S,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:P}),GD=({props:e,value:t,adapter:n})=>{const r=NS({adapter:n,value:t,props:e});return null!==r?r:(({adapter:e,value:t,props:n})=>{const{minTime:r,maxTime:a,minutesStep:o,shouldDisableClock:i,shouldDisableTime:l,disableIgnoringDatePartForTimeValidation:s=!1,disablePast:u,disableFuture:c}=n,d=e.utils.date(),p=e.utils.date(t),f=RC(s,e.utils);if(null===t)return null;switch(!0){case!e.utils.isValid(t):return"invalidDate";case Boolean(r&&f(r,t)):return"minTime";case Boolean(a&&f(t,a)):return"maxTime";case Boolean(c&&e.utils.isAfter(p,d)):return"disableFuture";case Boolean(u&&e.utils.isBefore(p,d)):return"disablePast";case Boolean(l&&l(t,"hours")):return"shouldDisableTime-hours";case Boolean(l&&l(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(l&&l(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(i&&i(e.utils.getHours(t),"hours")):return"shouldDisableClock-hours";case Boolean(i&&i(e.utils.getMinutes(t),"minutes")):return"shouldDisableClock-minutes";case Boolean(i&&i(e.utils.getSeconds(t),"seconds")):return"shouldDisableClock-seconds";case Boolean(o&&e.utils.getMinutes(t)%o!=0):return"minutesStep";default:return null}})({adapter:n,value:t,props:e})},YD=["components","componentsProps","slots","slotProps","InputProps","inputProps"],XD=["inputRef"],QD=["ref","onPaste","inputMode","readOnly"],JD=r.forwardRef((function(e,t){var n,r,a;const o=(0,_r.useThemeProps)({props:e,name:"MuiDateTimeField"}),{components:i,componentsProps:l,slots:s,slotProps:u,InputProps:c,inputProps:d}=o,p=(0,q.Z)(o,YD),f=o,m=null!=(n=null!=(r=null==s?void 0:s.textField)?r:null==i?void 0:i.TextField)?n:Vx(),h=FS({elementType:m,externalSlotProps:null!=(a=null==u?void 0:u.textField)?a:null==l?void 0:l.textField,externalForwardedProps:p,ownerState:f}),{inputRef:g}=h,v=(0,q.Z)(h,XD);v.inputProps=(0,$.Z)({},v.inputProps,d),v.InputProps=(0,$.Z)({},v.InputProps,c);const y=(({props:e,inputRef:t})=>{const n=(e=>{var t,n,r,a,o,i,l,s;const u=sS(),c=uS(),d=(null!=(t=e.ampm)?t:u.is12HourCycleInCurrentLocale())?u.formats.keyboardDateTime12h:u.formats.keyboardDateTime24h;return(0,$.Z)({},e,{disablePast:null!=(n=e.disablePast)&&n,disableFuture:null!=(r=e.disableFuture)&&r,format:null!=(a=e.format)?a:d,disableIgnoringDatePartForTimeValidation:Boolean(e.minDateTime||e.maxDateTime),minDate:wC(u,null!=(o=e.minDateTime)?o:e.minDate,c.minDate),maxDate:wC(u,null!=(i=e.maxDateTime)?i:e.maxDate,c.maxDate),minTime:null!=(l=e.minDateTime)?l:e.minTime,maxTime:null!=(s=e.maxDateTime)?s:e.maxTime})})(e),{forwardedProps:r,internalProps:a}=qO(n,"date-time");return VO({inputRef:t,forwardedProps:r,internalProps:a,valueManager:nS,fieldValueManager:rS,validator:GD,valueType:"date-time"})})({props:v,inputRef:g}),{ref:b,onPaste:x,inputMode:w,readOnly:E}=y,C=(0,q.Z)(y,QD);return(0,Wn.jsx)(m,(0,$.Z)({ref:t},C,{InputProps:(0,$.Z)({},C.InputProps,{readOnly:E}),inputProps:(0,$.Z)({},C.inputProps,{inputMode:w,onPaste:x,ref:b})}))}));var eM=n(3754),tM=n.n(eM),nM=n(2932),rM=n.n(nM);function aM(e){return xS("MuiDateTimePickerTabs",e)}wS("MuiDateTimePickerTabs",["root"]);const oM=e=>kC(e)?"date":"time",iM=(0,_r.styled)(rM(),{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${nM.tabsClasses.indicator}`]:{bottom:"auto",top:0}}}))),lM=function(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,Wn.jsx)(NO,{}),onViewChange:a,timeIcon:o=(0,Wn.jsx)(RO,{}),view:i,hidden:l="undefined"==typeof window||window.innerHeight<667}=t,s=cS(),u=(e=>{const{classes:t}=e;return pS({root:["root"]},aM,t)})(t);return l?null:(0,Wn.jsxs)(iM,{ownerState:t,variant:"fullWidth",value:oM(i),onChange:(e,t)=>{a("date"===t?"day":"hours")},className:u.root,children:[(0,Wn.jsx)(tM(),{value:"date","aria-label":s.dateTableLabel,icon:(0,Wn.jsx)(r.Fragment,{children:n})}),(0,Wn.jsx)(tM(),{value:"time","aria-label":s.timeTableLabel,icon:(0,Wn.jsx)(r.Fragment,{children:o})})]})};function sM(e){return xS("MuiPickersToolbarText",e)}const uM=wS("MuiPickersToolbarText",["root","selected"]),cM=["className","selected","value"],dM=(0,_r.styled)(gd(),{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${uM.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${uM.selected}`]:{color:(e.vars||e).palette.text.primary}}))),pM=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiPickersToolbarText"}),{className:r,value:a}=n,o=(0,q.Z)(n,cM),i=(e=>{const{classes:t,selected:n}=e;return pS({root:["root",n&&"selected"]},sM,t)})(n);return(0,Wn.jsx)(dM,(0,$.Z)({ref:t,className:mS(r,i.root),component:"span"},o,{children:a}))})),fM=["align","className","selected","typographyClassName","value","variant","width"],mM=(0,_r.styled)(br(),{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),hM=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:a,selected:o,typographyClassName:i,value:l,variant:s,width:u}=n,c=(0,q.Z)(n,fM),d=(e=>{const{classes:t}=e;return pS({root:["root"]},ES,t)})(n);return(0,Wn.jsx)(mM,(0,$.Z)({variant:"text",ref:t,className:mS(a,d.root)},u?{sx:{width:u}}:{},c,{children:(0,Wn.jsx)(pM,{align:r,className:i,variant:s,value:l,selected:o})}))}));function gM(e){return xS("MuiDateTimePickerToolbar",e)}const vM=wS("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),yM=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant"],bM=e=>{const{classes:t,theme:n,isLandscape:r}=e;return pS({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer","rtl"===n.direction&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer","rtl"===n.direction&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",r&&"ampmLandscape"],ampmLabel:["ampmLabel"]},gM,t)},xM=(0,_r.styled)(kS,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({paddingLeft:"desktop"!==t.toolbarVariant||t.isLandscape?16:24,paddingRight:"desktop"!==t.toolbarVariant||t.isLandscape?16:0,borderBottom:"desktop"===t.toolbarVariant?`1px solid ${(e.vars||e).palette.divider}`:void 0,borderRight:"desktop"===t.toolbarVariant&&t.isLandscape?`1px solid ${(e.vars||e).palette.divider}`:void 0,justifyContent:"space-around",position:"relative",[`& .${CS.penIconButton}`]:(0,$.Z)({position:"absolute",top:8},"rtl"===e.direction?{left:8}:{right:8})})));xM.propTypes={as:yt().elementType,classes:yt().object,className:yt().string,isLandscape:yt().bool.isRequired,isMobileKeyboardViewOpen:yt().bool,landscapeDirection:yt().oneOf(["column","row"]),ownerState:yt().object.isRequired,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object]),toggleMobileKeyboardView:yt().func,toolbarTitle:yt().node,viewType:yt().oneOf(["date","time"])};const wM=(0,_r.styled)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),EM=(0,_r.styled)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})((({theme:e,ownerState:t})=>{const n=t.isLandscape&&"desktop"!==t.toolbarVariant?"column":"row";return(0,$.Z)({display:"flex",flexDirection:n},"desktop"===t.toolbarVariant&&(0,$.Z)({},!t.isLandscape&&{gap:9,marginRight:4,alignSelf:"flex-end"}),"rtl"===e.direction&&{flexDirection:`${n}-reverse`})})),CM=(0,_r.styled)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})((({theme:e,ownerState:t})=>(0,$.Z)({display:"flex"},"desktop"===t.toolbarVariant&&{gap:1.5},"rtl"===e.direction&&{flexDirection:"row-reverse"})));EM.propTypes={as:yt().elementType,ownerState:yt().object.isRequired,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object])};const SM=(0,_r.styled)(pM,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})((({ownerState:e})=>({margin:"desktop"===e.toolbarVariant?0:"0 4px 0 2px",cursor:"default"}))),OM=(0,_r.styled)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${vM.ampmLabel}`]:t.ampmLabel},{[`&.${vM.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})((({ownerState:e})=>(0,$.Z)({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"},{[`& .${vM.ampmLabel}`]:{fontSize:17}})));function kM(e){const t=(0,_r.useThemeProps)({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:a,value:o,onChange:i,view:l,isLandscape:s,onViewChange:u,toolbarFormat:c,toolbarPlaceholder:d="––",views:p,disabled:f,readOnly:m,toolbarVariant:h="mobile"}=t,g=(0,q.Z)(t,yM),v=t,y=sS(),{meridiemMode:b,handleMeridiemChange:x}=dP(o,n,i),w=Boolean(n&&!a),E="desktop"===h,C=cS(),S=(0,_r.useTheme)(),O=bM((0,$.Z)({},v,{theme:S})),k=r.useMemo((()=>o?c?y.formatByString(o,c):y.format(o,"shortDate"):d),[o,c,d,y]);return(0,Wn.jsxs)(xM,(0,$.Z)({toolbarTitle:C.dateTimePickerToolbarTitle,isLandscape:s,className:O.root},g,{ownerState:v,children:[(0,Wn.jsxs)(wM,{className:O.dateContainer,ownerState:v,children:[p.includes("year")&&(0,Wn.jsx)(hM,{tabIndex:-1,variant:"subtitle1",onClick:()=>u("year"),selected:"year"===l,value:o?y.format(o,"year"):"–"}),p.includes("day")&&(0,Wn.jsx)(hM,{tabIndex:-1,variant:E?"h5":"h4",onClick:()=>u("day"),selected:"day"===l,value:k})]}),(0,Wn.jsxs)(EM,{className:O.timeContainer,ownerState:v,children:[(0,Wn.jsxs)(CM,{className:O.timeDigitsContainer,ownerState:v,children:[p.includes("hours")&&(0,Wn.jsx)(hM,{variant:E?"h5":"h3",width:E&&!s?bO:void 0,onClick:()=>u("hours"),selected:"hours"===l,value:o?(A=o,n?y.format(A,"hours12h"):y.format(A,"hours24h")):"--"}),p.includes("minutes")&&(0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)(SM,{variant:E?"h5":"h3",value:":",className:O.separator,ownerState:v}),(0,Wn.jsx)(hM,{variant:E?"h5":"h3",width:E&&!s?bO:void 0,onClick:()=>u("minutes"),selected:"minutes"===l,value:o?y.format(o,"minutes"):"--"})]}),p.includes("seconds")&&(0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)(SM,{variant:E?"h5":"h3",value:":",className:O.separator,ownerState:v}),(0,Wn.jsx)(hM,{variant:E?"h5":"h3",width:E&&!s?bO:void 0,onClick:()=>u("seconds"),selected:"seconds"===l,value:o?y.format(o,"seconds"):"--"})]})]}),w&&!E&&(0,Wn.jsxs)(OM,{className:O.ampmSelection,ownerState:v,children:[(0,Wn.jsx)(hM,{variant:"subtitle2",selected:"am"===b,typographyClassName:O.ampmLabel,value:y.getMeridiemText("am"),onClick:m?void 0:()=>x("am"),disabled:f}),(0,Wn.jsx)(hM,{variant:"subtitle2",selected:"pm"===b,typographyClassName:O.ampmLabel,value:y.getMeridiemText("pm"),onClick:m?void 0:()=>x("pm"),disabled:f})]}),n&&E&&(0,Wn.jsx)(hM,{variant:"h5",onClick:()=>u("meridiem"),selected:"meridiem"===l,value:o&&b?y.getMeridiemText(b):"--",width:bO})]})]}));var A}function AM(e,t){var n,a,o,i,l,s,u,c,d,p,f;const m=sS(),h=uS(),g=(0,_r.useThemeProps)({props:e,name:t}),v=null!=(n=g.ampm)?n:m.is12HourCycleInCurrentLocale(),y=r.useMemo((()=>{var e;return null==(null==(e=g.localeText)?void 0:e.toolbarTitle)?g.localeText:(0,$.Z)({},g.localeText,{dateTimePickerToolbarTitle:g.localeText.toolbarTitle})}),[g.localeText]),b=null!=(a=g.slots)?a:_S(g.components),x=null!=(o=g.slotProps)?o:g.componentsProps;return(0,$.Z)({},g,yC({views:g.views,openTo:g.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:v,localeText:y,orientation:null!=(i=g.orientation)?i:"portrait",disableIgnoringDatePartForTimeValidation:null!=(l=g.disableIgnoringDatePartForTimeValidation)?l:Boolean(g.minDateTime||g.maxDateTime||g.disablePast||g.disableFuture),disableFuture:null!=(s=g.disableFuture)&&s,disablePast:null!=(u=g.disablePast)&&u,minDate:wC(m,null!=(c=g.minDateTime)?c:g.minDate,h.minDate),maxDate:wC(m,null!=(d=g.maxDateTime)?d:g.maxDate,h.maxDate),minTime:null!=(p=g.minDateTime)?p:g.minTime,maxTime:null!=(f=g.maxDateTime)?f:g.maxTime,slots:(0,$.Z)({toolbar:kM,tabs:lM},b),slotProps:(0,$.Z)({},x,{toolbar:(0,$.Z)({ampm:v},null==x?void 0:x.toolbar)})})}var PM=n(6825),TM=n.n(PM);function DM(e){return xS("MuiMultiSectionDigitalClock",e)}wS("MuiMultiSectionDigitalClock",["root"]);var MM=n(7929),_M=n.n(MM);function IM(e){return xS("MuiMultiSectionDigitalClock",e)}const NM=wS("MuiMultiSectionDigitalClock",["root","item"]),RM=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],LM=(0,_r.styled)(_M(),{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({maxHeight:232,width:56,padding:0,overflow:"hidden",scrollBehavior:t.alreadyRendered?"smooth":"auto","&:hover":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&:after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"}}))),jM=(0,_r.styled)(mf(),{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})((({theme:e})=>({padding:8,margin:"2px 4px",width:bO,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,_r.alpha)(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,_r.alpha)(e.palette.primary.main,e.palette.action.focusOpacity)}}))),FM=r.forwardRef((function(e,t){var n;const a=r.useRef(null),o=(0,HS.Z)(t,a),i=(0,_r.useThemeProps)({props:e,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:l,onChange:s,className:u,disabled:c,readOnly:d,items:p,active:f,slots:m,slotProps:h,skipDisabled:g}=i,v=(0,q.Z)(i,RM),y=r.useMemo((()=>(0,$.Z)({},i,{alreadyRendered:!!a.current})),[i]),b=(e=>{const{classes:t}=e;return pS({root:["root"],item:["item"]},IM,t)})(y),x=null!=(n=null==m?void 0:m.digitalClockSectionItem)?n:jM;return r.useEffect((()=>{if(null===a.current)return;const e=a.current.querySelector('[role="option"][aria-selected="true"]');if(!e)return;f&&l&&e.focus();const t=e.offsetTop;a.current.scrollTop=t-4})),(0,Wn.jsx)(LM,(0,$.Z)({ref:o,className:mS(b.root,u),ownerState:y,autoFocusItem:l&&f,role:"listbox"},v,{children:p.map((e=>{var t,n;if(g&&null!=(t=e.isDisabled)&&t.call(e,e.value))return null;const r=e.isSelected(e.value);return(0,Wn.jsx)(x,(0,$.Z)({onClick:()=>!d&&s(e.value),selected:r,disabled:null!=c?c:null==(n=e.isDisabled)?void 0:n.call(e,e.value),disableRipple:d,role:"option","aria-disabled":d,"aria-label":e.ariaLabel,"aria-selected":r},null==h?void 0:h.digitalClockSectionItem,{children:e.label}),e.label)}))}))})),VM=({now:e,value:t,utils:n,ampm:r,isDisabled:a,resolveAriaLabel:o,timeStep:i})=>{const l=t?n.getHours(t):null,s=[],u=e=>null!==l&&(r?12===e?12===l||0===l:l===e||l-12===e:l===e),c=r?11:23;for(let t=0;t<=c;t+=i){let i=n.format(n.setHours(e,t),r?"hours12h":"hours24h");const l=o(parseInt(i,10).toString());i=n.formatNumber(i),s.push({value:t,label:i,isSelected:u,isDisabled:a,ariaLabel:l})}return s},BM=({value:e,isDisabled:t,timeStep:n,resolveLabel:r,resolveAriaLabel:a,hasValue:o=!0})=>{const i=t=>null!==e&&o&&e===t;return[...Array.from({length:Math.ceil(60/n)},((e,o)=>{const l=n*o;return{value:l,label:r(l),isDisabled:t,isSelected:i,ariaLabel:a(l.toString())}}))]},HM=["ampm","timeSteps","autoFocus","components","componentsProps","slots","slotProps","value","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","defaultValue","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled"],zM=(0,_r.styled)(wP,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`}))),UM=r.forwardRef((function(e,t){const n=dS(),a=sS(),o=cS(),i=(0,_r.useThemeProps)({props:e,name:"MuiMultiSectionDigitalClock"}),{ampm:l=a.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:u,components:c,componentsProps:d,slots:p,slotProps:f,value:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:v,disableFuture:y,disablePast:b,minutesStep:x=1,shouldDisableClock:w,shouldDisableTime:E,onChange:C,defaultValue:S,view:O,views:k=["hours","minutes"],openTo:A,onViewChange:P,focusedView:T,onFocusedViewChange:D,className:M,disabled:_,readOnly:I,skipDisabled:N=!1}=i,R=(0,q.Z)(i,HM),L=r.useMemo((()=>(0,$.Z)({hours:1,minutes:5,seconds:5},s)),[s]),[j,F]=(0,LO.Z)({name:"MultiSectionDigitalClock",state:"value",controlled:m,default:null!=S?S:null}),V=(0,rO.Z)(((e,t,n)=>{F(e),null==C||C(e,t,n)})),B=r.useMemo((()=>l&&k.includes("hours")?k.includes("meridiem")?k:[...k,"meridiem"]:k),[l,k]),{view:H,setValueAndGoToView:z,focusedView:U}=iO({view:O,views:B,openTo:A,onViewChange:P,onChange:V,focusedView:T,onFocusedViewChange:D}),Z=r.useMemo((()=>j||a.setSeconds(a.setMinutes(a.setHours(n,0),0),0)),[j,n,a]),W=(0,rO.Z)((e=>{z(e,null,"meridiem")})),{meridiemMode:K,handleMeridiemChange:G}=dP(Z,l,W,"finish"),Y=r.useCallback(((e,t)=>{const r=RC(h,a),o="hours"===t||"minutes"===t&&B.includes("seconds"),i=({start:e,end:t})=>!(v&&r(v,t)||g&&r(e,g)||y&&r(e,n)||b&&r(n,o?t:e)),s=(e,n=1)=>{if(e%n!=0)return!1;if(null!=w&&w(e,t))return!1;if(E)switch(t){case"hours":return!E(a.setHours(Z,e),"hours");case"minutes":return!E(a.setMinutes(Z,e),"minutes");case"seconds":return!E(a.setSeconds(Z,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=_C(e,K,l),n=a.setHours(Z,t);return!i({start:a.setSeconds(a.setMinutes(n,0),0),end:a.setSeconds(a.setMinutes(n,59),59)})||!s(t)}case"minutes":{const t=a.setMinutes(Z,e);return!i({start:a.setSeconds(t,0),end:a.setSeconds(t,59)})||!s(e,x)}case"seconds":{const t=a.setSeconds(Z,e);return!i({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[l,Z,h,g,K,v,x,w,E,a,y,b,n,B]),X=(0,rO.Z)(((e,t)=>{const n=B.indexOf(e),r=B[n+1];z(t,r,e)})),Q=r.useCallback((e=>{switch(e){case"hours":return{onChange:e=>{const t=_C(e,K,l);X("hours",a.setHours(Z,t))},items:VM({now:n,value:j,ampm:l,utils:a,isDisabled:e=>_||Y(e,"hours"),timeStep:L.hours,resolveAriaLabel:o.hoursClockNumberText})};case"minutes":return{onChange:e=>{X("minutes",a.setMinutes(Z,e))},items:BM({value:a.getMinutes(Z),isDisabled:e=>_||Y(e,"minutes"),resolveLabel:e=>a.format(a.setMinutes(n,e),"minutes"),timeStep:L.minutes,hasValue:!!j,resolveAriaLabel:o.minutesClockNumberText})};case"seconds":return{onChange:e=>{X("seconds",a.setSeconds(Z,e))},items:BM({value:a.getSeconds(Z),isDisabled:e=>_||Y(e,"seconds"),resolveLabel:e=>a.format(a.setSeconds(n,e),"seconds"),timeStep:L.seconds,hasValue:!!j,resolveAriaLabel:o.secondsClockNumberText})};case"meridiem":{const e=a.getMeridiemText("am"),t=a.getMeridiemText("pm");return{onChange:G,items:[{value:"am",label:e,isSelected:()=>!!j&&"am"===K,ariaLabel:e},{value:"pm",label:t,isSelected:()=>!!j&&"pm"===K,ariaLabel:t}]}}default:throw new Error(`Unknown view: ${e} found.`)}}),[n,j,l,a,L.hours,L.minutes,L.seconds,o.hoursClockNumberText,o.minutesClockNumberText,o.secondsClockNumberText,K,X,Z,_,Y,G]),J=r.useMemo((()=>B.reduce(((e,t)=>(0,$.Z)({},e,{[t]:Q(t)})),{})),[B,Q]),ee=i,te=(e=>{const{classes:t}=e;return pS({root:["root"]},DM,t)})(ee);return(0,Wn.jsx)(zM,(0,$.Z)({ref:t,className:mS(te.root,M),ownerState:ee,role:"group"},R,{children:Object.entries(J).map((([e,t])=>(0,Wn.jsx)(FM,{items:t.items,onChange:t.onChange,active:H===e,autoFocus:null!=u?u:U===e,disabled:_,readOnly:I,slots:null!=p?p:c,slotProps:null!=f?f:d,skipDisabled:N,"aria-label":o.selectViewText(e)},e)))}))})),ZM=(0,_r.styled)("div")({display:"flex",margin:"0 auto"}),WM=({view:e,onViewChange:t,views:n,focusedView:a,onFocusedViewChange:o,value:i,defaultValue:l,onChange:s,className:u,classes:c,disableFuture:d,disablePast:p,minDate:f,minTime:m,maxDate:h,maxTime:g,shouldDisableDate:v,shouldDisableMonth:y,shouldDisableYear:b,shouldDisableTime:x,shouldDisableClock:w,reduceAnimations:E,minutesStep:C,ampm:S,onMonthChange:O,monthsPerRow:k,onYearChange:A,yearsPerRow:P,defaultCalendarMonth:T,components:D,componentsProps:M,slots:_,slotProps:I,loading:N,renderLoading:R,disableHighlightToday:L,readOnly:j,disabled:F,showDaysOutsideCurrentMonth:V,dayOfWeekFormatter:B,sx:H,autoFocus:z,fixedWeekNumber:U,displayWeekNumber:Z,disableIgnoringDatePartForTimeValidation:W,timeSteps:q,skipDisabled:K,timeViewsCount:G})=>{var Y,X,Q;const J=!(null==(Y=gC(null!=(Q=null==I?void 0:I.actionBar)?Q:null==M?void 0:M.actionBar,{}))||null==(X=Y.actions)||!X.length);return(0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsxs)(ZM,{children:[(0,Wn.jsx)(AP,{view:kC(e)?e:"day",onViewChange:t,views:n.filter(kC),focusedView:a&&kC(a)?a:null,onFocusedViewChange:o,value:i,defaultValue:l,onChange:s,className:u,classes:c,disableFuture:d,disablePast:p,minDate:f,maxDate:h,shouldDisableDate:v,shouldDisableMonth:y,shouldDisableYear:b,reduceAnimations:E,onMonthChange:O,monthsPerRow:k,onYearChange:A,yearsPerRow:P,defaultCalendarMonth:T,components:D,componentsProps:M,slots:_,slotProps:I,loading:N,renderLoading:R,disableHighlightToday:L,readOnly:j,disabled:F,showDaysOutsideCurrentMonth:V,dayOfWeekFormatter:B,sx:H,autoFocus:z,fixedWeekNumber:U,displayWeekNumber:Z}),G>0&&(0,Wn.jsxs)(r.Fragment,{children:[(0,Wn.jsx)(TM(),{orientation:"vertical"}),(0,Wn.jsx)(UM,{view:DC(e)?e:"hours",onViewChange:t,focusedView:a&&DC(a)?a:null,onFocusedViewChange:o,views:n.filter(DC),value:i,defaultValue:l,onChange:s,className:u,classes:c,disableFuture:d,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:x,shouldDisableClock:w,minutesStep:C,ampm:S,components:D,componentsProps:M,slots:_,slotProps:I,readOnly:j,disabled:F,sx:(0,$.Z)({borderBottom:0,width:"auto",[`.${NM.root}`]:{maxHeight:"100%"}},Array.isArray(H)?H:[H]),autoFocus:z,disableIgnoringDatePartForTimeValidation:W,timeSteps:q,skipDisabled:K})]})]}),J&&(0,Wn.jsx)(TM(),{})]})},qM=["views","format"],$M=(e,t)=>{let{views:n,format:r}=t,a=(0,q.Z)(t,qM);if(r)return r;const o=[],i=[];if(n.forEach((e=>{TC(e)?i.push(e):o.push(e)})),0===i.length)return AC(e,(0,$.Z)({views:o},a),!1);if(0===o.length)return LC(e,(0,$.Z)({views:i},a));const l=LC(e,(0,$.Z)({views:i},a));return`${AC(e,(0,$.Z)({views:o},a),!1)} ${l}`},KM=r.forwardRef((function(e,t){var n,r,a,o,i;const l=cS(),s=sS(),u=AM(e,"MuiDesktopDateTimePicker"),c=(0,$.Z)({hours:1,minutes:5,seconds:5},u.timeSteps),d=!u.viewRenderers||0===Object.keys(u.viewRenderers).length,p=d?{day:WM,month:WM,year:WM,hours:WM,minutes:WM,seconds:WM,meridiem:WM}:(0,$.Z)({day:PP,month:PP,year:PP,hours:null,minutes:null,seconds:null,meridiem:null},u.viewRenderers),f=null==(n=u.ampmInClock)||n,m=d?["accept"]:[],h=(0,$.Z)({},u,{viewRenderers:p,format:$M(s,u),views:u.ampm?[...u.views,"meridiem"]:u.views,yearsPerRow:null!=(r=u.yearsPerRow)?r:4,ampmInClock:f,timeSteps:c,slots:(0,$.Z)({field:JD,openPickerIcon:IO},u.slots),slotProps:(0,$.Z)({},u.slotProps,{field:e=>{var n;return(0,$.Z)({},gC(null==(n=u.slotProps)?void 0:n.field,e),ZO(u),{ref:t})},toolbar:(0,$.Z)({hidden:!0,ampmInClock:f,toolbarVariant:d?"desktop":"mobile"},null==(a=u.slotProps)?void 0:a.toolbar),tabs:(0,$.Z)({hidden:!0},null==(o=u.slotProps)?void 0:o.tabs),actionBar:(0,$.Z)({actions:m},null==(i=u.slotProps)?void 0:i.actionBar)})}),{renderPicker:g}=PO({props:h,valueManager:nS,valueType:"date-time",getOpenDialogAriaText:l.openDatePickerDialogue,validator:GD});return g()}));KM.propTypes={ampm:yt().bool,ampmInClock:yt().bool,autoFocus:yt().bool,className:yt().string,closeOnSelect:yt().bool,components:yt().object,componentsProps:yt().object,dayOfWeekFormatter:yt().func,defaultCalendarMonth:yt().any,defaultValue:yt().any,disabled:yt().bool,disableFuture:yt().bool,disableHighlightToday:yt().bool,disableIgnoringDatePartForTimeValidation:yt().bool,disableOpenPicker:yt().bool,disablePast:yt().bool,displayWeekNumber:yt().bool,fixedWeekNumber:yt().number,format:yt().string,formatDensity:yt().oneOf(["dense","spacious"]),inputRef:yt().oneOfType([yt().func,yt().shape({current:yt().object})]),label:yt().node,loading:yt().bool,localeText:yt().object,maxDate:yt().any,maxDateTime:yt().any,maxTime:yt().any,minDate:yt().any,minDateTime:yt().any,minTime:yt().any,minutesStep:yt().number,monthsPerRow:yt().oneOf([3,4]),onAccept:yt().func,onChange:yt().func,onClose:yt().func,onError:yt().func,onMonthChange:yt().func,onOpen:yt().func,onSelectedSectionsChange:yt().func,onViewChange:yt().func,onYearChange:yt().func,open:yt().bool,openTo:yt().oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:yt().oneOf(["landscape","portrait"]),readOnly:yt().bool,reduceAnimations:yt().bool,renderLoading:yt().func,selectedSections:yt().oneOfType([yt().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),yt().number,yt().shape({endIndex:yt().number.isRequired,startIndex:yt().number.isRequired})]),shouldDisableClock:yt().func,shouldDisableDate:yt().func,shouldDisableMonth:yt().func,shouldDisableTime:yt().func,shouldDisableYear:yt().func,showDaysOutsideCurrentMonth:yt().bool,skipDisabled:yt().bool,slotProps:yt().object,slots:yt().object,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object]),timeSteps:yt().shape({hours:yt().number,minutes:yt().number,seconds:yt().number}),value:yt().any,view:yt().oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:yt().shape({day:yt().func,hours:yt().func,meridiem:yt().func,minutes:yt().func,month:yt().func,seconds:yt().func,year:yt().func}),views:yt().arrayOf(yt().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsPerRow:yt().oneOf([3,4])};const GM=r.forwardRef((function(e,t){var n,r,a;const o=cS(),i=sS(),l=AM(e,"MuiMobileDateTimePicker"),s=(0,$.Z)({day:PP,month:PP,year:PP,hours:KD,minutes:KD,seconds:KD},l.viewRenderers),u=null!=(n=l.ampmInClock)&&n,c=(0,$.Z)({},l,{viewRenderers:s,format:$M(i,l),ampmInClock:u,slots:(0,$.Z)({field:JD},l.slots),slotProps:(0,$.Z)({},l.slotProps,{field:e=>{var n;return(0,$.Z)({},gC(null==(n=l.slotProps)?void 0:n.field,e),ZO(l),{ref:t})},toolbar:(0,$.Z)({hidden:!1,ampmInClock:u},null==(r=l.slotProps)?void 0:r.toolbar),tabs:(0,$.Z)({hidden:!1},null==(a=l.slotProps)?void 0:a.tabs)})}),{renderPicker:d}=NP({props:c,valueManager:nS,valueType:"date-time",getOpenDialogAriaText:o.openDatePickerDialogue,validator:GD});return d()}));GM.propTypes={ampm:yt().bool,ampmInClock:yt().bool,autoFocus:yt().bool,className:yt().string,closeOnSelect:yt().bool,components:yt().object,componentsProps:yt().object,dayOfWeekFormatter:yt().func,defaultCalendarMonth:yt().any,defaultValue:yt().any,disabled:yt().bool,disableFuture:yt().bool,disableHighlightToday:yt().bool,disableIgnoringDatePartForTimeValidation:yt().bool,disableOpenPicker:yt().bool,disablePast:yt().bool,displayWeekNumber:yt().bool,fixedWeekNumber:yt().number,format:yt().string,formatDensity:yt().oneOf(["dense","spacious"]),inputRef:yt().oneOfType([yt().func,yt().shape({current:yt().object})]),label:yt().node,loading:yt().bool,localeText:yt().object,maxDate:yt().any,maxDateTime:yt().any,maxTime:yt().any,minDate:yt().any,minDateTime:yt().any,minTime:yt().any,minutesStep:yt().number,monthsPerRow:yt().oneOf([3,4]),onAccept:yt().func,onChange:yt().func,onClose:yt().func,onError:yt().func,onMonthChange:yt().func,onOpen:yt().func,onSelectedSectionsChange:yt().func,onViewChange:yt().func,onYearChange:yt().func,open:yt().bool,openTo:yt().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:yt().oneOf(["landscape","portrait"]),readOnly:yt().bool,reduceAnimations:yt().bool,renderLoading:yt().func,selectedSections:yt().oneOfType([yt().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),yt().number,yt().shape({endIndex:yt().number.isRequired,startIndex:yt().number.isRequired})]),shouldDisableClock:yt().func,shouldDisableDate:yt().func,shouldDisableMonth:yt().func,shouldDisableTime:yt().func,shouldDisableYear:yt().func,showDaysOutsideCurrentMonth:yt().bool,slotProps:yt().object,slots:yt().object,sx:yt().oneOfType([yt().arrayOf(yt().oneOfType([yt().func,yt().object,yt().bool])),yt().func,yt().object]),value:yt().any,view:yt().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:yt().shape({day:yt().func,hours:yt().func,minutes:yt().func,month:yt().func,seconds:yt().func,year:yt().func}),views:yt().arrayOf(yt().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsPerRow:yt().oneOf([3,4])};const YM=["desktopModeMediaQuery"],XM=r.forwardRef((function(e,t){const n=(0,_r.useThemeProps)({props:e,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:r=QS}=n,a=(0,q.Z)(n,YM);return hC()(r,{defaultMatches:!0})?(0,Wn.jsx)(KM,(0,$.Z)({ref:t},a)):(0,Wn.jsx)(GM,(0,$.Z)({ref:t},a))})),QM=lr({adornedEnd:{paddingRight:4},inputRoot:{fontSize:"14px",letterSpacing:0,lineHeight:"16px",overflow:"hidden","& > input":{textTransform:"uppercase"}},isCrossedOut:{textDecoration:"line-through"}});function JM(){return JM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JM.apply(null,arguments)}function e_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){t_(e,t,n[t])}))}return e}function t_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const n_=e=>{var t;let{minDate:n,maxDate:r,value:o,label:i,slotProps:l,onChange:u,format:c,isCrossedOut:d}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["minDate","maxDate","value","label","slotProps","onChange","format","isCrossedOut"]);const h=QM(),{errorMessage:g,editorValue:v,editorMaxDate:y,editorMinDate:b,onError:x,onChange:w}=WP({minDate:n,maxDate:r,value:o,onChange:u}),E=gt(),C={textField:{size:"small",variant:"filled",helperText:g,error:Boolean(g),InputProps:{classes:{root:p()(h.inputRoot,{[h.isCrossedOut]:d})},disableUnderline:(0,f.isNil)(v)},InputLabelProps:{shrink:!(0,f.isNil)(i)}},popper:{placement:"bottom-start","data-mui-color-scheme":null==E||null===(t=E.palette)||void 0===t?void 0:t.mode,modifiers:[{name:"viewHeightModifier",enabled:!0,phase:"beforeWrite",fn:({state:e})=>{e.styles.popper.height="358px",e.placement.includes("top-start")&&(e.styles.popper=e_({},e.styles.popper,{display:"flex",alignItems:"flex-end"})),e.placement.includes("bottom")&&(e.styles.popper=e_({},e.styles.popper,{display:"block"}))}}]},inputAdornment:{position:"end",className:h.adornedEnd}},S=(0,f.mergeDeepLeft)(l,C);return a().createElement(XM,JM({format:c||(0,s.getLocaleFormat)(),slotProps:S,views:["year","month","day","hours","minutes","seconds"],viewRenderers:{hours:KD,minutes:KD,seconds:KD},label:i,value:v,minDate:b,maxDate:y,onError:x,onChange:w,reduceAnimations:!0},m))};var r_=n(359),a_=n.n(r_);function o_(){return o_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o_.apply(null,arguments)}const i_=e=>a().createElement("svg",o_({width:79,height:68,viewBox:"0 0 79 68",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgNoDataSearch"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M24.889 40.444V22.556H3.603v-2.334H24.89V3.89h2.333v16.333h23.334V3.89h2.333v16.333h18.157v2.334H52.889v17.888h18.157v2.334H52.889v17.396h-2.333V42.778H27.222v17.396H24.89V42.778H3.603v-2.334H24.89zm2.333 0h23.334V22.556H27.222v17.888z",fill:"#D2DEDE",opacity:.2}),a().createElement("path",{d:"M68.725 3.889H3.889v29.814l13.413-14.36 14.399 6.347 11.265-7.467h16.633l9.126-14.334zm2.053 4.016l-9.044 14.207H44.138l-12.06 7.994-13.818-6.091L3.889 39.4V59.89h66.889V7.905zM3 0h68.667a3 3 0 013 3v57.778a3 3 0 01-3 3H3a3 3 0 01-3-3V3a3 3 0 013-3z",fill:"#D2DEDE",opacity:.5}),a().createElement("path",{d:"M66.732 52.044H64.79l-.689-.664a15.91 15.91 0 003.86-10.4c0-8.826-7.154-15.98-15.98-15.98C43.154 25 36 32.154 36 40.98c0 8.827 7.154 15.981 15.98 15.981a15.91 15.91 0 0010.4-3.86l.664.689v1.942L75.337 68 79 64.337 66.732 52.044zM52 52c-6.087 0-11-4.913-11-11s4.913-11 11-11 11 4.913 11 11-4.913 11-11 11z",fill:"#B5C8C9",fillRule:"nonzero"}))),l_=lr({container:{display:"flex",flexShrink:0,alignItems:"center",height:"36px","& $smallIcon":{height:"24px",width:"28px",paddingRight:"10px",paddingLeft:"2px"},"& $text":{height:"14px",color:"#707F80",fontSize:"12px",lineHeight:"14px"}},smallIcon:{},text:{}});function s_(){return s_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s_.apply(null,arguments)}const u_=e=>{let{className:t,variant:n="noResults"}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","variant"]);const o=l_(),i="noResults"===n?c().text("No results found"):c().text("No data available");return a().createElement("div",s_({className:p()(o.container,t)},r),a().createElement(i_,{className:o.smallIcon}),a().createElement("div",{className:o.text},i))};var c_=n(7526),d_=n.n(c_);const p_=lr({loadMoreContainer:{display:"flex",height:"32px"},moreButton:{padding:"9px 38px 9px 38px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden"},loadingSpinner:{alignSelf:"center",marginLeft:"40px"}}),f_=({loading:e,onClick:t,onMouseDown:n})=>{const r=p_();return a().createElement("div",{className:r.loadMoreContainer},e?a().createElement(d_(),{className:r.loadingSpinner,size:24}):a().createElement(br(),{color:"primary",onClick:t,onMouseDown:n,className:r.moreButton},a().createElement("div",{className:r.buttonLabel},c().text("Load more"))))},m_=lr({suggestionsPlaceholder:{padding:"8px 16px",textAlign:"center"},suggestionsContainer:{width:"100%"},suggestionsContainerOpen:{maxHeight:"230px",overflowY:"auto"},suggestionsList:{margin:0,padding:0,listStyleType:"none"},suggestionsItem:{color:"rgba(0,0,0,0.87)",fontSize:"14px"},suggestionsItemText:{overflow:"hidden",textOverflow:"ellipsis",display:"block",whiteSpace:"pre"},inputRoot:{color:"rgba(0,0,0,0.87)",fontSize:"14px"},autosizeInput:{width:"auto",paddingTop:"10px",paddingBottom:"11px",marginLeft:"5px",overflow:"hidden","& input":{background:"0px center",border:0,fontSize:"inherit",outline:0,padding:0,color:"inherit"}},rawInput:{height:"19px",lineHeight:"19px",paddingTop:"10px",paddingBottom:"11px"},isCrossedOut:{textDecoration:"line-through"},multipleTextField:{flexWrap:"wrap",color:"rgba(0,0,0,0.87)",fontSize:"14px"},multipleTextFieldInput:{flex:"1 0 25px",flexWrap:"wrap"},multipleTextFieldAdornedStart:{paddingLeft:"8px"},underline:{"&:before":{display:"none"}}});function h_(){return h_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h_.apply(null,arguments)}function g_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){v_(e,t,n[t])}))}return e}function v_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y_(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const b_=50;var x_=function(e){return e.Type="type",e.Escape="escape",e.Click="click",e.Enter="enter",e}(x_||{});const w_=e=>{let{value:t,max:n=b_,getSuggestions:o,onChange:i,multiple:l,fullWidth:u,InputProps:c={},isCrossedOut:d=!1}=e,m=y_(e,["value","max","getSuggestions","onChange","multiple","fullWidth","InputProps","isCrossedOut"]);const h=m_(),g=(0,r.useRef)(null),v=gp(),[y,b]=(0,r.useState)([]),[x,w]=(0,r.useState)(!1),[E,C]=(0,r.useState)(1),[S,O]=(0,r.useState)(!1),[k,A]=(0,r.useState)(""),[P,T]=(0,r.useState)(null),D=n+1,M=(0,r.useMemo)((()=>y.slice(0,E*n)),[y,E,n]),_=y.length>M.length,I=!0!==l||(0,f.isNil)(t)?t:(0,s.wrapInArrayIfNeeded)(t),N=(0,r.useCallback)((async({value:e})=>{let t=[];try{t=await v(o(e.trim(),D))}catch(e){console.warn(e)}var n;b(t),w((0,f.isEmpty)(t)&&(null===(n=g.current)||void 0===n?void 0:n.querySelector("input"))===document.activeElement)}),[v,o,D]),R=(0,r.useCallback)((0,s.debounce)(N,300),[o]),L=(0,r.useCallback)((async()=>{O(!0);try{const e=await o(k,D,E+1);b((t=>[...t,...e])),C((e=>e+1))}catch(e){console.warn(e)}finally{O(!1)}}),[o,k,E,D]),j=(0,r.useCallback)((e=>{"input-changed"===e.reason?R(e):N(e)}),[R,N]),F=(0,r.useCallback)((()=>{b([]),w(!1),C(1)}),[]),V=(0,r.useCallback)((({suggestion:e})=>{T(e)}),[]),B=(0,r.useCallback)((({newValue:e,method:t})=>{switch(t){case x_.Type:case x_.Escape:A(e);break;case x_.Click:case x_.Enter:!0===l?(e&&i((0,f.uniq)([...I||[],e])),A("")):A(e)}}),[l,i,I]),H=(0,r.useCallback)((e=>{"Enter"!==e.key||P||(!0===l?B({method:x_.Enter,newValue:k}):i(k))}),[B,i,P,k,l]),z=(0,r.useCallback)((()=>{!0!==l?i(k):B({method:x_.Enter,newValue:k})}),[k,i,l,B]);return(0,r.useEffect)((()=>{var e;!0!==l&&A(null!==(e=I)&&void 0!==e?e:"")}),[I,l]),Sp((()=>{C(1)}),[k]),a().createElement(a_(),{key:l,suggestions:M,shouldRenderSuggestions:f.T,getSuggestionValue:f.identity,onSuggestionsFetchRequested:j,onSuggestionsClearRequested:F,onSuggestionHighlighted:V,theme:{container:u?h.suggestionsContainer:"",suggestionsList:h.suggestionsList,suggestionsContainerOpen:h.suggestionsContainerOpen},inputProps:g_({value:k,onChange:(0,f.pipe)((0,f.nthArg)(1),B),onKeyDown:H,onBlur:z,fullWidth:u,variant:"standard",autoComplete:"off"},m),renderInputComponent:e=>{let{ref:t}=e,n=y_(e,["ref"]);const r={underline:p()({[h.underline]:(0,s.isEmptyValue)(I)}),input:p()(h.rawInput,(0,f.path)(["classes","input"],c))};return!0===l?a().createElement(Vx(),h_({},n,{ref:g,inputRef:t,InputProps:g_({},c,{startAdornment:null==I?void 0:I.map(((e,t)=>a().createElement(nT,{key:e,label:e,onDelete:()=>i((0,f.remove)(t,1,I))}))),inputComponent:DT,classes:g_({root:p()(h.multipleTextFieldInput,(0,f.path)(["classes","root"],c))},r,{input:p()(h.autosizeInput,r.input),adornedStart:h.multipleTextFieldAdornedStart})}),classes:{root:h.multipleTextField}})):a().createElement(Vx(),h_({},n,{ref:g,inputRef:t,InputProps:g_({},c,{classes:g_({root:p()(h.inputRoot,(0,f.path)(["classes","root"],c),{[h.isCrossedOut]:d})},r)})}))},renderSuggestionsContainer:e=>{let{children:t,containerProps:{ref:n}}=e,r=y_(e.containerProps,["ref"]);return a().createElement(nf,{anchorEl:g.current,open:Boolean(t)||x},a().createElement(Kp(),h_({},r,{ref:n,square:!0,style:{width:(0,f.prop)("clientWidth",g.current)}}),t||a().createElement(u_,{className:h.suggestionsPlaceholder}),_&&!x&&a().createElement(f_,{onClick:L,onMouseDown:e=>e.preventDefault(),loading:S})))},renderSuggestion:(e,{isHighlighted:t})=>a().createElement(mf(),{className:h.suggestionsItem,selected:t,component:"div"},a().createElement(Rd,{value:e},a().createElement("div",{className:h.suggestionsItemText},e)))})},E_=lr({checkIcon:{transform:"scale(.7)",marginLeft:"-30px",position:"absolute"}}),C_=e=>{const t=E_(),{isSelected:n,children:r}=e;return a().createElement(Jx,e,n&&a().createElement(QP(),{className:t.checkIcon}),a().createElement(a().Fragment,null,r))};C_.displayName="ReactSelectOptionWithCheckIcon";const S_=e=>{const{children:t,data:n,removeProps:r}=e;return a().createElement(nT,{tabIndex:-1,label:t,count:(0,f.prop)("formattedNumber",n),onDelete:r.onClick,deleteIcon:a().createElement(Gx(),e.removeProps)})};S_.propTypes={children:yt().node,data:yt().shape({value:yt().string,label:yt().string,number:yt().number}).isRequired,removeProps:yt().shape({onClick:yt().func.isRequired,onMouseDown:yt().func.isRequired,onTouchEnd:yt().func.isRequired}).isRequired};const O_=e=>e&&e.lookupCode&&!e.value,k_=(0,f.curry)(((e,t)=>(0,f.hasPath)([t,"displayName"],e))),A_=a().createContext(null);A_.displayName="DependentLookupAutopopulationContext";const P_=e=>{if(!e)return"";const{lookupCode:t,value:n}=e;return(0,s.getLookupLabel)(t,n)},T_=lr((e=>({option:{paddingLeft:"35px"},dropdownIndicator:{padding:"8px 12px",cursor:"pointer",color:e.palette.text.secondary},clearIndicator:{display:"none"},placeholder:{position:"static"},isCrossedOut:{textDecoration:"line-through"}})));function D_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){M_(e,t,n[t])}))}return e}function M_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function __(){return __=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},__.apply(null,arguments)}const I_={IndicatorSeparator:dw,LoadingIndicator:dw,Option:C_,DropdownIndicator:Wg,Menu:hw,MenuList:e=>{const{selectProps:{menuListFooter:t},children:n}=e;return a().createElement(_b.MenuList,e,n,t)},MultiValue:S_,Input:e=>{const t=T_(),{selectProps:{isCrossedOut:n}}=e;return a().createElement(_b.Input,__({},e,{inputClassName:p()({[t.isCrossedOut]:n}),isHidden:!1}))}},N_=50,R_=e=>{let{multiple:t,value:n,lookupCode:o,TextFieldProps:i,parents:l,onChange:u,getLookups:d,lookups:p={},resolveLookups:m,fullWidth:h,disabled:g,placeholder:v,max:y=N_}=e,b=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["multiple","value","lookupCode","TextFieldProps","parents","onChange","getLookups","lookups","resolveLookups","fullWidth","disabled","placeholder","max"]);const x=(0,r.useRef)(null),w=(0,r.useRef)(null),E=T_(),[C,S]=(0,r.useState)(""),[O,k]=(0,r.useState)([]),[A,P]=(0,r.useState)(1),[T,D]=(0,r.useState)(!1);(({lookups:e,resolvedValues:t,resolveLookups:n,onLookupsResolve:a})=>{const[o,i]=(0,r.useState)([]);(0,r.useEffect)((()=>{const[r,l]=(0,f.pipe)(s.wrapInArrayIfNeeded,(0,f.filter)(O_),(0,f.map)((0,f.prop)("lookupCode")),(0,f.partition)(k_(t)))(e);if(r.length>0){const e=r.map((e=>({lookupCode:e,value:t[e].displayName})));a(e)}const u=l.filter((e=>!o.includes(e)));u.length>0&&(i((0,f.pipe)((0,f.concat)(u),f.uniq)),n(u))}),[e,t])})({lookups:n,resolvedValues:p[o],resolveLookups:e=>m(o,e),onLookupsResolve:e=>u(t?e:e[0])}),((e,t,n)=>{var a;const o=(0,r.useRef)(!1);!o.current&&n&&document.activeElement===(null===(a=t.current)||void 0===a?void 0:a.getElementsByTagName("input")[0])&&(o.current=!0),(0,r.useEffect)((()=>{const t=()=>{o.current&&(o.current=!1)};var r,a;if(!n&&o.current&&(null===(r=e.current)||void 0===r||r.focus(),o.current=!1),n&&o.current)return null===(a=document)||void 0===a||a.addEventListener("click",t),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("click",t)}}),[n])})(w,x,g),(0,r.useEffect)((()=>{t||(S(P_(n)),k(j),P(1))}),[n]);const M=e=>{U(),u(e)},_=()=>{P(1),L("",k)},I=()=>{!t&&C&&C!==P_(n)&&(S(P_(n)),_())},N=(0,r.useCallback)(((e,t=1)=>(D(!0),(null===l?Promise.resolve([]):d({type:o,parents:l,displayNamePrefix:e,max:y+1,offset:(t-1)*y})).then((e=>(e=>Object.entries(e).map((([e,{displayName:t}])=>({lookupCode:e,value:t}))).sort(((e,t)=>{const n=P_(e).toLowerCase(),r=P_(t).toLowerCase();return s.utils.strings.sort("asc",n,r)})))(e))).catch((()=>[])).finally((()=>D(!1))))),[y,o,l]),R=(0,r.useCallback)((()=>{const e=C!==P_(n)?C:"";N(t?C:e,A+1).then((e=>{k((t=>(0,f.concat)(t.slice(0,A*y),e))),P((e=>e+1))}))}),[y,N,C,A]),L=(0,r.useCallback)((0,s.debounce)(((e,t)=>{N(e).then((e=>t(e)))}),400),[N]),{defaultOptions:j,initialDefaultOptions:F,isLoading:V}=(e=>{const[t,n]=(0,r.useState)([]),[a,o]=(0,r.useState)(null),[i,l]=(0,r.useState)(!1),s=gp();return(0,r.useEffect)((()=>{n([]),l(!0),s(e("")).then((e=>{n(e),o((t=>t||e)),l(!1)})).catch((()=>{l(!1)}))}),[e]),{defaultOptions:t,initialDefaultOptions:a,isLoading:i}})(N);(0,r.useEffect)((()=>{k(j)}),[j]),Sp((()=>{P(1)}),[o]);const B=(0,r.useMemo)((()=>O.slice(0,A*y)),[y,O,A]),H=O.length>B.length,z=t?(0,f.isEmpty)(n):!(null!=n&&n.lookupCode||null!=n&&n.value),{markAsTouched:U}=(({initialDefaultOptions:e,isEmptyValue:t,multiple:n,onChange:a})=>{const{id:o,isTouched:i,onTouch:l}=(0,r.useContext)(A_)||{};return(0,r.useEffect)((()=>{o&&e&&1===e.length&&t&&!i&&a(n?e:e[0])}),[e]),{markAsTouched:(0,r.useCallback)((()=>{o&&(null==l||l(o))}),[l,o])}})({initialDefaultOptions:F,isEmptyValue:z,multiple:t,onChange:u});return a().createElement(cw,__({},b,{isMulti:t,classes:E,menuPortalTarget:document.body,menuPlacement:"auto",TextFieldProps:D_({},i,{ref:x,disabled:(null==i?void 0:i.disabled)||g}),inputRef:x,innerRef:w,styles:{menuPortal:e=>D_({},e,{zIndex:1300}),container:e=>D_({},e,h?{width:"100%"}:{}),input:e=>D_({},e,{visibility:"visible"})},noOptionsMessage:()=>T&&!H?c().text("Loading..."):c().text("No results found"),components:I_,isClearable:!0,isSearchable:!0,controlShouldRenderValue:t,inputValue:C,filterOption:t?void 0:f.T,onInputChange:(e,{action:n})=>{switch(n){case"menu-close":I();break;case"input-blur":if(t&&C){S(""),_();break}I();break;case"input-change":S(e),P(1),L(e,k),t||""!==e||M("")}},loadingMessage:()=>c().text("Loading..."),isLoading:!C&&V,hideSelectedOptions:!1,placeholder:v||"",isDisabled:g,options:B,getOptionValue:(0,f.either)((0,f.prop)("value"),(0,f.prop)("lookupCode")),getOptionLabel:P_,onChange:M,onFocus:t?void 0:()=>{var e,t,r;n&&(null===(e=w.current)||void 0===e||null===(t=e.select)||void 0===t||null===(r=t.inputRef)||void 0===r||r.select())},value:(0,f.defaultTo)(t?[]:null,n),menuListFooter:H&&a().createElement(f_,{loading:T,onClick:R})}))},L_=lr({button:{"&:hover":{backgroundColor:"#d5d5d5"}},fileUploaderInput:{display:"none"}}),j_=({supportedFileTypes:e=[],onUpload:t,onBeforeUpload:n})=>{const o=L_(),i=(0,r.useRef)(),l=e.join(",");return a().createElement(a().Fragment,null,a().createElement(br(),{variant:"contained",onClick:()=>{i.current.value=null,i.current.click()},className:o.button},c().text("Select File")),a().createElement("input",{"data-reltio-id":"file-uploader",type:"file",className:o.fileUploaderInput,onChange:e=>{const r=e.target.files||e.dataTransfer.files||[];r.length>0&&(n(),t(r[0])),e.stopPropagation(),e.preventDefault()},ref:i,name:"uploadfile",accept:l}))},F_=e=>{pr(e,{title:c().text("File upload error")})};let V_=function(e){return e.Init="init",e.Uploading="uploading",e.Uploaded="uploaded",e}({});const B_=lr({button:{"&:hover":{backgroundColor:"#d5d5d5"}},fileUploaderInput:{display:"none"},uploaded:{display:"flex",alignItems:"center"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},cancelIcon:{height:"18px",width:"18px",color:"rgba(0,0,0,0.38)",marginLeft:"3px",cursor:"pointer"}}),H_=({link:e,filename:t,onUpload:n,onError:o=F_,onCancel:i,supportedFileTypes:l,isValidLink:u=!0})=>{const[c,d]=(0,r.useState)(V_.Init),[p,f]=(0,r.useState)(""),m=B_();(0,r.useEffect)((()=>{f(t)}),[t]),(0,r.useEffect)((()=>{d(e?V_.Uploaded:V_.Init)}),[e]);const h=(0,r.useCallback)((e=>{d(V_.Init),o(e)}),[o]),g=(0,r.useCallback)((e=>n(e).then((()=>{d(V_.Uploaded),f(e.name)})).catch(h)),[n,h]),v=(0,r.useCallback)((()=>{d(V_.Uploading)}),[]),y=(0,r.useCallback)((()=>{d(V_.Init),i()}),[i]);switch(c){case V_.Init:return a().createElement(j_,{supportedFileTypes:l,onUpload:g,onBeforeUpload:v});case V_.Uploaded:{const t=(0,s.getLabel)(p);return a().createElement("div",{className:m.uploaded},a().createElement(Rd,{value:t},u?a().createElement(qd(),{href:e,className:m.label,underline:"hover"},t):a().createElement(gd(),{variant:"inherit",className:m.label},t)),a().createElement(Gx(),{onClick:y,onMouseDown:y,onTouchEnd:y,className:m.cancelIcon}))}case V_.Uploading:return a().createElement(d_(),{size:20});default:return null}},z_=lr({editor:{alignSelf:"center"}}),U_=({value:e,onChange:t,onError:n,className:o})=>{const{downloadLink:i,filename:l,expirationDate:u}=e||{},c=u>=Date.now(),d=(0,r.useCallback)((e=>(0,s.uploadFileForSearch)(e).then((({path:n,downloadLink:r,expirationDate:a})=>{t({filename:e.name,downloadLink:r,link:n,expirationDate:new Date(a).getTime()})}))),[t]),f=(0,r.useCallback)((()=>t(null)),[t]),m=z_();return a().createElement("div",{className:p()(m.editor,o)},a().createElement(H_,{isValidLink:c,link:i,filename:l,supportedFileTypes:[".txt",".csv"],onUpload:d,onError:n,onCancel:f}))};function Z_(){return Z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z_.apply(null,arguments)}function W_(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const q_=e=>t=>e.find((0,f.propEq)("value",t)),$_=e=>{let{entries:t,classes:n={}}=e,r=W_(e,["entries","classes"]);const{menuItem:o}=n,i=W_(n,["menuItem"]);return a().createElement(sT,Z_({},r,{classes:i,getValueLabel:(0,f.pipe)(q_(t),(0,f.prop)("label"))}),t.map((({value:e,label:t},n)=>a().createElement(mf(),{key:n,value:e,className:o},t||e.toString()))))},K_=lr({root:{paddingRight:"48px !important"},icon:{right:"12px"}});function G_(){return G_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G_.apply(null,arguments)}function Y_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){X_(e,t,n[t])}))}return e}function X_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Q_=e=>{let{classes:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["classes"]);const r=K_();return a().createElement($_,G_({MenuProps:{disableAutoFocusItem:!0},classes:Y_({},t,{root:p()(r.root,(0,f.prop)("root",t)),icon:p()(r.icon,(0,f.prop)("icon",t))})},n))};var J_=n(7883),eI=n.n(J_),tI=n(3416),nI=n.n(tI),rI=n(8166),aI=n.n(rI);function oI(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const iI=({attributeType:e,parentValueUri:t,attributeTypeUri:n,modifiedEntity:r,metadata:a,existingValues:o,hasValues:i=!0})=>{const l=o.find((({uri:e})=>(0,s.areOneHierarchyUris)(e,t))),u=Boolean(i&&l),c=u?l.uri:(0,s.generateUri)(t,e.name);if((0,s.isNested)(e)){const t=e.attributes;if(null!=t&&t.length){const e=t.find((({uri:e})=>(0,s.areOneHierarchyUris)(n,e)));var d;if(e)return iI({attributeType:e,parentValueUri:c,attributeTypeUri:n,modifiedEntity:r,metadata:a,existingValues:(null==l||null===(d=l.value)||void 0===d?void 0:d[e.name])||[],hasValues:u})}return null}return c},lI=l(null),sI=({children:e,entityUri:t})=>{const n=L(),o=z("modifyAttribute"),i=_(),l=B(t||i)||{},u=(0,r.useMemo)((()=>{var e;const t=(null==l?void 0:l.type)&&n&&(0,s.getEntityType)(n,l.type);return(null==t||null===(e=t.cleanseConfig)||void 0===e?void 0:e.addressAutoCompleteConfig)||{outputMapping:[],inputMapping:[]}}),[null==l?void 0:l.type,n]),c=(0,r.useCallback)(((e,t,r)=>{if(!(null!=u&&u.outputMapping&&null!=l&&l.uri&&e&&r))return;const{outputMapping:a}=u;(({outputMapping:e,modifiedEntity:t,metadata:n,triggerAttributeTypeUri:r,triggerAttributeValueUri:a,values:o,modifyAttribute:i})=>{const l=(0,s.getParentUri)(r);e.filter((({attribute:e})=>(0,s.areOneHierarchyUris)(e,l))).forEach((({attribute:e,cleanseAttribute:l})=>{const u=o[l]||"",c=(0,s.findAttributeTypeByUri)(n,e,t.type);if(!c)return;const d=(({attributeTypeUri:e,modifiedEntity:t,triggerAttributeTypeUri:n,triggerAttributeValueUri:r,metadata:a})=>{const o=n.split("/attributes/").length-1,i=e.split("/attributes/").slice(0,Math.max(o,1)+1).join("/attributes/"),l=(0,s.getParentUri)(r),u=(0,s.findAttributeTypeByUri)(a,i,t.type),c=(0,s.findAttributeValuesByTypeUri)(a,t,u.uri).filter(s.isOv);return iI({attributeType:u,parentValueUri:l,attributeTypeUri:e,modifiedEntity:t,existingValues:c,metadata:a})})({attributeTypeUri:e,triggerAttributeTypeUri:r,triggerAttributeValueUri:a,modifiedEntity:t,metadata:n});d&&i({value:u,uri:d,attributeType:c})}))})({outputMapping:a,modifiedEntity:l,metadata:n,triggerAttributeTypeUri:e,triggerAttributeValueUri:t,values:r,modifyAttribute:o})}),[u,l,n,o]),d=(0,r.useCallback)((e=>{const{inputMapping:t=[]}=u;return((e,t)=>[s.DataTypes.TYPE_STRING,s.DataTypes.TYPE_TEXT,s.DataTypes.TYPE_BLOB].includes(e.type)&&t.some((({attribute:t,cleanseAttribute:n})=>e.uri===t&&n===s.InputCleanseAttributeType.Text)))(e,t)}),[u]),p=(0,r.useCallback)(((e,t)=>(({metadata:e,modifiedEntity:t,triggerAttributeValueUri:n,triggerAttributeTypeUri:r,addressAutoCompleteConfig:a})=>{var o,i;const{inputMapping:l=[],minSearchTextLen:u,providerOpts:c}=a;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){oI(e,t,n[t])}))}return e}({minSearchTextLen:u||3,limit:(null==c?void 0:c.limit)||10,countries:(null==c||null===(o=c.defaultCountries)||void 0===o?void 0:o.split(";"))||[],countryNames:(null==c||null===(i=c.defaultCountries)||void 0===i?void 0:i.split(";"))||[]},(({metadata:e,modifiedEntity:t,triggerAttributeValueUri:n,triggerAttributeTypeUri:r,inputMapping:a})=>{var o;if(!(n&&r&&a&&t))return{};const i=(0,s.getParentUri)(n),l=(0,s.getParentUri)(r),u=null===(o=a.filter((({cleanseAttribute:e})=>e===s.InputCleanseAttributeType.Countries)).filter((({attribute:e})=>{const t=(0,s.getParentUri)(e);return(0,s.areOneHierarchyUris)(l,t)})).sort(((e,t)=>t.attribute.length-e.attribute.length)))||void 0===o?void 0:o[0],c=(null==u?void 0:u.attribute)&&(0,s.findAttributeTypeByUri)(e,null==u?void 0:u.attribute,t.type);if(c&&!(0,s.isComplexAttribute)(c)){const n=(0,s.findAttributeValuesByTypeUri)(e,t,u.attribute),r=(0,f.uniqBy)((0,f.prop)("value"),n.filter(s.isOv).filter((e=>(0,s.areOneHierarchyUris)(i,(0,s.getParentUri)(e.uri)))).filter((e=>e.value)));if(null!=r&&r.length)return{countries:r.map((e=>e.lookupCode||e.value.toString())),countryNames:(0,f.pluck)("value",r)}}})({metadata:e,modifiedEntity:t,triggerAttributeValueUri:n,triggerAttributeTypeUri:r,inputMapping:l}))})({metadata:n,modifiedEntity:l,triggerAttributeValueUri:t,triggerAttributeTypeUri:e,addressAutoCompleteConfig:u})),[u,n,l]),m=(0,r.useMemo)((()=>({onPopulateAttributes:c,isAutocompleteTriggerAttribute:d,getAutocompleteSettings:p})),[c,d,p]);return a().createElement(lI.Provider,{value:m},e)},uI=a().createContext(null);uI.displayName="AttributeValueContext";const cI=e=>({id:e.Id,type:e.Type,fullAddress:e.Text,description:e.Description}),dI=e=>"string"==typeof e?e:e.fullAddress,pI=(e,t)=>e.type!==s.AddressType.Container&&e.fullAddress===t,fI=(e,t)=>(null==e?void 0:e.trim().length)>=t;var mI=n(9285);Hd()(mI.Z,{insert:"head",singleton:!1});const hI=mI.Z.locals||{};function gI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){vI(e,t,n[t])}))}return e}function vI(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yI(){return yI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yI.apply(null,arguments)}function bI(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const xI="empty_option_id",wI=e=>{let{value:t="",onChange:n,InputProps:o,fullWidth:i=!0}=e,l=bI(e,["value","onChange","InputProps","fullWidth"]);const[u,d]=(0,r.useState)(t),[m,h]=(0,r.useState)(null),[g,y]=(0,r.useState)([]),[b,x]=(0,r.useState)(!1),[w,E]=(0,r.useState)(!1),C=gp(),S=gp(),O=v(lI,(e=>null==e?void 0:e.onPopulateAttributes)),k=v(lI,(e=>null==e?void 0:e.getAutocompleteSettings)),{uri:A,type:P}=(0,r.useContext)(uI)||{},T=(0,r.useMemo)((()=>null==k?void 0:k(P,A)),[k,A,P]),{countries:D,countryNames:M,limit:_,minSearchTextLen:I}=T,N=D.toString();(0,r.useEffect)((()=>{h(null),y([])}),[N]);const R=(0,r.useCallback)((async({searchTerm:e,container:t})=>{x(!0);try{const n=(t?await C((0,s.searchAddresses)({container:t})):await C((0,s.searchAddresses)({text:e,limit:_,countries:D}))).map(cI);y(t&&m||[]),h(n)}catch(e){console.warn("Error fetching address suggestions:",e),h([])}finally{x(!1)}}),[D,_,C,m]),L=(0,r.useCallback)((async e=>{x(!0);try{return await S((0,s.fetchAddressDetails)(e))}catch(e){console.warn("Error fetching address details:",e)}finally{x(!1)}}),[S]),j=(0,r.useCallback)((0,s.debounce)(R,400),[R]),F=(0,r.useCallback)(((e,t,n)=>{"reset"!==n&&(d(t),fI(t,I)?j({searchTerm:t}):(h([]),y([])))}),[j,I]),V=(0,r.useCallback)((async(e,t)=>{if(t){if(t.type===s.AddressType.Container)return void R({container:t.id});if(d(t.fullAddress),y([]),n&&n(t.fullAddress),O){const e=await L(t.id);O(P,A,null==e?void 0:e[0])}E(!1)}else d(""),n&&n("")}),[L,R,n,O,P,A]),B=(0,r.useCallback)((()=>{!m&&fI(u,I)&&j({searchTerm:u}),E(!0)}),[j,u,I,m]),H=(0,r.useCallback)((()=>{E(!1)}),[]),z=(0,r.useCallback)(((e,t)=>{if(t.id===xI)return null;const n=t.type===s.AddressType.Container;return a().createElement(aI(),yI({},e,{className:p()(e.className,hI.option),component:"li",disabled:b}),a().createElement("div",{className:hI.optionTextWrapper},a().createElement(Rd,{value:t.fullAddress},a().createElement(gd(),{variant:"body2",component:"span",className:hI.optionText},t.fullAddress)),t.description&&n&&a().createElement(Rd,{value:t.description},a().createElement(gd(),{variant:"caption",component:"span",className:hI.description},t.description))),n&&a().createElement("div",{className:hI.containerForwardIcon},a().createElement(nI(),null)))}),[b]),U=(0,r.useCallback)((e=>a().createElement(Vx(),yI({},e,l,{placeholder:c().text("Start typing to autocomplete"),fullWidth:i,onBlur:H,InputProps:gI({},e.InputProps,o,{classes:gI({},null==o?void 0:o.classes,{root:p()(hI.textFieldRoot,(0,f.path)(["classes","root"],o)),input:p()(hI.textFieldInput,(0,f.path)(["classes","input"],o)),underline:p()({[hI.underline]:(0,s.isEmptyValue)(t)})})})}))),[i,H,o,l,t]),Z=(0,r.useCallback)((()=>{h(g),y([])}),[g]),W=(0,r.useCallback)(a().forwardRef((function(e,t){const{onMouseDown:n}=e,r=bI(e,["onMouseDown"]),o=0===(null==m?void 0:m.length)&&fI(u,I)&&!b,i=!fI(u,I)&&!b,l=(null==m?void 0:m.length)>0&&!i,s=M.join(", ");return a().createElement("div",{onMouseDown:n},b&&a().createElement(Vh(),{className:hI.loadingProgress,color:"primary"}),a().createElement("div",{className:hI.countryHeader},a().createElement(Rd,{value:s},a().createElement(gd(),{variant:"body2",color:"textSecondary",className:hI.headerCountries},c().text("Searching in"),": ",s)),a().createElement(gd(),{variant:"caption",color:"textSecondary",className:hI.headerHelper},c().text("To search in a different country, update the Country field"))),a().createElement("ul",yI({ref:t},r,{className:hI.listbox}),i&&a().createElement("li",{className:hI.emptyState},a().createElement(gd(),{variant:"body2",color:"textSecondary"},c().text("Please enter at least ${minSearchTextLen} characters",{minSearchTextLen:I}))),o&&a().createElement("li",{className:hI.emptyState},a().createElement(u_,{className:hI.noData})),l&&e.children),g.length>0&&a().createElement("div",{className:hI.backToAllResults},a().createElement(br(),{variant:"text",onClick:Z,color:"primary",disabled:b,classes:{root:hI.backToAllResultsButton}},c().text("Back to all results"))))})),[b,M,g.length,(m||[]).length,u,I]),q=(0,r.useCallback)((e=>{E(!0)}),[]),$=(0,r.useMemo)((()=>[{id:xI,type:s.AddressType.Address,fullAddress:""},...m||[]]),[m]);return a().createElement(eI(),{className:hI.root,open:w,onOpen:q,value:u,onChange:V,inputValue:u,onInputChange:F,onFocus:B,options:$,getOptionLabel:dI,renderInput:U,renderOption:z,renderGroup:e=>e.children,ListboxComponent:W,classes:{paper:hI.popupContainer},filterOptions:f.identity,isOptionEqualToValue:pI,popupIcon:null,clearIcon:null,freeSolo:!0,"data-reltio-id":"address-autocomplete-editor"})};function EI(){return EI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EI.apply(null,arguments)}class CI{static build(e,t={}){let{fullWidth:n,TextFieldProps:r,color:o,booleanRadioEditorClassName:i}=t,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["fullWidth","TextFieldProps","color","booleanRadioEditorClassName"]);switch(e){case s.DataTypes.TYPE_STRING:case s.DataTypes.TYPE_CIK_ID:case s.DataTypes.TYPE_ENTITY_ID:case s.DataTypes.TYPE_URL:case s.DataTypes.TYPE_BLOG_URL:case s.DataTypes.TYPE_IMAGE_URL:return a().createElement($T,EI({fullWidth:n},r,l));case s.DataTypes.TYPE_EMAIL:return a().createElement($T,EI({fullWidth:n},r,l,{type:"email"}));case s.DataTypes.TYPE_TEXT:case s.DataTypes.TYPE_BLOB:return a().createElement($T,EI({fullWidth:n,maxRows:7,minRows:2},r,l,{multiline:!0}));case s.DataTypes.TYPE_PASSWORD:return a().createElement($T,EI({fullWidth:n},r,l,{type:"password"}));case s.DataTypes.TYPE_LONG:case s.DataTypes.TYPE_INT:case s.DataTypes.TYPE_COUNT:return a().createElement(mD,EI({fullWidth:n},r,l,{integer:!0}));case s.DataTypes.TYPE_FLOAT:case s.DataTypes.TYPE_DOUBLE:case s.DataTypes.TYPE_NUMBER:case s.DataTypes.TYPE_DOLLAR:return a().createElement(mD,EI({fullWidth:n},r,l));case s.DataTypes.TYPE_BOOLEAN:case s.DataTypes.TYPE_BOOLEAN_RADIO:case s.DataTypes.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return a().createElement(fC,EI({color:o},l,{className:i}));case s.DataTypes.TYPE_DATE:case s.DataTypes.TYPE_ACTIVENESS_DATE:case s.DataTypes.TYPE_LOCAL_DATE:return a().createElement(YP,EI({slotProps:{textField:r}},l));case s.DataTypes.TYPE_TIMESTAMP:return a().createElement(n_,EI({slotProps:{textField:r}},l));case s.DataTypes.TYPE_ENUM:case s.DataTypes.TYPE_SELECT:return a().createElement(Q_,EI({fullWidth:n,TextFieldProps:r},l));case s.DataTypes.TYPE_LOOKUP:return a().createElement(ST,EI({fullWidth:n,TextFieldProps:r},l));case s.DataTypes.TYPE_TYPEAHEAD:return a().createElement(w_,EI({fullWidth:n},r,l));case s.DataTypes.TYPE_DEPENDENT_LOOKUP:return a().createElement(R_,EI({fullWidth:n,TextFieldProps:r},l));case s.DataTypes.TYPE_FILE:return a().createElement(U_,l);case s.DataTypes.TYPE_ADDRESS_AUTOCOMPLETE:return a().createElement(wI,EI({fullWidth:n},r,l));default:return a().createElement($T,EI({fullWidth:n},r,l))}}}function SI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){OI(e,t,n[t])}))}return e}function OI(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kI=lr({marginDense:{margin:0}});function AI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){PI(e,t,n[t])}))}return e}function PI(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const TI=e=>{let{fieldName:t,value:n,onChange:a,dataTypeDefinition:o,TextFieldProps:i={}}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["fieldName","value","onChange","dataTypeDefinition","TextFieldProps"]);const u=kI(),c=((e,t)=>{const n=z("lookupsLoaded"),a=z("lookupsForTypeResolved"),o=F(),i=k((e=>e.lookups)),l=T(),u=H(),c=(0,r.useCallback)(((t,n,r)=>(0,s.getFacetedAttributeData)({fieldName:e,searchValue:t,options:SI({},u,{max:n,pageNo:r})}).then((0,f.pipe)((0,f.prop)(e),f.keys))),[e,u]),{type:d,values:p,lookupCode:m,dependentLookupCode:h,options:g}=t;switch(d){case s.DataTypes.TYPE_ENUM:return{entries:p.map((e=>({value:e})))};case s.DataTypes.TYPE_LOOKUP:return{lookups:i,lookupCode:m,getLookups:()=>(0,s.getLookups)().then((e=>{n(e)}))};case s.DataTypes.TYPE_DEPENDENT_LOOKUP:return{lookups:i,lookupCode:h,getLookups:({type:e,parents:t,displayNamePrefix:n,max:r,offset:a})=>(0,s.getDependentLookups)({type:e,parents:t,displayNamePrefix:n,max:r,offset:a}).then((({codeValues:t})=>(0,f.propOr)({},e,t))),resolveLookups:(e,t)=>{const n=t.map((t=>({type:e,codeValue:t})));return(0,s.resolveLookupsList)(n).then((t=>{if(Array.isArray(t)){const n=t.reduce(((t,n)=>SI({},t,n[e])),{});a({type:e,values:n})}}))}};case s.DataTypes.TYPE_TYPEAHEAD:return{getSuggestions:c};case s.DataTypes.TYPE_NUMBER:case s.DataTypes.TYPE_FLOAT:case s.DataTypes.TYPE_DOUBLE:case s.DataTypes.TYPE_LONG:case s.DataTypes.TYPE_INT:return{format:(0,s.getNumberFormat)(t,l,s.intl.getLocale())};case s.DataTypes.TYPE_FILE:return{tenant:o};case s.DataTypes.TYPE_SELECT:return{entries:g};default:return{}}})(t,o);return i=(0,f.mergeDeepLeft)(i,AI({},uC,{className:u.marginDense,InputProps:AI({},uC.InputProps,{disableUnderline:(e=>(0,f.is)(Object,e)&&(0,f.has)("value",e)?(0,s.isEmptyValue)(e.value):(0,s.isEmptyValue)(e))(n)})})),CI.build(o.type,AI({onChange:a,value:n,TextFieldProps:i},c,l))};TI.propTypes={fieldName:yt().string,value:yt().any,onChange:yt().func,dataTypeDefinition:yt().object},TI.displayName="DataTypeValueEditor";const DI=(0,r.memo)(TI);var MI=n(3167),_I=n.n(MI);const II=lr({wrapper:{width:"100%"},helperText:{margin:"3px 0 1px 12px"}});function NI(){return NI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NI.apply(null,arguments)}const RI=(0,r.memo)((e=>{let{errorMessage:t,children:n,className:r,classes:o}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["errorMessage","children","className","classes"]);const l=II(),s=!!t;return a().createElement(hE(),NI({variant:"standard",className:p()(l.wrapper,r,null==o?void 0:o.root),error:!0},i),n,s&&a().createElement(_I(),{className:p()(l.helperText,null==o?void 0:o.helperText)},a().createElement(jE,{message:t})))}));RI.displayName="ErrorWrapper";const LI=(e,t)=>(0,f.partition)((0,f.pipe)((0,f.path)(["attrType","uri"]),(0,f.includes)(f.__,e)),t),jI=((0,f.eqBy)((0,f.pick)(["fieldName","uri","entityTypeUri"])),(0,f.curry)(((e,t,n)=>{const r=((e,t)=>{const{type:n}=(0,s.getAttrDataTypeDefinition)(e);switch(n){case s.DataTypes.TYPE_BOOLEAN:case s.DataTypes.TYPE_BOOLEAN_RADIO:case s.DataTypes.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t.toString();case s.DataTypes.TYPE_DATE:return t&&Ar()(t).format("YYYY-MM-DD")||"";case s.DataTypes.TYPE_TIMESTAMP:return t&&Ar()(t).utc().format()||"";case s.DataTypes.TYPE_ACTIVENESS_DATE:case s.DataTypes.TYPE_LOCAL_DATE:return t&&t.valueOf();default:return t||""}})(t,n);return{value:r,uri:e.uri,attributeType:t}}))),FI=a().createContext({enabled:!1,queueSizeThreshold:0});FI.displayName="AsyncMountContext";let VI=0;function BI(){return BI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BI.apply(null,arguments)}function HI(){return HI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HI.apply(null,arguments)}const zI=(e,t,n)=>{if(e&&t){const o=(0,r.memo)(n);return o.displayName=n.name,n=>a().createElement(e.Consumer,null,(e=>a().createElement(o,HI({},n,t(e,n)))))}return n},UI=a().createContext(!1);UI.displayName="ProfilePerspectiveViewContext";let ZI=function(e){return e.Error="Error",e.NewAttribute="NewAttribute",e.NewView="NewView",e}({});const WI=e=>e===ZI.Error,qI=a().createContext({element:null,type:null,highlightView:f.identity,highlightError:f.identity,highlightAttribute:f.identity,scrollIntoRef:f.identity});function $I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){KI(e,t,n[t])}))}return e}function KI(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const GI={content:'""',position:"absolute",left:"-1000px",top:"0px",width:"5000px",height:"calc(100% - 10px)",animationName:"$highlightAnimation",animationDuration:"2s",animationIterationCount:1,opacity:0},YI=lr((()=>({"@keyframes highlightAnimation":{"0%":{opacity:0},"50%":{opacity:1},"100%":{opacity:0}},highlightError:{"&::before":$I({},GI,{background:"rgba(255, 0, 0, 0.06)"})},highlightWarning:{"&::before":$I({},GI,{background:"rgba(228, 151, 0, 0.08)"})},simpleAttribute:{position:"relative","&::before":{top:"-4px",height:"calc(100% + 8px)"}}}))),XI=({highlightedError:e,isSimple:t=!1,className:n})=>{const a=YI(),o=(0,r.useRef)(null),i=(0,f.pathOr)(s.ErrorSeverity.ERROR,["element","severity"])(e),l=p()({[a.highlightError]:i===s.ErrorSeverity.ERROR,[a.highlightWarning]:i===s.ErrorSeverity.WARNING,[a.simpleAttribute]:t},n);return(0,r.useEffect)((()=>{e&&e.scrollIntoRef(o)}),[e]),e?{ref:o,errorClassName:l}:{ref:o}},QI={canCreate:!0,canUpdate:!0,canDelete:!0},JI=a().createContext(QI);JI.displayName="ConfigPermissionsContext";const eN=e=>{const{canCreate:t,canUpdate:n,canDelete:a}=(0,r.useContext)(JI),o=(0,s.isTempUri)(e);return(0,r.useMemo)((()=>({canCreate:t,canUpdate:o||n,canDelete:o||a})),[o,t,n,a])},tN=(0,r.createContext)([]);tN.displayName="AlwaysVisibleAttributesContext";const nN=lr((e=>({wrapper:{width:"100%"},errorWrapper:{alignSelf:"stretch"},editor:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px",position:"relative"},"editor-value":{flex:"1 1 auto"},"editor-read-only-value":{marginLeft:"12px",display:"flex",alignItems:"center",color:e.palette.text.primary},"editor-actions":{display:"flex",alignItems:"center",paddingLeft:"8px"},addButton:{marginRight:"-8px"},button:{color:e.palette.text.secondary},placeholder:{height:"50px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary}}))),rN=a().createContext(!1);function aN(){return aN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aN.apply(null,arguments)}function oN(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}rN.displayName="AuthoringPerspectiveViewContext";const iN=zI(qI,((e,{attributeValue:t})=>{const{element:n,type:r}=e||{};return{highlightedError:WI(r)&&(null==n?void 0:n.uri)===t.uri?e:null}}),(e=>{var t;let{className:n,attributeValue:o,attributeType:i,isReltioCrosswalk:l,ownError:u,mode:d,onAddOneMore:m,onDeleteAttribute:h,onChangeAttribute:g,onDeactivateError:y,additionalControlsRenderer:b,state:x,highlightedError:w,isEmptyEditor:E=!1,isFirstEditor:C}=e,S=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","attributeValue","attributeType","isReltioCrosswalk","ownError","mode","onAddOneMore","onDeleteAttribute","onChangeAttribute","onDeactivateError","additionalControlsRenderer","state","highlightedError","isEmptyEditor","isFirstEditor"]);const A=nN(),P="deleted"===x,T="edited"===x,D=(0,s.isEditableMode)(d),{canCreate:M,canEdit:_,canDelete:I}=(({attributeType:e,attributeValue:t,isReltioCrosswalk:n,mode:a})=>{const{canCreate:o,canUpdate:i,canDelete:l}=eN(t.uri),u=(0,r.useContext)(tN),c=(0,r.useMemo)((()=>null==u?void 0:u.includes(e.uri)),[e.uri,u]);return{canCreate:o&&(0,s.checkCanCreateAttribute)({attributeType:e,mode:a}),canEdit:i&&(0,s.checkCanEditAttribute)({attributeType:e,attributeValue:t,mode:a,isReltioCrosswalk:n,isAlwaysVisible:c}),canDelete:l&&(0,s.checkCanDeleteAttribute)({attributeType:e,attributeValue:t,mode:a,isReltioCrosswalk:n,isAlwaysVisible:c})}})({attributeValue:o,attributeType:i,mode:d,isReltioCrosswalk:l}),N=_&&D&&!o.masked,R=(0,s.getErrorMessage)(u),L=((e,t)=>k((n=>{var r,a,o;return O({dependentLookups:n.dependentLookups,metadata:n.metadata,relations:n.relations,modifiedEntities:n.modifiedEntities,entityUri:null===(r=n.entity)||void 0===r?void 0:r.uri,attributeValue:e,attributeType:t,hiddenAttributes:null===(a=n.hiddenAttributes)||void 0===a?void 0:a[null===(o=n.entity)||void 0===o?void 0:o.uri]})})))(o,i),j=v(lI,(e=>null==e?void 0:e.isAutocompleteTriggerAttribute)),{ref:F,errorClassName:V}=XI({highlightedError:w,isSimple:!0});(0,r.useEffect)((()=>{E&&(0,s.isDependentLookupAttrType)(i)&&!(0,f.has)("lookupCode",o)&&g({attributeType:i,uri:o.uri,value:o.value,silent:!0})}),[E]);const B=(0,r.useMemo)((()=>{const e=(0,s.getAttrDataTypeDefinition)(i);return C&&null!=j&&j(i)?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){oN(e,t,n[t])}))}return e}({},e,{type:s.DataTypes.TYPE_ADDRESS_AUTOCOMPLETE}):e}),[i,j,C]),H=(0,r.useMemo)((()=>((e,{type:t})=>{const{value:n,lookupCode:r}=e||{};switch(t){case s.DataTypes.TYPE_BOOLEAN:case s.DataTypes.TYPE_BOOLEAN_RADIO:case s.DataTypes.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,s.parseBoolean)(n);case s.DataTypes.TYPE_DATE:return n&&s.utils.dates.toLocalDate(n)||null;case s.DataTypes.TYPE_LOCAL_DATE:case s.DataTypes.TYPE_TIMESTAMP:case s.DataTypes.TYPE_ACTIVENESS_DATE:return n&&new Date(n)||null;case s.DataTypes.TYPE_DEPENDENT_LOOKUP:case s.DataTypes.TYPE_LOOKUP:return{value:n,lookupCode:r};default:return n}})(o,B)),[o,B]),U=(0,r.useCallback)((()=>{u&&y((0,s.getErrorId)(u))}),[u,y]),Z=(0,r.useCallback)((0,f.pipe)(jI(o,i),g,U),[o,i,g,U]),W=1===(null==i||null===(t=i.cardinality)||void 0===t?void 0:t.maxValue),q=!!m&&M&&!i.singleValue&&!o.masked&&d!==s.Mode.Viewing&&!W,$=!P&&!!h&&I&&!o.masked&&d!==s.Mode.Viewing,K=!!R,G=P?{disabled:!0,isCrossedOut:!0}:{},Y=(0,r.useContext)(UI),X=(0,r.useContext)(rN),Q=Y||X,{autopopulationContextValue:J}=(({enabled:e,attributeTypeUri:t,valueUri:n})=>{const a=z("dependentLookupsEditorTouched"),o=k((e=>e.lookupAutocomplete)),i=(e=>k((t=>(0,s.getDependentLookupEditorState)(t.dependentLookups,e))))(n),l=e&&(0,s.isAutopopulationEnabled)(o,t),u=l?n:null,{isTouched:c=!1}=l&&i||{},d=(0,r.useCallback)((e=>{a({uri:e,isTouched:!0})}),[a]);return{autopopulationContextValue:(0,r.useMemo)((()=>u?{id:u,isTouched:c,onTouch:d}:null),[u,c,d])}})({enabled:Q&&(0,s.isDependentLookupAttrType)(i),attributeTypeUri:null==i?void 0:i.uri,valueUri:o.uri});return a().createElement("div",{ref:F,"data-reltio-id":"simple-attribute-editor",className:p()(A.editor,n,V)},a().createElement(RI,{errorMessage:R,className:A.errorWrapper},a().createElement("div",{className:p()(A["editor-value"],{[A.deleted]:P},{[A["editor-read-only-value"]]:!N}),"data-reltio-id":"reltio-attribute-value"},N?a().createElement(A_.Provider,{value:J},a().createElement(uI.Provider,{value:o},a().createElement(DI,aN({fieldName:(0,s.attributeUriToSearchUri)(i.uri),value:H,dataTypeDefinition:B,error:K,onChange:Z,fullWidth:!0},L,S,G)))):a().createElement(KE,{value:(0,s.getAttributeValue)(o),dataTypeDefinition:B}))),a().createElement("div",{"data-reltio-id":"reltio-attribute-actions",className:A["editor-actions"]},T&&a().createElement(gd(),{variant:"caption",className:A.editedLabel},"(",c().text("edited"),")"),q&&a().createElement(sp,{icon:md(),onClick:m,size:"L",className:p()(A.addButton,A.button),"data-reltio-id":"reltio-add-one-more-simple-attribute-button"}),b&&b({attributeType:i,attributeValue:o}),$&&a().createElement(sp,{className:A.button,icon:sC(),onClick:()=>{h({uri:o.uri,attributeType:i}),(0,s.getErrorType)(u)!==s.ErrorType.missed&&U()},size:"L","data-reltio-id":"reltio-delete-simple-attribute-button"})))})),lN=((e,t=null)=>{const n=(0,r.forwardRef)(((n,o)=>(()=>{const e=(0,r.useRef)(!0),{enabled:t,queueSizeThreshold:n=0}=(0,r.useContext)(FI),[a,o]=(0,r.useState)(!t||t&&VI<n);e.current&&VI++;const i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(VI--,!a)return i.current=setTimeout((()=>{o(!0)}),0),()=>clearTimeout(i.current)}),[]),e.current=!1,a})()?a().createElement(e,BI({},n,{ref:o})):t&&a().createElement(t,BI({},n,{ref:o}))));return n.displayName="WithAsyncMount",n})(iN,(()=>{const e=nN();return a().createElement("div",{className:e.placeholder})}));var sN=n(4419),uN=n.n(sN);const cN=lr({expandButton:{"&:hover":{backgroundColor:"transparent"}},expandIcon:{transition:"transform .15s ease"},expanded:{transform:"rotate(90deg)"}});function dN(){return dN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dN.apply(null,arguments)}const pN=e=>{const t=cN(),{expanded:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["expanded","className"]);return a().createElement(sp,dN({icon:uN(),size:"XXS",disableRipple:!0,iconClassName:p()(t.expandIcon,{[t.expanded]:n}),className:p()(r,t.expandButton),"data-reltio-id":"arrow-expand-button"},o))},fN=lr((e=>({complexWrapper:{position:"relative",whiteSpace:"break-spaces"},editor:{display:"flex",flex:1,height:"36px",alignItems:"center"},label:{flex:1,marginLeft:"2px",marginTop:"2px",fontSize:"13px",lineHeight:"15px"},actions:{display:"flex",alignItems:"center"},titleContainer:{display:"flex",flex:1,minHeight:"20px"},expandButton:{marginTop:"2px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary},errorWrapperHelperText:{marginLeft:0}}))),mN=zI(qI,((e,{attributeValue:t})=>{const{element:n,type:r}=e||{},a=WI(r);return{highlightedError:a&&(null==n?void 0:n.uri)===t.uri?e:null,isHighlightedPath:a&&(0,f.pipe)((0,f.propOr)([],"path"),(0,f.any)((0,f.pathEq)(["value","uri"],t.uri)))(n)}}),(({label:e,attributeTypesList:t,attributeType:n,attributeValue:o,children:i,errors:l,ownError:u,mode:d,metadata:f,crosswalks:m,lazy:h,showEmptyEditors:g,onAddOneMore:v,onAddAttributes:y,onDeleteAttribute:b,onChangeAttribute:x,additionalControlsRenderer:w,hideDeleteButton:E,state:C,showNonOv:S,isHighlightedPath:O,highlightedError:k,expanded:A=!1})=>{const P=fN(),T="deleted"===C,D="edited"===C,M=o.uri,_=(0,s.isTempUri)(M),I=_||A,[N,R]=(0,r.useState)(I),{ref:L,errorClassName:j}=XI({highlightedError:k}),F=o.masked?s.Mode.Viewing:d;(0,r.useEffect)((()=>{O&&R(!0)}),[O]),(0,r.useEffect)((()=>{R(I)}),[I]);const{canDelete:V}=eN(o.uri),B=(0,r.useMemo)((()=>V&&(0,s.checkCanDeleteAttribute)({attributeType:n,attributeValue:o,mode:F,metadata:f,isReltioCrosswalk:(0,s.isReltioCrosswalk)(m,o)})),[n,o,F,f,m,V]),H=!T&&!E&&!!b&&B&&!o.masked&&F!==s.Mode.Viewing,z=(0,r.useMemo)((()=>(0,s.hasAttributeDescendantsWithErrors)(o,l)),[l,o]);(0,r.useEffect)((()=>{z&&R(!0)}),[l,z]),(0,r.useEffect)((()=>{T&&R(!1)}),[T]);const U=(t||[]).some((e=>(0,s.isAnalyticAttribute)(e))),Z=(0,r.useMemo)((()=>({attributes:U?null:o.value,analyticsAttributes:U?o.value:null})),[o,U]),W=(0,s.getErrorMessage)(u)||z&&c().text("Has an incorrect value")||"";return h?a().createElement(br(),{variant:"text",color:"primary",onClick:v},"Create attribute"):a().createElement("div",{ref:L,"data-reltio-id":"reltio-edit-mode-complex-attribute",className:p()(P.complexWrapper,j)},a().createElement("div",{className:P.editor},a().createElement("div",{className:P.titleContainer},a().createElement(pN,{onClick:()=>R((e=>!e)),expanded:N,className:P.expandButton,disabled:T}),a().createElement(RI,{errorMessage:W,classes:{helperText:P.errorWrapperHelperText}},a().createElement("div",{className:p()(P.label,{[P.deleted]:T}),"data-reltio-id":"reltio-attribute-complex-label"},e))),a().createElement("div",{"data-reltio-id":"reltio-complex-attribute-actions",className:P.actions},D&&a().createElement(gd(),{variant:"caption",className:P.editedLabel},"(",c().text("edited"),")"),w&&w({attributeType:n,attributeValue:o}),H&&a().createElement(sp,{icon:sC(),onClick:()=>b({uri:M,attributeType:n,attributeValue:o}),size:"L","data-reltio-id":"reltio-delete-complex-attribute-button"}))),N&&a().createElement(fH,{parentAttributeType:n,attrTypes:t,entity:Z,showEmptyEditors:g||_,drawLines:!0,parentUri:M,mode:F,crosswalks:m,onAddAttributes:y,onChangeAttribute:x,onDeleteAttribute:b,additionalControlsRenderer:w,showNonOv:S},i))}));function hN(){return hN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hN.apply(null,arguments)}const gN=(0,r.memo)((e=>{const{attributeValue:t,attributeType:n}=e,r=(0,s.evaluateDeepEntityLabel)(t,n.dataLabelPattern);return a().createElement(mN,hN({label:(0,s.getLabel)(r),attributeTypesList:n.attributes||n.analyticsAttributes},e))}));gN.displayName="NestedAttributeEditor";const vN=lr({item:{marginBottom:"20px"},dense:{marginBottom:0}});function yN(){return yN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yN.apply(null,arguments)}function bN(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xN=zI(qI,((e,{attributeValue:t,attributeType:n})=>{const{element:r,type:a}=e||{};return{highlightedError:WI(a)&&(0,s.isAttributeTypeError)(r,t.uri,n.uri)?e:null}}),(e=>{const t=vN(),{highlightedError:n}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["highlightedError"]),{attributeValue:i,attributeType:l,mode:u,crosswalks:c,errors:d,onChangeAttribute:m}=o,h=(0,r.useRef)(i),{ref:g,errorClassName:v}=XI({highlightedError:n,isSimple:!0}),y=(0,s.getReferencedEntityUriFromAttrValue)(i),b=z("entityDeleted"),x=z("entityCreated"),w=z("errorDeactivated"),E=B(y),C=(0,s.isTempUri)(y)?E:null,S=L(),O=H(["ovOnly"]),k=W(),A=(0,s.getReferencedEntityFromAttrValue)(i),P=(0,s.getReferencedRelationFromAttrValue)(i),T=(0,s.getReferencedEntityTypeUriFromAttrType)(l),D=(0,s.getEntityType)(S,T),M=C?(0,s.evaluateDeepEntityLabel)(C,D.dataLabelPattern):i.label,_=(0,r.useMemo)((()=>[T]),[T]),I=(0,r.useMemo)((()=>(0,s.addReferencedRelationCrosswalks)(c,P)),[c,P]),N=(0,r.useMemo)((()=>(0,s.getReferencedEntityActiveError)(i,d)),[i,d]),R=(0,r.useMemo)((()=>A&&{entityUri:(0,s.getReferencedEntityUri)(A),entityType:(0,s.getReferencedEntityTypeUri)(A),entityLabel:i.label}),[A,i.label]),j=(0,r.useMemo)((()=>(0,s.getReferencedRelationAttrTypesUris)(l).map((e=>(0,s.findAttributeTypeByUri)(S,e))).filter(f.identity)),[l,S]),F=(0,r.useCallback)((e=>(0,s.referencedEntityAttributeTypesSelectionStrategy)(l,e)),[l]),V=(0,r.useCallback)((e=>{C&&b(C.uri);const t=h.current,n=!(0,f.isEmpty)(e)&&e.uri===(0,s.getReferencedEntityUriFromAttrValue)(t),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){bN(e,t,n[t])}))}return e}({},i,{label:e.label,refEntity:n?t.refEntity:(0,s.convertReferencedEntityForAttrValue)(e),refRelation:n?t.refRelation:(0,s.createReferencedRelationForAttrValue)(i)});m({value:r,attributeType:l,uri:i.uri}),N&&w((0,s.getErrorId)(N))}),[i,l,C,m,b,w,N]),U=(0,r.useCallback)(((e,t)=>{const n=(0,f.pipe)(F,(0,s.getCreatableAttributeTypes)(u))(D),r=(0,s.createTemporaryEntity)({entityTypeUri:e,initValue:t,attributeTypes:n,metadata:S,mode:u});V(r),x(r)}),[F,u,D,S,V,x]),{canCreate:Z,canUpdate:q}=eN(i.uri),$=(0,r.useMemo)((()=>q&&(0,s.checkCanEditAttribute)({attributeType:l,attributeValue:i,mode:u,isReltioCrosswalk:(0,s.isReltioCrosswalk)(c,i)})),[l,i,u,c,q]),K=(0,r.useMemo)((()=>Z&&(0,s.checkMetadataForCreate)(u,D)),[u,D,Z]),G=(0,s.getErrorMessage)(N),Y=k&&(0,s.isAttributeHasMaskedValue)(i);return a().createElement(mN,yN({},o,{label:(0,s.getLabel)(M),attributeTypesList:j,crosswalks:I,metadata:S}),a().createElement("div",{ref:g,className:v},a().createElement(RI,{errorMessage:G},a().createElement(sI,{entityUri:y},a().createElement(CH,{className:p()(t.item,{[t.dense]:G||R&&(0,s.isTempUri)(R.entityUri)}),entity:R||{},entityTypesUris:_,globalSearchRequestOptions:O,mode:u,isDisabled:!$||!!i.masked,onChange:V,onCreate:K?U:void 0,metadata:S,attributeTypesSelectionStrategy:F,isMasked:Y})))))}));function wN(){return wN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wN.apply(null,arguments)}class EN{static build(e,t={}){switch(e.type){case s.DataTypes.TYPE_NESTED:return a().createElement(gN,t);case s.DataTypes.TYPE_REFERENCE:return a().createElement(xN,t);default:{const e=(0,f.omit)(["showEmptyEditors","onAddAttributes","lazy","errors","crosswalks","showNonOv","expanded"],t);return a().createElement(lN,wN({isReltioCrosswalk:(0,s.isReltioCrosswalk)(t.crosswalks,t.attributeValue)},e))}}}}const CN=(0,r.forwardRef)(((e,t)=>{const{className:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className"]);return a().createElement("div",{ref:t,"data-reltio-id":"reltio-edit-attribute",className:n},EN.build(e.attributeType,r))}));CN.displayName="EditModeAttribute";const SN=e=>c().text("${value}",{value:1===e?c().text("value"):c().text("values")}),ON=(0,f.has)("minValue"),kN=(0,f.has)("maxValue"),AN=(0,f.pipe)(kN,f.not),PN=(0,f.propSatisfies)((e=>1===e),"minValue"),TN=({minValue:e})=>c().text("This attribute can have minimum ${minValue} ${minValueCaption}",{minValue:c().number(e,"0"),minValueCaption:SN(e)}),DN=({maxValue:e})=>c().text("This attribute can have maximum ${maxValue} ${maxValueCaption}",{maxValue:c().number(e,"0"),maxValueCaption:SN(e)}),MN=(0,f.cond)([[f.isNil,(0,f.always)("")],[({minValue:e,maxValue:t})=>e&&e===t,({minValue:e})=>c().text("This attribute should have ${minValue} ${minValueCaption}",{minValue:c().number(e,"0"),minValueCaption:SN(e)})],[(0,f.allPass)([PN,kN]),DN],[(0,f.allPass)([PN,AN]),(0,f.always)("")],[(0,f.allPass)([ON,kN]),({minValue:e,maxValue:t})=>c().text("${minCardinality} and maximum ${maxValue} ${maxValueCaption}",{minCardinality:TN({minValue:e}),maxValue:c().number(t,"0"),maxValueCaption:SN(t)})],[kN,DN],[ON,TN],[f.T,(0,f.always)("")]]),_N=lr((()=>({caption:{fontSize:"0.7rem",opacity:.54}}))),IN=({cardinality:e})=>{const t=_N(),n=MN(e);return n?a().createElement(gd(),{variant:"caption",className:t.caption},n):null},NN=a().createContext(null);function RN(){return RN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RN.apply(null,arguments)}const LN=e=>a().createElement("svg",RN({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgDescription"},e),a().createElement("path",{d:"M5.417 9.5h1.166V8.333H5.417V9.5zM6 .167A5.835 5.835 0 00.167 6 5.835 5.835 0 006 11.833 5.835 5.835 0 0011.833 6 5.835 5.835 0 006 .167zm0 10.5A4.673 4.673 0 011.333 6 4.673 4.673 0 016 1.333 4.673 4.673 0 0110.667 6 4.673 4.673 0 016 10.667zM6 2.5a2.333 2.333 0 00-2.333 2.333h1.166A1.17 1.17 0 016 3.667a1.17 1.17 0 011.167 1.166c0 1.167-1.75 1.021-1.75 2.917h1.166c0-1.313 1.75-1.458 1.75-2.917A2.333 2.333 0 006 2.5z",fill:"#000",fillOpacity:.54})),jN=a().createContext({showDescription:!1,showNavigateToGraph:!0});jN.displayName="FeaturesContext";const FN=lr((()=>({icon:{display:"inline-flex",marginLeft:"8px",verticalAlign:"middle"}}))),VN=({className:e,description:t})=>{const{showDescription:n}=(0,r.useContext)(jN),o=FN();return t&&n?a().createElement(yd(),{title:t,placement:"bottom"},a().createElement("span",{"data-reltio-id":"reltio-description-icon",className:p()(o.icon,e)},a().createElement(LN,null))):null};function BN(){return BN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BN.apply(null,arguments)}const HN=e=>a().createElement("svg",BN({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgControlAttribute"},e),a().createElement("mask",{id:"ControlAttribute_svg__a",fill:"#fff"},a().createElement("path",{d:"M10.966 9.203a3.2 3.2 0 11-.018-2.449l-1.375.581a1.707 1.707 0 10.01 1.307l1.383.561z"})),a().createElement("path",{d:"M10.966 9.203a3.2 3.2 0 11-.018-2.449l-1.375.581a1.707 1.707 0 10.01 1.307l1.383.561z",stroke:"#72828B",strokeWidth:4,mask:"url(#ControlAttribute_svg__a)"}),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.297 8.965a4.804 4.804 0 004.068 3.793v1.61a6.403 6.403 0 01-5.693-5.403h1.625zm4.068-5.724a4.803 4.803 0 00-4.124 4.124h-1.61a6.402 6.402 0 015.734-5.734v1.61zm5.393 4.124a4.804 4.804 0 00-3.793-4.068V1.672a6.403 6.403 0 015.404 5.693h-1.61zm-.055 1.6a4.806 4.806 0 01-3.738 3.738v1.625a6.405 6.405 0 005.363-5.363h-1.625z",fill:"#72828B"})),zN=lr({icon:{display:"inline-flex",marginLeft:"8px",verticalAlign:"middle"}});function UN(){return UN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UN.apply(null,arguments)}const ZN=(0,r.forwardRef)(((e,t)=>a().createElement("span",UN({},e,{ref:t}),a().createElement(HN,null))));ZN.displayName="ControlAttributeForwarded";const WN=ep(ZN),qN=()=>{const e=zN();return a().createElement(WN,{"data-reltio-id":"reltio-control-attribute-icon",tooltipTitle:c().text("This is a control attribute. Changing this value will affect availability of other conditional attributes."),className:e.icon})};function $N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){KN(e,t,n[t])}))}return e}function KN(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const GN={content:'""',position:"absolute",left:"-1000px",top:"-4px",width:"5000px",height:"calc(100% + 8px)",animationName:"$highlightAnimation",animationDuration:"2s",animationIterationCount:1,opacity:0},YN=lr((()=>({"@keyframes highlightAnimation":{"0%":{opacity:0},"50%":{opacity:1},"100%":{opacity:0}},highlighted:{"&::before":$N({},GN,{background:"rgba(228, 151, 0, 0.08)"}),position:"relative"}}))),XN=e=>{const t=YN(),n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{e&&e.scrollIntoRef(n)}),[e]),e?{ref:n,highlightedClassName:t.highlighted}:{ref:n}},QN=(0,f.filter)((0,f.propSatisfies)(s.isTempUri,"uri")),JN=lr((e=>({caption:{fontSize:"0.7rem",opacity:.54},wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",position:"relative"},attributesWrapper:{width:"100%",marginBottom:"10px"},imagesWrapper:{paddingBottom:"10px",width:"100%"},link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"},title:{fontSize:"12px",lineHeight:"14px",paddingLeft:"12px",verticalAlign:"middle",wordBreak:"break-all",color:e.palette.text.secondary},typeError:{marginLeft:"12px"},ovIcon:{marginLeft:"8px",textIndent:0},titleWrapper:{display:"inline-block",paddingBottom:"3px"},errorWrapper:{paddingBottom:"10px"}}))),eR=({max:e,values:t,attributeType:n,parentUri:o,mode:i,drawLines:l,showEmptyEditors:u,errorMessage:c,errors:d,paging:m,crosswalks:h,showNonOv:g,nonVisibleValues:v,highlightedError:y,highlightedAttribute:b,onAddAttributes:x,onDeleteAttribute:w,onChangeAttribute:E,onDeactivateError:C,additionalControlsRenderer:S,requestNextPageOfAttributeValues:O})=>{const k=JN(),[A,P]=(0,r.useState)(e),[T,D]=(0,r.useState)(!1),{label:M,required:_,cardinality:I,name:N,uri:R,description:L}=n,j=(0,s.isEditableMode)(i),{ref:F,errorClassName:V}=XI({highlightedError:y}),{ref:B,highlightedClassName:H}=XN(b),z=(0,r.useContext)(NN),U=(0,r.useContext)(tN),W=(0,r.useMemo)((()=>null==z?void 0:z.includes(R)),[R,z]),q=(0,r.useMemo)((()=>null==U?void 0:U.includes(R)),[R,U]),$=(0,s.isEmptyValue)(t),K=(!T&&u||_||W||q)&&$,G=Z(),Y=(0,r.useMemo)((()=>G.includes(n.uri)),[G,n.uri]),X=(0,r.useRef)((0,s.createNewAttribute)({parentUri:o,attributeType:(0,f.omit)(["defaultValue"],n)})),Q=(0,r.useCallback)((()=>{P(A+1);const e=e=>({parentUri:o,index:A,attributeType:e});if(K&&!(0,s.isComplexAttribute)(n.type)){const t=[e((0,f.omit)(["defaultValue"],n)),e(n)];return x(t)}return x([e(n)])}),[A,x,o,n,K]),J=(0,r.useCallback)((0,f.pipe)(w,f.T,D),[w,D]);if($&&!K)return null;if(K&&$&&(t=[X.current]),(0,s.isEmptyValue)(t))return null;const ee=(QN(t)||[]).length,te=g?"totalValues":"totalOvValues",ne=(0,f.ifElse)((0,f.has)(te),(0,f.pipe)((0,f.prop)(te),(0,f.add)(ee)),(0,f.always)(t.length))(m),re=null!=m&&m.totalValues?m.totalValues-ne:null==v?void 0:v.length,ae=e<ne,oe=ae&&A<ne,ie=ae&&A>=ne,le=t.slice(0,A),se=le?le.length-1:0,ue=ne-A;return a().createElement(RE,{enabled:l},a().createElement("div",{ref:F,className:p()(k.wrapper,V)},a().createElement("div",{className:k.titleWrapper},a().createElement(zE,{label:M,isRequired:_,className:k.title,"data-reltio-id":"reltio-attribute-label"}),a().createElement(VN,{description:L}),Y&&a().createElement(qN,null),a().createElement(QE,{nonOvValues:v,attributeType:n,className:k.ovIcon,nonOvTotal:re})),j&&a().createElement(IN,{cardinality:I}),j&&a().createElement(jE,{message:c,className:k.typeError}),a().createElement("div",{className:k.attributesWrapper},le.map(((e,t)=>a().createElement(CN,{key:e.uri,attributeValue:e,attributeType:n,lazy:K&&!_,showEmptyEditors:u,errors:d,ownError:(0,s.getAttributeOwnError)(e,t,n.uri,d),mode:i,crosswalks:h,onAddOneMore:se===t?Q:null,onAddAttributes:x,onDeleteAttribute:J,onChangeAttribute:E,onDeactivateError:C,additionalControlsRenderer:S,className:0===t?H:null,ref:0===t?B:null,isFirstEditor:0===t,isEmptyEditor:K}))),oe&&a().createElement(iC,{moreNumber:(0,f.min)(e,ue),valueNumber:ue,onClick:()=>{t.length<ne&&O({parentUri:o,attributeTypeUri:R,attributeTypeName:N,values:t,defaultMaxValues:e}),P(A+e)}}),ie&&a().createElement(nC,{onClick:()=>{P(e)}}))))};eR.displayName="AttributeRenderer";const tR=(0,r.memo)(eR),nR=lr({value:{color:"rgba(0, 0, 0, 0.87)"}}),rR=lr({placeholder:{color:"rgba(0, 0, 0, 0.38)",fontSize:"14px !important"}});function aR(){return aR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aR.apply(null,arguments)}function oR(){return oR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oR.apply(null,arguments)}const iR={SingleValue:({selectProps:{menuIsOpen:e},data:{label:t}})=>{const n=nR();return!e&&a().createElement(gd(),{"data-reltio-id":"simple-drop-down-value",variant:"body2",classes:{root:n.value}},t)},Placeholder:({innerProps:e,children:t})=>{const n=rR();return a().createElement(gd(),aR({"data-reltio-id":"simple-drop-down-placeholder",className:n.placeholder},e),t)}},lR=e=>a().createElement(Dw,oR({components:iR},e)),sR=(0,r.memo)(lR);var uR=n(2739);Hd()(uR.Z,{insert:"head",singleton:!1});const cR=uR.Z.locals||{},dR={MultiValue:S_},pR=({value:e,onChange:t,className:n,disabled:o=!1})=>{const i=L(),l=M(),u=(0,r.useMemo)((()=>(0,s.getRolesForEntityType)(i,l.type).map((e=>({value:e.uri,label:e.label})))),[i,l.type]),c=(0,r.useMemo)((()=>(e||[]).map((e=>{var t;return{value:e,label:(null===(t=u.find((0,f.propEq)("value",e)))||void 0===t?void 0:t.label)||(0,s.getLastUriPart)(e)}}))),[e,u]);return a().createElement(sR,{label:"",height:40,isMulti:!0,options:u,value:c,onChange:t,components:dR,classes:cR,className:p()(cR.roleContainer,n),disabled:o})};var fR=n(5175);Hd()(fR.Z,{insert:"head",singleton:!1});const mR=fR.Z.locals||{},hR=({values:e,onChange:t,onDelete:n,state:o})=>{const i=M().uri,l="edited"===o,u=(0,r.useCallback)((e=>{const n=(null==e?void 0:e.map((0,f.prop)("value")))||[];t({value:n,attributeType:s.EntityAttrTypes.roles,uri:i})}),[i,t]),d=(0,r.useCallback)((()=>{n({uri:i,attributeType:s.EntityAttrTypes.roles})}),[i,n]);return a().createElement("div",{className:mR.container,"data-reltio-id":"reltio-attribute-value"},a().createElement(pR,{value:e,onChange:u}),l&&a().createElement(gd(),{variant:"caption",className:mR.editedLabel},"(",c().text("edited"),")"),!!n&&a().createElement(sp,{"data-reltio-id":"reltio-roles-delete-button",className:mR.deleteButton,icon:sC(),onClick:d,size:"L"}))};function gR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){vR(e,t,n[t])}))}return e}function vR(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yR=({value:e,onChange:t,className:n,disabled:o=!1})=>{const i=H(),l=(0,r.useCallback)((async(e,t,n)=>{const r=await(0,s.getFacetedAttributeData)({fieldName:"tags",searchValue:e,options:gR({},i,{max:t,pageNo:n})});return Object.keys(r.tags)}),[i]);return a().createElement(w_,{fullWidth:!0,multiple:!0,variant:"filled",value:e||[],onChange:t,getSuggestions:l,className:n,disabled:o})};var bR=n(8847);Hd()(bR.Z,{insert:"head",singleton:!1});const xR=bR.Z.locals||{},wR=({className:e,values:t,onChange:n,onDelete:o,state:i})=>{const l=_(),u="edited"===i,d=(0,r.useCallback)((e=>{n({value:e,attributeType:s.EntityAttrTypes.tags,uri:l})}),[n,l]),p=(0,r.useCallback)((()=>{o({uri:l,attributeType:s.EntityAttrTypes.tags})}),[l,o]);return a().createElement("div",{className:xR.container,"data-reltio-id":"reltio-attribute-value"},a().createElement(yR,{value:t,onChange:d,className:e}),u&&a().createElement(gd(),{variant:"caption",className:xR.editedLabel},"(",c().text("edited"),")"),!!o&&a().createElement(sp,{"data-reltio-id":"reltio-tags-delete-button",className:xR.deleteButton,icon:sC(),onClick:p,size:"L"}))},ER=a().createContext(null);function CR(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SR(){return SR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SR.apply(null,arguments)}const OR=zI(ER,((e,{attributeType:t})=>{const{hasDeletionsMap:n,setHasDeletions:r}=e||{};return{hasDeletions:n?Boolean(n[null==t?void 0:t.uri]):void 0,setHasDeletions:r}}),(e=>{let{values:t,attributeType:n,parentUri:o,mode:i,errorMessage:l,onDeleteAttribute:u,onChangeAttribute:c,showEmptyEditors:d,hasDeletions:m,setHasDeletions:h,highlightedAttribute:g,showTitle:v=!0}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["values","attributeType","parentUri","mode","errorMessage","onDeleteAttribute","onChangeAttribute","showEmptyEditors","hasDeletions","setHasDeletions","highlightedAttribute","showTitle"]);const b=JN(),{label:x,required:w,cardinality:E}=n,C=(0,s.isEditableMode)(i),[S,O]=(0,r.useState)(!1),k=(0,r.useCallback)((e=>{O(e),null==h||h(n.uri,e)}),[n.uri,h]),A=void 0!==m?m:S,P=(0,r.useCallback)((0,f.pipe)(u,f.T,k),[u,k]),T=(0,s.isEmptyValue)(t),D=!A&&d&&T,M=(0,r.useRef)((0,s.createNewAttribute)({parentUri:o,attributeType:n})),{ref:_,highlightedClassName:I}=XN(g);return(0,s.isActivenessAttrType)(n)&&T&&!D?null:a().createElement("div",{ref:_,className:p()(I,b.wrapper)},v&&a().createElement(zE,{label:x,isRequired:w,className:p()(b.title,b.titleWrapper),"data-reltio-id":"reltio-attribute-label"}),C&&a().createElement(IN,{cardinality:E}),C&&a().createElement(jE,{message:l}),a().createElement(Zp(),{className:b.attributesWrapper},(()=>{switch(n.uri){case s.EntityAttrTypes.tags.uri:return a().createElement(wR,SR({},y,{values:t,onDelete:P,onChange:c}));case s.EntityAttrTypes.roles.uri:return a().createElement(hR,SR({},y,{values:t,onDelete:P,onChange:c}));default:{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){CR(e,t,n[t])}))}return e}({},M.current,{value:t[0]||""});return a().createElement(CN,SR({},y,{attributeValue:e,attributeType:n,mode:i,onDeleteAttribute:P,onChangeAttribute:c}))}}})()))}));var kR=n(7986),AR=n.n(kR);function PR(){return PR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PR.apply(null,arguments)}const TR=e=>a().createElement("svg",PR({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgDefaultImage"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M0 0h24v24H0z"}),a().createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-4.5-9l2.5 3.096V18H5l4.5-5.5 2.5 3.01L16.5 10zm-8-4a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",fillOpacity:.12,fill:"#000",fillRule:"nonzero"}))),DR={SMALL:{imageWidth:114,imageHeight:114},MEDIUM:{imageWidth:162,imageHeight:162},LARGE:{imageWidth:192,imageHeight:192},OVERRIDE:{imageWidth:"unset",imageHeight:"unset"}};let MR=function(e){return e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error",e}({});const _R=lr((e=>({root:{position:"relative"},image:({imageWidth:e,imageHeight:t})=>({width:e,height:t,objectFit:"cover",verticalAlign:"bottom"}),defaultContainer:{display:"flex",alignItems:"center",backgroundColor:"rgb(247, 247, 247)"},defaultImage:{width:"40px",height:"40px",marginLeft:"auto",marginRight:"auto",color:e.palette.text.secondary},hideImage:{display:"none"}})));function IR(){return IR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IR.apply(null,arguments)}const NR=e=>{let{src:t,className:n,containerClassName:o,size:i=DR.SMALL,overlay:l=null}=e,u=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["src","className","containerClassName","size","overlay"]);const c=i||DR.SMALL,d=_R(c),[f,m]=(0,r.useState)(MR.LOADING);(0,r.useEffect)((()=>{m(MR.LOADING)}),[t]);const h=f===MR.LOADING,g=f===MR.LOADED;return f===MR.ERROR?a().createElement("div",IR({className:p()(d.defaultContainer,d.image,n)},u),a().createElement(AR(),{"data-reltio-id":"not-available-image",className:d.defaultImage})):a().createElement("div",{className:p()(d.root,o)},!(0,s.isEmptyValue)(t)&&a().createElement("img",IR({src:t,className:p()(d.image,n,{[d.hideImage]:h}),onLoad:()=>{m(MR.LOADED)},onError:()=>{m(MR.ERROR)},alt:"image"},u)),h&&a().createElement("div",IR({className:p()(d.defaultContainer,d.image,n)},u),a().createElement(TR,{className:d.defaultImage})),g&&l)},RR=(0,r.memo)(NR);function LR(){return LR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LR.apply(null,arguments)}const jR=e=>a().createElement("svg",LR({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgDownload"},e),a().createElement("defs",null,a().createElement("path",{d:"M19 16v3H5v-3H3v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3h-2zm-6-3.33l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z",id:"Download_svg__a"})),a().createElement("g",{transform:"translate(-3 -3)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Download_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Download_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#fff",mask:"url(#Download_svg__b)",d:"M0 0h24v24H0z"})));var FR=n(6550),VR=n.n(FR);const BR=lr((()=>({root:{fontSize:"24px",color:"#fff"}}))),HR=({checked:e,className:t,onClick:n})=>{const r=BR(),o=e?Vw():VR();return a().createElement(o,{"data-reltio-id":"checked-button",className:p()(r.root,t),onClick:n})},zR=lr((()=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"0.2s linear all","&:not($selected):not($selectionMode):hover":{backgroundColor:"rgba(0,0,0,0.6)"},userSelect:"none"},selected:{backgroundColor:"rgba(0,114,206,0.6)"},selectionMode:{cursor:"pointer","&:not($selected)":{backgroundColor:"rgba(0,0,0,0.6)"}},button:{padding:0,width:"100px",height:"36px",color:"#fff",fontSize:"14px",fontWeight:500,lineHeight:"16px",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"rgba(98,2,238,0)"},checkedIcon:{position:"absolute",left:"4px",top:"4px",cursor:"pointer"},actions:{display:"flex",alignItems:"center",position:"absolute",top:"4px",right:"4px"},actionButton:{color:"#fff",fontSize:"24px"},dropDownMenuButton:{margin:"0 2px 0 8px"}}))),UR=e=>{const{id:t,canBeSelected:n=!1,selected:o=!1,selectionMode:i=!1,onDeselect:l=f.identity,onSelect:s=f.identity,onShareLink:u,onSetAsDefault:d,onDelete:m,onDownload:h=f.identity,onClick:g}=e,v=zR(),[y,b]=(0,r.useState)(!1),{canDelete:x}=eN(t),w=(0,r.useMemo)((()=>[{text:c().text("Share link"),onClick:u},{text:c().text("Set as default"),onClick:d},{text:c().text("Delete"),onClick:x&&m}].filter((0,f.prop)("onClick"))),[u,d,m,x]),E=e=>()=>(0,f.ifElse)((0,f.equals)(!0),l,s)(e),C=n&&(o||y||i),S=!i&&!o&&y,O=n&&o;return a().createElement("div",{className:p()(v.overlay,{[v.selected]:o,[v.selectionMode]:i}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:i?E(o):e=>{e.currentTarget===e.target&&g()},"data-reltio-id":"image-actions-overlay"},C&&a().createElement(HR,{className:v.checkedIcon,checked:o,onClick:E(o)}),S&&a().createElement("div",{className:v.actions},a().createElement(sp,{"data-reltio-id":"download-button",onClick:h,className:v.actionButton,icon:jR}),a().createElement(xf,{menuId:`image-overlay-actions-${t}`,buttonComponent:sp,buttonProps:{"data-reltio-id":"image-overlay-actions",icon:sf(),className:p()(v.actionButton,v.dropDownMenuButton)},menuItems:w})),O&&a().createElement(br(),{className:v.button,variant:"outlined",onClick:l},c().text("Deselect")))},ZR=(0,r.memo)(UR);var WR=n(1937),qR=n.n(WR);const $R=lr((e=>({root:{width:"328px"},paper:{width:"100%",height:"40px",display:"flex",alignItems:"center",boxShadow:"none",backgroundColor:"rgba(0,0,0,0.03)"},inputRoot:{flex:1},input:{padding:"0 12px",fontSize:"14px","&:placeholder":{color:e.palette.text.secondary}},errorMessage:{marginTop:"8px",fontSize:"12px",color:e.palette.error.main}}))),KR=e=>0===e.trim().length,GR=({onSend:e})=>{const t=$R(),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(null);return a().createElement(Zp(),{className:t.root},a().createElement(Kp(),{className:t.paper},a().createElement(qR(),{value:n,onChange:e=>{const t=e.target.value,n=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);o(t),n||KR(t)?l(null):l(c().text("URL is not correct"))},classes:{root:t.inputRoot,input:t.input},placeholder:c().text("Paste an image URL here")}),a().createElement(br(),{disabled:Boolean(i)||KR(n),variant:"outlined",color:"primary",onClick:()=>{e(n),o(""),l(null)}},c().text("Send"))),i&&a().createElement(gd(),{"data-reltio-id":"url-error-message",className:t.errorMessage},i))},YR=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],XR=({className:e,onAppendFile:t})=>a().createElement(a().Fragment,null,a().createElement("input",{onInput:e=>{t&&t(e.currentTarget.files[0])},style:{display:"none"},accept:YR.join(","),id:"upload-image-button","data-reltio-id":"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(br(),{className:e,variant:"contained",color:"primary",component:"span"},c().text("Select image"))));function QR(){return QR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QR.apply(null,arguments)}const JR=e=>a().createElement("svg",QR({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgUploadIcon"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__c"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"67.572%",y1:"54.952%",x2:"15.212%",y2:"13.907%",id:"UploadIcon_svg__e"},a().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#000",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__f"},a().createElement("stop",{stopColor:"#B8EDFF",offset:"0%"}),a().createElement("stop",{stopColor:"#53ACDE",offset:"100%"})),a().createElement("circle",{id:"UploadIcon_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"UploadIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#UploadIcon_svg__a"})),a().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#UploadIcon_svg__a"}),a().createElement("g",{mask:"url(#UploadIcon_svg__b)"},a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(-1 9)"},a().createElement("path",{d:"M0 107.268c0 35.579 28.703 64.409 64.173 64.409h139.021c29.578 0 53.497-24.035 53.497-53.635 0-28.356-21.935-51.562-49.705-53.515C199.577 27.705 167.2 0 128.346 0 97.425 0 70.59 17.582 57.171 43.274 25.027 46.767 0 74.117 0 107.268z",fill:"#FFF",opacity:.3}),a().createElement("ellipse",{fill:"url(#UploadIcon_svg__c)",opacity:.4,cx:64.553,cy:107.664,rx:61.43,ry:62.336}),a().createElement("path",{d:"M127.979 8.91c38.773 0 70.206 31.895 70.206 71.24 0 39.346-31.433 71.241-70.206 71.241-6.067 0-11.954-.78-17.57-2.249 9.688-11.019 15.574-25.551 15.574-41.478 0-33.7-26.352-61.153-59.286-62.299C78.714 23.611 101.654 8.91 127.98 8.91z",fill:"url(#UploadIcon_svg__d)",opacity:.4})),a().createElement("path",{fill:"url(#UploadIcon_svg__e)",opacity:.12,d:"M82.093 128.474l38.374 37.966-10.666 18.958 72.714 71.94 63.578-57.537v-6.11l-71.107-70.352H97.22z",transform:"translate(-1 9)"}),a().createElement("path",{fill:"url(#UploadIcon_svg__f)",d:"M151.004 128.29v57.591h-40.836V128.29H81l49.5-49.409L180 128.29z",transform:"translate(-1 9)"}))));var eL=n(9431);Hd()(eL.Z,{insert:"head",singleton:!1});const tL=eL.Z.locals||{},nL=({onAppendFile:e,className:t})=>a().createElement(Eg,{className:p()(tL.root,t),onFileDrop:e},a().createElement(JR,{className:tL.icon}),a().createElement(gd(),{className:tL.title},c().text("Drag an image here")),a().createElement(gd(),{className:tL.description},c().text("Acceptable image types would include JPG, PNG, TIFF, GIF, BMP. Maximum image size: ${MAX_IMAGE_SIZE}Mb",{MAX_IMAGE_SIZE:20})),a().createElement(XR,{onAppendFile:e})),rL=lr((e=>({root:{width:"100%",display:"flex",alignItems:"center",padding:"0 30px",boxSizing:"border-box"},border:{borderBottom:`1px solid ${e.palette.text.primary}`,flex:1,opacity:.12},text:{padding:"0 10px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),aL=({children:e,className:t})=>{const n=rL();return a().createElement(Zp(),{"data-reltio-id":"divider-with-text",className:p()(n.root,t)},a().createElement(Zp(),{className:n.border}),a().createElement(gd(),{className:n.text},e),a().createElement(Zp(),{className:n.border}))},oL=lr((e=>({root:{},dialogPaper:{position:"relative",maxWidth:"480px"},title:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",padding:"16px"},body:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0 8px 49px",textAlign:"center"},targetBox:{marginBottom:"8px"},divider:{marginBottom:"28px"}}))),iL=({open:e,onClose:t,onUpload:n})=>{const o=oL(),[i,l]=(0,r.useState)(!1),[u,d]=(0,r.useState)(null),p=k((e=>e.imageServicePath)),f=k((e=>e.environment)),m=F(),h=e=>{l(!0),(0,s.uploadImage)({image:e,imageServicePath:p,environment:f,tenant:m}).then((e=>{n(e),t()})).catch((e=>{d((0,s.getRequestErrorMessage)(e,c().text("Something went wrong")))})).finally((()=>l(!1)))};return a().createElement(fg(),{open:e,onClose:t,classes:{paper:o.dialogPaper}},a().createElement(gd(),{className:o.title},c().text("Add new image")),a().createElement(Zp(),{className:o.body},a().createElement(nL,{className:o.targetBox,onAppendFile:e=>{if(!e)return d(c().text("No image selected."));const t=Number((e.size/1024/1024).toFixed(2)),n=YR.includes(e.type);t>20?d(c().text("File size exceeds configured max file size.")):n?h(e):d(c().text("File format is not supported."))}}),a().createElement(aL,{className:o.divider},c().text("or")),a().createElement(GR,{onSend:e=>{h(e)}})),i&&a().createElement(Hh,null),a().createElement(Ag,{error:u,onClose:()=>d(null)}))},lL={imageMargin:4,imageWidth:DR.SMALL.imageWidth,imageHeight:DR.SMALL.imageHeight},sL=a().createContext(!1);sL.displayName="BlockImageGalleryDialogContext";var uL=n(9849),cL=n.n(uL),dL=n(7867),pL=n.n(dL);const fL=lr((()=>({thumbnails:{marginLeft:"12px",marginBottom:"12px",marginTop:"auto",width:"calc(100vw - 364px)",overflowX:"auto",overflowY:"hidden"},gridContainer:{width:"100%"},thumb:{width:"96px",height:"96px",cursor:"pointer",userSelect:"none"},inactiveThumb:{filter:"brightness(0.5)"}}))),mL=({attributeValues:e,setAttributeValueIndex:t,attributeValueIndex:n})=>{const o=fL(),i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(null!=i&&i.current){const e=i.current.scrollLeft,t=i.current.offsetWidth+e,r=96*n+16*n+12;t<r?i.current.scroll&&(r>t+96+16?i.current.scroll(r,0):i.current.scroll(112+e,0)):e+96>r&&i.current.scroll&&i.current.scroll(r-96,0)}}),[n,i]),a().createElement("div",{ref:i,className:o.thumbnails},a().createElement(gS(),{"data-reltio-id":"thumbnails-container",container:!0,wrap:"nowrap",direction:"row",spacing:1,className:o.gridContainer},e.map((({uri:e,value:r},i)=>a().createElement(gS(),{item:!0,key:e},a().createElement(RR,{onClick:()=>t(i),className:p()(o.thumb,{[o.inactiveThumb]:n!==i}),src:(0,s.getImageAttributeOvThumbnailUrl)({value:r})}))))))},hL=lr((e=>({root:{display:"flex",alignContent:"center",flexDirection:"column"},main:{position:"relative",padding:"0 86px",marginTop:"auto"},mainImageContainer:{display:"flex",alignContent:"center",height:"100%",width:"100%"},mainImage:{maxWidth:"calc(100vw - 512px)",maxHeight:"calc(100vh - 192px)",margin:"0 auto",userSelect:"none"},arrowButton:{backgroundColor:e.palette.divider,color:"white","&:hover":{backgroundColor:e.palette.divider}},arrowButtonPrev:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)"},arrowButtonNext:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)"}}))),gL=({className:e,attributeValues:t,attributeValueIndex:n,setAttributeValueIndex:r})=>{const o=hL(),i=t[n],l=(0,s.getImageAttributeOvPreviewUrl)(i);return a().createElement("div",{className:p()(o.root,e)},a().createElement("div",{className:o.main},n>0&&a().createElement(sp,{"data-reltio-id":"prev-image-button",icon:cL(),className:p()(o.arrowButton,o.arrowButtonPrev),onClick:()=>{r(n-1)},size:"XL"}),a().createElement(RR,{"data-reltio-id":"main-image",containerClassName:o.mainImageContainer,className:o.mainImage,size:l&&DR.OVERRIDE,src:l}),n!==t.length-1&&a().createElement(sp,{"data-reltio-id":"next-image-button",icon:pL(),className:p()(o.arrowButton,o.arrowButtonNext),onClick:()=>{r(n+1)},size:"XL"})),a().createElement(mL,{attributeValues:t,attributeValueIndex:n,setAttributeValueIndex:r}))};function vL(){return vL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vL.apply(null,arguments)}function yL(){return yL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yL.apply(null,arguments)}const bL=e=>a().createElement("svg",yL({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgNestedAttribute"},e),a().createElement("path",{d:"M14 11v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v1a1 1 0 01-1 1H6a1 1 0 01-1-1v-4a1 1 0 011-1h4a1 1 0 011 1v1h3z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function xL(){return xL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xL.apply(null,arguments)}const wL=e=>a().createElement("svg",xL({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgReferenceAttribute"},e),a().createElement("path",{d:"M10 18h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1H8V8H6a1 1 0 01-1-1V3a1 1 0 011-1h6a1 1 0 011 1v4a1 1 0 01-1 1h-2v3h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v5z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function EL(){return EL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EL.apply(null,arguments)}const CL=e=>a().createElement("svg",EL({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgSimpleAttribute"},e),a().createElement("rect",{fill:"#000",x:9,y:9,width:6,height:6,rx:1,stroke:"none",strokeWidth:1,fillRule:"evenodd"})),SL=lr({icon:{opacity:.29,width:"16px",height:"16px",flexShrink:0,marginRight:"6px",marginLeft:"8px"}}),OL=({attrType:e={}})=>{const t=SL(),n=(e=>{switch(e.type){case s.DataTypes.TYPE_IMAGE:case s.DataTypes.TYPE_NESTED:return bL;case s.DataTypes.TYPE_REFERENCE:return wL;default:return CL}})(e);return a().createElement(n,{className:t.icon})},kL=({margin:e,level:t,className:n,children:r})=>null!=t?a().createElement("div",{style:{marginLeft:t*e},className:n},r):r,AL=lr({container:{"& > $marginWrapper:first-child":{paddingLeft:"4px"}},listItem:{paddingLeft:"1px",paddingTop:"2px",paddingBottom:"2px",transition:"none","&:hover":{"& $itemAfter":{background:"linear-gradient(to right, rgba(235, 235, 235, 0.2), rgba(235, 235, 235, 1) 100%)"}},"&$listItemFocus":{"& $itemAfter":{background:"linear-gradient(to right, rgba(219, 219, 219, 0.2), rgba(219, 219, 219, 1) 100%)"}},"&:focus":{outline:"none"}},listItemFocus:{},recommendedIcon:{width:"18px",height:"18px",marginRight:"5px",marginLeft:"7px",flexShrink:0},logoIcon:{width:"18px",height:"18px",flexShrink:0,marginRight:"4px"},itemAfter:{position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)"},itemText:{padding:"0",margin:0,"& span":{fontSize:"0.8125rem",letterSpacing:"normal",whiteSpace:"nowrap"}},checkbox:{opacity:.34,padding:0,marginLeft:"14px","&$checked":{opacity:1,background:"none"}},checked:{},marginWrapper:{display:"flex",alignItems:"center"},defaultCursor:{cursor:"default"},itemTooltip:{margin:"4px 0"},marginText:{marginLeft:"21px"},itemTextWrapper:{display:"flex",alignItems:"center"}}),PL=ep((e=>a().createElement("svg",vL({width:13,height:18,viewBox:"0 0 13 18",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgRecommended"},e),a().createElement("g",{transform:"translate(-3 -1)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{fill:"#FF4081",d:"M5.833 10h3.75v6.667l-3.75 1.666z"}),a().createElement("path",{fill:"#CE0C4E",d:"M13.333 10v8.333l-3.75-1.666V10z"}),a().createElement("circle",{fill:"#FFC058",cx:9.583,cy:7.917,r:6.25}),a().createElement("circle",{fill:"#FFCD7B",cx:9.583,cy:7.917,r:5.417}),a().createElement("path",{fill:"#FFFBB5",d:"M8.333 11.667L5 8.462l.933-.898 2.4 2.308L13.4 5l.933.897z"}))))),TL=({groupId:e,data:t,checked:n=!1,isFocused:r=!1,isRequired:o=!1,label:i,labelInText:l,level:u,onClick:d=f.identity,hideCheckBox:m=!1,hideIcon:h=!1,notSelectable:g=!1,disableHorizontalScrollbar:v=!1,style:y={},subItemMargin:b=20,LogoIcon:x,className:w,disableNonSelectable:E,disableGutters:C})=>{const S=AL(),{attrType:O}=t||{},k=!(m&&(0,s.isNested)(O)||g),A=!!x;return a().createElement(Rd,{value:l||i,className:S.itemTooltip,placement:"bottom-end"},a().createElement(mf(),{className:p()(S.container,S.listItem,{[S.defaultCursor]:!k},w),onClick:k?()=>d(t,!n,e):void 0,style:y,dense:!0,disabled:E&&g,classes:{focusVisible:S.listItemFocus,selected:S.listItemFocus},selected:r,tabIndex:-1,disableGutters:C},!m&&a().createElement(pf(),{checked:n,disableRipple:!0,disabled:!k,className:p()(S.checkbox,{[S.checked]:n}),tabIndex:-1}),a().createElement(kL,{margin:b,level:u,className:S.marginWrapper},a().createElement(a().Fragment,null,!h&&(t=>"recommended"===e?a().createElement(PL,{className:S.recommendedIcon,tooltipTitle:c().text("Recommended"),showForDisabled:!0}):a().createElement(OL,{attrType:t}))(O),a().createElement("div",{className:p()(S.itemTextWrapper,{[S.marginText]:h})},A&&a().createElement(x,{className:S.logoIcon}),a().createElement(Rh(),{primary:a().createElement(a().Fragment,null,i,o&&a().createElement(VE,null)),className:S.itemText})))),k&&v&&a().createElement("div",{className:S.itemAfter})))};TL.defaultName="AttributeListItem";const DL=(0,r.memo)(TL);var ML=n(3625),_L=n.n(ML);function IL(){return IL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IL.apply(null,arguments)}const NL=e=>a().createElement("svg",IL({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgInfo"},e),a().createElement("path",{d:"M11.25 16.75h1.5V11h-1.5v5.75zM12 9.289c.229 0 .42-.078.575-.233a.782.782 0 00.233-.575.782.782 0 00-.232-.576.782.782 0 00-.576-.232.782.782 0 00-.575.232.782.782 0 00-.233.576c0 .229.078.42.232.575A.782.782 0 0012 9.29zm.002 12.211a9.254 9.254 0 01-3.706-.748 9.596 9.596 0 01-3.016-2.03 9.595 9.595 0 01-2.032-3.016 9.246 9.246 0 01-.748-3.704c0-1.314.25-2.55.748-3.706a9.596 9.596 0 012.03-3.016 9.594 9.594 0 013.016-2.032 9.246 9.246 0 013.704-.748c1.314 0 2.55.25 3.706.748a9.596 9.596 0 013.017 2.03 9.594 9.594 0 012.03 3.016 9.247 9.247 0 01.749 3.704c0 1.314-.25 2.55-.748 3.706a9.596 9.596 0 01-2.03 3.017 9.595 9.595 0 01-3.016 2.03 9.247 9.247 0 01-3.704.749zM12 20c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20z",fill:"#003",fillOpacity:.8})),RL=lr({root:{display:"inline-flex"}});function LL(){return LL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LL.apply(null,arguments)}const jL=(0,r.forwardRef)(((e,t)=>{const{className:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className"]),o=RL();return a().createElement("span",LL({},r,{className:o.root,ref:t}),a().createElement(NL,{className:n}))}));jL.displayName="RowInfoIcon";const FL=ep(jL);var VL=n(3732),BL=n.n(VL),HL=n(4501),zL=n.n(HL);const UL=lr((()=>({container:({height:e=36})=>({height:e,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}),icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})));function ZL(){return ZL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZL.apply(null,arguments)}function WL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){qL(e,t,n[t])}))}return e}function qL(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const $L=e=>{let{value:t,autofocus:n,onSearch:o=f.identity,rootRef:i,classes:l={},height:s,placeholder:u=c().text("Search"),endAdornmentContent:d}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder","endAdornmentContent"]);const h=UL({height:s}),[g,v]=(0,r.useState)(""),y=(0,f.pipe)((0,f.tap)(o),v),b=(0,f.isNil)(t)?g:t;return a().createElement(BL(),ZL({startAdornment:a().createElement(BS(),{position:"start"},a().createElement(zL(),{className:h.icon})),endAdornment:a().createElement(BS(),{position:"end"},b.length>0&&a().createElement(sp,{icon:Sg(),className:h.clearButton,onClick:()=>y("")}),d),autoFocus:n,classes:WL({},l,{input:p()(h.input,l.input),root:p()(h.container,l.root)}),placeholder:u,value:b,onChange:(0,f.pipe)(Tf,y),disableUnderline:!0,ref:i},m))},KL=(0,r.memo)($L);function GL(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const YL=(e,t={})=>{const n=(0,r.useMemo)((()=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(0,f.isNil)(t)||""===t?"initial":t])))),[e]);return(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){GL(e,t,n[t])}))}return e}({},n,t)),[n,t])};var XL=n(2770);Hd()(XL.Z,{insert:"head",singleton:!1});const QL=XL.Z.locals||{};function JL(){return JL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JL.apply(null,arguments)}function ej(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){tj(e,t,n[t])}))}return e}function tj(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nj=e=>{var t;let{title:n,className:r,onSearch:o,hideTitle:i,hideSearchInput:l,inputPlaceholder:s,headerPlacement:u="top",containerWidth:d,containerHeight:f=553,searchInputOnKeyDown:m,children:h,searchInputRef:g,anchorOrigin:v={vertical:"top",horizontal:"right"},transformOrigin:y={vertical:"top",horizontal:"right"},additionalInfo:b}=e,x=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","inputPlaceholder","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin","additionalInfo"]);const w=gt(),E=YL({"--container-height":`${f}px`}),C=a().createElement(a().Fragment,null,!i&&a().createElement("div",{className:QL.header},n,b&&a().createElement(FL,{className:QL.infoIcon,tooltipTitle:b})),!l&&a().createElement(KL,{onSearch:o,autofocus:!0,onKeyDown:m,inputRef:g,classes:{root:QL.searchInputContainer},placeholder:s||c().text("Search & add attributes"),height:40}));return a().createElement(_L(),JL({anchorOrigin:v,transformOrigin:y,"data-mui-color-scheme":null==w||null===(t=w.palette)||void 0===t?void 0:t.mode},x),a().createElement("div",{className:p()(QL.container,r),style:ej({},E,{width:d})},"top"===u&&C,a().createElement("div",{className:QL.list},h),"bottom"===u&&C))},rj=e=>e.titleItemIndex===e.index;var aj="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function oj(e){cancelAnimationFrame(e.id)}var ij=-1;function lj(e){if(void 0===e&&(e=!1),-1===ij||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ij=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ij}var sj=null;function uj(e){if(void 0===e&&(e=!1),null===sj||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),a=r.style;return a.width="100px",a.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?sj="positive-descending":(t.scrollLeft=1,sj=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),sj}return sj}var cj=function(e,t){return e};function dj(e){var t,n=e.getItemOffset,a=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,l=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,u=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=u(r.props,(0,te.Z)(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:(0,te.Z)(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Ap((function(e,t,n,a){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:a})})),r._callOnScroll=void 0,r._callOnScroll=Ap((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,a=r.props,i=a.direction,l=a.itemSize,s=a.layout,u=r._getItemStyleCache(c&&l,c&&s,c&&i);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===i||"horizontal"===s,m="rtl"===i,h=f?d:0;u[e]=t={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Ap((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,a=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===a)return null;var t=r.props.direction,i=a;if("rtl"===t)switch(uj()){case"negative":i=-a;break;case"positive-descending":i=o-n-a}return i=Math.max(0,Math.min(i,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<i?"forward":"backward",scrollOffset:i,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,a=t.scrollHeight,o=t.scrollTop;r.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,a-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){var e,t,n,a;null!==r._resetIsScrollingTimeoutId&&oj(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=(e=r._resetIsScrolling,t=150,n=aj(),a={id:requestAnimationFrame((function r(){aj()-n>=t?e.call(null):a.id=requestAnimationFrame(r)}))})},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}(0,ee.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return pj(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,a=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===a?s.scrollWidth>s.clientWidth?lj():0:s.scrollHeight>s.clientHeight?lj():0}this.scrollTo(i(this.props,e,t,o,this._instanceProps,l))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var a=this._outerRef;"horizontal"===t||"horizontal"===r?a.scrollLeft=n:a.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,a=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(uj()){case"negative":o.scrollLeft=-a;break;case"positive-ascending":o.scrollLeft=a;break;default:var i=o.clientWidth,l=o.scrollWidth;o.scrollLeft=l-i-a}else o.scrollLeft=a;else o.scrollTop=a}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&oj(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,l=e.innerRef,s=e.innerElementType,u=e.innerTagName,c=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?cj:p,m=e.layout,h=e.outerElementType,g=e.outerTagName,v=e.style,y=e.useIsScrolling,b=e.width,x=this.state.isScrolling,w="horizontal"===o||"horizontal"===m,E=w?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),S=C[0],O=C[1],k=[];if(c>0)for(var A=S;A<=O;A++)k.push((0,r.createElement)(t,{data:d,key:f(A,d),index:A,isScrolling:y?x:void 0,style:this._getItemStyle(A)}));var P=a(this.props,this._instanceProps);return(0,r.createElement)(h||g||"div",{className:n,onScroll:E,ref:this._outerRefSetter,style:(0,$.Z)({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},(0,r.createElement)(s||u||"div",{children:k,ref:l,style:{height:w?"100%":P,pointerEvents:x?"none":void 0,width:w?P:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],a=e[3];this._callOnItemsRendered(t,n,r,a)}if("function"==typeof this.props.onScroll){var o=this.state,i=o.scrollDirection,l=o.scrollOffset,s=o.scrollUpdateWasRequested;this._callOnScroll(i,l,s)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,a=r.isScrolling,o=r.scrollDirection,i=r.scrollOffset;if(0===t)return[0,0,0,0];var u=l(this.props,i,this._instanceProps),c=s(this.props,u,i,this._instanceProps),d=a&&"backward"!==o?1:Math.max(1,n),p=a&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(r.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var pj=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},fj=function(e,t,n){var r=e.itemSize,a=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var i=0;if(o>=0){var l=a[o];i=l.offset+l.size}for(var s=o+1;s<=t;s++){var u=r(s);a[s]={offset:i,size:u},i+=u}n.lastMeasuredIndex=t}return a[t]},mj=function(e,t,n,r,a){for(;r<=n;){var o=r+Math.floor((n-r)/2),i=fj(e,o,t).offset;if(i===a)return o;i<a?r=o+1:i>a&&(n=o-1)}return r>0?r-1:0},hj=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,a=t.estimatedItemSize,o=t.lastMeasuredIndex,i=0;if(o>=n&&(o=n-1),o>=0){var l=r[o];i=l.offset+l.size}return i+(n-o-1)*a},gj=dj({getItemOffset:function(e,t,n){return fj(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:hj,getOffsetForIndexAndAlignment:function(e,t,n,r,a,o){var i=e.direction,l=e.height,s=e.layout,u=e.width,c="horizontal"===i||"horizontal"===s?u:l,d=fj(e,t,a),p=hj(e,a),f=Math.max(0,Math.min(p-c,d.offset)),m=Math.max(0,d.offset-c+d.size+o);switch("smart"===n&&(n=r>=m-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return m;case"center":return Math.round(m+(f-m)/2);default:return r>=m&&r<=f?r:r<m?m:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,a=t.lastMeasuredIndex;return(a>0?r[a].offset:0)>=n?mj(e,t,a,0,n):function(e,t,n,r){for(var a=e.itemCount,o=1;n<a&&fj(e,n,t).offset<r;)n+=o,o*=2;return mj(e,t,Math.min(n,a-1),Math.floor(n/2),r)}(e,t,Math.max(0,a),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var a=e.direction,o=e.height,i=e.itemCount,l=e.layout,s=e.width,u="horizontal"===a||"horizontal"===l?s:o,c=fj(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<i-1&&p<d;)f++,p+=fj(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});const vj=lr({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}}),yj=({items:e,getItemSize:t,renderItem:n,renderGroupTitle:o,width:i="100%",height:l,fixedTitle:s=!0,itemKey:u=e=>e,disableHorizontalScrollbar:c,hideSubtitles:d,focusIndex:p=null,onInnerContainerResize:f})=>{const m=vj(),h=(0,r.useRef)(null),g=(0,r.useRef)(null),v=(0,r.useRef)(null),y=(0,r.useRef)([0]),b="stickyTitleItem",x={topMargin:0,index:void 0},w=(0,r.useMemo)((()=>!d||(e||[]).some((e=>null!==e.titleItemIndex))),[e,d]),E=(0,r.useCallback)((n=>{const r=y.current.length;let a=0;e.slice(r-1,n+1).forEach(((e,n)=>{const o=r+n-1;n>0&&(y.current[o]=y.current[o-1]+a),a=t(o,e.item)}))}),[t,e]),C=(0,r.useCallback)((t=>e[t].titleItemIndex),[e]),S=(0,r.useCallback)((t=>e[t]),[e]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{h.current&&h.current.scrollTo(0)}))}),[e.length]),(0,r.useEffect)((()=>{h.current&&h.current.resetAfterIndex(0),O();const n=(e=>{const n=e.findIndex((e=>e.item.moveTo));if(n>-1){E(n);const e=C(n);return{offset:y.current[n],titleHeight:t(e,S(e).item)}}})(e);if(n&&n.offset&&h.current){const{titleHeight:e}=n,t=n.offset-e;(t<h.current.state.scrollOffset||t>h.current.state.scrollOffset+l)&&requestAnimationFrame((()=>{h.current&&h.current.scrollTo(t-(l-e)/2)}))}}),[E,S,t,C,l,y,e,h]);const O=()=>{v.current&&g.current&&(v.current.style.width=g.current.offsetWidth+"px")},k=(0,r.useCallback)((t=>{let n=null,r=0;return e.some(((e,a)=>{E(a+10);const o=y.current[a+1];return t>=r&&t<o&&(n={index:a,offset:r,listItem:e}),r=o,n})),n}),[E,y,e]),A=(0,r.useCallback)((e=>t(e,S(e).item)),[S,t]),P=(0,r.useCallback)((({index:e,style:t,data:r})=>{const a=S(e);return a.item?rj(a)?o(t,a.item):n(t,a.item,e,r):null}),[S,o,n]),{handleOnItemsRendered:T}=(({focusIndex:e,listRef:t,items:n})=>{const a=(0,r.useRef)(null),o=(0,r.useRef)(null),i=(0,r.useCallback)((({visibleStartIndex:e,visibleStopIndex:t})=>{a.current=e,o.current=t}),[]);return(0,r.useEffect)((()=>{t.current&&null!==e&&0!==n.length&&(e<Math.max(a.current+3,0)?t.current.scrollToItem(Math.max(e-3,0),"start"):e>Math.min(o.current-3,n.length-1)&&t.current.scrollToItem(Math.min(e+3,n.length-1),"end"))}),[e,n.length,t]),{handleOnItemsRendered:i}})({items:e,focusIndex:p,listRef:h}),D=(0,r.useCallback)((()=>e.filter((e=>rj(e))).map((e=>(e=>a().createElement("div",{className:b,style:{visibility:"hidden"},"data-index":e.index,key:e.index},o({height:t(e.index,e.item)},e.item)))(e)))),[t,e,o]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:v,"data-reltio-id":"grouped-list-sticky-titles",className:m.stickyTitlesWrapper},s&&D()),f&&g.current&&a().createElement(Dd,{handleHeight:!0,onResize:f,targetRef:g}),a().createElement(gj,{ref:h,itemCount:e.length,itemSize:A,width:i,height:l,itemKey:u,innerRef:g,onScroll:({scrollOffset:n,scrollDirection:r})=>{if(!s||!w)return;const a=k(n),o=a&&C(a.index);var i;null!==o&&(i=o,v.current&&[...v.current.querySelectorAll("."+b)].forEach((e=>{e.dataset.index===i.toString()?(e.style.visibility="visible",x.index=i):e.style.visibility="hidden"}))),O();const l=null!==o&&t(o,S(o).item),u=k(n+l+x.topMargin);let c=0;if(u){switch(r){case"forward":u.offset-n>0&&rj(u.listItem)&&(c=l-(u.offset-n));break;case"backward":{const t=o>-1&&(d=o,e.findIndex(((e,t)=>rj(e)&&d<t))),r=(e=>(E(e),y.current[e]))(t);t>-1&&n<r&&l>=r-n&&(c=l-(r-n))}}(e=>{v.current&&(x.topMargin=-e,v.current.style.top=-e+"px")})(c)}var d},style:c?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:T},P))},bj=(0,f.curry)(((e,t)=>(0,f.filter)((t=>(t.label||t.name).toLowerCase().includes(e.toLowerCase())))(t))),xj=({attrTypes:e,filter:t="",sortingFn:n})=>(0,f.pipe)(bj(t),(0,f.sort)(n),(0,f.map)((e=>({item:{id:e.uri,label:e.label||e.name,attrType:e}}))))(e);var wj=function(e){return e.parent="parent",e.attributes="attributes",e}(wj||{});const Ej=lr({moreAttributes:{display:"flex",paddingBottom:"6px","&$dense":{padding:0}},dense:{},popupContainer:{},moreAttributesPopup:{"&$popupContainer":{}},moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginTop:"8px",marginLeft:"-4px",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},subHeader:{backgroundColor:"rgb(245, 245, 245)",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500},noResultsCaptionContainer:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center"}}),Cj=({label:e,popupTitle:t=e,data:n,parent:o,dense:i,onApply:l})=>{const u=Ej(),d=(0,r.useRef)(),[m,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(""),[y,b]=(0,r.useState)([]),{items:x,hasGroups:w,parentGroupLength:E,attributesGroupLength:C}=(({data:e,parent:t,filter:n})=>{const a=k((e=>e.attributesSortingStrategy)),o=Boolean(t),i=(0,r.useMemo)((()=>a===s.SortingStrategy.ASC_BY_NAME?(e,t)=>{var n;return null==e||null===(n=e.label)||void 0===n?void 0:n.localeCompare(null==t?void 0:t.label)}:(e,t)=>0),[a]),l=(0,r.useMemo)((()=>o?xj({attrTypes:[t],filter:n,sortingFn:i}):[]),[o,t,n,i]),u=(0,r.useMemo)((()=>o&&null!=l&&l.length?[{item:{id:wj.parent,label:c().text("Parent")},items:l}]:[]),[o,l]),d=(0,r.useMemo)((()=>xj({attrTypes:e,filter:n,sortingFn:i})),[e,n,i]),p=(0,r.useMemo)((()=>o&&null!=d&&d.length?[{item:{id:wj.attributes,label:c().text("Attributes")},items:d}]:d),[o,d]),m=(0,r.useMemo)((()=>(e=>{const t=e=>(0,f.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))})((u||[]).concat(p))),[u,p]),h=u.length,g=p.length;return{items:m,hasGroups:o,parentGroupLength:h,attributesGroupLength:g}})({data:n,parent:o,filter:g}),S=(0,r.useCallback)(((e,t)=>{b((0,f.ifElse)((0,f.always)(t),(0,f.append)(e),(0,f.reject)((0,f.propEq)("id",e.id)))(y))}),[y]),O=(0,r.useCallback)(((e,t)=>t.items?40:28),[]),A=(0,r.useCallback)((({item:e})=>{S(e,(0,f.not)((0,f.any)((0,f.propEq)("id",e.id))(y)))}),[S,y]),{focusIndex:P,handleKeyDown:T}=(({items:e,open:t,onSelectFocusedItem:n,selectedItems:a,onClose:o})=>{const[i,l]=(0,r.useState)(null),s=(0,r.useRef)(!1),u=(0,r.useCallback)((t=>{let n=null===t?u(-1):t;for(;null!==t&&n<e.length&&(n<=t||n>=0&&rj(e[n]));)n+=1;return n!==e.length?n:u(-1)}),[e]),c=(0,r.useCallback)((t=>{let n=null===t?e.length-1:t;for(;null!==t&&n>=0&&(n>=t||rj(e[n]));)n-=1;return n<0?e.length-1:n}),[e]),d=(0,r.useCallback)((()=>{if(!(0,f.isNil)(i)){const t=e[i].item;t.item.notSelectable||n({item:t.item,groupData:t})}}),[n,e,i]),p=(0,r.useCallback)((t=>{if(0!==e.length)switch(t.key){case"Down":case"ArrowDown":return l(u),t.preventDefault(),!1;case"Up":case"ArrowUp":return l(c),t.preventDefault(),!1;case"Enter":s.current=!0,d();break;case"Tab":null==o||o(t);break;default:return}}),[e,u,c,d,o]);return(0,r.useEffect)((()=>{if(s.current){s.current=!1;const t=e.findIndex((e=>e.item.moveTo));t>-1&&l(t)}else l(null)}),[e,t,a]),{focusIndex:i,handleKeyDown:p}})({items:x,open:m,onSelectFocusedItem:A,selectedItems:y}),D=(0,r.useRef)(null);D.current=P;const M=w?(E?1:0)+(C?1:0):0,_=x.length-M,I=Math.min(255,28*_+40*M),N=Math.max(140,I+112),R=(0,r.useCallback)(((e,{item:t,level:n=0},r)=>{var o;const i=(0,f.any)((0,f.propEq)("id",t.id))(y),l=D.current===r;return a().createElement(DL,{key:t.uri,onClick:S,checked:i,level:n,data:t,label:a().createElement(WE,{text:t.label,highlight:g}),labelInText:t.label,style:e,isFocused:l,isRequired:!(null===(o=t.attrType)||void 0===o||!o.required),LogoIcon:t.LogoIcon})}),[g,S,y]),L=(0,r.useCallback)(((e,t)=>a().createElement(yO(),{component:"div",className:u.subHeader,style:e,key:`group-${t.item.id}`},t.item.label)),[]);return a().createElement("div",{className:p()(u.moreAttributes,{[u.dense]:i})},a().createElement(br(),{color:"primary",onClick:()=>h(!m),ref:d,className:u.moreButton},a().createElement(md(),{classes:{root:u.icon}}),a().createElement("div",{className:u.buttonLabel},e)),a().createElement(nj,{open:m,className:p()(u.moreAttributesPopup,u.popupContainer),anchorEl:d.current,onClose:(0,f.pipe)((()=>{y.length>0&&l((0,f.pluck)("attrType",y))}),(()=>h(!1)),(()=>v("")),(()=>b([]))),onSearch:v,containerHeight:N,title:t,containerWidth:320,searchInputOnKeyDown:T},a().createElement(yj,{getItemSize:O,renderItem:R,renderGroupTitle:L,disableHorizontalScrollbar:!0,items:x,height:I,focusIndex:P}),0===x.length&&a().createElement("div",{className:u.noResultsCaptionContainer},a().createElement(gd(),{variant:"caption",display:"block",gutterBottom:!0},c().text("No results found")))))},Sj={get CreationTime(){return c().text("Creation Time")},get CreationDate(){return c().text("Creation Date")},get Dimensions(){return c().text("Dimensions")},get MimeType(){return c().text("Mime Type")},get Size(){return c().text("Size")},get Url(){return c().text("Full image URL (S3)")},get UrlPreview(){return c().text("Preview image URL (S3)")},get UrlThumbnail(){return c().text("Small image URL (S3)")},get CdnUrl(){return c().text("Full image URL (CDN)")},get CdnUrlPreview(){return c().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return c().text("Small image URL (CDN)")}},Oj=({value:e}={},t)=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail","MimeType"].includes(t)?(0,f.path)([t,0,"value"],e):"CreationDate"===t&&(0,f.path)(["CreationTimestamp",0,"value"],e)?Ar()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,f.path)(["CreationTimestamp",0,"value"],e)?Ar()(e.CreationTimestamp[0].value).format("HH:mm:ss"):"Dimensions"===t&&(0,f.path)(["Height",0,"value"],e)&&(0,f.path)(["Width",0,"value"],e)?`${e.Height[0].value} x ${e.Width[0].value} ${c().text("pixels")}`:"Size"===t&&(0,f.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0,kj=(e=[])=>e.filter((({system:e})=>!e)),Aj=(e,t)=>{const{includeNames:n=[],excludeNames:r=[],order:a=[]}=t,o=n.length?e.filter((e=>n.includes(e))):e.filter((e=>!r.includes(e)));return 0===a.length?o:o.sort(((e,t)=>{const n=a.indexOf(e),r=a.indexOf(t);return-1===n&&-1!==r?1:-1===r&&-1!==n?-1:n-r}))},Pj=(e={},t,n)=>{const r=kj(t.attributes);return Aj(Object.keys(e.value||{}),n).reduce(((t,n)=>{const a=r.find((({name:e})=>e===n));return a?[...t,{attrType:a,values:e.value[n]}]:t}),[])},Tj=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),Dj=lr({title:{marginBottom:"10px",color:"white",fontSize:"18px",lineHeight:"21px","&$canAdd":{marginBottom:"3px"}},divider:{width:"100%",height:"1px",borderColor:"rgba(255,255,255,0.12)"},canAdd:{}}),Mj=({attributeType:e,onAddAttributes:t,uri:n})=>{const o=Dj(),i=kj(e.attributes),{canCreate:l}=(0,r.useContext)(JI),s=l&&Boolean(t);return a().createElement(Zp(),null,a().createElement(gd(),{className:p()(o.title,{[o.canAdd]:s})},c().text("Meta info")),s&&a().createElement(r.Fragment,null,a().createElement(Cj,{label:c().text("Attributes"),data:i,dense:!1,onApply:e=>{t&&t(e.map((e=>({attributeType:e,parentUri:n}))))}}),a().createElement(TM(),{className:o.divider})))},_j=a().createContext(null);_j.displayName="RelationContext";const Ij=e=>v(hr,e),Nj=a().createContext({appearance:void 0,attributes:void 0,roles:void 0,tags:void 0});Nj.displayName="HistoryDiffContext";const Rj=a().createContext({highlightedValuesUris:[],highlightedClassName:""});Rj.displayName="HighlightedValuesContext";const Lj=a().createContext([]);function jj(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fj=(e,t,n,r)=>{const a=((e,t)=>{const n=t.find((t=>t.uri===e.uri));return n&&Array.isArray(n.children)?n.children:[]})(e,n);let o=(null==e?void 0:e.attributes)||(null==e?void 0:e.analyticsAttributes)||[];return a.length&&(o=o.filter((e=>a.includes(e.uri)))),o.reduce(((e,a)=>{const o=Vj(t[a.name],r,n);return o&&o.length&&(Array.isArray(o[0])?e.push({[a.uri]:o[0]}):e.push({[a.uri]:o})),e}),[])},Vj=(e,t,n)=>{if(e&&0!==e.length)return e.reduce(((e,r)=>{if("type"in r&&r.type){const a="lookupCode"in r?r.lookupCode:r.value,o=(0,s.findAttributeTypeByUri)(t,r.type);a&&"object"!=typeof a&&(0,s.isOv)(r)?e.push(Bj(a,o)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(Fj(o,a,n,t))}return e}),[])},Bj=(e,t)=>{switch(null==t?void 0:t.type){case s.DataTypes.TYPE_DATE:return new Date(e).getTime();case s.DataTypes.TYPE_TIMESTAMP:return isNaN(Number(e))?new Date(e).getTime():new Date(Number(e)).getTime();default:return e}};function Hj(){return Hj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hj.apply(null,arguments)}const zj=e=>a().createElement("svg",Hj({width:11,height:11,viewBox:"0 0 11 11","data-reltio-id":"SvgPivotingIcon"},e),a().createElement("path",{d:"M2.514 5h2.314V3l2.5 2.5-2.5 2.5V6h-3.8a4.5 4.5 0 10.73-3H.6a5.5 5.5 0 11-.577 3H0V5H2.514z",fill:"#6CACE4",stroke:"none",strokeWidth:1,fillRule:"evenodd"})),Uj=lr((e=>({link:{color:e.palette.primary.main,textDecoration:"none"}}))),Zj=(0,r.forwardRef)((({value:e,attributeType:t,children:n,className:o,onClick:i},l)=>{const s=Uj(),{generatePivotingUrl:u}=(0,r.useContext)(Pf),c=u({uiPath:P(),uri:t.uri,value:JSON.stringify(e)}),d=(0,r.useCallback)((e=>{Mf(e)||(i(),e.preventDefault()),e.stopPropagation()}),[i]);return a().createElement("a",{ref:l,href:c,onClick:d,className:p()(s.link,o)},n)}));Zj.displayName="PivotingUriLink";const Wj=lr((e=>({container:{backgroundColor:"white",width:"360px",minWidth:"360px",maxWidth:"720px"},header:{display:"flex",height:"48px",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px"},title:{color:e.palette.text.primary,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px"},entityTypeLabel:{color:"rgba(0,0,0,0.67)",fontSize:"14px",paddingLeft:"16px",paddingBottom:"12px",lineHeight:"16px"},divider:{height:"24px",width:"1px",backgroundColor:"rgba(0,0,0,0.12)"},headerCount:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:"0.24px",lineHeight:"28px",width:"210px"},body:{borderBottom:"1px solid rgba(0,0,0,0.12)",padding:"0 16px 8px"},footer:{display:"flex",alignItems:"center",height:"32px",paddingLeft:"16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"16px"},profileIcon:{height:"16px",width:"16px"},entityContainer:{display:"flex",flexDirection:"row",alignItems:"center"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px",textDecoration:"none",paddingLeft:"8px",wordBreak:"break-word",whiteSpace:"break-spaces"},seeAllButton:{cursor:"pointer"}}))),qj=({attributeType:e,label:t,entities:n,generatedValue:r,onSeeAllClick:o,total:i})=>{const l=Wj(),u=i>6,d=Boolean(t);return a().createElement("div",{className:l.container},a().createElement("div",{className:l.header},a().createElement("div",{className:l.title},c().text("Pivot profiles")),a().createElement("div",{className:l.divider}),a().createElement("div",{className:l.headerCount},c().number(i,"0,0")+" "+(1===i?c().text("item"):c().text("items")))),d&&a().createElement("div",{className:l.entityTypeLabel},t),a().createElement("div",{className:l.body},n.map((e=>a().createElement("div",{key:e.uri,className:l.entityContainer},a().createElement(wd,{entity:e,avatarClassName:l.profileIcon}),a().createElement(If,{className:l.entityLabel,value:(0,s.getEntityUriForLink)(e)},(0,s.getLabel)(e.label)))))),u&&a().createElement("div",{className:l.footer},a().createElement(Zj,{value:r,attributeType:e,className:l.seeAllButton,onClick:o},c().text("See all"))))},$j=lr((e=>({icon:{marginRight:"8px",verticalAlign:"middle",width:"12px",height:"12px"},content:{color:e.palette.primary.main,cursor:"pointer",lineHeight:"16px",whiteSpace:"break-spaces"}}))),Kj=lr({tooltip:{backgroundColor:"white",boxShadow:"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)",padding:0,borderRadius:"4px",maxWidth:"none"},arrow:{"&::before":{backgroundColor:"white"}}}),Gj=({value:e,attributeType:t,children:n,className:o})=>{const i=Kj(),l=$j(),u=(0,r.useContext)(Lj)||[],c=z("openPivotingPerspective"),d=L()||{},p=(0,s.isNested)(t)?Fj(t,e.value,u,d):Bj(e.lookupCode||e.value,t),m=u.some((({uri:e})=>e===t.uri))&&(Array.isArray(p)&&p.length||!Array.isArray(p)&&!(0,f.isNil)(p)),h=u.find((({uri:e})=>e===t.uri)),g=null==h?void 0:h.popup,v=m?Array.isArray(p)?p.map((e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[(0,s.getLastUriPart)(e),t]))))):((e,t)=>[{[e.name]:t}])(t,p):void 0,y=()=>{c({value:v,attributeType:t})},{entities:b,total:x,loadPivotingData:w}=(({value:e,attributeType:t,entityType:n})=>{const[a,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(0),u=gp(),c=M(),d=H(),p=n||(null==c?void 0:c.type),f=(0,r.useMemo)((()=>(0,s.convertPivotingValueToSearchFilters)({value:e,attributeType:t,entityType:p})),[t,p,e]),m=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){jj(e,t,n[t])}))}return e}({max:6,sort:"label"},d||{})),[d]),h=(0,r.useCallback)((()=>{u(Promise.all([(0,s.getFilteredEntities)({filters:f,options:m}),(0,s.getTotals)({filters:f,options:m})])).then((e=>{const[t,{total:n}]=e;o(Array.isArray(t)?t:[]),l(n)})).catch((e=>{console.warn("Can't load entities or total for pivoting data",e),o([]),l(0)}))}),[f,m,u]);return{entities:a,total:i,loadPivotingData:h}})({attributeType:t,value:p,entityType:null==g?void 0:g.entityType});return m?a().createElement(yd(),{arrow:!0,placement:"right-start",classes:i,disableInteractive:!1,onOpen:w,title:a().createElement(qj,{generatedValue:v,attributeType:t,label:null==g?void 0:g.label,onSeeAllClick:y,entities:b,total:x})},a().createElement("span",{className:o},a().createElement(zj,{className:l.icon}),a().createElement(Zj,{onClick:y,className:l.content,value:v,attributeType:t},n))):a().createElement(a().Fragment,null,n)};var Yj=n(8577),Xj=n.n(Yj),Qj=n(6157),Jj=n.n(Qj);const eF=lr((e=>({icon:{color:e.palette.text.secondary,fontSize:18},switcherWrapper:{verticalAlign:"middle",marginLeft:8,width:"16px",height:"16px"}}))),tF=({className:e,isMasked:t,isUnmasking:n,onToggleMasking:r})=>{const o=eF(),i=t?c().text("Show"):c().text("Hide");return n?a().createElement(d_(),{size:16,className:p()(e,o.switcherWrapper)}):a().createElement(yd(),{key:String(t),title:i},a().createElement(np(),{"data-reltio-id":"masking-switcher","aria-label":i,onClick:r,className:p()(e,o.switcherWrapper)},t?a().createElement(Jj(),{className:o.icon}):a().createElement(Xj(),{className:o.icon})))};var nF=n(2526);Hd()(nF.Z,{insert:"head",singleton:!1});const rF=nF.Z.locals||{},aF=({className:e,attributeType:t=null,attributeValue:n,inlined:o,FallbackSlot:i})=>{const{isUnmaskingNeeded:l,isMasked:u,toggleMasking:c,attributeValue:d,isUnmasking:f}=(({attributeType:e,attributeValue:t,entity:n})=>{const a=N(),o=Ij((({unmaskAttributeValue:e})=>e)),i=Ij((({maskAttributeValue:e})=>e)),l=L(),u=W(),c=(0,r.useContext)(GE),d=(0,r.useContext)(_j),p=M(),f=n||c||p,m=(0,s.checkCanUnmaskAttribute)(e),h=(0,s.isRelationUri)(t.uri),g=(0,s.checkDataPermissionsToUnmask)(h?d:f),{attributeValue:v,isUnmasked:y=!1,loading:b=!1}=(x=t.uri,Ij((({unmaskedAttributes:e})=>e[x]))||{});var x;const w=o&&i&&!!e.masking&&a&&m&&g&&u,E=(0,r.useCallback)((async()=>{if(!w)return Promise.resolve();await o(t.uri),(async({attributeValue:e,entity:t,metadata:n})=>{try{const r=(0,s.isRelationUri)(e.uri),a=r?e.type:(0,s.getAttributeTypeUriByValueUri)(e.uri,t.type),o=(0,s.getBaseUri)(a),i=(0,s.getAttributeTypesHierarchyByUri)(n,a,o).map((e=>e.label)).join(" / "),l=`${t.label}:${r?" Relationship":""} ${i} - ${e.value}`;await(0,s.createActivity)({label:s.ACTIVITY_TYPES.attributeUnmasked,description:JSON.stringify({uri:t.uri,label:l}),items:[{objectUri:t.uri}]})}catch(e){console.warn(e)}})({attributeValue:t,entity:f,metadata:l})}),[o,t,f,l,w]),C=(0,r.useCallback)((()=>{y?i(t.uri):E()}),[t.uri,y,i,E]);return{isUnmaskingNeeded:w,isMasked:!y,toggleMasking:C,isUnmasking:b,unmask:E,attributeValue:w&&y&&v||t}})({attributeType:t,attributeValue:n}),m=YL({"--history-insert-color":s.historyPalettes[s.HistoryOperations.insertAttribute].color,"--history-update-backgroundColor":s.historyPalettes[s.HistoryOperations.updateAttribute].backgroundColor,"--history-update-color":s.historyPalettes[s.HistoryOperations.updateAttribute].color,"--history-delete-backgroundColor":s.historyPalettes[s.HistoryOperations.deleteAttribute].backgroundColor,"--history-delete-color":s.historyPalettes[s.HistoryOperations.deleteAttribute].color}),{highlightedValuesUris:h=[],highlightedClassName:g}=(0,r.useContext)(Rj),{appearance:v}=(0,r.useContext)(Nj),y=(0,s.getHistoryAppearanceByUri)(d.uri,v),b=(0,s.getHistoryAttributeClassName)(y),x=(0,r.useMemo)((()=>a().createElement(KE,{value:(0,s.getAttributeValue)(d),dataTypeDefinition:(0,s.getAttrDataTypeDefinition)(t)})),[d,t]),w=(0,s.getObjectTypeByAttributeUri)(d.uri),E=l&&a().createElement(tF,{isMasked:u,onToggleMasking:c,isUnmasking:f});return o||b?a().createElement("div",{style:m,className:p()(e,{[g]:h.includes(d.uri)})},a().createElement(Gj,{value:d,attributeType:t,key:d.uri,className:p()({[rF.multilineAttribute]:!o})},a().createElement("span",{className:p()(rF.attributeValue,rF[b],{[rF.ovFalse]:!(0,s.isOv)(d)}),"data-reltio-id":"reltio-attribute-value"},x,E,i&&(null==d?void 0:d.ovDetails)&&a().createElement(i,{ovDetails:d.ovDetails})))):a().createElement("div",{"data-reltio-id":"comments-container-visibility-area",style:m,className:p()(e,rF.root,yh,{[g]:h.includes(d.uri)})},a().createElement(Gj,{value:d,attributeType:t,key:d.uri},a().createElement("span",{className:p()(rF.attributeValue,{[rF.ovFalse]:!(0,s.isOv)(d)}),"data-reltio-id":"reltio-attribute-value"},x,E,i&&(null==d?void 0:d.ovDetails)&&a().createElement(i,{ovDetails:d.ovDetails}))),a().createElement(xh,{className:rF.commentsContainer,uri:d.uri,relatedObjectUris:(0,s.createRelatedObjectUris)(w,{uri:d.uri}),objectType:w}))},oF=[s.EntityAttrTypes.roles.uri,s.EntityAttrTypes.tags.uri],iF=(0,r.createContext)({}),lF=({attrTypes:e=[],entity:t,parentUri:n,drawLines:o,children:i,className:l,max:u,fixedTypeUris:c=oF,showNonOv:d,classes:p,FallbackSlot:m})=>{const h=(0,r.useContext)(iF),g=(0,r.useContext)(tN),v=n&&(0,s.getBaseUri)(n),y=(0,r.useMemo)((()=>h[v]||[]),[h,v]),b=(0,r.useMemo)((()=>(e||[]).filter((e=>!y.includes(e.uri)))),[e,y]),[x,w]=(0,r.useState)(u||1/0),E=(0,r.useMemo)((()=>(0,s.getAttributesListForReadMode)(b,t,d,g)),[b,t,d,g]),[C,S]=(0,r.useMemo)((()=>LI(c,E)),[E,c]),O=S.slice(0,x),k=u&&O.length<S.length,A=u&&O.length>=S.length&&u<O.length,P={enabled:o};return a().createElement("div",{className:l},i&&a().createElement(RE,P,i),O.concat(C).map((({attrType:e,values:r})=>a().createElement(bB,{key:e.uri,attributeType:e,drawLines:o,values:r,paging:(0,f.path)(["paging",e.uri],t.attributes),parentUri:n,showNonOv:d,classes:p,FallbackSlot:m}))),k&&a().createElement(iC,{onClick:()=>{w(1/0)}}),A&&a().createElement(nC,{onClick:()=>{w(u)}}))};lF.displayName="ReadOnlyAttributesList";const sF=(0,r.memo)(lF),uF=l(null);function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cF.apply(null,arguments)}const dF=e=>a().createElement("svg",cF({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgVerificationInvalidIcon"},e),a().createElement("path",{d:"M6.66667 0C2.98 0 0 2.98 0 6.66667C0 10.3533 2.98 13.3333 6.66667 13.3333C10.3533 13.3333 13.3333 10.3533 13.3333 6.66667C13.3333 2.98 10.3533 0 6.66667 0ZM10 9.06L9.06 10L6.66667 7.60667L4.27333 10L3.33333 9.06L5.72667 6.66667L3.33333 4.27333L4.27333 3.33333L6.66667 5.72667L9.06 3.33333L10 4.27333L7.60667 6.66667L10 9.06Z",fill:"#EB5757"}));function pF(){return pF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pF.apply(null,arguments)}const fF=e=>a().createElement("svg",pF({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgVerificationValidIcon"},e),a().createElement("path",{d:"M6.66667 0C2.98667 0 0 2.98667 0 6.66667C0 10.3467 2.98667 13.3333 6.66667 13.3333C10.3467 13.3333 13.3333 10.3467 13.3333 6.66667C13.3333 2.98667 10.3467 0 6.66667 0ZM5.33333 10L2 6.66667L2.94 5.72667L5.33333 8.11333L10.3933 3.05333L11.3333 4L5.33333 10Z",fill:"#27AE60"}));function mF(){return mF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mF.apply(null,arguments)}const hF=e=>a().createElement("svg",mF({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-reltio-id":"SvgVerificationOutdatedIcon"},e),a().createElement("path",{d:"M6.66667 0C2.98667 0 0 2.98667 0 6.66667C0 10.3467 2.98667 13.3333 6.66667 13.3333C10.3467 13.3333 13.3333 10.3467 13.3333 6.66667C13.3333 2.98667 10.3467 0 6.66667 0ZM7.33333 10H6V8.66667H7.33333V10ZM7.33333 7.33333H6V3.33333H7.33333V7.33333Z",fill:"#F2C94C"}));function gF(){return gF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gF.apply(null,arguments)}const vF=e=>a().createElement("svg",gF({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","data-reltio-id":"SvgMaybeIcon"},e),a().createElement("path",{d:"M6.66667 0C2.98667 0 0 2.98667 0 6.66667C0 10.3467 2.98667 13.3333 6.66667 13.3333C10.3467 13.3333 13.3333 10.3467 13.3333 6.66667C13.3333 2.98667 10.3467 0 6.66667 0ZM7.33333 11.3333H6V10H7.33333V11.3333ZM8.71333 6.16667L8.11333 6.78C7.63333 7.26667 7.33333 7.66667 7.33333 8.66667H6V8.33333C6 7.6 6.3 6.93333 6.78 6.44667L7.60667 5.60667C7.85333 5.36667 8 5.03333 8 4.66667C8 3.93333 7.4 3.33333 6.66667 3.33333C5.93333 3.33333 5.33333 3.93333 5.33333 4.66667H4C4 3.19333 5.19333 2 6.66667 2C8.14 2 9.33333 3.19333 9.33333 4.66667C9.33333 5.25333 9.09333 5.78667 8.71333 6.16667Z",fill:"#F9A825"}));let yF=function(e){return e.VALID="valid",e.INVALID="invalid",e.OUTDATED="outdated",e.MAYBE="maybe",e.ACCEPT_ALL="accept_all",e}({});var bF=n(8587);Hd()(bF.Z,{insert:"head",singleton:!1});const xF=bF.Z.locals||{},wF=({attributeType:e,attributeValue:t})=>{const n=v(uF,(e=>e.getVerificationStatus)),o=(0,r.useMemo)((()=>n(e,t)),[n,e,t]);if((0,f.isNil)(o))return null;const i=(e=>{switch(e){case yF.VALID:return fF;case yF.INVALID:return dF;case yF.OUTDATED:return hF;case yF.MAYBE:case yF.ACCEPT_ALL:return vF;default:return dw}})(o.status),l=(({status:e,lastVerifiedTime:t,verificationType:n})=>{const r=n===s.InputVerificationAttribute.Email?c().text("email"):c().text("phone number"),a=c().date(t,"L LTS");switch(e){case yF.VALID:return c().text("The ${attributeLabel} is valid. Last verified on ${date}",{attributeLabel:r,date:a});case yF.INVALID:return c().text("The ${attributeLabel} is invalid. Last verified on ${date}",{attributeLabel:r,date:a});case yF.OUTDATED:return c().text("The verification for this has expired. It was valid when last verified on ${date}",{date:a});case yF.MAYBE:return c().text("The ${attributeLabel} may be invalid. Last verified on ${date}",{attributeLabel:r,date:a});case yF.ACCEPT_ALL:return c().text("The ${attributeLabel} may be valid. Last verified on ${date}",{attributeLabel:r,date:a});default:return null}})(o);return a().createElement("div",{className:p()(xF.status,xF[o.status]),"data-reltio-id":`attribute-verification-status-${o.status}`},a().createElement(yd(),{title:l,placement:"bottom"},a().createElement("span",{className:xF.icon},a().createElement(i,null))))},EF=(0,r.createContext)(null);var CF=n(667);Hd()(CF.Z,{insert:"head",singleton:!1});const SF=CF.Z.locals||{};function OF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kF=({attributeTypesList:e,attributeValue:t,label:n,expanded:o=!1,children:i,showNonOv:l,attributeType:u,classes:c,LabelRenderer:d,RightSlot:m,FallbackSlot:h})=>{const g=t.uri,[y,b]=(0,r.useState)(!1),{highlightedValuesUris:x=[],highlightedClassName:w}=(0,r.useContext)(Rj),E=(0,r.useContext)(EF);(0,r.useEffect)((()=>{E||b(o)}),[o,E]);const C=(e||[]).some((e=>(0,s.isAnalyticAttribute)(e))),S=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){OF(e,t,n[t])}))}return e}({attributes:C?null:t.value,analyticsAttributes:C?t.value:null},(0,s.isSpecialAttribute)(u)?t.value:{})),[t,C,u]),O=v(uF,(e=>(null==e?void 0:e.isVerificationAttribute)||f.F)),k=(0,s.getObjectTypeByAttributeUri)(g),A=O(u),P=E?E.isExpanded(g):y,T=(0,r.useCallback)((()=>{E?E.toggle(g):b((e=>!e))}),[E,g]);return a().createElement("div",{className:SF.complexContainer},a().createElement("div",{className:p()(SF.labelContainer,yh)},a().createElement(pN,{onClick:T,expanded:P}),d?a().createElement(d,{attributeType:u,attributeValue:t}):a().createElement(a().Fragment,null,a().createElement(gd(),{component:"span",variant:"body2",classes:{body2:SF.label},className:p()({[w]:x.includes(g),[SF.ovFalse]:!(0,s.isOv)(t)}),"data-reltio-id":"reltio-attribute-complex-label"},n,A&&a().createElement(wF,{attributeType:u,attributeValue:t}),h&&(null==t?void 0:t.ovDetails)&&a().createElement(h,{ovDetails:t.ovDetails})),a().createElement("div",{className:SF.spacer}),m&&a().createElement(m,{attributeType:u,attributeValue:t}),a().createElement(xh,{uri:g,relatedObjectUris:(0,s.createRelatedObjectUris)(k,{uri:g}),objectType:k}))),P&&a().createElement(sF,{attrTypes:e,entity:S,drawLines:!0,parentUri:g,showNonOv:l,classes:c,FallbackSlot:h},i))};function AF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){PF(e,t,n[t])}))}return e}function PF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const TF=lr({label:{textDecoration:"none",verticalAlign:"middle"},updateAttribute:AF({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},s.historyPalettes[s.HistoryOperations.updateAttribute]),insertAttribute:AF({width:"fit-content"},s.historyPalettes[s.HistoryOperations.insertAttribute]),deleteAttribute:AF({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},s.historyPalettes[s.HistoryOperations.deleteAttribute]),pivotingTooltip:{marginLeft:"4px"}});function DF(){return DF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DF.apply(null,arguments)}const MF=e=>{let{attributeValue:t,attributeType:n}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["attributeValue","attributeType"]);const i=TF(),{appearance:l}=(0,r.useContext)(Nj),u=(0,r.useMemo)((()=>{const e=(0,s.getHistoryAppearanceByUri)(t.uri,l),r=(0,s.getHistoryAttributeClassName)(e),o=t.label?t.label:(0,s.evaluateDeepEntityLabel)(t,n.dataLabelPattern);return a().createElement(Gj,{className:i.pivotingTooltip,value:t,attributeType:n},a().createElement(Zp(),{component:"span",className:p()(i[r],i.label)},a().createElement($E,{text:(0,s.getLabel)(o)})))}),[l,i,t,n]);return a().createElement(kF,DF({label:u,attributeValue:t,attributeTypesList:(0,s.getAttributeTypeSubAttributes)({},n),attributeType:n},o))},_F=(0,r.memo)(MF);function IF(){return IF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IF.apply(this,arguments)}var NF,RF,LF;function jF(e,t){if(!1===e||null==e)throw new Error(t)}function FF(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function VF(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(RF=NF||(NF={})).Pop="POP",RF.Push="PUSH",RF.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(LF||(LF={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const BF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,HF=e=>BF.test(e);function zF(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function UF(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function ZF(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function WF(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=VF(e):(a=IF({},e),jF(!a.pathname||!a.pathname.includes("?"),UF("?","pathname","search",a)),jF(!a.pathname||!a.pathname.includes("#"),UF("#","pathname","hash",a)),jF(!a.search||!a.search.includes("#"),UF("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?VF(e):e;if(r)if(HF(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),function(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?zF(r.substring(1),"/"):zF(r,t)}else n=t;return{pathname:n,search:$F(a),hash:KF(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}const qF=e=>e.join("/").replace(/\/\/+/g,"/"),$F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",KF=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const GF=["post","put","patch","delete"],YF=(new Set(GF),["get",...GF]);function XF(){return XF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XF.apply(this,arguments)}new Set(YF),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const QF=r.createContext(null),JF=r.createContext(null),eV=r.createContext(null),tV=r.createContext({outlet:null,matches:[],isDataRoute:!1});function nV(){return null!=r.useContext(eV)}function rV(){return nV()||jF(!1),r.useContext(eV).location}function aV(e){r.useContext(JF).static||r.useLayoutEffect(e)}function oV(){let{isDataRoute:e}=r.useContext(tV);return e?function(){let{router:e}=function(){let e=r.useContext(QF);return e||jF(!1),e}(lV.UseNavigateStable),t=function(){let e=function(){let e=r.useContext(tV);return e||jF(!1),e}(),t=e.matches[e.matches.length-1];return t.route.id||jF(!1),t.route.id}(sV.UseNavigateStable),n=r.useRef(!1);aV((()=>{n.current=!0}));let a=r.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,XF({fromRouteId:t},a)))}),[e,t]);return a}():function(){nV()||jF(!1);let e=r.useContext(QF),{basename:t,future:n,navigator:a}=r.useContext(JF),{matches:o}=r.useContext(tV),{pathname:i}=rV(),l=JSON.stringify(ZF(o,n.v7_relativeSplatPath)),s=r.useRef(!1);aV((()=>{s.current=!0}));let u=r.useCallback((function(n,r){if(void 0===r&&(r={}),!s.current)return;if("number"==typeof n)return void a.go(n);let o=WF(n,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:qF([t,o.pathname])),(r.replace?a.replace:a.push)(o,r.state,r)}),[t,a,l,i,e]);return u}()}function iV(e,t){let{relative:n}=void 0===t?{}:t,{future:a}=r.useContext(JF),{matches:o}=r.useContext(tV),{pathname:i}=rV(),l=JSON.stringify(ZF(o,a.v7_relativeSplatPath));return r.useMemo((()=>WF(e,JSON.parse(l),i,"path"===n)),[e,l,i,n])}r.Component;var lV=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(lV||{}),sV=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(sV||{});function uV(){return uV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uV.apply(this,arguments)}r.startTransition,new Promise((()=>{})),r.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const cV=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(qa){}new Map,r.startTransition,Ql.flushSync,r.useId;const dV="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,pV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fV=r.forwardRef((function(e,t){let n,{onClick:a,relative:o,reloadDocument:i,replace:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:p}=e,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,cV),{basename:m}=r.useContext(JF),h=!1;if("string"==typeof c&&pV.test(c)&&(n=c,dV))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(t.pathname,m);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:h=!0}catch(e){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;nV()||jF(!1);let{basename:a,navigator:o}=r.useContext(JF),{hash:i,pathname:l,search:s}=iV(e,{relative:n}),u=l;return"/"!==a&&(u="/"===l?a:qF([a,l])),o.createHref({pathname:u,search:s,hash:i})}(c,{relative:o}),v=function(e,t){let{target:n,replace:a,state:o,preventScrollReset:i,relative:l,viewTransition:s}=void 0===t?{}:t,u=oV(),c=rV(),d=iV(e,{relative:l});return r.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==a?a:FF(c)===FF(d);u(e,{replace:n,state:o,preventScrollReset:i,relative:l,viewTransition:s})}}),[c,u,d,a,o,n,e,i,l,s])}(c,{replace:l,state:s,target:u,preventScrollReset:d,relative:o,viewTransition:p});return r.createElement("a",uV({},f,{href:n||g,onClick:h||i?a:function(e){a&&a(e),e.defaultPrevented||v(e)},ref:t,target:u}))}));var mV,hV;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(mV||(mV={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(hV||(hV={}));const gV=lr((e=>({link:{color:e.palette.primary.main,textDecoration:"none"}})));function vV(){return vV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vV.apply(null,arguments)}const yV=e=>{const t=gV(),n=nV(),{href:r,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["href","className"]),l=p()(t.link,o);return n&&r?a().createElement(fV,vV({to:r.replace(window.location.origin,""),className:l},i)):a().createElement("a",vV({href:r,className:l},i))};function bV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){xV(e,t,n[t])}))}return e}function xV(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wV=lr((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary},updateAttribute:bV({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},s.historyPalettes[s.HistoryOperations.updateAttribute]),insertAttribute:bV({width:"fit-content"},s.historyPalettes[s.HistoryOperations.insertAttribute]),deleteAttribute:bV({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},s.historyPalettes[s.HistoryOperations.deleteAttribute]),ovFalse:e.inactive})));function EV(){return EV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EV.apply(null,arguments)}const CV=(0,r.memo)((e=>{let{attributeValue:t,attributeType:n}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["attributeValue","attributeType"]);const i=wV(),l=L(),u=P(),c=(0,s.getReferencedEntityUriFromAttrValue)(t),d=(0,r.useMemo)((()=>(0,s.getAttributeTypeSubAttributes)(l,n)),[n,l]),{appearance:f}=(0,r.useContext)(Nj),{generateEntityUrl:m}=(0,r.useContext)(Pf),h=(0,r.useMemo)((()=>{const e=(0,s.getHistoryAppearanceByUri)(t.uri,f),n=(0,s.getHistoryAttributeClassName)(e),r=null!=c&&c.startsWith("changeRequests")?"dcrReview":"profile";return a().createElement(yV,{href:(0,s.isEmptyValue)(f)?m({uiPath:u,uri:c,screen:r}):void 0,className:p()(i[n],{[i.ovFalse]:!(0,s.isOv)(t)})},a().createElement($E,{text:(0,s.getLabel)(t.label)}),t.relationshipLabel&&a().createElement("span",{className:i.relationshipLabel},a().createElement($E,{text:t.relationshipLabel})))}),[t,f,u,c,i,m]);return a().createElement(kF,EV({attributeTypesList:d,attributeValue:t,label:h,attributeType:n},o))}));CV.displayName="ReferenceAttribute";class SV{static build(e,t={}){switch(e.type){case s.DataTypes.TYPE_NESTED:return a().createElement(_F,t);case s.DataTypes.TYPE_REFERENCE:return a().createElement(CV,t);default:return a().createElement(aF,t)}}}const OV=e=>{const{attributeType:t}=e;return SV.build(t,e)},kV=(0,r.createContext)(null),AV=({uri:e,children:t})=>{const n=(0,r.useContext)(kV),o=null==n?void 0:n.reportHeight,i=(0,r.useRef)(null),l=(0,r.useRef)(),s=(0,r.useCallback)((()=>{var t;if(!o)return;const n=null===(t=i.current)||void 0===t?void 0:t.clientHeight;void 0!==n&&n!==l.current&&(l.current=n,o(e,n))}),[o,e]);return(0,r.useLayoutEffect)((()=>{s()}),[s]),n?a().createElement("div",{ref:i},a().createElement(Dd,{handleHeight:!0,targetRef:i,onResize:s}),t):a().createElement(a().Fragment,null,t)};function PV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){TV(e,t,n[t])}))}return e}function TV(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const DV="13px",MV="16px",_V={titleRow:{display:"inline-block",minHeight:"16px"},title:{wordBreak:"break-all",verticalAlign:"middle"},ovIcon:{marginLeft:"8px",textIndent:0},descriptionIcon:{textIndent:0}},IV=lr({paddingWrapper:{paddingTop:"3px",paddingBottom:"5px","&:last-child":{paddingBottom:"2px"}},paddingWrapperWithLines:{paddingBottom:"1px","&:last-child":{paddingBottom:"2px"}}}),NV=lr(PV({wrapper:{fontSize:DV,lineHeight:MV},collaborationWrapper:{display:"flex",alignItems:"start",minHeight:"18px",justifyContent:"space-between"},attribute:{marginLeft:"8px",paddingLeft:"4px",paddingRight:"4px",display:"inline",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},titleIcon:{width:"16px",height:"16px",marginRight:"8px",marginLeft:"1px",color:"rgba(0, 0, 0, 0.38)",verticalAlign:"middle"}},_V)),RV=lr(PV({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",fontSize:DV,lineHeight:MV},attribute:{"&:last-child":{marginBottom:0},paddingLeft:"4px",paddingRight:"4px",marginLeft:"5px",marginBottom:"4px",whiteSpace:"pre-wrap",wordBreak:"break-word"},attributes:{alignSelf:"stretch"},titleRow:PV({},_V.titleRow,{marginBottom:"3px"})},_V)),LV=lr(PV({wrapper:{fontSize:DV,lineHeight:MV}},_V)),jV=({value:e,nonVisibleValues:t,attributeType:n,showNonOv:o,totalNonVisibleValues:i,classes:l,FallbackSlot:u})=>{const c=NV(),{label:d,description:f}=n,m=Z(),h=(0,r.useMemo)((()=>m.includes(n.uri)),[m,n.uri]),g=(0,s.getObjectTypeByAttributeUri)(e.uri);return a().createElement(AV,{uri:e.uri},a().createElement("div",{"data-reltio-id":"one-line-renderer",className:p()(c.collaborationWrapper,yh)},a().createElement("div",{className:p()(c.titleRow,c.wrapper)},a().createElement(zE,{label:d,className:p()(c.title,null==l?void 0:l.title),"data-reltio-id":"reltio-attribute-label"}),a().createElement(VN,{description:f,className:c.descriptionIcon}),h&&a().createElement(qN,null),a().createElement(QE,{nonOvValues:t,attributeType:n,className:c.ovIcon,nonOvTotal:i}),a().createElement(OV,{className:p()(c.attribute,null==l?void 0:l.content),attributeValue:e,attributeType:n,showNonOv:o,inlined:!0,classes:l,FallbackSlot:u})),a().createElement(xh,{uri:e.uri,relatedObjectUris:(0,s.createRelatedObjectUris)(g,{uri:e.uri}),objectType:g})))};var FV=n(7433),VV=n.n(FV),BV=n(1189);Hd()(BV.Z,{insert:"head",singleton:!1});const HV=BV.Z.locals||{},zV=ep(br());let UV=function(e){return e.SMALL="small",e.MEDIUM="medium",e}({});const ZV=({attributeType:e,size:t=UV.SMALL,className:n})=>{const[o,i]=(0,r.useState)(!1),l=_(),u=z("updateEntityAttributeValues"),d=v(uF,(e=>e.getVerificationType)),m=v(uF,(e=>e.getAllVerificationTypes())),h=e?d(e):null,g=v(uF,(e=>e.verificationAttributeTypeUris)),y=(0,r.useMemo)((()=>(0,f.isNil)(e)?{}:{clientFilter:h===s.InputVerificationAttribute.Email?s.VerifyAttributesClientFilter.EmailVerifier:s.VerifyAttributesClientFilter.PhoneVerifier}),[e,h]),b=gp(),x=(0,r.useCallback)((async()=>{const t=e?[e.uri]:g;i(!0);try{const e=await b((0,s.verifyAttributes)({entityUri:l,options:y}));e&&u({updatedEntity:e,attributeTypeUris:t})}catch(e){(e=>{pr(e,{defaultMessage:c().text("Something went wrong")})})(e)}finally{i(!1)}}),[b,l,y,e,u,g]),w=(E=(0,r.useMemo)((()=>h?[h]:m),[h,m])).includes(s.InputVerificationAttribute.Email)&&E.includes(s.InputVerificationAttribute.Phone)?c().text("Verify all email and phone numbers"):E.includes(s.InputVerificationAttribute.Email)?c().text("Verify all emails"):E.includes(s.InputVerificationAttribute.Phone)?c().text("Verify all phone numbers"):null;var E;const C=e?c().text("Verify"):c().text("Verify contact details"),S=o?a().createElement(d_(),{size:t===UV.SMALL?18:20}):a().createElement(VV(),null),O=w||C;return a().createElement("div",{className:HV.root},a().createElement(zV,{variant:"text",color:"primary",startIcon:S,onClick:x,disabled:o,className:p()(HV.button,n),classes:{startIcon:HV.startIcon},size:t===UV.SMALL?"small":"medium",tooltipTitle:O,tooltipPlacement:"bottom"},C))},WV=({max:e,values:t,nonVisibleValues:n,totalVisibleValues:o,attributeType:i,parentUri:l,requestNextPageOfAttributeValues:u,showNonOv:c,totalNonVisibleValues:d,classes:m,FallbackSlot:h})=>{const g=RV(),[y,b]=(0,r.useState)(e),x=v(uF,(e=>(null==e?void 0:e.isVerificationAttribute)||f.F)),w=Z(),E=(0,r.useMemo)((()=>w.includes(i.uri)),[w,i.uri]),C=e<o,S=C&&y<o,O=C&&y>=o,{label:k,description:A}=i,P=L(),T=(0,r.useMemo)((()=>(0,s.checkHasMasking)(P,i)),[P,i]),D=W(),M=t.slice(0,y),_=o-y,I=x(i),N=l?`${l}/${i.uri}`:i.uri;return a().createElement(AV,{uri:N},a().createElement("div",{"data-reltio-id":"multi-line-renderer",className:g.wrapper},a().createElement("div",{className:g.titleRow},a().createElement(zE,{label:k,className:p()(g.title,null==m?void 0:m.title),"data-reltio-id":"reltio-attribute-label"}),a().createElement(VN,{description:A}),E&&a().createElement(qN,null),a().createElement(QE,{nonOvValues:n,attributeType:i,className:g.ovIcon,nonOvTotal:d}),I&&a().createElement(ZV,{attributeType:i})),a().createElement("div",{className:g.attributes},M.map((e=>a().createElement(AV,{key:e.uri,uri:e.uri},a().createElement(OV,{className:p()(g.attribute,null==m?void 0:m.content),attributeValue:e,attributeType:i,showNonOv:c,classes:m,FallbackSlot:h}))))),S&&a().createElement(iC,{moreNumber:(0,f.min)(e,_),valueNumber:_,onClick:()=>{t.length<o&&u({parentUri:l,attributeTypeUri:i.uri,attributeTypeName:i.name,values:t,defaultMaxValues:e,options:{sendMasking:D&&T,ovOnly:!c}}),b(y+e)}}),O&&a().createElement(nC,{onClick:()=>{b(e)}})))};var qV=n(8941),$V=n.n(qV);function KV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){GV(e,t,n[t])}))}return e}function GV(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const YV=lr({attributeValue:{verticalAlign:"middle"},insertAttribute:KV({width:"fit-content"},s.historyPalettes[s.HistoryOperations.insertAttribute]),deleteAttribute:KV({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},s.historyPalettes[s.HistoryOperations.deleteAttribute])}),XV=({value:e})=>{const t=YV(),{appearance:n}=(0,r.useContext)(Nj),o=L(),i=(0,s.getHistoryAppearanceBySpecialAttributeValue)("roles",e,n),l=(0,s.getHistoryAttributeClassName)(i);return a().createElement("span",{className:p()(t.attributeValue,t[l])},(0,s.getRoleLabel)(o,e))},QV=({className:e,values:t,Component:n,dataReltioId:o})=>a().createElement("div",{className:e,"data-reltio-id":o},t.map(((e,o)=>a().createElement(r.Fragment,{key:e},a().createElement(n,{value:e}),o<t.length-1&&", ")))),JV=({className:e,values:t})=>a().createElement(QV,{values:t,className:e,dataReltioId:"reltio-attribute-value",Component:XV});function eB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){tB(e,t,n[t])}))}return e}function tB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nB=lr({attributeValue:{verticalAlign:"middle"},insertAttribute:eB({width:"fit-content"},s.historyPalettes[s.HistoryOperations.insertAttribute]),deleteAttribute:eB({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},s.historyPalettes[s.HistoryOperations.deleteAttribute])}),rB=({value:e})=>{const t=nB(),n=(0,r.useContext)(GE),{appearance:o}=(0,r.useContext)(Nj),{generateTagUrl:i}=(0,r.useContext)(Pf),l=M(),u=P(),c=(0,s.getHistoryAppearanceBySpecialAttributeValue)("tags",e,o),d=(0,s.getHistoryAttributeClassName)(c),f=n||l;return a().createElement(yV,{className:p()(t.attributeValue,t[d]),href:i({uiPath:u,tag:e,entityUri:f.dataTenant?(0,s.getDataTenantEntityUri)(f):f.uri})},e)},aB=({className:e,values:t})=>a().createElement(QV,{values:t,className:e,dataReltioId:"reltio-attribute-value",Component:rB}),oB=({values:e,attributeType:t,classes:n})=>{const r=NV(),{label:o}=t;return a().createElement("div",{"data-reltio-id":"special-renderer",className:p()(r.titleRow,r.wrapper)},(i=r.titleIcon,t.uri===s.EntityAttrTypes.tags.uri?a().createElement($V(),{className:i}):null),a().createElement(zE,{label:o,className:p()(r.title,null==n?void 0:n.title),"data-reltio-id":"reltio-attribute-label"}),(r=>{switch(t.uri){case s.EntityAttrTypes.tags.uri:return a().createElement(aB,{className:r,values:e});case s.EntityAttrTypes.roles.uri:return a().createElement(JV,{className:r,values:e});default:return a().createElement(OV,{className:r,attributeValue:{value:e[0],uri:""},attributeType:t,inlined:!0,classes:n})}})(p()(r.attribute,null==n?void 0:n.content)));var i},iB="3px",lB=lr((e=>({image:({imageMargin:e,imageHeight:t,imageWidth:n})=>({marginRight:e,width:n,height:t,cursor:"pointer","&:last-child":{marginRight:0}}),deleteAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,background:`url('${(0,s.svg2Url)('<svg xmlns="http://www.w3.org/2000/svg" style="stroke: #D1051E; stroke-width: 1" viewBox="0 0 114 114">\n\t<line x1="5" y1="109" x2="109" y2="5" />\n</svg>')}') no-repeat`,backgroundColor:s.historyPalettes[s.HistoryOperations.deleteAttribute].backgroundColor,pointerEvents:"none"}},updateAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:s.historyPalettes[s.HistoryOperations.updateAttribute].backgroundColor,pointerEvents:"none"}},deleteAttribute:({imageWidth:e,imageHeight:t})=>({width:e,height:t,boxSizing:"border-box",outline:`${iB} solid ${s.historyPalettes[s.HistoryOperations.deleteAttribute].color}`,outlineOffset:`-${iB}`}),insertAttribute:({imageWidth:e,imageHeight:t})=>({width:e,height:t,boxSizing:"border-box",outline:`${iB} solid ${s.historyPalettes[s.HistoryOperations.insertAttribute].color}`,outlineOffset:`-${iB}`}),updateAttribute:({imageWidth:e,imageHeight:t})=>({width:e,height:t,boxSizing:"border-box",outline:`${iB} solid ${s.historyPalettes[s.HistoryOperations.updateAttribute].color}`,outlineOffset:`-${iB}`}),number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,padding:"36px 8px",textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}))),sB=({attributeType:e,attributeValues:t=[],paging:n,parentUri:o,requestNextPageOfAttributeValues:i,showNonOv:l,imageSize:u=lL})=>{const c=lB(u),{appearance:d}=(0,r.useContext)(Nj);return a().createElement(rH,{attributeValues:t,attributeType:e,renderImage:({onOpenImageGalleryDialog:e})=>t=>{const n=(0,s.getImageAttributeOvThumbnailUrl)(t),{uri:r}=t,o=(0,s.getHistoryAppearanceByUri)(r,d),i=(0,s.getHistoryAttributeClassName)(o);return a().createElement("div",{className:p()(c.image,{[c[i+"Image"]]:i}),key:r,"data-reltio-id":"reltio-attribute-value"},a().createElement(RR,{onClick:()=>e(r),className:c[i],src:n,size:{imageWidth:u.imageWidth,imageHeight:u.imageHeight}}))},imageSize:u,requestNextPageOfAttributeValues:i,paging:n,parentUri:o,showNonOv:l})},uB=({attributeType:e,attributeValues:t,paging:n,parentUri:r,showNonOv:o,requestNextPageOfAttributeValues:i})=>{const l=RV(),{label:s,description:u}=e;return a().createElement(a().Fragment,null,a().createElement("div",{className:l.titleRow},a().createElement(zE,{className:l.title,label:s,"data-reltio-id":"reltio-attribute-label"}),a().createElement(VN,{className:l.descriptionIcon,description:u})),a().createElement(sB,{attributeValues:t,attributeType:e,paging:n,parentUri:r,requestNextPageOfAttributeValues:i,showNonOv:o}))},cB=({attributeType:e,classes:t})=>{const n=LV(),{label:o,description:i}=e,l=Z(),s=(0,r.useMemo)((()=>l.includes(e.uri)),[l,e.uri]);return a().createElement("div",{"data-reltio-id":"reltio-empty-renderer",className:p()(n.titleRow,n.wrapper)},a().createElement(zE,{label:o,className:p()(n.title,null==t?void 0:t.title),"data-reltio-id":"reltio-attribute-label"}),s&&a().createElement(qN,null),a().createElement(VN,{description:i,className:n.descriptionIcon}))};function dB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){pB(e,t,n[t])}))}return e}function pB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fB="oneLine",mB="multiLine",hB="imageLine",gB="special",vB="empty",yB=({values:e,attributeType:t,drawLines:n,paging:o={},parentUri:i,max:l,showNonOv:u,classes:c,FallbackSlot:d})=>{var m;const h=IV(),g=z("requestNextPageOfAttributeValues"),v=D(),y=null!==(m=null!=l?l:v)&&void 0!==m?m:1/0,b=(0,f.partition)(s.isOv),x=(0,r.useContext)(tN),w=(0,r.useMemo)((()=>null==x?void 0:x.includes(t.uri)),[t.uri,x]);if(!e||!e.length&&!w)return null;const[E,C]=b(e),S=u?e:E,O=u?[]:C,k=u?"totalValues":"totalOvValues",A=(0,f.ifElse)((0,f.has)(k),(0,f.prop)(k),(0,f.always)(S.length))(o),P=null!=o&&o.totalValues?o.totalValues-A:O.length,T=1===A&&!(0,s.isComplexAttribute)(t),M=0===e.length&&w;return a().createElement(RE,{enabled:n,className:p()(dB({[h.paddingWrapperWithLines]:n},null!=c&&c.wrapperWithLines?{[null==c?void 0:c.wrapperWithLines]:n}:{}))},a().createElement("div",{className:p()(dB({[h.paddingWrapper]:!n},null!=c&&c.wrapper?{[null==c?void 0:c.wrapper]:!n}:{}))},(()=>{switch((0,f.cond)([[s.isSpecialAttribute,(0,f.always)(gB)],[s.isImage,(0,f.always)(hB)],[(0,f.always)(T),(0,f.always)(fB)],[(0,f.always)(M),(0,f.always)(vB)],[f.T,(0,f.always)(mB)]])(t)){case fB:return a().createElement(jV,{value:S[0],nonVisibleValues:O,totalNonVisibleValues:P,attributeType:t,showNonOv:u,classes:c,FallbackSlot:d});case mB:return a().createElement(WV,{values:S,nonVisibleValues:O,totalVisibleValues:A,totalNonVisibleValues:P,attributeType:t,parentUri:i,max:y,requestNextPageOfAttributeValues:g,showNonOv:u,classes:c,FallbackSlot:d});case hB:return a().createElement(uB,{attributeValues:S,attributeType:t,paging:o,parentUri:i,requestNextPageOfAttributeValues:g,showNonOv:u});case gB:return a().createElement(oB,{values:S,attributeType:t,classes:c});case vB:return a().createElement(cB,{attributeType:t,classes:c})}})()))},bB=(0,r.memo)(yB),xB=lr((e=>({root:{fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginBottom:"11px"},title:{color:"rgba(255,255,255,0.54)",marginRight:"12px",float:"left"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),wB=({title:e,content:t,isLink:n,children:r})=>{const o=xB();return a().createElement("div",{"data-reltio-id":"image-meta-info-item",className:o.root},a().createElement("span",{className:o.title},e),n?a().createElement("a",{className:o.link,href:t},c().text("link")):a().createElement("span",{className:o.content},t||r))},EB=lr({root:{padding:"10px 0"},title:{color:"rgba(255,255,255,0.54)",fontSize:"13px"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"}}),CB=({attributeValue:e,attributeType:t,imageAttributeFieldsOrder:n})=>{const o=EB(),i=N(),l=(s=e,u=n,Aj(Object.keys(Sj),u).map((e=>Oj(s,e)?{title:Sj[e],value:Oj(s,e),isLink:Tj(e)}:null)).filter(Boolean));var s,u;const c=Pj(e,t,n),d=(0,r.useMemo)((()=>({title:o.title,content:o.content})),[o]);return a().createElement(Zp(),{"data-reltio-id":"image-meta-info-list",className:o.root},l.map((({title:e,value:t,isLink:n})=>a().createElement(wB,{key:e,isLink:n,title:e,content:t}))),i&&c.map((({attrType:t,values:n})=>a().createElement(bB,{key:t.uri,attributeType:t,drawLines:!1,values:n,classes:d,parentUri:e.uri}))))},SB=lr({root:{},form:{padding:"10px 0"},divider:{width:"100%",height:"1px",borderColor:"rgba(255,255,255,0.12)"},actions:{display:"flex",justifyContent:"flex-end",marginTop:"4px"},cancelButton:{color:"white",marginRight:"8px"}}),OB=({attributeType:e,imageAttributeFieldsOrder:t,attributeValue:n,hasChanges:r,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:l,onCancel:u,onApply:d,mode:p})=>{const f=SB(),m=Pj(n,e,t),h=0!==m.length||0===m.length&&r;return a().createElement(Zp(),{className:f.root},a().createElement(Zp(),{className:f.form},m.map((({attrType:e,values:t})=>a().createElement(cH,{key:e.uri,parentUri:n.uri,attributeType:e,values:t,showEmptyEditors:(0,s.isTempUri)(n.uri),mode:p,drawLines:!1,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:l})))),h&&a().createElement(a().Fragment,null,a().createElement(TM(),{className:f.divider}),a().createElement(Zp(),{className:f.actions},a().createElement(br(),{disabled:!r,onClick:u,className:f.cancelButton},c().text("Cancel")),a().createElement(br(),{disabled:!r,onClick:d,color:"primary"},c().text("Apply")))))},kB=(0,_r.createTheme)(jd),AB=({imageAttributeFieldsOrder:e,attributeType:t,attributeValue:n})=>{const o=I(),i=k((e=>(0,s.isEditableMode)(e.mode))),{addAttributes:l,changeAttribute:u,deleteAttribute:c,clearLocalChanges:d,applyLocalChanges:p,attributeValue:m,hasChanges:h}=(({initialAttributeValue:e,attributeType:t})=>{const n=z("modifyAttribute"),[a,o]=(0,r.useState)(e);(0,r.useEffect)((()=>{o(e)}),[e]);const i=!(0,f.equals)(a,e),l=(0,r.useCallback)((e=>{o((t=>e.reduce(((e,t)=>{const{attributeType:n,parentUri:r,index:a}=t;return(0,s.addAttribute)({entity:e,attributeType:n,parentUri:r,index:a,nestingLevel:1})}),t)))}),[]),u=(0,r.useCallback)((({value:e,attributeType:t,uri:n})=>{o((r=>(0,s.editAttribute)({entity:r,attributeType:t,uri:n,value:e,nestingLevel:1})))}),[]),c=(0,r.useCallback)((({attributeType:e,uri:t})=>{o((n=>(0,s.removeAttribute)({entity:n,attributeType:e,uri:t,nestingLevel:1})))}),[]);return{addAttributes:l,changeAttribute:u,deleteAttribute:c,clearLocalChanges:(0,r.useCallback)((()=>{o(e)}),[e]),applyLocalChanges:(0,r.useCallback)((()=>{n({value:a,attributeType:t,uri:a.uri})}),[a,t,n]),attributeValue:a,hasChanges:i}})({attributeType:t,initialAttributeValue:n});return a().createElement(_r.ThemeProvider,{theme:kB},a().createElement(Zp(),{"data-mui-color-scheme":"dark"},a().createElement(Mj,{attributeType:t,uri:null==m?void 0:m.uri,onAddAttributes:i?l:void 0}),a().createElement(CB,{attributeType:t,attributeValue:m,imageAttributeFieldsOrder:e}),i&&a().createElement(OB,{mode:o,imageAttributeFieldsOrder:e,attributeType:t,attributeValue:m,hasChanges:h,onDeleteAttribute:c,onChangeAttribute:u,onAddAttributes:l,onCancel:d,onApply:p})))},PB=lr((e=>({root:{position:"relative",backgroundColor:"#333",maxHeight:"calc(100vh - 64px)",overflow:"hidden"},header:{display:"flex",alignItems:"center",height:"56px",paddingLeft:"16px",boxShadow:`0 1px 0 0 ${e.palette.divider}`},headerTitle:{color:"rgba(255, 255, 255, 0.87)",fontSize:"16px",lineHeight:"19px"},bodyWrapper:{maxHeight:"calc(100% - 56px)",overflow:"auto"},body:{padding:"16px"},formControlLabel:{marginLeft:0,marginBottom:"27px"},checkboxLabel:{marginLeft:"8px",color:"rgba(255,255,255,0.87)",fontSize:"13px",lineHeight:"15px"},checkbox:{color:"white",padding:0}}))),TB=({className:e,attributeValue:t,handleSetAsDefault:n,attributeType:o})=>{const i=PB(),[l,s]=(0,r.useState)(!1),u=M()||{},d=B(null==u?void 0:u.uri)||{},f=N(),m=k((e=>e.imageAttributesFieldsOrder))||{},h=f?u:d,g=m[null==u?void 0:u.type]||(null==m?void 0:m.default)||{};(0,r.useEffect)((()=>{s((null==h?void 0:h.defaultProfilePic)===(null==t?void 0:t.uri))}),[null==t?void 0:t.uri,h]);const v=(0,r.useCallback)((()=>{n(t.uri)}),[null==t?void 0:t.uri]);return a().createElement(Zp(),{className:p()(i.root,e)},a().createElement(Zp(),{className:i.header},a().createElement(gd(),{className:i.headerTitle},c().text("Details"))),a().createElement(Zp(),{className:i.bodyWrapper},a().createElement(Zp(),{className:i.body},a().createElement(fE(),{classes:{root:i.formControlLabel,label:i.checkboxLabel},control:a().createElement(pf(),{className:i.checkbox,checked:l,onChange:v}),label:c().text("Set as default")}),a().createElement(AB,{attributeType:o,imageAttributeFieldsOrder:g,attributeValue:t}))))},DB=lr((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),MB=({attributeValues:e=[],currentAttributeValueUri:t,setCurrentAttributeValueUri:n,handleSetAsDefault:o,attributeType:i})=>{const[l,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{u(t?e.findIndex((e=>e.uri===t)):0)}),[t,e]);const u=(0,r.useCallback)((t=>{var r;s(t),n(null===(r=e[t])||void 0===r?void 0:r.uri)}),[e]),c=DB();return a().createElement(Zp(),{className:c.root},a().createElement(gL,{attributeValueIndex:l,setAttributeValueIndex:u,attributeValues:e,className:c.main}),a().createElement(TB,{handleSetAsDefault:o,attributeValue:e[l],className:c.details,attributeType:i}))};let _B=function(e){return e.Gallery="gallery",e.Details="details",e}({});var IB=n(4886),NB=n.n(IB),RB=n(9178),LB=n.n(RB);function jB(){return jB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jB.apply(null,arguments)}const FB=e=>a().createElement("svg",jB({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-reltio-id":"SvgDetails"},e),a().createElement("defs",null,a().createElement("path",{d:"M14 5a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1h10zm6 12v2h-3v-2h3zm2-4v2h-5v-2h5zm0-4v2h-5V9h5zm0-4v2h-5V5h5z",id:"Details_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fillRule:"evenodd"},a().createElement("mask",{id:"Details_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Details_svg__a"})),a().createElement("path",{mask:"url(#Details_svg__b)",d:"M0 0h24v24H0z"})));var VB=n(6089),BB=n.n(VB);const HB=lr((e=>({root:{"& > *":{"&:not(:first-child)":{"&.MuiButtonGroup-grouped, & > .MuiButtonGroup-grouped":{borderTopLeftRadius:0,borderBottomLeftRadius:0,marginLeft:"-1px"}},"&:not(:last-child)":{"&.MuiButtonGroup-grouped, & > .MuiButtonGroup-grouped":{borderTopRightRadius:0,borderBottomRightRadius:0,borderRightColor:"transparent"}}}},button:{"&.MuiButtonGroup-grouped":{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",color:"rgba(0,0,0,0.87)",borderColor:"rgba(0,0,0,0.12)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:not(:last-of-type):hover":{borderRightColor:"transparent"},"&$current":{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,_r.alpha)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,_r.alpha)(e.palette.primary.main,.24),borderRightColor:"transparent"}}}},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px","& + $title":{marginLeft:"8px"}},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{}}))),zB=ep(br()),UB=({className:e,classes:t={},modes:n=[],modeId:r,onChange:o})=>{const i=HB();return a().createElement(BB(),{className:p()(i.root,e)},n.map((({id:e,title:n,tooltipTitle:l,Icon:s,disabled:u})=>{return a().createElement(zB,{disabled:u,showForDisabled:u&&!!l,key:String(e),className:p()(i.button,{[i.current]:r===e},t.button),tooltipTitle:l,onClick:(c=e,()=>o(c)),"data-reltio-id":`reltio-search-mode-${e}`},s&&a().createElement(s,{className:i.icon}),n&&a().createElement("div",{className:i.title},n));var c})))},ZB=lr((()=>({paper:{backgroundColor:"rgba(0, 0, 0, .85)"},backdrop:{backgroundColor:"transparent"},toolbar:{paddingLeft:"20px",paddingRight:"20px"},appBar:{position:"relative",background:"linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%)"},closeButton:{marginRight:"28px"},closeIcon:{fontSize:"24px",color:"#fff"},headerLeft:{display:"flex",alignItems:"center",flex:2},headerCenter:{display:"flex",justifyContent:"center",flex:1},headerRight:{flex:2,display:"flex",justifyContent:"flex-end",alignItems:"center"},modeSwitcher:{backgroundColor:"#fff"},content:{padding:0}}))),WB=({open:e,mode:t,children:n,header:o,onClose:i,onChangeMode:l})=>{const s=ZB(),u=(0,r.useMemo)((()=>[{id:_B.Gallery,title:c().text("Gallery"),Icon:LB()},{id:_B.Details,title:c().text("Details"),Icon:FB}]),[]);return a().createElement(fg(),{classes:{paper:s.paper},open:e,BackdropProps:{className:s.backdrop},fullScreen:!0},a().createElement(NB(),{classes:{colorPrimary:s.appBar}},a().createElement(jg(),{className:s.toolbar},a().createElement(Zp(),{className:s.headerLeft},a().createElement(up,{tooltipTitle:c().text("Close"),onClick:i,className:s.closeButton,iconClassName:s.closeIcon,icon:Sg()}),null==o?void 0:o.left),a().createElement(Zp(),{className:s.headerCenter},a().createElement(UB,{modes:u,modeId:t,onChange:l,className:s.modeSwitcher})),a().createElement(Zp(),{className:s.headerRight},null==o?void 0:o.right))),a().createElement(bg(),{className:s.content},n))},qB=lr((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),$B=({items:e,selectedItems:t,onSelectImage:n,onDeselectImage:r,onShareLink:o,onSetAsDefault:i,onDownload:l,onClickImage:s,onDelete:u})=>{const c=qB(),d=e=>a().createElement(ZR,{id:e,selected:t.includes(e),selectionMode:0!==t.length,onSelect:()=>n(e),onDeselect:()=>r(e),onShareLink:()=>o(e),onSetAsDefault:()=>i(e),onDownload:()=>l(e),onClick:()=>s(e),onDelete:u?()=>u(e):void 0,canBeSelected:!0});return a().createElement(Zp(),{className:c.root},a().createElement(gS(),{container:!0},e.map((({id:e,src:t})=>a().createElement(gS(),{key:e,classes:{item:c.item},item:!0},a().createElement(RR,{size:DR.LARGE,onClick:()=>s(e),src:t,overlay:d(e)}))))))},KB=lr((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),GB=({selectedItems:e,items:t,onSelectAll:n,onClearAll:r})=>{const o=KB(),i=e.length===t.length;return a().createElement(qd(),{component:"button",underline:"none",classes:{button:o.selectButton},onClick:i?r:n},i?c().text("Clear selection"):c().text("Select all images"))};var YB=n(997),XB=n.n(YB);const QB=lr((()=>({downloadButton:{color:"#fff",fontSize:"24px",marginLeft:"30px"},shareButton:{color:"#fff",fontSize:"24px",marginLeft:"21px"},deleteButton:{color:"#fff",fontSize:"24px",marginLeft:"24px"},divider:{height:"31px",width:"1px",marginLeft:"10px",backgroundColor:"rgba(255,255,255,0.38)"}}))),JB=({onDownload:e,onShare:t,onUpload:n,onDelete:r})=>{const o=QB();return a().createElement(a().Fragment,null,n&&a().createElement(br(),{variant:"contained",color:"primary",onClick:n,startIcon:a().createElement(pd(),null)},c().text("Upload")),e&&n&&a().createElement("div",{className:o.divider}),e&&a().createElement(up,{className:o.downloadButton,tooltipTitle:c().text("Download selected items"),icon:jR,onClick:e}),t&&a().createElement(up,{className:o.shareButton,tooltipTitle:c().text("Copy link"),icon:XB(),onClick:t}),r&&a().createElement(up,{className:o.deleteButton,tooltipTitle:c().text("Delete selected items"),icon:sC(),onClick:r}))},eH=({attributeValues:e,open:t,onClose:n,currentAttributeValueUri:o,setCurrentAttributeValueUri:i,attributeType:l,onDownload:u,onShareLink:c,onSetAsDefault:d,onUpload:p,onDeleteAttribute:m})=>{const[h,g]=(0,r.useState)([]),[v,y]=(0,r.useState)(_B.Gallery),b=N();(0,r.useEffect)((()=>{y(o?_B.Details:_B.Gallery)}),[o]);const x=e.map((e=>({src:(0,s.getImageAttributeOvThumbnailUrl)(e),downloadURL:(0,s.getImageAttributeOvUrl)(e),id:e.uri}))),w=e=>{c(x.find((0,f.propEq)("id",e)).downloadURL)},E=t=>{const n=e.find((({uri:e})=>e===t));d(n)},C=e=>{m({uri:e,attributeType:l})},{canCreate:S,canDelete:O}=(0,r.useContext)(JI),k=v===_B.Gallery,A=v===_B.Details,P=h.length>0,T=A||k&&P,D=()=>k?h:[o],M=D().every((e=>(0,s.isTempUri)(e)||O)),_=!b&&T&&M,I=!b&&S&&(A||k&&!P),R=k&&P&&a().createElement(GB,{items:x,selectedItems:h,onClearAll:()=>{g([])},onSelectAll:()=>{g((0,f.pluck)("id",x))}}),L=a().createElement(JB,{onDelete:_?()=>{D().forEach((e=>{C(e)})),h.length&&g([])}:void 0,onDownload:T?()=>{const e=k?(0,f.pipe)((0,f.filter)((({id:e})=>h.includes(e))),(0,f.pluck)("downloadURL"))(x):[x.find((0,f.propEq)("id",o)).downloadURL];u(e)}:void 0,onShare:A?()=>{w(o)}:void 0,onUpload:I?p:void 0});return a().createElement(WB,{mode:v,open:t,onChangeMode:y,header:{left:R,right:L},onClose:n},k&&a().createElement($B,{items:x,selectedItems:h,onSelectImage:e=>{g((t=>[...t,e]))},onDeselectImage:e=>{g((t=>t.filter((t=>t!==e))))},onShareLink:w,onSetAsDefault:E,onDownload:e=>{u([x.find((0,f.propEq)("id",e)).downloadURL])},onClickImage:e=>{i(e),y(_B.Details)},onDelete:b?void 0:C}),A&&a().createElement(MB,{handleSetAsDefault:E,setCurrentAttributeValueUri:i,currentAttributeValueUri:o,attributeValues:e,attributeType:l}))},tH=lr((e=>({imageBox:{position:"relative",display:"flex",width:"100%",flexGrow:1,flexShrink:0,flexWrap:"nowrap",marginTop:"2px",overflow:"hidden"},moreButtonContainer:({imageWidth:e,imageHeight:t})=>({backgroundColor:"white",width:e,height:t,position:"absolute",right:0,cursor:"pointer"}),moreButton:({imageWidth:t,imageHeight:n})=>({display:"flex",justifyContent:"center",alignItems:"center",width:t,height:n,backgroundColor:(0,_r.alpha)(e.palette.primary.main,.06)}),number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})));function nH(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rH=({attributeType:e,attributeValues:t=[],renderImage:n,overlay:o=!1,countFixedItems:i=0,children:l,onUpload:u,onDeleteAttribute:c,imageSize:d=lL,paging:p,parentUri:f,showNonOv:m,requestNextPageOfAttributeValues:h})=>{const g=tH(d);(0,r.useEffect)((()=>{if(p&&h){const n=m?p.totalOvValues:p.totalValues;n>t.length&&h({parentUri:f,attributeTypeUri:e.uri,attributeTypeName:e.name,values:[],defaultMaxValues:n})}}),[p,h,e,f,t.length,m]);const v=(0,r.useRef)(),[y,b]=(0,r.useState)(t.length),[x,w]=(0,r.useState)(0),E=(0,r.useContext)(sL),[C,S]=(0,r.useState)(!1),[O,k]=(0,r.useState)(),A=z("setDefaultProfilePicForEntity"),P=z("setDefaultProfilePicForModifiedEntity"),T=M()||{},D=N(),_=(0,r.useCallback)((e=>{const{imageMargin:n,imageWidth:r}=d,a=Math.floor((e+n)/(r+n))-i,o=e+n-(a+i)*(r+n)<8;b(a),t.length>a?w(t.length-a+(o?1:0)):w(0)}),[t.length,i,d]),I=(0,r.useCallback)((e=>{_(e),v.current=e}),[_]);(0,r.useEffect)((()=>{v.current&&_(v.current)}),[t.length,_]);const R=(0,r.useCallback)((e=>{E||(k(e),S(!0))}),[E]),L=(0,r.useCallback)((()=>{S(!1)}),[]),j=e=>(e=>{e.forEach(((e,t)=>{try{if((e=>!!(e=>e.indexOf("://")>0||0===e.indexOf("//"))(e)&&new URL(e).host!==location.host)(e)){const n=document.createElement("iframe");n.setAttribute("style","display: none;"),n.setAttribute("src",e),document.body.appendChild(n),setTimeout((()=>document.body.removeChild(n)),3e4*(t+1))}else{const t=document.createElement("a");t.href=e,t.download=(e=>e.split("/").pop())(e),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}catch(e){console.error(e)}}))})(e),F=e=>navigator.clipboard.writeText(e),V=(0,r.useCallback)((e=>{D?(0,s.insertDefaultImageByAttrUri)(T.uri,e.uri).then((({status:t})=>{"success"===t&&A(e)})):P({entityUri:T.uri,value:e})}),[D,T.uri,A,P]),B=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){nH(e,t,n[t])}))}return e}({onOpenImageGalleryDialog:R},o&&{onDownload:j,onShareLink:F,onSetAsDefault:V});return a().createElement(a().Fragment,null,a().createElement(Dd,{handleWidth:!0,handleHeight:!1,onResize:I,refreshMode:"debounce",refreshRate:50}),a().createElement(eH,{attributeValues:t,open:C,onClose:L,setCurrentAttributeValueUri:k,currentAttributeValueUri:O,attributeType:e,onDownload:j,onShareLink:F,onSetAsDefault:V,onUpload:u,onDeleteAttribute:c}),a().createElement("div",{className:g.imageBox},l,t.slice(0,y).map(n(B)),x>0&&a().createElement("div",{className:g.moreButtonContainer},a().createElement("div",{"data-reltio-id":"more-image-button",className:g.moreButton,onClick:()=>R()},a().createElement(gd(),{className:g.number},`+${x}`)))))},aH=lr((()=>({root:{width:"100%"},image:({imageMargin:e})=>({marginRight:e,cursor:"pointer","&:last-child":{marginRight:0}}),uploadContainer:({imageMargin:e,imageWidth:t,imageHeight:n})=>({backgroundColor:"white",width:t,height:n,cursor:"pointer",border:"1px dashed #0072CE",boxSizing:"border-box",marginRight:e,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),uploadButton:{width:"50px",height:"50px"},uploadIcon:{fontSize:"36px"}}))),oH={},iH=({attributeType:e={},attributeValues:t=[],onDeleteAttribute:n,onChangeAttribute:o,requestNextPageOfAttributeValues:i,parentUri:l,paging:u,showNonOv:c,imageSize:d=lL})=>{const p=aH(d),[f,m]=(0,r.useState)(!1),h=z("setDefaultProfilePicForModifiedEntity"),g=M()||oH,v=(y=g.uri,k((e=>{return t=e.modifiedEntities,(n=y)&&t[n]&&t[n].defaultProfilePic;var t,n})));var y;const{canCreate:b}=(0,r.useContext)(JI),x=(0,r.useCallback)((()=>{m((e=>!e))}),[]),w=(0,r.useCallback)((t=>{const n=(0,s.generateUri)(l,e.name),r={};for(const a in t){const o=(e.attributes||[]).find((({name:e})=>e===a));o&&(r[a]=[{uri:(0,s.generateUri)(n,o.name),ov:!0,value:t[a],type:o.uri}])}o({attributeType:e,uri:n,value:r})}),[o,l,e]),E=(0,r.useCallback)((e=>{if(n(e),v===e.uri){var r;const n=(null===(r=t[0])||void 0===r?void 0:r.uri)===e.uri?t[1]:t[0];h({entityUri:g.uri,value:n||{}})}}),[n,g,v,t,h]),C=(t,n)=>{const{onOpenImageGalleryDialog:r,onDownload:o,onShareLink:i,onSetAsDefault:l}=t,u=(0,s.getImageAttributeOvUrl)(n),{uri:c}=n;return a().createElement(ZR,{id:c,onShareLink:()=>i(u),onSetAsDefault:()=>l(n),onDelete:()=>E({uri:c,attributeType:e}),onDownload:()=>o([u]),onClick:()=>r(c)})};return a().createElement("div",{className:p.root,"data-reltio-id":"image-line-edit-mode"},a().createElement(rH,{attributeValues:t,attributeType:e,renderImage:e=>(t={})=>{const n=(0,s.getImageAttributeOvThumbnailUrl)(t),{uri:r}=t,{onOpenImageGalleryDialog:o}=e;return a().createElement("div",{className:p.image,key:r},a().createElement(RR,{src:n,overlay:C(e,t),onClick:()=>o(r),size:{imageWidth:d.imageWidth,imageHeight:d.imageHeight},"data-reltio-id":"reltio-attribute-value"}))},overlay:!0,countFixedItems:b?1:0,onUpload:x,onDeleteAttribute:E,imageSize:d,requestNextPageOfAttributeValues:i,paging:u,parentUri:l,showNonOv:c},b&&a().createElement("div",{className:p.uploadContainer,onClick:x},a().createElement(sp,{className:p.uploadButton,iconClassName:p.uploadIcon,icon:pd(),"data-reltio-id":"reltio-upload-image-button"}))),a().createElement(iL,{open:f,onUpload:w,onClose:x}))},lH=({attributeType:e,attributeValues:t,paging:n,parentUri:o,showNonOv:i,onDeleteAttribute:l,onChangeAttribute:u,requestNextPageOfAttributeValues:c,highlightedAttribute:d,error:m,highlightedError:h,onDeactivateError:g})=>{const v=JN(),{label:y,description:b,required:x}=e,{ref:w,highlightedClassName:E}=XN(d),{ref:C,errorClassName:S}=XI({highlightedError:h}),O=(0,r.useCallback)((()=>{m&&g&&g((0,s.getErrorId)(m))}),[m,g]);return a().createElement("div",{ref:w,className:p()(v.wrapper,E)},a().createElement("div",{ref:C,className:p()(v.imagesWrapper,S)},a().createElement("div",{className:v.titleWrapper},a().createElement(zE,{className:v.title,label:y,"data-reltio-id":"reltio-attribute-label",isRequired:x}),a().createElement(VN,{description:b})),a().createElement(RI,{errorMessage:null==m?void 0:m.message,className:v.errorWrapper},a().createElement(iH,{attributeValues:t,attributeType:e,paging:n,onDeleteAttribute:l,parentUri:o,onChangeAttribute:(0,f.pipe)(u,O),requestNextPageOfAttributeValues:c,showNonOv:i}))))};let sH=function(e){return e.imageLine="imageLine",e.special="special",e.default="default",e}({});function uH(){return uH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uH.apply(null,arguments)}const cH=zI(qI,((e,{attributeType:t,parentUri:n})=>{const{element:r,type:a}=e||{},o=(e=>e===ZI.NewAttribute)(a)&&r.uri===t.uri;return{highlightedAttribute:o?e:null,highlightedError:WI(a)&&(0,s.isAttributeTypeError)(r,n,t.uri)?e:null}}),(({values:e,attributeType:t,mode:n=s.Mode.Viewing,crosswalks:o,drawLines:i,paging:l={},parentUri:u,max:c,showEmptyEditors:d,showNonOv:p,highlightedError:m,highlightedAttribute:h,onAddAttributes:g,onDeleteAttribute:v,onChangeAttribute:y,additionalControlsRenderer:b})=>{var x;const w=z("errorDeactivated"),E=z("requestNextPageOfAttributeValues"),C=(0,r.useContext)(iF),S=u&&(0,s.getBaseUri)(u),O=(0,r.useMemo)((()=>C[S]||[]),[C,S]),A=((e,t)=>k((n=>(0,s.getCachedActiveErrorsForAttributesPager)(n.profileErrors,e,t))))(u,t),P=(0,r.useMemo)((()=>(0,s.filterErrorsForHiddenAttributes)(A,O)),[A,O]),T=k((e=>e.profileErrors)),M=D(),_=(0,s.getAttributePagerActiveTypeErrorMessage)(u,t,T),I=null!==(x=null!=c?c:M)&&void 0!==x?x:1/0,N=(0,f.partition)(s.isOv),[R,L]=N(e),j=p?e:R,F=p?[]:L,V={errorMessage:_,errors:P,mode:n,parentUri:u,onAddAttributes:g,onDeleteAttribute:v,onChangeAttribute:y,onDeactivateError:w,additionalControlsRenderer:b,showEmptyEditors:d,highlightedError:m,highlightedAttribute:h};return(()=>{switch((0,f.cond)([[s.isSpecialAttribute,(0,f.always)(sH.special)],[s.isImage,(0,f.always)(sH.imageLine)],[f.T,(0,f.always)(sH.default)]])(t)){case sH.special:return a().createElement(RE,{enabled:i},a().createElement(OR,uH({values:j,attributeType:t},V)));case sH.imageLine:return a().createElement(RE,{enabled:i},a().createElement(lH,{attributeValues:j,attributeType:t,paging:l,onDeleteAttribute:v,parentUri:u,onChangeAttribute:y,requestNextPageOfAttributeValues:E,showNonOv:p,highlightedAttribute:h,error:(0,s.getAttributeErrorByTypeUri)(t.uri,P),highlightedError:m,onDeactivateError:w}));default:return a().createElement(tR,uH({values:j,attributeType:t,max:I,paging:l,crosswalks:o,drawLines:i,requestNextPageOfAttributeValues:E,showNonOv:p,nonVisibleValues:F},V))}})()}));function dH(){return dH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dH.apply(null,arguments)}function pH(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fH=zI(qI,(e=>{const{highlightAttribute:t}=e||{};return{highlightAttribute:t}}),(({parentAttributeType:e,attrTypes:t,entity:n,parentUri:o,showEmptyEditors:i,mode:l,crosswalks:u,drawLines:d,children:p,className:m,fixedTypeUris:h=oF,onAddAttributes:g,onChangeAttribute:v,onDeleteAttribute:y,additionalControlsRenderer:b,showNonOv:x,highlightAttribute:w})=>{const E=(0,r.useContext)(iF),C=o&&(0,s.getBaseUri)(o),S=(0,r.useMemo)((()=>E[C]||[]),[E,C]),O=(0,r.useContext)(tN),k=(0,r.useMemo)((()=>t.filter((e=>!S.includes(e.uri)))),[t,S]),{attributes:A={}}=n,[P,T]=(0,r.useState)({}),D=(0,r.useCallback)(((e,t)=>{T((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){pH(e,t,n[t])}))}return e}({},n,{[e]:t})))}),[]);(0,r.useEffect)((()=>{T({})}),[o]);const{canCreate:M}=(0,r.useContext)(JI),_=(0,r.useMemo)((()=>M&&e&&(0,s.checkCanCreateAttribute)({attributeType:e,mode:l})),[e,l,M]),I=((e,t,n,r)=>e.filter((e=>{const a=((e,t)=>{const{attributes:n={},analyticsAttributes:r={}}=t;return(0,f.cond)([[s.isSpecialAttribute,(0,f.always)(t)],[(0,f.both)(s.isAnalyticAttribute,(0,f.always)(r)),(0,f.always)(r)],[f.T,(0,f.always)(n)]])(e)})(e,t),o=(e=>(0,s.isSpecialAttribute)(e)?"uri":"name")(e);return!((e.singleValue||(0,s.isRoleAttrType)(e)||(0,s.isTagAttrType)(e))&&((0,f.has)(e[o])(a)||n&&(null==r||!r[e.uri])))})))((0,r.useMemo)((()=>M?(0,s.getCreatableAttributeTypes)(l,k):[]),[k,l,M]),n,i,P),N=(0,r.useContext)(NN),R=(0,r.useMemo)((()=>(0,s.getAttributesListForEditMode)({attrTypes:k,mode:l,entity:n,showEmptyEditors:i,showNonOv:x,pinnedAttributes:N,configCanCreate:M,alwaysVisible:O,isTemporary:(0,s.isTempUri)(o)})),[k,l,n,i,x,N,M,O,o]),[L,j]=(0,r.useMemo)((()=>LI(h,R)),[R,h]),F=(0,r.useCallback)((t=>{g(t.map((t=>({attributeType:t,parentUri:t===e?(0,s.getParentUri)(o):o})))),w((0,f.last)(t),ZI.NewAttribute)}),[g,o,e]),V={enabled:d},B=(0,r.useMemo)((()=>({hasDeletionsMap:P,setHasDeletions:D})),[P,D]);return a().createElement("div",{className:m},p&&a().createElement(RE,V,p),a().createElement(RE,dH({},V,{plain:!0}),I.length>0&&l!==s.Mode.Viewing&&a().createElement(Cj,{label:c().text("More attributes"),onApply:F,dense:d,data:I,parent:_&&e})),a().createElement(ER.Provider,{value:B},j.concat(L).map((({attrType:e,values:t})=>a().createElement(cH,{key:`${e.uri}_${o}`,attributeType:e,drawLines:d,values:t,paging:(0,f.path)(["paging",e.uri],A),parentUri:o,showEmptyEditors:i,mode:l,crosswalks:u,onAddAttributes:g,onChangeAttribute:v,onDeleteAttribute:y,additionalControlsRenderer:b,showNonOv:x})))))})),mH=e=>e&&e.attributes,hH=({entityUri:e,entityType:t,mode:n,attributeTypesSelectionStrategy:o=mH})=>{const i=z("addAttributes"),l=z("removeAttribute"),s=z("modifyAttribute"),u=B(e),c=(0,r.useMemo)((()=>o(t)),[o,t]);return u?a().createElement(fH,{key:u.uri,attrTypes:c,entity:u,showEmptyEditors:!0,drawLines:!0,parentUri:u.uri,mode:n,crosswalks:u.crosswalks,onAddAttributes:i,onChangeAttribute:s,onDeleteAttribute:l}):null};function gH(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vH=lr({creatorWrapper:{marginTop:"20px"}});function yH(){return yH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yH.apply(null,arguments)}function bH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){xH(e,t,n[t])}))}return e}function xH(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wH(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const EH=20,CH=e=>{let{entity:t={},entityTypesUris:n=[],mode:o,max:i=EH,onChange:l,onCreate:u,metadata:d,globalSearchRequestOptions:p,attributeTypesSelectionStrategy:m,disableLinkClick:h=!1,isMasked:g=!1,required:v}=e,y=wH(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick","isMasked","required"]);const b=vH(),[x,w]=(0,r.useState)(""),E=(0,r.useMemo)((()=>n.map((e=>(0,s.getEntityType)(d,e))).filter(s.isAvailableEntityType)),[n,d]),C=(0,r.useMemo)((()=>n.filter((e=>{const t=(0,s.getEntityType)(d,e);return(0,s.checkMetadataForCreate)(o,t)}))),[n,o,d]),S=(0,r.useCallback)((e=>0!==E.length&&C.includes(null!=e?e:E[0].uri)),[C,E]),O=(0,r.useMemo)((()=>bH({},p,{max:i,sendMasked:g})),[p,g,i]),k=u?(e,t)=>{u(t||E[0].uri,e),w("")}:void 0,A=e=>{null!==e&&(w(""),l(e))},P=(0,r.useMemo)((()=>1!==E.length),[E]),T=(0,r.useCallback)((e=>((0,f.isEmpty)(E)?Promise.resolve([]):(0,s.typeAheadSearch)(E,e,O)).then(((e,t)=>n=>{const r=n.map((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){gH(e,t,n[t])}))}return e}({},t,{label:(0,s.getLabel)(t.label),entityType:e.find((({uri:e})=>e===t.type))}))),a=e=>(0,f.isEmpty)(e)?[{label:"",uri:"",entityType:{}}]:e,o=t?e:e.filter((e=>r.some((t=>t.type===e.uri))));return o.length>1?o.map((e=>({label:e.label,entityType:e.uri,options:a(r.filter((t=>t.type===e.uri)))}))):a(r)})(E,u))),[E,u,O]),D=((0,f.isEmpty)(t)?E[0]:(0,s.getEntityType)(d,t.entityType))||{},M=u&&(x?c().text('Create "${name}" as new ${entityTypeLabel}',{name:x,entityTypeLabel:D.label}):c().text("Create new ${entityTypeLabel}",{entityTypeLabel:D.label})),_=c().text("Select ${entityTypeLabel}profile",{entityTypeLabel:1===E.length?`${E[0].label} `:""}),I=!(0,f.isEmpty)(t)&&(0,s.isTempUri)(t.entityUri),N=P?{Group:_E,GroupHeading:dw}:{},R=I?{ClearIndicator:TE}:{},{TextFieldProps:L}=y,j=wH(y,["TextFieldProps"]),F=(0,r.useMemo)((()=>bH({},L||{},{"data-reltio-id":"reltio-entity-selector"})),[L]);return a().createElement(a().Fragment,null,a().createElement(Dw,yH({key:n.join(","),value:(0,f.isEmpty)(t)?void 0:t,inputValue:x,onInputChange:e=>{w(e)},getOptions:T,getOptionLabel:(0,f.prop)("entityLabel"),onChange:A,onCreate:k,onClear:()=>{A({})},label:_,createLabel:M,canCreateOption:S,components:bH({Option:CE,SingleValue:OE},N,R),currentEntityType:D,isClearable:!0,disableLinkClick:h,TextFieldProps:F,required:v},j)),I&&a().createElement("div",{"data-reltio-id":"entity-creator",className:b.creatorWrapper},a().createElement(hH,{mode:o,attributeTypesSelectionStrategy:m,entityType:D,entityUri:t.entityUri})))};var SH=n(5833);Hd()(SH.Z,{insert:"head",singleton:!1});const OH=SH.Z.locals||{},kH=({entity:e,isOpen:t,onClose:n,onSuccess:o})=>{const i=H(["ovOnly"]),l=W(),{metadata:u,hierarchyTypeOptions:d,selectedHierarchyTypeOption:p,hierarchyName:f,connectionRole:m,selectedEntity:h,allowedEntityTypes:g,isLoading:v,isSaveDisabled:y,onHierarchyTypeChange:b,onHierarchyNameChange:x,onConnectionRoleChange:w,onEntityChange:E,onSave:C}=(({isOpen:e,onClose:t,onSuccess:n})=>{const a=(0,Lr.useSelector)(Fr().selectors.getEntity),o=(0,Lr.useSelector)(Fr().selectors.getMetadata),i=(0,s.getEntityId)(a),l=null==a?void 0:a.type,[u,d]=(0,r.useState)(null),[p,f]=(0,r.useState)(""),[m,h]=(0,r.useState)(null),[g,v]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),x=(0,r.useMemo)((()=>{var e;return o?l?(0,s.getHierarchyTypesForEntityType)(o,l):null!==(e=null==o?void 0:o.hierarchyTypes)&&void 0!==e?e:[]:[]}),[o,l]),w=(0,r.useMemo)((()=>x.map((({uri:e,label:t})=>({value:e,label:null!=t?t:e})))),[x]);(0,r.useEffect)((()=>{e||(d(null),f(""),h(null),v(null),b(!1))}),[e]);const E=(0,r.useMemo)((()=>{var e;const t=null==u?void 0:u.allowedEntityTypes,n=(null!==(e=null==o?void 0:o.entityTypes)&&void 0!==e?e:[]).map((({uri:e})=>e));return null!=t&&t.length?t:n}),[u,o]),C=(0,r.useMemo)((()=>{var e;return u?{value:u.uri,label:null!==(e=u.label)&&void 0!==e?e:u.uri}:null}),[u]),S=(0,r.useCallback)((e=>{var t;if((null==u?void 0:u.uri)===e.value)return;const n=null!==(t=x.find((({uri:t})=>t===e.value)))&&void 0!==t?t:null;d(n),v(null)}),[u,x]),O=(0,r.useCallback)((e=>{v(null!=e&&e.uri?{entityUri:e.uri,entityType:e.type,entityLabel:e.label}:null)}),[]),k=(0,r.useCallback)((e=>{f(e.target.value)}),[]),A=(0,r.useCallback)((e=>{h(e.target.value)}),[]),P=null==g?void 0:g.entityUri,T=!u||!p.trim()||!m||!P||!i||y,D=(0,r.useCallback)((async()=>{const e=(0,s.stripEntityUri)(P),r="Parent"===m?e:i,a="Parent"===m?i:e;b(!0);try{const e=await(0,s.createHierarchy)({type:u.uri,name:p.trim(),hasVersioning:!1,firstConnection:{parentId:r,childId:a}});t(),n(e)}catch(e){pr(e,{defaultMessage:c().text("Failed to create hierarchy")})}finally{b(!1)}}),[i,P,m,u,p,t,n]);return{metadata:o,hierarchyTypeOptions:w,selectedHierarchyTypeOption:C,hierarchyName:p,connectionRole:m,selectedEntity:g,allowedEntityTypes:E,isLoading:y,isSaveDisabled:T,onHierarchyTypeChange:S,onHierarchyNameChange:k,onConnectionRoleChange:A,onEntityChange:O,onSave:D}})({isOpen:t,onClose:n,onSuccess:o});return a().createElement(fg(),{open:t,onClose:n,fullWidth:!0,classes:{paper:OH.dialog}},v&&a().createElement(Hh,null),a().createElement(hg(),{classes:{root:OH.dialogTitle}},c().text("Create new hierarchy")),a().createElement(bg(),{classes:{root:OH.dialogContent}},a().createElement(Dw,{height:44,value:p,onChange:b,label:c().text("Hierarchy type"),options:d,required:!0}),a().createElement(Vx(),{label:c().text("Hierarchy name"),value:f,onChange:x,variant:"filled",fullWidth:!0,size:"small",InputProps:{classes:{root:OH.textField}},InputLabelProps:{classes:{root:OH.textFieldLabel}},required:!0}),a().createElement(hE(),{variant:"standard",component:"fieldset",required:!0},a().createElement(vE(),{component:"legend",classes:{root:OH.formLabel}},a().createElement(gd(),{variant:"subtitle2",color:"text.primary",component:"span",className:OH.formLabelTitle},c().text("Initial connection to ${entityLabel}",{entityLabel:(0,s.getLabel)(e.label)})),a().createElement(gd(),{variant:"body2",color:"text.secondary",component:"span"},c().text("Create the initial connection for this hierarchy"))),a().createElement(dE(),{value:m,onChange:w,row:!0},a().createElement(fE(),{value:"Child",control:a().createElement(uE(),{size:"small"}),label:c().text("Add child")}),a().createElement(fE(),{value:"Parent",control:a().createElement(uE(),{size:"small"}),label:c().text("Add parent")}))),a().createElement(CH,{entity:null!=h?h:void 0,entityTypesUris:g,mode:s.Mode.Editing,onChange:E,metadata:u,globalSearchRequestOptions:i,isMasked:l&&(0,s.hasAttributeMasking)(u),required:!0,height:44,isDisabled:!p})),a().createElement(vg(),{classes:{root:OH.dialogActions}},a().createElement(br(),{onClick:n},c().text("Cancel")),a().createElement(br(),{color:"primary",onClick:C,disabled:y},c().text("Save"))))};var AH=n(5670);Hd()(AH.Z,{insert:"head",singleton:!1});const PH=AH.Z.locals||{},TH=({config:e,instanceId:t,onInstanceIdChange:n})=>{const o=(0,Lr.useSelector)(Fr().selectors.getEntity),i=(0,s.getEntityId)(o),[l,u]=(0,r.useState)([]),[d,p]=(0,r.useState)(!1),{importTemplateUrl:m}=e,h=(0,r.useCallback)((()=>p(!0)),[]),g=(0,r.useCallback)((()=>p(!1)),[]),{hierarchyOptions:v,selectedInstanceId:y,hierarchyTitle:b,hierarchies:x,isLoading:w,errorMessage:E,reloadHierarchyList:C}=(({instanceId:e,onInstanceIdChange:t})=>{var n;const a=(0,Lr.useSelector)(Fr().selectors.getEntity),o=(0,Lr.useSelector)(Fr().selectors.getMetadata),i=(0,r.useContext)(ag),l=gp(),[u,d]=(0,r.useState)(null),[p,m]=(0,r.useState)(void 0),[h,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)(!1),[b,x]=(0,r.useState)(null),w=(0,s.getEntityId)(a),E=null==a?void 0:a.type,C=(0,r.useMemo)((()=>{var e;if(p!==w)return[];const t=E?(0,s.getHierarchyTypesForEntityType)(o,E):null!==(e=null==o?void 0:o.hierarchyTypes)&&void 0!==e?e:[];return(({hierarchies:e=[],allowedHierarchyTypes:t})=>{const n=(0,f.fromPairs)(t.map((({uri:e,label:t})=>[e,null!=t?t:e]))),r=(0,f.map)((({uri:e})=>e),t),a=e.filter((({type:e})=>(0,f.includes)(e,r))),o=a.reduce(((e,{type:t})=>{var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e}),{});return a.map((({type:e,name:t,hierarchyId:r,singleInstanceId:a})=>{var i;const l=null!==(i=n[e])&&void 0!==i?i:e;return{value:a,label:o[e]>1?`${l} (${t||r||a})`:l,typeUri:e}}))})({hierarchies:null!=u?u:[],allowedHierarchyTypes:t})}),[E,o,u,p,w]),S=(0,r.useMemo)((()=>{var t,n,r,a;return null!==(t=null!==(n=null===(r=C.find((({value:t})=>t===e)))||void 0===r?void 0:r.value)&&void 0!==n?n:null===(a=C[0])||void 0===a?void 0:a.value)&&void 0!==t?t:null}),[C,e]),O=(0,r.useMemo)((()=>null==u?void 0:u.find((({singleInstanceId:e})=>e===S))),[u,S]),k=null!==(n=null==O?void 0:O.name)&&void 0!==n?n:c().text("Hierarchy"),A=(0,r.useCallback)((async()=>{if(!w)return null;y(!0),x(null);try{const e=await l((0,s.getHierarchyList)({entityId:w,signal:i}));return d(null!=e?e:[]),m(w),g(!0),null!=e?e:[]}catch(t){var e;if((0,s.isAbortError)(t))return;return console.warn("Failed to load hierarchy list",t),x(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:c().text("Failed to load hierarchy list")),null}finally{y(!1)}}),[w,l]);return(0,r.useEffect)((()=>{A()}),[A]),(0,r.useEffect)((()=>{h&&(g(!1),S&&S!==e&&t(S))}),[S,e,t,h]),{hierarchyOptions:C,selectedInstanceId:S,hierarchyTitle:k,hierarchies:u,reloadHierarchyList:A,isLoading:v,errorMessage:b}})({instanceId:t,onInstanceIdChange:n}),{treeData:S,isLoading:O,errorMessage:k,loadNodeChildren:A}=(({entityId:e,selectedInstanceId:t,setExpandedKeys:n,activenessDate:a})=>{const o=(0,r.useContext)(ag),i=gp(),l=gp({cancelPrevious:!1}),[u,d]=(0,r.useState)([]),[p,m]=(0,r.useState)(!1),[h,g]=(0,r.useState)(null),v=(0,Lr.useSelector)(Fr().selectors.getMetadata),y=(0,Lr.useSelector)(Fr().selectors.getShowMasking)&&(0,s.hasAttributeMasking)(v),b=(0,r.useMemo)((()=>(0,f.isNil)(a)?void 0:new Date(a).toISOString()),[a]),x=(0,r.useMemo)((()=>cg(u,e)),[e,u]),w=(0,r.useCallback)((async()=>{if(e&&t){m(!0),g(null);try{var r;const a=await i((0,s.getHierarchy)({instanceId:t,entityId:e,date:b,sendMasked:y,signal:o})),l=sg(a),u=l?[l]:[];d(u);const c=cg(u,e),p=c.length>0?c.flatMap((e=>e.map((({id:e})=>e)))):null!==(r=u[0])&&void 0!==r&&r.id?[u[0].id]:[];n(p)}catch(e){var a;if((0,s.isAbortError)(e))return;console.warn("Failed to load hierarchy tree",e),g(null!==(a=null==e?void 0:e.message)&&void 0!==a?a:c().text("Failed to load hierarchy"))}finally{m(!1)}}}),[b,e,t,i,y,n]),E=(0,r.useCallback)(((e,t)=>{d((n=>((e,t,n)=>dg(e,(e=>e.id===t),(e=>e.isLoading===n?e:og({},e,{isLoading:n}))))(n,e,t)))}),[d]),C=(0,r.useCallback)(((e,t)=>{d((n=>((e,t,n)=>dg(e,(e=>e.id===t),(e=>og({},e,{children:ug(e.children,n),pending:!1,isLoading:!1}))))(n,e,t)))}),[d]),S=(0,r.useCallback)((async e=>{const{entityId:n,id:r,label:a}=e;if(!t||!n)return!0;E(r,!0);try{var i;const e=await l((0,s.getHierarchyChildren)({instanceId:t,entityId:n,date:b,sendMasked:y,signal:o})),a=null!==(i=null==e?void 0:e.map(sg).filter(Boolean))&&void 0!==i?i:[];return a.length>0?C(r,a):E(r,!1),!0}catch(e){if(E(r,!1),(0,s.isAbortError)(e))return;return console.warn("Failed to load hierarchy children view",e),pr(e,{message:c().text("Failed to load children for node ${label}",{label:a})}),!1}}),[b,t,l,y,E,o,C]),O=(0,r.useCallback)((async e=>{await S(e)||n((t=>t.filter((t=>t!==e.id))))}),[S,n]);return(0,r.useEffect)((()=>{d([]),g(null),w()}),[w,t]),(0,r.useEffect)((()=>{if(!x.length)return;const e=x.map((e=>e[e.length-1])).filter((e=>Boolean(e))).filter((e=>e.pending&&!e.isLoading));e.forEach(O)}),[x,O]),{treeData:u,isLoading:p,errorMessage:h,pathToCurrentEntity:x,reload:w,updateChildren:C,setNodeLoading:E,loadNodeChildren:O}})({entityId:i,selectedInstanceId:y,setExpandedKeys:u}),{isOpen:P,open:T,close:D,setIsUploading:M}=(()=>{const[e,t]=(0,r.useState)(!1),[n,a]=(0,r.useState)(!1);return{isOpen:e,isUploading:n,open:(0,r.useCallback)((()=>{t(!0)}),[]),close:(0,r.useCallback)((()=>{t(!1)}),[]),setIsUploading:a}})(),_=(0,r.useCallback)((async(e,t)=>{u(e),t.pending&&!t.isLoading&&await A(t)}),[A]),I=(0,r.useCallback)((async e=>{const t=await C();if(null==t||!t.length)return;const r=e.createdInstances;if(!r||0===Object.keys(r).length)return;const a=Object.values(r).reduce(((e,t)=>e.concat(t)),[]),o=t.find((({singleInstanceId:e})=>a.includes(e)));o&&n(o.singleInstanceId)}),[n,C]),N=(0,r.useCallback)((async e=>{await C(),n(e.instanceId)}),[n,C]),R=(0,r.useCallback)((({data:e})=>a().createElement(aE,{data:e,entityId:i})),[i]),L=w||O,j=null!=E?E:k,F=!L&&0===(null==x?void 0:x.length)&&0===(null==S?void 0:S.length)&&!j,V=(0,r.useMemo)((()=>L?a().createElement(a().Fragment,null,a().createElement(Hh,null),a().createElement(Qh,{LogoRenderer:Xh.LOADING,text:c().text("Loading ..."),variant:Yh.embedded})):j?a().createElement(Qh,{LogoRenderer:Xh.ERROR,text:j,variant:Yh.embedded}):F?a().createElement(lE,{onImportHierarchy:T,onCreateHierarchy:h}):a().createElement("div",{className:PH.hierarchyTreeContainer},a().createElement(sd,{data:S,LabelComponent:R,expandedKeys:l,onExpand:_}))),[L,j,F,S,l,_,R,T,h]);return a().createElement(rg,{className:PH.hierarchyView},a().createElement(jh,{entity:o,onOpenDataImport:T,onCreateHierarchy:h}),a().createElement("div",{className:PH.hierarchyContainer},a().createElement(jw,{title:b,instanceId:y,onInstanceIdChange:n,hierarchyOptions:v,hasHierarchy:!F&&!L}),V),a().createElement(Rg,{isOpen:P,onClose:D,onSuccess:I,templateUrl:m,onLoadingChange:M}),a().createElement(kH,{entity:o,isOpen:d,onClose:g,onSuccess:N}))},DH=Cr()({productionPrefix:"hierarchy",disableGlobal:!0,seed:"hier"}),MH=({config:e,instanceId:t,onInstanceIdChange:n})=>{const{SnackbarRenderer:o,showSnackbarMessage:i}=(({anchorOrigin:e={vertical:"bottom",horizontal:"center"},showDismiss:t,dismissTitle:n=c().text("Dismiss"),autoHideDuration:o=3e5,onDismissClick:i=f.identity}={})=>{const[l,s]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[p,m]=(0,r.useState)(null),g=(0,r.useCallback)((()=>{s(!1),d(""),m(null)}),[]),v=(0,r.useCallback)(((e,t)=>{"clickaway"!==t&&g()}),[g]),y=(0,r.useCallback)((e=>{"object"==typeof e&&"message"in e&&"action"in e?(d(e.message),m(e.action)):(d(e),m(null)),s(!0)}),[]),b=(0,r.useCallback)((()=>{g(),i()}),[g,i]),x=(0,r.useCallback)((()=>{g(),null==p||p.onClick()}),[g,p]);return{SnackbarRenderer:(0,r.useCallback)((()=>a().createElement(h(),{container:document.body},a().createElement(wr(),{open:l,anchorOrigin:e,autoHideDuration:o,onClose:v,message:u,style:{maxWidth:500},action:t||p?a().createElement(a().Fragment,null,t&&a().createElement(br(),{color:"primary",onClick:b},n),p&&a().createElement(br(),{color:"primary",onClick:x},p.label)):void 0}))),[l,g,u,p]),showSnackbarMessage:y}})({autoHideDuration:15e3});return a().createElement(Or(),{generateClassName:DH},a().createElement(Rr,{dateAdapter:Mr},a().createElement(gr,null,a().createElement(vr.Provider,{value:i},a().createElement(TH,{instanceId:t,onInstanceIdChange:n,config:e}),a().createElement(o,null)))))}},9285:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".AddressAutocompleteEditor-root--wxFdh{width:100%}.AddressAutocompleteEditor-root--wxFdh .AddressAutocompleteEditor-textFieldRoot--pgKcq{font-size:14px;padding:0}:is(.AddressAutocompleteEditor-root--wxFdh .AddressAutocompleteEditor-textFieldRoot--pgKcq) .AddressAutocompleteEditor-textFieldInput--SSAMJ{height:19px;line-height:19px;padding:10px 12px 11px!important}:is(.AddressAutocompleteEditor-root--wxFdh .AddressAutocompleteEditor-underline--zxZVf):before{display:none}.AddressAutocompleteEditor-countryHeader--lfKnC{padding:12px 12px 8px}.AddressAutocompleteEditor-countryHeader--lfKnC .AddressAutocompleteEditor-headerCountries--KNWZQ{font-size:12px;letter-spacing:0;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AddressAutocompleteEditor-countryHeader--lfKnC .AddressAutocompleteEditor-headerHelper--r3bpR{font-size:10px;letter-spacing:0}.AddressAutocompleteEditor-loadingState--_ESqH{padding:16px;text-align:center}.AddressAutocompleteEditor-emptyState--kIBDM{padding:8px}.AddressAutocompleteEditor-option--mwori{padding:4px 12px}.AddressAutocompleteEditor-popupContainer--MyedB{min-width:170px}.AddressAutocompleteEditor-listbox--jvzjM{margin:0;max-height:300px;overflow-y:auto;padding:0}.AddressAutocompleteEditor-listbox--jvzjM li:first-child{border-top:1px solid rgba(0,0,0,.12);padding-top:7px}.AddressAutocompleteEditor-optionTextWrapper--2ha4Q{align-items:baseline;display:flex;flex:1;min-width:0;--option-font-size:14px;--option-line-height:16px}.AddressAutocompleteEditor-optionTextWrapper--2ha4Q .AddressAutocompleteEditor-optionText--sow96{letter-spacing:.24px;padding:4px 0}.AddressAutocompleteEditor-optionTextWrapper--2ha4Q .AddressAutocompleteEditor-description--DvpS1,.AddressAutocompleteEditor-optionTextWrapper--2ha4Q .AddressAutocompleteEditor-optionText--sow96{font-size:var(--option-font-size);line-height:var(--option-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AddressAutocompleteEditor-optionTextWrapper--2ha4Q .AddressAutocompleteEditor-description--DvpS1{color:var(--mui-palette-text-secondary);padding-left:4px}.AddressAutocompleteEditor-containerForwardIcon--KEpEG{color:var(--mui-palette-text-secondary);height:24px}.AddressAutocompleteEditor-backToAllResults--VAAC3{border-top:1px solid rgba(0,0,0,.12)}.AddressAutocompleteEditor-backToAllResultsButton--wcwIw{letter-spacing:0}.AddressAutocompleteEditor-loadingProgress--qiL9R{left:0;position:absolute;right:0;top:0}",""]),i.locals={root:"AddressAutocompleteEditor-root--wxFdh",textFieldRoot:"AddressAutocompleteEditor-textFieldRoot--pgKcq",textFieldInput:"AddressAutocompleteEditor-textFieldInput--SSAMJ",underline:"AddressAutocompleteEditor-underline--zxZVf",countryHeader:"AddressAutocompleteEditor-countryHeader--lfKnC",headerCountries:"AddressAutocompleteEditor-headerCountries--KNWZQ",headerHelper:"AddressAutocompleteEditor-headerHelper--r3bpR",loadingState:"AddressAutocompleteEditor-loadingState--_ESqH",emptyState:"AddressAutocompleteEditor-emptyState--kIBDM",option:"AddressAutocompleteEditor-option--mwori",popupContainer:"AddressAutocompleteEditor-popupContainer--MyedB",listbox:"AddressAutocompleteEditor-listbox--jvzjM",optionTextWrapper:"AddressAutocompleteEditor-optionTextWrapper--2ha4Q",optionText:"AddressAutocompleteEditor-optionText--sow96",description:"AddressAutocompleteEditor-description--DvpS1",containerForwardIcon:"AddressAutocompleteEditor-containerForwardIcon--KEpEG",backToAllResults:"AddressAutocompleteEditor-backToAllResults--VAAC3",backToAllResultsButton:"AddressAutocompleteEditor-backToAllResultsButton--wcwIw",loadingProgress:"AddressAutocompleteEditor-loadingProgress--qiL9R"};const l=i},8587:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".AttributeVerificationStatus-status--YbdkC{height:18px;margin-left:4px;position:relative;width:14px}.AttributeVerificationStatus-icon--N3czk{left:0;position:absolute;top:2px}",""]),i.locals={status:"AttributeVerificationStatus-status--YbdkC",icon:"AttributeVerificationStatus-icon--N3czk"};const l=i},4664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".ErrorSnackbar-closeIcon--i8bgi{color:#fff}",""]),i.locals={closeIcon:"ErrorSnackbar-closeIcon--i8bgi"};const l=i},5340:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".FileDropZone-root--MRBNT{cursor:pointer}.FileDropZone-active--CRRp6{background-color:rgba(0,114,206,.12)}",""]),i.locals={root:"FileDropZone-root--MRBNT",active:"FileDropZone-active--CRRp6"};const l=i},1552:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,'.ProfileBand-profileBandWrapper--SO4U7{box-shadow:0 1px 0 rgba(0,0,0,.12);flex-shrink:0;margin-bottom:1px}.ProfileBand-profileBand--arzRh{align-items:flex-start;background-color:#fff;display:flex;padding:16px 12px 16px 16px}.ProfileBand-profileBand--arzRh:after{content:"";font-size:0;min-height:inherit}.ProfileBand-inactive--DCQSZ{background:var(--mui-inactiveBackground)}.ProfileBand-profileIcon--sQyrJ{margin-right:12px}.ProfileBand-imageProfileIcon--ARcZw{height:48px;width:48px}.ProfileBand-profileInfo--kSnV3{display:flex;flex:1 1 50%;flex-direction:column}.ProfileBand-label--Sigpt{color:var(--mui-palette-text-primary);letter-spacing:.25px;line-height:1.2;white-space:break-spaces;word-break:break-word}.ProfileBand-label--Sigpt+.ProfileBand-specialInfo--bjxGx{margin-top:4px}.ProfileBand-secondaryLabel--tYf1j{color:var(--mui-palette-text-primary);display:inline-flex;font-size:14px;font-weight:400;line-height:16px;margin-top:2px;white-space:break-spaces}.ProfileBand-secondaryLabel--tYf1j+.ProfileBand-businessCard--sjn5N{margin-left:12px}.ProfileBand-businessCard--sjn5N{color:var(--mui-palette-text-secondary);display:inline-flex;font-size:14px;line-height:1.2;margin-top:4px;white-space:break-spaces}.ProfileBand-specialInfo--bjxGx{justify-content:space-between;margin-top:8px;width:100%}.ProfileBand-entityType--ndiVA,.ProfileBand-specialInfo--bjxGx{display:flex;flex-wrap:wrap}.ProfileBand-entityId--piIyT{color:var(--mui-palette-text-secondary);cursor:pointer;font-size:13px;white-space:nowrap}.ProfileBand-entityId--piIyT:hover{text-decoration:underline}',""]),i.locals={profileBandWrapper:"ProfileBand-profileBandWrapper--SO4U7",profileBand:"ProfileBand-profileBand--arzRh",inactive:"ProfileBand-inactive--DCQSZ",profileIcon:"ProfileBand-profileIcon--sQyrJ",imageProfileIcon:"ProfileBand-imageProfileIcon--ARcZw",profileInfo:"ProfileBand-profileInfo--kSnV3",label:"ProfileBand-label--Sigpt",specialInfo:"ProfileBand-specialInfo--bjxGx",secondaryLabel:"ProfileBand-secondaryLabel--tYf1j",businessCard:"ProfileBand-businessCard--sjn5N",entityType:"ProfileBand-entityType--ndiVA",entityId:"ProfileBand-entityId--piIyT"};const l=i},667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".ReadOnlyComplexAttribute-complexContainer--yjsJM{margin-top:1px}.ReadOnlyComplexAttribute-labelContainer--CSvAW{display:flex;min-height:18px}.ReadOnlyComplexAttribute-label--oWgRM{display:inline-flex;font-size:13px;letter-spacing:normal;line-height:16px;margin-left:2px;white-space:break-spaces}.ReadOnlyComplexAttribute-spacer--STEJp{flex:1}.ReadOnlyComplexAttribute-ovFalse--TsM5M{opacity:var(--mui-inactive-opacity)}",""]),i.locals={complexContainer:"ReadOnlyComplexAttribute-complexContainer--yjsJM",labelContainer:"ReadOnlyComplexAttribute-labelContainer--CSvAW",label:"ReadOnlyComplexAttribute-label--oWgRM",spacer:"ReadOnlyComplexAttribute-spacer--STEJp",ovFalse:"ReadOnlyComplexAttribute-ovFalse--TsM5M"};const l=i},5175:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".RolesEditor-container--B6YD6{align-items:center;display:flex;flex:1;margin-bottom:10px}.RolesEditor-deleteButton--MhasY{margin-left:8px}.RolesEditor-editedLabel--nWyiS{color:var(--mui-palette-text-secondary);font-style:italic;padding-left:8px}",""]),i.locals={container:"RolesEditor-container--B6YD6",deleteButton:"RolesEditor-deleteButton--MhasY",editedLabel:"RolesEditor-editedLabel--nWyiS"};const l=i},2739:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".RolesInput-roleContainer--VCRHy{width:100%}.RolesInput-valueContainer--oaLuC{margin-left:8px;width:0}",""]),i.locals={roleContainer:"RolesInput-roleContainer--VCRHy",valueContainer:"RolesInput-valueContainer--oaLuC"};const l=i},3628:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".ScreenProfileBand-profileBandNavigation--MVoc2{margin-bottom:10px}.ScreenProfileBand-navigationRow--0_3OP{align-items:center;display:flex;gap:8px}.ScreenProfileBand-comments--F3Q0N{display:flex;justify-content:flex-end}",""]),i.locals={profileBandNavigation:"ScreenProfileBand-profileBandNavigation--MVoc2",navigationRow:"ScreenProfileBand-navigationRow--0_3OP",comments:"ScreenProfileBand-comments--F3Q0N"};const l=i},2770:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".SelectionPopup-container--aTSSw{display:flex;flex-direction:column;flex-grow:1;height:var(--container-height)}.SelectionPopup-header--g6znZ{align-items:center;display:flex;font-size:16px;font-weight:500;letter-spacing:.15px;line-height:24px;margin-bottom:12px;margin-left:16px;margin-top:16px}.SelectionPopup-infoIcon--Xqa4s{color:var(--mui-palette-text-secondary);height:15px;margin-left:4px;width:15px}.SelectionPopup-searchInputContainer--fqmhp{flex-shrink:0;margin:0 16px 12px}.SelectionPopup-list--W3GPM{flex-grow:1;height:0;overflow:hidden;position:relative;width:100%}.SelectionPopup-list--W3GPM ul{padding-bottom:0;padding-top:0}",""]),i.locals={container:"SelectionPopup-container--aTSSw",header:"SelectionPopup-header--g6znZ",infoIcon:"SelectionPopup-infoIcon--Xqa4s",searchInputContainer:"SelectionPopup-searchInputContainer--fqmhp",list:"SelectionPopup-list--W3GPM"};const l=i},2526:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".SimpleAttribute-root--LPMgw{align-items:start;display:flex;justify-content:space-between}.SimpleAttribute-commentsContainer--lDEVV{height:15px;margin-right:-4px}.SimpleAttribute-attributeValue--LgWpO{vertical-align:middle;white-space:break-spaces;word-break:break-all}.SimpleAttribute-updateAttribute--xsl6E{background-color:var(--history-update-backgroundColor);margin-left:-4px;padding:0 4px;width:fit-content}.SimpleAttribute-updateAttribute--xsl6E,.SimpleAttribute-updateAttribute--xsl6E>a{color:var(--history-update-color)}.SimpleAttribute-insertAttribute--EVto1{width:fit-content}.SimpleAttribute-insertAttribute--EVto1,.SimpleAttribute-insertAttribute--EVto1>a{color:var(--history-insert-color)}.SimpleAttribute-deleteAttribute--BXcU4{background-color:var(--history-delete-backgroundColor);margin-left:-4px;padding:0 4px;text-decoration:line-through;width:fit-content}.SimpleAttribute-deleteAttribute--BXcU4,.SimpleAttribute-deleteAttribute--BXcU4>a{color:var(--history-delete-color)}.SimpleAttribute-multilineAttribute--rr1Ur{width:fit-content}.SimpleAttribute-ovFalse--DhdlL{opacity:var(--mui-inactive-opacity)}",""]),i.locals={root:"SimpleAttribute-root--LPMgw",commentsContainer:"SimpleAttribute-commentsContainer--lDEVV",attributeValue:"SimpleAttribute-attributeValue--LgWpO",updateAttribute:"SimpleAttribute-updateAttribute--xsl6E",insertAttribute:"SimpleAttribute-insertAttribute--EVto1",deleteAttribute:"SimpleAttribute-deleteAttribute--BXcU4",multilineAttribute:"SimpleAttribute-multilineAttribute--rr1Ur",ovFalse:"SimpleAttribute-ovFalse--DhdlL"};const l=i},8847:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".TagsEditor-container--E8VRj{align-items:center;display:flex;flex:1;margin-bottom:10px}.TagsEditor-deleteButton--KNGsc{margin-left:8px}.TagsEditor-editedLabel--obd5j{color:var(--mui-palette-text-secondary);font-style:italic;padding-left:8px}",""]),i.locals={container:"TagsEditor-container--E8VRj",deleteButton:"TagsEditor-deleteButton--KNGsc",editedLabel:"TagsEditor-editedLabel--obd5j"};const l=i},9431:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".TargetBox-root--IO44M{padding:36px 0 29px}.TargetBox-icon--w_p5L{height:190px;margin-bottom:24px;pointer-events:none;width:190px}.TargetBox-title--nusA5{color:var(--mui-palette-text-primary);font-size:20px;font-weight:500;line-height:24px;margin-bottom:8px}.TargetBox-description--e7a2m{color:var(--mui-palette-text-secondary);font-size:14px;line-height:16px;margin-bottom:24px}",""]),i.locals={root:"TargetBox-root--IO44M",icon:"TargetBox-icon--w_p5L",title:"TargetBox-title--nusA5",description:"TargetBox-description--e7a2m"};const l=i},1189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".VerificationButton-root--m6Isj{display:inline-block;margin-left:4px}.VerificationButton-root--m6Isj .VerificationButton-startIcon--Ky6VA{margin-right:4px}",""]),i.locals={root:"VerificationButton-root--m6Isj",startIcon:"VerificationButton-startIcon--Ky6VA"};const l=i},5833:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".CreateHierarchyDialog-dialog--DFFo1{width:600px}.CreateHierarchyDialog-dialogTitle--UFSds{padding:16px 13px}.CreateHierarchyDialog-dialogContent--Axvsf{display:flex;flex-direction:column;gap:16px;padding:20px 16px}.CreateHierarchyDialog-textField--hkaGB{height:44px}.CreateHierarchyDialog-textFieldLabel--SQoiI{font-size:14px;padding-left:4px}.CreateHierarchyDialog-formLabelTitle--p4MVO{display:block;font-size:16px;padding-bottom:8px}.CreateHierarchyDialog-dialogActions--OAE_f{padding:40px 16px 10px 8px}",""]),i.locals={dialog:"CreateHierarchyDialog-dialog--DFFo1",dialogTitle:"CreateHierarchyDialog-dialogTitle--UFSds",dialogContent:"CreateHierarchyDialog-dialogContent--Axvsf",textField:"CreateHierarchyDialog-textField--hkaGB",textFieldLabel:"CreateHierarchyDialog-textFieldLabel--SQoiI",formLabelTitle:"CreateHierarchyDialog-formLabelTitle--p4MVO",dialogActions:"CreateHierarchyDialog-dialogActions--OAE_f"};const l=i},734:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".HierarchyCreationScreen-creationButtons--BrOQz{align-items:center;display:flex;flex-direction:column;gap:16px;margin:24px 0}.HierarchyCreationScreen-orText--Wq7Aa{color:var(--mui-palette-text-secondary);font-size:14px;letter-spacing:.24px}",""]),i.locals={creationButtons:"HierarchyCreationScreen-creationButtons--BrOQz",orText:"HierarchyCreationScreen-orText--Wq7Aa"};const l=i},3110:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".HierarchyHeader-headerContainer--i8NFh{display:flex;flex-direction:column;margin-bottom:6px}.HierarchyHeader-header--qNYQr{align-items:center;box-shadow:0 1px 0 rgba(0,0,0,.12);display:flex;font-size:16px;justify-content:space-between}",""]),i.locals={headerContainer:"HierarchyHeader-headerContainer--i8NFh",header:"HierarchyHeader-header--qNYQr"};const l=i},3872:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".HierarchyTreeListItem-container--rAVHe{align-items:center;display:inline-flex;gap:8px;line-height:20px}.HierarchyTreeListItem-icon--G7Zhm{height:16px;width:16px}.HierarchyTreeListItem-label--IsA3m{align-items:center;color:var(--mui-palette-text-primary);display:inline-flex}.HierarchyTreeListItem-label--IsA3m:hover{color:var(--mui-palette-primary-main)}.HierarchyTreeListItem-currentEntity--qozy7{font-weight:600}",""]),i.locals={container:"HierarchyTreeListItem-container--rAVHe",icon:"HierarchyTreeListItem-icon--G7Zhm",label:"HierarchyTreeListItem-label--IsA3m",currentEntity:"HierarchyTreeListItem-currentEntity--qozy7"};const l=i},2614:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".HierarchyTypeSelector-hierarchyTypeSelector--EFdYu{min-width:200px;opacity:1}.HierarchyTypeSelector-filledInputRoot--tjx3E{border-radius:4px}.HierarchyTypeSelector-valueContainer--x4SaZ{margin-left:16px;width:auto}",""]),i.locals={hierarchyTypeSelector:"HierarchyTypeSelector-hierarchyTypeSelector--EFdYu",filledInputRoot:"HierarchyTypeSelector-filledInputRoot--tjx3E",valueContainer:"HierarchyTypeSelector-valueContainer--x4SaZ"};const l=i},1631:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".ImportHierarchyDialog-dialog--KNElF{width:600px}.ImportHierarchyDialog-dialogTitle--nRzF9{padding:16px 13px}.ImportHierarchyDialog-dialogContent--_RCJB{padding:20px 16px}.ImportHierarchyDialog-dialogActions--Dp5tZ{padding:40px 16px 10px 8px}.ImportHierarchyDialog-templateSection--RY8sL{align-items:center;background:var(--mui-palette-background-default);border-radius:6px;display:flex;justify-content:space-between;margin-bottom:16px;padding:16px}.ImportHierarchyDialog-templateInfo--YsnOJ{display:flex;flex-direction:column;gap:6px;max-width:334px}.ImportHierarchyDialog-templateDescription--r_Vor{color:var(--mui-palette-text-secondary);font-size:13px}.ImportHierarchyDialog-dropZone--xjrJo{flex-direction:column;gap:8px;padding-top:15px}.ImportHierarchyDialog-dropZone--xjrJo,.ImportHierarchyDialog-root--lCoU8{align-items:center;display:flex;justify-content:center}.ImportHierarchyDialog-root--lCoU8{box-sizing:border-box;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;height:100%;overflow:auto;padding:10px}.ImportHierarchyDialog-root--lCoU8,.ImportHierarchyDialog-root_embedded--gFubi{min-height:190px}.ImportHierarchyDialog-embedded--zWomL{flex-shrink:0;height:160px;width:160px}.ImportHierarchyDialog-textBox--fwubx{align-items:center;display:flex;flex-direction:column;margin-top:16px;max-width:500px}.ImportHierarchyDialog-text--wLm6G{color:var(--mui-palette-text-secondary);font-size:20px;font-weight:400;letter-spacing:.25px}.ImportHierarchyDialog-orDivider--_v4ci{align-items:center;display:flex;gap:12px;margin:24px 0}.ImportHierarchyDialog-dividerLine--xYGql{background:var(--mui-palette-divider);flex:1;height:1px}.ImportHierarchyDialog-orText--G1wqU{color:var(--mui-palette-text-secondary);font-size:12px;letter-spacing:1px}.ImportHierarchyDialog-fileRow--CaeI6{align-items:center;display:flex;gap:12px}.ImportHierarchyDialog-fileInput--xlMyv{display:none}.ImportHierarchyDialog-fileName--aRNwg{background:rgba(0,0,0,.03);border-radius:4px;color:var(--mui-palette-text-secondary);flex:1;font-size:14px;padding:10px 12px}.ImportHierarchyDialog-fileNameSelected--J74TU{color:var(--mui-palette-text-primary)}",""]),i.locals={dialog:"ImportHierarchyDialog-dialog--KNElF",dialogTitle:"ImportHierarchyDialog-dialogTitle--nRzF9",dialogContent:"ImportHierarchyDialog-dialogContent--_RCJB",dialogActions:"ImportHierarchyDialog-dialogActions--Dp5tZ",templateSection:"ImportHierarchyDialog-templateSection--RY8sL",templateInfo:"ImportHierarchyDialog-templateInfo--YsnOJ",templateDescription:"ImportHierarchyDialog-templateDescription--r_Vor",dropZone:"ImportHierarchyDialog-dropZone--xjrJo",root:"ImportHierarchyDialog-root--lCoU8",root_embedded:"ImportHierarchyDialog-root_embedded--gFubi",embedded:"ImportHierarchyDialog-embedded--zWomL",textBox:"ImportHierarchyDialog-textBox--fwubx",text:"ImportHierarchyDialog-text--wLm6G",orDivider:"ImportHierarchyDialog-orDivider--_v4ci",dividerLine:"ImportHierarchyDialog-dividerLine--xYGql",orText:"ImportHierarchyDialog-orText--G1wqU",fileRow:"ImportHierarchyDialog-fileRow--CaeI6",fileInput:"ImportHierarchyDialog-fileInput--xlMyv",fileName:"ImportHierarchyDialog-fileName--aRNwg",fileNameSelected:"ImportHierarchyDialog-fileNameSelected--J74TU"};const l=i},5670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9601),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,".InternalHierarchyScreen-hierarchyView--iHF8w{background-color:var(--mui-palette-background-default);bottom:0;left:0;position:absolute;right:0;top:0}.InternalHierarchyScreen-hierarchyContainer--l1Wff,.InternalHierarchyScreen-hierarchyView--iHF8w{display:flex;flex-direction:column;overflow:hidden}.InternalHierarchyScreen-hierarchyContainer--l1Wff{background-color:var(--mui-palette-background-paper);border-radius:4px;box-shadow:1px 4px 4px 1px rgba(0,0,0,.25);flex:1 1 auto;margin:20px 16px 10px;min-height:0}.InternalHierarchyScreen-hierarchyTreeContainer--I28Q7{flex:1 1 auto;overflow:auto;padding:16px 0;width:100%}",""]),i.locals={hierarchyView:"InternalHierarchyScreen-hierarchyView--iHF8w",hierarchyContainer:"InternalHierarchyScreen-hierarchyContainer--l1Wff",hierarchyTreeContainer:"InternalHierarchyScreen-hierarchyTreeContainer--I28Q7"};const l=i},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(i[s]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&i[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},9601:e=>{"use strict";e.exports=function(e){return e[1]}},3463:(e,t,n)=>{"use strict";var r=n(8570),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g<i.length;++g){var v=i[g];if(!(o[v]||r&&r[v]||h&&h[v]||l&&l[v])){var y=p(n,v);try{u(t,v,y)}catch(e){}}}}return t}},7677:e=>{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},9612:(e,t,n)=>{var r=n(2118),a=n(6909),o=n(8138),i=n(4174),l=n(7942);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=a,s.prototype.get=o,s.prototype.has=i,s.prototype.set=l,e.exports=s},235:(e,t,n)=>{var r=n(3945),a=n(1846),o=n(8028),i=n(2344),l=n(4769);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=a,s.prototype.get=o,s.prototype.has=i,s.prototype.set=l,e.exports=s},326:(e,t,n)=>{var r=n(8761)(n(7772),"Map");e.exports=r},6738:(e,t,n)=>{var r=n(2411),a=n(6417),o=n(6928),i=n(9493),l=n(4150);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=a,s.prototype.get=o,s.prototype.has=i,s.prototype.set=l,e.exports=s},857:(e,t,n)=>{var r=n(7772).Symbol;e.exports=r},343:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}},2218:(e,t,n)=>{var r=n(1225);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3324:(e,t,n)=>{var r=n(7297),a=n(3812);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[a(t[n++])];return n&&n==o?e:void 0}},3366:(e,t,n)=>{var r=n(857),a=n(2107),o=n(7157),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},6840:(e,t,n)=>{var r=n(1049),a=n(7394),o=n(9259),i=n(7035),l=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,d=u.hasOwnProperty,p=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(r(e)?p:l).test(i(e))}},1054:(e,t,n)=>{var r=n(857),a=n(343),o=n(6152),i=n(4795),l=r?r.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return a(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},1704:(e,t,n)=>{var r=n(2153),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},7297:(e,t,n)=>{var r=n(6152),a=n(1401),o=n(4452),i=n(6188);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:o(i(e))}},4019:(e,t,n)=>{var r=n(7772)["__core-js_shared__"];e.exports=r},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},7937:(e,t,n)=>{var r=n(8304);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},8761:(e,t,n)=>{var r=n(6840),a=n(8109);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},2107:(e,t,n)=>{var r=n(857),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[l]=n:delete e[l]),a}},8109:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},2118:(e,t,n)=>{var r=n(9191);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},6909:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},8138:(e,t,n)=>{var r=n(9191),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},4174:(e,t,n)=>{var r=n(9191),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},7942:(e,t,n)=>{var r=n(9191);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},1401:(e,t,n)=>{var r=n(6152),a=n(4795),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}},8304:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7394:(e,t,n)=>{var r,a=n(4019),o=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},3945:e=>{e.exports=function(){this.__data__=[],this.size=0}},1846:(e,t,n)=>{var r=n(2218),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():a.call(t,n,1),--this.size,0))}},8028:(e,t,n)=>{var r=n(2218);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},2344:(e,t,n)=>{var r=n(2218);e.exports=function(e){return r(this.__data__,e)>-1}},4769:(e,t,n)=>{var r=n(2218);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},2411:(e,t,n)=>{var r=n(9612),a=n(235),o=n(326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||a),string:new r}}},6417:(e,t,n)=>{var r=n(7937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6928:(e,t,n)=>{var r=n(7937);e.exports=function(e){return r(this,e).get(e)}},9493:(e,t,n)=>{var r=n(7937);e.exports=function(e){return r(this,e).has(e)}},4150:(e,t,n)=>{var r=n(7937);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},7777:(e,t,n)=>{var r=n(733);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},9191:(e,t,n)=>{var r=n(8761)(Object,"create");e.exports=r},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),a="object"==typeof self&&self&&self.Object===Object&&self,o=r||a||Function("return this")();e.exports=o},4452:(e,t,n)=>{var r=n(7777),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(o,"$1"):n||e)})),t}));e.exports=i},3812:(e,t,n)=>{var r=n(4795);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7035:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},4073:(e,t,n)=>{var r=n(9259),a=n(1100),o=n(7642),i=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,d,p,f,m=0,h=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,m=t,d=e.apply(r,n)}function b(e){var n=e-f;return void 0===f||n>=t||n<0||g&&e-m>=c}function x(){var e=a();if(b(e))return w(e);p=setTimeout(x,function(e){var n=t-(e-f);return g?l(n,c-(e-m)):n}(e))}function w(e){return p=void 0,v&&s?y(e):(s=u=void 0,d)}function E(){var e=a(),n=b(e);if(s=arguments,u=this,f=e,n){if(void 0===p)return function(e){return m=e,p=setTimeout(x,t),h?y(e):d}(f);if(g)return clearTimeout(p),p=setTimeout(x,t),y(f)}return void 0===p&&(p=setTimeout(x,t)),d}return t=o(t)||0,r(n)&&(h=!!n.leading,c=(g="maxWait"in n)?i(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==p&&clearTimeout(p),m=0,s=f=u=p=void 0},E.flush=function(){return void 0===p?d:w(a())},E}},1225:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2579:(e,t,n)=>{var r=n(3324);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},6152:e=>{var t=Array.isArray;e.exports=t},1049:(e,t,n)=>{var r=n(3366),a=n(9259);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),a=n(5125);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},733:(e,t,n)=>{var r=n(6738);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},1100:(e,t,n)=>{var r=n(7772);e.exports=function(){return r.Date.now()}},2436:(e,t,n)=>{var r=n(4073),a=n(9259);e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return a(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),r(e,t,{leading:o,maxWait:t,trailing:i})}},7642:(e,t,n)=>{var r=n(1704),a=n(9259),o=n(4795),i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},6188:(e,t,n)=>{var r=n(1054);e.exports=function(e){return null==e?"":r(e)}},7320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var o,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var u in o=Object(arguments[s]))n.call(o,u)&&(l[u]=o[u]);if(t){i=t(o);for(var c=0;c<i.length;c++)r.call(o,i[c])&&(l[i[c]]=o[i[c]])}}return l}},7467:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.ForwardRef=c,t.isMemo=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case a:case i:case o:case d:case p:return e;default:switch(e=e&&e.$$typeof){case u:case s:case c:case m:case f:case l:return e;default:return t}}case r:return t}}}(e)===f}},1818:(e,t,n)=>{"use strict";e.exports=n(7467)},500:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(8156),i=d(o),l=d(n(5099)),s=d(n(3666)),u=d(n(2705)),c=n(9680);function d(e){return e&&e.__esModule?e:{default:e}}var p=function(){return!0},f=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(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)}(t,e),a(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,s.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,a=n.onSuggestionHighlighted,o=n.highlightFirstSuggestion;if(!(0,s.default)(r,e.suggestions)&&r.length>0&&o)this.highlightFirstSuggestion();else if(a){var i=this.getHighlightedSuggestion();i!=t.highlightedSuggestion&&a({suggestion:i})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(a){var o=a.valueBeforeUpDown;return null===t?o=null:null===o&&void 0!==n&&(o=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:o}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,a=n.multiSection,o=n.getSectionSuggestions;return a?o(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,a=r.value,o=r.onChange;t!==a&&o(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,a=n.value;return t.length>0&&r(a)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,a=t.renderInputComponent,o=t.onSuggestionsFetchRequested,l=t.renderSuggestion,s=t.inputProps,d=t.multiSection,f=t.renderSectionTitle,m=t.id,h=t.getSectionSuggestions,g=t.theme,v=t.getSuggestionValue,y=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,x=this.state,w=x.isFocused,E=x.isCollapsed,C=x.highlightedSectionIndex,S=x.highlightedSuggestionIndex,O=x.valueBeforeUpDown,k=y?p:this.props.shouldRenderSuggestions,A=s.value,P=s.onFocus,T=s.onKeyDown,D=this.willRenderSuggestions(this.props),M=y||w&&!E&&D,_=M?n:[],I=r({},s,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=k(A);e.setState({isFocused:!0,isCollapsed:!n}),P&&P(t),n&&o({value:A,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,a=k(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!a})),a?o({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var a=t.keyCode;switch(a){case 40:case 38:if(E)k(A)&&(o({value:A,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var i,l=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex;i=null===s?null===O?A:O:e.getSuggestionValueByIndex(l,s),e.updateHighlightedSuggestion(l,s,A),e.maybeCallOnChange(t,i,40===a?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var u=e.getHighlightedSuggestion();if(M&&!y&&e.closeSuggestions(),null!=u){var c=v(u);e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:u,suggestionValue:c,suggestionIndex:S,sectionIndex:C,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:M&&t.preventDefault();var d=M&&!y;null===O?d||(e.maybeCallOnChange(t,"","escape"),k("")?o({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,O,"escape"),d?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}T&&T(t)}}),N={query:this.getQuery()};return i.default.createElement(u.default,{multiSection:d,items:_,renderInputComponent:a,renderItemsContainer:this.renderSuggestionsContainer,renderItem:l,renderItemData:N,renderSectionTitle:f,getSectionItems:h,highlightedSectionIndex:C,highlightedItemIndex:S,inputProps:I,itemProps:this.itemProps,theme:(0,c.mapToAutowhateverTheme)(g),id:m,ref:this.storeAutowhateverRef})}}]),t}(o.Component);f.propTypes={suggestions:l.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:l.default.func,onSuggestionHighlighted:l.default.func,renderInputComponent:l.default.func,renderSuggestionsContainer:l.default.func,getSuggestionValue:l.default.func.isRequired,renderSuggestion:l.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:l.default.func,alwaysRenderSuggestions:l.default.bool,multiSection:l.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:l.default.bool,highlightFirstSuggestion:l.default.bool,theme:l.default.object,id:l.default.string},f.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return i.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:c.defaultTheme,id:"1"};var m=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,a=n.itemIndex;e.updateHighlightedSuggestion(r,a),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,a=r.alwaysRenderSuggestions,o=r.onSuggestionSelected,i=r.onSuggestionsFetchRequested;o&&o(t,n),a?i({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,a=n.focusInputOnSuggestionClick,o=e.getSuggestionIndices(e.findSuggestionElement(t.target)),i=o.sectionIndex,l=o.suggestionIndex,s=e.getSuggestion(i,l),u=e.props.getSuggestionValue(s);e.maybeCallOnChange(t,u,"click"),e.onSuggestionSelected(t,{suggestion:s,suggestionValue:u,suggestionIndex:l,sectionIndex:i,method:"click"}),r||e.closeSuggestions(),!0===a?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,a=n.value,o=n.onBlur,i=e.getHighlightedSuggestion(),l=r(a);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!l}),o&&o(e.blurEvent,{highlightedSuggestion:i})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=f},359:(e,t,n)=>{"use strict";e.exports=n(500).default},9680:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},1756:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(8156),i=p(o),l=p(n(5099)),s=p(n(3145)),u=p(n(4735)),c=p(n(4355)),d=p(n(367));function p(e){return e&&e.__esModule?e:{default:e}}var f={},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,a=t.highlightedSectionIndex,o=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var i="ArrowDown"===e.key?"next":"prev",l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(n.sectionIterator[i]([a,o]),2),s=l[0],u=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:s,newHighlightedItemIndex:u});break;default:r.onKeyDown(e,{highlightedSectionIndex:a,highlightedItemIndex:o})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(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)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,s.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,a=n.items,o=n.renderItem,l=n.renderItemData,s=n.renderSectionTitle,u=n.highlightedSectionIndex,p=n.highlightedItemIndex,f=n.itemProps;return a.map((function(n,a){var m="react-autowhatever-"+r+"-",h=m+"section-"+a+"-",g=0===a;return i.default.createElement("div",t(h+"container","sectionContainer",g&&"sectionContainerFirst"),i.default.createElement(c.default,{section:n,renderSectionTitle:s,theme:t,sectionKeyPrefix:h}),i.default.createElement(d.default,{items:e.sectionsItems[a],itemProps:f,renderItem:o,renderItemData:l,sectionIndex:a,highlightedItemIndex:u===a?p:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,a=n.renderItem,o=n.renderItemData,l=n.highlightedSectionIndex,s=n.highlightedItemIndex,u=n.itemProps;return i.default.createElement(d.default,{items:e,itemProps:u,renderItem:a,renderItemData:o,highlightedItemIndex:null===l?s:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,a=t.multiSection,o=t.renderInputComponent,l=t.renderItemsContainer,s=t.highlightedSectionIndex,u=t.highlightedItemIndex,c=this.state.isInputFocused,d=a?this.renderSections():this.renderItems(),p=null!==d,f=this.getItemId(s,u),m="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":m,"aria-expanded":p},e("react-autowhatever-"+n+"-container","container",p&&"containerOpen"),this.props.containerProps),g=o(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":f},e("react-autowhatever-"+n+"-input","input",p&&"inputOpen",c&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),v=l({containerProps:r({id:m,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:d});return i.default.createElement("div",h,g,v)}}]),t}(o.Component);m.propTypes={id:l.default.string,multiSection:l.default.bool,renderInputComponent:l.default.func,renderItemsContainer:l.default.func,items:l.default.array.isRequired,renderItem:l.default.func,renderItemData:l.default.object,renderSectionTitle:l.default.func,getSectionItems:l.default.func,containerProps:l.default.object,inputProps:l.default.object,itemProps:l.default.oneOfType([l.default.object,l.default.func]),highlightedSectionIndex:l.default.number,highlightedItemIndex:l.default.number,theme:l.default.oneOfType([l.default.object,l.default.array])},m.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return i.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return i.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:f,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:f,inputProps:f,itemProps:f,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=m},5567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(8156),i=u(o),l=u(n(5099)),s=u(n(9952));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,a=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:a})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,a=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:a})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,a=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:a})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,a=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:a})},c(r,n)}return function(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)}(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,a=e.renderItem,o=e.renderItemData,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete l.sectionIndex,delete l.itemIndex,"function"==typeof l.onMouseEnter&&(l.onMouseEnter=this.onMouseEnter),"function"==typeof l.onMouseLeave&&(l.onMouseLeave=this.onMouseLeave),"function"==typeof l.onMouseDown&&(l.onMouseDown=this.onMouseDown),"function"==typeof l.onClick&&(l.onClick=this.onClick),i.default.createElement("li",r({role:"option"},l,{ref:this.storeItemReference}),a(n,r({isHighlighted:t},o)))}}]),t}(o.Component);d.propTypes={sectionIndex:l.default.number,isHighlighted:l.default.bool.isRequired,itemIndex:l.default.number.isRequired,item:l.default.any.isRequired,renderItem:l.default.func.isRequired,renderItemData:l.default.object.isRequired,onMouseEnter:l.default.func,onMouseLeave:l.default.func,onMouseDown:l.default.func,onClick:l.default.func},t.default=d},367:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(8156),i=c(o),l=c(n(5099)),s=c(n(5567)),u=c(n(9952));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},d(r,n)}return function(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)}(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,a=t.itemProps,o=t.renderItem,l=t.renderItemData,u=t.sectionIndex,c=t.highlightedItemIndex,d=t.getItemId,p=t.theme,f=t.keyPrefix,m=null===u?f:f+"section-"+u+"-",h="function"==typeof a;return i.default.createElement("ul",r({role:"listbox"},p(m+"items-list","itemsList")),n.map((function(t,n){var f=0===n,g=n===c,v=m+"item-"+n,y=h?a({sectionIndex:u,itemIndex:n}):a,b=r({id:d(u,n),"aria-selected":g},p(v,"item",f&&"itemFirst",g&&"itemHighlighted"),y);return g&&(b.ref=e.storeHighlightedItemReference),i.default.createElement(s.default,r({},b,{sectionIndex:u,isHighlighted:g,itemIndex:n,item:t,renderItem:o,renderItemData:l}))})))}}]),t}(o.Component);p.propTypes={items:l.default.array.isRequired,itemProps:l.default.oneOfType([l.default.object,l.default.func]),renderItem:l.default.func.isRequired,renderItemData:l.default.object.isRequired,sectionIndex:l.default.number,highlightedItemIndex:l.default.number,onHighlightedItemChange:l.default.func.isRequired,getItemId:l.default.func.isRequired,theme:l.default.func.isRequired,keyPrefix:l.default.string.isRequired},p.defaultProps={sectionIndex:null},t.default=p},4355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(8156),o=s(a),i=s(n(5099)),l=s(n(9952));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(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)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,a=e.sectionKeyPrefix,i=n(t);return i?o.default.createElement("div",r(a+"title","sectionTitle"),i):null}}]),t}(a.Component);u.propTypes={section:i.default.any.isRequired,renderSectionTitle:i.default.func.isRequired,theme:i.default.func.isRequired,sectionKeyPrefix:i.default.string.isRequired},t.default=u},9952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="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};t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!0;var i={},l=void 0,s=void 0;for(l=0,s=r.length;l<s;l++)i[r[l]]=!0;for(l=0,s=a.length;l<s;l++){var u=a[l],c=e[u],d=t[u];if(c!==d){if(!i[u]||null===c||null===d||"object"!==(void 0===c?"undefined":n(c))||"object"!==(void 0===d?"undefined":n(d)))return!0;var p=Object.keys(c),f=Object.keys(d);if(p.length!==f.length)return!0;for(var m=0,h=p.length;m<h;m++){var g=p[m];if(c[g]!==d[g])return!0}}}return!1}},2705:(e,t,n)=>{"use strict";e.exports=n(1756).default},8018:(e,t,n)=>{"use strict";var r=n(1600),a=n(7425);t.ZP=void 0;var o=r(n(3100)),i=r(n(8870)),l=r(n(5297)),s=r(n(8230)),u=r(n(421)),c=r(n(1147)),d=r(n(6290)),p=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(8156)),f=n(901),m=r(n(1230)),h=r(n(6496)),g=r(n(5099)),v=r(n(835)),y=r(n(7339)),b=r(n(8310));function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}var w=n(4841).deepPurple[500],E=function(e){(0,s.default)(a,e);var t,n,r=(t=a,n=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}}(),function(){var e,r=(0,c.default)(t);if(n){var a=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function a(){var e;(0,o.default)(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e=r.call.apply(r,[this].concat(n)),(0,d.default)((0,l.default)(e),"buildUrl",(function(t){var n=e.props.storagePath;return t?t.startsWith("http:")||t.startsWith("https:")?t:n+t.replace(/^\/+/,""):""})),(0,d.default)((0,l.default)(e),"getFallbackAvatar",(function(){var t=e.props,n=t.entityType,r=t.classes,a=t.backgroundColor,o=t.color,i=t.className,l=(0,v.default)(n);return p.default.createElement(f.Avatar,{className:(0,b.default)(i,r.avatar),style:{border:"2px solid ".concat(n.typeColor||w),backgroundColor:a||n.typeColor||w,color:o}},l&&l.charAt(0)||p.default.createElement(h.default,null))})),e}return(0,i.default)(a,[{key:"render",value:function(){var e=this.props,t=e.entityType,n=e.classes,r=e.className,a=t.typeIcon||t.typeImage;return a?p.default.createElement(f.Avatar,{className:(0,b.default)(r,n.avatar),style:{border:"2px solid ".concat(t.typeColor||w),backgroundColor:"#FFFFFF"},src:this.buildUrl(a)},this.getFallbackAvatar()):this.getFallbackAvatar()}}]),a}(p.PureComponent);(0,d.default)(E,"propTypes",{entityType:g.default.shape({typeColor:g.default.string,typeIcon:g.default.string,typeImage:g.default.string,label:g.default.string,uri:g.default.string}),className:g.default.string,classes:g.default.shape({avatar:g.default.string}),storagePath:g.default.string,backgroundColor:g.default.string,color:g.default.string}),(0,d.default)(E,"defaultProps",{storagePath:"https://reltio-images.s3.amazonaws.com/api/",entityType:{},color:"#FFFFFF"});var C=(0,m.default)(y.default)(E);t.ZP=C},7339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={avatar:{"& img":{display:"flex",flexDirection:"row",alignItems:"center","&::before":{width:"100%"}}}}},4660:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(8156)),o=r(n(5099)),i=r(n(3627)),l=r(n(9233)),s=r(n(4294)),u=r(n(5751)),c=r(n(8310));function d(e){var t=e.classes,n=e.title,r=e.message;return a.default.createElement("div",null,a.default.createElement("span",{className:t.errorTitle},n),a.default.createElement("span",{className:t.errorMessage},r))}d.defaultProps={title:u.default.text("Error:"),message:u.default.text("Something was wrong"),classes:{}},d.propTypes={title:o.default.string,message:o.default.string,classes:o.default.object};var p=function(e){var t,n=e.error,r=e.onClose,o=e.style,p=e.classes,f=e.className,m=u.default.text("Close");if(a.default.isValidElement(n))t=n;else{var h=n||{},g=h.title,v=h.message;t=a.default.createElement(d,{classes:p,title:g,message:v})}return a.default.createElement("div",{className:(0,c.default)(p.errorBlock,f),style:o,"data-reltio-id":"error-message"},a.default.createElement("div",{className:p.descriptionBlock},t),a.default.createElement("div",{className:p.closeIconContainer},a.default.createElement(i.default,{title:m,placement:"bottom"},a.default.createElement(l.default,{onClick:r,"aria-label":m,size:"large"},a.default.createElement(s.default,null)))))};p.propTypes={id:o.default.oneOfType([o.default.string,o.default.number]),error:o.default.oneOfType([o.default.node,o.default.shape({title:o.default.string,message:o.default.string})]),style:o.default.object,onClose:o.default.func,className:o.default.oneOfType([o.default.string,o.default.object]),classes:o.default.object},p.defaultProps={classes:{}};var f=p;t.default=f},4176:(e,t,n)=>{"use strict";var r=n(1600),a=n(7425);t.ZP=void 0;var o=r(n(3100)),i=r(n(8870)),l=r(n(5297)),s=r(n(8230)),u=r(n(421)),c=r(n(1147)),d=r(n(6290)),p=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(8156)),f=r(n(5099)),m=n(2585),h=r(n(4660)),g=r(n(1230)),v=r(n(1444));function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}var b=function(e){(0,s.default)(a,e);var t,n,r=(t=a,n=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}}(),function(){var e,r=(0,c.default)(t);if(n){var a=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function a(e){var t;return(0,o.default)(this,a),t=r.call(this,e),(0,d.default)((0,l.default)(t),"processAutoCloseInterval",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.autoCloseInterval&&(t.timer&&(clearTimeout(t.timer),t.timer=null),e&&(t.timer=setTimeout((function(){t.handleCloseErrorMessage()}),t.autoCloseInterval)))})),a.$$instance=(0,l.default)(t),t.handleCloseErrorMessage=t.handleCloseErrorMessage.bind((0,l.default)(t)),t.state={errors:[]},t}return(0,i.default)(a,[{key:"handleCloseErrorMessage",value:function(){var e=this.state.errors,t=e.length;this.setState({errors:e.slice(0,t-1)}),this.processAutoCloseInterval(t>1)}},{key:"autoCloseInterval",get:function(){return 1e3*(this.props.autoCloseInterval||0)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.classes,r=this.state.errors,a=r.length,o=r[a-1];return p.default.createElement(m.TransitionGroup,null,Boolean(a)&&p.default.createElement(m.CSSTransition,{key:"errorMessage".concat(a),classNames:{enter:n.errorContainerEnter,enterActive:n.errorContainerEnterActive,exit:n.errorContainerExit,exitActive:n.errorContainerExitActive,appear:n.errorContainerEnter,appearActive:n.errorContainerEnterActive},timeout:{enter:600,exit:300}},p.default.createElement(h.default,{classes:n,onClose:this.handleCloseErrorMessage,error:o,className:t})))}}],[{key:"addError",value:function(e){a.$$instance&&(a.$$instance.setState({errors:a.$$instance.state.errors.concat(e)}),a.$$instance.processAutoCloseInterval())}}]),a}(p.PureComponent);b.propTypes={className:f.default.oneOfType([f.default.string,f.default.object]),classes:f.default.object,autoCloseInterval:f.default.number},b.defaultProps={classes:{}};var x=(0,g.default)(v.default)(b);t.ZP=x},1444:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(6290)),o="#FFFFFF";t.default=function(e){var t;return{errorContainer:{zIndex:2},errorContainerEnter:{opacity:0},errorContainerEnterActive:{opacity:1,transition:"opacity 600ms ease-in"},errorContainerExit:{opacity:1},errorContainerExitActive:{opacity:0,transition:"opacity 300ms ease-in"},errorBlock:(t={zIndex:2,color:o,position:"absolute",display:"flex",left:346,top:64,right:90,background:"linear-gradient(180deg, ".concat("#E54C4C"," 0%, ").concat("#F16262"," 100%)"),minHeight:48,justifyContent:"space-between",alignItems:"baseline",boxShadow:"0 0 24px 0 rgba(0,0,0,0.22)"},(0,a.default)(t,e.breakpoints.down("md"),{left:0,right:0}),(0,a.default)(t,e.breakpoints.down("lg"),{left:288,right:32}),(0,a.default)(t,e.breakpoints.down("xl"),{left:336,right:80}),(0,a.default)(t,e.breakpoints.up("xl"),{left:456,right:200}),t),descriptionBlock:{fontSize:13,padding:"20px 32px",alignSelf:"center",overflow:"hidden",textOverflow:"ellipsis"},errorTitle:{fontWeight:"bold",marginRight:7},errorMessage:{},closeIconContainer:{position:"relative","& button":{color:o,marginTop:5}}}}},835:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?(0,a.default)(e,"label")||(0,a.default)(e,"uri","").slice((0,a.default)(e,"uri","").lastIndexOf("/")+1):null};var a=r(n(2579))},6866:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case g:case h:case s:return e;default:return t}}case a:return t}}}function E(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||w(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},8570:(e,t,n)=>{"use strict";e.exports=n(6866)},4735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a,o=(a=n(5431))&&a.__esModule?a:{default:a},i=function(e){return e};t.default=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(Array.isArray(e)&&2===e.length?e:[e,null],2),n=t[0],a=t[1];return function(e){for(var t=arguments.length,l=Array(t>1?t-1:0),s=1;s<t;s++)l[s-1]=arguments[s];var u=l.map((function(e){return n[e]})).filter(i);return"string"==typeof u[0]||"function"==typeof a?{key:e,className:a?a.apply(void 0,r(u)):u.join(" ")}:{key:e,style:o.default.apply(void 0,[{}].concat(r(u)))}}},e.exports=t.default},5431:e=>{"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter((function(n){return t.call(e,n)}))}e.exports=Object.assign||function(e,t){for(var r,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){r=arguments[i],a=n(Object(r));for(var l=0;l<a.length;l++)o[a[l]]=r[a[l]]}return o}},5564:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(7896),a=n(1461),o=n(1665);function i(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}n(5099);var l=n(8156),s=n.n(l),u=n(3963),c=n(3668),d=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=i(n.className,r):n.setAttribute("class",i(n.className&&n.className.baseVal||"",r)));var n,r}))},p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),a=r[0],o=r[1];t.removeClasses(a,"exit"),t.addClass(a,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),a=r[0],o=r[1]?"appear":"enter";t.addClass(a,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),a=r[0],o=r[1]?"appear":"enter";t.removeClasses(a,o),t.addClass(a,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,a=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:a,activeClassName:r?a+"-active":n[e+"Active"],doneClassName:r?a+"-done":n[e+"Done"]}},t}(0,o.Z)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(r+=" "+a),"active"===n&&e&&(0,c.Q)(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,a=n.active,o=n.done;this.appliedClasses[t]={},r&&d(e,r),a&&d(e,a),o&&d(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,a.Z)(e,["classNames"]));return s().createElement(u.ZP,(0,r.Z)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(s().Component);p.defaultProps={classNames:""},p.propTypes={};const f=p},3963:(e,t,n)=>{"use strict";n.d(t,{d0:()=>m,cn:()=>h,Ix:()=>g,ZP:()=>b});var r=n(1461),a=n(1665),o=(n(5099),n(8156)),i=n.n(o),l=n(7111),s=n.n(l),u=n(8745),c=n(7008),d=n(3668),p="unmounted",f="exited",m="entering",h="entered",g="exiting",v=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var a,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(a=f,r.appearStatus=m):a=h:a=t.unmountOnExit||t.mountOnEnter?p:f,r.state={status:a},r.nextCallback=null,r}(0,a.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===p?{status:f}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==m&&n!==h&&(t=m):n!==m&&n!==h||(t=g)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===m){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s().findDOMNode(this);n&&(0,d.Q)(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===f&&this.setState({status:p})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[s().findDOMNode(this),r],o=a[0],i=a[1],l=this.getTimeouts(),c=r?l.appear:l.enter;!e&&!n||u.Z.disabled?this.safeSetState({status:h},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,i),this.safeSetState({status:m},(function(){t.props.onEntering(o,i),t.onTransitionEnd(c,(function(){t.safeSetState({status:h},(function(){t.props.onEntered(o,i)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s().findDOMNode(this);t&&!u.Z.disabled?(this.props.onExit(r),this.safeSetState({status:g},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:f},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:f},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],i=a[1];this.props.addEndListener(o,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===p)return null;var t=this.props,n=t.children,a=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i().createElement(c.Z.Provider,{value:null},"function"==typeof n?n(e,a):i().cloneElement(i().Children.only(n),a))},t}(i().Component);function y(){}v.contextType=c.Z,v.propTypes={},v.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:y,onEntering:y,onEntered:y,onExit:y,onExiting:y,onExited:y},v.UNMOUNTED=p,v.EXITED=f,v.ENTERING=m,v.ENTERED=h,v.EXITING=g;const b=v},1310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(1461),a=n(7896),o=n(753),i=n(1665),l=(n(5099),n(8156)),s=n.n(l),u=n(7008);function c(e,t){var n=Object.create(null);return e&&l.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,l.isValidElement)(e)?t(e):e}(e)})),n}function d(e,t,n){return null!=n[t]?n[t]:e.props[t]}function p(e,t,n){var r=c(e.children),a=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,a=Object.create(null),o=[];for(var i in e)i in t?o.length&&(a[i]=o,o=[]):o.push(i);var l={};for(var s in t){if(a[s])for(r=0;r<a[s].length;r++){var u=a[s][r];l[a[s][r]]=n(u)}l[s]=n(s)}for(r=0;r<o.length;r++)l[o[r]]=n(o[r]);return l}(t,r);return Object.keys(a).forEach((function(o){var i=a[o];if((0,l.isValidElement)(i)){var s=o in t,u=o in r,c=t[o],p=(0,l.isValidElement)(c)&&!c.props.in;!u||s&&!p?u||!s||p?u&&s&&(0,l.isValidElement)(c)&&(a[o]=(0,l.cloneElement)(i,{onExited:n.bind(null,i),in:c.props.in,exit:d(i,"exit",e),enter:d(i,"enter",e)})):a[o]=(0,l.cloneElement)(i,{in:!1}):a[o]=(0,l.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:d(i,"exit",e),enter:d(i,"enter",e)})}})),a}var f=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},m=function(e){function t(t,n){var r,a=(r=e.call(this,t,n)||this).handleExited.bind((0,o.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},r}(0,i.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,a=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,c(n.children,(function(e){return(0,l.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:d(e,"appear",n),enter:d(e,"enter",n),exit:d(e,"exit",n)})}))):p(e,a,o),firstRender:!1}},n.handleExited=function(e,t){var n=c(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,a.Z)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,a=(0,r.Z)(e,["component","childFactory"]),o=this.state.contextValue,i=f(this.state.children).map(n);return delete a.appear,delete a.enter,delete a.exit,null===t?s().createElement(u.Z.Provider,{value:o},i):s().createElement(u.Z.Provider,{value:o},s().createElement(t,a,i))},t}(s().Component);m.propTypes={},m.defaultProps={component:"div",childFactory:function(e){return e}};const h=m},7008:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(8156);const a=n.n(r)().createContext(null)},8745:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={disabled:!1}},2585:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CSSTransition:()=>r.Z,ReplaceTransition:()=>p,SwitchTransition:()=>C,Transition:()=>h.ZP,TransitionGroup:()=>c.Z,config:()=>S.Z});var r=n(5564),a=n(1461),o=n(1665),i=(n(5099),n(8156)),l=n.n(i),s=n(7111),u=n.n(s),c=n(1310),d=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}(0,o.Z)(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,a=this.props.children,o=l().Children.toArray(a)[t];if(o.props[e]&&(r=o.props)[e].apply(r,n),this.props[e]){var i=o.props.nodeRef?void 0:u().findDOMNode(this);this.props[e](i)}},n.render=function(){var e=this.props,t=e.children,n=e.in,r=(0,a.Z)(e,["children","in"]),o=l().Children.toArray(t),i=o[0],s=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,l().createElement(c.Z,r,n?l().cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):l().cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(l().Component);d.propTypes={};const p=d;var f,m,h=n(3963),g=n(7008),v="out-in",y="in-out",b=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},x=((f={})[v]=function(e){var t=e.current,n=e.changeState;return l().cloneElement(t,{in:!1,onExited:b(t,"onExited",(function(){n(h.d0,null)}))})},f[y]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,l().cloneElement(r,{in:!0,onEntered:b(r,"onEntered",(function(){n(h.d0)}))})]},f),w=((m={})[v]=function(e){var t=e.children,n=e.changeState;return l().cloneElement(t,{in:!0,onEntered:b(t,"onEntered",(function(){n(h.cn,l().cloneElement(t,{in:!0}))}))})},m[y]=function(e){var t=e.current,n=e.children,r=e.changeState;return[l().cloneElement(t,{in:!1,onExited:b(t,"onExited",(function(){r(h.cn,l().cloneElement(n,{in:!0}))}))}),l().cloneElement(n,{in:!0})]},m),E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={status:h.cn,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}(0,o.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===h.d0&&e.mode===y?{status:h.d0}:!t.current||((n=t.current)===(r=e.children)||l().isValidElement(n)&&l().isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:l().cloneElement(e.children,{in:!0})}:{status:h.Ix};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,a=this.state,o=a.status,i=a.current,s={children:n,current:i,changeState:this.changeState,status:o};switch(o){case h.d0:e=w[r](s);break;case h.Ix:e=x[r](s);break;case h.cn:e=i}return l().createElement(g.Z.Provider,{value:{isMounting:!this.appeared}},e)},t}(l().Component);E.propTypes={},E.defaultProps={mode:v};const C=E;var S=n(8745)},3668:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(e){return e.scrollTop}},1837:(e,t,n)=>{"use strict";n(7320);var r=n(8156),a=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),t.Fragment=o("react.fragment")}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:u,ref:c,props:o,_owner:i.current}}t.jsx=u,t.jsxs=u},2322:(e,t,n)=>{"use strict";e.exports=n(1837)},6475:(e,t)=>{"use strict";var n,r,a,o,i;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,s=null,u=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(u,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(u,0))},r=function(e,t){s=setTimeout(e,t)},a=function(){clearTimeout(s)},o=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,f=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var v=!1,y=null,b=-1,x=5,w=0;o=function(){return t.unstable_now()>=w},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,C=E.port2;E.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+x;try{y(!0,e)?C.postMessage(null):(v=!1,y=null)}catch(e){throw C.postMessage(null),e}}else v=!1},n=function(e){y=e,v||(v=!0,C.postMessage(null))},r=function(e,n){b=f((function(){e(t.unstable_now())}),n)},a=function(){m(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<A(a,t)))break e;e[r]=t,e[n]=a,n=r}}function O(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var o=2*(r+1)-1,i=e[o],l=o+1,s=e[l];if(void 0!==i&&0>A(i,n))void 0!==s&&0>A(s,i)?(e[r]=s,e[l]=n,r=l):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==s&&0>A(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function A(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],T=[],D=1,M=null,_=3,I=!1,N=!1,R=!1;function L(e){for(var t=O(T);null!==t;){if(null===t.callback)k(T);else{if(!(t.startTime<=e))break;k(T),t.sortIndex=t.expirationTime,S(P,t)}t=O(T)}}function j(e){if(R=!1,L(e),!N)if(null!==O(P))N=!0,n(F);else{var t=O(T);null!==t&&r(j,t.startTime-e)}}function F(e,n){N=!1,R&&(R=!1,a()),I=!0;var i=_;try{for(L(n),M=O(P);null!==M&&(!(M.expirationTime>n)||e&&!o());){var l=M.callback;if(null!==l){M.callback=null,_=M.priorityLevel;var s=l(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?M.callback=s:M===O(P)&&k(P),L(n)}else k(P);M=O(P)}if(null!==M)var u=!0;else{var c=O(T);null!==c&&r(j,c.startTime-n),u=!1}return u}finally{M=null,_=i,I=!1}}function V(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||I||(N=!0,n(F))},t.unstable_getCurrentPriorityLevel=function(){return _},t.unstable_getFirstCallbackNode=function(){return O(P)},t.unstable_next=function(e){switch(_){case 1:case 2:case 3:var t=3;break;default:t=_}var n=_;_=t;try{return e()}finally{_=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=_;_=e;try{return t()}finally{_=n}},t.unstable_scheduleCallback=function(e,o,i){var l=t.unstable_now();if("object"==typeof i&&null!==i){var s=i.delay;s="number"==typeof s&&0<s?l+s:l,i="number"==typeof i.timeout?i.timeout:V(e)}else i=V(e),s=l;return e={id:D++,callback:o,priorityLevel:e,startTime:s,expirationTime:i=s+i,sortIndex:-1},s>l?(e.sortIndex=s,S(T,e),null===O(P)&&e===O(T)&&(R?a():R=!0,r(j,s-l))):(e.sortIndex=i,S(P,e),N||I||(N=!0,n(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=O(P);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<M.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=_;return function(){var n=_;_=t;try{return e.apply(this,arguments)}finally{_=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},3145:e=>{"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function a(e){var a=t(e,2),o=a[0],i=a[1];return r?null===i||i===n[o]-1?null===(o=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(o))?[null,null]:[o,0]:[o,i+1]:0===n||i===n-1?[null,null]:null===i?[null,0]:[null,i+1]}return{next:a,prev:function(e){var a=t(e,2),o=a[0],i=a[1];return r?null===i||0===i?null===(o=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(o))?[null,null]:[o,n[o]-1]:[o,i-1]:0===n||0===i?[null,null]:null===i?[null,n-1]:[null,i-1]},isLast:function(e){return null===a(e)[1]}}}},3666:e=>{"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},6062:(e,t,n)=>{"use strict";var r,a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function i(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],a=0;a<e.length;a++){var l=e[a],s=t.base?l[0]+t.base:l[0],u=n[s]||0,c="".concat(s," ").concat(u);n[s]=u+1;var d=i(c),p={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(o[d].references++,o[d].updater(p)):o.push({identifier:c,updater:h(p,t),references:1}),r.push(c)}return r}function s(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function d(e,t,n,r){var a=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,a=n.media,o=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,m=0;function h(e,t){var n,r,a;if(t.singleton){var o=m++;n=f||(f=s(t)),r=d.bind(null,n,o,!1),a=d.bind(null,n,o,!0)}else n=s(t),r=p.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var a=i(n[r]);o[a].references--}for(var s=l(e,t),u=0;u<n.length;u++){var c=i(n[u]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=s}}}},4055:(e,t,n)=>{"use strict";e.exports=n.p+"5271a9e7b6651c852e93.png"},1884:t=>{"use strict";t.exports=e},8282:e=>{"use strict";e.exports=t},4419:e=>{"use strict";e.exports=n},7986:e=>{"use strict";e.exports=r},6496:e=>{"use strict";e.exports=a},5635:e=>{"use strict";e.exports=o},9659:e=>{"use strict";e.exports=i},9367:e=>{"use strict";e.exports=l},7433:e=>{"use strict";e.exports=s},3416:e=>{"use strict";e.exports=u},4058:e=>{"use strict";e.exports=c},4294:e=>{"use strict";e.exports=d},7517:e=>{"use strict";e.exports=p},6826:e=>{"use strict";e.exports=f},9272:e=>{"use strict";e.exports=m},4492:e=>{"use strict";e.exports=h},518:e=>{"use strict";e.exports=g},3062:e=>{"use strict";e.exports=v},4179:e=>{"use strict";e.exports=y},866:e=>{"use strict";e.exports=b},6800:e=>{"use strict";e.exports=x},997:e=>{"use strict";e.exports=w},8941:e=>{"use strict";e.exports=E},8515:e=>{"use strict";e.exports=C},9849:e=>{"use strict";e.exports=S},7867:e=>{"use strict";e.exports=O},6550:e=>{"use strict";e.exports=k},4501:e=>{"use strict";e.exports=A},9178:e=>{"use strict";e.exports=P},6157:e=>{"use strict";e.exports=T},8577:e=>{"use strict";e.exports=D},901:e=>{"use strict";e.exports=M},4886:e=>{"use strict";e.exports=_},7883:e=>{"use strict";e.exports=I},5743:e=>{"use strict";e.exports=N},1574:e=>{"use strict";e.exports=R},5206:e=>{"use strict";e.exports=L},3888:e=>{"use strict";e.exports=j},6089:e=>{"use strict";e.exports=F},2811:e=>{"use strict";e.exports=V},6091:e=>{"use strict";e.exports=B},7526:e=>{"use strict";e.exports=H},251:e=>{"use strict";e.exports=z},6177:e=>{"use strict";e.exports=U},480:e=>{"use strict";e.exports=Z},4635:e=>{"use strict";e.exports=W},6825:e=>{"use strict";e.exports=q},4511:e=>{"use strict";e.exports=$},485:e=>{"use strict";e.exports=K},9844:e=>{"use strict";e.exports=G},3167:e=>{"use strict";e.exports=Y},4496:e=>{"use strict";e.exports=X},3643:e=>{"use strict";e.exports=Q},9308:e=>{"use strict";e.exports=J},9233:e=>{"use strict";e.exports=ee},3732:e=>{"use strict";e.exports=te},8214:e=>{"use strict";e.exports=ne},1937:e=>{"use strict";e.exports=re},9681:e=>{"use strict";e.exports=ae},2004:e=>{"use strict";e.exports=oe},4437:e=>{"use strict";e.exports=ie},5106:e=>{"use strict";e.exports=le},8166:e=>{"use strict";e.exports=se},6791:e=>{"use strict";e.exports=ue},5746:e=>{"use strict";e.exports=ce},3526:e=>{"use strict";e.exports=de},3222:e=>{"use strict";e.exports=pe},7929:e=>{"use strict";e.exports=fe},4436:e=>{"use strict";e.exports=me},3625:e=>{"use strict";e.exports=he},5788:e=>{"use strict";e.exports=ge},1733:e=>{"use strict";e.exports=ve},4927:e=>{"use strict";e.exports=ye},3707:e=>{"use strict";e.exports=be},4596:e=>{"use strict";e.exports=xe},3754:e=>{"use strict";e.exports=we},2932:e=>{"use strict";e.exports=Ee},7290:e=>{"use strict";e.exports=Ce},6038:e=>{"use strict";e.exports=Se},3627:e=>{"use strict";e.exports=Oe},8759:e=>{"use strict";e.exports=ke},3893:e=>{"use strict";e.exports=Ae},4841:e=>{"use strict";e.exports=Pe},7655:e=>{"use strict";e.exports=Te},3290:e=>{"use strict";e.exports=De},8157:e=>{"use strict";e.exports=Me},3962:e=>{"use strict";e.exports=_e},9881:e=>{"use strict";e.exports=Ie},1230:e=>{"use strict";e.exports=Ne},8310:e=>{"use strict";e.exports=Re},2308:e=>{"use strict";e.exports=Le},2396:e=>{"use strict";e.exports=je},3192:e=>{"use strict";e.exports=Fe},5099:e=>{"use strict";e.exports=Ve},3288:e=>{"use strict";e.exports=Be},8156:e=>{"use strict";e.exports=He},7111:e=>{"use strict";e.exports=ze},4756:e=>{"use strict";e.exports=Ue},5751:e=>{"use strict";e.exports=Ze},5297: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.__esModule=!0,e.exports.default=e.exports},3100:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},8870:(e,t,n)=>{var r=n(7739);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,r(a.key),a)}}e.exports=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},6290:(e,t,n)=>{var r=n(7739);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},1147:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8230:(e,t,n)=>{var r=n(8560);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},1600:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},421:(e,t,n)=>{var r=n(7425).default,a=n(5297);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)},e.exports.__esModule=!0,e.exports.default=e.exports},8560:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8064:(e,t,n)=>{var r=n(7425).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},7739:(e,t,n)=>{var r=n(7425).default,a=n(8064);e.exports=function(e){var t=a(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(n){return e.exports=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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},753:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>r})},7896:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{Z:()=>r})},1665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(8960);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.Z)(e,t)}},1461:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{Z:()=>r})},8960:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:()=>r})}},qe={};function $e(e){var t=qe[e];if(void 0!==t)return t.exports;var n=qe[e]={id:e,exports:{}};return We[e](n,n.exports,$e),n.exports}return $e.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return $e.d(t,{a:t}),t},$e.d=(e,t)=>{for(var n in t)$e.o(t,n)&&!$e.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},$e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),$e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),$e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;$e.g.importScripts&&(e=$e.g.location+"");var t=$e.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),$e.p=e})(),$e(6661)})()}));
|