@reltio/remotes 1.4.1119 → 1.4.1120

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/3213.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 3213.js.LICENSE.txt */
2
+ (self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3213],{8598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(95038),i=n.n(r);const o=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,r=t.instance,o=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=r||o||i(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),r=0,i=t,o=[];i.isBefore(n);){var s=Math.floor(r/7);o[s]=o[s]||[],o[s].push(i),i=i.clone().add(1,"day"),r+=1}return o},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),r=this.moment(t).endOf("year"),i=[],o=n;o.isBefore(r);)i.push(o),o=o.clone().add(1,"year");return i},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},4190:(e,t,n)=>{"use strict";n.d(t,{wE:()=>g,ni:()=>v,ZP:()=>M});var r=n(7560),i=n(54530),o=n(24328),s=(n(13980),n(6277)),u=n(35111),a=n(41262),c=n(15459),f=n(62339),d=n(27556),l=n(97580),h=n(39265),p=n(60364),m={left:"right",right:"left",top:"down",bottom:"up"};function g(e){return-1!==["left","right"].indexOf(e)}function v(e,t){return"rtl"===e.direction&&g(t)?m[t]:t}var w={enter:h.x9.enteringScreen,exit:h.x9.leavingScreen},y=o.forwardRef((function(e,t){var n=e.anchor,c=void 0===n?"left":n,h=e.BackdropProps,g=e.children,y=e.classes,M=e.className,x=e.elevation,b=void 0===x?16:x,N=e.ModalProps,E=(N=void 0===N?{}:N).BackdropProps,O=(0,i.Z)(N,["BackdropProps"]),_=e.onClose,R=e.open,C=void 0!==R&&R,A=e.PaperProps,Z=void 0===A?{}:A,k=e.SlideProps,D=e.TransitionComponent,T=void 0===D?f.Z:D,P=e.transitionDuration,j=void 0===P?w:P,S=e.variant,F=void 0===S?"temporary":S,I=(0,i.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),q=(0,p.Z)(),H=o.useRef(!1);o.useEffect((function(){H.current=!0}),[]);var B=v(q,c),L=o.createElement(d.Z,(0,r.Z)({elevation:"temporary"===F?b:0,square:!0},Z,{className:(0,s.Z)(y.paper,y["paperAnchor".concat((0,l.Z)(B))],Z.className,"temporary"!==F&&y["paperAnchorDocked".concat((0,l.Z)(B))])}),g);if("permanent"===F)return o.createElement("div",(0,r.Z)({className:(0,s.Z)(y.root,y.docked,M),ref:t},I),L);var U=o.createElement(T,(0,r.Z)({in:C,direction:m[B],timeout:j,appear:H.current},k),L);return"persistent"===F?o.createElement("div",(0,r.Z)({className:(0,s.Z)(y.root,y.docked,M),ref:t},I),U):o.createElement(u.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},h,E,{transitionDuration:j}),BackdropComponent:a.Z,className:(0,s.Z)(y.root,y.modal,M),open:C,onClose:_,ref:t},I,O),U)}));const M=(0,c.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(y)},62339:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(7560),i=n(54530),o=n(24328),s=(n(13980),n(75047)),u=n(90708),a=n(75614),c=n(85974),f=n(60364),d=n(39265),l=n(41070);function h(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var i=window.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var u=n.split("(")[1].split(")")[0].split(",");o=parseInt(u[4],10),s=parseInt(u[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(o-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-o,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(s-r.top,"px)"):"translateY(-".concat(r.top+r.height-s,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var p={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen};const m=o.forwardRef((function(e,t){var n=e.children,d=e.direction,m=void 0===d?"down":d,g=e.in,v=e.onEnter,w=e.onEntered,y=e.onEntering,M=e.onExit,x=e.onExited,b=e.onExiting,N=e.style,E=e.timeout,O=void 0===E?p:E,_=e.TransitionComponent,R=void 0===_?a.ZP:_,C=(0,i.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),A=(0,f.Z)(),Z=o.useRef(null),k=o.useCallback((function(e){Z.current=s.findDOMNode(e)}),[]),D=(0,c.Z)(n.ref,k),T=(0,c.Z)(D,t),P=function(e){return function(t){e&&(void 0===t?e(Z.current):e(Z.current,t))}},j=P((function(e,t){h(m,e),(0,l.n)(e),v&&v(e,t)})),S=P((function(e,t){var n=(0,l.C)({timeout:O,style:N},{mode:"enter"});e.style.webkitTransition=A.transitions.create("-webkit-transform",(0,r.Z)({},n,{easing:A.transitions.easing.easeOut})),e.style.transition=A.transitions.create("transform",(0,r.Z)({},n,{easing:A.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",y&&y(e,t)})),F=P(w),I=P(b),q=P((function(e){var t=(0,l.C)({timeout:O,style:N},{mode:"exit"});e.style.webkitTransition=A.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:A.transitions.easing.sharp})),e.style.transition=A.transitions.create("transform",(0,r.Z)({},t,{easing:A.transitions.easing.sharp})),h(m,e),M&&M(e)})),H=P((function(e){e.style.webkitTransition="",e.style.transition="",x&&x(e)})),B=o.useCallback((function(){Z.current&&h(m,Z.current)}),[m]);return o.useEffect((function(){if(!g&&"down"!==m&&"right"!==m){var e=(0,u.Z)((function(){Z.current&&h(m,Z.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[m,g]),o.useEffect((function(){g||B()}),[g,B]),o.createElement(R,(0,r.Z)({nodeRef:Z,onEnter:j,onEntered:F,onEntering:S,onExit:q,onExited:H,onExiting:I,appear:!0,in:g,timeout:O},C),(function(e,t){return o.cloneElement(n,(0,r.Z)({ref:T,style:(0,r.Z)({visibility:"exited"!==e||g?void 0:"hidden"},N,n.props.style)},t))}))}))},74443:(e,t,n)=>{"use strict";var r=n(14859);t.Z=void 0;var i=r(n(24328)),o=(0,r(n(50175)).default)(i.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddCircle");t.Z=o},57676:(e,t,n)=>{"use strict";var r=n(14859);t.Z=void 0;var i=r(n(24328)),o=(0,r(n(50175)).default)(i.default.createElement("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"Tune");t.Z=o},45767:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(24328),i=n.n(r),o=n(7560),s=n(72379);const u=(a=i().createElement("path",{d:"M7 10l5 5 5-5z"}),(c=i().memo(i().forwardRef((function(e,t){return i().createElement(s.Z,(0,o.Z)({ref:t},e),a)})))).muiName=s.Z.muiName,c);var a,c},52180:function(e,t,n){var r;!function(i){"use strict";var o,s,u,a=9e15,c=1e9,f="0123456789abcdef",d="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",h={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-a,maxE:a,crypto:!1},p=!0,m="[DecimalError] ",g=m+"Invalid argument: ",v=m+"Precision limit exceeded",w=m+"crypto unavailable",y=Math.floor,M=Math.pow,x=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,b=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,N=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,E=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,O=1e7,_=d.length-1,R=l.length-1,C={name:"[object Decimal]"};function A(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=H(n)),o+=r;(n=7-(r=(s=e[t])+"").length)&&(o+=H(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function Z(e,t,n){if(e!==~~e||e<t||e>n)throw Error(g+e)}function k(e,t,n,r){var i,o,s,u;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=M(10,7-t),u=e[i]%o|0,null==r?t<3?(0==t?u=u/100|0:1==t&&(u=u/10|0),s=n<4&&99999==u||n>3&&49999==u||5e4==u||0==u):s=(n<4&&u+1==o||n>3&&u+1==o/2)&&(e[i+1]/o/100|0)==M(10,t-2)-1||(u==o/2||0==u)&&0==(e[i+1]/o/100|0):t<4?(0==t?u=u/1e3|0:1==t?u=u/100|0:2==t&&(u=u/10|0),s=(r||n<4)&&9999==u||!r&&n>3&&4999==u):s=((r||n<4)&&u+1==o||!r&&n>3&&u+1==o/2)&&(e[i+1]/o/1e3|0)==M(10,t-3)-1,s}function D(e,t,n){for(var r,i,o=[0],s=0,u=e.length;s<u;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=f.indexOf(e.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),P(e)},C.ceil=function(){return P(new this.constructor(this),this.e+1,2)},C.comparedTo=C.cmp=function(e){var t,n,r,i,o=this,s=o.d,u=(e=new o.constructor(e)).d,a=o.s,c=e.s;if(!s||!u)return a&&c?a!==c?a:s===u?0:!s^a<0?1:-1:NaN;if(!s[0]||!u[0])return s[0]?a:u[0]?-c:0;if(a!==c)return a;if(o.e!==e.e)return o.e>e.e^a<0?1:-1;for(t=0,n=(r=s.length)<(i=u.length)?r:i;t<n;++t)if(s[t]!==u[t])return s[t]>u[t]^a<0?1:-1;return r===i?0:r>i^a<0?1:-1},C.cosine=C.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i=t.d.length;i<32?r=(1/J(4,n=Math.ceil(i/3))).toString():(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=X(e,1,t.times(r),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}(r,G(r,n)),r.precision=e,r.rounding=t,P(2==u||3==u?n.neg():n,e,t,!0)):new r(1):new r(NaN)},C.cubeRoot=C.cbrt=function(){var e,t,n,r,i,o,s,u,a,c,f=this,d=f.constructor;if(!f.isFinite()||f.isZero())return new d(f);for(p=!1,(o=f.s*M(f.s*f,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(n=A(f.d),(o=((e=f.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=M(n,1/3),e=y((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=f.s),s=(e=d.precision)+3;;)if(c=(a=(u=r).times(u).times(u)).plus(f),r=T(c.plus(f).times(u),c.plus(a),s+2,1),A(u.d).slice(0,s)===(n=A(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(P(r,e+1,1),t=!r.times(r).times(r).eq(f));break}if(!i&&(P(u,e+1,0),u.times(u).times(u).eq(f))){r=u;break}s+=4,i=1}return p=!0,P(r,e,d.rounding,t)},C.decimalPlaces=C.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-y(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},C.dividedBy=C.div=function(e){return T(this,new this.constructor(e))},C.dividedToIntegerBy=C.divToInt=function(e){var t=this.constructor;return P(T(this,new t(e),0,1,1),t.precision,t.rounding)},C.equals=C.eq=function(e){return 0===this.cmp(e)},C.floor=function(){return P(new this.constructor(this),this.e+1,3)},C.greaterThan=C.gt=function(e){return this.cmp(e)>0},C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return 1==t||0===t},C.hyperbolicCosine=C.cosh=function(){var e,t,n,r,i,o=this,s=o.constructor,u=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return u;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/J(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=X(s,1,o.times(t),new s(1),!0);for(var a,c=e,f=new s(8);c--;)a=o.times(o),o=u.minus(a.times(f.minus(a.times(f))));return P(o,s.precision=n,s.rounding=r,!0)},C.hyperbolicSine=C.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=X(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=X(o,2,i=i.times(1/J(5,e)),i,!0);for(var s,u=new o(5),a=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(u.plus(s.times(a.times(s).plus(c))))}return o.precision=t,o.rounding=n,P(i,t,n,!0)},C.hyperbolicTangent=C.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,T(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},C.inverseCosine=C.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?I(n,i,o):new n(0):new n(NaN):t.isZero()?I(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=I(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},C.inverseHyperbolicCosine=C.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,p=!1,n=n.times(n).minus(1).sqrt().plus(n),p=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},C.inverseHyperbolicSine=C.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,p=!1,n=n.times(n).plus(1).sqrt().plus(n),p=!0,r.precision=e,r.rounding=t,n.ln())},C.inverseHyperbolicTangent=C.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?P(new o(i),e,t,!0):(o.precision=n=r-i.e,i=T(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},C.inverseSine=C.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=I(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},C.inverseTangent=C.atan=function(){var e,t,n,r,i,o,s,u,a,c=this,f=c.constructor,d=f.precision,l=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&d+4<=R)return(s=I(f,d+4,l).times(.25)).s=c.s,s}else{if(!c.s)return new f(NaN);if(d+4<=R)return(s=I(f,d+4,l).times(.5)).s=c.s,s}for(f.precision=u=d+10,f.rounding=1,e=n=Math.min(28,u/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(p=!1,t=Math.ceil(u/7),r=1,a=c.times(c),s=new f(c),i=c;-1!==e;)if(i=i.times(a),o=s.minus(i.div(r+=2)),i=i.times(a),void 0!==(s=o.plus(i.div(r+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<<n-1)),p=!0,P(s,f.precision=d,f.rounding=l,!0)},C.isFinite=function(){return!!this.d},C.isInteger=C.isInt=function(){return!!this.d&&y(this.e/7)>this.d.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isPositive=C.isPos=function(){return this.s>0},C.isZero=function(){return!!this.d&&0===this.d[0]},C.lessThan=C.lt=function(e){return this.cmp(e)<0},C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1},C.logarithm=C.log=function(e){var t,n,r,i,o,s,u,a,c=this,f=c.constructor,d=f.precision,l=f.rounding;if(null==e)e=new f(10),t=!0;else{if(n=(e=new f(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new f(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(p=!1,s=z(c,u=d+5),r=t?F(f,u+10):z(e,u),k((a=T(s,r,u,1)).d,i=d,l))do{if(s=z(c,u+=10),r=t?F(f,u+10):z(e,u),a=T(s,r,u,1),!o){+A(a.d).slice(i+1,i+15)+1==1e14&&(a=P(a,d+1,0));break}}while(k(a.d,i+=10,l));return p=!0,P(a,d,l)},C.minus=C.sub=function(e){var t,n,r,i,o,s,u,a,c,f,d,l,h=this,m=h.constructor;if(e=new m(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new m(e.d||h.s!==e.s?h:NaN):e=new m(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,l=e.d,u=m.precision,a=m.rounding,!c[0]||!l[0]){if(l[0])e.s=-e.s;else{if(!c[0])return new m(3===a?-0:0);e=new m(h)}return p?P(e,u,a):e}if(n=y(e.e/7),f=y(h.e/7),c=c.slice(),o=f-n){for((d=o<0)?(t=c,o=-o,s=l.length):(t=l,n=f,s=c.length),o>(r=Math.max(Math.ceil(u/7),s)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=c.length)<(s=l.length))&&(s=r),r=0;r<s;r++)if(c[r]!=l[r]){d=c[r]<l[r];break}o=0}for(d&&(t=c,c=l,l=t,e.s=-e.s),s=c.length,r=l.length-s;r>0;--r)c[s++]=0;for(r=l.length;r>o;){if(c[--r]<l[r]){for(i=r;i&&0===c[--i];)c[i]=O-1;--c[i],c[r]+=O}c[r]-=l[r]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=S(c,n),p?P(e,u,a):e):new m(3===a?-0:0)},C.modulo=C.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?P(new r(n),r.precision,r.rounding):(p=!1,9==r.modulo?(t=T(n,e.abs(),0,3,1)).s*=e.s:t=T(n,e,0,r.modulo,1),t=t.times(e),p=!0,n.minus(t))},C.naturalExponential=C.exp=function(){return Y(this)},C.naturalLogarithm=C.ln=function(){return z(this)},C.negated=C.neg=function(){var e=new this.constructor(this);return e.s=-e.s,P(e)},C.plus=C.add=function(e){var t,n,r,i,o,s,u,a,c,f,d=this,l=d.constructor;if(e=new l(e),!d.d||!e.d)return d.s&&e.s?d.d||(e=new l(e.d||d.s===e.s?d:NaN)):e=new l(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(c=d.d,f=e.d,u=l.precision,a=l.rounding,!c[0]||!f[0])return f[0]||(e=new l(d)),p?P(e,u,a):e;if(o=y(d.e/7),r=y(e.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,s=f.length):(n=f,r=o,s=c.length),i>(s=(o=Math.ceil(u/7))>s?o+1:s+1)&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((s=c.length)-(i=f.length)<0&&(i=s,n=f,f=c,c=n),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/O|0,c[i]%=O;for(t&&(c.unshift(t),++r),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=S(c,r),p?P(e,u,a):e},C.precision=C.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(g+e);return n.d?(t=q(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},C.round=function(){var e=this,t=e.constructor;return P(new t(e),e.e+1,t.rounding)},C.sine=C.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return X(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=X(e,2,t=t.times(1/J(5,n)),t);for(var i,o=new e(5),s=new e(16),u=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(u))));return t}(r,G(r,n)),r.precision=e,r.rounding=t,P(u>2?n.neg():n,e,t,!0)):new r(NaN)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,o,s=this,u=s.d,a=s.e,c=s.s,f=s.constructor;if(1!==c||!u||!u[0])return new f(!c||c<0&&(!u||u[0])?NaN:u?s:1/0);for(p=!1,0==(c=Math.sqrt(+s))||c==1/0?(((t=A(u)).length+a)%2==0&&(t+="0"),c=Math.sqrt(t),a=y((a+1)/2)-(a<0||a%2),r=new f(t=c==1/0?"5e"+a:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new f(c.toString()),n=(a=f.precision)+3;;)if(r=(o=r).plus(T(s,o,n+2,1)).times(.5),A(o.d).slice(0,n)===(t=A(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(r,a+1,1),e=!r.times(r).eq(s));break}if(!i&&(P(o,a+1,0),o.times(o).eq(s))){r=o;break}n+=4,i=1}return p=!0,P(r,a,f.rounding,e)},C.tangent=C.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=T(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,P(2==u||4==u?n.neg():n,e,t,!0)):new r(NaN)},C.times=C.mul=function(e){var t,n,r,i,o,s,u,a,c,f=this,d=f.constructor,l=f.d,h=(e=new d(e)).d;if(e.s*=f.s,!(l&&l[0]&&h&&h[0]))return new d(!e.s||l&&!l[0]&&!h||h&&!h[0]&&!l?NaN:l&&h?0*e.s:e.s/0);for(n=y(f.e/7)+y(e.e/7),(a=l.length)<(c=h.length)&&(o=l,l=h,h=o,s=a,a=c,c=s),o=[],r=s=a+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=a+r;i>r;)u=o[i]+h[r]*l[i-r-1]+t,o[i--]=u%O|0,t=u/O|0;o[i]=(o[i]+t)%O|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=S(o,n),p?P(e,d.precision,d.rounding):e},C.toBinary=function(e,t){return K(this,2,e,t)},C.toDecimalPlaces=C.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(Z(e,0,c),void 0===t?t=r.rounding:Z(t,0,8),P(n,e+n.e+1,t))},C.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=j(r,!0):(Z(e,0,c),void 0===t?t=i.rounding:Z(t,0,8),n=j(r=P(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},C.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=j(i):(Z(e,0,c),void 0===t?t=o.rounding:Z(t,0,8),n=j(r=P(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},C.toFraction=function(e){var t,n,r,i,o,s,u,a,c,f,d,l,h=this,m=h.d,v=h.constructor;if(!m)return new v(h);if(c=n=new v(1),r=a=new v(0),s=(o=(t=new v(r)).e=q(m)-h.e-1)%7,t.d[0]=M(10,s<0?7+s:s),null==e)e=o>0?t:c;else{if(!(u=new v(e)).isInt()||u.lt(c))throw Error(g+u);e=u.gt(t)?o>0?t:c:u}for(p=!1,u=new v(A(m)),f=v.precision,v.precision=o=7*m.length*2;d=T(u,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=c,c=a.plus(d.times(i)),a=i,i=t,t=u.minus(d.times(i)),u=i;return i=T(e.minus(n),r,0,1,1),a=a.plus(i.times(c)),n=n.plus(i.times(r)),a.s=c.s=h.s,l=T(c,r,o,1).minus(h).abs().cmp(T(a,n,o,1).minus(h).abs())<1?[c,r]:[a,n],v.precision=f,p=!0,l},C.toHexadecimal=C.toHex=function(e,t){return K(this,16,e,t)},C.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:Z(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(p=!1,n=T(n,e,0,t,1).times(e),p=!0,P(n)):(e.s=n.s,n=e),n},C.toNumber=function(){return+this},C.toOctal=function(e,t){return K(this,8,e,t)},C.toPower=C.pow=function(e){var t,n,r,i,o,s,u=this,a=u.constructor,c=+(e=new a(e));if(!(u.d&&e.d&&u.d[0]&&e.d[0]))return new a(M(+u,c));if((u=new a(u)).eq(1))return u;if(r=a.precision,o=a.rounding,e.eq(1))return P(u,r,o);if((t=y(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=B(a,u,n,r),e.s<0?new a(1).div(i):P(i,r,o);if((s=u.s)<0){if(t<e.d.length-1)return new a(NaN);if(0==(1&e.d[t])&&(s=1),0==u.e&&1==u.d[0]&&1==u.d.length)return u.s=s,u}return(t=0!=(n=M(+u,c))&&isFinite(n)?new a(n+"").e:y(c*(Math.log("0."+A(u.d))/Math.LN10+u.e+1)))>a.maxE+1||t<a.minE-1?new a(t>0?s/0:0):(p=!1,a.rounding=u.s=1,n=Math.min(12,(t+"").length),(i=Y(e.times(z(u,r+n)),r)).d&&k((i=P(i,r+5,1)).d,r,o)&&(t=r+10,+A((i=P(Y(e.times(z(u,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=P(i,r+1,0))),i.s=s,p=!0,a.rounding=o,P(i,r,o))},C.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=j(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Z(e,1,c),void 0===t?t=i.rounding:Z(t,0,8),n=j(r=P(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},C.toSignificantDigits=C.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(Z(e,1,c),void 0===t?t=n.rounding:Z(t,0,8)),P(new n(this),e,t)},C.toString=function(){var e=this,t=e.constructor,n=j(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},C.truncated=C.trunc=function(){return P(new this.constructor(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,n=j(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var T=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,u,a,c){var f,d,l,h,p,m,g,v,w,M,x,b,N,E,_,R,C,A,Z,k,D=r.constructor,T=r.s==i.s?1:-1,j=r.d,S=i.d;if(!(j&&j[0]&&S&&S[0]))return new D(r.s&&i.s&&(j?!S||j[0]!=S[0]:S)?j&&0==j[0]||!S?0*T:T/0:NaN);for(c?(p=1,d=r.e-i.e):(c=O,p=7,d=y(r.e/p)-y(i.e/p)),Z=S.length,C=j.length,M=(w=new D(T)).d=[],l=0;S[l]==(j[l]||0);l++);if(S[l]>(j[l]||0)&&d--,null==o?(E=o=D.precision,u=D.rounding):E=a?o+(r.e-i.e)+1:o,E<0)M.push(1),m=!0;else{if(E=E/p+2|0,l=0,1==Z){for(h=0,S=S[0],E++;(l<C||h)&&E--;l++)_=h*c+(j[l]||0),M[l]=_/S|0,h=_%S|0;m=h||l<C}else{for((h=c/(S[0]+1)|0)>1&&(S=e(S,h,c),j=e(j,h,c),Z=S.length,C=j.length),R=Z,b=(x=j.slice(0,Z)).length;b<Z;)x[b++]=0;(k=S.slice()).unshift(0),A=S[0],S[1]>=c/2&&++A;do{h=0,(f=t(S,x,Z,b))<0?(N=x[0],Z!=b&&(N=N*c+(x[1]||0)),(h=N/A|0)>1?(h>=c&&(h=c-1),1==(f=t(g=e(S,h,c),x,v=g.length,b=x.length))&&(h--,n(g,Z<v?k:S,v,c))):(0==h&&(f=h=1),g=S.slice()),(v=g.length)<b&&g.unshift(0),n(x,g,b,c),-1==f&&(f=t(S,x,Z,b=x.length))<1&&(h++,n(x,Z<b?k:S,b,c)),b=x.length):0===f&&(h++,x=[0]),M[l++]=h,f&&x[0]?x[b++]=j[R]||0:(x=[j[R]],b=1)}while((R++<C||void 0!==x[0])&&E--);m=void 0!==x[0]}M[0]||M.shift()}if(1==p)w.e=d,s=m;else{for(l=1,h=M[0];h>=10;h/=10)l++;w.e=l+d*p-1,P(w,a?o+w.e+1:o,u,m)}return w}}();function P(e,t,n,r){var i,o,s,u,a,c,f,d,l,h=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,u=d[0];u>=10;u/=10)i++;if((o=t-i)<0)o+=7,s=t,a=(f=d[l=0])/M(10,i-s-1)%10|0;else if((l=Math.ceil((o+1)/7))>=(u=d.length)){if(!r)break e;for(;u++<=l;)d.push(0);f=a=0,i=1,s=(o%=7)-7+1}else{for(f=u=d[l],i=1;u>=10;u/=10)i++;a=(s=(o%=7)-7+i)<0?0:f/M(10,i-s-1)%10|0}if(r=r||t<0||void 0!==d[l+1]||(s<0?f:f%M(10,i-s-1)),c=n<4?(a||r)&&(0==n||n==(e.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?s>0?f/M(10,i-s):0:d[l-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=M(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=l,u=1,l--):(d.length=l+1,u=M(10,7-o),d[l]=s>0?(f/M(10,i-s)%M(10,s)|0)*u:0),c)for(;;){if(0==l){for(o=1,s=d[0];s>=10;s/=10)o++;for(s=d[0]+=u,u=1;s>=10;s/=10)u++;o!=u&&(e.e++,d[0]==O&&(d[0]=1));break}if(d[l]+=u,d[l]!=O)break;d[l--]=0,u=1}for(o=d.length;0===d[--o];)d.pop()}return p&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function j(e,t,n){if(!e.isFinite())return V(e);var r,i=e.e,o=A(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+H(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+H(-i-1)+o,n&&(r=n-s)>0&&(o+=H(r))):i>=s?(o+=H(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+H(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=H(r))),o}function S(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function F(e,t,n){if(t>_)throw p=!0,n&&(e.precision=n),Error(v);return P(new e(d),t,1,!0)}function I(e,t,n){if(t>R)throw Error(v);return P(new e(l),t,n,!0)}function q(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function H(e){for(var t="";e--;)t+="0";return t}function B(e,t,n,r){var i,o=new e(1),s=Math.ceil(r/7+4);for(p=!1;;){if(n%2&&Q((o=o.times(t)).d,s)&&(i=!0),0===(n=y(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}Q((t=t.times(t)).d,s)}return p=!0,o}function L(e){return 1&e.d[e.d.length-1]}function U(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function Y(e,t){var n,r,i,o,s,u,a,c=0,f=0,d=0,l=e.constructor,h=l.rounding,m=l.precision;if(!e.d||!e.d[0]||e.e>17)return new l(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(p=!1,a=m):a=t,u=new l(.03125);e.e>-2;)e=e.times(u),d+=5;for(a+=r=Math.log(M(2,d))/Math.LN10*2+5|0,n=o=s=new l(1),l.precision=a;;){if(o=P(o.times(e),a,1),n=n.times(++f),A((u=s.plus(T(o,n,a,1))).d).slice(0,a)===A(s.d).slice(0,a)){for(i=d;i--;)s=P(s.times(s),a,1);if(null!=t)return l.precision=m,s;if(!(c<3&&k(s.d,a-r,h,c)))return P(s,l.precision=m,h,p=!0);l.precision=a+=10,n=o=u=new l(1),f=0,c++}s=u}}function z(e,t){var n,r,i,o,s,u,a,c,f,d,l,h=1,m=e,g=m.d,v=m.constructor,w=v.rounding,y=v.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(null==t?(p=!1,f=y):f=t,v.precision=f+=10,r=(n=A(g)).charAt(0),!(Math.abs(o=m.e)<15e14))return c=F(v,f+2,y).times(o+""),m=z(new v(r+"."+n.slice(1)),f-10).plus(c),v.precision=y,null==t?P(m,y,w,p=!0):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=A((m=m.times(e)).d)).charAt(0),h++;for(o=m.e,r>1?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1)),d=m,a=s=m=T(m.minus(1),m.plus(1),f,1),l=P(m.times(m),f,1),i=3;;){if(s=P(s.times(l),f,1),A((c=a.plus(T(s,new v(i),f,1))).d).slice(0,f)===A(a.d).slice(0,f)){if(a=a.times(2),0!==o&&(a=a.plus(F(v,f+2,y).times(o+""))),a=T(a,new v(h),f,1),null!=t)return v.precision=y,a;if(!k(a.d,f-10,w,u))return P(a,v.precision=y,w,p=!0);v.precision=f+=10,c=s=m=T(d.minus(1),d.plus(1),f,1),l=P(m.times(m),f,1),i=u=1}a=c,i+=2}}function V(e){return String(e.s*e.s/0)}function W(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),p&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function $(e,t){var n,r,i,s,u,a,c,f,d;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(b.test(t))n=16,t=t.toLowerCase();else if(x.test(t))n=2;else{if(!N.test(t))throw Error(g+t);n=8}for((s=t.search(/p/i))>0?(c=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),u=(s=t.indexOf("."))>=0,r=e.constructor,u&&(s=(a=(t=t.replace(".","")).length)-s,i=B(r,new r(n),s,2*s)),s=d=(f=D(t,n,O)).length-1;0===f[s];--s)f.pop();return s<0?new r(0*e.s):(e.e=S(f,d),e.d=f,p=!1,u&&(e=T(e,i,4*a)),c&&(e=e.times(Math.abs(c)<54?M(2,c):o.pow(2,c))),p=!0,e)}function X(e,t,n,r,i){var o,s,u,a,c=e.precision,f=Math.ceil(c/7);for(p=!1,a=n.times(n),u=new e(r);;){if(s=T(u.times(a),new e(t++*t++),c,1),u=i?r.plus(s):r.minus(s),r=T(s.times(a),new e(t++*t++),c,1),void 0!==(s=u.plus(r)).d[f]){for(o=f;s.d[o]===u.d[o]&&o--;);if(-1==o)break}o=u,u=r,r=s,s=o}return p=!0,s.d.length=f+1,s}function J(e,t){for(var n=e;--t;)n*=e;return n}function G(e,t){var n,r=t.s<0,i=I(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return u=r?4:1,t;if((n=t.divToInt(i)).isZero())u=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return u=L(n)?r?2:3:r?4:1,t;u=L(n)?r?1:4:r?3:2}return t.minus(i).abs()}function K(e,t,n,r){var i,o,u,a,d,l,h,p,m,g=e.constructor,v=void 0!==n;if(v?(Z(n,1,c),void 0===r?r=g.rounding:Z(r,0,8)):(n=g.precision,r=g.rounding),e.isFinite()){for(v?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(u=(h=j(e)).indexOf("."))>=0&&(h=h.replace(".",""),(m=new g(1)).e=h.length-u,m.d=D(j(m),10,i),m.e=m.d.length),o=d=(p=D(h,10,i)).length;0==p[--d];)p.pop();if(p[0]){if(u<0?o--:((e=new g(e)).d=p,e.e=o,p=(e=T(e,m,n,r,0,i)).d,o=e.e,l=s),u=p[n],a=i/2,l=l||void 0!==p[n+1],l=r<4?(void 0!==u||l)&&(0===r||r===(e.s<0?3:2)):u>a||u===a&&(4===r||l||6===r&&1&p[n-1]||r===(e.s<0?8:7)),p.length=n,l)for(;++p[--n]>i-1;)p[n]=0,n||(++o,p.unshift(1));for(d=p.length;!p[d-1];--d);for(u=0,h="";u<d;u++)h+=f.charAt(p[u]);if(v){if(d>1)if(16==t||8==t){for(u=16==t?4:3,--d;d%u;d++)h+="0";for(d=(p=D(h,i,t)).length;!p[d-1];--d);for(u=1,h="1.";u<d;u++)h+=f.charAt(p[u])}else h=h.charAt(0)+"."+h.slice(1);h=h+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)h="0"+h;h="0."+h}else if(++o>d)for(o-=d;o--;)h+="0";else o<d&&(h=h.slice(0,o)+"."+h.slice(o))}else h=v?"0p+0":"0";h=(16==t?"0x":2==t?"0b":8==t?"0o":"")+h}else h=V(e);return e.s<0?"-"+h:h}function Q(e,t){if(e.length>t)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function ne(e){return new this(e).acosh()}function re(e,t){return new this(e).plus(t)}function ie(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function se(e){return new this(e).atan()}function ue(e){return new this(e).atanh()}function ae(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?I(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=I(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(T(e,t,o,1)),t=I(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(T(e,t,o,1)):(n=I(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function ce(e){return new this(e).cbrt()}function fe(e){return P(e=new this(e),e.e+1,2)}function de(e){if(!e||"object"!=typeof e)throw Error(m+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,c,"rounding",0,8,"toExpNeg",-a,0,"toExpPos",0,a,"maxE",0,a,"minE",-a,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=h[n]),void 0!==(r=e[n])){if(!(y(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(g+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=h[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(g+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(w);this[n]=!0}else this[n]=!1}return this}function le(e){return new this(e).cos()}function he(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function me(e){return new this(e).exp()}function ge(e){return P(e=new this(e),e.e+1,3)}function ve(){var e,t,n=new this(0);for(p=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return p=!0,new this(1/0);n=t}return p=!0,n.sqrt()}function we(e){return e instanceof o||e&&"[object Decimal]"===e.name||!1}function ye(e){return new this(e).ln()}function Me(e,t){return new this(e).log(t)}function xe(e){return new this(e).log(2)}function be(e){return new this(e).log(10)}function Ne(){return U(this,arguments,"lt")}function Ee(){return U(this,arguments,"gt")}function Oe(e,t){return new this(e).mod(t)}function _e(e,t){return new this(e).mul(t)}function Re(e,t){return new this(e).pow(t)}function Ce(e){var t,n,r,i,o=0,s=new this(1),u=[];if(void 0===e?e=this.precision:Z(e,1,c),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(w);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(i%1e7),o+=4);o=r/4}else for(;o<r;)u[o++]=1e7*Math.random()|0;for(e%=7,(r=u[--o])&&e&&(i=M(10,7-e),u[o]=(r/i|0)*i);0===u[o];o--)u.pop();if(o<0)n=0,u=[0];else{for(n=-1;0===u[0];n-=7)u.shift();for(r=1,i=u[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return s.e=n,s.d=u,s}function Ae(e){return P(e=new this(e),e.e+1,this.rounding)}function Ze(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function ke(e){return new this(e).sin()}function De(e){return new this(e).sinh()}function Te(e){return new this(e).sqrt()}function Pe(e,t){return new this(e).sub(t)}function je(e){return new this(e).tan()}function Se(e){return new this(e).tanh()}function Fe(e){return P(e=new this(e),e.e+1,1)}(o=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,e instanceof o)return i.s=e.s,void(p?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"==(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(p?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):W(i,e.toString())}if("string"!==r)throw Error(g+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),E.test(e)?W(i,e):$(i,e)}if(o.prototype=C,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=de,o.clone=e,o.isDecimal=we,o.abs=ee,o.acos=te,o.acosh=ne,o.add=re,o.asin=ie,o.asinh=oe,o.atan=se,o.atanh=ue,o.atan2=ae,o.cbrt=ce,o.ceil=fe,o.cos=le,o.cosh=he,o.div=pe,o.exp=me,o.floor=ge,o.hypot=ve,o.ln=ye,o.log=Me,o.log10=be,o.log2=xe,o.max=Ne,o.min=Ee,o.mod=Oe,o.mul=_e,o.pow=Re,o.random=Ce,o.round=Ae,o.sign=Ze,o.sin=ke,o.sinh=De,o.sqrt=Te,o.sub=Pe,o.tan=je,o.tanh=Se,o.trunc=Fe,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(h)).default=o.Decimal=o,d=new o(d),l=new o(l),void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},15554:e=>{"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function i(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],i(n),i(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=i(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var i=o(n[0]);i!==n[0]&&(t[n[0]]=i)}n=r.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),u=0;u<s.length;u++){var a=s[u];e=e.replace(new RegExp(a,"g"),t[a])}return e}(e)}}},37320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}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 s,u,a=i(e),c=1;c<arguments.length;c++){for(var f in s=Object(arguments[c]))n.call(s,f)&&(a[f]=s[f]);if(t){u=t(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(a[u[d]]=s[u[d]])}}return a}},34126:(e,t,n)=>{"use strict";var r=n(57785),i=n(37320),o=n(15554);function s(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),s=t.length>0?t.join("="):void 0;s=void 0===s?null:o(s),n(o(i),s,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))):r},t.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[s(t,e),"[",r,"]"].join(""):[s(t,e),"[",s(r,e),"]=",s(n,e)].join("")};case"bracket":return function(t,n){return null===n?s(t,e):[s(t,e),"[]=",s(n,e)].join("")};default:return function(t,n){return null===n?s(t,e):[s(t,e),"=",s(n,e)].join("")}}}(t=i({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return s(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return s(r,t)+"="+s(i,t)})).filter((function(e){return e.length>0})).join("&"):""}},2314:(e,t,n)=>{"use strict";var r=n(28523).compose;t.__esModule=!0,t.composeWithDevTools=function(){if(0!==arguments.length)return"object"==typeof arguments[0]?r:r.apply(null,arguments)},t.devToolsEnhancer=function(){return function(e){return e}}},83273:(e,t,n)=>{"use strict";t.__esModule=!0,t.createDynamicMiddlewares=t.resetMiddlewares=t.removeMiddleware=t.addMiddleware=void 0;var r=n(28523),i=function(){var e=[];return{enhancer:function(t){return function(n){return function(i){var o=e.map((function(e){return e(t)}));return r.compose.apply(void 0,o)(n)(i)}}},addMiddleware:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e=[].concat(e,n)},removeMiddleware:function(t){var n=e.findIndex((function(e){return e===t}));-1!==n?e=e.filter((function(e,t){return t!==n})):console.error("Middleware does not exist!",t)},resetMiddlewares:function(){e=[]}}},o=i();t.default=o.enhancer;var s=o.addMiddleware,u=o.removeMiddleware,a=o.resetMiddlewares;t.addMiddleware=s,t.removeMiddleware=u,t.resetMiddlewares=a,t.createDynamicMiddlewares=i},95174:(e,t,n)=>{"use strict";t.__esModule=!0;var r=n(83273);t.getMiddlewareManager=function(){var e=r.createDynamicMiddlewares();return{getItems:function(){return[]},enhancer:e.enhancer,add:function(t){return e.addMiddleware.apply(e,t),t},remove:function(t){return t.forEach(e.removeMiddleware),t},dispose:function(){e.resetMiddlewares()}}}},12519:function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};t.__esModule=!0;var i=n(79329);t.getModuleManager=function(e,t,n){var o,s=null,u=[],a=new Set,c=function(e){if(e){if(!s)throw new Error("setDispatch should be called on ModuleManager before adding any modules.");e.forEach(s)}},f={getReducer:function(e,t){return o?o.reduce(e,t):e||null},setDispatch:function(e){s=e},getItems:function(){return[]},add:function(f){if(f&&0!==f.length){f=f.filter((function(e){return e}));var d=[];f.forEach((function(t){if(!a.has(t.id)){a.add(t.id),u.push(t),function(e){if(e)if(o)for(var t in e)o.add(t,e[t]);else o=i.getRefCountedReducerManager(i.getReducerManager(e,n))}(t.reducerMap);var r=t.middlewares;r&&function(t){t&&e.add(t)}(r),d.push(t)}})),s({type:"@@Internal/ModuleManager/SeedReducers"}),d.forEach((function(e){t.forEach((function(t){t.onModuleAdded&&t.onModuleAdded(e)}));var n={type:"@@Internal/ModuleManager/ModuleAdded",payload:e.id};c(e.initialActions?r([n],e.initialActions):[n])}))}},remove:function(n){n&&(n=n.filter((function(e){return e})).reverse()).forEach((function(n){var r;a.has(n.id)&&(c(n.finalActions),function(e){if(e&&o)for(var t in e)o.remove(t)}(n.reducerMap),(r=n.middlewares)&&e.remove(r),t.forEach((function(e){e.onModuleRemoved&&e.onModuleRemoved(n)})),a.delete(n.id),u=u.filter((function(e){return e.id!==n.id})),c([{type:"@@Internal/ModuleManager/ModuleRemoved",payload:n.id}]))}))},dispose:function(){f.remove(u)}};return f}},79329:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};t.__esModule=!0;var i=n(28523),o=n(24446);function s(e,t){return void 0===t&&(t=i.combineReducers),e&&0!==Object.keys(e).length?t(e):function(e,t){return e||null}}t.getRefCountedReducerManager=function(e){var t=o.getStringRefCounter();for(var n in e.getReducerMap())t.add(n);return{reduce:e.reduce,getReducerMap:e.getReducerMap,add:function(n,r){0===t.getCount(n)&&e.add(n,r),t.add(n)},remove:function(n){t.remove(n),0===t.getCount(n)&&e.remove(n)}}},t.getReducerManager=function(e,t){void 0===t&&(t=i.combineReducers);var n=t(e),o=r({},e),u=[];return{getReducerMap:function(){return o},reduce:function(e,t){if(u.length>0){e=r({},e);for(var i=0,o=u;i<o.length;i++)delete e[o[i]];u=[]}return void 0===e&&(e={}),n(e,t)},add:function(e,r){e&&!o[e]&&(o[e]=r,n=s(o,t))},remove:function(e){e&&o[e]&&(delete o[e],u.push(e),n=s(o,t))}}}},45105:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};t.__esModule=!0;var i=n(24446);t.getRefCountedManager=function(e,t,n){var o=i.getObjectRefCounter(t,n);e.getItems().forEach((function(e){return o.add(e)}));var s=r({},e);return s.add=function(t){if(t){var n=t.filter((function(e){return e})),r=n.filter((function(e){return 0===o.getCount(e)}));e.add(r),n.forEach(o.add)}},s.remove=function(t){t&&t.forEach((function(t){t&&(o.remove(t),0===o.getCount(t)&&e.remove([t]))}))},s.dispose=function(){e.dispose()},s}},88526:function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};t.__esModule=!0;var i=n(28523),o=n(2314),s=n(95174),u=n(12519),a=n(45105),c=n(23425);t.createStore=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var f=e.initialState,d=void 0===f?{}:f,l=e.extensions,h=void 0===l?[]:l,p=e.enhancers,m=void 0===p?[]:p,g=e.advancedComposeEnhancers,v=void 0===g?o.composeWithDevTools({}):g,w=e.advancedCombineReducers,y=h.reduce((function(e,t){return t.middleware&&e.push.apply(e,t.middleware),e}),[]),M=a.getRefCountedManager(s.getMiddlewareManager(),(function(e,t){return e===t})),x=v.apply(void 0,r(m,[i.applyMiddleware.apply(void 0,r(y,[M.enhancer]))])),b=a.getRefCountedManager(u.getModuleManager(M,h,w),(function(e,t){return e.id===t.id}),(function(e){return e.retained})),N=i.createStore(b.getReducer,d,x);b.setDispatch(N.dispatch);var E=function(e){var t=c.flatten(e);return b.add(t),{remove:function(){b.remove(t)}}},O=function(e){return E([e])};return h.forEach((function(e){e.onModuleManagerCreated&&e.onModuleManagerCreated({addModule:O,addModules:E})})),N.addModule=O,N.addModules=E,N.dispose=function(){b.dispose(),M.dispose(),h.forEach((function(e){e.dispose&&e.dispose()}))},N.addModules(t),N}},58166:(e,t)=>{"use strict";t.__esModule=!0,t.getMap=function(e){var t=[],n={};return{keys:t,get:function(r){if(r){var i=t.findIndex((function(t){return t&&e(t,r)}));if(-1!==i)return n[i]}},add:function(r,i){r&&-1===t.findIndex((function(t){return t&&e(t,r)}))&&(t.push(r),n[t.length-1]=i)},remove:function(r){if(r){var i=t.findIndex((function(t){return t&&e(t,r)}));if(-1!==i){delete t[i];var o=n[i];return delete n[i],o}}}}}},23425:function(e,t){"use strict";var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};t.__esModule=!0,t.flatten=function(e){if(e){for(var t=e.slice(),r=0;r<t.length;)Array.isArray(t[r])?t.splice.apply(t,n([r,1],t[r])):r++;return t}return e}},24446:(e,t)=>{"use strict";t.__esModule=!0,t.getObjectRefCounter=function(e,t){e||(e=function(e,t){return e===t}),t||(t=function(){return!1});var n=[],r=[];return{getCount:function(t){if(null==t)return 0;var i=n.findIndex((function(n){return n&&e(n,t)}));return-1===i?0:r[i]},add:function(i){if(null!=i){var o=n.findIndex((function(t){return t&&e(t,i)})),s=1;-1===o?(o=n.length,n.push(i)):s=r[o]+1,t(i)&&(s=1/0),r[o]=s}},remove:function(i){if(t(i))return!1;var o=n.findIndex((function(t){return t&&e(t,i)}));return-1!==o&&(1===r[o]?(delete n[o],delete r[o],!0):(r[o]=r[o]-1,!1))}}},t.getStringRefCounter=function(){var e={};return{getCount:function(t){return null==t?0:e[t]||0},add:function(t){null!=t&&(e[t]?e[t]++:e[t]=1)},remove:function(t){return null!=t&&!!e[t]&&(1===e[t]?(delete e[t],!0):(e[t]--,!1))}}}},70315:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}t.__esModule=!0,r(n(88526)),r(n(58166)),r(n(24446)),r(n(95174)),r(n(45105))},78522:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};t.__esModule=!0;var s=n(24328),u=n(52730),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this;return s.createElement(u.ReactReduxContext.Consumer,null,(function(t){return s.createElement(c,o({},e.props,{reactReduxContext:t}))}))},t}(s.Component);t.DynamicModuleLoader=a;var c=function(e){function t(t){var n=e.call(this,t)||this;if(n._providerInitializationNeeded=!1,n._cleanup=function(){n._addedModules&&(n._addedModules.remove(),n._addedModules=void 0)},null==t.reactReduxContext){var r="Tried to render DynamicModuleLoader, but no ReactReduxContext was provided";throw console.error(r),new Error(r)}return n._store=t.reactReduxContext?t.reactReduxContext.store:void 0,n.props.strictMode?n.state={readyToRender:!1}:(n._addModules(),n.state={readyToRender:!0}),n}return i(t,e),t.prototype.render=function(){return this.state.readyToRender?this._providerInitializationNeeded?s.createElement(u.Provider,{store:this._store},s.createElement(a,o({},this.props))):s.createElement(s.Fragment,null,this._renderLoader(),s.createElement(f,{cleanup:this._cleanup})):null},t.prototype._renderLoader=function(){return this.props.children?"function"==typeof this.props.children?this.props.children():this.props.children:null},t.prototype._addModules=function(){var e=this.props,t=e.createStore,n=e.modules;if(this._store)this._addedModules=this._store.addModules(n);else{if(!t)throw new Error("Store could not be resolved from React context");this._store=t(),this._providerInitializationNeeded=!0}},t.prototype.componentDidMount=function(){this.props.strictMode&&(this._addModules(),this.setState({readyToRender:!0}))},t}(s.Component),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){return null},t.prototype.componentWillUnmount=function(){this.props.cleanup()},t}(s.Component)},66780:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}t.__esModule=!0,r(n(70315)),r(n(78522))},57785:e=>{"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}}}]);
File without changes
package/3553.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3553],{60894:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(94656);function s(){return s=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},s.apply(this,arguments)}const c=e=>o().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),p=n(17440),h=n(47458),d=n(87918),m=n.n(d),b=n(85657);const f=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:a,title:l,tooltipTitle:i}=e;const[s,d]=(0,r.useState)(null),f=(0,r.useCallback)((e=>{const t=(0,p.pipe)(b.JJ,(0,p.pluck)("id"))(e),r=(0,b.u)(n,e);a(r?(0,p.difference)(n,t):(0,p.uniq)((0,p.concat)(n,t)))}),[n,a]);return o().createElement(o().Fragment,null,o().createElement(u.k,{tooltipTitle:i||m().text("Show/hide columns"),size:"L",icon:c,onClick:e=>d(e.currentTarget)}),o().createElement(h.G,{onColumnClick:f,anchorEl:s,columnsData:t,onClose:()=>d(null),title:l,selectedColumns:n}))};f.propTypes={columnsData:i.uz,selectedColumns:l().arrayOf(l().string),onChangeColumns:l().func,title:l().string,tooltipTitle:l().string};const g=f},47458:(e,t,n)=>{n.d(t,{G:()=>w});var r=n(24328),o=n.n(r),a=n(87918),l=n.n(a),i=n(17440),s=n(99493),c=n(44890),u=n(97820),p=n(85657),h=n(56656),d=n(54763),m=n(13980),b=n.n(m),f=n(7785),g=n(27239),y=n(71153),v=n.n(y);const x=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),P=e=>{let{item:t,onClick:n,checked:r,level:a,style:l,isFocused:i,isGroupItem:s,hideCheckBox:c}=e;const u=x();return o().createElement(f.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:a,data:t,label:o().createElement(g.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:l,isFocused:i,hideIcon:s,className:v()({[u.groupItem]:s})})};P.propTypes={item:b().shape({label:b().string,filterText:b().string}),level:b().number,onClick:b().func,checked:b().bool,style:b().object,isGroupItem:b().bool,isFocused:b().bool,hideCheckBox:b().bool};const O=P,w=e=>{let{anchorEl:t,onClose:n,title:a,columnsData:m,onColumnClick:b,selectedColumns:f,hideCheckBox:g}=e;const y=x(),[v,P]=(0,r.useState)(""),w=(0,r.useMemo)((()=>(0,p.eX)(m,v)),[m,v]),C=(0,r.useMemo)((()=>(0,h.LG)(w)),[w]),k=(0,s.fW1)("label")(w)||308,E=(0,r.useCallback)((e=>{let{item:t}=e;return b(t)}),[b]),{focusIndex:S,handleKeyDown:T}=(0,d.t)({items:C,open:!0,onSelectFocusedItem:E,selectedItems:f,onClose:n}),j=(0,r.useCallback)((0,i.pipe)(n,(()=>P(""))),[n]),I=Math.min(300,32*C.length),D=Math.max(140,I+108);return o().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:j,onSearch:P,title:a||l().text("Show/hide columns"),containerWidth:k,containerHeight:D,searchInputOnKeyDown:T},o().createElement(c.Z,{fixedTitle:!1,height:I,renderItem:(e,t,n)=>{let{item:r,level:a=0}=t;return o().createElement(O,{hideCheckBox:g,style:e,item:r,level:a,isFocused:S===n,checked:(0,p.u)(f,r),isGroupItem:(0,p.yf)(r),onClick:g?(0,i.pipe)(b,j):b})},items:C,getItemSize:()=>32,focusIndex:S}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>g,JJ:()=>y,yf:()=>i,u:()=>v});var r=n(17440),o=n(99493);function a(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),p=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=p(n.children||[],t),e):e.concat(t)},h=(0,r.curry)(((e,t)=>o.P6Y.strings.search(t.label,e)||(t.children||[]).some(h(e)))),d=(0,r.reduce)(((e,t)=>p(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(h(e)),(0,r.chain)((t=>[{item:a({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),b=(0,r.has)("columns"),f=e=>{let{id:t,label:n,columns:o}=e;return[{id:t,groupId:t,label:n},...o.map((0,r.assoc)("groupId",t))]},g=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(b,f)),(0,r.filter)((0,r.either)(i,u)),d,m(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return i(t)?n.every(r):n.some(r)}},1876:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(87918),s=n.n(i),c=n(94079),u=n(87685);function p(){return p=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},p.apply(this,arguments)}const h=e=>o().createElement("svg",p({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),d=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),m=e=>{let{enabled:t,onClick:n}=e;const r=d();return o().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},o().createElement(c.IconButton,{onClick:n,classes:{root:r.button}},t?o().createElement(o().Fragment,null,o().createElement(h,{className:r["filterIcon--enabled"]}),o().createElement(u.default,{color:"primary",className:r.closeIcon})):o().createElement(h,null)))};m.propTypes={enabled:l().bool,onClick:l().func};const b=m},58662:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(13980),o=n.n(r),a=n(24328),l=n.n(a),i=n(71153),s=n.n(i),c=n(94079),u=n(87918),p=n.n(u),h=n(31276),d=n(17440);const m=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function b(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:o,onChangePage:i,rowsPerPage:u,onChangeRowsPerPage:f,basicTableRef:g,labelRowsPerPage:y}=e;const v=m(),x=(0,a.useCallback)((()=>{(0,d.pathOr)(d.identity,["current","resetScrollbarPosition"],g)()}),[g]),P=(0,a.useCallback)((e=>{i(e),x()}),[i,x]),O=(0,a.useCallback)((e=>{i(0),f(e),x()}),[i,f,x]);return l().createElement(c.TablePagination,{classes:b({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:y||p().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return p().text("${fromRow}-${toRow} of ${countRows}",{fromRow:p().number(t,"0,0"),toRow:p().number(n,"0,0"),countRows:p().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:o,onChangePage:(0,d.pipe)((0,d.nthArg)(1),P),rowsPerPage:u,onChangeRowsPerPage:(0,d.pipe)(h.NA,O)})};g.propTypes={classes:o().object,rowsPerPageOptions:o().arrayOf(o().number),count:o().number,page:o().number,onChangePage:o().func,rowsPerPage:o().number,onChangeRowsPerPage:o().func,basicTableRef:o().shape({current:o().object}),labelRowsPerPage:o().string};const y=l().memo(g)},26180:(e,t,n)=>{n.d(t,{ZP:()=>b});var r=n(17440),o=n(31276);function a(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i="CHANGE_COLUMNS",s="TOGGLE_FILTERS",c="CHANGE_FILTER",u="TOGGLE_SORT",p="CHANGE_PAGE",h="CHANGE_ROWS_PER_PAGE",d={changeColumns:(0,o.zD)(i),toggleFilters:(0,o.zD)(s),changeFilter:(0,o.zD)(c),toggleSort:(0,o.zD)(u),changePage:(0,o.zD)(p),changeRowsPerPage:(0,o.zD)(h)},m=(e,t)=>{const n=(0,r.difference)(e.visibleColumns,t),o=e=>n.includes(e);return(0,r.evolve)({visibleColumns:(0,r.always)(t),sorting:(0,r.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,r.keys)(e).reduce(((e,t)=>o(t)?(0,r.dissoc)(t,e):e),e)},e)},b={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return m(e,n)}case s:{const t=!e.filters;return a({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:o}=t.payload;return(0,r.evolve)({filters:o?(0,r.assoc)(n,o):(0,r.dissoc)(n),page:(0,r.always)(0)},e)}case u:{const n=t.payload,l=(0,r.path)(["sorting","field"],e),i=(0,r.path)(["sorting","order"],e);return a({},e,{sorting:{field:n,order:(0,o.Dh)(n===l?i:null)},page:0})}case p:return a({},e,{page:t.payload});case h:return a({},e,{rowsPerPage:t.payload});default:return e}},actions:d,changeVisibleColumns:m}},10237:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(27556),o=n(13980),a=n.n(o),l=n(24328),i=n.n(l);function s(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=r.concat(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 in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function p(){return p=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},p.apply(this,arguments)}const h=(0,l.forwardRef)(((e,t)=>{let{children:n,className:o}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const l=u();return i().createElement(r.Z,p({ref:t,className:o,classes:{root:l["basic-view__paper"]}},a),n)}));h.displayName="BasicView",h.propTypes={children:a().node,className:a().string};const d=h},68439:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),o=n.n(r),a=n(52730),l=n(71153),i=n.n(l),s=n(94079),c=n(99493),u=n(87638);const p=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),h=e=>{let{entity:t,className:n,size:r="small"}=e;const l=p(),h=(0,a.useSelector)(u.ZP.selectors.getMetadata),d=t.type,m=(0,c.nt9)(h,d)||{},b=(0,c.VD3)(h,m,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:b,color:c.P6Y.Colors.getColor(b)?"#FFFFFF":"#212121"},className:i()(l[`entityType-${r}`],n),component:"div"},(0,c.jFi)(h,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),p=n(94079),h=n(87918),d=n.n(h),m=n(99493),b=n(87638),f=n(53180),g=n(68439);const y=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:a,classes:l}=e;const i=y({classes:l}),h=(0,c.useSelector)(b.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,m.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const x=(0,m.idV)(n.label),P=n.secondaryLabel,O=(0,m.ptG)(h,n),w=(0,m.Fn9)(n),C=n.uri,k=(0,m.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":C},o().createElement(f.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(p.Typography,{variant:"h6",className:i.label},x),P&&o().createElement(p.Typography,{variant:"subtitle2",className:i.secondaryLabel},P),O&&o().createElement(p.Typography,{variant:"subtitle1",className:i.businessCard},O)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(g.Z,{entity:n,size:"medium",className:i.badge}),!(0,m.ZiX)(C)&&o().createElement(p.Tooltip,{title:d().text("Copy to clipboard")},o().createElement(p.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},d().text("Entity ID"),": ",k))))),a&&o().createElement("div",null,a)))};v.propTypes={className:l().string,entity:l().object,children:l().node,classes:l().object};const x=v},93873:(e,t,n)=>{n.d(t,{a:()=>T});var r=n(24328),o=n.n(r),a=n(87918),l=n.n(a),i=n(94079),s=n(83348),c=n(8818),u=n(67766),p=n(42767),h=n(99493);const d=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),m=(0,s.Z)(i.Link),b=e=>{let{total:t=0,onPrev:n,onNext:r,onSearchResultsClick:a,isPrevDisabled:i,isNextDisabled:s}=e;const b=d();return o().createElement("div",{className:b.container},o().createElement(m,{className:b.link,component:"button",variant:"caption",onClick:a,underline:"none",tooltipTitle:l().text("Go to search results")},(0,h.k7L)(t,1e6)," ",1===t?l().text("Search result"):l().text("Search results")),o().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:l().text("Go to previous profile"),onClick:n,disabled:i,showForDisabled:!0}),o().createElement(c.k,{size:"L",icon:p.Z,tooltipTitle:l().text("Go to next profile"),onClick:r,disabled:s,showForDisabled:!0}))};var f=n(52730),g=n(87638),y=n(17440),v=n(39450),x=n(67218);function P(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class w{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:a,searchTenant:l,apiPath:i,dtssPath:s,globalSearchRequestOptions:c}=e;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=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=P({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,h.uqV)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,h.ZOr)(r,o)},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,h.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,h.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=a,this.searchTenant=l,this.apiPath=i,this.dtssPath=s,this.globalSearchRequestOptions=c}}function C(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){k(e,t,n[t])}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class E{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,h.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:C({},t.searchBody,{filter:e.length?(0,h.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,h.BTI)({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,h.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}const S=(e,t)=>(0,y.pipe)((0,y.map)((0,y.prop)("uri")),(0,y.reject)((e=>t.includes(e))))(e),T=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:a,isPrevDisabled:l,isNextDisabled:i}=(()=>{const e=(0,x._)(),t=(0,x._)(),n=(0,x._)(),{uri:o,index:a,total:l,tenant:i,cache:s}=(0,f.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},{type:c,data:u}=(0,f.useSelector)(g.ZP.selectors.getSearchProviderData)||{},p=(0,f.useSelector)(g.ZP.selectors.getTenant),d=(0,f.useSelector)(g.ZP.selectors.getApiPath),m=(0,f.useSelector)(g.ZP.selectors.getDtssPath),b=(0,f.useSelector)((e=>g.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),y=(0,r.useContext)(v.m),P=(0,f.useDispatch)(),[O,C]=(0,r.useState)(!1),k=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new w(t);case"graphsearch":return new E(t)}})(c,{data:u,tenant:p,searchTenant:i,apiPath:d,dtssPath:m,globalSearchRequestOptions:b})),[c,u,p,i,d,m,b]),T=(0,r.useCallback)((e=>{P(g.yC.actions.updateSearchNavigationDataFields(e))}),[P]),j=(0,r.useCallback)((e=>{const t=p!==i?(0,h.wwR)({uri:e,dataTenant:i}):e;P(g.ui.actions.openEntity({uri:t,viewId:y,source:"navigation"}))}),[P,y,p,i]),I=(0,r.useCallback)((()=>{P(g.ui.actions.openPerspective({perspectiveId:c,viewId:y}))}),[P,c,y]);(0,r.useEffect)((()=>{a>=l?T({index:l-1}):a<0&&T({index:0})}),[l,a,T]);const D=(0,r.useCallback)(((e,r,o)=>{C(!0),t(k.requestTotal()).then((e=>T({total:e})));const a=o+1;return n(k.requestEntities(15,a)).then((t=>{if(t){if(t.length){const n=S(t,e);if(n.length>0)return T({cache:e.concat(n),uri:n[0],index:a+t.length-n.length}),void j(n[0]);if(o+t.length<r-1)return D(e,r-t.length,o+t.length)}T({index:a})}})).finally((()=>{C(!1)}))}),[k,T,j]),R=(0,r.useCallback)(((e,r)=>{C(!0),t(k.requestTotal()).then((e=>T({total:e})));const o=r-1,a=Math.max(0,r-15),l=15+Math.min(0,r-15);return n(k.requestEntities(l,a)).then((t=>{if(t){if(t.length){const n=S(t,e);if(n.length>0)return T({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void j(n[n.length-1]);if(r-t.length>0)return R(e,r-t.length)}T({index:0})}})).finally((()=>{C(!1)}))}),[k,T,j]),N=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const a=t[n];return C(!0),e(k.checkEntity(a)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),N(e,n,r-1,o)}T({index:o+1,uri:a,cache:t,total:r}),j(a)})).finally((()=>{C(!1)}))}if(!(o>=r-1))return D(t,r,o);T({cache:t,total:r,index:r-1})}),[k,T,j,D]),Z=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const a=t[n];return C(!0),e(k.checkEntity(a)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),Z(e,n-1,r-1,o-1)}T({index:o-1,uri:a,cache:t,total:r}),j(a)})).finally((()=>{C(!1)}))}if(!(o<=0))return R(t,o);T({index:0,cache:t,total:r})}),[k,T,j,R]),z=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)-1;Z(s,e,l,a)}}),[Z,s,o,l,a]),F=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)+1;N(s,e,l,a)}}),[N,s,o,l,a]);return{total:l,onPrev:z,onNext:F,onSearchResultsClick:I,isPrevDisabled:O||a<=0,isNextDisabled:O||a>=l-1}})();return(()=>{const{cache:e}=(0,f.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},t=(0,f.useSelector)(g.ZP.selectors.getMode),n=(0,f.useSelector)(g.ZP.selectors.getEntity);return(0,h.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(b,{total:e,onPrev:t,onNext:n,onSearchResultsClick:a,isPrevDisabled:l,isNextDisabled:i}):null}},51229:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(24328),o=n.n(r);const a=()=>o().createElement("div",{style:{flex:1}})},30553:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(13980),o=n.n(r),a=n(24328),l=n.n(a);const i=e=>{let{height:t,margin:n}=e;return l().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};i.propTypes={height:o().number,margin:o().number};const s=i},86361:(e,t,n)=>{n.d(t,{o:()=>l});var r=n(24328),o=n(17440);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{actions:t,dispatch:n}=e;return(0,r.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[r,l]=t;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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}({},e,{[r]:(0,o.pipe)(l,n)})}),{})),[n,t])}},7718:(e,t,n)=>{n.d(t,{C:()=>h});var r=n(24328),o=n(52730),a=n(17440),l=n(99493),i=n(87638);function s(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=r.concat(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 in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=[],p=e=>console.error("Collaboration error",e),h=e=>{let{objectIds:t=u,objectTypes:n,enabled:c=!0}=e;const h=(0,o.useSelector)(i.ZP.selectors.getEntity),d=(0,o.useSelector)(i.ZP.selectors.getTenant),m=(0,o.useSelector)(i.ZP.selectors.getCollaborationPath),b=(0,o.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[f,g]=(0,r.useState)(null),[y,v]=(0,r.useState)([]),[x,P]=(0,r.useState)(null),[O,w]=(0,r.useState)(null),[C,k]=(0,r.useState)(!1),[E,S]=(0,r.useState)(!1),T=(0,r.useCallback)((e=>{P((t=>s({},t,e)))}),[]),j=null==h?void 0:h.uri,I=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(b&&j&&!(0,l.ZiX)(j)){const n=e=>{console.warn("Collaboration error",e),P(null)};(0,a.pipe)(l.$oF,(0,a.andThen)((0,a.map)((0,a.props)(["objectId","comments"]))),(0,a.andThen)(a.fromPairs),(0,a.andThen)(t?P:T),(0,a.otherwise)(n))({uris:e,tenant:d,collaborationPath:m})}else P(null)}),[T,m,j,b,d]);(0,r.useEffect)((()=>{I(t,!0)}),[t,I]);const D=(0,r.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:m,tenant:d,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;v((e=>t?(0,a.uniqBy)((0,a.prop)("commentId"),[...e,...n]):n)),g(r)})).catch(p)}),[m,d]),R=(0,r.useCallback)((e=>{S(!0),(0,l.d7q)({collaborationPath:m,tenant:d,commentId:e}).then(w).catch(p).finally((()=>S(!1)))}),[m,d]),N=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:a}=e;k(!0);const i={objectId:o,content:t,relatedObjectUris:a,objectType:r,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:m,tenant:d,data:i}).then((e=>{let[t]=e;return((e,t)=>{w(e),P((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),v((t=>[e,...t]))})(t,o)})).catch(p).finally((()=>k(!1)))}),[m,d]),Z=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:i,commentId:c,replies:u}=e;k(!0);const h={objectId:o,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:u};return(0,l.uAg)({collaborationPath:m,tenant:d,data:h}).then((e=>(e=>{w(e),v((0,a.map)((0,a.when)((0,a.propEq)("commentId",e.commentId),(0,a.always)(e))))})(s({},e,{replies:u})))).catch(p).finally((()=>k(!1)))}),[m,d]),z=(0,r.useCallback)((e=>{let{uri:t,commentId:n}=e;k(!0),(0,l.YFy)({collaborationPath:m,tenant:d,commentId:n}).then((()=>((e,t)=>{w(null),P((n=>{const r=n[t]||[];return s({},n,{[t]:r.filter((t=>t.commentId!==e))})})),v((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(p).finally((()=>k(!1)))}),[m,d]),F=(0,r.useCallback)(((e,t,n)=>{const r="resolve"===e.action?"resolved":"open";w("resolved"===r?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:[...t.replies,e]})}),P((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:r,replies:e.replies+1}):e))}))),v((t=>t.map((t=>t.commentId===n?s({},t,{status:r,replies:[...t.replies,e]}):t))))}),[]),q=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:o,uri:a}=e;k(!0);const i={content:t,action:o,namedUsers:n};return(0,l.PP2)({collaborationPath:m,tenant:d,commentId:r,data:i}).then((e=>{let[t]=e;return F(t,a,r)})).catch(p).finally((()=>k(!1)))}),[m,d,F]),B=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;q({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[q]),G=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;q({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[q]);return{clearCurrentComment:(0,r.useCallback)((()=>{w(null)}),[]),comments:y,commentsMap:x,createComment:N,createReply:q,currentComment:O,deleteComment:z,editComment:Z,getComment:R,getComments:D,getCommentsCount:I,loading:E,objectTypes:n,pageToken:f,reOpenThread:G,resolveThread:B,sending:C}}},17554:(e,t,n)=>{n.d(t,{U:()=>i});var r=n(24328),o=n(52730),a=n(99493),l=n(87638);const i=()=>{const[e,t]=(0,r.useState)([]),n=(0,o.useSelector)(l.ZP.selectors.getTenant),i=(0,o.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,r.useEffect)((()=>{(0,a.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}}}]);
package/4126.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4126],{27815:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),i=n(71153),s=n.n(i),c=n(17440),u=n(52730),d=n(87638),p=n(99493),h=n(94079),m=n(92575),f=n(37285),g=n(96808),b=n(7785),y=n(79692);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=r.concat(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 in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x={input:e=>E({},e,{fontSize:"14px"}),menuPortal:e=>E({},e,{zIndex:1300})},C=(0,y.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const O=e=>{let{entityType:t,selectedAttributes:n,className:l,onChange:i,title:y,disableUnderline:E,menuPlacement:v="bottom"}=e;const O=(0,u.useSelector)(d.ZP.selectors.getMetadata),k=C(),T=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const o=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:o,level:t});const l=(0,p.EUG)(O,r);return e.concat(l?T(l,t+1,o):[])}),[])}),[O]),w=(0,r.useMemo)((()=>T((null==t?void 0:t.attributes)||[])),[t,T]);return o().createElement("div",{className:s()(k.root,l)},o().createElement(h.Typography,{className:k.title,variant:"subtitle1"},y||a().text("Attribute")),o().createElement(m.Z,{value:n,options:w,TextFieldProps:{InputProps:{disableUnderline:E},classes:{root:k.dropDownInput}},components:{DropdownIndicator:g.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["data"]);return o().createElement(f.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:l,innerProps:a}=e;return o().createElement("div",a,o().createElement(b.Z,{checked:n,level:r.level,data:r,label:l,labelInText:l,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),i),styles:x,classes:k,menuPlacement:v,menuPortalTarget:document.body}))}},60894:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(94656);function s(){return s=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},s.apply(this,arguments)}const c=e=>o().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),d=n(17440),p=n(47458),h=n(87918),m=n.n(h),f=n(85657);const g=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:l,title:a,tooltipTitle:i}=e;const[s,h]=(0,r.useState)(null),g=(0,r.useCallback)((e=>{const t=(0,d.pipe)(f.JJ,(0,d.pluck)("id"))(e),r=(0,f.u)(n,e);l(r?(0,d.difference)(n,t):(0,d.uniq)((0,d.concat)(n,t)))}),[n,l]);return o().createElement(o().Fragment,null,o().createElement(u.k,{tooltipTitle:i||m().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),o().createElement(p.G,{onColumnClick:g,anchorEl:s,columnsData:t,onClose:()=>h(null),title:a,selectedColumns:n}))};g.propTypes={columnsData:i.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func,title:a().string,tooltipTitle:a().string};const b=g},47458:(e,t,n)=>{n.d(t,{G:()=>O});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),i=n(17440),s=n(99493),c=n(44890),u=n(97820),d=n(85657),p=n(56656),h=n(54763),m=n(13980),f=n.n(m),g=n(7785),b=n(27239),y=n(71153),E=n.n(y);const v=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),x=e=>{let{item:t,onClick:n,checked:r,level:l,style:a,isFocused:i,isGroupItem:s,hideCheckBox:c}=e;const u=v();return o().createElement(g.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:l,data:t,label:o().createElement(b.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:a,isFocused:i,hideIcon:s,className:E()({[u.groupItem]:s})})};x.propTypes={item:f().shape({label:f().string,filterText:f().string}),level:f().number,onClick:f().func,checked:f().bool,style:f().object,isGroupItem:f().bool,isFocused:f().bool,hideCheckBox:f().bool};const C=x,O=e=>{let{anchorEl:t,onClose:n,title:l,columnsData:m,onColumnClick:f,selectedColumns:g,hideCheckBox:b}=e;const y=v(),[E,x]=(0,r.useState)(""),O=(0,r.useMemo)((()=>(0,d.eX)(m,E)),[m,E]),k=(0,r.useMemo)((()=>(0,p.LG)(O)),[O]),T=(0,s.fW1)("label")(O)||308,w=(0,r.useCallback)((e=>{let{item:t}=e;return f(t)}),[f]),{focusIndex:S,handleKeyDown:I}=(0,h.t)({items:k,open:!0,onSelectFocusedItem:w,selectedItems:g,onClose:n}),P=(0,r.useCallback)((0,i.pipe)(n,(()=>x(""))),[n]),N=Math.min(300,32*k.length),D=Math.max(140,N+108);return o().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:P,onSearch:x,title:l||a().text("Show/hide columns"),containerWidth:T,containerHeight:D,searchInputOnKeyDown:I},o().createElement(c.Z,{fixedTitle:!1,height:N,renderItem:(e,t,n)=>{let{item:r,level:l=0}=t;return o().createElement(C,{hideCheckBox:b,style:e,item:r,level:l,isFocused:S===n,checked:(0,d.u)(g,r),isGroupItem:(0,d.yf)(r),onClick:b?(0,i.pipe)(f,P):f})},items:k,getItemSize:()=>32,focusIndex:S}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>b,JJ:()=>y,yf:()=>i,u:()=>E});var r=n(17440),o=n(99493);function l(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),d=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=d(n.children||[],t),e):e.concat(t)},p=(0,r.curry)(((e,t)=>o.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),h=(0,r.reduce)(((e,t)=>d(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(p(e)),(0,r.chain)((t=>[{item:l({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),f=(0,r.has)("columns"),g=e=>{let{id:t,label:n,columns:o}=e;return[{id:t,groupId:t,label:n},...o.map((0,r.assoc)("groupId",t))]},b=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(f,g)),(0,r.filter)((0,r.either)(i,u)),h,m(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],E=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return i(t)?n.every(r):n.some(r)}},39621:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),l=n(17440),a=n(87918),i=n.n(a),s=n(6782),c=n(94079),u=n(31517),d=n(31276);const p=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),h=[i().text("minutes"),i().text("hours"),i().text("days"),i().text("weeks"),i().text("months"),i().text("years")],m=e=>{let{interval:[t,n],onChange:r,onFocus:a}=e;const i=p(),m=(0,l.pipe)(d.NA,parseInt,(e=>[e,n]),r),f=(0,l.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return o().createElement("div",{className:i.root},o().createElement(c.TextField,{type:"number",value:t||"",onChange:m,inputProps:{min:1,onFocus:a},InputProps:{classes:{root:i.input}},className:i.inputNumber}),o().createElement(u.Z,{label:"",placeholder:(0,s.Z)(n),className:i.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:h.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:f,TextFieldProps:{inputProps:{onFocus:a},InputProps:{classes:{root:i.input}}}}))}},68439:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(99493),u=n(87638);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,l.useSelector)(u.ZP.selectors.getMetadata),h=t.type,m=(0,c.nt9)(p,h)||{},f=(0,c.VD3)(p,m,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),d=n(94079),p=n(87918),h=n.n(p),m=n(99493),f=n(87638),g=n(53180),b=n(68439);const y=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),E=e=>{let{className:t,entity:n,children:l,classes:a}=e;const i=y({classes:a}),p=(0,c.useSelector)(f.ZP.selectors.getMetadata),E=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,m.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const v=(0,m.idV)(n.label),x=n.secondaryLabel,C=(0,m.ptG)(p,n),O=(0,m.Fn9)(n),k=n.uri,T=(0,m.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!O}),"data-entity-uri":k},o().createElement(g.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(d.Typography,{variant:"h6",className:i.label},v),x&&o().createElement(d.Typography,{variant:"subtitle2",className:i.secondaryLabel},x),C&&o().createElement(d.Typography,{variant:"subtitle1",className:i.businessCard},C)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(b.Z,{entity:n,size:"medium",className:i.badge}),!(0,m.ZiX)(k)&&o().createElement(d.Tooltip,{title:h().text("Copy to clipboard")},o().createElement(d.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:E},h().text("Entity ID"),": ",T))))),l&&o().createElement("div",null,l)))};E.propTypes={className:a().string,entity:a().object,children:a().node,classes:a().object};const v=E},93873:(e,t,n)=>{n.d(t,{a:()=>I});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),i=n(94079),s=n(83348),c=n(8818),u=n(67766),d=n(42767),p=n(99493);const h=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),m=(0,s.Z)(i.Link),f=e=>{let{total:t=0,onPrev:n,onNext:r,onSearchResultsClick:l,isPrevDisabled:i,isNextDisabled:s}=e;const f=h();return o().createElement("div",{className:f.container},o().createElement(m,{className:f.link,component:"button",variant:"caption",onClick:l,underline:"none",tooltipTitle:a().text("Go to search results")},(0,p.k7L)(t,1e6)," ",1===t?a().text("Search result"):a().text("Search results")),o().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:a().text("Go to previous profile"),onClick:n,disabled:i,showForDisabled:!0}),o().createElement(c.k,{size:"L",icon:d.Z,tooltipTitle:a().text("Go to next profile"),onClick:r,disabled:s,showForDisabled:!0}))};var g=n(52730),b=n(87638),y=n(17440),E=n(39450),v=n(67218);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=r.concat(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 in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:l,searchTenant:a,apiPath:i,dtssPath:s,globalSearchRequestOptions:c}=e;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=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=x({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,p.uqV)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,p.ZOr)(r,o)},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,p.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,p.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=l,this.searchTenant=a,this.apiPath=i,this.dtssPath=s,this.globalSearchRequestOptions=c}}function k(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=r.concat(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 in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class w{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,p.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:k({},t.searchBody,{filter:e.length?(0,p.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,p.BTI)({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,p.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}const S=(e,t)=>(0,y.pipe)((0,y.map)((0,y.prop)("uri")),(0,y.reject)((e=>t.includes(e))))(e),I=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:l,isPrevDisabled:a,isNextDisabled:i}=(()=>{const e=(0,v._)(),t=(0,v._)(),n=(0,v._)(),{uri:o,index:l,total:a,tenant:i,cache:s}=(0,g.useSelector)(b.ZP.selectors.getSearchNavigationData)||{},{type:c,data:u}=(0,g.useSelector)(b.ZP.selectors.getSearchProviderData)||{},d=(0,g.useSelector)(b.ZP.selectors.getTenant),h=(0,g.useSelector)(b.ZP.selectors.getApiPath),m=(0,g.useSelector)(b.ZP.selectors.getDtssPath),f=(0,g.useSelector)((e=>b.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),y=(0,r.useContext)(E.m),x=(0,g.useDispatch)(),[C,k]=(0,r.useState)(!1),T=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new O(t);case"graphsearch":return new w(t)}})(c,{data:u,tenant:d,searchTenant:i,apiPath:h,dtssPath:m,globalSearchRequestOptions:f})),[c,u,d,i,h,m,f]),I=(0,r.useCallback)((e=>{x(b.yC.actions.updateSearchNavigationDataFields(e))}),[x]),P=(0,r.useCallback)((e=>{const t=d!==i?(0,p.wwR)({uri:e,dataTenant:i}):e;x(b.ui.actions.openEntity({uri:t,viewId:y,source:"navigation"}))}),[x,y,d,i]),N=(0,r.useCallback)((()=>{x(b.ui.actions.openPerspective({perspectiveId:c,viewId:y}))}),[x,c,y]);(0,r.useEffect)((()=>{l>=a?I({index:a-1}):l<0&&I({index:0})}),[a,l,I]);const D=(0,r.useCallback)(((e,r,o)=>{k(!0),t(T.requestTotal()).then((e=>I({total:e})));const l=o+1;return n(T.requestEntities(15,l)).then((t=>{if(t){if(t.length){const n=S(t,e);if(n.length>0)return I({cache:e.concat(n),uri:n[0],index:l+t.length-n.length}),void P(n[0]);if(o+t.length<r-1)return D(e,r-t.length,o+t.length)}I({index:l})}})).finally((()=>{k(!1)}))}),[T,I,P]),R=(0,r.useCallback)(((e,r)=>{k(!0),t(T.requestTotal()).then((e=>I({total:e})));const o=r-1,l=Math.max(0,r-15),a=15+Math.min(0,r-15);return n(T.requestEntities(a,l)).then((t=>{if(t){if(t.length){const n=S(t,e);if(n.length>0)return I({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void P(n[n.length-1]);if(r-t.length>0)return R(e,r-t.length)}I({index:0})}})).finally((()=>{k(!1)}))}),[T,I,P]),M=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const l=t[n];return k(!0),e(T.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),M(e,n,r-1,o)}I({index:o+1,uri:l,cache:t,total:r}),P(l)})).finally((()=>{k(!1)}))}if(!(o>=r-1))return D(t,r,o);I({cache:t,total:r,index:r-1})}),[T,I,P,D]),L=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const l=t[n];return k(!0),e(T.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),L(e,n-1,r-1,o-1)}I({index:o-1,uri:l,cache:t,total:r}),P(l)})).finally((()=>{k(!1)}))}if(!(o<=0))return R(t,o);I({index:0,cache:t,total:r})}),[T,I,P,R]),_=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)-1;L(s,e,a,l)}}),[L,s,o,a,l]),A=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)+1;M(s,e,a,l)}}),[M,s,o,a,l]);return{total:a,onPrev:_,onNext:A,onSearchResultsClick:N,isPrevDisabled:C||l<=0,isNextDisabled:C||l>=a-1}})();return(()=>{const{cache:e}=(0,g.useSelector)(b.ZP.selectors.getSearchNavigationData)||{},t=(0,g.useSelector)(b.ZP.selectors.getMode),n=(0,g.useSelector)(b.ZP.selectors.getEntity);return(0,p.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(f,{total:e,onPrev:t,onNext:n,onSearchResultsClick:l,isPrevDisabled:a,isNextDisabled:i}):null}},92575:(e,t,n)=>{n.d(t,{Z:()=>S});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(17440),s=n(70347);const c=(0,n(5407).Z)(s.ZP);var u=n(5190),d=n(18461),p=n(94079),h=n(71153),m=n.n(h),f=n(88611);function g(){return g=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},g.apply(this,arguments)}function b(e){const{innerProps:t,innerRef:n,children:r,isFocused:l,isSelected:a,selectProps:{classes:i},label:s}=e;return o().createElement(p.MenuItem,g({className:m()(i.option,{[i["option--selected"]]:a}),ref:n,selected:l,component:"div"},t),o().createElement(p.Checkbox,{color:"primary",checked:a}),o().createElement(f.C,{value:s},o().createElement("div",{className:i["option--item"]},r)))}b.propTypes={children:a().node,innerProps:a().shape({id:a().string.isRequired,key:a().string,onClick:a().func.isRequired,onMouseMove:a().func.isRequired,onMouseOver:a().func.isRequired,tabIndex:a().number.isRequired}).isRequired,innerRef:a().oneOfType([a().oneOf([null]),a().func,a().shape({current:a().any.isRequired})]),isFocused:a().bool.isRequired,isSelected:a().bool.isRequired,label:a().string,selectProps:a().shape({classes:a().shape({option:a().string})})};const y={Option:b};var E=n(79692),v=n(31276);function x(){return x=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},x.apply(this,arguments)}function C(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k=(0,E.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let T=0;function w(e){const{label:t,creatable:n,getOptions:l,loadingIndicator:a,components:s,classes:p,styles:h,onChange:m,onInputChange:f,menuPlacement:g="auto"}=e,b=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),E=n?c:l?d.Z:u.Z,[O,w]=(0,r.useState)(""),S=k((0,i.omit)(["classes"],e)),I="custom-select-"+T++,P=C({},y,s),N=(0,v.ze)(S,p),D=C({indicatorSeparator:e=>C({},e,{margin:"10px 0"}),loadingIndicator:e=>C({},e,{display:a?e.display:"none"}),loadingMessage:e=>C({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},h),R=t?{inputId:I,TextFieldProps:C({label:t,InputLabelProps:{htmlFor:I,shrink:!(!e.value||!e.value.length)||void 0,className:N.label}},e.TextFieldProps)}:{};return o().createElement(E,x({isMulti:!0,inputId:I,inputValue:O,onChange:function(e,t){m(e,t),"create-option"===t.action&&(w(""),f("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;f(e,{action:n}),"set-value"!==n&&w(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:N,components:P,styles:D,menuPlacement:g,loadOptions:l},R,b))}w.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},w.propTypes={creatable:a().bool,cacheOptions:a().bool,defaultOptions:a().bool,value:a().arrayOf(a().shape({label:a().string.isRequired,value:a().any})),options:a().arrayOf(a().shape({label:a().string.isRequired,value:a().any})),onChange:a().func,onInputChange:a().func,placeholder:a().string,label:a().string,loadingIndicator:a().bool,components:a().shape({ClearIndicator:a().func,Control:a().func,DropdownIndicator:a().func,DownChevron:a().func,CrossIcon:a().func,Group:a().func,GroupHeading:a().func,IndicatorsContainer:a().func,IndicatorSeparator:a().func,Input:a().func,LoadingIndicator:a().func,Menu:a().func,MenuList:a().func,MenuPortal:a().func,LoadingMessage:a().func,NoOptionsMessage:a().func,MultiValue:a().func,MultiValueContainer:a().func,MultiValueLabel:a().func,MultiValueRemove:a().func,Option:a().func,Placeholder:a().func,SelectContainer:a().func,SingleValue:a().func,ValueContainer:a().func}),classes:a().shape({control:a().string,valueContainer:a().string,multiValue:a().string,noOptionsMessage:a().string,singleValue:a().string,placeholder:a().string,menu:a().string,clearIndicator:a().string,dropdownIndicator:a().string,option:a().string,"option--selected":a().string,label:a().string}),styles:a().shape({clearIndicator:a().func,container:a().func,control:a().func,dropdownIndicator:a().func,group:a().func,groupHeading:a().func,indicatorsContainer:a().func,indicatorSeparator:a().func,input:a().func,loadingIndicator:a().func,loadingMessage:a().func,menu:a().func,menuList:a().func,menuPortal:a().func,multiValue:a().func,multiValueLabel:a().func,multiValueRemove:a().func,noOptionsMessage:a().func,option:a().func,placeholder:a().func,singleValue:a().func,valueContainer:a().func}),TextFieldProps:a().object,getOptions:a().func,menuPlacement:a().string,menuPortalTarget:a().object,getOptionValue:a().func,isSearchable:a().bool};const S=w},39827:(e,t,n)=>{n.d(t,{G:()=>h});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(8818),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,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)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function d(){return d=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},d.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const h=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:h,buttonWrapper:m}=s,f=p(s,["active","buttonWrapper"]);return o().createElement("div",{className:a()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,d({},r,{classes:f,size:"S",key:t,className:a()({[a()(c.active,h)]:n===t},c.buttonWrapper,m),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},51229:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);const l=()=>o().createElement("div",{style:{flex:1}})},85451:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),l=n(52730),a=n(87918),i=n.n(a),s=n(17440),c=n(71153),u=n.n(c),d=n(94079),p=n(92575),h=n(96808),m=n(99493),f=n(87638),g=n(79692);function b(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E={input:e=>b({},e,{fontSize:"14px"}),loadingMessage:e=>b({},e,{fontSize:"14px"}),menuPortal:e=>b({},e,{zIndex:1300})},v=(0,g.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),x=e=>{let{selectedUsers:t,onChange:n,className:a,disableUnderline:c}=e;const g=v(),b=e=>({value:e,label:e}),y=e=>e.map(b),x=(0,l.useSelector)(f.ZP.selectors.getTenant),C=(0,l.useSelector)(f.ZP.selectors.getServicesPath),O=(0,r.useRef)();return o().createElement("div",{className:u()(g.root,a)},o().createElement(d.Typography,{className:g.title,variant:"subtitle1"},i().text("User")),o().createElement(p.Z,{value:y(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(O.current||(O.current=(0,m.kz_)({tenant:x,servicesPath:C})),O.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>m.P6Y.strings.search(t,e))):t)(e),y))),TextFieldProps:{InputProps:{disableUnderline:c},className:g.dropDownInput},components:{DropdownIndicator:h.Z},styles:E,classes:g,menuPortalTarget:document.body}))}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>u,rx:()=>d,_V:()=>p,Xr:()=>h});var r=n(17440),o=n(87918),l=n.n(o),a=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},u=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(a.I))),d=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(s),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),p=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(p).join(", "):(0,r.is)(Object,e)?p("value"in e?e.value:Object.values(e)):e.toString(),h=e=>({[a.I.COMMENT_ADDED]:l().text("Comment added"),[a.I.COMMENT_DELETED]:l().text("Comment deleted"),[a.I.COMMENT_UPDATED]:l().text("Comment updated"),[a.I.ENTITIES_MERGED]:l().text("Profile merged"),[a.I.ENTITIES_MERGED_MANUALLY]:l().text("Profile merged manually"),[a.I.ENTITIES_MERGED_ON_THE_FLY]:l().text("Profile merged on the fly"),[a.I.ENTITIES_SPLITTED]:l().text("Profile un-merged"),[a.I.ENTITY_CHANGED]:l().text("Profile updated"),[a.I.ENTITY_CREATED]:l().text("Profile created"),[a.I.ENTITY_LOST_MERGE]:l().text("Profile lost merge"),[a.I.ENTITY_REMOVED]:l().text("Profile removed"),[a.I.GROUP_CHANGED]:l().text("Group updated"),[a.I.GROUP_CREATED]:l().text("Group created"),[a.I.GROUP_REMOVED]:l().text("Group removed"),[a.I.MODEL_UPDATED]:l().text("Model was updated"),[a.I.NOT_MATCHES_RESET]:l().text("Not matches reset"),[a.I.NOT_MATCHES_SET]:l().text("Not matches set"),[a.I.PERIODIC_TASK_SCHEDULED]:l().text("Periodic task was scheduled"),[a.I.POTENTIAL_MATCHES_FOUND]:l().text("Potential matches found"),[a.I.POTENTIAL_MATCHES_REMOVED]:l().text("Potential matches removed"),[a.I.RELATIONSHIP_CHANGED]:l().text("Relationship updated"),[a.I.RELATIONSHIP_CREATED]:l().text("Relationship created"),[a.I.RELATIONSHIP_REMOVED]:l().text("Relationship removed"),[a.I.USER_LOGIN]:l().text("Logged in"),[a.I.USER_LOGOUT]:l().text("Logged out"),[a.I.USER_PROFILE_VIEW]:l().text("Profile viewed"),[a.I.USER_SEARCH]:l().text("Searched"),[a.I.ANALYTICS_ATTRIBUTES_CHANGED]:l().text("Analytics attribute changed"),[a.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:l().text("SFDC connector synchronization issue")}[e]||"")},51843:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),l=n(95038),a=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(99493),d=n(94079),p=n(96808),h=n(37699);const m=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),f=a().localeData().longDateFormat("L"),g=e=>{let{values:t,onChange:n,onFocus:l}=e;const a=f,i=(0,r.useRef)(null),[g,b]=(0,r.useState)(!1),y=m(),E=(0,r.useCallback)((()=>{b((e=>!e)),l()}),[l]),v=()=>{b(!1)};return o().createElement("div",{className:y.root},o().createElement(d.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,a))).join(" — "),onClick:E,variant:"filled",ref:i,InputProps:{endAdornment:o().createElement(p.Z,{selectProps:{classes:y,menuIsOpen:g},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:y.inputRoot,input:y.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${a} — ${a}`)}),o().createElement(d.Menu,{variant:"menu",open:g,autoFocus:!1,classes:{paper:y.paper},anchorEl:i.current,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:g,style:{width:"100%"}}},o().createElement(h.Z,{values:t,onCancel:v,onApply:e=>{n(e),b(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},67885:(e,t,n)=>{let r,o;n.d(t,{K:()=>r,o:()=>o}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(o||(o={}))},68108:(e,t,n)=>{n.r(t),n.d(t,{default:()=>lt});var r=n(24328),o=n.n(r),l=n(52730),a=n(8598),i=n(36138),s=n(44443),c=n(22664),u=n(39450),d=n(585),p=n(87918),h=n.n(p),m=n(87638),f=n(99493),g=n(71820),b=n(57730),y=n(20562),E=n(2804),v=n(85965),x=n(85890),C=n(91515),O=n(54362),k=n(6674),T=n(63149),w=n(48017),S=n(96955),I=n(57304),P=n(3409),N=n(93873),D=n(66095),R=n(20982),M=n(39827),L=n(94079),_=n(80147),A=n(87685),U=n(22385),j=n(79692);const Z=(0,j.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),H=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=Z();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(U.Z,{className:a.closeButton,icon:A.default,onClick:r}),t),l)};var F=n(99144),z=n(17440),B=n(31276),G=n(83401);let V;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(V||(V={}));const W=e=>(0,z.pipe)((0,z.map)((0,z.prop)("value")),z.sum)(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Y(e,t,n[t])}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const q=e=>{let{data:t,width:n,height:o}=e;return(0,r.useMemo)((()=>{if(!n||!o)return{nodes:[],links:[]};const e=function(){let e=24,t=15,n=10,r=8,o=[1,1];function l(l){let{nodes:i,links:s}=l;const c={nodes:i,links:s};return function(e){let{nodes:t,links:n}=e;t.forEach((e=>{e.sourceLinks=[],e.targetLinks=[]})),n.forEach((e=>{e.source.sourceLinks.push(e),e.target.targetLinks.push(e)}))}(c),function(e){let{nodes:t}=e;t.forEach((e=>{e.value=Math.max(W(e.sourceLinks),W(e.targetLinks))}))}(c),function(t){let{nodes:n}=t;if(!n.length)return;let r,l=[n[0]],a=0;for(;l.length;)r=[],l.forEach((t=>{t.x=a,t.dx=e,t.targetLinks.forEach((e=>{r.indexOf(e.source)<0&&r.push(e.source)}))})),l=r,++a;if(n.forEach((e=>{e.x=a-1-e.x})),a>2){const t=(o[0]-2*e-22)/(a-2);n.forEach((n=>{n.sourceLinks&&0!=n.sourceLinks.length?n.x*=t:n.x=o[0]-e}))}else n[0].x=o[0]-e,n[1].x=n[0].x-22-e}(c),function(e){let{nodes:l,links:a}=e;const i=(0,z.pipe)((0,z.groupBy)((0,z.prop)("x")),z.toPairs,(0,z.sort)(((e,t)=>e[0]-t[0])),(0,z.map)((0,z.nth)(1)))(l);(function(){let e=(0,z.pipe)((0,z.map)((e=>(o[1]-(e.length-1)*r)/W(e))),(0,z.reduce)(Math.min,1/0))(i);const s=(0,z.pipe)((0,z.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,z.reduce)(Math.min,1/0))(l);e=Math.max(Math.min(e,t/s),n/s),i.forEach((t=>{t.forEach(((t,n)=>{t.y=n,t.dy=t.value*e}))})),a.forEach((t=>{t.dy=t.value*e}))})(),i.forEach((e=>{let t,n,l,a=0;const i=e.length;for(e.sort(((e,t)=>e.y-t.y)),l=0;l<i;++l)t=e[l],n=a-t.y,n>0&&(t.y+=n),a=t.y+t.dy+r;if(n=a-r-o[1],n>0)for(a=t.y-=n,l=i-2;l>=0;--l)t=e[l],n=t.y+t.dy+r-a,n>0&&(t.y-=n),a=t.y}));const s=(0,z.pipe)((0,z.map)((e=>(e.length-1)*r+(0,z.sum)((0,z.map)((e=>e.dy),e)))),(0,z.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,z.last)(e),r=o[1]-(t+n);e.forEach((e=>{e.y+=r,c>0&&(e.y-=c)}))}))}(c),a(c),function(e){let{nodes:t}=e;(0,z.pipe)((0,z.groupBy)((0,z.prop)("x")),z.toPairs,(0,z.sort)(((e,t)=>t[0]-e[0])),(0,z.map)((0,z.nth)(1)))(t).forEach((e=>{(e=e.concat().sort(((e,t)=>e.y-t.y))).forEach(((t,n)=>{var o;if(null!==(o=t.sourceLinks)&&void 0!==o&&o.length){var l,a,i;const{target:o,ty:s,dy:c}=(0,z.last)(t.sourceLinks);let u=o.y+s+c-t.dy;(null===(l=e[n-1])||void 0===l?void 0:l.x)==t.x&&u<(null===(a=e[n-1])||void 0===a?void 0:a.y)+(null===(i=e[n-1])||void 0===i?void 0:i.dy)+r&&(u=e[n-1].y+e[n-1].dy+r),t.y>u&&(t.y=u)}}))}))}(c),c}function a(e){let{nodes:t}=e;(0,z.pipe)((0,z.groupBy)((0,z.prop)("x")),z.toPairs,(0,z.sort)(((e,t)=>e[0]-t[0])),(0,z.map)((0,z.nth)(1)))(t).forEach((e=>{e.forEach((e=>{var t,n;if(null!==(t=e.targetLinks)&&void 0!==t&&t.length){const t=[],n=e.targetLinks.map((e=>e.crosswalk.uuid)),r=[];e.targetLinks.forEach((function(e){-1==this.indexOf(e.source)&&this.push(e.source)}),r);for(let o=0;o<r.length;o++)for(let l=0;l<r[o].sourceLinks.length;l++){const a=n.indexOf(r[o].sourceLinks[l].crosswalk.uuid);-1!=a&&t.push(e.targetLinks[a])}e.targetLinks=t}if(null!==(n=e.sourceLinks)&&void 0!==n&&n.length){var r;const t=[];if(null!==(r=e.targetLinks)&&void 0!==r&&r.length){const n=e.sourceLinks.map((e=>e.crosswalk.uuid));for(let r=0;r<e.targetLinks.length;r++){const o=n.indexOf(e.targetLinks[r].crosswalk.uuid);-1!=o&&t.push(e.sourceLinks[o])}}const n=t.map((e=>e.crosswalk.uuid)),o=e.sourceLinks.filter((function(e){return-1==this.indexOf(e.crosswalk.uuid)}),n);if(e.sourceLinks=o.concat(t),t.length>0){let t=0;for(let e=0;e<o.length;e++)t+=o[e].dy;e.sizeForNewSources=t}}}))})),t.forEach((e=>{let t=0,n=e.sizeForNewSources||0;delete e.sizeForNewSources,e.sourceLinks.forEach((e=>{e.sy=t,t+=e.dy})),e.targetLinks.forEach((e=>{e.ty=n,n+=e.dy}))}))}return l.nodeWidth=()=>e,l.setNodeWidth=t=>(e=+t,l),l.nodePadding=()=>r,l.setNodePadding=e=>(r=+e,l),l.smallestNodeMaxHeight=()=>t,l.setSmallestNodeMaxHeight=e=>(t=+e,l),l.smallestNodeMinHeight=()=>n,l.setSmallestNodeMinHeight=e=>(n=+e,l),l.size=()=>o,l.setSize=e=>(o=e,l),l.update=e=>(a(e),e),l.link=()=>{let t=.5;function n(n){const r=!n.target.sourceLinks||0==n.target.sourceLinks.length,o=n.source.x+n.source.dx,l=n.target.x,a=(d=+(d=o),p=+(p=l),e=>d*(1-e)+p*e),i=a(t),s=a(1-t),c=n.source.y+n.sy-.13,u=n.target.y+n.ty-.13;var d,p;const h=r?"":`L${l+e},${u} L${l+e},${u+n.dy+.26}`;return c===u?`M${o},${c} \n L${l},${u}${h} \n L${l},${u+n.dy+.26} \n L${o},${c+n.dy+.26} Z`:`M${o},${c}\n C${i},${c} ${s},${u} ${l},${u}${h} \n L${l},${u+n.dy+.26} \n C${s},${u+n.dy+.26} ${i},${c+n.dy+.26} \n ${o},${c+n.dy+.26} Z`}return n.curvature=function(e){return arguments.length?(t=+e,n):t},n},l}().setNodeWidth(14).setNodePadding(20).setSize([o-2,n-2]),r=e.nodeWidth(),l=e.link(),a=(e=>{const t=e.nodes.map((e=>$({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>$({},e,{source:n(e.source),target:n(e.target)})));return{nodes:t,links:r}})(t),{nodes:i,links:s}=e(a);return{nodes:i,links:s,nodeWidth:r,path:l}}),[t,o,n])};var X=n(94111),K=n(12147),Q=n(98685);const J=(0,j.Z)({tooltipTitle:{fontWeight:500,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.15px",marginBottom:"8px",userSelect:"none"},tooltipRow:{display:"flex",alignItems:"center",fontSize:"13px",lineHeight:"15px",fontWeight:"normal","&:not(:last-child)":{marginBottom:"4px"}},tooltipIcon:{fontSize:"18px",color:"rgba(0, 0, 0, 0.54)",marginRight:"8px"},node:{stroke:"#000000",strokeWidth:1,strokeOpacity:.38},rootNode:{transform:"rotate(90deg)",userSelect:"none",fontSize:"13px"}}),ee=e=>{let{user:t,time:n,children:r}=e;const l=J(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},h().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(K.Z,{className:l.tooltipIcon}),h().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(Q.Z,{className:l.tooltipIcon}),t));return o().createElement(X.Z,{title:a,placement:"top"},r)},te=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=J(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:h,label:m,targetLinks:f,sourceLinks:g,entity:{crosswalks:b=[],merges:y}}=t,[E]=b,{isDimmed:v,highlightCrosswalk:x,removeHighlight:C}=(0,T.pu)(E),O=(0,T.nX)(E),k=null!=b&&b.length?g[b.length-1].sy+g[b.length-1].dy:0;return(0,r.useEffect)((()=>{var e;const n=t.dy,r=(null==u||null===(e=u.current)||void 0===e?void 0:e.clientWidth)||0;n<r&&c(n/2-r/2)}),[]),o().createElement("g",{transform:`translate(${d},${p})`},"ROOT"===h?o().createElement("text",{dy:-5,dx:s,ref:u,className:i.rootNode},m||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:k,width:14,className:i.node,fill:a?O:"#F0F0F0",key:"node-main",opacity:l&&v?.19:1,onMouseEnter:()=>{l&&x()},onMouseLeave:()=>{l&&C()}}),!(null==f||!f.length)&&(()=>{const e=(0,z.pipe)((0,z.map)((0,z.prop)("source")),(0,z.groupBy)((0,z.prop)("time")))(f);return null==y?void 0:y.map(((t,r)=>{let{time:a,user:s}=t;const c=e[a];if(!c)return;const[u,d]=c.reduce(((e,t)=>{let{sourceLinks:n}=t;return[(0,z.min)((0,z.head)(n).ty,e[0]),(0,z.max)((0,z.last)(n).ty+(0,z.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(ee,{user:s,time:a,key:"node-"+r},o().createElement("rect",{transform:`translate(0,${u})`,height:d-u,width:n,className:i.node,fillOpacity:.54,fill:"#F0F0F0",opacity:l&&v?.38:1}))}))})()))},ne=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,T.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,T.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",opacity:r&&s?.1:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},re=e=>{let{width:t,height:n,data:l,accentContributors:a}=e;const[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0),[d,p]=(0,r.useState)(0),{links:h,nodes:m,nodeWidth:f,path:g}=q({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const b=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(te,{highlightEnabled:a,isColored:a,node:e,nodeWidth:f,key:`SankeyNode-${t}`})))),[m,a,f,t,n]),y=(0,r.useMemo)((()=>h.map(((e,t)=>o().createElement(ne,{highlightEnabled:!a,isColored:!a,link:e,path:g(e),key:`SankeyLink-${t}`})))),[a,h,g]),E=e=>{const t=e.pageX,n=t-c;return u(t),n},v=()=>s(!1),x=i?"none":"auto",C=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:C,onPointerDown:e=>{e.preventDefault(),s(!0),E(e)},onPointerMove:e=>{if(!i)return;const t=E(e);p(d+t)},onPointerUp:v,onPointerLeave:v},o().createElement("g",{transform:`translate(${d},${n}) rotate(-90)`,pointerEvents:x},o().createElement("g",null,y),o().createElement("g",null,b)))};function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const le=(0,z.curry)(((e,t)=>!e||e.some((0,f.aFF)(t)))),ae=(0,z.curry)(((e,t)=>(0,z.evolve)({crosswalks:(0,z.filter)(le(e)),merges:(0,z.map)((0,z.evolve)({losers:(0,z.map)(ae(e))}))},t))),ie=e=>{let t=1;const n=(0,z.pipe)((0,z.evolve)({crosswalks:(0,z.map)((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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){oe(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,z.evolve)({merges:(0,z.map)((0,z.evolve)({losers:(0,z.map)((e=>n(e)))}))}));return n(e)},se=e=>{const t=[],n=[],r=(e,o,l)=>{const{crosswalks:a=[],merges:i=[],uri:s="",label:c}=e;t.push({entity:e,name:s,time:l,label:c});const u=t.length-1,d=(0,z.pipe)((0,z.chain)((e=>{let{losers:t,time:n}=e;return(0,z.pipe)((0,z.filter)((e=>{var t,n;return(null===(t=e.crosswalks)||void 0===t?void 0:t.length)||(null===(n=e.merges)||void 0===n?void 0:n.length)})),(0,z.chain)((e=>r(e,u,n))))(t)})),(0,z.concat)(a))(i);return-1!=o&&d.forEach((e=>n.push({source:t[u],target:t[o],value:10,crosswalk:e}))),d};r(e,-1,Date.now());const o=(0,z.pipe)((0,z.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),z.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},ce=(0,j.Z)((()=>({graph:{padding:"8px 12px",boxSizing:"border-box",height:"100%",width:"100%",maxHeight:"500px"}}))),ue=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=ce(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,z.pipe)(ae(n),ie,se)({uri:"ROOT",label:t,crosswalks:[],merges:[{time:Date.now(),losers:[e]}]})}(t,n,r);return o().createElement("div",{className:a.graph},o().createElement(s.Z,{refreshMode:"debounce",refreshRate:100,handleWidth:!0,handleHeight:!0},(e=>{let{width:t=0,height:n=200}=e;return o().createElement(re,{width:t,height:n,data:i,accentContributors:l})})))}));var de=n(90186),pe=n(77243);function he(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){me(e,t,n[t])}))}return e}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fe=n(52017),ge=n(79769),be=n(71153),ye=n.n(be),Ee=n(72753),ve=n(65549);function xe(){return xe=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},xe.apply(this,arguments)}const Ce=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,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",xe({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M17 13.138l4.5 4.5-4.5 4.5V18.5h-1.247l-3.488-3.479 1.413-1.414 2.901 2.893H17v-3.362zM17 1.5L21.5 6 17 10.5V7.138h-.421l-11.03 11H2v-2h2.723l11.03-11H17V1.5zm-11.45 4l3.294 3.286-1.414 1.413L4.723 7.5H2v-2h3.55z",id:"svg457070356a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg457070356b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg457070356a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg457070356b)",d:"M0 0h24v24H0z"})))};var Oe=n(22983),ke=n(8818),Te=n(51229);const we=(0,j.Z)((e=>({root:{display:"flex",alignItems:"center",paddingRight:"8px","& button + button":{marginLeft:"4px"}},focusedIcon:e=>{let{isFocused:t}=e;return{width:28,height:28,color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0}},title:{color:e.palette.text.secondary,paddingLeft:"6px",paddingRight:"2px"},uri:{lineHeight:"15px",color:e.palette.text.primary}}))),Se=e=>{let{contributorUri:t,focusable:n,disableAdd:r,disableUnmerge:l,onAdd:a,onUnmerge:i,onToggleFocus:s,onUnsubscribe:c,isFocused:u}=e;const d=we({isFocused:u});return o().createElement("div",{className:d.root},o().createElement(ke.k,{size:"XXS",onClick:()=>s(),className:d.focusedIcon,icon:n&&Ee.Z,disabled:!n,tooltipTitle:n&&h().text("Focus")}),o().createElement(L.Typography,{variant:"body2",className:d.uri},o().createElement("span",{className:d.title},h().text("Entity ID:")),(0,f.nIW)(t)),o().createElement(Te.Z,null),a&&o().createElement(ke.k,{size:"XS",icon:ve.Z,disabled:r,tooltipTitle:h().text("Add crosswalk"),showForDisabled:!0,onClick:()=>a()}),o().createElement(ke.k,{size:"XS",icon:Ce,disabled:l,tooltipTitle:h().text("Unmerge"),showForDisabled:!0,onClick:()=>i()}),c&&o().createElement(ke.k,{size:"XS",icon:Oe.Z,disabled:l,tooltipTitle:h().text("Unsubscribe"),showForDisabled:!0,onClick:()=>c()}))},Ie=(0,j.Z)((()=>({root:e=>{let{contributorColor:t}=e;return{fontSize:"13px",position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid rgba(0, 0, 0, 0.05)",paddingLeft:"8px","&:before":{content:'" "',borderLeft:`8px solid ${t}`,position:"absolute",top:-1,left:0,bottom:-1},"& > div + div":{marginTop:"1px"}}},editor:{padding:"0px 30px 0px 25px"}}))),Pe=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,disableAddCrosswalk:c,disableEditCrosswalk:u,disableDeleteCrosswalk:d,disableUnmergeContributor:p,onUnmerge:h,onEdit:g,onDelete:b,onAdd:y,onToggleSourceExpanded:E,onUnsubscribeContributor:v}=e;const x=a?(0,f.GtP)(n):"rgba(0, 0, 0, 0.38)",C=Ie({contributorColor:x}),O=(0,l.useSelector)(m.ZP.selectors.getDataTenants),k=(0,r.useRef)(null),[w]=(0,T.RT)();(0,r.useEffect)((()=>{var e;a&&w&&((0,z.pipe)((0,z.find)((e=>{let{source:t}=e;return t===w.type})),(0,z.propOr)({},"crosswalksByTypes"),z.values,z.flatten)(i).some((e=>(0,f.aFF)(w,e)&&e!==w))&&(null==k||null===(e=k.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[w]);const[S,I]=(0,r.useState)(!1),P=(0,z.pipe)((0,z.pluck)("crosswalksByTypes"),(0,z.find)((e=>e[pe.Y.Simple].length||e[pe.Y.Empty].length)),(0,z.props)([pe.Y.Simple,pe.Y.Empty]),z.flatten,z.head)(i),{toggleCrosswalkFocus:N,isFocused:D}=(0,T.BF)(P),R=(0,z.pipe)((0,z.pluck)("crosswalksByTypes"),(0,z.chain)(z.values),z.flatten)(i),M=(0,f.KMQ)(R,O);return o().createElement("div",{ref:k,className:ye()(C.root,t)},o().createElement(Se,{contributorUri:n,focusable:a&&!!P,disableAdd:c,disableUnmerge:p,isFocused:a&&D,onToggleFocus:N,onAdd:P&&(()=>I(!0)),onUnmerge:h,onUnsubscribe:M&&(()=>v({contributorUri:n,dataTenant:M,crosswalk:P}))}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(fe.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:u,disableDeleteCrosswalk:d,onEdit:g,onDelete:b,onToggleExpanded:()=>E(t)})})),S&&o().createElement(ge.Z,{className:C.editor,onAdd:e=>y({contributorCrosswalk:P,crosswalk:e}),onClose:()=>I(!1)}))},Ne=(0,j.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function De(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=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Re(e,t,n[t])}))}return e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Me=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,onAddCrosswalk:u=B.ZT,onEditCrosswalk:d=B.ZT,onDeleteCrosswalk:p=B.ZT,onUnmergeContributor:h=B.ZT,onUnsubscribeContributor:g=B.ZT}=e;const b=(0,l.useSelector)(m.ZP.selectors.getMetadata),y=(0,f.nt9)(b,n.type),E=Ne(),v=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,f.HQx)(e);return t.filter((e=>!(0,f.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,z.pipe)((0,z.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,f.aFF)(e));return t&&he({ownerType:"relation"},t)}{const t=r.find((0,f.aFF)(e));return t&&he({ownerType:"entity"},t)}})),(0,z.filter)((e=>!!e)),(0,de.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[x,C]=(0,r.useState)({}),O=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,z.chain)((e=>{var n;let{source:o,crosswalksByTypes:l}=e;const a=null===(n=t[r])||void 0===n?void 0:n.includes(o);return l[pe.Y.Simple].concat(l[pe.Y.Empty]).concat(a?l[pe.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(v,x)),[v,x]);(0,r.useEffect)((()=>{s(O)}),[O]);const k=(0,r.useCallback)((e=>{p({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,p]),T=(0,r.useCallback)((e=>{d(De({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,d]);return o().createElement("div",{className:E.table},v.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Pe,{key:r,className:E.tableRow,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,f.mkC)(y),disableEditCrosswalk:c||!(0,f.Zm0)(y),disableDeleteCrosswalk:c||!(0,f.a14)(y),disableUnmergeContributor:c||!(0,f.uGe)(f.BDP.UNMERGE,y),onAdd:e=>u(De({},e,{entity:n})),onDelete:k,onEdit:T,onUnmerge:()=>h(r),onUnsubscribeContributor:g,expandedSources:x[r],onToggleSourceExpanded:e=>{C((0,z.pipe)((0,z.unless)((0,z.has)(r),(0,z.assoc)(r,[])),(0,z.evolve)({[r]:(0,z.ifElse)((0,z.includes)(e),(0,z.without)([e]),(0,z.append)(e))})))}})})))}));var Le=n(81556);const _e=(0,j.Z)((e=>({container:{display:"flex",flexDirection:"column","& + &":{marginLeft:"16px"}},title:{fontSize:"13px",lineHeight:"15px",color:"#666666",marginBottom:"7px"},hintIcon:{width:"16px",height:"16px",verticalAlign:"middle"},graph:{width:"400px",height:"300px",borderRadius:"8px",background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",position:"relative"},checkedIcon:{position:"absolute",height:"20px",width:"20px",right:"10px",top:"10px",color:e.palette.primary.main},selectedTree:{border:`1px solid ${e.palette.primary.main}`,background:"rgba(0, 114, 206, 0.05)"}}))),Ae=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=B.ZT}=e;const s=_e(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,f.CJp)((0,f.uKF)(e)):"#CACCD1"),[t]);return o().createElement(T.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(F.Z,{className:s.hintIcon})),o().createElement("div",{className:ye()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(Le.Z,{className:s.checkedIcon}),o().createElement(ue,{crosswalkTree:n}))))},Ue=(0,j.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},trees:{display:"flex"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),je=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=Ue(),[c,u]=(0,r.useState)(f.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,f.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(L.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(L.DialogTitle,{classes:{root:s.dialogTitle}},h().text("Unmerge")),o().createElement(L.DialogContent,{classes:{root:s.dialogContent}},o().createElement(L.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},h().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Ae,{onSelect:()=>u(f.MBD.Unmerge),selected:c===f.MBD.Unmerge,title:h().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Ae,{onSelect:()=>u(f.MBD.TreeUnmerge),selected:c===f.MBD.TreeUnmerge,title:h().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(L.DialogActions,null,o().createElement(L.Button,{onClick:a},h().text("Cancel")),o().createElement(L.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},h().text("Unmerge"))))},Ze=(0,j.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),He=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=Ze(),c=(0,r.useMemo)((()=>(0,f.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(L.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(L.DialogTitle,{classes:{root:s.dialogTitle}},h().text("Unsubscribe")),o().createElement(L.DialogContent,{classes:{root:s.dialogContent}},o().createElement(L.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},h().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement(Ae,{selected:!0,title:h().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(L.DialogActions,null,o().createElement(L.Button,{onClick:a},h().text("Cancel")),o().createElement(L.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},h().text("Unsubscribe"))))},Fe=(0,j.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%"},modeSwitcher:{backgroundColor:e.palette.background.paper,marginTop:"8px"},infoIcon:{fontSize:"18px",marginRight:"8px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"5px 12px 10px 12px"},hintText:{fontSize:"12px",lineHeight:"16px"},crosswalksList:{height:"100%",width:"calc(100% - 24px)",margin:"8px 12px",background:e.palette.divider,opacity:.2},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},resizablePanesWrapper:{flexGrow:1,width:"100%"}})));function ze(){return ze=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},ze.apply(this,arguments)}const Be=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=B.ZT,onUnsubscribeContributor:c=B.ZT}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["activeMode","contributors","crosswalkTree","entity","onChangeMode","onUnmergeContributor","onUnsubscribeContributor"]);const d=Fe(),[p,m]=(0,r.useState)("50%"),g=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return m(t)}),[]),[b,y]=(0,r.useState)(),[E,v]=(0,r.useState)(),x=(0,r.useMemo)((()=>(0,f.Qbq)(l)>1),[l]),C=(0,r.useMemo)((()=>[{id:V.Crosswalk,title:h().text("Crosswalk")},{id:V.Source,title:h().text("Source")},{id:V.Contributor,title:h().text("Contributor")}]),[]),[O,k]=(0,r.useState)(),T=t===V.Contributor;return o().createElement("div",{className:d.root},b&&o().createElement(je,{canUnmerge:x,onClose:()=>y(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:b,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===b}))}),E&&o().createElement(He,{canUnsubscribe:x,onClose:()=>v(null),onUnsubscribeContributor:()=>c({dataTenant:E.dataTenant,crosswalk:E.crosswalk}),crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===E.contributorUri}))}),o().createElement(G.Z,{modes:C,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(S.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:p,minSize:170,maxSize:-170,allowResize:!0,onChange:g},o().createElement("div",{className:d.pane},l&&!(0,z.isEmpty)(O)&&o().createElement(ue,{entityLabel:(0,f.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:O,accentContributors:T})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(F.Z,{className:d.infoIcon}),o().createElement("span",{className:d.hintText},h().text("You can drag a crosswalk to add values to attributes swimlanes"))),a&&o().createElement(Me,ze({onUnmergeContributor:y,onUnsubscribeContributor:v,accentContributors:T,contributors:n,entity:a,onChangeVisibleCrosswalks:k},u)))))}));var Ge=n(67218);function Ve(){return Ve=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},Ve.apply(this,arguments)}const We=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,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ve({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("mask",{id:"svg4041339336a",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"19",height:"17"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S4.83 6.5 4 6.5 2.5 5.83 2.5 5zM21 20H8v-2h13v2zM8 10h13V8H8v2zm0-4V4h13v2H8zm0 10h13v-2H8v2zm-2.5.5v-3h-3v3h3z",fill:"#fff"})),o().createElement("g",{mask:"url(#svg4041339336a)"},o().createElement("path",{fillOpacity:".54",fill:"#000",d:"M0 0h24v24H0z"})))},$e=e=>{console.error(e),d.Z.addError({title:h().text("Error"),message:(0,f.xU7)(e,h().text("Something went wrong"))})};var Ye=n(39417),qe=n(58651),Xe=n(13896);function Ke(){return Ke=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},Ke.apply(this,arguments)}const Qe=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,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ke({width:"90",height:"90",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#0072CE",fillOpacity:".1"}),o().createElement("mask",{id:"svg985456408a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"90",height:"90"},o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#fff"})),o().createElement("g",{mask:"url(#svg985456408a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-5.625 3.164h90V90h-90V3.164z",fill:"url(#paint0_linear)"}),o().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M66.01 19.992l20.615 20.615v52.337H32.83L18.281 79.131V19.99H66.01z",fill:"url(#paint1_linear)"}),o().createElement("path",{opacity:".06",fillRule:"evenodd",clipRule:"evenodd",d:"M16.523 20.39H87.54A2.46 2.46 0 0190 22.853v55.195a2.46 2.46 0 01-2.46 2.46H16.522a2.46 2.46 0 01-2.46-2.46V22.852a2.46 2.46 0 012.46-2.461z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 19.688h70.664c.971 0 1.758.787 1.758 1.757v55.196c0 .97-.787 1.757-1.758 1.757H17.578c-.97 0-1.758-.787-1.758-1.757V21.445c0-.97.787-1.758 1.758-1.758z",fill:"#fff"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 25.536c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 29.754c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 57.305c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 61.523c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 67.852c0-.583.472-1.055 1.055-1.055h28.696a1.055 1.055 0 110 2.11H38.1a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 72.07c0-.582.472-1.054 1.055-1.054h26.087a1.055 1.055 0 110 2.109H37.97a1.055 1.055 0 01-1.055-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 36.21c0-.582.472-1.054 1.054-1.054h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 40.43c0-.583.472-1.055 1.054-1.055h22.572a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"37.266",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"47.813",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"59.414",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"69.961",r:"3.164",fill:"#B6C7DB"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 46.758c0-.583.472-1.055 1.054-1.055h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 50.977c0-.583.472-1.055 1.054-1.055h26.088a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M32.524 37.969v-2.813h-.703v14.191h3.93v-.703h-3.227v-9.972h3.227v-.703h-3.227z",fill:"#2B98F0"}),o().createElement("path",{opacity:".54",fillRule:"evenodd",clipRule:"evenodd",d:"M33.423 27.07l-1.242 1.243-1.243-1.243h2.485z",fill:"#000"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 7.734h65.39a2.11 2.11 0 012.11 2.11v6.328a2.11 2.11 0 01-2.11 2.11h-65.39a2.11 2.11 0 01-2.11-2.11V9.844a2.11 2.11 0 012.11-2.11z",fill:"#fff"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M20.39 13.008a2.11 2.11 0 012.11-2.11h24.61a2.11 2.11 0 110 4.22H22.5a2.11 2.11 0 01-2.11-2.11zM52.031 13.008a2.11 2.11 0 012.11-2.11h3.515a2.11 2.11 0 110 4.22h-3.515a2.11 2.11 0 01-2.11-2.11z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear",x1:"-5.625",y1:"3.164",x2:"-5.625",y2:"90",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:".01"}),o().createElement("stop",{offset:"1",stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"paint1_linear",x1:"93.557",y1:"63.672",x2:"54.451",y2:"27.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"}))))},Je=(0,j.Z)((e=>({root:{height:"100%",overflow:"hidden",background:e.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"115px"},info:{color:e.palette.text.secondary,fontSize:"16px",lineHeight:"24px",marginTop:"16px"}}))),et=()=>{const e=Je();return o().createElement("div",{className:e.root},o().createElement(Qe,null),o().createElement("span",{className:e.info},h().text("Please persist your profile to be able to edit crosswalks")))},tt=(0,j.Z)({sourcesView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},resizablePanesWrapper:{flexGrow:1,height:"100%"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},tabs:{marginLeft:"1px"}});var nt;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(nt||(nt={}));const rt=(0,l.connect)((e=>({entity:m.ZP.selectors.getEntity(e),metadata:m.ZP.selectors.getMetadata(e),historyEvent:m.ZP.selectors.getHistoryEvent(e)})))((e=>{var t,n;let{config:a,entity:i,metadata:s,getSavedState:c,saveState:u,dispatch:d,historyEvent:p}=e;const A=tt(),[U,j]=(0,r.useState)(V.Crosswalk),[Z,F]=(0,r.useState)(0),G=e=>F((t=>t===e?null:e)),W=null!==Z,$=Z===nt.History,{isHistoryEnabled:Y,isProfilePersisted:q}=(0,g.C)({isHistoryTabActive:$,entity:i}),X=q?i:null,K=null==X?void 0:X.uri,Q=(0,f.nt9)(s,null==i?void 0:i.type),{historySlice:J}=(0,b.a)({entity:X,historyEvent:p}),[ee,te]=(0,r.useState)();(0,y.D)((()=>{te(void 0)}),[J]),(0,y.D)((()=>{te(void 0)}),[K]);const[ne,re]=(0,r.useState)(-480),oe=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return re(t)}),[]),{isLoaded:le,savedState:ae}=(0,E.a)(c),[ie,se]=(0,r.useState)();(0,r.useEffect)((()=>{le&&se(ae.visibleColumns)}),[le]),(0,r.useEffect)((()=>{const e=!(0,z.equals)(ie,ae.visibleColumns);le&&e&&u({visibleColumns:ie})}),[ie]);const{crosswalkTree:ce,reload:ue}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,Ge._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,f.wo0)({entityUri:e})).then((e=>{n(e)})).catch(i).finally((()=>{l(!1)}))):n(null)}),[e]);return(0,r.useEffect)((()=>{s()}),[s]),{isLoading:o,crosswalkTree:t,reload:s}})((null==J?void 0:J.aEntity.uri)||K),de=(0,r.useMemo)((()=>(0,f.b7X)(ce)),[ce]),pe=(0,r.useCallback)((()=>{K&&d(m.N5.entity.actions.loadEntity({viewId:a.id,uri:K}))}),[K,a,d]),he=(0,r.useCallback)((0,z.pipe)(pe,ue),[pe,ue]),{modifiedEntity:me,crosswalksMap:fe,newlyCreatedAttributes:ge,onDeleteAttribute:be,onPinAttribute:ye,onIgnoreAttribute:Ee,onEditAttribute:ve,onAddAttribute:xe}=(0,v.Q)({entity:(null==J?void 0:J.aEntity)||X,onModify:he,onError:$e}),{addCrosswalk:Ce,deleteCrosswalk:Oe,editCrosswalk:ke,unmergeContributor:Te,unsubscribeContributor:we}=(e=>{let{onLoad:t=B.ZT,onSuccess:n=B.ZT,onError:o=B.ZT}=e;const{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s}=(0,Ye.P)({onLoad:t,onSuccess:n,onError:o}),c=(0,l.useSelector)(m.ZP.selectors.getDtssPath),u=(0,l.useSelector)(m.ZP.selectors.getTenant),d=(0,r.useCallback)((e=>{t(),e.then((()=>{n()})).catch(o)}),[t,o,n]);return{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s,unmergeContributor:(0,r.useCallback)((e=>(0,z.pipe)(f.L8n,d)(e)),[d]),unsubscribeContributor:(0,r.useCallback)((e=>{let{crosswalk:t,dataTenant:n}=e;return(0,z.pipe)(f.R9X,(0,z.andThen)((e=>{if(!e.successful)throw new Error(h().text("Failed to unsubscribe contributor"));return e})),d)({dtssPath:c,value:t.value,type:t.type,sourceTable:t.sourceTable,dataTenant:n.id,customerTenant:u})}),[d,c,u])}})({onSuccess:he,onError:(0,r.useCallback)((e=>{$e(e),e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND&&he()}),[he])}),{historyFilter:Se,onApplyFilter:Ie,onClearFilter:Pe,isLoading:Ne,historicUris:De,historyWithTotal:Re,canLoadMore:Me,onLoadMore:Le}=(0,x.k)({entity:X,enabled:Y}),_e=(e=>{let{activeMode:t,contributors:n}=e;const o=(0,r.useCallback)((e=>{var r;switch(t){case V.Source:return(0,f.kW2)(e.type);case V.Contributor:return(0,f.GtP)((null===(r=(0,f.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case V.Crosswalk:return(0,f.CJp)((0,f.uKF)(e))}}),[t,n]),[l,a]=(0,r.useState)([]),i=(0,r.useRef)([]),s=(0,r.useCallback)((0,f.DsO)((()=>{a([...i.current])}),50),[]),c=(0,r.useCallback)((e=>{i.current=e,s(e)}),[s]),u=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===V.Contributor){const t=(0,f.A1W)(n,e);c([e,...(null==t?void 0:t.crosswalks)||[]])}else c([e]);else c([])}),[t,c,n]),[d,p]=(0,r.useState)([]),h=(0,r.useCallback)(((e,t)=>(0,z.concat)(e.filter((e=>!(0,z.any)((0,f.aFF)(e),t))),t.filter((t=>!(0,z.any)((0,f.aFF)(t),e))))),[]),m=(0,r.useCallback)((e=>{if(e)if(t===V.Contributor){const t=(0,f.A1W)(n,e);p((n=>h([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else p((t=>h([e],t)))}),[t,h,n]);return(0,r.useEffect)((()=>{p([])}),[t]),{getCrosswalkColor:o,highlightedCrosswalks:(0,r.useMemo)((()=>[...l,...d]),[l,d]),focusedCrosswalks:d,toggleCrosswalkFocus:m,setCrosswalkHighlighted:u}})({activeMode:U,contributors:de}),Ae=[{buttonProps:{id:nt.Legend,icon:We,tooltipTitle:h().text("Legend")},title:o().createElement(L.Typography,{variant:"h6"},h().text("Legend")),content:o().createElement(Be,{activeMode:U,onChangeMode:j,entity:(null==J?void 0:J.aEntity)||X,crosswalkTree:ce,contributors:de,selectedAttributeTypes:ee,readOnly:!!J,onAddCrosswalk:Ce,onUnmergeContributor:Te,onUnsubscribeContributor:we,onEditCrosswalk:ke,onDeleteCrosswalk:Oe})},{buttonProps:{id:nt.History,icon:_.Z,tooltipTitle:h().text("History")},title:o().createElement(C.Z,{total:((null==De?void 0:De.length)||0)+1,entityType:Q,filter:Se,onApplyFilter:Ie,onClearFilter:Pe}),content:q?o().createElement(O.Z,{isLoading:Ne,historyWithTotal:Re,contributorsUris:De,entityUri:K,historyEvent:p,onLoadMore:Le,canLoadMore:Me}):o().createElement(k.Z,null)}];return o().createElement("div",{className:A.sourcesView},o().createElement(T.hR,_e,o().createElement(Xe.DndProvider,{backend:qe.default},o().createElement(w.Z,null),o().createElement(S.Z,{className:A.resizablePanesWrapper,orientation:"vertical",size:W?ne:"100%",minSize:480,maxSize:-480,allowResize:W,onChange:oe},o().createElement("div",{className:A.pane},o().createElement(I.Z,{entity:(null==J?void 0:J.aEntity)||i},J?o().createElement(P.Z,null):o().createElement(N.a,null)),q?o().createElement(D.R,{attributeUris:ge},o().createElement(R.Z,{visibleColumns:ie,onChangeVisibleColumns:se,entity:me,crosswalksMap:fe,selectedAttributeTypes:ee,onSelectAttributeTypes:te,readOnly:!!J,onDelete:be,onPin:ye,onIgnore:Ee,onEdit:ve,onAdd:xe})):o().createElement(et,null)),o().createElement(H,{className:A.pane,title:null===(t=Ae[Z])||void 0===t?void 0:t.title,onClose:()=>G(Z)},null===(n=Ae[Z])||void 0===n?void 0:n.content)))),o().createElement(M.G,{className:A.tabs,buttonsProps:(0,z.pipe)((0,z.reject)((0,z.propEq)("hidden",!0)),(0,z.pluck)("buttonProps"))(Ae),onButtonClick:G,activeIndexId:Z}))})),ot=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),lt=e=>{let{config:t,store:n,onResize:p,saveState:h,getSavedState:m}=e;const g=(0,r.useCallback)((0,f.aYu)(m),[m]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:ot},o().createElement(c.MuiPickersUtilsProvider,{utils:a.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==p?void 0:p(Math.floor(e),Math.floor(t))}),t&&o().createElement(rt,{config:t,saveState:h,getSavedState:g}),o().createElement(d.Z,null)))))}}}]);
package/5026.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 5026.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5026],{65026:(e,t,n)=>{n.r(t),n.d(t,{Calendar:()=>He,Clock:()=>ht,DatePicker:()=>Kt,DateTimePicker:()=>ln,Day:()=>Pe,KeyboardDatePicker:()=>_t,KeyboardDateTimePicker:()=>sn,KeyboardTimePicker:()=>Jt,MuiPickersContext:()=>se,MuiPickersUtilsProvider:()=>ce,Picker:()=>It,TimePicker:()=>Xt,TimePickerView:()=>xt,makeKeyboardPicker:()=>Wt,makePurePicker:()=>Rt,useKeyboardPickerState:()=>Ht,usePickerState:()=>Bt,useUtils:()=>ue,validate:()=>Ot});var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},a(e,t)};function r(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};function i(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&(n[a[r]]=e[a[r]])}return n}var l=n(24328),s=n.n(l),c=n(13980),u=n(6277),d=n(90436),p=n(79692),m=n(41128),f=n(12420),h=n(15459),v=n(60364),g=n(77277),b=n(15223),y=n(61837);function E(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C.apply(this,arguments)}function x(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const w=s().createContext(null);function M(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 k(e,t,n){return null!=n[t]?n[t]:e.props[t]}function P(e,t,n){var a=M(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var a,r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var l={};for(var s in t){if(r[s])for(a=0;a<r[s].length;a++){var c=r[s][a];l[r[s][a]]=n(c)}l[s]=n(s)}for(a=0;a<o.length;a++)l[o[a]]=n(o[a]);return l}(t,a);return Object.keys(r).forEach((function(o){var i=r[o];if((0,l.isValidElement)(i)){var s=o in t,c=o in a,u=t[o],d=(0,l.isValidElement)(u)&&!u.props.in;!c||s&&!d?c||!s||d?c&&s&&(0,l.isValidElement)(u)&&(r[o]=(0,l.cloneElement)(i,{onExited:n.bind(null,i),in:u.props.in,exit:k(i,"exit",e),enter:k(i,"enter",e)})):r[o]=(0,l.cloneElement)(i,{in:!1}):r[o]=(0,l.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:k(i,"exit",e),enter:k(i,"enter",e)})}})),r}var T=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},S=function(e){function t(t,n){var a,r=(a=e.call(this,t,n)||this).handleExited.bind(D(D(a)));return a.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},a}x(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,a,r=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,a=o,M(n.children,(function(e){return(0,l.cloneElement)(e,{onExited:a.bind(null,e),in:!0,appear:k(e,"appear",n),enter:k(e,"enter",n),exit:k(e,"exit",n)})}))):P(e,r,o),firstRender:!1}},n.handleExited=function(e,t){var n=M(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=C({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,a=E(e,["component","childFactory"]),r=this.state.contextValue,o=T(this.state.children).map(n);return delete a.appear,delete a.enter,delete a.exit,null===t?s().createElement(w.Provider,{value:r},o):s().createElement(w.Provider,{value:r},s().createElement(t,a,o))},t}(s().Component);S.propTypes={},S.defaultProps={component:"div",childFactory:function(e){return e}};const I=S;var N=n(2196),A=n.n(N),L=n(24812),O=n.n(L),Z=n(75047),B=n.n(Z);var F="unmounted",R="exited",V="entering",H="entered",W="exiting",j=function(e){function t(t,n){var a;a=e.call(this,t,n)||this;var r,o=n&&!n.isMounting?t.enter:t.appear;return a.appearStatus=null,t.in?o?(r=R,a.appearStatus=V):r=H:r=t.unmountOnExit||t.mountOnEnter?F:R,a.state={status:r},a.nextCallback=null,a}x(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===F?{status:R}: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!==H&&(t=V):n!==V&&n!==H||(t=W)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,a=this.props.timeout;return e=t=n=a,null!=a&&"number"!=typeof a&&(e=a.exit,t=a.enter,n=void 0!==a.appear?a.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=B().findDOMNode(this);t===V?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===R&&this.setState({status:F})},n.performEnter=function(e,t){var n=this,a=this.props.enter,r=this.context?this.context.isMounting:t,o=this.getTimeouts(),i=r?o.appear:o.enter;t||a?(this.props.onEnter(e,r),this.safeSetState({status:V},(function(){n.props.onEntering(e,r),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:H},(function(){n.props.onEntered(e,r)}))}))}))):this.safeSetState({status:H},(function(){n.props.onEntered(e)}))},n.performExit=function(e){var t=this,n=this.props.exit,a=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:W},(function(){t.props.onExiting(e),t.onTransitionEnd(e,a.exit,(function(){t.safeSetState({status:R},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:R},(function(){t.props.onExited(e)}))},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(a){n&&(n=!1,t.nextCallback=null,e(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var a=null==t&&!this.props.addEndListener;e&&!a?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===F)return null;var t=this.props,n=t.children,a=E(t,["children"]);if(delete a.in,delete a.mountOnEnter,delete a.unmountOnExit,delete a.appear,delete a.enter,delete a.exit,delete a.timeout,delete a.addEndListener,delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,"function"==typeof n)return s().createElement(w.Provider,{value:null},n(e,a));var r=s().Children.only(n);return s().createElement(w.Provider,{value:null},s().cloneElement(r,a))},t}(s().Component);function Y(){}j.contextType=w,j.propTypes={},j.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},j.UNMOUNTED=0,j.EXITED=1,j.ENTERING=2,j.ENTERED=3,j.EXITING=4;const K=j;var _=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return O()(e,t)}))},U=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return(t=e.call.apply(e,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){t.removeClasses(e,"exit"),t.addClass(e,n?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var a=n?"appear":"enter";t.addClass(e,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var a=n?"appear":"enter";t.removeClasses(e,a),t.addClass(e,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),t.addClass(e,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){t.addClass(e,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){t.removeClasses(e,"exit"),t.addClass(e,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,a="string"==typeof n,r=a?(a&&n?n+"-":"")+e:n[e];return{baseClassName:r,activeClassName:a?r+"-active":n[e+"Active"],doneClassName:a?r+"-done":n[e+"Done"]}},t}x(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var a=this.getClassNames(t)[n+"ClassName"];"appear"===t&&"done"===n&&(a+=" "+this.getClassNames("enter").doneClassName),"active"===n&&e&&e.scrollTop,this.appliedClasses[t][n]=a,function(e,t){e&&t&&t.split(" ").forEach((function(t){return A()(e,t)}))}(e,a)},n.removeClasses=function(e,t){var n=this.appliedClasses[t],a=n.base,r=n.active,o=n.done;this.appliedClasses[t]={},a&&_(e,a),r&&_(e,r),o&&_(e,o)},n.render=function(){var e=this.props,t=(e.classNames,E(e,["classNames"]));return s().createElement(K,C({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(s().Component);U.defaultProps={classNames:""},U.propTypes={};const z=U;var Q=n(72379),G=n(4614),q=n(94079),X=n(49429),J=n(38724),$=n(8629),ee=n(79784),te=n(86619),ne=n(50581),ae=n(35307),re=function(e){function t(t){var n;return(n=e.call(this,t)||this)._state=null,n._del=!1,n._handleChange=function(e){var t=n.state.value,a=e.target.value,r=e.target,o=a.length>t.length,i=n._del,l=t===n.props.format(a);n.setState({value:a,local:!0},(function(){var e=r.selectionStart,s=n.props.refuse||/[^\d]+/g,c=a.substr(0,e).replace(s,"");if(n._state={input:r,before:c,op:o,di:i&&l,del:i},n.props.replace&&n.props.replace(t)&&o&&!l){for(var u=-1,d=0;d!==c.length;++d)u=Math.max(u,a.toLowerCase().indexOf(c[d].toLowerCase(),u+1));var p=a.substr(u+1).replace(s,"")[0];u=a.indexOf(p,u+1),a=""+a.substr(0,u)+a.substr(u+1)}var m=n.props.format(a);t===m?n.setState({value:a}):n.props.onChange(m)}))},n._hKD=function(e){"Delete"===e.code&&(n._del=!0)},n._hKU=function(e){"Delete"===e.code&&(n._del=!1)},n.state={value:t.value,local:!0},n}(0,ae.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return{value:t.local?t.value:e.value,local:!1}};var n=t.prototype;return n.render=function(){var e=this._handleChange,t=this.state.value;return(0,this.props.children)({value:t,onChange:e})},n.componentWillUnmount=function(){document.removeEventListener("keydown",this._hKD),document.removeEventListener("keyup",this._hKU)},n.componentDidMount=function(){document.addEventListener("keydown",this._hKD),document.addEventListener("keyup",this._hKU)},n.componentDidUpdate=function(){var e=this._state;if(e){for(var t=this.state.value,n=-1,a=0;a!==e.before.length;++a)n=Math.max(n,t.toLowerCase().indexOf(e.before[a].toLowerCase(),n+1));if(this.props.replace&&(e.op||e.del&&!e.di))for(;t[n+1]&&(this.props.refuse||/[^\d]+/).test(t[n+1]);)n+=1;e.input.selectionStart=e.input.selectionEnd=n+1+(e.di?1:0)}this._state=null},t}(l.Component),oe=n(6487),ie=n(99152),le=n(27556),se=(0,l.createContext)(null),ce=function(e){var t=e.utils,n=e.children,a=e.locale,r=e.libInstance,o=(0,l.useMemo)((function(){return new t({locale:a,moment:r})}),[t,r,a]);return(0,l.createElement)(se.Provider,{value:o,children:n})};function ue(){var e=(0,l.useContext)(se);return function(e){if(!e)throw new Error("Can not find utils in context. You either a) forgot to wrap your component tree in MuiPickersUtilsProvider; or b) mixed named and direct file imports. Recommendation: use named imports from the module index.")}(e),e}var de=(0,p.Z)((function(e){var t="light"===e.palette.type?e.palette.primary.contrastText:e.palette.getContrastText(e.palette.background.default);return{toolbarTxt:{color:(0,m.U1)(t,.54)},toolbarBtnSelected:{color:t}}}),{name:"MuiPickersToolbarText"}),pe=function(e){var t,n=e.selected,a=e.label,r=e.className,s=void 0===r?null:r,c=i(e,["selected","label","className"]),p=de();return(0,l.createElement)(d.Z,o({children:a,className:(0,u.Z)(p.toolbarTxt,s,(t={},t[p.toolbarBtnSelected]=n,t))},c))},me=function(e){var t=e.classes,n=e.className,a=void 0===n?null:n,r=e.label,s=e.selected,c=e.variant,d=e.align,p=e.typographyClassName,m=i(e,["classes","className","label","selected","variant","align","typographyClassName"]);return(0,l.createElement)(g.Z,o({variant:"text",className:(0,u.Z)(t.toolbarBtn,a)},m),(0,l.createElement)(pe,{align:d,className:p,variant:c,label:r,selected:s}))};me.defaultProps={className:""};var fe=(0,f.Z)({toolbarBtn:{padding:0,minWidth:"16px",textTransform:"none"}}),he=(0,h.Z)(fe,{name:"MuiPickersToolbarButton"})(me),ve=(0,p.Z)((function(e){return{toolbar:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",height:100,backgroundColor:"light"===e.palette.type?e.palette.primary.main:e.palette.background.default},toolbarLandscape:{height:"auto",maxWidth:150,padding:8,justifyContent:"flex-start"}}}),{name:"MuiPickersToolbar"}),ge=function(e){var t,n=e.children,a=e.isLandscape,r=e.className,s=void 0===r?null:r,c=i(e,["children","isLandscape","className"]),d=ve();return(0,l.createElement)(b.Z,o({className:(0,u.Z)(d.toolbar,(t={},t[d.toolbarLandscape]=a,t),s)},c),n)};function be(e,t){return Array.isArray(t)?t.every((function(t){return-1!==e.indexOf(t)})):-1!==e.indexOf(t)}var ye=function(e){return 1===e.length&&"year"===e[0]},Ee=function(e){return 2===e.length&&be(e,"month")&&be(e,"year")},Ce=(0,p.Z)({toolbar:{flexDirection:"column",alignItems:"flex-start"},toolbarLandscape:{padding:16},dateLandscape:{marginRight:16}},{name:"MuiPickersDatePickerRoot"}),xe=function(e){var t,n,a=e.date,r=e.views,o=e.setOpenView,i=e.isLandscape,s=e.openView,c=ue(),d=Ce(),p=(0,l.useMemo)((function(){return ye(r)}),[r]),m=(0,l.useMemo)((function(){return Ee(r)}),[r]);return(0,l.createElement)(ge,{isLandscape:i,className:(0,u.Z)((t={},t[d.toolbar]=!p,t[d.toolbarLandscape]=i,t))},(0,l.createElement)(he,{variant:p?"h3":"subtitle1",onClick:function(){return o("year")},selected:"year"===s,label:c.getYearText(a)}),!p&&!m&&(0,l.createElement)(he,{variant:"h4",selected:"date"===s,onClick:function(){return o("date")},align:i?"left":"center",label:c.getDatePickerHeaderText(a),className:(0,u.Z)((n={},n[d.dateLandscape]=i,n))}),m&&(0,l.createElement)(he,{variant:"h4",onClick:function(){return o("month")},selected:"month"===s,label:c.getMonthText(a)}))},De=((0,c.oneOfType)([c.object,c.string,c.number,(0,c.instanceOf)(Date)]),(0,c.oneOf)(["year","month","day"]),{ampm:!0,invalidDateMessage:"Invalid Time Format"}),we={minDate:new Date("1900-01-01"),maxDate:new Date("2100-01-01"),invalidDateMessage:"Invalid Date Format",minDateMessage:"Date should not be before minimal date",maxDateMessage:"Date should not be after maximal date",allowKeyboardControl:!0},Me=o({},De,we,{showTabs:!0}),ke=(0,p.Z)((function(e){return{day:{width:36,height:36,fontSize:e.typography.caption.fontSize,margin:"0 2px",color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium,padding:0},hidden:{opacity:0,pointerEvents:"none"},current:{color:e.palette.primary.main,fontWeight:600},daySelected:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{backgroundColor:e.palette.primary.main}},dayDisabled:{pointerEvents:"none",color:e.palette.text.hint}}}),{name:"MuiPickersDay"}),Pe=function(e){var t,n=e.children,a=e.disabled,r=e.hidden,s=e.current,c=e.selected,p=i(e,["children","disabled","hidden","current","selected"]),m=ke(),f=(0,u.Z)(m.day,((t={})[m.hidden]=r,t[m.current]=s,t[m.daySelected]=c,t[m.dayDisabled]=a,t));return(0,l.createElement)(y.Z,o({className:f,tabIndex:r||a?-1:0},p),(0,l.createElement)(d.Z,{variant:"body2",color:"inherit"},n))};Pe.displayName="Day",Pe.defaultProps={disabled:!1,hidden:!1,current:!1,selected:!1};var Te=function(e){var t=e.children,n=e.value,a=e.disabled,r=e.onSelect,s=e.dayInCurrentMonth,c=i(e,["children","value","disabled","onSelect","dayInCurrentMonth"]),u=(0,l.useCallback)((function(){return r(n)}),[r,n]);return(0,l.createElement)("div",o({role:"presentation",onClick:s&&!a?u:void 0,onKeyPress:s&&!a?u:void 0},c),t)},Se=(0,p.Z)((function(e){var t=e.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{transitionContainer:{display:"block",position:"relative","& > *":{position:"absolute",top:0,right:0,left:0}},"slideEnter-left":{willChange:"transform",transform:"translate(100%)"},"slideEnter-right":{willChange:"transform",transform:"translate(-100%)"},slideEnterActive:{transform:"translate(0%)",transition:t},slideExit:{transform:"translate(0%)"},"slideExitActiveLeft-left":{willChange:"transform",transform:"translate(-200%)",transition:t},"slideExitActiveLeft-right":{willChange:"transform",transform:"translate(200%)",transition:t}}}),{name:"MuiPickersSlideTransition"}),Ie=function(e){var t=e.children,n=e.transKey,a=e.slideDirection,r=e.className,o=void 0===r?null:r,i=Se(),s={exit:i.slideExit,enterActive:i.slideEnterActive,enter:i["slideEnter-"+a],exitActive:i["slideExitActiveLeft-"+a]};return(0,l.createElement)(I,{className:(0,u.Z)(i.transitionContainer,o),childFactory:function(e){return(0,l.cloneElement)(e,{classNames:s})}},(0,l.createElement)(z,{mountOnEnter:!0,unmountOnExit:!0,key:n+a,timeout:350,classNames:s,children:t}))},Ne=(0,p.Z)((function(e){return{switchHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:e.spacing(.5),marginBottom:e.spacing(1)},transitionContainer:{width:"100%",overflow:"hidden",height:23},iconButton:{zIndex:1,backgroundColor:e.palette.background.paper},daysHeader:{display:"flex",justifyContent:"center",alignItems:"center",maxHeight:16},dayLabel:{width:36,margin:"0 2px",textAlign:"center",color:e.palette.text.hint}}}),{name:"MuiPickersCalendarHeader"}),Ae=function(e){var t=e.currentMonth,n=e.onMonthChange,a=e.leftArrowIcon,r=e.rightArrowIcon,i=e.leftArrowButtonProps,s=e.rightArrowButtonProps,c=e.disablePrevMonth,u=e.disableNextMonth,p=e.slideDirection,m=ue(),f=Ne(),h="rtl"===(0,v.Z)().direction;return(0,l.createElement)("div",null,(0,l.createElement)("div",{className:f.switchHeader},(0,l.createElement)(y.Z,o({},i,{disabled:c,onClick:function(){return n(m.getPreviousMonth(t),"right")},className:f.iconButton}),h?r:a),(0,l.createElement)(Ie,{slideDirection:p,transKey:t.toString(),className:f.transitionContainer},(0,l.createElement)(d.Z,{align:"center",variant:"body1"},m.getCalendarHeaderText(t))),(0,l.createElement)(y.Z,o({},s,{disabled:u,onClick:function(){return n(m.getNextMonth(t),"left")},className:f.iconButton}),h?a:r)),(0,l.createElement)("div",{className:f.daysHeader},m.getWeekdays().map((function(e,t){return(0,l.createElement)(d.Z,{key:t,variant:"caption",className:f.dayLabel},e)}))))};Ae.displayName="CalendarHeader",Ae.defaultProps={leftArrowIcon:(0,l.createElement)((function(e){return s().createElement(Q.Z,o({},e),s().createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),s().createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))}),null),rightArrowIcon:(0,l.createElement)((function(e){return s().createElement(Q.Z,o({},e),s().createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),s().createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))}),null),disablePrevMonth:!1,disableNextMonth:!1};var Le="undefined"==typeof window?l.useEffect:l.useLayoutEffect;function Oe(e,t){var n=t[e.key];n&&(n(),e.preventDefault())}function Ze(e,t){var n=(0,l.useRef)(t);Le((function(){n.current=t})),(0,l.useEffect)((function(){if(e){var n=function(e){Oe(e,t)};return window.addEventListener("keydown",n),function(){window.removeEventListener("keydown",n)}}}),[e,t])}var Be,Fe,Re=function(e){var t=e.onKeyDown;return(0,l.useEffect)((function(){return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}}),[t]),null},Ve=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={slideDirection:"left",currentMonth:t.props.utils.startOfMonth(t.props.date),loadingQueue:0},t.pushToLoadingQueue=function(){var e=t.state.loadingQueue+1;t.setState({loadingQueue:e})},t.popFromLoadingQueue=function(){var e=t.state.loadingQueue;e=e<=0?0:e-1,t.setState({loadingQueue:e})},t.handleChangeMonth=function(e,n){if(t.setState({currentMonth:e,slideDirection:n}),t.props.onMonthChange){var a=t.props.onMonthChange(e);a&&(t.pushToLoadingQueue(),a.then((function(){t.popFromLoadingQueue()})))}},t.validateMinMaxDate=function(e){var n=t.props,a=n.minDate,r=n.maxDate,o=n.utils,i=n.disableFuture,l=n.disablePast,s=o.date();return Boolean(i&&o.isAfterDay(e,s)||l&&o.isBeforeDay(e,s)||a&&o.isBeforeDay(e,o.date(a))||r&&o.isAfterDay(e,o.date(r)))},t.shouldDisablePrevMonth=function(){var e=t.props,n=e.utils,a=e.disablePast,r=e.minDate,o=n.date(),i=n.startOfMonth(a&&n.isAfter(o,n.date(r))?o:n.date(r));return!n.isBefore(i,t.state.currentMonth)},t.shouldDisableNextMonth=function(){var e=t.props,n=e.utils,a=e.disableFuture,r=e.maxDate,o=n.date(),i=n.startOfMonth(a&&n.isBefore(o,n.date(r))?o:n.date(r));return!n.isAfter(i,t.state.currentMonth)},t.shouldDisableDate=function(e){var n=t.props.shouldDisableDate;return t.validateMinMaxDate(e)||Boolean(n&&n(e))},t.handleDaySelect=function(e,n){void 0===n&&(n=!0);var a=t.props,r=a.date,o=a.utils;t.props.onChange(o.mergeDateAndTime(e,r),n)},t.moveToDay=function(e){var n=t.props.utils;e&&!t.shouldDisableDate(e)&&(n.getMonth(e)!==n.getMonth(t.state.currentMonth)&&t.handleChangeMonth(n.startOfMonth(e),"left"),t.handleDaySelect(e,!1))},t.handleKeyDown=function(e){var n=t.props,a=n.theme,r=n.date,o=n.utils;Oe(e,{ArrowUp:function(){return t.moveToDay(o.addDays(r,-7))},ArrowDown:function(){return t.moveToDay(o.addDays(r,7))},ArrowLeft:function(){return t.moveToDay(o.addDays(r,"ltr"===a.direction?-1:1))},ArrowRight:function(){return t.moveToDay(o.addDays(r,"ltr"===a.direction?1:-1))}})},t.renderWeeks=function(){var e=t.props,n=e.utils,a=e.classes;return n.getWeekArray(t.state.currentMonth).map((function(e){return(0,l.createElement)("div",{key:"week-"+e[0].toString(),className:a.week},t.renderDays(e))}))},t.renderDays=function(e){var n=t.props,a=n.date,r=n.renderDay,o=n.utils,i=o.date(),s=o.startOfDay(a),c=o.getMonth(t.state.currentMonth);return e.map((function(e){var n=t.shouldDisableDate(e),a=o.getMonth(e)===c,u=(0,l.createElement)(Pe,{disabled:n,current:o.isSameDay(e,i),hidden:!a,selected:o.isSameDay(s,e)},o.getDayText(e));return r&&(u=r(e,s,a,u)),(0,l.createElement)(Te,{value:e,key:e.toString(),disabled:n,dayInCurrentMonth:a,onSelect:t.handleDaySelect},u)}))},t}return r(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.utils,a=e.date;if(!n.isEqual(a,t.lastDate)){var r=n.getMonth(a),o=t.lastDate||a,i=n.getMonth(o);return{lastDate:a,currentMonth:e.utils.startOfMonth(a),slideDirection:r===i?t.slideDirection:n.isAfterDay(a,o)?"left":"right"}}return null},t.prototype.componentDidMount=function(){var e=this.props,t=e.date,n=e.minDate,a=e.maxDate,r=e.utils,o=e.disablePast,i=e.disableFuture;if(this.shouldDisableDate(t)){var l=function(e){var t=e.date,n=e.utils,a=e.minDate,r=e.maxDate,o=e.disableFuture,i=e.disablePast,l=e.shouldDisableDate,s=n.startOfDay(n.date());i&&n.isBefore(a,s)&&(a=s),o&&n.isAfter(r,s)&&(r=s);var c=t,u=t;for(n.isBefore(t,a)&&(c=n.date(a),u=null),n.isAfter(t,r)&&(u&&(u=n.date(r)),c=null);c||u;){if(c&&n.isAfter(c,r)&&(c=null),u&&n.isBefore(u,a)&&(u=null),c){if(!l(c))return c;c=n.addDays(c,1)}if(u){if(!l(u))return u;u=n.addDays(u,-1)}}return null}({date:t,utils:r,minDate:r.date(n),maxDate:r.date(a),disablePast:Boolean(o),disableFuture:Boolean(i),shouldDisableDate:this.shouldDisableDate});this.handleDaySelect(l,!1)}},t.prototype.render=function(){var e=this.state,t=e.currentMonth,n=e.slideDirection,a=this.props,r=a.classes,o=a.allowKeyboardControl,i=a.leftArrowButtonProps,s=a.leftArrowIcon,c=a.rightArrowButtonProps,u=a.rightArrowIcon,d=a.loadingIndicator||(0,l.createElement)(G.Z,null);return(0,l.createElement)(l.Fragment,null,o&&(0,l.createElement)(Re,{onKeyDown:this.handleKeyDown}),(0,l.createElement)(Ae,{currentMonth:t,slideDirection:n,onMonthChange:this.handleChangeMonth,leftArrowIcon:s,leftArrowButtonProps:i,rightArrowIcon:u,rightArrowButtonProps:c,disablePrevMonth:this.shouldDisablePrevMonth(),disableNextMonth:this.shouldDisableNextMonth()}),(0,l.createElement)(Ie,{slideDirection:n,transKey:t.toString(),className:r.transitionContainer},(0,l.createElement)(l.Fragment,null,this.state.loadingQueue>0&&(0,l.createElement)("div",{className:r.progressContainer},d)||(0,l.createElement)("div",null,this.renderWeeks()))))},t.defaultProps={minDate:new Date("1900-01-01"),maxDate:new Date("2100-01-01"),disablePast:!1,disableFuture:!1,allowKeyboardControl:!0},t}(l.Component),He=(0,h.Z)((function(e){return{transitionContainer:{minHeight:216,marginTop:e.spacing(1.5)},progressContainer:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},week:{display:"flex",justifyContent:"center"}}}),{name:"MuiPickersCalendar",withTheme:!0})(((Fe=function(e){var t=ue();return(0,l.createElement)(Be,o({utils:t},e))}).displayName="WithUtils("+((Be=Ve).displayName||Be.name)+")",Fe)),We=(0,p.Z)((function(e){return{root:{height:40,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",outline:"none","&:focus":{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium}},yearSelected:{margin:"10px 0",fontWeight:e.typography.fontWeightMedium},yearDisabled:{pointerEvents:"none",color:e.palette.text.hint}}}),{name:"MuiPickersYear"}),je=function(e){var t,n=e.onSelect,a=e.forwardedRef,r=e.value,s=e.selected,c=e.disabled,p=e.children,m=i(e,["onSelect","forwardedRef","value","selected","disabled","children"]),f=We(),h=(0,l.useCallback)((function(){return n(r)}),[n,r]);return(0,l.createElement)(d.Z,o({role:"button",component:"div",tabIndex:c?-1:0,onClick:h,onKeyPress:h,color:s?"primary":void 0,variant:s?"h5":"subtitle1",children:p,ref:a,className:(0,u.Z)(f.root,(t={},t[f.yearSelected]=s,t[f.yearDisabled]=c,t))},m))};je.displayName="Year";var Ye=(0,l.forwardRef)((function(e,t){return(0,l.createElement)(je,o({},e,{forwardedRef:t}))})),Ke=310,_e=(0,q.makeStyles)((function(e){return{staticWrapperRoot:{overflow:"hidden",minWidth:Ke,display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper}}}),{name:"MuiPickersStaticWrapper"}),Ue=function(e){var t=e.children,n=_e();return(0,l.createElement)("div",{className:n.staticWrapperRoot,children:t})},ze=function(e){var t,n,a=e.children,r=e.classes,s=e.onAccept,c=e.onDismiss,d=e.onClear,p=e.onSetToday,m=e.okLabel,f=e.cancelLabel,h=e.clearLabel,v=e.todayLabel,b=e.clearable,y=e.showTodayButton,E=(e.showTabs,e.wider),C=i(e,["children","classes","onAccept","onDismiss","onClear","onSetToday","okLabel","cancelLabel","clearLabel","todayLabel","clearable","showTodayButton","showTabs","wider"]);return(0,l.createElement)($.Z,o({role:"dialog",onClose:c,classes:{paper:(0,u.Z)(r.dialogRoot,(t={},t[r.dialogRootWider]=E,t))}},C),(0,l.createElement)(J.Z,{children:a,className:r.dialog}),(0,l.createElement)(X.Z,{classes:{root:(0,u.Z)((n={},n[r.withAdditionalAction]=b||y,n))}},b&&(0,l.createElement)(g.Z,{color:"primary",onClick:d},h),!b&&y&&(0,l.createElement)(g.Z,{color:"primary",onClick:p},v),f&&(0,l.createElement)(g.Z,{color:"primary",onClick:c},f),m&&(0,l.createElement)(g.Z,{color:"primary",onClick:s},m)))};ze.displayName="ModalDialog";var Qe=(0,f.Z)({dialogRoot:{minWidth:Ke},dialogRootWider:{},dialog:{"&:first-child":{padding:0}},withAdditionalAction:{justifyContent:"flex-start","& > *:first-child":{marginRight:"auto"}}}),Ge=(0,h.Z)(Qe,{name:"MuiPickersModal"})(ze),qe=function(e){var t=e.open,n=e.children,a=e.okLabel,r=e.cancelLabel,s=e.clearLabel,c=e.todayLabel,u=e.showTodayButton,d=e.clearable,p=e.DialogProps,m=e.showTabs,f=e.wider,h=e.InputComponent,v=e.DateInputProps,g=e.onClear,b=e.onAccept,y=e.onDismiss,E=e.onSetToday,C=i(e,["open","children","okLabel","cancelLabel","clearLabel","todayLabel","showTodayButton","clearable","DialogProps","showTabs","wider","InputComponent","DateInputProps","onClear","onAccept","onDismiss","onSetToday"]);return Ze(t,{Enter:b}),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(h,o({},C,v)),(0,l.createElement)(Ge,o({wider:f,showTabs:m,open:t,onClear:g,onAccept:b,onDismiss:y,onSetToday:E,clearLabel:s,todayLabel:c,okLabel:a,cancelLabel:r,clearable:d,showTodayButton:u,children:n},p)))};qe.defaultProps={okLabel:"OK",cancelLabel:"Cancel",clearLabel:"Clear",todayLabel:"Today",clearable:!1,showTodayButton:!1};var Xe,Je=(0,p.Z)({popoverPaper:{width:Ke,paddingBottom:8},popoverPaperWider:{width:325}},{name:"MuiPickersInlineWrapper"}),$e=function(e){var t,n=e.open,a=e.wider,r=e.children,s=e.PopoverProps,c=(e.onClear,e.onDismiss),d=(e.onSetToday,e.onAccept),p=(e.showTabs,e.DateInputProps),m=e.InputComponent,f=i(e,["open","wider","children","PopoverProps","onClear","onDismiss","onSetToday","onAccept","showTabs","DateInputProps","InputComponent"]),h=(0,l.useRef)(),v=Je();return Ze(n,{Enter:d}),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m,o({},f,p,{inputRef:h})),(0,l.createElement)(ee.ZP,o({open:n,onClose:c,anchorEl:h.current,classes:{paper:(0,u.Z)(v.popoverPaper,(t={},t[v.popoverPaperWider]=a,t))},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:r},s)))},et=(0,l.createContext)(null),tt=function(e){var t=e.variant,n=i(e,["variant"]),a=function(e){switch(e){case"inline":return $e;case"static":return Ue;default:return qe}}(t);return(0,l.createElement)(et.Provider,{value:t||"dialog"},(0,l.createElement)(a,o({},n)))},nt=(0,p.Z)({container:{height:300,overflowY:"auto"}},{name:"MuiPickersYearSelection"}),at=function(e){var t=e.date,n=e.onChange,a=e.onYearChange,r=e.minDate,o=e.maxDate,i=e.disablePast,s=e.disableFuture,c=e.animateYearScrolling,u=ue(),d=nt(),p=(0,l.useContext)(et),m=(0,l.useRef)(null);(0,l.useEffect)((function(){m.current&&m.current.scrollIntoView&&m.current.scrollIntoView({block:"static"===p?"nearest":"center",behavior:c?"smooth":"auto"})}),[]);var f=u.getYear(t),h=(0,l.useCallback)((function(e){var r=u.setYear(t,e);a&&a(r),n(r,!0)}),[t,n,a,u]);return(0,l.createElement)("div",{className:d.container},u.getYearRange(r,o).map((function(e){var t=u.getYear(e),n=t===f;return(0,l.createElement)(Ye,{key:u.getYearText(e),selected:n,value:t,onSelect:h,ref:n?m:void 0,disabled:Boolean(i&&u.isBeforeYear(e,u.date())||s&&u.isAfterYear(e,u.date()))},u.getYearText(e))})))};!function(e){e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds"}(Xe||(Xe={}));var rt=Xe,ot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={toAnimateTransform:!1,previousType:void 0},t.getAngleStyle=function(){var e=t.props,n=e.value,a=e.isInner,r=e.type,o=360/(r===rt.HOURS?12:60)*n;return r===rt.HOURS&&n>12&&(o-=360),{height:a?"26%":"40%",transform:"rotateZ("+o+"deg)"}},t}return r(t,e),t.prototype.render=function(){var e,t,n=this.props,a=n.classes,r=n.hasSelected;return(0,l.createElement)("div",{style:this.getAngleStyle(),className:(0,u.Z)(a.pointer,(e={},e[a.animateTransform]=this.state.toAnimateTransform,e))},(0,l.createElement)("div",{className:(0,u.Z)(a.thumb,(t={},t[a.noPoint]=r,t))}))},t.getDerivedStateFromProps=function(e,t){return e.type!==t.previousType?{toAnimateTransform:!0,previousType:e.type}:{toAnimateTransform:!1,previousType:e.type}},t}(l.Component),it=(0,h.Z)((function(e){return(0,f.Z)({pointer:{width:2,backgroundColor:e.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},animateTransform:{transition:e.transitions.create(["transform","height"])},thumb:{width:4,height:4,backgroundColor:e.palette.primary.contrastText,borderRadius:"100%",position:"absolute",top:-21,left:-15,border:"14px solid "+e.palette.primary.main,boxSizing:"content-box"},noPoint:{backgroundColor:e.palette.primary.main}})}),{name:"MuiPickersClockPointer"})(ot),lt=130,st=130,ct=lt-lt,ut=0-st,dt=function(e,t,n){var a=t-lt,r=n-st,o=57.29577951308232*(Math.atan2(ct,ut)-Math.atan2(a,r));o=Math.round(o/e)*e,o%=360;var i=Math.floor(o/e)||0,l=Math.pow(a,2)+Math.pow(r,2);return{value:i,distance:Math.sqrt(l)}},pt=function(e,t){return t.getHours(e)>=12?"pm":"am"},mt=function(e,t,n,a){if(n&&(a.getHours(e)>=12?"pm":"am")!==t){var r="am"===t?a.getHours(e)-12:a.getHours(e)+12;return a.setHours(e,r)}return e},ft=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMoving=!1,t.handleTouchMove=function(e){t.isMoving=!0,t.setTime(e)},t.handleTouchEnd=function(e){t.isMoving&&(t.setTime(e,!0),t.isMoving=!1)},t.handleMove=function(e){e.preventDefault(),e.stopPropagation(),(void 0===e.buttons?1===e.nativeEvent.which:1===e.buttons)&&t.setTime(e.nativeEvent,!1)},t.handleMouseUp=function(e){t.isMoving&&(t.isMoving=!1),t.setTime(e.nativeEvent,!0)},t.hasSelected=function(){var e=t.props,n=e.type,a=e.value;return n===rt.HOURS||a%5==0},t}return r(t,e),t.prototype.setTime=function(e,t){void 0===t&&(t=!1);var n=e.offsetX,a=e.offsetY;if(void 0===n){var r=e.target.getBoundingClientRect();n=e.changedTouches[0].clientX-r.left,a=e.changedTouches[0].clientY-r.top}var o=this.props.type===rt.SECONDS||this.props.type===rt.MINUTES?function(e,t,n){return void 0===n&&(n=1),dt(6*n,e,t).value*n%60}(n,a,this.props.minutesStep):function(e,t,n){var a=dt(30,e,t),r=a.value,o=a.distance;return r=r||12,n?r%=12:o<90&&(r+=12,r%=24),r}(n,a,Boolean(this.props.ampm));this.props.onChange(o,t)},t.prototype.render=function(){var e=this.props,t=e.classes,n=e.value,a=e.children,r=e.type,o=!e.ampm&&r===rt.HOURS&&(n<1||n>12);return(0,l.createElement)("div",{className:t.container},(0,l.createElement)("div",{className:t.clock},(0,l.createElement)("div",{role:"menu",tabIndex:-1,className:t.squareMask,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onMouseUp:this.handleMouseUp,onMouseMove:this.handleMove}),(0,l.createElement)("div",{className:t.pin}),(0,l.createElement)(it,{type:r,value:n,isInner:o,hasSelected:this.hasSelected()}),a))},t.defaultProps={ampm:!1,minutesStep:1},t}(l.Component),ht=(0,h.Z)((function(e){return(0,f.Z)({container:{display:"flex",justifyContent:"center",alignItems:"flex-end",margin:e.spacing(2)+"px 0 "+e.spacing(1)+"px"},clock:{backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:260,width:260,position:"relative",pointerEvents:"none",zIndex:1},squareMask:{width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:"none",touchActions:"none",userSelect:"none","&:active":{cursor:"move"}},pin:{width:6,height:6,borderRadius:"50%",backgroundColor:e.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})}),{name:"MuiPickersClock"})(ft),vt={0:[0,40],1:[55,19.6],2:[94.4,59.5],3:[109,114],4:[94.4,168.5],5:[54.5,208.4],6:[0,223],7:[-54.5,208.4],8:[-94.4,168.5],9:[-109,114],10:[-94.4,59.5],11:[-54.5,19.6],12:[0,5],13:[36.9,49.9],14:[64,77],15:[74,114],16:[64,151],17:[37,178],18:[0,188],19:[-37,178],20:[-64,151],21:[-74,114],22:[-64,77],23:[-37,50]},gt=(0,p.Z)((function(e){var t=e.spacing(4);return{clockNumber:{width:t,height:32,userSelect:"none",position:"absolute",left:"calc(50% - "+t/2+"px)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:"light"===e.palette.type?e.palette.text.primary:e.palette.text.hint},clockNumberSelected:{color:e.palette.primary.contrastText}}}),{name:"MuiPickersClockNumber"}),bt=function(e){var t,n=e.selected,a=e.label,r=e.index,o=e.isInner,i=gt(),s=(0,u.Z)(i.clockNumber,((t={})[i.clockNumberSelected]=n,t)),c=(0,l.useMemo)((function(){var e=vt[r];return{transform:"translate("+e[0]+"px, "+e[1]+"px"}}),[r]);return(0,l.createElement)(d.Z,{component:"span",className:s,variant:o?"body2":"body1",style:c,children:a})},yt=function(e){for(var t=e.ampm,n=e.utils,a=e.date,r=n.getHours(a),i=[],s=t?12:23,c=function(e){return t?12===e?12===r||0===r:r===e||r-12===e:r===e},u=t?1:0;u<=s;u+=1){var d=u.toString();0===u&&(d="00");var p={index:u,label:n.formatNumber(d),selected:c(u),isInner:!t&&(0===u||u>12)};i.push((0,l.createElement)(bt,o({key:u},p)))}return i},Et=function(e){var t=e.value,n=e.utils.formatNumber;return[(0,l.createElement)(bt,{label:n("00"),selected:0===t,index:12,key:12}),(0,l.createElement)(bt,{label:n("05"),selected:5===t,index:1,key:1}),(0,l.createElement)(bt,{label:n("10"),selected:10===t,index:2,key:2}),(0,l.createElement)(bt,{label:n("15"),selected:15===t,index:3,key:3}),(0,l.createElement)(bt,{label:n("20"),selected:20===t,index:4,key:4}),(0,l.createElement)(bt,{label:n("25"),selected:25===t,index:5,key:5}),(0,l.createElement)(bt,{label:n("30"),selected:30===t,index:6,key:6}),(0,l.createElement)(bt,{label:n("35"),selected:35===t,index:7,key:7}),(0,l.createElement)(bt,{label:n("40"),selected:40===t,index:8,key:8}),(0,l.createElement)(bt,{label:n("45"),selected:45===t,index:9,key:9}),(0,l.createElement)(bt,{label:n("50"),selected:50===t,index:10,key:10}),(0,l.createElement)(bt,{label:n("55"),selected:55===t,index:11,key:11})]},Ct=function(e){var t=e.type,n=e.onHourChange,a=e.onMinutesChange,r=e.onSecondsChange,i=e.ampm,s=e.date,c=e.minutesStep,u=ue(),d=(0,l.useMemo)((function(){switch(t){case rt.HOURS:return{value:u.getHours(s),children:yt({date:s,utils:u,ampm:Boolean(i)}),onChange:function(e,t){var a=pt(s,u),r=mt(u.setHours(s,e),a,Boolean(i),u);n(r,t)}};case rt.MINUTES:var e=u.getMinutes(s);return{value:e,children:Et({value:e,utils:u}),onChange:function(e,t){var n=u.setMinutes(s,e);a(n,t)}};case rt.SECONDS:var o=u.getSeconds(s);return{value:o,children:Et({value:o,utils:u}),onChange:function(e,t){var n=u.setSeconds(s,e);r(n,t)}};default:throw new Error("You must provide the type for TimePickerView")}}),[i,s,n,a,r,t,u]);return(0,l.createElement)(ht,o({type:t,ampm:i,minutesStep:c},d))};Ct.displayName="TimePickerView",Ct.defaultProps={ampm:!0,minutesStep:1};var xt=(0,l.memo)(Ct),Dt=(0,p.Z)((function(e){return{root:{flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",outline:"none",height:75,transition:e.transitions.create("font-size",{duration:"100ms"}),"&:focus":{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium}},monthSelected:{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium},monthDisabled:{pointerEvents:"none",color:e.palette.text.hint}}}),{name:"MuiPickersMonth"}),wt=function(e){var t,n=e.selected,a=e.onSelect,r=e.disabled,s=e.value,c=e.children,p=i(e,["selected","onSelect","disabled","value","children"]),m=Dt(),f=(0,l.useCallback)((function(){a(s)}),[a,s]);return(0,l.createElement)(d.Z,o({role:"button",component:"div",className:(0,u.Z)(m.root,(t={},t[m.monthSelected]=n,t[m.monthDisabled]=r,t)),tabIndex:r?-1:0,onClick:f,onKeyPress:f,color:n?"primary":void 0,variant:n?"h5":"subtitle1",children:c},p))};wt.displayName="Month";var Mt=(0,p.Z)({container:{width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch"}},{name:"MuiPickersMonthSelection"}),kt=function(e){var t=e.disablePast,n=e.disableFuture,a=e.minDate,r=e.maxDate,o=e.date,i=e.onMonthChange,s=e.onChange,c=ue(),u=Mt(),d=c.getMonth(o),p=function(e){var o=c.date(),i=c.date(a),l=c.date(r),s=c.startOfMonth(t&&c.isAfter(o,i)?o:i),u=c.startOfMonth(n&&c.isBefore(o,l)?o:l),d=c.isBefore(e,s),p=c.isAfter(e,u);return d||p},m=(0,l.useCallback)((function(e){var t=c.setMonth(o,e);s(t,!0),i&&i(t)}),[o,s,i,c]);return(0,l.createElement)("div",{className:u.container},c.getMonthArray(o).map((function(e){var t=c.getMonth(e),n=c.format(e,"MMM");return(0,l.createElement)(wt,{key:n,value:t,selected:t===d,onSelect:m,disabled:p(e)},n)})))},Pt=function(){return"undefined"!=typeof window&&window.screen&&window.orientation&&90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait"},Tt={year:at,month:kt,date:He,hours:Ct,minutes:Ct,seconds:Ct},St=(0,p.Z)({container:{display:"flex",flexDirection:"column"},containerLandscape:{flexDirection:"row"},pickerView:{overflowX:"hidden",minHeight:305,minWidth:Ke,maxWidth:325,display:"flex",flexDirection:"column",justifyContent:"center"},pickerViewLandscape:{padding:"0 8px"}},{name:"MuiPickersBasePicker"}),It=function(e){var t,n,a=e.date,r=e.ampm,i=e.views,s=e.disableToolbar,c=e.disablePast,d=e.disableFuture,p=e.hideTabs,m=e.onChange,f=e.openTo,h=e.minutesStep,v=e.dateRangeIcon,g=e.timeIcon,b=e.minDate,y=e.maxDate,E=e.animateYearScrolling,C=e.leftArrowIcon,x=e.rightArrowIcon,D=e.renderDay,w=e.shouldDisableDate,M=e.allowKeyboardControl,k=e.onMonthChange,P=e.onYearChange,T=e.leftArrowButtonProps,S=e.rightArrowButtonProps,I=e.ToolbarComponent,N=e.loadingIndicator,A=e.orientation,L=ue(),O=St(),Z=function(e){var t=(0,l.useState)(Pt()),n=t[0],a=t[1],r=(0,l.useCallback)((function(){return a(Pt())}),[]);return Le((function(){return window.addEventListener("orientationchange",r),function(){return window.removeEventListener("orientationchange",r)}}),[r]),"landscape"===(e||n)}(A),B=function(e,t,n){var a=(0,l.useState)(t&&be(e,t)?t:e[0]),r=a[0],o=a[1],i=(0,l.useCallback)((function(t,a){var i=e[e.indexOf(r)+1];if(a&&i)return n(t,!1),void o(i);n(t,Boolean(a))}),[n,r,e]);return{handleChangeAndOpenNext:i,openView:r,setOpenView:o}}(i,f,m),F=B.openView,R=B.setOpenView,V=B.handleChangeAndOpenNext,H=(0,l.useMemo)((function(){return L.date(b)}),[b,L]),W=(0,l.useMemo)((function(){return L.date(y)}),[y,L]);return(0,l.createElement)("div",{className:(0,u.Z)(O.container,(t={},t[O.containerLandscape]=Z,t))},!s&&(0,l.createElement)(I,o({date:a,onChange:m,setOpenView:R,openView:F,hideTabs:p,dateRangeIcon:v,timeIcon:g,isLandscape:Z},e)),(0,l.createElement)("div",{className:(0,u.Z)(O.pickerView,(n={},n[O.pickerViewLandscape]=Z,n))},"year"===F&&(0,l.createElement)(at,{date:a,onChange:V,minDate:H,maxDate:W,disablePast:c,disableFuture:d,onYearChange:P,animateYearScrolling:E}),"month"===F&&(0,l.createElement)(kt,{date:a,onChange:V,minDate:H,maxDate:W,disablePast:c,disableFuture:d,onMonthChange:k}),"date"===F&&(0,l.createElement)(He,{date:a,onChange:V,onMonthChange:k,disablePast:c,disableFuture:d,minDate:H,maxDate:W,leftArrowIcon:C,leftArrowButtonProps:T,rightArrowIcon:x,rightArrowButtonProps:S,renderDay:D,shouldDisableDate:w,allowKeyboardControl:M,loadingIndicator:N}),("hours"===F||"minutes"===F||"seconds"===F)&&(0,l.createElement)(Ct,{date:a,ampm:r,type:F,minutesStep:h,onHourChange:V,onMinutesChange:V,onSecondsChange:V})))};It.defaultProps=o({},we,{views:Object.keys(Tt)});var Nt=function(e,t,n,a,r){var o=r.invalidLabel,i=r.emptyLabel,l=r.labelFunc,s=n.date(e);return l?l(a?null:s,o):a?i||"":n.isValid(s)?n.format(s,t):o},At=function(e,t,n){return t?n:e.endOfDay(n)},Lt=function(e,t,n){return t?n:e.startOfDay(n)},Ot=function(e,t,n){var a=n.maxDate,r=n.minDate,o=n.disablePast,i=n.disableFuture,l=n.maxDateMessage,s=n.minDateMessage,c=n.invalidDateMessage,u=n.strictCompareDates,d=t.date(e);return null===e?"":t.isValid(e)?a&&t.isAfter(d,At(t,!!u,t.date(a)))||i&&t.isAfter(d,At(t,!!u,t.date()))?l:r&&t.isBefore(d,Lt(t,!!u,t.date(r)))||o&&t.isBefore(d,Lt(t,!!u,t.date()))?s:"":c};function Zt(e,t,n){return void 0===t&&(t=!0),e||(t?n["12h"]:n["24h"])}function Bt(e,t){var n=e.autoOk,a=e.disabled,r=e.onAccept,o=e.onChange,i=e.onError,s=e.value,c=e.variant,u=ue(),d=function(e){var t,n=e.open,a=e.onOpen,r=e.onClose,o=null;return null==n&&(n=(t=(0,l.useState)(!1))[0],o=t[1]),{isOpen:n,setIsOpen:(0,l.useCallback)((function(e){return o&&o(e),e?a&&a():r&&r()}),[a,r,o])}}(e),p=d.isOpen,m=d.setIsOpen,f=function(e,t){return{date:function(e,t){var n=t.value,a=t.initialFocusedDate,r=(0,l.useRef)(e.date()),o=e.date(n||a||r.current);return o&&e.isValid(o)?o:r.current}(ue(),e),format:e.format||t.getDefaultFormat()}}(e,t),h=f.date,v=f.format,g=(0,l.useState)(h),b=g[0],y=g[1];(0,l.useEffect)((function(){p||u.isEqual(b,h)||y(h)}),[h,p,b,u]);var E=(0,l.useCallback)((function(e){m(!1),o(e),r&&r(e)}),[r,o,m]),C=(0,l.useMemo)((function(){return{format:v,open:p,onClear:function(){return E(null)},onAccept:function(){return E(b)},onSetToday:function(){return y(u.date())},onDismiss:function(){m(!1)}}}),[E,v,p,b,m,u]),x=(0,l.useMemo)((function(){return{date:b,onChange:function(e,t){void 0===t&&(t=!0),y(e),"inline"!==c&&"static"!==c||o(e),t&&n&&E(e)}}}),[E,n,o,b,c]),D=Ot(s,u,e);(0,l.useEffect)((function(){D&&i&&i(D,s)}),[i,D,s]);var w=Nt(h,v,u,null===s,e),M={pickerProps:x,inputProps:(0,l.useMemo)((function(){return{inputValue:w,validationError:D,onClick:function(){return!a&&m(!0)}}}),[a,w,m,D]),wrapperProps:C};return(0,l.useDebugValue)(M),M}var Ft=function(e){var t=e.inputValue,n=e.inputVariant,a=e.validationError,r=e.InputProps,s=e.TextFieldComponent,c=void 0===s?te.Z:s,u=i(e,["inputValue","inputVariant","validationError","InputProps","TextFieldComponent"]),d=(0,l.useMemo)((function(){return o({},r,{readOnly:!0})}),[r]);return(0,l.createElement)(c,o({error:Boolean(a),helperText:a},u,{value:t,variant:n,InputProps:d}))};function Rt(e){var t=e.useOptions,n=e.getCustomProps,a=e.DefaultToolbarComponent;return function(e){var r=e.allowKeyboardControl,s=e.ampm,c=e.hideTabs,u=e.animateYearScrolling,d=(e.autoOk,e.disableFuture),p=e.disablePast,m=(e.format,e.forwardedRef,e.initialFocusedDate,e.invalidDateMessage,e.labelFunc,e.leftArrowIcon),f=e.leftArrowButtonProps,h=e.maxDate,v=(e.maxDateMessage,e.minDate),g=(e.onOpen,e.onClose,e.minDateMessage,e.strictCompareDates),b=e.minutesStep,y=(e.onAccept,e.onChange,e.onMonthChange),E=e.onYearChange,C=e.renderDay,x=e.views,D=e.openTo,w=e.rightArrowIcon,M=e.rightArrowButtonProps,k=e.shouldDisableDate,P=e.dateRangeIcon,T=(e.emptyLabel,e.invalidLabel,e.timeIcon),S=(e.value,e.variant),I=e.orientation,N=e.disableToolbar,A=e.loadingIndicator,L=e.ToolbarComponent,O=void 0===L?a:L,Z=i(e,["allowKeyboardControl","ampm","hideTabs","animateYearScrolling","autoOk","disableFuture","disablePast","format","forwardedRef","initialFocusedDate","invalidDateMessage","labelFunc","leftArrowIcon","leftArrowButtonProps","maxDate","maxDateMessage","minDate","onOpen","onClose","minDateMessage","strictCompareDates","minutesStep","onAccept","onChange","onMonthChange","onYearChange","renderDay","views","openTo","rightArrowIcon","rightArrowButtonProps","shouldDisableDate","dateRangeIcon","emptyLabel","invalidLabel","timeIcon","value","variant","orientation","disableToolbar","loadingIndicator","ToolbarComponent"]),B=n?n(e):{},F=Bt(e,t(e)),R=F.pickerProps,V=F.inputProps,H=F.wrapperProps;return(0,l.createElement)(tt,o({variant:S,InputComponent:Ft,DateInputProps:V},H,B,Z),(0,l.createElement)(It,o({},R,{orientation:I,disableToolbar:N,ToolbarComponent:O,hideTabs:c,ampm:s,views:x,openTo:D,allowKeyboardControl:r,minutesStep:b,animateYearScrolling:u,disableFuture:d,disablePast:p,leftArrowIcon:m,leftArrowButtonProps:f,maxDate:h,minDate:v,strictCompareDates:g,onMonthChange:y,onYearChange:E,renderDay:C,dateRangeIcon:P,timeIcon:T,rightArrowIcon:w,rightArrowButtonProps:M,shouldDisableDate:k,loadingIndicator:A})))}}Ft.displayName="PureDateInput";var Vt=function(e){var t=e.inputValue,n=e.inputVariant,a=e.validationError,r=e.KeyboardButtonProps,s=e.InputAdornmentProps,c=e.onClick,u=e.onChange,d=e.InputProps,p=e.mask,m=e.maskChar,f=void 0===m?"_":m,h=e.refuse,v=void 0===h?/[^\d]+/gi:h,g=e.format,b=e.keyboardIcon,y=e.disabled,E=e.rifmFormatter,C=e.TextFieldComponent,x=void 0===C?te.Z:C,D=i(e,["inputValue","inputVariant","validationError","KeyboardButtonProps","InputAdornmentProps","onClick","onChange","InputProps","mask","maskChar","refuse","format","keyboardIcon","disabled","rifmFormatter","TextFieldComponent"]),w=p||function(e,t){return e.replace(/[a-z]/gi,t)}(g,f),M=(0,l.useCallback)(function(e,t,n){return function(a){if(""===a)return a;for(var r="",o=a.replace(n,""),i=0,l=0;i<e.length;){var s=e[i];s===t&&l<o.length?(r+=o[l],l+=1):r+=s,i+=1}return r}}(w,f,v),[p,f]),k=s&&s.position?s.position:"end";return(0,l.createElement)(re,{value:t,onChange:function(e){u(""===e||e===w?null:e)},refuse:v,format:E||M},(function(e){var t,i=e.onChange,u=e.value;return(0,l.createElement)(x,o({disabled:y,error:Boolean(a),helperText:a},D,{value:u,onChange:i,variant:n,InputProps:o({},d,(t={},t[k+"Adornment"]=(0,l.createElement)(ne.Z,o({position:k},s),(0,l.createElement)(q.IconButton,o({disabled:y},r,{onClick:c}),b)),t))}))}))};function Ht(e,t){var n=e.format,a=void 0===n?t.getDefaultFormat():n,r=e.inputValue,i=e.onChange,s=e.value,c=ue(),u=Nt(s,a,c,null===s,e),d=(0,l.useState)(u),p=d[0],m=d[1],f=r?function(e,t,n){try{return t.parse(e,n)}catch(e){return null}}(r,c,a):s;(0,l.useEffect)((function(){(null===s||c.isValid(s))&&m(u)}),[u,m,c,s]);var h=(0,l.useCallback)((function(e){i(e,null===e?null:c.format(e,a))}),[a,i,c]),v=Bt(o({},e,{value:f,onChange:h}),t),g=v.inputProps,b=v.wrapperProps,y=v.pickerProps,E=(0,l.useMemo)((function(){return o({},g,{format:b.format,inputValue:r||p,onChange:function(e){m(e||"");var t=null===e?null:c.parse(e,b.format);i(t,e)}})}),[g,p,r,i,c,b.format]);return{inputProps:E,wrapperProps:b,pickerProps:y}}function Wt(e){var t=e.useOptions,n=e.getCustomProps,a=e.DefaultToolbarComponent;return function(e){var r=e.allowKeyboardControl,s=e.ampm,c=e.hideTabs,u=e.animateYearScrolling,d=(e.autoOk,e.disableFuture),p=e.disablePast,m=(e.format,e.forwardedRef,e.initialFocusedDate,e.invalidDateMessage,e.labelFunc,e.leftArrowIcon),f=e.leftArrowButtonProps,h=e.maxDate,v=(e.maxDateMessage,e.minDate),g=(e.onOpen,e.onClose,e.minDateMessage,e.strictCompareDates),b=e.minutesStep,y=(e.onAccept,e.onChange,e.onMonthChange),E=e.onYearChange,C=e.renderDay,x=e.views,D=e.openTo,w=e.rightArrowIcon,M=e.rightArrowButtonProps,k=e.shouldDisableDate,P=(e.value,e.dateRangeIcon),T=(e.emptyLabel,e.invalidLabel,e.timeIcon),S=e.orientation,I=e.variant,N=e.disableToolbar,A=e.loadingIndicator,L=e.ToolbarComponent,O=void 0===L?a:L,Z=i(e,["allowKeyboardControl","ampm","hideTabs","animateYearScrolling","autoOk","disableFuture","disablePast","format","forwardedRef","initialFocusedDate","invalidDateMessage","labelFunc","leftArrowIcon","leftArrowButtonProps","maxDate","maxDateMessage","minDate","onOpen","onClose","minDateMessage","strictCompareDates","minutesStep","onAccept","onChange","onMonthChange","onYearChange","renderDay","views","openTo","rightArrowIcon","rightArrowButtonProps","shouldDisableDate","value","dateRangeIcon","emptyLabel","invalidLabel","timeIcon","orientation","variant","disableToolbar","loadingIndicator","ToolbarComponent"]),B=n?n(e):{},F=Ht(e,t(e)),R=F.pickerProps,V=F.inputProps,H=F.wrapperProps;return(0,l.createElement)(tt,o({variant:I,InputComponent:Vt,DateInputProps:V},B,H,Z),(0,l.createElement)(It,o({},R,{ToolbarComponent:O,disableToolbar:N,hideTabs:c,orientation:S,ampm:s,views:x,openTo:D,allowKeyboardControl:r,minutesStep:b,animateYearScrolling:u,disableFuture:d,disablePast:p,leftArrowIcon:m,leftArrowButtonProps:f,maxDate:h,minDate:v,strictCompareDates:g,onMonthChange:y,onYearChange:E,renderDay:C,dateRangeIcon:P,timeIcon:T,rightArrowIcon:w,rightArrowButtonProps:M,shouldDisableDate:k,loadingIndicator:A})))}}Vt.defaultProps={keyboardIcon:(0,l.createElement)((function(e){return s().createElement(Q.Z,o({},e),s().createElement("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"}),s().createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}),null)};var jt=o({},we,{openTo:"date",views:["year","date"]});function Yt(e){var t=ue();return{getDefaultFormat:function(){return function(e,t){return ye(e)?t.yearFormat:Ee(e)?t.yearMonthFormat:t.dateFormat}(e.views,t)}}}var Kt=Rt({useOptions:Yt,DefaultToolbarComponent:xe}),_t=Wt({useOptions:Yt,DefaultToolbarComponent:xe});Kt.defaultProps=jt,_t.defaultProps=jt;var Ut=(0,p.Z)({toolbarLandscape:{flexWrap:"wrap"},toolbarAmpmLeftPadding:{paddingLeft:50},separator:{margin:"0 4px 0 2px",cursor:"default"},hourMinuteLabel:{display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},hourMinuteLabelLandscape:{marginTop:"auto"},hourMinuteLabelReverse:{flexDirection:"row-reverse"},ampmSelection:{marginLeft:20,marginRight:-20,display:"flex",flexDirection:"column"},ampmLandscape:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},ampmSelectionWithSeconds:{marginLeft:15,marginRight:10},ampmLabel:{fontSize:18}},{name:"MuiPickersTimePickerToolbar"});function zt(e,t,n){var a=ue();return{meridiemMode:pt(e,a),handleMeridiemChange:(0,l.useCallback)((function(r){var o=mt(e,r,Boolean(t),a);n(o,!1)}),[t,e,n,a])}}var Qt=function(e){var t,n,a,r=e.date,o=e.views,i=e.ampm,s=e.openView,c=e.onChange,d=e.isLandscape,p=e.setOpenView,m=ue(),f=(0,v.Z)(),h=Ut(),g=zt(r,i,c),b=g.meridiemMode,y=g.handleMeridiemChange,E=d?"h3":"h2";return(0,l.createElement)(ge,{isLandscape:d,className:(0,u.Z)((t={},t[h.toolbarLandscape]=d,t[h.toolbarAmpmLeftPadding]=i&&!d,t))},(0,l.createElement)("div",{className:(0,u.Z)(h.hourMinuteLabel,(n={},n[h.hourMinuteLabelLandscape]=d,n[h.hourMinuteLabelReverse]="rtl"===f.direction,n))},be(o,"hours")&&(0,l.createElement)(he,{variant:E,onClick:function(){return p(rt.HOURS)},selected:s===rt.HOURS,label:m.getHourText(r,Boolean(i))}),be(o,["hours","minutes"])&&(0,l.createElement)(pe,{label:":",variant:E,selected:!1,className:h.separator}),be(o,"minutes")&&(0,l.createElement)(he,{variant:E,onClick:function(){return p(rt.MINUTES)},selected:s===rt.MINUTES,label:m.getMinuteText(r)}),be(o,["minutes","seconds"])&&(0,l.createElement)(pe,{variant:"h2",label:":",selected:!1,className:h.separator}),be(o,"seconds")&&(0,l.createElement)(he,{variant:"h2",onClick:function(){return p(rt.SECONDS)},selected:s===rt.SECONDS,label:m.getSecondText(r)})),i&&(0,l.createElement)("div",{className:(0,u.Z)(h.ampmSelection,(a={},a[h.ampmLandscape]=d,a[h.ampmSelectionWithSeconds]=be(o,"seconds"),a))},(0,l.createElement)(he,{disableRipple:!0,variant:"subtitle1",selected:"am"===b,typographyClassName:h.ampmLabel,label:m.getMeridiemText("am"),onClick:function(){return y("am")}}),(0,l.createElement)(he,{disableRipple:!0,variant:"subtitle1",selected:"pm"===b,typographyClassName:h.ampmLabel,label:m.getMeridiemText("pm"),onClick:function(){return y("pm")}})))},Gt=o({},De,{openTo:"hours",views:["hours","minutes"]});function qt(e){var t=ue();return{getDefaultFormat:function(){return Zt(e.format,e.ampm,{"12h":t.time12hFormat,"24h":t.time24hFormat})}}}var Xt=Rt({useOptions:qt,DefaultToolbarComponent:Qt}),Jt=Wt({useOptions:qt,DefaultToolbarComponent:Qt,getCustomProps:function(e){return{refuse:e.ampm?/[^\dap]+/gi:/[^\d]+/gi}}});Xt.defaultProps=Gt,Jt.defaultProps=Gt;var $t=function(e){return"date"===e||"year"===e?"date":"time"},en=(0,p.Z)((function(e){var t="light"===e.palette.type?e.palette.primary.main:e.palette.background.default;return{tabs:{color:e.palette.getContrastText(t),backgroundColor:t}}}),{name:"MuiPickerDTTabs"}),tn=function(e){var t=e.view,n=e.onChange,a=e.dateRangeIcon,r=e.timeIcon,o=en(),i="light"===(0,v.Z)().palette.type?"secondary":"primary";return(0,l.createElement)(le.Z,null,(0,l.createElement)(ie.Z,{variant:"fullWidth",value:$t(t),onChange:function(e,a){a!==$t(t)&&n("date"===a?"date":"hours")},className:o.tabs,indicatorColor:i},(0,l.createElement)(oe.Z,{value:"date",icon:(0,l.createElement)(l.Fragment,null,a)}),(0,l.createElement)(oe.Z,{value:"time",icon:(0,l.createElement)(l.Fragment,null,r)})))};tn.defaultProps={dateRangeIcon:(0,l.createElement)((function(e){return s().createElement(Q.Z,o({},e),s().createElement("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"}),s().createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}),null),timeIcon:(0,l.createElement)((function(e){return s().createElement(Q.Z,o({},e),s().createElement("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"}),s().createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),s().createElement("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}))}),null)};var nn=(0,p.Z)((function(e){return{toolbar:{paddingLeft:16,paddingRight:16,justifyContent:"space-around"},separator:{margin:"0 4px 0 2px",cursor:"default"}}}),{name:"MuiPickerDTToolbar"}),an=function(e){var t=e.date,n=e.openView,a=e.setOpenView,r=e.ampm,o=e.hideTabs,i=e.dateRangeIcon,s=e.timeIcon,c=e.onChange,u=ue(),d=nn(),p=!o&&"undefined"!=typeof window&&window.innerHeight>667,m=zt(t,r,c),f=m.meridiemMode,h=m.handleMeridiemChange,g="rtl"===(0,v.Z)().direction;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ge,{isLandscape:!1,className:d.toolbar},(0,l.createElement)(q.Grid,{container:!0,justify:"center",wrap:"nowrap"},(0,l.createElement)(q.Grid,{item:!0,container:!0,xs:5,justify:"flex-start",direction:"column"},(0,l.createElement)("div",null,(0,l.createElement)(he,{variant:"subtitle1",onClick:function(){return a("year")},selected:"year"===n,label:u.getYearText(t)})),(0,l.createElement)("div",null,(0,l.createElement)(he,{variant:"h4",onClick:function(){return a("date")},selected:"date"===n,label:u.getDateTimePickerHeaderText(t)}))),(0,l.createElement)(q.Grid,{item:!0,container:!0,xs:6,justify:"center",alignItems:"flex-end",direction:g?"row-reverse":"row"},(0,l.createElement)(he,{variant:"h3",onClick:function(){return a("hours")},selected:"hours"===n,label:u.getHourText(t,r)}),(0,l.createElement)(pe,{variant:"h3",label:":",className:d.separator}),(0,l.createElement)(he,{variant:"h3",onClick:function(){return a("minutes")},selected:"minutes"===n,label:u.getMinuteText(t)})),r&&(0,l.createElement)(q.Grid,{item:!0,container:!0,xs:1,direction:"column",justify:"flex-end"},(0,l.createElement)(he,{variant:"subtitle1",selected:"am"===f,label:u.getMeridiemText("am"),onClick:function(){return h("am")}}),(0,l.createElement)(he,{variant:"subtitle1",selected:"pm"===f,label:u.getMeridiemText("pm"),onClick:function(){return h("pm")}})))),p&&(0,l.createElement)(tn,{dateRangeIcon:i,timeIcon:s,view:n,onChange:a}))},rn=o({},Me,{wider:!0,orientation:"portrait",openTo:"date",views:["year","date","hours","minutes"]});function on(e){var t=ue();if("portrait"!==e.orientation)throw new Error("We are not supporting custom orientation for DateTimePicker yet :(");return{getDefaultFormat:function(){return Zt(e.format,e.ampm,{"12h":t.dateTime12hFormat,"24h":t.dateTime24hFormat})}}}var ln=Rt({useOptions:on,DefaultToolbarComponent:an}),sn=Wt({useOptions:on,DefaultToolbarComponent:an,getCustomProps:function(e){return{refuse:e.ampm?/[^\dap]+/gi:/[^\d]+/gi}}});ln.defaultProps=rn,sn.defaultProps=rn}}]);